Example #1
0
 protected override void ShowViewFromNestedView(ShowViewParameters parameters, ShowViewSource showViewSource) {
     if (((IModelListViewOpenViewWhenNested)showViewSource.SourceFrame.View.Model).OpenViewWhenNestedStrategy==OpenViewWhenNestedStrategy.InMainWindow)
         Application.MainWindow.SetView(parameters.CreatedView, showViewSource.SourceFrame);
     else {
         base.ShowViewFromNestedView(parameters, showViewSource);
     }
 }
Example #2
0
 // B135637
 protected override void ShowViewInModalWindow(ShowViewParameters parameters, ShowViewSource showViewSource) {
     modalCount++;
     try {
         base.ShowViewInModalWindow(parameters, showViewSource);
     }
     finally {
         modalCount--;
     }
 }
    protected override void ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
    {
        if (parameters.CreatedView is DetailView)
            {// показываем детальные представления в модальных окнах
                //parameters.NewWindowTarget = NewWindowTarget.Separate;
                parameters.TargetWindow = TargetWindow.NewModalWindow;

                //AdditionalCustomization(parameters);
            }

            base.ShowViewCore(parameters, showViewSource);
    }
        /// <summary>
        /// Gets called when a view is shown
        /// </summary>
        /// <param name="parameters">ShowView Parameters</param>
        /// <param name="showViewSource">ShowView Source</param>
        protected override void ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource){
            _ShowInWizard = false;
            if (parameters.CreatedView is DetailView){
                DictionaryNode wizardNode = parameters.CreatedView.Info.FindChildNode("Wizard");
                _ShowInWizard = wizardNode != null && wizardNode.ChildNodes.Count > 0 &&
                                wizardNode.GetAttributeBoolValue("ShowInWizard", false);

                if (_ShowInWizard){
                    parameters.TargetWindow = TargetWindow.NewModalWindow;
                }

            }

            base.ShowViewCore(parameters, showViewSource);
        }
Example #5
0
 protected override void ShowViewFromCommonView(ShowViewParameters parameters, ShowViewSource showViewSource) {
     WinWindow existWindow = FindWindowByView(parameters.CreatedView);
     if (existWindow != null) {
         parameters.CreatedView.Dispose();
         parameters.CreatedView = existWindow.View;
         existWindow.Show();
     }
     else {
         ShowViewInNewWindow(parameters, showViewSource);
     }
 }
Example #6
0
 protected override void ShowViewFromLookupView(ShowViewParameters parameters, ShowViewSource showViewSource) {
     ShowViewInModalWindow(parameters, showViewSource);
 }
Example #7
0
 protected override void ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource) {
     if (parameters.TargetWindow == TargetWindow.Current && showViewSource.SourceFrame == MainWindow) {
         parameters.TargetWindow = TargetWindow.Default;
     }
     if (modalCount > 0) {
         parameters.TargetWindow = TargetWindow.NewModalWindow;
     }
     base.ShowViewCore(parameters, showViewSource);
 }
 protected override bool IsNewWindowForced(ShowViewParameters parameters, ShowViewSource showViewSource) {
     var isNewWindowForced = base.IsNewWindowForced(parameters, showViewSource);
     return !isNewWindowForced && parameters.NewWindowTarget == NewWindowTarget.Separate || isNewWindowForced;
 }
Example #9
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            IObjectSpace aObjectSpace = frame.Application.CreateObjectSpace();
               TimekeepingName tkn = aObjectSpace.CreateObject<TimekeepingName>();

               ShowViewParameters svp = new ShowViewParameters();
               DetailView dv = frame.Application.CreateDetailView(aObjectSpace, tkn);
               dv.ViewEditMode = DevExpress.ExpressApp.Editors.ViewEditMode.Edit;
               svp.CreatedView = dv;

               svp.TargetWindow = TargetWindow.NewModalWindow;
               svp.Context = TemplateContext.PopupWindow;
               svp.CreateAllControllers = true;

               var svs = new ShowViewSource(null, null);
               frame.Application.ShowViewStrategy.ShowView(svp, svs);

               LoadDataLookup();
        }
 protected override Window ShowViewInNewWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
 {
     return base.ShowViewInNewWindow(parameters, showViewSource);
 }