Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #3
0
 /// <summary>
 /// Removes a Sash reference from this aFrame object
 /// </summary>
 /// <param name="dSash"></param>
 internal void RemoveSash(Sash sash)
 {
     if (sashes.Contains(sash))
     {
         sashes.Remove(sash);
         ChildrenManager.UpdateSashesCode(this);
     }
 }
Пример #4
0
 /// <summary>
 /// Adds a Sash reference to this aFrame object
 /// </summary>
 /// <param name="dSash"></param>
 internal void AddSash(Sash sash)
 {
     if (!sashes.Contains(sash))
     {
         sashes.Add(sash);
         ChildrenManager.UpdateSashesCode(this);
     }
 }
Пример #5
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();
 }
Пример #6
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);
         }
     }
 }
Пример #7
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;
            }
        }