Ejemplo n.º 1
0
        protected BaseAppEditorVM(Window w)
        {
            view = w;
            view.DataContext = this;
            view.Owner = AppData.MainWindowView;

            mode = EditType.NotSet;

            OKButtonCommand = new RelayCommand(OKAction);
            CancelButtonCommand = new RelayCommand(CancelAction);
        }
Ejemplo n.º 2
0
        public ClientManagerVM()
        {
            _view = new ClientManagerView();
            _view.DataContext = this;

            Load();

            LoadCommand = new RelayAsyncCommand(Load);
            AddCommand = new RelayCommand(Add);
            EditCommand = new RelayCommand(Edit);
            DeleteCommand = new RelayCommand(Delete);

            IsContactSelected = false;
            OnPropertyChanged("IsContactSelected");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialize all Menu Bar Commands.
        /// </summary>
        private void InitializeCommands()
        {
            ExitCommand = new RelayCommand(ExitApplication);
            ExitCommandKey = Key.C;
            ExitCommandMod = ModifierKeys.Control;
            ExitCommandLbl = "Ctrl+C";

            AboutCommand = new RelayCommand(ShowAboutView);
        }