コード例 #1
0
 protected override void InitComponent()
 {
     base.InitComponent();
     scrollView  = WindowCache.GetComponent <ScrollView>  ("1_panel/scrollView");
     confirmText = WindowCache.GetComponent <Text>        ("1_panel/text_confirm");
     buyButton   = WindowCache.GetComponent <Button>      ("1_panel/buy_btn");
 }
コード例 #2
0
    public override void MultiLanguage()
    {
        var index = (int)TextForMatType.RuneUIText;

        Util.SetText(WindowCache.GetComponent <Text>("equip_panel/left/panel2/two_txt"), index, 11);
        Util.SetText(WindowCache.GetComponent <Text>("equip_panel/left/panel2/four_txt"), index, 12);
    }
コード例 #3
0
        public virtual void setUp()
        {
            recursiveDelete(testName() + " (SetUp)", trash, false, true);

            mockSystemReader = new MockSystemReader();
            mockSystemReader.userGitConfig = new FileBasedConfig(new FileInfo(Path.Combine(trash.FullName, "usergitconfig")));
            SystemReader.setInstance(mockSystemReader);

            long now = mockSystemReader.getCurrentTime();
            int  tz  = mockSystemReader.getTimezone(now);

            author = new PersonIdent("J. Author", "*****@*****.**");
            author = new PersonIdent(author, now, tz);

            committer = new PersonIdent("J. Committer", "*****@*****.**");
            committer = new PersonIdent(committer, now, tz);

            WindowCacheConfig c = new WindowCacheConfig();

            c.PackedGitLimit      = (128 * WindowCacheConfig.Kb);
            c.PackedGitWindowSize = (8 * WindowCacheConfig.Kb);
            c.PackedGitMMAP       = (useMMAP);
            c.DeltaBaseCacheLimit = (8 * WindowCacheConfig.Kb);
            WindowCache.reconfigure(c);
        }
コード例 #4
0
    public override void MultiLanguage()
    {
        var index = (int)TextForMatType.RuneUIText;

        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/intentify_panel/title/Text"), index, 26);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/intentify_panel/gold/Text"), index, 27);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/intentify_panel/uplv_Button/Text"), index, 7);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/intentify_panel/middle_panel/panel2/two_txt"), index, 11);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/intentify_panel/middle_panel/panel2/four_txt"), index, 12);

        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/right_panel/title/Text"), index, 28);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/right_panel/gold/Text"), index, 27);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/right_panel/evolution_Button/Text"), index, 8);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/right_panel/middle_panel/panel3/two_txt"), index, 11);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/right_panel/middle_panel/panel3/four_txt"), index, 12);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/suceessEvolvePanel/bg/content/back/title/up_h/up_1"), index, 50);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/suceessEvolvePanel/bg/content/back/title/up_h/up_2"), index, 51);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/suceessEvolvePanel/bg/content/back/title/up_h/up_3"), index, 52);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/suceessEvolvePanel/bg/content/back/title/up_h/up_4"), index, 53);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/suceessEvolvePanel/dengji/dengjishangxain"), index, 47);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/evolution_panel/suceessEvolvePanel/text"), index, 54);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/left_panel/tip/Text"), index, 49);

        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/tipPanel/background/top/equipinfo"), (int)TextForMatType.PublicUIText, 6);
        Util.SetText(WindowCache.GetComponent <Text>("inten_evo_panel/tipPanel/sure/Text"), (int)TextForMatType.PublicUIText, 4);
    }
コード例 #5
0
 protected override void InitComponent()
 {
     base.InitComponent();
     itemRoot    = WindowCache.GetComponent <Transform>("summon_Panel/item");
     portrait    = WindowCache.GetComponent <Image>    ("summon_Panel/sprite");
     closeButton = WindowCache.GetComponent <Button>   ("summon_Panel/btn");
 }
コード例 #6
0
 protected override void InitComponent()
 {
     base.InitComponent();
     prevSuit = new SuitProperty(WindowCache.GetComponent <Transform>("success_Panel/sublimation/left"));
     nowSuit  = new SuitProperty(WindowCache.GetComponent <Transform>("success_Panel/sublimation/right"));
     name     = WindowCache.GetComponent <Text>("success_Panel/sublimation/name_txt");
 }
コード例 #7
0
 protected override void InitComponent()
 {
     base.InitComponent();
     this.scrollView    = WindowCache.GetComponent <ScrollView>("preview_panel/scrollView");
     this.confirmButton = WindowCache.GetComponent <Button>("preview_panel/confirm_button");
     this.closeButton   = WindowCache.GetComponent <Button>("preview_panel/bg/equip_prop/top/button");
 }
