Beispiel #1
0
 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;
            }
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        private void HookTitleEvent(wucDX_Base control)
        {
            SetTitle(control, EventArgs.Empty);

            if (control != null)
            {
                control.TitleChanged += SetTitle;
                //control.TitleChanged2 += SetTitle2;
            }
        }
Beispiel #5
0
        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";
            }
        }
Beispiel #6
0
        private void ShowUserControl(UserControl control)
        {
            UnhookTitleEvent(_currentControl);
            splashScreenGrid.Children.Clear();

            if (control != null)
            {
                splashScreenGrid.Children.Add(control);
                _currentControl = (wucDX_Base)control;
            }

            HookTitleEvent(_currentControl);
        }
Beispiel #7
0
        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";
            }
        }