/// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmWalletQueryAndOperate_Load(object sender, EventArgs e) { #region 固定 //基类.工具栏(动作,导航) base.ToolBarActionAndNavigate = toolBarActionAndNavigate; //基类.工具栏(翻页) base.ToolBarPaging = toolBarManagerListTabPaging; //查询委托(基类控制翻页用) base.ExecuteQuery = QueryAction; //工具栏(动作)单击事件 this.toolBarActionAndNavigate.ToolClick += new ToolClickEventHandler(base.toolBarActionAndNavigate_ToolClick); //工具栏(翻页)单击事件 this.toolBarManagerListTabPaging.ToolClick += new ToolClickEventHandler(base.ToolBarPaging_ToolClick); //工具栏(翻页)[当前页]值改变事件 this.toolBarManagerListTabPaging.ToolValueChanged += new ToolEventHandler(base.ToolBarPaging_ToolValueChanged); #region 设置页面大小文本框 TextBoxTool pageSizeOfListTextBox = null; foreach (var loopToolControl in this.toolBarManagerListTabPaging.Tools) { if (loopToolControl.Key == SysConst.EN_PAGESIZE) { pageSizeOfListTextBox = (TextBoxTool)loopToolControl; } } if (pageSizeOfListTextBox != null) { pageSizeOfListTextBox.Text = PageSize.ToString(); pageSizeOfListTextBox.AfterToolExitEditMode += PageSizeTextBoxTool_AfterToolExitEditMode; } #endregion //初始化【详情】Tab内控件 InitializeDetailTabControls(); //初始化【列表】Tab内控件 InitializeListTabControls(); //根据选中的Tab,设置动作按钮[是否可用](在系统权限的基础上进行控制) base.SetActionEnableBySelectedTab(SysConst.EN_LIST); #endregion //导航按钮[充值]可用 SetNavigateVisiableAndEnable(SystemNavigateEnum.Code.DEPOSITMONEY, true, true); SetCardCtrlsToDetailDS(); //将最新的值Copy到初始UIModel AcceptUIModelChanges(); #region 界面发生变化时不予检查的属性值 _skipPropertyList.Add("CustomerPhoneNo"); _skipPropertyList.Add("AutoFactoryName"); #endregion }
private void InitTreeHandlers(SmartTreeView treeview) { List <SmartItem> itemList = FlattenTree(treeview.Items.GetFirstItem(SmartItemState.Any)); foreach (SmartItem item in itemList) { item.Click += new SmartItemClickEventHandler(item_Click); if (item is TextBoxTool) { TextBoxTool tb = (TextBoxTool)item; tb.VirtualTextBox.TextChanged += new EventHandler(VirtualTextBox_TextChanged); } } }
/// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmCodeTableManager_Load(object sender, EventArgs e) { #region 固定 //基类.工具栏(动作) base.ToolBarActionAndNavigate = toolBarActionAndNavigate; //基类.工具栏(翻页) base.ToolBarPaging = toolBarPaging; //查询委托(基类控制翻页用) base.ExecuteQuery = QueryAction; //工具栏(动作)单击事件 this.toolBarActionAndNavigate.ToolClick += new ToolClickEventHandler(base.toolBarActionAndNavigate_ToolClick); //工具栏(翻页)单击事件 this.toolBarPaging.ToolClick += new ToolClickEventHandler(base.ToolBarPaging_ToolClick); //工具栏(翻页)[当前页]值改变事件 this.toolBarPaging.ToolValueChanged += new ToolEventHandler(base.ToolBarPaging_ToolValueChanged); #region 设置页面大小文本框 TextBoxTool pageSizeOfListTextBox = null; foreach (var loopToolControl in this.toolBarPaging.Tools) { if (loopToolControl.Key == SysConst.EN_PAGESIZE) { pageSizeOfListTextBox = (TextBoxTool)loopToolControl; } } if (pageSizeOfListTextBox != null) { pageSizeOfListTextBox.Text = PageSize.ToString(); pageSizeOfListTextBox.AfterToolExitEditMode += PageSizeTextBoxTool_AfterToolExitEditMode; } #endregion //初始化【详情】Tab内控件 InitializeDetailTabControls(); //初始化【列表】Tab内控件 InitializeListTabControls(); //设置【列表】Tab为选中状态 tabControlFull.Tabs[SysConst.EN_LIST].Selected = true; //根据选中的Tab,设置动作按钮[是否可用](在系统权限的基础上进行控制) base.SetActionEnableBySelectedTab(SysConst.EN_LIST); #endregion SetCardCtrlsToDetailDS(); //将最新的值Copy到初始UIModel AcceptUIModelChanges(); #region 界面发生变化时不予检查的属性值 _skipPropertyList.Add("Enum_DisplayName"); #endregion }
/// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmPurchaseForecastOrderQuery_Load(object sender, EventArgs e) { #region 固定 //基类.工具栏(动作,导航) base.ToolBarActionAndNavigate = toolBarActionAndNavigate; //基类.工具栏(翻页) base.ToolBarPaging = toolBarManagerListTabPaging; //查询委托(基类控制翻页用) base.ExecuteQuery = QueryAction; //工具栏(动作)单击事件 this.toolBarActionAndNavigate.ToolClick += new ToolClickEventHandler(base.toolBarActionAndNavigate_ToolClick); //工具栏(翻页)单击事件 this.toolBarManagerListTabPaging.ToolClick += new ToolClickEventHandler(base.ToolBarPaging_ToolClick); //工具栏(翻页)[当前页]值改变事件 this.toolBarManagerListTabPaging.ToolValueChanged += new ToolEventHandler(base.ToolBarPaging_ToolValueChanged); #region 设置页面大小文本框 TextBoxTool pageSizeOfListTextBox = null; foreach (var loopToolControl in this.toolBarManagerListTabPaging.Tools) { if (loopToolControl.Key == SysConst.EN_PAGESIZE) { pageSizeOfListTextBox = (TextBoxTool)loopToolControl; } } if (pageSizeOfListTextBox != null) { pageSizeOfListTextBox.Text = PageSize.ToString(); pageSizeOfListTextBox.AfterToolExitEditMode += PageSizeTextBoxTool_AfterToolExitEditMode; } #endregion //初始化【详情】Tab内控件 InitializeDetailTabControls(); //初始化【列表】Tab内控件 InitializeListTabControls(); //根据选中的Tab,设置动作按钮[是否可用](在系统权限的基础上进行控制) base.SetActionEnableBySelectedTab(SysConst.EN_LIST); #endregion //给下拉框赋值 SetToComboEditor(); //设置删除按钮是否可用 if (tabControlFull.Tabs[SysConst.EN_LIST].Selected) { SetActionEnable(SystemActionEnum.Code.DELETE, false); } }
private void toolbarsManager_ToolKeyPress(object sender, Infragistics.Win.UltraWinToolbars.ToolKeyPressEventArgs e) { switch (e.Tool.Key) { case "mnuFindField": if (e.KeyChar == 0x0D) { ComboBoxTool cbt = (e.Tool as ComboBoxTool); editor.FindNext(cbt.Text, false, false, false); bool found = false; for (int i = 0; i < cbt.ValueList.ValueListItems.Count; i++) { if (cbt.ValueList.ValueListItems[i].DisplayText.Equals(cbt.Text)) { found = true; break; } } if (!found) { cbt.ValueList.ValueListItems.Add(cbt.Text); } } break; case "mnuGotoLine": if (e.KeyChar == 0x0D) { int lineNum = 1; TextBoxTool tbt = (e.Tool as TextBoxTool); int.TryParse(tbt.Text, out lineNum); editor.GotoLine(lineNum - 1); editor.Focus(); } break; default: break; } }
/// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmOrganizationManagerTest_Load(object sender, EventArgs e) { #region 固定 //基类.工具栏(动作,导航) base.ToolBarActionAndNavigate = toolBarActionAndNavigate; //基类.工具栏(翻页) base.ToolBarPaging = toolBarManagerListTabPaging; //查询委托(基类控制翻页用) base.ExecuteQuery = QueryAction; //工具栏(动作)单击事件 this.toolBarActionAndNavigate.ToolClick += new ToolClickEventHandler(base.toolBarActionAndNavigate_ToolClick); //工具栏(翻页)单击事件 this.toolBarManagerListTabPaging.ToolClick += new ToolClickEventHandler(base.ToolBarPaging_ToolClick); //工具栏(翻页)[当前页]值改变事件 this.toolBarManagerListTabPaging.ToolValueChanged += new ToolEventHandler(base.ToolBarPaging_ToolValueChanged); #region 设置页面大小文本框 TextBoxTool pageSizeOfList = null; foreach (var loopToolControl in this.toolBarManagerListTabPaging.Tools) { if (loopToolControl.Key == SysConst.EN_PAGESIZE) { pageSizeOfList = (TextBoxTool)loopToolControl; } } if (pageSizeOfList != null) { pageSizeOfList.Text = PageSize.ToString(); pageSizeOfList.AfterToolExitEditMode += PageSizeTextBoxTool_AfterToolExitEditMode; } #endregion //初始化【详情】Tab内控件 InitializeDetailTabControls(); //初始化【列表】Tab内控件 InitializeListTabControls(); //根据选中的Tab,设置动作按钮[是否可用](在系统权限的基础上进行控制) base.SetActionEnableBySelectedTab(SysConst.EN_LIST); #endregion }
/// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmAFOrgVehicleBrandInspireQuery_Load(object sender, EventArgs e) { #region 固定 //基类.工具栏(动作,导航) base.ToolBarActionAndNavigate = toolBarActionAndNavigate; //基类.工具栏(翻页) base.ToolBarPaging = toolBarPaging; //查询委托(基类控制翻页用) base.ExecuteQuery = QueryAction; //工具栏(动作)单击事件 this.toolBarActionAndNavigate.ToolClick += new ToolClickEventHandler(base.toolBarActionAndNavigate_ToolClick); //工具栏(翻页)单击事件 this.toolBarPaging.ToolClick += new ToolClickEventHandler(base.ToolBarPaging_ToolClick); //工具栏(翻页)[当前页]值改变事件 this.toolBarPaging.ToolValueChanged += new ToolEventHandler(base.ToolBarPaging_ToolValueChanged); #region 设置页面大小文本框 TextBoxTool pageSizeOfListTextBox = null; foreach (var loopToolControl in this.toolBarPaging.Tools) { if (loopToolControl.Key == SysConst.EN_PAGESIZE) { pageSizeOfListTextBox = (TextBoxTool)loopToolControl; } } if (pageSizeOfListTextBox != null) { pageSizeOfListTextBox.Text = PageSize.ToString(); pageSizeOfListTextBox.AfterToolExitEditMode += PageSizeTextBoxTool_AfterToolExitEditMode; } #endregion //初始化 InitializeListTabControls(); #endregion }
public List <string> GetMetaDataFromTree(SmartTreeView treeview, out string quickName) { List <string> metadata = new List <string>(); StringWriter b = new StringWriter(); List <SmartItem> itemList = FlattenTree(treeview.Items.GetFirstItem(SmartItemState.Any)); string tagName = ""; string mainName = ""; quickName = ""; foreach (SmartItem item in itemList) { if (item is CheckedListBoxItem) { if (((CheckedListBoxItem)item).Checked == true) { metadata.Add(item.Tag.ToString()); } } if (item is RadioButtonNode) { if (((RadioButtonNode)item).Checked == true) { metadata.Add(item.Tag.ToString()); mainName = item.Tag.ToString(); } } if (item is TextBoxTool) { if (((TextBoxTool)item).Text != "") { TextBoxTool tb = (TextBoxTool)item; if (tb.VirtualTextBox.Text != "") { metadata.Add(tb.VirtualTextBox.Text.ToString()); if (tb.Text == "Tag") { tagName = tb.VirtualTextBox.Text; } } } } } //build a quickname int names = 0; int maxNames = 4; if (tagName != "") { quickName += tagName; names++; } if (mainName != "") { quickName += mainName; names++; } foreach (string s in metadata) { if (names <= maxNames && s != tagName && s != mainName) { quickName += s; names++; } } return(metadata); }
/// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmOrgAndOrgAmountTransReport_Load(object sender, EventArgs e) { #region 固定 //基类.工具栏(动作) base.ToolBarActionAndNavigate = toolBarActionAndNavigate; //工具栏(翻页) base.ToolBarPaging = this.toolBarPagingTotal; ToolBarPagingOfTotal = this.toolBarPagingTotal; ToolBarPagingOfDetail = this.toolBarPagingDetail; //查询委托(基类控制翻页用) base.ExecuteQuery = QueryAction; //工具栏(动作)单击事件 this.toolBarActionAndNavigate.ToolClick += new ToolClickEventHandler(base.toolBarActionAndNavigate_ToolClick); //工具栏(翻页)单击事件 this.toolBarPagingTotal.ToolClick += new ToolClickEventHandler(ToolBarPaging_ToolClick); this.toolBarPagingDetail.ToolClick += new ToolClickEventHandler(ToolBarPaging_ToolClick); //工具栏(翻页)[当前页]值改变事件 this.toolBarPagingTotal.ToolValueChanged += new ToolEventHandler(ToolBarPaging_ToolValueChanged); this.toolBarPagingDetail.ToolValueChanged += new ToolEventHandler(ToolBarPaging_ToolValueChanged); //设置总页数 SetTotalPageCountAndTotalRecordCountOfTotal(0); SetTotalPageCountAndTotalRecordCountOfDetail(0); #region 设置页面大小文本框 TextBoxTool pageSizeOfTotalTextBox = null; foreach (var loopToolControl in this.toolBarPagingTotal.Tools) { if (loopToolControl.Key == SysConst.EN_PAGESIZE) { pageSizeOfTotalTextBox = (TextBoxTool)loopToolControl; } } if (pageSizeOfTotalTextBox != null) { pageSizeOfTotalTextBox.Text = PageSizeOfTotal.ToString(); pageSizeOfTotalTextBox.AfterToolExitEditMode += PageSizeTextBoxTool_AfterToolExitEditMode; } TextBoxTool pageSizeOfDetailTextBox = null; foreach (var loopToolControl in this.toolBarPagingDetail.Tools) { if (loopToolControl.Key == SysConst.EN_PAGESIZE) { pageSizeOfDetailTextBox = (TextBoxTool)loopToolControl; } } if (pageSizeOfDetailTextBox != null) { pageSizeOfDetailTextBox.Text = PageSizeOfDetail.ToString(); pageSizeOfDetailTextBox.AfterToolExitEditMode += PageSizeTextBoxTool_AfterToolExitEditMode; } #endregion //初始化【列表】Tab内控件 InitializeListTabControls(); //设置【列表】Tab为选中状态 tabControlFull.Tabs[SysConst.EN_LIST].Selected = true; //根据选中的Tab,设置动作按钮[是否可用](在系统权限的基础上进行控制) var exportEnable = MenuGroupActionList.FirstOrDefault(x => x.Act_Key == SystemActionEnum.Code.EXPORT) != null ? true : false; SetActionEnable(SystemActionEnum.Code.EXPORT, exportEnable); SetActionEnable(SystemActionEnum.Code.QUERY, true); #endregion }
/// <summary> /// Goes through the dialog with the dark mage to repair runecrafting pouches /// </summary> /// <returns>true if successful</returns> public bool RepairPouches(TextBoxTool textBox) { Mouse.LeftClick(Left + 240, Top + 102, 10); BotProgram.SafeWait(NPC_CONTACT_CAST_TIME); return(textBox.ClickThroughTextScreens(4, 5000)); }