Esempio n. 1
0
        private void Rtc_onMessage(Rtc.PipeMsg obj)
        {
            if (obj.fromUrl == "重启鸭子")
            {
                System.Diagnostics.Process.Start(Application.ExecutablePath);
                Application.Exit();
                return;
            }

            Downloader.AutoDownload(obj.fromUrl, (info) =>
            {
                obj.isDownloadSuccess = info.isSuccess;
                obj.downloadUrl       = info.url;
                obj.downloadFileName  = info.fileName;
                obj.dowloadErrorInfo  = info.errMsg;
                Rtc.Send(obj);
            });
        }
Esempio n. 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     Application.ApplicationExit += Application_ApplicationExit;
     Rtc.Init();
     Rtc.onMessage += Rtc_onMessage;
 }