Exemplo n.º 1
0
 private ITextEffect chatPanel_StyleChatLine(ChatPanel sender, User user, TextLine line)
 {
     if (user.ID == User.Current.ID)
     {
         return new FontColorEffect(Program.Settings.Chat.Appearance.SelfColor, Program.Settings.Chat.Appearance.SelfFont);
     }
     if (user.ID == this.Game.Host.ID)
     {
         return new FontColorEffect(Program.Settings.Chat.Appearance.GameColor, Program.Settings.Chat.Appearance.DefaultFont);
     }
     if (user.IsSystem)
     {
         if (user.Equals(User.Error))
         {
             return new FontColorEffect(Program.Settings.Chat.Appearance.ErrorColor, Program.Settings.Chat.Appearance.ErrorFont);
         }
         if (user.Equals(User.Event))
         {
             return new FontColorEffect(Program.Settings.Chat.Appearance.EventColor, Program.Settings.Chat.Appearance.EventFont);
         }
         if (user.Equals(User.System))
         {
             return new FontColorEffect(Program.Settings.Chat.Appearance.SystemColor, Program.Settings.Chat.Appearance.SystemFont);
         }
         if (user.Equals(User.Game))
         {
             return new FontColorEffect(Program.Settings.Chat.Appearance.GameColor, Program.Settings.Chat.Appearance.GameFont);
         }
     }
     return null;
 }
Exemplo n.º 2
0
 private void InitializeComponent()
 {
     this.chatPanel = new ChatPanel();
     this.pnlLobbyParticipant1 = new PnlLobbyParticipant();
     this.pnlLobbyParticipant2 = new PnlLobbyParticipant();
     this.pnlLobbyParticipant3 = new PnlLobbyParticipant();
     this.pnlLobbyParticipant4 = new PnlLobbyParticipant();
     ((ISupportInitialize) base.pbBottom).BeginInit();
     base.SuspendLayout();
     base.pbBottom.Size = new Size(0x2f3, 0x39);
     base.ttDefault.SetSuperTip(base.pbBottom, null);
     base.ttDefault.DefaultController.AutoPopDelay = 0x3e8;
     base.ttDefault.DefaultController.ToolTipLocation = ToolTipLocation.RightTop;
     this.chatPanel.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     this.chatPanel.Location = new Point(0x10, 0x109);
     this.chatPanel.Name = "chatPanel";
     this.chatPanel.ShowSlashCommands = false;
     this.chatPanel.Size = new Size(0x30d, 0xf1);
     base.ttDefault.SetSuperTip(this.chatPanel, null);
     this.chatPanel.TabIndex = 7;
     this.chatPanel.SendChatMessage += new StringEventHandler(this.chatPanel_SendChatMessage);
     this.chatPanel.StyleChatLine += new ChatLineStyleEventHandler(this.chatPanel_StyleChatLine);
     this.pnlLobbyParticipant1.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     this.pnlLobbyParticipant1.BackColor = Color.Transparent;
     this.pnlLobbyParticipant1.Game = null;
     this.pnlLobbyParticipant1.IsOpen = true;
     this.pnlLobbyParticipant1.Location = new Point(11, 0x4c);
     this.pnlLobbyParticipant1.Name = "pnlLobbyParticipant1";
     this.pnlLobbyParticipant1.Postition = -1;
     this.pnlLobbyParticipant1.Size = new Size(0x312, 0x26);
     base.ttDefault.SetSuperTip(this.pnlLobbyParticipant1, null);
     this.pnlLobbyParticipant1.TabIndex = 11;
     this.pnlLobbyParticipant2.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     this.pnlLobbyParticipant2.BackColor = Color.Transparent;
     this.pnlLobbyParticipant2.Game = null;
     this.pnlLobbyParticipant2.IsOpen = true;
     this.pnlLobbyParticipant2.Location = new Point(11, 120);
     this.pnlLobbyParticipant2.Name = "pnlLobbyParticipant2";
     this.pnlLobbyParticipant2.Postition = -1;
     this.pnlLobbyParticipant2.Size = new Size(0x312, 0x26);
     base.ttDefault.SetSuperTip(this.pnlLobbyParticipant2, null);
     this.pnlLobbyParticipant2.TabIndex = 12;
     this.pnlLobbyParticipant3.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     this.pnlLobbyParticipant3.BackColor = Color.Transparent;
     this.pnlLobbyParticipant3.Game = null;
     this.pnlLobbyParticipant3.IsOpen = true;
     this.pnlLobbyParticipant3.Location = new Point(11, 0xa4);
     this.pnlLobbyParticipant3.Name = "pnlLobbyParticipant3";
     this.pnlLobbyParticipant3.Postition = -1;
     this.pnlLobbyParticipant3.Size = new Size(0x312, 0x26);
     base.ttDefault.SetSuperTip(this.pnlLobbyParticipant3, null);
     this.pnlLobbyParticipant3.TabIndex = 13;
     this.pnlLobbyParticipant4.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
     this.pnlLobbyParticipant4.BackColor = Color.Transparent;
     this.pnlLobbyParticipant4.Game = null;
     this.pnlLobbyParticipant4.IsOpen = true;
     this.pnlLobbyParticipant4.Location = new Point(11, 0xd0);
     this.pnlLobbyParticipant4.Name = "pnlLobbyParticipant4";
     this.pnlLobbyParticipant4.Postition = -1;
     this.pnlLobbyParticipant4.Size = new Size(0x312, 0x26);
     base.ttDefault.SetSuperTip(this.pnlLobbyParticipant4, null);
     this.pnlLobbyParticipant4.TabIndex = 14;
     base.AutoScaleDimensions = new SizeF(7f, 13f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.ClientSize = new Size(0x32e, 0x22f);
     base.Controls.Add(this.pnlLobbyParticipant4);
     base.Controls.Add(this.pnlLobbyParticipant3);
     base.Controls.Add(this.pnlLobbyParticipant2);
     base.Controls.Add(this.pnlLobbyParticipant1);
     base.Controls.Add(this.chatPanel);
     this.Font = new Font("Verdana", 8f);
     base.Location = new Point(0, 0);
     this.MinimumSize = new Size(0x32e, 0x22f);
     base.Name = "DlgGameLobby";
     base.ttDefault.SetSuperTip(this, null);
     this.Text = "<LOC>Space Siege Game Lobby";
     base.AfterShown += new BaseFormEvent(this.DlgGameLobby_AfterShown);
     base.Controls.SetChildIndex(this.chatPanel, 0);
     base.Controls.SetChildIndex(this.pnlLobbyParticipant1, 0);
     base.Controls.SetChildIndex(this.pnlLobbyParticipant2, 0);
     base.Controls.SetChildIndex(this.pnlLobbyParticipant3, 0);
     base.Controls.SetChildIndex(this.pnlLobbyParticipant4, 0);
     ((ISupportInitialize) base.pbBottom).EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }