示例#1
0
    void DoMyWindow(int WindowID)
    {
        GUI.Box(new Rect(MenuBarBoxLocation), "");

        if (Input.GetMouseButtonDown(0))
        {
            def.SelectedWindowID = this.windowID;
        }

        if (CloseButton.Contains(Event.current.mousePosition))
        {
            if (GUI.Button(new Rect(CloseButton), "X", com.Skin [GameControl.control.GUIID].customStyles [0]))
            {
            }
        }
        else
        {
            GUI.backgroundColor = com.colors[Customize.cust.ButtonColorInt];
            GUI.contentColor    = com.colors[Customize.cust.FontColorInt];
            if (GUI.Button(new Rect(CloseButton), "X", com.Skin [GameControl.control.GUIID].customStyles [1]))
            {
            }
        }

        if (MiniButton.Contains(Event.current.mousePosition))
        {
            if (GUI.Button(new Rect(MiniButton), "-", com.Skin [GameControl.control.GUIID].customStyles [2]))
            {
                minimize = !minimize;
                Minimize();
            }
        }
        else
        {
            GUI.backgroundColor = com.colors[Customize.cust.ButtonColorInt];
            GUI.contentColor    = com.colors[Customize.cust.FontColorInt];
            if (GUI.Button(new Rect(MiniButton), "-", com.Skin [GameControl.control.GUIID].customStyles [2]))
            {
                minimize = !minimize;
                Minimize();
            }
        }

        GUI.backgroundColor = com.colors[Customize.cust.ButtonColorInt];
        GUI.contentColor    = com.colors[Customize.cust.FontColorInt];

        GUI.DragWindow(new Rect(DefaltBoxSetting));
        GUI.Box(new Rect(DefaltBoxSetting), "Firefox");

        if (Page >= 1)
        {
            windowRect.width = 650;
            ExtraMenu();
            //GUI.Box (new Rect (TabMenu), "");
        }
        else
        {
            windowRect.width = 500;
        }

        switch (Page)
        {
        case 2:
            BookmarkedMenu();
            break;

        case 3:
            HistoryMenu();
            break;

        case 4:
            HistoryMenu();
            break;
        }

        if (ib.showAddressBar == true)
        {
            DefaltBoxSetting = new Rect(2, 2, 454, 21);

            if (GUI.Button(new Rect(ForwardButtonLocation), ForwardIcon, com.Skin [GameControl.control.GUIID].customStyles [2]))
            {
                if (SelectedPage >= GameControl.control.Sites.Count - 1)
                {
                    SelectedPage = GameControl.control.Sites.Count - 1;
                }
                else
                {
                    SelectedPage++;
                }
                ib.Inputted   = GameControl.control.Sites [SelectedPage];
                ib.AddressBar = GameControl.control.Sites [SelectedPage];
            }

            if (GUI.Button(new Rect(BackButtonLocation), BackIcon, com.Skin [GameControl.control.GUIID].customStyles [2]))
            {
                if (SelectedPage <= 0)
                {
                    SelectedPage = 0;
                }
                else
                {
                    SelectedPage--;
                }
                ib.Inputted   = GameControl.control.Sites [SelectedPage];
                ib.AddressBar = GameControl.control.Sites [SelectedPage];
            }

            if (Event.current.type == EventType.keyDown && Event.current.keyCode == KeyCode.Return)
            {
                ib.Inputted = ib.AddressBar;
                GameControl.control.Sites.Add(ib.Inputted);
            }

            if (GUI.Button(new Rect(URLSearchLocation), SearchIcon, com.Skin [GameControl.control.GUIID].customStyles [2]))
            {
                ib.Inputted = ib.AddressBar;
                GameControl.control.Sites.Add(ib.Inputted);
            }

            if (AddbookmarkButton.Contains(Event.current.mousePosition))
            {
                if (GUI.Button(new Rect(AddbookmarkButton), AddBookmarkIcon, com.Skin [GameControl.control.GUIID].customStyles [2]))
                {
                    if (!GameControl.control.FavSites.Contains(ib.Inputted))
                    {
                        GameControl.control.FavSites.Add(ib.Inputted);
                    }
                }
            }
            else
            {
                GUI.backgroundColor = com.colors[Customize.cust.ButtonColorInt];
                GUI.contentColor    = com.colors[Customize.cust.FontColorInt];
                if (GUI.Button(new Rect(AddbookmarkButton), AddBookmarkIcon, com.Skin [GameControl.control.GUIID].customStyles [2]))
                {
                    if (!GameControl.control.FavSites.Contains(ib.Inputted))
                    {
                        GameControl.control.FavSites.Add(ib.Inputted);
                    }
                }
            }

            if (ExtraButton.Contains(Event.current.mousePosition))
            {
                if (GUI.Button(new Rect(ExtraButton), "|||", com.Skin [GameControl.control.GUIID].customStyles [2]))
                {
                    //showTabMenu = !showTabMenu;
                    if (Page == 0)
                    {
                        Page = 1;
                    }
                    else
                    {
                        Page = 0;
                    }
                }
            }
            else
            {
                GUI.backgroundColor = com.colors[Customize.cust.ButtonColorInt];
                GUI.contentColor    = com.colors[Customize.cust.FontColorInt];
                if (GUI.Button(new Rect(ExtraButton), "|||", com.Skin [GameControl.control.GUIID].customStyles [2]))
                {
                    //showTabMenu = !showTabMenu;
                    if (Page == 0)
                    {
                        Page = 1;
                    }
                    else
                    {
                        Page = 0;
                    }
                }
            }

            //GUI.backgroundColor = Color.white;
            ib.AddressBar = GUI.TextField(new Rect(URLLocation), ib.AddressBar);
        }
        else
        {
            DefaltBoxSetting = new Rect(2, 2, 453, 21);
        }

        switch (ib.Inputted)
        {
        case "test":
            testsite.RenderSite();
            sm.Connect();
            break;

        case "www.becassystems.com":
            SiteName          = "Becas";
            ws.UpdateSecCheck = true;
            becas.RenderSite();
            ib.SiteAdminPass = becas.SiteAdminPass;
            sm.Connect();
            break;

        case "www.revatest.com":
            SiteName          = "Reva Test";
            ws.UpdateSecCheck = true;
            //RevaTest.RenderSite ();
            //ib.SiteAdminPass = RevaTest.SiteAdminPass;
            sm.Connect();
            break;

        case "www.ping.com":
            ping.RenderSite();
            sm.Connect();
            break;

        case "www.unicom.com":
            SiteName          = "Unicom";
            ws.UpdateSecCheck = true;
            uc.RenderSite();
            ib.SiteAdminPass = uc.SiteAdminPass;
            sm.Connect();
            break;

        case "www.jaildew.com":
            SiteName          = "Jaildew";
            ws.UpdateSecCheck = true;
            jd.RenderSite();
            ib.SiteAdminPass = jd.SiteAdminPass;
            sm.Connect();
            break;

        case "www.reva.com":
            SiteName          = "Reva";
            ws.UpdateSecCheck = true;
            reva.RenderSite();
            sm.Connect();
            break;

        case "www.lecbank.com":
            SiteName          = "LEC";
            ws.UpdateSecCheck = true;
            LEC.RenderSite();
            sm.Connect();
            break;

        case "game":
            mgw.RenderSite();
            mgw.showMenu = true;
            sm.Connect();
            break;

        case "shares":
            st.RenderSite();
            sm.Connect();
            break;

        case "servers":
            sh.RenderSite();
            sm.Connect();
            break;

        case "tugs":
            tug.RenderSite();
            sm.Connect();
            break;

        case "drag":
            dr.GameRender();
            sm.Connect();
            break;

        case "stock":
            st.RenderSite();
            sm.Connect();
            break;

        case "test1":
            test1.RenderSite();
            sm.Connect();
            break;

        case "test2":
            hs.RenderSite();
            sm.Connect();
            break;

        case "gstocks":
            gstocks.RenderSite();
            sm.Connect();
            break;
        }
    }
