Browse Source

remove samples/CodeConverter

pull/297/head
Siegfried Pammer 12 years ago
parent
commit
deda0498b8
  1. BIN
      samples/CodeConverter/AppPoolSettings.png
  2. 6
      samples/CodeConverter/Dependencies/Copy.bat
  3. 27
      samples/CodeConverter/Dependencies/CopyDependencies.build
  4. 6
      samples/CodeConverter/DeploymentNotes.txt
  5. 165
      samples/CodeConverter/Source/CCClient/CodeConversionForm.Designer.cs
  6. 78
      samples/CodeConverter/Source/CCClient/CodeConversionForm.cs
  7. 120
      samples/CodeConverter/Source/CCClient/CodeConversionForm.resx
  8. 150
      samples/CodeConverter/Source/CCClient/CodeConvertServiceClient.csproj
  9. 20
      samples/CodeConverter/Source/CCClient/Program.cs
  10. 33
      samples/CodeConverter/Source/CCClient/Properties/AssemblyInfo.cs
  11. 63
      samples/CodeConverter/Source/CCClient/Properties/Resources.Designer.cs
  12. 117
      samples/CodeConverter/Source/CCClient/Properties/Resources.resx
  13. 36
      samples/CodeConverter/Source/CCClient/Properties/Settings.Designer.cs
  14. 9
      samples/CodeConverter/Source/CCClient/Properties/Settings.settings
  15. 68
      samples/CodeConverter/Source/CCClient/Web References/ICSharpCode.OnlineConverter/ConvertService.wsdl
  16. 170
      samples/CodeConverter/Source/CCClient/Web References/ICSharpCode.OnlineConverter/Reference.cs
  17. 6
      samples/CodeConverter/Source/CCClient/Web References/ICSharpCode.OnlineConverter/Reference.map
  18. 15
      samples/CodeConverter/Source/CCClient/app.config
  19. 31
      samples/CodeConverter/Source/CCSite/About.aspx
  20. 21
      samples/CodeConverter/Source/CCSite/About.aspx.cs
  21. 31
      samples/CodeConverter/Source/CCSite/About.aspx.designer.cs
  22. 219
      samples/CodeConverter/Source/CCSite/CCSite.csproj
  23. 29
      samples/CodeConverter/Source/CCSite/Code/HtmlWriter.cs
  24. 28
      samples/CodeConverter/Source/CCSite/CodeFormatClient.aspx
  25. 21
      samples/CodeConverter/Source/CCSite/CodeFormatClient.aspx.cs
  26. 16
      samples/CodeConverter/Source/CCSite/CodeFormatClient.aspx.designer.cs
  27. 1
      samples/CodeConverter/Source/CCSite/CodeFormatService.asmx
  28. 32
      samples/CodeConverter/Source/CCSite/CodeFormatService.asmx.cs
  29. 10
      samples/CodeConverter/Source/CCSite/Convert.aspx
  30. 21
      samples/CodeConverter/Source/CCSite/Convert.aspx.cs
  31. 14
      samples/CodeConverter/Source/CCSite/Convert.aspx.designer.cs
  32. 16
      samples/CodeConverter/Source/CCSite/ConvertCSharp20ToVbNet80.aspx
  33. 19
      samples/CodeConverter/Source/CCSite/ConvertCSharp20ToVbNet80.aspx.cs
  34. 14
      samples/CodeConverter/Source/CCSite/ConvertCSharp20ToVbNet80.aspx.designer.cs
  35. 1
      samples/CodeConverter/Source/CCSite/ConvertService.asmx
  36. 47
      samples/CodeConverter/Source/CCSite/ConvertService.cs
  37. 58
      samples/CodeConverter/Source/CCSite/Default.aspx
  38. 18
      samples/CodeConverter/Source/CCSite/Default.aspx.cs
  39. 13
      samples/CodeConverter/Source/CCSite/Default.aspx.designer.cs
  40. 21
      samples/CodeConverter/Source/CCSite/DotNetClientApplication.aspx
  41. 21
      samples/CodeConverter/Source/CCSite/DotNetClientApplication.aspx.cs
  42. 16
      samples/CodeConverter/Source/CCSite/DotNetClientApplication.aspx.designer.cs
  43. 39
      samples/CodeConverter/Source/CCSite/FormatCode.aspx
  44. 53
      samples/CodeConverter/Source/CCSite/FormatCode.aspx.cs
  45. 103
      samples/CodeConverter/Source/CCSite/FormatCode.aspx.designer.cs
  46. 35
      samples/CodeConverter/Source/CCSite/Properties/AssemblyInfo.cs
  47. 20
      samples/CodeConverter/Source/CCSite/Properties/PublishProfiles/Local Profile.pubxml
  48. 32
      samples/CodeConverter/Source/CCSite/ProzacAfternoon.master
  49. 18
      samples/CodeConverter/Source/CCSite/ProzacAfternoon.master.cs
  50. 32
      samples/CodeConverter/Source/CCSite/ProzacAfternoon.master.designer.cs
  51. 46
      samples/CodeConverter/Source/CCSite/SnippetConverter.aspx
  52. 41
      samples/CodeConverter/Source/CCSite/SnippetConverter.aspx.cs
  53. 58
      samples/CodeConverter/Source/CCSite/SnippetConverter.aspx.designer.cs
  54. 44
      samples/CodeConverter/Source/CCSite/Web.Config
  55. 13
      samples/CodeConverter/Source/CCSite/clientaccesspolicy.xml
  56. 242
      samples/CodeConverter/Source/CCSite/default.css
  57. BIN
      samples/CodeConverter/Source/CCSite/downloads/CodeConvertServiceClient.zip
  58. BIN
      samples/CodeConverter/Source/CCSite/downloads/CodeConvertServiceClient_Source.zip
  59. BIN
      samples/CodeConverter/Source/CCSite/downloads/CodeFormatServiceClient.zip
  60. BIN
      samples/CodeConverter/Source/CCSite/downloads/CodeFormatServiceClient_Source.zip
  61. BIN
      samples/CodeConverter/Source/CCSite/images/bg.gif
  62. BIN
      samples/CodeConverter/Source/CCSite/images/cnr_bl.gif
  63. BIN
      samples/CodeConverter/Source/CCSite/images/cnr_br.gif
  64. BIN
      samples/CodeConverter/Source/CCSite/images/cnr_tl.gif
  65. BIN
      samples/CodeConverter/Source/CCSite/images/cnr_tr.gif
  66. BIN
      samples/CodeConverter/Source/CCSite/images/header.jpg
  67. BIN
      samples/CodeConverter/Source/CCSite/images/sample.jpg
  68. BIN
      samples/CodeConverter/Source/CCSite/images/topnav_bg.gif
  69. BIN
      samples/CodeConverter/Source/CCSite/images/topnav_bg_grey.gif
  70. BIN
      samples/CodeConverter/Source/CCSite/screenshots/CodeConverterClient.png
  71. BIN
      samples/CodeConverter/Source/CCSite/screenshots/FormatCode_Html.png
  72. BIN
      samples/CodeConverter/Source/CCSite/screenshots/FormatCode_Preview.png
  73. BIN
      samples/CodeConverter/Source/CCSite/screenshots/FormatCode_Source.png
  74. 38
      samples/CodeConverter/Source/CodeConverter.sln
  75. 171
      samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatForm.Designer.cs
  76. 43
      samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatForm.cs
  77. 120
      samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatForm.resx
  78. 152
      samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatServiceClient.csproj
  79. 20
      samples/CodeConverter/Source/CodeFormatServiceClient/Program.cs
  80. 33
      samples/CodeConverter/Source/CodeFormatServiceClient/Properties/AssemblyInfo.cs
  81. 63
      samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Resources.Designer.cs
  82. 117
      samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Resources.resx
  83. 36
      samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Settings.Designer.cs
  84. 9
      samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Settings.settings
  85. 212
      samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/Reference.cs
  86. 7
      samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/Reference.map
  87. 6
      samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/codeformatservice.disco
  88. 110
      samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/codeformatservice.wsdl
  89. 16
      samples/CodeConverter/Source/CodeFormatServiceClient/app.config
  90. 95
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/BooHelpers.cs
  91. 83
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/HelperFunctions.cs
  92. 138
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/ICSharpCode.CodeConversion.csproj
  93. 13
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/IConvertCode.cs
  94. 36
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/Properties/AssemblyInfo.cs
  95. 26
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/PythonHelpers.cs
  96. 60
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/ReferencedContentsSingleton.cs
  97. 26
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/RubyHelpers.cs
  98. 89
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/SnippetConversion.cs
  99. 2
      src/Automated.proj

BIN
samples/CodeConverter/AppPoolSettings.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

6
samples/CodeConverter/Dependencies/Copy.bat

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
%windir%\microsoft.net\framework\v4.0.30319\msbuild CopyDependencies.build
@IF %ERRORLEVEL% NEQ 0 GOTO err
@exit /B 0
:err
@PAUSE
@exit /B 1

27
samples/CodeConverter/Dependencies/CopyDependencies.build

@ -1,27 +0,0 @@ @@ -1,27 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTarget="Build">
<ItemGroup>
<GenericDeps Include="..\..\..\bin\ICSharpCode.NRefactory.dll"/>
<GenericDeps Include="..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll"/>
<GenericDeps Include="..\..\..\bin\Mono.Cecil.dll"/>
<GenericDeps Include="..\..\..\bin\ICSharpCode.AvalonEdit.dll"/>
<GenericDeps Include="..\..\..\bin\log4net.dll"/>
<BooDeps Include="..\..\..\AddIns\BackendBindings\BooBinding\Boo.Lang.dll"/>
<BooDeps Include="..\..\..\AddIns\BackendBindings\BooBinding\Boo.Lang.Compiler.dll"/>
<BooDeps Include="..\..\..\AddIns\BackendBindings\BooBinding\NRefactoryToBooConverter.dll"/>
<PyDeps Include="..\..\..\bin\ICSharpCode.Scripting.dll"/>
<PyDeps Include="..\..\..\AddIns\BackendBindings\PythonBinding\PythonBinding.dll"/>
<IrDeps Include="..\..\..\AddIns\BackendBindings\RubyBinding\RubyBinding.dll"/>
</ItemGroup>
<Target Name="Build">
<Copy SourceFiles="@(BooDeps)" DestinationFolder=".\" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(GenericDeps)" DestinationFolder=".\" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(PyDeps)" DestinationFolder=".\" SkipUnchangedFiles="true"/>
<Copy SourceFiles="@(IrDeps)" DestinationFolder=".\" SkipUnchangedFiles="true"/>
</Target>
</Project>

6
samples/CodeConverter/DeploymentNotes.txt

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
If you get the following error:
Could not load file or assembly 'PythonBinding' or one of its dependencies. An attempt was made to load a program with an incorrect format.
See AppPoolSettings.png (DLR languages are compiled to x86, which, on x64 IIS leads to aforementioned error message)

165
samples/CodeConverter/Source/CCClient/CodeConversionForm.Designer.cs generated

