Пример #1
0
        /// <summary>
        /// </summary>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="taskNodeToInitialize"/> is <see langword="null"/>.
        /// </exception>
        protected virtual void InitializeTask(NuGenTaskTreeNode taskNodeToInitialize)
        {
            if (taskNodeToInitialize == null)
            {
                throw new ArgumentNullException("taskNodeToInitialize");
            }

            Debug.Assert(this.ImageListService != null, "this.ImageListService != null");
            Debug.Assert(this.ImageList != null, "this.ImageList != null");

            taskNodeToInitialize.SetPriorityImageIndex(
                NuGenTaskPriority.Critical,
                this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_CRITICAL)
                );

            taskNodeToInitialize.SetPriorityImageIndex(
                NuGenTaskPriority.Maybe,
                this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_MAYBE)
                );

            taskNodeToInitialize.SetPriorityImageIndex(
                NuGenTaskPriority.Required,
                this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_REQUIRED)
                );

            taskNodeToInitialize.SetPriorityImageIndex(
                NuGenTaskPriority.Wanted,
                this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_WANTED)
                );

            taskNodeToInitialize.SetPriorityImageIndex(
                NuGenTaskPriority.WouldBeNice,
                this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_WOULDBENICE)
                );
        }
Пример #2
0
		/// <summary>
		/// </summary>
		/// <exception cref="ArgumentNullException">
		/// <paramref name="taskNodeToInitialize"/> is <see langword="null"/>.
		/// </exception>
		protected virtual void InitializeTask(NuGenTaskTreeNode taskNodeToInitialize)
		{
			if (taskNodeToInitialize == null)
			{
				throw new ArgumentNullException("taskNodeToInitialize");
			}

			Debug.Assert(this.ImageListService != null, "this.ImageListService != null");
			Debug.Assert(this.ImageList != null, "this.ImageList != null");

			taskNodeToInitialize.SetPriorityImageIndex(
				NuGenTaskPriority.Critical,
				this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_CRITICAL)
			);

			taskNodeToInitialize.SetPriorityImageIndex(
				NuGenTaskPriority.Maybe,
				this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_MAYBE)
			);

			taskNodeToInitialize.SetPriorityImageIndex(
				NuGenTaskPriority.Required,
				this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_REQUIRED)
			);

			taskNodeToInitialize.SetPriorityImageIndex(
				NuGenTaskPriority.Wanted,
				this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_WANTED)
			);

			taskNodeToInitialize.SetPriorityImageIndex(
				NuGenTaskPriority.WouldBeNice,
				this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_WOULDBENICE)
			);
		}