zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    结队完成-连续最大子数组和
    一、数据库的基础简介
    十六、Shell之expect自动化交互程
    十五、Shell之数组
    十四、循环控制
    十三、Shell之select语句
    Linux系统产生随机数的6种方法
    十二、Shell之for循环
    十一、Shell之while&&until循环
    Shell补充之后台执行脚本程序
  • 原文地址:https://www.cnblogs.com/bycnboy/p/9046967.html
Copyright © 2011-2022 走看看