Пример #1
0
        public static string GetMyVersion()
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);

            return("CommCoreVer=" + fvi.FileVersion + Environment.NewLine + "Using CommExtensions: " + CommModuleExtensions.CommExtensions.GetMyVersion());
        }
Пример #2
0
        private void Btn1_Click(object sender, RoutedEventArgs e)
        {
            isMyCompress = false;
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "txt文件(*.txt)|*.txt|txt压缩文件(*.txt)|*.mc";
            if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                readPath = openFileDialog.FileName;
                FileInfo fileInfo = new FileInfo(readPath);
                System.Diagnostics.FileVersionInfo info = System.Diagnostics.FileVersionInfo.GetVersionInfo(readPath);
                tbx1.Text = System.IO.Path.GetFullPath(openFileDialog.FileName);
                if (openFileDialog.FileName.Contains(".mc"))
                {
                    isMyCompress   = true;
                    btn3.IsEnabled = false;
                    btn4.IsEnabled = true;
                }
                else
                {
                    before         = Math.Ceiling(fileInfo.Length / 1024.0);
                    btn4.IsEnabled = false;
                    btn3.IsEnabled = true;
                }
            }
        }
        public static string GetAssemblyFileVersion()
        {
            Assembly assembly = Assembly.GetExecutingAssembly();

            System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
            return(fvi.FileVersion);
        }
