/// <summary>
        /// Creates the agent.
        /// </summary>
        /// <returns></returns>
        private IWorkspaceBrowserAgent CreateAgent()
        {
            // var agt = WorkspaceBrowserAgentFactory.CreateAgent(WorkspaceBrowserAgentFactory.Key.Mock);
            var agt = WorkspaceBrowserAgentFactory.CreateAgent(WorkspaceBrowserAgentFactory.Key.Instance);

            agt.AddFolderCompleted += (r) => agtOnGetNewFolderCompleted(r.Item);
            return(agt);
        }
Example #2
0
        /// <summary>
        /// Creates the agent.
        /// </summary>
        /// <returns></returns>
        private IWorkspaceBrowserAgent CreateAgent()
        {
            //var agt = WorkspaceBrowserAgentFactory.CreateAgent(WorkspaceBrowserAgentFactory.Key.Mock);
            var agt = WorkspaceBrowserAgentFactory.CreateAgent(WorkspaceBrowserAgentFactory.Key.Instance);

            //agt.OnGetWorkspaceCompleted += AgtOnGetWorkspaceCompleted;
            //agt.OnGetFoldersCompleted += AgtOnGetFoldersCompleted;
            //agt.OnGetFullWorkspaceItemCompleted += AgtOnGetFullWorkspaceItemCompleted;
            //agt.OnGetDescriptionsCompleted += AgtOnGetDescriptionsCompleted;
            //agt.OnGetPropertiesCompleted += AgtOnGetPropertiesCompleted;
            agt.GetWorkspaceItemsBySearchStringCompleted += (r) => AgtOnGetWorkspaceItemsBySearchStringCompleted(r.Items);
            //agt.OnSaveWorkSpaceItemDescCompleted += AgtOnWorkspaceCompleted;

            agt.AddFolderCompleted += (r) => agtOnAddFolderCompleted(r.Item);//agtAddFolderCompleted();

            return(agt);
        }
        /// <summary>
        /// Creates the agent.
        /// </summary>
        /// <returns></returns>
        private IWorkspaceBrowserAgent CreateAgent()
        {
            var agt = WorkspaceBrowserAgentFactory.CreateAgent(Constants.CreateAgentKey.Key);

            if (agt.GetType().Name == LoadMock)
            {
                EventBroker.RaiseLoadText(new LoadWorkspaceItemEventArgs {
                    BlnLoad = true
                });
            }
            //Start
            //need to change in service
            // agt.OnGetWorkspaceCompleted += AgtOnGetWorkspaceCompleted;     //   -- callback event - OnGetWorkspaceCompleted
            //agt.OnGetFoldersCompleted += AgtOnGetFoldersCompleted;            -- callback event - OnGetFoldersCompleted
            //agt.OnGetDescriptionsCompleted += AgtOnGetDescriptionsCompleted;  -- callback event - OnGetDescriptionsCompleted
            //agt.OnGetPropertiesCompleted += AgtOnGetPropertiesCompleted;      -- callback event - OnGetPropertiesCompleted
            EventBroker.DoubleClickListView += EventBrokerDoubleClickListView;
            //End

            return(agt);
        }
Example #4
0
        public WorkspaceBrowserTestFixture()
        {
            Logger = LogManager.GetLogger(GetType());
            Logger.Info("WorkspaceBrowserTestFixture constructor");

            _treeViewFolderTypeId  = ExplorerDomainGenerator.GetEnumerationTypeId(EnumBaseType.TreeViewFolder);
            _treeViewLeafTypeId    = ExplorerDomainGenerator.GetEnumerationTypeId(EnumBaseType.TreeViewLeaf);
            _languageTypeId        = ExplorerDomainGenerator.GetEnumerationTypeId(EnumBaseType.Languages);
            _itemDescriptionTypeId = ExplorerDomainGenerator.GetEnumerationTypeId(EnumBaseType.WorkspaceItemDescription);
            _itemPropertyTypeId    = ExplorerDomainGenerator.GetEnumerationTypeId(EnumBaseType.WorkspaceItemProperty);
            _agent = WorkspaceBrowserAgentFactory.CreateAgent(WorkspaceBrowserAgentFactory.Key.Instance);
            _guids = new Guid[CAmountItemsToRegister];
            for (int i = 0; i < _guids.Length; i++)
            {
                _guids[i] = new Guid(i + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
            }
            _index = 0;
            Logger.InfoFormat("_treeViewFolderTypeId  = '{0}'", _treeViewFolderTypeId);
            Logger.InfoFormat("_treeViewLeafTypeId    = '{0}'", _treeViewLeafTypeId);
            Logger.InfoFormat("_languageTypeId        = '{0}'", _languageTypeId);
            Logger.InfoFormat("_itemDescriptionTypeId = '{0}'", _itemDescriptionTypeId);
        }
        /// <summary>
        /// Creates the agent.
        /// </summary>
        /// <returns></returns>
        private IWorkspaceBrowserAgent CreateAgent()
        {
            // var agt = WorkspaceBrowserAgentFactory.CreateAgent(WorkspaceBrowserAgentFactory.Key.Mock);
            var agt = WorkspaceBrowserAgentFactory.CreateAgent(WorkspaceBrowserAgentFactory.Key.Instance);

            if (agt.GetType().Name == LoadMock)
            {
                EventBroker.RaiseLoadText(new LoadWorkspaceItemEventArgs {
                    blnLoad = true
                });
            }

            agt.GetWorkspaceCompleted += (r) => AgtOnGetWorkspaceCompleted(r.Items);
            agt.GetFoldersCompleted   += (r) => AgtOnGetFoldersCompleted(r.Items);
            //agt.OnGetFullWorkspaceItemCompleted += AgtOnGetFullWorkspaceItemCompleted;
            agt.GetDescriptionsCompleted    += (r) => AgtOnGetDescriptionsCompleted(r.Descriptions);
            agt.GetPropertiesCompleted      += (r) => AgtOnGetPropertiesCompleted(r.Properties);
            EventBroker.DoubleClickListView += EventBrokerDoubleClickListView;
            //agt.OnGetWorkspaceItemsBySearchStringCompleted += AgtOnGetWorkspaceItemsBySearchStringCompleted;
            //agt.OnSaveWorkSpaceItemDescCompleted += AgtOnWorkspaceCompleted;
            //agt.OnGetNewFolderCompleted += agtOnGetNewFolderCompleted;
            agt.RegisterDraggedDataCompleted += (r) => agtOnRegisterDraggedDataCompleted(r.WorkspaceSource, r.WorkspaceTarget);
            return(agt);
        }
Example #6
0
        /// <summary>
        /// Creates the agent.
        /// </summary>
        /// <returns></returns>
        private IWorkspaceBrowserAgent CreateAgent()
        {
            var agt = WorkspaceBrowserAgentFactory.CreateAgent(Constants.CreateAgentKey.Key);

            return(agt);
        }