Inheritance: ICloneable
コード例 #1
0
        public TextStyleDesignerDialog(TextStyle Style)
        {
            _Style = Style;
            _TmpStyle = (TextStyle) Style.Clone();

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            pgStyles.SelectedObject = _TmpStyle;
            lblCaption.Text = _Style.ToString();
            PreviewStyle();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
コード例 #2
0
        //done
        private TextStyle GetStyle(string Name)
        {
            if (styleLookup[Name] == null)
            {
                var s = new TextStyle();
                styleLookup.Add(Name, s);
            }

            return (TextStyle) styleLookup[Name];
        }
コード例 #3
0
ファイル: TextStyle.cs プロジェクト: attila3453/alsing
        public object Clone()
        {
            var ts = new TextStyle
                     {
//TODO: verify if this actually works
                         BackColor = BackColor,
                         Bold = Bold,
                         ForeColor = ForeColor,
                         Italic = Italic,
                         Underline = Underline,
                         Name = Name
                     };
            return ts;
        }