当前位置: 首页>>代码示例>>C#>>正文


C# TextEdit类代码示例

本文整理汇总了C#中TextEdit的典型用法代码示例。如果您正苦于以下问题:C# TextEdit类的具体用法?C# TextEdit怎么用?C# TextEdit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TextEdit类属于命名空间,在下文中一共展示了TextEdit类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TextControlNotNull

 public static void TextControlNotNull(TextEdit textEdit, string title)
 {
     textEdit.Properties.Appearance.BorderColor = System.Drawing.Color.Red; 
     MessageBox.Show(string.Format("{0} không được để trống!", title), Resources.MessageBoxErrorMessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
     textEdit.Focus();
     textEdit.SelectAll();
 }
开发者ID:cuongpv88,项目名称:work,代码行数:7,代码来源:Ultils.cs

示例2: ClearControl

 private void ClearControl(TextEdit textEdit)
 {
     if ( textEdit.Text == CatalogUsers.EMPTY_PASSWORD && !textEdit.Properties.ReadOnly )
         {
         textEdit.Text = "";
         }
 }
开发者ID:AramisIT,项目名称:Himtrans,代码行数:7,代码来源:UsersItemForm.cs

示例3: EditTextErrorMessage

 public static void EditTextErrorMessage(TextEdit textEdit, string title)
 {
     textEdit.Properties.Appearance.BorderColor = System.Drawing.Color.Red;
     MessageBox.Show(string.Format("Error! {0}", title), Resources.MessageBoxErrorMessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
     textEdit.Focus();
     textEdit.SelectAll();
 }
开发者ID:cuongpv88,项目名称:work,代码行数:7,代码来源:Ultils.cs

示例4: CheckEditor

 public virtual void CheckEditor(TextEdit editor)
 {
     if (string.IsNullOrWhiteSpace(editor.Text))
       {
     ErrorProvider.SetError(editor, "Bitte einen Wert angeben", ErrorType.Warning);
       }
 }
开发者ID:Niedda,项目名称:Impressio,代码行数:7,代码来源:ControlBase.cs

示例5: SetColorErrorTextControl

 public static void SetColorErrorTextControl(TextEdit textEdit, string title)
 {
     textEdit.Properties.Appearance.BorderColor = System.Drawing.Color.Red;
     textEdit.Focus();
     textEdit.SelectAll();
     MessageBox.Show(title, Resources.MessageBoxErrorMessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
 }
开发者ID:cuongpv88,项目名称:work,代码行数:7,代码来源:Ultils.cs

示例6: SelectCoDK

 /*Lấy ra dòng dữ liệu và gán vào các hộp text*/
 public void SelectCoDK(DNhanVien DNV, TextEdit txt1, TextEdit txt2
                           , TextEdit txt3, TextEdit txt4, ComboBoxEdit cb1
                           , TextEdit txt5, TextEdit txt6, TextEdit txt7, TextEdit txt8)
 {
     try
     {
         string path = string.Format("Select * From NhanVien Where MaNhanVien='{0}'", DNV.MaNV);
         DataTable dtt = DA.TbView(path);
         txt1.EditValue = dtt.Rows[0]["MaNhanVien"].ToString().Trim();
         txt2.EditValue = dtt.Rows[0]["TenNhanVien"].ToString().Trim();
         txt3.EditValue = dtt.Rows[0]["DiaChi"].ToString().Trim();
         txt4.EditValue = dtt.Rows[0]["SoDienThoai"].ToString().Trim();
         cb1.EditValue = dtt.Rows[0]["ChucVu"].ToString().Trim();
         txt5.EditValue = dtt.Rows[0]["TenDangNhap"].ToString().Trim();
         txt5.EditValue = dtt.Rows[0]["MatKhau"].ToString().Trim();
         txt5.EditValue = dtt.Rows[0]["AnhDaiDien"].ToString().Trim();
         txt5.EditValue = dtt.Rows[0]["Site"].ToString().Trim();
         dtt = null;
     }
     catch
     {
         XtraMessageBox.Show("Vui lòng kích vào lưới thông tin chọn thông tin cần sửa !", "Chú ý !",
                                         MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
开发者ID:NguyenManh94,项目名称:ManagerAirTicket,代码行数:26,代码来源:BNhanVien.cs

示例7: SetEnableTimeStyle

 public void SetEnableTimeStyle(TextEdit textEdit, bool enableTimeStyle)
 {
     if (!list.ContainsKey(textEdit))
     {
         list.Add(textEdit, new TextEdit_TimeStylePara() { EnableTimeStyle = enableTimeStyle });
     }
     else
     {
         list[textEdit].EnableTimeStyle = enableTimeStyle;
     }
     if (enableTimeStyle)
     {
         textEdit.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
         textEdit.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
         textEdit.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime;
         string formatstring = list[textEdit].TimeStyleFormatString;
         if (string.IsNullOrWhiteSpace(formatstring))
         {
             textEdit.Properties.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
             textEdit.Properties.EditFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
             textEdit.Properties.Mask.EditMask = "yyyy-MM-dd HH:mm:ss";
         }
         else
         {
             textEdit.Properties.DisplayFormat.FormatString = formatstring;
             textEdit.Properties.EditFormat.FormatString = formatstring;
             textEdit.Properties.Mask.EditMask = formatstring;
         }
     }
 }
开发者ID:dishiyicijinqiu,项目名称:FengSharp,代码行数:30,代码来源:TextEdit_TimeStyle.cs

示例8: SelectCoDK

 /*Lấy ra dòng dữ liệu và gán vào các hộp text*/
 public void SelectCoDK(DChuyenBay DCB, TextEdit txtMaCB, ComboBoxEdit cbMaDB, ComboBoxEdit cbMaMB
                           , TimeEdit dtGioBay, TextEdit txtDiemDi, ComboBoxEdit cbDiemDen
                           , DateTimePicker dtNgayDi, DateTimePicker dtNgayDen, TextEdit txtVeL1,
                             TextEdit txtVeL2, TextEdit txtGhiChu)
 {
     try
     {
         string path = string.Format("Select * From ChuyenBay Where MaChuyenBay='{0}'", DCB.MCB);
         DataTable dtt = DA.TbView(path);
         txtMaCB.EditValue = dtt.Rows[0]["MaChuyenBay"].ToString().Trim();
         cbMaDB.EditValue = dtt.Rows[0]["MaDuongBay"].ToString().Trim();
         cbMaMB.EditValue = dtt.Rows[0]["MaMayBay"].ToString().Trim();
         dtGioBay.Text = dtt.Rows[0]["GioBay"].ToString().Trim();
         txtDiemDi.EditValue = dtt.Rows[0]["DiemDi"].ToString().Trim();
         cbDiemDen.EditValue = dtt.Rows[0]["DiemDen"].ToString().Trim();
         dtNgayDi.Text = dtt.Rows[0]["NgayDi"].ToString().Trim();
         dtNgayDen.Text = dtt.Rows[0]["NgayDen"].ToString().Trim();
         txtVeL1.EditValue = dtt.Rows[0]["SLV_Loai1"].ToString().Trim();
         txtVeL2.EditValue = dtt.Rows[0]["SLV_Loai2"].ToString().Trim();
         txtGhiChu.EditValue = dtt.Rows[0]["GhiChu"].ToString().Trim();
         //return dt.TbView(path);
     }
     catch
     {
         XtraMessageBox.Show("Vui lòng kích vào lưới thông tin chọn thông tin cần sửa !", "Chú ý !",
                                         MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
开发者ID:NguyenManh94,项目名称:ManagerAirTicket,代码行数:29,代码来源:BChuyenBay.cs

示例9: GetTimeStyleFormatString

 public string GetTimeStyleFormatString(TextEdit textEdit)
 {
     if (list.ContainsKey(textEdit))
     {
         return list[textEdit].TimeStyleFormatString;
     }
     return "yyyy-MM-dd HH:mm:ss";
 }
开发者ID:dishiyicijinqiu,项目名称:FengSharp,代码行数:8,代码来源:TextEdit_TimeStyle.cs

示例10: GetEnableTimeStyle

 public bool GetEnableTimeStyle(TextEdit textEdit)
 {
     if (list.ContainsKey(textEdit))
     {
         return list[textEdit].EnableTimeStyle;
     }
     return false;
 }
开发者ID:dishiyicijinqiu,项目名称:FengSharp,代码行数:8,代码来源:TextEdit_TimeStyle.cs

示例11: InitFieldValue

 private static void InitFieldValue(ComboBoxEdit combo, TextEdit text)
 {
     combo.Properties.TextEditStyle = TextEditStyles.DisableTextEditor;
     combo.Properties.Items.Clear();
     combo.Properties.Items.Add(FieldType.undefined);
     combo.Properties.Items.Add(FieldType.uniform);
     combo.Properties.Items.Add(FieldType.nonuniform);
     combo.SelectedIndex = 0;
 }
开发者ID:mohsenboojari,项目名称:offwind,代码行数:9,代码来源:FFieldData.cs

示例12: ValidationTextEditNullValueMessage

 public static bool ValidationTextEditNullValueMessage(TextEdit textEdit, string messageTitle)
 {
     if (string.IsNullOrEmpty(textEdit.Text))
     {
         textEdit.Properties.Appearance.BorderColor = Color.Red;
         textEdit.Focus();
         textEdit.SelectAll();
         return false;
     }
     return true;
 }
开发者ID:cuongpv88,项目名称:work,代码行数:11,代码来源:CheckEditTextBoxNullValue.cs

示例13: MakeAutoComplete

		public static void MakeAutoComplete(
			TextEdit textEdit,
			AutoCompleteMode autoCompleteMode,
			AutoCompleteSource autoCompleteSource)
		{
			// http://community.devexpress.com/forums/p/81601/280039.aspx

			var tx = textEdit.MaskBox;
			tx.AutoCompleteSource = autoCompleteSource;
			tx.AutoCompleteMode = autoCompleteMode;
		}
开发者ID:iraychen,项目名称:ZetaResourceEditor,代码行数:11,代码来源:DevExpressExtensionMethods.cs

示例14: FormatTextEdit

 public static void FormatTextEdit(TextEdit Input)
 {
     if (Input.EditValue!=null &&
         Input.EditValue.ToString()!="" &&
         HelpNumber.ParseDecimal(Input.EditValue) != 0)
     {
         Input.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
         Input.Properties.DisplayFormat.FormatString = "{0:#,###}";
         Input.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
         Input.Properties.Mask.EditMask = "n0";
     }
 }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:12,代码来源:PLCtrl.cs

示例15: LoadLuongVe

 /*Đẩy dữ liệu vào Vé L1=Số ghế loại 1 và Vé L2=Số ghế loại 2*/
 public void LoadLuongVe(TextEdit txtV1, TextEdit txtV2, ComboBoxEdit cbMMB)
 {
     DataTable dt = DA.TbView("select SoGheLoai1,SoGheLoai2 from MayBay Where MaMayBay='" + cbMMB.Text + "'");
     if (dt.Rows.Count > 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             txtV1.Text = dt.Rows[0]["SoGheLoai1"].ToString();
             txtV2.Text = dt.Rows[0]["SoGheLoai2"].ToString();
         }
     }
 }
开发者ID:NguyenManh94,项目名称:ManagerAirTicket,代码行数:13,代码来源:BChuyenBay.cs


注:本文中的TextEdit类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。