예제 #1
0
        public FileTabPage Create(FileDetails fileDetails, IContainer components, ContextMenuStrip contextMenuStrip)
        {
            var result = new FileTabPage(fileWriter);

            result.Initialize(fileDetails);
            contextMenuStrip.Items[0].Enabled = fileDetails != null;
            result.TextBox.ContextMenuStrip   = contextMenuStrip;
            return(result);
        }
예제 #2
0
        private void InitializeViews()
        {
            projectPage = new FileTabPage {
                Text = @"Project", Enabled = false
            };
            tabViews.TabPages.Add(projectPage);

            hierarchyPage = new FileTabPage {
                Text = @"Hierarchy", Enabled = false
            };
            tabViews.TabPages.Add(hierarchyPage);
        }
예제 #3
0
 private void CloseTabPage(FileTabPage fileTabPage)
 {
     tabControl.TabPages.Remove(fileTabPage);
     if (fileTabPage.FileDetails != null)
     {
         if (options.OpenedFiles == fileTabPage.FileDetails.FileName)
         {
             options.OpenedFiles = String.Empty;
         }
         else
         {
             options.OpenedFiles = options.OpenedFiles.EndsWith($";{fileTabPage.FileDetails.FileName}")
                 ? options.OpenedFiles.Replace($";{fileTabPage.FileDetails.FileName}", String.Empty)
                 : options.OpenedFiles.Replace($"{fileTabPage.FileDetails.FileName};", String.Empty);
         }
     }
 }
예제 #4
0
 private void CloseTabPage(FileTabPage fileTabPage)
 {
     tabControl.TabPages.Remove(fileTabPage);
     //if (fileTabPage.FileDetails != null)
     //{
     //	if (options.OpenedFiles == fileTabPage.FileDetails.FileName)
     //	{
     //		options.OpenedFiles = String.Empty;
     //	}
     //	else
     //	{
     //		options.OpenedFiles = options.OpenedFiles.EndsWith($";{fileTabPage.FileDetails.FileName}")
     //			? options.OpenedFiles.Replace($";{fileTabPage.FileDetails.FileName}", String.Empty)
     //			: options.OpenedFiles.Replace($"{fileTabPage.FileDetails.FileName};", String.Empty);
     //	}
     //}
 }