private void OnLoaded(object sender, RoutedEventArgs e) { #if TRACE long startTicks = VNC.AppLog.Trace5("Start", LOG_APPNAME); #endif EyeOnLife.User_Interface.Helper.ValidateDataFullyLoaded(); try { ((CollectionViewSource)this.Resources["adDomains"]).Source = Common.ApplicationDataSet.LKUP_ADDomains; ((CollectionViewSource)this.Resources["environments"]).Source = Common.ApplicationDataSet.LKUP_Environments; ((CollectionViewSource)this.Resources["securityZones"]).Source = Common.ApplicationDataSet.LKUP_SecurityZones; lc_Root.DataContext = Common.ApplicationDataSet.Databases; gc_Databases.ItemsSource = Common.ApplicationDataSet.Databases; string[] ckDisplayColumns = { "ckDisplayEnvironmentColumns", "ckDisplayNotesColumns" }; ViewMode.UpdateDisplayColumnsCheckBoxes(cc_DisplayOptions3, ckDisplayColumns); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions2); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions3); ViewMode.DisplayOptionsVisibility(cc_DisplayOptions4); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions5); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions6); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions7); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions8); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions9); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions10); ViewMode.AutoHideGroupVisibility(ahg_Left); ViewMode.AutoHideGroupVisibility(ahg_Top); ViewMode.AutoHideGroupVisibility(ahg_Right); ViewMode.AutoHideGroupVisibility(ahg_Bottom); LogUsage(this.GetType()); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } #if TRACE VNC.AppLog.Trace5("End", LOG_APPNAME, startTicks); #endif }
private void OnLoaded(object sender, RoutedEventArgs e) { #if TRACE long startTicks = VNC.AppLog.Trace5("Start", LOG_APPNAME); #endif EyeOnLife.User_Interface.Helper.ValidateDataFullyLoaded(); try { if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) { //((CollectionViewSource)this.Resources["instancesViewSource"]).Source = // EyeOnLife.Common.ApplicationDataSet.Instances; dataGrid.ItemsSource = EyeOnLife.Common.ApplicationDataSet.Instances; ((CollectionViewSource)this.Resources["adDomains"]).Source = Common.ApplicationDataSet.LKUP_ADDomains; ((CollectionViewSource)this.Resources["environments"]).Source = Common.ApplicationDataSet.LKUP_Environments; ((CollectionViewSource)this.Resources["securityZones"]).Source = Common.ApplicationDataSet.LKUP_SecurityZones; } ApplyDataFilters(); ViewMode.ApplyAuthorization(this); // This list needs to match the CheckBox names in Display_StylesAndTemplates.xml string[] ckDisplayColumns = { "ckDisplayEnvironmentColumns", "ckDisplayNotesColumns", "ckDisplaySizeColumns" }; ViewMode.UpdateDisplayColumnsCheckBoxes(cc_DisplayOptions, ckDisplayColumns); LogUsage(this.GetType()); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } #if TRACE VNC.AppLog.Trace5("End", LOG_APPNAME, startTicks); #endif }
private void OnLoaded(object sender, RoutedEventArgs e) { #if TRACE long startTicks = VNC.AppLog.Trace5("Start", LOG_APPNAME); #endif EyeOnLife.User_Interface.Helper.ValidateDataFullyLoaded(); try { if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) { dataGrid.ItemsSource = EyeOnLife.Common.ApplicationDataSet.Databases; StaticResourceExtension sr = new StaticResourceExtension(); sr.ResourceKey = "DisplayOptionsControls"; //System.Windows.Controls.ControlTemplate ct = new System.Windows.Controls.ControlTemplate(); //ct.Template = sr.ProvideValue(); //System.Windows.Controls.ContentControl cc = new EyeOnLife.User_Interface.Content_Controls.cc1(); //cc_DisplayOptions.Template = (System.Windows.Controls.ControlTemplate)sr.ProvideValue("DisplayOptionsControls"); cc_DisplayOptions.Content = DisplayOptions; //cc_DisplayOptions.Content = cc; } ApplyDataFilters(); ViewMode.ApplyAuthorization(this); // This list needs to match the CheckBox names in Display_StylesAndTemplates.xml string[] ckDisplayColumns = null; //string[] ckDisplayColumns = { "ckDisplayEnvironmentColumns", "ckDisplayNotesColumns", "ckDisplaySizeColumns" }; // This list needs to match the CheckBox names in Display_StylesAndTemplates.xml ViewMode.UpdateDisplayColumnsCheckBoxes(cc_DisplayOptions, ckDisplayColumns); LogUsage(this.GetType()); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } #if TRACE VNC.AppLog.Trace5("End", LOG_APPNAME, startTicks); #endif }
private void OnLoaded(object sender, RoutedEventArgs e) { #if TRACE long startTicks = VNC.AppLog.Trace5("Start", LOG_APPNAME); #endif EyeOnLife.User_Interface.Helper.ValidateDataFullyLoaded(); try { //System.Windows.Data.CollectionViewSource myCollectionViewSource = (System.Windows.Data.CollectionViewSource)this.Resources["serversViewSource"]; //// Things work if this line is present. Testing to see if it works without 6/13/2012 //// Yup, still works. Don't need this line as it is done in the XAML. //myCollectionViewSource.Source = EyeOnLife.Common.ApplicationDataSet.Servers; //((CollectionViewSource)this.Resources["serversViewSource"]).Source = Common.ApplicationDataSet.Servers; ((CollectionViewSource)this.Resources["adDomains"]).Source = Common.ApplicationDataSet.LKUP_ADDomains; ((CollectionViewSource)this.Resources["environments"]).Source = Common.ApplicationDataSet.LKUP_Environments; ((CollectionViewSource)this.Resources["securityZones"]).Source = Common.ApplicationDataSet.LKUP_SecurityZones; // This line changes the Source of the serversInstancesViewSource. //((CollectionViewSource)this.Resources["databasesViewSource"]).Source = Common.ApplicationDataSet.Databases; lc_Root.DataContext = Common.ApplicationDataSet.Databases; gc_Databases.ItemsSource = Common.ApplicationDataSet.Databases; ApplyDataFilters(); ViewMode.ApplyAuthorization(this); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions2); ViewMode.DisplayOptionsVisibility(cc_DisplayOptions3); ViewMode.DisplayOptionsVisibility(cc_DisplayOptions4); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions5); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions6); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions7); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions8); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions9); //ViewMode.DisplayOptionsVisibility(cc_DisplayOptions10); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails1); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails2); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails3); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails4); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails5); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails6); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails7); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails8); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails9); //ViewMode.SnapShotDetailsVisibility(lc_SnapShotDetails10); ViewMode.AutoHideGroupVisibility(ahg_Left); ViewMode.AutoHideGroupVisibility(ahg_Top); ViewMode.AutoHideGroupVisibility(ahg_Right); ViewMode.AutoHideGroupVisibility(ahg_Bottom); string[] ckDisplayColumns = { "ckDisplayEnvironmentColumns", "ckDisplayBackupColumns", "ckDisplaySizeColumns" }; ViewMode.UpdateDisplayColumnsCheckBoxes(cc_DisplayOptions3, ckDisplayColumns); LogUsage(this.GetType()); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } #if TRACE VNC.AppLog.Trace5("End", LOG_APPNAME, startTicks); #endif }