示例#2
0
    public void WebSiteInfo()
    {
        switch (Inputted)
        {
        case "test":
            testsite.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.test.com";
            connected             = true;
            break;

        case "www.becassystems.com":
            SiteName          = "Becas";
            ws.UpdateSecCheck = true;
            becas.RenderSite();
            SiteAdminPass = becas.SiteAdminPass;
            sm.Connect();
            clic.storedConnection = "www.becassystems.com";
            connected             = true;
            break;

        case "www.revatest.com":
            SiteName          = "Reva Test";
            ws.UpdateSecCheck = true;
            revatest.RenderSite();
            SiteAdminPass         = revatest.SiteAdminPass;
            connected             = true;
            clic.storedConnection = "www.revatest.com";
            sm.Connect();
            break;

        case "www.ping.com":
            ping.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.ping.com";
            connected             = true;
            break;

        case "www.unicom.com":
            SiteName          = "Unicom";
            ws.UpdateSecCheck = true;
            uc.RenderSite();
            SiteAdminPass = uc.SiteAdminPass;
            sm.Connect();
            clic.storedConnection = "www.unicom.com";
            connected             = true;
            break;

        case "www.jaildew.com":
            SiteName          = "Jaildew";
            ws.UpdateSecCheck = true;
            jd.RenderSite();
            CurrentAccounts = jd.Accounts;
            sm.Connect();
            connected             = true;
            clic.storedConnection = "www.jaildew.com";
            break;

        case "www.aki.com":
            SiteName          = "Aki";
            ws.UpdateSecCheck = true;
            aki.RenderSite();
            //SiteAdminPass = jd.SiteAdminPass;
            sm.Connect();
            connected             = true;
            clic.storedConnection = "www.aki.com";
            break;

        //		case "www.para.com":
        //			SiteName = "Para";
        //			ws.UpdateSecCheck = true;
        //			para.RenderSite ();
        //			SiteAdminPass = para.ЫшеуФвьштЗфыы;
        //			sm.Connect ();
        //			connected = true;
        //			clic.storedConnection = "www.para.com";
        //			break;
        //		case "www.cabbagecorp.com":
        //			ib.SiteName = "Cabbage Corp";
        //			ws.UpdateSecCheck = true;
        //			cc.RenderSite ();
        //			SiteAdminPass = cc.SiteAdminPass;
        //			sm.Connect ();
        //			break;
        case "www.reva.com":
            SiteName          = "Reva";
            ws.UpdateSecCheck = true;
            reva.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.reva.com";
            connected             = true;
            break;

        case "www.lecbank.com":
            SiteName          = "LEC";
            ws.UpdateSecCheck = true;
            LEC.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.lecbank.com";
            connected             = true;
            break;

        case "www.games.com":
            mgw.RenderSite();
            mgw.showMenu = true;
            sm.Connect();
            clic.storedConnection = "www.game.com";
            connected             = true;
            break;

        case "www.melvena.com":
            melvenauni.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.melvena.com";
            connected             = true;
            break;

        case "shares":
            st.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.shares.com";
            connected             = true;
            break;

        case "servers":
            sh.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.servers.com";
            connected             = true;
            break;

        case "www.tugs.com":
            tug.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.tugs.com";
            connected             = true;
            break;

        case "www.isd.com":
            isd.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.isd.com";
            connected             = true;
            break;

        case "drag":
            dr.GameRender();
            sm.Connect();
            clic.storedConnection = "www.drag.com";
            connected             = true;
            break;

        case "www.stock.com":
            st.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.stock.com";
            connected             = true;
            break;

        case "test1":
            test1.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.test1.com";
            connected             = true;
            break;

        case "test2":
            hs.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.test2.com";
            connected             = true;
            break;

        case "www.gstocks.com":
            gstocks.RenderSite();
            sm.Connect();
            clic.storedConnection = "www.gstocks.com";
            connected             = true;
            break;

        case "www.store.com":
            store.RenderSite();
            clic.storedConnection = "www.store.com";
            connected             = true;
            break;
        }
    }