コード例 #1
0
        private void MenuItemChartManagerClickHandler(object sender, EventArgs e)
        {
            frm_chartManager newMDIchild = new frm_chartManager();

            newMDIchild.MdiParent = this;
            newMDIchild.Show();
        }
コード例 #2
0
ファイル: DataBase.cs プロジェクト: koryakinp/NETproject
        public static bool addNewChart(ArrayList candles, String ChartName, String username)
        {
            try
            {
                OracleConnection  oc  = new OracleConnection(strConnectionString);
                OracleDataAdapter da  = new OracleDataAdapter();
                frm_chartManager  frm = (frm_chartManager)Application.OpenForms["frm_chartManager"];

                int    curPercent = 0;
                double value;
                oc.Open();
                da.InsertCommand = new OracleCommand("INSERT INTO CHARTS VALUES(:OPEN, :HIGH, :LOW, :CLOSE, :DATETIME, :SYMBOL, :USERNAME)", oc);
                for (int i = 0; i < candles.Count; i++)
                {
                    Candle candle = (Candle)candles[i];
                    da.InsertCommand.Parameters.Clear();
                    da.InsertCommand.Parameters.Add("OPEN", OracleDbType.Double).Value        = candle.Open;
                    da.InsertCommand.Parameters.Add("HIGH", OracleDbType.Double).Value        = candle.High;
                    da.InsertCommand.Parameters.Add("LOW", OracleDbType.Double).Value         = candle.Low;
                    da.InsertCommand.Parameters.Add("CLOSE", OracleDbType.Double).Value       = candle.Close;
                    da.InsertCommand.Parameters.Add("DATETIME", OracleDbType.TimeStamp).Value = candle.DateTime;
                    da.InsertCommand.Parameters.Add("SYMBOL", OracleDbType.Varchar2).Value    = ChartName;
                    da.InsertCommand.Parameters.Add("USERNAME", OracleDbType.Varchar2).Value  = User.curUsername;
                    da.InsertCommand.ExecuteNonQueryAsync();
                    value = ((double)i / (double)candles.Count) * 100;
                    if (value >= curPercent)
                    {
                        curPercent++;
                        frm.IncrementProgressBar();
                    }
                }
                oc.Close();
                return(true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return(false);
            }
        }
コード例 #3
0
ファイル: frm_mainForm.cs プロジェクト: koryakinp/NETproject
 private void MenuItemChartManagerClickHandler(object sender, EventArgs e)
 {
     frm_chartManager newMDIchild = new frm_chartManager();
     newMDIchild.MdiParent = this;
     newMDIchild.Show();
 }
コード例 #4
0
ファイル: frm_mainForm.cs プロジェクト: koryakinp/NETproject
 private void ChartManagerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frm_chartManager frm = new frm_chartManager();
     frm.ShowDialog();
 }
コード例 #5
0
        private void ChartManagerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_chartManager frm = new frm_chartManager();

            frm.ShowDialog();
        }