public void Initialize(ILogger logger, ICommandController commandController, ITaskController taskController, TaskResultView taskResultView)
        {
            if (logger == null)
                throw new ArgumentNullException("logger");
            if (commandController == null)
                throw new ArgumentNullException("commandController");
            if (taskController == null)
                throw new ArgumentNullException("taskController");
            if (taskResultView == null)
                throw new ArgumentNullException("taskResultView");

            this.logger = logger;
            this.commandController = commandController;
            this.taskController = taskController;
            this.taskResultView = taskResultView;

            try
            {
                commandItemContainer.ItemsSource = commandController.Commands;
            }
            catch (Exception ex)
            {
                logger.Error("  CommandView.Initialize", ex);
            }
        }
Example #2
0
        public void Initialize(ILogger logger, ICommandController commandController, ITaskController taskController, TaskResultView taskResultView)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (commandController == null)
            {
                throw new ArgumentNullException("commandController");
            }
            if (taskController == null)
            {
                throw new ArgumentNullException("taskController");
            }
            if (taskResultView == null)
            {
                throw new ArgumentNullException("taskResultView");
            }

            this.logger            = logger;
            this.commandController = commandController;
            this.taskController    = taskController;
            this.taskResultView    = taskResultView;

            try
            {
                commandItemContainer.ItemsSource = commandController.Commands;
            }
            catch (Exception ex)
            {
                logger.Error("  CommandView.Initialize", ex);
            }
        }
 protected override void DoExecute(ITaskController taskController, TaskResultView taskResultView)
 {
     taskResultView.MarqueeBrowse(MetadataCategory.Artist, Name, Icon);
     //var viewModel = taskController.GetSearchViewModel(string.Empty);
     //viewModel.Filters = SearchFilters.Artists;
     //taskResultView.Search(viewModel);
 }
Example #4
0
        public void Initialize(ILogger logger, ITaskController taskController, TaskResultView taskResultView)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (taskController == null)
            {
                throw new ArgumentNullException("taskController");
            }
            if (taskResultView == null)
            {
                throw new ArgumentNullException("taskResultView");
            }

            try
            {
                this.logger         = logger;
                this.taskController = taskController;
                this.taskResultView = taskResultView;

                this.taskItemsControl.ItemsSource = taskController.Tasks;
            }
            catch (Exception ex)
            {
                logger.Error("TaskManagerView.Initialize", ex);
            }
        }
        public void Execute(ITaskController taskController, TaskResultView taskResultView)
        {
            if (taskController == null)
                throw new ArgumentNullException("taskController");
            if (taskResultView == null)
                throw new ArgumentNullException("taskResultView");

            DoExecute(taskController, taskResultView);
        }
        protected override void DoExecute(ITaskController taskController, TaskResultView taskResultView)
        {
            var dialog = new System.Windows.Forms.FolderBrowserDialog();
            dialog.Description = "Select A Directory To Catalog";
            dialog.ShowNewFolderButton = true;
            dialog.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
            var result = dialog.ShowDialog();

            if (result != System.Windows.Forms.DialogResult.OK)
                return;

            var catalogViewModel = taskController.GetCatalogViewModel(dialog.SelectedPath);
            taskResultView.Catalog(catalogViewModel);
        }
Example #7
0
        public void Initialize(ILogger logger, ITaskController taskController, TaskResultView taskResultView)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (taskController == null)
            {
                throw new ArgumentNullException("taskController");
            }
            if (taskResultView == null)
            {
                throw new ArgumentNullException("taskResultView");
            }

            this.logger         = logger;
            this.taskController = taskController;
            this.taskResultView = taskResultView;
        }
Example #8
0
        public void Initialize(ILogger logger, ISecurityContext securityContext, IMediaFactory mediaFactory, IMetadataController mediaItemController, ITaskController taskController, ITagController tagController, TaskResultView taskResultView)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (securityContext == null)
            {
                throw new ArgumentNullException("securityContext");
            }
            if (mediaFactory == null)
            {
                throw new ArgumentNullException("mediaFactory");
            }
            if (mediaItemController == null)
            {
                throw new ArgumentNullException("mediaItemController");
            }
            if (taskController == null)
            {
                throw new ArgumentNullException("taskController");
            }
            if (tagController == null)
            {
                throw new ArgumentNullException("tagController");
            }
            if (taskResultView == null)
            {
                throw new ArgumentNullException("taskResultView");
            }

            this.logger              = logger;
            this.securityContext     = securityContext;
            this.mediaFactory        = mediaFactory;
            this.mediaItemController = mediaItemController;
            this.taskController      = taskController;
            this.tagController       = tagController;
            this.taskResultView      = taskResultView;
        }
 protected override void DoExecute(ITaskController taskController, TaskResultView taskResultView)
 {
     taskResultView.MarqueeBrowse(MetadataCategory.Clip, Name, Icon);
 }
        public void Initialize(ILogger logger, ITaskController taskController, TaskResultView taskResultView)
        {
            if (logger == null)
                throw new ArgumentNullException("logger");
            if (taskController == null)
                throw new ArgumentNullException("taskController");
            if (taskResultView == null)
                throw new ArgumentNullException("taskResultView");

            try
            {
                this.logger = logger;
                this.taskController = taskController;
                this.taskResultView = taskResultView;

                this.taskItemsControl.ItemsSource = taskController.Tasks;
            }
            catch (Exception ex)
            {
                logger.Error("TaskManagerView.Initialize", ex);
            }
        }
        public void Initialize(ILogger logger, ISecurityContext securityContext, IMediaFactory mediaFactory, IMetadataController mediaItemController, ITaskController taskController, ITagController tagController, TaskResultView taskResultView)
        {
            if (logger == null)
                throw new ArgumentNullException("logger");
            if (securityContext == null)
                throw new ArgumentNullException("securityContext");
            if (mediaFactory == null)
                throw new ArgumentNullException("mediaFactory");
            if (mediaItemController == null)
                throw new ArgumentNullException("mediaItemController");
            if (taskController == null)
                throw new ArgumentNullException("taskController");
            if (tagController == null)
                throw new ArgumentNullException("tagController");
            if (taskResultView == null)
                throw new ArgumentNullException("taskResultView");

            this.logger = logger;
            this.securityContext = securityContext;
            this.mediaFactory = mediaFactory;
            this.mediaItemController = mediaItemController;
            this.taskController = taskController;
            this.tagController = tagController;
            this.taskResultView = taskResultView;
        }
 protected abstract void DoExecute(ITaskController taskController, TaskResultView taskResultView);