@ -1,165 +0,0 @@ @@ -1,165 +0,0 @@
namespace CodeConvertServiceClient
{
partial class CodeConversionForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (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.typeOfConversion = new System.Windows.Forms.ComboBox();
this.performConversion = new System.Windows.Forms.Button();
this.inputSource = new System.Windows.Forms.TextBox();
this.outputTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.SuspendLayout();
//
// typeOfConversion
//
this.typeOfConversion.FormattingEnabled = true;
this.typeOfConversion.Items.AddRange(new object[] {
"C# to VB.NET",
"VB.NET to C#",
"C# to Boo",
"VB.NET to Boo"});
this.typeOfConversion.Location = new System.Drawing.Point(376, 19);
this.typeOfConversion.Name = "typeOfConversion";
this.typeOfConversion.Size = new System.Drawing.Size(121, 21);
this.typeOfConversion.TabIndex = 1;
//
// performConversion
//
this.performConversion.Location = new System.Drawing.Point(204, 303);
this.performConversion.Name = "performConversion";
this.performConversion.Size = new System.Drawing.Size(166, 23);
this.performConversion.TabIndex = 4;
this.performConversion.Text = "Perform Conversion";
this.performConversion.UseVisualStyleBackColor = true;
this.performConversion.Click += new System.EventHandler(this.performConversion_Click);
//
// inputSource
//
this.inputSource.Location = new System.Drawing.Point(16, 82);
this.inputSource.Multiline = true;
this.inputSource.Name = "inputSource";
this.inputSource.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.inputSource.Size = new System.Drawing.Size(709, 211);
this.inputSource.TabIndex = 3;
//
// outputTextBox
//
this.outputTextBox.Location = new System.Drawing.Point(16, 366);
this.outputTextBox.Multiline = true;
this.outputTextBox.Name = "outputTextBox";
this.outputTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.outputTextBox.Size = new System.Drawing.Size(709, 211);
this.outputTextBox.TabIndex = 6;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 22);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(354, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Step 1: Choose source language and destination language for conversion";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 57);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(327, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Step 2: Paste the source code (entire class[es]) you want to convert";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(13, 340);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(76, 13);
this.label3.TabIndex = 5;
this.label3.Text = "Step 4: Output";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(13, 303);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(185, 13);
this.label4.TabIndex = 7;
this.label4.Text = "Step 3: Perform the actual conversion";
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(373, 57);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(132, 13);
this.linkLabel1.TabIndex = 8;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "Online Snippet Conversion";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// CodeConversionForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(734, 592);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.outputTextBox);
this.Controls.Add(this.inputSource);
this.Controls.Add(this.performConversion);
this.Controls.Add(this.typeOfConversion);
this.Name = "CodeConversionForm";
this.Text = "Code Converter";
this.Load += new System.EventHandler(this.CodeConversionForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ComboBox typeOfConversion;
private System.Windows.Forms.Button performConversion;
private System.Windows.Forms.TextBox inputSource;
private System.Windows.Forms.TextBox outputTextBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.LinkLabel linkLabel1;
}
}

78
samples/CodeConverter/Source/CCClient/CodeConversionForm.cs

@ -1,78 +0,0 @@ @@ -1,78 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections.Specialized;
using CodeConvertServiceClient.ICSharpCode.OnlineConverter;
namespace CodeConvertServiceClient
{
public partial class CodeConversionForm : Form
{
StringDictionary ConversionTypes;
public CodeConversionForm()
{
InitializeComponent();
ConversionTypes = new StringDictionary();
ConversionTypes.Add("C# to VB.NET", "cs2vbnet");
ConversionTypes.Add("VB.NET to C#", "vbnet2cs");
ConversionTypes.Add("C# to Boo", "cs2boo");
ConversionTypes.Add("VB.NET to Boo", "vbnet2boo");
}
private void CodeConversionForm_Load(object sender, EventArgs e)
{
typeOfConversion.SelectedIndex = 0;
}
private void performConversion_Click(object sender, EventArgs e)
{
string buttonText = "";
try
{
ConvertService cs = new ConvertService();
string convertedCode = "", errorMessage = "";
string conversionType = ConversionTypes[typeOfConversion.Items[typeOfConversion.SelectedIndex].ToString()];
buttonText = performConversion.Text;
performConversion.Text = "waiting...";
performConversion.Enabled = false;
bool bResult = cs.PerformConversion(conversionType, inputSource.Text,
out convertedCode, out errorMessage);
if (bResult)
{
outputTextBox.Text = convertedCode.Replace("\n", "\r\n");
}
else
{
outputTextBox.Text = errorMessage.Replace("\n", "\r\n");
}
}
catch (Exception ex)
{
// Failure is reported via dialog box, but not presented in a "nice way" - after all, this is for developers
MessageBox.Show("Web Service failed: " + ex.ToString());
}
finally
{
performConversion.Text = buttonText;
performConversion.Enabled = true;
}
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("http://codeconverter.sharpdevelop.net/SnippetConverter.aspx");
}
}
}

120
samples/CodeConverter/Source/CCClient/CodeConversionForm.resx

@ -1,120 +0,0 @@ @@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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 for serialized 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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

150
samples/CodeConverter/Source/CCClient/CodeConvertServiceClient.csproj

@ -1,150 +0,0 @@ @@ -1,150 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{93D91711-636F-4796-8572-F043D4CF8FA5}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CodeConvertServiceClient</RootNamespace>
<AssemblyName>CodeConvertServiceClient</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CodeConversionForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CodeConversionForm.Designer.cs">
<DependentUpon>CodeConversionForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="CodeConversionForm.resx">
<SubType>Designer</SubType>
<DependentUpon>CodeConversionForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="Web References\ICSharpCode.OnlineConverter\ConvertService.wsdl" />
<None Include="Web References\ICSharpCode.OnlineConverter\Reference.map">
<Generator>MSDiscoCodeGenerator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Web References\ICSharpCode.OnlineConverter\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.map</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<WebReferences Include="Web References\" />
</ItemGroup>
<ItemGroup>
<WebReferenceUrl Include="http://codeconverter.sharpdevelop.net/ConvertService.asmx%3fWSDL">
<UrlBehavior>Dynamic</UrlBehavior>
<RelPath>Web References\ICSharpCode.OnlineConverter\</RelPath>
<UpdateFromURL>http://codeconverter.sharpdevelop.net/ConvertService.asmx%3fWSDL</UpdateFromURL>
<ServiceLocationURL>
</ServiceLocationURL>
<CachedDynamicPropName>
</CachedDynamicPropName>
<CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
<CachedSettingsPropName>CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService</CachedSettingsPropName>
</WebReferenceUrl>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

20
samples/CodeConverter/Source/CCClient/Program.cs

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace CodeConvertServiceClient
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new CodeConversionForm());
}
}
}

33
samples/CodeConverter/Source/CCClient/Properties/AssemblyInfo.cs

@ -1,33 +0,0 @@ @@ -1,33 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("CodeConvertServiceClient")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("AlphaSierraPapa")]
[assembly: AssemblyProduct("CodeConvertServiceClient")]
[assembly: AssemblyCopyright("Copyright © AlphaSierraPapa 2005")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f4eafea9-cf98-4ef0-92e0-f38415517e51")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

63
samples/CodeConverter/Source/CCClient/Properties/Resources.Designer.cs generated

@ -1,63 +0,0 @@ @@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CodeConvertServiceClient.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeConvertServiceClient.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

117
samples/CodeConverter/Source/CCClient/Properties/Resources.resx

@ -1,117 +0,0 @@ @@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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 for serialized 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="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

36
samples/CodeConverter/Source/CCClient/Properties/Settings.Designer.cs generated

@ -1,36 +0,0 @@ @@ -1,36 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CodeConvertServiceClient.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
[global::System.Configuration.DefaultSettingValueAttribute("http://codeconverter.sharpdevelop.net/ConvertService.asmx")]
public string CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService {
get {
return ((string)(this["CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService"]));
}
}
}
}

9
samples/CodeConverter/Source/CCClient/Properties/Settings.settings

@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="CodeConvertServiceClient.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService" Type="(Web Service URL)" Scope="Application">
<Value Profile="(Default)">http://codeconverter.sharpdevelop.net/ConvertService.asmx</Value>
</Setting>
</Settings>
</SettingsFile>

68
samples/CodeConverter/Source/CCClient/Web References/ICSharpCode.OnlineConverter/ConvertService.wsdl

@ -1,68 +0,0 @@ @@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://developer.sharpdevelop.net/CodeConverter.NET/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://developer.sharpdevelop.net/CodeConverter.NET/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://developer.sharpdevelop.net/CodeConverter.NET/">
<s:element name="PerformConversion">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="TypeOfConversion" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="SourceCode" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="PerformConversionResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="PerformConversionResult" type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="ConvertedCode" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="ErrorMessage" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="PerformConversionSoapIn">
<wsdl:part name="parameters" element="tns:PerformConversion" />
</wsdl:message>
<wsdl:message name="PerformConversionSoapOut">
<wsdl:part name="parameters" element="tns:PerformConversionResponse" />
</wsdl:message>
<wsdl:portType name="ConvertServiceSoap">
<wsdl:operation name="PerformConversion">
<wsdl:input message="tns:PerformConversionSoapIn" />
<wsdl:output message="tns:PerformConversionSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ConvertServiceSoap" type="tns:ConvertServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="PerformConversion">
<soap:operation soapAction="http://developer.sharpdevelop.net/CodeConverter.NET/PerformConversion" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ConvertServiceSoap12" type="tns:ConvertServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="PerformConversion">
<soap12:operation soapAction="http://developer.sharpdevelop.net/CodeConverter.NET/PerformConversion" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ConvertService">
<wsdl:port name="ConvertServiceSoap" binding="tns:ConvertServiceSoap">
<soap:address location="http://codeconverter.sharpdevelop.net/ConvertService.asmx" />
</wsdl:port>
<wsdl:port name="ConvertServiceSoap12" binding="tns:ConvertServiceSoap12">
<soap12:address location="http://codeconverter.sharpdevelop.net/ConvertService.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

170
samples/CodeConverter/Source/CCClient/Web References/ICSharpCode.OnlineConverter/Reference.cs

@ -1,170 +0,0 @@ @@ -1,170 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1.
//
#pragma warning disable 1591
namespace CodeConvertServiceClient.ICSharpCode.OnlineConverter {
using System;
using System.Web.Services;
using System.Diagnostics;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="ConvertServiceSoap", Namespace="http://developer.sharpdevelop.net/CodeConverter.NET/")]
public partial class ConvertService : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback PerformConversionOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
public ConvertService() {
this.Url = global::CodeConvertServiceClient.Properties.Settings.Default.CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}
public new string Url {
get {
return base.Url;
}
set {
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
&& (this.useDefaultCredentialsSetExplicitly == false))
&& (this.IsLocalFileSystemWebService(value) == false))) {
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}
public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
}
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}
/// <remarks/>
public event PerformConversionCompletedEventHandler PerformConversionCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://developer.sharpdevelop.net/CodeConverter.NET/PerformConversion", RequestNamespace="http://developer.sharpdevelop.net/CodeConverter.NET/", ResponseNamespace="http://developer.sharpdevelop.net/CodeConverter.NET/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool PerformConversion(string TypeOfConversion, string SourceCode, out string ConvertedCode, out string ErrorMessage) {
object[] results = this.Invoke("PerformConversion", new object[] {
TypeOfConversion,
SourceCode});
ConvertedCode = ((string)(results[1]));
ErrorMessage = ((string)(results[2]));
return ((bool)(results[0]));
}
/// <remarks/>
public void PerformConversionAsync(string TypeOfConversion, string SourceCode) {
this.PerformConversionAsync(TypeOfConversion, SourceCode, null);
}
/// <remarks/>
public void PerformConversionAsync(string TypeOfConversion, string SourceCode, object userState) {
if ((this.PerformConversionOperationCompleted == null)) {
this.PerformConversionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPerformConversionOperationCompleted);
}
this.InvokeAsync("PerformConversion", new object[] {
TypeOfConversion,
SourceCode}, this.PerformConversionOperationCompleted, userState);
}
private void OnPerformConversionOperationCompleted(object arg) {
if ((this.PerformConversionCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.PerformConversionCompleted(this, new PerformConversionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
}
System.Uri wsUri = new System.Uri(url);
if (((wsUri.Port >= 1024)
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
return true;
}
return false;
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
public delegate void PerformConversionCompletedEventHandler(object sender, PerformConversionCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class PerformConversionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal PerformConversionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
/// <remarks/>
public string ConvertedCode {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[1]));
}
}
/// <remarks/>
public string ErrorMessage {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[2]));
}
}
}
}
#pragma warning restore 1591

