Ejemplo n.º 1
0
        public static void ReflectUserMode(wucDXBase window)
        {
            var cc_DisplayOptions = VNC.Core.Xaml.PhysicalTree.FindChild <ContentControl>(window, "cc_DisplayOptions");

            if (cc_DisplayOptions == null)
            {
                Log.Warning(string.Format("Can't locate element {0}", "cc_DisplayOptions"), Common.LOG_APPNAME);
                return;
            }

            var adminOptions = VNC.Core.Xaml.PhysicalTree.FindChild <WrapPanel>(cc_DisplayOptions, "AdminOptions");

            if (adminOptions == null)
            {
                Log.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;
            }
        }
Ejemplo n.º 2
0
 private void UnhookTitleEvent(wucDXBase control)
 {
     if (control != null)
     {
         control.TitleChanged -= SetTitle;
     }
 }
Ejemplo n.º 3
0
        private void HookTitleEvent(wucDXBase control)
        {
            SetTitle(control, EventArgs.Empty);

            if (control != null)
            {
                control.TitleChanged += SetTitle;
                //control.TitleChanged2 += SetTitle2;
            }
        }
Ejemplo n.º 4
0
        private void SetTitle2(object sender, EventArgs e)
        {
            wucDXBase uc = sender as wucDXBase;

            if (uc != null && !string.IsNullOrEmpty(uc.Title))
            {
                this.Title = string.Format("VNCCodeCommandConsole: {0}", uc.Title);
            }
            else
            {
                this.Title = "VNCCodeCommandConsole";
            }
        }