protected void OnButtonClick(object sender, EventArgs args) { GroupPanel panel = new GroupPanel(); panel.Tree.GroupService = this.GroupService; if (this.GroupService == null) { return; } Kernel.Domain.BGroup root = this.GroupService.getRootGroup(subjectType); panel.Tree.subjectType = subjectType; panel.Tree.DisplayRoot(root); if (this.goup != null) { panel.Tree.SetSelectedGroup(this.goup.name); } Dialog dialog = new Dialog("Groups", panel); dialog.Height = 200; dialog.Width = 300; if (dialog.ShowCenteredToMouse().Value) { Kernel.Domain.BGroup g = panel.Tree.GetSelectedGroup(); if (g != null) { g = GroupService.getByOid(g.oid.Value); this.Group = g; if (Changed != null) { Changed(); } } } }
public void initializeGroup(Service <Misp.Kernel.Domain.TransformationTree, BrowserData> Service) { this.Service = Service; Kernel.Domain.BGroup rootGroup = this.Service.GroupService.getRootGroup(Service.SubjectTypeFound()); GroupTreeview.GroupTreeview.DisplayRoot(rootGroup); GroupTreeview.GroupTreeview.SelectionChanged += OnGroupSelected; }
/// <summary> /// Initialisation des donnée sur la SideBar. /// </summary> protected override void initializeSideBarData() { if (this.SideBar != null && this.Service != null && this.Service.GroupService != null) { Kernel.Domain.BGroup rootGroup = this.Service.GroupService.getRootGroup(SubjectTypeFound()); ((BrowserSideBar)SideBar).GroupGroup.GroupTreeview.DisplayRoot(rootGroup); } }
private void OnGroupSelected(object newSelection) { if (newSelection == null) { return; } Kernel.Domain.BGroup group = (Kernel.Domain.BGroup)newSelection; Search(group); //if (group.oid == null || !group.oid.HasValue) Search(); //else FilterByGroup(group.oid.Value); }
/// <summary> /// /// </summary> /// <param name="root"></param> public void DisplayRoot(Kernel.Domain.BGroup root) { if (root == null) { this.GroupTree.ItemsSource = null; } else { RefreshParent(root); root.name = "All Groups"; List <BGroup> groups = new List <BGroup>(0); groups.Add(root); this.GroupTree.ItemsSource = groups; root.IsExpanded = true; } }
private void OnGroupSelected(object newSelection) { if (newSelection == null) { return; } Kernel.Domain.BGroup group = (Kernel.Domain.BGroup)newSelection; if (group.oid == null || !group.oid.HasValue) { DisplayDatas(this.Service); } else { DisplayDatas(Service, group.oid.Value); } }
public void initializeGroup(Service <Misp.Kernel.Domain.Persistent, BrowserData> Service) { if (Service is AllocationService) { this.Service = (AllocationService)Service; } if (Service is ClearAllocationService) { this.Service = (ClearAllocationService)Service; } SubjectType subjectType = SubjectType.INPUT_TABLE; Kernel.Domain.BGroup rootGroup = this.Service.GroupService.getRootGroup(subjectType); GroupTreeview.GroupTreeview.DisplayRoot(rootGroup); GroupTreeview.GroupTreeview.SelectionChanged += OnGroupSelected; }