6
samples/CodeConverter/Source/CCClient/Web References/ICSharpCode.OnlineConverter/Reference.map

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Results>
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://codeconverter.sharpdevelop.net/ConvertService.asmx?WSDL" filename="ConvertService.wsdl" />
</Results>
</DiscoveryClientResultsFile>

15
samples/CodeConverter/Source/CCClient/app.config

@ -1,15 +0,0 @@ @@ -1,15 +0,0 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="CodeConvertServiceClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<applicationSettings>
<CodeConvertServiceClient.Properties.Settings>
<setting name="CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService" serializeAs="String">
<value>http://codeconverter.sharpdevelop.net/ConvertService.asmx</value>
</setting>
</CodeConvertServiceClient.Properties.Settings>
</applicationSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

31
samples/CodeConverter/Source/CCSite/About.aspx

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/ProzacAfternoon.master"
AutoEventWireup="true" CodeBehind="About.aspx.cs"
Inherits="CCSite.About" Title="About" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<div class="news_right clearfix" id="news">
<div class="news_cnr_top"><img src="images/cnr_tl.gif" alt="corner" width="8" height="8" class="cnr" style="display: none" /></div>
<p><span class="news_title">Images and Layout</span><br />
The design used for this site originates from <a href="http://www.oswd.org/">Open Source Web Design</a>,
and we decided to use the <a href="http://www.oswd.org/design/preview/id/2381">prozac afternoon</a> layout.
</p>
<p>
We changed the top photo, and went with one from <a href="http://www.photocase.de/">PhotoCase.de</a>.
The bridge metaphor is intended to symbolize a code conversion.
</p>
<div class="news_cnr_bottom"><img src="images/cnr_bl.gif" alt="corner" width="8" height="8" class="cnr" style="display: none" /></div>
</div>
<p class="page_title">Version Information</p>
<p>The online code conversion facility is currently using version
<asp:Label ID="VersionLabel" runat="server" Text="Label"></asp:Label>
of the <a href="http://laputa.sharpdevelop.net/NRefactoryTutorialVideo.aspx">NRefactory</a>
parser layer of <a href="http://www.icsharpcode.net/opensource/sd/">SharpDevelop</a>.
</p>
<p class="page_title">Who is Providing This Service?</p>
<p>This Web site is operated by the SharpDevelop team to gather as much feedback on our
code conversion feature as possible.
</p>
</asp:Content>

21
samples/CodeConverter/Source/CCSite/About.aspx.cs

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace CCSite
{
public partial class About : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
VersionLabel.Text = ICSharpCode.CodeConversion.CodeConversionHelpers.GetNRefactoryVersion();
}
}
}

31
samples/CodeConverter/Source/CCSite/About.aspx.designer.cs generated

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.312
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CCSite {
/// <summary>
/// About class.
/// </summary>
/// <remarks>
/// Auto-generated class.
/// </remarks>
public partial class About {
/// <summary>
/// VersionLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label VersionLabel;
}
}

219
samples/CodeConverter/Source/CCSite/CCSite.csproj

@ -1,219 +0,0 @@ @@ -1,219 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6597D0F8-916A-45EB-98D1-831064914B77}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CCSite</RootNamespace>
<AssemblyName>CCSite</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>4.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Extensions.Design" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Mobile" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="About.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>About.aspx</DependentUpon>
</Compile>
<Compile Include="About.aspx.designer.cs">
<DependentUpon>About.aspx</DependentUpon>
</Compile>
<Compile Include="CodeFormatClient.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>CodeFormatClient.aspx</DependentUpon>
</Compile>
<Compile Include="CodeFormatClient.aspx.designer.cs">
<DependentUpon>CodeFormatClient.aspx</DependentUpon>
</Compile>
<Compile Include="CodeFormatService.asmx.cs">
<DependentUpon>CodeFormatService.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="Code\HtmlWriter.cs" />
<Compile Include="Convert.aspx.cs">
<DependentUpon>Convert.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Convert.aspx.designer.cs">
<DependentUpon>Convert.aspx</DependentUpon>
</Compile>
<Compile Include="ConvertCSharp20ToVbNet80.aspx.cs">
<DependentUpon>ConvertCSharp20ToVbNet80.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ConvertCSharp20ToVbNet80.aspx.designer.cs">
<DependentUpon>ConvertCSharp20ToVbNet80.aspx</DependentUpon>
</Compile>
<Compile Include="ConvertService.cs">
<DependentUpon>ConvertService.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="DotNetClientApplication.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>DotNetClientApplication.aspx</DependentUpon>
</Compile>
<Compile Include="DotNetClientApplication.aspx.designer.cs">
<DependentUpon>DotNetClientApplication.aspx</DependentUpon>
</Compile>
<Compile Include="FormatCode.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>FormatCode.aspx</DependentUpon>
</Compile>
<Compile Include="FormatCode.aspx.designer.cs">
<DependentUpon>FormatCode.aspx</DependentUpon>
</Compile>
<Compile Include="SnippetConverter.aspx.cs">
<DependentUpon>SnippetConverter.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SnippetConverter.aspx.designer.cs">
<DependentUpon>SnippetConverter.aspx</DependentUpon>
</Compile>
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProzacAfternoon.master.cs">
<DependentUpon>ProzacAfternoon.master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ProzacAfternoon.master.designer.cs">
<DependentUpon>ProzacAfternoon.master</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="clientaccesspolicy.xml" />
<Content Include="ProzacAfternoon.master" />
<Content Include="Web.Config" />
</ItemGroup>
<ItemGroup>
<Content Include="About.aspx" />
<Content Include="screenshots\CodeConverterClient.png">
</Content>
<Content Include="Convert.aspx" />
<Content Include="ConvertCSharp20ToVbNet80.aspx" />
<Content Include="ConvertService.asmx" />
<Content Include="DotNetClientApplication.aspx" />
<Content Include="SnippetConverter.aspx" />
<Content Include="Default.aspx" />
<Content Include="default.css" />
<Content Include="images\bg.gif" />
<Content Include="images\cnr_bl.gif" />
<Content Include="images\cnr_br.gif" />
<Content Include="images\cnr_tl.gif" />
<Content Include="images\cnr_tr.gif" />
<Content Include="images\header.jpg" />
<Content Include="images\sample.jpg" />
<Content Include="images\topnav_bg.gif" />
<Content Include="images\topnav_bg_grey.gif" />
</ItemGroup>
<ItemGroup>
<Content Include="downloads\CodeConvertServiceClient.zip">
</Content>
<Content Include="downloads\CodeConvertServiceClient_Source.zip">
</Content>
<Content Include="CodeFormatService.asmx" />
<Content Include="FormatCode.aspx" />
<Content Include="screenshots\FormatCode_Preview.png" />
<Content Include="screenshots\FormatCode_Source.png" />
<Content Include="screenshots\FormatCode_Html.png" />
</ItemGroup>
<ItemGroup>
<Content Include="CodeFormatClient.aspx" />
<Content Include="downloads\CodeFormatServiceClient.zip" />
<Content Include="downloads\CodeFormatServiceClient_Source.zip" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ICSharpCode.CodeConversion\ICSharpCode.CodeConversion.csproj">
<Project>{BF122CB4-E896-40CA-BF0A-AB44906AB87D}</Project>
<Name>ICSharpCode.CodeConversion</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\Local Profile.pubxml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>54633</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>
</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

29
samples/CodeConverter/Source/CCSite/Code/HtmlWriter.cs

@ -1,29 +0,0 @@ @@ -1,29 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
/*
using ICSharpCode.AvalonEdit;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Highlighting;
*/
namespace ICSharpCode.HtmlSyntaxColorizer
{
public class HtmlWriter
{
public string GenerateHtml(string code, string highlighterName)
{
/*
TextDocument doc = new TextDocument(code);
IHighlightingDefinition def = HighlightingManager.Instance.GetDefinition("C#");
DocumentHighlighter highlighter = new DocumentHighlighter(doc, def.MainRuleSet);
string html = HtmlClipboard.CreateHtmlFragment(doc, highlighter, null, new HtmlOptions());
*/
return "";
}
}
}

28
samples/CodeConverter/Source/CCSite/CodeFormatClient.aspx

@ -1,28 +0,0 @@ @@ -1,28 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/ProzacAfternoon.master"
AutoEventWireup="true" CodeBehind="CodeFormatClient.aspx.cs"
Inherits="CCSite.CodeFormatClient" Title="Windows Forms Client Demo Application for Code Formatting" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<p class="page_title">Code Formatting Client</p>
<p>
This is a demo of how to use the Code Formatting Web Service - implemented as a Windows Forms application.
Source code is included.
</p>
<p>
<img src="/screenshots/FormatCode_Source.png" width="759" height="495" alt="Providing Input" />
</p>
<p>
<img src="/screenshots/FormatCode_Preview.png" width="759" height="495" alt="The generated HTML is rendered as a preview" />
</p>
<p>
<img src="/screenshots/FormatCode_Html.png" width="759" height="495" alt="Copy the HTML to your Web site / application" />
</p>
<p class="page_title">Downloads</p>
<ul>
<li><a href="/downloads/CodeFormatServiceClient.zip">Application</a></li>
<li><a href="/downloads/CodeFormatServiceClient_Source.zip">Source Code</a> (C#)</li>
</ul>
</asp:Content>

21
samples/CodeConverter/Source/CCSite/CodeFormatClient.aspx.cs

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace CCSite
{
public partial class CodeFormatClient : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

16
samples/CodeConverter/Source/CCSite/CodeFormatClient.aspx.designer.cs generated

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CCSite {
public partial class CodeFormatClient {
}
}

1
samples/CodeConverter/Source/CCSite/CodeFormatService.asmx

@ -1 +0,0 @@ @@ -1 +0,0 @@
<%@ WebService Language="C#" CodeBehind="CodeFormatService.asmx.cs" Class="CCSite.CodeFormatService" %>

32
samples/CodeConverter/Source/CCSite/CodeFormatService.asmx.cs

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
namespace CCSite
{
/// <summary>
/// Summary description for CodeFormatService
/// </summary>
[WebService(Namespace = "http://codeconverter.sharpdevelop.net/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class CodeFormatService : System.Web.Services.WebService
{
[WebMethod]
public string Format(string Document, string HighlighterName, bool IncludeLineNumbers)
{
throw new NotImplementedException("This feature has been removed");
}
[WebMethod]
public string[] RetrieveAvailableHighlighters()
{
throw new NotImplementedException("This feature has been removed");
}
}
}

10
samples/CodeConverter/Source/CCSite/Convert.aspx

@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/ProzacAfternoon.master" AutoEventWireup="true"
Inherits="ConvertPage"
Title="Online Code Converter for .NET 2.0"
ValidateRequest="false" Codebehind="Convert.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
NO LONGER IN USE
</asp:Content>

21
samples/CodeConverter/Source/CCSite/Convert.aspx.cs

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ICSharpCode.CodeConversion;
public partial class ConvertPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Redirect("/SnippetConverter.aspx");
Response.End();
}
}

14
samples/CodeConverter/Source/CCSite/Convert.aspx.designer.cs generated

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class ConvertPage {
}

16
samples/CodeConverter/Source/CCSite/ConvertCSharp20ToVbNet80.aspx

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true"
Inherits="ConvertCSharp20ToVbNet80"
ValidateRequest="false" Codebehind="ConvertCSharp20ToVbNet80.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Convert C# 2.0 Code to VB.NET 8.0</title>
</head>
<body>
NO LONGER USED
</body>
</html>

19
samples/CodeConverter/Source/CCSite/ConvertCSharp20ToVbNet80.aspx.cs

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ConvertCSharp20ToVbNet80 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// THIS PAGE IS NO LONGER USED
Response.Redirect("Default.aspx", true);
}
}

