Пример #1
0
        public static void InitB2B()
        {
            b2bclient.Program.Main(null);

            b2bclient.Program.frmMsg += (str) =>
            {
                MsgForm.ShowFrom(str);
            };

            b2bclient.Program.frmMsgYesNo += (str) =>
            {
                return(YesNoForm.ShowFrom(str));
            };
        }
Пример #2
0
        //关闭时清理进程
        protected override void OnClosing(CancelEventArgs e)
        {
            YesNoForm frm = new YesNoForm("确定退出系统吗?");

            if (frm.ShowDialog() == DialogResult.Yes)
            {
                e.Cancel = false;

                Application.ExitThread();
                System.Environment.Exit(0);
            }
            else
            {
                e.Cancel = true;
            }
        }
Пример #3
0
        public static DialogResult ShowFrom(string text)
        {
            YesNoForm frm = new YesNoForm(text);

            return(frm.ShowDialog());
        }