示例#1
0
        /// <summary>
        /// 工具菜单单击事件处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdTool_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {

            if (e.Item.Tag != null)
            {
                Cursor currentCursor = Cursor.Current;
                Cursor.Current = Cursors.WaitCursor;



                //退出按钮
                if (e.Link.Item.Tag.ToString() == "Exit")
                {
                    //common._its_accessdb = null;
                    if (XtraMsgBox.Show("[" + this.Text + "]?", this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.Cancel)
                        return;

                    this.Close();
                    return;
                }

                //安装按钮处理
                if (e.Link.Item.Tag.ToString() == "frmSetup")
                {
                    frmSetting frmSetup = new frmSetting();
                    frmSetup.ShowDialog();
                    frmSetup = null;
                    return;
                }


                //关于

                if (e.Link.Item.Tag.ToString() == "frmAbout")
                {
                    return;
                }

                //帮助文档
                if (e.Link.Item.Tag.ToString().IndexOf("help") >= 0)
                {
                    try
                    {

                        System.Diagnostics.Process process = new System.Diagnostics.Process();
                        process.StartInfo.FileName = Common.GetSolutionPath(Application.StartupPath) + e.Link.Item.Tag.ToString() + ".pdf";
                        process.StartInfo.Verb = "Open";
                        process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
                        process.Start();
                        return;
                    }
                    catch (Exception ex)
                    {
                        XtraMsgBox.Show(ex.ToString(), "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }

                if (!CheckExistsForm(e.Item.Tag.ToString().ToString()))
                {
                    ShowForm(e.Link.Item.Tag.ToString());
                }

                Cursor.Current = currentCursor;
            }

        }
示例#2
0
文件: Main.cs 项目: zly071948/SAS
 private void buttonItem4_Click(object sender, EventArgs e)
 {
     fm = this;
     frmSetting fs = new frmSetting();
     fs.ShowDialog();
 }
示例#3
0
        private void tsSetting_Click(object sender, EventArgs e)
        {
            frmSetting setting = new frmSetting();

            setting.ShowDialog();
        }