14
samples/CodeConverter/Source/CCSite/ConvertCSharp20ToVbNet80.aspx.designer.cs generated

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class ConvertCSharp20ToVbNet80 {
}

1
samples/CodeConverter/Source/CCSite/ConvertService.asmx

@ -1 +0,0 @@ @@ -1 +0,0 @@
<%@ WebService Language="C#" CodeBehind="ConvertService.cs" Class="ConvertService" %>

47
samples/CodeConverter/Source/CCSite/ConvertService.cs

@ -1,47 +0,0 @@ @@ -1,47 +0,0 @@
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using ICSharpCode.CodeConversion;
/// <summary>
/// Summary description for ConvertService
/// </summary>
[WebService(Namespace = "http://developer.sharpdevelop.net/CodeConverter.NET/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class ConvertService : System.Web.Services.WebService {
public ConvertService ()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public bool PerformConversion(string TypeOfConversion, string SourceCode, out string ConvertedCode, out string ErrorMessage)
{
return ConvertSnippet(TypeOfConversion, SourceCode, out ConvertedCode, out ErrorMessage);
}
// a simple wrapper to streamline method names
[WebMethod]
public bool Convert(string TypeOfConversion, string SourceCode, out string ConvertedCode, out string ErrorMessage)
{
return ConvertSnippet(TypeOfConversion, SourceCode, out ConvertedCode, out ErrorMessage);
}
[WebMethod]
public bool ConvertSnippet(string TypeOfConversion, string SourceCode, out string ConvertedCode, out string ErrorMessage)
{
ErrorMessage = ConvertedCode = "";
bool result = CodeConversionHelpers.ConvertSnippet(TypeOfConversion, SourceCode, out ConvertedCode, out ErrorMessage);
return result;
}
}

58
samples/CodeConverter/Source/CCSite/Default.aspx

@ -1,58 +0,0 @@ @@ -1,58 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/ProzacAfternoon.master"
AutoEventWireup="true"
Inherits="_DefaultPage"
Title="About the Code Converter" Codebehind="Default.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<p class="page_title">The Code Converter</p>
<p>
Go directly to the <a href="SnippetConverter.aspx">converter</a> (supports C#, VB.NET and Boo)
</p>
<!--
<p class="page_title">The Code Formatter</p>
<p>
Go directly to the <a href="FormatCode.aspx">Code Formatter</a> (supports ASP/XHTML, BAT, Boo, Coco, C++.NET, C#,
HTML, Java, JavaScript, Patch, PHP, TeX, VBNET, XML)
</p>
<p>
The code formatting capability is also exposed as a Web service. A <a href="CodeFormatClient.aspx">sample client application</a> is available
for download. Please note: SharpDevelop ships with \Samples\HtmlSyntaxColorizer on which this Web service is built upon.
</p>
-->
<p class="page_title">Code Conversion as a Web Service</p>
<p>
If you want to use code conversion in your code, you can call the <a href="ConvertService.asmx">
Convert Service</a>. It is really simple to use: reference the service, and
you are good to go. Please use the method Convert (the others are deprecated), and the first
parameter has the following options: cs2vbnet, vbnet2cs, cs2boo, vbnet2boo. If conversion
fails, you can look at the ErrorMessage to see what went wrong. Otherwise, ConvertedSource
will contain the source code in the target language. The service is doing the exact
same steps as the <a href="SnippetConverter.aspx">online converter</a>.
</p>
<p>
A sample Windows Forms application demonstrating the usage of the service is available:
<a href="DotNetClientApplication.aspx">Windows Forms Web Service Client</a> (source included)
</p>
<p class="page_title">Technical Background</p>
<p>
The converter uses <a href="http://www.icsharpcode.net/opensource/sd/">SharpDevelop</a>'s
NRefactory to perform the conversion. For the conversion
to work properly, you have to paste a full class or source code file because we
don't do "magic" RegEx's or string replacement - our code converter uses a full
blown parser, and that's why the source code must be valid.</p>
<p>
Note that the conversion is not perfect (ie references to external references can
be guessed only), however, if you encounter a problem such as a wrongly converted
statement, please let us know - after all, the reason why we provide this online
converter is to more easily gather feedback. You can get in touch with us via the <a href="http://community.sharpdevelop.net/forums/19/ShowForum.aspx">
Bug Reporting Forum</a>. By providing us with a sample of what's not working
as expected, we can improve the converter
so you get better results the next time - as well as everyone else.
</p>
</asp:Content>

18
samples/CodeConverter/Source/CCSite/Default.aspx.cs

@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _DefaultPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}

13
samples/CodeConverter/Source/CCSite/Default.aspx.designer.cs generated

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class _DefaultPage {
}

21
samples/CodeConverter/Source/CCSite/DotNetClientApplication.aspx

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/ProzacAfternoon.master" AutoEventWireup="true"
CodeBehind="DotNetClientApplication.aspx.cs" Inherits="CCSite.DotNetClientApplication"
Title="Windows Forms Web Service Client" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<p class="page_title">Windows Forms Web Service Client</p>
<p>
This is a demo of how to use the Code Conversion Web Service - implemented as a Windows Forms application.
Source code is included.
</p>
<p>
<img src="/screenshots/CodeConverterClient.png" width="750" height="628" alt=".NET Client for Code Conversion Web Service" />
</p>
<p class="page_title">Downloads</p>
<ul>
<li><a href="/downloads/CodeConvertServiceClient.zip">Application</a></li>
<li><a href="/downloads/CodeConvertServiceClient_Source.zip">Source Code</a> (C#)</li>
</ul>
</asp:Content>

21
samples/CodeConverter/Source/CCSite/DotNetClientApplication.aspx.cs

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace CCSite
{
public partial class DotNetClientApplication : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

16
samples/CodeConverter/Source/CCSite/DotNetClientApplication.aspx.designer.cs generated

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CCSite {
public partial class DotNetClientApplication {
}
}

39
samples/CodeConverter/Source/CCSite/FormatCode.aspx

@ -1,39 +0,0 @@ @@ -1,39 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/ProzacAfternoon.master"
AutoEventWireup="true" CodeBehind="FormatCode.aspx.cs" Inherits="CCSite.FormatCode"
ValidateRequest="false" Title="Format Code" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
<p class="page_title">Step 1: Choose source language</p>
<p>
<asp:DropDownList ID="languageChoice" runat="server">
</asp:DropDownList>
<br />
</p>
<p class="page_title">Step 2: Paste the source code you want to HTML format</p>
<p>
<asp:TextBox ID="inputTextBox" runat="server" Height="171px" TextMode="MultiLine"
Width="737px"></asp:TextBox>
<br /> (Note: We do not store the code you submit in any way!)
</p>
<p class="page_title">Step 3: Format source code</p>
<p>
<asp:CheckBox ID="ShowLineNumbers" runat="server" Text="Show line numbers " /><br />
<asp:CheckBox ID="UseAlternatingBackground" runat="server" Text="Use alternating line background" /><br />
<asp:Button ID="convertCode" runat="server" Text="Format source code" OnClick="formatCode_Click" /><br />
</p>
<p class="page_title">Step 4: Output</p>
<p>
<asp:Label ID="OutputLabel" runat="server" Text="Formatted source code" Width="741px"></asp:Label><br />
<asp:TextBox ID="outputTextBox" runat="server" Height="171px" TextMode="MultiLine"
Width="737px"></asp:TextBox>
</p>
<div style="width: 100%;" runat="server" ID="PreviewPane" visible="false">
<p class="page_title">Inline Code Preview</p>
<p>
<asp:Literal ID="inlineCodePreview" runat="server"></asp:Literal>
</p>
</div>
</asp:Content>

53
samples/CodeConverter/Source/CCSite/FormatCode.aspx.cs

@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace CCSite
{
public partial class FormatCode : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// this feature is currently disabled
Response.Redirect("default.aspx");
Response.End();
/*
if (Page.IsPostBack) return;
Hashtable ht = HighlightingManager.Manager.HighlightingDefinitions;
foreach (DictionaryEntry de in ht)
{
string currentKey = de.Key.ToString();
languageChoice.Items.Add(currentKey);
}
languageChoice.Items.FindByValue("C#").Selected = true;
*/
}
protected void formatCode_Click(object sender, EventArgs e)
{
/*
HtmlWriter writer = new HtmlWriter();
writer.ShowLineNumbers = ShowLineNumbers.Checked;
writer.AlternateLineBackground = UseAlternatingBackground.Checked;
string generatedHtml = writer.GenerateHtml(inputTextBox.Text, languageChoice.SelectedValue);
string codeHtmlDocument = "<html><body>" + generatedHtml + "</body></html>";
outputTextBox.Text = codeHtmlDocument;
inlineCodePreview.Text = generatedHtml;
PreviewPane.Visible = true;
*/
}
}
}

103
samples/CodeConverter/Source/CCSite/FormatCode.aspx.designer.cs generated

@ -1,103 +0,0 @@ @@ -1,103 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.312
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CCSite {
/// <summary>
/// FormatCode class.
/// </summary>
/// <remarks>
/// Auto-generated class.
/// </remarks>
public partial class FormatCode {
/// <summary>
/// languageChoice control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList languageChoice;
/// <summary>
/// inputTextBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox inputTextBox;
/// <summary>
/// ShowLineNumbers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox ShowLineNumbers;
/// <summary>
/// UseAlternatingBackground control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox UseAlternatingBackground;
/// <summary>
/// convertCode control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button convertCode;
/// <summary>
/// OutputLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label OutputLabel;
/// <summary>
/// outputTextBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox outputTextBox;
/// <summary>
/// PreviewPane control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl PreviewPane;
/// <summary>
/// inlineCodePreview control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal inlineCodePreview;
}
}

35
samples/CodeConverter/Source/CCSite/Properties/AssemblyInfo.cs

@ -1,35 +0,0 @@ @@ -1,35 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("CCSite")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CCSite")]
[assembly: AssemblyCopyright("Copyright © 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]
// 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.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

20
samples/CodeConverter/Source/CCSite/Properties/PublishProfiles/Local Profile.pubxml

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<EnableUpdateable>True</EnableUpdateable>
<DebugSymbols>False</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>D:\Temp\Test</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>

32
samples/CodeConverter/Source/CCSite/ProzacAfternoon.master

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
<%@ Master Language="C#" AutoEventWireup="true" Inherits="ProzacAfternoon" Codebehind="ProzacAfternoon.master.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link rel="stylesheet" type="text/css" href="default.css" media="screen" />
</head>
<body>
<form id="form1" runat="server">
<div class="wrap clearfix">
<div class="header"><strong>code converter</strong> by SharpDevelop</div>
<div class="topnav" id="nav">
<ul>
<li><a href="Default.aspx">home</a></li>
<li><a href="SnippetConverter.aspx">convert</a></li>
<li><a href="http://community.sharpdevelop.net/forums/">forums</a></li>
<li><a href="http://www.icsharpcode.net/opensource/sd/download/">download</a></li>
<li><a href="http://wiki.sharpdevelop.net/">wiki</a></li>
<li><a href="About.aspx">about</a></li>
</ul>
</div>
<div class="container clearfix">
<asp:contentplaceholder id="MainContent" runat="server">
</asp:contentplaceholder>
</div>
<div class="footer" id="footer"> <a href="Default.aspx">home</a>&nbsp;&nbsp;:&nbsp;&nbsp; <a href="SnippetConverter.aspx">convert</a>&nbsp;&nbsp;:&nbsp;&nbsp; <a href="http://community.sharpdevelop.net/forums/">forums</a>&nbsp;&nbsp;:&nbsp;&nbsp; <a href="http://www.icsharpcode.net/opensource/sd/download/">download</a>&nbsp;&nbsp;:&nbsp;&nbsp; <a href="http://wiki.sharpdevelop.net/">wiki</a>&nbsp;&nbsp;:&nbsp;&nbsp; <a href="About.aspx">about</a> </div>
</div>
</form>
</body>
</html>

18
samples/CodeConverter/Source/CCSite/ProzacAfternoon.master.cs

@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ProzacAfternoon : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}

32
samples/CodeConverter/Source/CCSite/ProzacAfternoon.master.designer.cs generated

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class ProzacAfternoon {
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// MainContent control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
}

46
samples/CodeConverter/Source/CCSite/SnippetConverter.aspx

@ -1,46 +0,0 @@ @@ -1,46 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/ProzacAfternoon.master" AutoEventWireup="true"
Inherits="SnippetConverterPage"
Title="Snippet Converter for .NET 4.0"
ValidateRequest="false" Codebehind="SnippetConverter.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
<p class="page_title">Step 1: Choose source language and destination language for conversion</p>
<p>
<asp:RadioButtonList ID="languageChoice" runat="server" RepeatColumns="4">
<asp:ListItem Selected="True" Value="cs2vbnet">C# to VB.NET</asp:ListItem>
<asp:ListItem Value="vbnet2cs">VB.NET to C#</asp:ListItem>
<asp:ListItem Value="cs2boo">C# to Boo</asp:ListItem>
<asp:ListItem Value="vbnet2boo">VB.NET to Boo</asp:ListItem>
<asp:ListItem Value="cs2python">C# to Python</asp:ListItem>
<asp:ListItem Value="vbnet2python">VB.NET to Python</asp:ListItem>
<asp:ListItem Value="cs2ruby">C# to Ruby</asp:ListItem>
<asp:ListItem Value="vbnet2ruby">VB.NET to Ruby</asp:ListItem>
</asp:RadioButtonList>
<br />
</p>
<p class="page_title">Step 2: Paste the source code snippet you want to convert</p>
<p>
<asp:TextBox ID="inputTextBox" runat="server" Height="171px" TextMode="MultiLine"
Width="737px"></asp:TextBox>
<br /> (Note: We do not store the code you submit in any way!)
</p>
<p class="page_title">Step 3: Perform the actual conversion</p>
<p>
<asp:Button ID="convertCode" runat="server" Text="Perform conversion" OnClick="convertCode_Click" /><br />
</p>
<p class="page_title">Step 4: Output</p>
<p>
<asp:Label ID="OutputLabel" runat="server" Text="Converted Sourcecode" Width="741px"></asp:Label><br />
<asp:TextBox ID="outputTextBox" runat="server" Height="171px" TextMode="MultiLine"
Width="737px"></asp:TextBox>
</p>
<p class="page_title">IMPORTANT: Please help us improve!</p>
<p>
If you encounter a problem such as a wrongly converted statement (<a href="default.aspx">read about conversion limitations first</a>), please let us know via the
<a href="http://community.sharpdevelop.net/forums/19/ShowForum.aspx">Bug Reporting Forum</a>.
By providing us with a sample of what's not working as expected, we can improve the converter.
</p>
</asp:Content>

41
samples/CodeConverter/Source/CCSite/SnippetConverter.aspx.cs

@ -1,41 +0,0 @@ @@ -1,41 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ICSharpCode.CodeConversion;
public partial class SnippetConverterPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void convertCode_Click(object sender, EventArgs e)
{
string convertedSource = "", errorMessage = "";
string typeOfConversion = languageChoice.SelectedValue;
string sourceCode = inputTextBox.Text.Trim();
bool result = CodeConversionHelpers.ConvertSnippet(typeOfConversion, sourceCode, out convertedSource, out errorMessage);
if (result)
{
OutputLabel.Text = "Converted Sourcecode";
outputTextBox.Text = convertedSource;
}
else
{
OutputLabel.Text = "Conversion error, reason:";
outputTextBox.Text = errorMessage;
}
}
}

58
samples/CodeConverter/Source/CCSite/SnippetConverter.aspx.designer.cs generated

@ -1,58 +0,0 @@ @@ -1,58 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class SnippetConverterPage {
/// <summary>
/// languageChoice control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButtonList languageChoice;
/// <summary>
/// inputTextBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox inputTextBox;
/// <summary>
/// convertCode control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button convertCode;
/// <summary>
/// OutputLabel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label OutputLabel;
/// <summary>
/// outputTextBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox outputTextBox;
}

44
samples/CodeConverter/Source/CCSite/Web.Config

@ -1,44 +0,0 @@ @@ -1,44 +0,0 @@
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<httpRuntime requestValidationMode="2.0" />
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" targetFramework="4.0">
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
</configuration>

13
samples/CodeConverter/Source/CCSite/clientaccesspolicy.xml

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource include-subpaths="true" path="/"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>

242
samples/CodeConverter/Source/CCSite/default.css

@ -1,242 +0,0 @@ @@ -1,242 +0,0 @@
/* culture shock: prozac afternoon by pogy366 - Sept. 2005 */
/******* structure and layout *******/
body {
font-family:Arial, Helvetica, sans-serif;
font-size: 9pt;
color: #000000;
background: #B4B8B7;
margin:10px 0 0 0;
padding:0 0 0 0;
background: #8E979C url(images/bg.gif);
text-align:center;
}
.wrap {
position:relative;
width:780px;
margin:0 auto;
padding:0 0 0 0;
text-align:center;
background: #ffffff url(images/header.jpg) no-repeat;
border-left:1px solid #f1b75f;
border-right:1px solid #f1b75f;
border-top:1px solid #f1b75f;
}
.header {
position:relative;
clear:none;
width:770px;
height:25px;
margin:100px 0 0 0;
padding:0 0 0 0;
background:transparent;
color:#ffffff;
text-align:right;
}
.topnav {
position:relative;
clear:both;
width:780px;
height:21px;
margin:0 0 0 0;
padding:0 0 0 0;
background:#cccccc;
font-size:8pt;
}
.container {
position:relative;
clear:both;
width:760px;
margin:10px 10px 0 10px;
padding:0 0 0 0;
background:#ffffff;
color:#000000;
text-align:left;
}
.news_right {
position:relative;
float:right;
clear:both;
width:200px;
margin:0 0 5px 10px;
padding:0 10px 0 10px;
background:#D0DEF6;
color:#465670;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:8pt;
}
.news p {
margin:10px 10px;
}
.news_cnr_top {
background:url(images/cnr_tr.gif) no-repeat top right;
margin:0 -10px 0 -10px;
}
.news_cnr_bottom {
background:url(images/cnr_br.gif) no-repeat top right;
margin:0 -10px 0 -10px;
}
img.cnr {
width:8px;
height:8px;
border:none;
display: block !important;
}
.footer {
position:relative;
clear:both;
width:780px;
margin:20px 0 0 0;
padding:4px 0 4px 0;
background:#ffffff;
font-size:8pt;
text-align:center;
border-top:1px solid #f1b75f;
border-bottom:1px solid #f1b75f;
}
/******* top navigation *******/
#nav ul{
padding:0 0 0 0;
margin:0 0 0 0;
white-space: nowrap;
font-size:8pt;
color:#ffffff;
float:left;
width:100%;
background:#ffffff url(images/topnav_bg_grey.gif);
list-style:none;
}
#nav ul li{
display:inline;
list-style:none;
}
#nav ul li a{
margin: 0 0 0 0;
padding: .25em 2em .3em 1em;
background:#ffffff url(images/topnav_bg_grey.gif);
color: #000000;
text-decoration:none;
float: left;
border-right:1px solid #cccccc;
}
#nav ul li a:hover{
background:#8DA8D5 url(images/topnav_bg.gif);
color: #ffffff;
text-decoration:none;
border-right:1px solid #cccccc;
}
/******* links *******/
a {
color:#D3812D;
text-decoration:underline;
}
a:hover {
color:#E39243;
text-decoration:none;
}
#news a {
color:#D3812D;
text-decoration:underline;
}
#news a:hover {
color:#E39243;
text-decoration:none;
}
#footer a {
color:#f1b75f;
text-decoration:none;
}
#footer a:hover {
color:#D3812D;
text-decoration:none;
}
/******* fonts and colors *******/
.header strong {
font-family:Verdana, Arial, Helvetica, sans-serif;
color:#ffffff;
font-size:13pt;
letter-spacing:.7em;
}
.news_title {
font-family:Arial, Helvetica, sans-serif;
color:#465670;
font-size:10pt;
font-weight:bold;
}
.page_title {
font-family:Arial, Helvetica, sans-serif;
color:#4669A4;
font-size:10pt;
font-weight:bold;
padding: 0 0 0 0;
margin: 0 0 -8px 0;
}
/******* images *******/
img {
border:none;
}
.right img{
position:relative;
float:right;
padding:0 0 0 0;
margin:5px 2px 2px 5px;
}
.left img{
position:relative;
float:left;
padding:0 0 0 0;
margin:0 5px 0 2px;
}
/******* workarounds and hacks *******/
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {display: inline-table;}
/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */

BIN
samples/CodeConverter/Source/CCSite/downloads/CodeConvertServiceClient.zip

Binary file not shown.

BIN
samples/CodeConverter/Source/CCSite/downloads/CodeConvertServiceClient_Source.zip

Binary file not shown.

BIN
samples/CodeConverter/Source/CCSite/downloads/CodeFormatServiceClient.zip

Binary file not shown.

BIN
samples/CodeConverter/Source/CCSite/downloads/CodeFormatServiceClient_Source.zip

Binary file not shown.

BIN
samples/CodeConverter/Source/CCSite/images/bg.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 B

BIN
samples/CodeConverter/Source/CCSite/images/cnr_bl.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

BIN
samples/CodeConverter/Source/CCSite/images/cnr_br.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

BIN
samples/CodeConverter/Source/CCSite/images/cnr_tl.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

BIN
samples/CodeConverter/Source/CCSite/images/cnr_tr.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

BIN
samples/CodeConverter/Source/CCSite/images/header.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

BIN
samples/CodeConverter/Source/CCSite/images/sample.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
samples/CodeConverter/Source/CCSite/images/topnav_bg.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

BIN
samples/CodeConverter/Source/CCSite/images/topnav_bg_grey.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

BIN
samples/CodeConverter/Source/CCSite/screenshots/CodeConverterClient.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

