public string PrintResolutionScale() { string baseString = rl.GetString("InfoScreen_ResolutionScale/Text"); switch (InfoScreen.GetResolutionScale()) { case ResolutionScale.Invalid: return(baseString + rl.GetString("InfoScreen_ResolutionScale_Invalid.Text")); case ResolutionScale.Scale100Percent: return(baseString + "100%"); case ResolutionScale.Scale120Percent: return(baseString + "120%"); case ResolutionScale.Scale125Percent: return(baseString + "125%"); case ResolutionScale.Scale140Percent: return(baseString + "140%"); case ResolutionScale.Scale150Percent: return(baseString + "150%"); case ResolutionScale.Scale160Percent: return(baseString + "160%"); case ResolutionScale.Scale175Percent: return(baseString + "175%"); case ResolutionScale.Scale180Percent: return(baseString + "180%"); case ResolutionScale.Scale200Percent: return(baseString + "200%"); case ResolutionScale.Scale225Percent: return(baseString + "225%"); case ResolutionScale.Scale250Percent: return(baseString + "250%"); case ResolutionScale.Scale300Percent: return(baseString + "300%"); case ResolutionScale.Scale350Percent: return(baseString + "350%"); case ResolutionScale.Scale400Percent: return(baseString + "400%"); case ResolutionScale.Scale450Percent: return(baseString + "450%"); case ResolutionScale.Scale500Percent: return(baseString + "500%"); } return(rl.GetString("InfoScreen_ResolutionScale/Text") + InfoScreen.GetResolutionScale()); }
public void DisplayOptions() { string[] logLevelNames = Enum.GetNames(typeof(LogLevel)); StringBuilder logLevels = new StringBuilder(); foreach (string level in logLevelNames) { if (logLevels.Length > 0) { logLevels.Append(", "); } logLevels.Append(level); } string options = "Valid options:\r\n"; options += "/help\t\tShows this screen\r\n"; options += "/LogMethod\tInstructs the logger to also log the name of its calling method\r\n"; options += "/LogLevel=<level>\tSets the log level. <level> should be one of the following values:\r\n\t\t" + logLevels; InfoScreen form = new InfoScreen("MediaPortal 2", "Command Line Options", options, InfoScreen.Image.info); form.Size = new Size(714, 326); Application.Run(form); }
public void ClearTextBoxInInfoScreen(InfoScreen window) { window.txtUsername.Clear(); window.txtPassword.Clear(); window.txtRepeatPassword.Clear(); window.cbb_user_type.SelectedIndex = -1; }
/// <summary> /// When player closes the POI-UI the values will be reseted to make sure that no funny business happens, and also hides /// the UI. This function is attached to "disableButton". CanvasMaster - PoiInfoHandler - Scroll View - disableButton /// </summary> public void hidePoi() { poiName.text = null; poiDesc.text = null; imageGiver = null; InfoScreen.SetActive(false); }
public ScreenControl(Game game) { this.game = game; Chat = new ChatBox(new CPos(0, 4096, 0)); Message = new MessageBox(new CPos(0, 4096, 0)); Screen = new InfoScreen(); Text = new InfoText(); }
private void MoveAllAgents(Vector3 target) { for (int i = 0; i < this.aiAgents.Length; i++) { this.aiAgents[i].SetDestination(target); Debug.Log("Set agents target to position: " + target.ToString()); InfoScreen infoScreen = (InfoScreen)ViewHandler.Instance.FindActiveView(ViewNames.INFO_SCREEN_NAME); infoScreen.SetMessage("Set agents target to position: " + target.ToString()); } }
/// <summary> /// When player is in range, script enables "enablebutton" which in turn when pressed, calls the following function. /// This function sets the closest POI:s values to the UI-elements. CanvasMaster - PoiInfoHandler - enableButton /// </summary> public void IfInRange() { InfoScreen.SetActive(true); //name = ClosestPoi.GetComponent<pLab_PoiData>().newName; description = ClosestPoi.GetComponent <pLab_PoiData>().description; imageGiver = ClosestPoi.GetComponent <Image>(); poiName.text = name; poiDesc.text = description; imageShower.sprite = imageGiver.overrideSprite; }
// Load protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); // Load Images and Fonts from disk. Art.Load(Content); // Set up variables. ResetGame(); GameManager.GameState = GameManager.GameStates.StartVideo; startScreen = new StartScreen(); endScreen = new EndScreen(); infoScreen = new InfoScreen(GraphicsDevice); }
public ControlPanel(Form form, DALIController Controller, List <LightingUnit> Lights, InfoScreen Info, PictureBox simulationRoom) { window = form; SimulationRoom = simulationRoom; light = Lights; DALIController = Controller; InitializeControlPanelButtons(); _currentUnitIds = new List <int>(); InfoScreen = Info; SimulationRoom.MouseClick += new MouseEventHandler(this.Form1_MouseClick); l = new Label(); l.Show(); l.Location = new Point(100, 100); window.Controls.Add(l); }
/// <summary> /// In start We check if the device GPS is turned on, setup player location, setup UI-elements and find all POI-objects. /// </summary> void Start() { shortestDistance = Mathf.Infinity; StartCoroutine(StartLocationService()); desiredPos = transform.position; InfoScreen.SetActive(false); AllPois = GameObject.FindGameObjectsWithTag("PoiObject"); PauseScreen.SetActive(false); EnableButton.gameObject.SetActive(false); PauseButton.gameObject.SetActive(true); }
public void Visit(InfoScreen q) { var t = _questionContent.GetComponentInChildren <Text> (); t.alignment = TextAnchor.MiddleLeft; _dynamicFieldsWithScrollbar.gameObject.SetActive(false); if (q.ConfirmationRequirement.Required) { var qmb = _questionPlaceholder.GetComponent <QuestionMenuButtons>(); qmb.RequireConfirmationToContinue(); qmb.DisableInteractableNextButton(); StartCoroutine(qmb.EnableInteractableNextButton(q.ConfirmationRequirement.ConfirmationDelay)); } }
public void LoadFromDatabase(LoggingManager log) { var qDataList = log.GetQuestionSetContent(Name); foreach (var questionData in qDataList) { Question q; switch ((Enums.Question)questionData.QuestionType) { case Enums.Question.Info: q = new InfoScreen(questionData); break; case Enums.Question.Text: q = new TextQuestion(questionData); break; case Enums.Question.Choice: q = new ChoiceQuestion(questionData); break; case Enums.Question.Scale: q = new ScaleQuestion(questionData); break; case Enums.Question.Ladder: q = new LadderQuestion(questionData); break; case Enums.Question.Stimuli: q = new VisualStimuli(questionData); break; default: throw new ArgumentOutOfRangeException(); } q.Jumps = log.GetJumps(questionData); Questions.Add(q); } }
public void BuildNewTarget() { if (this.currentQuality == ImageTargetBuilder.FrameQuality.FRAME_QUALITY_MEDIUM || this.currentQuality == ImageTargetBuilder.FrameQuality.FRAME_QUALITY_HIGH) { // create the name of the next target. // the TrackableName of the original, linked ImageTargetBehaviour is extended with a continuous number to ensure unique names string targetName = string.Format("{0}-{1}", this.imageTargetTemplate.TrackableName, this.targetCounter); // generate a new target: this.buildingBehaviour.BuildNewTarget(targetName, this.imageTargetTemplate.GetSize().x); InfoScreen infoScreen = (InfoScreen)ViewHandler.Instance.FindActiveView(ViewNames.INFO_SCREEN_NAME); infoScreen.SetVisibility(false); } else { InfoScreen infoScreen = (InfoScreen)ViewHandler.Instance.FindActiveView(ViewNames.INFO_SCREEN_NAME); infoScreen.SetMessage("Cannot show AR object. Point your camera at a surface with clear edges or textures."); infoScreen.SetVisibility(true); } }
public void Start() { //Initializations _occupant = new Occupant(Map, Window, 'W', 'S', 'A', 'D'); gEngine = new GEngine(Window, Map, SimulationRoom); CreateLightUnit(); Controller = new DALIController(LightUnitCoordinates); Controller.InitGroups(); InfoScreen = new InfoScreen(Window, Controller); ControlPanel = new ControlPanel(Window, Controller, LightUnitCoordinates, InfoScreen, SimulationRoom); //Draw info Info = new InfoDrawing(Window); Info.initWattInfo(); Info.InitBrugerPosWiFi(); Info.InitBrugerPos(); //Quadtree, initialize the graphics engine and load the visual level _tree.CreateQuadTree(LightUnitCoordinates); gEngine.init(); gEngine.LoadLevel(LightUnitCoordinates, Router1, Router2); }
public Game(Panel simulationPanel, string levelName) { // Load Level var level = LoadFromName(levelName); LoadPlanets(level.Planets); LoadRockets(level.Rockets); // Load controllers _closeDistanceScreen = new ScreenController(simulationPanel, _objects, Color.NavajoWhite, 3); _physicsController = new PhysicsController(_objects, 10); // Show info Screen _infoScreen = new InfoScreen(_objects, _closeDistanceScreen); _infoScreen.Show(); // Show orbit Screen _orbitScreen = new OrbitScreen(); _orbitScreen.Show(); // Create orbit controller _orbitScreenController = new OrbitScreenController(_orbitScreen.GetPanel(), _objects); }
public string PrintScreenSize() { return(rl.GetString("InfoScreen_Size/Text") + InfoScreen.GetScreenSize().Width + " × " + InfoScreen.GetScreenSize().Height); }
void Awake() { Instance = this; }
public string PrintRawDpi() { return(rl.GetString("InfoScreen_PpiX/Text") + InfoScreen.GetRawDpi().Width + Environment.NewLine + rl.GetString("InfoScreen_PpiY/Text") + InfoScreen.GetRawDpi().Height); }
public string PrintScaleFactor() { return(rl.GetString("InfoScreen_ScaleFactor/Text") + InfoScreen.GetScaleFactor()); }
public string PrintDisplayNativeOrientation() { return(rl.GetString("InfoScreen_NativeOrientation/Text") + InfoScreen.GetDisplayNativeOrientation()); }
// Use this for initialization void Start() { InfoScreen infoScreen = (InfoScreen)ViewHandler.Instance.Show(ViewNames.INFO_SCREEN_NAME); infoScreen.SetMessage(this.displayMsg); }
/// <summary> /// ... /// Créer un fichier xml après collection des données dans le fichier xml de launchbox si activé /// </summary> /// <param name="xFile">believe... xml file </param> /// <param name="GameFile">Game file (exploitable)</param> internal int Initialize(string xFile, ShortGame sGame) { // Verif if (string.IsNullOrEmpty(ID)) { throw new Exception("Id property: null"); } if (string.IsNullOrEmpty(_SystemName)) { throw new Exception(); } _WFolder = Properties.Settings.Default.OutPPath; // Chemin du dossier temporaire du system _SystemPath = Path.Combine(_WFolder, _SystemName); _GamePath = Path.Combine(_SystemPath, $"{sGame.ExploitableFileName}"); // New Working Folder string logFile = Path.Combine(_WFolder, $"{_SystemName} - {sGame.ExploitableFileName}.log"); // Todo peut être déclencher un event sur le stop pour couper net ? var folderRes = OPFolders.SVerif(_GamePath, "Initialize", Dcs_Buttons.NoPass | Dcs_Buttons.NoRename, (string message) => ITrace.WriteLine(message, true)); if (folderRes == EDestDecision.Stop) { // ITrace.WriteLine("[Initialize] GoodBye !"); if (_IScreen != null) { _IScreen.Close(); } ITrace.RemoveListener(_IScreen); return(200); } #region System d'affichage string prefix = "PackMe"; //window if (Settings.Default.opLogWindow) { _IScreen = new InfoScreen(); _IScreen.Prefix = prefix; _IScreen.Show(); _Loggers.Add(_IScreen); } // file if (Settings.Default.opLogFile) { InfoToFile iLog = new InfoToFile(logFile, true); iLog.Prefix = prefix; _Loggers.Add(iLog); } // debug if (Debugger.IsAttached) { InfoToConsole iConsole = new InfoToConsole(); iConsole.Prefix = prefix; _Loggers.Add(iConsole); } ITrace.AddListeners(_Loggers); ITrace.WriteLine("===== Report of errors: ====="); ITrace.WriteLine($"[Initialize] ID:\t'{ID}'"); ITrace.WriteLine($"[Initialize] {Lang.SystemSelected}: '{_SystemName}'"); ITrace.WriteLine($"[Initialize] {Lang.GameSelected}: '{sGame.Title}' - Rom: '{sGame.ExploitableFileName}'"); #endregion /* * BackgroundWorker bw = new BackgroundWorker(); * bw.DoWork += new DoWorkEventHandler(BwWork); // PackMe.Initialize(_XmlFPlatform); * bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BWRunWorkerCompleted); * bw.RunWorkerAsync(); */ // Lecture du fichier platform XML_Functions xmlPlatform = new XML_Functions(); xmlPlatform.ReadFile(Path.Combine(Properties.Settings.Default.LBPath, Properties.Settings.Default.fPlatforms)); _ZePlatform = xmlPlatform.ScrapPlatform(_SystemName); // Reconstruct PlatformFolder Path foreach (PlatformFolder plfmFolder in _ZePlatform.PlatformFolders) { plfmFolder.FolderPath = ReconstructPath(plfmFolder.FolderPath); } // Lecture du fichier des jeux _XFunctions = new XML_Functions(); _XFunctions.ReadFile(xFile); // Get Main infos _zBackGame = _XFunctions.ScrapBackupGame(ID); _ZeGame = (GameInfo)_zBackGame; #region 2020 // Creation of System folder and working assign ITrace.WriteLine($"[Run] {Lang.CreationFolder}: '{_SystemName}'"); Directory.CreateDirectory(_SystemName); Directory.SetCurrentDirectory(_SystemPath); // Creation of Game folder ITrace.WriteLine($"[Run] {Lang.CreationFolder}: '{_GamePath}'"); Directory.CreateDirectory(_GamePath); #endregion #region Original Backup Game if (Settings.Default.opOBGame) { MakeXML.Backup_Game(_GamePath, _zBackGame, "TBGame"); } else { ITrace.WriteLine("[Run] Original Backup Game disabled"); } #endregion _LBoxDI = new DirectoryInfo(Settings.Default.LBPath); // Set active Directory to Root Directory.SetCurrentDirectory(_WFolder); #region Paths reconstruction _zBackGame.ApplicationPath = ReconstructPath(_zBackGame.ApplicationPath); _zBackGame.ManualPath = ReconstructPath(_zBackGame.ManualPath); _zBackGame.MusicPath = ReconstructPath(_zBackGame.MusicPath); _zBackGame.VideoPath = ReconstructPath(_zBackGame.VideoPath); #endregion return(0); }