private void UnhookTitleEvent(wucDX_Base control) { if (control != null) { control.TitleChanged -= SetTitle; } }
public static void ReflectUserMode(wucDX_Base window) { var cc_DisplayOptions = VNC.Xaml.PhysicalTree.FindChild <ContentControl>(window, "cc_DisplayOptions"); if (cc_DisplayOptions == null) { VNC.AppLog.Warning(string.Format("Can't locate element {0}", "cc_DisplayOptions"), Common.LOG_APPNAME); return; } var adminOptions = VNC.Xaml.PhysicalTree.FindChild <WrapPanel>(cc_DisplayOptions, "AdminOptions"); if (adminOptions == null) { VNC.AppLog.Warning(string.Format("Can't locate element {0}", "adminOptions"), Common.LOG_APPNAME); return; } if (Common.UserMode.Administrator || Common.UserMode.Advanced) { ((WrapPanel)adminOptions).Visibility = Visibility.Visible; } else { ((WrapPanel)adminOptions).Visibility = Visibility.Hidden; } }
private void ShowUserControl(UserControl control) { UnhookTitleEvent(_currentControl); splashScreenGrid.Children.Clear(); if (control != null) { splashScreenGrid.Children.Add(control); _currentControl = (wucDX_Base)control; //if (control.MinWidth > 0) //{ // this.Width = control.MinWidth + Common.WINDOW_HOSTING_USER_CONTROL_WIDTH_PAD; //} //if (control.MinHeight > 0) //{ // this.Height = control.MinHeight + Common.WINDOW_HOSTING_USER_CONTROL_HEIGHT_PAD; //} TableView tableView = FindTableView(); if (tableView != null) { SetRowDetailType(tableView); } } HookTitleEvent(_currentControl); }
private void HookTitleEvent(wucDX_Base control) { SetTitle(control, EventArgs.Empty); if (control != null) { control.TitleChanged += SetTitle; //control.TitleChanged2 += SetTitle2; } }
private void SetTitle2(object sender, EventArgs e) { wucDX_Base uc = sender as wucDX_Base; if (uc != null && !string.IsNullOrEmpty(uc.Title)) { this.Title = string.Format("EyeOnLife: {0}", uc.Title); } else { this.Title = "EyeOnLife"; } }
private void ShowUserControl(UserControl control) { UnhookTitleEvent(_currentControl); splashScreenGrid.Children.Clear(); if (control != null) { splashScreenGrid.Children.Add(control); _currentControl = (wucDX_Base)control; } HookTitleEvent(_currentControl); }
private void SetTitle2(object sender, EventArgs e) { wucDX_Base uc = sender as wucDX_Base; if (uc != null && !string.IsNullOrEmpty(uc.Title)) { this.Title = string.Format("VNCAssemblyViewer: {0}", uc.Title); } else { this.Title = "VNCAssemblyViewer"; } }
private void SetTitle2(object sender, EventArgs e) { wucDX_Base uc = sender as wucDX_Base; if (uc != null && !string.IsNullOrEmpty(uc.Title)) { this.Title = string.Format("VNCDxWPFWindowAppBase1: {0}", uc.Title); } else { this.Title = "VNCDxWPFWindowAppBase1"; } }