Example #1
0
        private void InitializeUI()
        {
            PosPrinterSimulator p = ServiceObjectReference.Target as PosPrinterSimulator;

            if (p != null)
            {
                SlipCoverOpenCheckBox.Enabled = p.PrinterProperties.CapSlpPresent;
            }
        }
Example #2
0
 private void SetPowerState()
 {
     try
     {
         PosPrinterSimulator p = ServiceObjectReference.Target as PosPrinterSimulator;
         if (p != null)
         {
             p.PrinterProperties.PowerState = cbPoweredOn.Checked ? PowerState.Online : PowerState.OffOffline;
         }
     }
     catch
     {
     }
 }
Example #3
0
 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
     {
     }
 }
Example #4
0
        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;
            }
        }
Example #5
0
		internal PosPrinterSimulatorWindow(PosPrinterSimulator serviceObject) : base(serviceObject)
		{
			Invoke(new MethodDelegate(InitializeComponent));
			Invoke(new MethodDelegate(InitializeUI));
			Invoke(new MethodDelegate(SetPowerState));
		}
Example #6
0
 internal PosPrinterSimulatorWindow(PosPrinterSimulator serviceObject) : base(serviceObject)
 {
     Invoke(new MethodDelegate(InitializeComponent));
     Invoke(new MethodDelegate(InitializeUI));
     Invoke(new MethodDelegate(SetPowerState));
 }