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(); }
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); }
private void GetStrategyFilter(WorkspaceDef wksdef) { StrategyFilter = UWorkspace.StrategyFilter(wksdef); }