コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: ChatView.cs プロジェクト: RoelofSol/DeOps
        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;
        }
コード例 #3
0
        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>();
        }
コード例 #4
0
ファイル: IM_View.cs プロジェクト: RoelofSol/DeOps
        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);
        }
コード例 #5
0
        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;
            }
        }
コード例 #6
0
ファイル: ChatView.cs プロジェクト: nandub/DeOps
        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;
        }
コード例 #7
0
        public IMUI(CoreUI ui, OpService service)
        {
            UI = ui;
            IM = service as IMService;

            IM.CreateView += IM_CreateView;
        }
コード例 #8
0
        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();
        }
コード例 #9
0
ファイル: IMForm.cs プロジェクト: RoelofSol/DeOps
        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));
        }
コード例 #10
0
ファイル: ScheduleView.cs プロジェクト: nandub/DeOps
        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);
        }
コード例 #11
0
    private void Awake()
    {
        drawController.LineIsReady       += DrawController_LineIsReady;
        mainCamera.CameraDidMoveToFigure += MainCamera_CameraDidMoveToFigure;

        coreUI = GetComponent <CoreUI>();
    }
コード例 #12
0
        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;
        }
コード例 #13
0
ファイル: AddUsersDialog.cs プロジェクト: RoelofSol/DeOps
        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
        }
コード例 #14
0
        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);
        }
コード例 #15
0
ファイル: StatusPanel.cs プロジェクト: nandub/DeOps
        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();
        }
コード例 #16
0
ファイル: StorageUI.cs プロジェクト: nandub/DeOps
        public StorageUI(CoreUI ui, OpService service)
        {
            UI      = ui;
            Core    = ui.Core;
            Storage = service as StorageService;

            Storage.Disposing += Storage_Disposing;
        }
コード例 #17
0
ファイル: MailUI.cs プロジェクト: nandub/DeOps
        public MailUI(CoreUI ui, OpService service)
        {
            UI   = ui;
            Core = ui.Core;
            Mail = service as MailService;

            Mail.ShowCompose += Mail_ShowCompose;
        }
コード例 #18
0
ファイル: StorageUI.cs プロジェクト: RoelofSol/DeOps
        public StorageUI(CoreUI ui, OpService service)
        {
            UI = ui;
            Core = ui.Core;
            Storage = service as StorageService;

            Storage.Disposing += Storage_Disposing;
        }
コード例 #19
0
ファイル: ChatUI.cs プロジェクト: RoelofSol/DeOps
        public ChatUI(CoreUI ui, OpService service)
        {
            UI = ui;
            Core = ui.Core;
            Chat = service as ChatService;

            Chat.NewInvite += Chat_NewInvite;
        }
コード例 #20
0
        public ChatUI(CoreUI ui, OpService service)
        {
            UI   = ui;
            Core = ui.Core;
            Chat = service as ChatService;

            Chat.NewInvite += Chat_NewInvite;
        }
コード例 #21
0
        public ListInstanceItem(OpCore core)
        {
            Core     = core;
            UI       = new CoreUI(core);
            Instance = core.Sim;

            Core.Exited += Core_Exited;

            Refresh();
        }
コード例 #22
0
ファイル: InternalsForm.cs プロジェクト: RoelofSol/DeOps
        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();
        }
コード例 #23
0
ファイル: MainForm.cs プロジェクト: RoelofSol/DeOps
        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;
        }
コード例 #24
0
        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();
            }
        }
コード例 #25
0
ファイル: ComposeMail.cs プロジェクト: RoelofSol/DeOps
        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);
            }
        }
コード例 #26
0
        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);
            }
        }
コード例 #27
0
ファイル: InviteForm.cs プロジェクト: RoelofSol/DeOps
        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();
        }
コード例 #28
0
        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();
        }
コード例 #29
0
ファイル: IgnoreForm.cs プロジェクト: RoelofSol/DeOps
        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);
                }
            });
        }
