mirror of
https://github.com/dgis/xsddiagram.git
synced 2024-10-05 14:17:40 +03:00
WebBrowser change for Mono.
This commit is contained in:
parent
500781c02a
commit
e353030650
1752
MainForm.Designer.cs
generated
1752
MainForm.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
28
MainForm.cs
28
MainForm.cs
@ -52,6 +52,7 @@ namespace XSDDiagram
|
||||
|
||||
private TextBox textBoxAnnotation;
|
||||
private WebBrowser webBrowserDocumentation;
|
||||
private bool webBrowserSupported = true;
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
@ -72,6 +73,18 @@ namespace XSDDiagram
|
||||
this.panelDiagram.DiagramControl.MouseMove += new MouseEventHandler(DiagramControl_MouseMove);
|
||||
this.panelDiagram.VirtualSize = new Size(0, 0);
|
||||
this.panelDiagram.DiagramControl.Paint += new PaintEventHandler(DiagramControl_Paint);
|
||||
|
||||
if (Options.IsRunningOnMono)
|
||||
{
|
||||
try
|
||||
{
|
||||
new WebBrowser().Navigate("about:blank");
|
||||
}
|
||||
catch
|
||||
{
|
||||
webBrowserSupported = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -303,14 +316,10 @@ namespace XSDDiagram
|
||||
{
|
||||
string fullPath = filename;
|
||||
Control browser = null;
|
||||
try
|
||||
{
|
||||
if(webBrowserSupported)
|
||||
browser = new WebBrowser();
|
||||
}
|
||||
catch
|
||||
{
|
||||
else
|
||||
browser = new System.Windows.Forms.TextBox() { Multiline = true, ReadOnly = true, ScrollBars = ScrollBars.Both };
|
||||
}
|
||||
browser.Dock = DockStyle.Fill;
|
||||
browser.TabIndex = 0;
|
||||
try
|
||||
@ -840,7 +849,7 @@ namespace XSDDiagram
|
||||
//
|
||||
// webBrowserDocumentation
|
||||
//
|
||||
try
|
||||
if(webBrowserSupported)
|
||||
{
|
||||
this.webBrowserDocumentation = new System.Windows.Forms.WebBrowser();
|
||||
this.webBrowserDocumentation.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
@ -850,12 +859,9 @@ namespace XSDDiagram
|
||||
this.webBrowserDocumentation.Size = new System.Drawing.Size(214, 117);
|
||||
this.webBrowserDocumentation.TabIndex = 1;
|
||||
this.splitContainerDiagramElement.Panel2.Controls.Add(this.webBrowserDocumentation);
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
else
|
||||
this.webBrowserDocumentation = null;
|
||||
}
|
||||
//
|
||||
// textBoxAnnotation
|
||||
//
|
||||
|
@ -1,42 +0,0 @@
|
||||
// XSDDiagram - A XML Schema Definition file viewer
|
||||
// Copyright (C) 2006-2011 Regis COSNIER
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
namespace XMLSchema
|
||||
{
|
||||
using System.ComponentModel;
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
partial class annotation
|
||||
{
|
||||
}
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
partial class localComplexType
|
||||
{
|
||||
}
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
partial class documentation
|
||||
{
|
||||
}
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
partial class appinfo
|
||||
{
|
||||
}
|
||||
}
|
36
XSDDiagrams/Parsing/XMLSchemaEx.cs
Normal file
36
XSDDiagrams/Parsing/XMLSchemaEx.cs
Normal file
@ -0,0 +1,36 @@
|
||||
// XSDDiagram - A XML Schema Definition file viewer
|
||||
// Copyright (C) 2006-2011 Regis COSNIER
|
||||
//
|
||||
// The content of this file is subject to the terms of either
|
||||
// the GNU Lesser General Public License only (LGPL) or
|
||||
// the Microsoft Public License (Ms-PL).
|
||||
// Please see LICENSE-LGPL.txt and LICENSE-MS-PL.txt files for details.
|
||||
//
|
||||
// Authors:
|
||||
// Regis Cosnier (Initial developer)
|
||||
// Paul Selormey (Refactoring)
|
||||
|
||||
namespace XMLSchema
|
||||
{
|
||||
using System.ComponentModel;
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
partial class annotation
|
||||
{
|
||||
}
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
partial class localComplexType
|
||||
{
|
||||
}
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
partial class documentation
|
||||
{
|
||||
}
|
||||
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
partial class appinfo
|
||||
{
|
||||
}
|
||||
}
|
@ -42,6 +42,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Parsing\Schema.cs" />
|
||||
<Compile Include="Parsing\XmlSchema.cs" />
|
||||
<Compile Include="Parsing\XMLSchemaEx.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Rendering\Diagram.cs" />
|
||||
<Compile Include="Rendering\DiagramAlignement.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user