当前位置: 首页>>代码示例>>C#>>正文


C# Form2.Update方法代码示例

本文整理汇总了C#中Form2.Update方法的典型用法代码示例。如果您正苦于以下问题:C# Form2.Update方法的具体用法?C# Form2.Update怎么用?C# Form2.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Form2的用法示例。


在下文中一共展示了Form2.Update方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: updateDB_Click

        private void updateDB_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form2 loading = new Form2();
            loading.Show();
            loading.Update();

            try {
                get10DaysData();
            }
            catch (WebException ex) {
                MessageBox.Show("O conexiune activă la internet este necesară pentru a obține cursul valutar!", "Eroare", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            loading.Hide();
            this.Show();
        }
开发者ID:paulbarbu,项目名称:moneystock,代码行数:17,代码来源:Form1.cs

示例2: Form1_Load

        private void Form1_Load(object sender, EventArgs e)
        {
            label4.Hide();

            this.Hide();
            Form2 loading = new Form2();
            loading.Show();
            loading.Update();

            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
            Dictionary<string, decimal> cRates = null;

            try {
                cRates = initData();
            }
            catch (WebException ex) {
                MessageBox.Show("O conexiune activă la internet este necesară pentru a obține cursul valutar!", "Eroare", MessageBoxButtons.OK, MessageBoxIcon.Error);

                if (!db.DBexists()) {
                    Environment.Exit(-1);
                }

                cRates = initData_wo_internet();
            }

            c.conversionRates = cRates;

            db_currencies = getDBCurrencies();
            aux = getDBCurrencies();

            int euro_pos = new int();
            int usd_pos = new int();
            int i = 0;

            comboBox1.Items.Add(RON_NAME);
            comboBox2.Items.Add(RON_NAME);

            foreach(var currency in db_currencies){
                comboBox1.Items.Add(currency.Value);
                comboBox2.Items.Add(currency.Value);
                checkedListBox1.Items.Add(currency.Value);

                s_currencies.Add(currency.Key, new Series());
                s_currencies[currency.Key].Name = currency.Key;
                s_currencies[currency.Key].ChartType = SeriesChartType.Line;

                if ("EUR" == currency.Key) {
                    euro_pos = i+1;
                }

                if ("USD" == currency.Key) {
                    usd_pos = i;
                }

                i++;
            }

            db_currencies.Add(RON, RON_NAME);

            comboBox1.SelectedIndex = euro_pos;
            comboBox2.SelectedIndex = 0;
            checkedListBox1.CheckOnClick = true;
            checkedListBox1.SetItemChecked(euro_pos - 1, true);
            checkedListBox1.SetItemChecked(usd_pos, true);

            textBox2.Text = "24";
            textBox1.Text = "1";

            dateTimePicker1.MaxDate = DateTime.Today;
            dateTimePicker2.MaxDate = DateTime.Today;
            dateTimePicker3.MaxDate = DateTime.Today;

            dateTimePicker2.Value = DateTime.Today.AddDays(-14);

            populate_chart(chart1, s_currencies["USD"], DateTime.Now, DateTime.Now.AddDays(-14));

            tabControl1.SelectedIndex = 0;
            this.Size = new System.Drawing.Size(760, 185);
            tabControl1.Size = new System.Drawing.Size(750, 175);
            statusStrip1.Visible = false;

            chart1.ChartAreas[0].AxisY.Title = RON;
            chart1.ChartAreas[0].AxisX.Title = "Data";

            chart1.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
            chart1.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;

            loading.Close();
            this.Visible = true;
        }
开发者ID:paulbarbu,项目名称:moneystock,代码行数:90,代码来源:Form1.cs


注:本文中的Form2.Update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。