Пример #4
0
        public static void Main()
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
            string version = fvi.FileVersion;
            string product = fvi.ProductName;
            string appName = product + " v." + version;

            mutex = new Mutex(true, appName, out bool createdNew);

            if (!createdNew)
            {
                //application is already running! Exiting the application
                MessageBox.Show("Another instance is already running!", appName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            UserSettings settings = SettingsManager.ReadSettings();

            SettingsManager.CurrentSettings = settings;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            SettingsManager.ApplyStartWithWindows(SettingsManager.CurrentSettings.StartWithWindows);
            Application.Run(new FormMain());
            SettingsManager.SaveSettings(SettingsManager.CurrentSettings);
        }
Пример #5
0
        public static string DisplayNameForApplication(string application, string appFullPath)
        {
            try
            {
                // check the cache in the registry
                if (application != null)
                {
                    string name = RegistryHelper.StringValueFromRegKey(Registry.CurrentUser, @"HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache", application);
                    if (name != null)
                    {
                        return(name);
                    }
                }

                FileInfo fi = new FileInfo(appFullPath);
                if (fi.Exists)
                {
                    System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(appFullPath);
                    return(fvi.FileDescription);
                }
                else
                {
                    return(fi.Name);
                }
            }
            catch { }
            return(application);
        }
Пример #6
0
        public Triggernometry.RealPlugin.PluginWrapper GetInstance(string ActPluginName, string ActPluginType)
        {
            foreach (ActPluginData p in ActGlobals.oFormActMain.ActPlugins)
            {
                string tn = p.pluginObj != null?p.pluginObj.GetType().Name : "(null)";

                if (
                    (
                        (String.Compare(p.pluginFile.Name, ActPluginName, true) == 0)
                        ||
                        (String.Compare(tn, ActPluginType, true) == 0)
                    )
                    &&
                    (String.Compare(p.lblPluginStatus.Text, "FFXIV Plugin Started.", true) == 0)
                    )
                {
                    if (ActPluginPrevious == p)
                    {
                        return(new Triggernometry.RealPlugin.PluginWrapper()
                        {
                            pluginObj = p.pluginObj, state = 1
                        });
                    }
                    else
                    {
                        ActPluginPrevious = p;
                        System.Diagnostics.FileVersionInfo vi = System.Diagnostics.FileVersionInfo.GetVersionInfo(p.pluginFile.FullName);
                        int[] expectedActVer = new int[4] {
                            2, 0, 4, 6
                        };
                        string expectedActVers = "2.0.4.6";
                        int[]  currentActVer   = new int[4] {
                            vi.FileMajorPart, vi.FileMinorPart, vi.FileBuildPart, vi.FilePrivatePart
                        };
                        for (int i = 0; i < 4; i++)
                        {
                            if (currentActVer[i] > expectedActVer[i])
                            {
                                break;
                            }
                            if (currentActVer[i] < expectedActVer[i])
                            {
                                return(new Triggernometry.RealPlugin.PluginWrapper()
                                {
                                    pluginObj = p.pluginObj, state = 2, fileversion = vi.FileVersion.ToString(), expectedversion = expectedActVers
                                });
                            }
                        }
                        return(new Triggernometry.RealPlugin.PluginWrapper()
                        {
                            pluginObj = p.pluginObj, state = 1
                        });
                    }
                }
            }
            return(new Triggernometry.RealPlugin.PluginWrapper()
            {
                pluginObj = null, state = 0
            });
        }
Пример #7
0
        protected internal void TakePropertyServer()
        {
            System.Diagnostics.FileVersionInfo myFileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(Application.ExecutablePath);
            sVersionSoftware = myFileVersionInfo.ProductName + " ver. b." + myFileVersionInfo.FileVersion;

            string sIntellectRegPath = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion";   //Check Windows Type

            using (Microsoft.Win32.RegistryKey EvUserKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(sIntellectRegPath, Microsoft.Win32.RegistryKeyPermissionCheck.ReadSubTree, System.Security.AccessControl.RegistryRights.ReadKey))
            {
                try
                {
                    sNameWindows    = EvUserKey.GetValue("ProductName").ToString().ToUpper().Trim();
                    sBuildWindows   = EvUserKey.GetValue("CurrentBuild").ToString().ToLower().Trim();
                    sBuildWindowsEx = EvUserKey.GetValue("BuildLabEx").ToString().ToLower().Trim();
                    //BuildLabEx      -   10240.17354.amd64fre.th1_st1.170327-1827

                    /*
                     * Текущие версии Windows 10 по вариантам обслуживания
                     * Вариант обслуживания                         Version     OS build
                     * Полугодовой канал (для определенных устройств)   1709        16299.98
                     * Текущая ветвь (CB)                               1703        15063.729
                     * Текущая ветвь (CB)                               1607        14393.1914
                     * Текущая ветвь (CB)                           1511        10586.1232
                     * Полугодовой канал                            1703        15063.729
                     * Текущая ветвь для бизнеса (CBB)                  1607        14393.1914
                     * Текущая ветвь для бизнеса (CBB)              1511        10586.1232
                     * Ветвь долгосрочного обслуживания (LTSB)      1607        14393.1914
                     * Ветвь долгосрочного обслуживания (LTSB)      1507 (RTM)  10240.17673
                     */
                }
                catch { }
            }

            answer = "\nHost:" + Form1.myForm.LocalHost.UserName + "\nOS: " + sNameWindows + " " + sBuildWindows + " " + sBuildWindowsEx + "\n" + Environment.OSVersion + "\nSoftware: " + sVersionSoftware + "\nUser: " + Environment.UserName;
        }
Пример #8
0
        public static bool check()
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
            string version = fvi.FileVersion;

            string servidor = getVersion();

            if (servidor == "error")
            {
                return(false);
            }
            // pasamos a números (separando los puntos)
            // EJ: "1.0.2.5" => [1, 0, 2, 5]
            List <int> v1, v2;

            v1 = version.Split('.').ToList().Select(x => int.Parse(x)).ToList();
            v2 = servidor.Split('.').ToList().Select(x => int.Parse(x)).ToList();

            for (int i = 0; i < 4; i++)
            {
                if (v2[i] > v1[i])
                {
                    return(true);               // hay una nueva versión
                }
                if (v2[i] < v1[i])
                {
                    return(false);               // tenemos una versión nueva
                }
            }
            // misma versión
            return(false);
        }
Пример #9
0
        internal static string AssemblyBuildVersion()
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo version  = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);

            return(version.FileVersion);
        }
