private void InitializeUI() { PosPrinterSimulator p = ServiceObjectReference.Target as PosPrinterSimulator; if (p != null) { SlipCoverOpenCheckBox.Enabled = p.PrinterProperties.CapSlpPresent; } }
private void SetPowerState() { try { PosPrinterSimulator p = ServiceObjectReference.Target as PosPrinterSimulator; if (p != null) { p.PrinterProperties.PowerState = cbPoweredOn.Checked ? PowerState.Online : PowerState.OffOffline; } } catch { } }
private void tbPrintDelay_TextChanged(object sender, System.EventArgs e) { try { PosPrinterSimulator p = ServiceObjectReference.Target as PosPrinterSimulator; if (p != null) { p.PrintDelay = Int32.Parse(tbPrintDelay.Text, CultureInfo.CurrentCulture); } } catch { } }
private void SlipCoverOpenCheckBox_CheckedChanged(object sender, System.EventArgs e) { PosPrinterSimulator p = ServiceObjectReference.Target as PosPrinterSimulator; if (p != null) { if (SlipCoverOpenCheckBox.Checked) { p.OnSlipCoverOpened(); } else { p.OnSlipCoverClosed(); } CoverOpenCheckBox.Checked = p.PrinterProperties.CoverOpen; } }
internal PosPrinterSimulatorWindow(PosPrinterSimulator serviceObject) : base(serviceObject) { Invoke(new MethodDelegate(InitializeComponent)); Invoke(new MethodDelegate(InitializeUI)); Invoke(new MethodDelegate(SetPowerState)); }
internal PosPrinterSimulatorWindow(PosPrinterSimulator serviceObject) : base(serviceObject) { Invoke(new MethodDelegate(InitializeComponent)); Invoke(new MethodDelegate(InitializeUI)); Invoke(new MethodDelegate(SetPowerState)); }