public void RaiseCanExecuteActions()
 {
     SaveCommand.RaiseCanExecuteChanged();
     ResetCommand.RaiseCanExecuteChanged();
     CopyPreviousMonth.RaiseCanExecuteChanged();
     CurrentMonthCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 2
0
 private void StopwatchStateChanged()
 {
     StartCommand.RaiseCanExecuteChanged();
     StopCommand.RaiseCanExecuteChanged();
     ResetCommand.RaiseCanExecuteChanged();
     LapCommand.RaiseCanExecuteChanged();
 }
 private void IsAllowResetAndSolutionEvent_EA_SUB(bool obj)
 {
     _isAllowResetAndSolution = true;
     _isAllowShuffel          = true;
     ResetCommand.RaiseCanExecuteChanged();
     ShowSolutionCommand.RaiseCanExecuteChanged();
     ShuffleCommand.RaiseCanExecuteChanged();
 }
 private void UpdateSettingModeEvent_EA_SUB(bool isSettings)
 {
     _isAllowShuffel          = !isSettings;
     _isAllowResetAndSolution = !isSettings && _isAllowResetAndSolution;
     ResetCommand.RaiseCanExecuteChanged();
     ShowSolutionCommand.RaiseCanExecuteChanged();
     ShuffleCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 5
0
 private void CreateMatrix()
 {
     _playfairInstance.SetPkayfairKey(PlayfairKey);
     CurrentMatrix.Key = PlayfairKey;
     RaisePropertyChanged <PlayfairMatrix>(nameof(CurrentMatrix));
     ResetCommand.RaiseCanExecuteChanged();
     CreateCommand.RaiseCanExecuteChanged();
 }
 private void ShowSolution()
 {
     _isAllowShuffel          = false;
     _isAllowResetAndSolution = false;
     ShuffleCommand.RaiseCanExecuteChanged();
     ResetCommand.RaiseCanExecuteChanged();
     ShowSolutionCommand.RaiseCanExecuteChanged();
     _eventAggregator.GetEvent <ShowSolutionClickEvent>().Publish(true);
 }
Exemplo n.º 7
0
 private void ResetMatrix()
 {
     PlayfairKey = "";
     _playfairInstance.SetPkayfairKey("ABCDE");
     CurrentMatrix.Key = "ABCDE";
     RaisePropertyChanged <PlayfairMatrix>(nameof(CurrentMatrix));
     ResetCommand.RaiseCanExecuteChanged();
     CreateCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 8
0
 private void SetSelectedItem(CustomerWrapper customerWrapper)
 {
     SelectedItem = customerWrapper;
     SelectedItem.PropertyChanged += (s, e) =>
     {
         if (e.PropertyName == nameof(SelectedItem.IsChanged))
         {
             SaveCommand.RaiseCanExecuteChanged();
             ResetCommand.RaiseCanExecuteChanged();
             _eventAggregator.GetEvent <ModelIsChangedEvent>().Publish(SelectedItem.IsChanged);//Notify the mainwindow that there are changes, to prompt user not to close window.
         }
     };
 }
Exemplo n.º 9
0
 private void InhibitNotificationEvents(bool inhibit)
 {
     NotificationInhibiter.IsNotificationInhibited = inhibit;
     RollAllCommand.RaiseCanExecuteChanged();
     ResetCommand.RaiseCanExecuteChanged();
     CancelCommand.RaiseCanExecuteChanged();
     if (!inhibit)
     {
         RaisePropertyChanged(this, x => x.Inventory);
         RaisePropertyChanged(this, x => x.Cycles);
         RaisePropertyChanged(this, x => x.Throughput);
         RaisePropertyChanged(this, x => x.Profit);
         foreach (var item in Bowls)
         {
             item.Notify();
         }
     }
 }
        private void Machine_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == nameof(Machine.Connected) ||
                e.PropertyName == nameof(Machine.Mode))
            {
                SoftResetCommand.RaiseCanExecuteChanged();
                ClearAlarmCommand.RaiseCanExecuteChanged();
                FeedHoldCommand.RaiseCanExecuteChanged();
                CycleStartCommand.RaiseCanExecuteChanged();
                JogCommand.RaiseCanExecuteChanged();
                ResetCommand.RaiseCanExecuteChanged();
                HomeCommand.RaiseCanExecuteChanged();
                SetCameraCommand.RaiseCanExecuteChanged();
                SetTool1Command.RaiseCanExecuteChanged();

                SetToMoveHeightCommand.RaiseCanExecuteChanged();
                SetToPickHeightCommand.RaiseCanExecuteChanged();
                SetToPlaceHeightCommand.RaiseCanExecuteChanged();
                MoveToBottomCameraCommand.RaiseCanExecuteChanged();
            }

            if (e.PropertyName == nameof(Machine.ViewType))
            {
                SetCameraCommand.RaiseCanExecuteChanged();
                SetTool1Command.RaiseCanExecuteChanged();
            }

            if (e.PropertyName == nameof(Machine.Settings))
            {
                /* Keep the saved values as temp vars since updating the StepMode will overwrite */
                var originalXYStepSize = Machine.Settings.XYStepSize;
                var originalZStepSize  = Machine.Settings.ZStepSize;

                XYStepMode = Machine.Settings.XYStepMode;
                ZStepMode  = Machine.Settings.ZStepMode;

                XYStepSizeSlider = originalXYStepSize;
                ZStepSizeSlider  = originalZStepSize;
            }
        }
 private void OnIsLoadingChanged()
 {
     ResetCommand.RaiseCanExecuteChanged();
 }
 private void OnEmailChanged()
 {
     ResetCommand.RaiseCanExecuteChanged();
 }