private ICollection <ILanguage> initializeLanguages() { var languages = StartupPath.LoadAdditionalLanguages(); languages.Add(Language.Default); return(languages.ToArray()); }
public void SetupNginx() { Nginx.exeName = StartupPath.Replace(@"\", "/") + "/nginx.exe"; Nginx.procName = "nginx"; Nginx.progName = "Nginx"; Nginx.progLogSection = Log.LogSection.WNMP_NGINX; Nginx.startArgs = ""; Nginx.stopArgs = "-s stop"; Nginx.killStop = false; Nginx.statusLabel = nginxrunning; Nginx.confDir = "/conf/"; Nginx.logDir = "/logs/"; }
public void startup() { RegistryKey rk = Registry.CurrentUser; RegistryKey StartupPath; StartupPath = rk.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); if (StartupPath.GetValue("Workplace") == null) { StartupPath.SetValue("Workplace", Application.ExecutablePath.ToString(), RegistryValueKind.ExpandString); } //RegistryKey reg = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); //reg.SetValue("Workplace", Application.ExecutablePath.ToString()); }
public void startup() { RegistryKey rk = Registry.CurrentUser; RegistryKey StartupPath; StartupPath = rk.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); if (StartupPath.GetValue("Workplace") == null) { StartupPath.SetValue("Workplace", Application.ExecutablePath.ToString(), RegistryValueKind.ExpandString); } this.txtpass.Text = Properties.Settings.Default.password != string.Empty ? Properties.Settings.Default.password : "******"; this.txtname.Text = Properties.Settings.Default.username != string.Empty ? Properties.Settings.Default.username : "******"; //RegistryKey reg = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); //reg.SetValue("Workplace", Application.ExecutablePath.ToString()); }
private void CheckRegistry(bool Enable) { RegistryKey rkStartUp = Registry.CurrentUser; RegistryKey StartupPath; string name = "Zorbo Server"; string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AppDomain.CurrentDomain.FriendlyName); StartupPath = rkStartUp.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true); if (Enable && (string)StartupPath.GetValue(name) != path) { StartupPath.SetValue(name, path, RegistryValueKind.ExpandString); } else if (!Enable && StartupPath.GetValue(name) != null) { StartupPath.DeleteValue(name); } }