コード例 #1
0
        public AlgorithmSelectorVM()
        {
            Workers        = ViewModel.Instance.Workers.WorkerList.Select(x => x.Name).ToList();
            SelectedWorker = Workers.FirstOrDefault();

            Process              = new RelayCommand(ProcessCommand, Process_CanExecute);
            CoinsSelectAll       = new RelayCommand(CoinsSelectAllCommand);
            CoinsSelectNone      = new RelayCommand(CoinsSelectNoneCommand);
            AlgorithmsSelectAll  = new RelayCommand(AlgorithmsSelectAllCommand);
            AlgorithmsSelectNone = new RelayCommand(AlgorithmsSelectNoneCommand);
            Initialize           = new RelayCommand(InitializeCommand);

            ShowActiveCoinsOnly   = true;
            this.PropertyChanged += AlgorithmSelectorVM_PropertyChanged;
        }
コード例 #2
0
        private bool Ok_CanExecute(object obj)
        {
            var firstCheck = Workers.FirstOrDefault(x => x.Query);

            return(firstCheck != null ? true : false);
        }