Inheritance: ICloneable
        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
            //
        }
        //done
        private TextStyle GetStyle(string Name)
        {
            if (styleLookup[Name] == null)
            {
                var s = new TextStyle();
                styleLookup.Add(Name, s);
            }

            return (TextStyle) styleLookup[Name];
        }
Esempio n. 3
0
        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;
        }