CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 25, 2017, 21:37:12 pm


Login with username, password and session length


Pages: 1 ... 4 5 [6]
  Print  
Author Topic: [VBS - C# - VB .net] parts of code (snippet)  (Read 17678 times)
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 2734



View Profile
« Reply #75 on: January 09, 2017, 18:33:10 pm »

Normally I would go for a local file such as an INI file but that's because I was a DOS user many years ago. I've decided lately that life's too short to worry about such details and I'm going with the easiest option for myself.
I'm thinking that if we are using mono for the Windows Forms emulation then we might as well let it handle the Registry too.
« Last Edit: January 09, 2017, 18:38:11 pm by EddyCurrent » Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4197



View Profile WWW
« Reply #76 on: January 09, 2017, 19:13:17 pm »

Hello Eddy

Good trick, thanks for that ! ... I thought that Linux was not able to handle windows registry.

On my last Hatch plugin ; I use that in InitPlugin() to detect if linux or win is used.

Code:
Public Shared WinOS As Boolean = True

    Public Shared Sub InitPlugin(ByRef ui As CamBamUI)
        ...

        'test for Linux/Win version

        If My.Computer.Info.OSPlatform = "Unix" Then    'plugin used on linux version
            WinOS = False
        End If

        ThisApplication.AddLogMessage(2, "Hatch plugin Operating System: " & My.Computer.Info.OSPlatform)

    End Sub

++
David
Logged
lloydsp
CNC Jedi
*****
Online Online

Posts: 6633



View Profile
« Reply #77 on: January 09, 2017, 19:30:56 pm »

"I thought that Linux was not able to handle windows registry."
-----------
Linux doesn't.  Mono does.

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
Pages: 1 ... 4 5 [6]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.114 seconds with 18 queries.

Copyright © 2008 HexRay Ltd. | Sitemap