Ejemplo n.º 1
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            //Store.Default.suggestData = cbSuggest.Checked;
            Store.Default.autoSync     = cbAutoSync.Checked;
            Store.Default.backupData   = cbBackupData.Checked;
            Store.Default.fastStart    = cbFast.Checked;
            Store.Default.daysToFinish = Convert.ToInt32(npdComplet.Value);

            UpdateDepartmentHours();

            Store.Default.downloadSource     = txtDownloadSource.Text;
            Store.Default.updateCheckRuntime = cbUpdateRuntime.Checked;

            Store.Default.Save();

            SaveDepartments();
            SaveProductionEff();
            var c = new Central();

            c.GetBase();
            c.GetProductionColor();

            var table = Central.TaskList;

            dataGridView2.DataSource = table;
        }
Ejemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            var c = new Central();

            c.GetProductionColor();
            cbYearAll.Checked = false;
            if (Store.Default.sectorId != 1)
            {
                rbConfA.Visible = false;
                rbConfB.Visible = false;
                rbConfC.Visible = false;
                IsAll           = true;
                Department      = Store.Default.selDept;
            }
            else
            {
                IsAll      = true;
                Department = Store.Default.selDept;
            }

            for (var i = DateTime.Now.Year - 3; i <= DateTime.Now.Year; i++)
            {
                cboYears.Items.Add(i);
            }
            cboMonth.SelectedIndexChanged += (s, ev) =>
            {
                if (cbYearAll.Checked)
                {
                    return;
                }
                Month = cboMonth.SelectedIndex + 1;
                LoadGraph();
            };
            cboYears.SelectedIndexChanged += (s, ev) =>
            {
                Year = Convert.ToInt32(cboYears.Text);
                LoadGraph();
            };
            cboYears.SelectedIndex = cboYears.FindString(DateTime.Now.Year.ToString());
            cboMonth.SelectedIndex = DateTime.Now.Month - 1;

            base.OnLoad(e);
        }