protected override void OnItemClick(Paway.Forms.ToolItem item)
        {
            switch (item.Text)
            {
            case "报表":
                break;

            case "创建":
                break;

            case "记录":
                break;

            case "注册":
                break;

            case "修改密码":
                new UserPadForm().ShowDialog(this);
                break;

            case "关于我们":
                new AboutForm().ShowDialog(this);
                break;

            case "退出系统":
                OnChanged(this, new ExitEventArgs());
                break;
            }
        }
Exemple #2
0
 private void ToolEnd_ItemClick(ToolItem item, EventArgs e)
 {
     if (PagerInfo.PageCount > 0)
     {
         RefreshData(PagerInfo.PageCount);
     }
     else
     {
         RefreshData(1);
     }
 }
Exemple #3
0
 private void ToolLast_ItemClick(ToolItem item, EventArgs e)
 {
     if (PagerInfo.CurrentPageIndex > 1)
     {
         RefreshData(PagerInfo.CurrentPageIndex - 1);
     }
     else
     {
         RefreshData(1);
     }
 }
        /// <summary>
        /// 添加新按钮
        /// </summary>
        protected ToolItem NewItem(string name, string tag = null, Shortcut keys = Shortcut.None, Image image = null)
        {
            var item = new ToolItem(name, keys, image)
            {
                Tag = tag ?? name
            };

            toolBar1.Items.Add(item);
            toolBar1.TRefresh();
            return(item);
        }
 /// <summary>
 /// 其它响应
 /// </summary>
 protected void ToolBar1_ItemClick(ToolItem item, EventArgs e)
 {
     try
     {
         OnItemClick(item);
     }
     catch (Exception ex)
     {
         ex.Show();
     }
 }
Exemple #6
0
 private void ToolNext_ItemClick(ToolItem item, EventArgs e)
 {
     if (PagerInfo.CurrentPageIndex < PagerInfo.PageCount)
     {
         RefreshData(PagerInfo.CurrentPageIndex + 1);
     }
     else if (PagerInfo.PageCount < 1)
     {
         RefreshData(1);
     }
     else
     {
         RefreshData(PagerInfo.PageCount);
     }
 }
Exemple #7
0
 /// <summary>
 /// 取消Cancel
 /// </summary>
 protected void ToolCancel_ItemClick(ToolItem item, EventArgs e)
 {
     try
     {
         if (this.DialogResult == DialogResult.Cancel)
         {
             return;
         }
         if (OnCancel())
         {
             this.DialogResult = DialogResult.Cancel;
             this.Close();
         }
     }
     catch (Exception ex)
     {
         ex.Show(this);
     }
 }
Exemple #8
0
 /// <summary>
 /// 确认OK
 /// </summary>
 protected void ToolOk_ItemClick(ToolItem item, EventArgs e)
 {
     try
     {
         if (this.DialogResult == DialogResult.OK)
         {
             return;
         }
         if (OnCommit())
         {
             this.DialogResult = DialogResult.OK;
             this.Close();
         }
     }
     catch (Exception ex)
     {
         OnFailed();
         ex.Show(this);
     }
 }
Exemple #9
0
 private void ToolFirst_ItemClick(ToolItem item, EventArgs e)
 {
     RefreshData(1);
 }
 /// <summary>
 /// 按钮响应
 /// </summary>
 protected virtual void OnItemClick(ToolItem item)
 {
 }
Exemple #11
0
 private void ToolCancel_ItemClick(ToolItem item, EventArgs e)
 {
     this.states.Cancel();
 }