Пример #10
0
        private void MnuIconExit_Click(object sender, EventArgs e)
        {
            if (!_canOpenNewCloseMessage)
            {
                return;
            }
            _canOpenNewCloseMessage = false;
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
            string version = fvi.FileVersion;
            string product = fvi.ProductName;
            string title   = product + " v." + version;

            _canOpenNewListForm = false;

            DialogResult dr = MessageBox.Show(@"Are you sure that you want to quit?

The application can execute scheduled tasks only while running!
Quitting it will prevent scheduled tasks to be executed until you start it again.
", title, MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);

            _canOpenNewListForm     = true;
            _canOpenNewCloseMessage = true;
            if (dr != DialogResult.Yes)
            {
                return;
            }
            Controller.Instance.SaveData("");
            Application.Exit();
        }
Пример #11
0
        /// <summary>
        /// Gets the file version of the currently (executing) dll.
        /// </summary>
        /// <returns>The string with the file version of the current dll or null if an error happened</returns>
        public static string GetCurrentDllFileVersion()
        {
            Assembly CurrentAssembly = Assembly.GetExecutingAssembly();

            System.Diagnostics.FileVersionInfo fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(CurrentAssembly.Location);
            return(fileVersionInfo.FileVersion);
        }
Пример #12
0
        /// <summary>
        /// Verify the application build settings match the architecture of the TT API installed.
        /// </summary>
        public static void TTAPIArchitectureCheck()
        {
            try
            {
                System.Diagnostics.FileVersionInfo fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo((new System.IO.FileInfo("TradingTechnologies.TTAPI.dll")).FullName);

                if (fileVersionInfo != null && fileVersionInfo.FileName != String.Empty)
                {
                    System.Reflection.Assembly appAssembly = System.Reflection.Assembly.GetExecutingAssembly();
                    System.Reflection.Assembly apiAssembly = System.Reflection.Assembly.ReflectionOnlyLoadFrom(fileVersionInfo.FileName);

                    if (appAssembly != null && apiAssembly != null)
                    {
                        System.Reflection.PortableExecutableKinds appKinds, apiKinds;
                        System.Reflection.ImageFileMachine        appImgFileMachine, apiImgFileMachine;

                        appAssembly.ManifestModule.GetPEKind(out appKinds, out appImgFileMachine);
                        apiAssembly.ManifestModule.GetPEKind(out apiKinds, out apiImgFileMachine);

                        if (!appKinds.HasFlag(apiKinds))
                        {
                            MessageBox.Show(String.Format("WARNING: This application must be compiled as a {0} application to run with a {0} version of TT API.",
                                                          (apiKinds.HasFlag(System.Reflection.PortableExecutableKinds.Required32Bit) ? "32Bit" : "64bit")));
                        }
                    }
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(String.Format("ERROR: An error occured while attempting to verify the application build settings match the architecture of the TT API installed. {0}", err.Message));
            }
        }
Пример #13
0
        public static string GetMyVersion()
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);

            return("GUIToolsWPFVer=" + fvi.FileVersion + Environment.NewLine + "using Castle.Core 4.4.1");
        }
Пример #14
0
        private void button1_Click(object sender, EventArgs e)
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);

            System.Windows.Forms.MessageBox.Show("AppServerVer=" + fvi.FileVersion
                                                 + Environment.NewLine
                                                 + "Using: " + ServerClientComm.ServerClientComm.GetMyVersion()
                                                 + Environment.NewLine
                                                 + "Using: " + LoggerChildDB.DBLog.GetMyVersion()
                                                 + Environment.NewLine
                                                 + "Using: " + CommModuleCore.CommCore.GetMyVersion());

            /*
             + Environment.NewLine
             +
             + "Using: " + AdapterDB.MSSSQL.ReadFromDB.GetMyVersion()
             + Environment.NewLine
             + "Using: " + AdapterDB.Oracle.ReadFromDB.GetMyVersion()
             + Environment.NewLine
             + "Using: " + AdapterFile.Binary.BinaryRW.GetMyVersion()
             + Environment.NewLine
             + "Using: " + AdapterFile.Text.TextRW.GetMyVersion()
             + Environment.NewLine
             + "Using: " + LoggerChildDB.DBLog.GetMyVersion()
             +Environment.NewLine
             + "Using: " + CommModuleCore.CommCore.GetMyVersion());*/
        }
Пример #15
0
 private void AboutForm_Load(object sender, System.EventArgs e)
 {
     System.Diagnostics.Process         ThisProcess = System.Diagnostics.Process.GetCurrentProcess();
     System.Diagnostics.FileVersionInfo Info        = System.Diagnostics.FileVersionInfo.GetVersionInfo(ThisProcess.MainModule.FileName);
     AppNameLabel.Text   = Info.FileDescription;
     VersionLabel.Text   = "Version " + Info.FileVersion;
     CopyrightLabel.Text = Info.LegalCopyright;
 }
