コード例 #1
0
ファイル: Widget.cs プロジェクト: AIBrain/ochregui
        // /////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Construct a Widget instance from the given template.
        /// </summary>
        /// <param name="template"></param>
        protected Widget(WidgetTemplate template)
        {
            this.ScreenPosition = new Point(0, 0);
            this.Size = template.CalculateSize();
            this.Canvas = new Canvas(Size);

            this.OwnerDraw = template.OwnerDraw;

            this.PigmentOverrides = template.Pigments.Copy();
        }
コード例 #2
0
        // /////////////////////////////////////////////////////////////////////////////////
        #endregion
        #region Constructors
        // /////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Construct a Widget instance from the given template.
        /// </summary>
        /// <param name="template"></param>
        protected Widget(WidgetTemplate template)
        {
            this.ScreenPosition = new Point(0, 0);
            this.Size           = template.CalculateSize();
            this.Canvas         = new Canvas(Size);

            this.OwnerDraw = template.OwnerDraw;

            this.PigmentOverrides = template.Pigments.Copy();
        }