Пример #1
0
        static void Main(string[] cmd_line)
        {
            if (SingleInstanceHelper.GlobalShowWindow(FormMain.TITLE))
            {
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                UpdateDependencies();
                UpdateMessageIconType();

                Application.Run(new FormMain(cmd_line));
            }
            catch (Exception err)
            {
                Debug.WriteLine(err);
            }
            finally
            {
            }
        }
Пример #2
0
 private void UpdateMenu(ToolStripDropDown menu, ComboBox cmb)
 {
     menu.Items.Clear();
     foreach (string fileName in _files)
     {
         ToolStripMenuItem item = new ToolStripMenuItem(fileName);
         item.Click += (s, e) => { cmb.Text = item.Text; SingleInstanceHelper.GlobalShowWindow(FormMain.TITLE); };
         menu.Items.Add(item);
     }
 }
Пример #3
0
 private void m_mnuShow_Click(object sender, EventArgs e)
 {
     this.Visible = true;
     SingleInstanceHelper.GlobalShowWindow(TITLE);
 }