• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TextEdit类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: IsTextEditEmptyOrSingleZero

 public static bool IsTextEditEmptyOrSingleZero(TextEdit edit)
 {
     if (edit.Text.Equals(String.Empty) | edit.Text.Equals("0"))
     {
         return true;
     }
     else
     {
         return false;
     }
     return false;
 }
开发者ID:EdiCarlos,项目名称:MyPractices,代码行数:12,代码来源:ValidationClass.cs


示例17: SinhMa

 /*Sinh mã tự động cho code thêm*/
 public void SinhMa(TextEdit txt)
 {
     DataTable myTB = DA.TbView("select MaMayBay,Site From MayBay");
     if (myTB.Rows.Count == 0) { txt.Text = "MMB000"; myTB = null; }
     /*Sinh mã tự tăng giúp tránh việc mã cung cấp nhập vào bị trùng mã khác*/
     if (myTB.Rows.Count > 0)
     {
         int temp = Convert.ToInt32(myTB.Rows[myTB.Rows.Count - 1]["MaMayBay"].ToString().Substring(3, 3)) + 1;/*dùng tạm*/
         if (temp < 10) { txt.Text = "MMB00" + temp.ToString(); }
         if (temp >= 10 & temp < 100) { txt.Text = "MMB0" + temp.ToString(); }
         myTB = null;
     } myTB = null;
 }
开发者ID:NguyenManh94,项目名称:ManagerAirTicket,代码行数:14,代码来源:BMayBay.cs


示例18: BasicInfoRoomType

        public BasicInfoRoomType()
        {
            InitializeComponent();
            ItemTableTemp = new DataTable();
            TextEditTrigger = new TextEdit();
            TextEditTrigger.EditValue = 0;
            this.Dock = DockStyle.Fill;

            this.Load += new EventHandler(BasicInfoRoomType_Load);
            this.Resize += new EventHandler(BasicInfoRoomType_Resize);
            TextEditTrigger.TextChanged += new EventHandler(TextEditTrigger_TextChanged);
            SaveClick += new EventHandler(BasicInfoRoomType_SaveClick);

            checkEditMonthly.CheckedChanged +=new EventHandler(checkEditMonthly_CheckedChanged);
        }
开发者ID:neosign,项目名称:DXWindowsApplication2,代码行数:15,代码来源:BasicInfoRoomType.cs


示例19: capturePersonPhone

 private void capturePersonPhone(TextEdit txtPersonPhone, ComboBoxEdit cmbPhoneType, ICollection<PersonPhoneDto> personPhones)
 {
     var personPhone = txtPersonPhone.Tag as PersonPhoneDto;
     if (txtPersonPhone.Text != null)
     {
         if (personPhone == null)
         {
             personPhone = new PersonPhoneDto();
         }
         personPhone.Phone = txtPersonPhone.Text;
         var phoneType = cmbPhoneType.SelectedItem as PhoneTypeDto;
         personPhone.PhoneTypeId = phoneType.Id;
         personPhones.Add(personPhone);
     }
 }
开发者ID:zquall,项目名称:Makiwara,代码行数:15,代码来源:ContactManager.cs


示例20: ValidationTextEditNullValueWidthErrorProvider

        /// <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.Red;
                textEdit.Focus();

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

            return true;
        }
开发者ID:cuongpv88,项目名称:work,代码行数:21,代码来源:CheckEditTextBoxNullValue.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TextEditor类代码示例发布时间:2022-05-24
下一篇:
C# TextDocument类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap