diff --git a/AddIns/ICSharpCode.SharpDevelop.addin b/AddIns/ICSharpCode.SharpDevelop.addin index 7bc355ed83..14f45bda34 100644 --- a/AddIns/ICSharpCode.SharpDevelop.addin +++ b/AddIns/ICSharpCode.SharpDevelop.addin @@ -315,9 +315,6 @@ - diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj index 6d582e8662..6a5537763e 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj @@ -45,7 +45,6 @@ - diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpBindingExecutionManager.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpBindingExecutionManager.cs deleted file mode 100644 index 0a1e315903..0000000000 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpBindingExecutionManager.cs +++ /dev/null @@ -1,85 +0,0 @@ -//// -//// -//// -//// -//// -//// -// -//using System; -//using System.IO; -//using System.Diagnostics; -//using System.Collections; -//using System.Reflection; -//using System.Resources; -//using System.Windows.Forms; -//using System.Xml; -//using System.CodeDom.Compiler; -//using System.Threading; -// -//using ICSharpCode.SharpDevelop.Project; -//using ICSharpCode.SharpDevelop.Gui; -//using ICSharpCode.Core; -// -//namespace CSharpBinding -//{ -// /// -// /// This class describes the main functionalaty of a language codon -// /// -// public class CSharpBindingExecutionManager -// { -// public void Execute(string filename, bool debug) -// { -// } -// -// public void Execute(IProject project, bool debug) -// { -// CSharpCompilerParameters parameters = (CSharpCompilerParameters)project.ActiveConfiguration; -// -// -// string directory = FileUtility.GetDirectoryNameWithSeparator(((CSharpCompilerParameters)project.ActiveConfiguration).OutputDirectory); -// string exe = ((CSharpCompilerParameters)project.ActiveConfiguration).OutputAssembly + ".exe"; -// string args = ((CSharpCompilerParameters)project.ActiveConfiguration).CommandLineParameters; -// -// -// bool customStartup = false; -// ProcessStartInfo psi; -// if (parameters.ExecuteScript != null && parameters.ExecuteScript.Length > 0) { -// customStartup = true; -// psi = new ProcessStartInfo("\"" + parameters.ExecuteScript + "\"", args); -// } else { -// if (parameters.CompileTarget == CompileTarget.Library) { -// -// MessageService.ShowError("${res:BackendBindings.ExecutionManager.CantExecuteDLLError}"); -// return; -// } -// -// string runtimeStarter = String.Empty; -// -// switch (parameters.NetRuntime) { -// case NetRuntime.Mono: -// runtimeStarter = "mono "; -// break; -// case NetRuntime.MonoInterpreter: -// runtimeStarter = "mint "; -// break; -// } -// -// if (parameters.CompileTarget != CompileTarget.WinExe && parameters.PauseConsoleOutput) { -// psi = new ProcessStartInfo(Environment.GetEnvironmentVariable("ComSpec"), "/c " + runtimeStarter + "\"" + directory + exe + "\" " + args + " & pause"); -// } else { -// psi = new ProcessStartInfo(runtimeStarter + "\"" + directory + exe + "\""); -// psi.Arguments = args; -// } -// } -// -// psi.WorkingDirectory = Path.GetDirectoryName(directory); -// psi.UseShellExecute = false; -// DebuggerService DebuggerService = (DebuggerService)ServiceManager.Services.GetService(typeof(DebuggerService)); -// if (debug && !customStartup) { -// DebuggerService.Start(Path.Combine(directory, exe), directory, args); -// } else { -// DebuggerService.StartWithoutDebugging(psi); -// } -// } -// } -//} diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj index 147aaf1b1f..21f82990a5 100644 --- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj +++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj @@ -221,7 +221,6 @@ - Form @@ -457,12 +456,10 @@ Form - - Form @@ -472,7 +469,6 @@ - diff --git a/src/Main/Base/Project/Src/Commands/MenuItemBuilders.cs b/src/Main/Base/Project/Src/Commands/MenuItemBuilders.cs index 5c15fe8ad8..0f380cf1ef 100644 --- a/src/Main/Base/Project/Src/Commands/MenuItemBuilders.cs +++ b/src/Main/Base/Project/Src/Commands/MenuItemBuilders.cs @@ -6,18 +6,15 @@ // using System; +using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Collections; -using System.Collections.Generic; using System.Windows.Forms; -using System.Text; using ICSharpCode.Core; using ICSharpCode.SharpDevelop.Gui; -using ICSharpCode.SharpDevelop.Project; - using ICSharpCode.SharpDevelop.Internal.ExternalTool; +using ICSharpCode.SharpDevelop.Project; namespace ICSharpCode.SharpDevelop.Commands { @@ -505,13 +502,13 @@ namespace ICSharpCode.SharpDevelop.Commands public ToolStripItem[] BuildSubmenu(Codon codon, object owner) { - ArrayList items = new ArrayList(); + List items = new List(); foreach (PadDescriptor padContent in WorkbenchSingleton.Workbench.PadContentCollection) { if (padContent.Category == Category) { items.Add(new MyMenuItem(padContent)); } } - return (ToolStripItem[])items.ToArray(typeof(ToolStripItem)); + return items.ToArray(); } } } diff --git a/src/Main/Base/Project/Src/Gui/Pads/TreeViewMemento.cs b/src/Main/Base/Project/Src/Gui/Pads/TreeViewMemento.cs deleted file mode 100644 index c73527fb44..0000000000 --- a/src/Main/Base/Project/Src/Gui/Pads/TreeViewMemento.cs +++ /dev/null @@ -1,91 +0,0 @@ -//// -//// -//// -//// -//// -//// -// -//using System; -//using System.IO; -//using System.ComponentModel; -//using System.Windows.Forms; -//using System.Drawing; -//using System.Diagnostics; -//using System.Collections; -//using System.Xml; -//using System.Resources; -// -//using ICSharpCode.SharpDevelop.Project; -//using ICSharpCode.SharpDevelop.Gui; -// -//using ICSharpCode.Core; -// -//namespace ICSharpCode.SharpDevelop.Gui -//{ -// public class TreeViewMemento : IXmlConvertable -// { -// TreeView treeView = null; -// XmlElement parent = null; -// -// public TreeViewMemento() -// { -// } -// -// public TreeViewMemento(TreeView treeView) -// { -// this.treeView = treeView; -// } -// -// void SaveTree(TreeNodeCollection nodes, XmlDocument doc, XmlElement el) -// { -// foreach (TreeNode node in nodes) { -// if (node.IsExpanded) { -// XmlElement child = doc.CreateElement("Node"); -// -// XmlAttribute attr = doc.CreateAttribute("name"); -// attr.InnerText = node.Text; -// child.Attributes.Append(attr); -// -// el.AppendChild(child); -// SaveTree(node.Nodes, doc, child); -// } -// } -// } -// -// void RestoreTree(TreeNodeCollection nodes, XmlElement parent) -// { -// XmlNodeList nodelist = parent.ChildNodes; -// foreach (XmlElement el in nodelist) { -// foreach (TreeNode node in nodes) { -// if (node.Text == el.Attributes["name"].InnerText) { -// node.Expand(); -// RestoreTree(node.Nodes, el); -// break; -// } -// } -// } -// } -// -// public void Restore(TreeView view) -// { -// view.BeginUpdate(); -// RestoreTree(view.Nodes, (XmlElement)parent); -// view.EndUpdate(); -// } -// -// public object FromXmlElement(XmlElement element) -// { -// this.parent = element; -// return this; -// } -// -// public XmlElement ToXmlElement(XmlDocument doc) -// { -// System.Diagnostics.Debug.Assert(treeView != null); -// -// XmlElement treenode = doc.CreateElement("TreeView"); -// SaveTree(treeView.Nodes, doc, treenode); -// return treenode; -// } -// } -//} diff --git a/src/Main/Base/Project/Src/Internal/Doozers/DefaultDialogPanelDescriptor.cs b/src/Main/Base/Project/Src/Internal/Doozers/DefaultDialogPanelDescriptor.cs index f9699cb79e..ff8714ebda 100644 --- a/src/Main/Base/Project/Src/Internal/Doozers/DefaultDialogPanelDescriptor.cs +++ b/src/Main/Base/Project/Src/Internal/Doozers/DefaultDialogPanelDescriptor.cs @@ -37,9 +37,6 @@ namespace ICSharpCode.Core get { return dialogPanelDescriptors; } -// set { -// dialogPanelDescriptors = value; -// } } AddIn addin; diff --git a/src/Main/Base/Project/Src/Services/AmbienceService/AbstractAmbience.cs b/src/Main/Base/Project/Src/Services/AmbienceService/AbstractAmbience.cs index 861233ddae..cfcc74f9f0 100644 --- a/src/Main/Base/Project/Src/Services/AmbienceService/AbstractAmbience.cs +++ b/src/Main/Base/Project/Src/Services/AmbienceService/AbstractAmbience.cs @@ -88,18 +88,6 @@ namespace ICSharpCode.Core public abstract string ConvertEnd(IMethod m); public abstract string Convert(IParameter param); public abstract string Convert(IReturnType returnType); - - protected ArrayList linkArrayList; - - public ArrayList LinkArrayList { - get { - return linkArrayList; - } - set { - linkArrayList = value; - } - } - public abstract string WrapAttribute(string attribute); public abstract string WrapComment(string comment); public abstract string GetIntrinsicTypeName(string dotNetTypeName); diff --git a/src/Main/Base/Project/Src/TextEditor/Commands/ProjectCommands.cs b/src/Main/Base/Project/Src/TextEditor/Commands/ProjectCommands.cs deleted file mode 100644 index 54ccea47e9..0000000000 --- a/src/Main/Base/Project/Src/TextEditor/Commands/ProjectCommands.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.IO; -using System.Threading; -using System.Drawing; -using System.Drawing.Printing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; -using System.Diagnostics; -using System.Text; - -using ICSharpCode.Core; - -using ICSharpCode.TextEditor.Document; -using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; -using ICSharpCode.SharpDevelop.Gui; - -namespace ICSharpCode.SharpDevelop.Project.Commands -{ - public class ExportProjectToHtml : AbstractMenuCommand - { - public override void Run() - { - if (ProjectService.CurrentProject != null) - { - ExportProjectToHtmlDialog ephd = new ExportProjectToHtmlDialog(ProjectService.CurrentProject); - ephd.Owner = (Form)WorkbenchSingleton.Workbench; - ephd.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); - ephd.Dispose(); - } - } - } -} diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/ExportProjectToHtmlDialog.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/ExportProjectToHtmlDialog.cs deleted file mode 100644 index 21dacec15e..0000000000 --- a/src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/ExportProjectToHtmlDialog.cs +++ /dev/null @@ -1,493 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Drawing; -using System.Collections; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Windows.Forms; -using System.Threading; -using System.IO; -using ICSharpCode.TextEditor.Document; -using ICSharpCode.Core; -using ICSharpCode.TextEditor.Util; - -using ICSharpCode.SharpDevelop.Project; - -namespace ICSharpCode.SharpDevelop.Gui -{ - public class ExportProjectToHtmlDialog : Form - { - TextBox pathTextBox = new TextBox(); - Label pathLabel = new Label(); - Button okButton = new Button(); - Button cancelButton = new Button(); - Button browseButton = new Button(); - - ProgressBar progressBar = new ProgressBar(); - - IProject project; - int filesExported = 0; - - delegate void ProgressBarDelegate(); - - int FilesExported - { - get { - return filesExported; - } - set - { - filesExported = value; - - if(this.InvokeRequired) - { - this.Invoke(new ProgressBarDelegate(setProgressBar), new object[] {}); - } - else - { - progressBar.Value = filesExported = value; - } - } - } - - void setProgressBar() - { - FilesExported = FilesExported; - } - - void StartExporting() - { - Controls.Clear(); - - progressBar.Location = new Point(8, 8); - progressBar.Size = new Size(Width - 16, 16); - progressBar.Minimum = 0; - - int max = 0; - foreach(ProjectItem item in project.Items) - { - if(item is FileProjectItem) { - max++; - } - } - progressBar.Maximum = max; - - Controls.Add(progressBar); - - cancelButton = new Button(); - cancelButton.Location = new Point(188 + 80, 36); - cancelButton.Size = new Size(74, 23); - cancelButton.Text = ResourceService.GetString("Global.CancelButtonText"); - cancelButton.Click += new EventHandler(StopThread); - Controls.Add(cancelButton); - } - - public ExportProjectToHtmlDialog(IProject project) - { - this.project = project; - - pathLabel.Location = new Point(8, 8); - pathLabel.Size = new Size(60,16); - pathLabel.Text = ResourceService.GetString("Dialog.ExportProjectToHtml.FolderLabel"); - Controls.Add(pathLabel); - - pathTextBox.Location = new Point(70, 8); - pathTextBox.Size = new Size(230,16); - Controls.Add(pathTextBox); - - browseButton.Location = new Point(310, 8); - browseButton.Size = new Size(32,23); - browseButton.Text = "..."; - browseButton.Click += new EventHandler(BrowseDirectories); - browseButton.FlatStyle = FlatStyle.System; - Controls.Add(browseButton); - - okButton.Location = new Point(188, 36); - okButton.Size = new Size(74, 23); - okButton.Text = ResourceService.GetString("Global.OKButtonText"); - okButton.Click += new EventHandler(ExportProject); - okButton.FlatStyle = FlatStyle.System; - Controls.Add(okButton); - - cancelButton.Location = new Point(188 + 80, 36); - cancelButton.Size = new Size(74, 23); - cancelButton.Text = ResourceService.GetString("Global.CancelButtonText"); - cancelButton.DialogResult = DialogResult.Cancel; - cancelButton.FlatStyle = FlatStyle.System; - Controls.Add(cancelButton); - - Icon = null; - FormBorderStyle = FormBorderStyle.FixedDialog; - Size = new Size(350, 88 + 6); - StartPosition = FormStartPosition.CenterParent; - ShowInTaskbar = false; - MinimizeBox = MaximizeBox = false; - - Text = ResourceService.GetString("Dialog.ExportProjectToHtml.DialogName"); - } - - void BrowseDirectories(object sender, EventArgs e) - { - FolderDialog fd = new FolderDialog(); - - if(fd.DisplayDialog(ResourceService.GetString("Dialog.ExportProjectToHtml.SelectTargetDirInfo")) == DialogResult.OK) { - pathTextBox.Text = fd.Path; - } - } - - Hashtable projectTable = new Hashtable(); - Hashtable bitmapTable = new Hashtable(); - int bitmapIconIndex = 0; - int indexFileIndex = 0; - - public Hashtable GetPath(string filename, Hashtable table, bool create) - { - string directory = Path.GetDirectoryName(filename); - string[] treepath = directory.Split(new char[] { Path.DirectorySeparatorChar }); - Hashtable curTable = table; - - foreach (string path in treepath) { - if (path.Length == 0 || path[0] == '.') - continue; - - object node = curTable[path]; - - if (node == null) { - if (create) { - Hashtable newTable = new Hashtable(); - curTable[path] = newTable; - curTable = newTable; - continue; - } else { - return null; - } - } - curTable = (Hashtable)node; - } - return curTable; - } - - class Descriptor - { - public string title; - public string url; - public Descriptor(string title, string url) - { - this.title = title; - this.url = url; - } - } - - StreamWriter curFileStream = null; - Stack curIndexStreamStack = new Stack(); - int curSpanNumber = 0; - Hashtable Spans = new Hashtable(); - - string ExportFile(string fileName, string targetPath) - { - string targetFile; - if (fileName.EndsWith(".txt")) - { - targetFile = FileUtility.GetRelativePath(project.Directory, fileName).Substring(2); - File.Copy(fileName, targetPath + Path.DirectorySeparatorChar + targetFile); - return targetFile; - } - targetFile = FileUtility.GetRelativePath(project.Directory, fileName).Substring(2).Replace(Path.DirectorySeparatorChar.ToString(), "") + ".html"; - - IDocument document = new DocumentFactory().CreateDocument(); - document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategyForFile(fileName); - StreamReader stream = File.OpenText(fileName); - document.TextContent = stream.ReadToEnd(); - stream.Close(); - - curFileStream = File.CreateText(targetPath + Path.DirectorySeparatorChar + targetFile); - curFileStream.Write("\r\n"); - curFileStream.Write("\r\n"); - curFileStream.Write("\r\n"); - curFileStream.Write("" + Path.GetFileName(fileName) + "\r\n"); - curFileStream.Write("\r\n"); - curFileStream.Write("\r\n"); - - curFileStream.Write("
\r\n"); - curFileStream.Write(" \r\n"); - curFileStream.Write(" \r\n"); - curFileStream.Write(" \r\n"); - curFileStream.Write(" \r\n"); - - curFileStream.Write(" \r\n"); - int i = 0; - foreach (LineSegment line in document.LineSegmentCollection) { - curFileStream.Write(" \r\n"); - curFileStream.Write(" \r\n"); - curFileStream.Write(" \r\n"); - curFileStream.Write("\r\n"); - } - curFileStream.Write("
  \r\n"); - curFileStream.Write("
" + ++i + ": \r\n"); - bool spanOpen = false; - Color curColor = Color.Black; - bool oldItalic = false; - bool oldBold = false; - bool firstSpan = true; - foreach (TextWord word in line.Words) { - switch (word.Type) { - case TextWordType.Space: - curFileStream.Write(" "); - break; - - case TextWordType.Tab: - for (int k = 0; k < document.TextEditorProperties.TabIndent; ++k) { - curFileStream.Write(" "); - } - break; - - case TextWordType.Word: - Color c = word.Color; - string colorstr = c.R + ", " + c.G + ", " + c.B; - - if (word.Italic) { - colorstr = "i" + colorstr; - } - if (word.Bold) { - colorstr = "b" + colorstr; - } - if (Spans[colorstr] == null) { - Spans[colorstr] = "span" + ++curSpanNumber; - } - bool newColor = c != curColor || oldItalic != word.Italic || oldBold != word.Bold; - if (newColor) { - if (!firstSpan) { - curFileStream.Write("" ); - } - - curFileStream.Write("" ); - spanOpen = true; - firstSpan = false; - } - curFileStream.Write(HtmlLize(word.Word)); - - if (newColor) { - curColor = c; - oldItalic = word.Italic; - oldBold = word.Bold; - } - break; - } - } - if (spanOpen) { - curFileStream.Write("" ); - } - curFileStream.Write("
\r\n"); - - curFileStream.Write("