Пример #16
0
        /// <summary>
        /// get .dll version
        /// </summary>
        /// <returns></returns>
        public static string getVersion()
        {
            System.Reflection.Assembly         cur_assembly         = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo cur_assembly_FileVer = System.Diagnostics.FileVersionInfo.GetVersionInfo(cur_assembly.Location);
            Version cur_assemblyVer = new Version(cur_assembly_FileVer.FileVersion);

            return("ver." + cur_assemblyVer.ToString());
        }
Пример #17
0
        private void button1_Click(object sender, EventArgs e)
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);

            System.Windows.Forms.MessageBox.Show($"AppServer03 Ver={fvi.FileVersion}{Environment.NewLine}" +
                                                 $"{Environment.NewLine}Using {AdapterDB3.MSSQL.ReadFromDB.GetMyVersion()}");
        }
        public static string GetCopyrightInformation()
        {
            System.Reflection.Assembly         assembly    = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo versionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
            string copyright = versionInfo.LegalCopyright;

            return(copyright);
        }
 private void SettingWindow_Load(object sender, EventArgs e)
 {
     System.Diagnostics.FileVersionInfo ver = System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);
     this.label3.Text          = ver.FileVersion;
     this.checkBox1.Checked    = Program.setting.preview;
     this.trackBar1.Value      = Program.setting.size;
     this.numericUpDown1.Value = Program.setting.load_num;
 }
Пример #20
0
 /// <summary>
 /// Constructs a new VersionNumber
 /// </summary>
 /// <param name="file">The file path.</param>
 public VersionNumber(string file)
 {
     System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(file);
     this.major    = fvi.FileMajorPart;
     this.minor    = fvi.FileMinorPart;
     this.build    = fvi.FileBuildPart;
     this.revision = fvi.FilePrivatePart;
 }
Пример #21
0
 private void ShowVersion()
 {
     //自分自身のバージョン情報を取得する
     System.Diagnostics.FileVersionInfo ver =
         System.Diagnostics.FileVersionInfo.GetVersionInfo(
             System.Reflection.Assembly.GetExecutingAssembly().Location);
     MessageBox.Show(ver.FileVersion.ToString());
 }
Пример #22
0
        public static string GetMyVersion()
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
            //Assembly.GetExecutingAssembly().GetReferencedAssemblies()

            return($"AdapterFile.BinaryVer={fvi.FileVersion}{Environment.NewLine}Using Google.Apis.Core");
        }
Пример #23
0
 public static Assembly GetLoadedAssembly(this System.Diagnostics.FileVersionInfo fvinfo)
 {
     return(AppDomain
            .CurrentDomain
            .GetAssemblies()
            .Where(a => !a.IsDynamic)  // this is required to prevent crashes if there's a dynamically generated assembly loaded
            .FirstOrDefault(a => string.Equals(a.Location, fvinfo.FileName, StringComparison.InvariantCultureIgnoreCase)));
 }
Пример #24
0
        private void frmFlussi_Load(object sender, EventArgs e)
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
            string version = fvi.FileVersion;

            this.Text += " " + version;
        }
Пример #25
0
        private void Button_versionInformation_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.FileVersionInfo ver           = System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);
            VersionInfomationWindow            VersionWindow = new VersionInfomationWindow("Recode_To_Text_Ver:" + ver.FileVersion, "Speech_To_Text_DLL_Ver:" + stt.Version);

            logger.Debug("------------- VersionWindow show dialog -------------");
            LightBox.ShowDialog(this, VersionWindow);
        }
Пример #26
0
        private string GetVersionStr(string binName)
        {
            System.Diagnostics.FileVersionInfo ver =
                System.Diagnostics.FileVersionInfo.GetVersionInfo(binName);
            string currentVersion = string.Format("{0:D8}", ver.ProductMajorPart * 10000 + ver.ProductMinorPart);

            return(currentVersion);
        }
        public static string GetAppVersion()
        {
            System.Reflection.Assembly         assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Diagnostics.FileVersionInfo fvi      = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
            string version = fvi.FileVersion;

            return(version);
        }
Пример #28
0
        public static string Version()
        {
            Type     clsType = typeof(AssemblyInfo);
            Assembly assy    = clsType.Assembly;

            System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assy.Location);
            return(fvi.FileVersion.ToString());
        }
