private void AddCharacterButton_Click(object sender, RoutedEventArgs e) { if (AccountListView.SelectedItem == null) { MessageBox.Show("Choose what to modify first.", "Mu Editor"); } else { CharacterCreation window1 = new CharacterCreation(((Account)AccountListView.SelectedItem)); window1.Show(); } }
public FormMainMenu() { InitializeComponent(); this.Width = 800; this.Height = 600; this.Icon = new Icon(@"Images\MaxMana.ico"); this.Text = "MaxMana"; this.BackgroundImage = Properties.Resources.BG; //Image image = Properties.Resources.Name; CustomButton Start = new CustomButton(CustomButtonType.Start) { Left = 300, Top = 350, }; Start.Click += (sender, args) => { CharacterCreation ccform = new CharacterCreation(); ccform.Show(); this.WindowState = FormWindowState.Minimized; }; this.Controls.Add(Start); CustomButton Open = new CustomButton(CustomButtonType.Open) { Left = 350, Top = 450, }; Open.Click += (sender, args) => { World wform = new World(); wform.Show(); World.Open(); this.WindowState = FormWindowState.Minimized; }; this.Controls.Add(Open); RunMusic(); }