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>
 /// 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);
     }
 }
Esempio n. 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);
     }
 }
Esempio n. 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();
 }
Esempio n. 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);
         }
     }
 }
Esempio n. 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;
            }
        }