Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Orientation" /> class.
        /// </summary>
        public Orientation()
        {
            InitializeComponent();
            _allWindows = new List<WindowInfo>();
            _whiteWindowInfos = new List<WindowInfo>();

            lbxAllWindows.DataSource = _allWindows;
            lbxWhiteWinList.DataSource = _whiteWindowInfos;

            _runIns = new RunInstance();
            _jLog = new JsonLogger();

            _bgWorker = new BackgroundWorker();
            _bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork);
            _bgWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted);
            tabControl.SelectedTab = tabpageTask;
        }
Exemplo n.º 2
0
 private void LogRunIns(RunInstance ins)
 {
     string dir = Path.Combine(_config.WiredInFolder, "log", RunIDKeeper.GetIDKeeper().GetRunID());
     if (!Directory.Exists(dir))
     {
         Directory.CreateDirectory(dir);
     }
     string content = JsonConvert.SerializeObject(ins);
     string fileName = Path.Combine(dir, "run.json");
     _jLog.LogThisToHere(content, fileName);
 }