Ejemplo n.º 1
0
        private void frmAddEditPlayer_Load(object sender, EventArgs e)
        {
            STR_DOSSIERFILE.Text = Translations.TranslationGet("STR_DOSSIERFILE", "DE", "Dossier File") + " :";
            STR_PLAYERID.Text    = Translations.TranslationGet("STR_PLAYERID", "DE", "Player ID") + " :";
            STR_PLAYERREALM.Text = Translations.TranslationGet("STR_PLAYERREALM", "DE", "Player Realm") + " :";
            CHKBOX_FTPFILE.Text  = Translations.TranslationGet("CHKBOX_FTPFILE", "DE", "Shared File") + " :";

            FormHelpers.ResizeLables(this.Controls);

            txtWatchFile.Left   = STR_DOSSIERFILE.Left + STR_DOSSIERFILE.Width + 5;
            txtPlayerID.Left    = txtWatchFile.Left;
            txtPlayerRealm.Left = txtWatchFile.Left;
            checkFTPFile.Left   = txtWatchFile.Left;

            if (this.ClientRectangle.Width - (STR_DOSSIERFILE.Left + STR_DOSSIERFILE.Width + 10) < txtWatchFile.Width)
            {
                txtWatchFile.Width = this.ClientRectangle.Width - (STR_DOSSIERFILE.Left + STR_DOSSIERFILE.Width + 10);
            }

            if (this.ClientRectangle.Width - (STR_DOSSIERFILE.Left + STR_DOSSIERFILE.Width + 10) < txtPlayerID.Width)
            {
                txtPlayerID.Width = this.ClientRectangle.Width - (STR_DOSSIERFILE.Left + STR_DOSSIERFILE.Width + 10);
            }

            if (this.ClientRectangle.Width - (STR_DOSSIERFILE.Left + STR_DOSSIERFILE.Width + 10) < CHKBOX_FTPFILE.Width)
            {
                checkFTPFile.Width = this.ClientRectangle.Width - (STR_DOSSIERFILE.Left + STR_DOSSIERFILE.Width + 10);
            }


            BTN_SAVE.Text   = Translations.TranslationGet("BTN_SAVE", "DE", "Save");
            BTN_CANCEL.Text = Translations.TranslationGet("BTN_CANCEL", "DE", "Cancel");
        }
