private void btnSave_Click(object sender, EventArgs e) { var settings = new Properties.Settings(); settings.ChocolateyLibDirectory = txtInstallDirectory.Text; settings.Save(); Dispose(); }
private void SaveUserSettings() { Properties.Settings userSettings = new Properties.Settings(); userSettings.MappingListFormLocation = this.Location; userSettings.MappingListFormWidth = this.Width; userSettings.Save(); }
static void Main() { if (AppController.IsOnlyAppInstance() == false) { return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.ThreadException += ApplicationThreadException; AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler; AppController.CreateAppDirectory(); #if DEBUG #else Console.Write("Redirecting console output"); LogProvider.RedirectConsoleOutput(); #endif ConfigFileProvider.ValidateUserConfigFile(); Properties.Settings userSettings = new Properties.Settings(); if (userSettings.UpgradeRequired) { Console.WriteLine("Upgrading settings to new version"); userSettings.Upgrade(); userSettings.UpgradeRequired = false; userSettings.Save(); } AppController.Start(); Application.Run(new KeyboardForm()); AppController.Close(); // Release static events or else leak. Application.ThreadException -= ApplicationThreadException; AppDomain.CurrentDomain.UnhandledException -= UnhandledExceptionHandler; }
private void SaveSettings() { Properties.Settings userSettings = new Properties.Settings(); userSettings.ColourListFormLocation = Location; userSettings.ColourMapShowAllButtons = _showAllButtons; userSettings.Save(); }
private void SaveUserSettings() { Properties.Settings userSettings = new Properties.Settings(); userSettings.ColourEditorLocation = Location; userSettings.Save(); }
private void SaveUserSettings() { Properties.Settings userSettings = new Properties.Settings { KeyboardFormLocation = Location, KeyboardFormWidth = Width, KeyboardFormHasNumberPad = hasNumberPad, KeyboardFormHasMacKeyboard = isMacKeyboard, ColourMapFormOpen = FormsManager.IsColourMapFormOpen(), MappingListFormOpen = FormsManager.IsMappingListFormOpen(), UserHasSavedSettings = true }; // userSettings.KeyboardLayout = (int)AppController.KeyboardLayout; userSettings.Save(); }
private void SaveSettings() { Properties.Settings userSettings = new Properties.Settings(); userSettings.EditMappingFormLocation = Location; userSettings.Save(); }
void SaveUserSettings() { Properties.Settings userSettings = new Properties.Settings { KeyboardFormLocation = this.Location, KeyboardFormWidth = this.Width, KeyboardFormHasNumberPad = this._hasNumberPad, KeyboardFormHasMacKeyboard = this._isMacKeyboard, ColourMapFormOpen = FormsManager.IsColourMapFormOpen(), MappingListFormOpen = FormsManager.IsMappingListFormOpen(), LastMappingsFilter = (int)MappingsManager.Filter, UserHasSavedSettings = true }; // userSettings.KeyboardLayout = (int)AppController.KeyboardLayout; userSettings.Save(); }
private void ThisAddIn_Startup(object sender, System.EventArgs e) { try { //Establezco el Hadler para revisar el Email cuando entra //this.Application.NewMail += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_NewMailEventHandler(ThisApplication_NewMail); this.Application.NewMail += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_NewMailEventHandler(ThisApplication_NewMail); //Si no existe la carpeta MailEmprende, la creo if (!ExistsCurrentFolder("MailEmprende")) { CreateCustomFolder("MailEmprende"); } //Cargo los settings Properties.Settings setting; setting = new Properties.Settings(); //Creo variable para acceder a Settings //Establezco la ruta a la db local correos.mdb string path = Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "correos.mdb"); setting["DBpath"] = path; setting.Save(); //Actualizo el setting de envío desde la BD OutlookAddInEmprende.correosDataSetTableAdapters.settingsTableAdapter taSettings = new OutlookAddInEmprende.correosDataSetTableAdapters.settingsTableAdapter(); setting["Email_Admin"] = taSettings.GetEmailAdmin()[0].Email_Admin.ToString(); setting.Save(); //Seteo los valores de login por defecto si existían setting["Logon_User"] = setting["Default_User"]; //Declaro usuario por defecto setting["logged"] = setting["Default_Logged"]; //Declaro tipo de usuario logueado por defecto setting.Save(); } catch { MessageBox.Show(ex.Message + " Se intentaba abrir el Componente OutlookAddin Emprende", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }