Skip to content

Commit

Permalink
v3.5 alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
simonegli committed Mar 14, 2013
1 parent eae654a commit 7b8f122
Show file tree
Hide file tree
Showing 1,053 changed files with 4,448 additions and 27,930 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ obj*/
TestResults/
*.testsettings
*.vsmdi

img

/XamlImageConverter.Test.Web/XamlImageConverter.Demo/Images
3 changes: 1 addition & 2 deletions XamlImageConverter.Exe/XamlImageConverter.Exe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>XamlImageConverter</RootNamespace>
<AssemblyName>convert</AssemblyName>
<AssemblyName>xiconvert</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
Expand Down Expand Up @@ -117,7 +117,6 @@
<ItemGroup>
<None Include="app.config" />
<None Include="img\test\page_header.pdf" />
<None Include="src\MakeImages.xic.xaml.log" />
<None Include="src\Planet.psd" />
</ItemGroup>
<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions XamlImageConverter.Exe/src/MakeImages.xic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@
<xic:Snapshot File="usa.map.png" />
<xic:Snapshot File="usa.map.xaml" />

<xic:ImageMap Image="usa.map.png" File="usa.map.html" ID="usa">
<xic:Map Image="usa.map.png" File="usa.map.html" ID="usa">
<Areas Elements="WA;OR;CA;AK;ID;NV;AZ;UT;MT;WY;CO;NM;TX;OK;KS;NE;SD;ND;MN;IA;MO;AR;LA;WI;IL;TN;MS;MI;IN;KY;AL;FL;GA;SC;NC;VA;WV;OH;PA;MD;NJ;NY;CT;MA;VT;NH;ME;RI;DE" onclick="alert('State %ID% clicked...');" />
</xic:ImageMap>
</xic:Map>
<xic:ImageMap Image="usa.map.png" File="Readme.aspx" ID="usa">
<Areas Elements="WA;OR;CA;AK;ID;NV;AZ;UT;MT;WY;CO;NM;TX;OK;KS;NE;SD;ND;MN;IA;MO;AR;LA;WI;IL;TN;MS;MI;IN;KY;AL;FL;GA;SC;NC;VA;WV;OH;PA;MD;NJ;NY;CT;MA;VT;NH;ME;RI;DE" onclick="alert('State %ID% clicked...');" />
<HotSpots Elements="WA;OR;CA;AK;ID;NV;AZ;UT;MT;WY;CO;NM;TX;OK;KS;NE;SD;ND;MN;IA;MO;AR;LA;WI;IL;TN;MS;MI;IN;KY;AL;FL;GA;SC;NC;VA;WV;OH;PA;MD;NJ;NY;CT;MA;VT;NH;ME;RI;DE" PostBackValue="%ID%" />
</xic:ImageMap>

</xic:Scene>
Expand Down
49 changes: 0 additions & 49 deletions XamlImageConverter.Exe/src/MakeImages.xic.xaml.log

This file was deleted.

35 changes: 15 additions & 20 deletions XamlImageConverter.ItemWizard/ItemWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,10 @@ public class ItemWizard: IWizard {
bproj.Load(filename);

//bool change = false;
var path = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath);
var path = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
var imppath = Path.Combine(path, target);
/*
var targets = File.ReadAllText(imppath)
.Replace("#{XamlImageConverter.dll}", Path.Combine(path, "XamlImageConverter.dll"));
var targets = File.ReadAllText(imppath) .Replace("#{XamlImageConverter.dll}", Path.Combine(path, "XamlImageConverter.dll"));
File.WriteAllText(imppath, targets);
*/

Expand Down Expand Up @@ -193,7 +192,7 @@ public class ItemWizard: IWizard {
public void CopyDemo() {
var proj = item.ContainingProject.FullName;
var dest = Path.GetDirectoryName(proj);
var src = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath);
var src = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

const string DemoFolder = "XamlImageConverter.Demo";
var demo = Path.Combine(dest, DemoFolder);
Expand Down Expand Up @@ -228,7 +227,7 @@ public class ItemWizard: IWizard {
var proj = item.ContainingProject.FullName;
var dest = Path.GetDirectoryName(proj);
var conf = Path.Combine(dest, "web.config");
var src = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath);
var src = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

var IsWeb = File.Exists(conf);
if (!IsWeb) return;
Expand All @@ -238,10 +237,11 @@ public class ItemWizard: IWizard {
Directory.CreateDirectory(binlazy);
Files.Copy(Path.Combine(src, "XamlImageConverter.dll"), binlazy);
Files.Copy(Path.Combine(src, "XamlImageConverter.pdb"), binlazy);
Files.Copy(Path.Combine(src, "gxps"), binlazy);
Files.Copy(Path.Combine(src, "ImageMagick"), binlazy);
Files.Copy(Path.Combine(src, "psd2xaml"), binlazy);
//Files.Copy(Path.Combine(src, "XamlImageConverter.xsd"), binlazy);
Files.Copy(Path.Combine(src, "Lazy\\gxps"), binlazy);
Files.Copy(Path.Combine(src, "Lazy\\ImageMagick"), binlazy);
Files.Copy(Path.Combine(src, "Lazy\\psd2xaml"), binlazy);
Files.Copy(Path.Combine(src, "Lazy\\html2xaml"), binlazy);
//Files.Copy(Path.Combine(src, "Lazy\\XamlImageConverter.xsd"), binlazy);
var cache = Path.Combine(dest, "Images\\Cache");
if (!Directory.Exists(cache)) Directory.CreateDirectory(cache);
}
Expand Down Expand Up @@ -272,16 +272,11 @@ public class ItemWizard: IWizard {
var handlers = server.Element("handlers");
if (handlers == null) server.Add(handlers = new XElement("handlers"));
handlers.Elements().Where(x => ((string)x.Attribute("type") ?? "").Contains("PublicKeyToken=60c2ec984bc1bb45")).Remove();
handlers.Add(XElement.Parse("<add name='Xic' verb='*' path='*.xic.xaml' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicXaml2Images' verb='*' path='*.xaml.???' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicXaml2Ps' verb='*' path='*.xaml.ps' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicSvg2Images' verb='*' path='*.svg.???' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicSvgz2Images' verb='*' path='*.svgz.???' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicSvg2Ps' verb='*' path='*.svg.ps' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicSvgz2Ps' verb='*' path='*.svgz.ps' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicPsd2Images' verb='*' path='*.psd.???' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicPsd2Ps' verb='*' path='*.psd.ps' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XicHandler' verb='*' path='XamlImageConverter.axd' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"));
handlers.Add(XElement.Parse("<add name='XamlImageConverter.Xaml' verb='*' path='*.xaml' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XamlImageConverter.Svg' verb='*' path='*.svg' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XamlImageConverter.Svgz' verb='*' path='*.svgz' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XamlImageConverter.Psd' verb='*' path='*.psd' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"),
XElement.Parse("<add name='XamlImageConverter.Dynamic' verb='*' path='xic.axd' preCondition='integratedMode' type='Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"));

// system.web
var web = webconfig.Element("system.web");
Expand All @@ -308,7 +303,7 @@ public class ItemWizard: IWizard {
var httpHandlers = web.Element("httpHandlers");
if (httpHandlers == null) web.Add(httpHandlers = new XElement("httpHandlers"));
httpHandlers.Elements().Where(x => ((string)x.Attribute("type") ?? "").Contains("PublicKeyToken=60c2ec984bc1bb45")).Remove();
httpHandlers.Add(new XComment("<add verb='*' path='*.xic.xaml;XamlImageConverter.axd;*.xaml.???;*.svg.???;*.psd.???;*.svgz.???;*.xaml.ps;*.svg.ps;*.psd.ps;*.svgz.ps' type='Silversite.Web.XamlImageConverter, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"));
httpHandlers.Add(new XComment("<add verb='*' path='*.xic.xaml;xic.axd;*.xaml.???;*.svg.???;*.psd.???;*.svgz.???;*.xaml.ps;*.svg.ps;*.psd.ps;*.svgz.ps' type='Silversite.Web.XamlImageConverter, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45' />"));
*/

File.Copy(conf, conf + ".backup");
Expand Down
2 changes: 1 addition & 1 deletion XamlImageConverter.Test.Web/Default.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<h1>You'll be redirected in a few seconds.</h1>

<% Response.Clear(); Response.Redirect("~/Images/Readme.aspx"); %>
<% Response.Clear(); Response.Redirect("~/XamlImageConverter.Demo/Readme.aspx"); %>
</form>
</body>
</html>
111 changes: 51 additions & 60 deletions XamlImageConverter.Test.Web/Web.config
Original file line number Diff line number Diff line change
@@ -1,65 +1,56 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="XamlImageConverter" type="XamlImageConverter.Configuration, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
</configSections>
<XamlImageConverter Log="true" Cache="~/Images/Cache"/>
<appSettings/>
<connectionStrings/>
<!--
For a description of web.config changes for .NET 4.5 see http:https://go.microsoft.com/fwlink/?LinkId=235367.
<configSections>
<section name="XamlImageConverter" type="XamlImageConverter.Configuration, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
</configSections>
<XamlImageConverter log="true" cache="~/Images/Cache" separateDomain="false" />
<appSettings/>
<connectionStrings/>
<!--
For a description of web.config changes for .NET 4.5 see http:https://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.5" />
</system.Web>
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.5" />
</system.Web>
-->
<system.web>
<!--
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.5">
<assemblies>
<add assembly="XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
</assemblies>
</compilation>
<pages controlRenderingCompatibilityVersion="4.0">
<controls>
<add tagPrefix="xic" namespace="Silversite.Web.UI" assembly="XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
</controls>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<customErrors mode="Off"/>
</system.web>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<handlers>
<add name="Xic" verb="*" path="*.xic.xaml" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicXaml2Png" verb="*" path="*.xaml.png" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicSvg2Png" verb="*" path="*.svg.png" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicSvgz2Png" verb="*" path="*.svgz.png" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicPsd2Png" verb="*" path="*.psd.png" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicXaml2Jpg" verb="*" path="*.xaml.jpg" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicSvg2Jpg" verb="*" path="*.svg.jpg" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicSvgz2Jpg" verb="*" path="*.svgz.jpg" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicPsd2Jpg" verb="*" path="*.psd.jpg" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicXaml2Pdf" verb="*" path="*.xaml.pdf" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicSvg2Pdf" verb="*" path="*.svg.pdf" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicSvgz2Pdf" verb="*" path="*.svgz.pdf" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicXaml2Gif" verb="*" path="*.xaml.gif" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XicHandler" verb="*" path="XamlImageConverter.axd" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
<system.web>
<!--
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.5">
<assemblies>
<add assembly="XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
</assemblies>
</compilation>
<pages controlRenderingCompatibilityVersion="4.0">
<controls>
<add tagPrefix="xic" namespace="Silversite.Web.UI" assembly="XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
</controls>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<customErrors mode="Off"/>
</system.web>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<handlers>
<add name="XamlImageConverterXaml" verb="*" path="*.xaml" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XamlImageConverterPsd" verb="*" path="*.svg" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XamlImageConverterSvg" verb="*" path="*.svgz" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XamlImageConverterSvgz" verb="*" path="*.psd" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
<add name="XamlImageConverterDynamic" verb="*" path="xic.axd" preCondition="integratedMode" type="Silversite.Web.XamlImageHandler, XamlImageConverter.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=60c2ec984bc1bb45"/>
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>
Loading

0 comments on commit 7b8f122

Please sign in to comment.