Don't show confirmation for app restart

This commit is contained in:
Jaex 2020-10-14 18:00:53 +03:00
parent f4717e9a1a
commit 66e5333606
3 changed files with 418 additions and 484 deletions

View file

@ -276,9 +276,9 @@ private void InitializeComponent()
this.tsmiTrayDonate = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayAbout = new System.Windows.Forms.ToolStripMenuItem();
this.tssTray3 = new System.Windows.Forms.ToolStripSeparator();
this.tsmiRestartAsAdmin = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayRecentItems = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiOpenActionsToolbar = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiRestartAsAdmin = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayShow = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiTrayExit = new System.Windows.Forms.ToolStripMenuItem();
this.timerTraySingleClick = new System.Windows.Forms.Timer(this.components);
@ -2202,6 +2202,13 @@ private void InitializeComponent()
this.tssTray3.Name = "tssTray3";
resources.ApplyResources(this.tssTray3, "tssTray3");
//
// tsmiRestartAsAdmin
//
this.tsmiRestartAsAdmin.Image = global::ShareX.Properties.Resources.user_business;
this.tsmiRestartAsAdmin.Name = "tsmiRestartAsAdmin";
resources.ApplyResources(this.tsmiRestartAsAdmin, "tsmiRestartAsAdmin");
this.tsmiRestartAsAdmin.Click += new System.EventHandler(this.tsmiRestartAsAdmin_Click);
//
// tsmiTrayRecentItems
//
this.tsmiTrayRecentItems.Image = global::ShareX.Properties.Resources.clipboard_list;
@ -2215,13 +2222,6 @@ private void InitializeComponent()
resources.ApplyResources(this.tsmiOpenActionsToolbar, "tsmiOpenActionsToolbar");
this.tsmiOpenActionsToolbar.Click += new System.EventHandler(this.tsmiOpenActionsToolbar_Click);
//
// tsmiRestartAsAdmin
//
this.tsmiRestartAsAdmin.Image = global::ShareX.Properties.Resources.user_business;
this.tsmiRestartAsAdmin.Name = "tsmiRestartAsAdmin";
resources.ApplyResources(this.tsmiRestartAsAdmin, "tsmiRestartAsAdmin");
this.tsmiRestartAsAdmin.Click += new System.EventHandler(this.tsmiRestartAsAdmin_Click);
//
// tsmiTrayShow
//
this.tsmiTrayShow.Image = global::ShareX.Properties.Resources.tick_button;

View file

@ -2504,10 +2504,7 @@ private void TsmiThumbnailTitleShow_Click(object sender, EventArgs e)
private void tsmiRestartAsAdmin_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Would you like to restart ShareX as admin?", "ShareX - Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Program.Restart(true);
}
Program.Restart(true);
}
private void TsmiThumbnailTitleHide_Click(object sender, EventArgs e)

File diff suppressed because it is too large Load diff