1
1
mirror of https://github.com/dgis/xsddiagram.git synced 2024-07-14 22:00:33 +03:00

10 years and a new version 1.0

This commit is contained in:
dgis 2016-02-27 22:18:53 +01:00
parent 97f914ff80
commit eec1003f76
7 changed files with 38 additions and 16 deletions

View File

@ -18,8 +18,7 @@ namespace XSDDiagram
private EventDelegate onRecentFileClick;
private EventDelegate onClearRecentFilesClick;
public MRUManager(ToolStripMenuItem parentMenuItem, string nameOfProgram, EventDelegate onRecentFileClick, EventDelegate onClearRecentFilesClick = null)
public MRUManager(ToolStripMenuItem parentMenuItem, string nameOfProgram, EventDelegate onRecentFileClick, EventDelegate onClearRecentFilesClick)
{
if (parentMenuItem == null || onRecentFileClick == null ||
nameOfProgram == null || nameOfProgram.Length == 0 || nameOfProgram.Contains("\\"))

View File

@ -555,7 +555,12 @@ namespace XSDDiagram
}
}
private void SelectDiagramElement(DiagramItem element, bool scrollToElement = false)
private void SelectDiagramElement(DiagramItem element)
{
SelectDiagramElement(element, false);
}
private void SelectDiagramElement(DiagramItem element, bool scrollToElement)
{
this.textBoxElementPath.Text = "";
@ -1768,7 +1773,12 @@ namespace XSDDiagram
}
}
private void ExpandCollapseElement(DiagramItem element, bool scrollToElement = false)
private void ExpandCollapseElement(DiagramItem element)
{
ExpandCollapseElement(element, false);
}
private void ExpandCollapseElement(DiagramItem element, bool scrollToElement)
{
if (element != null && element.HasChildElements)
{

View File

@ -14,10 +14,10 @@ FEATURES:
- Show and display the text/HTML documentation of element and attribute when available
- Walk the displayed tree with the keyboard
- Print the diagram
- Export the diagram to SVG, PNG, JPG and EMF (EMF only with Windows)
- Export the diagram to TXT, SVG, PNG, JPG and EMF (EMF only with Windows)
- Zoom the diagram with the mouse wheel while holding the control key
- XML validation based on the loaded XSD file
- Registration in the Windows Explorer contextual menu
- Registration in the Windows Explorer contextual menu (for Windows administrator only)
- Drag'n drop a xsd file or url on the main window header
- Command line image generation

Binary file not shown.

View File

@ -125,6 +125,7 @@
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="MRUManager.cs" />
<Compile Include="OpenURLForm.cs">
<SubType>Form</SubType>
</Compile>
@ -269,4 +270,4 @@
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>
</Project>

Binary file not shown.

View File

@ -31,16 +31,28 @@ namespace XSDDiagram.Rendering
#region Constructors and Destructor
public DiagramSvgRenderer(TextWriter writer, Graphics referenceGraphics = null)
{
if (writer == null)
{
throw new ArgumentNullException("writer", "The writer object is required.");
}
public DiagramSvgRenderer(TextWriter writer)
{
_writer = writer;
_graphics = referenceGraphics;
}
if (writer == null)
{
throw new ArgumentNullException("writer", "The writer object is required.");
}
_writer = writer;
_graphics = null;
}
public DiagramSvgRenderer(TextWriter writer, Graphics referenceGraphics)
{
if (writer == null)
{
throw new ArgumentNullException("writer", "The writer object is required.");
}
_writer = writer;
_graphics = referenceGraphics;
}
#endregion