Ejemplo n.º 1
0
 public void SignOut()
 {
     trace.stopping    = true;
     ib.Username       = "";
     ib.showAddressBar = true;
     ib.AddressBar     = "www.jaildew.com";
     logged            = false;
     UsrName           = "";
     password          = "";
     PasswordSetup();
     sm.Disconnect();
 }
Ejemplo n.º 2
0
    public void RenderSite()
    {
        GUI.backgroundColor = buttonColor;
        GUI.contentColor    = fontColor;

        switch (ib.AddressBar)
        {
        case "www.revatest.com":
            if (GUI.Button(new Rect(10, 75, 100, 20), "Public"))
            {
                ib.AddressBar     = "www.revatest.com/public";
                ib.showAddressBar = false;
                ib.ClearDirContents();
                ib.DirContents.Add("Home");
                ib.DirContents.Add("Files");
            }
            if (GUI.Button(new Rect(10, 120, 100, 20), "Sign in"))
            {
                ib.AddressBar     = "www.revatest.com/login";
                ib.showAddressBar = false;
                ib.ClearDirContents();
            }
            if (ib.Request == true)
            {
                ib.ClearDirContents();
                clic.PastCommands.Add("www.revatest.com/public");
                clic.PastCommands.Add("www.revatest.com/login");
                ib.Request = false;
            }
            break;

        case "www.revatest.com/public":
            if (GUI.Button(new Rect(10, 75, 100, 20), "Home"))
            {
                ib.ClearDirContents();
                trace.UpdateTimer = false;
                ib.showAddressBar = true;
                logged            = false;
                UsrName           = "";
                password          = "";
                //sm.BounceIPs.Remove(sm.JaildewIP);
                //sm.BouncedConnections.Remove(sm.JaildewPos);
                ib.AddressBar = "www.revatest.com";
            }

            if (GUI.Button(new Rect(10, 100, 100, 20), "Temp Files"))
            {
                ib.ClearDirContents();
                ib.AddressBar = "www.revatest.com/tempfiles";
                //ib.DirContents.Add(GameControl.control.becassystemsPublicFileSize[scrollsize].ToString("F0"));
            }
            if (ib.Request == true)
            {
                ib.ClearDirContents();
                clic.PastCommands.Add("www.revatest.com");
                clic.PastCommands.Add("www.revatest.com/tempfiles");
                ib.Request = false;
            }
            break;

        case "www.revatest.com/tempfiles":
            if (GUI.Button(new Rect(245, 30, 50, 20), "Back"))
            {
                ib.ClearDirContents();
                ib.AddressBar = "www.revatest.com/public";
            }

            FileCheck();

            ib.CurrentLocation = "REVA Public";

            if (ib.Request == true)
            {
                int FileCount;
                for (FileCount = 0; FileCount < GameControl.control.WebsiteFiles.Count; FileCount++)
                {
                    //ib.DirContents.Add (GameControl.control.becassystemsPublicFileSystem [FileCount].Name);
                    if (GameControl.control.WebsiteFiles [FileCount].Location == ib.CurrentLocation)
                    {
                        clic.PastCommands.Add(GameControl.control.WebsiteFiles[FileCount].Name);
                    }
                }

                if (FileCount >= GameControl.control.WebsiteFiles.Count)
                {
                    ib.Request = false;
                }
            }

            GUI.Label(new Rect(115, 50, 500, 500), "File Name");
            GUI.Label(new Rect(200, 50, 500, 500), "Size");

            if (showMenu == true)
            {
                if (GUI.Button(new Rect(10, 105, 100, 20), "Delete " + PageFile[Select].Name))
                {
                    clic.CommandLine = "-r▓rm▓" + PageFile[Select].Name;
                    clic.CheckInput();
                    clic.CommandLine = "";
                    Select           = -1;
                    showMenu         = false;
                }
                if (GUI.Button(new Rect(10, 145, 100, 20), "Download " + PageFile[Select].Name))
                {
                    clic.CommandLine = "dl▓" + PageFile[Select].Name;
                    clic.CheckInput();
                    clic.CommandLine = "";
                    Select           = -1;
                    showMenu         = false;
                }
            }
            scrollpos = GUI.BeginScrollView(new Rect(130, 75, 150, 100), scrollpos, new Rect(0, 0, 0, scrollsize * 20));

            if (scrollsize > PageFile.Count)
            {
                scrollsize = 0;
            }

            if (PageFile.Count > 0)
            {
                for (scrollsize = 0; scrollsize < PageFile.Count; scrollsize++)
                {
                    if (PageFile[scrollsize].Location == "REVA Public")
                    {
                        if (GUI.Button(new Rect(3, scrollsize * 20, 80, 20), "" + PageFile[scrollsize].Name))
                        {
                            showMenu = true;
                            Select   = scrollsize;
                        }
                        GUI.Button(new Rect(85, scrollsize * 20, 40, 20), "" + PageFile[scrollsize].Used);
                    }
                }
            }

            GUI.EndScrollView();

            break;

        case "www.revatest.com/filesystem":
            if (logged == true)
            {
                FileCheck();
                if (GUI.Button(new Rect(5, 55, 100, 20), "Back"))
                {
                    ib.AddressBar = "www.revatest.com/internal";
                }

                ib.CurrentLocation = "REVA Private";

                if (ib.Request == true)
                {
                    int FileCount;
                    //string FileLocation = "becassystems Private";
                    for (FileCount = 0; FileCount < PageFile.Count; FileCount++)
                    {
                        //ib.DirContents.Add (GameControl.control.becassystemsPublicFileSystem [FileCount].Name);
                        if (PageFile[FileCount].Location == ib.CurrentLocation)
                        {
                            clic.PastCommands.Add(PageFile[FileCount].Name);
                        }
                    }

                    if (FileCount >= PageFile.Count)
                    {
                        ib.Request = false;
                    }
                }

                GUI.Label(new Rect(115, 50, 500, 500), "File Name");
                GUI.Label(new Rect(200, 50, 500, 500), "Size");

                if (showMenu == true)
                {
                    //					if(GUI.Button(new Rect(10, 105, 100, 20), "Delete " + GameControl.control.JaildewPublicFileName[Select].Name))
                    //					{
                    //
                    //					}
                    //					if(GUI.Button(new Rect(10,145,100,20),"Copy " + GameControl.control.JaildewPublicFileName[Select].Name))
                    //					{
                    //
                    //					}
                }
                scrollpos = GUI.BeginScrollView(new Rect(130, 75, 150, 100), scrollpos, new Rect(0, 0, 0, scrollsize * 20));
                for (scrollsize = 0; scrollsize < PageFile.Count; scrollsize++)
                {
                    if (GUI.Button(new Rect(3, scrollsize * 20, 80, 20), "" + PageFile[scrollsize].Name))
                    {
                        showMenu = true;
                        Select   = scrollsize;
                    }
                    GUI.Button(new Rect(85, scrollsize * 20, 40, 20), "" + PageFile[scrollsize].Used);
                }
                GUI.EndScrollView();
            }
            break;

        case "www.revatest.com/login":

            if (UsrName == "Admin")
            {
                ib.Username = UsrName;
            }

            UsrName  = GUI.TextField(new Rect(85, 55, 120, 20), UsrName, 500);
            password = GUI.TextField(new Rect(85, 75, 120, 20), password, 500);

            GUI.Label(new Rect(3, 55, 500, 500), "User Name: ");
            GUI.Label(new Rect(3, 75, 500, 500), "Password: "******"Back"))
                {
                    trace.UpdateTimer = false;
                    ib.showAddressBar = true;
                    logged            = false;
                    UsrName           = "";
                    password          = "";
                    //sm.BounceIPs.Remove(sm.JaildewIP);
                    //sm.BouncedConnections.Remove(sm.JaildewPos);
                    ib.AddressBar = "www.revatest.com";
                }
            }

            if (UsrName == "Admin" && password == SiteAdminPass)
            {
                if (GUI.Button(new Rect(10, 125, 100, 20), "Login"))
                {
                    ib.showAddressBar = false;
                    logged            = true;
                    ib.AddressBar     = "www.revatest.com/internal";
                    trace.UpdateTimer = true;
                    //log.log.Add(GameControl.control.fullip);
                }
            }
            break;

        case "www.revatest.com/documents/emails":
            if (logged == true)
            {
                scrollpos = GUI.BeginScrollView(new Rect(115, 75, 125, 100), scrollpos, new Rect(0, 0, 0, scrollsize * 20));
                for (scrollsize = 0; scrollsize < EmailSubject.Count; scrollsize++)
                {
                    if (GUI.Button(new Rect(3, scrollsize * 20, 120, 20), "" + EmailSubject[scrollsize]))
                    {
                        tr.show  = true;
                        tr.Title = EmailSubject[scrollsize];
                    }
                }
                GUI.EndScrollView();

                if (GUI.Button(new Rect(245, 30, 50, 20), "Back"))
                {
                    ib.AddressBar = "www.revatest.com/internal";
                }
            }
            break;

        case "www.revatest.com/documents":
            if (logged == true)
            {
                if (GUI.Button(new Rect(10, 75, 100, 20), "Emails"))
                {
                    ib.AddressBar = "www.revatest.com/documents/emails";
                }
                if (GUI.Button(new Rect(10, 100, 100, 20), "Notes"))
                {
                    ib.AddressBar = "www.revatest.com/documents/notes";
                }
                if (GUI.Button(new Rect(10, 150, 100, 20), "Back"))
                {
                    ib.AddressBar = "www.revatest.com/internal";
                }
            }
            break;

        case "www.revatest.com/internal":
            if (logged == true)
            {
                if (GUI.Button(new Rect(10, 75, 100, 20), "File System"))
                {
                    ib.AddressBar = "www.revatest.com/filesystem";
                }
                if (GUI.Button(new Rect(10, 100, 100, 20), "Documents"))
                {
                    ib.AddressBar = "www.revatest.com/documents";
                }
                if (GUI.Button(new Rect(10, 125, 100, 20), "Logs"))
                {
                    ib.AddressBar = "www.revatest.com/logs";
                }
                if (GUI.Button(new Rect(10, 150, 100, 20), "Sign Out"))
                {
                    ib.AddressBar     = "www.revatest.com";
                    trace.stopping    = true;
                    ib.Username       = "";
                    ib.showAddressBar = true;
                    logged            = false;
                    UsrName           = "";
                    password          = "";
                    PasswordSetup();
                    sm.Disconnect();
                }
            }
            break;
        }
    }