From: <cl...@us...> - 2008-12-05 11:04:50
|
Revision: 368 http://freetrain.svn.sourceforge.net/freetrain/?rev=368&view=rev Author: clrg Date: 2008-12-05 11:04:45 +0000 (Fri, 05 Dec 2008) Log Message: ----------- Selectively apply Atsushi Eno's patch to the main trunk + minor clean up Modified Paths: -------------- trunk/FreeTrain/core/FreeTrain.Core.csproj trunk/FreeTrain/core/framework/AboutDialog.cs trunk/FreeTrain/core/util/UrlInvoker.cs trunk/FreeTrain/core/world/accounting/BalanceSheetForm.cs trunk/FreeTrain/core/world/structs/VarHeightBuilding.cs trunk/FreeTrain/lib/Controls/FreeTrain.Controls.csproj trunk/FreeTrain/lib/Controls/src/DocHostUIHandlerImpl.cs trunk/FreeTrain/lib/Controls/src/WebBrowser.cs trunk/FreeTrain/plugins/jp.co.tripod.chiname.lib.generic/FreeTrain.ContribEx.csproj trunk/FreeTrain/plugins/jp.co.tripod.chiname.lib.halfvoxel/FreeTrain.HalfVoxelStructure.csproj Modified: trunk/FreeTrain/core/FreeTrain.Core.csproj =================================================================== --- trunk/FreeTrain/core/FreeTrain.Core.csproj 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/core/FreeTrain.Core.csproj 2008-12-05 11:04:45 UTC (rev 368) @@ -45,6 +45,9 @@ <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> <ErrorReport>prompt</ErrorReport> + <OutputType>Library</OutputType> + <AssemblyName>FreeTrain.Core</AssemblyName> + <RootNamespace>freetrain</RootNamespace> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <OutputPath>Release\</OutputPath> @@ -68,13 +71,11 @@ <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> <ErrorReport>prompt</ErrorReport> + <OutputType>Library</OutputType> + <AssemblyName>FreeTrain.Core</AssemblyName> + <RootNamespace>freetrain</RootNamespace> </PropertyGroup> <ItemGroup> - <Reference Include="AxSHDocVw"> - <Name>AxSHDocVw</Name> - <HintPath>..\extlib\AxSHDocVw.dll</HintPath> - <Private>True</Private> - </Reference> <Reference Include="MagicLibrary"> <Name>MagicLibrary</Name> <HintPath>..\extlib\MagicLibrary.DLL</HintPath> @@ -88,11 +89,6 @@ <Name>Microsoft.Vsa</Name> <Private>True</Private> </Reference> - <Reference Include="MsHtmlHost"> - <Name>MsHtmlHost</Name> - <HintPath>..\extlib\MsHtmlHost.dll</HintPath> - <Private>True</Private> - </Reference> <Reference Include="SharpZipLib"> <Name>SharpZipLib</Name> <HintPath>..\extlib\SharpZipLib.dll</HintPath> @@ -1054,6 +1050,7 @@ </EmbeddedResource> </ItemGroup> <ItemGroup> + <Folder Include="Properties\" /> <Folder Include="util\video\" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> @@ -1061,5 +1058,7 @@ <PreBuildEvent>rem del $(ProjectDir)\obj\Debug\*.PDB</PreBuildEvent> <PostBuildEvent> </PostBuildEvent> + <ProjectGuid>{7746CF50-D84E-4E7B-83FB-AB43DB854DA8}</ProjectGuid> + <RootNamespace>freetrain</RootNamespace> </PropertyGroup> -</Project> \ No newline at end of file +</Project> Modified: trunk/FreeTrain/core/framework/AboutDialog.cs =================================================================== --- trunk/FreeTrain/core/framework/AboutDialog.cs 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/core/framework/AboutDialog.cs 2008-12-05 11:04:45 UTC (rev 368) @@ -12,6 +12,7 @@ { /// <summary> /// AboutDialog の概要の説明です。 + /// (summary for AboutDialog) /// </summary> public class AboutDialog : System.Windows.Forms.Form { @@ -24,7 +25,6 @@ InitializeComponent(); browser.navigate("about:blank"); - browser.docHostUIHandler = new DocHostUIHandlerImpl(this); browser.navigate(ResourceUtil.findSystemResource("about.html")); } @@ -144,10 +144,8 @@ // // browser // - this.browser.ContainingControl = this; this.browser.Dock = System.Windows.Forms.DockStyle.Fill; this.browser.Enabled = true; - this.browser.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("browser.OcxState"))); this.browser.Size = new System.Drawing.Size(320, 192); this.browser.TabIndex = 0; // @@ -168,14 +166,16 @@ this.AcceptButton = this.okButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 12); this.ClientSize = new System.Drawing.Size(338, 223); - this.Controls.AddRange(new System.Windows.Forms.Control[] { - this.panel1, - this.displayMode, - this.label4, - this.size, - this.okButton, - this.label3, - this.progressBar}); + this.Controls.AddRange( + new System.Windows.Forms.Control[] { + this.panel1, + this.displayMode, + this.label4, + this.size, + this.okButton, + this.label3, + this.progressBar + }); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; Modified: trunk/FreeTrain/core/util/UrlInvoker.cs =================================================================== --- trunk/FreeTrain/core/util/UrlInvoker.cs 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/core/util/UrlInvoker.cs 2008-12-05 11:04:45 UTC (rev 368) @@ -7,17 +7,22 @@ { /// <summary> /// UrlInvoker の概要の説明です。 + /// (summary for UrlInvoker) /// </summary> public class UrlInvoker { // 指定のURLを標準ブラウザで開く - static public void openUrl(String targetUrl) { + // Open the URL with the default browser + static public void openUrl(String targetUrl) { ProcessStartInfo info = new ProcessStartInfo(); // URLに関連づけられたアプリケーションを探す + // Look for the application that is bound to the URL by default RegistryKey rkey = Registry.ClassesRoot.OpenSubKey(@"http\shell\open\command"); String val = rkey.GetValue("").ToString(); // レジストリ値には、起動パラメータも含まれるので、 // 実行ファイル名と起動パラメータを分離する + // The registry value contains run parameters, so detach + // executable file name and those parameters if(val.StartsWith("\"")) { int n = val.IndexOf("\"",1); info.FileName = val.Substring(1,n-1); @@ -29,8 +34,10 @@ info.Arguments = val.Substring(a[0].Length+1); } // 作業ディレクトリも指定しないとダメなようだ・・・ + // we also need working directory... info.WorkingDirectory = Path.GetDirectoryName(info.FileName); // 引数の最後にURLを加える + // add the URL at the end of the parameters info.Arguments += targetUrl; Process.Start(info); } Modified: trunk/FreeTrain/core/world/accounting/BalanceSheetForm.cs =================================================================== --- trunk/FreeTrain/core/world/accounting/BalanceSheetForm.cs 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/core/world/accounting/BalanceSheetForm.cs 2008-12-05 11:04:45 UTC (rev 368) @@ -3,8 +3,6 @@ using System.Collections; using System.ComponentModel; using System.Windows.Forms; -using AxSHDocVw; -using MsHtmlHost; using freetrain.controls; using freetrain.framework; using freetrain.framework.plugin; @@ -48,7 +46,6 @@ // webBrowser.Navigate("about:hello", ref flags, ref targetFrame, ref postData, ref headers); webBrowser.navigate("about:blank"); - webBrowser.docHostUIHandler = new DocHostUIHandlerImpl(this); webBrowser.navigate(ResourceUtil.findSystemResource("balanceSheet.html")); } @@ -69,7 +66,6 @@ // this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser.Enabled = true; - this.webBrowser.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("webBrowser.OcxState"))); this.webBrowser.Size = new System.Drawing.Size(592, 206); this.webBrowser.TabIndex = 0; // Modified: trunk/FreeTrain/core/world/structs/VarHeightBuilding.cs =================================================================== --- trunk/FreeTrain/core/world/structs/VarHeightBuilding.cs 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/core/world/structs/VarHeightBuilding.cs 2008-12-05 11:04:45 UTC (rev 368) @@ -161,7 +161,7 @@ Voxel v = World.world[loc]; if(!(v is VarHeightBuilding.VoxelImpl)) return null; - return ((VarHeightBuilding.VoxelImpl)v).owner as VarHeightBuilding; + return ((StructureVoxel)v).owner as VarHeightBuilding; } public static VarHeightBuilding get( int x, int y, int z ) { return get(new Location(x,y,z)); } Modified: trunk/FreeTrain/lib/Controls/FreeTrain.Controls.csproj =================================================================== --- trunk/FreeTrain/lib/Controls/FreeTrain.Controls.csproj 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/lib/Controls/FreeTrain.Controls.csproj 2008-12-05 11:04:45 UTC (rev 368) @@ -74,16 +74,6 @@ <ErrorReport>prompt</ErrorReport> </PropertyGroup> <ItemGroup> - <Reference Include="AxSHDocVw"> - <Name>AxSHDocVw</Name> - <HintPath>..\..\extlib\AxSHDocVw.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="MsHtmlHost"> - <Name>MsHtmlHost</Name> - <HintPath>..\..\extlib\MsHtmlHost.dll</HintPath> - <Private>False</Private> - </Reference> <Reference Include="System"> <Name>System</Name> </Reference> @@ -159,4 +149,4 @@ </PreBuildEvent> <PostBuildEvent>copy $(ProjectDir)bin\Debug\*.* $(SolutionDir)core\Debug\</PostBuildEvent> </PropertyGroup> -</Project> \ No newline at end of file +</Project> Modified: trunk/FreeTrain/lib/Controls/src/DocHostUIHandlerImpl.cs =================================================================== --- trunk/FreeTrain/lib/Controls/src/DocHostUIHandlerImpl.cs 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/lib/Controls/src/DocHostUIHandlerImpl.cs 2008-12-05 11:04:45 UTC (rev 368) @@ -1,3 +1,4 @@ +#if use_removed using System; using System.Runtime.InteropServices; using MsHtmlHost; @@ -69,3 +70,4 @@ } } } +#endif Modified: trunk/FreeTrain/lib/Controls/src/WebBrowser.cs =================================================================== --- trunk/FreeTrain/lib/Controls/src/WebBrowser.cs 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/lib/Controls/src/WebBrowser.cs 2008-12-05 11:04:45 UTC (rev 368) @@ -1,30 +1,15 @@ using System; -using MsHtmlHost; -using AxSHDocVw; namespace freetrain.controls { /// <summary> /// WebBrowser control. /// </summary> - public class WebBrowser : AxWebBrowser - { - public WebBrowser() { - } + public class WebBrowser : System.Windows.Forms.WebBrowser { + public WebBrowser() { } public void navigate( string url ) { - object flags = 0; - object targetFrame = String.Empty; - object postData = String.Empty; - object headers = String.Empty; - base.Navigate(url, ref flags, ref targetFrame, ref postData, ref headers); + base.Navigate(url); } - - public IDocHostUIHandler docHostUIHandler { - set { - ICustomDoc cDoc = (ICustomDoc)base.Document; - cDoc.SetUIHandler(value); - } - } } } Modified: trunk/FreeTrain/plugins/jp.co.tripod.chiname.lib.generic/FreeTrain.ContribEx.csproj =================================================================== --- trunk/FreeTrain/plugins/jp.co.tripod.chiname.lib.generic/FreeTrain.ContribEx.csproj 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/plugins/jp.co.tripod.chiname.lib.generic/FreeTrain.ContribEx.csproj 2008-12-05 11:04:45 UTC (rev 368) @@ -74,21 +74,11 @@ <ErrorReport>prompt</ErrorReport> </PropertyGroup> <ItemGroup> - <Reference Include="AxSHDocVw"> - <Name>AxSHDocVw</Name> - <HintPath>..\..\..\..\extlib\AxSHDocVw.dll</HintPath> - <Private>False</Private> - </Reference> <Reference Include="MagicLibrary"> <Name>MagicLibrary</Name> <HintPath>..\..\extlib\MagicLibrary.DLL</HintPath> <Private>False</Private> </Reference> - <Reference Include="MsHtmlHost"> - <Name>MsHtmlHost</Name> - <HintPath>..\..\..\..\extlib\MsHtmlHost.dll</HintPath> - <Private>False</Private> - </Reference> <Reference Include="System"> <Name>System</Name> </Reference> @@ -162,4 +152,4 @@ <PostBuildEvent> </PostBuildEvent> </PropertyGroup> -</Project> \ No newline at end of file +</Project> Modified: trunk/FreeTrain/plugins/jp.co.tripod.chiname.lib.halfvoxel/FreeTrain.HalfVoxelStructure.csproj =================================================================== --- trunk/FreeTrain/plugins/jp.co.tripod.chiname.lib.halfvoxel/FreeTrain.HalfVoxelStructure.csproj 2008-12-05 09:50:48 UTC (rev 367) +++ trunk/FreeTrain/plugins/jp.co.tripod.chiname.lib.halfvoxel/FreeTrain.HalfVoxelStructure.csproj 2008-12-05 11:04:45 UTC (rev 368) @@ -74,16 +74,6 @@ <ErrorReport>prompt</ErrorReport> </PropertyGroup> <ItemGroup> - <Reference Include="AxSHDocVw"> - <Name>AxSHDocVw</Name> - <HintPath>..\extlib\AxSHDocVw.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="MsHtmlHost"> - <Name>MsHtmlHost</Name> - <HintPath>..\extlib\MsHtmlHost.dll</HintPath> - <Private>False</Private> - </Reference> <Reference Include="System"> <Name>System</Name> </Reference> @@ -153,4 +143,4 @@ <PostBuildEvent> </PostBuildEvent> </PropertyGroup> -</Project> \ No newline at end of file +</Project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |