Esempio n. 1
0
        protected override void OnShow(Control smartPart, Microsoft.Practices.CompositeUI.WinForms.WindowSmartPartInfo smartPartInfo)
        {
            Form form = GetOrCreateForm(smartPart);

            OnApplySmartPartInfo(smartPart, smartPartInfo);
            base.OnShow(smartPart, smartPartInfo);
        }
 protected override void OnApplySmartPartInfo(Control smartPart, Microsoft.Practices.CompositeUI.WinForms.WindowSmartPartInfo smartPartInfo)
 {
     base.OnApplySmartPartInfo(smartPart, smartPartInfo);
     if (smartPartInfo is WindowSmartPartInfo)
     {
         WindowSmartPartInfo spi = (WindowSmartPartInfo)smartPartInfo;
         if (spi.Keys.ContainsKey(WindowWorkspaceSetting.AcceptButton))
         {
             Windows[smartPart].AcceptButton = (IButtonControl)spi.Keys[WindowWorkspaceSetting.AcceptButton];
         }
         if (spi.Keys.ContainsKey(WindowWorkspaceSetting.CancelButton))
         {
             Windows[smartPart].CancelButton = (IButtonControl)spi.Keys[WindowWorkspaceSetting.CancelButton];
         }
         if (spi.Keys.ContainsKey(WindowWorkspaceSetting.FormBorderStyle))
         {
             Windows[smartPart].FormBorderStyle = (FormBorderStyle)spi.Keys[WindowWorkspaceSetting.FormBorderStyle];
         }
     }
 }