\r\n"); - curFileStream.Write("This page was automatically generated by \r\n"); - curFileStream.Write("SharpDevelop.\r\n"); - curFileStream.Write("

\r\n"); - curFileStream.Write("\r\n"); - curFileStream.Write("\r\n"); - curFileStream.Close(); - return targetFile; - } - - string HtmlLize(string str) - { - return str.Replace("&", "&").Replace("<", "<").Replace(">", ">"); - } - - void WriteIndexTable(string fileName, string name, ArrayList nameList, Hashtable table) - { - curIndexStreamStack.Push(File.CreateText(fileName)); - StreamWriter curIndexStream = (StreamWriter)curIndexStreamStack.Peek(); - - curIndexStream.Write("\r\n"); - curIndexStream.Write("\r\n"); - curIndexStream.Write("\r\n"); - curIndexStream.Write("" + project.Name + "\r\n"); - curIndexStream.Write("\r\n"); - - curIndexStream.Write("\r\n"); - curIndexStream.Write("

Location : "); - foreach (Descriptor d in nameList) { - curIndexStream.Write("" + d.title + "/"); - } - curIndexStream.Write(name); - curIndexStream.Write("

\r\n"); - - nameList.Add(new Descriptor(name, Path.GetFileName(fileName))); - - curIndexStream.Write("\r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - - bool coloring = false; - foreach (DictionaryEntry entry in table) { - if (entry.Value is Hashtable) { - string filename = "index" + ++indexFileIndex + ".html"; - WriteIndexTable(Path.GetDirectoryName(fileName) + Path.DirectorySeparatorChar + filename, entry.Key.ToString(), nameList, (Hashtable)entry.Value); - nameList.RemoveAt(nameList.Count - 1); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - } else if (entry.Value is FileProjectItem) { - FileProjectItem fInfo = entry.Value as FileProjectItem; - DateTime time = Directory.GetLastAccessTime(fInfo.FileName); - FileStream reader = File.OpenRead(fInfo.FileName); - long size = reader.Length; - reader.Close(); - - string filename = "fileicon" + ++bitmapIconIndex + ".png"; - string outputFileName = Path.GetDirectoryName(fileName) + Path.DirectorySeparatorChar + filename; - Bitmap bmp = IconService.GetBitmap(IconService.GetImageForFile(fInfo.FileName)); - - if(! File.Exists(outputFileName)) { - bmp.Save(outputFileName); - } - - string outFile = ExportFile(fInfo.FileName, Path.GetDirectoryName(fileName)); - ++FilesExported; - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - curIndexStream.Write(" \r\n"); - - } - coloring = !coloring; - } - - curIndexStream.Write("
 NameSizeDate  \r\n"); - curIndexStream.Write("
" + entry.Key.ToString() + " --  \r\n"); - curIndexStream.Write("
" + Path.GetFileName(fInfo.FileName) + " " + size + "" + time.ToString("d") + "  \r\n"); - curIndexStream.Write("
\r\n"); - - curIndexStream.Write("

\r\n"); - curIndexStream.Write("This page was automatically generated by \r\n"); - curIndexStream.Write("SharpDevelop.\r\n"); - curIndexStream.Write("

\r\n"); - curIndexStream.Write("\r\n"); - curIndexStream.Write("\r\n"); - - lock (this) { - curIndexStream.Close(); - curIndexStreamStack.Pop(); - } - } - - delegate void MyD(); - - void QuitDialog() - { - DialogResult = DialogResult.OK; - } - - Thread exportFilesThread; - void ExportFilesThread() - { - ResourceService.GetBitmap("Icons.16x16.ClosedFolderBitmap").Save(Path.Combine(pathTextBox.Text, "folderbitmap.png")); - WriteIndexTable(Path.Combine(pathTextBox.Text, "index.html"), "[ROOT]", new ArrayList(), projectTable); - CreateCSS(pathTextBox.Text); - Invoke(new MyD(QuitDialog)); - } - - void StopThread(object sender, EventArgs e) - { - lock (this) { - exportFilesThread.Abort(); - curFileStream.Close(); - while (curIndexStreamStack.Count > 0) { - ((StreamWriter)curIndexStreamStack.Pop()).Close(); - } - QuitDialog(); - } - } - - void CreateCSS(string targetPath) - { - lock (this) { - StreamWriter sw = File.CreateText(targetPath + Path.DirectorySeparatorChar + "sdcss.css"); - sw.Write("div.code\r\n"); - sw.Write("{\r\n"); - sw.Write(" background-color: rgb(255,255,255);\r\n"); - sw.Write(" font-family: \"Lucida Console\", \"courier new\", courier;\r\n"); - sw.Write(" color: rgb(0,0,0);\r\n"); - sw.Write(" font-size: x-small;\r\n"); - sw.Write(" padding: 1em;\r\n"); - sw.Write(" margin: 1em;\r\n"); - sw.Write("}\r\n"); - - foreach (DictionaryEntry entry in Spans) { - string color = entry.Key.ToString(); - string name = entry.Value.ToString(); - bool bold = color.StartsWith("b"); - if (bold) { - color = color.Substring(1); - } - bool italic = color.StartsWith("i"); - if (italic) { - color = color.Substring(1); - } - - sw.Write("div.code span." + name +"\r\n"); - sw.Write("{\r\n"); - sw.Write(" color: rgb("+ color + ");\r\n"); - if (bold) { - sw.Write(" font-weight: bold;\r\n"); - } else - if (italic) { - sw.Write(" font-weight: italic;\r\n"); - } else { - sw.Write(" font-weight: normal;\r\n"); - } - - sw.Write("}\r\n"); - } - sw.Close(); - } - - } - - void ExportProject(object sender, EventArgs e) - { - if (!Directory.Exists(pathTextBox.Text)) { - MessageBox.Show("Directory doesn't exists", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } - - foreach (ProjectItem item in project.Items) { - if(item is FileProjectItem) - { - FileProjectItem fItem = item as FileProjectItem; - if(fItem.BuildAction == FileProjectItem.FileBuildAction.Compile || fItem.BuildAction == FileProjectItem.FileBuildAction.None) - { - string relativefile = FileUtility.GetRelativePath(project.Directory, fItem.FileName); - Hashtable table = GetPath(relativefile, projectTable, true); - table[Path.GetFileName(fItem.FileName)] = fItem; - } - } - } - - StartExporting(); - exportFilesThread = new Thread(new ThreadStart(ExportFilesThread)); - exportFilesThread.Name = "exportFiles"; - exportFilesThread.IsBackground = true; - exportFilesThread.Start(); - } - } -} diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/HtmlDeclarationViewWindow.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/HtmlDeclarationViewWindow.cs deleted file mode 100644 index f1e57ceeb5..0000000000 --- a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/HtmlDeclarationViewWindow.cs +++ /dev/null @@ -1,85 +0,0 @@ -//// -//// -//// -//// -//// -//// -// -//using System; -//using System.IO; -//using System.Drawing; -//using System.Windows.Forms; -//using System.Reflection; -//using System.Collections; -// -//using ICSharpCode.TextEditor.Document; -//using ICSharpCode.TextEditor.Util; -//using ICSharpCode.TextEditor; -//using ICSharpCode.SharpDevelop.Gui.HtmlControl; -//using ICSharpCode.Core; -// -//namespace ICSharpCode.TextEditor.Gui.CompletionWindow -//{ -// public class HtmlDeclarationViewWindow : Form, IDeclarationViewWindow -// { -// string description = String.Empty; -// HtmlControl hc = new HtmlControl(); -// public Form DeclarationViewForm { -// get { -// return this; -// } -// } -// public string Description { -// get { -// return description; -// } -// set { -// description = value; -// hc.Html = "" + description + ""; -// } -// } -// -// public HtmlDeclarationViewWindow() -// { -//// -// -// hc.CascadingStyleSheet = PropertyService.DataDirectory + -// Path.DirectorySeparatorChar + "resources" + -// Path.DirectorySeparatorChar + "css" + -// Path.DirectorySeparatorChar + "MsdnHelp.css"; -// hc.Dock = DockStyle.Fill; -// hc.BeforeNavigate += new BrowserNavigateEventHandler(BrowserNavigateCancel); -// Controls.Add(hc); -// -// StartPosition = FormStartPosition.Manual; -// FormBorderStyle = FormBorderStyle.None; -// TopMost = true; -// ShowInTaskbar = false; -// Size = new Size(200, 200); -// } -//// -// void BrowserNavigateCancel(object sender, BrowserNavigateEventArgs e) -// { -// e.Cancel = true; -// } -// -// public void CloseDeclarationViewWindow() -// { -// Close(); -// Dispose(); -// } -// -//// protected override void OnPaint(PaintEventArgs pe) -//// { -//// TipPainterTools.DrawHelpTipFromCombinedDescription -//// (this, pe.Graphics, Font, null, description); -//// } -//// -//// protected override void OnPaintBackground(PaintEventArgs pe) -//// { -//// if (description != null && description.Length > 0) { -//// pe.Graphics.FillRectangle(SystemBrushes.Info, pe.ClipRectangle); -//// } -//// } -// } -//}