Exemplo n.º 1
0
        /// <summary>
        /// Event callback for release instance 2 button.
        /// </summary>
        /// <param name="sender">Button that was clicked.</param>
        /// <param name="e">Event data associated with click event.</param>
        private void ReleaseButton2_Click(object sender, RoutedEventArgs e)
        {
            if (claimedCashDrawerInstance2 != null)
            {
                claimedCashDrawerInstance2.Dispose();
                claimedCashDrawerInstance2 = null;

                SetReleasedUI(CashDrawerInstance.Instance2);

                rootPage.NotifyUser("Claimed instance 2 was released.", NotifyType.StatusMessage);
            }

            if (cashDrawerInstance2 != null)
            {
                cashDrawerInstance2.Dispose();
                cashDrawerInstance2 = null;
            }
        }
        /// <summary>
        /// Reset the scenario to its initial state.
        /// </summary>
        private void ResetScenarioState()
        {
            if (claimedDrawer != null)
            {
                claimedDrawer.Dispose();
                claimedDrawer = null;
            }

            if (drawer != null)
            {
                drawer.Dispose();
                drawer = null;
            }

            InitDrawerButton.IsEnabled = true;
            OpenDrawerButton.IsEnabled = false;

            rootPage.NotifyUser("Click the init drawer button to begin.", NotifyType.StatusMessage);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Reset the scenario to its initial state.
        /// </summary>
        private void ResetScenarioState()
        {
            if (claimedDrawer != null)
            {
                claimedDrawer.Dispose();
                claimedDrawer = null;
            }

            if (drawer != null)
            {
                drawer.Dispose();
                drawer = null;
            }

            UpdateStatusOutput(CashDrawerStatusKind.Offline);

            InitDrawerButton.IsEnabled = true;
            DrawerWaitButton.IsEnabled = false;

            rootPage.NotifyUser("Click the init drawer button to begin.", NotifyType.StatusMessage);
        }