public virtual bool Initialize(StartupArg startupArg) { _menuWidth = this.Width; _panelName = startupArg.PanelType; _screenCommon = new ScreenCommon(this); _screenCommon.AutoSetScreenLocation = false; if (!_screenCommon.Initialize(startupArg)) { MessageBox.Show("Could not initialize form " + Name); return(false); } _rootWidget = _screenCommon.GetRootWidget(); _hWnd = startupArg.HWnd; if (startupArg.FocusedElement != null) { OnFocusChanged(startupArg.FocusedElement); } _screenCommon.GetAnimationManager().EvtPlayerStateChanged += MenuContextMenu_EvtPlayerStateChanged; _autoScanTimer = new AutoScanTimer(startupArg.HWnd, this); _autoScanTimer.EvtStart += new AutoScanTimer.StartScan(_autoScanTimer_EvtStart); _autoScanTimer.EvtStop += new AutoScanTimer.StopScan(_autoScanTimer_EvtStop); _autoScanTimer.EvtTick += new AutoScanTimer.Tick(_autoScanTimer_EvtTick); return(true); }
void txtStudentRFIDNo_TextChanged(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtStudentRFIDNo.Text)) { AutoScanTimer.Enabled = true; AutoScanTimer.Start(); } }
void btnEdit_Click(object sender, EventArgs e) { ObjEnable(true); isAdd = false; SystemProperties.Cleared(this, true, false, false); SystemProperties.Cleared(Mother, true, false, false); SystemProperties.Cleared(Father, true, false, false); MsgReturned = ""; AutoScanTimer.Start(); txtSearch.ReadOnly = false; }
void btnAdd_Click(object sender, EventArgs e) { ObjEnable(true); btnDelete = SystemProperties.BtnProperties(btnDelete, false, Imagename.Delete.ToString(), Imagename._delete.ToString()); isAdd = true; SystemProperties.Cleared(this, true, true, true); SystemProperties.Cleared(Mother, true, true, true); SystemProperties.Cleared(Father, true, true, true); MsgReturned = ""; AutoScanTimer.Start(); txtSearch.ReadOnly = false; }
void AutoScan() { try { ComPortList = SerialPort.GetPortNames(); foreach (string port in ComPortList) { ComSerial.PortName = port.ToString(); PortAvailable = port.ToString(); } ComSerial.PortName = txtComPort.Text; ComSerial.Open(); if (!string.IsNullOrWhiteSpace(txtBaundRate.Text)) { ComSerial.BaudRate = Convert.ToInt32(txtBaundRate.Text); } if (!string.IsNullOrWhiteSpace(cmbParity.Text)) { ComSerial.Parity = SystemProperties.Getparity(cmbParity.Text); } if (!string.IsNullOrWhiteSpace(cmbStopBits.Text)) { ComSerial.StopBits = SystemProperties.GetStopBit(cmbStopBits.Text); } if (!string.IsNullOrWhiteSpace(txtDataBits.Text)) { ComSerial.DataBits = Convert.ToInt32(txtDataBits.Text); } //txtStatus.Text = ""; ComSerial.DataReceived += new SerialDataReceivedEventHandler(ComSerial_DataReceived); //ComSerial.Close(); } catch (Exception ex) { //ComSerial.Close(); //ComSerial.ReadTimeout = 100; //ComSerial.PortName = PortAvailable; //ComSerial.Open(); //ComSerial.BaudRate = 9600; //ComSerial.Parity = Parity.None; //ComSerial.StopBits = StopBits.One; //ComSerial.DataBits = 8; //ComSerial.DataReceived += new SerialDataReceivedEventHandler(ComSerial_DataReceived); txtStatus.Text = "Available serial port: " + Environment.NewLine + PortAvailable + Environment.NewLine + Environment.NewLine + "Defaul settings:" + Environment.NewLine + " BoundRate: 9600, DataBits: 8,StopBits: One,Parity: None "; AutoScanTimer.Stop(); AutoScanTimer.Enabled = false; ComSerial.Close(); } }
void SetProperties() { LoadApplication(); LoadCourse(); LoadYearLevel(); LoadCivilStatus(); LoadStudentInfo(); ObjEnable(false); SystemProperties.Cleared(this, false, true, true); SystemProperties.Cleared(Mother, false, true, true); SystemProperties.Cleared(Father, false, true, true); txtSearch.ReadOnly = false; AutoScanTimer.Enabled = true; AutoScanTimer.Start(); }
public bool Initialize(StartupArg startupArg) { PanelClass = startupArg.PanelClass; _startupArg = startupArg; _scannerCommon = new ScannerCommon(this); _scannerCommon.PositionSizeController.AutoPosition = false; if (!_scannerCommon.Initialize(startupArg)) { MessageBox.Show("Could not initialize form " + Name); return(false); } _rootWidget = _scannerCommon.GetRootWidget(); _dockScanner = new DockScanner(startupArg.HWnd, this); _autoScanTimer = new AutoScanTimer(startupArg.HWnd, this); _autoScanTimer.EvtStart += new EventHandler(_autoScanTimer_EvtStart); _autoScanTimer.EvtStop += new EventHandler(_autoScanTimer_EvtStop); _autoScanTimer.EvtTick += new EventHandler(_autoScanTimer_EvtTick); return(true); }
void btnTest_Click(object sender, EventArgs e) { AutoScanTimer.Enabled = true; AutoScanTimer.Start(); }
public virtual bool Initialize(StartupArg startupArg) { _menuWidth = this.Width; _panelName = startupArg.PanelType; _screenCommon = new ScreenCommon(this); _screenCommon.AutoSetScreenLocation = false; if (!_screenCommon.Initialize(startupArg)) { MessageBox.Show("Could not initialize form " + Name); return false; } _rootWidget = _screenCommon.GetRootWidget(); _hWnd = startupArg.HWnd; if (startupArg.FocusedElement != null) { OnFocusChanged(startupArg.FocusedElement); } _screenCommon.GetAnimationManager().EvtPlayerStateChanged += MenuContextMenu_EvtPlayerStateChanged; _autoScanTimer = new AutoScanTimer(startupArg.HWnd, this); _autoScanTimer.EvtStart += new AutoScanTimer.StartScan(_autoScanTimer_EvtStart); _autoScanTimer.EvtStop += new AutoScanTimer.StopScan(_autoScanTimer_EvtStop); _autoScanTimer.EvtTick += new AutoScanTimer.Tick(_autoScanTimer_EvtTick); return true; }
public bool Initialize(StartupArg startupArg) { PanelClass = startupArg.PanelClass; _startupArg = startupArg; _scannerCommon = new ScannerCommon(this); _scannerCommon.PositionSizeController.AutoPosition = false; if (!_scannerCommon.Initialize(startupArg)) { MessageBox.Show("Could not initialize form " + Name); return false; } _rootWidget = _scannerCommon.GetRootWidget(); _dockScanner = new DockScanner(startupArg.HWnd, this); _autoScanTimer = new AutoScanTimer(startupArg.HWnd, this); _autoScanTimer.EvtStart += new EventHandler(_autoScanTimer_EvtStart); _autoScanTimer.EvtStop += new EventHandler(_autoScanTimer_EvtStop); _autoScanTimer.EvtTick += new EventHandler(_autoScanTimer_EvtTick); return true; }