コード例 #1
0
ファイル: StartForm.cs プロジェクト: erikprat61/Stocks
 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();
 }
コード例 #2
0
ファイル: StartForm.cs プロジェクト: erikprat61/Stocks
 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;
 }