Ejemplo n.º 1
0
	static void ShowAbout()
	{
		helpWindow = EditorWindow.GetWindow<HelpWindow>("Help/About");
		
		aboutText = File.ReadAllText("Assets/VirgoLoader/readme.txt");
		
		helpWindow.maxSize = new Vector2( 600, 700 );
		helpWindow.minSize = new Vector2( 600, 400 );	
	}
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KeyboardHook" /> class.
 /// </summary>
 /// <param name="log"></param>
 /// <param name="combinationsConfiguration">The combinations configuration.</param>
 /// <param name="effects">The sounds effects.</param>
 /// <param name="helpWindow">Gui helper window</param>
 public KeyboardHook(ILog log, KeyCombinationsConfiguration combinationsConfiguration, KeysSoundEffects effects,
                     HelpWindow helpWindow = null)
 {
     logger                                = log;
     hookInstance                          = LoadPInvokeKernel32Library("User32");
     baseConfiguration                     = combinationsConfiguration;
     currentCombination                    = baseConfiguration.GetCombinationInstance(logger);
     combinationSize                       = baseConfiguration.CombinationSize;
     configCombinations                    = baseConfiguration.Combinations;
     lastUsedCombination                   = baseConfiguration.GetCombinationInstance(logger);
     combinationsKeysVirtualCodes          = configCombinations.ToVirtualKeyCodes().ToList();
     numericKeypadKeysVirtualCodes         = Globals.NumericKeypadVirtualKeyCodes.ToList();
     numericKeypadWithShiftKeyVirtualCodes = Globals.NumericKeypadWithShiftVirtualKeyCodes.ToList();
     numericKeysVirtualCodes               = Globals.NumericVirtualKeyCodes.ToList();
     modKeysVirtualCodes                   = Globals.ModKeysVirtualKeyCodes.ToList();
     KeysStateChecker                      = new WindowsInputDeviceStateAdaptor();
     inputSimulator                        = new InputSimulator();
     soundEffects                          = effects;
     helperWindow                          = helpWindow;
 }
Ejemplo n.º 3
0
    public static void Display()
    {
        if (Instance == null)
        {
            dontShowAgain = EditorPrefs.GetBool("RPGFarmingKit_HideHelpWindow");

            if (EditorSceneManager.sceneCount == 0)
            {
                Instance.AddScenesToBuildList();
            }

            projectInUploadFolder = Directory.Exists(Path.Combine(Application.dataPath, "Upload"));

            var window = (HelpWindow)EditorWindow.GetWindow(typeof(HelpWindow));
            window.titleContent = new GUIContent("Help Menu");
            window.minSize      = new Vector2(600, (projectInUploadFolder) ? 400 : 350);
            window.Show(true);

            Instance = window;
        }
    }
Ejemplo n.º 4
0
Archivo: HelpTile.cs Proyecto: Cdrix/SM
    internal static HelpTile CreateTile(Transform container,
                                        string key, Vector3 iniPos, HelpWindow win)
    {
        HelpTile obj = null;

        var root = "";

        obj = (HelpTile)Resources.Load(Root.help_Tile, typeof(HelpTile));
        obj = (HelpTile)Instantiate(obj, new Vector3(), Quaternion.identity);

        var iniScale = obj.transform.localScale;

        obj.transform.SetParent(container);
        obj.transform.localPosition = iniPos;
        obj.transform.localScale    = iniScale;

        obj.Key    = key;
        obj.Window = win;

        return(obj);
    }
Ejemplo n.º 5
0
        public MainWindow(ILog log)
        {
            InitializeComponent();
            logger                  = log;
            helperWindow            = new HelpWindow(logger);
            configFileName          = ConfigurationManager.AppSettings["DefaultConfigFileName"];
            Globals.AliasResources  = new ResXResourceSet(ConfigurationManager.AppSettings["KeyAliasesResxFileName"]);
            Globals.GlobalResources = new ResXResourceSet(ConfigurationManager.AppSettings["GlobalResxFileName"]);
            keysSounds              = new KeysSoundEffects(logger, Resources.Resources.key1, Resources.Resources.key2,
                                                           Resources.Resources.ctrl, Resources.Resources.shift, Resources.Resources.win,
                                                           Resources.Resources.alt);
            Globals.IsSoundOn = true;
            existingConfigs   = new List <string>();
            try
            {
                CollectExistingConfigs();
                if (!File.Exists(configFileName))
                {
                    configFileName = existingConfigs[0] ?? "";
                }

                if (existingConfigs.Any())
                {
                    config      = new JsonConfigSource(logger, configFileName);
                    hookService = new GlobalHookService(logger, config, keysSounds, true);
                }
                Helper.AddNumericRowsToGrid(combinationsTable);
            }
            catch (ArgumentOutOfRangeException outRangeException)
            {
                Helper.AddNumericRowsToGrid(combinationsTable);
                this.startAppBtn.Enabled   = false;
                this.stopAppBtn.Enabled    = false;
                this.EditConfigBtn.Enabled = false;
            }
            catch (Exception e)
            {
                logger.Error(e.StackTrace);
            }
        }
