예제 #1
0
        public void AddTask(string description,
                            string category,
                            string subcategory,
                            vsTaskPriority priority,
                            vsTaskIcon icon,
                            bool checkable,
                            string releventFile,
                            int lineNumber,
                            bool canUserDelete,
                            bool flushItem,
                            bool allowDuplicates)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            Debug.Assert(description != null, "description parameter could not be null.");
            Debug.Assert(category != null, "category parameter could not be null.");
            Debug.Assert(subcategory != null, "subcategory parameter could not be null.");

            // Get a reference to the tasks window.
            Window win = applicationObject.Windows.Item(Constants.vsWindowKindTaskList);

            // Activate it.
            win.Activate();
            // Get a reference to the tasks list.
            TaskList taskList = (TaskList)win.Object;

            // If we don't allow duplicates we have to itterate the tasks list to
            // see if there is a duplicate.

            // Do this for all task items.
            for (int ti = 1; ti <= taskList.TaskItems.Count; ti++)
            {
                // Get a reference to the task item.
                TaskItem existingItem = taskList.TaskItems.Item(ti);
                // Match attributes and see if this task is as same as the one being added.
                // If the task is matching all Category, SubCategory and Description properties
                // must be similar to the pertaining parameters. We don't care about the case here.
                if (string.Compare(category, existingItem.Category, true) == 0 &&
                    string.Compare(subcategory, existingItem.SubCategory, true) == 0 &&
                    string.Compare(description, existingItem.Description, true) == 0)
                {
                    // We don't have to proceed.
                    return;
                }
            }

            // Add the new task item.
            TaskItem newItem = taskList.TaskItems.Add(category, subcategory, description, priority, icon,
                                                      checkable, releventFile, lineNumber, canUserDelete, flushItem);

            // Finally activate the task bar.
            ActivateTaskBar();
        }
        public void AddTask(string description,
            string category,
            string subcategory,
            vsTaskPriority priority,
            vsTaskIcon icon,
            bool checkable,
            string releventFile,
            int lineNumber,
            bool canUserDelete,
            bool flushItem,
            bool allowDuplicates)
        {
            Debug.Assert(description != null, "description parameter could not be null.");
            Debug.Assert(category != null, "category parameter could not be null.");
            Debug.Assert(subcategory != null, "subcategory parameter could not be null.");

            // Get a reference to the tasks window.
            Window win = applicationObject.Windows.Item(Constants.vsWindowKindTaskList);
            // Activate it.
            win.Activate();
            // Get a reference to the tasks list.
            TaskList taskList = (TaskList)win.Object;

            // If we don't allow duplicates we have to itterate the tasks list to 
            // see if there is a duplicate.

            // Do this for all task items.
            for (int ti = 1; ti <= taskList.TaskItems.Count; ti++)
            {
                // Get a reference to the task item.
                TaskItem existingItem = taskList.TaskItems.Item(ti);
                // Match attributes and see if this task is as same as the one being added.
                // If the task is matching all Category, SubCategory and Description properties
                // must be similar to the pertaining parameters. We don't care about the case here.
                if (string.Compare(category, existingItem.Category, true) == 0 &&
                    string.Compare(subcategory, existingItem.SubCategory, true) == 0 &&
                    string.Compare(description, existingItem.Description, true) == 0)
                {
                    // We don't have to proceed.
                    return;
                }
            }

            // Add the new task item.
            TaskItem newItem = taskList.TaskItems.Add(category, subcategory, description, priority, icon,
                checkable, releventFile, lineNumber, canUserDelete, flushItem);

            // Finally activate the task bar.
            ActivateTaskBar();
        }
예제 #3
0
 public void OutputTaskItemString(string Text, vsTaskPriority Priority, string SubCategory, vsTaskIcon Icon,
                                  string FileName, int Line, string Description, bool Force)
 {
     _pane.OutputTaskItemString(Text, Priority, SubCategory, Icon, FileName, Line, Description, Force);
 }
예제 #4
0
		public void OutputTaskItemString(string text, vsTaskPriority priority, string category,
			vsTaskIcon icon, string fileName, int line, string description, bool force)
		{
			Pane.OutputTaskItemString(text, priority, category, icon, fileName, line, description, force);
		}
예제 #5
0
 public void OutputTaskItemString(string Text, vsTaskPriority Priority, string SubCategory, vsTaskIcon Icon,
                                  string FileName, int Line, string Description, bool Force)
 {
     _pane.OutputTaskItemString(Text, Priority, SubCategory, Icon, FileName, Line, Description, Force);
 }
예제 #6
0
 public void OutputTaskItemString(string text, vsTaskPriority priority, string category,
                                  vsTaskIcon icon, string fileName, int line, string description, bool force)
 {
     Pane.OutputTaskItemString(text, priority, category, icon, fileName, line, description, force);
 }