/// <summary>
        /// Gets text from textBox and calls Save with the text from textBox. After that close panel.
        /// </summary>
        /// <param name="sender">The sender of the action.</param>
        /// <param name="e">The arguments of the action.</param>
        private void SaveGame(object sender, Miyagi.Common.Events.MouseButtonEventArgs e)
        {
            var saveName = textBox.Text;

            if (saveName == "")
            {
                saveName = "NoName";
            }
            Game.Save(saveName + ".save");
            Game.IGameGUI.ClosePanel(panelToClose);
        }
示例#2
0
 /// <summary>
 /// MouseClick action which calls OnMouseClick() and print answer to the game console.
 /// </summary>
 /// <param name="sender">The sender of the action.</param>
 /// <param name="e">The arguments of the action.</param>
 private void GameActionClicked(object sender, Miyagi.Common.Events.MouseButtonEventArgs e)
 {
     Game.PrintToGameConsole(action.OnMouseClick());
 }
示例#3
0
 /// <summary>
 /// Calls GroupManager function ChangeSolarSystem and closes the panel type
 /// </summary>
 /// <param name="sender">The sender of the action.</param>
 /// <param name="e">The arguments of the action.</param>
 private void SelectSolarSystem(object sender, Miyagi.Common.Events.MouseButtonEventArgs e)
 {
     Game.SolarSystemManager.ChangeSolarSystem(numberOfItem);
     Game.IGameGUI.ClosePanel(panelToClose);
 }
示例#4
0
 /// <summary>
 /// Calls CreateTraveler with selected number of the SolarSystem (numberOfItem) and traveler(storedObject)
 /// </summary>
 /// <param name="sender">The sender of the action.</param>
 /// <param name="e">The arguments of the action.</param>
 private void Travel(object sender, Miyagi.Common.Events.MouseButtonEventArgs e)
 {
     Game.SolarSystemManager.CreateTraveler(numberOfItem, storedObject);
     Game.IGameGUI.ClosePanel(panelToClose);
 }
示例#5
0
 /// <summary>
 /// Calls Game.Load and load given mission from stored game mission path. Also closes the panel type.
 /// </summary>
 /// <param name="sender">The sender of the action.</param>
 /// <param name="e">The arguments of the action.</param>
 private void SelectLoadMission(object sender, Miyagi.Common.Events.MouseButtonEventArgs e)
 {
     Game.IGameGUI.ClosePanel(panelToClose);
     Game.Load((string)storedObject);
 }