Exemplo n.º 1
0
        public TeamNamesDisplayLegend(KillDisplayColours legendType, Dictionary<int, Color> dicTeamColours, CLocalization language, CMap mapDetails)
        {
            this.TeamNamesText = new MapTextBlock();
            this.LegendType = legendType;

            if (legendType == KillDisplayColours.TeamColours) {

                foreach (CTeamName teamName in mapDetails.TeamNames) {
                    if (teamName.TeamID > 0 && dicTeamColours.ContainsKey(teamName.TeamID)) {
                        this.TeamNamesText.Strings.Add(new MapTextBlockString(language.GetLocalized(teamName.LocalizationKey), ControlPaint.LightLight(dicTeamColours[teamName.TeamID]), true));
                    }
                }
            }
            else {
                this.TeamNamesText.Strings.Add(new MapTextBlockString("Killer", Color.LightSeaGreen, true));
                this.TeamNamesText.Strings.Add(new MapTextBlockString("Victim", ControlPaint.Light(Color.Red), true));
            }
        }
Exemplo n.º 2
0
        public void SetLocalization(CLocalization clocLanguage) {
            //this.m_prcClient.Language = clocLanguage;

            // private string[] m_astrTimeDescriptionsShort = new string[] { "y ", "y ", "M ", "M ", "w ", "w ", "d ", "d ", "h ", "h ", "m ", "m ", "s ", "s " };
            this.ma_strTimeDescriptionsShort[13] = clocLanguage.GetLocalized("global.Seconds.Short", null);
            this.ma_strTimeDescriptionsShort[12] = clocLanguage.GetLocalized("global.Seconds.Short", null);
            this.ma_strTimeDescriptionsShort[11] = clocLanguage.GetLocalized("global.Minutes.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[10] = clocLanguage.GetLocalized("global.Minutes.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[9] = clocLanguage.GetLocalized("global.Hours.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[8] = clocLanguage.GetLocalized("global.Hours.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[7] = clocLanguage.GetLocalized("global.Days.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[6] = clocLanguage.GetLocalized("global.Days.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[5] = clocLanguage.GetLocalized("global.Weeks.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[4] = clocLanguage.GetLocalized("global.Weeks.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[3] = clocLanguage.GetLocalized("global.Months.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[2] = clocLanguage.GetLocalized("global.Months.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[1] = clocLanguage.GetLocalized("global.Years.Short", null) + " ";
            this.ma_strTimeDescriptionsShort[0] = clocLanguage.GetLocalized("global.Years.Short", null) + " ";

            this.ma_strTimeDescriptionsLong[13] = " " + clocLanguage.GetLocalized("global.Seconds.Plural", null).ToLower();
            this.ma_strTimeDescriptionsLong[12] = " " + clocLanguage.GetLocalized("global.Seconds.Singular", null).ToLower();
            this.ma_strTimeDescriptionsLong[11] = " " + clocLanguage.GetLocalized("global.Minutes.Plural", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[10] = " " + clocLanguage.GetLocalized("global.Minutes.Singular", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[9] = " " + clocLanguage.GetLocalized("global.Hours.Plural", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[8] = " " + clocLanguage.GetLocalized("global.Hours.Singular", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[7] = " " + clocLanguage.GetLocalized("global.Days.Plural", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[6] = " " + clocLanguage.GetLocalized("global.Days.Singular", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[5] = " " + clocLanguage.GetLocalized("global.Weeks.Plural", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[4] = " " + clocLanguage.GetLocalized("global.Weeks.Singular", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[3] = " " + clocLanguage.GetLocalized("global.Months.Plural", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[2] = " " + clocLanguage.GetLocalized("global.Months.Singular", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[1] = " " + clocLanguage.GetLocalized("global.Years.Plural", null).ToLower() + " ";
            this.ma_strTimeDescriptionsLong[0] = " " + clocLanguage.GetLocalized("global.Years.Singular", null).ToLower() + " ";

            this.cboBanlistTimeMultiplier.Items[0] = clocLanguage.GetLocalized("global.Minutes.Plural", null);
            this.cboBanlistTimeMultiplier.Items[1] = clocLanguage.GetLocalized("global.Hours.Plural", null);
            this.cboBanlistTimeMultiplier.Items[2] = clocLanguage.GetLocalized("global.Days.Plural", null);
            this.cboBanlistTimeMultiplier.Items[3] = clocLanguage.GetLocalized("global.Weeks.Plural", null);
            this.cboBanlistTimeMultiplier.Items[4] = clocLanguage.GetLocalized("global.Months.Plural", null);

            this.tabBanlist.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist", null);
            this.colName.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lsvBanlist.colName", null);
            this.colIP.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lsvBanlist.colIP", null);
            this.colGUID.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lsvBanlist.colGUID", null);
            this.colType.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lsvBanlist.colType", null);
            //this.colTime.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lsvBanlist.colTime", null);
            //this.colBanLength.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lsvBanlist.colBanLength", null);
            this.colTimeRemaining.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lsvBanlist.colTimeRemaining", null);
            this.colReason.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lsvBanlist.colReason", null);
            this.btnBanlistClearBanlist.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.btnBanlistClearBanlist", null);
            //this.btnBanlistClearBanlist.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.btnBanlistClearNameList", null);
            //this.btnBanlistClearIPList.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.btnBanlistClearIPList", null);
            this.btnBanlistUnban.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.btnBanlistUnban", null);

            this.tabMaplist.Text = clocLanguage.GetLocalized("uscListControlPanel.tabMaplist");

            this.tabReservedSlots.Text = clocLanguage.GetLocalized("uscListControlPanel.tabReservedSlots", null);
            this.lblReservedCurrent.Text = clocLanguage.GetLocalized("uscListControlPanel.tabReservedSlots.lblReservedCurrent", null);
            this.colSoldierNames.Text = clocLanguage.GetLocalized("uscListControlPanel.tabReservedSlots.lsvReservedList.colSoldierNames", null);
            this.lblReservedAddSoldierName.Text = clocLanguage.GetLocalized("uscListControlPanel.tabReservedSlots.lblReservedAddSoldierName", null);
            this.lnkReservedAddSoldierName.Text = clocLanguage.GetLocalized("uscListControlPanel.tabReservedSlots.lnkReservedAddSoldierName", null);

            this.tabSpectatorSlots.Text = clocLanguage.GetLocalized("uscListControlPanel.tabSpectatorSlots", null);
            this.lblSpectatorCurrent.Text = clocLanguage.GetLocalized("uscListControlPanel.tabSpectatorSlots.lblSpectatorCurrent", null);
            this.colSpectatorSoldierNames.Text = clocLanguage.GetLocalized("uscListControlPanel.tabSpectatorSlots.lsvSpectatorList.colSpectatorSoldierNames", null);
            this.lblSpectatorAddSoldierName.Text = clocLanguage.GetLocalized("uscListControlPanel.tabSpectatorSlots.lblSpectatorAddSoldierName", null);
            this.lnkSpectatorAddSoldierName.Text = clocLanguage.GetLocalized("uscListControlPanel.tabSpectatorSlots.lnkSpectatorAddSoldierName", null);

            this.lnkCloseOpenManualBans.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lnkCloseOpenManualBans.Close", null);
            this.rdoBanlistName.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.rdoBanlistName", null);
            //this.rdoBanlistPbGUID.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.rdoBanlistGUID", null);
            this.lblBanlistReason.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lblBanlistReason", null) + ":";
            this.rdoBanlistPermanent.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.rdoBanlistPermanent", null);
            this.rdoBanlistTemporary.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.rdoBanlistTemporary", null);
            this.lblBanlistTime.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.lblBanlistTime", null) + ":";
            this.btnBanlistAddBan.Text = clocLanguage.GetLocalized("uscListControlPanel.tabBanlist.btnBanlistAddBan", null);

            this.uscMaplist1.SetLocalization(clocLanguage);

            this.tabTextChatModeration.Text = clocLanguage.GetLocalized("uscTextChatModerationList.Title", null);
            this.uscTextChatModerationListcs1.SetLocalization(clocLanguage);
        }
Exemplo n.º 3
0
        public static string GetConfirmationLabel(out bool blAbleToPunish, string strBanDescription, CPrivileges cpPrivileges, CLocalization clocLanguage, bool blKill, bool blKick, bool blPerm, bool blTemp, TextBox txtTime, ComboBox cboTimeMultiplier, string[] a_strTimeDescriptionsLong, int iTempBanCeiling) {

            string strLabel = String.Empty;

            blAbleToPunish = false;

            if (clocLanguage != null) {

                if (blKill == true) {
                    strLabel = clocLanguage.GetLocalized("uscPlayerPunishPanel.lblConfirmation.Kill", new string[] { strBanDescription });
                    blAbleToPunish = true && (cpPrivileges.CanKillPlayers == true);
                }
                else if (blKick == true) {
                    strLabel = clocLanguage.GetLocalized("uscPlayerPunishPanel.lblConfirmation.Kick", new string[] { strBanDescription });
                    blAbleToPunish = true && (cpPrivileges.CanKickPlayers == true);
                }
                else if (blPerm == true) {
                    strLabel = clocLanguage.GetLocalized("uscPlayerPunishPanel.lblConfirmation.PermanentBan", new string[] { strBanDescription });
                    blAbleToPunish = true && (cpPrivileges.CanPermanentlyBanPlayers == true);
                }
                else if (blTemp == true) {

                    string strBanLength = uscPlayerPunishPanel.GetBanLength(txtTime, cboTimeMultiplier, a_strTimeDescriptionsLong);

                    if (strBanLength.Length > 0) {
                        // strLabel += " for " + strBanLength;

                        if (cpPrivileges.CanTemporaryBanPlayers == true && cpPrivileges.CanPermanentlyBanPlayers == false && (uscPlayerPunishPanel.GetBanLength(txtTime, cboTimeMultiplier) * 60) > iTempBanCeiling) {
                            strLabel = clocLanguage.GetLocalized("uscPlayerPunishPanel.lblConfirmation.TemporaryBan.ToLong", new string[] { uscPlayerPunishPanel.SecondsToText((UInt32)(iTempBanCeiling), a_strTimeDescriptionsLong) });
                            blAbleToPunish = false;
                        }
                        else {
                            strLabel = clocLanguage.GetLocalized("uscPlayerPunishPanel.lblConfirmation.TemporaryBan", new string[] { strBanDescription, clocLanguage.GetLocalized("uscPlayerPunishPanel.lblConfirmation.TemporaryBan.Time", new string[] { strBanLength }) });
                            blAbleToPunish = true && (cpPrivileges.CanTemporaryBanPlayers == true);
                        }
                    }
                    else {
                        strLabel = clocLanguage.GetLocalized("uscPlayerPunishPanel.lblConfirmation.TemporaryBan", new string[] { strBanDescription, String.Empty });
                        blAbleToPunish = false;
                    }
                }

                strLabel += ":";
            }

            return strLabel;
        }