Esempio n. 1
0
 public ThreadStarter()
 {
     if (_instance != null)
     {
         return;
     }
     _instance = this;
 }
Esempio n. 2
0
 private void menuExit_Click(object sender, EventArgs e)
 {
     ThreadStarter.ClearLog();
     this.ShowInTaskbar       = false;
     this.notifyIcon1.Visible = false;
     this.Close();
     this.Dispose(true);
     Application.ExitThread();
 }
Esempio n. 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            if (arg != null)
            {
                //arg不为空,说明有启动参数,是从注册表启动的,则直接最小化到托盘
                this.Visible       = false;
                this.ShowInTaskbar = false;
            }

            start              = new ThreadStarter();
            start.MessageSend += new ThreadStarter.MessageEventHandler(this.EventHandler);
            start.StartThread();
        }