public GameController(Vector3 firstBrickPosition, GameObject paddle, GameObject brick, GameObject ball) { gameModel = new GameModel(); coreUI = Core.GetCoreUI; this.firstBrickPosition = firstBrickPosition; this.paddle = paddle; brickPrefab = brick; ballPrefab = ball; BrickMatrix = new Dictionary <GameObject, Brick>(); brickCount = brickMatrixRow * brickMatrixColumn; allModel = new Brick[brickCount]; ballInGame = new List <Ball>(); ballPool = new Queue <Ball>(); paddleStartPosition = new Vector2(0, Constants.PADDLE_Y_POSITION); currentLevel = Constants.START_LEVEL; isNeedControllers = true; CreateBricks(); CreatePaddle(); CreateBall(); }
public ChatView(CoreUI ui, ChatService chat, uint project) { InitializeComponent(); UI = ui; Chat = chat; ProjectID = project; Chat.Refresh += new RefreshHandler(Chat_Refresh); GuiUtils.SetupToolstrip(toolStrip1, new OpusColorTable()); GuiUtils.FixMonoDropDownOpening(RoomsButton, RoomsButton_DropDownOpening); RoomsButton.Visible = true; RoomSeparator.Visible = true; LocalButton.Visible = (Chat.Core.Trust != null); LiveButton.Visible = (Chat.Core.Trust != null); CustomButton.Visible = false; JoinButton.Visible = false; LeaveButton.Visible = false; InviteButton.Visible = false; }
public BonusController(Sprite[] bonusSprites, GameObject bonusPrefab) { spriteDict = new Dictionary <int, Sprite>() { { 0, bonusSprites[0] }, { 1, bonusSprites[1] }, { 2, bonusSprites[2] }, { 3, bonusSprites[3] }, }; bonusActions = new Dictionary <int, Action <Bonus> >() { { 0, ExtraBall }, { 1, IncreasePaddleLenght }, { 2, SpeedUpBalls }, { 3, SLowDownBalls }, }; this.bonusPrefab = bonusPrefab; currentBonuses = new List <Bonus>(); poolBonuses = new Queue <Bonus>(); coreUI = Core.GetCoreUI; var core = Core.GetCore; paddleController = core.GetController <PaddleController>(); gameController = core.GetController <GameController>(); ballController = core.GetController <BallController>(); }
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); }
public SendFileForm(CoreUI ui, ulong user) { InitializeComponent(); UI = ui; Core = ui.Core; User = user; Sharing = Core.GetService(ServiceIDs.Share) as ShareService; if (user == 0) { Text = "Send File to Room"; } else { Text = "Send File to " + Core.GetName(user); } Sharing.Local.Files.LockReading(() => { foreach (SharedFile share in Sharing.Local.Files) { if (share.Hash != null) // processed { RecentCombo.Items.Add(share); } } }); if (RecentCombo.Items.Count > 0) { RecentCombo.SelectedIndex = 0; } }
public ChatView(CoreUI ui, ChatService chat, uint project) { InitializeComponent(); UI = ui; Chat = chat; ProjectID = project; Chat.Refresh += new RefreshHandler(Chat_Refresh); GuiUtils.SetupToolstrip(toolStrip1, new OpusColorTable()); GuiUtils.FixMonoDropDownOpening(RoomsButton, RoomsButton_DropDownOpening); RoomsButton.Visible = true; RoomSeparator.Visible = true; LocalButton.Visible = (Chat.Core.Trust != null); LiveButton.Visible = (Chat.Core.Trust != null); CustomButton.Visible = false; JoinButton.Visible = false; LeaveButton.Visible = false; InviteButton.Visible = false; }
public IMUI(CoreUI ui, OpService service) { UI = ui; IM = service as IMService; IM.CreateView += IM_CreateView; }
public void Init(CoreUI ui, BuddyService buddies, StatusPanel status, bool interactive) { UI = ui; Buddies = buddies; Core = buddies.Core; Locations = Core.Locations; Interactive = interactive; SelectionInfo = status; Buddies.GuiUpdate += new BuddyGuiUpdateHandler(Buddy_Update); Locations.GuiUpdate += new LocationGuiUpdateHandler(Location_Update); MouseClick += new MouseEventHandler(BuddyList_MouseClick); MouseDoubleClick += new MouseEventHandler(BuddyList_MouseDoubleClick); MouseDown += new MouseEventHandler(BuddyView_MouseDown); MouseMove += new MouseEventHandler(BuddyView_MouseMove); MouseUp += new MouseEventHandler(BuddyView_MouseUp); DragOver += new DragEventHandler(BuddyView_DragOver); DragDrop += new DragEventHandler(BuddyView_DragDrop); Columns.Add("", 100, System.Windows.Forms.HorizontalAlignment.Left, ColumnScaleStyle.Spring); SmallImageList = new List <Image>(); // itit here, cause main can re-init SmallImageList.Add(new Bitmap(16, 16)); SmallImageList.Add(BuddyRes.away); SmallImageList.Add(BuddyRes.blocked); SelectedIndexChanged += new EventHandler(BuddyView_SelectedIndexChanged); RefreshView(); }
public IMForm(CoreUI ui) : base(ui.Core) { InitializeComponent(); UI = ui; Core = ui.Core; GuiUtils.SetupToolstrip(TopStrip, new OpusColorTable()); GuiUtils.FixMonoDropDownOpening(OptionsButton, OptionsButton_DropDownOpening); UI.ShowView += ShowExternal; Text = "IM - " + Core.GetName(Core.UserID); BuddyList.Init(UI, Core.Buddies, SelectionInfo, true); IM = UI.GetService(ServiceIDs.IM) as IMUI; SelectionInfo.Init(UI); SelectionInfo.ShowNetwork(); if (GuiUtils.IsRunningOnMono()) { AddButton.Text = "Add"; SharedButton.Text = "Files"; } Rectangle screen = Screen.GetWorkingArea(this); Location = new Point(screen.Width - Width, screen.Height / 2 - Height / 2); ShowExternal(new Info.InfoView(Core, false, true)); }
public ScheduleView(CoreUI ui, PlanService plans, ulong id, uint project) { InitializeComponent(); UI = ui; Core = ui.Core; Plans = plans; Trust = Core.Trust; UserID = id; ProjectID = project; StartTime = Core.TimeNow; EndTime = Core.TimeNow.AddMonths(3); GuiUtils.SetupToolstrip(TopStrip, new OpusColorTable()); MainSplit.Panel2Collapsed = true; Core.KeepDataGui += new KeepDataHandler(Core_KeepData); PlanStructure.NodeExpanding += new EventHandler(PlanStructure_NodeExpanding); PlanStructure.NodeCollapsed += new EventHandler(PlanStructure_NodeCollapsed); // set last block so that setdetails shows correctly LastBlock = new PlanBlock(); SetDetails(null); }
private void Awake() { drawController.LineIsReady += DrawController_LineIsReady; mainCamera.CameraDidMoveToFigure += MainCamera_CameraDidMoveToFigure; coreUI = GetComponent <CoreUI>(); }
public BoardView(CoreUI ui, BoardService boards, ulong id, uint project) { InitializeComponent(); UI = ui; Core = boards.Core; Boards = boards; Trust = Core.Trust; UserID = id; ProjectID = project; if (UserID != Core.UserID) { PostButton.Visible = false; RightSplitter.Visible = false; ArchiveButton.Visible = false; } GuiUtils.SetupToolstrip(toolStrip1, new OpusColorTable()); PostHeader.DocumentText = HeaderPage.ToString(); PostView.SmallImageList = new List <Image>(); PostView.SmallImageList.Add(BoardRes.post); PostView.SmallImageList.Add(BoardRes.higher); PostView.SmallImageList.Add(BoardRes.lower); PostView.OverlayImages.Add(BoardRes.high_scope); PostView.OverlayImages.Add(BoardRes.low_scope); PostBody.Core = Core; }
public AddUsersDialog(CoreUI ui, uint project) : base(ui.Core) { InitializeComponent(); UI = ui; Core = ui.Core; ProjectID = project; // load up trust if(Core.Trust != null) LoadTrustTree(); // load up buddies - last option BuddyList.FirstLineBlank = false; BuddyList.Init(ui, Core.Buddies, null, false); ProjectCombo.Items.Add(new AddProjectItem("Buddies")); if (Core.Trust != null) { foreach (AddProjectItem item in ProjectCombo.Items) if (item.ID == ProjectID) { ProjectCombo.SelectedItem = item; break; // break before buddies is selected } } else ProjectCombo.SelectedIndex = 0; // buddy list }
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); }
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 StorageUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Storage = service as StorageService; Storage.Disposing += Storage_Disposing; }
public MailUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Mail = service as MailService; Mail.ShowCompose += Mail_ShowCompose; }
public StorageUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Storage = service as StorageService; Storage.Disposing += Storage_Disposing; }
public ChatUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Chat = service as ChatService; Chat.NewInvite += Chat_NewInvite; }
public ChatUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Chat = service as ChatService; Chat.NewInvite += Chat_NewInvite; }
public ListInstanceItem(OpCore core) { Core = core; UI = new CoreUI(core); Instance = core.Sim; Core.Exited += Core_Exited; Refresh(); }
public InternalsForm(CoreUI ui) { // // Required for Windows Form Designer support // InitializeComponent(); UI = ui; Core = ui.Core; Boards = Core.GetService(ServiceIDs.Board) as BoardService; Mail = Core.GetService(ServiceIDs.Mail) as MailService; Profiles = Core.GetService(ServiceIDs.Profile) as ProfileService; Text = "Internals (" + Core.Network.GetLabel() + ")"; treeStructure.Nodes.Add( new StructureNode("", new ShowDelegate(ShowNone), null)); // core // identity // networks (global/operation) // cache // logs // routing // search // store // tcp // Components // Link // Location // ... // rudp // sessions[] // core StructureNode coreNode = new StructureNode("Core", new ShowDelegate(ShowCore), null); // identity coreNode.Nodes.Add( new StructureNode(".Identity", new ShowDelegate(ShowIdentity), null)); // networks if(Core.Context.Lookup != null) LoadNetwork(coreNode.Nodes, "Lookup", Core.Context.Lookup.Network); LoadNetwork(coreNode.Nodes, "Organization", Core.Network); // components StructureNode componentsNode = new StructureNode("Components", new ShowDelegate(ShowNone), null); LoadComponents(componentsNode); coreNode.Nodes.Add(componentsNode); treeStructure.Nodes.Add(coreNode); coreNode.Expand(); }
public MainForm(CoreUI ui, bool sideMode) : base(ui.Core) { InitializeComponent(); UI = ui; Core = ui.Core; Trust = Core.Trust; UI.ShowView += ShowView; Core.NewsUpdate += new NewsUpdateHandler(Core_NewsUpdate); Core.KeepDataGui += new KeepDataHandler(Core_KeepData); Trust.GuiUpdate += new LinkGuiUpdateHandler(Trust_Update); CommandTree.SelectedLink = Core.UserID; CommandTree.SearchOnline = true; GuiUtils.SetupToolstrip(TopToolStrip, new OpusColorTable()); GuiUtils.SetupToolstrip(NavStrip, new NavColorTable()); GuiUtils.SetupToolstrip(SideToolStrip, new OpusColorTable()); GuiUtils.SetupToolstrip(SideNavStrip, new NavColorTable()); GuiUtils.FixMonoDropDownOpening(SideViewsButton, SideViewsButton_DropDownOpening); GuiUtils.FixMonoDropDownOpening(SideNewsButton, SideNewsButton_DropDownOpening); GuiUtils.FixMonoDropDownOpening(NewsButton, NewsButton_DropDownOpening); GuiUtils.FixMonoDropDownOpening(ProjectsButton, ProjectsButton_DropDownOpening); if (GuiUtils.IsRunningOnMono()) { foreach (ToolStripItem item in SideToolStrip.Items) { //item.DisplayStyle = ToolStripItemDisplayStyle.Text; //item.TextDirection = ToolStripTextDirection.Horizontal; //item.Alignment = ToolStripItemAlignment.Left; } NetworkButton.Text = "Network"; SideButton.Text = "Sidebar"; LockButton.Text = "Lockdown"; NewsButton.ForeColor = Color.White; PopoutButton.ForeColor = Color.White; SideViewsButton.ForeColor = Color.White; SideNewsButton.ForeColor = Color.White; SideHelpButton.ForeColor = Color.White; } SideNavStrip.Visible = sideMode; SideMode = sideMode; }
private void Click_Console(object sender, EventArgs e) { foreach (ListInstanceItem item in ListInstances.SelectedItems) { CoreUI ui = item.UI; if (ui.GuiConsole == null) { ui.GuiConsole = new ConsoleForm(ui); } ui.GuiConsole.Show(); ui.GuiConsole.Activate(); } }
public ComposeMail(CoreUI ui, MailService mail, ulong id) { InitializeComponent(); UI = ui; Mail = mail; Core = mail.Core; DefaultID = id; if (id != 0) { ToTextBox.Text = Core.GetName(id); ToIDs.Add(id); } }
public ComposeMail(CoreUI ui, MailService mail, ulong id) { InitializeComponent(); UI = ui; Mail = mail; Core = mail.Core; DefaultID = id; if (id != 0) { ToTextBox.Text = Core.GetName(id); ToIDs.Add(id); } }
public InviteForm(CoreUI ui, ChatService chat, ulong user, ChatRoom room) { InitializeComponent(); UI = ui; Core = ui.Core; Chat = chat; Room = room; IntroLabel.Text = IntroLabel.Text.Replace("<name>", Core.GetName(user)); NameLabel.Text = room.Title; TypeLabel.Text = room.Kind.ToString(); }
public InviteForm(CoreUI ui, ChatService chat, ulong user, ChatRoom room) { InitializeComponent(); UI = ui; Core = ui.Core; Chat = chat; Room = room; IntroLabel.Text = IntroLabel.Text.Replace("<name>", Core.GetName(user)); NameLabel.Text = room.Title; TypeLabel.Text = room.Kind.ToString(); }
public IgnoreForm(CoreUI ui) { InitializeComponent(); UI = ui; Core = ui.Core; Core.Buddies.IgnoreList.LockReading(() => { foreach (OpBuddy ignore in Core.Buddies.IgnoreList.Values) { IgnoreList.Items.Add(new IgnoreItem(Core, ignore.ID)); InList.Add(ignore.ID); } }); }
public IgnoreForm(CoreUI ui) { InitializeComponent(); UI = ui; Core = ui.Core; Core.Buddies.IgnoreList.LockReading(() => { foreach (OpBuddy ignore in Core.Buddies.IgnoreList.Values) { IgnoreList.Items.Add(new IgnoreItem(Core, ignore.ID)); InList.Add(ignore.ID); } }); }
public GoalsView(CoreUI ui, PlanService plans, ulong id, uint project) { InitializeComponent(); UI = ui; Core = ui.Core; Plans = plans; Trust = Core.Trust; UserID = id; ProjectID = project; GuiUtils.SetupToolstrip(toolStrip1, new OpusColorTable()); GuiUtils.FixMonoDropDownOpening(SelectGoalButton, SelectGoal_DropDownOpening); splitContainer1.Panel2Collapsed = true; SetDetails(null, null); }
public TrayLock(CoreUI ui, bool sideMode) { UI = ui; Core = ui.Core; PreserveSideMode = sideMode; Profile_IconUpdate(); Tray.Text = Core.User.GetTitle(); Tray.Visible = true; Tray.DoubleClick += new EventHandler(Tray_DoubleClick); Core.User.GuiIconUpdate += Profile_IconUpdate; ContextMenuStripEx menu = new ContextMenuStripEx(); menu.Items.Add("Restore", null, new EventHandler(Menu_Restore)); menu.Items.Add("Exit", null, new EventHandler(Menu_Exit)); Tray.ContextMenuStrip = menu; }
public ConsoleForm(CoreUI ui) { // // Required for Windows Form Designer support // InitializeComponent(); UI = ui; Core = ui.Core; if (Core.User == null) { Text = "Lookup Console (" + Core.LocalIP.ToString() + ")"; } else { Text = "Console (" + Core.User.Settings.UserName + ")"; } RefreshLog(); }
public TrayLock(CoreUI ui, bool sideMode) { UI = ui; Core = ui.Core; PreserveSideMode = sideMode; Profile_IconUpdate(); Tray.Text = Core.User.GetTitle(); Tray.Visible = true; Tray.DoubleClick += new EventHandler(Tray_DoubleClick); Core.User.GuiIconUpdate += Profile_IconUpdate; ContextMenuStripEx menu = new ContextMenuStripEx(); menu.Items.Add("Restore", null, new EventHandler(Menu_Restore)); menu.Items.Add("Exit", null, new EventHandler(Menu_Exit)); Tray.ContextMenuStrip = menu; }
public AddUsersDialog(CoreUI ui, uint project) : base(ui.Core) { InitializeComponent(); UI = ui; Core = ui.Core; ProjectID = project; // load up trust if (Core.Trust != null) { LoadTrustTree(); } // load up buddies - last option BuddyList.FirstLineBlank = false; BuddyList.Init(ui, Core.Buddies, null, false); ProjectCombo.Items.Add(new AddProjectItem("Buddies")); if (Core.Trust != null) { foreach (AddProjectItem item in ProjectCombo.Items) { if (item.ID == ProjectID) { ProjectCombo.SelectedItem = item; break; // break before buddies is selected } } } else { ProjectCombo.SelectedIndex = 0; // buddy list } }
public IMForm(CoreUI ui) : base(ui.Core) { InitializeComponent(); UI = ui; Core = ui.Core; GuiUtils.SetupToolstrip(TopStrip, new OpusColorTable()); GuiUtils.FixMonoDropDownOpening(OptionsButton, OptionsButton_DropDownOpening); UI.ShowView += ShowExternal; Text = "IM - " + Core.GetName(Core.UserID); BuddyList.Init(UI, Core.Buddies, SelectionInfo, true); IM = UI.GetService(ServiceIDs.IM) as IMUI; SelectionInfo.Init(UI); SelectionInfo.ShowNetwork(); if (GuiUtils.IsRunningOnMono()) { AddButton.Text = "Add"; SharedButton.Text = "Files"; } Rectangle screen = Screen.GetWorkingArea(this); Location = new Point(screen.Width - Width, screen.Height / 2 - Height / 2); ShowExternal(new Info.InfoView(Core, false, true)); }
public void Init(CoreUI ui, BuddyService buddies, StatusPanel status, bool interactive) { UI = ui; Buddies = buddies; Core = buddies.Core; Locations = Core.Locations; Interactive = interactive; SelectionInfo = status; Buddies.GuiUpdate += new BuddyGuiUpdateHandler(Buddy_Update); Locations.GuiUpdate += new LocationGuiUpdateHandler(Location_Update); MouseClick += new MouseEventHandler(BuddyList_MouseClick); MouseDoubleClick += new MouseEventHandler(BuddyList_MouseDoubleClick); MouseDown += new MouseEventHandler(BuddyView_MouseDown); MouseMove += new MouseEventHandler(BuddyView_MouseMove); MouseUp += new MouseEventHandler(BuddyView_MouseUp); DragOver += new DragEventHandler(BuddyView_DragOver); DragDrop += new DragEventHandler(BuddyView_DragDrop); Columns.Add("", 100, System.Windows.Forms.HorizontalAlignment.Left, ColumnScaleStyle.Spring); SmallImageList = new List<Image>(); // itit here, cause main can re-init SmallImageList.Add(new Bitmap(16, 16)); SmallImageList.Add(BuddyRes.away); SmallImageList.Add(BuddyRes.blocked); SelectedIndexChanged += new EventHandler(BuddyView_SelectedIndexChanged); RefreshView(); }
public PlanUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Plan = service as PlanService; }
public ShareUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Share = service as ShareService; }
public ShareUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Share = service as ShareService; }
public static void Show(CoreUI ui) { if (ui.GuiInternal == null) ui.GuiInternal = new InternalsForm(ui); ui.GuiInternal.Show(); ui.GuiInternal.Activate(); }
public BuddyUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Buddies = service as BuddyService; }
public BoardUI(CoreUI ui, OpService board) { UI = ui; Board = board as BoardService; }
public frmBugReporter(CoreUI ui) { mUI = ui; InitializeComponent(); }
public StorageView(CoreUI ui, StorageService storages, ulong id, uint project) { InitializeComponent(); UI = ui; Core = ui.Core; Storages = storages; Trust = Core.Trust; UserID = id; ProjectID = project; splitContainer1.Height = Height - toolStrip1.Height; if (UserID == Core.UserID) if (Storages.Working.ContainsKey(ProjectID)) { Working = Storages.Working[ProjectID]; IsLocal = true; } MenuAdd = new ToolStripMenuItem("Add to Files", StorageRes.Add, FileView_Add); MenuLock = new ToolStripMenuItem("Lock", StorageRes.Locked, FileView_Lock); MenuUnlock = new ToolStripMenuItem("Unlock", StorageRes.Unlocked, FileView_Unlock); MenuRestore = new ToolStripMenuItem("Restore", null, FileView_Restore); MenuDelete = new ToolStripMenuItem("Delete", StorageRes.Reject, FileView_Delete); MenuDetails = new ToolStripMenuItem("Details", StorageRes.details, FileView_Details); GuiUtils.SetupToolstrip(toolStrip1, new OpusColorTable()); RescanLabel.Text = ""; StatusLabel.Text = ""; }
public frmBugReporter(CoreUI ui) { mUI = ui; InitializeComponent(); }
public ProfileUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Profile = service as ProfileService; }
public BuddyUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Buddies = service as BuddyService; }
public TrustUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Trust = service as TrustService; }
public ScheduleView(CoreUI ui, PlanService plans, ulong id, uint project) { InitializeComponent(); UI = ui; Core = ui.Core; Plans = plans; Trust = Core.Trust; UserID = id; ProjectID = project; StartTime = Core.TimeNow; EndTime = Core.TimeNow.AddMonths(3); GuiUtils.SetupToolstrip(TopStrip, new OpusColorTable()); MainSplit.Panel2Collapsed = true; Core.KeepDataGui += new KeepDataHandler(Core_KeepData); PlanStructure.NodeExpanding += new EventHandler(PlanStructure_NodeExpanding); PlanStructure.NodeCollapsed += new EventHandler(PlanStructure_NodeCollapsed); // set last block so that setdetails shows correctly LastBlock = new PlanBlock(); SetDetails(null); }
public static void FillManageMenu(CoreUI ui, ToolStripItemCollection items) { OpCore core = ui.Core; items.Add(new ManageItem("My Identity", BuddyRes.buddy_who, () => new IdentityForm(core, core.UserID).Show(ui.GuiMain))); // invite if(!core.User.Settings.GlobalIM) items.Add(new ManageItem("Invite", ChatRes.invite, delegate() { if (core.User.Settings.OpAccess == AccessType.Public) MessageBox.Show("Give out this link to invite others \r\n \r\n deops://" + core.User.Settings.Operation, "DeOps"); else new InviteForm(core).Show(ui.GuiMain); })); // settings ToolStripMenuItem settings = new ToolStripMenuItem("Settings", InterfaceRes.settings); settings.DropDownItems.Add(new ManageItem("User", null, () => new DeOps.Interface.Settings.User(core).Show(ui.GuiMain))); if(!core.User.Settings.GlobalIM) settings.DropDownItems.Add(new ManageItem("Organization", null, () => new DeOps.Interface.Settings.Operation(core).Show(ui.GuiMain))); settings.DropDownItems.Add(new ManageItem("Connection", null, () => new DeOps.Interface.Settings.Connection(core).Show(ui.GuiMain))); settings.DropDownItems.Add(new ManageItem("Ignore", null, () => new DeOps.Interface.Settings.IgnoreForm(ui).Show(ui.GuiMain))); items.Add(settings); // tools ToolStripMenuItem tools = new ToolStripMenuItem("Tools", InterfaceRes.tools); tools.DropDownItems.Add(new ManageItem("Bandwidth", null, () => BandwidthForm.Show(core.Context))); if (core.DebugWindowsActive) { tools.DropDownItems.Add(new ManageItem("Crawler", null, () => CrawlerForm.Show(core.Network))); // global - crawler/graph/packets/search if (core.Context.Lookup != null) { ToolStripMenuItem global = new ToolStripMenuItem("Lookup", null); DhtNetwork globalNetwork = core.Context.Lookup.Network; global.DropDownItems.Add(new ManageItem("Crawler", null, () => CrawlerForm.Show(globalNetwork))); global.DropDownItems.Add(new ManageItem("Graph", null, () => GraphForm.Show(globalNetwork))); global.DropDownItems.Add(new ManageItem("Packets", null, () => PacketsForm.Show(globalNetwork))); global.DropDownItems.Add(new ManageItem("Search", null, () => SearchForm.Show(globalNetwork))); tools.DropDownItems.Add(global); } tools.DropDownItems.Add(new ManageItem("Graph", null, () => GraphForm.Show(core.Network))); tools.DropDownItems.Add(new ManageItem("Internals", null, () => InternalsForm.Show(ui))); tools.DropDownItems.Add(new ManageItem("Packets", null, () => PacketsForm.Show(core.Network))); tools.DropDownItems.Add(new ManageItem("Search", null, () => SearchForm.Show(core.Network))); } tools.DropDownItems.Add(new ManageItem("Transfers", null, () => TransferView.Show(core.Network))); items.Add(tools); // split items.Add(new ToolStripSeparator()); // main options items.Add(new ManageItem("Sign On", IMRes.greenled, delegate() { core.Context.RaiseLogin(null); })); items.Add(new ManageItem("Sign Off", IMRes.redled, delegate() { core.Context.RaiseLogin(null); ui.GuiMain.Close(); })); }
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(); }