Ejemplo n.º 2
0
        private void ctxLastPlayedGames_Load(object sender, EventArgs e)
        {
            CHKBOX_COMPARE.Text        = Translations.TranslationGet("CHKBOX_COMPARE", "DE", "Compare (Doesn't apply when grouped)");
            STR_SHOWLASTBATTLES_1.Text = Translations.TranslationGet("STR_SHOWLASTBATTLES_1", "DE", "Show last");
            STR_SHOWLASTBATTLES_2.Text = Translations.TranslationGet("STR_SHOWLASTBATTLES_2", "DE", "battles");

            radioGroup1.Properties.Items[0].Description = Translations.TranslationGet("RADIO_OVERALLSTATS", "DE", "To Overall Stats");
            radioGroup1.Properties.Items[1].Description = Translations.TranslationGet("RADIO_TANKSTATS", "DE", "To Tank Stats");

            lblAutoAfterXBattles.Text        = Translations.TranslationGet("STR_SHOWLASTBATTLES_2", "DE", "battles");
            lblAutoAfterXHours.Text          = Translations.TranslationGet("STR_CAP_AUTOAFTERXHOURS", "DE", "hours after last battle");
            chkAutoAfterXBattlesMessage.Text = Translations.TranslationGet("STR_CAP_AUTODISPLAYMESSAGE", "DE", "Display message before creating new session");
            chkAutoAfterXHoursMessage.Text   = Translations.TranslationGet("STR_CAP_AUTODISPLAYMESSAGE", "DE", "Display message before creating new session");
            chkAutoOnStartUp.Text            = Translations.TranslationGet("STR_CAP_AUTOONSTARTUP", "DE", "On Startup");
            chkAutoOnStartUpMessage.Text     = Translations.TranslationGet("STR_CAP_AUTODISPLAYMESSAGE", "DE", "Display message before creating new session");
            chkAutoStartSession.Text         = Translations.TranslationGet("STR_CAP_AUTOSTARTSESSION", "DE", "Auto create new session");
            chkAutoAfterXBattles.Text        = Translations.TranslationGet("STR_CAP_AUTOAFTERXBATTLES", "DE", "After every ");


            FormHelpers.ResizeLables(this.Controls);
            STR_SHOWLASTBATTLES_1.AutoSizeMode = LabelAutoSizeMode.Horizontal;
            STR_SHOWLASTBATTLES_1.Left         = 3;
            textLastPlayedMaxNo.Left           = STR_SHOWLASTBATTLES_1.Left + STR_SHOWLASTBATTLES_1.Width + 5;
            STR_SHOWLASTBATTLES_2.Left         = STR_SHOWLASTBATTLES_1.Left + STR_SHOWLASTBATTLES_1.Width + 5 + textLastPlayedMaxNo.Width + 5;
            STR_SHOWLASTBATTLES_2.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;

            lblAutoAfterXBattles.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            lblAutoAfterXHours.Appearance.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Near;
            chkAutoAfterXBattles.AutoSizeInLayoutControl           = true;
            txtAutoAfterXBattles.Left = chkAutoAfterXBattles.Left + chkAutoAfterXBattles.Width + 5;
            lblAutoAfterXBattles.Left = txtAutoAfterXBattles.Left + txtAutoAfterXBattles.Width + 5;
            Form           pForm = ParentForm;
            PropertyFields field;

            ((frmSetup)pForm)._propertyFields.TryGetValue("LastPlayedCompare", out field);
            int compare = Convert.ToInt32(field.NewValue);

            if (compare == 0)
            {
                CHKBOX_COMPARE.Checked = false;
                radioGroup1.Enabled    = false;
            }
            else
            {
                CHKBOX_COMPARE.Checked = true;
                radioGroup1.Enabled    = true;

                if (compare == 1)
                {
                    radioGroup1.EditValue = "0";
                }
                else
                {
                    radioGroup1.EditValue = "1";
                }
            }

            ((frmSetup)pForm)._propertyFields.TryGetValue("LastPlayedCompareQuota", out field);
            textLastPlayedMaxNo.Text = Convert.ToString(field.NewValue);



            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoCreateSession", out field);
            chkAutoStartSession.Checked = Convert.ToBoolean(field.NewValue);


            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoSessionOnStartUp", out field);
            chkAutoOnStartUp.Checked = Convert.ToBoolean(field.NewValue);



            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoSessionOnStartUpMessage", out field);
            chkAutoOnStartUpMessage.Checked = Convert.ToBoolean(field.NewValue);



            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoSessionXBattles", out field);
            chkAutoAfterXBattles.Checked = Convert.ToBoolean(field.NewValue);



            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoSessionXBattlesMessage", out field);
            chkAutoAfterXBattlesMessage.Checked = Convert.ToBoolean(field.NewValue);



            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoSessionXHours", out field);
            chkAutoAfterXHours.Checked = Convert.ToBoolean(field.NewValue);



            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoSessionXHoursMessage", out field);
            chkAutoAfterXHoursMessage.Checked = Convert.ToBoolean(field.NewValue);



            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoSessionXBattlesValue", out field);
            txtAutoAfterXBattles.Text = Convert.ToString(Convert.ToInt16(field.NewValue) == 0 ? "" : field.NewValue);



            ((frmSetup)pForm)._propertyFields.TryGetValue("AutoSessionXHoursValue", out field);
            txtAutoAfterXHours.Text = Convert.ToString(Convert.ToInt16(field.NewValue) == 0 ? "" : field.NewValue);



            SetAutoStartOptions();

            chkAutoStartSession.CheckedChanged         += chkAutoStartSession_CheckedChanged;
            chkAutoOnStartUp.CheckedChanged            += chkAutoOnStartUp_CheckedChanged;
            chkAutoOnStartUpMessage.CheckedChanged     += chkAutoOnStartUpMessage_CheckedChanged;
            chkAutoAfterXBattles.CheckedChanged        += chkAutoAfterXBattles_CheckedChanged;
            chkAutoAfterXBattlesMessage.CheckedChanged += chkAutoAfterXBattlesMessage_CheckedChanged;
            chkAutoAfterXHours.CheckedChanged          += chkAutoAfterXHours_CheckedChanged;
            chkAutoAfterXHoursMessage.CheckedChanged   += chkAutoAfterXHoursMessage_CheckedChanged;
            txtAutoAfterXBattles.EditValueChanged      += txtAutoAfterXBattles_EditValueChanged;
            txtAutoAfterXHours.EditValueChanged        += txtAutoAfterXHours_EditValueChanged;
        }
