private void ReceiverCompanyCb_SelectionChanged(object sender, SelectionChangedEventArgs e) { Company company = null; if (ReceiverCompanyCb.SelectedIndex != -1) { company = (Company)ReceiverCompanyCb.SelectedItem; } if (receiverCompany != company && company != null) { receiverCompany = company; if (checkSupplyCustomer() == false) { MMessageBox.GetInstance().ShowBox("发货公司和收货公司不能是同一个", "提示", MMessageBox.ButtonType.No, MMessageBox.IconType.error, Orientation.Vertical); //this.ReceiverCompanyCb.Text = null; this.ReceiverCompanyCb.SelectedIndex = -1; receiverCompany = null; return; } mWeighingBill.receiveCompanyId = receiverCompany.id; mWeighingBill.receiveCompanyName = receiverCompany.name; company = null; this.ReceiverYardCb.ItemsSource = null; ShowReceivedYard(); } }
private void Storyboard_Completed(object sender, EventArgs e) { Point point = this.SearchBorder.PointToScreen(new Point()); Size size = new Size(this.SearchBorder.Width, this.SearchBorder.ActualHeight); MMessageBox.GetInstance().ShowLoading(MMessageBox.LoadType.Circle, "正在加载中。。。", point, size, null, Orientation.Vertical, Brushes.White, 4); }
private void QuitMenuItem_Click(object sender, EventArgs e) { currWindow.Activate(); MMessageBox.Result result = MMessageBox.GetInstance().ShowBox("你确定退出程系吗", "提示", MMessageBox.ButtonType.YesNo, MMessageBox.IconType.Info); if (result == MMessageBox.Result.Yes) { Application.Current.Shutdown(); } else { currWindow.WindowState = WindowState.Normal; } }
private void SendYardCb_DropDownOpened(object sender, EventArgs e) { isShowSendYard = true; if (this.SendYardCb.ItemsSource == null) { MMessageBox.Result result = MMessageBox.GetInstance().ShowBox($"您还没有设置货场名称", "提示", MMessageBox.ButtonType.YesNo, MMessageBox.IconType.success, Orientation.Vertical, "是"); if (result == MMessageBox.Result.Yes) { new YardAddW(sendCompany) { ParentRefreshData = new Action <Yard>(AffterAddYard) }.ShowDialog(); } } }
protected MMessageBox.Result ShowAlertResult() { return(MMessageBox.GetInstance().ShowBox("保存成功 ! 要继续过磅吗?", "恭喜", MMessageBox.ButtonType.YesNo, MMessageBox.IconType.success, Orientation.Vertical, "是")); }
/// <summary> /// 显示提示窗口 /// </summary> /// <param name="content">提示内容</param> /// <param name="Title">标题</param> /// /// <param name="orientation">方向</param> protected void ShowAlert(String content, String Title = "提示", Orientation orientation = Orientation.Horizontal) { MMessageBox.GetInstance().ShowBox(content, Title, MMessageBox.ButtonType.No, MMessageBox.IconType.error, orientation); }