Ejemplo n.º 6
0
        private void btnLaunch_Click(object sender, RoutedEventArgs e)
        {
            Button           btn  = sender as Button;
            AdobeProductBean bean = btn.DataContext as AdobeProductBean;

            if (bean != null)
            {
                if (!File.Exists(bean.LaunchPath))
                {
                    HelpWindow helpWindow = new HelpWindow("提示", "软件未安装,或者未安装在默认目录,请按照以下提示使用\n\n1、去Adobe官网下载CreativeCloud并且安装\n" +
                                                           "2、通过CreativeCloud下载你想要的应用比如Photoshop(需要登陆CreativeCloud)\n" +
                                                           "3、在本软件内找到你下载的版本,点击优化即可使用\n" +
                                                           "4、注意不要更改adobe系列软件的安装目录\n" +
                                                           "5、点击确定按钮去官网下载CreativeCloud", new HelperHandler("help"));
                    helpWindow.Show();
                }
                else
                {
                    Process.Start(bean.LaunchPath);
                }
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// create new window or show it on top
        /// </summary>
        /// <param name="topic"></param>
        private void OpenHelpWIndow(string topic)
        {
            if (help == null)
            {
                help = new HelpViewModel(topic);
                help.PropertyChanged += (s, e1) =>
                {
                    if (e1.PropertyName == "IsClosed")
                    {
                        help = null;
                    }
                };
                // to access help form modal dialog
                // https://eprystupa.wordpress.com/2008/07/28/running-wpf-application-with-multiple-ui-threads/
                var thread = new Thread(() =>
                {
                    var window = new HelpWindow();
                    ShowWindow(help, window, false);

                    this.Closed += (s, e1) =>
                    {
                        window.Dispatcher.Invoke((Action)(() =>
                        {
                            window.Close();
                        }));
                    };
                    window.Closed += (s, e2) => window.Dispatcher.InvokeShutdown();
                    System.Windows.Threading.Dispatcher.Run();
                });

                thread.SetApartmentState(ApartmentState.STA);
                thread.Start();
            }
            else
            {
                help.Topic    = topic;
                help.IsActive = true;
            }
        }
Ejemplo n.º 8
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            _imageDeviceNotConnectedStayOpenTimer                = null;
            _leapMotionDeviceNotConnectedImage                   = new LMDeviceNotConnectedImage();
            _leapMotionDeviceNotConnectedImage.Closing          += LMDeviceNotConnectedImageWindow_Closing;
            _leapMotionDeviceNotConnectedImage.IsVisibleChanged += LMDeviceNotConnectedImageWindow_IsVisibleChanged;
            _leapMotionDeviceNotConnectedImage.Show();


            _configWindow          = new ConfigurationWindow();
            _configWindow.Closing += MainWindow_Closing;
            _helpWindow            = new HelpWindow();
            _helpWindow.Closing   += MainWindow_Closing;

            InitSysTrayIcon();
            _taskbarNotifier = new LogTaskbarNotifier();

            KeyboardListener keyListener = InitKeyboardListener();

            InitLeapMotionController(keyListener);
        }
    /// <summary>
    /// Inspector GUI
    /// </summary>
    public override void OnInspectorGUI()
    {
        //Title
        EditorGUILayout.LabelField("Spline Creator", EditorStyles.boldLabel);

        //Call each control section
        GeneralControl();
        SplineControl();
        VoronoiControls();
        GenerateControls();

        //Create a help button
        //This button will bring you a editor window and
        //explain what the settings do
        if (GUILayout.Button("HELP"))
        {
            HelpWindow.Init();
        }

        //Repaint the inspector
        Repaint();
    }
Ejemplo n.º 10
0
        /// <summary>
        /// Method for the window button functionality
        /// </summary>
        /// <param name="commandName"></param>
        internal void GameCommand(string commandName)
        {
            switch (commandName)
            {
            case "NewGame":

                _gameboard.InitializeGameboard();
                OnPropertyChanged(nameof(Gameboard));

                _gameboard.CurrentRoundState = Gameboard.GameBoardState.PlayerXTurn;
                MessageBoxContent            = "Player X Move";
                break;

            case "ResetGame":
                _gameboard.InitializeGameboard();
                OnPropertyChanged(nameof(Gameboard));

                _gameboard.CurrentRoundState = Gameboard.GameBoardState.PlayerXTurn;
                MessageBoxContent            = "Player X Move";
                break;

            case "Quit":
                //System.Windows.Application.Current.Shutdown();
                break;

            case "Help":
                HelpWindow helpwindow = new HelpWindow();
                helpwindow.ShowDialog();
                break;

            default:
                _gameboard.InitializeGameboard();
                OnPropertyChanged(nameof(Gameboard));

                _gameboard.CurrentRoundState = Gameboard.GameBoardState.PlayerXTurn;
                MessageBoxContent            = "Player X Move";
                break;
            }
        }
Ejemplo n.º 11
0
        public void ShowHelpWindow(bool modal)
        {
            if (helpWindow != null)
            {
                if (helpWindow.WindowState == WindowState.Minimized)
                {
                    helpWindow.WindowState = WindowState.Normal;
                }
                helpWindow.Focus();
                return;
            }

            helpWindow         = new HelpWindow();
            helpWindow.Closed += helpWindow_Closed;
            if (modal)
            {
                helpWindow.ShowDialog();
            }
            else
            {
                helpWindow.Show();
            }
        }
Ejemplo n.º 12
0
        private void btnPatch_Click(object sender, RoutedEventArgs e)
        {
            Button           btn  = sender as Button;
            AdobeProductBean bean = btn.DataContext as AdobeProductBean;

            if (bean != null)
            {
                if (!File.Exists(bean.LaunchPath))
                {
                    HelpWindow helpWindow = new HelpWindow("提示", "软件未安装,或者未安装在默认目录,请按照以下提示使用\n\n" +
                                                           "1、去Adobe官网下载CreativeCloud并且安装\n" +
                                                           "2、通过CreativeCloud下载你想要的应用比如Photoshop(需要登陆CreativeCloud)\n" +
                                                           "3、在本软件内找到你下载的版本,点击优化即可使用\n" +
                                                           "4、注意不要更改adobe系列软件的安装目录\n" +
                                                           "5、点击确定按钮去官网下载CreativeCloud", new HelperHandler("help"));
                    helpWindow.Show();
                }
                else
                {
                    try
                    {
                        bool succ = AdobePatchUtil.patchProduct(bean.Product, bean.Version);
                        if (succ)
                        {
                            alert(bean.Name + "优化成功,已经可以正常使用");
                        }
                        else
                        {
                            alert(bean.Name + "优化失败,可能已经优化过,请启动尝试。如果未优化成功请联系开发者反馈");
                        }
                    }
                    catch (Exception e1) {
                        alert(bean.Name + "发生未知错误,请联系开发者反馈:" + e1.ToString());
                    }
                }
            }
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Called when [about handler].
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void OnAboutHandler(object sender, RoutedEventArgs e)
        {
            try
            {
                HelpWindow win = null;
                try
                {
                    win = new HelpWindow();
                    win.ShowDialog();
                }
                finally
                {
                    win.Close();
                }
            }
            #region Exception Handling

            catch (Exception ex)
            {
                TraceSourceMonitorHelper.Error("UI event handler failed: {0}", ex);
            }

            #endregion // Exception Handling
        }
Ejemplo n.º 14
0
 void Start()
 {
     window = gameObject.AddComponent<HelpWindow>() as HelpWindow;
     levelWindow = gameObject.AddComponent<LevelWindow>() as LevelWindow;
     aboutWindow = gameObject.AddComponent<AboutWindow>() as AboutWindow;
     selectedIndex = 0;
     selectedIndex = 0;
     guiEnter = false;
     Time.timeScale = 1.0f;
     GameObject levelParametersObject = GameObject.FindWithTag ("LevelParameters");
     if (levelParametersObject != null)
     {
         levelParameters = levelParametersObject.GetComponent <LevelParameters>();
     }
     if (levelParameters == null)
     {
         Debug.Log ("Cannot find 'LevelParameters' script");
     }
 }
Ejemplo n.º 15
0
        public MainWindow()
        {
            InitializeComponent();

            try
            {
                MainDispatcher = Dispatcher;



                CurrentSetting = new SettingReader().ReadSetting();

                if (CurrentSetting == null)
                {
                    CurrentSetting = (new InitSettingWindow()).ShowDialog();
                }

                var data = Registry.GetValue(Registry.CurrentUser.ToString() + "\\AutoCapturer", "SettingLocation", "NotFound");
                if (data == null)
                {
                    SettingLocation = "";
                }
                else
                {
                    SettingLocation = data.ToString();
                }


                CurrentSetting.AddHandler();
                if (!CurrentSetting.TutorialProgress)
                {
                    if (MsgBox("AutoShot 도움말을 엽니다. 계속하시겠습니까?", "도움말", MessageBoxStyle.YesNo) == MessageBoxResult.Yes)
                    {
                        var hw = new HelpWindow();
                        hw.ShowDialog();
                    }

                    CurrentSetting.TutorialProgress = true;
                }

                this.Deactivated += thisDeactivated;
                this.Activated   += thisActivated;

                SystemEvents.SessionEnding += ComputerShutdown;

                this.Topmost = true;

                da.Duration     = new Duration(TimeSpan.FromMilliseconds(800));
                da.FillBehavior = FillBehavior.Stop;

                OpaAni.Duration     = new Duration(TimeSpan.FromMilliseconds(800));
                OpaAni.FillBehavior = FillBehavior.Stop;

                this.Left = 0; this.Top = 0;

                ImgWorker.Find += DetectPrintScreen;

                try
                {
                    if (IsImage(Clipboard.GetText()))
                    {
                        Clipboard.Clear();
                    }
                }
                catch
                {
                }

                urlworker.Find += DetectURL;

                scworker.Keys.Add(CurrentSetting.AllCaptureKey);
                scworker.Keys.Add(CurrentSetting.AutoCaptureKey);
                scworker.Keys.Add(CurrentSetting.OpenSettingKey);
                scworker.Keys.Add(CurrentSetting.ChangeEditorModeKey);
                scworker.Keys.Add(CurrentSetting.SelectCaptureKey);

                scworker.Find += DetectShortCut;

                this.MouseMove  += FrmAppear;
                this.MouseLeave += FrmDisappear;

                FrmDisappear(this, null);

                f.ContextMenu menu = new f.ContextMenu();

                f.MenuItem itm1 = new f.MenuItem();
                f.MenuItem itm2 = new f.MenuItem();
                f.MenuItem itm3 = new f.MenuItem();

                menu.MenuItems.Add(itm1);
                menu.MenuItems.Add(itm2);
                menu.MenuItems.Add(itm3);

                itm1.Index  = 0;
                itm1.Text   = "프로그램 종료";
                itm1.Click += delegate(object s, EventArgs e)
                {
                    this.Close();
                };

                itm2.Index  = 0;
                itm2.Text   = "도움말 보기";
                itm2.Click += delegate(object s, EventArgs e)
                {
                    HelpButt_Click(null, null);
                };

                itm3.Index  = 0;
                itm3.Text   = "설정";
                itm3.Click += delegate(object s, EventArgs e)
                {
                    PathButton_Click(null, null);
                };

                notify             = new f.NotifyIcon();
                notify.ContextMenu = menu;
                notify.Text        = "AutoShot 동작 중";
                notify.Visible     = true;
                notify.Icon        = Properties.Resources.AucaIcon;

                PopUpWindow puw = new PopUpWindow("실행됨", "AutoShot이 실행되었습니다.");
                puw.ShowTime(1000);

                ClipboardMonitor.Start();
            }
            catch (Exception ex)
            {
                MsgBox(ex.ToString());
            }

            PngBitmapEncoder enc = new PngBitmapEncoder();

            SyncSpace(ImageSourceToBytes(enc, CopyScreen()).Length);

            sw.Close();
        }
Ejemplo n.º 16
0
    void Start()
    {
        foreach(GameObject enemyAnchor in enemiesAnchorns)
        {
            enemyAnchor.transform.parent.gameObject.SetActive(false);
        }

        guiEnter = false;
        selectedIndex = 0;
        showGameMenu = false;
        Time.timeScale = 1;
        allPlayersCount = 0;
        cameraCounter = 0;
        if (levelParameters.getSinglePlayer())
        {
            allNetworkReady = true;
            thisPlayer = (GameObject)Instantiate (player, startPositions[0].transform.position, startPositions[0].transform.rotation);
            thisPlayer.GetComponent <PlayerController> ().racerName = "Player 001";
            cameraController.player = thisPlayer;
            thisPlayer.transform.Find("_Body").GetComponent<Renderer>().sharedMaterial = hoverMaterials[0];
            thisPlayer.transform.Find("Mini Map Marker").GetComponent<Renderer>().sharedMaterial = markerMaterials[0];
            thisPlayer.GetComponent <PlayerController> ().bodyMaterial = hoverMaterials[0];
            for(int i=1;i<maxPlayers;i++){
                GameObject newEnemy = (GameObject)Instantiate (enemy, startPositions[i].transform.position, startPositions[i].transform.rotation);
                newEnemy.GetComponent <EnemyController> ().checkPoints = checkpoints;
                newEnemy.GetComponent <EnemyController> ().racerName = enemyNames[i-1];
                newEnemy.GetComponent <EnemyController> ().speed+=(i*2); //diffrent speed for each enemy
                newEnemy.transform.Find("_Body").GetComponent<Renderer>().sharedMaterial = hoverMaterials[i];
                newEnemy.transform.Find("Mini Map Marker").GetComponent<Renderer>().sharedMaterial = markerMaterials[i];
                newEnemy.GetComponent <EnemyController> ().bodyMaterial = hoverMaterials[i];
            }
        }

        gameOver = false;
        allEnemiesKilled = false;
        endOfRace = false;
        showResultsDelay = false;
        healthText.text = "Hoover condition: 100";
        velocityText.text = "0 km/h";
        gameOverText.text = "";
        winText.text = "";
        wrongWayText.text = "";
        showText.text = "";
        exitText.text = "";
        lapText.text = "Lap: 1/" + lapNumber.ToString();
        minesText.text = "Mines: " +  startMines.ToString();
        countdownTimer.text = "";
        UpdateRepair (startRepair);
        countdown = true;
        countdownTime = 0.0f;
        UpdateCurrentLapTime (0);
        bestLapTimeText.text = "Best lap time: -------------";
        finalResults = new ArrayList();
        allPlayers = new ArrayList();
        UpdateBullets (startBullets);
        UpdateTurbo (startTurbo);
        UpdateMines (startMines);
        UpdateRepair (startRepair);
        window = gameObject.AddComponent<HelpWindow>() as HelpWindow;
        window.setButtonName("Return to game (Esc)");
    }
Ejemplo n.º 17
0
 /// <summary>
 /// Help Text Update
 /// </summary>
 public override void UpdateHelp()
 {
     // Display actor status in help window
     HelpWindow.SetActor(this.Actor);
 }
Ejemplo n.º 18
0
        private void Help_Click(object sender, RoutedEventArgs e)
        {
            HelpWindow helpWindow = new HelpWindow();

            helpWindow.Show();
        }
Ejemplo n.º 19
0
 /// <summary>
 /// Help Text Update
 /// </summary>
 public override void UpdateHelp()
 {
     // Display npc Name and state in the help window
     HelpWindow.SetNpc(this.Npc);
 }
Ejemplo n.º 20
0
    //Get the help window
    public static void Init()
    {
        HelpWindow window = EditorWindow.GetWindow <HelpWindow>();

        window.Show();
    }
Ejemplo n.º 21
0
        private void ShowHelpWindow(ShowHelpMessage obj)
        {
            var helpWindow = new HelpWindow();

            helpWindow.Show();
        }
Ejemplo n.º 22
0
 public static void ShowHelpWindow()
 {
     HelpWindow window = EditorWindow.GetWindow <HelpWindow>();
 }
        void Awake()
        {
            this.Log("Awake");
            configFilename = IOUtils.GetFilePathFor(this.GetType(), "FuelBalancer.cfg");

            settings = new Settings();

            settingsWindow = new SettingsWindow(settings);
            helpWindow = new HelpWindow();
            mainWindow = new MainWindow(this, settings, settingsWindow, helpWindow);

            button = new ButtonWrapper(new Rect(Screen.width * 0.7f, 0, 32, 32),
                "ThunderAerospace/TacFuelBalancer/Textures/button", "FB",
                "TAC Fuel Balancer", OnIconClicked);

            resources = new Dictionary<string, ResourceInfo>();
            numberOfParts = 0;
            vesselSituation = Vessel.Situations.PRELAUNCH;
        }
Ejemplo n.º 24
0
        /// <summary>
        /// ヘルプウィンドウを表示します。
        /// </summary>
        private static void ShowHelpWindow()
        {
            var helpWindow = HelpWindow.Create();

            helpWindow.ShowDialog();
        }
 private void helpMenuItem_Click(object sender, RoutedEventArgs e)
 {
     HelpWindow helpWindow = new HelpWindow();
     helpWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
     helpWindow.Show();
 }
Ejemplo n.º 26
0
        private void OpenHelpButton(object sender, RoutedEventArgs e)
        {
            var helpWindow = new HelpWindow();

            helpWindow.ShowDialog();
        }
Ejemplo n.º 27
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            MenuItem item     = sender as MenuItem;
            string   _iHeader = item.Header.ToString();

            switch (_iHeader)
            {
            //MenuItem_File
            case "New (Ctrl + N)": {
                var window = new NewScriptWindow();
                window.ShowDialog();
                break;
            }

            case "Open (Ctrl + O)": {
                var dlg = new OpenFileDialog();
                dlg.InitialDirectory = myGlobal.settingInfo.CasePath;
                dlg.Filter           = "Script test (*.csv)|*.csv";
                dlg.Title            = "Select script test case file";

                if (dlg.ShowDialog() == true)
                {
                    csvScriptTest.FromCsvFile(dlg.FileName, dlg.SafeFileName);

                    Properties.Settings.Default.ScriptPath = dlg.FileName;
                    Properties.Settings.Default.ScriptName = dlg.SafeFileName;
                    Properties.Settings.Default.Save();

                    MessageBox.Show("Success", "Open File", MessageBoxButton.OK, MessageBoxImage.Information);
                }
                break;
            }

            case "Save (Ctrl + S)": {
                if (myGlobal.duts.Count == 0)
                {
                    return;
                }

                if (myGlobal.duts[0].Path == null)           //new test case
                {
                    var dlg = new SaveFileDialog();
                    dlg.InitialDirectory = myGlobal.settingInfo.CasePath;
                    dlg.FileName         = string.Format("Script_Test_{0}.csv", myGlobal.duts[0].Name);
                    dlg.Filter           = "*.csv|*.csv";
                    dlg.Title            = "Save script test to file";
                    if (dlg.ShowDialog() == true)
                    {
                        csvScriptTest.ToCsvFile(dlg.FileName);

                        Properties.Settings.Default.ScriptPath = dlg.FileName;
                        Properties.Settings.Default.ScriptName = dlg.SafeFileName;
                        Properties.Settings.Default.Save();

                        MessageBox.Show("Success", "Save File", MessageBoxButton.OK, MessageBoxImage.Information);
                    }
                }
                else
                {
                    csvScriptTest.ToCsvFile(myGlobal.duts[0].Path);
                    MessageBox.Show("Success", "Save File", MessageBoxButton.OK, MessageBoxImage.Information);
                }
                break;
            }

            case "SaveAs": {
                MessageBox.Show(myParameter.dictRangeCapacitance.Count.ToString());
                break;
            }

            case "Exit (Ctrl + Shift + X)": {
                this.Close();
                break;
            }

            //MenuItem_View
            case "Reset Tree Icons": {
                ViewHelper.resetTreeIcon();
                break;
            }

            case "Clear Debug Windows": {
                ViewHelper.clearDebugWindow();
                break;
            }

            case "Clear Test Results": {
                ViewHelper.clearTestResult();
                break;
            }

            case "Clear Status Bar": {
                ViewHelper.clearStatusBar();
                break;
            }

            case "Show Status Bar": {
                break;
            }

            case "Reset All": {
                ViewHelper.clearAll();
                break;
            }

            //MenuItem_Tests
            case "Run Tree (F5)": {
                if (myGlobal.duts.Count == 0)
                {
                    break;
                }
                if (myGlobal.duts[0].Cases[0].Items.Count == 0)
                {
                    break;
                }

                Thread t = new Thread(new ThreadStart(() => {
                        Stopwatch st = new Stopwatch();
                        st.Start();

                        bool r = TestAllItems.getResult();

                        st.Stop();
                        string tt = (st.ElapsedMilliseconds / 1000).ToString();

                        MessageBox.Show("All item is tested. total time = " + tt + " sec", "Test Tree", MessageBoxButton.OK, MessageBoxImage.Information);
                    }));
                t.IsBackground = true;
                t.Start();
                break;
            }


            //MenuItem_Debug
            case "Multimeter device": {
                this.Opacity = 0.5;
                var window = new MultimeterWindow(myGlobal.multimeterInfo.DLLFile);
                window.ShowDialog();
                this.Opacity = 1;
                break;
            }

            case "Switch card device": {
                this.Opacity = 0.5;
                var window = new SwitchCardWindow(myGlobal.switchcardInfo.DLLFile);
                window.ShowDialog();
                this.Opacity = 1;
                break;
            }

            case "Power supply device": {
                this.Opacity = 0.5;
                var window = new PowerSupplyWindow(myGlobal.powersupplyInfo.DLLFile);
                window.ShowDialog();
                this.Opacity = 1;
                break;
            }

            //MenuItem_Options
            case "Edit configurations": {
                this.Opacity = 0.5;
                var window = new EditConfigurationWindow();
                window.ShowDialog();
                this.Opacity = 1;
                break;
            }

            //MenuItem_Windows

            //MenuItem_Help
            case "ICT Help": {
                this.Opacity = 0.5;
                var window = new HelpWindow();
                window.ShowDialog();
                this.Opacity = 1;
                break;
            }

            case "ICT About": {
                this.Opacity = 0.5;
                var window = new AboutWindow();
                window.ShowDialog();
                this.Opacity = 1;
                break;
            }

            case "ICT History": {
                this.Opacity = 0.5;
                var window = new HistoryWindow();
                window.ShowDialog();
                this.Opacity = 1;
                break;
            }
            }
        }
Ejemplo n.º 28
0
        /**
         * Key handler.
         * Since this app is primarily keyboard-focused, this is where the mapping of user interaction to logic happens.
         **/
        private void OnKeyDownHandler(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Return)
            {
                SwapVisibilities();
                if (showingAnswer == false)
                    AdvanceSlide();
            }
            else if (e.Key == Key.N)
            {
                NewSlideWindow w = new NewSlideWindow(this);
                w.ShowDialog();
                HandleNewSlides();
            }
            else if (e.Key == Key.I)
            {
                ImportFile();
            }
            else if (e.Key == Key.M)
            {
                ToggleMemorized();
            }
            else if (e.Key == Key.R)
            {
                ResetDecks();
            }
            else if (e.Key == Key.Up)
            {
                currentSlide.weight++;
                deck.SortAll();
            }
            else if (e.Key == Key.Down)
            {
                currentSlide.weight--;
                deck.SortAll();
            }
            else if (e.Key == Key.D)
            {
                DeleteCurrentSlide();
            }
            else if (e.Key == Key.H)
            {
                HelpWindow w = new HelpWindow();
                w.ShowDialog();
            }
            else if (e.Key == Key.E)
            {
                EditSlideWindow w = new EditSlideWindow(currentSlide);
                w.ShowDialog();
                UpdateScreenText();
            }
            else if (e.Key == Key.V)
            {
                List<Slide> currentDeckSlides;
                if (deck.notMemorizedSlides.Count > 0)
                    currentDeckSlides = deck.notMemorizedSlides;
                else if (deck.remainingSlides.Count > 0)
                    currentDeckSlides = deck.remainingSlides;
                else
                    currentDeckSlides = deck.finishedSlides;

                DeckViewWindow w = new DeckViewWindow(currentDeckSlides);
                w.ShowDialog();
            }
            else if (e.Key == Key.Escape)
            {
                Close();
            }
            UpdateScreenText();
        }
