Beispiel #1
0
        private void barButtonClearLastPlayedGames_ItemClick(object sender, ItemClickEventArgs e)
        {
            //System.Windows.Forms.DialogResult result = MessageBox.Show(Translations.TranslationGet("STR_CLEARRECENTNOTIFY", "DE", "Are you sure you want to clear your recent battle list?"), "WOT Statistics", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            // Confirm user wants to delete
            System.Windows.Forms.DialogResult result = DevExpress.XtraEditors.XtraMessageBox.Show(Translations.TranslationGet("STR_NEWSESSIONRECENTNOTIFY", "DE", "Do you want to start a new session?"), "WOT Statistics", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (result == System.Windows.Forms.DialogResult.Yes)
            {

                RecentBattles lb = new RecentBattles(_currentPlayer, _message);
                string sessionID = lb.NewSession();
                UserSettings.RecentBattlesCurrentSession = 0;
                RecentBattlesNavigate("rsID = (select max(rsID) from Recentbattles_Session)");
            }
        }
Beispiel #2
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            barButtonRefresh.Caption = Translations.TranslationGet("STR_REFRESH", "DE", "Refresh");
            barButtonRefresh.SuperTip.Items.Clear();
            barButtonRefresh.SuperTip.Items.Add(new ToolTipItem() { Text = Translations.TranslationGet("STR_REFRESH", "DE", "Refresh") + " (F5)" });// =   Translations.TranslationGet("STR_REFRESH", "DE", "Refresh");

            barButtonSelection.Caption = Translations.TranslationGet("STR_PERSELECT", "DE", "Period Selection");
            barButtonSelection.SuperTip.Items.Clear();
            barButtonSelection.SuperTip.Items.Add(new ToolTipItem() { Text = Translations.TranslationGet("STR_PERSELECT", "DE", "Period Selection") + " (F6)" });// =   Translations.TranslationGet("STR_REFRESH", "DE", "Refresh");

            STR_DOSMONITOR.Caption = Translations.TranslationGet("STR_DOSMONITOR", "DE", "Dossier Monitor");
            STR_DMSTOP.Caption = Translations.TranslationGet("STR_DMSTOP", "DE", "Stop");
            STR_DMSTART.Caption = Translations.TranslationGet("STR_DMSTART", "DE", "Start");
            STR_COMPARE.Caption = Translations.TranslationGet("STR_COMPARE", "DE", "Compare");
            STR_ONLINEANALYZER.Caption = Translations.TranslationGet("STR_ONLINEANALYZER", "DE", "Online Analyzer");

            STR_SETUP.Caption = Translations.TranslationGet("STR_SETUP", "DE", "Setup");
            STR_SETUP.SuperTip.Items.Clear();
            STR_SETUP.SuperTip.Items.Add(new ToolTipItem() { Text = Translations.TranslationGet("STR_SETUP", "DE", "Setup") + " (F8)" });// =   Translations.TranslationGet("STR_REFRESH", "DE", "Refresh");

            STR_HELP.Caption = Translations.TranslationGet("STR_HELP", "DE", "Help");
            subSTR_HELP.Caption = Translations.TranslationGet("STR_HELP", "DE", "Help");
            STR_IMPNOTICE.Caption = Translations.TranslationGet("STR_IMPNOTICE", "DE", "Important Notice");
            STR_CREDITS.Caption = Translations.TranslationGet("STR_CREDITS", "DE", "Credits");
            STR_DEFGROUPINGS.Caption = Translations.TranslationGet("STR_DEFGROUPINGS", "DE", "Define Groupings");
            STR_DEFCHARTS.Caption = Translations.TranslationGet("STR_DEFCHARTS", "DE", "Define Charts");
            //STR_RB_CLEAR.Caption = Translations.TranslationGet("STR_RB_CLEAR", "DE", "Start New Session");
            STR_RB_CLEAR.Caption = Translations.TranslationGet("STR_RB_NEWSESSION", "DE", "Start New Session");
            STR_RB_DISPLAYLIST.Caption = Translations.TranslationGet("STR_RB_DISPLAYLIST", "DE", "Display List");
            STR_RB_GROUPING.Caption = Translations.TranslationGet("STR_RB_GROUPING", "DE", "Grouping");
            BTN_CLOSE.Caption = Translations.TranslationGet("BTN_CLOSE", "DE", "Close");
            dockPanel1.Text = Translations.TranslationGet("STR_PLAYERS", "DE", "Players");
            dockPanel2.Text = Translations.TranslationGet("STR_TANKS", "DE", "Tanks");
            dockPanelGraph.Text = Translations.TranslationGet("STR_CHARTS", "DE", "Charts");

            STR_CAP_BATTLEMODE.Caption = Translations.TranslationGet("STR_CAP_BATTLEMODE", "DE", "Battle Mode");
            //STR_CAP_RATING.Caption = Translations.TranslationGet("STR_CAP_RATING", "DE", "Rating");

            repositoryItemRadioGroup2.Items[0].Description = Translations.TranslationGet("RADIO_RB_NONE", "DE", "None");
            repositoryItemRadioGroup2.Items[1].Description = Translations.TranslationGet("RADIO_RB_TANK", "DE", "By Tank");
            repositoryItemRadioGroup2.Items[2].Description = Translations.TranslationGet("RADIO_RB_TIER", "DE", "By Tier");
            repositoryItemRadioGroup2.Items[3].Description = Translations.TranslationGet("RADIO_RB_COUTNRY", "DE", "By Country");

            STR_WOTSTATSLINK.Caption = Translations.TranslationGet("STR_WOTSTATSLINK", "DE", "WOT Statistics Website");
            STR_WOTSTATSLINK.SuperTip.Items.Clear();
            STR_WOTSTATSLINK.SuperTip.Items.Add(new ToolTipItem() { Text = ApplicationSettings.WOTStatsWebLink });

            STR_EUFORMLINK.Caption = Translations.TranslationGet("STR_EUFORMLINK", "DE", "EU Forum");
            STR_EUFORMLINK.SuperTip.Items.Clear();
            STR_EUFORMLINK.SuperTip.Items.Add(new ToolTipItem() { Text = ApplicationSettings.EUForumWebLink });

            barButRBMoveFirst.SuperTip.Items.Clear();
            barButRBMoveFirst.SuperTip.Items.Add(new ToolTipItem() { Text = Translations.TranslationGet("STR_RB_MOVEFIRST", "DE", "First") });
            barButRBMovePrevious.SuperTip.Items.Clear();
            barButRBMovePrevious.SuperTip.Items.Add(new ToolTipItem() { Text = Translations.TranslationGet("STR_RB_MOVEPREVIOUS", "DE", "Previous") });
            barButRBMoveNext.SuperTip.Items.Clear();
            barButRBMoveNext.SuperTip.Items.Add(new ToolTipItem() { Text = Translations.TranslationGet("STR_RB_MOVENEXT", "DE", "Next") });
            barButRBMoveLast.SuperTip.Items.Clear();
            barButRBMoveLast.SuperTip.Items.Add(new ToolTipItem() { Text = Translations.TranslationGet("STR_RB_MOVELAST", "DE", "Last") });
            barButRBMoveTo.SuperTip.Items.Clear();
            barButRBMoveTo.SuperTip.Items.Add(new ToolTipItem() { Text = Translations.TranslationGet("STR_RB_MOVEGOTO", "DE", "Go To") });
            repButRBMoveTo.KeyPress += new KeyPressEventHandler(repButRBMoveTo_KeyPress);

            _browser.Dock = DockStyle.Fill;
            panelControl1.Controls.Add(_browser);
            try
            {
                navBarControl1.Groups[0].Expanded = true;
                navBarControl1.Groups[0].ItemLinks[0].PerformClick();
                navBarControl1.Groups[0].SelectedLink = navBarControl1.Groups[0].ItemLinks[0];
            }
            catch
            {
            }

            try
            {
                if (UserSettings.AutoCreateSession)
                {
                    if (UserSettings.AutoSessionOnStartUp)
                    {
                        RecentBattles lb = new RecentBattles(_currentPlayer, _message);
                        string sessionID = lb.GetSession();

                        //if (!lb.IsEmptySession(sessionID))
                        //{

                            if (UserSettings.AutoSessionOnStartUpMessage)
                            {
                                if (DevExpress.XtraEditors.XtraMessageBox.Show(Translations.TranslationGet("STR_NEWSESSIONNOTIFY", "DE", "Would you like to create a new recent battles session."), "WOT Statistics", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == System.Windows.Forms.DialogResult.Yes)
                                {
                                    UserSettings.ViewSessionID = lb.NewSession();
                                    UserSettings.RecentBattlesCurrentSession = 0;
                                }
                            }
                            else
                            {
                                UserSettings.ViewSessionID = lb.NewSession();
                                UserSettings.RecentBattlesCurrentSession = 0;
                            }
                        //}
                    }
                }
            }
            catch (Exception ex)
            {
                _message.Add(ex.Message);
            }
            finally
            {
                       try
                       {
                if (splashScreenManagerWaitForm.IsSplashFormVisible)
                splashScreenManagerWaitForm.CloseWaitForm();
            }
            catch { }
            }
        }