diff --git a/src/AddIns/DisplayBindings/HexEditor/HexEditor.sln b/src/AddIns/DisplayBindings/HexEditor/HexEditor.sln
new file mode 100644
index 0000000000..b83978550c
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/HexEditor.sln
@@ -0,0 +1,30 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+# SharpDevelop 3.0.0.2956
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "..\..\..\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Configuration/AssemblyInfo.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Configuration/AssemblyInfo.cs
new file mode 100644
index 0000000000..0b42152c93
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Configuration/AssemblyInfo.cs
@@ -0,0 +1,21 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System.Reflection;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("HexEditor")]
+[assembly: AssemblyDescription("SharpDevelop Hex Editor AddIn")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin b/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin
new file mode 100644
index 0000000000..aa603e5ee9
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.csproj b/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.csproj
new file mode 100644
index 0000000000..c5f5590137
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.csproj
@@ -0,0 +1,120 @@
+
+
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}
+ Debug
+ AnyCPU
+ Library
+ HexEditor
+ HexEditor
+ False
+ False
+ 4
+ true
+ True
+ False
+ OnBuildSuccess
+ False
+
+
+ 2.0
+
+
+ v2.0
+
+
+ ..\..\..\..\..\AddIns\AddIns\DisplayBindings\HexEditor
+ true
+ Full
+ True
+ DEBUG;TRACE
+ False
+ Program
+ ..\..\..\..\bin\SharpDevelop.exe
+
+
+ ..\..\..\..\..\AddIns\AddIns\DisplayBindings\HexEditor
+ false
+ None
+ False
+ TRACE
+ False
+
+
+ False
+ Auto
+ 4194304
+ AnyCPU
+ 4096
+
+
+
+
+
+
+
+
+
+
+
+ Configuration\GlobalAssemblyInfo.cs
+
+
+
+ UserControl
+
+
+ HexEditControl.cs
+
+
+
+
+
+
+
+
+
+
+
+
+ UserControl
+
+
+ HexEditContainer.cs
+
+
+
+ UserControl
+
+
+
+
+ Always
+
+
+ HexEditControl.cs
+
+
+ Designer
+ HexEditContainer.cs
+
+
+
+
+
+
+
+
+
+
+
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}
+ ICSharpCode.SharpDevelop
+ False
+
+
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
+ ICSharpCode.Core
+ False
+
+
+
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Resources/HexEditOptions.xfrm b/src/AddIns/DisplayBindings/HexEditor/Project/Resources/HexEditOptions.xfrm
new file mode 100644
index 0000000000..3af5296f42
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Resources/HexEditOptions.xfrm
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Resources/sizefittowindow.bmp b/src/AddIns/DisplayBindings/HexEditor/Project/Resources/sizefittowindow.bmp
new file mode 100644
index 0000000000..6df969b20e
Binary files /dev/null and b/src/AddIns/DisplayBindings/HexEditor/Project/Resources/sizefittowindow.bmp differ
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.Designer.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.Designer.cs
new file mode 100644
index 0000000000..08aaabc1c8
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.Designer.cs
@@ -0,0 +1,125 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+namespace HexEditor
+{
+ public partial class HexEditControl
+ {
+ ///
+ /// Designer variable used to keep track of non-visual components.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Disposes resources used by the form.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing) {
+ if (components != null) {
+ components.Dispose();
+ }
+ }
+ base.Dispose(disposing);
+ }
+
+ ///
+ /// This method is required for Windows Forms designer support.
+ /// Do not change the method contents inside the source code editor. The Forms designer might
+ /// not be able to load this method if it was changed manually.
+ ///
+ private void InitializeComponent()
+ {
+ this.bWorker = new System.ComponentModel.BackgroundWorker();
+ this.VScrollBar = new System.Windows.Forms.VScrollBar();
+ this.TextView = new System.Windows.Forms.Panel();
+ this.HexView = new System.Windows.Forms.Panel();
+ this.Side = new System.Windows.Forms.Panel();
+ this.Header = new System.Windows.Forms.Panel();
+ this.SuspendLayout();
+ //
+ // VScrollBar
+ //
+ this.VScrollBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.VScrollBar.Location = new System.Drawing.Point(670, 0);
+ this.VScrollBar.Name = "VScrollBar";
+ this.VScrollBar.Size = new System.Drawing.Size(18, 365);
+ this.VScrollBar.TabIndex = 9;
+ this.VScrollBar.Scroll += new System.Windows.Forms.ScrollEventHandler(this.VScrollBarScroll);
+ //
+ // TextView
+ //
+ this.TextView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+ this.TextView.Cursor = System.Windows.Forms.Cursors.IBeam;
+ this.TextView.Location = new System.Drawing.Point(561, 18);
+ this.TextView.Name = "TextView";
+ this.TextView.Size = new System.Drawing.Size(108, 347);
+ this.TextView.TabIndex = 12;
+ this.TextView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TextViewMouseDown);
+ this.TextView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TextViewMouseMove);
+ this.TextView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextViewMouseClick);
+ this.TextView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.TextViewMouseUp);
+ //
+ // HexView
+ //
+ this.HexView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)));
+ this.HexView.Cursor = System.Windows.Forms.Cursors.IBeam;
+ this.HexView.Location = new System.Drawing.Point(92, 18);
+ this.HexView.Name = "HexView";
+ this.HexView.Size = new System.Drawing.Size(463, 347);
+ this.HexView.TabIndex = 11;
+ this.HexView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.HexViewMouseDown);
+ this.HexView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.HexViewMouseMove);
+ this.HexView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.HexViewMouseClick);
+ this.HexView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.HexViewMouseUp);
+ //
+ // Side
+ //
+ this.Side.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)));
+ this.Side.Location = new System.Drawing.Point(0, 0);
+ this.Side.Name = "Side";
+ this.Side.Size = new System.Drawing.Size(76, 365);
+ this.Side.TabIndex = 10;
+ //
+ // Header
+ //
+ this.Header.Location = new System.Drawing.Point(92, 0);
+ this.Header.Name = "Header";
+ this.Header.Size = new System.Drawing.Size(463, 18);
+ this.Header.TabIndex = 13;
+ //
+ // HexEditControl
+ //
+ this.BackColor = System.Drawing.Color.White;
+ this.Controls.Add(this.Header);
+ this.Controls.Add(this.TextView);
+ this.Controls.Add(this.HexView);
+ this.Controls.Add(this.Side);
+ this.Controls.Add(this.VScrollBar);
+ this.DoubleBuffered = true;
+ this.Name = "HexEditControl";
+ this.Size = new System.Drawing.Size(688, 365);
+ this.ContextMenuStripChanged += new System.EventHandler(this.HexEditControlContextMenuStripChanged);
+ this.GotFocus += new System.EventHandler(this.HexEditGotFocus);
+ this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HexEditKeyPress);
+ this.Paint += new System.Windows.Forms.PaintEventHandler(this.HexEditPaint);
+ this.SizeChanged += new System.EventHandler(this.HexEditSizeChanged);
+ this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.HexEditKeyDown);
+ this.ResumeLayout(false);
+ }
+ private System.Windows.Forms.Panel Header;
+ private System.Windows.Forms.Panel Side;
+ private System.Windows.Forms.Panel HexView;
+ private System.Windows.Forms.Panel TextView;
+ private System.ComponentModel.BackgroundWorker bWorker;
+ private System.Windows.Forms.VScrollBar VScrollBar;
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.cs
new file mode 100644
index 0000000000..e26dcc77b4
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.cs
@@ -0,0 +1,2045 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+using System.Xml;
+using System.Diagnostics;
+
+using ICSharpCode.SharpDevelop;
+
+using HexEditor.Util;
+
+namespace HexEditor
+{
+ // TODO : Make BIG FILES COMPATIBLE (Data structures are bad)
+ // TODO : Add options
+
+ ///
+ /// Hexadecimal editor control.
+ ///
+ public partial class HexEditControl : UserControl
+ {
+ ///
+ /// number of the first visible line (first line = 0)
+ ///
+ int topline;
+ int caretwidth, charwidth, hexinputmodepos;
+ int underscorewidth, underscorewidth3, fontheight;
+ bool hexViewFocus, textViewFocus, insertmode, hexinputmode, selectionmode, handled, moved;
+ bool shiftwaspressed;
+ Rectangle[] selregion;
+ Point[] selpoints;
+ BufferManager buffer;
+ Caret caret;
+ SelectionManager selection;
+ UndoManager undoStack;
+ Color offsetForeColor, offsetBackColor, dataForeColor, dataBackColor;
+ bool offsetBold, offsetItalic, offsetUnderline, dataBold, dataItalic, dataUnderline;
+ Font offsetFont, dataFont;
+
+ ///
+ /// Event fired every time something is changed in the editor.
+ ///
+ [Browsable(true)]
+ public event EventHandler DocumentChanged;
+
+ ///
+ /// On-method for DocumentChanged-event.
+ ///
+ /// The eventargs for the event
+ protected virtual void OnDocumentChanged(EventArgs e)
+ {
+ if (DocumentChanged != null) {
+ DocumentChanged(this, e);
+ }
+ }
+
+ ///
+ /// Creates a new HexEditor Control with basic settings and initialises all components.
+ ///
+ public HexEditControl()
+ {
+ //
+ // The InitializeComponent() call is required for Windows Forms designer support.
+ //
+ InitializeComponent();
+
+ buffer = new BufferManager(this);
+ selection = new SelectionManager(ref buffer);
+ undoStack = new UndoManager();
+ caret = new Caret(this, 1, fontheight, 0);
+ insertmode = true;
+ caretwidth = 1;
+ underscorewidth = MeasureStringWidth(this.CreateGraphics(), "_", this.Font);
+ underscorewidth3 = underscorewidth * 3;
+ fontheight = GetFontHeight(this.Font);
+ selregion = new Rectangle[] {};
+ selpoints = new Point[] {};
+ headertext = GetHeaderText();
+
+ this.offsetFont = new Font(this.Font, FontStyle.Regular);
+ this.dataFont = new Font(this.Font, FontStyle.Regular);
+
+ // TODO : Implement settings
+ //LoadSettings();
+
+ HexEditSizeChanged(null, EventArgs.Empty);
+ AdjustScrollBar();
+ }
+
+ ///
+ /// Loads the settings out of the config file of hexeditor.
+ ///
+ /// Currently not working, because there's no options dialog implemented.
+ public void LoadSettings()
+ {
+ string configpath = Path.GetDirectoryName(typeof(HexEditControl).Assembly.Location) + Path.DirectorySeparatorChar + "config.xml";
+
+ if (!File.Exists(configpath)) return;
+
+ XmlDocument file = new XmlDocument();
+ file.Load(configpath);
+
+ foreach (XmlElement el in file.GetElementsByTagName("Setting")) {
+ switch(el.GetAttribute("Name")) {
+ case "OffsetFore" :
+ this.offsetForeColor = Color.FromArgb(int.Parse(el.GetAttribute("R")), int.Parse(el.GetAttribute("G")), int.Parse(el.GetAttribute("B")));
+ break;
+ case "OffsetBack" :
+ this.offsetBackColor = Color.FromArgb(int.Parse(el.GetAttribute("R")), int.Parse(el.GetAttribute("G")), int.Parse(el.GetAttribute("B")));
+ break;
+ case "DataFore" :
+ this.dataForeColor = Color.FromArgb(int.Parse(el.GetAttribute("R")), int.Parse(el.GetAttribute("G")), int.Parse(el.GetAttribute("B")));
+ break;
+ case "DataBack" :
+ this.dataBackColor = Color.FromArgb(int.Parse(el.GetAttribute("R")), int.Parse(el.GetAttribute("G")), int.Parse(el.GetAttribute("B")));
+ break;
+ case "OffsetStyle" :
+ this.offsetBold = bool.Parse(el.GetAttribute("Bold"));
+ this.offsetItalic = bool.Parse(el.GetAttribute("Italic"));
+ this.offsetUnderline = bool.Parse(el.GetAttribute("Underline"));
+ break;
+ case "DataStyle" :
+ this.dataBold = bool.Parse(el.GetAttribute("Bold"));
+ this.dataItalic = bool.Parse(el.GetAttribute("Italic"));
+ this.dataUnderline = bool.Parse(el.GetAttribute("Underline"));
+ break;
+ case "Font" :
+ this.Font = new Font(el.GetAttribute("FontName"), float.Parse(el.GetAttribute("FontSize")));
+ break;
+ }
+ }
+
+ FontStyle offsetStyle = FontStyle.Regular;
+ if (this.offsetBold) offsetStyle &= FontStyle.Bold;
+ if (this.offsetItalic) offsetStyle &= FontStyle.Italic;
+ if (this.offsetUnderline) offsetStyle &= FontStyle.Underline;
+
+ this.offsetFont = new Font(this.Font, offsetStyle);
+
+ FontStyle dataStyle = FontStyle.Regular;
+ if (this.dataBold) dataStyle &= FontStyle.Bold;
+ if (this.dataItalic) dataStyle &= FontStyle.Italic;
+ if (this.dataUnderline) dataStyle &= FontStyle.Underline;
+
+ this.dataFont = new Font(this.Font, dataStyle);
+ }
+
+ #region Measure functions
+ /*
+ * Code from SharpDevelop TextEditor
+ * */
+
+ static int GetFontHeight(Font font)
+ {
+ int height1 = TextRenderer.MeasureText("_", font).Height;
+ int height2 = (int)Math.Ceiling(font.GetHeight());
+ return Math.Max(height1, height2) + 1;
+ }
+
+ static int MeasureStringWidth(Graphics g, string word, Font font)
+ {
+ // This code here provides better results than MeasureString!
+ // Example line that is measured wrong:
+ // txt.GetPositionFromCharIndex(txt.SelectionStart)
+ // (Verdana 10, highlighting makes GetP... bold) -> note the space between 'x' and '('
+ // this also fixes "jumping" characters when selecting in non-monospace fonts
+ // [...]
+ // Replaced GDI+ measurement with GDI measurement: faster and even more exact
+ return TextRenderer.MeasureText(g, word, font, new Size(short.MaxValue, short.MaxValue),
+ TextFormatFlags.NoPadding | TextFormatFlags.NoPrefix |
+ TextFormatFlags.PreserveGraphicsClipping).Width;
+ }
+
+ #endregion
+
+ ///
+ /// used to store headertext for calculation.
+ ///
+ string headertext = String.Empty;
+
+ ///
+ /// Used to get the arrow keys to the keydown event.
+ ///
+ /// The pressed keys.
+ /// true if keyData is an arrow key, otherwise false.
+ protected override bool IsInputKey(Keys keyData)
+ {
+ switch (keyData) {
+ case Keys.Down:
+ case Keys.Up:
+ case Keys.Left:
+ case Keys.Right:
+ return true;
+ }
+ return false;
+ }
+
+ #region Properties
+ ViewMode viewMode = ViewMode.Hexadecimal;
+ int bytesPerLine = 16;
+ bool fitToWindowWidth;
+ Font font = new Font("Courier New", 10f);
+ string fileName;
+ Encoding encoding = Encoding.Default;
+
+ ///
+ /// ProgressBar used to display the progress of loading saving, outside of the control.
+ ///
+ /// Currently not in use
+ private ToolStripProgressBar progressBar;
+
+ ///
+ /// ProgressBar used to display the progress of loading saving, outside of the control.
+ ///
+ /// Currently not in use
+ public ToolStripProgressBar ProgressBar {
+ get { return progressBar; }
+ set { progressBar = value; }
+ }
+
+ ///
+ /// Represents the current buffer of the editor.
+ ///
+ public BufferManager Buffer {
+ get { return buffer; }
+ }
+
+ ///
+ /// Offers access to the current selection
+ ///
+ public SelectionManager Selection {
+ get { return selection; }
+ }
+
+ ///
+ /// Represents the undo stack of the editor.
+ ///
+ public UndoManager UndoStack {
+ get { return undoStack; }
+ }
+
+ new public bool Enabled {
+ get { return base.Enabled; }
+ set {
+ if (this.InvokeRequired) {
+ base.Enabled = this.VScrollBar.Enabled = this.HexView.Enabled = this.TextView.Enabled = this.Side.Enabled = this.Header.Enabled = value;
+ } else {
+ base.Enabled = this.VScrollBar.Enabled = this.HexView.Enabled = this.TextView.Enabled = this.Side.Enabled = this.Header.Enabled = value;
+ }
+ }
+ }
+
+ ///
+ /// Returns the name of the currently loaded file.
+ ///
+ public string FileName
+ {
+ get { return fileName; }
+ set { fileName = value; }
+ }
+
+ ///
+ /// Property for future use to allow user to select encoding.
+ ///
+ /// Currently not in use.
+ public Encoding Encoding {
+ get { return encoding; }
+ set { encoding = value; }
+ }
+
+ ///
+ /// The font used in the hex editor.
+ ///
+ new public Font Font {
+ get { return font; }
+ set {
+ font = value;
+ underscorewidth = MeasureStringWidth(this.CreateGraphics(), "_", this.Font);
+ underscorewidth3 = underscorewidth * 3;
+ fontheight = GetFontHeight(this.Font);
+ this.Invalidate();
+ }
+ }
+
+ ///
+ /// The ViewMode used in the hex editor.
+ ///
+ public ViewMode ViewMode
+ {
+ get { return viewMode; }
+ set {
+ viewMode = value;
+ SetViews();
+
+ this.headertext = GetHeaderText();
+
+ this.Invalidate();
+ }
+ }
+
+ ///
+ /// "Auto-fit width" setting.
+ ///
+ public bool FitToWindowWidth
+ {
+ get { return fitToWindowWidth; }
+ set {
+ fitToWindowWidth = value;
+ if (value) this.BytesPerLine = CalculateMaxBytesPerLine();
+ }
+ }
+
+ ///
+ /// Gets or sets how many bytes (chars) are displayed per line.
+ ///
+ public int BytesPerLine
+ {
+ get { return bytesPerLine; }
+ set {
+ if (value < 1) value = 1;
+ if (value > CalculateMaxBytesPerLine()) value = CalculateMaxBytesPerLine();
+ bytesPerLine = value;
+ SetViews();
+
+ this.headertext = GetHeaderText();
+
+ this.Invalidate();
+ }
+ }
+
+ ///
+ /// Generates the current header text
+ ///
+ /// the header text
+ string GetHeaderText()
+ {
+ StringBuilder text = new StringBuilder();
+ for (int i = 0; i < this.BytesPerLine; i++) {
+ switch (this.ViewMode) {
+ case ViewMode.Decimal:
+ text.Append(' ', 3 - GetLength(i));
+ text.Append(i.ToString());
+ break;
+ case ViewMode.Hexadecimal:
+ text.Append(' ', 3 - string.Format("{0:X}", i).Length);
+ text.AppendFormat("{0:X}", i);
+ break;
+ case ViewMode.Octal:
+ int tmp = i;
+ string num = "";
+ if (tmp == 0) num = "0";
+ while (tmp != 0)
+ {
+ num = (tmp % 8).ToString() + num;
+ tmp = (int)(tmp / 8);
+ }
+ text.Append(' ', 3 - num.Length);
+ text.Append(num);
+ break;
+ }
+ }
+
+ return text.ToString();
+ }
+ #endregion
+
+ #region MouseActions/Focus/ScrollBar
+ ///
+ /// Used to update the scrollbar.
+ ///
+ void AdjustScrollBar()
+ {
+ int linecount = this.GetMaxLines();
+
+ if (linecount > GetMaxVisibleLines()) {
+ // Set Vertical scrollbar
+ VScrollBar.Enabled = true;
+ VScrollBar.Maximum = linecount - 1;
+ VScrollBar.Minimum = 0;
+ } else {
+ VScrollBar.Value = 0;
+ VScrollBar.Enabled = false;
+ }
+ }
+
+ ///
+ /// Handles the vertical scrollbar.
+ ///
+ void VScrollBarScroll(object sender, ScrollEventArgs e)
+ {
+ SetViews();
+ this.topline = VScrollBar.Value;
+ Point pos = GetPositionForOffset(caret.Offset, charwidth);
+ caret.SetToPosition(pos);
+
+ this.Invalidate();
+ }
+
+ ///
+ /// Handles the mouse wheel
+ ///
+ protected override void OnMouseWheel(MouseEventArgs e)
+ {
+ base.OnMouseWheel(e);
+
+ if (!this.VScrollBar.Enabled) return;
+
+ int delta = -(e.Delta / 3 / 10);
+ int oldvalue = 0;
+
+ if ((VScrollBar.Value + delta) > VScrollBar.Maximum) {
+ oldvalue = VScrollBar.Value;
+ VScrollBar.Value = VScrollBar.Maximum;
+ this.VScrollBarScroll(null, new ScrollEventArgs(ScrollEventType.Last, oldvalue, VScrollBar.Value, ScrollOrientation.VerticalScroll));
+ } else if ((VScrollBar.Value + delta) < VScrollBar.Minimum) {
+ oldvalue = VScrollBar.Value;
+ VScrollBar.Value = 0;
+ this.VScrollBarScroll(null, new ScrollEventArgs(ScrollEventType.First, oldvalue, VScrollBar.Value, ScrollOrientation.VerticalScroll));
+ } else {
+ oldvalue = VScrollBar.Value;
+ VScrollBar.Value += delta;
+ if (delta > 0) this.VScrollBarScroll(null, new ScrollEventArgs(ScrollEventType.SmallIncrement, oldvalue, VScrollBar.Value, ScrollOrientation.VerticalScroll));
+ if (delta < 0) this.VScrollBarScroll(null, new ScrollEventArgs(ScrollEventType.SmallDecrement, oldvalue, VScrollBar.Value, ScrollOrientation.VerticalScroll));
+ }
+ }
+
+ ///
+ /// Handles when the hexeditor was click (hexview)
+ ///
+ void HexViewMouseClick(object sender, MouseEventArgs e)
+ {
+ this.Focus();
+ hexViewFocus = true;
+ textViewFocus = false;
+ this.charwidth = 3;
+ this.caretwidth = 1;
+ if (!insertmode) caretwidth = underscorewidth3;
+
+ caret.Create(this.HexView, caretwidth, fontheight);
+
+ if (e.Button != MouseButtons.Right) {
+ if (!moved) {
+ selection.HasSomethingSelected = false;
+ selectionmode = false;
+ } else {
+ moved = false;
+ return;
+ }
+ } else {
+ this.Invalidate();
+ }
+ caret.Offset = this.GetOffsetForPosition(e.Location, 3);
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, 3));
+
+ this.Invalidate();
+ caret.Show();
+ }
+
+ ///
+ /// Handles when the hexeditor was click (textview)
+ ///
+ void TextViewMouseClick(object sender, MouseEventArgs e)
+ {
+ this.Focus();
+ hexinputmode = false;
+ hexViewFocus = false;
+ textViewFocus = true;
+ this.charwidth = 1;
+ this.caretwidth = 1;
+ if (!insertmode) caretwidth = underscorewidth;
+ caret.Create(this.TextView, caretwidth, fontheight);
+
+ if (e.Button != MouseButtons.Right) {
+ if (!moved) {
+ selection.HasSomethingSelected = false;
+ selectionmode = false;
+ } else {
+ moved = false;
+ return;
+ }
+ }
+
+ this.Focus();
+ hexinputmode = false;
+ hexViewFocus = false;
+ textViewFocus = true;
+ this.charwidth = 1;
+ this.caretwidth = 1;
+ if (!insertmode) caretwidth = underscorewidth;
+ caret.Create(this.TextView, caretwidth, fontheight);
+ caret.Offset = this.GetOffsetForPosition(e.Location, 1);
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, 1));
+ this.Invalidate();
+ caret.Show();
+ }
+ #endregion
+
+ #region Painters
+ ///
+ /// General painting, using double buffering.
+ ///
+ void HexEditPaint(object sender, PaintEventArgs e)
+ {
+ // Refresh selection.
+ CalculateSelectionRegions();
+
+ // Paint using double buffering for better painting!
+
+ // Bitmaps for painting
+ Bitmap Header = new Bitmap(this.Width, this.Height, this.Header.CreateGraphics());
+ Bitmap Side = new Bitmap(this.Side.Width, this.Side.Height, this.Side.CreateGraphics());
+ Bitmap Hex = new Bitmap(this.HexView.Width, this.HexView.Height, this.HexView.CreateGraphics());
+ Bitmap Text = new Bitmap(this.TextView.Width, this.TextView.Height, this.TextView.CreateGraphics());
+
+ // Do painting.
+ PaintHex(Graphics.FromImage(Hex), VScrollBar.Value);
+ PaintOffsetNumbers(Graphics.FromImage(Side), VScrollBar.Value);
+ PaintHeader(Graphics.FromImage(Header));
+ PaintText(Graphics.FromImage(Text), VScrollBar.Value);
+ PaintPointer(Graphics.FromImage(Hex), Graphics.FromImage(Text));
+ PaintSelection(Graphics.FromImage(Hex), Graphics.FromImage(Text), true);
+
+ // Calculate views and reset scrollbar.
+ SetViews();
+ AdjustScrollBar();
+
+ // Paint on device ...
+ this.Header.CreateGraphics().DrawImageUnscaled(Header, 0, 0);
+ this.Side.CreateGraphics().DrawImageUnscaled(Side, 0, 0);
+ this.HexView.CreateGraphics().DrawImageUnscaled(Hex, 0, 0);
+ this.TextView.CreateGraphics().DrawImageUnscaled(Text, 0, 0);
+
+ GC.Collect();
+ }
+
+ ///
+ /// Draws the header text ("Offset 0 1 2 3 ...")
+ ///
+ /// The graphics device to draw on.
+ void PaintHeader(System.Drawing.Graphics g)
+ {
+ g.Clear(Color.White);
+ TextRenderer.DrawText(g, headertext,
+ this.Font, new Rectangle(1, 1, this.HexView.Width + 5, fontheight),
+ Color.Blue, this.BackColor, TextFormatFlags.Left & TextFormatFlags.Top);
+ }
+
+ ///
+ /// Draws the offset numbers for each visible line.
+ ///
+ /// The graphics device to draw on.
+ /// The top line to start.
+ void PaintOffsetNumbers(System.Drawing.Graphics g, int top)
+ {
+ g.Clear(Color.White);
+ string text = String.Empty;
+ int count = top + this.GetMaxVisibleLines();
+ string tmpcls = String.Empty;
+
+ StringBuilder builder = new StringBuilder("Offset\n0\n");
+
+ for (int i = top; i < count; i++) {
+ if (i == top) builder = new StringBuilder("Offset\n");
+
+ if ((i * this.BytesPerLine) <= this.buffer.BufferSize) {
+ switch (this.ViewMode) {
+ case ViewMode.Decimal:
+ builder.AppendLine((i * this.BytesPerLine).ToString());
+ if (string.IsNullOrEmpty(tmpcls)) tmpcls = (i * this.BytesPerLine).ToString();
+ break;
+ case ViewMode.Hexadecimal:
+ builder.AppendFormat("{0:X}", i * this.BytesPerLine);
+ builder.AppendLine();
+ if (string.IsNullOrEmpty(tmpcls)) tmpcls = string.Format("{0:X}", i * this.BytesPerLine);
+ break;
+ case ViewMode.Octal:
+ StringBuilder num = new StringBuilder();
+ int tmp = i * this.BytesPerLine;
+ if (tmp == 0) num.Append("0");
+ while (tmp != 0) {
+ num.Insert(0, (tmp % 8).ToString());
+ tmp = (int)(tmp / 8);
+ }
+ builder.AppendLine(num.ToString());
+ if (string.IsNullOrEmpty(tmpcls)) tmpcls = num.ToString();
+ break;
+ }
+ }
+ }
+
+ text = builder.ToString();
+ builder = null;
+
+ TextRenderer.DrawText(g, text, this.Font, new Rectangle(0, 0, this.Side.Width, this.Side.Height), Color.Blue, this.BackColor, TextFormatFlags.Right);
+ }
+
+ ///
+ /// Draws the hexadecimal view of the data.
+ ///
+ /// The graphics device to draw on.
+ /// The top line to start.
+ void PaintHex(System.Drawing.Graphics g, int top)
+ {
+ g.Clear(Color.White);
+ string text = String.Empty;
+
+ int offset = GetOffsetForLine(top);
+
+ for (int i = 0; i < GetMaxVisibleLines(); i++) {
+ string line = GetHex(buffer.GetBytes(offset, this.BytesPerLine));
+
+ if (line == String.Empty) {
+ text += new string(' ', this.BytesPerLine * 3) + "\n";
+ } else if (line.Length < this.BytesPerLine * 3) {
+ text += line + new string(' ', this.BytesPerLine * 3 - line.Length) + "\n";
+ } else {
+ text += line + "\n";
+ }
+ offset = GetOffsetForLine(top + i + 1);
+ }
+
+ TextRenderer.DrawText(g, text, this.Font, new Rectangle(0, 0, this.HexView.Width, this.HexView.Height), this.ForeColor, this.BackColor, TextFormatFlags.Left & TextFormatFlags.Top);
+ }
+
+ ///
+ /// Draws the normal text view of the data.
+ ///
+ /// The graphics device to draw on.
+ /// The top line to start.
+ void PaintText(System.Drawing.Graphics g, int top)
+ {
+ g.Clear(Color.White);
+
+ int offset = GetOffsetForLine(top);
+
+ StringBuilder builder = new StringBuilder();
+
+ for (int i = 0; i < GetMaxVisibleLines(); i++) {
+ builder.AppendLine(GetText(buffer.GetBytes(offset, this.BytesPerLine)));
+ offset = GetOffsetForLine(top + i + 1);
+ }
+ TextRenderer.DrawText(g, builder.ToString(), this.Font, new Point(0, 0), this.ForeColor, this.BackColor);
+ }
+
+ ///
+ /// Draws a pointer to show the cursor in the opposite view panel.
+ ///
+ /// the graphics device for the hex view panel
+ /// the graphics device for the text view panel
+ void PaintPointer(System.Drawing.Graphics hexView, System.Drawing.Graphics textView)
+ {
+ // Paint a rectangle as a pointer in the view without the focus ...
+ if (selection.HasSomethingSelected) return;
+ if (hexViewFocus) {
+ Point pos = this.GetPositionForOffset(caret.Offset, 1);
+ if (hexinputmode) pos = this.GetPositionForOffset(caret.Offset - 1, 1);
+ Size size = new Size(underscorewidth, fontheight);
+ Pen p = new Pen(Color.Black, 1f);
+ p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
+ textView.DrawRectangle(p, new Rectangle(pos, size));
+ } else if (textViewFocus) {
+ Point pos = this.GetPositionForOffset(caret.Offset, 3);
+ pos.Offset(0, 1);
+ Size size = new Size(underscorewidth * 2, fontheight);
+ Pen p = new Pen(Color.Black, 1f);
+ p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
+ hexView.DrawRectangle(p, new Rectangle(pos, size));
+ }
+ }
+
+ ///
+ /// Recalculates the current selection regions for drawing.
+ ///
+ void CalculateSelectionRegions()
+ {
+ ArrayList al = new ArrayList();
+
+ int lines = Math.Abs(GetLineForOffset(selection.End) - GetLineForOffset(selection.Start));
+ int start, end;
+
+ if (selection.End > selection.Start) {
+ start = selection.Start;
+ end = selection.End;
+ } else {
+ start = selection.End;
+ end = selection.Start;
+ }
+
+ int start_dummy = start;
+
+ if (start < GetOffsetForLine(topline)) {
+ start = GetOffsetForLine(topline) - 2;
+ start_dummy = GetOffsetForLine(topline - 2);
+ }
+
+ if (end > GetOffsetForLine(topline + GetMaxVisibleLines())) end = GetOffsetForLine(topline + GetMaxVisibleLines() + 1);
+
+ if (hexViewFocus)
+ {
+ if (GetLineForOffset(end) == GetLineForOffset(start)) {
+ Point pt = GetPositionForOffset(start, 3);
+ al.Add(new Rectangle(new Point(pt.X - 4, pt.Y), new Size((end - start) * underscorewidth3 + 2, fontheight)));
+ } else {
+ // First Line
+ Point pt = GetPositionForOffset(start, 3);
+ al.Add(new Rectangle(new Point(pt.X - 4, pt.Y), new Size((this.BytesPerLine - (start - this.BytesPerLine * GetLineForOffset(start))) * underscorewidth3 + 2, fontheight)));
+
+ // Lines between
+ Point pt2 = GetPositionForOffset((1 + GetLineForOffset(start)) * this.BytesPerLine, 3);
+ al.Add(new Rectangle(new Point(pt2.X - 4, pt2.Y), new Size(this.BytesPerLine * underscorewidth3 + 2, fontheight * (lines - 1) - lines + 1)));
+
+ // Last Line
+ Point pt3 = GetPositionForOffset(GetLineForOffset(end) * this.BytesPerLine, 3);
+ al.Add(new Rectangle(new Point(pt3.X - 4, pt3.Y), new Size((end - GetLineForOffset(end) * this.BytesPerLine) * underscorewidth3 + 2, fontheight)));
+ }
+
+ this.selregion = (Rectangle[])al.ToArray(typeof (Rectangle));
+
+ al.Clear();
+
+ start = start_dummy;
+
+ if (GetLineForOffset(end) == GetLineForOffset(start)) {
+ Point pt = GetPositionForOffset(start, 1);
+ al.Add(new Point(pt.X - 1, pt.Y));
+ al.Add(new Point(pt.X - 1, pt.Y + fontheight));
+ al.Add(new Point(pt.X - 1 + (end - start + 1) * underscorewidth - 8, pt.Y + fontheight));
+ al.Add(new Point(pt.X - 1 + (end - start + 1) * underscorewidth - 8, pt.Y));
+ } else {
+ // First Line
+ Point pt = GetPositionForOffset(start, 1);
+ pt = new Point(pt.X - 1, pt.Y);
+ al.Add(pt);
+ pt = new Point(pt.X, pt.Y + fontheight - 1);
+ al.Add(pt);
+
+ // Second Line
+ pt = GetPositionForOffset(GetOffsetForLine(GetLineForOffset(start) + 1), 1);
+ pt = new Point(pt.X - 1, pt.Y);
+ al.Add(pt);
+
+ //last
+ pt = GetPositionForOffset(GetOffsetForLine(GetLineForOffset(end)), 1);
+ if ((end % this.BytesPerLine) != 0) {
+ pt = new Point(pt.X - 1, pt.Y + fontheight);
+ } else {
+ pt = new Point(pt.X - 1, pt.Y + fontheight - 1);
+ }
+ al.Add(pt);
+
+ if ((end % this.BytesPerLine) != 0) {
+ //last
+ pt = GetPositionForOffset(end, 1);
+ pt = new Point(pt.X, pt.Y + fontheight);
+ al.Add(pt);
+
+ //last
+ pt = GetPositionForOffset(end, 1);
+ pt = new Point(pt.X, pt.Y);
+ al.Add(pt);
+
+ }
+
+ //last
+ pt = GetPositionForOffset(end + (this.BytesPerLine - (end % this.BytesPerLine)) - 1, 1);
+ pt = new Point(pt.X + underscorewidth, pt.Y);
+ al.Add(pt);
+
+ //last
+ pt = GetPositionForOffset(end + (this.BytesPerLine - (end % this.BytesPerLine)) - 1, 1);
+ pt = new Point(pt.X + underscorewidth, GetPositionForOffset(start, 1).Y);
+ al.Add(pt);
+ }
+
+ selpoints = (Point[])al.ToArray(typeof(Point));
+ } else if (textViewFocus) {
+ if (GetLineForOffset(end) == GetLineForOffset(start)) {
+ Point pt = GetPositionForOffset(start, 1);
+ al.Add(new Rectangle(new Point(pt.X - 4, pt.Y), new Size((end - start) * underscorewidth + 3, fontheight)));
+ } else {
+ // First Line
+ Point pt = GetPositionForOffset(start, 1);
+ al.Add(new Rectangle(new Point(pt.X - 4, pt.Y), new Size((this.BytesPerLine - (start - this.BytesPerLine * GetLineForOffset(start))) * underscorewidth + 3, fontheight)));
+
+ // Lines between
+ Point pt2 = GetPositionForOffset((1 + GetLineForOffset(start)) * this.BytesPerLine, 3);
+ al.Add(new Rectangle(new Point(pt2.X - 4, pt2.Y), new Size(this.BytesPerLine * underscorewidth + 3, fontheight * (lines - 1) - lines + 1)));
+
+ // Last Line
+ Point pt3 = GetPositionForOffset(GetLineForOffset(end) * this.BytesPerLine, 1);
+ al.Add(new Rectangle(new Point(pt3.X - 4, pt3.Y), new Size((end - GetLineForOffset(end) * this.BytesPerLine) * underscorewidth + 3, fontheight)));
+ }
+
+ selregion = (Rectangle[])al.ToArray(typeof(Rectangle));
+
+ al.Clear();
+
+ start = start_dummy;
+
+ if (GetLineForOffset(end) == GetLineForOffset(start)) {
+ Point pt = GetPositionForOffset(start, 3);
+ al.Add(new Point(pt.X - 1, pt.Y));
+ al.Add(new Point(pt.X - 1, pt.Y + fontheight));
+ al.Add(new Point(pt.X - 1 + (end - start) * underscorewidth3 - 5, pt.Y + fontheight));
+ al.Add(new Point(pt.X - 1 + (end - start) * underscorewidth3 - 5, pt.Y));
+ } else {
+ // First Line
+ Point pt = GetPositionForOffset(start, 3);
+ pt = new Point(pt.X - 1, pt.Y);
+ al.Add(pt);
+ pt = new Point(pt.X, pt.Y + fontheight - 1);
+ al.Add(pt);
+
+ // Second Line
+ pt = GetPositionForOffset(GetOffsetForLine(GetLineForOffset(start) + 1), 3);
+ pt = new Point(pt.X - 1, pt.Y);
+ al.Add(pt);
+
+ //last
+ pt = GetPositionForOffset(GetOffsetForLine(GetLineForOffset(end)), 3);
+ if ((end % this.BytesPerLine) != 0) {
+ pt = new Point(pt.X - 1, pt.Y + fontheight);
+ } else {
+ pt = new Point(pt.X - 1, pt.Y + fontheight - 1);
+ }
+ al.Add(pt);
+
+ if ((end % this.BytesPerLine) != 0) {
+
+ //last
+ pt = GetPositionForOffset(end, 3);
+ pt = new Point(pt.X - 5, pt.Y + fontheight);
+ al.Add(pt);
+
+ //last
+ pt = GetPositionForOffset(end, 3);
+ pt = new Point(pt.X - 5, pt.Y);
+ al.Add(pt);
+ }
+
+ //last
+ pt = GetPositionForOffset(end + (this.BytesPerLine - (end % this.BytesPerLine)) - 1, 3);
+ pt = new Point(pt.X - 5 + underscorewidth3, pt.Y);
+ al.Add(pt);
+
+ //last
+ pt = GetPositionForOffset(end + (this.BytesPerLine - (end % this.BytesPerLine)) - 1, 3);
+ pt = new Point(pt.X - 5 + underscorewidth3, GetPositionForOffset(start, 3).Y);
+ al.Add(pt);
+ }
+
+ selpoints = (Point[])al.ToArray(typeof(Point));
+ }
+ }
+
+ ///
+ /// Draws the current selection
+ ///
+ /// The graphics device for the hex view panel
+ /// The graphics device for the text view panel
+ /// If true the marker is painted, otherwise not.
+ void PaintSelection(Graphics hexView, Graphics textView, bool paintMarker)
+ {
+ if (!selection.HasSomethingSelected) return;
+
+ int lines = Math.Abs(GetLineForOffset(selection.End) - GetLineForOffset(selection.Start)) + 1;
+ int start, end;
+
+ if (selection.End > selection.Start) {
+ start = selection.Start;
+ end = selection.End;
+ } else {
+ start = selection.End;
+ end = selection.Start;
+ }
+
+ if (start > GetOffsetForLine(topline + GetMaxVisibleLines())) return;
+
+ if (start < GetOffsetForLine(topline)) start = GetOffsetForLine(topline) - 2;
+ if (end > GetOffsetForLine(topline + GetMaxVisibleLines())) end = GetOffsetForLine(topline + GetMaxVisibleLines() + 1);
+
+ if (hexViewFocus) {
+ StringBuilder builder = new StringBuilder();
+
+ for (int i = GetLineForOffset(start) + 1; i < GetLineForOffset(end); i++) {
+ builder.AppendLine(GetLineHex(i));
+ }
+
+ if (selregion.Length == 3) {
+ TextRenderer.DrawText(hexView, GetHex(buffer.GetBytes(start, this.BytesPerLine)), this.Font, (Rectangle)selregion[0], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ TextRenderer.DrawText(hexView, builder.ToString(), this.Font, (Rectangle)selregion[1], Color.White, SystemColors.Highlight, TextFormatFlags.Left);
+ TextRenderer.DrawText(hexView, GetLineHex(GetLineForOffset(end)), this.Font, (Rectangle)selregion[2], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ } else if (selregion.Length == 2) {
+ TextRenderer.DrawText(hexView, GetHex(buffer.GetBytes(start, this.BytesPerLine)), this.Font, (Rectangle)selregion[0], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ TextRenderer.DrawText(hexView, GetLineHex(GetLineForOffset(end)), this.Font, (Rectangle)selregion[1], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ } else {
+ TextRenderer.DrawText(hexView, GetHex(buffer.GetBytes(start, this.BytesPerLine)), this.Font, (Rectangle)selregion[0], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ }
+
+ if (!paintMarker) return;
+
+ if ((selregion.Length > 1) && ((int)(Math.Abs(end - start)) <= this.BytesPerLine)) {
+ if (selpoints.Length < 8) return;
+ textView.DrawPolygon(Pens.Black, new Point[] {selpoints[0], selpoints[1], selpoints[6], selpoints[7]});
+ textView.DrawPolygon(Pens.Black, new Point[] {selpoints[4], selpoints[5], selpoints[2], selpoints[3]});
+ } else {
+ textView.DrawPolygon(Pens.Black, selpoints);
+ }
+ } else if (textViewFocus) {
+ StringBuilder builder = new StringBuilder();
+
+ for (int i = GetLineForOffset(start) + 1; i < GetLineForOffset(end); i++) {
+ builder.AppendLine(GetLineText(i));
+ }
+
+ if (selregion.Length == 3) {
+ TextRenderer.DrawText(textView, GetText(buffer.GetBytes(start, this.BytesPerLine)), this.Font, (Rectangle)selregion[0], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ TextRenderer.DrawText(textView, builder.ToString(), this.Font, (Rectangle)selregion[1], Color.White, SystemColors.Highlight, TextFormatFlags.Left);
+ TextRenderer.DrawText(textView, GetLineText(GetLineForOffset(end)), this.Font, (Rectangle)selregion[2], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ } else if (selregion.Length == 2) {
+ TextRenderer.DrawText(textView, GetText(buffer.GetBytes(start, this.BytesPerLine)), this.Font, (Rectangle)selregion[0], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ TextRenderer.DrawText(textView, GetLineText(GetLineForOffset(end)), this.Font, (Rectangle)selregion[1], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ } else {
+ TextRenderer.DrawText(textView, GetText(buffer.GetBytes(start, this.BytesPerLine)), this.Font, (Rectangle)selregion[0], Color.White, SystemColors.Highlight, TextFormatFlags.Left & TextFormatFlags.SingleLine);
+ }
+
+ if (!paintMarker) return;
+ if ((selregion.Length > 1) && ((int)(Math.Abs(end - start)) <= this.BytesPerLine)) {
+ hexView.DrawPolygon(Pens.Black, new Point[] {selpoints[0], selpoints[1], selpoints[6], selpoints[7]});
+ hexView.DrawPolygon(Pens.Black, new Point[] {selpoints[4], selpoints[5], selpoints[2], selpoints[3]});
+ } else {
+ hexView.DrawPolygon(Pens.Black, selpoints);
+ }
+ }
+ }
+ #endregion
+
+ #region Undo/Redo
+ /*
+ * Undo/Redo handling for the buffer.
+ * */
+ public void Redo()
+ {
+ EventArgs e2 = new EventArgs();
+ OnDocumentChanged(e2);
+
+ UndoStep step = undoStack.Redo(ref buffer);
+ hexinputmode = false;
+ hexinputmodepos = 0;
+ selection.Clear();
+ if (step != null) caret.SetToPosition(GetPositionForOffset(step.Start, this.charwidth));
+ this.Invalidate();
+ }
+
+ public void Undo()
+ {
+ EventArgs e2 = new EventArgs();
+ OnDocumentChanged(e2);
+
+ UndoStep step = undoStack.Undo(ref buffer);
+ hexinputmode = false;
+ hexinputmodepos = 0;
+ selection.Clear();
+ if (step != null) {
+ int offset = step.Start;
+ if (offset > buffer.BufferSize) offset = buffer.BufferSize;
+ caret.SetToPosition(GetPositionForOffset(offset, this.charwidth));
+ }
+ this.Invalidate();
+ }
+
+ public bool CanUndo {
+ get { return undoStack.CanUndo; }
+ }
+
+ public bool CanRedo {
+ get { return undoStack.CanRedo; }
+ }
+ #endregion
+
+ #region Selection
+ /*
+ * Selection handling
+ * */
+ public void SetSelection(int start, int end)
+ {
+ if (start > buffer.BufferSize) start = buffer.BufferSize;
+ if (start < 0) start = 0;
+ selection.Start = start;
+ if (end > buffer.BufferSize) end = buffer.BufferSize;
+ selection.End = end;
+ selection.HasSomethingSelected = true;
+ hexinputmode = false;
+ hexinputmodepos = 0;
+
+ CalculateSelectionRegions();
+
+ this.Invalidate();
+ }
+
+ public bool HasSelection {
+ get { return selection.HasSomethingSelected; }
+ }
+
+ public void SelectAll()
+ {
+ SetSelection(0, this.buffer.BufferSize);
+ }
+ #endregion
+
+ #region Clipboard Actions
+ /*
+ * Clipboard handling
+ * */
+ public string Copy()
+ {
+ return selection.SelectionText;
+ }
+
+ public void Paste(string text)
+ {
+ if (caret.Offset > buffer.BufferSize) caret.Offset = buffer.BufferSize;
+ if (selection.HasSomethingSelected) {
+ byte[] old = selection.GetSelectionBytes();
+ int start = selection.Start;
+
+ if (selection.Start > selection.End) start = selection.End;
+
+ buffer.RemoveBytes(start, Math.Abs(selection.End - selection.Start));
+
+ buffer.SetBytes(start, this.Encoding.GetBytes(text.ToCharArray()), false);
+ UndoAction action = UndoAction.Overwrite;
+
+ undoStack.AddUndoStep(new UndoStep(this.Encoding.GetBytes(text.ToCharArray()), old, caret.Offset, action));
+
+ caret.Offset = start + ClipboardManager.Paste().Length;
+ selection.Clear();
+ } else {
+ buffer.SetBytes(caret.Offset, this.Encoding.GetBytes(text.ToCharArray()), false);
+ UndoAction action = UndoAction.Remove;
+
+ undoStack.AddUndoStep(new UndoStep(this.Encoding.GetBytes(text.ToCharArray()), null, caret.Offset, action));
+
+ caret.Offset += ClipboardManager.Paste().Length;
+ }
+ if (GetLineForOffset(caret.Offset) < this.topline) this.topline = GetLineForOffset(caret.Offset);
+ if (GetLineForOffset(caret.Offset) > this.topline + this.GetMaxVisibleLines() - 2) this.topline = GetLineForOffset(caret.Offset) - this.GetMaxVisibleLines() + 2;
+ if (this.topline < 0) this.topline = 0;
+ if (this.topline > VScrollBar.Maximum) {
+ AdjustScrollBar();
+ if (this.topline > VScrollBar.Maximum) this.topline = VScrollBar.Maximum;
+ }
+ VScrollBar.Value = this.topline;
+ this.Invalidate();
+
+ EventArgs e2 = new EventArgs();
+ OnDocumentChanged(e2);
+ }
+
+ public void Delete()
+ {
+ if (hexinputmode) return;
+ if (selection.HasSomethingSelected) {
+ byte[] old = selection.GetSelectionBytes();
+ buffer.RemoveBytes(selection.Start, Math.Abs(selection.End - selection.Start));
+ caret.Offset = selection.Start;
+
+ UndoAction action = UndoAction.Add;
+
+ undoStack.AddUndoStep(new UndoStep(old, null, selection.Start, action));
+
+ selection.Clear();
+ }
+ this.Invalidate();
+ caret.Show();
+
+ EventArgs e2 = new EventArgs();
+ OnDocumentChanged(e2);
+ }
+ #endregion
+
+ ///
+ /// Indicates either the hex or text view has the focus.
+ ///
+ public bool HasFocus {
+ get { return this.hexViewFocus | this.textViewFocus; }
+ }
+
+ #region TextProcessing
+ ///
+ /// Generates a string out of a byte array. Unprintable chars are replaced by a ".".
+ ///
+ /// An array of bytes to convert to a string.
+ /// A string containing all bytes in the byte array.
+ string GetText(byte[] bytes)
+ {
+ for (int i = 0; i < bytes.Length; i++) {
+ if (bytes[i] < 32) bytes[i] = 46;
+ }
+
+ string text = this.Encoding.GetString(bytes);
+ return text.Replace("&", "&&");
+ }
+
+ ///
+ /// Gets the text from a line.
+ ///
+ /// The line number to get the text from.
+ /// A string, which contains the text on the given line.
+ string GetLineText(int line)
+ {
+ return GetText(buffer.GetBytes(GetOffsetForLine(line), this.BytesPerLine));
+ }
+
+ ///
+ /// Returns the text from a line in hex.
+ ///
+ /// The line number to get the text from.
+ /// A string, which contains the text on the given line in hex representation.
+ string GetLineHex(int line)
+ {
+ return GetHex(buffer.GetBytes(GetOffsetForLine(line), this.BytesPerLine));
+ }
+
+ ///
+ /// Converts a byte[] to its string representation.
+ ///
+ /// An array of bytes to convert
+ /// The string representation of the byte[]
+ static string GetHex(byte[] bytes)
+ {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < bytes.Length; i++) {
+ string num = string.Format("{0:X}", bytes[i]);
+ if (num.Length < 2) {
+ builder.Append("0" + num + " ");
+ } else {
+ builder.Append(num + " ");
+ }
+ }
+ return builder.ToString();
+ }
+ #endregion
+
+ ///
+ /// Redraws the control after resizing.
+ ///
+ void HexEditSizeChanged(object sender, EventArgs e)
+ {
+ if (this.FitToWindowWidth) this.BytesPerLine = CalculateMaxBytesPerLine();
+
+ this.Invalidate();
+ SetViews();
+ }
+
+ ///
+ /// Resets the current viewpanels to fit the new sizes and settings.
+ ///
+ void SetViews()
+ {
+ int sidetext = this.GetMaxLines() * this.BytesPerLine;
+ int textwidth = MeasureStringWidth(this.TextView.CreateGraphics(), new string('_', this.BytesPerLine + 1), this.Font);
+ int hexwidth = underscorewidth3 * this.BytesPerLine;
+ int top = HexView.Top;
+ this.HexView.Top = fontheight - 1;
+ this.TextView.Top = fontheight - 1;
+ this.Header.Top = 0;
+ this.Header.Left = HexView.Left - 10;
+ this.HexView.Height = this.Height - fontheight + top - 18;
+ this.TextView.Height = this.Height - fontheight + top - 18;
+
+ string st = String.Empty;
+
+ switch (this.ViewMode) {
+ case ViewMode.Hexadecimal:
+ if (sidetext.ToString().Length < 8) {
+ st = " Offset";
+ } else {
+ st = " " + string.Format("{0:X}", sidetext);
+ }
+ break;
+ case ViewMode.Octal:
+ if (sidetext.ToString().Length < 8) {
+ st = " Offset";
+ } else {
+ int tmp = sidetext;
+ while (tmp != 0) {
+ st = (tmp % 8).ToString() + st;
+ tmp = (int)(tmp / 8);
+ }
+ }
+
+ st = " " + st;
+ break;
+ case ViewMode.Decimal:
+ if (sidetext.ToString().Length < 8) {
+ st = " Offset";
+ } else {
+ st = " " + sidetext.ToString();
+ }
+ break;
+ }
+
+ this.Side.Width = MeasureStringWidth(this.Side.CreateGraphics(), st, this.Font);
+ this.Side.Left = 0;
+ this.HexView.Left = this.Side.Width + 10;
+
+ if ((textwidth + hexwidth + 25) > this.Width - this.Side.Width) {
+ this.HexView.Width = this.Width - this.Side.Width - textwidth - 30;
+ this.TextView.Width = textwidth;
+ this.TextView.Left = this.Width - textwidth - 16;
+ } else {
+ this.HexView.Width = hexwidth;
+ this.TextView.Width = textwidth;
+ this.TextView.Left = hexwidth + this.HexView.Left + 20;
+ }
+
+ this.caret.SetToPosition(GetPositionForOffset(this.caret.Offset, this.charwidth));
+ this.Header.Width = this.HexView.Width + 10;
+ this.Header.Height = this.fontheight;
+ AdjustScrollBar();
+ }
+
+ ///
+ /// General handling of keyboard events, for non printable keys.
+ ///
+ void HexEditKeyDown(object sender, KeyEventArgs e)
+ {
+ int start = selection.Start;
+ int end = selection.End;
+
+ if (selection.Start > selection.End) {
+ start = selection.End;
+ end = selection.Start;
+ }
+
+ if (!hexViewFocus) {
+ hexinputmode = false;
+ hexinputmodepos = 0;
+ }
+ switch (e.KeyCode) {
+ case Keys.Up:
+ case Keys.Down:
+ case Keys.Left:
+ case Keys.Right:
+ int oldoffset = caret.Offset;
+ MoveCaret(e);
+ if (GetLineForOffset(caret.Offset) < this.topline) this.topline = GetLineForOffset(caret.Offset);
+ if (GetLineForOffset(caret.Offset) > this.topline + this.GetMaxVisibleLines() - 2) this.topline = GetLineForOffset(caret.Offset) - this.GetMaxVisibleLines() + 2;
+ VScrollBar.Value = this.topline;
+ if (e.Shift) {
+ if (selection.HasSomethingSelected) {
+ int offset = caret.Offset; // set offset to caretposition
+ int oldstart = selection.Start; // copy old value
+
+ // if shift wasn't pressed before set the start position
+ if (!shiftwaspressed) { // to the current offset
+ oldstart = caret.Offset;
+ } else { // otherwise refresh the end of the selection.
+ offset = caret.Offset;
+ }
+
+ this.SetSelection(oldstart, offset);
+ } else {
+ this.SetSelection(oldoffset, caret.Offset);
+ }
+ selection.HasSomethingSelected = true;
+ selectionmode = true;
+ } else {
+ selection.Clear();
+ selectionmode = false;
+ }
+ handled = true;
+ break;
+ case Keys.Insert:
+ insertmode = !insertmode;
+ if (!insertmode) {
+ if (this.textViewFocus) caretwidth = underscorewidth;
+ if (this.hexViewFocus) caretwidth = underscorewidth * 2;
+ } else {
+ caretwidth = 1;
+ }
+
+ Control currentinput;
+
+ if (hexViewFocus & !textViewFocus) {
+ currentinput = (Control)this.HexView;
+ } else if (!hexViewFocus & textViewFocus) {
+ currentinput = (Control)this.TextView;
+ } else {
+ return;
+ }
+ caret.Create(currentinput, caretwidth, fontheight);
+
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ caret.Show();
+ handled = true;
+ break;
+ case Keys.Back:
+ handled = true;
+ if (hexinputmode) return;
+ if (selection.HasSomethingSelected) {
+ byte[] bytes = selection.GetSelectionBytes();
+
+ buffer.RemoveBytes(start, Math.Abs(end - start));
+ caret.Offset = start;
+
+ UndoAction action = UndoAction.Add;
+
+ undoStack.AddUndoStep(new UndoStep(bytes, null, start, action));
+
+ selection.Clear();
+ } else {
+ byte b = buffer.GetByte(caret.Offset - 1);
+
+ if (buffer.RemoveByte(caret.Offset - 1))
+ {
+ if (caret.Offset > -1) caret.Offset--;
+ if (GetLineForOffset(caret.Offset) < this.topline) this.topline = GetLineForOffset(caret.Offset);
+ if (GetLineForOffset(caret.Offset) > this.topline + this.GetMaxVisibleLines() - 2) this.topline = GetLineForOffset(caret.Offset) - this.GetMaxVisibleLines() + 2;
+
+ UndoAction action = UndoAction.Add;
+
+ undoStack.AddUndoStep(new UndoStep(new byte[] {b}, null, caret.Offset, action));
+ }
+ }
+
+ EventArgs e2 = new EventArgs();
+ OnDocumentChanged(e2);
+ break;
+ case Keys.Delete:
+ handled = true;
+ if (hexinputmode) return;
+ if (selection.HasSomethingSelected) {
+ byte[] old = selection.GetSelectionBytes();
+ buffer.RemoveBytes(start, Math.Abs(selection.End - selection.Start));
+ caret.Offset = selection.Start;
+
+ UndoAction action = UndoAction.Add;
+
+ undoStack.AddUndoStep(new UndoStep(old, null, selection.Start, action));
+
+ selection.Clear();
+ } else {
+ byte b = buffer.GetByte(caret.Offset);
+
+ buffer.RemoveByte(caret.Offset);
+
+ UndoAction action = UndoAction.Remove;
+
+ undoStack.AddUndoStep(new UndoStep(new byte[] {b}, null, caret.Offset, action));
+
+ if (GetLineForOffset(caret.Offset) < this.topline) this.topline = GetLineForOffset(caret.Offset);
+ if (GetLineForOffset(caret.Offset) > this.topline + this.GetMaxVisibleLines() - 2) this.topline = GetLineForOffset(caret.Offset) - this.GetMaxVisibleLines() + 2;
+ }
+ caret.Show();
+
+ e2 = new EventArgs();
+ OnDocumentChanged(e2);
+ break;
+ case Keys.CapsLock:
+ case Keys.ShiftKey:
+ case Keys.ControlKey:
+ break;
+ default:
+ byte asc = (byte)e.KeyValue;
+
+ if (e.Control) {
+ handled = true;
+ switch (asc) {
+ // Ctrl-A is pressed -> select all
+ case 65 :
+ this.SetSelection(0, buffer.BufferSize);
+ break;
+ // Ctrl-C is pressed -> copy text to ClipboardManager
+ case 67 :
+ ClipboardManager.Copy(selection.SelectionText);
+ break;
+ // Ctrl-V is pressed -> paste from ClipboardManager
+ case 86 :
+ if (ClipboardManager.ContainsText) {
+ if (caret.Offset > buffer.BufferSize) caret.Offset = buffer.BufferSize;
+ if (selection.HasSomethingSelected) {
+ byte[] old = selection.GetSelectionBytes();
+ buffer.RemoveBytes(selection.Start, Math.Abs(selection.End - selection.Start));
+
+ buffer.SetBytes(selection.Start, this.Encoding.GetBytes(ClipboardManager.Paste().ToCharArray()), false);
+ UndoAction action = UndoAction.Overwrite;
+
+ undoStack.AddUndoStep(new UndoStep(this.Encoding.GetBytes(ClipboardManager.Paste().ToCharArray()), old, caret.Offset, action));
+
+ caret.Offset = selection.Start + ClipboardManager.Paste().Length;
+ selection.Clear();
+ } else {
+ buffer.SetBytes(caret.Offset, this.Encoding.GetBytes(ClipboardManager.Paste().ToCharArray()), false);
+ UndoAction action = UndoAction.Remove;
+
+ undoStack.AddUndoStep(new UndoStep(this.Encoding.GetBytes(ClipboardManager.Paste().ToCharArray()), null, caret.Offset, action));
+
+ caret.Offset += ClipboardManager.Paste().Length;
+ }
+ if (GetLineForOffset(caret.Offset) < this.topline) this.topline = GetLineForOffset(caret.Offset);
+ if (GetLineForOffset(caret.Offset) > this.topline + this.GetMaxVisibleLines() - 2) this.topline = GetLineForOffset(caret.Offset) - this.GetMaxVisibleLines() + 2;
+ if (this.topline < 0) this.topline = 0;
+ if (this.topline > VScrollBar.Maximum) {
+ AdjustScrollBar();
+ if (this.topline > VScrollBar.Maximum) this.topline = VScrollBar.Maximum;
+ }
+ VScrollBar.Value = this.topline;
+
+ e2 = new EventArgs();
+ OnDocumentChanged(e2);
+
+ }
+ break;
+ // Ctrl-X is pressed -> cut from document
+ case 88 :
+ if (selection.HasSomethingSelected) {
+ ClipboardManager.Copy(selection.SelectionText);
+ if (selection.End < selection.Start)
+ {
+ int help = selection.End;
+ selection.End = selection.Start;
+ selection.Start = help;
+ }
+ UndoAction action = UndoAction.Add;
+
+ undoStack.AddUndoStep(new UndoStep(selection.GetSelectionBytes(), null, caret.Offset, action));
+
+ buffer.RemoveBytes(selection.Start, selection.SelectionText.Length);
+ selection.Clear();
+
+ e2 = new EventArgs();
+ OnDocumentChanged(e2);
+ }
+ break;
+ }
+ break;
+ }
+ if (hexViewFocus) {
+ ProcessHexInput(e);
+ handled = true;
+ return;
+ }
+
+ break;
+ }
+ shiftwaspressed = e.Shift;
+ if (handled) {
+ this.Invalidate();
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ caret.Show();
+ }
+ }
+
+ ///
+ /// Handling of printable keys.
+ ///
+ void HexEditKeyPress(object sender, KeyPressEventArgs e)
+ {
+ if (handled) {
+ handled = false;
+ } else {
+ byte[] old = buffer.GetBytes(caret.Offset, 1);
+ try {
+ if (selection.HasSomethingSelected) {
+ Delete();
+ buffer.SetByte(caret.Offset, (byte)e.KeyChar, !insertmode);
+ } else {
+ buffer.SetByte(caret.Offset, (byte)e.KeyChar, !insertmode);
+ }
+ } catch (System.ArgumentOutOfRangeException) {}
+ caret.Offset++;
+ if (GetLineForOffset(caret.Offset) < this.topline) this.topline = GetLineForOffset(caret.Offset);
+ if (GetLineForOffset(caret.Offset) > this.topline + this.GetMaxVisibleLines() - 2) this.topline = GetLineForOffset(caret.Offset) - this.GetMaxVisibleLines() + 2;
+ VScrollBar.Value = this.topline;
+
+ UndoAction action;
+
+ if (insertmode) {
+ action = UndoAction.Remove;
+ old = null;
+ } else {
+ action = UndoAction.Overwrite;
+ }
+
+ undoStack.AddUndoStep(new UndoStep(new byte[] {(byte)e.KeyChar}, old, caret.Offset - 1, action));
+ }
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, charwidth));
+
+ EventArgs e2 = new EventArgs();
+ OnDocumentChanged(e2);
+
+ this.Invalidate();
+ }
+
+ ///
+ /// Sets the caret according to the input.
+ ///
+ /// Keyboard input
+ void MoveCaret(KeyEventArgs input)
+ {
+ if (!input.Control) {
+ hexinputmode = false;
+ hexinputmodepos = 0;
+ }
+ switch (input.KeyCode) {
+ case Keys.Up:
+ if (caret.Offset >= this.BytesPerLine) {
+ caret.Offset -= this.BytesPerLine;
+ caret.SetToPosition(this.GetPositionForOffset(caret.Offset, this.charwidth));
+ }
+ break;
+ case Keys.Down:
+ if (caret.Offset <= this.Buffer.BufferSize - this.BytesPerLine) {
+ caret.Offset += this.BytesPerLine;
+ caret.SetToPosition(this.GetPositionForOffset(caret.Offset, this.charwidth));
+ } else {
+ caret.Offset = this.Buffer.BufferSize;
+ caret.SetToPosition(this.GetPositionForOffset(caret.Offset, this.charwidth));
+ }
+ break;
+ case Keys.Left:
+ if (caret.Offset >= 1) {
+ if (hexViewFocus) {
+ if (input.Control) {
+ hexinputmode = false;
+ if (hexinputmodepos == 0) {
+ caret.Offset--;
+ hexinputmodepos = 1;
+ hexinputmode = true;
+ } else {
+ hexinputmodepos--;
+ }
+ } else {
+ caret.Offset--;
+ }
+ } else {
+ caret.Offset--;
+ }
+ caret.SetToPosition(this.GetPositionForOffset(caret.Offset, this.charwidth));
+ }
+ break;
+ case Keys.Right:
+ if (caret.Offset <= this.Buffer.BufferSize - 1) {
+ if (hexViewFocus) {
+ if (input.Control) {
+ hexinputmode = true;
+ if (hexinputmodepos == 1) {
+ caret.Offset++;
+ hexinputmodepos = 0;
+ hexinputmode = false;
+ } else {
+ hexinputmodepos++;
+ }
+ } else {
+ caret.Offset++;
+ }
+ } else {
+ caret.Offset++;
+ }
+
+ caret.SetToPosition(this.GetPositionForOffset(caret.Offset, this.charwidth));
+ }
+ break;
+ }
+
+ }
+
+ ///
+ /// Processes only 0-9 and A-F keys and handles the special hex-inputmode.
+ ///
+ /// Keyboard input
+ void ProcessHexInput(KeyEventArgs input)
+ {
+ int start = selection.Start;
+ int end = selection.End;
+
+ if (selection.Start > selection.End) {
+ start = selection.End;
+ end = selection.Start;
+ }
+
+ if (((input.KeyValue > 47) & (input.KeyValue < 58)) | ((input.KeyValue > 64) & (input.KeyValue < 71))) {
+ hexinputmode = true;
+ if (insertmode) {
+ byte[] old;
+ if (selection.HasSomethingSelected) {
+ old = selection.GetSelectionBytes();
+
+ buffer.RemoveBytes(start, Math.Abs(end - start));
+ } else {
+ old = null;
+ }
+ string @in = "";
+ if (hexinputmodepos == 1) {
+ @in = string.Format("{0:X}", buffer.GetByte(caret.Offset));
+
+ // if @in is like 4 or A then make 04 or 0A out of it.
+ if (@in.Length == 1) @in = "0" + @in;
+
+ UndoAction action = UndoAction.Overwrite;
+
+ undoStack.AddUndoStep(new UndoStep(new byte[] {(byte)(Convert.ToInt32(@in.Remove(1) + ((char)(input.KeyValue)).ToString(), 16))}, buffer.GetBytes(caret.Offset, 1), caret.Offset, action));
+
+ @in = @in.Remove(1) + ((char)(input.KeyValue)).ToString();
+ hexinputmodepos = 0;
+ hexinputmode = false;
+
+ buffer.SetByte(caret.Offset, (byte)(Convert.ToInt32(@in, 16)), true);
+ caret.Offset++;
+
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ } else if (hexinputmodepos == 0) {
+ UndoAction action;
+
+ if (selection.HasSomethingSelected) {
+ action = UndoAction.Overwrite;
+ caret.Offset = start;
+ selection.Clear();
+ } else {
+ action = UndoAction.Remove;
+ }
+ @in = (char)(input.KeyValue) + "0";
+ if (caret.Offset > buffer.BufferSize) caret.Offset = buffer.BufferSize;
+ buffer.SetByte(caret.Offset, (byte)(Convert.ToInt32(@in, 16)), false);
+ hexinputmodepos = 1;
+
+ undoStack.AddUndoStep(new UndoStep(new byte[] {(byte)(Convert.ToInt32(@in, 16))}, old, caret.Offset, action));
+
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ }
+
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ } else {
+ UndoAction action;
+
+ string @in = "";
+ if (hexinputmodepos == 1) {
+ byte[] _old = buffer.GetBytes(caret.Offset, 1);
+ @in = string.Format("{0:X}", buffer.GetByte(caret.Offset));
+ @in = @in.Remove(1) + ((char)(input.KeyValue)).ToString();
+ hexinputmodepos = 0;
+ hexinputmode = false;
+ buffer.SetByte(caret.Offset, (byte)(Convert.ToInt32(@in, 16)), true);
+ caret.Offset++;
+
+ if (insertmode) {
+ action = UndoAction.Add;
+ _old = null;
+ } else {
+ action = UndoAction.Overwrite;
+ }
+
+ undoStack.AddUndoStep(new UndoStep(new byte[] {(byte)(Convert.ToInt32(@in, 16))}, _old, caret.Offset - 1, action));
+
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+
+ } else if (hexinputmodepos == 0) {
+ byte[] _old = buffer.GetBytes(caret.Offset, 1);
+ @in = (char)(input.KeyValue) + "0";
+ buffer.SetByte(caret.Offset, (byte)(Convert.ToInt32(@in, 16)), true);
+ hexinputmodepos = 1;
+
+ if (insertmode) {
+ action = UndoAction.Add;
+ _old = null;
+ } else {
+ action = UndoAction.Overwrite;
+ }
+
+ undoStack.AddUndoStep(new UndoStep(new byte[] {(byte)(Convert.ToInt32(@in, 16))}, _old, caret.Offset, action));
+ }
+
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ }
+
+ EventArgs e = new EventArgs();
+ OnDocumentChanged(e);
+
+ this.Invalidate();
+ }
+ }
+
+ #region file functions
+ ///
+ /// Loads a file into the editor.
+ ///
+ /// The file-info to open.
+ /// The stream to read from/write to.
+ public void LoadFile(OpenedFile file, Stream stream)
+ {
+ buffer.Load(file, stream);
+ if (this.progressBar != null) {
+ this.progressBar.Visible = false;
+ this.progressBar.Available = false;
+ this.progressBar.Value = 0;
+ }
+ //this.Cursor = Cursors.WaitCursor;
+ }
+
+ ///
+ /// Called from the BufferManager when Loading is finished.
+ ///
+ /// Currently not directly needed, because there's no thread in use to load the data.
+ internal void LoadingFinished()
+ {
+ if (this.InvokeRequired) {
+ this.Invoke (new MethodInvoker (LoadingFinished));
+ return;
+ }
+ this.FileName = fileName;
+ selection.Clear();
+ if (this.progressBar != null) {
+ this.progressBar.Visible = false;
+ this.progressBar.Available = false;
+ this.progressBar.Value = 0;
+ }
+
+ this.Side.Cursor = this.Cursor = this.Header.Cursor = Cursors.Default;
+
+ GC.Collect();
+ this.Invalidate();
+ }
+
+ ///
+ /// Saves the current buffer to a stream.
+ ///
+ public void SaveFile(OpenedFile file, Stream stream)
+ {
+ buffer.Save(file, stream);
+ }
+ #endregion
+
+ ///
+ /// Invalidates the control when the focus returns to it.
+ ///
+ private void HexEditGotFocus(object sender, EventArgs e)
+ {
+ //LoadSettings();
+ this.Invalidate();
+ }
+
+ #region selection events
+ /**
+ * Methods to control the current selection
+ * with mouse for both hex and text view.
+ * */
+
+ void TextViewMouseDown(object sender, MouseEventArgs e)
+ {
+ this.textViewFocus = true;
+ this.hexViewFocus = false;
+ this.hexinputmode = false;
+ this.hexinputmodepos = 0;
+ if (e.Button == MouseButtons.Left) {
+ if (selection.HasSomethingSelected) {
+ selection.Start = 0;
+ selection.End = 0;
+ PaintText(this.TextView.CreateGraphics(), this.topline);
+ }
+ selectionmode = true;
+ selection.Start = GetOffsetForPosition(e.Location, 1);
+ }
+
+ caret.Offset = GetOffsetForPosition(e.Location, 1);
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ caret.Show();
+ }
+
+ void TextViewMouseMove(object sender, MouseEventArgs e)
+ {
+ if ((e.Button == MouseButtons.Left) & selectionmode) {
+ int end = selection.End;
+ selection.End = GetOffsetForPosition(e.Location, 1);
+ textViewFocus = true;
+ hexViewFocus = false;
+ moved = true;
+ selection.HasSomethingSelected = true;
+ if (end != selection.End) this.Invalidate();
+
+ caret.Offset = GetOffsetForPosition(e.Location, 1);
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ caret.Show();
+ }
+ }
+
+ void TextViewMouseUp(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Right) return;
+ if (selectionmode) {
+ selection.HasSomethingSelected = true;
+ if ((selection.End == selection.Start) | ((selection.Start == 0) & (selection.End == 0))) {
+ selection.HasSomethingSelected = false;
+ selectionmode = false;
+ }
+ this.Invalidate();
+ } else {
+ if (!moved) {
+ selection.HasSomethingSelected = false;
+ selection.Start = 0;
+ selection.End = 0;
+ }
+ moved = false;
+ }
+ caret.Offset = GetOffsetForPosition(e.Location, 1);
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ caret.Show();
+
+ selectionmode = false;
+ }
+
+ void HexViewMouseDown(object sender, MouseEventArgs e)
+ {
+ this.textViewFocus = false;
+ this.hexViewFocus = true;
+ this.hexinputmode = false;
+ this.hexinputmodepos = 0;
+ if (e.Button == MouseButtons.Left) {
+ selectionmode = true;
+ selection.Start = GetOffsetForPosition(e.Location, 3);
+ selection.End = GetOffsetForPosition(e.Location, 3);
+ this.Invalidate();
+
+ caret.Offset = GetOffsetForPosition(e.Location, 3);
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ caret.Show();
+ }
+ }
+
+ void HexViewMouseMove(object sender, MouseEventArgs e)
+ {
+ if ((e.Button == MouseButtons.Left) & selectionmode) {
+ int end = selection.End;
+ selection.End = GetOffsetForPosition(e.Location, 3);
+ selection.HasSomethingSelected = true;
+ textViewFocus = false;
+ hexViewFocus = true;
+ moved = true;
+ caret.SetToPosition(GetPositionForOffset(GetOffsetForPosition(e.Location, 3), 3));
+ if (end != selection.End) this.Invalidate();
+
+ caret.Offset = GetOffsetForPosition(e.Location, 3);
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ caret.Show();
+ }
+ }
+
+ void HexViewMouseUp(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Right) return;
+
+ if (selectionmode) {
+ selection.HasSomethingSelected = true;
+ if ((selection.End == selection.Start) || ((selection.Start == 0) && (selection.End == 0))) {
+ selection.HasSomethingSelected = false;
+ selectionmode = false;
+ }
+ this.Invalidate();
+ } else {
+ if (!moved) {
+ selection.HasSomethingSelected = false;
+ selection.End = 0;
+ selection.Start = 0;
+ }
+ moved = false;
+ }
+ caret.Offset = GetOffsetForPosition(e.Location, 3);
+ caret.SetToPosition(GetPositionForOffset(caret.Offset, this.charwidth));
+ caret.Show();
+ selectionmode = false;
+ }
+ #endregion
+
+ ///
+ /// Enables the control processing key commands.
+ ///
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ switch (keyData) {
+ case Keys.Shift | Keys.Up :
+ case Keys.Shift | Keys.Down :
+ case Keys.Shift | Keys.Left :
+ case Keys.Shift | Keys.Right :
+ HexEditKeyDown(null, new KeyEventArgs(keyData));
+ return true;
+ }
+ return base.ProcessCmdKey(ref msg, keyData);
+ }
+
+ ///
+ /// Calculates the max possible bytes per line.
+ ///
+ /// Int32, containing the result
+ int CalculateMaxBytesPerLine()
+ {
+ int width = this.Width - this.Side.Width - 90;
+ int textwidth = 0, hexwidth = 0;
+ int count = 0;
+ // while the width of the textview + the width of the hexview is
+ // smaller than the width of the whole control.
+ while ((textwidth + hexwidth) < width) {
+ // update counter and recalculate the sizes
+ count++;
+ textwidth = underscorewidth * count;
+ hexwidth = underscorewidth3 * count;
+ }
+
+ return count;
+ }
+
+ ///
+ /// Calculates the offset for a position.
+ ///
+ /// The position
+ /// the width of one char, for example in the
+ /// hexview the width is 3 because one char needs 2 chars to be
+ /// displayed ("A" in text = "41 " in hex)
+ /// the offset for the position
+ int GetOffsetForPosition(Point position, int charwidth)
+ {
+ // calculate the line: vertical position (Y) divided by the height of
+ // one line (height of font = fontheight) = physical line + topline = virtual line.
+ int line = (int)Math.Truncate((double)((float)position.Y / (float)fontheight)) + topline;
+ //Debug.Print(line.ToString() + " " + ((double)((float)position.Y / (float)fontheight)).ToString());
+ if (selection.HasSomethingSelected) line++;
+ // calculate the char: horizontal position (X) divided by the width of one char
+ int ch = (int)Math.Truncate((double)(position.X / (charwidth * underscorewidth)));
+ if (ch > this.BytesPerLine) ch = this.BytesPerLine;
+ if (ch < 0) ch = 0;
+ // calculate offset
+ int offset = line * this.BytesPerLine + ch;
+
+ // check
+ if (offset < 0) return 0;
+ if (offset < this.buffer.BufferSize) {
+ return offset;
+ } else {
+ return this.buffer.BufferSize;
+ }
+ }
+
+ ///
+ /// Does the same as GetOffsetForPosition, but the other way round.
+ ///
+ /// The offset to search
+ /// the current width of one char. (Depends on the viewpanel we are using (3 in hex 1 in text view)
+ /// The Drawing.Point at which the offset is currently.
+ Point GetPositionForOffset(int offset, int charwidth)
+ {
+ int line = (int)(offset / this.BytesPerLine) - this.topline;
+ int pline = line * fontheight - 1 * (line - 1) - 1;
+ int col = (offset % this.BytesPerLine) *
+ MeasureStringWidth(this.CreateGraphics(),
+ new string('_', charwidth), this.Font) + 4;
+ if (hexinputmode && !selectionmode && !selection.HasSomethingSelected && this.insertmode) col += (hexinputmodepos * underscorewidth);
+ return new Point(col, pline);
+ }
+
+ ///
+ /// Returns the starting offset of a line.
+ ///
+ /// The line in the file, countings starts at 0.
+ /// The starting offset for a line.
+ int GetOffsetForLine(int line)
+ {
+ return line * this.BytesPerLine;
+ }
+
+ ///
+ /// Calculates the line on which the given offset is.
+ ///
+ /// The offset to look up the line for.
+ /// The line on which the given offset is.
+ /// returns 0 for first line ...
+ int GetLineForOffset(int offset)
+ {
+ int line = (int)Math.Round((double)(offset / this.BytesPerLine));
+ if ((offset != 0) & ((offset % this.BytesPerLine) == 0)) line--;
+ return line;
+ }
+
+ ///
+ /// Calculates the count of visible lines.
+ ///
+ /// The count of currently visible virtual lines.
+ int GetMaxVisibleLines()
+ {
+ return (int)(this.HexView.Height / fontheight) + 3;
+ }
+
+ ///
+ /// Calculates the count of all virtual lines in the buffer.
+ ///
+ /// Retrns 1 if the buffer is empty, otherwise the count of all virtual lines in the buffer.
+ int GetMaxLines()
+ {
+ if (buffer == null) return 1;
+ int lines = (int)(buffer.BufferSize / this.BytesPerLine);
+ if ((buffer.BufferSize % this.BytesPerLine) != 0) lines++;
+ return lines;
+ }
+
+ ///
+ /// Calculates the count of digits of a given number.
+ ///
+ /// The number to calculate
+ /// the count of digits in the number
+ static int GetLength(int number)
+ {
+ int count = 1;
+ while (number > 9) {
+ number = number / 10;
+ count++;
+ }
+ return count;
+ }
+
+ ///
+ /// Handles the context menu
+ ///
+ void HexEditControlContextMenuStripChanged(object sender, EventArgs e)
+ {
+ this.ContextMenuStrip.Closed += new ToolStripDropDownClosedEventHandler(ContextMenuStripClosed);
+ }
+
+ ///
+ /// Invalidates the control after the context menu is closed.
+ ///
+ void ContextMenuStripClosed(object sender, EventArgs e)
+ {
+ this.Invalidate();
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.resx b/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.resx
new file mode 100644
index 0000000000..767f9bda1e
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/HexEditControl.resx
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
+ 79
+
+
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/BufferManager.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/BufferManager.cs
new file mode 100644
index 0000000000..995f5d066c
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/BufferManager.cs
@@ -0,0 +1,273 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Text;
+using System.Windows.Forms;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading;
+
+using ICSharpCode.SharpDevelop;
+using ICSharpCode.Core;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Manages the data loaded into the hex editor.
+ ///
+ public class BufferManager
+ {
+ internal Control parent;
+ OpenedFile currentFile;
+ Stream stream;
+
+ ///
+ /// Currently used, but not good for really big files (like 590 MB)
+ ///
+ private ArrayList buffer;
+
+ ///
+ /// Creates a new BufferManager and attaches it to a control.
+ ///
+ /// The parent control to attach to.
+ public BufferManager(Control parent)
+ {
+ this.parent = parent;
+
+ this.buffer = new ArrayList();
+ }
+
+ ///
+ /// Cleares the whole buffer.
+ ///
+ public void Clear()
+ {
+ this.buffer.Clear();
+ parent.Invalidate();
+ GC.Collect();
+ }
+
+ ///
+ /// Loads the data from a stream.
+ ///
+ public void Load(OpenedFile file, Stream stream)
+ {
+ this.currentFile = file;
+ this.stream = stream;
+ this.buffer.Clear();
+
+ ((HexEditControl)this.parent).Enabled = false;
+
+ if (File.Exists(currentFile.FileName)) {
+ try {
+ BinaryReader reader = new BinaryReader(this.stream, System.Text.Encoding.Default);
+
+ while (reader.PeekChar() != -1) {
+ this.buffer.AddRange(reader.ReadBytes(524288));
+ UpdateProgress((int)((this.buffer.Count * 100) / reader.BaseStream.Length));
+ }
+
+ reader.Close();
+ } catch (IOException ex) {
+ MessageService.ShowError(ex, ex.Message);
+ } catch (ArgumentException ex) {
+ MessageService.ShowError(ex, ex.Message + "\n\n" + ex.StackTrace);
+ }
+ } else {
+ MessageService.ShowError(new FileNotFoundException("The file " + currentFile.FileName + " doesn't exist!", currentFile.FileName), "The file " + currentFile.FileName + " doesn't exist!");
+ }
+
+ this.parent.Invalidate();
+
+ UpdateProgress(100);
+
+ if (this.parent.InvokeRequired)
+ this.parent.Invoke(new MethodInvoker(
+ delegate() {this.parent.Cursor = Cursors.Default;}
+ ));
+ else {this.parent.Cursor = Cursors.Default;}
+
+
+ ((HexEditControl)this.parent).LoadingFinished();
+
+ ((HexEditControl)this.parent).Enabled = true;
+
+ this.parent.Invalidate();
+ }
+
+ ///
+ /// Writes all data to a stream.
+ ///
+ public void Save(OpenedFile file, Stream stream)
+ {
+ BinaryWriter writer = new BinaryWriter(stream);
+ writer.Write((byte[])this.buffer.ToArray( typeof (byte) ));
+ writer.Flush();
+ }
+
+ ///
+ /// Intern method used to load data in a separate thread.
+ ///
+ /// Currently not in use.
+ private void Load()
+ {
+ ((HexEditControl)this.parent).Enabled = false;
+
+ if (File.Exists(currentFile.FileName)) {
+ try {
+ BinaryReader reader = new BinaryReader(this.stream, System.Text.Encoding.Default);
+
+ while (reader.PeekChar() != -1) {
+ this.buffer.AddRange(reader.ReadBytes(524288));
+ UpdateProgress((int)((this.buffer.Count * 100) / reader.BaseStream.Length));
+ }
+
+ reader.Close();
+ } catch (IOException ex) {
+ MessageService.ShowError(ex, ex.Message);
+ } catch (ArgumentException ex) {
+ MessageService.ShowError(ex, ex.Message + "\n\n" + ex.StackTrace);
+ }
+ } else {
+ MessageService.ShowError(new FileNotFoundException("The file " + currentFile.FileName + " doesn't exist!", currentFile.FileName), "The file " + currentFile.FileName + " doesn't exist!");
+ }
+
+ this.parent.Invalidate();
+
+ UpdateProgress(100);
+
+ if (this.parent.InvokeRequired)
+ this.parent.Invoke(new MethodInvoker(
+ delegate() {this.parent.Cursor = Cursors.Default;}
+ ));
+
+ ((HexEditControl)this.parent).Enabled = true;
+ }
+
+ ///
+ /// Used for threading to update the processbars and stuff.
+ ///
+ /// The current percentage of the process
+ private void UpdateProgress(int percentage)
+ {
+ HexEditControl c = (HexEditControl)this.parent;
+
+ Application.DoEvents();
+
+ if (c.ProgressBar != null) {
+ if (percentage >= 100) {
+ if (c.InvokeRequired)
+ c.Invoke(new MethodInvoker(
+ delegate() {c.ProgressBar.Value = 100; c.ProgressBar.Visible = false;}
+ ));
+ else {
+ c.ProgressBar.Value = 100;
+ c.ProgressBar.Visible = false; }
+ } else {
+ if (c.InvokeRequired)
+ c.Invoke(new MethodInvoker(
+ delegate() {c.ProgressBar.Value = percentage; c.ProgressBar.Visible = true;}
+ ));
+ else { c.ProgressBar.Value = percentage; c.ProgressBar.Visible = true; }
+ }
+ }
+ }
+
+ ///
+ /// Returns the current buffer as a byte[].
+ ///
+ public byte[] Buffer {
+ get {
+ if (buffer == null) return new byte[0];
+ return (byte[]) buffer.ToArray( typeof ( byte ) );
+ }
+ }
+
+ ///
+ /// The size of the current buffer.
+ ///
+ public int BufferSize {
+ get { return buffer.Count; }
+ }
+
+ #region Methods
+
+ public byte[] GetBytes(int start, int count)
+ {
+ if (buffer.Count == 0) return new byte[] {};
+ if (start < 0) start = 0;
+ if (start >= buffer.Count) start = buffer.Count;
+ if (count < 1) count = 1;
+ if (count >= (buffer.Count - start)) count = (buffer.Count - start);
+ return (byte[])(buffer.GetRange(start, count).ToArray( typeof ( byte ) ));
+ }
+
+ public byte GetByte(int offset)
+ {
+ if (buffer.Count == 0) return 0;
+ if (offset < 0) offset = 0;
+ if (offset >= buffer.Count) offset = buffer.Count;
+ return (byte)buffer[offset];
+ }
+
+ public bool DeleteByte(int offset)
+ {
+ if ((offset < buffer.Count) & (offset > -1)) {
+ buffer.RemoveAt(offset);
+ return true;
+ }
+ return false;
+ }
+
+ public bool RemoveByte(int offset)
+ {
+ if ((offset < buffer.Count) & (offset > -1)) {
+ buffer.RemoveAt(offset);
+ return true;
+ }
+ return false;
+ }
+
+ public bool RemoveBytes(int offset, int length)
+ {
+ if (((offset < buffer.Count) && (offset > -1)) && ((offset + length) <= buffer.Count)) {
+ buffer.RemoveRange(offset, length);
+ return true;
+ }
+ return false;
+ }
+
+ /// Not Tested!
+ public void SetBytes(int start, byte[] bytes, bool overwrite)
+ {
+ if (overwrite) {
+ if (bytes.Length > buffer.Count) buffer.AddRange(new byte[bytes.Length - buffer.Count]);
+ buffer.SetRange(start, bytes);
+ } else {
+ buffer.InsertRange(start, bytes);
+ }
+ }
+
+ public void SetByte(int position, byte @byte, bool overwrite)
+ {
+ if (overwrite) {
+ if (position > buffer.Count - 1) {
+ buffer.Add(@byte);
+ } else {
+ buffer[position] = @byte;
+ }
+ } else {
+ buffer.Insert(position, @byte);
+ }
+ }
+ #endregion
+ }
+}
+
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/Caret.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/Caret.cs
new file mode 100644
index 0000000000..45bd841bb0
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/Caret.cs
@@ -0,0 +1,106 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Represents a caret
+ ///
+ public class Caret
+ {
+ int width;
+ int height;
+ int offset;
+ Control control;
+
+ public Caret()
+ {
+ }
+
+ public Caret(Control control)
+ {
+ this.control = control;
+ }
+
+ public Caret(int width, int height)
+ {
+ this.width = width;
+ this.height = height;
+ }
+
+ public Caret(int width, int height, int offset)
+ {
+ this.width = width;
+ this.height = height;
+ this.offset = offset;
+ }
+
+ public Caret(Control control, int width, int height, int offset)
+ {
+ this.width = width;
+ this.height = height;
+ this.offset = offset;
+ this.control = control;
+ }
+
+ public int Width {
+ get { return width; }
+ set { width = value; }
+ }
+
+ public int Height {
+ get { return height; }
+ set { height = value; }
+ }
+
+ public int Offset {
+ get { return offset; }
+ set { offset = value; }
+ }
+
+ public Control Control {
+ get { return control; }
+ set { control = value; }
+ }
+
+ public void Create(Control control, int width, int height)
+ {
+ NativeMethods.CreateCaret(control.Handle, 0, width, height);
+ this.Control = control;
+ this.Width = width;
+ this.Height = height;
+ }
+
+ public void Destroy()
+ {
+ NativeMethods.DestroyCaret();
+ this.Control = null;
+ this.Width = 0;
+ this.Height = 0;
+ this.Offset = -1;
+ }
+
+ public void Show()
+ {
+ NativeMethods.ShowCaret(control.Handle);
+ }
+
+ public void Hide()
+ {
+ NativeMethods.HideCaret(control.Handle);
+ }
+
+ public void SetToPosition(Point position)
+ {
+ NativeMethods.SetCaretPos(position.X, position.Y);
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/ClipboardManager.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/ClipboardManager.cs
new file mode 100644
index 0000000000..8c891c7ccd
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/ClipboardManager.cs
@@ -0,0 +1,51 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.Windows.Forms;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Manages the clipboard actions.
+ ///
+ public static class ClipboardManager
+ {
+ ///
+ /// Used to determine if text is in the clipboard or not.
+ ///
+ public static bool ContainsText {
+ get { return Clipboard.ContainsText(); }
+ }
+
+ ///
+ /// Cleares the Clipboard.
+ ///
+ public static void Clear()
+ {
+ Clipboard.Clear();
+ }
+
+ ///
+ /// Copies text into the clipboard.
+ ///
+ /// The text to be copied to the clipboard.
+ public static void Copy(string text)
+ {
+ Clipboard.SetText(text);
+ }
+
+ ///
+ /// Pastes the text.
+ ///
+ /// the text in the clipboard.
+ public static string Paste()
+ {
+ return Clipboard.GetText();
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/NativeMethods.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/NativeMethods.cs
new file mode 100644
index 0000000000..597642e180
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/NativeMethods.cs
@@ -0,0 +1,38 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Description of NativeMethods.
+ ///
+ public static class NativeMethods
+ {
+ [DllImport("User32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool CreateCaret(IntPtr hWnd, int hBitmap, int nWidth, int nHeight);
+
+ [DllImport("User32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool SetCaretPos(int x, int y);
+
+ [DllImport("User32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool DestroyCaret();
+
+ [DllImport("User32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool ShowCaret(IntPtr hWnd);
+
+ [DllImport("User32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool HideCaret(IntPtr hWnd);
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/SelectionManager.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/SelectionManager.cs
new file mode 100644
index 0000000000..db292346f4
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/SelectionManager.cs
@@ -0,0 +1,102 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.Text;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Contains data for the selection of the HexEditor
+ ///
+ public class SelectionManager
+ {
+ BufferManager buffer;
+
+ public event EventHandler SelectionChanged;
+
+ protected virtual void OnSelectionChanged(EventArgs e)
+ {
+ if (SelectionChanged != null) {
+ SelectionChanged(this, e);
+ }
+ }
+
+ public SelectionManager(ref BufferManager buffer)
+ {
+ this.buffer = buffer;
+ }
+
+ #region Properties
+ int start, end;
+ bool hasSelection;
+
+ public int Start {
+ get { return start; }
+ set {
+ start = value;
+ EventArgs e = new EventArgs();
+ OnSelectionChanged(e);
+ }
+ }
+
+ public int End {
+ get { return end; }
+ set {
+ end = value;
+ EventArgs e = new EventArgs();
+ OnSelectionChanged(e);
+ }
+ }
+
+ public bool HasSomethingSelected {
+ get { return hasSelection; }
+ set { hasSelection = value; }
+ }
+
+ #endregion
+
+ #region Methods
+ ///
+ ///
+ ///
+ /// A string with the selected text
+ public string SelectionText {
+ get {
+ int start = this.Start;
+ int end = this.End;
+ if (this.End < this.Start) {
+ start = this.End;
+ end = this.Start;
+ }
+ return Encoding.Default.GetString(buffer.GetBytes(this.Start, Math.Abs(end - start)));
+ }
+ }
+
+ public byte[] GetSelectionBytes()
+ {
+ int start = this.Start;
+ int end = this.End;
+ if (this.End < this.Start) {
+ start = this.End;
+ end = this.Start;
+ }
+ return buffer.GetBytes(this.Start, Math.Abs(end - start));
+ }
+
+ ///
+ /// Cleares the selection (no text is altered)
+ ///
+ public void Clear()
+ {
+ this.HasSomethingSelected = false;
+ this.Start = 0;
+ this.End = 0;
+ }
+ #endregion
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoAction.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoAction.cs
new file mode 100644
index 0000000000..4dde891b33
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoAction.cs
@@ -0,0 +1,19 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Used to tell the UndoManager what to do with the changes.
+ ///
+ public enum UndoAction
+ {
+ Add, Remove, Overwrite
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoEventArgs.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoEventArgs.cs
new file mode 100644
index 0000000000..b9261a0af0
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoEventArgs.cs
@@ -0,0 +1,34 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Used for EventArgs in the ActionUndone and ActionRedone events.
+ ///
+ public class UndoEventArgs : EventArgs
+ {
+ UndoStep undostep;
+ bool isRedo;
+
+ public UndoEventArgs(UndoStep step, bool redo)
+ {
+ undostep = step;
+ isRedo = redo;
+ }
+
+ public UndoStep UndoStep {
+ get { return undostep; }
+ }
+
+ public bool IsRedo {
+ get { return isRedo; }
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoManager.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoManager.cs
new file mode 100644
index 0000000000..13088c76a8
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoManager.cs
@@ -0,0 +1,121 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.Collections;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Description of UndoManager.
+ ///
+ public class UndoManager
+ {
+ Stack UndoStack;
+ Stack RedoStack;
+
+ public event EventHandler ActionUndone;
+ public event EventHandler ActionRedone;
+
+ public UndoManager()
+ {
+ UndoStack = new Stack();
+ RedoStack = new Stack();
+ }
+
+ ///
+ /// Determines if there's any further step to undo.
+ ///
+ public bool CanUndo {
+ get { return (UndoStack.Count > 0); }
+ }
+
+ ///
+ /// Determines if there's any further step to redo.
+ ///
+ public bool CanRedo {
+ get { return (RedoStack.Count > 0); }
+ }
+
+ ///
+ /// Adds a step to the stack.
+ ///
+ /// The step to add.
+ /// Used internally, don't use!
+ internal void AddUndoStep(UndoStep step)
+ {
+ UndoStack.Push(step);
+ RedoStack.Clear();
+
+ EventHandler temp = ActionUndone;
+ if (temp != null)
+ temp(this, new UndoEventArgs(step, false));
+ }
+
+ ///
+ /// Undoes the last step.
+ ///
+ /// Buffer to use
+ /// Used internally, don't use!
+ internal UndoStep Undo(ref BufferManager buffer)
+ {
+ if (UndoStack.Count > 0) {
+ UndoStep step = (UndoStep)UndoStack.Peek();
+ RedoStack.Push(step);
+ UndoStack.Pop();
+ switch (step.Action) {
+ case UndoAction.Add :
+ buffer.SetBytes(step.Start, step.GetBytes(), false);
+ break;
+ case UndoAction.Remove :
+ buffer.RemoveBytes(step.Start, step.GetBytes().Length);
+ break;
+ case UndoAction.Overwrite :
+ buffer.SetBytes(step.Start, step.GetOldBytes(), true);
+ break;
+ }
+ EventHandler temp = ActionUndone;
+ if (temp != null)
+ temp(this, new UndoEventArgs(step, true));
+
+ return step;
+ }
+ return null;
+ }
+
+ ///
+ /// Redoes the last step.
+ ///
+ /// Buffer to use
+ /// Used internally, don't use!
+ internal UndoStep Redo(ref BufferManager buffer)
+ {
+ if (RedoStack.Count > 0) {
+ UndoStep step = (UndoStep)RedoStack.Peek();
+ UndoStack.Push(step);
+ RedoStack.Pop();
+ switch (step.Action) {
+ case UndoAction.Add :
+ buffer.RemoveBytes(step.Start, step.GetBytes().Length);
+ break;
+ case UndoAction.Remove :
+ buffer.SetBytes(step.Start, step.GetBytes(), false);
+ break;
+ case UndoAction.Overwrite :
+ buffer.SetBytes(step.Start, step.GetBytes(), true);
+ break;
+ }
+ EventHandler temp = ActionRedone;
+ if (temp != null)
+ temp(this, new UndoEventArgs(step, false));
+
+ return step;
+ }
+ return null;
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoStep.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoStep.cs
new file mode 100644
index 0000000000..d89288f838
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/UndoStep.cs
@@ -0,0 +1,56 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+
+namespace HexEditor.Util
+{
+ ///
+ /// Used to save data about changes to undo/redo.
+ ///
+ public class UndoStep
+ {
+ byte[] bytes, oldBytes;
+ int start;
+ long timeStamp;
+ UndoAction action;
+
+ public UndoStep(byte[] bytes, byte[] oldBytes, int start, UndoAction action)
+ {
+ this.bytes = bytes;
+ this.oldBytes = oldBytes;
+ this.start = start;
+ this.action = action;
+ this.timeStamp = DateTime.Now.Ticks;
+ }
+
+ public long TimeStamp {
+ get { return timeStamp; }
+ }
+
+ public byte[] GetBytes() {
+ return bytes;
+ }
+
+ public byte[] GetOldBytes() {
+ return oldBytes;
+ }
+
+ public int Start {
+ get { return start; }
+ }
+
+ public UndoAction Action {
+ get { return action; }
+ }
+
+ public override string ToString()
+ {
+ return "{ Bytes: " + System.Text.Encoding.Default.GetString(GetBytes()) + ", OldBytes: " + System.Text.Encoding.Default.GetString(GetOldBytes()) + ", Start: " + start.ToString() + ", Action: " + action.ToString() + " }";
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/ViewMode.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/ViewMode.cs
new file mode 100644
index 0000000000..257b67cd85
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/Util/ViewMode.cs
@@ -0,0 +1,20 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+namespace HexEditor.Util
+{
+ ///
+ /// Specifies how the offset/adress numbers are displayed, either as
+ /// hexadecimal, octal or decimal numbers.
+ ///
+ public enum ViewMode
+ {
+ Hexadecimal,
+ Octal,
+ Decimal
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.Designer.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.Designer.cs
new file mode 100644
index 0000000000..c35c6fd387
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.Designer.cs
@@ -0,0 +1,145 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+namespace HexEditor.View
+{
+ partial class HexEditContainer
+ {
+ ///
+ /// Designer variable used to keep track of non-visual components.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Disposes resources used by the form.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ if (components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose(disposing);
+ }
+
+ ///
+ /// This method is required for Windows Forms designer support.
+ /// Do not change the method contents inside the source code editor. The Forms designer might
+ /// not be able to load this method if it was changed manually.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HexEditContainer));
+ this.tbSizeToFit = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.tCBViewMode = new System.Windows.Forms.ToolStripComboBox();
+ this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+ this.tSTBCharsPerLine = new System.Windows.Forms.ToolStripTextBox();
+ this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
+ this.hexEditControl = new HexEditor.HexEditControl();
+ this.toolStrip1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tbSizeToFit
+ //
+ this.tbSizeToFit.CheckOnClick = true;
+ this.tbSizeToFit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.tbSizeToFit.Image = ((System.Drawing.Image)(resources.GetObject("tbSizeToFit.Image")));
+ this.tbSizeToFit.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tbSizeToFit.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tbSizeToFit.Name = "tbSizeToFit";
+ this.tbSizeToFit.Size = new System.Drawing.Size(23, 22);
+ this.tbSizeToFit.Text = "Size to fit";
+ this.tbSizeToFit.Click += new System.EventHandler(this.TbSizeToFitClick);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+ //
+ // tCBViewMode
+ //
+ this.tCBViewMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.tCBViewMode.Items.AddRange(new object[] {
+ "Hexadecimal",
+ "Octal",
+ "Decimal"});
+ this.tCBViewMode.Name = "tCBViewMode";
+ this.tCBViewMode.Size = new System.Drawing.Size(121, 25);
+ this.tCBViewMode.SelectedIndexChanged += new System.EventHandler(this.TCBViewModeSelectedIndexChanged);
+ //
+ // toolStrip1
+ //
+ this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.tbSizeToFit,
+ this.tSTBCharsPerLine,
+ this.toolStripSeparator1,
+ this.tCBViewMode,
+ this.toolStripProgressBar1});
+ this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+ this.toolStrip1.Name = "toolStrip1";
+ this.toolStrip1.Size = new System.Drawing.Size(689, 25);
+ this.toolStrip1.TabIndex = 2;
+ this.toolStrip1.Text = "toolStrip1";
+ //
+ // tSTBCharsPerLine
+ //
+ this.tSTBCharsPerLine.Name = "tSTBCharsPerLine";
+ this.tSTBCharsPerLine.Size = new System.Drawing.Size(40, 25);
+ this.tSTBCharsPerLine.TextChanged += new System.EventHandler(tSTBCharsPerLine_TextChanged);
+ //
+ // toolStripProgressBar1
+ //
+ this.toolStripProgressBar1.Name = "toolStripProgressBar1";
+ this.toolStripProgressBar1.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
+ this.toolStripProgressBar1.Size = new System.Drawing.Size(150, 22);
+ this.toolStripProgressBar1.Visible = false;
+ //
+ // hexEditControl
+ //
+ this.hexEditControl.BackColor = System.Drawing.Color.White;
+ this.hexEditControl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+ this.hexEditControl.BytesPerLine = 16;
+ this.hexEditControl.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.hexEditControl.Encoding = ((System.Text.Encoding)(resources.GetObject("hexEditControl.Encoding")));
+ this.hexEditControl.FileName = null;
+ this.hexEditControl.FitToWindowWidth = false;
+ this.hexEditControl.Location = new System.Drawing.Point(0, 25);
+ this.hexEditControl.Name = "hexEditControl";
+ this.hexEditControl.ProgressBar = this.toolStripProgressBar1;
+ this.hexEditControl.Size = new System.Drawing.Size(689, 308);
+ this.hexEditControl.TabIndex = 3;
+ this.hexEditControl.ViewMode = HexEditor.Util.ViewMode.Hexadecimal;
+ //
+ // HexEditContainer
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.hexEditControl);
+ this.Controls.Add(this.toolStrip1);
+ this.Name = "HexEditContainer";
+ this.Size = new System.Drawing.Size(689, 333);
+ this.Resize += new System.EventHandler(this.HexEditContainer_Resize);
+ this.toolStrip1.ResumeLayout(false);
+ this.toolStrip1.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+ private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar1;
+ internal HexEditor.HexEditControl hexEditControl;
+ private System.Windows.Forms.ToolStripComboBox tCBViewMode;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripButton tbSizeToFit;
+ private System.Windows.Forms.ToolStrip toolStrip1;
+ private System.Windows.Forms.ToolStripTextBox tSTBCharsPerLine;
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.cs
new file mode 100644
index 0000000000..b12731efd5
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.cs
@@ -0,0 +1,135 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.Windows.Forms;
+using System.IO;
+
+using HexEditor.Util;
+
+using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop;
+
+namespace HexEditor.View
+{
+ public partial class HexEditContainer : UserControl
+ {
+ public bool HasSelection {
+ get { return hexEditControl.HasSelection; }
+ }
+
+ public bool EditorFocused {
+ get { return hexEditControl.HasFocus; }
+ }
+
+ public bool CanUndo {
+ get { return hexEditControl.CanUndo; }
+ }
+
+ public bool CanRedo {
+ get { return hexEditControl.CanRedo; }
+ }
+
+ public HexEditContainer()
+ {
+ InitializeComponent();
+
+ tSTBCharsPerLine.Text = hexEditControl.BytesPerLine.ToString();
+ this.hexEditControl.ContextMenuStrip = MenuService.CreateContextMenu(this.hexEditControl, "/AddIns/HexEditor/Editor/ContextMenu");
+ tCBViewMode.SelectedIndex = 0;
+ }
+
+ void TbSizeToFitClick(object sender, EventArgs e)
+ {
+ tSTBCharsPerLine.Enabled = !tbSizeToFit.Checked;
+ hexEditControl.FitToWindowWidth = tbSizeToFit.Checked;
+ tSTBCharsPerLine.Text = hexEditControl.BytesPerLine.ToString();
+ }
+
+ void TCBViewModeSelectedIndexChanged(object sender, EventArgs e)
+ {
+ switch (tCBViewMode.SelectedIndex)
+ {
+ case 0:
+ hexEditControl.ViewMode = ViewMode.Hexadecimal;
+ break;
+ case 1:
+ hexEditControl.ViewMode = ViewMode.Octal;
+ break;
+ case 2:
+ hexEditControl.ViewMode = ViewMode.Decimal;
+ break;
+ }
+ }
+
+ void HexEditContainerGotFocus(object sender, EventArgs e)
+ {
+ hexEditControl.Focus();
+ }
+
+ public void LoadFile(OpenedFile file, Stream stream)
+ {
+ hexEditControl.LoadFile(file, stream);
+ }
+
+ public void SaveFile(OpenedFile file, Stream stream)
+ {
+ hexEditControl.SaveFile(file, stream);
+ }
+
+ public string Cut()
+ {
+ string text = hexEditControl.Copy();
+ hexEditControl.Delete();
+ return text;
+ }
+
+ public string Copy()
+ {
+ return hexEditControl.Copy();
+ }
+
+ public void Paste(string text)
+ {
+ hexEditControl.Paste(text);
+ }
+
+ public void Delete()
+ {
+ hexEditControl.Delete();
+ }
+
+ public void SelectAll()
+ {
+ hexEditControl.SelectAll();
+ }
+
+ public void Undo()
+ {
+ hexEditControl.Undo();
+ }
+
+ public void Redo()
+ {
+ hexEditControl.Redo();
+ }
+
+ void tSTBCharsPerLine_TextChanged(object sender, EventArgs e)
+ {
+ int value = 0;
+ if (int.TryParse(tSTBCharsPerLine.Text, out value)) {
+ hexEditControl.BytesPerLine = value;
+ tSTBCharsPerLine.Text = hexEditControl.BytesPerLine.ToString();
+ }
+ }
+
+ void HexEditContainer_Resize(object sender, EventArgs e)
+ {
+ if (this.tbSizeToFit.Checked) tSTBCharsPerLine.Text = hexEditControl.BytesPerLine.ToString();
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.resx b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.resx
new file mode 100644
index 0000000000..f8d2507421
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditContainer.resx
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAeZJREFUOE+dUk1P
+ E1EUvdWwInHjT/GDjS5d+huMGxAMCQtCdEViTDQQNSQlRgWCBEjT+AEKqcECDbWUDxubqoXpUCwtLdNS
+ 7UynM/0aOLz3sEmNceG8zEnu3HfuuffcGcdyJA/psEKNAxacdRCda3HQGZ50sBf2iLBB4imWP9/aQuQK
+ HiD1sww7xx3IgJa+5oWAnFaxua0INMf/ynGOy78P4ha4QLZg/DcmfUmQJ5SzLTDuTYDebShCIK8ZaOt8
+ gfm1GCzrWNhohl62hL0L7c+wHE5BUSsY+RAHvWFL/J4s4Gr3mLicX5OFFdWowqxaKFWOUCjVkMjqQvDK
+ b95MYAdP52TQa7bJix3PRTHHJRZzON9uCgEO3plzmnk8ds5KILc/LSxcvzstBHzhBOtqoViuQzPqrHsd
+ +WINOa2Gg18VMcFlZnXxyz6evIqCXCunAuXqEa71TmB2NQbNtP7aQYYVNyZZjSqIZ00MuiOgqcUftr/C
+ g6kwaNwj2fqRoqkS7r8MgUbfb9maILKno390A9TuXBcCe4cmdnMmZMWElDGwlTbwLamDE8MJHaHdIj7H
+ NazLKoIxFQFJxY17ntMJbg4F0TH0Cbce+dA18BG3Bxb+QOfDBXQPetE3vII7w370PF5i917w2hM6SQ00
+ Fpb7OwAAAABJRU5ErkJggg==
+
+
+
+ 17, 17
+
+
+
+ AAEAAAD/////AQAAAAAAAAAEAQAAABxTeXN0ZW0uVGV4dC5Db2RlUGFnZUVuY29kaW5nCAAAAAxtX2lz
+ UmVhZE9ubHkPZW5jb2RlckZhbGxiYWNrD2RlY29kZXJGYWxsYmFjawptX2NvZGVQYWdlCGRhdGFJdGVt
+ E0VuY29kaW5nK21fY29kZVBhZ2URRW5jb2RpbmcrZGF0YUl0ZW0LbWF4Q2hhclNpemUAAwMAAgACAAEq
+ U3lzdGVtLlRleHQuSW50ZXJuYWxFbmNvZGVyQmVzdEZpdEZhbGxiYWNrKlN5c3RlbS5UZXh0LkludGVy
+ bmFsRGVjb2RlckJlc3RGaXRGYWxsYmFjawgICAEJAgAAAAkDAAAA5AQAAArkBAAACgEAAAAEAgAAACpT
+ eXN0ZW0uVGV4dC5JbnRlcm5hbEVuY29kZXJCZXN0Rml0RmFsbGJhY2sEAAAACGVuY29kaW5nDGFycmF5
+ QmVzdEZpdBtiSXNNaWNyb3NvZnRCZXN0Rml0RmFsbGJhY2srRW5jb2RlckZhbGxiYWNrK2JJc01pY3Jv
+ c29mdEJlc3RGaXRGYWxsYmFjawMHAAAcU3lzdGVtLlRleHQuQ29kZVBhZ2VFbmNvZGluZwMBAQkBAAAA
+ CgEBBAMAAAAqU3lzdGVtLlRleHQuSW50ZXJuYWxEZWNvZGVyQmVzdEZpdEZhbGxiYWNrBQAAAAhlbmNv
+ ZGluZwxhcnJheUJlc3RGaXQMY1JlcGxhY2VtZW50G2JJc01pY3Jvc29mdEJlc3RGaXRGYWxsYmFjaytE
+ ZWNvZGVyRmFsbGJhY2srYklzTWljcm9zb2Z0QmVzdEZpdEZhbGxiYWNrAwcAAAAcU3lzdGVtLlRleHQu
+ Q29kZVBhZ2VFbmNvZGluZwMDAQEJAQAAAAo/AQEL
+
+
+
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditDisplayBinding.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditDisplayBinding.cs
new file mode 100644
index 0000000000..d4d27c5c7a
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditDisplayBinding.cs
@@ -0,0 +1,83 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.IO;
+
+using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop;
+using ICSharpCode.SharpDevelop.Gui;
+
+using System.Diagnostics;
+
+namespace HexEditor.View
+{
+ public class HexEditDisplayBinding : IDisplayBinding
+ {
+ string[] supportedBinaryFileNameExtensions;
+
+ public HexEditDisplayBinding()
+ {
+ }
+
+ bool IsBinaryFileName(string fileName)
+ {
+ if (fileName != null) {
+ string extension = Path.GetExtension(fileName);
+ foreach (string supportedExtension in GetSupportedBinaryFileExtensions()) {
+ if (String.Compare(supportedExtension, extension, StringComparison.InvariantCultureIgnoreCase) == 0) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ string[] GetSupportedBinaryFileExtensions()
+ {
+ if (supportedBinaryFileNameExtensions == null) {
+ string extensionList = (string)AddInTree.BuildItem("/AddIns/HexEditor/Editor/SupportedFileExtensions", null);
+ if (extensionList != null) {
+ supportedBinaryFileNameExtensions = extensionList.Split(';');
+ }
+ }
+ return supportedBinaryFileNameExtensions;
+ }
+
+ bool IsBinary(string fileName)
+ {
+ try {
+ if (!File.Exists(fileName)) return false;
+
+ BinaryReader reader = new BinaryReader(new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
+ byte[] data = reader.ReadBytes(1024);
+ reader.Close();
+
+ for (int i = 0; i < data.Length; i++) {
+ if ((data[i] != 0xA) && (data[i] != 0xD) && (data[i] != 0x9)) {
+ if (data[i] < 0x20) return true;
+ }
+ }
+ } catch (IOException ex) {
+ MessageService.ShowError(ex, ex.Message);
+ } catch (Exception ex) {
+ Debug.Print(ex.ToString());
+ }
+ return false;
+ }
+
+ public bool CanCreateContentForFile(string fileName)
+ {
+ return IsBinaryFileName(fileName);
+ }
+
+ public IViewContent CreateContentForFile(OpenedFile file)
+ {
+ return new HexEditView(file);
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditOptionsPanel.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditOptionsPanel.cs
new file mode 100644
index 0000000000..a080eceef2
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditOptionsPanel.cs
@@ -0,0 +1,584 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.Windows.Forms;
+using System.Xml.Serialization;
+using System.Drawing;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Xml;
+
+using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop.Gui;
+
+namespace HexEditor.View
+{
+ public class HexEditOptionsPanel : AbstractOptionPanel
+ {
+ ComboBox cmbForeColor;
+ ComboBox cmbBackColor;
+ ListBox lstElements;
+ CheckBox cbBold;
+ CheckBox cbItalic;
+ CheckBox cbUnderline;
+ Label lblOffsetPreview;
+ Label lblDataPreview;
+ Button btnSelectFont;
+ FontDialog fdSelectFont;
+
+ List Colors;
+ Color customFore = Color.Transparent;
+ Color customBack = Color.Transparent;
+
+ bool fcmanualchange = false;
+ bool bcmanualchange = false;
+
+ // New values
+ Color OffsetForeColor, OffsetBackColor;
+ Color DataForeColor, DataBackColor;
+
+ bool OffsetBold, OffsetItalic, OffsetUnderline;
+ bool DataBold, DataItalic, DataUnderline;
+
+ float FontSize = 10.0f;
+
+ string FontName;
+
+ public HexEditOptionsPanel()
+ {
+ Colors = new List();
+
+ ListColors();
+ }
+
+ public override void LoadPanelContents()
+ {
+ SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("HexEditor.Resources.HexEditOptions.xfrm"));
+ this.InitializeComponents();
+ string configpath = Path.GetDirectoryName(typeof(HexEditControl).Assembly.Location) + Path.DirectorySeparatorChar + "config.xml";
+
+ if (!File.Exists(configpath)) return;
+
+ XmlDocument file = new XmlDocument();
+ file.Load(configpath);
+
+ foreach (XmlElement el in file.GetElementsByTagName("Setting")) {
+ switch(el.GetAttribute("Name")) {
+ case "OffsetFore" :
+ OffsetForeColor = Color.FromArgb(int.Parse(el.GetAttribute("R")), int.Parse(el.GetAttribute("G")), int.Parse(el.GetAttribute("B")));
+ break;
+ case "OffsetBack" :
+ OffsetBackColor = Color.FromArgb(int.Parse(el.GetAttribute("R")), int.Parse(el.GetAttribute("G")), int.Parse(el.GetAttribute("B")));
+ break;
+ case "DataFore" :
+ DataForeColor = Color.FromArgb(int.Parse(el.GetAttribute("R")), int.Parse(el.GetAttribute("G")), int.Parse(el.GetAttribute("B")));
+ break;
+ case "DataBack" :
+ DataBackColor = Color.FromArgb(int.Parse(el.GetAttribute("R")), int.Parse(el.GetAttribute("G")), int.Parse(el.GetAttribute("B")));
+ break;
+ case "OffsetStyle" :
+ OffsetBold = bool.Parse(el.GetAttribute("Bold"));
+ OffsetItalic = bool.Parse(el.GetAttribute("Italic"));
+ OffsetUnderline = bool.Parse(el.GetAttribute("Underline"));
+ break;
+ case "DataStyle" :
+ DataBold = bool.Parse(el.GetAttribute("Bold"));
+ DataItalic = bool.Parse(el.GetAttribute("Italic"));
+ DataUnderline = bool.Parse(el.GetAttribute("Underline"));
+ break;
+ case "Font" :
+ FontName = el.GetAttribute("FontName");
+ FontSize = float.Parse(el.GetAttribute("FontSize"));
+ break;
+ }
+ }
+
+ lblOffsetPreview.Font = new Font(FontName, FontSize);
+ lblDataPreview.Font = new Font(FontName, FontSize);
+
+ fdSelectFont.Font = new Font(FontName, FontSize);
+
+ if (OffsetBold) lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Bold);
+ if (OffsetItalic) lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Italic);
+ if (OffsetUnderline) lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Underline);
+
+ if (DataBold) lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Bold);
+ if (DataItalic) lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Italic);
+ if (DataUnderline) lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Underline);
+
+ if (IsNamedColor(OffsetForeColor)) {
+ OffsetForeColor = Color.FromName(GetColorName(OffsetForeColor));
+ } else {
+ customFore = OffsetForeColor;
+ }
+
+ if (IsNamedColor(OffsetBackColor)) {
+ OffsetBackColor = Color.FromName(GetColorName(OffsetBackColor));
+ } else {
+ customBack = OffsetBackColor;
+ }
+
+ if (IsNamedColor(DataForeColor)) {
+ DataForeColor = Color.FromName(GetColorName(DataForeColor));
+ } else {
+ customFore = DataForeColor;
+ }
+
+ if (IsNamedColor(DataBackColor)) {
+ DataBackColor = Color.FromName(GetColorName(DataBackColor));
+ } else {
+ customBack = DataBackColor;
+ }
+
+ if (!OffsetForeColor.IsNamedColor) {
+ cmbForeColor.SelectedIndex = 0;
+ } else {
+ cmbForeColor.SelectedIndex = cmbForeColor.Items.IndexOf(OffsetForeColor.Name);
+ }
+
+ if (OffsetBackColor.IsNamedColor) {
+ cmbBackColor.SelectedIndex = 0;
+ } else {
+ cmbBackColor.SelectedIndex = cmbBackColor.Items.IndexOf(OffsetBackColor.Name);
+ }
+ }
+
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Byte.ToString")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Single.ToString")]
+ public override bool StorePanelContents()
+ {
+ string configpath = Path.GetDirectoryName(typeof(HexEditControl).Assembly.Location) + Path.DirectorySeparatorChar + "config.xml";
+ XmlDocument file = new XmlDocument();
+ file.LoadXml("");
+
+ XmlElement el = file.CreateElement("Setting");
+ el.SetAttribute("Name", "OffsetFore");
+ el.SetAttribute("R", OffsetForeColor.R.ToString());
+ el.SetAttribute("G", OffsetForeColor.G.ToString());
+ el.SetAttribute("B", OffsetForeColor.B.ToString());
+ file.FirstChild.AppendChild(el);
+
+ el = file.CreateElement("Setting");
+ el.SetAttribute("Name", "OffsetBack");
+ el.SetAttribute("R", OffsetBackColor.R.ToString());
+ el.SetAttribute("G", OffsetBackColor.G.ToString());
+ el.SetAttribute("B", OffsetBackColor.B.ToString());
+ file.FirstChild.AppendChild(el);
+
+ el = file.CreateElement("Setting");
+ el.SetAttribute("Name", "DataFore");
+ el.SetAttribute("R", DataForeColor.R.ToString());
+ el.SetAttribute("G", DataForeColor.G.ToString());
+ el.SetAttribute("B", DataForeColor.B.ToString());
+ file.FirstChild.AppendChild(el);
+
+ el = file.CreateElement("Setting");
+ el.SetAttribute("Name", "DataBack");
+ el.SetAttribute("R", DataBackColor.R.ToString());
+ el.SetAttribute("G", DataBackColor.G.ToString());
+ el.SetAttribute("B", DataBackColor.B.ToString());
+ file.FirstChild.AppendChild(el);
+
+ el = file.CreateElement("Setting");
+ el.SetAttribute("Name", "OffsetStyle");
+ el.SetAttribute("Bold", OffsetBold.ToString());
+ el.SetAttribute("Italic", OffsetItalic.ToString());
+ el.SetAttribute("Underline", OffsetUnderline.ToString());
+ file.FirstChild.AppendChild(el);
+
+ el = file.CreateElement("Setting");
+ el.SetAttribute("Name", "DataStyle");
+ el.SetAttribute("Bold", DataBold.ToString());
+ el.SetAttribute("Italic", DataItalic.ToString());
+ el.SetAttribute("Underline", DataUnderline.ToString());
+ file.FirstChild.AppendChild(el);
+
+ el = file.CreateElement("Setting");
+ el.SetAttribute("Name", "Font");
+ el.SetAttribute("FontName", FontName);
+ el.SetAttribute("FontSize", FontSize.ToString());
+ file.FirstChild.AppendChild(el);
+
+ file.Save(configpath);
+ return true;
+ }
+
+ void InitializeComponents()
+ {
+ cmbForeColor = (ComboBox)ControlDictionary["cmbForeColor"];
+ cmbBackColor = (ComboBox)ControlDictionary["cmbBackColor"];
+ lstElements = (ListBox)ControlDictionary["lstElements"];
+ cbBold = (CheckBox)ControlDictionary["cbBold"];
+ cbItalic = (CheckBox)ControlDictionary["cbItalic"];
+ cbUnderline = (CheckBox)ControlDictionary["cbUnderline"];
+ lblOffsetPreview = (Label)ControlDictionary["lblOffsetPreview"];
+ lblDataPreview = (Label)ControlDictionary["lblDataPreview"];
+ btnSelectFont = (Button)ControlDictionary["btnSelectFont"];
+ fdSelectFont = new FontDialog();
+
+ // Initialize FontDialog
+ fdSelectFont.FontMustExist = true;
+ fdSelectFont.FixedPitchOnly = true;
+ fdSelectFont.ShowEffects = false;
+ fdSelectFont.ShowColor = false;
+
+ cmbForeColor.Items.Add("Custom");
+ cmbBackColor.Items.Add("Custom");
+
+ foreach (Color c in Colors) {
+ cmbForeColor.Items.Add(c.Name);
+ cmbBackColor.Items.Add(c.Name);
+ }
+
+ lstElements.Items.Add("Offset");
+ lstElements.Items.Add("Data");
+
+ lstElements.SetSelected(0, true);
+
+ btnSelectFont.Click += new EventHandler(this.btnSelectFontClick);
+ cmbForeColor.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cmbForeColorDrawItem);
+ cmbForeColor.SelectedValueChanged += new EventHandler(this.cmbForeColorSelectedValueChanged);
+
+ cmbForeColor.DropDown += cmbForeColorDropDown;
+ cmbBackColor.DropDown += cmbBackColorDropDown;
+
+ cmbBackColor.DrawItem += new DrawItemEventHandler(this.cmbBackColorDrawItem);
+ cmbBackColor.SelectedValueChanged += new EventHandler(this.cmbBackColorSelectedValueChanged);
+
+
+ cbBold.CheckedChanged += new EventHandler(this.cbBoldCheckedChanged);
+ cbItalic.CheckedChanged += new EventHandler(this.cbItalicCheckedChanged);
+ cbUnderline.CheckedChanged += new EventHandler(this.cbUnderlineCheckedChanged);
+
+ lstElements.SelectedValueChanged += new EventHandler(this.lstElementsSelectedValueChanged);
+ }
+
+ void ListColors()
+ {
+ foreach (Color c in System.ComponentModel.TypeDescriptor.GetConverter(typeof (Color)).GetStandardValues()) {
+ Colors.Add(c);
+ }
+ }
+
+ void btnSelectFontClick(object sender, EventArgs e)
+ {
+ if (fdSelectFont.ShowDialog() == DialogResult.OK) {
+ lblOffsetPreview.Font = new Font(fdSelectFont.Font, FontStyle.Regular);
+ lblDataPreview.Font = new Font(fdSelectFont.Font, FontStyle.Regular);
+
+ FontName = fdSelectFont.Font.Name;
+ FontSize = fdSelectFont.Font.Size;
+
+ if (OffsetBold) lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Bold);
+ if (OffsetItalic) lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Italic);
+ if (OffsetUnderline) lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Underline);
+
+ if (DataBold) lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Bold);
+ if (DataItalic) lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Italic);
+ if (DataUnderline) lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Underline);
+ }
+ }
+
+ void cmbForeColorSelectedValueChanged(object sender, EventArgs e)
+ {
+ if (lstElements.SelectedIndex != -1) {
+ if (cmbForeColor.SelectedIndex == 0) {
+ if (fcmanualchange) {
+ ColorDialog cdColor = new ColorDialog();
+ if (cdColor.ShowDialog() == DialogResult.OK) {
+ customFore = cdColor.Color;
+ switch (lstElements.SelectedIndex) {
+ case 0 :
+ OffsetForeColor = customFore;
+ break;
+ case 1 :
+ DataForeColor = customFore;
+ break;
+ }
+ }
+ }
+ } else {
+ if (cmbForeColor.SelectedIndex == -1) cmbForeColor.SelectedIndex = 0;
+ switch (lstElements.SelectedIndex) {
+ case 0 :
+ OffsetForeColor = Color.FromName(cmbForeColor.Items[cmbForeColor.SelectedIndex].ToString());
+ break;
+ case 1 :
+ DataForeColor = Color.FromName(cmbForeColor.Items[cmbForeColor.SelectedIndex].ToString());
+ break;
+ }
+ }
+
+ lblOffsetPreview.ForeColor = OffsetForeColor;
+ lblOffsetPreview.BackColor = OffsetBackColor;
+
+ lblDataPreview.ForeColor = DataForeColor;
+ lblDataPreview.BackColor = DataBackColor;
+ } else {
+ MessageService.ShowError("Please select an element first!");
+ }
+ fcmanualchange = false;
+ }
+
+ void cmbBackColorSelectedValueChanged(object sender, EventArgs e)
+ {
+ if (lstElements.SelectedIndex != -1) {
+ if (cmbBackColor.SelectedIndex == 0) {
+ if (bcmanualchange) {
+ ColorDialog cdColor = new ColorDialog();
+ if (cdColor.ShowDialog() == DialogResult.OK) {
+ customBack = cdColor.Color;
+ switch (lstElements.SelectedIndex)
+ {
+ case 0 :
+ OffsetBackColor = customBack;
+ break;
+ case 1 :
+ DataBackColor = customBack;
+ break;
+ }
+ }
+ }
+ } else {
+ if (cmbBackColor.SelectedIndex == -1) cmbBackColor.SelectedIndex = 0;
+ switch (lstElements.SelectedIndex) {
+ case 0 :
+ OffsetBackColor = Color.FromName(cmbBackColor.Items[cmbBackColor.SelectedIndex].ToString());
+ break;
+ case 1 :
+ DataBackColor = Color.FromName(cmbBackColor.Items[cmbBackColor.SelectedIndex].ToString());
+ break;
+ }
+ }
+
+ lblOffsetPreview.ForeColor = OffsetForeColor;
+ lblOffsetPreview.BackColor = OffsetBackColor;
+
+ lblDataPreview.ForeColor = DataForeColor;
+ lblDataPreview.BackColor = DataBackColor;
+ } else {
+ MessageService.ShowError("Please select an element first!");
+ }
+ bcmanualchange = false;
+ }
+
+ void cmbForeColorDrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
+ {
+ Rectangle rc = new Rectangle(e.Bounds.X, e.Bounds.Y,
+ e.Bounds.Width, e.Bounds.Height);
+ Rectangle rc2 = new Rectangle(e.Bounds.X + 20, e.Bounds.Y,
+ e.Bounds.Width, e.Bounds.Height);
+ Rectangle rc3 = new Rectangle(e.Bounds.X + 5, e.Bounds.Y + 2, 10, 10);
+
+ string str;
+ Color color;
+ if (e.Index != -1) {
+ str = (string)cmbForeColor.Items[e.Index];
+ } else {
+ str = (string)cmbForeColor.Items[0];
+ }
+
+ if (str == "Custom") {
+ color = customFore;
+ } else {
+ color = Color.FromName(str);
+ }
+
+ if ( e.State == (DrawItemState.Selected | DrawItemState.Focus | DrawItemState.NoAccelerator | DrawItemState.NoFocusRect)) {
+ e.Graphics.FillRectangle(new SolidBrush(SystemColors.Highlight) , rc);
+ e.Graphics.DrawString( str , cmbForeColor.Font, new SolidBrush(Color.White), rc2);
+ e.Graphics.FillRectangle(new SolidBrush(color), rc3);
+ e.Graphics.DrawRectangle(Pens.White, rc3);
+ } else {
+ e.Graphics.FillRectangle(new SolidBrush(Color.White) , rc);
+ e.Graphics.DrawString( str , cmbForeColor.Font, new SolidBrush(Color.Black), rc2);
+ e.Graphics.FillRectangle(new SolidBrush(color), rc3);
+ e.Graphics.DrawRectangle(Pens.Black, rc3);
+ }
+ }
+
+ void cmbBackColorDrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
+ {
+ Rectangle rc = new Rectangle(e.Bounds.X, e.Bounds.Y,
+ e.Bounds.Width, e.Bounds.Height);
+ Rectangle rc2 = new Rectangle(e.Bounds.X + 20, e.Bounds.Y,
+ e.Bounds.Width, e.Bounds.Height);
+ Rectangle rc3 = new Rectangle(e.Bounds.X + 5, e.Bounds.Y + 2, 10, 10);
+
+ string str;
+ Color color;
+ if (e.Index != -1) {
+ str = (string)cmbBackColor.Items[e.Index];
+ } else {
+ str = (string)cmbBackColor.Items[0];
+ }
+
+ if (str == "Custom") {
+ color = customBack;
+ } else {
+ color = Color.FromName(str);
+ }
+
+ if ( e.State == (DrawItemState.Selected | DrawItemState.Focus | DrawItemState.NoAccelerator | DrawItemState.NoFocusRect)) {
+ e.Graphics.FillRectangle(new SolidBrush(SystemColors.Highlight) , rc);
+ e.Graphics.DrawString(str , cmbBackColor.Font, new SolidBrush(Color.White), rc2);
+ e.Graphics.FillRectangle(new SolidBrush(color), rc3);
+ e.Graphics.DrawRectangle(Pens.White, rc3);
+ } else {
+ e.Graphics.FillRectangle(new SolidBrush(Color.White), rc);
+ e.Graphics.DrawString(str , cmbBackColor.Font, new SolidBrush(Color.Black), rc2);
+ e.Graphics.FillRectangle(new SolidBrush(color), rc3);
+ e.Graphics.DrawRectangle(Pens.Black, rc3);
+ }
+ }
+
+ void cbBoldCheckedChanged(object sender, EventArgs e)
+ {
+ if (lstElements.SelectedIndex != -1) {
+ switch (lstElements.SelectedIndex) {
+ case 0 :
+ OffsetBold = cbBold.Checked;
+ if ((cbBold.Checked & !lblOffsetPreview.Font.Bold) ^ (!cbBold.Checked & lblOffsetPreview.Font.Bold))
+ lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Bold);
+ break;
+ case 1 :
+ DataBold = cbBold.Checked;
+ if ((cbBold.Checked & !lblDataPreview.Font.Bold) ^ (!cbBold.Checked & lblDataPreview.Font.Bold))
+ lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Bold);
+ break;
+ }
+ } else {
+ MessageService.ShowError("Please select an element first!");
+ }
+ }
+
+ void cbItalicCheckedChanged(object sender, EventArgs e)
+ {
+ if (lstElements.SelectedIndex != -1) {
+ switch (lstElements.SelectedIndex) {
+ case 0 :
+ OffsetItalic = cbItalic.Checked;
+ if ((cbItalic.Checked & !lblOffsetPreview.Font.Italic) || (!cbItalic.Checked & lblOffsetPreview.Font.Italic))
+ lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Italic);
+ break;
+ case 1 :
+ DataItalic = cbItalic.Checked;
+ if ((cbItalic.Checked & !lblDataPreview.Font.Italic) || (!cbItalic.Checked & lblDataPreview.Font.Italic))
+ lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Italic);
+ break;
+ }
+ } else {
+ MessageService.ShowError("Please select an element first!");
+ }
+ }
+
+ void cbUnderlineCheckedChanged(object sender, EventArgs e)
+ {
+ if (lstElements.SelectedIndex != -1) {
+ switch (lstElements.SelectedIndex) {
+ case 0 :
+ OffsetUnderline = cbUnderline.Checked;
+ if ((cbUnderline.Checked & !lblOffsetPreview.Font.Underline) || (!cbUnderline.Checked & lblOffsetPreview.Font.Underline))
+ lblOffsetPreview.Font = new Font(lblOffsetPreview.Font, lblOffsetPreview.Font.Style ^ FontStyle.Underline);
+ break;
+ case 1 :
+ DataUnderline = cbUnderline.Checked;
+ if ((cbUnderline.Checked & !lblDataPreview.Font.Underline) || (!cbUnderline.Checked & lblDataPreview.Font.Underline))
+ lblDataPreview.Font = new Font(lblDataPreview.Font, lblDataPreview.Font.Style ^ FontStyle.Underline);
+ break;
+ }
+ } else {
+ MessageService.ShowError("Please select an element first!");
+ }
+ }
+
+ void lstElementsSelectedValueChanged(object sender, EventArgs e)
+ {
+ switch (lstElements.SelectedIndex) {
+ case 0 :
+ cbBold.Checked = OffsetBold;
+ cbItalic.Checked = OffsetItalic;
+ cbUnderline.Checked = OffsetUnderline;
+
+ if (OffsetForeColor == customFore) {
+ cmbForeColor.SelectedIndex = 0;
+ } else {
+ cmbForeColor.SelectedIndex = cmbForeColor.Items.IndexOf(OffsetForeColor.Name);
+ }
+ if (OffsetBackColor == customBack) {
+ cmbBackColor.SelectedIndex = 0;
+ } else {
+ cmbBackColor.SelectedIndex = cmbBackColor.Items.IndexOf(OffsetBackColor.Name);
+ }
+ break;
+ case 1 :
+ cbBold.Checked = DataBold;
+ cbItalic.Checked = DataItalic;
+ cbUnderline.Checked = DataUnderline;
+
+ if (DataForeColor == customFore) {
+ cmbForeColor.SelectedIndex = 0;
+ } else {
+ cmbForeColor.SelectedIndex = cmbForeColor.Items.IndexOf(DataForeColor.Name);
+ }
+ if (DataBackColor == customBack) {
+ cmbBackColor.SelectedIndex = 0;
+ } else {
+ cmbBackColor.SelectedIndex = cmbBackColor.Items.IndexOf(DataBackColor.Name);
+ }
+ break;
+ }
+ }
+
+ void cmbForeColorDropDown(object sender, EventArgs e)
+ {
+ fcmanualchange = true;
+ }
+
+ void cmbBackColorDropDown(object sender, EventArgs e)
+ {
+ bcmanualchange = true;
+ }
+
+ bool IsNamedColor(Color color)
+ {
+ foreach (Color c in Colors) {
+ if (c.A == color.A) {
+ if (c.R == color.R) {
+ if (c.G == color.G) {
+ if (c.B == color.B) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+ string GetColorName(Color color)
+ {
+ if (IsNamedColor(color)) {
+ foreach (Color c in Colors) {
+ if (c.A == color.A) {
+ if (c.R == color.R) {
+ if (c.G == color.G) {
+ if (c.B == color.B) {
+ return c.Name;
+ }
+ }
+ }
+ }
+ }
+ }
+ return String.Empty;
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditView.cs b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditView.cs
new file mode 100644
index 0000000000..8f4db0e40b
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/Src/View/HexEditView.cs
@@ -0,0 +1,130 @@
+//
+//
+//
+//
+// $Revision$
+//
+
+using System;
+using System.IO;
+using System.Windows.Forms;
+
+using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop;
+using ICSharpCode.SharpDevelop.Gui;
+
+namespace HexEditor.View
+{
+ public class HexEditView : AbstractViewContent, IClipboardHandler, IUndoHandler
+ {
+ HexEditContainer hexEditContainer;
+
+ public HexEditView(OpenedFile file)
+ {
+ hexEditContainer = new HexEditContainer();
+ hexEditContainer.hexEditControl.DocumentChanged += new EventHandler(DocumentChanged);
+
+ this.Files.Add(file);
+
+ file.ForceInitializeView(this);
+ }
+
+ public override System.Windows.Forms.Control Control {
+ get { return hexEditContainer; }
+ }
+
+ public override void Save(OpenedFile file, Stream stream)
+ {
+ this.hexEditContainer.SaveFile(file, stream);
+ this.TitleName = Path.GetFileName(file.FileName);
+ this.TabPageText = this.TitleName;
+ }
+
+ public override void Load(OpenedFile file, Stream stream)
+ {
+ this.hexEditContainer.LoadFile(file, stream);
+ }
+
+ public override bool IsReadOnly {
+ get { return false; }
+ }
+
+ #region IClipboardHandler
+ public bool EnableCut {
+ get { return hexEditContainer.HasSelection & hexEditContainer.EditorFocused; }
+ }
+
+ public bool EnableCopy {
+ get { return hexEditContainer.HasSelection & hexEditContainer.EditorFocused; }
+ }
+
+ public bool EnablePaste {
+ get { return hexEditContainer.EditorFocused; }
+ }
+
+ public bool EnableDelete {
+ get { return hexEditContainer.HasSelection & hexEditContainer.EditorFocused; }
+ }
+
+ public bool EnableSelectAll {
+ get { return hexEditContainer.EditorFocused; }
+ }
+
+ public void Cut()
+ {
+ if (hexEditContainer.HasSelection) ClipboardWrapper.SetText(hexEditContainer.Cut());
+ }
+
+ public void Copy()
+ {
+ if (hexEditContainer.HasSelection) ClipboardWrapper.SetText(hexEditContainer.Copy());
+ }
+
+ public void Paste()
+ {
+ hexEditContainer.Paste(ClipboardWrapper.GetText());
+ }
+
+ public void Delete()
+ {
+ if (hexEditContainer.HasSelection) hexEditContainer.Delete();
+ }
+
+ public void SelectAll()
+ {
+ hexEditContainer.SelectAll();
+ }
+
+ #endregion
+
+ #region IUndoHandler
+ public bool EnableUndo {
+ get { return hexEditContainer.CanUndo; }
+ }
+
+ public bool EnableRedo {
+ get { return hexEditContainer.CanRedo; }
+ }
+
+ public void Undo()
+ {
+ if (hexEditContainer.CanUndo) hexEditContainer.Undo();
+ }
+
+ public void Redo()
+ {
+ if (hexEditContainer.CanRedo) hexEditContainer.Redo();
+ }
+
+ #endregion
+
+ void DocumentChanged(object sender, EventArgs e)
+ {
+ if (PrimaryFile != null) PrimaryFile.MakeDirty();
+ }
+
+ public override bool IsDirty {
+ get { return base.IsDirty; }
+ }
+ }
+}
diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/changes.txt b/src/AddIns/DisplayBindings/HexEditor/Project/changes.txt
new file mode 100644
index 0000000000..78294a6900
--- /dev/null
+++ b/src/AddIns/DisplayBindings/HexEditor/Project/changes.txt
@@ -0,0 +1,18 @@
+LIST OF CHANGES
+
+version: 0.0.1
+
+24.03.2007: Start of the project
+20.04.2007: release of alpha 1
+21.04.2007: bug fixing, display/scrolling improvements
+28.04.2007: Selection functionality implemented partly
+26.09.2007: Use of double buffering for painting and selection painting bugs fixed
+27.09.2007: Several selection bugs fixed.
+13.10.2007: Many bugs fixed and integration in SD.
+28.10.2007: Many other bugfixes and finishing alpha 2.
+
+version: 0.0.2
+
+18.02.2008: Final version for SD 3.0.0.2951
+20.02.2008: Implementation as DisplayBinding finished
+22.02.2008: Clean up and commenting.
\ No newline at end of file
diff --git a/src/SharpDevelop.sln b/src/SharpDevelop.sln
index 422fd5f904..6ba3f8cce2 100644
--- a/src/SharpDevelop.sln
+++ b/src/SharpDevelop.sln
@@ -6,173 +6,175 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{388C3979-2621-4839-A955-7E5C03BA0B63}"
+ ProjectSection(SolutionItems) = postProject
+ EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighlightingEditor", "AddIns\Misc\HighlightingEditor\Project\HighlightingEditor.csproj", "{8A462940-E5E9-4E85-982D-D4C006EE31D4}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowDesigner", "AddIns\DisplayBindings\WorkflowDesigner\Project\WorkflowDesigner.csproj", "{533F4684-DBA6-4518-B005-C84F22A2DD57}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{6604365C-C702-4C10-9BA8-637F1E3D4D0D}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{DB137F0B-9B62-4232-AE92-F7BE0280B8D3}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "AddIns\Misc\HtmlHelp2\Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassWizard", "AddIns\DisplayBindings\ClassDiagram\ClassWizard\ClassWizard.csproj", "{8C59E80D-C4E4-4F36-9AD8-47C40F6E58B4}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "AddIns\Misc\CodeCoverage\Project\CodeCoverage.csproj", "{08ce9972-283b-44f4-82fa-966f7dfa6b7a}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "AddIns\Misc\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}"
EndProject
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HtmlHelp2JScriptGlobals", "AddIns\Misc\HtmlHelp2\JScriptGlobals\HtmlHelp2JScriptGlobals.vbproj", "{E54A5AD2-418D-4A85-BA5E-CD803DE38715}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassEditor", "AddIns\DisplayBindings\ClassDiagram\ClassEditor\ClassEditor.csproj", "{F5E059BB-96C2-4398-BED0-8598CD434173}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "AddIns\Misc\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0D37CE59-B0EF-4F3C-B9EB-8557E53A448B}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{6B717BD1-CD5E-498C-A42E-9E6A4584DC48}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.ServerTools", "AddIns\Misc\ServerTools\ICSharpCode.ServerTools.csproj", "{8CF1EB90-324F-4AA9-BAA2-DEF87392CE86}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Backends", "Backends", "{FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{8CF9DB5A-A2F6-4A88-BABA-100912EAF6E8}"
- ProjectSection(SolutionItems) = postProject
- EndProjectSection
+Project("{982E8BC1-ACD7-4dbf-96AB-B2CE67D6A008}") = "FSharpBinding", "AddIns\BackendBindings\FSharp\FSharpBinding\Project\FSharpBinding.fsproj", "{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "AddIns\BackendBindings\XamlBinding\Project\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{e1b288a2-08ee-4318-8bbb-8ab72c69e33e}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6e59af58-f635-459a-9a35-c9ac41c00339}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{e1b288a2-08ee-4318-8bbb-8ab72c69e33e}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{8CF9DB5A-A2F6-4A88-BABA-100912EAF6E8}"
+ ProjectSection(SolutionItems) = postProject
+ EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "AddIns\BackendBindings\XamlBinding\Project\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}"
EndProject
-Project("{982E8BC1-ACD7-4dbf-96AB-B2CE67D6A008}") = "FSharpBinding", "AddIns\BackendBindings\FSharp\FSharpBinding\Project\FSharpBinding.fsproj", "{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.ServerTools", "AddIns\Misc\ServerTools\ICSharpCode.ServerTools.csproj", "{8CF1EB90-324F-4AA9-BAA2-DEF87392CE86}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{6B717BD1-CD5E-498C-A42E-9E6A4584DC48}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0D37CE59-B0EF-4F3C-B9EB-8557E53A448B}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{DB137F0B-9B62-4232-AE92-F7BE0280B8D3}"
- ProjectSection(SolutionItems) = postProject
- EndProjectSection
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "AddIns\Misc\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassEditor", "AddIns\DisplayBindings\ClassDiagram\ClassEditor\ClassEditor.csproj", "{F5E059BB-96C2-4398-BED0-8598CD434173}"
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HtmlHelp2JScriptGlobals", "AddIns\Misc\HtmlHelp2\JScriptGlobals\HtmlHelp2JScriptGlobals.vbproj", "{E54A5AD2-418D-4A85-BA5E-CD803DE38715}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "AddIns\Misc\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "AddIns\Misc\CodeCoverage\Project\CodeCoverage.csproj", "{08ce9972-283b-44f4-82fa-966f7dfa6b7a}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassWizard", "AddIns\DisplayBindings\ClassDiagram\ClassWizard\ClassWizard.csproj", "{8C59E80D-C4E4-4F36-9AD8-47C40F6E58B4}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowDesigner", "AddIns\DisplayBindings\WorkflowDesigner\Project\WorkflowDesigner.csproj", "{533F4684-DBA6-4518-B005-C84F22A2DD57}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{388C3979-2621-4839-A955-7E5C03BA0B63}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "AddIns\Misc\HtmlHelp2\Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{6604365C-C702-4C10-9BA8-637F1E3D4D0D}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighlightingEditor", "AddIns\Misc\HighlightingEditor\Project\HighlightingEditor.csproj", "{8A462940-E5E9-4E85-982D-D4C006EE31D4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{9421EDF4-9769-4BE9-B5A6-C87DE221D73C}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.DataTools", "Libraries\ICSharpCode.DataTools\ICSharpCode.DataTools.csproj", "{6CC3DF82-E815-483F-B4B5-85191064D981}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMeta", "Libraries\MyMeta\MyMeta.csproj", "{9B771930-6F16-4EC7-8CBB-C7B337EF5651}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj", "{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj", "{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMeta", "Libraries\MyMeta\MyMeta.csproj", "{9B771930-6F16-4EC7-8CBB-C7B337EF5651}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.DataTools", "Libraries\ICSharpCode.DataTools\ICSharpCode.DataTools.csproj", "{6CC3DF82-E815-483F-B4B5-85191064D981}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{5A3EBEBA-0560-41C1-966B-23F7D03A5486}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}"
-EndProject
-Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "Tools\Tools.build", "B13EFF7F-7EA4-4B68-A375-D112105E9182"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
+Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "Tools\Tools.build", "B13EFF7F-7EA4-4B68-A375-D112105E9182"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -536,78 +538,83 @@ Global
{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}.Release|Any CPU.Build.0 = Release|Any CPU
{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
- {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{CE5B42B7-6E8C-4385-9E97-F4023FC16BF2} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
- {8CF1EB90-324F-4AA9-BAA2-DEF87392CE86} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {E54A5AD2-418D-4A85-BA5E-CD803DE38715} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {1F261725-6318-4434-A1B1-6C70CE4CD324} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {08ce9972-283b-44f4-82fa-966f7dfa6b7a} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {918487B7-2153-4618-BBB3-344DBDDF2A2A} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {6604365C-C702-4C10-9BA8-637F1E3D4D0D} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {8A462940-E5E9-4E85-982D-D4C006EE31D4} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
- {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
- {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
- {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}
- {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}
- {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}
- {99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {e1b288a2-08ee-4318-8bbb-8ab72c69e33e} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {6e59af58-f635-459a-9a35-c9ac41c00339} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {BF38FB72-B380-4196-AF8C-95749D726C61} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {8CF9DB5A-A2F6-4A88-BABA-100912EAF6E8} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
- {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {8CF9DB5A-A2F6-4A88-BABA-100912EAF6E8}
- {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {8CF9DB5A-A2F6-4A88-BABA-100912EAF6E8}
- {388C3979-2621-4839-A955-7E5C03BA0B63} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
- {533F4684-DBA6-4518-B005-C84F22A2DD57} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
- {DB137F0B-9B62-4232-AE92-F7BE0280B8D3} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
- {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
- {0D37CE59-B0EF-4F3C-B9EB-8557E53A448B} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
- {6B717BD1-CD5E-498C-A42E-9E6A4584DC48} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
- {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
+ {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
+ {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
{CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
- {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0D37CE59-B0EF-4F3C-B9EB-8557E53A448B}
- {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0D37CE59-B0EF-4F3C-B9EB-8557E53A448B}
- {8C59E80D-C4E4-4F36-9AD8-47C40F6E58B4} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
- {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
- {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
- {F5E059BB-96C2-4398-BED0-8598CD434173} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
- {08F772A1-F0BE-433E-8B37-F6522953DB05} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
- {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {388C3979-2621-4839-A955-7E5C03BA0B63}
- {88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {388C3979-2621-4839-A955-7E5C03BA0B63}
- {78CC29AC-CC79-4355-B1F2-97936DF198AC} = {388C3979-2621-4839-A955-7E5C03BA0B63}
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
+ {6B717BD1-CD5E-498C-A42E-9E6A4584DC48} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
+ {0D37CE59-B0EF-4F3C-B9EB-8557E53A448B} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
+ {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
+ {DB137F0B-9B62-4232-AE92-F7BE0280B8D3} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
+ {533F4684-DBA6-4518-B005-C84F22A2DD57} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
+ {388C3979-2621-4839-A955-7E5C03BA0B63} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79}
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {388C3979-2621-4839-A955-7E5C03BA0B63}
- {6CC3DF82-E815-483F-B4B5-85191064D981} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
- {9B771930-6F16-4EC7-8CBB-C7B337EF5651} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
- {E73BB233-D88B-44A7-A98F-D71EE158381D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
- {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
- {D3C782BA-178E-4235-A3BA-8C11DEBB6BEE} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
- {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC} = {388C3979-2621-4839-A955-7E5C03BA0B63}
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {388C3979-2621-4839-A955-7E5C03BA0B63}
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {388C3979-2621-4839-A955-7E5C03BA0B63}
+ {08F772A1-F0BE-433E-8B37-F6522953DB05} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
+ {F5E059BB-96C2-4398-BED0-8598CD434173} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
+ {8C59E80D-C4E4-4F36-9AD8-47C40F6E58B4} = {DB137F0B-9B62-4232-AE92-F7BE0280B8D3}
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0D37CE59-B0EF-4F3C-B9EB-8557E53A448B}
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0D37CE59-B0EF-4F3C-B9EB-8557E53A448B}
+ {8CF9DB5A-A2F6-4A88-BABA-100912EAF6E8} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {BF38FB72-B380-4196-AF8C-95749D726C61} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {6e59af58-f635-459a-9a35-c9ac41c00339} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {e1b288a2-08ee-4318-8bbb-8ab72c69e33e} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {8CF9DB5A-A2F6-4A88-BABA-100912EAF6E8}
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {8CF9DB5A-A2F6-4A88-BABA-100912EAF6E8}
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {8A462940-E5E9-4E85-982D-D4C006EE31D4} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {6604365C-C702-4C10-9BA8-637F1E3D4D0D} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {918487B7-2153-4618-BBB3-344DBDDF2A2A} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {08ce9972-283b-44f4-82fa-966f7dfa6b7a} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {1F261725-6318-4434-A1B1-6C70CE4CD324} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {E54A5AD2-418D-4A85-BA5E-CD803DE38715} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {8CF1EB90-324F-4AA9-BAA2-DEF87392CE86} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
+ {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}
+ {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}
+ {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {BDDDCD01-D2FE-4EAD-9425-4B6B91922C7C}
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
- {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
- {8035765F-D51F-4A0C-A746-2FD100E19419} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
- {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
- {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
- {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
- {1152B71B-3C05-4598-B20D-823B5D40559E} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
- B13EFF7F-7EA4-4B68-A375-D112105E9182 = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
+ {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
+ {D3C782BA-178E-4235-A3BA-8C11DEBB6BEE} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
+ {E73BB233-D88B-44A7-A98F-D71EE158381D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
+ {9B771930-6F16-4EC7-8CBB-C7B337EF5651} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
+ {6CC3DF82-E815-483F-B4B5-85191064D981} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
+ B13EFF7F-7EA4-4B68-A375-D112105E9182 = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
+ {1152B71B-3C05-4598-B20D-823B5D40559E} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
+ {8035765F-D51F-4A0C-A746-2FD100E19419} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
EndGlobalSection
EndGlobal