public void RefreshToCurrentElement() { var currentElement = ArrowState.Self.CurrentArrowElementSave; if (currentElement != null) { string elementName = currentElement.Name; string prefix; IElement glueElement = null; if (currentElement.ElementType == DataTypes.ElementType.Screen) { prefix = "Screens/"; glueElement = ArrowState.Self.CurrentGlueProjectSave.Screens.FirstOrDefault(item => item.Name == prefix + elementName); } else { prefix = "Entities/"; glueElement = ArrowState.Self.CurrentGlueProjectSave.Entities.FirstOrDefault(item => item.Name == prefix + elementName); } if (glueElement != null) { GluxManager.GlueProjectSave = ArrowState.Self.CurrentGlueProjectSave; GluxManager.ShowElement(prefix + elementName); } } }
/// <summary> /// Saves the GlueViewState.Self.CurrentGlueProject /// </summary> public void SaveGlux() { if (GlueViewState.Self.CurrentGlueProject != null) { int numberOfTries = 0; const int maxNumberOfTries = 5; bool hasBeenAdded = false; //ObjectFinder.GlueProject = null; while (numberOfTries < maxNumberOfTries) { try { FileManager.XmlSerialize(GlueViewState.Self.CurrentGlueProject, GlueViewState.Self.CurrentGlueProjectFile); GluxManager.IgnoreNextReload(); //GluxManager.IgnoreNextSelection(); // I think we don't want to ignore this too. break; } catch (Exception e) { System.Threading.Thread.Sleep(25); numberOfTries++; } } } }
protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); GluxManager.Update(); HighlightManager.Self.Activity(); EditingManager.Self.Activity(); base.Update(gameTime); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); // I don't think GView needs a ScreenManager activity does it? //Screens.ScreenManager.Activity(); EditorLogic.Activity(); GluxManager.Update(); base.Update(gameTime); }
public void ReloadCurrentElement() { if (GluxManager.CurrentElement != null) { GluxManager.ShowElement(GluxManager.CurrentElement.Name); } else { GluxManager.ClearEngine(); } }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); ScreenManager.Activity(); EditorLogic.Activity(); // TODO: Add your update logic here GluxManager.Update(); base.Update(gameTime); }
internal void UpdateToSelectedElement() { var element = ArrowState.Self.CurrentGlueElement; if (element != null) { GluxManager.ShowElement(element.Name); GluxManager.Update(); ArrowState.Self.CurrentArrowElementVm.Refresh(); //ArrowCommands.Self.GuiCommands.RefreshSingleElementTreeView(); SelectionManager.Self.UpdateToSelectedElementOrInstance(); ArrowState.Self.RaiseCurrentArrowElementChangedEvent(); } ArrowCommands.Self.Delete.PopulateDeleteMenuFromArrowState(); }