List <string> CMiners = new List <string>(); //For the List in the config window private void frmMain_Load(object sender, EventArgs e) { CMiners.Add("CCMiner"); CMiners.Add("NSGMiner"); CMiners.Add("BFGMiner"); //Load necessarry config parameters var configFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); var settings = configFile.AppSettings.Settings; _conf_walletFTC = settings["FeathercoinWalletAddress"].Value; _conf_currency = settings["Currency"].Value; //for initialising the chart (otherwise strange artifacts show up) chaStat.Series[0].Points.Add(new DataPoint(DateTime.Now.ToOADate(), 0)); chaStat.Series[1].Points.Add(new DataPoint(DateTime.Now.ToOADate(), 0)); chaStat.Series[2].Points.Add(new DataPoint(DateTime.Now.ToOADate(), 0)); if (settings["Path"].Value == "") { MessageBox.Show("This seems to be the first Start." + Environment.NewLine + "You need to put in your settings before we can Start!"); frmSettings st = new frmSettings(); st.CMiners = CMiners.ToArray(); st.Show(); } }
private void btnStart_Click(object sender, EventArgs e) { if (mn != null) { Stop(); } else { if (checkSettings()) { Start(); } else { MessageBox.Show("Please check your settings. There sesms to be missing something!"); frmSettings st = new frmSettings(); st.CMiners = CMiners.ToArray(); st.Show(); } } }