Пример #1
0
 ///////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// Displays a customized message box in front of the specified window.
 /// </summary>
 /// <param name="owner">Owner window of the message box.</param>
 /// <param name="messageBoxText">Text to display.</param>
 /// <param name="caption">Title bar caption to display.</param>
 /// <param name="button">A value that specifies which button or buttons to display.</param>
 /// <param name="icon">Icon to display.</param>
 /// <returns>Button value which message box is clicked by the user.</returns>
 public static MessageBoxExButtonType Show(Window owner, string messageBoxText, string caption,
                                           MessageBoxButtons button, MessageBoxImage icon)
 {
     bool checkBoxState = false; // NOTE: ignored
     MessageBoxEx msbBox = new MessageBoxEx();
     return msbBox._Show(owner, messageBoxText, caption, button, icon, null, ref checkBoxState);
 }
Пример #2
0
 /// <summary>
 /// 显示一个警告或提示面板
 /// </summary>
 /// <param name="caption"></param>
 /// <param name="content"></param>
 /// <param name="Icon">e.g. SystemIcons.Error</param>
 /// <returns></returns>
 public static DialogResult ShowMessageBoxEx(string caption,string content, Icon Icon)
 {
     MessageBoxEx box=new MessageBoxEx();
     box.Caption = caption;
     box.Content = content;
     box.Icon = Icon;
     box.ShowDialog();
     return box.result;
 }
 void TimKiemNhanVien()
 {
     try
     {
         if (cbMaNV.Checked == true)
         {
             m_NhanVienCtrl.TimKiemTheoMa(txtTimKiem.Text);
         }
         else if (cbHoTen.Checked == true)
         {
             m_NhanVienCtrl.TiemKiemTheoTen(txtTimKiem.Text);
         }
         else
         {
             m_PhongGiaoDihCtrl.TiemKiemTheoTenPhongGD(txtTimKiem.Text);
         }
     }
     catch
     {
         MessageBoxEx.Show("Không thể tìm thấy Giá trị cần tìm!", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #4
0
        private void LlenarGridMarca()
        {
            DataTable dt = new DataTable();

            dt = M.Listar(true);
            try
            {
                dtgMarca.Rows.Clear();
                for (int x = 0; x < dt.Rows.Count; x++)
                {
                    dtgMarca.Rows.Add(dt.Rows[x][0]);
                    dtgMarca.Rows[x].Cells[0].Value = dt.Rows[x][0].ToString();
                    dtgMarca.Rows[x].Cells[1].Value = dt.Rows[x][1].ToString();
                    dtgMarca.Rows[x].Cells[2].Value = dt.Rows[x][2].ToString();
                }
                dtgMarca.ClearSelection();
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "FactSYS", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #5
0
        private void btnClose_Click(object sender, EventArgs e)
        {
            this.friendID = this.skinTextBox_id.SkinTxt.Text.Trim();
            if (this.friendID.Length == 0)
            {
                MessageBoxEx.Show("帐号不能为空!");
                this.DialogResult = System.Windows.Forms.DialogResult.None;
                return;
            }

            try
            {
                if (this.ggSupporter.IsFriend(this.friendID))
                {
                    MessageBoxEx.Show("该用户已经是好友!");
                    this.DialogResult = System.Windows.Forms.DialogResult.None;
                    return;
                }

                this.catalogName = this.skinComboBox1.SelectedItem.ToString();
                AddFriendContract contract = new AddFriendContract(this.friendID, this.catalogName);
                byte[]            info     = ESPlus.Serialization.CompactPropertySerializer.Default.Serialize(contract);
                byte[]            bRes     = this.rapidPassiveEngine.CustomizeOutter.Query(InformationTypes.AddFriend, info);
                AddFriendResult   res      = (AddFriendResult)BitConverter.ToInt32(bRes, 0);
                if (res == AddFriendResult.FriendNotExist)
                {
                    MessageBoxEx.Show("帐号不存在!");
                    this.DialogResult = System.Windows.Forms.DialogResult.None;
                    return;
                }

                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            catch (Exception ee)
            {
                MessageBoxEx.Show("添加好友失败!" + ee.Message);
                this.DialogResult = System.Windows.Forms.DialogResult.None;
            }
        }
Пример #6
0
        private void btInputBomData_Click(object sender, EventArgs e)
        {
            try
            {
                if (iasyncresult1 == null || iasyncresult1.IsCompleted)
                {
                    string         temp = "";//string.Empty;
                    OpenFileDialog ofd  = new OpenFileDialog();
                    ofd.Title  = "选择BOM数据";
                    ofd.Filter = "(*.xls Excel 2003)|*.xls";
                    //ofd.InitialDirectory = "c:\\";
                    DialogResult dlr = ofd.ShowDialog();
                    if (dlr == DialogResult.Yes || dlr == DialogResult.OK)
                    {
                        string filename = ofd.SafeFileName;
                        filename = filename.Split('.')[0];
                        if (filename.Split('-').Length != 2)
                        {
                            throw new Exception("BOM文件名称格式错误,请确认是否为BOM文件..");
                        }
                        DataTable mdt = FrmBLL.ClsReadExcel.getTableForSql(ofd.FileName,
                                                                           string.Format("select 子件号,子件描述,替代组,'{1}'as Bom版本,排序字符串,用量,长文本(位号) from [{0}] where{2} 长文本(位号)<>''",
                                                                                         FrmBLL.ClsReadExcel.GetTableNames(ofd.FileName)[0], filename.Split('-')[1], temp));
                        this.progressBarItem1.Maximum = mdt.Rows.Count;

                        eventrundata  = new delegaterundata(this.RunData);
                        iasyncresult1 = eventrundata.BeginInvoke(mdt, null, null);
                    }
                }
                else
                {
                    MessageBoxEx.Show("程序还在运作中,请稍后....");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #7
0
 /// <summary>
 /// 添加库存
 /// </summary>
 /// <param name="OrderIDDateDic"></param>
 /// <returns></returns>
 private DataTable GetInoutPart(Dictionary <string, long> OrderIDDateDic)
 {
     try
     {
         DataTable TemplateTable = null;//模版表
         foreach (KeyValuePair <string, long> KVPair in OrderIDDateDic)
         {
             string strFileds     = " a.warehouse,c.wh_name,b.parts_id,a.parts_code,a.parts_name,a.norms,b.parts_barcode,b.car_parts_code,a.drawn_no,a.unit,a.retreat_num,a.refund_id  "; //所查询的字段
             string RelationTable = "tb_maintain_refund_material_detai a left join tb_parts b on a.parts_code=b.ser_parts_code left join tb_warehouse c on a.warehouse=c.wh_id";          //要查询的关联表名
             TemplateTable = CommonFuncCall.CreatePartStatisticTable();                                                                                                                   //获取要填充的公用表
             //获取对应单据的
             DataTable IOPartTable = DBHelper.GetTable("领料退料数据明细", RelationTable, strFileds, "refund_id='" + KVPair.Key.ToString() + "'", "", "");
             for (int i = 0; i < IOPartTable.Rows.Count; i++)
             {
                 DataRow dr = TemplateTable.NewRow();                                               //创建模版表行项
                 dr["OrderDate"]     = KVPair.Value.ToString();                                     //单据日期
                 dr["WareHouseID"]   = CommonCtrl.IsNullToString(IOPartTable.Rows[i]["warehouse"]); //仓库ID
                 dr["WareHouseName"] = CommonCtrl.IsNullToString(IOPartTable.Rows[i]["wh_name"]);   //仓库名称
                 dr["PartID"]        = CommonCtrl.IsNullToString(IOPartTable.Rows[i]["parts_id"]);  //配件ID
                 dr["PartCode"]      = IOPartTable.Rows[i]["parts_code"].ToString();                //配件编码
                 dr["PartName"]      = IOPartTable.Rows[i]["parts_name"].ToString();                //配件名称
                 dr["PartSpec"]      = IOPartTable.Rows[i]["norms"].ToString();                     //配件规格
                 dr["PartBarCode"]   = IOPartTable.Rows[i]["parts_barcode"].ToString();             //配件条码
                 dr["CarPartsCode"]  = IOPartTable.Rows[i]["car_parts_code"].ToString();            //车厂编码
                 dr["DrawNum"]       = IOPartTable.Rows[i]["drawn_no"].ToString();                  //配件图号
                 dr["UnitName"]      = IOPartTable.Rows[i]["unit"].ToString();                      //单位名称
                 dr["PartCount"]     = IOPartTable.Rows[i]["received_num"].ToString();              //配件数量
                 dr["StatisticType"] = (int)DataSources.EnumStatisticType.PaperCount;               //统计类型
                 TemplateTable.Rows.Add(dr);                                                        //添加新的数据行项
             }
         }
         return(TemplateTable);
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
         return(null);
     }
 }
Пример #8
0
        /// <summary>
        /// 根据调价单ID获取表头和尾部信息
        /// </summary>
        /// <param name="ModifyPriceBillId"></param>
        private void GetBillHeadEndMessage(string ModifyPriceBillId)
        {
            try
            {
                if (ModifyPriceBillId != null)
                {
                    //查询一条调价单信息
                    DataTable ModyPricTable = DBHelper.GetTable(ModBillLogMsg, ModBillTable, "*", ModifyPriceBillID + "='" + ModifyPriceBillId + "'", "", "");
                    CommonFuncCall.FillEntityByTable(ModifyPriceBillEntity, ModyPricTable);
                    CommonFuncCall.FillControlsByEntity(this, ModifyPriceBillEntity);
                    if (status == WindowStatus.Copy)
                    {
                        lblorder_num.Text = string.Empty;
                    }

                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
 private void _met_event_click_datagridview(object sender, System.Windows.Forms.DataGridViewCellEventArgs e)
 {
     if (Convert.ToInt32(_frm_client.dg_clientes.CurrentRow.Cells[0].Value) > 0)
     {
         _frm_client.txt_clv_cli.Text = _frm_client.dg_clientes.CurrentRow.Cells[0].Value.ToString();
         _str_array = _frm_client.dg_clientes.CurrentRow.Cells[1].Value.ToString().Split(' ');
         _frm_client.txt_nom.Text    = _str_array[0];
         _frm_client.txt_ap.Text     = _str_array[1];
         _frm_client.txt_am.Text     = _str_array[2];
         _frm_client.txt_tel.Text    = _frm_client.dg_clientes.CurrentRow.Cells[3].Value.ToString();
         _frm_client.txt_email.Text  = _frm_client.dg_clientes.CurrentRow.Cells[4].Value.ToString();
         _frm_client.txt_direc.Text  = _frm_client.dg_clientes.CurrentRow.Cells[2].Value.ToString();
         _frm_client.txt_ciud.Text   = _frm_client.dg_clientes.CurrentRow.Cells[5].Value.ToString();
         _frm_client.txt_est_re.Text = _frm_client.dg_clientes.CurrentRow.Cells[6].Value.ToString();
         _frm_client.cb_est_cli.Text = _frm_client.dg_clientes.CurrentRow.Cells[7].Value.ToString();
         _met_enable_button("click_cell");
     }
     else
     {
         MessageBoxEx.Show("Por favor seleccione un registro", "Mensaje desd el sistema", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
     }
 }
Пример #10
0
        private void ExtractDownload_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            WindowState = FormWindowState.Minimized;
            TaskBar.Progress.SetState(Handle, TaskBar.Progress.Flags.Indeterminate);
            switch (e.Result as bool?)
            {
            case true:
                if (!_silent)
                {
                    MessageBoxEx.Show(Resources.Msg_Hint_02, Resources.WindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                break;

            default:
                if (!_silent || !File.Exists(_appPath))
                {
                    MessageBoxEx.Show(Resources.Msg_Warn_01, Resources.WindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                break;
            }
            Application.Exit();
        }
Пример #11
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Text = Resources.WindowTitle;
            TaskBar.Progress.SetState(Handle, TaskBar.Progress.Flags.Indeterminate);
            if (!NetEx.InternetIsAvailable())
            {
                if (!_silent || !File.Exists(_appPath))
                {
                    MessageBoxEx.Show(Resources.Msg_Err_00, Resources.WindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                Application.Exit();
                return;
            }
            var localDate  = File.GetLastWriteTime(_appPath);
            var onlineDate = NetEx.GetFileDate(Resources.UpdateUrl, Resources.UserAgent);

            if ((onlineDate - localDate).Days > 0)
            {
                if (_silent || MessageBoxEx.Show(Resources.Msg_Hint_00, Resources.WindowTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
                {
                    var archivePath = PathEx.Combine(PathEx.LocalDir, $"..\\{PathEx.GetTempFileName()}");
                    if (!File.Exists(archivePath))
                    {
                        _transfer.DownloadFile(Resources.UpdateUrl, archivePath);
                        Opacity = 1f;
                        CheckDownload.Enabled = true;
                        return;
                    }
                    ExtractDownload.RunWorkerAsync();
                }
                Application.Exit();
                return;
            }
            if (!_silent)
            {
                MessageBoxEx.Show(Resources.Msg_Hint_01, Resources.WindowTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            Application.Exit();
        }
Пример #12
0
        /// <summary>
        /// 特殊配件dgv输入验证 并计算项目折后价
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvparts_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex != 3)
            {
                return;
            }
            bool   bln       = false;
            string currValue = e.FormattedValue.ToString(); //dgvprojrct.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();

            string strValue = Utility.Common.Validator.IsDecimal(currValue, 10, 2, ref bln);

            if (!bln)
            {
                MessageBoxEx.Show("折扣" + currValue + "格式不正确,请输入0-10数字,例8.5", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                e.Cancel = true;
                return;
            }
            decimal iValue = Convert.ToDecimal(strValue);

            if (iValue < 0 || iValue > 10)
            {
                MessageBoxEx.Show("折扣" + currValue + "请输入0-10数字,例8.5", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                e.Cancel = true;
                return;
            }

            decimal quota_price    = 0;
            string  strquota_price = Utility.Common.Validator.IsDecimal(dgvparts.Rows[e.RowIndex].Cells["ref_out_price"].Value.ToString(), 10, 2, ref bln);

            if (!bln)
            {
                MessageBoxEx.Show("原价格式不正确!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            quota_price = Convert.ToDecimal(strquota_price);
            decimal discount_price = Math.Abs(Math.Round((quota_price * iValue) / 10, 2));

            dgvparts.Rows[e.RowIndex].Cells["discount_price"].Value = discount_price.ToString();
        }
Пример #13
0
        private void QueryByUserName()
        {
            string szUserName = this.txtUserName.Text.Trim();

            if (GlobalMethods.Misc.IsEmptyString(szUserName))
            {
                return;
            }
            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            List <UserInfo> lstUserInfos = null;
            short           shRet        = UserAccess.Instance.GetUserInfo(szUserName, ref lstUserInfos);

            if (shRet != SystemData.ReturnValue.OK &&
                shRet != SystemData.ReturnValue.RES_NO_FOUND)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("用户列表查询下载失败!");
                return;
            }
            this.LoadGridViewData(lstUserInfos);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Пример #14
0
        //格式转换后,检验字段的有效性并修复字段
        public static bool FieldsCheckAfterTransaction(IWorkspace pInputWorkspace, IWorkspace pOutPutWorkspace, IFields pInputFields, ref IFields pOoutPutFields)
        {
            IFieldChecker   pFieldChecker   = default(IFieldChecker);
            IEnumFieldError pEnumFieldError = null;

            pFieldChecker = new FieldChecker();
            pFieldChecker.InputWorkspace    = pInputWorkspace;
            pFieldChecker.ValidateWorkspace = pOutPutWorkspace;
            pFieldChecker.Validate(pInputFields, out pEnumFieldError, out pOoutPutFields);

            //处理字段中不符合语义规则的情况
            if ((pEnumFieldError != null))
            {
                pEnumFieldError.Reset();
                IFieldError pFieldError = default(IFieldError);
                pFieldError = pEnumFieldError.Next();
                //g_clsErrorHandle.DisplayInformation("导出字段中存在无效字段: " + pOoutPutFields.Field(pFieldError.FieldIndex).Name + "导出终止!!", false);
                MessageBoxEx.Show("导出字段中存在无效字段: " + pOoutPutFields.get_Field(pFieldError.FieldIndex).Name + "导出终止!!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(false);
            }
            return(true);
        }
Пример #15
0
        /// <summary>
        /// 提交功能,提交时添加单号
        /// </summary>
        /// <param name="strMessage">提示信息</param>
        /// <param name="status">单据状态</param>
        private void SubmitAndVerify(string strMessage, DataSources.EnumAuditStatus status)
        {
            List <SQLObj> listSql    = new List <SQLObj>();
            string        strReceId  = string.Empty; //单据Id值
            string        strOrderNo = string.Empty; //单据编号

            foreach (DataGridViewRow dr in dgvRData.Rows)
            {
                object isCheck = dr.Cells["colCheck"].EditedFormattedValue;
                if (isCheck != null && (bool)isCheck)
                {
                    strReceId += dr.Cells["repair_id"].Value.ToString() + ",";
                    strOrderNo = dr.Cells["repair_no"].Value.ToString();
                    SQLObj obj = new SQLObj();
                    obj.cmdType = CommandType.Text;
                    Dictionary <string, ParamObj> dicParam = new Dictionary <string, ParamObj>();
                    dicParam.Add("repair_no", new ParamObj("repair_no", !string.IsNullOrEmpty(strOrderNo)?strOrderNo: CommonUtility.GetNewNo(SYSModel.DataSources.EnumProjectType.RepairCallback), SysDbType.VarChar, 40)); //单据编号
                    dicParam.Add("repair_id", new ParamObj("repair_id", dr.Cells["repair_id"].Value, SysDbType.VarChar, 40));                                                                                               //单据ID
                    dicParam.Add("document_status", new ParamObj("document_status", status, SysDbType.VarChar, 40));                                                                                                        //单据状态
                    dicParam.Add("update_by", new ParamObj("update_by", HXCPcClient.GlobalStaticObj.UserID, SysDbType.VarChar, 40));                                                                                        //修改人Id
                    dicParam.Add("update_name", new ParamObj("update_name", HXCPcClient.GlobalStaticObj.UserName, SysDbType.VarChar, 40));                                                                                  //修改人姓名
                    dicParam.Add("update_time", new ParamObj("update_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt));                                      //修改时间
                    obj.sqlString = "update tb_maintain_back_repair set document_status=@document_status,repair_no=@repair_no,update_by=@update_by,update_name=@update_name,update_time=@update_time where repair_id=@repair_id";
                    obj.Param     = dicParam;
                    listSql.Add(obj);
                }
            }

            if (string.IsNullOrEmpty(strReceId))
            {
                MessageBoxEx.Show("请选择需要" + strMessage + "的记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (DBHelper.BatchExeSQLMultiByTrans("更新单据状态为提交", listSql))
            {
                MessageBoxEx.Show("" + strMessage + "成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                BindPageData();
            }
        }
Пример #16
0
        void do_globalUserCache_GroupInfoChanged(GGGroup group, GroupChangedType type, string userID)
        {
            this.groupListBox.GroupInfoChanged(group, type, userID);

            if (type == GroupChangedType.GroupDeleted)
            {
                GroupChatForm form = this.groupChatFormManager.GetForm(group.ID);
                if (form != null)
                {
                    form.Close();
                }

                if (userID != null) //为null 表示更改了自己的部门资料
                {
                    MessageBoxEx.Show(string.Format("群{0}({1})已经被解散。", group.ID, group.Name));
                }
                return;
            }



            if (type == GroupChangedType.GroupInfoChanged)
            {
                //   this.groupListBox.RemoveGroup(group.ID);
                // this.groupListBox.AddGroup(group);


                return;
            }



            GroupChatForm form2 = this.groupChatFormManager.GetForm(group.ID);

            if (form2 != null)
            {
                form2.OnGroupInfoChanged(type, userID);
            }
        }
Пример #17
0
 /// <summary>
 /// 编辑事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void UCSalePlanManager_EditEvent(object sender, EventArgs e)
 {
     string sale_plan_id = string.Empty;
     bool IsHandle = true;
     List<string> listField = GetSelectedRecordByEditDelete(ref IsHandle);
     if (IsHandle)
     {
         if (listField.Count == 0)
         {
             MessageBoxEx.Show("请选择要编辑的数据!");
             return;
         }
         if (listField.Count > 1)
         {
             MessageBoxEx.Show("一次只可以编辑一条数据!");
             return;
         }
         sale_plan_id = listField[0].ToString();
         UCSalePlanAddOrEdit UCSalePlanEdit = new UCSalePlanAddOrEdit(WindowStatus.Edit, sale_plan_id, this);
         base.addUserControl(UCSalePlanEdit, "销售计划单-编辑", "UCSalePlanEdit" + sale_plan_id, this.Tag.ToString(), this.Name);
     }
 }
Пример #18
0
        private void 添加文件ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //先判断数据文件是否存在

            if (new FileDBHelper().hasPData())
            {
                if (DBSource.ISAdmin)
                {
                    int        nodeID    = int.Parse("" + this.treeView_nav.SelectedNode.Tag);
                    FileInfo[] fileInfos = LoadFile();
                    System.Threading.ThreadPool.QueueUserWorkItem((s) => insertFiles(fileInfos, nodeID));
                }
                else
                {
                    loadData();
                }
            }
            else
            {
                MessageBoxEx.Show("找不到对应的数据文件(*.pdata),无法添加文件!");
            }
        }
Пример #19
0
        private void btnLuuVaoDS_Click(object sender, EventArgs e)
        {
            try
            {
                HangHoa hh = new HangHoa();
                hh.MaHH      = txtMaHH.Text;
                hh.SoLuong   = int.Parse(txtSoLuong.Text);
                hh.GiaBan    = int.Parse(txtGia.Text);
                hh.DonViTinh = txtDonViTinh.Text;
                hh.TenHH     = txtTenHH.Text;
                hh.LoaiHang  = cboLoaiHang.SelectedValue.ToString();

                hhBLL.UpdateHH(hh);
                dgHangHoa.DataSource = hhBLL.LoadDanhSachHH(true);

                MessageBoxEx.Show("Cập nhật thành công", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (FormatException)
            {
                MessageBoxEx.Show("Nhập sai!");
            }
        }
Пример #20
0
        void vod_VideoStartSave4OCX(object sender, EventArgs e)
        {
            IVX.Live.MainForm.View.ucPlayHistory vod = sender as MainForm.View.ucPlayHistory;
            string fileName = string.Format("视频导出_{0}_{1}.mp4", vod.OCX_StartSecond, vod.OCX_EndSecond);
            bool   needSave = true;

            fileName = IVX.Live.MainForm.Framework.Environment.VideoSavePath.TrimEnd('\\') + "\\" + fileName;
            System.Windows.Forms.SaveFileDialog sfd = new System.Windows.Forms.SaveFileDialog();
            sfd.RestoreDirectory = true;

            sfd.Filter   = "*.mp4|*.mp4|全部文件|*.*";
            sfd.FileName = System.IO.Path.GetFileName(fileName);

            sfd.InitialDirectory = IVX.Live.MainForm.Framework.Environment.VideoSavePath;
            if (sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                fileName = sfd.FileName;
            }
            else
            {
                needSave = false;
            }

            if (needSave)
            {
                try
                {
                    int handle = m_videoExport.AddExport(vod.OCX_MssHostIp, vod.OCX_MssHostPort, vod.OCX_VideoPath, (uint)vod.OCX_StartSecond, (uint)vod.OCX_EndSecond, fileName);
                    if (handle > 0 && IsHandleCreated && OnVideoSaveStarted != null)
                    {
                        OnVideoSaveStarted(handle, fileName);
                    }
                }
                catch (SDKCallException ex)
                {
                    MessageBoxEx.Show("视频【" + fileName + "】导出失败,[" + ex.ErrorCode + "]" + ex.Message, IVX.Live.MainForm.Framework.Environment.PROGRAM_NAME);
                }
            }
        }
Пример #21
0
 void UCOldPartsReceiptView_VerifyEvent(object sender, EventArgs e)
 {
     if (MessageBoxEx.Show("确认要审核吗?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
     {
         return;
     }
     verify = new UCVerify();
     if (verify.ShowDialog() == DialogResult.OK)
     {
         List <SQLObj> listSql = new List <SQLObj>();
         SQLObj        obj     = new SQLObj();
         obj.cmdType = CommandType.Text;
         Dictionary <string, ParamObj> dicParam = new Dictionary <string, ParamObj>();
         dicParam.Add("oldpart_id", new ParamObj("oldpart_id", strPartsId, SysDbType.VarChar, 40));                                                                         //单据ID
         dicParam.Add("info_status", new ParamObj("info_status", verify.auditStatus, SysDbType.VarChar, 40));                                                               //单据状态
         dicParam.Add("Verify_advice", new ParamObj("Verify_advice", verify.Content, SysDbType.VarChar, 200));                                                              //审核意见
         dicParam.Add("update_by", new ParamObj("update_by", HXCPcClient.GlobalStaticObj.UserID, SysDbType.VarChar, 40));                                                   //修改人Id
         dicParam.Add("update_name", new ParamObj("update_name", HXCPcClient.GlobalStaticObj.UserName, SysDbType.VarChar, 40));                                             //修改人姓名
         dicParam.Add("update_time", new ParamObj("update_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt)); //修改时间
         obj.sqlString = "update tb_maintain_oldpart_receiv_send set info_status=@info_status,Verify_advice=@Verify_advice,update_by=@update_by,update_name=@update_name,update_time=@update_time where oldpart_id=@oldpart_id";
         obj.Param     = dicParam;
         listSql.Add(obj);
         if (DBHelper.BatchExeSQLMultiByTrans("更新单据状态为审核", listSql))
         {
             string strMsg = string.Empty;
             if (verify.auditStatus == DataSources.EnumAuditStatus.AUDIT)
             {
                 strMsg = "成功";
             }
             else
             {
                 strMsg = "不通过";
             }
             MessageBoxEx.Show("审核" + strMsg + "!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             uc.BindPageData();
             deleteMenuByTag(this.Tag.ToString(), uc.Name);
         }
     }
 }
Пример #22
0
        public override void TestDataConnection()
        {
            if (!Validator(this.highlighter1))
            {
                return;
            }
            var connString = G.GetConnectionString(FreeSql.DataType.PostgreSQL, textBoxX4.Text,
                                                   textBoxX5.Text, textBoxX2.Text, textBoxX6.Text, textBoxX3.Text);

            try
            {
                var fsql = new FreeSql.FreeSqlBuilder()
                           .UseConnectionString(FreeSql.DataType.PostgreSQL,
                                                connString).Build();
                fsql.DbFirst.GetDatabases();
                MessageBoxEx.Show("数据库连接成功", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception e)
            {
                TaskDialog.Show("错误提示", eTaskDialogIcon.BlueStop, "数据库连接失败", $" 原因:{e.Message}\n 连接串:{connString}\n", eTaskDialogButton.Ok);
            }
        }
Пример #23
0
 private void FormClosing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (this.DocumentChanged)
     {
         System.Windows.Forms.DialogResult dlg = MessageBoxEx.Show(this, "Document '" + this.FileName + "' has changed. Save changes?", "Notepad", MessageBoxButtons.YesNoCancel);
         if (dlg == System.Windows.Forms.DialogResult.Cancel)
         {
             e.Cancel = true;
         }
         else if (dlg == System.Windows.Forms.DialogResult.Yes)
         {
             if (this.FileName == "")
             {
                 ((frmMain)this.MdiParent).SaveDocument(this);
             }
             if (this.FileName != "")
             {
                 SaveFile();
             }
         }
     }
 }
Пример #24
0
 //添加好友
 private void lbSearchFriendList_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         if (lbSearchFriendList.SelectedItems.Count > 0)
         {
             var s = lbSearchFriendList.SelectedItems[0] as SkinListBoxItem;
             ifriendInfoService.AddEntity(new friendinfo()
             {
                 FriendId = (Guid)s.Tag,
                 UserId   = F_Main.current_user.Guid_id,
                 SubTime  = Common.CommonHelper.GetCurrentDateStamp()
             });
             MessageBoxEx.Show("添加成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             Async_LoadFriend(); //刷新好友列表
         }
     }
     catch
     {
         MessageYyu.ShowMessage("你可能已添加该好友,请重试");
     }
 }
Пример #25
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     if (strEditMode == "add")
     {
         if (CommonDAO.GetInstance().SelfDber.Count <CmcsMine>(" where Name=:Name", new { Name = txt_Name.Text }) > 0)
         {
             MessageBoxEx.Show("该矿点名称已存在!,", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             return;
         }
         CmcsMine mine = new CmcsMine()
         {
             Code     = carTransportDao.GetMineNewChildCode(Output.Code),
             Name     = txt_Name.Text,
             Valid    = chb_IsUse.Checked ? "有效" : "无效",
             Sequence = dbi_Sequence.Value,
             ReMark   = txt_ReMark.Text,
             ParentId = Output.Id
         };
         carTransportDao.InsertMine(mine);
     }
     else
     {
         CmcsMine mine_check = CommonDAO.GetInstance().SelfDber.Entity <CmcsMine>(" where Name=:Name", new { Name = txt_Name.Text });
         if (mine_check != null && mine_check.Id != Output.Id)
         {
             MessageBoxEx.Show("该矿点名称已存在!,", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             return;
         }
         //Output.Code = carTransportDao.GetMineNewChildCode(Output.Code);
         //Output.NodeCode = carTransportDao.GetMineNewChildCode(Output.Code);
         Output.Name     = txt_Name.Text;
         Output.Sequence = dbi_Sequence.Value;
         Output.Valid    = chb_IsUse.Checked ? "有效" : "无效";
         Output.ReMark   = txt_ReMark.Text;
         Output.IsSynch  = "0";
         carTransportDao.InsertMine(Output);
     }
     FrmMine_List_Shown(null, null);
 }
Пример #26
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (SN_SN == -1L)
     {
         if (Save())
         {
             MessageBoxEx.Show("保存成功", "提示");
         }
     }
     else
     {
         if (Edit())
         {
             MessageBoxEx.Show("修改成功", "提示");
         }
         SN_SN = -1L;
     }
     flowLayoutPanel1.Visible = true;
     flowLayoutPanel2.Visible = false;
     EnableInput(false);
     lblRKDH.txt.Text = "";
 }
Пример #27
0
        private void BindData()
        {
            try
            {
                #region 事件选择判断
                if (dtpReserveSTime.Value > dtpReserveETime.Value)
                {
                    MessageBoxEx.Show("预约时间,开始时间不能大于结束时间", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                #endregion
                string strFiles = " reservation_no,reservation_date,customer_code,customer_name,reservation_mobile,reservation_man,vehicle_no,reserv_id";
                strWhere = string.Format(" enable_flag='1' and document_status='2' and Import_status='0'"); //enable_flag 1未删除
                if (!string.IsNullOrEmpty(txtCarNO.Text.Trim()))                                            //车牌号
                {
                    strWhere += string.Format(" and  vehicle_no like '%{0}%'", txtCarNO.Text.Trim());
                }
                if (!string.IsNullOrEmpty(txtCustomName.Caption.Trim()))//客户名称
                {
                    strWhere += string.Format(" and  customer_name like '%{0}%'", txtCustomName.Caption.Trim());
                }
                if (!string.IsNullOrEmpty(txtDriverPhone.Caption.Trim()))//预约人
                {
                    strWhere += string.Format(" and  reservation_man like '%{0}%'", txtDriverPhone.Caption.Trim());
                }
                if (!string.IsNullOrEmpty(txtRepPersonPhone.Caption.Trim()))//预约人手机
                {
                    strWhere += string.Format(" and  reservation_mobile like '%{0}%'", txtRepPersonPhone.Caption.Trim());
                }
                strWhere += string.Format(" and reservation_date BETWEEN {0} and {1}", Common.LocalDateTimeToUtcLong(dtpReserveSTime.Value.Date), Common.LocalDateTimeToUtcLong(dtpReserveETime.Value.Date.AddDays(1).AddMilliseconds(-1)));//接待日期

                DataTable dt = DBHelper.GetTable("预约单导入信息列表", "tb_maintain_reservation", strFiles, strWhere, "", "order by create_time desc");
                dgvRData.DataSource = dt;
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Пример #28
0
        private void AssociateBtn_Click(object sender, EventArgs e)
        {
            var owner = sender as Control;

            if (owner == null)
            {
                return;
            }
            var isNull = string.IsNullOrWhiteSpace(fileTypes.Text);

            if (!isNull)
            {
                if (fileTypes.Text.Contains(","))
                {
                    isNull = fileTypes.Text.Split(',').Where(s => !s.StartsWith(".")).ToArray().Length == 0;
                }
                else
                {
                    isNull = fileTypes.Text.StartsWith(".");
                }
            }
            if (isNull)
            {
                MessageBoxEx.Show(this, Lang.GetText($"{owner.Name}Msg"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            var appName = Main.GetAppInfo(appsBox.SelectedItem.ToString()).ShortName;

            if (string.IsNullOrWhiteSpace(appName) || FileTypesConflict())
            {
                MessageBoxEx.Show(this, Lang.GetText(nameof(en_US.OperationCanceledMsg)), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (!fileTypes.Text.EqualsEx(Ini.Read(appName, "FileTypes")))
            {
                SaveBtn_Click(saveBtn, EventArgs.Empty);
            }
            Main.AssociateFileTypesHandler(appName, this);
        }
Пример #29
0
        /// <summary>
        /// 根据调价单ID获取配件信息表
        /// </summary>
        /// <param name="ModBillIdValue"></param>
        private void GetBillPartsMsg(string ModBillIdValue)
        {
            try
            {

                DataTable PartsMsgList = DBHelper.GetTable(ModPartLogMsg, ModPartTable, "*", ModifyPriceBillID + "='" + ModBillIdValue + "'", "", "");//获取配件信息表
                if (PartsMsgList.Rows.Count > 0)
                {

                    foreach (DataRow dr in PartsMsgList.Rows)
                    {
                        DataGridViewRow dgvr = gvPartsMsgList.Rows[gvPartsMsgList.Rows.Add()];
                        dgvr.Cells["partsnum"].Value = dr["parts_code"];
                        dgvr.Cells["partname"].Value = dr["parts_name"];
                        dgvr.Cells["PartSpec"].Value = dr["model"];
                        dgvr.Cells["drawingnum"].Value = dr["drawing_num"];
                        dgvr.Cells["unitname"].Value = dr["unit_name"];
                        dgvr.Cells["partbrand"].Value = dr["parts_brand"];
                        dgvr.Cells["CarFactoryCode"].Value = dr["car_parts_code"];
                        dgvr.Cells["BarCode"].Value = dr["parts_barcode"];
                        dgvr.Cells["counts"].Value = dr["counts"];
                        dgvr.Cells["ModyUnitprice"].Value = dr["modify_price"];
                        dgvr.Cells["ModyPricRate"].Value = dr["modifyprice_ratio"];
                        dgvr.Cells["ModyAfterPric"].Value = dr["modify_after_price"];
                        dgvr.Cells["Calcmoney"].Value = dr["money"];
                        dgvr.Cells["remarks"].Value = dr["remark"];

                    }
                }
                else
                {
                    MessageBoxEx.Show("要查询的配件信息不存在!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
Пример #30
0
        void friendListBox1_RemoveUserClicked(IUser friend)
        {
            if (this.globalUserCache.CurrentUser.UserStatus == UserStatus.OffLine)
            {
                return;
            }

            try
            {
                if (friend.ID == this.rapidPassiveEngine.CurrentUserID)
                {
                    return;
                }

                if (!ESBasic.Helpers.WindowsHelper.ShowQuery(string.Format("您确定要删除好友 {0}({1}) 吗?", friend.Name, friend.ID)))
                {
                    return;
                }

                //SendCertainly 发送请求,并等待Ack回复
                this.rapidPassiveEngine.CustomizeOutter.SendCertainly(null, InformationTypes.RemoveFriend, System.Text.Encoding.UTF8.GetBytes(friend.ID));
                this.globalUserCache.CurrentUser.RemoveFriend(friend.ID);
                this.friendListBox1.RemoveUser(friend.ID);

                // 从recent中删除
                this.recentListBox1.RemoveUnit(friend);
                ChatForm chatForm = this.chatFormManager.GetForm(friend.ID);
                if (chatForm != null)
                {
                    chatForm.Close();
                }

                this.globalUserCache.RemovedFriend(friend.ID);
            }
            catch (Exception ee)
            {
                MessageBoxEx.Show("请求超时!" + ee.Message, GlobalResourceManager.SoftwareName);
            }
        }
Пример #31
0
        private void dtgContacto_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
        {
            try
            {
                if (e.ColumnIndex >= 0 && this.dtgContacto.Columns[e.ColumnIndex].Name == "editarc" && e.RowIndex >= 0)
                {
                    e.Paint(e.CellBounds, DataGridViewPaintParts.All);

                    DataGridViewButtonCell celBoton = this.dtgContacto.Rows[e.RowIndex].Cells["editarc"] as DataGridViewButtonCell;
                    Icon icoEditar = new Icon(Environment.CurrentDirectory + @"\Recursos\" + @"edit (2).ico");
                    e.Graphics.DrawIcon(icoEditar, e.CellBounds.Left + 20, e.CellBounds.Top + 3);
                    this.dtgContacto.Rows[e.RowIndex].Height      = icoEditar.Height + 5;
                    this.dtgContacto.Columns[e.ColumnIndex].Width = icoEditar.Width + 40;

                    e.Handled = true;
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message);
            }
        }
Пример #32
0
 void UCFMaterialReturnAddOrEdit_CancelEvent(object sender, EventArgs e)
 {
     try
     {
         if (MessageBoxEx.Show("确认要取消吗?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
         {
             return;
         }
         if (!string.IsNullOrEmpty(strId))
         {
             List <SQLObj> listSql = new List <SQLObj>();
             UpdateMaintainInfo(listSql, strfetchId, Convert.ToInt32(DataSources.EnumImportStaus.OPEN).ToString());
             DBHelper.BatchExeSQLMultiByTrans("更新前置单据状体", listSql);
         }
         isAutoClose = true;
         deleteMenuByTag(this.Tag.ToString(), uc.Name);
     }
     catch (Exception ex)
     {
         HXCPcClient.GlobalStaticObj.GlobalLogService.WriteLog(ex);
     }
 }
Пример #33
0
 public static DialogResult ShowMessage(string sMessage_i)
 {
     MessageBoxEx messageBoxEx = new MessageBoxEx(sMessage_i, Constants.DefaultMessageCaption,MessageBoxButtons.OK);
     return messageBoxEx.ShowDialog();
 }
Пример #34
0
        private void OnExit(object sender, EventArgs e)
        {
            string msg = "Are you sure you want to exit?";
            if ((SmartVolManagerPackage.BgMusicManager.MusicState == SmartVolManagerPackage.BgMusicState.Play) || (SmartVolManagerPackage.BgMusicManager.AutoMuted == true))
                msg = msg + " " + "Your music will be stopped.";

            MessageBoxEx msgBoxEx = new MessageBoxEx(msg, UiCommands.mPlayerForm.WindowState == FormWindowState.Minimized ? "" : "Minimize");
            msgBoxEx.ShowDialog();
            switch (msgBoxEx.ButtonPressedIndex)
            {
                case 0:
                    UiCommands.Exit();
                    break;
                case 1:
                    break;
                case 2:
                    if (UiCommands.mPlayerForm != null)
                        UiCommands.mPlayerForm.WindowState = FormWindowState.Minimized;
                    break;
            }
        }
Пример #35
0
 public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxExButtons buttons, MessageBoxExIcon icon, MessageBoxExDefaultButton defaultButton)
 {
     MessageBoxEx messageBoxEx = new MessageBoxEx(text, caption, buttons, icon, defaultButton);
     return messageBoxEx.ShowDialog(owner);
 }
Пример #36
0
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            if ((e.CloseReason == CloseReason.WindowsShutDown) || (e.CloseReason == CloseReason.TaskManagerClosing))
                return;

            MessageBoxEx msgBoxEx = new MessageBoxEx("Closing this window will stop your music.\n\nAre you sure you want to do this?", "Minimize");
            msgBoxEx.ShowDialog();
            switch (msgBoxEx.ButtonPressedIndex)
            {
                case 0:
                    base.OnFormClosing(e);
                    break;
                case 1:
                    e.Cancel = true;
                    break;
                case 2:
                    e.Cancel = true;
                    this.WindowState = FormWindowState.Minimized;
                    break;
            }
        }
 public static int Show(IWin32Window Owner, string text, string caption, string[] buttons, MessageBoxIcon icon)
 {
     MessageBoxEx form = new MessageBoxEx(text, caption, buttons, icon, false, "");
      form.ShowDialog(Owner);
      return form.SelectedButton;
 }
 public static int Show(IWin32Window Owner, string text, string caption, string[] buttons, MessageBoxIcon icon, out bool DoNotShow, string DoNotShowText)
 {
     MessageBoxEx form = new MessageBoxEx(text, caption, buttons, icon, true, DoNotShowText);
      form.ShowDialog(Owner);
      DoNotShow = form.DoNotShow;
      return form.SelectedButton;
 }
Пример #39
0
 /// <summary>
 /// Displays a customized message box in front of the specified window.
 /// </summary>
 /// <param name="owner">Owner window of the message box.</param>
 /// <param name="messageBoxText">Text to display.</param>
 /// <param name="caption">Title bar caption to display.</param>
 /// <param name="button">A value that specifies which button or buttons to display.</param>
 /// <param name="icon">Icon to display.</param>
 /// <param name="checkBoxText">Response check box caption.</param>
 /// <param name="checkBoxState">Response check box default\return state.</param>
 /// <returns>Button value which message box is clicked by the user.</returns>
 public static MessageBoxExButtonType Show(Window owner, string messageBoxText, string caption,
                                           MessageBoxButtons button, MessageBoxImage icon,
                                           string checkBoxText, ref bool checkBoxState)
 {
     MessageBoxEx msbBox = new MessageBoxEx();
     return msbBox._Show(owner, messageBoxText, caption, button, icon, checkBoxText, ref checkBoxState);
 }
Пример #40
0
 public static DialogResult ShowMessage(string sMessage_i, string sCaption_i)
 {
     MessageBoxEx messageBoxEx = new MessageBoxEx(sMessage_i, sCaption_i,MessageBoxButtons.OK);
     return messageBoxEx.ShowDialog();
 }
Пример #41
0
 /// <summary>
 /// MIcon: Display MyIcon on the message box.
 /// </summary>
 static public DialogResult Show(string text, string caption, MessageBoxButtons messageBoxButtons, MessageBoxIcon messageBoxIcon)
 {
     MessageBoxEx Msg = new MessageBoxEx();
     Msg.Message = text;
     if (!string.IsNullOrEmpty(caption))
     {
         Msg.Text = caption;
     }
     Msg.InitButton(messageBoxButtons);
     Msg.InitIcon(messageBoxIcon);
     return Msg.ShowDialog();
 }
 internal CustomMessageBoxDialogResult(MessageBoxEx mbex, String result){ _mbex = mbex; _result = result; }
Пример #43
0
        public void Exit(bool showPrompt)
        {
            string msg = "Are you sure you want to exit?";

            if (showPrompt)
            {
                if ((SmartVolManagerPackage.BgMusicManager.MusicState == SmartVolManagerPackage.BgMusicState.Play) || (SmartVolManagerPackage.BgMusicManager.AutoMuted == true))
                    msg = msg + " " + "Your music will be stopped.";

                MessageBoxEx msgBoxEx = new MessageBoxEx(msg, "Minimize to Tray");
                msgBoxEx.ShowDialog();
                switch (msgBoxEx.ButtonPressedIndex)
                {
                    case 0:
                        if (_isStandAlone)
                            Application.Exit();
                        else
                            UiCommands.Exit();
                        break;
                    case 1:
                        break;
                    case 2:
                        UiCommands.HideMixer();
                        break;
                }
            }
            else
            {
                if (_isStandAlone)
                    Application.Exit();
                else
                    UiCommands.Exit();
            }
        }
 internal void Apply(MessageBoxEx mbex) { _actions.ForEach(action => action(mbex)); }
Пример #45
0
 /// <summary>
 /// Message: Text to display in the message box.
 /// </summary>
 static public DialogResult Show(string text)
 {
     MessageBoxEx Msg = new MessageBoxEx();
     Msg.Message = text;
     Msg.InitButton(MessageBoxButtons.OK);
     Msg.InitIcon(MessageBoxIcon.None);
     var dialog = Msg.ShowDialog();
     return dialog;
 }
Пример #46
0
        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
        {
            MessageBoxEx mb = new MessageBoxEx();

            mb.Text = text;
            mb.Caption = caption;
            mb.AddButtons(buttons);
            mb.Icon = (MessageBoxExIcon)icon;

            return mb.Show(owner);
        }
Пример #47
0
		public static string Show(IWin32Window window, string text, string title, string[] buttons, MessageBoxIcon icon, string defaultButton)
		{
			MessageBoxEx instance = new MessageBoxEx();
			return instance.ShowImpl(window, text, title, buttons, icon, defaultButton);
		}
Пример #48
0
		static public MessageBoxExResult Show(Form owner, String caption, String instruction, String details, String commit1, String commit2, MessageBoxIcon icon)
		{
			MessageBoxEx mb = new MessageBoxEx(instruction, details, commit1, commit2, icon);
			mb.Text = caption;
			MessageBoxExResult res;
			switch (mb.ShowDialog(owner))
			{
				case DialogResult.Retry:
					res = MessageBoxExResult.Commit1;
					break;
				case DialogResult.Ignore:
					res = MessageBoxExResult.Commit2;
					break;
				case DialogResult.Cancel:
					res = MessageBoxExResult.Cancel;
					break;
				default:
					res = MessageBoxExResult.Commit1;
					break;
			}
			return res;
		}
Пример #49
0
 public static void Show(string text)
 {
     MessageBoxEx mb = new MessageBoxEx();
     mb.Content = text;
     mb.ShowDialog();
 }