• Devexpress [CODE] 收集


    CustomDisplayText

    private void Edit_CustomDisplayText(object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e)
            {
                TextEdit edit; edit = (TextEdit)sender; 
    
                if (e.Value == null)
                {
                    e.DisplayText = edit.Properties.NullText;
                    //edit.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
                    edit.Properties.Appearance.ForeColor = Color.Gray;
                }
                else
                {
                    //edit.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
                    edit.Properties.Appearance.ForeColor = Color.Black;
                }
    
            }
                this.buttonEdit1.Properties.Mask.EditMask = "(\w|[\.\-])+@(\w|[\-]+\.)*(\w|[\-]){2,63}\.[a-zA-Z]{2,4}";
                this.buttonEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                SkinElement element = SkinManager.GetSkinElement(SkinProductId.Form, DevExpress.LookAndFeel.UserLookAndFeel.Default, "FormCaption");
                Image img = element.Image.Image;
                using(Graphics g = Graphics.FromImage(img))
                    g.FillRectangle(Brushes.DodgerBlue, new Rectangle(Point.Empty, img.Size));
                element.SetActualImage(img,false);
                LookAndFeelHelper.ForceDefaultLookAndFeelChanged();
    SkinElement element = SkinManager.GetSkinElement(SkinProductId.Ribbon, DevExpress.LookAndFeel.UserLookAndFeel.Default, "FormCaption");
    Image anImage = element.Image.Image;
     
     string lskin = "";
                SkinContainerCollection skins = SkinManager.Default.Skins;
                for (int i = 0; i < skins.Count; i++)
                {
                    lskin += String.Format("{0}{1}", skins[i].SkinName, Environment.NewLine);
                }

     Transparent

      panelControl1.Text = "Transparent";
                panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
                panelControl1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat;
                panelControl1.LookAndFeel.UseDefaultLookAndFeel = false;
                panelControl1.BackColor = Color.Transparent;
                panelControl1.Parent = tabFormControl;
                //panelControl1.Visible = false;
    View Code

      popupMenu

     this.Btn_Debug.DropDownControl = popupMenu
    View Code

    this.Btn_Debug.DropDownControl = this.popupMenu_debug;

    MSG

            public static void Show(string Caption, string Text)
            {
                XtraMessageBoxArgs xargs = new XtraMessageBoxArgs();
                xargs.Icon = HiClient.Lib.Res.ico(); xargs.Caption = Caption; xargs.Text = Text;
                UserLookAndFeel lookAndFeel = UserLookAndFeel.Default; lookAndFeel.UseWindowsXPTheme = false;
                lookAndFeel.Style = LookAndFeelStyle.Skin; xargs.LookAndFeel = lookAndFeel;
                lookAndFeel.SkinName = "Office 2010 Blue"; XtraMessageBox.Show(xargs);
            }
            public static void Show(string Text)
            {
                Show("", Text);
    
            }
    
            public static bool ShowYesNo(string Caption, string Text)
            {
                XtraMessageBoxArgs xargs = new XtraMessageBoxArgs();
                xargs.Icon = HiClient.Lib.Res.ico();
                xargs.Buttons = new DialogResult[2] { DialogResult.Yes, DialogResult.No };
                xargs.Caption = Caption; xargs.Text = Text;
                UserLookAndFeel lookAndFeel = UserLookAndFeel.Default; lookAndFeel.UseWindowsXPTheme = false;
                lookAndFeel.Style = LookAndFeelStyle.Skin; xargs.LookAndFeel = lookAndFeel;
                lookAndFeel.SkinName = "Office 2010 Blue"; 
                if (XtraMessageBox.Show(xargs) == DialogResult.Yes)
                {
                    return true;
                }
                return false;
            }
            public static bool ShowYesNo(string Text)
            {
                return ShowYesNo("", Text);
    
            }
    
    
        }
        public class Msg
        {
            public static void Show(string Caption, string Text)
            {
                XtraMessageBoxArgs xargs = new XtraMessageBoxArgs();
                xargs.Icon = HiClient.Lib.Res.ico(); xargs.Caption = Caption; xargs.Text = Text;
                XtraMessageBox.Show(xargs);
            }
            public static void Show(string Text)
            {
                Show("", Text);
            }
    
            public static bool ShowYesNo(string Caption, string Text)
            {
                XtraMessageBoxArgs xargs = new XtraMessageBoxArgs();
                xargs.Icon = HiClient.Lib.Res.ico(); xargs.Caption = Caption; xargs.Text = Text;
               
    
    
    
    
                if (XtraMessageBox.Show(xargs) == DialogResult.Yes)
                {
                    return true;
                }
                return false;
            }
    
        }
    View Code
  • 相关阅读:
    岩石圈
    地球及其圈层结构
    如何请教一个技术问题
    中国游戏路在何方?
    5.4删除二叉搜索树的任意元素
    5.3 删除二叉搜索树的最大元素和最小元素
    uni-app开发小程序准备阶段
    5.2二叉搜索树遍历(前序、中序、后序、层次、广度优先遍历)
    5.1二叉搜索树基础
    【loj
  • 原文地址:https://www.cnblogs.com/bycnboy/p/9046967.html
Copyright © 2020-2023  润新知