CPUMinerGUI.Form1.Form1_Load C# (CSharp) Method

Form1_Load() private method

private Form1_Load ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void Form1_Load(object sender, EventArgs e)
        {
            poolList = new List<PoolItem>();
            miners = new List<Miner>();
            readList();

            DirectoryInfo dir = new DirectoryInfo(Application.StartupPath);

            foreach (FileInfo file in dir.EnumerateFiles("*_log.txt")) {
                file.Delete();
            }

            FileSystemWatcher watcher = new FileSystemWatcher();
            watcher.Path = Application.StartupPath;
            watcher.EnableRaisingEvents = true;
            watcher.Filter = "*_log.txt";
            watcher.Created += new FileSystemEventHandler(newLogFound);

            hashChart.Series[0].YAxisType = AxisType.Primary;
            hashChart.Series[0].YValueType = ChartValueType.Single;
            hashChart.Series[0].IsXValueIndexed = false;

            hashChart.ResetAutoValues();
            hashChart.ChartAreas[0].AxisY.Maximum = 1;
            hashChart.ChartAreas[0].AxisY.Minimum = 0;
            hashChart.ChartAreas[0].AxisX.Enabled = AxisEnabled.False;
            hashChart.ChartAreas[0].AxisY.IntervalAutoMode = IntervalAutoMode.FixedCount;
        }