public LostRenewForm(SnWindow parent_window) : this() { this.parent_window = parent_window; this.G = this.parent_window.G; this.BackColor = ColorResource.BACKGROUND_COLOR_BEIGE; }
public DealerWindow(MainForm main_form) { Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("th-TH"); InitializeComponent(); this.main_form = main_form; this.G = main_form.G; this.sort_mode = SORT_MODE.DEALER; }
public SellProgram2nd(SnWindow parent_window) { InitializeComponent(); this.parent_window = parent_window; this.G = this.parent_window.G; this.getDealer(); }
public UpNewRwtLineForm(SnWindow parent_form, DIALOG_TYPE dialog_type) { InitializeComponent(); this.parent_form = parent_form; this.G = this.parent_form.G; this.dialog_type = dialog_type; verext = (this.dialog_type == DIALOG_TYPE.UP_NEWRWT ? "1" : (this.dialog_type == DIALOG_TYPE.UP_NEWRWT_JOB ? "2" : this.parent_form.serial.verext)); this.Text = (this.dialog_type == DIALOG_TYPE.UP_NEWRWT_JOB ? "Gen 'Up New RWT + Job' line" : this.Text); }
public GenerateSNForm(SnWindow parent_window) { InitializeComponent(); this.parent_window = parent_window; this.G = this.parent_window.G; this.BackColor = ColorResource.BACKGROUND_COLOR_BEIGE; //this.chkCDTraining.CheckState = CheckState.Checked; this.mskSernum.Enter += new EventHandler(this.onControlEnterHandler); this.numQty.Enter += new EventHandler(this.onControlEnterHandler); this.txtVersion.Enter += new EventHandler(this.onControlEnterHandler); this.txtDealer.Enter += new EventHandler(this.onControlEnterHandler); this.txtVersion.Leave += new EventHandler(this.onControlLeaveHandler); this.numQty.Leave += new EventHandler(this.onControlLeaveHandler); this.mskSernum.Leave += new EventHandler(this.onControlLeaveHandler); this.txtDealer.Leave += new EventHandler(this.onControlLeaveHandler); this.mskSernum.GotFocus += new EventHandler(this.onControlFocusedHandler); this.numQty.GotFocus += new EventHandler(this.onControlFocusedHandler); this.txtVersion.GotFocus += new EventHandler(this.onControlFocusedHandler); this.txtDealer.GotFocus += new EventHandler(this.onControlFocusedHandler); this.chkCDTraining.GotFocus += new EventHandler(this.onControlFocusedHandler); this.chkNewRwt.GotFocus += new EventHandler(this.onControlFocusedHandler); this.chkNewRwtJob.GotFocus += new EventHandler(this.onControlFocusedHandler); this.btnOK.GotFocus += new EventHandler(this.onControlFocusedHandler); ; this.btnCancel.GotFocus += new EventHandler(this.onControlFocusedHandler); this.mskSernum.Leave += new EventHandler(this.validateSernumFieldLeave); this.txtDealer.Leave += new EventHandler(this.validateDealerFieldLeave); this.chkNewRwt.CheckedChanged += new EventHandler(this.onCheckBoxStateChange); this.chkNewRwtJob.CheckedChanged += new EventHandler(this.onCheckBoxStateChange); this.getDealer(); this.numQty.Leave += delegate { if (this.numQty.Text.Length == 0) { this.numQty.Text = "1"; } }; this.txtVersion.Leave += delegate { if (this.txtVersion.Text.Length == 0) { if (ValidateSN.Check(this.mskSernum.Text)) { this.txtVersion.Text = this.mskSernum.Text.Substring(2, 1) + "." + this.mskSernum.Text.Substring(3, 1); } } }; this.form_mode = FORM_MODE.EDIT; }
public SellBookForm(SnWindow parent_window) { InitializeComponent(); this.parent_window = parent_window; this.G = this.parent_window.G; this.form_mode = FORM_MODE.EDIT; List<MaskedTextBox> lmsk = new List<MaskedTextBox>(); lmsk.Add(this.mskAsDate); List<DateTimePicker> ldtp = new List<DateTimePicker>(); ldtp.Add(this.dpAsDate); PairDatePickerWithMaskedTextBox.Attach(lmsk, ldtp); }
public ImportListForm(SnWindow parent_window) { InitializeComponent(); this.parent_window = parent_window; this.G = this.parent_window.G; }
private void sNToolStripMenuItem_Click(object sender, EventArgs e) { if (this.sn_wind == null) { this.sn_wind = new SnWindow(this); this.sn_wind.G = this.G; this.sn_wind.MdiParent = this; this.sn_wind.WindowState = FormWindowState.Maximized; this.sn_wind.Show(); } else { this.sn_wind.Activate(); if (sn_wind.current_focused_control != null) { sn_wind.current_focused_control.Focus(); } } }
private void MainForm_Shown(object sender, EventArgs e) { this.toolStripInfo.Text = " [ ที่เก็บโปรแกรม : " + AppDomain.CurrentDomain.BaseDirectory + " ]"; LoginForm login = new LoginForm(); if (login.ShowDialog() == DialogResult.Cancel || login.loged_in == false) { Application.Exit(); } else { this.G = login.G; this.toolStripUserInfo.Text = "Login as : " + this.G.loged_in_user_name; if (this.G.loged_in_user_level < GlobalVar.USER_LEVEL_ADMIN) { this.macAddressAllowedToolStripMenuItem.Visible = false; } if (this.G.loged_in_user_level < GlobalVar.USER_LEVEL_SUPERVISOR) { this.userInformationToolStripMenuItem.Visible = false; this.supportStatMenuItem.Visible = false; this.SearchHistoryMenuItem.Visible = false; this.usersGroupMenuItem.Visible = false; this.preferenceToolStripMenuItem.Enabled = false; } this.loadDataResource(); this.sNToolStripMenuItem.PerformClick(); } }