コード例 #1
0
        private void btnInfo_Click(object sender, EventArgs e)
        {
            ms.action = "update info";
            //ms.user = new User();
            //ms.user.UserName = txbUsername.Text;
            //ms.user.Password = txbPass.Text;

            frmProfile frm = new frmProfile(client, ms);

            frm.Show();
        }
コード例 #2
0
        private void btnprofile_Click(object sender, EventArgs e)
        {
            var frmprf = new frmProfile();

            foreach (DataGridViewColumn dc in DGV1.Columns)
            {
             //   frmprf.lbxPrimary.Items.Add(dc.HeaderText);
                if (!frmprf.lbxSecondary.Items.Contains(dc.HeaderText))
                {
                    frmprf.lbxPrimary.Items.Add(dc.HeaderText);

                }

            }
            if (frmprf.ShowDialog() == DialogResult.OK)
            {
                foreach (DataGridViewColumn dc in DGV1.Columns)
                {
                    this.DGV1.Columns[dc.HeaderText.Replace(" ", "")].Visible = true;
                }
                String GetProfileName = frmprf.GetProfileName();

                DataSet ds = new DataSet();
                ds.ReadXml(Application.StartupPath + Path.DirectorySeparatorChar + "Profiles" + Path.DirectorySeparatorChar + GetProfileName + ".xml");
                if (ds.Tables.Count == 0)
                {
                    return;
                }
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                     string st = ds.Tables[0].Rows[i]["Input"].ToString();
                    this.DGV1.Columns[ds.Tables[0].Rows[i]["Input"].ToString().Replace(" ","")].Visible = false;
                }
            }
            else
            {
                String GetProfileName = frmprf.GetProfileName();

                DataSet ds = new DataSet();
                ds.ReadXml(Application.StartupPath + Path.DirectorySeparatorChar + "Profiles" + Path.DirectorySeparatorChar + "MarketCol.xml");
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string st = ds.Tables[0].Rows[i]["Input"].ToString();
                    this.DGV1.Columns[ds.Tables[0].Rows[i]["Input"].ToString().Replace(" ", "")].Visible = true;
                }
            }
        }
コード例 #3
0
        private void btnprofile_Click(object sender, EventArgs e)
        {
            var frmprf = new frmProfile();

            foreach (DataGridViewColumn dc in DGV.Columns)
            {
                frmprf.lbxPrimary.Items.Add(dc.HeaderText);
                //if (!frmprf.lbxSecondary.Items.Contains(dc.HeaderText))
                //{
                //    frmprf.lbxPrimary.Items.Add(dc.HeaderText);
                //    this.DGV.Columns[dc.HeaderText].Visible = false;
                //}
                //else
                //{
                //    this.DGV.Columns[dc.HeaderText].Visible = true;
                //}
            }
            if (frmprf.ShowDialog() == DialogResult.OK)
            {
                GetProfileName = frmprf.GetProfileName();

                LoadDgcOlumns(Application.StartupPath +Path.DirectorySeparatorChar+ "Profiles" + Path.DirectorySeparatorChar + GetProfileName + ".xml");
            }
        }