Commit for development environment setup
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
@@ -0,0 +1,58 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
BIN
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/Test/App.ico
Normal file
BIN
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/Test/App.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,55 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
@@ -0,0 +1,56 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
227
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/Test/Form1.cs
Normal file
227
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/Test/Form1.cs
Normal file
@@ -0,0 +1,227 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: Form1.cs $ $Revision: 1 $
|
||||
* $Author: Kathy $ $Date: 12/06/05 12:06p $
|
||||
*
|
||||
* $History: Form1.cs $
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 12/06/05 Time: 12:06p
|
||||
* Created in $/LibSource/VG/Test
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 12/06/05 Time: 12:01p
|
||||
* Created in $/LibSource/VG.root/VG/Test
|
||||
*********************************************************************************************/
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using VG;
|
||||
using C1.C1Pdf;
|
||||
|
||||
namespace TestVG
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Form1.
|
||||
/// </summary>
|
||||
public class Form1 : System.Windows.Forms.Form
|
||||
{
|
||||
private System.Windows.Forms.Button button1;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private int ConvertToTwips = 1440;
|
||||
public Form1()
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent();
|
||||
|
||||
//
|
||||
// TODO: Add any constructor code after InitializeComponent call
|
||||
//
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if (components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(24, 8);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(72, 32);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "SVG To PDF";
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Location = new System.Drawing.Point(24, 72);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(584, 381);
|
||||
this.listBox1.TabIndex = 1;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(544, 8);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(56, 32);
|
||||
this.button2.TabIndex = 2;
|
||||
this.button2.Text = "Exit";
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
||||
this.ClientSize = new System.Drawing.Size(752, 494);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.listBox1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
listBox1.Items.Clear();
|
||||
DirectoryInfo di = new DirectoryInfo("E:\\proms.net\\genmac.xml");
|
||||
FileInfo[] fis = di.GetFiles("*.svg");
|
||||
foreach (FileInfo fi in fis)
|
||||
{
|
||||
this.listBox1.Items.Add(fi.Name);
|
||||
//TestSvgToPdf("E:\\proms.net\\genmac.xml",fi.Name);
|
||||
VG.Page pg = new Page(true, 0.5f * ConvertToTwips, 0.5f * ConvertToTwips);
|
||||
XmlDocument xmldoc = new XmlDocument();
|
||||
XmlTextReader reader = new XmlTextReader("E:\\proms.net\\genmac.xml\\"+fi.Name);
|
||||
xmldoc.Load(reader);
|
||||
reader.Close();
|
||||
try
|
||||
{
|
||||
GeneratePDFForSVGFile(xmldoc, fi.Name, pg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error processing: " + fi.Name, ex.Message);
|
||||
}
|
||||
}
|
||||
MessageBox.Show("DONE generating PDF files from SVG");
|
||||
}
|
||||
|
||||
private void GeneratePDFForSVGFile(XmlDocument xmldoc, string fname, VG.Page pg)
|
||||
{
|
||||
C1.C1Pdf.C1PdfDocument c1pdf = new C1.C1Pdf.C1PdfDocument();
|
||||
string rootname = fname.Substring(0,fname.Length-4);
|
||||
// create a pdf file with a page for each macro (i.e. macro element in xml tree),
|
||||
// put it into the pdf file.
|
||||
XmlNode topnode = xmldoc.LastChild;
|
||||
for (int i=0;i<topnode.ChildNodes.Count;i++)
|
||||
{
|
||||
XmlNode nd = topnode.ChildNodes[i];
|
||||
if (nd.Name!="desc")
|
||||
{
|
||||
SvgConvertToPdf(nd, c1pdf, pg);
|
||||
if (i!=topnode.ChildNodes.Count-1)c1pdf.NewPage();
|
||||
}
|
||||
}
|
||||
string outname = "E:\\proms.net\\genmac.xml\\testpdf\\" + rootname + ".pdf";
|
||||
c1pdf.Save(outname);
|
||||
}
|
||||
|
||||
private void SvgConvertToPdf(XmlNode nd, C1.C1Pdf.C1PdfDocument c1pdf, VG.Page ipg)
|
||||
{
|
||||
for (int i=0; i<nd.ChildNodes.Count; i++)
|
||||
{
|
||||
Page pg = new Page(true, ipg.LeftMargin, ipg.VertOffset);
|
||||
XmlElement cmdele = (XmlElement) nd.ChildNodes[i];
|
||||
string cmd = cmdele.Name.ToLower();
|
||||
if (cmdele.GetAttribute("id")=="C0")
|
||||
{
|
||||
pg.LeftMargin = 100.0f;
|
||||
pg.VertOffset = 100f;
|
||||
}
|
||||
switch (cmd)
|
||||
{
|
||||
case "rect":
|
||||
VG_Rect vgrec = new VG_Rect(cmdele, pg);
|
||||
vgrec.ToPdf(c1pdf);
|
||||
vgrec=null;
|
||||
break;
|
||||
case "line":
|
||||
VG_Line vgline = new VG_Line(cmdele, pg);
|
||||
vgline.ToPdf(c1pdf);
|
||||
break;
|
||||
case "text":
|
||||
VG_Text vgtxt = new VG_Text(cmdele, pg);
|
||||
vgtxt.ToPdf(c1pdf);
|
||||
break;
|
||||
case "gdiadj":
|
||||
break;
|
||||
case "ellipse":
|
||||
VG_Ellipse vgell = new VG_Ellipse(cmdele, pg);
|
||||
vgell.ToPdf(c1pdf);
|
||||
break;
|
||||
case "image":
|
||||
VG_Image vgi = new VG_Image(cmdele, pg);
|
||||
vgi.ToPdf(c1pdf);
|
||||
break;
|
||||
case "absolute":
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="button1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="button1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="listBox1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="listBox1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="listBox1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="button2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="button2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="button2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>Form1</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
</root>
|
@@ -0,0 +1,133 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{12299365-FD7A-458A-B1E0-574933F7A647}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = "App.ico"
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "Test"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "WinExe"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "Test"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Drawing"
|
||||
AssemblyName = "System.Drawing"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Windows.Forms"
|
||||
AssemblyName = "System.Windows.Forms"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "c1.c1pdf"
|
||||
AssemblyName = "C1.C1Pdf"
|
||||
HintPath = "C:\Program Files\ComponentOne Studio.NET\bin\c1.c1pdf.dll"
|
||||
AssemblyFolderKey = "hklm\c1studio"
|
||||
/>
|
||||
<Reference
|
||||
Name = "VG"
|
||||
AssemblyName = "VG"
|
||||
HintPath = "..\..\..\..\Ve-proms.net\Bin\VG.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "App.ico"
|
||||
BuildAction = "Content"
|
||||
/>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Form1.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Form1.resx"
|
||||
DependentUpon = "Form1.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
<File
|
||||
RelPath = "licenses.licx"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
@@ -0,0 +1,137 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{12299365-FD7A-458A-B1E0-574933F7A647}"
|
||||
SccProjectName = "SAK"
|
||||
SccLocalPath = "SAK"
|
||||
SccAuxPath = "SAK"
|
||||
SccProvider = "SAK"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = "App.ico"
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "Test"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "WinExe"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "Test"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Drawing"
|
||||
AssemblyName = "System.Drawing"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Windows.Forms"
|
||||
AssemblyName = "System.Windows.Forms"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "c1.c1pdf"
|
||||
AssemblyName = "C1.C1Pdf"
|
||||
HintPath = "C:\Program Files\ComponentOne Studio.NET\bin\c1.c1pdf.dll"
|
||||
AssemblyFolderKey = "hklm\c1studio"
|
||||
/>
|
||||
<Reference
|
||||
Name = "VG"
|
||||
AssemblyName = "VG"
|
||||
HintPath = "..\..\..\..\Ve-proms.net\Bin\VG.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "App.ico"
|
||||
BuildAction = "Content"
|
||||
/>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Form1.cs"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Form1.resx"
|
||||
DependentUpon = "Form1.cs"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
<File
|
||||
RelPath = "licenses.licx"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
@@ -0,0 +1 @@
|
||||
C1.C1Pdf.C1PdfDocument, C1.C1Pdf, Version=1.1.20052.40, Culture=neutral, PublicKeyToken=bc8d9c59cf1b601f
|
365
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/VG.cs
Normal file
365
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/VG.cs
Normal file
@@ -0,0 +1,365 @@
|
||||
/*********************************************************************************************
|
||||
* Copyright 2005 - Volian Enterprises, Inc. All rights reserved.
|
||||
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
* ------------------------------------------------------------------------------
|
||||
* $Workfile: VG.cs $ $Revision: 2 $
|
||||
* $Author: Jsj $ $Date: 2/28/06 1:33p $
|
||||
*
|
||||
* $History: VG.cs $
|
||||
*
|
||||
* ***************** Version 2 *****************
|
||||
* User: Jsj Date: 2/28/06 Time: 1:33p
|
||||
* Updated in $/LibSource/VG
|
||||
* updated for X/Y Plots
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 12/06/05 Time: 12:06p
|
||||
* Created in $/LibSource/VG
|
||||
*
|
||||
* ***************** Version 1 *****************
|
||||
* User: Kathy Date: 12/06/05 Time: 12:01p
|
||||
* Created in $/LibSource/VG.root/VG
|
||||
*********************************************************************************************/
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using C1.C1Pdf;
|
||||
|
||||
namespace VG
|
||||
{
|
||||
/// <summary>
|
||||
/// VG is the class representing vector graphics. It provides objects for:
|
||||
/// Line, Rectangle, Text, Ellipse, Bitmaps, etc.
|
||||
/// VG provides constructors for these objects from coordinate system locations
|
||||
/// (such as starting x,y ending x,y, etc), xml and svg.
|
||||
/// VG provides output to PDF. (More can be added).
|
||||
/// VG data is stored in TWIPS (1440 per inch)
|
||||
/// </summary>
|
||||
|
||||
// Temporary page class to store portrait/landscape, Left Margin, Vertical offset, etc
|
||||
public class Page
|
||||
{
|
||||
public bool portrait=true;
|
||||
public float LeftMargin=0f;
|
||||
public float VertOffset=0f;
|
||||
public Page(bool iport, float lm, float voff)
|
||||
{
|
||||
portrait=iport;
|
||||
LeftMargin=lm;
|
||||
VertOffset=voff;
|
||||
}
|
||||
}
|
||||
|
||||
public class VG
|
||||
{
|
||||
// Values of vector graphics items are stored as twips (1440 twips in an inch)
|
||||
public int cx;
|
||||
public int cy;
|
||||
public int dx;
|
||||
public int dy;
|
||||
public float lnwid;
|
||||
public Page pg;
|
||||
public bool MoveAbsolute; // TODO: Not sure what to do with this.
|
||||
|
||||
public VG()
|
||||
{
|
||||
cx = 0;
|
||||
cy = 0;
|
||||
dx = 0;
|
||||
dy = 0;
|
||||
MoveAbsolute = false;
|
||||
pg=null;
|
||||
}
|
||||
|
||||
public VG(int sx, int sy, int ex, int ey, bool ima, Page ipg)
|
||||
{
|
||||
cx = sx;
|
||||
cy = sy;
|
||||
dx = ex;
|
||||
dy = ey;
|
||||
MoveAbsolute = ima;
|
||||
pg=ipg;
|
||||
}
|
||||
|
||||
public float ToPoints(float twip)
|
||||
{
|
||||
float r = ((float)twip) * 0.05f;
|
||||
return r;
|
||||
}
|
||||
|
||||
public void UpdatePageInfo(Page pa)
|
||||
{
|
||||
pg.LeftMargin=pa.LeftMargin;
|
||||
pg.portrait=pg.portrait;
|
||||
pg.VertOffset=pg.VertOffset;
|
||||
}
|
||||
|
||||
public string AddRTFBUI(string origStr, string bold, string underline, string italics)
|
||||
{
|
||||
if (bold==""&&underline==""&&italics=="")return origStr;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (bold == "bold")sb.Append("{\\b");
|
||||
if (underline == "underline")sb.Append("{\\u");
|
||||
if (italics == "italics") sb.Append("{\\i");
|
||||
sb.Append(" ");
|
||||
sb.Append(origStr);
|
||||
if (bold == "bold")sb.Append("}");
|
||||
if (underline == "underline")sb.Append("}");
|
||||
if (italics == "italics") sb.Append("}");
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public class VG_Line : VG
|
||||
{
|
||||
// Line is defined as starting & ending points.
|
||||
public VG_Line(int sx, int sy, int ex, int ey, int w, Page ipg)
|
||||
{
|
||||
cx = sx;
|
||||
cy = sy;
|
||||
dx = ex;
|
||||
dy = ey;
|
||||
lnwid = w;
|
||||
pg=ipg;
|
||||
}
|
||||
|
||||
public VG_Line(XmlElement svg, Page ipg)
|
||||
{
|
||||
cx = System.Convert.ToInt32(svg.GetAttribute("x1"));
|
||||
cy = System.Convert.ToInt32(svg.GetAttribute("y1"));
|
||||
dx = System.Convert.ToInt32(svg.GetAttribute("x2"));
|
||||
dy = System.Convert.ToInt32(svg.GetAttribute("y2"));
|
||||
lnwid = System.Convert.ToInt32(svg.GetAttribute("stroke-width"));
|
||||
pg = ipg;
|
||||
}
|
||||
|
||||
public void ToPdf(C1PdfDocument c1pdf)
|
||||
{
|
||||
float startx = pg.portrait ? (cx + pg.LeftMargin): (pg.VertOffset + cy);
|
||||
float starty = pg.portrait ? (cy + pg.VertOffset): (pg.LeftMargin - cx);
|
||||
float endx = pg.portrait ? (dx + pg.LeftMargin): (pg.VertOffset + dy);
|
||||
float endy = pg.portrait ? (dy + pg.VertOffset): (pg.LeftMargin - dx);
|
||||
Pen pn = new Pen(Brushes.Black,ToPoints(lnwid));
|
||||
c1pdf.DrawLine(pn, ToPoints(startx), ToPoints(starty), ToPoints(endx), ToPoints(endy));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class VG_Rect : VG
|
||||
{
|
||||
// Rectangle is defined as starting point & length/width
|
||||
public VG_Rect(int sx, int sy, int ex, int ey, int w, Page ipg)
|
||||
{
|
||||
cx = sx;
|
||||
cy = sy;
|
||||
dx = ex;
|
||||
dy = ey;
|
||||
lnwid = w;
|
||||
pg = ipg;
|
||||
}
|
||||
|
||||
public VG_Rect(XmlElement svg, Page ipg)
|
||||
{
|
||||
cx = System.Convert.ToInt32(svg.GetAttribute("x"));
|
||||
cy = System.Convert.ToInt32(svg.GetAttribute("y"));
|
||||
dx = System.Convert.ToInt32(svg.GetAttribute("width"));
|
||||
dy = System.Convert.ToInt32(svg.GetAttribute("height"));
|
||||
lnwid = System.Convert.ToInt32(svg.GetAttribute("stroke-width"));
|
||||
pg = ipg;
|
||||
}
|
||||
|
||||
public void ToPdf(C1PdfDocument c1pdf)
|
||||
{
|
||||
Pen pn = new Pen(Brushes.Black,ToPoints(lnwid));
|
||||
|
||||
float startx = pg.portrait ? (cx + pg.LeftMargin): (pg.VertOffset + cy) ;
|
||||
float starty = pg.portrait ? (cy + pg.VertOffset): (pg.LeftMargin - cx);
|
||||
float endx = pg.portrait ? dx: dy;
|
||||
float endy = pg.portrait ? dy: dx;
|
||||
RectangleF rc = new RectangleF(ToPoints(startx), ToPoints(starty), ToPoints(endx), ToPoints(endy));
|
||||
c1pdf.DrawRectangle(pn,rc);
|
||||
}
|
||||
}
|
||||
|
||||
public class VG_Image : VG
|
||||
{
|
||||
private int Scale;
|
||||
private string FileName;
|
||||
|
||||
// Image is defined as starting point, scale factor (defaults to 1) & image file name
|
||||
public VG_Image(int sx, int sy, int iscale, string fname)
|
||||
{
|
||||
cx = sx;
|
||||
cy = sy;
|
||||
Scale = 1;
|
||||
FileName = fname;
|
||||
}
|
||||
|
||||
public VG_Image(XmlElement svg, Page ipg)
|
||||
{
|
||||
cx = System.Convert.ToInt32(svg.GetAttribute("x"));
|
||||
cy = System.Convert.ToInt32(svg.GetAttribute("y"));
|
||||
Scale=1;
|
||||
if (svg.HasAttribute("scale")) Scale = System.Convert.ToInt32(svg.GetAttribute("scale"));
|
||||
FileName = svg.GetAttribute("bname");
|
||||
pg = ipg;
|
||||
}
|
||||
|
||||
public void ToPdf(C1PdfDocument c1pdf)
|
||||
{
|
||||
Pen pn = new Pen(Brushes.Black,lnwid);
|
||||
Bitmap bm = new Bitmap(FileName);
|
||||
RectangleF rc = new RectangleF();
|
||||
rc.Height = ToPoints((bm.Height*Scale)*4.8f);
|
||||
rc.Width = ToPoints((bm.Width*Scale)*4.8f);
|
||||
rc.X = ToPoints(pg.LeftMargin+cx);
|
||||
rc.Y = ToPoints(pg.VertOffset+cy);
|
||||
c1pdf.DrawImage(bm, rc, ContentAlignment.MiddleCenter, ImageSizeModeEnum.Scale);
|
||||
}
|
||||
}
|
||||
|
||||
public class VG_Ellipse : VG
|
||||
{
|
||||
// Ellipse (circle) is defined by a bounding rectangle specified by a coordinate pair, a width, and a height
|
||||
public VG_Ellipse(int sx, int sy, int ex, int ey, int w, Page ipg)
|
||||
{
|
||||
cx = sx;
|
||||
cy = sy;
|
||||
dx = ex;
|
||||
dy = ey;
|
||||
lnwid = w;
|
||||
pg = ipg;
|
||||
}
|
||||
|
||||
public VG_Ellipse(XmlElement svg, Page ipg)
|
||||
{
|
||||
cx = System.Convert.ToInt32(svg.GetAttribute("cx"));
|
||||
cy = System.Convert.ToInt32(svg.GetAttribute("cy"));
|
||||
dx = System.Convert.ToInt32(svg.GetAttribute("rx"));
|
||||
dy = System.Convert.ToInt32(svg.GetAttribute("ry"));
|
||||
lnwid = System.Convert.ToInt32(svg.GetAttribute("stroke-width"));
|
||||
pg = ipg;
|
||||
}
|
||||
|
||||
public void ToPdf(C1PdfDocument c1pdf)
|
||||
{
|
||||
Pen pn = new Pen(Brushes.Black,ToPoints(lnwid));
|
||||
c1pdf.DrawEllipse(pn,ToPoints(pg.LeftMargin+cx), ToPoints(pg.VertOffset+cy), ToPoints(dx), ToPoints(dy));
|
||||
}
|
||||
}
|
||||
|
||||
public class VG_Text : VG
|
||||
{
|
||||
private string FontName;
|
||||
private int FontSize;
|
||||
private string Bold;
|
||||
private string Underline;
|
||||
private string Italics;
|
||||
private string Text;
|
||||
|
||||
// Text is defined by a starting location, attributes & the string
|
||||
public VG_Text(int sx, int sy, int fs, string txt, string fn, string ibold, string iunder, string iitalics, Page ipg)
|
||||
{
|
||||
cx = sx;
|
||||
cy = sy;
|
||||
FontSize = fs;
|
||||
FontName = fn;
|
||||
Text = txt;
|
||||
Bold = ibold;
|
||||
Underline = iunder;
|
||||
Italics = iitalics;
|
||||
pg = ipg;
|
||||
// TODO: The following were in the 16-bit code - we may need to use these, wait and see
|
||||
// strokeWidth = stroke;
|
||||
// strokeWidthBold = strokebold;
|
||||
// ULOffset = UnderlineOffset;
|
||||
// ULWidth = UnderlineWidth;
|
||||
}
|
||||
|
||||
public VG_Text(XmlElement svg, Page ipg)
|
||||
{
|
||||
cx = System.Convert.ToInt32(svg.GetAttribute("x"));
|
||||
cy = System.Convert.ToInt32(svg.GetAttribute("y"));
|
||||
FontSize = System.Convert.ToInt32(svg.GetAttribute("font-size"));
|
||||
Bold = svg.GetAttribute("font-weight");
|
||||
Underline = svg.GetAttribute("text-decoration");
|
||||
Italics = svg.GetAttribute("font-style");
|
||||
FontName = svg.GetAttribute("font-family");
|
||||
Text = svg.InnerText;
|
||||
pg = ipg;
|
||||
}
|
||||
|
||||
public void ToPdf(C1PdfDocument c1pdf)
|
||||
{
|
||||
Font myfont = new Font(FontName,FontSize);
|
||||
RectangleF rc = new RectangleF();
|
||||
// the returned value from c1 pdf code is already in points,
|
||||
// so need to convert the size.
|
||||
rc.Size = c1pdf.MeasureStringRtf(Text,myfont,500); // TODO: 500 or pagewidth, or what
|
||||
rc.X = ToPoints(pg.LeftMargin+cx);
|
||||
rc.Y = ToPoints(pg.VertOffset+cy)-FontSize;
|
||||
// add bold, underline & italics for entire object.
|
||||
string rtfout = AddRTFBUI(Text,Bold,Underline,Italics);
|
||||
c1pdf.DrawStringRtf(rtfout,myfont,Brushes.Black,rc);
|
||||
}
|
||||
}
|
||||
public class VG_Arc : VG
|
||||
{
|
||||
public Single sweepAngle;
|
||||
public Single startAngle;
|
||||
public float stX,stY;
|
||||
public float rWid,rHgt;
|
||||
#if DEBUG
|
||||
public static int iColor=0;
|
||||
public Color [] myColors={Color.Red,Color.Orange,Color.Yellow,Color.Green,Color.Blue,Color.BlueViolet,Color.Violet};
|
||||
#endif
|
||||
// Arc is defined by a bounding rectangle specified by a coordinate pair, a width, and a height
|
||||
public VG_Arc(float sx, float sy, float width, float hight, float stAngle, float swpAngle, int w, Page ipg)
|
||||
{
|
||||
stX = sx;
|
||||
stY = sy;
|
||||
rWid = width;
|
||||
rHgt = hight;
|
||||
startAngle = stAngle;
|
||||
// startAngle = 90;
|
||||
sweepAngle = swpAngle;
|
||||
// sweepAngle = -45;
|
||||
lnwid = w;
|
||||
pg = ipg;
|
||||
}
|
||||
|
||||
// public VG_Arc(XmlElement svg, Page ipg)
|
||||
// {
|
||||
// cx = System.Convert.ToInt32(svg.GetAttribute("cx"));
|
||||
// cy = System.Convert.ToInt32(svg.GetAttribute("cy"));
|
||||
// dx = System.Convert.ToInt32(svg.GetAttribute("rx"));
|
||||
// dy = System.Convert.ToInt32(svg.GetAttribute("ry"));
|
||||
// lnwid = System.Convert.ToInt32(svg.GetAttribute("stroke-width"));
|
||||
// pg = ipg;
|
||||
// }
|
||||
|
||||
public void ToPdf(C1PdfDocument c1pdf)
|
||||
{
|
||||
// Pen pn = new Pen(Brushes.Black,ToPoints(lnwid));
|
||||
#if DEBUG
|
||||
Pen pn = new Pen(myColors[iColor],ToPoints(lnwid));
|
||||
iColor=(iColor+1)%myColors.Length;
|
||||
#else
|
||||
Pen pn = new Pen(Color.Black,ToPoints(lnwid));
|
||||
#endif
|
||||
// PointF startpt = new PointF(stX,stY);
|
||||
// SizeF recsize = new SizeF(rWid,rHgt);
|
||||
// RectangleF rc = new RectangleF(startpt,recsize);
|
||||
float startx = pg.portrait ? (stX + pg.LeftMargin): (pg.VertOffset + stY);
|
||||
float starty = pg.portrait ? (stY + pg.VertOffset): (pg.LeftMargin - stX);
|
||||
RectangleF rc = new RectangleF(ToPoints(startx),ToPoints(starty),ToPoints(rWid),ToPoints(rHgt));
|
||||
// c1pdf.DrawRectangle(pn,rc); //debug
|
||||
|
||||
// c1pdf.DrawArc(new Pen(Color.Black,ToPoints(lnwid)),new RectangleF(stX,stY,rWid,rHgt),startAngle,sweepAngle);
|
||||
c1pdf.DrawArc(pn,rc,startAngle,sweepAngle);
|
||||
// c1pdf.DrawArc(new Pen(Color.Black, 4),rc,startAngle,sweepAngle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
111
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/VG.csproj
Normal file
111
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/VG.csproj
Normal file
@@ -0,0 +1,111 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{52D74078-3822-410E-889B-464BD21AAB9E}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "VG"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Library"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "VG"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "..\..\..\Ve-proms.net\Bin\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "c1.c1pdf"
|
||||
AssemblyName = "C1.C1Pdf"
|
||||
HintPath = "C:\Program Files\ComponentOne Studio.NET\bin\c1.c1pdf.dll"
|
||||
AssemblyFolderKey = "hklm\c1studio"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Drawing"
|
||||
AssemblyName = "System.Drawing"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "VG.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
29
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/VG.sln
Normal file
29
PROMS/ReferencedObjectsOld/LibSource/ZZZNotUsed/VG/VG.sln
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VG", "VG.csproj", "{52D74078-3822-410E-889B-464BD21AAB9E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{12299365-FD7A-458A-B1E0-574933F7A647}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{52D74078-3822-410E-889B-464BD21AAB9E}.Debug.ActiveCfg = Debug|.NET
|
||||
{52D74078-3822-410E-889B-464BD21AAB9E}.Debug.Build.0 = Debug|.NET
|
||||
{52D74078-3822-410E-889B-464BD21AAB9E}.Release.ActiveCfg = Release|.NET
|
||||
{52D74078-3822-410E-889B-464BD21AAB9E}.Release.Build.0 = Release|.NET
|
||||
{12299365-FD7A-458A-B1E0-574933F7A647}.Debug.ActiveCfg = Debug|.NET
|
||||
{12299365-FD7A-458A-B1E0-574933F7A647}.Debug.Build.0 = Debug|.NET
|
||||
{12299365-FD7A-458A-B1E0-574933F7A647}.Release.ActiveCfg = Release|.NET
|
||||
{12299365-FD7A-458A-B1E0-574933F7A647}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Reference in New Issue
Block a user