コード例 #8
0
        public override void tearDown()
        {
            base.tearDown();
            var windowCacheConfig = new WindowCacheConfig();

            WindowCache.reconfigure(windowCacheConfig);
        }
コード例 #9
0
 protected override void InitComponent()
 {
     base.InitComponent();
     m_defeat  = WindowCache.GetComponent <Transform>("factionbattle/result/defeat");
     m_victory = WindowCache.GetComponent <Transform>("factionbattle/result/victory");
     m_settlement.BindComponent(WindowCache.GetComponent <Transform>("factionbattle/result/settlement"));
 }
コード例 #10
0
 protected override void InitComponent()
 {
     base.InitComponent();
     _scrollView  = WindowCache.GetComponent <ScrollView> ("invite_panel/scrollView");
     _toggleGroup = WindowCache.GetComponent <ToggleGroup>("invite_panel/scrollView/viewport");
     _startButton = WindowCache.GetComponent <Button>     ("invite_panel/start_Btn");
 }
コード例 #11
0
 public override void MultiLanguage()
 {
     base.MultiLanguage();
     Util.SetText(WindowCache.GetComponent <Text>("npcInfo_Panel/frame/title"), ConfigText.GetDefalutString(TextForMatType.NpcAwakeUI, 6));
     Util.SetText(WindowCache.GetComponent <Text>("npcInfo_Panel/bottom/title"), ConfigText.GetDefalutString(TextForMatType.NpcAwakeUI, 3));
     Util.SetText(WindowCache.GetComponent <Text>("npcInfo_Panel/relationshipSlider/text"), ConfigText.GetDefalutString(TextForMatType.NpcAwakeUI, 7));
 }
コード例 #12
0
    private List <PPlayerInfo> Check = new List <PPlayerInfo>(5);//选中的

    protected override void InitComponent()
    {
        base.InitComponent();
        scrollView   = WindowCache.GetComponent <ScrollView>  ("invite_panel/person_frame/scrollView");
        inviteButton = WindowCache.GetComponent <Button>      ("invite_panel/person_frame/invite_btn");
        closeButton  = WindowCache.GetComponent <Button>      ("invite_panel/person_frame/bg/close_btn");
    }
コード例 #13
0
    protected override void InitComponent()
    {
        base.InitComponent();

        var parent = WindowCache.GetComponent <Transform> ("team_panel/preaward_Panel/parent");

        m_chaseRewardItems = ChaseTaskItem.InitRewardItem(parent, m_chaseRewardItems);

        var t = WindowCache.transform.Find("team_panel/starReward_Panel");

        leftButton      = WindowCache.GetComponent <Button>      ("team_panel/awakeMissionImage_scrollView/changePage_Btn_left");
        rightButton     = WindowCache.GetComponent <Button>      ("team_panel/awakeMissionImage_scrollView/changePage_Btn_right");
        taskIcon        = WindowCache.GetComponent <Image>       ("team_panel/awakeMissionImage_scrollView/template/0/map_Img");
        readyStateImage = WindowCache.GetComponent <Image>       ("team_panel/memberFrame_Img/ready_Img");
        taskButton      = WindowCache.GetComponent <Button>      ("team_panel/awakeMissionImage_scrollView/template/0/map_Img");
        chatButton      = WindowCache.GetComponent <Button>      ("team_panel/chat");
        invitePanel     = WindowCache.GetComponent <Transform>   ("invite_panel");
        InfoPanel[0]    = WindowCache.GetComponent <Transform>   ("team_panel/captainFrame_Img");
        InfoPanel[1]    = WindowCache.GetComponent <Transform>   ("team_panel/memberFrame_Img");
        inviteButton    = WindowCache.GetComponent <Button>      ("team_panel/invite_Panel");
        openToggle      = WindowCache.GetComponent <Toggle>      ("team_panel/open_Toggle");
        buyTimeButton   = WindowCache.GetComponent <Button>      ("team_panel/remainchallengeCount/resetBtn");
        readyButton     = WindowCache.GetComponent <Button>      ("team_panel/start_Btn");
        prepareButton   = WindowCache.GetComponent <Button>      ("team_panel/ready_Btn");
        cancelButton    = WindowCache.GetComponent <Button>      ("team_panel/cancel_Btn");
        TickOutButton   = WindowCache.GetComponent <Button>      ("team_panel/memberFrame_Img/TickOut");
        broadButton     = WindowCache.GetComponent <Button>      ("team_panel/postTeamInfo");
        timesPanel      = WindowCache.GetComponent <Transform>   ("team_panel/remainchallengeCount");
        costBloodPanel  = WindowCache.GetComponent <Transform>   ("team_panel/costBloodCard");
        enterTimes      = WindowCache.GetComponent <Text>        ("team_panel/remainchallengeCount/remainCount_Txt");
        costBloodCard   = WindowCache.GetComponent <Text>        ("team_panel/costBloodCard/Image/Text");
        noEnough        = costBloodCard.color;
        stageName       = WindowCache.GetComponent <Text>        ("team_panel/awakeMissionName_Txt");
        levelText       = WindowCache.GetComponent <Text>        ("team_panel/captainFrame_Img/captainLevel_Txt");
        captainName     = WindowCache.GetComponent <Text>        ("team_panel/captainFrame_Img/captainName_Txt");
        energyCost      = WindowCache.GetComponent <Text>        ("team_panel/start_Btn/Text");
        energyCost2     = WindowCache.GetComponent <Text>        ("team_panel/ready_Btn/Text");
        tipText         = WindowCache.GetComponent <Text>        ("team_panel/memberRequire_Txt");
        startButtonText = WindowCache.GetComponent <Text>        ("team_panel/start_Btn/start_text");
        noRewardHint    = WindowCache.GetComponent <Text>        ("team_panel/remainchallengeCount/noRewardHint");
        recommend       = WindowCache.GetComponent <Text>        ("team_panel/awakeMissionImage_scrollView/recommend/Text");
        confirmPanel    = WindowCache.GetComponent <Transform>   ("tip");
        chatNotice      = WindowCache.GetComponent <Transform>   ("team_panel/chat/newinfo");

        stars[0] = WindowCache.GetComponent <Transform>   ("team_panel/awakeMissionImage_scrollView/starframe/star_01");
        stars[1] = WindowCache.GetComponent <Transform>   ("team_panel/awakeMissionImage_scrollView/starframe/star_02");
        stars[2] = WindowCache.GetComponent <Transform>   ("team_panel/awakeMissionImage_scrollView/starframe/star_03");

        if (t)
        {
            chaseStar = t.GetComponentDefault <ChaseStarPanel>();
        }


        if (openToggle.isOn)
        {
            openToggle.isOn = false;
        }
    }
