private void button4_Click(object sender, EventArgs e) { string filename = filenameBox.Text; if (filename != "") { InvestmentPlan plan = DesktopLogic.planFromProcess(filename); //var plan = tranche.assets[0].profit.ToString() + " " + tranche.assets[0].prob.ToString(); this.answerBox.Text = plan.GetFinalProfit().ToString(ci); this.answerGridView.Rows.Clear(); foreach (var x in plan.Plan) { this.answerGridView.Rows.Add(x.Item1.ToString(ci), x.Item2.ToString()); } setRowNumber(this.answerGridView); this.answerGridView.Visible = true; this.answerBox.TabStop = false; this.tabControl1.SelectedTab = this.tabPage2; this.tabPage2.Visible = true; } }
private void button3_Click(object sender, EventArgs e) { try { Tranche tranche = readTranche(); InvestmentPlan plan = DesktopLogic.planFromThread(tranche); //var plan = tranche.assets[0].profit.ToString() + " " + tranche.assets[0].prob.ToString(); this.answerBox.Text = plan.GetFinalProfit().ToString(ci); this.answerGridView.Rows.Clear(); foreach (var x in plan.Plan) { this.answerGridView.Rows.Add(x.Item1.ToString(ci), x.Item2.ToString()); } setRowNumber(this.answerGridView); this.answerGridView.Visible = true; this.answerBox.TabStop = false; this.tabControl1.SelectedTab = this.tabPage2; this.tabPage2.Visible = true; } catch (Exception ex) { } }
private void button1_Click(object sender, EventArgs e) { MouseEventArgs eventargs = e as MouseEventArgs; Button button1 = sender as Button; // displays which mouse button I used //MessageBox.Show(eventargs.Button.ToString()); // displays the name of the button I clicked //MessageBox.Show(button1.Name.ToString()); // changes the text of the button //if (button1.Text == "I've changed") //{ // button1.Text = "Hey, I'm old right now!"; //} else //button1.Text = "I've changed"; try { Tranche tranche = readTranche(); InvestmentPlan plan = EasySolve.solve(tranche); //var plan = tranche.assets[0].profit.ToString() + " " + tranche.assets[0].prob.ToString(); this.answerBox.Text = plan.GetFinalProfit().ToString(ci); /* * foreach (var asset in tranche.assets) * { * assetsGrid.Rows.Add( * asset.profit.ToString(ci), asset.prob.ToString(ci)); * } * assetsGrid.Visible = true; */ this.answerGridView.Rows.Clear(); foreach (var x in plan.Plan) { this.answerGridView.Rows.Add(x.Item1.ToString(ci), x.Item2.ToString()); } setRowNumber(this.answerGridView); this.answerGridView.Visible = true; this.answerBox.TabStop = false; this.tabControl1.SelectedTab = this.tabPage2; this.tabPage2.Visible = true; } catch (Exception ex) { } }