public void writeProp() { String[] emplChBox = new String[9]; String[] emplWidth = new String[10]; String[] custChBox = new String[5]; String[] custWidth = new String[6]; emplChBox[0] = checkBox2.Checked.ToString(); emplChBox[1] = checkBox3.Checked.ToString(); emplChBox[2] = checkBox4.Checked.ToString(); emplChBox[3] = checkBox5.Checked.ToString(); emplChBox[4] = checkBox6.Checked.ToString(); emplChBox[5] = checkBox7.Checked.ToString(); emplChBox[6] = checkBox1.Checked.ToString(); emplChBox[7] = checkBox8.Checked.ToString(); emplChBox[8] = checkBox9.Checked.ToString(); custChBox[0] = chbCust2.Checked.ToString(); custChBox[1] = chbCust3.Checked.ToString(); custChBox[2] = chbCust4.Checked.ToString(); custChBox[3] = chbCust5.Checked.ToString(); custChBox[4] = chbCust6.Checked.ToString(); emplWidth[0] = dataGridView1.Columns[0].Width.ToString(); emplWidth[1] = dataGridView1.Columns[1].Width.ToString(); emplWidth[2] = dataGridView1.Columns[2].Width.ToString(); emplWidth[3] = dataGridView1.Columns[3].Width.ToString(); emplWidth[4] = dataGridView1.Columns[4].Width.ToString(); emplWidth[5] = dataGridView1.Columns[5].Width.ToString(); emplWidth[6] = dataGridView1.Columns[6].Width.ToString(); emplWidth[7] = dataGridView1.Columns[10].Width.ToString(); emplWidth[8] = dataGridView1.Columns[8].Width.ToString(); emplWidth[9] = dataGridView1.Columns[9].Width.ToString(); custWidth[0] = dataGridView2.Columns[0].Width.ToString(); custWidth[1] = dataGridView2.Columns[1].Width.ToString(); custWidth[2] = dataGridView2.Columns[2].Width.ToString(); custWidth[3] = dataGridView2.Columns[3].Width.ToString(); custWidth[4] = dataGridView2.Columns[4].Width.ToString(); custWidth[5] = dataGridView2.Columns[5].Width.ToString(); for (int j = 0; j < custWidth.Length; j++) { custWidth[j] = dataGridView2.Columns[j].Width.ToString(); } XMLcode x1 = new XMLcode(); x1.WriteXml(emplChBox, emplWidth, custChBox, custWidth, XmlForUpdate); }
private void Form1_Load(object sender, EventArgs e) { //TabPage tp = tabControl1.TabPages[2]; //tabControl1.TabPages.RemoveAt(2); //TabPage tp1 = tabControl1.TabPages[1]; //tabControl1.TabPages.RemoveAt(1); //tabControl1.TabPages.Insert(1, tp); gkh.HookedKeys.Add(Keys.X); gkh.HookedKeys.Add(Keys.Q); gkh.KeyUp += new KeyEventHandler(gkh_KeyUp); //e.KeyCode == Keys.Q && e.Control && e.Alt if (!File.Exists(path)) { dbc.CreateBase(); dbc.EmployeeCreateTable(); dbc.CustomerCreateTable(); dbc.InfoCreateTable(); dbc.StatusCreateTable(); } dataShow(); //this.ActiveControl = tbSearch; //logInfo(); if (!File.Exists(pathToXml)) { XMLcode xml = new XMLcode(); xml.CreateXml(); xml.CreateNodesXml(); try { writeProp(); } catch { } } Thread th1 = new Thread(LoadFromSite); th1.Start(); timerForUpd2.Interval = 60000; timerForUpd2.Tick += new EventHandler(timer_Tick2); timerForUpd2.Start(); timerForUpd.Interval = 10800000; timerForUpd.Tick += new EventHandler(timer_Tick); timerForUpd.Start(); InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(new CultureInfo("ru-RU")); VacCount(); birthDayLight(); lineColor(); }