public IMUI(CoreUI ui, OpService service) { UI = ui; IM = service as IMService; IM.CreateView += IM_CreateView; }
public IM_View(CoreUI ui, IMService im, ulong key) { InitializeComponent(); UI = ui; Core = ui.Core; IM = im; Locations = IM.Core.Locations; UserID = key; IM.ActiveUsers.Add(UserID); UpdateName(); // do here so window can be found and multiples not created for the same user IM.MessageUpdate += new IM_MessageHandler(IM_MessageUpdate); IM.StatusUpdate += new IM_StatusHandler(IM_StatusUpdate); Core.KeepDataGui += new KeepDataHandler(Core_KeepData); MessageTextBox.Core = Core; MessageTextBox.ContextMenuStrip.Items.Insert(0, new ToolStripSeparator()); TimestampMenu = new ToolStripMenuItem("Timestamps", ViewRes.timestamp, new EventHandler(Menu_Timestamps)); MessageTextBox.ContextMenuStrip.Items.Insert(0, TimestampMenu); }