public MainWindowViewmodel()
 {
     _commandIngestFoldersSetup = new UICommand()
     {
         ExecuteDelegate = _ingestFoldersSetup
     };
     _commandConfigFileEdit = new UICommand()
     {
         ExecuteDelegate = _configFileEdit
     };
     _commandConfigFileSelect = new UICommand()
     {
         ExecuteDelegate = _configFileSelect
     };
     _commandPlayoutServersSetup = new UICommand()
     {
         ExecuteDelegate = _serversSetup
     };
     _commandEnginesSetup = new UICommand()
     {
         ExecuteDelegate = _enginesSetup
     };
     if (File.Exists("TVPlay.exe"))
     {
         ConfigFile = new Model.ConfigFile("TVPlay.exe");
     }
 }
 private void _configFileSelect(object obj)
 {
     Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog()
     {
         Filter = "Executables (*.exe)|*.exe"
     };
     if (dlg.ShowDialog() == true)
     {
         ConfigFile = new Model.ConfigFile(dlg.FileName);
     }
 }
Esempio n. 3
0
 public MainWindowViewmodel()
 {
     CommandIngestFoldersSetup  = new UiCommand(_ingestFoldersSetup);
     CommandConfigFileEdit      = new UiCommand(_configFileEdit);
     CommandConfigFileSelect    = new UiCommand(_configFileSelect);
     CommandPlayoutServersSetup = new UiCommand(_serversSetup);
     CommandEnginesSetup        = new UiCommand(_enginesSetup);
     if (File.Exists("TVPlay.exe"))
     {
         ConfigFile = new Model.ConfigFile("TVPlay.exe");
     }
 }
 public MainWindowViewmodel()
 {
     if (File.Exists("TVPlay.exe"))
     {
         ConfigFile = new Model.ConfigFile(ConfigurationManager.OpenExeConfiguration("TVPlay.exe"));
     }
     CommandIngestFoldersSetup  = new UiCommand(_ingestFoldersSetup, _canShowDialog);
     CommandConfigFileEdit      = new UiCommand(_configFileEdit, _canShowDialog);
     CommandConfigFileSelect    = new UiCommand(_configFileSelect, _canShowDialog);
     CommandPlayoutServersSetup = new UiCommand(_serversSetup, _canShowDialog);
     CommandEnginesSetup        = new UiCommand(_enginesSetup, _canShowDialog);
 }