コード例 #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            UpdateTimer.Enabled = true;


            if (Settings.GetObject("Auto Update", true))
            {
                GitHub.CheckVersion(false);
            }

            SuspendLayout();
            //restore last size and position
            Object[]        msp   = Settings.GetObject <Object[]>("Mainform Size and Position", null);
            FormWindowState state = msp == null ? FormWindowState.Maximized : (FormWindowState)msp[2] != FormWindowState.Minimized ? (FormWindowState)msp[2] : FormWindowState.Maximized;

            if (state == FormWindowState.Normal)
            {
                WindowState = state; Size = (Size)msp[0]; Location = (Point)msp[1];
            }
            ResumeLayout();

            ManageMessage();
            ManageCommandLineArgs(args);

            setSplitterPos();
        }
コード例 #2
0
        private void autoUpdateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            autoUpdateToolStripMenuItem.Checked = !autoUpdateToolStripMenuItem.Checked;
            Settings.SetObject("Auto Update", autoUpdateToolStripMenuItem.Checked);
            Settings.Save();

            if (autoUpdateToolStripMenuItem.Checked)
            {
                GitHub.CheckVersion();
            }
        }
コード例 #3
0
        private void MnNotifyMinorVersion_Click(object sender, EventArgs e)
        {
            MnNotifyMinorVersion.Checked = !MnNotifyMinorVersion.Checked;
            Settings.SetObject("Auto Update Build", MnNotifyMinorVersion.Checked);
            Settings.Save();

            if (MnNotifyNewVersion.Checked && MnNotifyMinorVersion.Checked)
            {
                GitHub.CheckVersion();
            }
        }
コード例 #4
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            UpdateTimer.Enabled = true;
            GitHub.CheckVersion();

            //restore last size and position
            Object[] msp = (Object[])Settings.GetObject("Mainform Size and Position", null);
            WindowState = msp == null ? FormWindowState.Maximized : (FormWindowState)msp[2] != FormWindowState.Minimized ? (FormWindowState)msp[2] : FormWindowState.Maximized;
            if (WindowState == FormWindowState.Normal)
            {
                Size = (Size)msp[0]; Location = (Point)msp[1];
            }
        }
コード例 #5
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            UpdateTimer.Enabled = true;


            if (Settings.GetObject("Auto Update", true))
            {
                GitHub.CheckVersion(false);
            }

            SuspendLayout();
            //restore last size and position
            Object[]        msp   = Settings.GetObject <Object[]>("Mainform Size and Position", null);
            FormWindowState state = msp == null ? FormWindowState.Maximized : (FormWindowState)msp[2] != FormWindowState.Minimized ? (FormWindowState)msp[2] : FormWindowState.Maximized;

            if (state == FormWindowState.Normal)
            {
                WindowState = state; Size = (Size)msp[0]; Location = (Point)msp[1];
            }
            ResumeLayout();

            ManageMessage();


            if (args != null && args.Length == 1)
            {
                string filename = args[0];
                if (System.IO.File.Exists(filename))
                {
                    Application.DoEvents();

                    if (System.IO.Path.GetExtension(filename).ToLower() == ".zbn")                     //zipped button
                    {
                        PreviewForm.ImportButton(filename);
                    }
                    else
                    {
                        Core.OpenFile(this, filename, false);
                    }
                }
            }
        }
コード例 #6
0
ファイル: MainForm.cs プロジェクト: nntekas/LaserGRBL
 private void MnCheckNow_Click(object sender, EventArgs e)
 {
     questionMarkToolStripMenuItem.HideDropDown();
     GitHub.CheckVersion(true);
 }
コード例 #7
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     UpdateTimer.Enabled = true;
     GitHub.CheckVersion();
 }