示例#1
0
文件: PlanUI.cs 项目: nandub/DeOps
        void Menu_ScheduleView(object sender, EventArgs args)
        {
            IViewParams node = sender as IViewParams;

            if (node == null)
            {
                return;
            }

            var view = new ScheduleView(UI, Plan, node.GetUser(), node.GetProject());

            UI.ShowView(view, node.IsExternal());
        }
示例#2
0
文件: MailUI.cs 项目: nandub/DeOps
        void Menu_View(object sender, EventArgs args)
        {
            IViewParams node = sender as IViewParams;

            if (node == null)
            {
                return;
            }

            if (node.GetUser() != Core.UserID)
            {
                return;
            }

            var view = new MailView(this);

            UI.ShowView(view, node.IsExternal());
        }
示例#3
0
文件: StorageUI.cs 项目: nandub/DeOps
        public void Menu_View(object sender, EventArgs args)
        {
            var node = sender as IViewParams;

            if (node == null)
            {
                return;
            }

            var view = new StorageView(UI, Storage, node.GetUser(), node.GetProject());

            UI.ShowView(view, node.IsExternal());
        }
示例#4
0
        private void JoinButton_Click(object sender, EventArgs e)
        {
            Chat.JoinRoom(Room);

            // show the user the transfer starting
            if (UI.GuiMain is MainForm && !((MainForm)UI.GuiMain).SideMode)
            {
                UI.ShowView(new ChatView(UI, Chat, 0)
                {
                    Custom = Room
                }, false);
            }

            else
            {
                ExternalView view = UI.GuiMain.FindViewType(typeof(ChatView));

                if (view == null)
                {
                    UI.ShowView(new ChatView(UI, Chat, 0)
                    {
                        Custom = Room
                    }, true);
                }

                else
                {
                    ((ChatView)view.Shell).SetCustomRoom(Room);

                    view.WindowState = FormWindowState.Normal;
                    view.Activate();
                }
            }

            Close();
        }
示例#5
0
文件: ShareUI.cs 项目: nandub/DeOps
        public void Menu_View(object sender, EventArgs args)
        {
            var node = sender as IViewParams;

            if (node == null)
            {
                return;
            }

            var view = new SharingView(Core, node.GetUser());

            UI.ShowView(view, node.IsExternal());

            Share.GetPublicList(node.GetUser());
        }
示例#6
0
        private void SendButton_Click(object sender, EventArgs e)
        {
            if (BrowseLink.Enabled)
            {
                if (File.Exists(BrowseLink.Text))
                {
                    Sharing.SendFile(BrowseLink.Text, FileProcessed);
                }

                else
                {
                    MessageBox.Show("No File Selected");
                    return;
                }
            }

            else if (RecentRadio.Checked)
            {
                SharedFile file = RecentCombo.SelectedItem as SharedFile;

                if (file != null)
                {
                    if (FileProcessed != null)
                    {
                        Core.RunInCoreAsync(() => FileProcessed.Param1.Invoke(file, FileProcessed.Param2));
                    }
                }
                else
                {
                    MessageBox.Show("No File Selected");
                    return;
                }
            }

            // show if processing otherwise, request immediately sent
            if (BrowseLink.Enabled)
            {
                if (!UI.GuiMain.ShowExistingView(typeof(SharingView)))
                {
                    UI.ShowView(new SharingView(Core, Core.UserID), true);
                }
            }


            DialogResult = DialogResult.OK;
            Close();
        }
示例#7
0
        void Menu_View(object sender, EventArgs args)
        {
            IViewParams node = sender as IViewParams;

            if (node == null)
            {
                return;
            }

            if (node.GetUser() != Core.UserID)
            {
                return;
            }

            // gui creates viewshell, component just passes view object
            var view = new ChatView(UI, Chat, node.GetProject());

            UI.ShowView(view, node.IsExternal());
        }
示例#8
0
文件: ProfileUI.cs 项目: nandub/DeOps
        public void Menu_View(object sender, EventArgs args)
        {
            IViewParams node = sender as IViewParams;

            if (node == null)
            {
                return;
            }

            ulong key = node.GetUser();

            if (Profile.Network.Responsive)
            {
                Profile.Research(key);
            }

            // gui creates viewshell, component just passes view object
            var view = new ProfileView(Profile, key, node.GetProject());

            UI.ShowView(view, node.IsExternal());
        }
示例#9
0
        private void PostButton_Click(object sender, EventArgs e)
        {
            PostMessage post = new PostMessage(Boards, UserID, ProjectID);

            UI.ShowView(post, true);
        }
示例#10
0
        public void IM_CreateView(ulong userID)
        {
            var view = new IM_View(UI, IM, userID);

            UI.ShowView(view, true);
        }