예제 #1
0
파일: ListPad.cs 프로젝트: lazanet/messylab
 public ListItem(string description, ProjectItem projectItem, int line, int column)
 {
     Description = description;
     ProjectItem = projectItem;
     Line = line;
     Column = column;
 }
예제 #2
0
파일: ListPad.cs 프로젝트: lazanet/messylab
 /// <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
파일: Project.cs 프로젝트: lazanet/messylab
        /// <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);
            }
        }