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; } } }
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; //... } }
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(); } }
internal protected override void OnShown(ViewShownEventArgs e) { base.OnShown(e); View view = ActiveView as View; if (view != null) { view.OnShown(e); } }
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(); } }
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; }
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; }
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; }
internal protected virtual void OnShown(ViewShownEventArgs e) { }
private void ApplicationOnViewShown(object sender, ViewShownEventArgs viewShownEventArgs){ _firstViewShown = true; Application.ViewShown -= ApplicationOnViewShown; }
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; }
private void ApplicationOnViewShown(object sender, ViewShownEventArgs viewShownEventArgs) { _firstViewShown = true; Application.ViewShown -= ApplicationOnViewShown; }
internal protected override void OnShown(ViewShownEventArgs e) { base.OnShown(e); View view = ActiveView as View; if (view != null) view.OnShown(e); }
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; }