private void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { #if (!DEBUG) string fileName = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); AppDomain.CurrentDomain.SetData("DataDirectory", fileName); #endif }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (!Directory.Exists(this.ParentFolderName)) { this.ParentFolderName = Directory.GetCurrentDirectory(); } }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (Loaded != null) { Loaded.Invoke(Assembly.GetExecutingAssembly(), this); } }
//new public void Reload() //{ // base.Reload(); // Log_SettingsLoaded(null, null); //} void Log_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (string.IsNullOrEmpty(PreWorkDir)) { PreWorkDir = Regex.Replace(Cliver.Log.AppDir, @":.*", @":\" + PrefWorkDirName, RegexOptions.IgnoreCase | RegexOptions.Singleline); if (System.Threading.Thread.CurrentThread.GetApartmentState() == System.Threading.ApartmentState.STA) { if (!LogMessage.AskYesNo("A folder where the application will store log data is not specified. By default it will be created in the following path:\r\n" + PreWorkDir + "\r\nClick Yes if you agree, click No if you want to specify another location.", true, false)) { System.Windows.Forms.FolderBrowserDialog f = new System.Windows.Forms.FolderBrowserDialog(); f.Description = "Specify a folder where the application will store log data."; while (f.ShowDialog(/*MainForm.This*/) != System.Windows.Forms.DialogResult.OK) { ; } PreWorkDir = f.SelectedPath; } } else { LogMessage.Inform("A folder where the application will store log data is: " + PreWorkDir + ".\nIt can be changed in the app's settings"); } Save(); } }
private void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { try { // LOAD THE XML CONFIG XDocument doc = XDocument.Load(@"C:\Centralizador\Centralizador_config.xml"); // SOFTLAND DB DicCompanies = doc.Root.Element("SoftlandDB").Descendants("Empresa").ToDictionary(d => (string)d.Attribute("id"), d => (string)d); DBServer = doc.Root.Element("DataBase").Element("DBServer").Value; DBUser = doc.Root.Element("DataBase").Element("DBUser").Value; DBPassword = doc.Root.Element("DataBase").Element("DBPassword").Value; //CEN UserCen = doc.Root.Element("CEN").Element("UserCen").Value; PasswordCeN = doc.Root.Element("CEN").Element("PasswordCen").Value; UrlCen = new Uri(doc.Root.Element("CEN").Element("UrlCen").Value); //OUTLOOK User365 = doc.Root.Element("Outlook365").Element("User365").Value; Password365 = doc.Root.Element("Outlook365").Element("Password365").Value; UserCC365 = doc.Root.Element("Outlook365").Element("UserCC365").Value; //CERT SerialNumber = doc.Root.Element("CertificadoDigital").Element("SerialNumber").Value; //REEMPLAZOS DicReem = doc.Root.Element("Reemplazos").Descendants("Empresa").ToDictionary(d => (string)d.Attribute("id"), d => (int)d); } catch (Exception) { throw; } }
private void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (Default.TrayMinimize) { TrayIconManager.Enable(WindowManager.ProjectPreviewScreen, WindowManager.InProgressScreen, WindowManager.ResultsScreen); } }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (FixedDownloadPathHistory == null) { FixedDownloadPathHistory = new System.Collections.ObjectModel.ObservableCollection <string>(); } }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { DirectorBase db = new DirectorBase(cte.lib); this["jcproshopConnectionString"] = db.GetConnection().ConnectionString; this["fvConnectionString"] = db.GetConnection().ConnectionString; }
private void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { #if (DEBUG) this["CobranzasConnectionString"] = "Data Source=usmiavs006;Initial Catalog=Cobranzas1A;Integrated Security=True"; #else this["CobranzasConnectionString"] = "Data Source=usmiavs006;Initial Catalog=Cobranzas;Integrated Security=True"; #endif }
private void Default_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { toolStripButtonPlay.Checked = Settings.Default.FmPlayOnEdit; toolStripButtonHook.Checked = Settings.Default.FmHook; toolStripComboBoxVelo.SelectedIndex = Settings.Default.FmVelocity; toolStripComboBoxGate.SelectedIndex = Settings.Default.FmGateTime; toolStripComboBoxNote.SelectedIndex = Settings.Default.FmNote; }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { this["CustomConnectionString"] = "Data Source=" + ExampleData.connServerName + ";" + "Initial Catalog=" + ExampleData.connDatabaseName + ";" + "Persist Security Info=false;" + "User ID=" + ExampleData.strConnUserName + ";" + "Password="******";"; }
void Output_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { OutputFieldSeparator = EscapedOutputFieldSeparator != null?EscapedOutputFieldSeparator.Trim('\'') : ""; OutputEmptyFieldSubstitute = EscapedOutputEmptyFieldSubstitute != null?EscapedOutputEmptyFieldSubstitute.Trim('\'') : ""; OutputFieldSeparatorSubstitute = EscapedOutputFieldSeparatorSubstitute != null?EscapedOutputFieldSeparatorSubstitute.Trim('\'') : ""; }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { DirectorBase db = new DirectorBase(cte.lib); this["lwconnection"] = db.GetConnection().ConnectionString; this["isc_alumniConnectionString"] = db.GetConnection().ConnectionString; this["ghConnectionString"] = db.GetConnection().ConnectionString; }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { DirectorBase db = new DirectorBase(cte.lib); this["GeneralConnectionString"] = db.GetConnection().ConnectionString; //SqlConnection connection = (SqlConnection)db.GetConnection(); //this["GeneralConnectionString"] = connection.ConnectionString; }
protected override void OnSettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { base.OnSettingsLoaded(sender, e); _isLoaded = true; foreach (SettingsProperty property in Properties) { _tempValues[property.Name] = base[property.Name]; } }
//Decrypts settings from config file private void SettingsLoadingEventHandler(object sender, System.Configuration.SettingsLoadedEventArgs e) { Settings.Default.Instructor = Environment.UserName; if (!Settings.Default.Encrypted) { //Encrypts Settings.Default.Save(); } }
} // private void Sorting_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (this.saveLastDirectory) { this._lastDirectory = this.lastDirectory; } else { this._lastDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures); } }
static void Default_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (Properties.Settings.Default.NeedsUpgrade) { Properties.Settings.Default.Upgrade(); Properties.Settings.Default.NeedsUpgrade = false; } LoggingRequested |= IsService && Properties.Settings.Default.ServiceLogging; }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (this.SQLIntegratedSecurity) { this["PGTConnectionString"] = string.Format("Data Source={0};Initial Catalog={1};Integrated Security=True", this.SQLServerName, this.DatabaseName); } else { this["PGTConnectionString"] = string.Format("Data Source={0};Initial Catalog={1};Persist Security Info=True;User ID={2};Password={3}", this.SQLServerName, this.DatabaseName, this.SQLServerUsername, this.SQLServerPassword); } }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (YoutubeChannels == null) { YoutubeChannels = new List <YoutubeChannelNodeState>(); } if (FixedDownloadPathHistory == null) { FixedDownloadPathHistory = new ObservableCollection <string>(); } }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { Dictionary <string, KeyfileSettings> dict = this.jsSerializer.Deserialize <Dictionary <string, KeyfileSettings> >(this.KeyfileSettingsSerialized); if (dict != null) { this.KeyfileSettings = new KeyfileSettingsDictionary(dict); } else { this.KeyfileSettings = new KeyfileSettingsDictionary(); } }
private void FindEmpty_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (this.saveLastDirectory) { this._lastDirectory = this.lastDirectory; } else { this.lastDirectory = string.Empty; } //Console.WriteLine( "DELETE RANGE: " + deleteRange.MinSize + " -> " + deleteRange.MaxSize ); //Console.WriteLine( "PRESERVE RANGE: " + preserveRange.MinSize + " -> " + preserveRange.MaxSize ); }
private void Default_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (string.IsNullOrEmpty(Settings.Default.FavPreset1TextBox)) { Settings.Default.FavPreset1TextBox = GetShortName(Settings.Default.FavPreset1ComboBox); } if (string.IsNullOrEmpty(Settings.Default.FavPreset2TextBox)) { Settings.Default.FavPreset2TextBox = GetShortName(Settings.Default.FavPreset2ComboBox); } if (string.IsNullOrEmpty(Settings.Default.FavPreset3TextBox)) { Settings.Default.FavPreset3TextBox = GetShortName(Settings.Default.FavPreset3ComboBox); } }
void OnSettingsLoadedHandler(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (Settings.Default.UpgradeRequired) { Settings.Default.Upgrade(); Settings.Default.UpgradeRequired = false; Settings.Default.Save(); } // do not restore in minimized state if (Settings.Default.winState == System.Windows.WindowState.Minimized) { Settings.Default.winState = System.Windows.WindowState.Normal; } }
void Settings_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (UpgradeNeeded) { try { Upgrade(); } catch (Exception ex) { Trace.TraceError(ex.Message); // Ignore upgrade errors } UpgradeNeeded = false; Save(); } }
void _SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { if (!UsersFile.Contains(":")) { if (!Directory.Exists(Cliver.Log.AppCommonDataDir)) { Directory.CreateDirectory(Cliver.Log.AppCommonDataDir); } string file2 = Cliver.Log.AppCommonDataDir + "\\" + Custom.Default.UsersFile; if (!File.Exists(file2)) { File.Copy(UsersFile, file2); } UsersFile = file2; Save(); } }
void Input_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { InputFieldSeparator = EscapedInputFieldSeparator != null?EscapedInputFieldSeparator.Trim('\'') : ""; if (!InputFile.Contains(":")) { if (!Directory.Exists(Cliver.Log.AppCommonDataDir)) { Directory.CreateDirectory(Cliver.Log.AppCommonDataDir); } string input_file2 = Cliver.Log.AppCommonDataDir + "\\" + Input.Default.InputFile; if (!File.Exists(input_file2)) { File.Copy(InputFile, input_file2); } InputFile = input_file2; Save(); } }
void Output_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { OutputFieldSeparator = EscapedOutputFieldSeparator != null?EscapedOutputFieldSeparator.Trim('\'') : ","; OutputEmptyFieldSubstitute = EscapedOutputEmptyFieldSubstitute != null?EscapedOutputEmptyFieldSubstitute.Trim('\'') : " "; OutputFieldSeparatorSubstitute = EscapedOutputFieldSeparatorSubstitute != null?EscapedOutputFieldSeparatorSubstitute.Trim('\'') : ";"; if (string.IsNullOrWhiteSpace(OutputFileName)) { if (OutputFieldSeparator == "\t") { if (string.IsNullOrWhiteSpace(OutputFieldSeparatorSubstitute) || OutputFieldSeparatorSubstitute.Contains("\t")) { OutputFieldSeparatorSubstitute = " "; } OutputFileName = Cliver.Log.EntryAssemblyName + ".tsv"; } else if (OutputFieldSeparator == ",") { if (string.IsNullOrWhiteSpace(OutputFieldSeparatorSubstitute) || OutputFieldSeparatorSubstitute.Contains(",")) { OutputFieldSeparatorSubstitute = ";"; } OutputFileName = Cliver.Log.EntryAssemblyName + ".csv"; } else { if (string.IsNullOrWhiteSpace(OutputFieldSeparatorSubstitute) || OutputFieldSeparatorSubstitute.Contains(" ")) { OutputFieldSeparatorSubstitute = " "; } if (string.IsNullOrEmpty(OutputFileName)) { OutputFileName = Cliver.Log.EntryAssemblyName + ".txt"; } } } }
private static void Default_SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { updatePath(Settings.Default.DataPath); }
private static void SettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) { UpdateFromSettings(); }