Beispiel #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            Mesaj Msj = new Mesaj();

            MesajSonuç Msonuc = Msj.Input(String.GetLangText("PRF_ADD_INPUT", string.Join(", ", ProfilSiniflar.UserProfileUtils.FileNameErroredChars)), String.GetLangText("PRF_ADD_INPUT_HDR"), "");

            if (Msonuc.MesajCevap != DialogResult.OK)
            {
                return;
            }
            string errormsg;

            if (!UserProfileUtils.CanCreateUserProfile(Msonuc.Sonuç, out errormsg))
            {
                Msj.Göster(String.GetLangText("PRF_ADD_ERR_HM", errormsg), String.GetLangText("PRF_ADD_ERR_HDR"));
                return;
            }
            UserProfile UProfil = UserProfileUtils.CreateUserProfile(Msonuc.Sonuç);

            if (UProfil == null)
            {
                Msj.Göster(String.GetLangText("PRF_ADD_ERR_NOTCREATE"), String.GetLangText("PRF_ADD_ERR_HDR"));
            }
            ListViewItem Lvi = new ListViewItem()
            {
                Text = (lvProfiles.Items.Count + 1).ToString()
            };

            Lvi.SubItems.Add(UProfil.ProfileName);
            lvProfiles.Items.Add(Lvi);
        }
        private void çıkışToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MesajSonuç msonuc = Mesaj.mbox.Göster(String.GetLangText("GLB_APP_EXIT"), String.GetLangText("GLB_APP_EXIT_HDR"), MessageBoxButtons.YesNo);

            if (msonuc.MesajCevap != DialogResult.Yes)
            {
                return;
            }
            Application.Exit();
        }
        private void btnResetStats_Click(object sender, EventArgs e)
        {
            MesajSonuç Msonuc = Mesaj.mbox.Göster(String.GetLangText("STS_DEL_STS", ActiveProfile.ProfileName), String.GetLangText("STS_DEL_STS_CPT", ActiveProfile.ProfileName), MessageBoxButtons.YesNo);

            if (Msonuc.MesajCevap != DialogResult.Yes)
            {
                return;
            }
            UserProfileUtils.ResetUserStatistis(ActiveProfile);
            Mesaj.mbox.Göster(String.GetLangText("STS_DEL_STS_SCC"));
            btnResetStats.Enabled = false;
        }
 private void disableWarningsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!GlobalVariants.ActiveProfile.DisableWarnings)
     {
         MesajSonuç msonuc = Mesaj.mbox.Göster(String.GetLangText("MENU_DIS_WARNINGS_INF"), String.GetLangText("MENU_DIS_WARNINGS_INF_HDR"), MessageBoxButtons.YesNo);
         if (msonuc.MesajCevap != DialogResult.Yes)
         {
             return;
         }
     }
     GlobalVariants.ActiveProfile.DisableWarnings = !GlobalVariants.ActiveProfile.DisableWarnings;
     disableWarningsToolStripMenuItem.Checked     = !GlobalVariants.ActiveProfile.DisableWarnings;
 }
 private void btBack_Click(object sender, EventArgs e)
 {
     if (ActiveGame.IsGameStarted)
     {
         MesajSonuç msonuc = Mesaj.mbox.Göster(String.GetLangText("STI_GAME_RETURN"), String.GetLangText("STI_GAME_RETURN_HDR"), MessageBoxButtons.YesNo);
         if (msonuc.MesajCevap != DialogResult.Yes)
         {
             return;
         }
         ActiveGame.Resign();
     }
     grpGame.Visible     = false;
     grpStartNew.Visible = true;
     lblInfo.Text        = "";
 }
        private void closeProfileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MesajSonuç mesajSonuç = Mesaj.mbox.Göster(String.GetLangText("MENU_PROF_CLOSE_PRMPT"), "", MessageBoxButtons.YesNo);

            if (mesajSonuç.MesajCevap == DialogResult.Yes)
            {
                UserProfileUtils.SaveUserProfile(GlobalVariants.ActiveProfile);
                if (ActiveGame.IsGameStarted)
                {
                    ActiveGame.Abort();
                }
                GlobalVariants.ActiveProfile = null;
                CheckProfile(true);
            }
        }
 private void btRestart_Click(object sender, EventArgs e)
 {
     if (ActiveGame.IsGameStarted)
     {
         if (!GlobalVariants.ActiveProfile.DisableWarnings)
         {
             MesajSonuç msonuc = Mesaj.mbox.Göster(String.GetLangText("STI_GAME_RESIGN"), String.GetLangText("STI_GAME_RETURN_HDR"), MessageBoxButtons.YesNo);
             if (msonuc.MesajCevap != DialogResult.Yes)
             {
                 return;
             }
         }
         ActiveGame.Resign();
         return;
     }
     ActiveGame.RestartGame();
 }
Beispiel #8
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string SelectedProfile = "";

            if (lvProfiles.SelectedItems.Count == 0)
            {
                return;
            }
            SelectedProfile = lvProfiles.SelectedItems[0].SubItems[1].Text;
            Mesaj      Msj    = new Mesaj();
            MesajSonuç Msonuc = Msj.Göster(String.GetLangText("PRF_DEL_CONFIRM"), String.GetLangText("PRF_DEL_CONFIRM_HDR", SelectedProfile), MessageBoxButtons.YesNo);

            if (Msonuc.MesajCevap == DialogResult.Yes)
            {
                UserProfileUtils.DeleteUserProfile(SelectedProfile);
                lvProfiles.Items.Remove(lvProfiles.SelectedItems[0]);
            }
        }
 private void tekrarBaşlatCtrlRToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!grpGame.Visible)
     {
         return;
     }
     if (ActiveGame.IsGameStarted)
     {
         if (!GlobalVariants.ActiveProfile.DisableWarnings)
         {
             MesajSonuç msonuc = Mesaj.mbox.Göster(String.GetLangText("STI_GAME_RESTART"), String.GetLangText("STI_GAME_RETURN_HDR"), MessageBoxButtons.YesNo);
             if (msonuc.MesajCevap != DialogResult.Yes)
             {
                 return;
             }
         }
     }
     ActiveGame.RestartGame();
 }