Beispiel #1
0
        private void OpenScheduleDialog(ConditionSchedule sch)
        {
            FormOpenSchedule form = new FormOpenSchedule(sch);

            if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.ScheduleGridView.FocusedRowHandle >= 0)
                {
                    AdvBandedGridView view = Context.Condition.Control.ScheduleGridView;
                    ConditionSchedule row  = Context.Condition.Schedules[view.FocusedRowHandle];

                    form.standardEdit.Focus();
                    SetScheduleByForm(row, form);

                    view.RefreshData();
                    Context.Condition.Control.noteCompanyEdit.Focus();
                    view.Focus();
                }
            }
        }
Beispiel #2
0
        private void SetScheduleByForm(ConditionSchedule sch, FormOpenSchedule form)
        {
            sch.Standard   = form.standardEdit.Text;
            sch.Name       = form.nameEdit.Text;
            sch.NoOfSteady = int.Parse(form.noSteadyEdit.Text);
            sch.PreRun     = int.Parse(form.preparationEdit.Text);
            sch.Judge      = int.Parse(form.judgementEdit.Text);
            sch.Repeat     = int.Parse(form.repeatEdit.Text);

            sch.Indoor1Use         = form.Chambers[0].Indoor1Use;
            sch.Indoor1Mode1       = form.Chambers[0].Indoor1Mode1;
            sch.Indoor1Duct1       = form.Chambers[0].Indoor1Duct1;
            sch.Indoor1Mode2       = form.Chambers[0].Indoor1Mode2;
            sch.Indoor1Duct2       = form.Chambers[0].Indoor1Duct2;
            sch.Indoor1DB          = float.Parse(form.id1EdbSetupEdit.Text);
            sch.Indoor1DBAvg       = float.Parse(form.id1EdbAvgEdit.Text);
            sch.Indoor1DBDev       = float.Parse(form.id1EdbDevEdit.Text);
            sch.Indoor1WB          = float.Parse(form.id1EwbSetupEdit.Text);
            sch.Indoor1WBAvg       = float.Parse(form.id1EwbAvgEdit.Text);
            sch.Indoor1WBDev       = float.Parse(form.id1EwbDevEdit.Text);
            sch.Indoor1LDB1Dev     = float.Parse(form.id1Ldb1DevEdit.Text);
            sch.Indoor1LWB1Dev     = float.Parse(form.id1Lwb1DevEdit.Text);
            sch.Indoor1AirFlow1Dev = float.Parse(form.id1Airflow1DevEdit.Text);
            sch.Indoor1LDB2Dev     = float.Parse(form.id1Ldb2DevEdit.Text);
            sch.Indoor1LWB2Dev     = float.Parse(form.id1Lwb2DevEdit.Text);
            sch.Indoor1AirFlow2Dev = float.Parse(form.id1Airflow2DevEdit.Text);
            sch.Indoor1CP1         = float.Parse(form.id1Cdp1SetupEdit.Text);
            sch.Indoor1CP1Avg      = float.Parse(form.id1Cdp1AvgEdit.Text);
            sch.Indoor1CP1Dev      = float.Parse(form.id1Cdp1DevEdit.Text);
            sch.Indoor1CP2         = float.Parse(form.id1Cdp2SetupEdit.Text);
            sch.Indoor1CP2Avg      = float.Parse(form.id1Cdp2AvgEdit.Text);
            sch.Indoor1CP2Dev      = float.Parse(form.id1Cdp2DevEdit.Text);

            sch.Indoor2Use         = form.Chambers[0].Indoor2Use;
            sch.Indoor2Mode1       = form.Chambers[0].Indoor2Mode1;
            sch.Indoor2Duct1       = form.Chambers[0].Indoor2Duct1;
            sch.Indoor2Mode2       = form.Chambers[0].Indoor2Mode2;
            sch.Indoor2Duct2       = form.Chambers[0].Indoor2Duct2;
            sch.Indoor2DB          = float.Parse(form.id2EdbSetupEdit.Text);
            sch.Indoor2DBAvg       = float.Parse(form.id2EdbAvgEdit.Text);
            sch.Indoor2DBDev       = float.Parse(form.id2EdbDevEdit.Text);
            sch.Indoor2WB          = float.Parse(form.id2EwbSetupEdit.Text);
            sch.Indoor2WBAvg       = float.Parse(form.id2EwbAvgEdit.Text);
            sch.Indoor2WBDev       = float.Parse(form.id2EwbDevEdit.Text);
            sch.Indoor2LDB1Dev     = float.Parse(form.id2Ldb1DevEdit.Text);
            sch.Indoor2LWB1Dev     = float.Parse(form.id2Lwb1DevEdit.Text);
            sch.Indoor2AirFlow1Dev = float.Parse(form.id2Airflow1DevEdit.Text);
            sch.Indoor2LDB2Dev     = float.Parse(form.id2Ldb2DevEdit.Text);
            sch.Indoor2LWB2Dev     = float.Parse(form.id2Lwb2DevEdit.Text);
            sch.Indoor2AirFlow2Dev = float.Parse(form.id2Airflow2DevEdit.Text);
            sch.Indoor2CP1         = float.Parse(form.id2Cdp1SetupEdit.Text);
            sch.Indoor2CP1Avg      = float.Parse(form.id2Cdp1AvgEdit.Text);
            sch.Indoor2CP1Dev      = float.Parse(form.id2Cdp1DevEdit.Text);
            sch.Indoor2CP2         = float.Parse(form.id2Cdp2SetupEdit.Text);
            sch.Indoor2CP2Avg      = float.Parse(form.id2Cdp2AvgEdit.Text);
            sch.Indoor2CP2Dev      = float.Parse(form.id2Cdp2DevEdit.Text);

            sch.OutdoorUse      = form.Chambers[0].OutdoorUse;
            sch.OutdoorDpSensor = form.Chambers[0].OutdoorDpSensor;
            sch.OutdoorAutoVolt = form.Chambers[0].OutdoorAutoVolt;
            sch.OutdoorDB       = float.Parse(form.odEdbSetupEdit.Text);
            sch.OutdoorDBAvg    = float.Parse(form.odEdbAvgEdit.Text);
            sch.OutdoorDBDev    = float.Parse(form.odEdbDevEdit.Text);
            sch.OutdoorWB       = float.Parse(form.odEwbSetupEdit.Text);
            sch.OutdoorWBAvg    = float.Parse(form.odEwbAvgEdit.Text);
            sch.OutdoorWBDev    = float.Parse(form.odEdpDevEdit.Text);
            sch.OutdoorDP       = float.Parse(form.odEdpSetupEdit.Text);
            sch.OutdoorDPAvg    = float.Parse(form.odEdpAvgEdit.Text);
            sch.OutdoorDPDev    = float.Parse(form.odEdpDevEdit.Text);
            sch.OutdoorVolt1    = float.Parse(form.odVolt1SetupEdit.Text);
            sch.OutdoorVolt1Avg = float.Parse(form.odVolt1AvgEdit.Text);
            sch.OutdoorVolt1Dev = float.Parse(form.odVolt1DevEdit.Text);
            sch.OutdoorVolt2    = float.Parse(form.odVolt2SetupEdit.Text);
            sch.OutdoorVolt2Avg = float.Parse(form.odVolt2AvgEdit.Text);
            sch.OutdoorVolt2Dev = float.Parse(form.odVolt2DevEdit.Text);
        }