BIN
samples/CodeConverter/Source/CCSite/screenshots/FormatCode_Html.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

BIN
samples/CodeConverter/Source/CCSite/screenshots/FormatCode_Preview.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

BIN
samples/CodeConverter/Source/CCSite/screenshots/FormatCode_Source.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

38
samples/CodeConverter/Source/CodeConverter.sln

@ -1,38 +0,0 @@ @@ -1,38 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CCSite", "CCSite\CCSite.csproj", "{6597D0F8-916A-45EB-98D1-831064914B77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeConvertServiceClient", "CCClient\CodeConvertServiceClient.csproj", "{93D91711-636F-4796-8572-F043D4CF8FA5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeFormatServiceClient", "CodeFormatServiceClient\CodeFormatServiceClient.csproj", "{0CC6D33C-CE47-4441-8656-F7CA248ADD14}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.CodeConversion", "ICSharpCode.CodeConversion\ICSharpCode.CodeConversion.csproj", "{BF122CB4-E896-40CA-BF0A-AB44906AB87D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6597D0F8-916A-45EB-98D1-831064914B77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6597D0F8-916A-45EB-98D1-831064914B77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6597D0F8-916A-45EB-98D1-831064914B77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6597D0F8-916A-45EB-98D1-831064914B77}.Release|Any CPU.Build.0 = Release|Any CPU
{93D91711-636F-4796-8572-F043D4CF8FA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{93D91711-636F-4796-8572-F043D4CF8FA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{93D91711-636F-4796-8572-F043D4CF8FA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{93D91711-636F-4796-8572-F043D4CF8FA5}.Release|Any CPU.Build.0 = Release|Any CPU
{0CC6D33C-CE47-4441-8656-F7CA248ADD14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CC6D33C-CE47-4441-8656-F7CA248ADD14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CC6D33C-CE47-4441-8656-F7CA248ADD14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CC6D33C-CE47-4441-8656-F7CA248ADD14}.Release|Any CPU.Build.0 = Release|Any CPU
{BF122CB4-E896-40CA-BF0A-AB44906AB87D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF122CB4-E896-40CA-BF0A-AB44906AB87D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF122CB4-E896-40CA-BF0A-AB44906AB87D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF122CB4-E896-40CA-BF0A-AB44906AB87D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

171
samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatForm.Designer.cs generated

@ -1,171 +0,0 @@ @@ -1,171 +0,0 @@
namespace CodeFormatServiceClient
{
partial class CodeFormatForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (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.tabctrlMain = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPageOutput = new System.Windows.Forms.TabPage();
this.tabPagePreview = new System.Windows.Forms.TabPage();
this.availableHighlighters = new System.Windows.Forms.ComboBox();
this.sourceTextDocument = new System.Windows.Forms.TextBox();
this.buttonFormatCode = new System.Windows.Forms.Button();
this.htmlOutput = new System.Windows.Forms.TextBox();
this.formatPreview = new System.Windows.Forms.WebBrowser();
this.tabctrlMain.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPageOutput.SuspendLayout();
this.tabPagePreview.SuspendLayout();
this.SuspendLayout();
//
// tabctrlMain
//
this.tabctrlMain.Controls.Add(this.tabPage1);
this.tabctrlMain.Controls.Add(this.tabPageOutput);
this.tabctrlMain.Controls.Add(this.tabPagePreview);
this.tabctrlMain.Location = new System.Drawing.Point(12, 12);
this.tabctrlMain.Name = "tabctrlMain";
this.tabctrlMain.SelectedIndex = 0;
this.tabctrlMain.Size = new System.Drawing.Size(721, 436);
this.tabctrlMain.TabIndex = 1;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.buttonFormatCode);
this.tabPage1.Controls.Add(this.sourceTextDocument);
this.tabPage1.Controls.Add(this.availableHighlighters);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(713, 410);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Input";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPageOutput
//
this.tabPageOutput.Controls.Add(this.htmlOutput);
this.tabPageOutput.Location = new System.Drawing.Point(4, 22);
this.tabPageOutput.Name = "tabPageOutput";
this.tabPageOutput.Padding = new System.Windows.Forms.Padding(3);
this.tabPageOutput.Size = new System.Drawing.Size(713, 410);
this.tabPageOutput.TabIndex = 1;
this.tabPageOutput.Text = "Output";
this.tabPageOutput.UseVisualStyleBackColor = true;
//
// tabPagePreview
//
this.tabPagePreview.Controls.Add(this.formatPreview);
this.tabPagePreview.Location = new System.Drawing.Point(4, 22);
this.tabPagePreview.Name = "tabPagePreview";
this.tabPagePreview.Padding = new System.Windows.Forms.Padding(3);
this.tabPagePreview.Size = new System.Drawing.Size(713, 410);
this.tabPagePreview.TabIndex = 2;
this.tabPagePreview.Text = "Preview";
this.tabPagePreview.UseVisualStyleBackColor = true;
//
// availableHighlighters
//
this.availableHighlighters.FormattingEnabled = true;
this.availableHighlighters.Location = new System.Drawing.Point(6, 6);
this.availableHighlighters.Name = "availableHighlighters";
this.availableHighlighters.Size = new System.Drawing.Size(121, 21);
this.availableHighlighters.TabIndex = 1;
//
// sourceTextDocument
//
this.sourceTextDocument.AcceptsReturn = true;
this.sourceTextDocument.AcceptsTab = true;
this.sourceTextDocument.Location = new System.Drawing.Point(6, 33);
this.sourceTextDocument.Multiline = true;
this.sourceTextDocument.Name = "sourceTextDocument";
this.sourceTextDocument.Size = new System.Drawing.Size(701, 371);
this.sourceTextDocument.TabIndex = 2;
//
// buttonFormatCode
//
this.buttonFormatCode.Location = new System.Drawing.Point(142, 4);
this.buttonFormatCode.Name = "buttonFormatCode";
this.buttonFormatCode.Size = new System.Drawing.Size(120, 23);
this.buttonFormatCode.TabIndex = 3;
this.buttonFormatCode.Text = "Format Code";
this.buttonFormatCode.UseVisualStyleBackColor = true;
this.buttonFormatCode.Click += new System.EventHandler(this.buttonFormatCode_Click);
//
// htmlOutput
//
this.htmlOutput.AcceptsReturn = true;
this.htmlOutput.AcceptsTab = true;
this.htmlOutput.Location = new System.Drawing.Point(6, 6);
this.htmlOutput.Multiline = true;
this.htmlOutput.Name = "htmlOutput";
this.htmlOutput.Size = new System.Drawing.Size(701, 398);
this.htmlOutput.TabIndex = 3;
//
// formatPreview
//
this.formatPreview.Dock = System.Windows.Forms.DockStyle.Fill;
this.formatPreview.Location = new System.Drawing.Point(3, 3);
this.formatPreview.MinimumSize = new System.Drawing.Size(20, 20);
this.formatPreview.Name = "formatPreview";
this.formatPreview.Size = new System.Drawing.Size(707, 404);
this.formatPreview.TabIndex = 0;
//
// CodeFormatForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(743, 459);
this.Controls.Add(this.tabctrlMain);
this.Name = "CodeFormatForm";
this.Text = "Format Code";
this.Load += new System.EventHandler(this.CodeFormatForm_Load);
this.tabctrlMain.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPageOutput.ResumeLayout(false);
this.tabPageOutput.PerformLayout();
this.tabPagePreview.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabctrlMain;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPageOutput;
private System.Windows.Forms.Button buttonFormatCode;
private System.Windows.Forms.TextBox sourceTextDocument;
private System.Windows.Forms.ComboBox availableHighlighters;
private System.Windows.Forms.TextBox htmlOutput;
private System.Windows.Forms.TabPage tabPagePreview;
private System.Windows.Forms.WebBrowser formatPreview;
}
}

43
samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatForm.cs

@ -1,43 +0,0 @@ @@ -1,43 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CodeFormatServiceClient.ICSharpCode.CodeFormat;
namespace CodeFormatServiceClient
{
public partial class CodeFormatForm : Form
{
CodeFormatService cfs = null;
public CodeFormatForm()
{
InitializeComponent();
}
private void CodeFormatForm_Load(object sender, EventArgs e)
{
// yes, a stupid idea to do this synchronous - sample only
cfs = new CodeFormatService();
string[] serviceHighlighters = cfs.RetrieveAvailableHighlighters();
for (int i = 0; i < serviceHighlighters.Length; i++)
availableHighlighters.Items.Add(serviceHighlighters[i]);
availableHighlighters.SelectedIndex = availableHighlighters.FindStringExact("C#");
}
private void buttonFormatCode_Click(object sender, EventArgs e)
{
string htmlSource = cfs.Format(sourceTextDocument.Text,
availableHighlighters.Items[availableHighlighters.SelectedIndex].ToString(), false);
htmlOutput.Text = htmlSource;
formatPreview.DocumentText = htmlSource;
tabctrlMain.SelectedTab = tabPagePreview;
}
}
}

120
samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatForm.resx

@ -1,120 +0,0 @@ @@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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 for serialized 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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

152
samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatServiceClient.csproj

@ -1,152 +0,0 @@ @@ -1,152 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0CC6D33C-CE47-4441-8656-F7CA248ADD14}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CodeFormatServiceClient</RootNamespace>
<AssemblyName>CodeFormatServiceClient</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CodeFormatForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CodeFormatForm.Designer.cs">
<DependentUpon>CodeFormatForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="CodeFormatForm.resx">
<SubType>Designer</SubType>
<DependentUpon>CodeFormatForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="Web References\ICSharpCode.CodeFormat\codeformatservice.wsdl" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Web References\ICSharpCode.CodeFormat\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.map</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<WebReferences Include="Web References\" />
</ItemGroup>
<ItemGroup>
<WebReferenceUrl Include="http://codeconverter.sharpdevelop.net/codeformatservice.asmx">
<UrlBehavior>Dynamic</UrlBehavior>
<RelPath>Web References\ICSharpCode.CodeFormat\</RelPath>
<UpdateFromURL>http://codeconverter.sharpdevelop.net/codeformatservice.asmx</UpdateFromURL>
<ServiceLocationURL>
</ServiceLocationURL>
<CachedDynamicPropName>
</CachedDynamicPropName>
<CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
<CachedSettingsPropName>CodeFormatServiceClient_ICSharpCode_CodeFormat_CodeFormatService</CachedSettingsPropName>
</WebReferenceUrl>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Web References\ICSharpCode.CodeFormat\codeformatservice.disco" />
<None Include="Web References\ICSharpCode.CodeFormat\Reference.map">
<Generator>MSDiscoCodeGenerator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

20
samples/CodeConverter/Source/CodeFormatServiceClient/Program.cs

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace CodeFormatServiceClient
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new CodeFormatForm());
}
}
}

33
samples/CodeConverter/Source/CodeFormatServiceClient/Properties/AssemblyInfo.cs