Ejemplo n.º 3
0
        private void GraphSetup_Load(object sender, EventArgs e)
        {
            Width = 274; //223
            Text  = Translations.TranslationGet("WIN_CAPSETUPCHARTS", "DE", "Chart Setup");
            STR_GRPSTATSBASE.Text = Translations.TranslationGet("STR_GRPSTATSBASE", "DE", "Statistic Base");
            STR_GRPPERIOD.Text    = Translations.TranslationGet("STR_GRPPERIOD", "DE", "Period");
            STR_CATEGORY.Text     = Translations.TranslationGet("STR_CATEGORY", "DE", "Category");
            STR_CHARTNAME.Text    = Translations.TranslationGet("STR_CHARTNAME", "DE", "Chart Name");

            FormHelpers.ResizeLables(this.Controls);

            textName.Left       = STR_CHARTNAME.Left + STR_CHARTNAME.Width + 5;
            comboDataField.Left = textName.Left;

            if (this.ClientRectangle.Width - (STR_CHARTNAME.Left + STR_CHARTNAME.Width + 10) < textName.Width)
            {
                textName.Width = this.ClientRectangle.Width - (STR_CHARTNAME.Left + STR_CHARTNAME.Width + 10);
            }

            if (this.ClientRectangle.Width - (STR_CHARTNAME.Left + STR_CHARTNAME.Width + 10) < comboDataField.Width)
            {
                comboDataField.Width = this.ClientRectangle.Width - (STR_CHARTNAME.Left + STR_CHARTNAME.Width + 10);
            }

            radioGroup1.Properties.Items[0].Description = Translations.TranslationGet("STR_OVERALL", "DE", "Overall");
            radioGroup1.Properties.Items[1].Description = Translations.TranslationGet("STR_TANKS", "DE", "Tanks");

            radioGroupPeriod.Properties.Items[0].Description = "1 " + Translations.TranslationGet("STR_WEEK", "DE", "Week");
            radioGroupPeriod.Properties.Items[1].Description = "2 " + Translations.TranslationGet("STR_WEEKS", "DE", "Weeks");
            radioGroupPeriod.Properties.Items[2].Description = "3 " + Translations.TranslationGet("STR_WEEKS", "DE", "Weeks");
            radioGroupPeriod.Properties.Items[3].Description = "4 " + Translations.TranslationGet("STR_WEEKS", "DE", "Weeks");
            radioGroupPeriod.Properties.Items[4].Description = "5 " + Translations.TranslationGet("STR_WEEKS", "DE", "Weeks");
            radioGroupPeriod.Properties.Items[5].Description = "6 " + Translations.TranslationGet("STR_WEEKS", "DE", "Weeks");
            radioGroupPeriod.Properties.Items[6].Description = "3 " + Translations.TranslationGet("STR_MONTHS", "DE", "Months");
            radioGroupPeriod.Properties.Items[7].Description = "6 " + Translations.TranslationGet("STR_MONTHS", "DE", "Months");
            radioGroupPeriod.Properties.Items[8].Description = Translations.TranslationGet("STR_YEAR", "DE", "Year");

            foreach (KeyValuePair <int, string> country in _cDescription)
            {
                listTanks.Groups.Add(new ListViewGroup(country.Key.ToString(), country.Value)
                {
                    HeaderAlignment = HorizontalAlignment.Center
                });
            }

            foreach (KeyValuePair <TankKey, TankValue> tank in _tDescription.OrderBy(x => x.Value.Tier).ThenBy(y => y.Value.TankType).Where(z => z.Value.Active == true))
            {
                ListViewItem newListViewItem = new ListViewItem(tank.Value.Description,
                                                                0,
                                                                listTanks.Groups[tank.Key.CountryID.ToString()])
                {
                    Name = String.Format("{0}_{1}", tank.Key.CountryID, tank.Key.TankID)
                };

                ListViewItem.ListViewSubItem subItem1 = new ListViewItem.ListViewSubItem(newListViewItem, _typeDescription.Description(tank.Value.TankType));
                ListViewItem.ListViewSubItem subItem2 = new ListViewItem.ListViewSubItem(newListViewItem, tank.Value.Tier.ToString());

                newListViewItem.SubItems.Add(subItem1);
                newListViewItem.SubItems.Add(subItem2);
                listTanks.Items.Add(newListViewItem);
            }

            if (textName.Text != "")
            {
                List <string> list = _graphSettings.InnerText(_ID).Split('|').ToList <string>();

                foreach (string item in list)
                {
                    if (listTanks.Items[item] != null)
                    {
                        listTanks.Items[item].Checked = true;
                    }
                }
            }

            listTanks.Columns[0].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
            listTanks.Columns[1].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
            listTanks.Columns[2].AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);

            if (radioGroup1.EditValue.ToString() == "Tanks")
            {
                Width    = 684;
                Location = new Point(Screen.PrimaryScreen.WorkingArea.Width / 2 - Width / 2, Screen.PrimaryScreen.WorkingArea.Height / 2 - Height / 2);
            }
            else
            {
                Width = 274; //223
            }
        }
