Ejemplo n.º 1
0
    public static void ShowWindow(string name, string _message, AS_SetupWindow caller = null, AS_SetupState _stateToLoad = AS_SetupState.CredentialsAndPreferences)
    {
        //Show existing window instance. If one doesn't exist, make one.
        AS_PopUpWindow window = (AS_PopUpWindow)EditorWindow.GetWindow(typeof(AS_PopUpWindow));

        window.minSize     = new Vector2(460, 110);
        window.name        = name;
        window.title       = name;
        window.caller      = caller;
        window.stateToLoad = _stateToLoad;
        window.position    = new Rect(600, 400, window.minSize.x, window.minSize.y);
        window.message     = _message;
    }
Ejemplo n.º 2
0
    void InitializeDatabase()
    {
        if (!fieldsOk)
        {
            initializeDbMessage = "Please check your fields for errors";
            AS_PopUpWindow.ShowWindow("Error", initializeDbMessage);
            return;
        }

        string errorMessage = AS_Setup.InitializeDatabase(additionalFields.ToArray());

        if (errorMessage == "")
        {
            AS_PopUpWindow.ShowWindow("Success!", "The Database was Initialized successfully.\nYou can now load the Demo Scene!", this, AS_SetupState.Done);
        }
        else if (errorMessage.ToLower().Contains("credentials"))
        {
            AS_PopUpWindow.ShowWindow("Error", errorMessage, this, AS_SetupState.CredentialsAndPreferences);
        }
    }
Ejemplo n.º 3
0
    void SetupPHPScripts(string _phpScriptsLocation)
    {
        if (!credentialsOk)
        {
            initializeDbMessage = "Please check your credentials for errors";
            AS_PopUpWindow.ShowWindow("Error", initializeDbMessage);
            return;
        }

        AS_Credentials.Save();
        AS_Preferences.Save();

        string errorMessage = AS_Setup.Setup(_phpScriptsLocation);

        if (errorMessage == "")
        {
            AS_PopUpWindow.ShowWindow("Success!", "The PHP Scripts were successfully set up.\nYou can now Initialize the Database!", this, AS_SetupState.Fields);
        }
        else
        {
            AS_PopUpWindow.ShowWindow("Error", errorMessage);
        }
    }