Esempio n. 1
0
        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();
        }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
 public IOManager(LgConfig config)
 {
     _proc = HookCallback;
     Config = config;
 }
Esempio n. 5
0
 private void btnRecord_Click(object sender, RoutedEventArgs e)
 {
     LgConfig c = new LgConfig();
     io = new IOManager(c);
     io.Start();
 }