public bool CanExecute(object parameter) { if (parameter == null || LegoViewModel.IsCollecting) return false; Config = (LgConfig)parameter; return Config.IsRunningAny; }
public void Execute(object parameter) { Trace.WriteLine("executed"); LegoViewModel.IsCollecting = true; LgConfig config = new LgConfig(); LegoViewModel.Manager = new IOManager(config); LegoViewModel.Manager.Start(); }
/// <summary> /// Get all saved configurations /// </summary> /// <returns></returns> public static List <LgConfig> GetAllConfigs() { List <LgConfig> configs = new List <LgConfig>(); List <string> files = Directory.GetFiles(CONFIGS_PATH).ToList <string>(); files.ForEach((f) => { LgConfig c = LgConfig.FromFile(f); if (c != null) { configs.Add(c); } } ); return(configs); }
public IOManager(LgConfig config) { _proc = HookCallback; Config = config; }
private void btnRecord_Click(object sender, RoutedEventArgs e) { LgConfig c = new LgConfig(); io = new IOManager(c); io.Start(); }