예제 #1
0
 private void ButtonCheckUpdates_Click(object sender, System.EventArgs e)
 {
     if (updater.UpdateAvaliable())
     {
         var result = MessageBox.Show(LocalizedMessageProvider.GetMessage("NEW_VERSION_AVAILABLE_QUESTION"),
                                      LocalizedMessageProvider.GetMessage("UPDATE"), MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             updater.InstallUpdate();
         }
     }
     else
     {
         MessageBox.Show(LocalizedMessageProvider.GetMessage("NO_UPDATE"),
                         LocalizedMessageProvider.GetMessage("UPDATE"), MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #2
0
        private void OnClickIconMenuItem(object sender, EventArgs e)
        {
            var    item = sender as MenuItem;
            string text = item.Text;

            // TODO: rewrite этот бля поиск по строке
            if (text.Equals(LocalizedMessageProvider.GetMessage("OPEN")))
            {
                this.WindowState = FormWindowState.Normal;
            }
            else if (text.Equals(LocalizedMessageProvider.GetMessage("HIDE_IN_TASKBAR")))
            {
                item.Checked = ToggleTaskbarVisibility();
            }
            else if (text.Equals(LocalizedMessageProvider.GetMessage("CLOSE")))
            {
                this.Close();
            }
        }
예제 #3
0
 private void ButtonAutorunOff_Click(object sender, System.EventArgs e)
 {
     if (InAutorun())
     {
         Autorun.Remove(APP_NAME, TARGET.USER);
         MessageBox.Show(LocalizedMessageProvider.GetMessage("DELETED_AUTORUN"),
                         LocalizedMessageProvider.GetMessage("AUTORUN"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         checkBoxAutoHide.Visible   = false;
         Settings.Default.AutoStart = false;
         buttonAutorun.Text         = deleteFromAutorun;
     }
     else
     {
         Autorun.Add(APP_NAME, Application.ExecutablePath.ToString(), TARGET.USER);
         MessageBox.Show(LocalizedMessageProvider.GetMessage("ADDED_AUTORUN"),
                         LocalizedMessageProvider.GetMessage("AUTORUN"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         checkBoxAutoHide.Visible   = true;
         Settings.Default.AutoStart = true;
         buttonAutorun.Text         = addToAutorun;
     }
     Settings.Default.Save();
 }
예제 #4
0
 private void ShowSelectProcessMessageBox()
 {
     MessageBox.Show(LocalizedMessageProvider.GetMessage("SELECT_PROCESS"),
                     LocalizedMessageProvider.GetMessage("ERROR"), MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
 }