/// <summary> /// 获取模板信息 /// </summary> /// <param name="template">模板信息</param> public void GetTemplate(ref SecurityFilterTemplate template) { TextBoxA txtName = GetTextBox("txtName"); TextBoxA txtIndicator = GetTextBox("txtIndicator"); TextBoxA txtParameters = GetTextBox("txtParameters"); ComboBoxA cbCycle = GetComboBox("cbCycle"); ComboBoxA cbSubscription = GetComboBox("cbSubscription"); TextBoxA txtFilter = GetTextBox("txtFilter"); if (m_template.m_templateID != null && m_template.m_templateID.Length > 0) { template.m_templateID = m_template.m_templateID; } template.m_name = txtName.Text; template.m_indicator = txtIndicator.Text; template.m_parameters = txtParameters.Text; if (cbCycle.SelectedValue != null) { template.m_cycle = CStrA.ConvertStrToInt(cbCycle.SelectedValue); } else { template.m_cycle = 1440; } template.m_subscription = cbSubscription.SelectedIndex; template.m_filter = txtFilter.Text; template.m_codes = m_codes; template.m_userID = DataCenter.UserID; }
public override void OnKeyDown(char key) { if (key >= 49 && key <= 57) { int index = CStrA.ConvertStrToInt(key.ToString()) - 1; GridIconCell iconCell = GetRow(1).GetCell(index) as GridIconCell; iconCell.KeyPress = true; String macroID = iconCell.ID; Macro macro = new Macro(); if (m_macroService.GetMacroByID(macroID, ref macro)) { m_macroService.Run(macro); } Invalidate(); iconCell.KeyPress = false; } }