예제 #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            var strategyFilter = new StrategyFilter();

            strategyFilter.Days    = Day;
            strategyFilter.Sensors = Sensors;
            var str      = UXmlConvert.GetString(strategyFilter);
            var filename = UWorkspace.GetStrategyXmlName(_wksdef);

            UIO.SaveFile(str, filename);

            DialogResult = DialogResult.OK;
            Close();
        }
예제 #2
0
        public void Init(WorkspaceDef wksdef)
        {
            _wksdef = wksdef;
            var strategyFilter = UWorkspace.StrategyFilter(wksdef);

            for (int i = 0; i < checkedListBox1.Items.Count; i++)
            {
                var item  = checkedListBox1.Items[i].ToString();
                var check = strategyFilter.Sensors.Contains(item);
                checkedListBox1.SetItemChecked(i, check);
            }

            numericUpDown1.Value = Convert.ToDecimal(strategyFilter.Days);
        }
예제 #3
0
 private void GetStrategyFilter(WorkspaceDef wksdef)
 {
     StrategyFilter = UWorkspace.StrategyFilter(wksdef);
 }