Пример #1
0
 protected override void InitializeFormView(Form form, WinformsViewInfo viewInf)
 {
     base.InitializeFormView(form, viewInf);
     // If it's main form then access its content panel.
     if (form is MainForm)
         contentPanel = form.Controls["contentPanel"] as OutlookPanelEx;
 }
 public void FixtureSetUp()
 {
     ViewInfosByTaskCollection viewInfsByTask = viewInfsProvider.GetFromAssembly(
                                      Assembly.GetExecutingAssembly());
     view1Info = viewInfsByTask[typeof(int)]["View1"] as WinformsViewInfo;
     view2Info = viewInfsByTask[typeof(int)]["View2"] as WinformsViewInfo;
     view3Info = viewInfsByTask[typeof(string)]["View3"] as WinformsViewInfo;
     view4Info = viewInfsByTask[typeof(int)]["View4"] as WinformsViewInfo;
     view5Info = viewInfsByTask[typeof(int)]["View5"] as WinformsViewInfo;
 }
Пример #3
0
        protected override ViewInfo newViewInfo(Type viewType, ViewAttribute viewAttr)
        {
            WinformsViewInfo viewInfo = new WinformsViewInfo(viewAttr.ViewName, viewType);
            if (!(viewAttr is WinformsViewAttribute)) return viewInfo;

            viewInfo.IsMdiParent = (viewAttr as WinformsViewAttribute).IsMdiParent;
            viewInfo.MdiParent = (viewAttr as WinformsViewAttribute).MdiParent;
            viewInfo.ShowModal = (viewAttr as WinformsViewAttribute).ShowModal;

            return viewInfo;
        }
Пример #4
0
        /// <summary>
        /// Creates a WinformsViewInfo object by a given ViewAttribute instance.
        /// </summary>
        #endregion
        protected override ViewInfo newViewInfo(Type viewType, ViewAttribute viewAttr)
        {
            WinformsViewInfo viewInfo = new WinformsViewInfo(viewType);

            if (!(viewAttr is WinformsViewAttribute))
            {
                return(viewInfo);
            }

            viewInfo.IsMdiParent = (viewAttr as WinformsViewAttribute).IsMdiParent;
            viewInfo.MdiParent   = (viewAttr as WinformsViewAttribute).MdiParent;
            viewInfo.ShowModal   = (viewAttr as WinformsViewAttribute).ShowModal;

            return(viewInfo);
        }
Пример #5
0
 protected override void InitializeFormView(Form form, WinformsViewInfo viewInf)
 {
     base.InitializeFormView(form, viewInf);
     mainFrm = form as MainForm;
 }
Пример #6
0
 private WinformsViewInfo GetViewInfo(string viewName)
 {
     WinformsViewInfo viewInf = ViewInfos[viewName] as WinformsViewInfo;
     if (viewInf == null)
         viewInf = new WinformsViewInfo(ViewInfos[viewName].ViewName, ViewInfos[viewName].ViewType);
     return viewInf;
 }
Пример #7
0
 protected virtual void InitializeFormView(Form form, WinformsViewInfo viewInf)
 {
     InitializeView(form as IView);
     form.Activated += new EventHandler(View_ActivatedManually);
     form.Deactivate += new EventHandler(View_Deactivate);
     form.Disposed += new EventHandler(WinformsView_Disposed);
     form.IsMdiContainer = viewInf.IsMdiParent;
     string mdiParent = viewInf.MdiParent;
     if (mdiParent != null)
         form.MdiParent = views[mdiParent] as Form;
     NotifyInitialize(form as IView);
     InitializeChildViews(form);
 }