-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainForm.cs
40 lines (35 loc) · 1.08 KB
/
MainForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace InstantBackgroundUploader
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
versionLabel.Text = UploaderApplicationContext.version;
}
private void MainForm_Shown(object sender, EventArgs e)
{
//startCheckBox.Enabled = !System.Diagnostics.Process.GetCurrentProcess().Parent().ProcessName.Equals("devenv");
startCheckBox.Enabled = UploaderApplicationContext.releaseMode;
if (startCheckBox.Enabled)
startCheckBox.Checked = Util.IsAutoStartEnabled("Instant Background Uploader");
}
private void startCheckBox_CheckedChanged(object sender, EventArgs e)
{
if (!startCheckBox.Enabled) return;
if (startCheckBox.Checked)
{
Util.SetAutoStart("Instant Background Uploader", UploaderApplicationContext.executableLocation);
}
else
{
Util.UnSetAutoStart("Instant Background Uploader");
}
}
}
}