Esempio 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;
        }
Esempio n. 2
0
        /// <summary>
        /// Logs the specified a esm.
        /// </summary>
        /// <param name="aESM">A esm.</param>
        private void Log(ESM aESM)
        {
            string folder = Path.Combine(config.WiredInFolder, "log");
            folder = Path.Combine(folder, RunIDKeeper.GetIDKeeper().GetRunID());
            if (!Directory.Exists(folder))
            {
                Directory.CreateDirectory(folder);
            }

            logFile = Path.Combine(folder, "esm.json");
            _jsonLogger = new JsonLogger();
            string json_content = JsonConvert.SerializeObject(aESM);
            _jsonLogger.LogThisToHere(json_content, logFile);
        }