Ejemplo n.º 4
0
        private void CustomGroupings_Load(object sender, EventArgs e)
        {
            Text = Translations.TranslationGet("STR_CUSTGROUPINGS", "DE", "Custom Groupings");
            HTML_GROUPNAME.Text = Translations.TranslationGet("HTML_GROUPNAME", "DE", "Group Name");
            BTN_SAVE.Text       = Translations.TranslationGet("BTN_SAVE", "DE", "Save");
            BTN_CLOSE.Text      = Translations.TranslationGet("BTN_CLOSE", "DE", "Close");

            FormHelpers.ResizeLables(this.Controls);

            txtGroupName.Left = HTML_GROUPNAME.Left + HTML_GROUPNAME.Width + 5;
            if (this.ClientRectangle.Width - (HTML_GROUPNAME.Left + HTML_GROUPNAME.Width + 10) < txtGroupName.Width)
            {
                txtGroupName.Width = this.ClientRectangle.Width - (HTML_GROUPNAME.Left + HTML_GROUPNAME.Width + 10);
            }

            imageList1.ColorDepth = ColorDepth.Depth32Bit;
            imageList1.ImageSize  = new Size(50, 24);

            foreach (KeyValuePair <int, string> country in _cDescription)
            {
                tankListView.Groups.Add(new ListViewGroup(country.Key.ToString(), country.Value)
                {
                    HeaderAlignment = HorizontalAlignment.Center
                });
            }


            foreach (KeyValuePair <TankKey, TankValue> tank in _tDescription.OrderBy(x => x.Value.Tier).ThenBy(y => y.Value.TankType).Where(z => z.Value.Active == true))
            {
                ListViewItem newListViewItem = new ListViewItem(tank.Value.Description, 0, tankListView.Groups[tank.Key.CountryID.ToString()]);
                newListViewItem.Name = tank.Key.CountryID + "_" + tank.Key.TankID;
                ListViewItem.ListViewSubItem subItem1 = new ListViewItem.ListViewSubItem(newListViewItem, _typeDescription.Description(tank.Value.TankType));
                ListViewItem.ListViewSubItem subItem2 = new ListViewItem.ListViewSubItem(newListViewItem, tank.Value.Tier.ToString());
                newListViewItem.SubItems.Add(subItem1);
                newListViewItem.SubItems.Add(subItem2);

                try
                {
                    if (!imageList1.Images.ContainsKey(String.Format("{0}_{1}", tank.Key.CountryID, tank.Key.TankID)))
                    {
                        imageList1.Images.Add(String.Format("{0}_{1}", tank.Key.CountryID, tank.Key.TankID), Image.FromFile(String.Format(@"{0}", WOTHelper.GetImagePath(tank.Key.CountryID + "_" + tank.Key.TankID + "_Large.png"))));
                    }

                    newListViewItem.ImageKey = String.Format("{0}_{1}", tank.Key.CountryID, tank.Key.TankID);
                }
                catch { }
                tankListView.Items.Add(newListViewItem);
            }


            if (_ID != "")
            {
                List <string> list = _customGrouping.Values(_ID).Split('|').ToList <string>();

                foreach (string item in list)
                {
                    if (tankListView.Items[item] != null)
                    {
                        tankListView.Items[item].Checked = true;
                    }
                }
            }


            tankListView.Columns[0].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
            tankListView.Columns[1].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
            tankListView.Columns[2].AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
        }