예제 #1
0
        public frmDocumentQL()
        {
            InitializeComponent();
            TaiLieuPermission.I.Init();
            InitGrid();
            InitCardView();
            Error = new DXErrorProvider();
            InitData();

            #region Gán image cho icon và set ẩn hiện của các nút
            imageList2.Images.Add(FWImageDic.ADD_IMAGE20);
            imageList2.Images.Add(FWImageDic.DELETE_IMAGE20);
            imageList2.Images.Add(FWImageDic.EDIT_IMAGE20);
            imageList2.Images.Add(FWImageDic.SAVE_IMAGE20);
            imageList2.Images.Add(FWImageDic.NO_SAVE_IMAGE20);

            imageList2.Images.Add(ProtocolVN.Framework.Win.Properties.Resources.uol);
            imageList2.Images.Add(FWImageDic.VIEW_IMAGE20);
            imageList2.Images.Add(FWImageDic.FILTER_IMAGE20);

            barManager1.Images = imageList2;
            Them.ImageIndex = 0;
            Xoa.ImageIndex = 1;
            Sua.ImageIndex = 2;
            xem.ImageIndex = 6;
            barCheckItem2.ImageIndex = 10;
            Xoa.Enabled = false;
            Sua.Enabled = false;
            barButtonItemPhanQuyenTailieu.Glyph = ResourceMan.getImage20("lvmnbQuanLyHopDong.png");
            #endregion

            Load_TreeNhomTL();

            InitSaveQueryDialog();
        }
        public frmTKChiTietTrenThuocTinh()
        {
            InitializeComponent();
            timkiem = new AppGridTimKiemBienMuc(gridViewMaster);
            IDField = BIEN_MUC.BM_ID;
            DisplayField = BIEN_MUC.MA_BANG;
            new PhieuQuanLy10BandedFix(this);
            AppCtrl.SetAutoHideEmptyBand(gridViewMaster);
            error = new DXErrorProvider();
            gridViewMaster.CustomColumnGroup += new DevExpress.XtraGrid.Views.Base.CustomColumnSortEventHandler(gridViewMaster_CustomColumnGroup);
            gridViewMaster.CustomDrawGroupRow += new DevExpress.XtraGrid.Views.Base.RowObjectCustomDrawEventHandler(gridViewMaster_CustomDrawGroupRow);
            AppCtrl.InitPrintGrid(this,false);
            AppCtrl.FormatButtonTimKiem(this);
            AppCtrl.AddRefresh(this);

            gridViewMaster.ClearGrouping();
            gridViewMaster.ClearSorting();
            gridViewMaster.SortInfo.AddRange(new DevExpress.XtraGrid.Columns.GridColumnSortInfo[] {
            new DevExpress.XtraGrid.Columns.GridColumnSortInfo(timkiem.CotNoiDung , DevExpress.Data.ColumnSortOrder.Ascending),
            new DevExpress.XtraGrid.Columns.GridColumnSortInfo(timkiem.CotSoTap, DevExpress.Data.ColumnSortOrder.Ascending)});
            gridViewMaster.CustomSummaryExists += new DevExpress.Data.CustomSummaryExistEventHandler(gridViewMaster_CustomSummaryExists);
            gridControlMaster.EmbeddedNavigator.ForeColor = Color.Red;
            Font f =gridControlMaster.EmbeddedNavigator.Font;
            gridControlMaster.EmbeddedNavigator.Font = new Font(f, FontStyle.Bold);
            gridViewMaster.ColumnFilterChanged += new EventHandler(gridViewMaster_ColumnFilterChanged);
            gridViewMaster.ShowGridMenu += new DevExpress.XtraGrid.Views.Grid.GridMenuEventHandler(gridViewMaster_ShowGridMenu);
        }
예제 #3
0
 public frmHotro(long ID,bool? IsAdd)
 {
     InitializeComponent();
     this.IsAdd = IsAdd;
     this._YEU_CAU_ID = ID;
     Error = new DXErrorProvider();
 }
예제 #4
0
 public frmPhieuThuChi(bool? isAdd,long id)
 {
     InitializeComponent();
     IsAdd = isAdd;
     PhieuID = id;
     this.errorProvider = new DXErrorProvider();
 }
        public frmChangeVitriLuuTru(string lstStringBienMuc)
        {
            InitializeComponent();
            InitColumns();
            Error = new DXErrorProvider();
            //AppCtrl.SetMaskKeNganTang(Ke, Ngan, Tang);

            Ke.Properties.Mask.EditMask = "d";
            Ke.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;

            Ngan.Properties.Mask.EditMask = "d";
            Ngan.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;

            Tang.Properties.Mask.EditMask = "d";
            Tang.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;

            Ke._Init(BIEN_MUC.TABLE_NAME, BIEN_MUC.KE, BIEN_MUC.IS_DELETE + "='N'");
            Ngan._Init(BIEN_MUC.TABLE_NAME, BIEN_MUC.NGAN, BIEN_MUC.IS_DELETE + "='N'");
            Tang._Init(BIEN_MUC.TABLE_NAME, BIEN_MUC.TANG, BIEN_MUC.IS_DELETE + "='N'");

            _lstStringBienMuc = lstStringBienMuc;

            InitGrid(_lstStringBienMuc);
            this.Load += new EventHandler(frmChangeVitriLuuTru_Load);
            this.btnOK.Click += new EventHandler(btnOK_Click);
        }
예제 #6
0
        public frmTimeInOut(object id, DateTime Ngay, bool? IsAdd)
        {
            this.IsAdd = IsAdd;
            if (this.IsAdd == true) NV_ID = this.GetNVID(FrameworkParams.currentUser.id);
            else if (this.IsAdd == false || this.IsAdd == null) NV_ID = HelpNumber.ParseInt64(id);
            InitializeComponent();
            HelpXtraForm.SetCloseForm(this, btnClose, null);
            this.NgayLamViec = Ngay;
            DateTimeServer = Ngay;
            InitAdd();
            InitGrid();
            if (IsAdd != null) InitValidation();
            if (!InitDOData(id, Ngay)) PLGUIUtil .HuyForm(this);
            InitGridData(id);
            try
            {
                InitControlState();
            }
            catch (Exception ex)
            {
                HelpSysLog.AddException(ex, "Kết thúc mẫu tin cũ không thành công.");
            }

            Error = new DXErrorProvider(this);
        }
