Beispiel #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            try
            {
                bool  canCreate;
                Mutex myMutex = new Mutex(true, "MutexCRMString", out canCreate);
                if (canCreate)
                {
                    using (frmLogin login = new frmLogin())
                    {
                        if (login.ShowDialog() == DialogResult.OK)
                        {
                            ;
                        }
                        else
                        {
                            Environment.Exit(0);
                        }
                    }
                    CommStatic.ConfigInitlize();

                    Application.Run(new frmMain());
                }
                else
                {
                    //ExistRunningInstance();
                    frmIsRun r = new frmIsRun();
                    r.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                Tools.TracingHelper.Error(ex, typeof(Program));
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
 private void toolStripButtonOutPut_Click(object sender, EventArgs e)
 {
     CommStatic.DataGridViewToExcel(this.dgvUserList);
 }