Ejemplo n.º 29
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var hw = new HelpWindow();

            hw.ShowDialog();
        }
 public static void OpenHelpWindow()
 {
     OpenWindow(ref winHelp, () => winHelp = null);
 }
        public void ShowHelp()
        {
            HelpWindow hw = new HelpWindow();

            hw.Show();
        }
        //Constructor
        public PlanetToolsUiController()
        {
            uiController = this;

            ListPlanetsRecursive( PSystemManager.Instance.systemPrefab.rootBody );

            foreach ( PSystemBody psB in Templates )
            {
                if( !PlanetarySettings.ContainsKey( psB.celestialBody.name ) )
                {
                    PlanetarySettings[ psB.celestialBody.name ] = new AdditionalSettingsHandler( psB.celestialBody.name );
                }

                try
                {
                    //Load globals...
                    LoadData( psB.celestialBody.name, "GameData/KittopiaSpace/SaveLoad/"+psB.celestialBody.name+".cfg" );
                }
                catch( Exception e )
                {
                    print( "failed to load: " +psB.celestialBody.name+ " Exception:" + e + "\n" );
                }

                LoadStarData( psB.celestialBody.name );
            }
            //Spawn per-save planet loader
            //GameObject persaveloader = new GameObject( "Per Save Loader", typeof( PerSave_Loader ) );
            //DontDestroyOnLoad( persaveloader );

            //Construct additional windows:
            NewWindows[ "PQSSelector" ] = new ScrollWindow( PQSSelector.ReturnPQSNames() , PQSSelector.GetButtons() , "PQS Selector", 1661269 );
            NewWindows[ "TextureBrowser" ] = new ScrollWindow( TextureBrowser.GetTextures( "Kerbin" ) , TextureBrowser.GetButtons() , "Texture Browser", 1661270 );
            NewWindows[ "HelpWindow" ] = new HelpWindow( 1661271 , "Help");
        }