예제 #7
0
 public frmTimeInOut(object id, DateTime Ngay, bool? IsAdd)
 {
     this.IsAdd = IsAdd;
     if (this.IsAdd == true) NV_ID = this.GetNVID(FrameworkParams.currentUser.id);
     else if (this.IsAdd == false || this.IsAdd == null) NV_ID = HelpNumber.ParseInt64(id);
     InitializeComponent();
     if (this.IsAdd == false)
         HelpXtraForm.SetCloseForm(this, btnClose, true);
     else
     {
         this.btnClose.Click += delegate(object sender, EventArgs e)
         {
             this.Close();
         };
     }
     this.NgayLamViec = Ngay;
     DateTimeServer = Ngay;
     InitAdd();
     InitGrid();
     if (IsAdd != null) InitValidation();
     if (!InitDOData(id, Ngay)) PLCtrl.HuyForm(this);
     InitGridData(id);
     InitControlState();
     Error = new DXErrorProvider(this);
     TimeSystem = DASystemParams.Instance.LoadAll(1);
     Uncategory.setEnterAsTab(this);
     btnStart.Image = FWImageDic.SAVE_IMAGE16;
     this.btnEnd.Image = FWImageDic.SAVE_IMAGE16;
     btnClose.Image = FWImageDic.CLOSE_IMAGE16;
 }
 public frmNhatKyCongViec(Int64 pccv_id)
 {
     InitializeComponent();
     this.PCCV_ID = pccv_id;
     this.NV_ID = FrameworkParams.currentUser.employee_id;
     Error = new DXErrorProvider();
     initForm();
 }
예제 #9
0
 public frmNhatKyDuAn(Int64 da_id)
 {
     InitializeComponent();
     this.DA_ID = da_id;
     this.NV_ID = FrameworkParams.currentUser.employee_id;
     Error = new DXErrorProvider();
     initForm();
 }
 public frmChangeTimeInOut()
 {
     InitializeComponent();
     Error = new DXErrorProvider();
     Init();
     do_InOut = DATimeInOut.Instance.LoadAll(-2);
     State_button(false, true);
 }
 public frmTKTongHopTrenThuocTinh()
 {
     InitializeComponent();
     IDField = BIEN_MUC.BM_ID;
     DisplayField = BIEN_MUC.MA_BANG;
     new PhieuQuanLy10BandedFix(this);
     error = new DXErrorProvider();
 }
예제 #12
0
 public frmThemMoi(long ID, bool? IsAdd)
 {
     InitializeComponent();
     WebsitesPermission.I.Init();
     Error = new DXErrorProvider();
     this.IsAdd = IsAdd;
     this._ID = ID;
     Phieu = DAWebsite.Instance.LoadAll(ID);
 }
예제 #13
0
 void Init()
 {
     this.Error = HelpInputData.GetErrorProvider(this);
     HelpInputData.SetMaxLength(
         new object[]{
             ChuDe, 200
         }
     );
 }
예제 #14
0
 public frmSendClient()
 {
     InitializeComponent();
     this.InitControls();
     this.InitDOData();
     cmbSendType.SelectedIndexChanged += new EventHandler(cmbSendType_SelectedIndexChanged);
     this.errorProvider = new DXErrorProvider();
     PLGUIUtil.setDefaultSize(this);
 }
예제 #15
0
 public frmYeuCauFax(long ID, bool? IsAdd)
 {
     InitializeComponent();
     Error = new DXErrorProvider();
     this.IsAdd = IsAdd;
     this._ID = ID;
     initform();
     this.Load += new EventHandler(frmYeuCauFax_Load);
 }
예제 #16
0
 /// <summary>
 ///  设定控件的警告信息
 /// </summary>
 /// <param name="ErrorInfo">异常信息对象提供者</param>
 /// <param name="ctl">控件对象</param>
 /// <param name="messageId">出错信息,可以用ID,可以用字符串</param>
 public static void ShowErrorInfo(DXErrorProvider ErrorInfo,  Control ctl, string messageId)
 {
   
     ErrorInfo.SetError (ctl,messageId);
     ErrorInfo.SetIconAlignment(ctl, ErrorIconAlignment.MiddleRight);
    
     //设定窗体控件的焦点
     Common.SetContorlFocus(ctl);
 }
 public frmNhatKyKhachHang(Int64 kh_id)
 {
     InitializeComponent();
     this.KH_ID = kh_id;
     this.NV_ID = FrameworkParams.currentUser.employee_id;
     Error = new DXErrorProvider();
     initForm();
     HelpXtraForm.SetCloseForm(this, buttonThoat, null);
 }
예제 #18
0
 public frmDuAn(long ID,bool? IsAdd)
 {
     InitializeComponent();
     err = new DXErrorProvider();
     this.IsAdd = IsAdd;
     this._ID = ID;
     intfrm();
     PLGUIUtil.setDefaultSize(this);
 }
예제 #19
0
 public frmThemNhom(NavBarItem CurrentBarItem,DataRow[] RowField,List<NavBarItem> ListItem,bool IsSuaNhom)
 {
     InitializeComponent();
     error = new DXErrorProvider();
     _CurrentBarItem = CurrentBarItem;
     _ListItem = ListItem;
     this._RowFiledNames = RowField;
     if (IsSuaNhom) this.Text = "Sửa thông tin nhóm";
 }
예제 #20
0
        public frmBugProduct(long ID, bool? IsAdd,params long[] ID_Bug_Reply)
        {
            InitializeComponent();

            this._ID_Bug = ID;
            if (ID_Bug_Reply.Length > 0) this._ID_Bug_Reply = ID_Bug_Reply[0];
            this.IsAdd = IsAdd;
            Error = new DXErrorProvider();
            InitForm();
        }
예제 #21
0
 public frmAddFile(long ID, bool? IsAdd)
 {
     InitializeComponent();
     TaiLieuPermission.I.Init();
     Error = new DXErrorProvider();
     Duyet._init(true);
     this.IsAdd = IsAdd;
     this._ID = ID;
     initform();
 }
예제 #22
0
 public frmNghiPhep(long ID,bool? IsAdd)
 {
     InitializeComponent();
     Error = new DXErrorProvider();
     this.IsAdd = IsAdd;
     this._ID = ID;
     Duyet._init(true);
     Phieu = DATimeInOut.Instance.LoadAll(ID);
     HelpXtraForm.SetCloseForm(this, this.btnDong, IsAdd);
 }
예제 #23
0
 public frmCapNhatTienDo(Int64 pccv_id)
 {
     InitializeComponent();
     this.PCCV_ID = pccv_id;
     this.NV_ID = FrameworkParams.currentUser.employee_id;
     Error = new DXErrorProvider();
     initForm();
     HelpGrid.SetUpperTitle(this.gridViewTienDoThuHien, "LỊCH SỬ THỰC HIỆN");
     HelpGridExt1.DisableCaptionGroupCol(this.gridViewTienDoThuHien);
 }
예제 #24
0
        public frmYeuCauInAn(long ID, bool? IsAdd)
        {
            InitializeComponent();
            Error = new DXErrorProvider();
            this.IsAdd = IsAdd;
            this._ID = ID;
            InitForm();
            InitGrid();

            this.Load += new EventHandler(frmYeuCauInAn_Load);
        }
예제 #25
0
 public frmCauHinhExt()
 {
     InitializeComponent();
     this.Error = GUIValidation.GetErrorProvider(this);
     InitList();
     InitControl();
     this.Load += delegate(object sender, EventArgs e)
     {
         HelpXtraForm.SetFix(this);
     };
 }
