Esempio n. 1
0
 /// <summary>
 /// Removes a mullion reference from this aFrame object
 /// </summary>
 /// <param name="mullion"></param>
 internal void RemoveMullion(Mullion mullion)
 {
     if (mullion.Model.Orientation == Orientation.Horizontal)
     {
         horizontalMullions.Remove(mullion);
         ChildrenManager.UpdateMullionsCode(this, Orientation.Horizontal);
     }
     else if (mullion.Model.Orientation == Orientation.Vertical)
     {
         verticalMullions.Remove(mullion);
         ChildrenManager.UpdateMullionsCode(this, Orientation.Vertical);
     }
     OnDimensionChanged();
 }
Esempio n. 2
0
 /// <summary>
 /// Adds a mullion reference to this aFrame object
 /// </summary>
 /// <param name="mullion"></param>
 internal void AddMullion(Mullion mullion)
 {
     if (mullion.Model.Orientation == Orientation.Vertical)
     {
         if (!verticalMullions.Contains(mullion))
         {
             verticalMullions.Add(mullion);
             ChildrenManager.UpdateMullionsCode(this, Orientation.Vertical);
         }
     }
     else if (mullion.Model.Orientation == Orientation.Horizontal)
     {
         if (!horizontalMullions.Contains(mullion))
         {
             horizontalMullions.Add(mullion);
             ChildrenManager.UpdateMullionsCode(this, Orientation.Horizontal);
         }
     }
 }
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;
            }
        }