コード例 #30
0
ファイル: IgnoreForm.cs プロジェクト: nandub/DeOps
        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);
                }
            });
        }
コード例 #31
0
ファイル: GoalsView.cs プロジェクト: nandub/DeOps
        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);
        }
コード例 #32
0
ファイル: TrayLock.cs プロジェクト: nandub/DeOps
        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;
        }
コード例 #33
0
        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();
        }
コード例 #34
0
ファイル: TrayLock.cs プロジェクト: RoelofSol/DeOps
        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;
        }
コード例 #35
0
ファイル: AddUsersDialog.cs プロジェクト: nandub/DeOps
        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
            }
        }
コード例 #36
0
        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));
        }
コード例 #37
0
ファイル: BuddyView.cs プロジェクト: RoelofSol/DeOps
        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();
        }
コード例 #38
0
ファイル: PlanUI.cs プロジェクト: nandub/DeOps
 public PlanUI(CoreUI ui, OpService service)
 {
     UI   = ui;
     Core = ui.Core;
     Plan = service as PlanService;
 }
コード例 #39
0
ファイル: ShareUI.cs プロジェクト: RoelofSol/DeOps
 public ShareUI(CoreUI ui, OpService service)
 {
     UI = ui;
     Core = ui.Core;
     Share = service as ShareService;
 }
コード例 #40
0
ファイル: ShareUI.cs プロジェクト: nandub/DeOps
 public ShareUI(CoreUI ui, OpService service)
 {
     UI    = ui;
     Core  = ui.Core;
     Share = service as ShareService;
 }
コード例 #41
0
ファイル: InternalsForm.cs プロジェクト: RoelofSol/DeOps
        public static void Show(CoreUI ui)
        {
            if (ui.GuiInternal == null)
                ui.GuiInternal = new InternalsForm(ui);

            ui.GuiInternal.Show();
            ui.GuiInternal.Activate();
        }
コード例 #42
0
ファイル: BuddyUI.cs プロジェクト: nandub/DeOps
 public BuddyUI(CoreUI ui, OpService service)
 {
     UI      = ui;
     Core    = ui.Core;
     Buddies = service as BuddyService;
 }
コード例 #43
0
ファイル: BoardUI.cs プロジェクト: nandub/DeOps
 public BoardUI(CoreUI ui, OpService board)
 {
     UI    = ui;
     Board = board as BoardService;
 }
コード例 #44
0
ファイル: frmBugReporter.cs プロジェクト: typpo/outwar-dca
 public frmBugReporter(CoreUI ui)
 {
     mUI = ui;
     InitializeComponent();
 }
コード例 #45
0
ファイル: StorageView.cs プロジェクト: RoelofSol/DeOps
        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 = "";
        }
コード例 #46
0
ファイル: frmBugReporter.cs プロジェクト: yprovost/outwar-dca
 public frmBugReporter(CoreUI ui)
 {
     mUI = ui;
     InitializeComponent();
 }
コード例 #47
0
ファイル: ProfileUI.cs プロジェクト: RoelofSol/DeOps
 public ProfileUI(CoreUI ui, OpService service)
 {
     UI = ui;
     Core = ui.Core;
     Profile = service as ProfileService;
 }
コード例 #48
0
ファイル: BuddyUI.cs プロジェクト: RoelofSol/DeOps
 public BuddyUI(CoreUI ui, OpService service)
 {
     UI = ui;
     Core = ui.Core;
     Buddies = service as BuddyService;
 }
コード例 #49
0
 public TrustUI(CoreUI ui, OpService service)
 {
     UI    = ui;
     Core  = ui.Core;
     Trust = service as TrustService;
 }
コード例 #50
0
ファイル: ScheduleView.cs プロジェクト: RoelofSol/DeOps
        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);
        }
コード例 #51
0
ファイル: MainForm.cs プロジェクト: RoelofSol/DeOps
        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();
            }));
        }
コード例 #52
0
ファイル: StatusPanel.cs プロジェクト: RoelofSol/DeOps
        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();
        }