コード例 #14
0
        public void testConfigureCache_PackedGitLimit_0()
        {
            var cfg = new WindowCacheConfig {
                PackedGitLimit = 0
            };

            AssertHelper.Throws <ArgumentException>(() => WindowCache.reconfigure(cfg));
        }
コード例 #15
0
 protected override void InitComponent()
 {
     base.InitComponent();
     scrollView = WindowCache.GetComponent <ScrollView>("5_panel/scrollView");
     totalText  = WindowCache.GetComponent <Text>      ("5_panel/alreadycharge_Txt/number_Txt");
     lessText   = WindowCache.GetComponent <Text>      ("5_panel/text_confirm");
     GoBuy      = WindowCache.GetComponent <Button>    ("5_panel/buy_btn");
 }
コード例 #16
0
        private static void ShutdownGit(GitRepositoryFolder repositoryFolder)
        {
            string path = repositoryFolder.GetAbsolutePath();
            var    git  = NGit.Api.Git.Open(path);

            git.GetRepository().Close();
            WindowCache.Reconfigure(new WindowCacheConfig());
        }
コード例 #17
0
        private static void WhackCache()
        {
            var config = new WindowCacheConfig {
                PackedGitOpenFiles = 1
            };

            WindowCache.reconfigure(config);
        }
コード例 #18
0
 protected override void InitComponent()
 {
     base.InitComponent();
     sprite       = WindowCache.GetComponent <Image>   ("jipin/item/rune");
     spriteShadow = WindowCache.GetComponent <Image>   ("jipin/item/spriteShadow");
     clickButton  = WindowCache.GetComponent <Button>  ("jipin");
     soulEntry    = new SoulEntry(WindowCache.GetComponent <Transform>("jipin/item"));
 }
コード例 #19
0
 protected override void InitComponent()
 {
     base.InitComponent();
     scrollView        = WindowCache.GetComponent <ScrollView>("disassembly/left/props");
     previewScrollView = WindowCache.GetComponent <ScrollView>("disassembly/right/props");
     decomposeButton   = WindowCache.GetComponent <Button>("disassembly/disassembly_Btn");
     nothing           = WindowCache.GetComponent <RectTransform>("disassembly/left/nothing");
     propPlane         = WindowCache.GetComponent <RectTransform>("disassembly/left/props");
 }