예제 #26
0
 public frmChotBangLuong(bool? status)
 {
     InitializeComponent();
     HelpXtraForm.SetCloseForm(this, btnDong, true);
     this.status = status;
     if (!InitDataControl()) PLGUIUtil.HuyForm(this);
     InitCaptionSave();
     Error = new DXErrorProvider(this);
     this.btnLuu.Image = FWImageDic.SAVE_IMAGE16;
     this.btnDong.Image = FWImageDic.CLOSE_IMAGE16;
 }
 public frmKeHoachLamViec(DateTime Ngaylamviec, long ID_NV)
 {
     InitializeComponent();
     Error = new DXErrorProvider();
     NgayNhap.DateTime = HelpDB.getDatabase().GetSystemCurrentDateTime();
     InitGrid();
     Duyet._init(true);
     PLTimeSheetCtrl.ChonNhanVien(NhanVien);
     NhanVien._setSelectedID(ID_NV);
     NhanVien.Enabled = false;
     btnDuyet.Text = "Duyệt";
     InnitDodata(Ngaylamviec,ID_NV);
 }
 public frmKeHoachLamViec()
 {
     InitializeComponent();
     Error = new DXErrorProvider();
     NgayNhap.DateTime = HelpDB.getDatabase().GetSystemCurrentDateTime();
     InitGrid();
     Duyet._init(true);
     PLTimeSheetCtrl.ChonNhanVien(NhanVien);
     NhanVien._setSelectedID(GetNVID(HelpNumber.ParseInt64(FrameworkParams.currentUser.id)));
     NhanVien.Enabled = false;
     btnDuyet.Text = "Duyệt";
     InnitDodata(DateTime.Now, GetNVID(HelpNumber.ParseInt64(FrameworkParams.currentUser.id)));
 }
예제 #29
0
 public frmAddFile(long ID, bool? IsAdd)
 {
     InitializeComponent();
     Error = new DXErrorProvider();
     Duyet._init(true);
     this.IsAdd = IsAdd;
     this._ID = ID;
     initform();
     HelpControl.setEnterAsTab(this);
     btnSave.Image = FWImageDic.SAVE_IMAGE16;
     btnDong.Image = FWImageDic.CLOSE_IMAGE16;
     btnThemTL.Image = FWImageDic.ADD_IMAGE16;
 }
예제 #30
0
 public frmTimeTable()
 {
     InitializeComponent();
     Error = new DXErrorProvider();
     InitGrid();
     Duyet._init(true);
     this.Is_Add = true;
     this.NV_ID = DAChiTietCongViec.Instance.GetNVID(HelpNumber.ParseInt64(FrameworkParams.currentUser.id));
     InitControl();
     //gridViewDSCongviec.OptionsView.ColumnAutoWidth = true;
     this.gridDSCongviec.DataSource = DAChiTietCongViec.Instance.GetData(NgayNhap.DateTime, -1).Tables[0];
     gridViewDSCongviec.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom;
 }
예제 #31
0
        /// <summary>
        /// Not good reset default
        /// </summary>
        /// <param name="textEdit"></param>
        /// <param name="errorMessage"></param>
        /// <returns></returns>
        public static bool ValidationTextEditNullValueWidthErrorProvider(TextEdit textEdit, string errorMessage)
        {
            if (string.IsNullOrEmpty(textEdit.Text))
            {
                DXErrorProvider dxErrorProvider = new DXErrorProvider();

                textEdit.Properties.Appearance.BorderColor = Color.DarkRed;
                textEdit.Focus();

                dxErrorProvider.SetError(textEdit, errorMessage);
                return(false);
            }

            return(true);
        }
예제 #32
0
        private void BindEditors()
        {
            errorProvider            = new DXErrorProvider(layout);
            errorProvider.DataSource = taskBindingSource;

            foreach (var item in layout.Controls)
            {
                var edit = item as BaseEdit;
                if (edit == null || edit.DataBindings.Count == 0)
                {
                    continue;
                }
                edit.Properties.EditValueChanged += (s, e) => QueueViewModelUpdate();
            }
        }
        private void propertyGridControl1_CustomDrawRowValueCell(object sender, CustomDrawRowValueCellEventArgs e)
        {
            if (e.CellValue != null)
            {
                return;
            }
            BaseRowViewInfo  rowInfo      = GetRowInfo(e);
            BaseEditViewInfo editViewInfo = GetEditorViewInfo(rowInfo, e);

            editViewInfo.ErrorIconText  = "IsNull";
            editViewInfo.ShowErrorIcon  = true;
            editViewInfo.FillBackground = true;
            editViewInfo.ErrorIcon      = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
            editViewInfo.CalcViewInfo(e.Graphics);
        }
예제 #34
0
        public static void ShowError(DXErrorProvider errorProvider, BaseEdit control, ToolTipController tipController, string errorMessage)
        {
            control.Properties.Appearance.BorderColor = Color.Red;
            control.Focus();
            control.SelectAll();
            errorProvider.SetError(control, errorMessage);
            ToolTipControllerShowEventArgs args = new ToolTipControllerShowEventArgs();

            args.ToolTipImage    = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
            args.ToolTip         = control.ErrorText;
            args.SelectedControl = control;
            args.SuperTip        = null; // here

            tipController.ShowHint(args, control.Parent.PointToScreen(control.Location));
        }
        public FrmOuverture(
            DeclarationService service)
            : this()
        {
            _service = service;

            // initialiser DXErrorProvider
            _dxErrorProvider = new DXErrorProvider
            {
                ContainerControl = lcMain
            };
            // initialiser AuthenView
            _currentView = new AuthentView();
            BindingSource();
        }
예제 #36
0
 Image ErrorIcon(DisplayableValidationResultItem resultItem, EnumDescriptor enumDescriptor)
 {
     if (resultItem.Rule != null)
     {
         var ruleType =
             ((IModelRuleBaseRuleType)
              ((IModelApplicationValidation)Application.Model).Validation.Rules[resultItem.Rule.Id]);
         if (ruleType != null)
         {
             var errorType = (ErrorType)enumDescriptor.ParseCaption(ruleType.RuleType.ToString());
             return(DXErrorProvider.GetErrorIconInternal(errorType));
         }
     }
     return(null);
 }
예제 #37
0
        private void SetValidControls(Control control, DXErrorProvider errCtl)
        {
            if (control is TextEdit ||
                control is ButtonEdit ||
                control is ImageComboBoxEdit ||
                control is LookUpEdit)
            {
                errCtl.SetError(control, string.Empty);
            }

            foreach (Control c in control.Controls)
            {
                // get any nested controls
                SetValidControls(c, errCtl);
            }
        }
예제 #38
0
        public static string ValidateFolderComboBox(ComboBoxEdit comboBox, DXErrorProvider errorProvider)
        {
            string folderPath = comboBox.Text;

            if (string.IsNullOrEmpty(folderPath))
            {
                errorProvider.SetError(comboBox, "Please enter a valid folder");
                return(null);
            }
            if (!Directory.Exists(folderPath))
            {
                errorProvider.SetError(comboBox, "The specified folder does not exist");
                return(null);
            }
            return(folderPath);
        }
