コード例 #1
0
        public void PrintRequestUpdated(int request_id)
        {
            var requestindex = requestList.FindIndex(x => x.ID == request_id);

            if (requestindex == -1)
            {
                return;
            }
            var r = App.Server.GetPrintRequest(request_id);

            if (r == null)
            {
                return;
            }
            if (r.ContestID != contestID)
            {
                return;
            }
            var item = new PrintRequestListItem
            {
                ID           = r.ID,
                Copies       = r.Copies,
                Content      = r.Content,
                Time         = r.Time,
                Status       = r.Status,
                UserNickName = r.UserNickName
            };

            Dispatcher.Invoke(new Action(() =>
            {
                requestList[requestindex] = item;
                PrintRequestListBox.Items.Refresh();
            }));
        }
コード例 #2
0
ファイル: Print.xaml.cs プロジェクト: wan-qy/CenaPlus
 public void NewPrintRequest(int request_id)
 {
     var r = App.Server.GetPrintRequest(request_id);
     var item = new PrintRequestListItem
     {
         ID = r.ID,
         Copies = r.Copies,
         Content = r.Content,
         Time = r.Time,
         Status = r.Status,
         UserNickName = r.UserNickName
     };
     Dispatcher.Invoke(new Action(() =>
     {
         requestList.Add(item);
         PrintRequestListBox.Items.Refresh();
     }));
 }
コード例 #3
0
        public void NewPrintRequest(int request_id)
        {
            var r    = App.Server.GetPrintRequest(request_id);
            var item = new PrintRequestListItem
            {
                ID           = r.ID,
                Copies       = r.Copies,
                Content      = r.Content,
                Time         = r.Time,
                Status       = r.Status,
                UserNickName = r.UserNickName
            };

            Dispatcher.Invoke(new Action(() =>
            {
                requestList.Add(item);
                PrintRequestListBox.Items.Refresh();
            }));
        }
コード例 #4
0
ファイル: Print.xaml.cs プロジェクト: wan-qy/CenaPlus
 public void PrintRequestUpdated(int request_id)
 {
     var requestindex = requestList.FindIndex(x => x.ID == request_id);
     if (requestindex == -1) return;
     var r = App.Server.GetPrintRequest(request_id);
     if (r == null) return;
     if (r.ContestID != contestID) return;
     var item = new PrintRequestListItem
     {
         ID = r.ID,
         Copies = r.Copies,
         Content = r.Content,
         Time = r.Time,
         Status = r.Status,
         UserNickName = r.UserNickName
     };
     Dispatcher.Invoke(new Action(() =>
     {
         requestList[requestindex] = item;
         PrintRequestListBox.Items.Refresh();
     }));
 }