예제 #1
0
        protected TransportViewModel(DataTransport <T> dataTransport)
        {
            _dataTransport = dataTransport;
            _dataTransport.CanOpenChanged  += delegate { OpenCommand.RaiseCanExecuteChanged(); };
            _dataTransport.CanCloseChanged += delegate { CloseCommand.RaiseCanExecuteChanged(); };


            _dataTransport.IsOpenChanged += (sender, args) =>
            {
                RaisePropertyChanged(nameof(IsOpen));
            };
        }
예제 #2
0
 protected override void RaiseCanExecuteCommands()
 {
     OpenCommand.RaiseCanExecuteChanged();
     CloseCommand.RaiseCanExecuteChanged();
     //NextPageCommand.RaiseCanExecuteChanged();
     //PreviousPageCommand.RaiseCanExecuteChanged();
     //FirstPageCommand.RaiseCanExecuteChanged();
     //LastPageCommand.RaiseCanExecuteChanged();
     SaveCommand.RaiseCanExecuteChanged();
     NewCommand.RaiseCanExecuteChanged();
     DeleteCommand.RaiseCanExecuteChanged();
     ReloadCommand.RaiseCanExecuteChanged();
 }
예제 #3
0
        private void OnInitWorkArea()
        {
            _isWorkAreaIniting = true;

            NewCommand.RaiseCanExecuteChanged();
            OpenCommand.RaiseCanExecuteChanged();
            SaveAllCommand.RaiseCanExecuteChanged();

            //Work Area
            var selectedTab = XamlTabs.FirstOrDefault(tab => tab.IsSelected);

            selectedTab?.InitWorkArea();

            _isWorkAreaIniting = false;

            NewCommand.RaiseCanExecuteChanged();
            OpenCommand.RaiseCanExecuteChanged();
            SaveAllCommand.RaiseCanExecuteChanged();
        }
 private void AnyPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     OpenCommand.RaiseCanExecuteChanged();
     Recognize.RaiseCanExecuteChanged();
 }