예제 #1
0
		protected ButtonBase() : base()
		{
			flat_style	= FlatStyle.Standard;
			flat_button_appearance = new FlatButtonAppearance (this);
			this.image_key = string.Empty;
			this.text_image_relation = TextImageRelation.Overlay;
			this.use_mnemonic = true;
			use_visual_style_back_color = true;
			image_index	= -1;
			image		= null;
			image_list	= null;
			image_alignment	= ContentAlignment.MiddleCenter;
			ImeMode         = ImeMode.Disable;
			text_alignment	= ContentAlignment.MiddleCenter;
			is_default	= false;
			is_pressed	= false;
			text_format	= new StringFormat();
			text_format.Alignment = StringAlignment.Center;
			text_format.LineAlignment = StringAlignment.Center;
			text_format.HotkeyPrefix = HotkeyPrefix.Show;
			text_format.FormatFlags |= StringFormatFlags.LineLimit;

			text_format_flags = TextFormatFlags.HorizontalCenter;
			text_format_flags |= TextFormatFlags.VerticalCenter;
			text_format_flags |= TextFormatFlags.TextBoxControl;

			SetStyle (ControlStyles.ResizeRedraw | 
				ControlStyles.Opaque | 
				ControlStyles.UserMouse | 
				ControlStyles.SupportsTransparentBackColor | 
				ControlStyles.CacheText |
				ControlStyles.OptimizedDoubleBuffer, true);
			SetStyle (ControlStyles.StandardClick, false);
		}
예제 #2
0
        protected ButtonBase() : base()
        {
            flat_style                  = FlatStyle.Standard;
            flat_button_appearance      = new FlatButtonAppearance(this);
            this.image_key              = string.Empty;
            this.text_image_relation    = TextImageRelation.Overlay;
            this.use_mnemonic           = true;
            use_visual_style_back_color = true;
            image_index                 = -1;
            image                     = null;
            image_list                = null;
            image_alignment           = ContentAlignment.MiddleCenter;
            ImeMode                   = ImeMode.Disable;
            text_alignment            = ContentAlignment.MiddleCenter;
            is_default                = false;
            is_pressed                = false;
            text_format               = new StringFormat();
            text_format.Alignment     = StringAlignment.Center;
            text_format.LineAlignment = StringAlignment.Center;
            text_format.HotkeyPrefix  = HotkeyPrefix.Show;
            text_format.FormatFlags  |= StringFormatFlags.LineLimit;

            text_format_flags  = TextFormatFlags.HorizontalCenter;
            text_format_flags |= TextFormatFlags.VerticalCenter;
            text_format_flags |= TextFormatFlags.TextBoxControl;

            SetStyle(ControlStyles.ResizeRedraw |
                     ControlStyles.Opaque |
                     ControlStyles.UserMouse |
                     ControlStyles.SupportsTransparentBackColor |
                     ControlStyles.CacheText |
                     ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.StandardClick, false);
        }
예제 #3
0
 private static void SaveFlatAppearance(FlatButtonAppearance fa, XmlTextWriter writer)
 {
     writer.WriteStartElement("FlatAppearance");
     writer.WriteElementString("BorderColor", fa.BorderColor.Name);
     writer.WriteElementString("BorderSize", fa.BorderSize.ToString());
     writer.WriteEndElement();
 }