コード例 #1
0
 private void RecreateListView(bool ifNotCreatedOnly)
 {
     if (ViewEditMode == ViewEditMode.Edit && (!ifNotCreatedOnly || listView == null))
     {
         listView = null;
         if (CurrentObject != null)
         {
             listView = helper.CreateListView(CurrentObject);
         }
         Frame.SetView(listView);
     }
 }
コード例 #2
0
        protected void EnsureFrameObjects()
        {
            if (frame == null)
            {
                frame = helper.Application.CreateNestedFrame(this, TemplateContext.LookupControl);
                frame.SetView(helper.CreateListView(CurrentObject)); // joe 5/11/2011: MUST DO THIS
                newObjectViewController = frame.GetController <NewObjectViewController>();

                if (newObjectViewController != null)
                {
                    newObjectViewController.ObjectCreating += new EventHandler <ObjectCreatingEventArgs>(newObjectViewController_ObjectCreating);
                    newObjectViewController.ObjectCreated  += new EventHandler <ObjectCreatedEventArgs>(newObjectViewController_ObjectCreated);
                }

                newObjectWindowAction          = new PopupWindowShowAction(null, "New", PredefinedCategory.Unspecified.ToString());
                newObjectWindowAction.Execute += new PopupWindowShowActionExecuteEventHandler(newObjectWindowAction_OnExecute);
                newObjectWindowAction.CustomizePopupWindowParams += new CustomizePopupWindowParamsEventHandler(newObjectWindowAction_OnCustomizePopupWindowParams);
                newObjectWindowAction.Application = helper.Application;
            }
        }