예제 #39
0
        /// <summary>
        /// 检验输入控件是否没有输入,为空则显示错误图标
        /// </summary>
        /// <param name="baseEdit">输入控件</param>
        /// <param name="dxErrorProvider"></param>
        /// <returns></returns>
        public static string ValidateEditNullError(this BaseEdit baseEdit, DXErrorProvider dxErrorProvider)
        {
            string editValue = string.Concat(baseEdit.EditValue).Trim();

            if (string.IsNullOrEmpty(editValue))
            {
                //多语言支持
                string errorText = "请输入值";
                errorText = JsonLanguage.Default.GetString(errorText);

                dxErrorProvider.SetError(baseEdit, errorText);
                baseEdit.Focus();
                baseEdit.SelectAll();
            }
            return(editValue);
        }
예제 #40
0
파일: EditNotes.cs 프로젝트: ozgecoskun/GKN
        void BindEditors()
        {
            fullNameLabelControl.DataBindings.Add("Text", assignedToLookUpEdit, "Text", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
            errorProvider            = new DXErrorProvider(layout);
            errorProvider.DataSource = noteBindingSource;

            foreach (var item in layout.Controls)
            {
                BaseEdit edit = item as BaseEdit;
                if (edit == null || edit.DataBindings.Count == 0)
                {
                    continue;
                }
                edit.Properties.EditValueChanged += (s, e) => QueueViewModelUpdate();
            }
        }
예제 #41
0
        private void SimplePropertiesGrid_CustomDrawRowValueCell(object sender, CustomDrawRowValueCellEventArgs e)
        {
            var propertyName      = e.Row.Name;
            var validationMessage = string.Empty;

            var rule =
                _validationRules.Where(
                    v =>
                    v.Key == propertyName ||
                    (ParentProperty != null && ParentProperty + "." + propertyName == v.Key))
                .Select(r => r.Value)
                .FirstOrDefault();

            if (rule != null)
            {
                try
                {
                    var validationResult = rule(GetItemProperty);
                    if (!validationResult.IsValid)
                    {
                        validationMessage = string.Join(";", validationResult.Items.Select(i => i.ToString()));
                    }

                    else
                    {
                        return;
                    }
                }
                catch
                {
                    return;
                }
            }
            else
            {
                return;
            }

            var rowInfo      = GetRowInfo(e.Row);
            var editViewInfo = GetEditorViewInfo(rowInfo, e);

            editViewInfo.ErrorIconText  = validationMessage;
            editViewInfo.ShowErrorIcon  = true;
            editViewInfo.FillBackground = true;
            editViewInfo.ErrorIcon      = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
            editViewInfo.CalcViewInfo(e.Graphics);
        }
예제 #42
0
        public static bool CheckDoubleValue(this BaseEdit baseEdit, DXErrorProvider errorProvider, string error)
        {
            if (string.IsNullOrEmpty(baseEdit.Text.Trim()))
            {
                errorProvider.SetError(baseEdit, error, ErrorType.Critical);
                return(false);
            }
            else if (double.Parse(baseEdit.Text.Trim()) <= 0)
            {
                errorProvider.SetError(baseEdit, error, ErrorType.Critical);
                return(false);
            }


            errorProvider.SetError(baseEdit, string.Empty, ErrorType.None);
            return(true);
        }
예제 #43
0
        public SalidaalmacenubicacionMntItemFrm(TipoMantenimiento tipoMnt, VwSalidaalmacendet vwSalidaalmacendetRef, VwSalidaalmacenubicacion vwSalidaalmacenubicacionMnt)
        {
            InitializeComponent();

            _errorProvider = new DXErrorProvider();
            var styleController = new StyleController();

            WinFormUtils.SetStyleController(this, styleController);
            TipoMnt = tipoMnt;
            VwSalidaalmacendetRef       = vwSalidaalmacendetRef;
            VwSalidaalmacenubicacionMnt = vwSalidaalmacenubicacionMnt;

            if (FechaInicialConsultaStock == null)
            {
                EstablecerFechasIniciales();
            }
        }
예제 #44
0
 private void InitializeComponent()
 {
     this.components       = new System.ComponentModel.Container();
     this.dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).BeginInit();
     this.SuspendLayout();
     //
     // dxErrorProvider1
     //
     this.dxErrorProvider1.ContainerControl = this;
     //
     // txtMail
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
     this.Name = "txtMail";
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 public static void Event_ErrorProvider(DXErrorProvider dxErrorProvider, Control x, bool isCheck, string errorText, bool CheckTrung = false, string errorTrung = "")
 {
     if (!isCheck || string.IsNullOrEmpty(x.Text) || CheckTrung)
     {
         x.Focus();
         dxErrorProvider.SetIconAlignment(x, ErrorIconAlignment.BottomRight);
         if (CheckTrung)
         {
             dxErrorProvider.SetError(x, errorTrung);
         }
         else
         {
             dxErrorProvider.SetError(x, errorText);
         }
     }
     else
     {
         dxErrorProvider.SetError(x, null);
     }
 }
예제 #46
0
        public ModeloequipoMntFrm(int idEntidadMnt, TipoMantenimiento tipoMnt, GridControl gridParent, ModeloequipoFrm formParent) 
        {
            if (tipoMnt == TipoMantenimiento.SinEspecificar && idEntidadMnt <= 0)
            {
                throw new ArgumentException("El valor primario de la entidad no contiene un valor valido.");
            }                      
            InitializeComponent();

            IdEntidadMnt = idEntidadMnt;
            TipoMnt = tipoMnt;
            SeEliminoObjeto = false;
            GridParent = gridParent;
            FormParent = formParent;

            var styleController = new StyleController();
            WinFormUtils.SetStyleController(this, styleController);

            _errorProvider = new DXErrorProvider();

            IdUsuario = SessionApp.UsuarioSel.Idusuario;                       
        }
예제 #47
0
        private void Form1_Load(object sender, EventArgs e)
        {
            GridControl gridControl1 = new GridControl();

            Controls.Add(gridControl1);
            gridControl1.Dock = DockStyle.Fill;

            //Create a data source
            BindingList <Customer> list = new BindingList <Customer>();

            list.Add(new Customer("Andrew", "Weber"));
            list.Add(new Customer("", "Kovar")); // An invalid first name
            list.Add(new Customer("Kathy", "")); // An invalid last name

            BindingSource bindingSource1 = new BindingSource(list, "");

            gridControl1.DataSource = bindingSource1;

            // To show data source errors in standalone editors, bind a DXErrorProvider to the data source.
            DXErrorProvider dxErrorProvider1 = new DXErrorProvider(this);

            dxErrorProvider1.DataSource = bindingSource1;

            // Create a TextEdit control and bind it to the First Name field
            TextEdit textEdit1 = new TextEdit();

            textEdit1.DataBindings.Add(new Binding("EditValue", bindingSource1, "FirstName"));

            LabelControl label = new LabelControl();

            label.Padding = new Padding(0, 30, 0, 5);
            label.Text    = "TextEdit bound to FirstName field:";

            Controls.Add(label);
            label.Dock = DockStyle.Bottom;

            Controls.Add(textEdit1);
            textEdit1.Dock = DockStyle.Bottom;
        }
예제 #48
0
 public static void Validate_DateNotEqual(BaseEdit control, DateTime controlDate, DateTime compareDate, ref DXErrorProvider ctlErrorProvider)
 {
     if (control.Text == null || control.Text.Trim().Length == 0)
     {
         ctlErrorProvider.SetError(control, "This field is Invalid", ErrorType.Critical);
     }
     else
     {
         if (DateTime.Compare(controlDate.Date, compareDate.Date) != 0)
         {
             ctlErrorProvider.SetError(control, "This field is Invalid", ErrorType.Critical);
         }
         else
         {
             ctlErrorProvider.SetError(control, "");
         }
     }
 }
예제 #49
0
        public static bool Validate_ValueOverAndSTDMaching(BaseEdit control, int compareValue, int stdValue, ref DXErrorProvider ctlErrorProvider)
        {
            if (control.Text == null || control.Text.Trim().Length == 0)
            {
                ctlErrorProvider.SetError(control, "This field is Invalid", ErrorType.Critical);
                return(false);
            }
            else
            {
                int controlValue = Convert.ToInt32(control.EditValue);
                if (controlValue <= 0)
                {
                    ctlErrorProvider.SetError(control, "Qty can't be zero", ErrorType.Critical);
                    return(false);
                }

                if (controlValue >= compareValue)
                {
                    ctlErrorProvider.SetError(control, "Qty must be less than Label Qty", ErrorType.Critical);
                    return(false);
                }
                //Modified by pravin on 12-10-2010
                //if ((controlValue % stdValue) != 0)
                //{
                //    ctlErrorProvider.SetError(control, "Qty must be multiple of " + stdValue.ToString(), ErrorType.Critical);
                //    return false;
                //}


                //no error
                ctlErrorProvider.SetError(control, "");
                return(true);
            }
        }
예제 #50
0
 public static void Validate_EmptyOrNotMorethan(BaseEdit control, int compareValue, ref DXErrorProvider ctlErrorProvider)
 {
     if (control.Text == null || control.Text.Trim().Length == 0 || Convert.ToInt32(control.EditValue, NumberFormatInfo.InvariantInfo) <= compareValue)
     {
         ctlErrorProvider.SetError(control, "This field is Invalid", ErrorType.Critical);
     }
     else
     {
         ctlErrorProvider.SetError(control, "");
     }
 }
예제 #51
0
 public static void Validate_EmptyOrNotEqual(BaseEdit control, string compareValue, ref DXErrorProvider ctlErrorProvider)
 {
     if (control.Text == null || control.Text.Trim().Length == 0 || !control.Text.Equals(compareValue))
     {
         ctlErrorProvider.SetError(control, "This field is Invalid", ErrorType.Critical);
     }
     else
     {
         ctlErrorProvider.SetError(control, "");
     }
 }
예제 #52
0
 public ErrorProviderHelper(Control parentControl, DXErrorProvider errorProvider)
 {
     Init(parentControl);
     m_ErrorProvider = errorProvider;
 }
예제 #53
0
 public static void SetErrorFormat(this DXErrorProvider errorProvider, Control control, string errorText, params object[] args)
 {
     errorProvider.SetError(control, string.Format(errorText, args));
 }
예제 #54
0
        public static bool ValidateFieldsNotEmpty(Control controlContenedor, DXErrorProvider errorProvider)
        {
            bool estado = true;
            int  nError = 0;

            foreach (Control control in controlContenedor.Controls)
            {
                var textEdit = control as TextEdit;
                if (textEdit != null && textEdit.Tag != null)
                {
                    if (textEdit.EditorTypeName == "TextEdit" && textEdit.Name.Substring(0, 1) == "i")
                    {
                        if (string.IsNullOrEmpty(textEdit.Text.Trim()))
                        {
                            errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                            errorProvider.SetError(control, textEdit.Tag.ToString());
                            nError = nError + 1;
                        }
                        else
                        {
                            errorProvider.SetError(control, string.Empty);
                        }
                    }

                    if (textEdit.EditorTypeName == "TextEdit" && textEdit.Name.Substring(0, 1) == "n")
                    {
                        if ((decimal)textEdit.EditValue == 0.00m)
                        {
                            errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                            errorProvider.SetError(control, textEdit.Tag.ToString());
                            nError = nError + 1;
                        }
                        else
                        {
                            errorProvider.SetError(control, string.Empty);
                        }
                    }

                    if (textEdit.EditorTypeName == "TextEdit" && textEdit.Name.Substring(0, 1) == "e")
                    {
                        if ((int)textEdit.EditValue == 0)
                        {
                            errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                            errorProvider.SetError(control, textEdit.Tag.ToString());
                            nError = nError + 1;
                        }
                        else
                        {
                            errorProvider.SetError(control, string.Empty);
                        }
                    }
                }

                var lookUpEdit = control as LookUpEdit;
                if (lookUpEdit != null)
                {
                    if (lookUpEdit.EditorTypeName == "LookUpEdit")
                    {
                        if (lookUpEdit.Tag != null)
                        {
                            if (lookUpEdit.EditValue == null)
                            {
                                errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                                errorProvider.SetError(control, lookUpEdit.Tag.ToString());
                                nError = nError + 1;
                            }
                            else
                            {
                                errorProvider.SetError(control, string.Empty);
                            }
                        }
                    }
                }

                var comboBoxEdit = control as ComboBoxEdit;
                if (comboBoxEdit != null)
                {
                    if (comboBoxEdit.EditorTypeName == "ComboBoxEdit")
                    {
                        if (comboBoxEdit.Tag != null)
                        {
                            if (comboBoxEdit.Text.Length == 0)
                            {
                                errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                                errorProvider.SetError(control, comboBoxEdit.Tag.ToString());
                                nError = nError + 1;
                            }
                            else
                            {
                                errorProvider.SetError(control, string.Empty);
                            }
                        }
                    }
                }

                var memoEdit = control as MemoEdit;
                if (memoEdit != null)
                {
                    if (memoEdit.EditorTypeName == "MemoEdit")
                    {
                        if (memoEdit.Tag != null)
                        {
                            if (memoEdit.EditValue == null)
                            {
                                errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                                errorProvider.SetError(control, memoEdit.Tag.ToString());
                                nError = nError + 1;
                            }
                            else
                            {
                                errorProvider.SetError(control, string.Empty);
                            }
                        }
                    }
                }

                var dateEdit = control as DateEdit;
                if (dateEdit != null)
                {
                    if (dateEdit.EditorTypeName == "DateEdit")
                    {
                        if (dateEdit.Tag != null)
                        {
                            if (dateEdit.EditValue == null)
                            {
                                errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                                errorProvider.SetError(control, dateEdit.Tag.ToString());
                                nError = nError + 1;
                            }
                            else
                            {
                                errorProvider.SetError(control, string.Empty);
                            }
                        }
                    }
                }

                var searchLookUpEdit = control as SearchLookUpEdit;
                if (searchLookUpEdit != null)
                {
                    if (searchLookUpEdit.EditorTypeName == "SearchLookUpEdit")
                    {
                        if (searchLookUpEdit.Tag != null)
                        {
                            if (searchLookUpEdit.EditValue == null || Convert.ToInt32(searchLookUpEdit.EditValue) == 0)
                            {
                                errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                                errorProvider.SetError(control, searchLookUpEdit.Tag.ToString());
                                nError = nError + 1;
                            }
                            else
                            {
                                errorProvider.SetError(control, string.Empty);
                            }
                        }
                    }
                }

                var buttonEdit = control as ButtonEdit;
                if (buttonEdit != null)
                {
                    if (buttonEdit.EditorTypeName == "ButtonEdit")
                    {
                        if (buttonEdit.Tag != null)
                        {
                            //if (buttonEdit.EditValue == null || string.IsNullOrEmpty((string)buttonEdit.EditValue))
                            if (buttonEdit.Text.Trim().Length == 0)
                            {
                                errorProvider.SetIconAlignment(control, ErrorIconAlignment.MiddleLeft);
                                errorProvider.SetError(control, buttonEdit.Tag.ToString());
                                nError = nError + 1;
                            }
                            else
                            {
                                errorProvider.SetError(control, string.Empty);
                            }
                        }
                    }
                }
            }

            if (nError > 0)
            {
                estado = false;
            }

            return(estado);
        }
예제 #55
0
 public static bool ValidateControl(this Control control, object value, string regex, DXErrorProvider dxErrorProvider, string messageError = "Vui lòng nhập giá trị")
 {
     if (value == null || string.IsNullOrEmpty(value.ToString()) || new Regex(regex).Match(value.ToString()).Success == false)
     {
         dxErrorProvider.SetError(control, messageError);
         return(false);
     }
     return(true);
 }
예제 #56
0
 private void InitializeComponent()
 {
     this.layoutControl1      = new DevExpress.XtraLayout.LayoutControl();
     this.spinEditWidth       = new DevExpress.XtraEditors.SpinEdit();
     this.radioGroup1         = new DevExpress.XtraEditors.RadioGroup();
     this.txtFPS              = new DevExpress.XtraEditors.SpinEdit();
     this.btnBrowse           = new DevExpress.XtraEditors.SimpleButton();
     this.spinEditHeight      = new DevExpress.XtraEditors.SpinEdit();
     this.txtOpenFile         = new DevExpress.XtraEditors.TextEdit();
     this.btnOK               = new DevExpress.XtraEditors.SimpleButton();
     this.btnCancel           = new DevExpress.XtraEditors.SimpleButton();
     this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
     this.layoutControlItem1  = new DevExpress.XtraLayout.LayoutControlItem();
     this.layoutControlItem2  = new DevExpress.XtraLayout.LayoutControlItem();
     this.layoutControlItem3  = new DevExpress.XtraLayout.LayoutControlItem();
     this.layoutControlItem5  = new DevExpress.XtraLayout.LayoutControlItem();
     this.emptySpaceItem1     = new DevExpress.XtraLayout.EmptySpaceItem();
     this.emptySpaceItem2     = new DevExpress.XtraLayout.EmptySpaceItem();
     this.layoutControlItem6  = new DevExpress.XtraLayout.LayoutControlItem();
     this.emptySpaceItem3     = new DevExpress.XtraLayout.EmptySpaceItem();
     this.layoutControlItem4  = new DevExpress.XtraLayout.LayoutControlItem();
     this.layoutControlItem7  = new DevExpress.XtraLayout.LayoutControlItem();
     this.layoutControlItem8  = new DevExpress.XtraLayout.LayoutControlItem();
     this.dxErrorProvider1    = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
     this.layoutControl1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.spinEditWidth.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioGroup1.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.txtFPS.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.spinEditHeight.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.txtOpenFile.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).BeginInit();
     this.SuspendLayout();
     //
     // layoutControl1
     //
     this.layoutControl1.Controls.Add(this.spinEditWidth);
     this.layoutControl1.Controls.Add(this.radioGroup1);
     this.layoutControl1.Controls.Add(this.txtFPS);
     this.layoutControl1.Controls.Add(this.btnBrowse);
     this.layoutControl1.Controls.Add(this.spinEditHeight);
     this.layoutControl1.Controls.Add(this.txtOpenFile);
     this.layoutControl1.Controls.Add(this.btnOK);
     this.layoutControl1.Controls.Add(this.btnCancel);
     this.layoutControl1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.layoutControl1.Location = new System.Drawing.Point(0, 0);
     this.layoutControl1.Name     = "layoutControl1";
     this.layoutControl1.Root     = this.layoutControlGroup1;
     this.layoutControl1.Size     = new System.Drawing.Size(434, 178);
     this.layoutControl1.TabIndex = 0;
     this.layoutControl1.Text     = "layoutControl1";
     //
     // spinEditWidth
     //
     this.spinEditWidth.EditValue = new decimal(new int[] {
         1024,
         0,
         0,
         0
     });
     this.spinEditWidth.Enabled  = false;
     this.spinEditWidth.Location = new System.Drawing.Point(39, 118);
     this.spinEditWidth.Name     = "spinEditWidth";
     this.spinEditWidth.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton()
     });
     this.spinEditWidth.Properties.MaxValue = new decimal(new int[] {
         10000000,
         0,
         0,
         0
     });
     this.spinEditWidth.Properties.MinValue = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.spinEditWidth.Size            = new System.Drawing.Size(176, 22);
     this.spinEditWidth.StyleController = this.layoutControl1;
     this.spinEditWidth.TabIndex        = 4;
     //
     // radioGroup1
     //
     this.radioGroup1.EditValue = 0;
     this.radioGroup1.Location  = new System.Drawing.Point(39, 12);
     this.radioGroup1.Name      = "radioGroup1";
     this.radioGroup1.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.RadioGroupItem[] {
         new DevExpress.XtraEditors.Controls.RadioGroupItem(0, "视频"),
         new DevExpress.XtraEditors.Controls.RadioGroupItem(1, "序列帧")
     });
     this.radioGroup1.Size                  = new System.Drawing.Size(383, 50);
     this.radioGroup1.StyleController       = this.layoutControl1;
     this.radioGroup1.TabIndex              = 0;
     this.radioGroup1.SelectedIndexChanged += new System.EventHandler(this.radioGroup1_SelectedIndexChanged);
     //
     // txtFPS
     //
     this.txtFPS.EditValue = new decimal(new int[] {
         25,
         0,
         0,
         0
     });
     this.txtFPS.Location = new System.Drawing.Point(39, 92);
     this.txtFPS.Name     = "txtFPS";
     this.txtFPS.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton()
     });
     this.txtFPS.Properties.MaxValue = new decimal(new int[] {
         30,
         0,
         0,
         0
     });
     this.txtFPS.Properties.MinValue = new decimal(new int[] {
         20,
         0,
         0,
         0
     });
     this.txtFPS.Size            = new System.Drawing.Size(383, 22);
     this.txtFPS.StyleController = this.layoutControl1;
     this.txtFPS.TabIndex        = 3;
     this.txtFPS.ToolTip         = "请输入20~30之间的数";
     this.txtFPS.Validating     += new System.ComponentModel.CancelEventHandler(this.txtFPS_Validating);
     //
     // btnBrowse
     //
     this.btnBrowse.Location        = new System.Drawing.Point(351, 66);
     this.btnBrowse.Name            = "btnBrowse";
     this.btnBrowse.Size            = new System.Drawing.Size(71, 22);
     this.btnBrowse.StyleController = this.layoutControl1;
     this.btnBrowse.TabIndex        = 2;
     this.btnBrowse.Text            = "浏览";
     this.btnBrowse.Click          += new System.EventHandler(this.btnBrowse_Click);
     //
     // spinEditHeight
     //
     this.spinEditHeight.EditValue = new decimal(new int[] {
         1024,
         0,
         0,
         0
     });
     this.spinEditHeight.Enabled  = false;
     this.spinEditHeight.Location = new System.Drawing.Point(246, 118);
     this.spinEditHeight.Name     = "spinEditHeight";
     this.spinEditHeight.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton()
     });
     this.spinEditHeight.Properties.MaxValue = new decimal(new int[] {
         10000000,
         0,
         0,
         0
     });
     this.spinEditHeight.Properties.MinValue = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.spinEditHeight.Size            = new System.Drawing.Size(176, 22);
     this.spinEditHeight.StyleController = this.layoutControl1;
     this.spinEditHeight.TabIndex        = 5;
     //
     // txtOpenFile
     //
     this.txtOpenFile.Location        = new System.Drawing.Point(39, 66);
     this.txtOpenFile.Name            = "txtOpenFile";
     this.txtOpenFile.Size            = new System.Drawing.Size(308, 22);
     this.txtOpenFile.StyleController = this.layoutControl1;
     this.txtOpenFile.TabIndex        = 1;
     //
     // btnOK
     //
     this.btnOK.Location        = new System.Drawing.Point(206, 144);
     this.btnOK.Name            = "btnOK";
     this.btnOK.Size            = new System.Drawing.Size(86, 22);
     this.btnOK.StyleController = this.layoutControl1;
     this.btnOK.TabIndex        = 6;
     this.btnOK.Text            = "确定";
     this.btnOK.Click          += new System.EventHandler(this.btnOK_Click);
     //
     // btnCancel
     //
     this.btnCancel.DialogResult    = System.Windows.Forms.DialogResult.Cancel;
     this.btnCancel.Location        = new System.Drawing.Point(306, 144);
     this.btnCancel.Name            = "btnCancel";
     this.btnCancel.Size            = new System.Drawing.Size(88, 22);
     this.btnCancel.StyleController = this.layoutControl1;
     this.btnCancel.TabIndex        = 7;
     this.btnCancel.Text            = "取消";
     this.btnCancel.Click          += new System.EventHandler(this.btnCancel_Click);
     //
     // layoutControlGroup1
     //
     this.layoutControlGroup1.CustomizationFormText       = "layoutControlGroup1";
     this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
     this.layoutControlGroup1.GroupBordersVisible         = false;
     this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
         this.layoutControlItem1,
         this.layoutControlItem2,
         this.layoutControlItem3,
         this.layoutControlItem5,
         this.emptySpaceItem1,
         this.emptySpaceItem2,
         this.layoutControlItem6,
         this.emptySpaceItem3,
         this.layoutControlItem4,
         this.layoutControlItem7,
         this.layoutControlItem8
     });
     this.layoutControlGroup1.Location    = new System.Drawing.Point(0, 0);
     this.layoutControlGroup1.Name        = "Root";
     this.layoutControlGroup1.Size        = new System.Drawing.Size(434, 178);
     this.layoutControlGroup1.Text        = "Root";
     this.layoutControlGroup1.TextVisible = false;
     //
     // layoutControlItem1
     //
     this.layoutControlItem1.Control = this.txtOpenFile;
     this.layoutControlItem1.CustomizationFormText = "layoutControlItem1";
     this.layoutControlItem1.Location = new System.Drawing.Point(0, 54);
     this.layoutControlItem1.Name     = "layoutControlItem1";
     this.layoutControlItem1.Size     = new System.Drawing.Size(339, 26);
     this.layoutControlItem1.Text     = "位置";
     this.layoutControlItem1.TextSize = new System.Drawing.Size(24, 14);
     //
     // layoutControlItem2
     //
     this.layoutControlItem2.Control = this.btnBrowse;
     this.layoutControlItem2.CustomizationFormText = "layoutControlItem2";
     this.layoutControlItem2.Location = new System.Drawing.Point(339, 54);
     this.layoutControlItem2.Name     = "layoutControlItem2";
     this.layoutControlItem2.Size     = new System.Drawing.Size(75, 26);
     this.layoutControlItem2.Text     = "layoutControlItem2";
     this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
     this.layoutControlItem2.TextToControlDistance = 0;
     this.layoutControlItem2.TextVisible           = false;
     //
     // layoutControlItem3
     //
     this.layoutControlItem3.Control = this.txtFPS;
     this.layoutControlItem3.CustomizationFormText = "帧数";
     this.layoutControlItem3.Location = new System.Drawing.Point(0, 80);
     this.layoutControlItem3.Name     = "layoutControlItem3";
     this.layoutControlItem3.Size     = new System.Drawing.Size(414, 26);
     this.layoutControlItem3.Text     = "帧数";
     this.layoutControlItem3.TextSize = new System.Drawing.Size(24, 14);
     //
     // layoutControlItem5
     //
     this.layoutControlItem5.Control = this.btnOK;
     this.layoutControlItem5.CustomizationFormText = "layoutControlItem5";
     this.layoutControlItem5.Location = new System.Drawing.Point(194, 132);
     this.layoutControlItem5.Name     = "layoutControlItem5";
     this.layoutControlItem5.Size     = new System.Drawing.Size(90, 26);
     this.layoutControlItem5.Text     = "layoutControlItem5";
     this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
     this.layoutControlItem5.TextToControlDistance = 0;
     this.layoutControlItem5.TextVisible           = false;
     //
     // emptySpaceItem1
     //
     this.emptySpaceItem1.AllowHotTrack         = false;
     this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1";
     this.emptySpaceItem1.Location = new System.Drawing.Point(0, 132);
     this.emptySpaceItem1.Name     = "emptySpaceItem1";
     this.emptySpaceItem1.Size     = new System.Drawing.Size(194, 26);
     this.emptySpaceItem1.Text     = "emptySpaceItem1";
     this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
     //
     // emptySpaceItem2
     //
     this.emptySpaceItem2.AllowHotTrack         = false;
     this.emptySpaceItem2.CustomizationFormText = "emptySpaceItem2";
     this.emptySpaceItem2.Location = new System.Drawing.Point(284, 132);
     this.emptySpaceItem2.Name     = "emptySpaceItem2";
     this.emptySpaceItem2.Size     = new System.Drawing.Size(10, 26);
     this.emptySpaceItem2.Text     = "emptySpaceItem2";
     this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
     //
     // layoutControlItem6
     //
     this.layoutControlItem6.Control = this.btnCancel;
     this.layoutControlItem6.CustomizationFormText = "layoutControlItem6";
     this.layoutControlItem6.Location = new System.Drawing.Point(294, 132);
     this.layoutControlItem6.Name     = "layoutControlItem6";
     this.layoutControlItem6.Size     = new System.Drawing.Size(92, 26);
     this.layoutControlItem6.Text     = "layoutControlItem6";
     this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
     this.layoutControlItem6.TextToControlDistance = 0;
     this.layoutControlItem6.TextVisible           = false;
     //
     // emptySpaceItem3
     //
     this.emptySpaceItem3.AllowHotTrack         = false;
     this.emptySpaceItem3.CustomizationFormText = "emptySpaceItem3";
     this.emptySpaceItem3.Location = new System.Drawing.Point(386, 132);
     this.emptySpaceItem3.Name     = "emptySpaceItem3";
     this.emptySpaceItem3.Size     = new System.Drawing.Size(28, 26);
     this.emptySpaceItem3.Text     = "emptySpaceItem3";
     this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
     //
     // layoutControlItem4
     //
     this.layoutControlItem4.Control = this.radioGroup1;
     this.layoutControlItem4.CustomizationFormText = "类型";
     this.layoutControlItem4.Location = new System.Drawing.Point(0, 0);
     this.layoutControlItem4.Name     = "layoutControlItem4";
     this.layoutControlItem4.Size     = new System.Drawing.Size(414, 54);
     this.layoutControlItem4.Text     = "类型";
     this.layoutControlItem4.TextSize = new System.Drawing.Size(24, 14);
     //
     // layoutControlItem7
     //
     this.layoutControlItem7.Control = this.spinEditWidth;
     this.layoutControlItem7.CustomizationFormText = "宽度";
     this.layoutControlItem7.Location = new System.Drawing.Point(0, 106);
     this.layoutControlItem7.Name     = "layoutControlItem7";
     this.layoutControlItem7.Size     = new System.Drawing.Size(207, 26);
     this.layoutControlItem7.Text     = "宽度";
     this.layoutControlItem7.TextSize = new System.Drawing.Size(24, 14);
     //
     // layoutControlItem8
     //
     this.layoutControlItem8.Control = this.spinEditHeight;
     this.layoutControlItem8.CustomizationFormText = "高度";
     this.layoutControlItem8.Location = new System.Drawing.Point(207, 106);
     this.layoutControlItem8.Name     = "layoutControlItem8";
     this.layoutControlItem8.Size     = new System.Drawing.Size(207, 26);
     this.layoutControlItem8.Text     = "高度";
     this.layoutControlItem8.TextSize = new System.Drawing.Size(24, 14);
     //
     // dxErrorProvider1
     //
     this.dxErrorProvider1.ContainerControl = this;
     //
     // ExportVideoDlg
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(434, 178);
     this.Controls.Add(this.layoutControl1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "ExportVideoDlg";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text            = "导出视频(序列帧图)";
     ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
     this.layoutControl1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.spinEditWidth.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.radioGroup1.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.txtFPS.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.spinEditHeight.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.txtOpenFile.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).EndInit();
     this.ResumeLayout(false);
 }
