コード例 #1
0
        private void NewMessageDetected(object sender, MessageEventArgs args)
        {
            messageInfoTextBlock.Dispatcher.Invoke(() =>
            {
                if (args.Message.Type != Message.MessageType.Other && !verifyPending)
                {
                    messageInfoTextBlock.Text = args.Message.Text;
                    UpdateHandler.HandleUpdateFromMessage(args.Message);
                }

                if (verifyPending)
                {
                    if (args.Message.Text == verifyTextBox.Text && args.Message.Player == settings.CharacterName && args.Message.Type == Message.MessageType.Message)
                    {
                        WorkingPanel.Visibility     = Visibility.Visible;
                        informationPanel.Visibility = Visibility.Visible;
                        verifyPanel.Visibility      = Visibility.Hidden;

                        accountInfoTextBlock.Text   = settings.AccountName;
                        characterInfoTextBlock.Text = settings.CharacterName;

                        verifyPending = false;

                        HubProxy.Start();
                        HubProxy.LoginAsync(settings.Channel);

                        var charWindow = new CharactersWindow();
                        charWindow.Show();
                    }
                }
            });
        }
コード例 #2
0
    public static void InitGUI()
    {
        chapterWindow      = new ChapterWindow(windowRect, new GUIContent(TC.get("Element.Name0")), "Window");
        scenesWindow       = new ScenesWindow(windowRect, new GUIContent(TC.get("Element.Name1")), "Window");
        cutscenesWindow    = new CutscenesWindow(windowRect, new GUIContent(TC.get("Element.Name9")), "Window");
        booksWindow        = new BooksWindow(windowRect, new GUIContent(TC.get("Element.Name11")), "Window");
        itemsWindow        = new ItemsWindow(windowRect, new GUIContent(TC.get("Element.Name18")), "Window");
        setItemsWindow     = new SetItemsWindow(windowRect, new GUIContent(TC.get("Element.Name59")), "Window");
        playerWindow       = new PlayerWindow(windowRect, new GUIContent(TC.get("Element.Name26")), "Window");
        characterWindow    = new CharactersWindow(windowRect, new GUIContent(TC.get("Element.Name27")), "Window");
        conversationWindow = new ConversationWindow(windowRect, new GUIContent(TC.get("Element.Name31")),
                                                    "Window");
        advencedFeaturesWindow = new AdvencedFeaturesWindow(windowRect,
                                                            new GUIContent(TC.get("AdvancedFeatures.Title")), "Window");
        //adapatationProfileWindow = new AdaptationProfileWindow(windowRect,
        //    new GUIContent(Language.GetText("ADAPTATION_PROFILES")), "Window");
        //assesmentProfileWindow = new AssesmentProfileWindow(windowRect,
        //    new GUIContent(Language.GetText("ASSESMENT_PROFILES")), "Window");


        // Left menu buttons
        leftMenuContentScene       = new GUIContent();
        leftMenuContentScene.image = (Texture2D)sceneTexture;
        leftMenuContentScene.text  = TC.get("Element.Name1");

        leftMenuContentCutscene       = new GUIContent();
        leftMenuContentCutscene.image = (Texture2D)cutsceneTexture;
        leftMenuContentCutscene.text  = TC.get("Element.Name9");

        leftMenuContentBook       = new GUIContent();
        leftMenuContentBook.image = (Texture2D)bookTexture;
        leftMenuContentBook.text  = TC.get("Element.Name11");

        leftMenuContentItem       = new GUIContent();
        leftMenuContentItem.image = (Texture2D)itemTexture;
        leftMenuContentItem.text  = TC.get("Element.Name18");

        leftMenuContentSetItem       = new GUIContent();
        leftMenuContentSetItem.image = (Texture2D)setItemTexture;
        leftMenuContentSetItem.text  = TC.get("Element.Name59");

        leftMenuContentPlayer       = new GUIContent();
        leftMenuContentPlayer.image = (Texture2D)playerTexture;
        leftMenuContentPlayer.text  = TC.get("Element.Name26");

        leftMenuContentCharacter       = new GUIContent();
        leftMenuContentCharacter.image = (Texture2D)characterTexture;
        leftMenuContentCharacter.text  = TC.get("Element.Name27");

        leftMenuContentConversation       = new GUIContent();
        leftMenuContentConversation.image = (Texture2D)conversationTexture;
        leftMenuContentConversation.text  = TC.get("Element.Name31");

        leftMenuContentAdvanced       = new GUIContent();
        leftMenuContentAdvanced.image = (Texture2D)advancedTexture;
        leftMenuContentAdvanced.text  = TC.get("AdvancedFeatures.Title");
    }