コード例 #20
0
 protected override void InitComponent()
 {
     base.InitComponent();
     m_timeRoot       = WindowCache.GetComponent <Transform>("count_tip/time");
     m_timeText       = WindowCache.GetComponent <Text>("count_tip/time/Text");
     m_countDownText  = WindowCache.GetComponent <Text>("count_tip/time/countdown_Txt");
     m_watchCountText = WindowCache.GetComponent <Text>("count_tip/time/closeCountDown_Txt");
     m_watchToggle    = WindowCache.GetComponent <Toggle>("count_tip/watch_battle");
 }
コード例 #21
0
 private void ResponseExitRoom(ScTeamPveExitRoom msg)
 {
     if (msg.result != 0)
     {
         return;
     }
     UnInitialize(false);
     WindowCache.Hide();
 }
コード例 #22
0
        public override void setUp()
        {
            var windowCacheConfig = new WindowCacheConfig {
                PackedGitOpenFiles = 1
            };

            WindowCache.reconfigure(windowCacheConfig);
            base.setUp();
        }
コード例 #23
0
        private static void CheckLimits(WindowCacheConfig cfg)
        {
            WindowCache cache = WindowCache.Instance;

            Assert.IsTrue(cache.getOpenFiles() <= cfg.PackedGitOpenFiles);
            Assert.IsTrue(cache.getOpenBytes() <= cfg.PackedGitLimit);
            Assert.IsTrue(0 < cache.getOpenFiles());
            Assert.IsTrue(0 < cache.getOpenBytes());
        }
コード例 #24
0
 public override void MultiLanguage()
 {
     Util.SetText(WindowCache.GetComponent <Text>("lingpo/1/icon/Text"), 10103, 0);
     Util.SetText(WindowCache.GetComponent <Text>("lingpo/2/icon/Text"), 10103, 1);
     Util.SetText(WindowCache.GetComponent <Text>("lingpo/3/icon/Text"), 10103, 2);
     Util.SetText(WindowCache.GetComponent <Text>("lingpo/4/icon/Text"), 10103, 3);
     Util.SetText(WindowCache.GetComponent <Text>("lingpo/5/icon/Text"), 10103, 4);
     Util.SetText(WindowCache.GetComponent <Text>("lingpo/6/icon/Text"), 10103, 5);
 }
コード例 #25
0
 private void onTaskIconClick()
 {
     if (!moduleAwakeMatch.MasterIsCaptain)
     {
         return;
     }
     Window_TeamMatch.IsChooseStage = true;
     UnInitialize(false);
     WindowCache.Hide();
 }
コード例 #26
0
    public override void MultiLanguage()
    {
        base.MultiLanguage();
        var ct = ConfigManager.Get <ConfigText>((int)TextForMatType.AssistUI).text;

        Util.SetText(WindowCache.GetComponent <Text>("invite_panel/start_Btn/start_text"), ct[0]);
        Util.SetText(WindowCache.GetComponent <Text>("invite_panel/titleBg/title_Txt"), ct[5]);
        Util.SetText(WindowCache.GetComponent <Text>("checkbox/toggle_02/title"), ct[6]);
        Util.SetText(WindowCache.GetComponent <Text>("checkbox/toggle_01/title"), ct[7]);
    }
コード例 #27
0
        public void testCache_TooFewFiles()
        {
            var cfg = new WindowCacheConfig {
                PackedGitOpenFiles = 2
            };

            WindowCache.reconfigure(cfg);
            DoCacheTests();
            CheckLimits(cfg);
        }
コード例 #28
0
        public void testCache_TooSmallLimit()
        {
            var cfg = new WindowCacheConfig {
                PackedGitWindowSize = 4096, PackedGitLimit = 4096
            };

            WindowCache.reconfigure(cfg);
            DoCacheTests();
            CheckLimits(cfg);
        }
コード例 #29
0
 protected override void InitComponent()
 {
     base.InitComponent();
     confirmButton = WindowCache.GetComponent <Button>("tip/detail/confirm_btn");
     cancelButton  = WindowCache.GetComponent <Button>("tip/detail/cancel_btn");
     closeButton   = WindowCache.GetComponent <Button>("tip/detail/close");
     remainText    = WindowCache.GetComponent <Text>  ("tip/detail/remain");
     costText      = WindowCache.GetComponent <Text>  ("tip/detail/cost/icon/now");
     costIcon      = WindowCache.GetComponent <Image> ("tip/detail/cost/icon");
 }
