-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDividendTable.cs
More file actions
37 lines (32 loc) · 1.07 KB
/
Copy pathDividendTable.cs
File metadata and controls
37 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Forward_Calculator {
///control that allows user to enter dividend predictions along with frequency
public partial class DividendTable : UserControl {
public DividendTable() {
InitializeComponent();
Init();
}
///starting function that sets all the colours
void Init() {
this.BackColor = Colours.background;
// for(int i = 0; i < this.Controls.Count; i++) {
// this.Controls[i].BackColor = Colours.foreground;
// this.Controls[i].ForeColor = Colours.primaryText;
// }
}
void TextChanged(object sender, EventArgs e) {
DividendPrediction[] _dividends = new DividendPrediction[txtb_Amount.Lines.Length];
try {
for(int i = 0; i < _dividends.Length; i++)
_dividends[i] = new DividendPrediction(Convert.ToSingle(txtb_Prediction.Lines[i]) , Convert.ToSingle(txtb_Amount.Lines[i]));
//MainForm.Instance.dividends = _dividends;
}
catch(Exception exc) {
//MessageBox.Show(exc.Message); used for bug fixing
};
}
}
}