public void SetItems(List <Message> messages) { foreach (var item in _Items) { this.Remove(item); } var y = 0; foreach (var message in messages) { var ui = new UIMessageIcon(message); ui.Y = y; _Items.Add(ui); this.Add(ui); y += 45; } }
public UIMessageGroup(UIMessageType type, MessageAuthor author, UIMessageController parent) { this.parent = parent; this.name = author.Author; this.type = type; window = new UIMessage(type, author); this.Add(window); window.X = GlobalSettings.Default.GraphicsWidth / 2 - 194; window.Y = GlobalSettings.Default.GraphicsHeight / 2 - 125; icon = new UIMessageIcon(type); this.Add(icon); icon.button.OnButtonClick += new ButtonClickDelegate(Show); window.MinimizeButton.OnButtonClick += new ButtonClickDelegate(Hide); window.CloseButton.OnButtonClick += new ButtonClickDelegate(Close); this.AddUpdateHook(new UpdateHookDelegate(ButtonAnim)); Ticks = 0; Alert = false; Hide(this); }
public UIMessageGroup(UIMessageType type, MessageAuthor author, UIMessageController parent) { this.parent = parent; this.name = author.Author; this.type = type; window = new UIMessage(type, author); this.Add(window); window.X = GlobalSettings.Default.GraphicsWidth / 2 - 194; window.Y = GlobalSettings.Default.GraphicsHeight / 2 - 125; icon = new UIMessageIcon(type); this.Add(icon); icon.button.OnButtonClick += new ButtonClickDelegate(Show); window.MinimizeButton.OnButtonClick += new ButtonClickDelegate(Hide); window.CloseButton.OnButtonClick += new ButtonClickDelegate(Close); this.AddUpdateHook(new UpdateHookDelegate(ButtonAnim)); Ticks = 0; Alert = false; Hide(this); }