Beispiel #1
0
 private void EditSelectedKey()
 {
     MycoKeyCreator.Application.ViewModel.KeysListViewModel keysListViewModel = DataContext as MycoKeyCreator.Application.ViewModel.KeysListViewModel;
     if (keysListViewModel.SelectedKey != null)
     {
         ShowKeyView(keysListViewModel.IKeyManager, keysListViewModel.SelectedKey);
         keysListViewModel.Load();
     }
 }
Beispiel #2
0
        private void _buttonNew_Click(object sender, RoutedEventArgs e)
        {
            MycoKeyCreator.Application.ViewModel.KeysListViewModel keysListViewModel = DataContext as MycoKeyCreator.Application.ViewModel.KeysListViewModel;

            MycoKeyCreator.Library.DBObject.Key key         = new MycoKeyCreator.Library.DBObject.Key();
            View.KeyHeaderView           keyHeaderView      = new KeyHeaderView();
            ViewModel.KeyHeaderViewModel keyHeaderViewModel = new ViewModel.KeyHeaderViewModel(keysListViewModel.IKeyManager, key);
            keyHeaderView.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            keyHeaderView.Owner       = this;
            keyHeaderView.DataContext = keyHeaderViewModel;
            if (keyHeaderView.ShowDialog() == true)
            {
                ShowKeyView(keysListViewModel.IKeyManager, key);
                keysListViewModel.Load();
            }
        }
Beispiel #3
0
 private void _buttonExportDB_Click(object sender, RoutedEventArgs e)
 {
     MycoKeyCreator.Application.ViewModel.KeysListViewModel keysListViewModel = DataContext as MycoKeyCreator.Application.ViewModel.KeysListViewModel;
     _iISerialise.Export(keysListViewModel.IKeyManager);
     keysListViewModel.Load();
 }