@ -1,33 +0,0 @@ @@ -1,33 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("CodeFormatServiceClient")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CodeFormatServiceClient")]
[assembly: AssemblyCopyright("Copyright © 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("02005d8d-0f3a-4fca-8043-1261227a02b1")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

63
samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Resources.Designer.cs generated

@ -1,63 +0,0 @@ @@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CodeFormatServiceClient.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeFormatServiceClient.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

117
samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Resources.resx

@ -1,117 +0,0 @@ @@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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 for serialized 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="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

36
samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Settings.Designer.cs generated

@ -1,36 +0,0 @@ @@ -1,36 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CodeFormatServiceClient.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
[global::System.Configuration.DefaultSettingValueAttribute("http://codeconverter.sharpdevelop.net/codeformatservice.asmx")]
public string CodeFormatServiceClient_ICSharpCode_CodeFormat_CodeFormatService {
get {
return ((string)(this["CodeFormatServiceClient_ICSharpCode_CodeFormat_CodeFormatService"]));
}
}
}
}

9
samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Settings.settings

@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="CodeFormatServiceClient.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="CodeFormatServiceClient_ICSharpCode_CodeFormat_CodeFormatService" Type="(Web Service URL)" Scope="Application">
<Value Profile="(Default)">http://codeconverter.sharpdevelop.net/codeformatservice.asmx</Value>
</Setting>
</Settings>
</SettingsFile>

212
samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/Reference.cs

