Exemplo n.º 1
0
 private void button_Open_Click(object sender, EventArgs e)
 {
     openFileDialog1.Filter = "Fund file (*.fund)|*.fund";
     openFileDialog1.FileName = "";
     openFileDialog1.ShowDialog();
     if (openFileDialog1.FileName == "")
         return;
      this.Hide();
     Fund fund = (Fund)Global.Util.OpenSerialized(openFileDialog1.FileName);
     FundForm fundForm = new FundForm(fund);
     fundForm.ShowDialog();
     this.Close();
 }
Exemplo n.º 2
0
 private void button_New_Click(object sender, EventArgs e)
 {
     openFileDialog1.Filter = "CSV file (*.csv)|*.csv;";
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         DateInputForm inputDate = new DateInputForm();
         inputDate.ShowDialog();
         inputDate.Dispose();
         if (inputDate.WasCancelled)
             return;
         date = inputDate.date;
         Fund fund = Fund.NewFundFromPortfolio(openFileDialog1.FileName, date);
         FundForm fundForm = new FundForm(fund);
         this.Hide();
         fundForm.ShowDialog();
         this.Close();
     }
     else
         return;
 }