private void Application_ViewShown(object sender, ViewShownEventArgs e) {
     if (e.TargetFrame != null && e.TargetFrame.View != null) {
         if (!(e.TargetFrame.View.ObjectSpace is NestedObjectSpace)) {
             e.TargetFrame.View.ObjectSpace.Committed += ObjectSpace_Committed;
         }
     }
 }
Esempio n. 2
0
 private void MainForm_ViewShown(object sender, ViewShownEventArgs e)
 {
     if ((e.View is StartPage) && (menuItem != null))
     {
         menuItem.Checked = true;
     }
 }
 //OR
 void Application_ViewShown(object sender, ViewShownEventArgs e)
 {
     if (e.SourceFrame != null && e.SourceFrame.View != null && e.SourceFrame.View.Id == "Party_PhoneNumbers_ListView")
     {
         DetailView targetView = (DetailView)e.TargetFrame.View;
         ListView   sourceView = (ListView)e.SourceFrame.View;
         //...
     }
 }
Esempio n. 4
0
 private void MainForm_ViewShown(object sender, ViewShownEventArgs e)
 {
     if ((e.View is Clipboard <IItem>) && (menuItem != null))
     {
         menuItem.Checked = true;
         Properties.Settings.Default.ShowClipboard = true;
         Properties.Settings.Default.Save();
     }
 }
 private void MainForm_ViewShown(object sender, ViewShownEventArgs e)
 {
     if ((e.View is OperatorsSidebar) && (menuItem != null))
     {
         menuItem.Checked = true;
         Properties.Settings.Default.ShowOperatorsSidebar = true;
         Properties.Settings.Default.Save();
     }
 }
 private void Application_ViewShown(object sender, ViewShownEventArgs e)
 {
     if (e.TargetFrame != null && e.TargetFrame.View != null) {
         var currentObject = e.TargetFrame.View.CurrentObject;
         if (currentObject != null && e.TargetFrame.View.ObjectSpace.Session.IsNewObject(currentObject)) {
             OnObjectCreated(new ObjectCreatedEventArgs(currentObject));
         }
     }
 }
 private void Application_ViewShown(object sender, ViewShownEventArgs e)
 {
     // при первом показе главного представлен¤ провер¤ем заполнение данных организации
     string ViewId = e.TargetFrame.View.Id;
     if (ViewId == "Workspace")
     {
         Application.ViewShown -= Application_ViewShown;
         OrganizationCheck();
     }
 }
Esempio n. 8
0
        internal protected override void OnShown(ViewShownEventArgs e)
        {
            base.OnShown(e);
            View view = ActiveView as View;

            if (view != null)
            {
                view.OnShown(e);
            }
        }
Esempio n. 9
0
 private void Application_ViewShown(object sender, ViewShownEventArgs e)
 {
     if (e.TargetFrame != null && e.TargetFrame.View != null)
     {
         if (!(e.TargetFrame.View.ObjectSpace is NestedObjectSpace))
         {
             e.TargetFrame.View.ObjectSpace.Committed += ObjectSpace_Committed;
         }
     }
 }
Esempio n. 10
0
        protected void Application_ViewShown(object sender, ViewShownEventArgs e)
        {
            if (!Application.ConnectionString.Contains("XpoProvider"))
            {
                return;
            }

            ConnectionStringParser parser = new ConnectionStringParser(Application.ConnectionString);
            string provider = parser.GetPartByName("XpoProvider");

            if (provider == "XmlDataSet")
            {
                ShowPerformanceWarning();
            }
        }
Esempio n. 11
0
        private void ApplicationOnViewShown(object sender, ViewShownEventArgs viewShownEventArgs)
        {
            Task.Factory.StartNew(() => {
                var stopwatch = new Stopwatch();
                stopwatch.Start();
                while (stopwatch.Elapsed.TotalMilliseconds < 2000)
                {
                    Thread.Sleep(100);
                }
                stopwatch.Stop();
            }).ContinueWith(task => {
                CreateAppoitments();
            }, TaskScheduler.FromCurrentSynchronizationContext());

            ((XafApplication)sender).ViewShown -= ApplicationOnViewShown;
        }
