コード例 #1
0
        private void Form4_Load(object sender, EventArgs e)
        {
            LoadObjectList();
            LoadRecentList();
            foreach (string item in RecentFiles)
            {
                ToolStripMenuItem fileRecent = new ToolStripMenuItem();
                fileRecent.Click    += RecentFile_click;
                fileRecent.Text      = item;
                fileRecent.Size      = new System.Drawing.Size(170, 40);
                fileRecent.AutoSize  = true;
                fileRecent.Image     = null;
                fileRecent.ForeColor = Color.White;
                recentToolStripMenuItem.DropDownItems.Add(fileRecent); //add the menu to "recent" menu
            }
            LibraryGUI.Instance.dockPanel = dockPanel1;

            if (OpenTK.Graphics.GraphicsContext.CurrentContext != null)
            {
                OpenTKSharedResources.InitializeSharedResources();
            }

            if (Runtime.OpenStartupWindow)
            {
                Startup_Window window = new Startup_Window();
                window.TopMost = true;
                window.Show();
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: vgisuruex/Switch-Toolbox
        private void Form4_Load(object sender, EventArgs e)
        {
            VersionCheck version = new VersionCheck();

            Runtime.ProgramVersion = version.ProgramVersion;
            Runtime.CommitInfo     = version.CommitInfo;
            Runtime.CompileDate    = version.CompileDate;

            UpdateToolbar();

            LoadObjectList();
            LoadRecentList();
            foreach (string item in RecentFiles)
            {
                ToolStripMenuItem fileRecent = new ToolStripMenuItem();
                fileRecent.Click    += RecentFile_click;
                fileRecent.Text      = item;
                fileRecent.Size      = new System.Drawing.Size(170, 40);
                fileRecent.AutoSize  = true;
                fileRecent.Image     = null;
                fileRecent.ForeColor = Color.White;
                recentToolStripMenuItem.DropDownItems.Add(fileRecent); //add the menu to "recent" menu
            }
            ThreadStart t      = new ThreadStart(UpdateProgram.CheckLatest);
            Thread      thread = new Thread(t);

            thread.Start();

            Application.Idle += Application_Idle;

            LibraryGUI.Instance.dockPanel = dockPanel1;

            if (OpenTK.Graphics.GraphicsContext.CurrentContext != null)
            {
                OpenTKSharedResources.InitializeSharedResources();
            }

            if (Runtime.OpenStartupWindow && !UpdateProgram.CanUpdate)
            {
                Startup_Window window = new Startup_Window();
                window.TopMost = true;
                window.Show();
            }
        }