Exemplo n.º 1
0
        private void SetButtonState()
        {
            CashDrawerSimulator CashDrawerSim = ServiceObjectReference.Target as CashDrawerSimulator;

            if (CashDrawerSim != null)
            {
                button1.Enabled = CashDrawerSim.CapStatus;
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            CashDrawerSimulator CashDrawerSim = ServiceObjectReference.Target as CashDrawerSimulator;

            if (CashDrawerSim != null)
            {
                CashDrawerSim.CloseDrawer();
            }
        }
Exemplo n.º 3
0
        private void UpdateStateInternal()
        {
            CashDrawerSimulator CashDrawerSim = ServiceObjectReference.Target as CashDrawerSimulator;

            if (CashDrawerSim != null)
            {
                if (CashDrawerSim.DrawerOpened)
                {
                    textBox1.Text = "Open";
                }
                else
                {
                    textBox1.Text = "Closed";
                }

                button1.Enabled = CashDrawerSim.DrawerOpened && CashDrawerSim.DeviceEnabled;
            }
        }
Exemplo n.º 4
0
		public CashDrawerSimulatorWindow(CashDrawerSimulator serviceObject) : base(serviceObject)
		{
			Invoke(new MethodDelegate(InitializeComponent));
			Invoke(new MethodDelegate(SetButtonState));
		}
Exemplo n.º 5
0
 public CashDrawerSimulatorWindow(CashDrawerSimulator serviceObject) : base(serviceObject)
 {
     Invoke(new MethodDelegate(InitializeComponent));
     Invoke(new MethodDelegate(SetButtonState));
 }