void CommandGUI() { directEditCommString = ReplayGUI.ToggleField(directEditCommString, "Direct Edit Command String", 2, 1); if (directEditCommString) { bool bak = GUI.enabled; GUI.enabled &= !lockSelect; selectClause = ReplayGUI.BigTextField(selectClause, "SELECT", 4, 1); GUI.enabled = bak; lockSelect = ReplayGUI.ToggleField(lockSelect, lockSelect ? "unlock" : "lock", 1, 2); fromClause = ReplayGUI.BigTextField(fromClause, "FROM", 4, 1); whereClause = ReplayGUI.BigTextField(whereClause, "WHERE", 4, 1); otherClauses = ReplayGUI.BigTextField(otherClauses, "misc", 4, 1); } else { ReplayGUI.Label("I haven't setup indirect command editing yet", 3, 1); } }
private void ConnectionGUI() { bool before = directEditConnString; directEditConnString = ReplayGUI.ToggleField(directEditConnString, "Direct Edit Connection String", 2, 1); if (before && !directEditConnString) { ParseConnString(ConnectionString); } if (directEditConnString) { ConnectionString = ReplayGUI.BigTextField(ConnectionString, "Connection", 4, 1); } else { server = ReplayGUI.TextField(server, "Server Name", 2, 1); portNum = ReplayGUI.TextField(portNum, "Port Number", 2, 1); database = ReplayGUI.TextField(database, "Database Name", 2, 1); userID = ReplayGUI.TextField(userID, "User ID", 2, 1); //The password for the DB if (!showPassword) { password = ReplayGUI.PasswordField(password, "Password", 2, 1); } else { password = ReplayGUI.TextField(password, "Password", 2, 1); } showPassword = ReplayGUI.ToggleField(showPassword, showPassword ? "hide password" : "show password", 1, 4); ConnectionString = System.String.Format("Server={0};Port={1};Database={2};Uid={3};password={4}", server, portNum, database, userID, password); } }