Пример #29
0
        public string GetVersion()
        {
            System.Diagnostics.FileVersionInfo versionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);
            Version version = new Version(versionInfo.FileVersion);

            System.Globalization.CultureInfo ci = System.Globalization.CultureInfo.InvariantCulture;
            return(string.Format(ci, "v{0}.{1}, build {2}", version.Major, version.Minor, version.Build));
        }
Пример #30
0
        public static Version GetVisualStudioVersion()
        {
            var process = System.Diagnostics.Process.GetCurrentProcess();

            System.Diagnostics.FileVersionInfo v = process.MainModule.FileVersionInfo;

            return(new Version(v.ProductMajorPart, v.ProductMinorPart, v.ProductBuildPart));
        }
Пример #31
0
        static Utility()
        {
            /* this the path that the built-in LocalUserSettingsProvider uses, but the path gets funny,
             * so we decided not to use it.
            Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal);
            string userConfigFile = config.FilePath;
            userSettingsFolder = userConfigFile.Replace("user.config", "");
             * */

            /* we then were using Application.LocalUserAppDataPath, but that uses the FileVersion, and we dont want to do that
            userSettingsFolder = Application.LocalUserAppDataPath;
             * */

            /* we were then using Environment.SpecialFolder.LocalApplicationData + ProductVersion, but ProductVersion could
             * change with minor releases.
             * */
            //string folder = String.Format(@"Growl\{0}", fileVersionInfo.ProductVersion);

            /* currently, we are using Environment.SpecialFolder.LocalApplicationData + AssemblyVersion. AssemblyVersion should
             * not change for anything but major releases, in which case we will want a new user folder anyway.
             * */

            System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
            fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(a.Location);

            string userroot = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
            string commonroot = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
            string subfolder = String.Format(@"Growl" + System.IO.Path.DirectorySeparatorChar + "{0}", a.GetName().Version.ToString());

            userSettingsFolder = System.IO.Path.Combine(userroot, subfolder);
            if (!userSettingsFolder.EndsWith(System.IO.Path.DirectorySeparatorChar.ToString())) userSettingsFolder += System.IO.Path.DirectorySeparatorChar;
            Growl.CoreLibrary.PathUtility.EnsureDirectoryExists(userSettingsFolder);

            commonPluginFolder = System.IO.Path.Combine(commonroot, subfolder);
            if (!commonPluginFolder.EndsWith(System.IO.Path.DirectorySeparatorChar.ToString())) commonPluginFolder += System.IO.Path.DirectorySeparatorChar;
            Growl.CoreLibrary.PathUtility.EnsureDirectoryExists(commonPluginFolder);

            // this allows plugins and other external code to write to the debug file
            Growl.CoreLibrary.DebugInfo.Write += new Growl.CoreLibrary.DebugInfo.WriteEventHandler(DebugInfo_Write);
        }
Пример #32
0
        /// <summary>
        /// Creates a new instance of the Detector class.
        /// </summary>
        /// <remarks>
        /// When this class is created, it automatically tries to detect if Growl is installed
        /// and if so, the other relevant installation information. After the class is created,
        /// you can check the <see cref="IsInstalled"/> property to see if Growl is installed.
        /// If Growl is not installed, the other properties will be <c>null</c>.
        /// </remarks>
        public Detector()
        {
            try
            {
                string exePath = null;
                RegistryKey hkcu = Registry.CurrentUser;
                RegistryKey growlKey = hkcu.OpenSubKey(REGISTRY_KEY);
                if (growlKey != null)
                {
                    object obj = growlKey.GetValue("");
                    if (obj != null)
                    {
                        exePath = obj.ToString();
                    }
                }

                if (exePath != null)
                {
                    if (File.Exists(exePath))
                    {
                        this.isInstalled = true;

                        this.installationFolder = Path.GetDirectoryName(exePath);
                        this.displaysFolder = Path.Combine(this.installationFolder, "Displays");

                        AssemblyName assemblyName = AssemblyName.GetAssemblyName(exePath);
                        this.assemblyVersion = assemblyName.Version;
                        this.fileVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(exePath);

                        this.isInstalled = true;
                    }
                }
            }
            catch
            {
                this.isInstalled = false;
            }
        }