コード例 #30
0
    protected override void InitComponent()
    {
        base.InitComponent();
        input      = WindowCache.GetComponent <InputField>("deletePanel/changename/inputname");
        confirm    = WindowCache.GetComponent <Button>    ("deletePanel/changename/cnamesurefree");
        cancel     = WindowCache.GetComponent <Button>    ("deletePanel/changename/cancel");
        close      = WindowCache.GetComponent <Button>    ("deletePanel/bg/equip_prop/top/button");
        noticeText = WindowCache.GetComponent <Text>      ("deletePanel/changename/notice");

        input.characterLimit = GeneralConfigInfo.MAX_NAME_LEN;
    }
コード例 #31
0
ファイル: MainForm.cs プロジェクト: hoangduit/mwinapi
 private TreeNode findNode(WindowCache wc, SelectableTreeNodeData wd)
 {
     if (wd is WindowData)
     {
         if (wc.AddUnlisted(((WindowData)wd).Window))
         {
             MessageBox.Show("This Window is not included in EnumWindows");
         }
     }
     if (!existingNodes.ContainsKey(wd))
     {
         IList<TreeNodeData> parents = wd.PossibleParents;
         TreeNode curr = tree.Nodes[0];
         foreach (TreeNodeData p in parents)
         {
             if (existingNodes.ContainsKey(p))
             {
                 curr = existingNodes[p];
                 break;
             }
         }
         while (!curr.Tag.Equals(wd))
         {
             if (curr.Nodes.Count == 1 && curr.Nodes[0].Tag is string)
             {
                 curr.Nodes.Clear();
                 refreshNode(wc, curr, true);
             }
             bool found = false;
             foreach (TreeNodeData parent in parents)
             {
                 foreach (TreeNode n in curr.Nodes)
                 {
                     if (n.Tag.Equals(parent))
                     {
                         curr = n;
                         found = true;
                         break;
                     }
                 }
                 if (found) break;
             }
             if (!found)
             {
                 refreshNode(wc, curr, true);
                 foreach (TreeNodeData parent in parents)
                 {
                     foreach (TreeNode n in curr.Nodes)
                     {
                         if (n.Tag.Equals(parent))
                         {
                             curr = n;
                             found = true;
                             break;
                         }
                     }
                     if (found) break;
                 }
             }
             if (!found)
             {
                 MessageBox.Show("Could not find window below " + curr.Text);
                 return curr;
             }
         }
         if (existingNodes[wd] != curr) throw new Exception();
     }
     return existingNodes[wd];
 }
コード例 #32
0
ファイル: MainForm.cs プロジェクト: hoangduit/mwinapi
 private void refreshNode(WindowCache wc, TreeNode node, bool forceChildren)
 {
     TreeNodeData tnd = (TreeNodeData)node.Tag;
     node.ImageIndex = node.SelectedImageIndex = tnd.Icon;
     node.Text = tnd.Name;
     if (node.Nodes.Count == 1 && node.Nodes[0].Tag is string) return;
     if (node.Nodes.Count == 0 && tnd.HasChildren(wc, visibleObjectsOnlyToolStripMenuItem.Checked) && !node.IsExpanded && !forceChildren)
     {
         node.Nodes.Add("");
         node.Nodes[0].Tag = "";
         return;
     }
     IList<TreeNodeData> children = tnd.GetChildren(wc, visibleObjectsOnlyToolStripMenuItem.Checked);
     bool[] found = new bool[children.Count];
     for (int i = 0; i < node.Nodes.Count; i++)
     {
         TreeNode n = node.Nodes[i];
         TreeNodeData nd = (TreeNodeData)n.Tag;
         int pos = children.IndexOf(nd);
         if (pos == -1)
         {
             node.Nodes.RemoveAt(i);
             removeFromExistingNodes(n, nd);
             i--;
         }
         else
         {
             found[pos] = true;
             refreshNode(wc, n, false);
         }
     }
     for (int i = 0; i < children.Count; i++)
     {
         if (!found[i] && !existingNodes.ContainsKey(children[i]))
         {
             TreeNode newnode = new TreeNode();
             newnode.Tag = children[i];
             node.Nodes.Add(newnode);
             existingNodes.Add(children[i], newnode);
             refreshNode(wc, newnode, false);
         }
     }
 }
コード例 #33
0
ファイル: MainForm.cs プロジェクト: hoangduit/mwinapi
 private void refreshTree(WindowCache wc)
 {
     this.Cursor = Cursors.WaitCursor;
     tree.Visible = false;
     refreshNode(wc, tree.Nodes[0], false);
     tree.Visible = true;
     this.Cursor = null;
 }