예제 #1
0
        public UpdateFrm()
        {
            InitializeComponent();
            System.Diagnostics.Process[] CADPro = System.Diagnostics.Process.GetProcessesByName("acad");
            foreach (System.Diagnostics.Process Pro in CADPro)
            {
                Pro.Kill();
            }
            System.Threading.Thread.Sleep(3000);
            object pathname = YCRO.GetValue("LOADER");
            app = new SoftUpdate(pathname.ToString(), "UpdateProgram.zip");

            app.Updatetxtinfo();
            textBox1.Text = app.updateinfo;
            app.UpdateFinish += new UpdateState(app_UpdateFinish);

            if (app.IsUpdate)
            {
                label1.Text = "��ǰ�汾(" + app.currentverson + ")";
                dels invoker = new dels(app.StartDownload);
                invoker.BeginInvoke(new AsyncCallback(CallBack), null);
            }
        }
예제 #2
0
        public UpdateFrm()
        {
            InitializeComponent();
            System.Diagnostics.Process[] CADPro = System.Diagnostics.Process.GetProcessesByName("acad");
            foreach (System.Diagnostics.Process Pro in CADPro)
            {
                Pro.Kill();
            }
            System.Threading.Thread.Sleep(3000);
            object pathname = YCRO.GetValue("LOADER");

            app = new SoftUpdate(pathname.ToString(), "UpdateProgram.zip");

            app.Updatetxtinfo();
            textBox1.Text     = app.updateinfo;
            app.UpdateFinish += new UpdateState(app_UpdateFinish);

            if (app.IsUpdate)
            {
                label1.Text = "当前版本(" + app.currentverson + ")";
                dels invoker = new dels(app.StartDownload);
                invoker.BeginInvoke(new AsyncCallback(CallBack), null);
            }
        }