Exemplo n.º 1
0
        public MainForm()
        {
            InitializeComponent();

            //初始化参数
            initializeConfig();
            //启动自动更新
            checkUpdate();
            //初始化Form
            initializeForm(config);

            #if !DEBUG
            MyMessageForm mMsgForm = new MyMessageForm();
            if (string.IsNullOrWhiteSpace(tmpnotice))
                tmpnotice = "你的徽章页面有可能是大余1页的,请选择有卡挂的页面复制源码";
            mMsgForm.Show(tmpnotice, "公告", MyMessageForm.MessageButton.OK);
            #endif
        }
Exemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            //初始化参数
            initializeConfig();
            //启动自动更新
            checkUpdate();
            //初始化Form
            initializeForm(config);

#if !DEBUG
            MyMessageForm mMsgForm = new MyMessageForm();
            if (string.IsNullOrWhiteSpace(tmpnotice))
            {
                tmpnotice = "你的徽章页面有可能是大余1页的,请选择有卡挂的页面复制源码";
            }
            mMsgForm.Show(tmpnotice, "公告", MyMessageForm.MessageButton.OK);
#endif
        }
Exemplo n.º 3
0
        public void checkUpdate()
        {
            if (string.IsNullOrEmpty(config.UpdateUrl))
                config.UpdateUrl = updateUrl;

            SoftUpdate app = new SoftUpdate(config.UpdateUrl, Application.ExecutablePath, "zha7idle");
            try
            {
                MyMessageForm mMsgForm = new MyMessageForm();
                if (app.IsUpdate && mMsgForm.Show(string.Format("检查到新版本{0},是否更新?\r\n更新说明:\r\n{1}", app.NewVerson, app.UpdateHelp), "更新日志", MyMessageForm.MessageButton.YesNo) == DialogResult.Yes)
                {
                    upform = new UpdateForm(app);
                    upform.ShowDialog();
                }
                tmpnotice = app.Notice;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 4
0
        public void checkUpdate()
        {
            if (string.IsNullOrEmpty(config.UpdateUrl))
            {
                config.UpdateUrl = updateUrl;
            }

            SoftUpdate app = new SoftUpdate(config.UpdateUrl, Application.ExecutablePath, "zha7idle");

            try
            {
                MyMessageForm mMsgForm = new MyMessageForm();
                if (app.IsUpdate && mMsgForm.Show(string.Format("检查到新版本{0},是否更新?\r\n更新说明:\r\n{1}", app.NewVerson, app.UpdateHelp), "更新日志", MyMessageForm.MessageButton.YesNo) == DialogResult.Yes)
                {
                    upform = new UpdateForm(app);
                    upform.ShowDialog();
                }
                tmpnotice = app.Notice;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }