Ejemplo n.º 1
0
 public MainWindow()
 {
     this.InitializeComponent();
     this.Icon             = Icons.POLConfig;
     this.picWarning.Image = Icons.POLConfigWarn.ToBitmap();
     this.lblWarning.Text  = I18N.GetText("SettingsWarning");
     this.cmbCharacters.Items.Clear();
     foreach (Character C in Game.Characters)
     {
         CharacterConfig CC = new CharacterConfig(C);
         if (CC.Colors != null)
         {
             this.cmbCharacters.Items.Add(CC);
         }
     }
     if (this.cmbCharacters.Items.Count == 0)
     {
         this.grpCharConfig.Visible = false;
         this.Height -= this.grpCharConfig.Height + this.grpCharConfig.Top -
                        (this.grpGlobalConfig.Top + this.grpGlobalConfig.Height);
     }
     else
     {
         this.ColorLabels = new Label[]
         {
             this.lblColor1, this.lblColor2, this.lblColor3, this.lblColor4, this.lblColor5, this.lblColor6, this.lblColor7,
             this.lblColor8, this.lblColor9, this.lblColor10, this.lblColor11, this.lblColor12, this.lblColor13,
             this.lblColor14, this.lblColor15, this.lblColor16, this.lblColor17, this.lblColor18, this.lblColor19,
             this.lblColor20, this.lblColor21, this.lblColor22, this.lblColor23
         };
         // TODO: Take these from the relevant string table (entries 32-54 (and/or 55-77) of E0-97-39/J0-97-21)
         this.lblColor1.Tag  = "Say";
         this.lblColor2.Tag  = "Shout";
         this.lblColor3.Tag  = "Tell";
         this.lblColor4.Tag  = "Party";
         this.lblColor5.Tag  = "Linkshell";
         this.lblColor6.Tag  = "Message";
         this.lblColor7.Tag  = "Emote";
         this.lblColor8.Tag  = "NPC";
         this.lblColor9.Tag  = "(Self) HP/MP Recovered";
         this.lblColor10.Tag = "(Self) HP/MP Lost";
         this.lblColor11.Tag = "(Self) Beneficial Effects Received";
         this.lblColor12.Tag = "(Self) Detrimental Effects Received";
         this.lblColor13.Tag = "(Self) Resisted Effects";
         this.lblColor14.Tag = "(Self) Evaded Effects";
         this.lblColor15.Tag = "(Other) HP/MP Recovered";
         this.lblColor16.Tag = "(Other) HP/MP Lost";
         this.lblColor17.Tag = "(Other) Beneficial Effects Received";
         this.lblColor18.Tag = "(Other) Detrimental Effects Received";
         this.lblColor19.Tag = "(Other) Resisted Effects";
         this.lblColor20.Tag = "(Self) Evaded Effects";
         this.lblColor21.Tag = "Battle Message";
         this.lblColor22.Tag = "Call For Help";
         this.lblColor23.Tag = "System Message";
     }
     this.LoadSettings();
 }
Ejemplo n.º 2
0
 public MainWindow()
 {
     this.InitializeComponent();
     this.Icon = Icons.POLConfig;
     this.picWarning.Image = Icons.POLConfigWarn.ToBitmap();
     this.lblWarning.Text = I18N.GetText("SettingsWarning");
     this.cmbCharacters.Items.Clear();
     foreach (Character C in Game.Characters)
     {
         CharacterConfig CC = new CharacterConfig(C);
         if (CC.Colors != null)
         {
             this.cmbCharacters.Items.Add(CC);
         }
     }
     if (this.cmbCharacters.Items.Count == 0)
     {
         this.grpCharConfig.Visible = false;
         this.Height -= this.grpCharConfig.Height + this.grpCharConfig.Top -
                        (this.grpGlobalConfig.Top + this.grpGlobalConfig.Height);
     }
     else
     {
         this.ColorLabels = new Label[]
         {
             this.lblColor1, this.lblColor2, this.lblColor3, this.lblColor4, this.lblColor5, this.lblColor6, this.lblColor7,
             this.lblColor8, this.lblColor9, this.lblColor10, this.lblColor11, this.lblColor12, this.lblColor13,
             this.lblColor14, this.lblColor15, this.lblColor16, this.lblColor17, this.lblColor18, this.lblColor19,
             this.lblColor20, this.lblColor21, this.lblColor22, this.lblColor23
         };
         // TODO: Take these from the relevant string table (entries 32-54 (and/or 55-77) of E0-97-39/J0-97-21)
         this.lblColor1.Tag = "Say";
         this.lblColor2.Tag = "Shout";
         this.lblColor3.Tag = "Tell";
         this.lblColor4.Tag = "Party";
         this.lblColor5.Tag = "Linkshell";
         this.lblColor6.Tag = "Message";
         this.lblColor7.Tag = "Emote";
         this.lblColor8.Tag = "NPC";
         this.lblColor9.Tag = "(Self) HP/MP Recovered";
         this.lblColor10.Tag = "(Self) HP/MP Lost";
         this.lblColor11.Tag = "(Self) Beneficial Effects Received";
         this.lblColor12.Tag = "(Self) Detrimental Effects Received";
         this.lblColor13.Tag = "(Self) Resisted Effects";
         this.lblColor14.Tag = "(Self) Evaded Effects";
         this.lblColor15.Tag = "(Other) HP/MP Recovered";
         this.lblColor16.Tag = "(Other) HP/MP Lost";
         this.lblColor17.Tag = "(Other) Beneficial Effects Received";
         this.lblColor18.Tag = "(Other) Detrimental Effects Received";
         this.lblColor19.Tag = "(Other) Resisted Effects";
         this.lblColor20.Tag = "(Self) Evaded Effects";
         this.lblColor21.Tag = "Battle Message";
         this.lblColor22.Tag = "Call For Help";
         this.lblColor23.Tag = "System Message";
     }
     this.LoadSettings();
 }
Ejemplo n.º 3
0
        private void cmbCharacters_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            CharacterConfig CC = this.cmbCharacters.SelectedItem as CharacterConfig;

            if (CC != null && CC.Colors != null)
            {
                for (int i = 0; i < 23; ++i)
                {
                    this.ColorLabels[i].BackColor = CC.Colors[i];
                }
            }
        }
Ejemplo n.º 4
0
        private void ColorLabel_DoubleClick(object sender, System.EventArgs e)
        {
            if (this.cmbCharacters.SelectedIndex < 0)
            {
                return;
            }
            Label L = sender as Label;

            this.dlgChooseColor.Color = L.BackColor;
            if (this.dlgChooseColor.ShowDialog(this) == DialogResult.OK)
            {
                L.BackColor = this.dlgChooseColor.Color;
                { // Also update the character config
                    CharacterConfig CC = this.cmbCharacters.SelectedItem as CharacterConfig;
                    CC.Colors[(sender as Label).TabIndex - 1] = this.dlgChooseColor.Color;
                }
                this.btnApply.Enabled = true;
            }
        }