예제 #1
0
        /// <summary>
        /// Changes the culture to the specified culture
        /// </summary>
        /// <param name="culture">culture to change to</param>
        public static void ChangeCulture(CultureInfo cultureInfo)
        {
            var culture = CultureInfo.CreateSpecificCulture(cultureInfo.Name);

            CultureInfo.DefaultThreadCurrentCulture   = culture;
            CultureInfo.DefaultThreadCurrentUICulture = culture;

            ResourceUtils.InstallLanguageForUser();

            if (EvtCultureChanged != null)
            {
                WindowActivityMonitor.Pause();
                EvtCultureChanged(cultureInfo, new CultureChangedEventArg(cultureInfo));
                WindowActivityMonitor.Resume();
            }
        }
        /// <summary>
        /// Executes the command
        /// </summary>
        /// <param name="handled">set to true if the command was handled</param>
        /// <returns>true on success</returns>
        public override bool Execute(ref bool handled)
        {
            handled = true;

            Form form = Dispatcher.Scanner.Form;

            form.Invoke(new MethodInvoker(delegate()
            {
                if (DialogUtils.ConfirmScanner(form as IPanel, ACATExtension.Resources.LockTheScreen))
                {
                    Form screenLockForm = Context.AppPanelManager.CreatePanel("ScreenLockForm");
                    if (screenLockForm != null)
                    {
                        WindowActivityMonitor.Pause();
                        Context.AppPanelManager.ShowDialog(form as IPanel, screenLockForm as IPanel);
                    }
                }
            }));

            return(true);
        }
예제 #3
0
        /// <summary>
        /// Executes the command
        /// </summary>
        /// <param name="handled">set to true if the command was handled</param>
        /// <returns>true on success</returns>
        public override bool Execute(ref bool handled)
        {
            handled = true;

            Form form = Dispatcher.Scanner.Form;

            form.Invoke(new MethodInvoker(delegate()
            {
                if (DialogUtils.ConfirmScanner(form as IPanel, "Lock the screen and mute?"))
                {
                    Form muteForm = Context.AppPanelManager.CreatePanel("ACATMuteForm");
                    if (muteForm != null)
                    {
                        WindowActivityMonitor.Pause();
                        Context.AppPanelManager.ShowDialog(form as IPanel, muteForm as IPanel);
                    }
                }
            }));

            return(true);
        }