Exemple #1
0
        void Spider_ContentsSaved(string path, string url)
        {
            CSHandler h = (p, u) =>
            {
                ListDownload.Items.Add(new { Url = u, File = p });
            };

            Dispatcher.Invoke(h, path, url);
        }
        void Spider_ContentsSaved(string status, string url)
        {
            CSHandler h = (p, u) =>
            {
                ListDownload.Items.Add(new { Url = u, Status = status });
            };

            Dispatcher.Invoke(h, status, url);
        }
Exemple #3
0
        /// <summary>
        /// 保存内容的委托方法
        /// </summary>
        /// <param name="path"></param>
        /// <param name="url"></param>
        private void Spider_ContentsSaved(string path, string url)
        {
            CSHandler handler = (c, s) =>
            {
                ListDownload.Items.Add(new { File = path, Url = url });
            };

            Dispatcher.Invoke(handler, path, url);
        }
Exemple #4
0
        void Spider_ContentsSaved(string path, string url)
        {
            //ListDownload.Items.Add(new { Url = u, File = p });
            CSHandler h = (p, u) =>
            {
                ListDownload.Items.Add(new ListViewItem(new string[] { url, path }));
            };

            Dispatcher.CurrentDispatcher.Invoke(h, path, url);
        }
        void SaveDownLoad(string path, string url)
        {
            // showListUrl.Items.Add(path+url);
            CSHandler h = (p) =>
            {
                showListUrl.Items.Add(new { File = p });
            };

            this.Invoke(h, path);
            // Dispatcher.Invoke(h, path, url);
        }
Exemple #6
0
        void Spider_ContentsSaved(string path, string url)
        //void Spider_ContentsSaved(string path, string url)
        {
            //CSHandler h = (p, u, d) =>
            CSHandler h = (p, u) =>
            {
                ListDownload.Items.Add(new { Url = u, File = p });
                //ListDownload.Items.Add(new { Url = u, File = p, DataName = datan, DataUrl = datau });
            };

            Dispatcher.Invoke(h, path, url);
        }
Exemple #7
0
 public void AddCSHandler(int msg_id, CSHandler handler)
 {
     this.dispatcher.AddCSHandler(msg_id, handler);
 }
Exemple #8
0
 public void AddCSHandler(int msg_id, CSHandler handler)
 {
     this.AddHandler(msg_id, delegate(IMessage protocol, int connect_id, int addition, List <int> player_id_list) {
         handler(protocol, connect_id, addition);
     });
 }