Пример #1
0
        //private decimal paycash = 0;
        public ShellOut()
        {
            InitializeComponent();

            // define the dialog buttons
            this.Buttons = new Button[] {};
            //setting decimal separator
            if (StaticClass.GeneralClass.app_settings["decimalSeparator"].ToString() == "1")
            {
                btnpoint.Content = ",";
            }

            //setting standard calculator
            if (StaticClass.GeneralClass.app_settings["CalStandard"].ToString() == "1")
            {
                mnuiStandard_Click(null, null);
            }
            else
            {
                mnuiExtend_Click(null, null);
            }

            //create pay template
            new Thread(() =>
            {
                this.Dispatcher.Invoke((Action)(() => { CreatePayTemplate(); }));
            }).Start();
            IRequestFocus focus = (IRequestFocus)DataContext;

            focus.FocusRequested += OnFocusRequested;
        }
        private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            UsernameTextBox.Focus();
            UsernameTextBox.SelectAll();

            IRequestFocus focus = (IRequestFocus)DataContext;

            focus.FocusRequested += OnFocusRequested;
        }
Пример #3
0
        public GiftCard_Add(int param)
        {
            InitializeComponent();

            // define the dialog buttons
            this.Buttons = new Button[] {  };
            GiftCard_AddViewModel.RequestClose += (s, e) => this.Close();
            IRequestFocus focus = (IRequestFocus)DataContext;

            focus.FocusRequested += OnFocusRequested;
        }
Пример #4
0
        public PaymentScan(Int32 _scanId, string _strRef, string _strComp)
        {
            InitializeComponent();

            // define the dialog buttons
            this.Buttons = new Button[] {  };
            PaymentScanViewModel.RequestClose += (s, e) => this.Close();
            IRequestFocus focus = (IRequestFocus)DataContext;

            focus.FocusRequested           += OnFocusRequested;
            PaymentScanViewModel.ScanIndex  = _scanId;
            PaymentScanViewModel.ScanRef    = _strRef;
            PaymentScanViewModel.StrCompare = _strComp;
        }
Пример #5
0
        public GiftCard_View(List <Int32> param)
        {
            InitializeComponent();

            // define the dialog buttons
            this.Buttons = new Button[] {  };
            GiftCard_AddViewModel.RequestClose += (s, e) => this.Close();
            GiftCard_AddViewModel.getId         = param[0];
            GiftCard_AddViewModel.printId.Clear();
            foreach (Int32 j in param)
            {
                GiftCard_AddViewModel.printId.Add(j);
            }
            IRequestFocus focus = (IRequestFocus)DataContext;

            focus.FocusRequested += OnFocusRequested;
        }
Пример #6
0
        public LoginSystem()
        {
            InitializeComponent();

            // define the dialog buttons
            this.Buttons = new Button[] {  };
            IRequestFocus focus = (IRequestFocus)DataContext;

            focus.FocusRequested += OnFocusRequested;
            ViewModel.Home.LoginSystem_VM.RequestClose += (s, e) => this.Close();
            if (LoginSystemSuccessHandler == null)
            {
                LoginSystemSuccessHandler += onLoginSystemSuccessHandler;
            }
            if (LoginCancelHandler == null)
            {
                LoginCancelHandler += onLoginCancelHandler;
            }
            if (AdminForgotHandler == null)
            {
                AdminForgotHandler += onAdminForgotHandler;
            }
        }
Пример #7
0
        private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            IRequestFocus focus = (IRequestFocus)DataContext;

            focus.FocusRequested += Focus_FocusRequested;
        }
Пример #8
0
        private void ShellView_OnLoaded(object sender, RoutedEventArgs e)
        {
            IRequestFocus focus = (IRequestFocus)DataContext;

            focus.FocusRequsted += OnFocusRequest;
        }