mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
reverted - #1813
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1820 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
+1
-16
@@ -107,7 +107,6 @@
|
||||
this.optUpdateStable = new System.Windows.Forms.RadioButton();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonApply = new System.Windows.Forms.Button();
|
||||
this.buttonChangeUpdateURL = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.textUpdateInterval)).BeginInit();
|
||||
this.tabControl.SuspendLayout();
|
||||
this.tabGeneral.SuspendLayout();
|
||||
@@ -954,7 +953,6 @@
|
||||
//
|
||||
// tabUpdates
|
||||
//
|
||||
this.tabUpdates.Controls.Add(this.buttonChangeUpdateURL);
|
||||
this.tabUpdates.Controls.Add(this.checkUpdateAutomatically);
|
||||
this.tabUpdates.Controls.Add(this.textUpdateUrl);
|
||||
this.tabUpdates.Controls.Add(this.label19);
|
||||
@@ -987,8 +985,7 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textUpdateUrl.Location = new System.Drawing.Point(97, 103);
|
||||
this.textUpdateUrl.Name = "textUpdateUrl";
|
||||
this.textUpdateUrl.ReadOnly = true;
|
||||
this.textUpdateUrl.Size = new System.Drawing.Size(297, 20);
|
||||
this.textUpdateUrl.Size = new System.Drawing.Size(307, 20);
|
||||
this.textUpdateUrl.TabIndex = 26;
|
||||
//
|
||||
// label19
|
||||
@@ -1069,17 +1066,6 @@
|
||||
this.buttonApply.UseVisualStyleBackColor = true;
|
||||
this.buttonApply.Click += new System.EventHandler(this.buttonApply_Click);
|
||||
//
|
||||
// buttonChangeUpdateURL
|
||||
//
|
||||
this.buttonChangeUpdateURL.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.buttonChangeUpdateURL.Location = new System.Drawing.Point(400, 101);
|
||||
this.buttonChangeUpdateURL.Name = "buttonChangeUpdateURL";
|
||||
this.buttonChangeUpdateURL.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonChangeUpdateURL.TabIndex = 28;
|
||||
this.buttonChangeUpdateURL.Text = "Change";
|
||||
this.buttonChangeUpdateURL.UseVisualStyleBackColor = true;
|
||||
this.buttonChangeUpdateURL.Click += new System.EventHandler(this.buttonChangeUpdateURL_Click);
|
||||
//
|
||||
// OptionsWindow
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
@@ -1203,6 +1189,5 @@
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.ComboBox comboToolbarStyle;
|
||||
private System.Windows.Forms.CheckBox checkUpdateAutomatically;
|
||||
private System.Windows.Forms.Button buttonChangeUpdateURL;
|
||||
}
|
||||
}
|
||||
@@ -97,18 +97,6 @@ namespace ProcessHacker
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// method for checking to see if the logged in user
|
||||
/// is in the Administrator's group
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool IsUserAdministrator()
|
||||
{
|
||||
System.Security.Principal.WindowsIdentity identity = System.Security.Principal.WindowsIdentity.GetCurrent();
|
||||
System.Security.Principal.WindowsPrincipal principal = new System.Security.Principal.WindowsPrincipal(identity);
|
||||
return principal.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
|
||||
private void LoadStage1()
|
||||
{
|
||||
this.InitializeHighlightingColors();
|
||||
@@ -643,17 +631,5 @@ namespace ProcessHacker
|
||||
this.buttonOK.Select();
|
||||
}
|
||||
|
||||
private void buttonChangeUpdateURL_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (IsUserAdministrator() == true)
|
||||
{
|
||||
textUpdateUrl.ReadOnly = false;
|
||||
buttonChangeUpdateURL.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
PhUtils.ShowError("Update URL can only be changed by Administrators!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user