@ -1,212 +0,0 @@ @@ -1,212 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1.
//
#pragma warning disable 1591
namespace CodeFormatServiceClient.ICSharpCode.CodeFormat {
using System;
using System.Web.Services;
using System.Diagnostics;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="CodeFormatServiceSoap", Namespace="http://codeconverter.sharpdevelop.net/")]
public partial class CodeFormatService : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback FormatOperationCompleted;
private System.Threading.SendOrPostCallback RetrieveAvailableHighlightersOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
public CodeFormatService() {
this.Url = global::CodeFormatServiceClient.Properties.Settings.Default.CodeFormatServiceClient_ICSharpCode_CodeFormat_CodeFormatService;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}
public new string Url {
get {
return base.Url;
}
set {
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
&& (this.useDefaultCredentialsSetExplicitly == false))
&& (this.IsLocalFileSystemWebService(value) == false))) {
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}
public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
}
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}
/// <remarks/>
public event FormatCompletedEventHandler FormatCompleted;
/// <remarks/>
public event RetrieveAvailableHighlightersCompletedEventHandler RetrieveAvailableHighlightersCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://codeconverter.sharpdevelop.net/Format", RequestNamespace="http://codeconverter.sharpdevelop.net/", ResponseNamespace="http://codeconverter.sharpdevelop.net/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string Format(string Document, string HighlighterName, bool IncludeLineNumbers) {
object[] results = this.Invoke("Format", new object[] {
Document,
HighlighterName,
IncludeLineNumbers});
return ((string)(results[0]));
}
/// <remarks/>
public void FormatAsync(string Document, string HighlighterName, bool IncludeLineNumbers) {
this.FormatAsync(Document, HighlighterName, IncludeLineNumbers, null);
}
/// <remarks/>
public void FormatAsync(string Document, string HighlighterName, bool IncludeLineNumbers, object userState) {
if ((this.FormatOperationCompleted == null)) {
this.FormatOperationCompleted = new System.Threading.SendOrPostCallback(this.OnFormatOperationCompleted);
}
this.InvokeAsync("Format", new object[] {
Document,
HighlighterName,
IncludeLineNumbers}, this.FormatOperationCompleted, userState);
}
private void OnFormatOperationCompleted(object arg) {
if ((this.FormatCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.FormatCompleted(this, new FormatCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://codeconverter.sharpdevelop.net/RetrieveAvailableHighlighters", RequestNamespace="http://codeconverter.sharpdevelop.net/", ResponseNamespace="http://codeconverter.sharpdevelop.net/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string[] RetrieveAvailableHighlighters() {
object[] results = this.Invoke("RetrieveAvailableHighlighters", new object[0]);
return ((string[])(results[0]));
}
/// <remarks/>
public void RetrieveAvailableHighlightersAsync() {
this.RetrieveAvailableHighlightersAsync(null);
}
/// <remarks/>
public void RetrieveAvailableHighlightersAsync(object userState) {
if ((this.RetrieveAvailableHighlightersOperationCompleted == null)) {
this.RetrieveAvailableHighlightersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRetrieveAvailableHighlightersOperationCompleted);
}
this.InvokeAsync("RetrieveAvailableHighlighters", new object[0], this.RetrieveAvailableHighlightersOperationCompleted, userState);
}
private void OnRetrieveAvailableHighlightersOperationCompleted(object arg) {
if ((this.RetrieveAvailableHighlightersCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.RetrieveAvailableHighlightersCompleted(this, new RetrieveAvailableHighlightersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
}
System.Uri wsUri = new System.Uri(url);
if (((wsUri.Port >= 1024)
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
return true;
}
return false;
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
public delegate void FormatCompletedEventHandler(object sender, FormatCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class FormatCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal FormatCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
public delegate void RetrieveAvailableHighlightersCompletedEventHandler(object sender, RetrieveAvailableHighlightersCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class RetrieveAvailableHighlightersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal RetrieveAvailableHighlightersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((string[])(this.results[0]));
}
}
}
}
#pragma warning restore 1591

7
samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/Reference.map

@ -1,7 +0,0 @@ @@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Results>
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://codeconverter.sharpdevelop.net/codeformatservice.asmx?wsdl" filename="codeformatservice.wsdl" />
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://codeconverter.sharpdevelop.net/codeformatservice.asmx?disco" filename="codeformatservice.disco" />
</Results>
</DiscoveryClientResultsFile>

6
samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/codeformatservice.disco

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://codeconverter.sharpdevelop.net/codeformatservice.asmx?wsdl" docRef="http://codeconverter.sharpdevelop.net/codeformatservice.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
<soap address="http://codeconverter.sharpdevelop.net/codeformatservice.asmx" xmlns:q1="http://codeconverter.sharpdevelop.net/" binding="q1:CodeFormatServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
<soap address="http://codeconverter.sharpdevelop.net/codeformatservice.asmx" xmlns:q2="http://codeconverter.sharpdevelop.net/" binding="q2:CodeFormatServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>

110
samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/codeformatservice.wsdl

@ -1,110 +0,0 @@ @@ -1,110 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://codeconverter.sharpdevelop.net/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://codeconverter.sharpdevelop.net/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://codeconverter.sharpdevelop.net/">
<s:element name="Format">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Document" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="HighlighterName" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="IncludeLineNumbers" type="s:boolean" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="FormatResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FormatResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RetrieveAvailableHighlighters">
<s:complexType />
</s:element>
<s:element name="RetrieveAvailableHighlightersResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RetrieveAvailableHighlightersResult" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="FormatSoapIn">
<wsdl:part name="parameters" element="tns:Format" />
</wsdl:message>
<wsdl:message name="FormatSoapOut">
<wsdl:part name="parameters" element="tns:FormatResponse" />
</wsdl:message>
<wsdl:message name="RetrieveAvailableHighlightersSoapIn">
<wsdl:part name="parameters" element="tns:RetrieveAvailableHighlighters" />
</wsdl:message>
<wsdl:message name="RetrieveAvailableHighlightersSoapOut">
<wsdl:part name="parameters" element="tns:RetrieveAvailableHighlightersResponse" />
</wsdl:message>
<wsdl:portType name="CodeFormatServiceSoap">
<wsdl:operation name="Format">
<wsdl:input message="tns:FormatSoapIn" />
<wsdl:output message="tns:FormatSoapOut" />
</wsdl:operation>
<wsdl:operation name="RetrieveAvailableHighlighters">
<wsdl:input message="tns:RetrieveAvailableHighlightersSoapIn" />
<wsdl:output message="tns:RetrieveAvailableHighlightersSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CodeFormatServiceSoap" type="tns:CodeFormatServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Format">
<soap:operation soapAction="http://codeconverter.sharpdevelop.net/Format" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="RetrieveAvailableHighlighters">
<soap:operation soapAction="http://codeconverter.sharpdevelop.net/RetrieveAvailableHighlighters" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CodeFormatServiceSoap12" type="tns:CodeFormatServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Format">
<soap12:operation soapAction="http://codeconverter.sharpdevelop.net/Format" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="RetrieveAvailableHighlighters">
<soap12:operation soapAction="http://codeconverter.sharpdevelop.net/RetrieveAvailableHighlighters" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CodeFormatService">
<wsdl:port name="CodeFormatServiceSoap" binding="tns:CodeFormatServiceSoap">
<soap:address location="http://codeconverter.sharpdevelop.net/codeformatservice.asmx" />
</wsdl:port>
<wsdl:port name="CodeFormatServiceSoap12" binding="tns:CodeFormatServiceSoap12">
<soap12:address location="http://codeconverter.sharpdevelop.net/codeformatservice.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

16
samples/CodeConverter/Source/CodeFormatServiceClient/app.config

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="CodeFormatServiceClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<CodeFormatServiceClient.Properties.Settings>
<setting name="CodeFormatServiceClient_ICSharpCode_CodeFormat_CodeFormatService"
serializeAs="String">
<value>http://codeconverter.sharpdevelop.net/codeformatservice.asmx</value>
</setting>
</CodeFormatServiceClient.Properties.Settings>
</applicationSettings>
</configuration>

95
samples/CodeConverter/Source/ICSharpCode.CodeConversion/BooHelpers.cs

@ -1,95 +0,0 @@ @@ -1,95 +0,0 @@
using System.IO;
using System.Collections.Generic;
using System.Text;
// Boo conversion
using Boo.Lang.Compiler;
using Boo.Lang.Compiler.Ast;
using NRefactoryToBooConverter;
namespace ICSharpCode.CodeConversion
{
public class BooHelpers
{
private BooHelpers() { }
public static ConverterSettings ApplySettings(string fileName, CompilerErrorCollection errors, CompilerWarningCollection warnings)
{
ConverterSettings settings = new ConverterSettings(fileName, errors, warnings);
settings.SimplifyTypeNames = true;
return settings;
}
public static string CreateBooCode(CompilerErrorCollection errors,
CompilerWarningCollection warnings,
Module module,
IList<ICSharpCode.NRefactory.ISpecial> specials)
{
using (StringWriter w = new StringWriter())
{
foreach (CompilerError error in errors)
{
w.WriteLine("ERROR: " + error.ToString());
}
if (errors.Count > 0)
w.WriteLine();
foreach (CompilerWarning warning in warnings)
{
w.WriteLine("# WARNING: " + warning.ToString());
}
if (warnings.Count > 0)
w.WriteLine();
BooPrinterVisitorWithComments printer = new BooPrinterVisitorWithComments(specials, w);
printer.OnModule(module);
printer.Finish();
return w.ToString();
}
}
public static bool ConvertToBoo(string fileName,
string ProvidedSource,
out string ConvertedSource,
out string ErrorMessage)
{
ConvertedSource = ErrorMessage = "";
CompilerErrorCollection errors = new CompilerErrorCollection();
CompilerWarningCollection warnings = new CompilerWarningCollection();
Module module;
IList<ICSharpCode.NRefactory.ISpecial> specials;
CompileUnit compileUnit = new CompileUnit();
using (StringReader r = new StringReader(ProvidedSource))
{
// modified: removed fileName guessing
module = Parser.ParseModule(compileUnit, r, BooHelpers.ApplySettings(fileName, errors, warnings), out specials);
}
if (module == null)
{
StringBuilder errorBuilder = new StringBuilder();
foreach (CompilerError error in errors)
{
errorBuilder.AppendLine(error.ToString());
}
if (warnings.Count > 0)
{
foreach (CompilerWarning warning in warnings)
{
errorBuilder.AppendLine(warning.ToString());
}
}
ErrorMessage = errorBuilder.ToString();
return false;
}
else
{
ConvertedSource = BooHelpers.CreateBooCode(errors, warnings, module, specials);
}
return true;
}
}
}

83
samples/CodeConverter/Source/ICSharpCode.CodeConversion/HelperFunctions.cs

@ -1,83 +0,0 @@ @@ -1,83 +0,0 @@
using System;
using System.Collections.Generic;
// Conversion general
using ICSharpCode.NRefactory.PrettyPrinter;
namespace ICSharpCode.CodeConversion
{
public class CodeConversionHelpers
{
private CodeConversionHelpers() { }
public static string GetNRefactoryVersion()
{
System.Reflection.Assembly asm = System.Reflection.Assembly.GetAssembly(typeof(VBNetOutputVisitor));
Version v = asm.GetName().Version;
string s = string.Format("{0:0}.{1:0}.{2:0}.{3:0}",
v.Major, v.Minor, v.Build, v.Revision);
return s;
}
public static IConvertCode InferConverter(string typeOfConversion)
{
Dictionary<string, Type> converters = new Dictionary<string, Type>()
{
{ "cs2boo", typeof(ConvertCSharpToBoo) },
{ "vbnet2boo", typeof(ConvertVbNetToBoo) },
{ "cs2vbnet", typeof(ConvertCSharpSnippetToVbNet) },
{ "vbnet2cs", typeof(ConvertVbNetSnippetToCSharp) },
{ "vbnet2ruby", typeof(ConvertVbNetToRuby) },
{ "vbnet2python", typeof(ConvertVbNetToPython) },
{ "cs2ruby", typeof(ConvertCSharpToRuby) },
{ "cs2python", typeof(ConvertCSharpToPython) }
};
if (converters.ContainsKey(typeOfConversion))
{
Type t = converters[typeOfConversion];
object o = Activator.CreateInstance(t, null);
return (o as IConvertCode);
}
return null;
}
public static bool ConvertSnippet(string TypeOfConversion, string SourceCode, out string ConvertedCode, out string ErrorMessage)
{
ErrorMessage = ConvertedCode = "";
string convertedSource = "", errorMessage = "";
bool bSuccessfulConversion = false;
IConvertCode currentConverter = InferConverter(TypeOfConversion);
if (null == currentConverter) return false;
try
{
bSuccessfulConversion = currentConverter.Convert(SourceCode,
out convertedSource,
out errorMessage);
}
catch (Exception ex)
{
bSuccessfulConversion = false;
errorMessage = "Exception occured: " + ex.ToString() + "\r\n\r\nError Message:" + errorMessage;
}
if (bSuccessfulConversion)
{
ConvertedCode = convertedSource;
}
else
{
ErrorMessage = errorMessage;
}
return bSuccessfulConversion;
}
}
}

138
samples/CodeConverter/Source/ICSharpCode.CodeConversion/ICSharpCode.CodeConversion.csproj

@ -1,138 +0,0 @@ @@ -1,138 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BF122CB4-E896-40CA-BF0A-AB44906AB87D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ICSharpCode.CodeConversion</RootNamespace>
<AssemblyName>ICSharpCode.CodeConversion</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Boo.Lang, Version=2.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\Boo.Lang.dll</HintPath>
</Reference>
<Reference Include="Boo.Lang.Compiler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\Boo.Lang.Compiler.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.NRefactory, Version=3.0.0.3091, Culture=neutral, PublicKeyToken=efe927acf176eea2, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\ICSharpCode.NRefactory.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.Scripting">
<HintPath>..\..\Dependencies\ICSharpCode.Scripting.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpDevelop.Dom, Version=3.0.0.3091, Culture=neutral, PublicKeyToken=f829da5c02be14ee, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\ICSharpCode.SharpDevelop.Dom.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\Dependencies\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="NRefactoryToBooConverter, Version=3.0.0.3091, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\NRefactoryToBooConverter.dll</HintPath>
</Reference>
<Reference Include="PythonBinding, Version=3.2.0.5362, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\PythonBinding.dll</HintPath>
</Reference>
<Reference Include="RubyBinding, Version=3.2.0.5362, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\RubyBinding.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BooHelpers.cs" />
<Compile Include="HelperFunctions.cs" />
<Compile Include="IConvertCode.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PythonHelpers.cs" />
<Compile Include="ReferencedContentsSingleton.cs" />
<Compile Include="RubyHelpers.cs" />
<Compile Include="SnippetConversion.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

13
samples/CodeConverter/Source/ICSharpCode.CodeConversion/IConvertCode.cs

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ICSharpCode.CodeConversion
{
public interface IConvertCode
{
bool Convert(string ProvidedSource,
out string ConvertedSource,
out string ErrorMessage);
}
}

36
samples/CodeConverter/Source/ICSharpCode.CodeConversion/Properties/AssemblyInfo.cs

@ -1,36 +0,0 @@ @@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("ICSharpCode.CodeConversion")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ICSharpCode.CodeConversion")]
[assembly: AssemblyCopyright("Copyright © 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("58d3f9b2-0779-4ff9-a496-18ee99410397")]
// 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 Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

26
samples/CodeConverter/Source/ICSharpCode.CodeConversion/PythonHelpers.cs

@ -1,26 +0,0 @@ @@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICSharpCode.NRefactory;
using ICSharpCode.PythonBinding;
namespace ICSharpCode.CodeConversion
{
public class PythonHelpers
{
public static bool Convert(SupportedLanguage inputLanguage, string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
NRefactoryToPythonConverter converter = new
NRefactoryToPythonConverter(inputLanguage);
string convertedCode = converter.Convert(ProvidedSource);
ConvertedSource = convertedCode;
ErrorMessage = "";
return true;
}
}
}

60
samples/CodeConverter/Source/ICSharpCode.CodeConversion/ReferencedContentsSingleton.cs

@ -1,60 +0,0 @@ @@ -1,60 +0,0 @@
using System;
using System.Collections.Generic;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver;
using System.IO;
using System.Runtime.InteropServices;
namespace ICSharpCode.CodeConversion
{
public static class ReferencedContentsSingleton
{
public readonly static List<IProjectContent> ReferencedContents;
static readonly ProjectContentRegistry pcr = new ProjectContentRegistry();
static ReferencedContentsSingleton()
{
ReferencedContents = new List<IProjectContent> {
pcr.Mscorlib,
InternalGetRtDirPC("System"),
// InternalGet35DirPC("System.Core"),
InternalGetRtDirPC("System.Data"),
InternalGetRtDirPC("System.Drawing"),
InternalGetRtDirPC("System.Windows.Forms"),
InternalGetRtDirPC("System.Xml"),
// InternalGet35DirPC("System.Xml.Linq"),
// InternalGet35DirPC("System.Data.Linq"),
InternalGetRtDirPC("System.Web"),
// InternalGet35DirPC("System.Net"),
// InternalGet35DirPC("System.Data.DataSetExtensions"),
InternalGetRtDirPC("Microsoft.VisualBasic")
// add more references here
};
}
static IProjectContent InternalGetRtDirPC(string name)
{
IProjectContent pc = pcr.GetProjectContentForReference(name,
Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), name + ".dll"));
if (null == pc)
throw new Exception("Assembly " + name + " was not found in Runtime directory.");
return pc;
}
static IProjectContent InternalGet35DirPC(string name)
{
string threeFiveDir =
Environment.ExpandEnvironmentVariables(@"%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5");
IProjectContent pc = pcr.GetProjectContentForReference(name,
Path.Combine(threeFiveDir, name + ".dll"));
if (null == pc)
throw new Exception("Assembly " + name + " was not found 3.5 reference assemblies directory.");
return pc;
}
}
}

26
samples/CodeConverter/Source/ICSharpCode.CodeConversion/RubyHelpers.cs

@ -1,26 +0,0 @@ @@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICSharpCode.NRefactory;
using ICSharpCode.RubyBinding;
namespace ICSharpCode.CodeConversion
{
public class RubyHelpers
{
public static bool Convert(SupportedLanguage inputLanguage, string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
NRefactoryToRubyConverter converter = new
NRefactoryToRubyConverter(inputLanguage);
string convertedCode = converter.Convert(ProvidedSource);
ConvertedSource = convertedCode;
ErrorMessage = "";
return true;
}
}
}

89
samples/CodeConverter/Source/ICSharpCode.CodeConversion/SnippetConversion.cs

@ -1,89 +0,0 @@ @@ -1,89 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using ICSharpCode.NRefactory;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver;
namespace ICSharpCode.CodeConversion
{
public class ConvertCSharpSnippetToVbNet : IConvertCode
{
public bool Convert(string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
CodeSnippetConverter converter = new CodeSnippetConverter() { ReferencedContents = ReferencedContentsSingleton.ReferencedContents };
ConvertedSource = converter.CSharpToVB(ProvidedSource, out ErrorMessage);
return (ErrorMessage.Length == 0);
}
}
public class ConvertVbNetSnippetToCSharp : IConvertCode
{
public bool Convert(string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
CodeSnippetConverter converter = new CodeSnippetConverter() { ReferencedContents = ReferencedContentsSingleton.ReferencedContents };
ConvertedSource = converter.VBToCSharp(ProvidedSource, out ErrorMessage);
return (ErrorMessage.Length == 0);
}
}
public class ConvertCSharpToBoo : IConvertCode
{
public bool Convert(string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
bool bSuccessfulConversion = BooHelpers.ConvertToBoo("convert.cs",
ProvidedSource,
out ConvertedSource,
out ErrorMessage);
return bSuccessfulConversion;
}
}
public class ConvertVbNetToBoo : IConvertCode
{
public bool Convert(string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
bool bSuccessfulConversion = BooHelpers.ConvertToBoo("convert.vb",
ProvidedSource,
out ConvertedSource,
out ErrorMessage);
return bSuccessfulConversion;
}
}
public class ConvertCSharpToPython : IConvertCode
{
public bool Convert(string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
return PythonHelpers.Convert(SupportedLanguage.CSharp, ProvidedSource, out ConvertedSource, out ErrorMessage);
}
}
public class ConvertCSharpToRuby : IConvertCode
{
public bool Convert(string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
return RubyHelpers.Convert(SupportedLanguage.CSharp, ProvidedSource, out ConvertedSource, out ErrorMessage);
}
}
public class ConvertVbNetToPython : IConvertCode
{
public bool Convert(string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
return PythonHelpers.Convert(SupportedLanguage.VBNet, ProvidedSource, out ConvertedSource, out ErrorMessage);
}
}
public class ConvertVbNetToRuby : IConvertCode
{
public bool Convert(string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
{
return RubyHelpers.Convert(SupportedLanguage.VBNet, ProvidedSource, out ConvertedSource, out ErrorMessage);
}
}
}

2
src/Automated.proj

@ -87,8 +87,6 @@ @@ -87,8 +87,6 @@
<Target Name="buildsamples">
<MSBuild Projects="$(SamplesSrc)\AvalonEdit.Sample\AvalonEdit.Sample.sln"
Properties="Configuration=Release;BranchName=$(BranchName)"/>
<MSBuild Projects="$(SamplesSrc)\CodeConverter\Source\CodeConverter.sln"
Properties="Configuration=Release;BranchName=$(BranchName)"/>
<MSBuild Projects="$(SamplesSrc)\CodonCreation\CodonCreation.sln"
Properties="Configuration=Release;BranchName=$(BranchName)"/>
<MSBuild Projects="$(SamplesSrc)\ComponentInspector\ComponentInspector.sln"

Loading…
Cancel
Save