Exemplo n.º 1
0
        private void EditDictionary(object param)
        {
            DictionaryEditWindow target = new DictionaryEditWindow((Dictionary)((DataGrid)param).SelectedItem)
            {
                Owner = this.SourceWindow
            };

            SwitchWindows(target, true);
            this.DictionaryList = ReloadDictionaryList();
        }
Exemplo n.º 2
0
 public DictionaryViewModel(DictionaryEditWindow dictionaryEditWindow, Dictionary SelectedDictionary)
 {
     this.SelectedDictionary = SelectedDictionary;
     this.SourceWindow       = dictionaryEditWindow;
     this.SaveCommand        = new RelayCommand(SaveDictionary, CanExecute);
     this._contextDal        = new DictionaryDAL();
     this.DictionaryTypeList = new ObservableCollection <DictionaryType>(((DictionaryDAL)_contextDal).DictionaryTypeList());
     IsProtected             = SelectedDictionary.IsProtected;
     EditAble = SelectedDictionary.ID == 0;
 }
Exemplo n.º 3
0
        private void CreateDictionary()
        {
            Dictionary           dictionary = new Dictionary();
            DictionaryEditWindow target     = new DictionaryEditWindow(dictionary)
            {
                Owner = this.SourceWindow
            };

            SwitchWindows(target, true);
            this.DictionaryList = ReloadDictionaryList();
        }