예제 #1
0
 public void Send()
 {
     this.BusyText = "正在发送...";
     this.IsBusy   = true;
     this.NotifyOfPropertyChange(() => this.IsBusy);
     this.NotifyOfPropertyChange(() => this.BusyText);
     Task.Factory.StartNew(() => {
         MessageSync.SendMessage(this.Account, this.BuyerID, this.Content);
         this.IsBusy = false;
         this.NotifyOfPropertyChange(() => this.IsBusy);
     });
 }
예제 #2
0
        public async Task SendMessage()
        {
            this.IsBusy = true;
            this.NotifyOfPropertyChange(() => this.IsBusy);
            DispatcherHelper.DoEvents();
            await MessageSync.SendMessage(this.Order.Account, this.Order.BuyerID, this.Ctx);

            this.IsBusy = false;
            this.NotifyOfPropertyChange(() => this.IsBusy);

            if (this.OnSuccess != null)
            {
                this.OnSuccess(this.Order.OrderNO, this.Order.Account);
            }
        }