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); } } }
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); } } }
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); } }
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); } }