Exemplo n.º 1
0
        public ChessBoardEditFormView()
        {
            InitializeComponent();
            Presenter = new ChessBoardEditFormPresenter(this, Program.DataSource);

            if (gameLevel == null)
            {
                this.isAddingLevel = true;
                this.gameLevel     = new CoTheGameLevel();
            }
        }
Exemplo n.º 2
0
        private void btnLevel_Click(object sender, EventArgs e)
        {
            Button selectedButton = sender as Button;
            int    index          = int.Parse(selectedButton.Name.Split('_')[1]);

            CoTheGameLevel coTheGame = null;

            foreach (var game in gameLevels)
            {
                if (game.Id == index)
                {
                    coTheGame = game;
                    break;
                }
            }
            if (coTheGame != null)
            {
                PlayWithComViewForm form = new PlayWithComViewForm(coTheGame);
                form.Show();
            }
        }
Exemplo n.º 3
0
 public ChessBoardEditFormView(CoTheGameLevel gameLevel) : this()
 {
     this.isAddingLevel = false;
     this.gameLevel     = gameLevel;
 }
Exemplo n.º 4
0
 public ChessBoardEditFormView(CoTheGameLevel gameLevel) : this()
 {
     this.gameLevel = gameLevel;
 }
Exemplo n.º 5
0
 public ChessBoardEditFormView()
 {
     InitializeComponent();
     this.isAddingLevel = true;
     this.gameLevel     = new CoTheGameLevel();
 }
Exemplo n.º 6
0
 public PlayWithComViewForm(CoTheGameLevel coTheLevel) : this()
 {
     this.coTheLevel = coTheLevel;
 }
 public void SaveGameLevel(CoTheGameLevel gameLevel)
 {
     dataSource.SaveCoTheLevel(gameLevel);
 }
 public void AddGameLevel(CoTheGameLevel gameLevel)
 {
     dataSource.AddCoTheLevel(gameLevel);
 }