예제 #1
0
파일: Program.cs 프로젝트: dtafe/WorkNC
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            log4net.Config.XmlConfigurator.Configure();
            logger.Info("Begin Run VMIS");

            VMISCommon.StartProcessBeforeRun();
            if (Settings.Default.LOGIN_USER_NAME.Trim() == "")
            {
                Application.Run(new Login());
            }
            else
            {
                Machine[] listMachine = VMISCommon.WS.GetListMachineFromUser(Settings.Default.LOGIN_USER_NAME.Trim() , Settings.Default.LOGIN_PASS_WORD);
                if (listMachine == null)
                {
                     Application.Run(new Login());
                }
                else
                {
                    frmUpload frmUpload = new frmUpload();
                    frmUpload.FillMachine(listMachine.ToList());
                    frmUpload.LoginUser = Settings.Default.LOGIN_USER_NAME.Trim();
                    Application.Run(frmUpload);
                }
            }
        }
예제 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            log4net.Config.XmlConfigurator.Configure();
            logger.Info("Begin Run VMIS");

            VMISCommon.StartProcessBeforeRun();
            if (Settings.Default.LOGIN_USER_NAME.Trim() == "")
            {
                Application.Run(new Login());
            }
            else
            {
                Machine[] listMachine = VMISCommon.WS.GetListMachineFromUser(Settings.Default.LOGIN_USER_NAME.Trim(), Settings.Default.LOGIN_PASS_WORD);
                if (listMachine == null)
                {
                    Application.Run(new Login());
                }
                else
                {
                    frmUpload frmUpload = new frmUpload();
                    frmUpload.FillMachine(listMachine.ToList());
                    frmUpload.LoginUser = Settings.Default.LOGIN_USER_NAME.Trim();
                    Application.Run(frmUpload);
                }
            }
        }
예제 #3
0
파일: Login.cs 프로젝트: dtafe/WorkNC
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if(txtUserName.Text == "" || txtPassword.Text == "")
         {
             MessageBox.Show(Common.GetResourceString("MSG_LOGIN_EMPTY"));
             return;
         }
         Machine[] listMachine = VMISCommon.WS.GetListMachineFromUser(txtUserName.Text.Trim(), txtPassword.Text.Trim());
         if (listMachine == null)
         {
             MessageBox.Show(Common.GetResourceString("LoginFail"));
         }
         else
         {
             frmUpload frmUpload = new frmUpload();
             frmUpload.FillMachine(listMachine.ToList());
             frmUpload.LoginUser = txtUserName.Text.Trim();
             frmUpload.ShowDialog();
             this.Dispose();
         }
     }
     catch(Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #4
0
파일: Login.cs 프로젝트: dtafe/WorkNcMVC5
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtUserName.Text == "" || txtPassword.Text == "")
         {
             MessageBox.Show(Common.GetResourceString("MSG_LOGIN_EMPTY"));
             return;
         }
         Machine[] listMachine = VMISCommon.WS.GetListMachineFromUser(txtUserName.Text.Trim(), txtPassword.Text.Trim());
         if (listMachine == null)
         {
             MessageBox.Show(Common.GetResourceString("LoginFail"));
         }
         else
         {
             frmUpload frmUpload = new frmUpload();
             frmUpload.FillMachine(listMachine.ToList());
             frmUpload.LoginUser = txtUserName.Text.Trim();
             frmUpload.ShowDialog();
             this.Dispose();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }