Esempio n. 1
0
 /// <summary>
 /// Add a filling child reference to this aFrame object
 /// </summary>
 /// <param name="filling"></param>
 internal void AddFilling(Filling filling)
 {
     if (!fillings.Contains(filling))
     {
         fillings.Add(filling);
         ChildrenManager.UpdateFillingsCode(this);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Removes a filling child reference from this aFrame object
 /// </summary>
 /// <param name="filling"></param>
 internal void RemoveFilling(Filling filling)
 {
     if (fillings.Contains(filling))
     {
         fillings.Remove(filling);
         ChildrenManager.UpdateFillingsCode(this);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Updates the aFrame based on the Model values
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Model_PropertyChanged(object sender, PVCModelPropertyChangedEventArgs e)
        {
            switch (e.PropertyCode)
            {
            case PVCFrameModel.WIDTH_PROPERTY_CODE:
            case PVCFrameModel.HEIGHT_PROPERTY_CODE:
                if (!SetBounds(MINX, MINY, Model.Width, Model.Height))
                {
                    Model.Width  = Width;
                    Model.Height = Height;
                }
                else
                {
                    OnDimensionChanged();
                }
                break;

            case PVCFrameModel.CODE_PROPERTY_CODE:
                Label = Model.Code;
                ChildrenManager.UpdateFillingsCode(this);
                ChildrenManager.UpdateSashesCode(this);
                ChildrenManager.UpdateMullionsCode(this, Orientation.Horizontal);
                ChildrenManager.UpdateMullionsCode(this, Orientation.Vertical);
                InvalidatePaint();
                break;

            case PVCFrameModel.PROFILE_PROPERTY_CODE:
                InvalidateLayout();
                break;

            case PVCFrameModel.COLOR_PROPERTY_CODE:
            case PVCFrameModel.BORDER_COLOR_PROPERTY_CODE:
                InvalidatePaint();
                break;
            }
        }