Hide auto check update option and dns changer in Windows Store build

This commit is contained in:
Jaex 2017-05-03 13:20:06 +03:00
parent eb047ea47e
commit ae20876179
3 changed files with 10 additions and 1 deletions

View file

@ -176,7 +176,7 @@ public ApplicationConfig()
public bool WorkflowsOnlyShowEdited { get; set; }
[Category("Application"), DefaultValue(true), Description("Automatically check updates.")]
#if STEAM
#if STEAM || WindowsStore
[Browsable(false)]
#endif
public bool AutoCheckUpdate { get; set; }

View file

@ -182,6 +182,11 @@ private void InitializeControls()
ExportImportControl.UploadRequested += json => UploadManager.UploadText(json);
HandleCreated += MainForm_HandleCreated;
#if WindowsStore
tsmiDNSChanger.Visible = false;
tsmiTrayDNSChanger.Visible = false;
#endif
}
public void UpdateControls()

View file

@ -924,6 +924,9 @@ public static void OpenMonitorTest()
public static void OpenDNSChanger()
{
#if WindowsStore
MessageBox.Show("Not supported in Windows Store build.", "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
#else
if (Helpers.IsAdministrator())
{
new DNSChangerForm().Show();
@ -932,6 +935,7 @@ public static void OpenDNSChanger()
{
RunShareXAsAdmin("-dnschanger");
}
#endif
}
public static void RunShareXAsAdmin(string arguments)