Esempio n. 12
0
        void OnAfterViewShown(object sender, ViewShownEventArgs e)
        {
            if (_detailView == null)
            {
                return;
            }
            IObjectSpace objectSpace             = _application.ObjectSpaceProvider.CreateObjectSpace();
            IList        objects                 = objectSpace.GetObjects(_detailView.ObjectTypeInfo.Type);
            var          standaloneOrderProvider = new StandaloneOrderProvider(objectSpace, objects);
            var          orderProviderSource     = new OrderProviderSource {
                OrderProvider = standaloneOrderProvider
            };

            e.TargetFrame.GetController <RecordsNavigationController>().OrderProviderSource = orderProviderSource;
            ((ISupportAfterViewShown)_application).AfterViewShown -= OnAfterViewShown;
            _detailView = null;
        }
Esempio n. 13
0
        void ApplicationOnViewShown(object sender, ViewShownEventArgs e)
        {
            if (_detailView == null)
            {
                return;
            }
            var recordsNavigationController = e.TargetFrame.GetController <RecordsNavigationController>();

            if (recordsNavigationController == null)
            {
                return;
            }
            var   objectSpace             = _application.ObjectSpaceProvider.CreateObjectSpace();
            IList objects                 = objectSpace.GetObjects(_detailView.ObjectTypeInfo.Type);
            var   standaloneOrderProvider = new StandaloneOrderProvider(objectSpace, objects);
            var   orderProviderSource     = new OrderProviderSource {
                OrderProvider = standaloneOrderProvider
            };

            recordsNavigationController.OrderProviderSource = orderProviderSource;
            _application.ViewShown -= ApplicationOnViewShown;
            _detailView             = null;
        }
Esempio n. 14
0
 internal protected virtual void OnShown(ViewShownEventArgs e)
 {
 }
Esempio n. 15
0
 private void ApplicationOnViewShown(object sender, ViewShownEventArgs viewShownEventArgs){
     _firstViewShown = true;
     Application.ViewShown -= ApplicationOnViewShown;
 }
Esempio n. 16
0
 void OnAfterViewShown(object sender, ViewShownEventArgs e) {
     if (_detailView == null) return;
     IObjectSpace objectSpace = _application.ObjectSpaceProvider.CreateObjectSpace();
     IList objects = objectSpace.GetObjects(_detailView.ObjectTypeInfo.Type);
     var standaloneOrderProvider = new StandaloneOrderProvider(objectSpace, objects);
     var orderProviderSource = new OrderProviderSource { OrderProvider = standaloneOrderProvider };
     e.TargetFrame.GetController<RecordsNavigationController>().OrderProviderSource = orderProviderSource;
     ((IXafApplication)_application).AfterViewShown -= OnAfterViewShown;
     _detailView = null;
 }
Esempio n. 17
0
 internal protected virtual void OnShown(ViewShownEventArgs e) {
 }
Esempio n. 18
0
 private void ApplicationOnViewShown(object sender, ViewShownEventArgs viewShownEventArgs)
 {
     _firstViewShown        = true;
     Application.ViewShown -= ApplicationOnViewShown;
 }
Esempio n. 19
0
 internal protected override void OnShown(ViewShownEventArgs e) {
   base.OnShown(e);
   View view = ActiveView as View;
   if (view != null)
     view.OnShown(e);
 }
Esempio n. 20
0
 void ApplicationOnViewShown(object sender, ViewShownEventArgs e) {
     if (_detailView == null) return;
     var recordsNavigationController = e.TargetFrame.GetController<RecordsNavigationController>();
     if (recordsNavigationController==null)return;
     var objectSpace = _application.ObjectSpaceProvider.CreateObjectSpace();
     IList objects = objectSpace.GetObjects(_detailView.ObjectTypeInfo.Type);
     var standaloneOrderProvider = new StandaloneOrderProvider(objectSpace, objects);
     var orderProviderSource = new OrderProviderSource { OrderProvider = standaloneOrderProvider };
     recordsNavigationController.OrderProviderSource = orderProviderSource;
     _application.ViewShown -= ApplicationOnViewShown;
     _detailView = null;
 }