Пример #1
0
        private void RenderFilesCallback(TreeNodeCollection nodes)
        {
            if (IsDisposed)
            {
                return;
            }

            if (InvokeRequired)
            {
                Invoke(new Action <TreeNodeCollection>(RenderFilesCallback), nodes);
                return;
            }

            var stopWatch = new Stopwatch(MethodBase.GetCurrentMethod().Name);

            try
            {
                tvFiles.BeginUpdate();
                try
                {
                    tvFiles.Nodes.Clear();
                    TreeViewService.AddRange(nodes, tvFiles.Nodes);
                }
                finally
                {
                    tvFiles.EndUpdate();
                }
            }
            finally
            {
                stopWatch.Stop();
            }
        }
Пример #2
0
 /// <summary>
 /// Takes a copy of the Nodes in the TreeView and prepares them for display using a background thread
 /// </summary>
 public void BuildFileTreeView(Action <TreeNodeCollection> callback, bool showStatics)
 {
     TreeViewService.BuildTreeView(new BuildFileTreeViewArgs()
     {
         RunInBackgroundThread = true, ShowStatics = showStatics, Callback = callback
     });
 }
Пример #3
0
 private void RenderFiles()
 {
     TreeViewService.BuildTreeView(new BuildFileTreeViewArgs()
     {
         Callback = RenderFilesCallback
     });
 }
        public TreeViewSampleWpf()
        {
            InitializeComponent();
            DataContext = this;

            var root = ItemGenerator.GetTree();

            AddItem(treeView1.Items, root);
            AddItem(treeView2.Items, root);

            options = new OptionList();
            options.AddOption("Enabled", treeView1, treeView2, l => l.IsEnabled);
            options.Add(new GenericBoolOption(
                            "FullRowSelect",
                            () => TreeViewService.GetFullRowSelect(treeView1),
                            v => {
                TreeViewService.SetFullRowSelect(treeView1, v);
                TreeViewService.SetFullRowSelect(treeView2, v);
            }));
            options.Add(new GenericIntOption(
                            "ItemHeight",
                            () => itemHeight,
                            v => {
                itemHeight = v;
                SetItemHeight(treeView1.Items, itemHeight > 0 ? (double?)itemHeight : null);
                SetItemHeight(treeView2.Items, itemHeight > 0 ? (double?)itemHeight : null);
            }));
        }
 private void RenderFiles()
 {
     TreeViewService.BuildTreeView(new BuildFileTreeViewArgs()
     {
         Callback = RenderFilesCallback, Grouping = CRUDUIService.GetEnumValue <FileTreeViewGroupEnum>(cbGrouping)
     });
 }
Пример #6
0
 public UnitController(OrganizationService organizationService, SystemService systemService, TreeViewService treeViewService,
                       AuditLogService auditLog, IMapper mapper, ILogger <UnitController> logger)
 {
     _organizationService = organizationService;
     _systemService       = systemService;
     _treeViewService     = treeViewService;
     _auditLog            = auditLog;
     _mapper = mapper;
     _logger = logger;
 }
Пример #7
0
 public AbstractEditRequestController(UserService userService, FormService formService, RequestService requestService, SystemService systemService,
                                      OrganizationService orgnizationService, IAuthorizationService authService, TreeViewService treeViewService, ILogger logger)
 {
     _userService         = userService;
     _formService         = formService;
     _requestService      = requestService;
     _systemService       = systemService;
     _organizationService = orgnizationService;
     _authService         = authService;
     _treeViewService     = treeViewService;
     _logger = logger;
 }
        private void RenderFilesCallback(TreeNodeCollection nodes)
        {
            if (IsDisposed)
            {
                return;
            }

            if (InvokeRequired)
            {
                Invoke(new Action <TreeNodeCollection>(RenderFilesCallback), nodes);
                return;
            }

            var stopWatch = new Stopwatch(MethodBase.GetCurrentMethod().Name);

            try
            {
                tvFiles.BeginUpdate();
                tvFiles.SuspendLayout();
                _skipAfterCheck = true;
                try
                {
                    tvFiles.Nodes.Clear();
                    TreeViewService.AddRange(nodes, tvFiles.Nodes);
                    foreach (TreeNode node in tvFiles.Nodes)
                    {
                        CheckSelected(node);
                        ExpandSelected(node);
                    }
                }
                finally
                {
                    _skipAfterCheck = false;
                    tvFiles.ResumeLayout();
                    tvFiles.EndUpdate();
                }
            }
            finally
            {
                stopWatch.Stop();
            }
        }
Пример #9
0
        private void RenderTreeViewCallback(TreeNodeCollection nodes)
        {
            if (IsDisposed)
            {
                return;
            }

            if (InvokeRequired)
            {
                Invoke(new Action <TreeNodeCollection>(RenderTreeViewCallback), nodes);
                return;
            }

            var stopWatch = new Stopwatch(MethodBase.GetCurrentMethod().Name);

            try
            {
                tvFiles.BeginUpdate();
                try
                {
                    tvFiles.Nodes.Clear();
                    TreeViewService.AddRange(nodes, tvFiles.Nodes);
                    tsslTotalFiles.Text = string.Format("Total Files {0} ", Model.Files.Count);
                }
                finally
                {
                    tvFiles.EndUpdate();
                    StatusPanel.StatusUpdate(StatusModel.Completed);
                    StatusPanel.SP_DisplayRemainingTime = true;
                }
            }
            finally
            {
                stopWatch.Stop();
                StatusUpdate(StatusModel.Completed);
                StatusPanel.SP_DisplayRemainingTime = true;
                StatusPanel.SP_FullScreen           = true;
            }
        }
 public LeavingProbationRequestController(UserService userService, FormService formService, RequestService requestService,
                                          SystemService systemService, OrganizationService orgnizationService, IAuthorizationService authService,
                                          TreeViewService treeViewService, ILogger <LeavingProbationRequestController> logger)
     : base(userService, formService, requestService, systemService, orgnizationService, authService, treeViewService, logger)
 {
 }
 public PortfolioAssignmentRequestController(UserService userService, FormService formService, RequestService requestService,
                                             SystemService systemService, OrganizationService orgnizationService, IAuthorizationService authService,
                                             TreeViewService treeViewService, ILogger <PortfolioAssignmentRequestController> logger)
     : base(userService, formService, requestService, systemService, orgnizationService, authService, treeViewService, logger)
 {
 }