Exemplo n.º 1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            try {
                ProfileTrade_Book pfltrade_book = new ProfileTrade_Book();
                // Profile_forOrderBook pfltrade_book = new Profile_forOrderBook();
                if (pfltrade_book.ShowDialog() == DialogResult.OK)
                {
                    foreach (DataGridViewColumn dc in DGV.Columns)
                    {
                        this.DGV.Columns[dc.HeaderText.Replace(" ", "")].Visible = true;
                    }
                    String GetProfileName = pfltrade_book.GetProfileName();

                    DataSet ds = new DataSet();
                    ds.ReadXml(Application.StartupPath + Path.DirectorySeparatorChar + "Trade_Profiles" + Path.DirectorySeparatorChar + GetProfileName + ".xml");
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        string st = ds.Tables[0].Rows[i]["Input"].ToString();
                        this.DGV.Columns[ds.Tables[0].Rows[i]["Input"].ToString().Replace(" ", "")].Visible = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Trade Book -  Funtion Name-  toolStripButton1_Click  " + ex.Message);
            }
        }
Exemplo n.º 2
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            try {
            ProfileTrade_Book pfltrade_book = new ProfileTrade_Book();
               // Profile_forOrderBook pfltrade_book = new Profile_forOrderBook();
            if (pfltrade_book.ShowDialog() == DialogResult.OK)
            {
                foreach (DataGridViewColumn dc in DGV.Columns)
                {
                    this.DGV.Columns[dc.HeaderText.Replace(" ", "")].Visible = true;
                }
                String GetProfileName = pfltrade_book.GetProfileName();

                DataSet ds = new DataSet();
                ds.ReadXml(Application.StartupPath + Path.DirectorySeparatorChar + "Trade_Profiles" + Path.DirectorySeparatorChar + GetProfileName + ".xml");
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string st = ds.Tables[0].Rows[i]["Input"].ToString();
                    this.DGV.Columns[ds.Tables[0].Rows[i]["Input"].ToString().Replace(" ", "")].Visible = false;
                }
            }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Trade Book -  Funtion Name-  toolStripButton1_Click  " + ex.Message);
            }
        }