Ejemplo n.º 33
0
        private void button10_Click(object sender, EventArgs e)
        {
            HelpWindow hr = new HelpWindow();

            hr.ShowDialog();
        }
Ejemplo n.º 34
0
        private void HelpClicked(object sender, RoutedEventArgs e)
        {
            HelpWindow helpWindow = new HelpWindow();

            helpWindow.ShowDialog();
        }
Ejemplo n.º 35
0
        private void OpenHelpWindow()
        {
            HelpWindow help = new HelpWindow();

            help.Show();
        }
Ejemplo n.º 36
0
    public override void OnAwake()
    {
        base.OnAwake();
        Debug.Log("TAC Fuel Balancer [" + this.GetInstanceID().ToString("X") + "][" + Time.time + "]: OnAwake");

        mainWindow = new MainWindow(this);
        configWindow = new ConfigWindow(this);
        helpWindow = new HelpWindow(this);

        resources = new Dictionary<string, ResourceInfo>();
        numberParts = 0;

        filename = IOUtils.GetFilePathFor(this.GetType(), "TacFuelBalancer.cfg");

        maxFuelFlow = 100.0;
        fuelWarningLevel = 25.0;
        fuelCriticalLevel = 5.0;

        debug = false;
    }
Ejemplo n.º 37
0
 public static void Show(WindowType windowType)
 {
     try
     {
         if (windowType.Equals(WindowType.About))
         {
             if (aboutForm == null || aboutForm.IsDisposed)
             {
                 aboutForm  = new AboutWindow(aboutPanel);
                 aboutPanel = aboutForm;
             }
             aboutForm.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.ActiveDirectoryImport))
         {
             if (adimportForm == null || adimportForm.IsDisposed)
             {
                 adimportForm  = new ActiveDirectoryImportWindow(adimportPanel);
                 adimportPanel = adimportForm;
             }
             adimportPanel.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.Options))
         {
             using (var optionsForm = new frmOptions())
             {
                 optionsForm.ShowDialog(frmMain.Default.pnlDock);
             }
         }
         else if (windowType.Equals(WindowType.SSHTransfer))
         {
             sshtransferForm  = new SSHTransferWindow(sshtransferPanel);
             sshtransferPanel = sshtransferForm;
             sshtransferForm.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.Update))
         {
             if (updateForm == null || updateForm.IsDisposed)
             {
                 updateForm  = new UpdateWindow(updatePanel);
                 updatePanel = updateForm;
             }
             updateForm.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.Help))
         {
             if (helpForm == null || helpForm.IsDisposed)
             {
                 helpForm  = new HelpWindow(helpPanel);
                 helpPanel = helpForm;
             }
             helpForm.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.ExternalApps))
         {
             if (externalappsForm == null || externalappsForm.IsDisposed)
             {
                 externalappsForm  = new ExternalToolsWindow(externalappsPanel);
                 externalappsPanel = externalappsForm;
             }
             externalappsForm.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.PortScan))
         {
             portscanForm  = new PortScanWindow(portscanPanel);
             portscanPanel = portscanForm;
             portscanForm.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.UltraVNCSC))
         {
             if (ultravncscForm == null || ultravncscForm.IsDisposed)
             {
                 ultravncscForm  = new UltraVNCWindow(ultravncscPanel);
                 ultravncscPanel = ultravncscForm;
             }
             ultravncscForm.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.ComponentsCheck))
         {
             if (componentscheckForm == null || componentscheckForm.IsDisposed)
             {
                 componentscheckForm  = new ComponentsCheckWindow(componentscheckPanel);
                 componentscheckPanel = componentscheckForm;
             }
             componentscheckForm.Show(frmMain.Default.pnlDock);
         }
         else if (windowType.Equals(WindowType.Announcement))
         {
             if (AnnouncementForm == null || AnnouncementForm.IsDisposed)
             {
                 AnnouncementForm  = new AnnouncementWindow(AnnouncementPanel);
                 AnnouncementPanel = AnnouncementForm;
             }
             AnnouncementForm.Show(frmMain.Default.pnlDock);
         }
     }
     catch (Exception ex)
     {
         Runtime.MessageCollector.AddExceptionStackTrace("App.Runtime.Windows.Show() failed.", ex);
     }
 }
Ejemplo n.º 38
0
 /// <summary>
 /// Update help window
 /// </summary>
 public override void UpdateHelp()
 {
     HelpWindow.SetText(this.Item == null ? "" : this.Item.Description);
 }