Esempio n. 1
0
 public override void AcceptChanges()
 {
     try
     {
         TokenManagerHotkeys.Register(Name, Model.GetSettingsHotKeys(), SettingsHotKey_Pressed);
         Model.SetSettingsEnabled(checkBoxEnable.Checked);
         Model.SetSettingsHotKeys((Keys)textBoxHotKeys.Tag);
         Model.SetTokenAccessNotificationsEnabled(checkBoxEnableTokenNotifications.Checked);
         Model.SetSettingsWarnAt((int)numericUpDownWarnAt.Value);
     }
     catch
     {
         Program.ApplicationContext.Alert(
             title: "Token Manager",
             text: "Unable to set settings hotkey",
             alertType: TokenManagerApplicationContext.AlertType.Error);
     }
 }
Esempio n. 2
0
 public override void AcceptChanges()
 {
     try
     {
         FormatTokens();
         TokenManagerHotkeys.Register(Name, Model.GetProviderHotKeys(Name), InsertToken);
         Model.SetProviderEnabled(Name, checkBoxEnableHotKeys.Checked);
         Model.SetProviderHotKeys(Name, (Keys)textBoxHotKeys.Tag);
         Model.SetProviderUrl(Name, textBoxProviderUrl.Text);
         Model.SetProviderTokens(Name, textBoxAccessTokens.Text.ToTokens());
     }
     catch (Exception)
     {
         Program.ApplicationContext.Alert(
             title: "Token Manager",
             text: "Unable to set provider hotkey",
             alertType: TokenManagerApplicationContext.AlertType.Error);
     }
 }
Esempio n. 3
0
 private void LocalDispose(object sender, EventArgs e)
 {
     Disposed -= LocalDispose;
     TokenManagerHotkeys.Unregister(Name);
 }