Пример #1
0
 public ListItem(string description, ProjectItem projectItem, int line, int column)
 {
     Description = description;
     ProjectItem = projectItem;
     Line = line;
     Column = column;
 }
Пример #2
0
 /// <summary>
 /// Creates and adds an item using the specified data.
 /// </summary>
 /// <param name="description">The item description.</param>
 /// <param name="projectItem">The name of the project item.</param>
 /// <param name="line">The source code line.</param>
 /// <param name="column">The source code column.</param>
 /// <returns>The created ListItem.</returns>
 public virtual ListItem AddItem(string description, ProjectItem projectItem, int line, int column)
 {
     ListItem item = new ListItem(description, projectItem, line, column);
     AddItem(item);
     return item;
 }
Пример #3
0
        /// <summary>
        /// Restores the project state from the specified memento.
        /// </summary>
        /// <param name="memento">The memento to restore.</param>
        public void SetMemento(ProjectMemento memento)
        {
            Items.Clear();
            MainItem = null;
            foreach (var i in memento.Items)
            {
                var item = new ProjectItem();
                item.Project = this;
                item.RelativePath = i;
                if (!File.Exists(item.Path))
                {
                    File.WriteAllText(item.Path, string.Empty);
                }
                Items.Add(item);

                if (i == memento.MainItem)
                { MainItem = item; }
            }

            SetPlatformByName(memento.Platform);
        }
Пример #4
0
		/// <summary>
		/// Opens the specified project item.
		/// </summary>
		/// <param name="item">The project item to open.</param>
		public virtual void Open(ProjectItem item)
		{
			Item = item;
			Open(item.Path);
		}
Пример #5
0
		protected void OnBreadpointRemoved(ProjectItem item, int line)
		{ if (BreadpointRemoved != null) BreadpointRemoved(item, line); }
Пример #6
0
		protected void OnBreakpointAdded(ProjectItem item, int line)
		{ if (BreakpointAdded != null) BreakpointAdded(item, line); }
Пример #7
0
        /// <summary>
        /// Shows the editor for the specified ProjectItem.
        /// </summary>
        /// <param name="item">The item to show the editor for.</param>
        public void ShowEditorFor(ProjectItem item)
        {
            if (item == null) return;

            var e = item.GetEditorForm();
            if (e.Visible)
            {
                e.Activate();
            }
            else
            {
                e.Show(dock, DockState.Document);
            }
        }