示例#1
0
        private void checkBox_Autostart_CheckedChanged(object sender, EventArgs e)
        {
            Autostart start = new Autostart();

            if (checkBox_Autostart.Checked)
            {
                start.CreateTask();
            }
            else
            {
                start.RemoveTask();
            }
        }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Form form = new mainform();

            if (Properties.Settings.Default.FirstRun)
            {
                form.Show();

                Autostart start = new Autostart();
                start.CreateTask();

                Properties.Settings.Default.FirstRun = false;
                Properties.Settings.Default.Save();
            }

            Application.Run();
        }