public void Init(CoreUI ui) { UI = ui; Core = ui.Core; Trust = UI.GetService(ServiceIDs.Trust) as TrustUI; IM = UI.GetService(ServiceIDs.IM) as IMUI; Mail = UI.GetService(ServiceIDs.Mail) as MailUI; Buddy = UI.GetService(ServiceIDs.Buddy) as BuddyUI; Core.Locations.GuiUpdate += new LocationGuiUpdateHandler(Location_Update); Core.Buddies.GuiUpdate += new BuddyGuiUpdateHandler(Buddy_Update); if (Core.Trust != null) { Core.Trust.GuiUpdate += new LinkGuiUpdateHandler(Trust_Update); } IMImg = ExtractImage("IM", DeOps.Services.IM.IMRes.Icon.ToBitmap()); MailImg = ExtractImage("Mail", DeOps.Services.Mail.MailRes.Mail); BuddyWhoImg = ExtractImage("BuddyWho", DeOps.Services.Buddy.BuddyRes.buddy_who); TrustImg = ExtractImage("Trust", DeOps.Services.Trust.LinkRes.linkup); UntrustImg = ExtractImage("Untrust", DeOps.Services.Trust.LinkRes.unlink); RegImg = ExtractImage("Reg", InterfaceRes.reg); ShowNetwork(); }
public MailView(MailUI ui) { InitializeComponent(); UI = ui; Mail = ui.Mail; Core = ui.Core; Trust = Core.Trust; MessageView.SmallImageList = new List<Image>(); MessageView.SmallImageList.Add(MailRes.recvmail); MessageView.SmallImageList.Add(MailRes.sentmail); MessageHeader.DocumentText = HeaderPage.ToString(); GuiUtils.SetupToolstrip(toolStrip1, new OpusColorTable()); MessageBody.Core = Core; }
void Awake() { instance = this; }
public CoreUI(OpCore core) { Core = core; // load menus for loaded services foreach (var service in Core.ServiceMap.Values) { var id = service.ServiceID; if (id == ServiceIDs.Board) { Services[id] = new BoardUI(this, service); } if (id == ServiceIDs.Buddy) { Services[id] = new BuddyUI(this, service); } if (id == ServiceIDs.Chat) { Services[id] = new ChatUI(this, service); } if (id == ServiceIDs.IM) { Services[id] = new IMUI(this, service); } if (id == ServiceIDs.Mail) { Services[id] = new MailUI(this, service); } if (id == ServiceIDs.Plan) { Services[id] = new PlanUI(this, service); } if (id == ServiceIDs.Profile) { Services[id] = new ProfileUI(this, service); } if (id == ServiceIDs.Share) { Services[id] = new ShareUI(this, service); } if (id == ServiceIDs.Storage) { Services[id] = new StorageUI(this, service); } if (id == ServiceIDs.Trust) { Services[id] = new TrustUI(this, service); } } Core.RunInGui += Core_RunInGui; Core.UpdateConsole += Core_UpdateConsole; Core.ShowConfirm += Core_ShowConfirm; Core.ShowMessage += Core_ShowMessage; Core.VerifyPass += Core_VerifyPass; Core_UpdateConsole("DeOps " + Application.ProductVersion); }
public CoreUI(OpCore core) { Core = core; // load menus for loaded services foreach (var service in Core.ServiceMap.Values) { var id = service.ServiceID; if (id == ServiceIDs.Board) Services[id] = new BoardUI(this, service); if (id == ServiceIDs.Buddy) Services[id] = new BuddyUI(this, service); if (id == ServiceIDs.Chat) Services[id] = new ChatUI(this, service); if (id == ServiceIDs.IM) Services[id] = new IMUI(this, service); if (id == ServiceIDs.Mail) Services[id] = new MailUI(this, service); if (id == ServiceIDs.Plan) Services[id] = new PlanUI(this, service); if (id == ServiceIDs.Profile) Services[id] = new ProfileUI(this, service); if (id == ServiceIDs.Share) Services[id] = new ShareUI(this, service); if (id == ServiceIDs.Storage) Services[id] = new StorageUI(this, service); if (id == ServiceIDs.Trust) Services[id] = new TrustUI(this, service); } Core.RunInGui += Core_RunInGui; Core.UpdateConsole += Core_UpdateConsole; Core.ShowConfirm += Core_ShowConfirm; Core.ShowMessage += Core_ShowMessage; Core.VerifyPass += Core_VerifyPass; Core_UpdateConsole("DeOps " + Application.ProductVersion); }
public void Init(CoreUI ui) { UI = ui; Core = ui.Core; Trust = UI.GetService(ServiceIDs.Trust) as TrustUI; IM = UI.GetService(ServiceIDs.IM) as IMUI; Mail = UI.GetService(ServiceIDs.Mail) as MailUI; Buddy = UI.GetService(ServiceIDs.Buddy) as BuddyUI; Core.Locations.GuiUpdate += new LocationGuiUpdateHandler(Location_Update); Core.Buddies.GuiUpdate += new BuddyGuiUpdateHandler(Buddy_Update); if (Core.Trust != null) Core.Trust.GuiUpdate += new LinkGuiUpdateHandler(Trust_Update); IMImg = ExtractImage("IM", DeOps.Services.IM.IMRes.Icon.ToBitmap()); MailImg = ExtractImage("Mail", DeOps.Services.Mail.MailRes.Mail); BuddyWhoImg = ExtractImage("BuddyWho", DeOps.Services.Buddy.BuddyRes.buddy_who); TrustImg = ExtractImage("Trust", DeOps.Services.Trust.LinkRes.linkup); UntrustImg = ExtractImage("Untrust", DeOps.Services.Trust.LinkRes.unlink); RegImg = ExtractImage("Reg", InterfaceRes.reg); ShowNetwork(); }