Beispiel #1
0
 private void LoadButton_Click(object sender, EventArgs e)
 {
     OpenFileDialog FileDiag = new OpenFileDialog();
     DialogResult result = FileDiag.ShowDialog(); // Show the dialog.
     if (result == DialogResult.OK) // Test result.
     {
         string file = FileDiag.FileName;
         GameForm GameForm = new GameForm("null", "null", "null", file);
         this.Hide();
         GameForm.Show();
     }
 }
Beispiel #2
0
 private void CreateButton_Click(object sender, EventArgs e)
 {
     this.Hide();
     string gend = "Unnassigned";
     if (MaleButton.Checked == true)
     {
         gend = MaleButton.Text;
     }
     if (FemaleButton.Checked == true)
     {
         gend = FemaleButton.Text;
     }
     if(NameTextBox.Text == "MapEditor")
     {
         MapEditor MapEditor = new MapEditor();
         MapEditor.Show();
     }
     if (NameTextBox.Text != "MapEditor")
     {
         GameForm GameForm = new GameForm(NameTextBox.Text, RaceList.SelectedItem.ToString(), gend, "null");
         GameForm.Show();
     }
 }
Beispiel #3
0
 private void QButton_Click(object sender, EventArgs e)
 {
     if (ButtonState == 0)
     {
         OpenInventory();
     }
     if (ButtonState == 1.1 && Turn[TurnNumber] == 1)
     {
         ActivateSkill(0, Player.Companion[Player.ActiveCompanion], NPC[Map.NPCNumber].Companion[NPC[Map.NPCNumber].ActiveCompanion]);
     }
     if (ButtonState == 1)
     {
         ButtonState = 1.1;
         CalculateTurns(Player.Companion[Player.ActiveCompanion], NPC[Map.NPCNumber].Companion[NPC[Map.NPCNumber].ActiveCompanion]);
         DrawButtons();
     }
     if (ButtonState == 5)
     {
         OpenFileDialog FileDiag = new OpenFileDialog();
         DialogResult result = FileDiag.ShowDialog(); // Show the dialog.
         if (result == DialogResult.OK) // Test result.
         {
             string file = FileDiag.FileName;
             GameForm GameForm = new GameForm("null", "null", "null", file);
             this.Hide();
             GameForm.Show();
         }
     }
 }