예제 #57
0
        private void DoLogin()
        {
            //******************
            //* Força validação
            //******************
            if (!this.vprLogin.Validate())
            {
                this.popLogin.Show();
                return;
            }

            //****************
            //* Realiza login
            //****************
            string LoginResult = UserLogin.Login(this.txtEmpresa.Text, this.txtUsuario.Text, this.txtSenha.Text, CommonDesktop.GetMasterConnectionString());

            //****************************
            //* O login foi bem sucedido?
            //****************************
            if (LoginResult == string.Empty)
            {
                //************************
                //* Salva ou apaga dados?
                //************************
                if (this.chkManterConectado.Checked)
                {
                    SaveLoginData();
                }
                else
                {
                    ClearLoginData();
                }

                //***************************************
                //* Atualiza dados do usuário e finaliza
                //***************************************
                LoginInfoUpdate();
                popLogin.Hide();
                return;
            }

            //*************************************************
            //* Exibe falha de acordo com a mensagem - SISTEMA
            //*************************************************
            if (LoginResult.StartsWith("sistema:"))
            {
                this.txtEmpresa.ErrorText          = LoginResult.Substring(8).Trim();
                this.txtEmpresa.ErrorIconAlignment = ErrorIconAlignment.MiddleLeft;
                this.txtEmpresa.ErrorIcon          = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
                this.popLogin.Show();
                return;
            }

            //*************************************************
            //* Exibe falha de acordo com a mensagem - EMPRESA
            //*************************************************
            if (LoginResult.StartsWith("empresa:"))
            {
                this.txtEmpresa.ErrorText          = LoginResult.Substring(9).Trim();
                this.txtEmpresa.ErrorIconAlignment = ErrorIconAlignment.MiddleLeft;
                this.txtEmpresa.ErrorIcon          = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
                this.popLogin.Show();
                return;
            }

            //*************************************************
            //* Exibe falha de acordo com a mensagem - USUARIO
            //*************************************************
            if (LoginResult.StartsWith("usuario:"))
            {
                this.txtUsuario.ErrorText          = LoginResult.Substring(8).Trim();
                this.txtUsuario.ErrorIconAlignment = ErrorIconAlignment.MiddleLeft;
                this.txtUsuario.ErrorIcon          = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
                this.popLogin.Show();
                return;
            }

            //***********************************************
            //* Exibe falha de acordo com a mensagem - SENHA
            //***********************************************
            if (LoginResult.StartsWith("senha:"))
            {
                this.txtSenha.ErrorText          = LoginResult.Substring(6).Trim();
                this.txtSenha.ErrorIconAlignment = ErrorIconAlignment.MiddleLeft;
                this.txtSenha.ErrorIcon          = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical);
                this.popLogin.Show();
                return;
            }

            //*******************************************
            //* Houve falha de conexão ao banco de dados
            //*******************************************
            if (UserLogin.Error)
            {
                //**************************
                //* Exibe mensagem de falha
                //**************************
                string Message = "Ocorreu falha ao conectar ao banco de dados.\r\n\r\n";
                Message += "A mensagem retornar pelo sistema foi:\r\n";
                Message += UserLogin.ErrorText + "\r\n\r\n";
                Message += "O sessão será encerrada.";
                MessageBox.Show(Message, "Falha na inicialização", MessageBoxButtons.OK, MessageBoxIcon.Error);
                cmdSair.PerformClick();
            }
        }
예제 #58
0
 public EditExplicitFormulaView()
 {
     InitializeComponent();
     _warningProvider = new DXErrorProvider(this);
     _screenBinder    = new ScreenBinder <ExplicitFormulaBuilderDTO>();
 }
예제 #59
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="errorProvider"></param>
 /// <param name="control"></param>
 public static void SetColorDefaultTextControl(DXErrorProvider errorProvider, BaseEdit control)
 {
     errorProvider.ClearErrors();
     control.Properties.Appearance.BorderColor = Color.LightGray;
 }
예제 #60
0
 protected void ClearValidControls(Control control, ref DXErrorProvider errCtl)
 {
     this.SetValidControls(control, errCtl);
 }