using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace UIControl { [Serializable] public class CMenuButton { public eButtonType Shape { get; set; } public string Text { get; set; } public string Tag { get; set; } public Rectangle Rect { get; set; } public Color BackColor { get; set; } public Color ForeColor { get; set; } public Color OverColor { get; set; } public Color BorderColor { get; set; } public byte BorderSize { get; set; } public Font Font { get; set; } public CMenuButton() : this(string.Empty, string.Empty) { } public CMenuButton(string text, string tag) { Font = null; BorderColor = Color.Black; BorderSize = 5; Shape = eButtonType.Rectangle; this.Text = text; this.Tag = tag; BackColor = Color.White; OverColor = Color.Gold; ForeColor = Color.Black; text = "Button"; } public string menutag { get; set; } } [Serializable] public class CMenu { public string Title { get; set; } public string Text { get; set; } public string Tag { get; set; } public RectangleF Rect { get; set; } public Boolean Focus { get; set; } public Boolean Select { get; set; } public eMsgIcon Icon { get; set; } public CMenuButton[] buttons { get; set; } public Font Font { get; set; } public Color BackColor { get; set; } public Color ForeColor { get; set; } public Color BorderColor { get; set; } /// /// 반드시 사용자의 허가를 받아야 넘어갈 수 있는 메뉴 /// public Boolean RequireInput { get; set; } public CMenu() : this("Contents", "Title", "tag", eMsgIcon.Info, null) { } public CMenu(string text_, string title_, string tag_, eMsgIcon icon_, params CMenuButton[] buttons_) { this.Tag = tag_; this.Title = title_; this.Text = text_; this.Icon = icon_; this.buttons = buttons_; this.Font = new Font("맑은 고딕", 15, FontStyle.Bold); BackColor = Color.White; ForeColor = Color.Black; BorderColor = Color.Orange; RequireInput = false; } public float X { get { return Rect.X; } } public float Y { get { return Rect.Y; } } public float W { get { return Rect.Width; } } public float H { get { return Rect.Height; } } } }