public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; try { textBox2.Text = File.ReadAllText("script.txt"); } catch (Exception err) { } try { LotoUtils u = new LotoUtils(); u.readFile("Lotto.csv", out int numOfRepeat); textBox1.AppendText("Total numbers of letery are: " + m_list.Count + Environment.NewLine); textBox1.AppendText("There are " + m_numOfRepeat + " lottery that repeated" + Environment.NewLine); m_util = new LotoUtils(m_list, m_dicLotoString); LotoScriptEngine.MsgCallback p = new LotoScriptEngine.MsgCallback(ScriptCallback); m_script = new LotoScriptEngine(m_list, m_dicLotoString, p); } catch (Exception err) { MessageBox.Show(err.Message); } }
public Form2() { InitializeComponent(); u.readFile("Lotto.csv", out int numOfRepeat); this.WindowState = FormWindowState.Maximized; lotoResults = u.GetLoto(); }