Example #1
0
        public graph(Form parent, string filename)
        {
            InitializeComponent();
            this.MdiParent = parent;
            this.Text      = Path.GetFileNameWithoutExtension(filename);
            set            = new DataSet(filename);

            startYear.Minimum        = endYear.Minimum = set.smallestDate.Year;
            startYear.Maximum        = endYear.Maximum = set.largestDate.Year;
            startYear.Value          = set.smallestDate.Year;
            endYear.Value            = set.largestDate.Year;
            startMonth.SelectedIndex = set.smallestDate.Month - 1;
            endMonth.SelectedIndex   = set.largestDate.Month - 1;
            MonthYear_SelectedIndexChanged(null, null);
            startDay.Value = set.smallestDate.Day;
            endDay.Value   = set.largestDate.Day;

            startYear.ValueChanged          += LoadGraph;
            endYear.ValueChanged            += LoadGraph;
            startMonth.SelectedIndexChanged += LoadGraph;
            endMonth.SelectedIndexChanged   += LoadGraph;
            startDay.ValueChanged           += LoadGraph;
            endDay.ValueChanged             += LoadGraph;

            avg1Num.Maximum = avg2Num.Maximum = avg3Num.Maximum = set.largestDay - set.smallestDay;

            mode = DataSet.DrawingModes.Close;

            LoadGraph(null, null);
        }
Example #2
0
        public graph(Form parent, string filename)
        {
            InitializeComponent();
            this.MdiParent = parent;
            this.Text = Path.GetFileNameWithoutExtension(filename);
            set = new DataSet(filename);

            startYear.Minimum = endYear.Minimum = set.smallestDate.Year;
            startYear.Maximum = endYear.Maximum = set.largestDate.Year;
            startYear.Value = set.smallestDate.Year;
            endYear.Value = set.largestDate.Year;
            startMonth.SelectedIndex = set.smallestDate.Month - 1;
            endMonth.SelectedIndex = set.largestDate.Month - 1;
            MonthYear_SelectedIndexChanged(null, null);
            startDay.Value = set.smallestDate.Day;
            endDay.Value = set.largestDate.Day;

            startYear.ValueChanged += LoadGraph;
            endYear.ValueChanged += LoadGraph;
            startMonth.SelectedIndexChanged += LoadGraph;
            endMonth.SelectedIndexChanged += LoadGraph;
            startDay.ValueChanged += LoadGraph;
            endDay.ValueChanged += LoadGraph;

            avg1Num.Maximum = avg2Num.Maximum = avg3Num.Maximum = set.largestDay - set.smallestDay;

            mode = DataSet.DrawingModes.Close;

            LoadGraph(null, null);
        }
Example #3
0
 private void button_CandleSticks_Click(object sender, EventArgs e)
 {
     mode = DataSet.DrawingModes.CandleSticks;
     button_CandleSticks.Enabled = false;
     button_Close.Enabled        = button_HiLoOpenClose.Enabled = true;
     LoadGraph(sender, e);
 }
Example #4
0
 private void button_CandleSticks_Click(object sender, EventArgs e)
 {
     mode = DataSet.DrawingModes.CandleSticks;
     button_CandleSticks.Enabled = false;
     button_Close.Enabled = button_HiLoOpenClose.Enabled = true;
     LoadGraph(sender, e);
 }