Ejemplo n.º 1
0
 public MainWindowVM(IWindowFactory windowFactory, IAppCommands appCommands, ITreeCommands treeCommands, IDataSource data)
 {
     _windowFactory = windowFactory;
     AppCommands    = appCommands;
     TreeCommands   = treeCommands;
     DataSource     = data;
     OpenCommand    = new RelayCommand(openFile);
     SaveCommand    = new RelayCommand(saveFile, canPrintSave);
     appCommands.ShowConverterWindow   = new RelayCommand(showConverter);
     Settings.Default.PropertyChanged += onSettingChange;
 }
Ejemplo n.º 2
0
 public MainWindowVM(
     IWindowFactory windowFactory,
     IAppCommands appCommands,
     ITreeCommands treeCommands,
     IDataSource data)
 {
     _windowFactory = windowFactory;
     AppCommands    = appCommands;
     TreeCommands   = treeCommands;
     DataSource     = data;
     NewCommand     = new RelayCommand(newFile);
     OpenCommand    = new RelayCommand(openFile);
     SaveCommand    = new RelayCommand(saveFile, canPrintSave);
     appCommands.ShowConverterWindow  = new RelayCommand(showConverter);
     NodeViewOptions.PropertyChanged += onNodeViewOptionsChanged;
     DataSource.CollectionChanged    += (sender, args) => IsModified = true;
     IsModified = false;
 }
Ejemplo n.º 3
0
 public TreeViewVM(IDataSource data, ITreeCommands treeCommands)
 {
     DataSource   = data;
     TreeCommands = treeCommands;
 }