You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(11) |
Apr
(36) |
May
(74) |
Jun
(9) |
Jul
|
Aug
(36) |
Sep
(11) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
|
Mar
(94) |
Apr
(63) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
2009 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <je...@us...> - 2008-04-14 18:05:13
|
Revision: 364 http://freetrain.svn.sourceforge.net/freetrain/?rev=364&view=rev Author: jendave Date: 2008-04-14 11:05:11 -0700 (Mon, 14 Apr 2008) Log Message: ----------- more renames Modified Paths: -------------- branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs branches/FreeTrainSDL/core/Framework/AboutDialog.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs branches/FreeTrainSDL/core/Util/Command/Command.cs branches/FreeTrainSDL/core/Util/Set.cs branches/FreeTrainSDL/core/Util/UrlInvoker.cs branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs branches/FreeTrainSDL/core/World/Cube.cs branches/FreeTrainSDL/core/World/Development/ULV.cs branches/FreeTrainSDL/core/World/Rail/Platform.cs branches/FreeTrainSDL/core/World/Rail/Station.cs branches/FreeTrainSDL/core/World/Subsidiaries/SubsidiaryMarket.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/MenuContributionImpl.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseVoxel.cs Modified: branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -270,7 +270,7 @@ if (v != null && !v.Entity.isOwned && v.Entity.isSilentlyReclaimable) { // cost for removing this structure - if (s.add(v.Entity)) + if (s.Add(v.Entity)) r += v.Entity.EntityValue; } v = WorldDefinition.World[x, y, z]; Modified: branches/FreeTrainSDL/core/Framework/AboutDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/AboutDialog.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/Framework/AboutDialog.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -51,7 +51,7 @@ private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { - UrlInvoker.openUrl(((LinkLabel)sender).Text); + UrlInvoker.OpenUrl(((LinkLabel)sender).Text); } } Modified: branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -191,7 +191,7 @@ } } pluginMap.Add(p.name, p); - pluginSet.add(p); + pluginSet.Add(p); } if (errBreak) { @@ -202,11 +202,11 @@ plugins = new PluginDefinition[pluginSet.Count]; int ptr = 0; PluginDefinition p = null; - while (!pluginSet.isEmpty) + while (!pluginSet.IsEmpty) { progressHandler("Sorting dependencies...", ++count / c_max); //! progressHandler("依存関係を整理中",++count/c_max); - p = (PluginDefinition)pluginSet.getOne(); + p = (PluginDefinition)pluginSet.GetOne(); try { while (true) @@ -215,7 +215,7 @@ int i; for (i = 0; i < deps.Length; i++) { - if (pluginSet.contains(deps[i])) + if (pluginSet.Contains(deps[i])) { break; } @@ -243,7 +243,7 @@ break; } } - pluginSet.remove(p); + pluginSet.Remove(p); plugins[ptr++] = p; } } Modified: branches/FreeTrainSDL/core/Util/Command/Command.cs =================================================================== --- branches/FreeTrainSDL/core/Util/Command/Command.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/Util/Command/Command.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -67,7 +67,7 @@ this.manager = manager; this.commandInstances = new CommandInstanceList(this); - manager.commands.add(this); + manager.commands.Add(this); } // Methods to trigger events Modified: branches/FreeTrainSDL/core/Util/Set.cs =================================================================== --- branches/FreeTrainSDL/core/Util/Set.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/Util/Set.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -30,18 +30,20 @@ public sealed class Set : ICollection { private readonly Hashtable core = new Hashtable(); + /// <summary> /// /// </summary> /// <param name="o"></param> /// <returns></returns> - public bool contains(object o) { return core.Contains(o); } + public bool Contains(object o) { return core.Contains(o); } + /// <summary> /// /// </summary> /// <param name="o"></param> /// <returns></returns> - public bool add(object o) + public bool Add(object o) { if (!core.ContainsKey(o)) { @@ -49,34 +51,43 @@ return true; } else + { return false; + } } + /// <summary> /// /// </summary> /// <param name="o"></param> - public void remove(object o) { core.Remove(o); } + public void Remove(object o) { core.Remove(o); } + /// <summary> /// /// </summary> - public void clear() { core.Clear(); } + public void Clear() { core.Clear(); } + /// <summary> /// /// </summary> public int Count { get { return core.Count; } } + /// <summary> /// /// </summary> public bool IsSynchronized { get { return false; } } + /// <summary> /// /// </summary> public object SyncRoot { get { return this; } } + /// <summary> /// /// /// </summary> - public bool isEmpty { get { return Count == 0; } } + public bool IsEmpty { get { return Count == 0; } } + /// <summary> /// /// </summary> @@ -85,30 +96,35 @@ { return core.Keys.GetEnumerator(); } + /// <summary> /// /// </summary> /// <returns></returns> - public object getOne() + public object GetOne() { IEnumerator e = GetEnumerator(); e.MoveNext(); return e.Current; } + /// <summary> /// /// </summary> /// <param name="type"></param> /// <returns></returns> - public Array toArray(Type type) + public Array ToArray(Type type) { Array r = Array.CreateInstance(type, Count); int idx = 0; foreach (object o in this) + { r.SetValue(o, idx++); + } return r; } + /// <summary> /// /// </summary> @@ -117,7 +133,9 @@ public void CopyTo(Array array, int index) { foreach (object o in this) + { array.SetValue(o, index++); + } } } } Modified: branches/FreeTrainSDL/core/Util/UrlInvoker.cs =================================================================== --- branches/FreeTrainSDL/core/Util/UrlInvoker.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/Util/UrlInvoker.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -34,7 +34,7 @@ /// /// </summary> /// <param name="targetUrl"></param> - static public void openUrl(String targetUrl) + static public void OpenUrl(String targetUrl) { ProcessStartInfo info = new ProcessStartInfo(); // URLに関連づけられたアプリケーションを探す Modified: branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs =================================================================== --- branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -136,13 +136,13 @@ internal void addDebt(Debt debt) { - debts.add(debt); + debts.Add(debt); updateTotalDebts(); } internal void removeDebt(Debt debt) { - debts.remove(debt); + debts.Remove(debt); updateTotalDebts(); } Modified: branches/FreeTrainSDL/core/World/Cube.cs =================================================================== --- branches/FreeTrainSDL/core/World/Cube.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/World/Cube.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -288,12 +288,12 @@ for (int z = corner.z; z < mz; z++) { Voxel v = WorldDefinition.World[x, y, z]; - if (v != null) r.add(v.Entity); + if (v != null) r.Add(v.Entity); } } } - return (IEntity[])r.toArray(typeof(IEntity)); + return (IEntity[])r.ToArray(typeof(IEntity)); } /// <summary> Modified: branches/FreeTrainSDL/core/World/Development/ULV.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/ULV.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/World/Development/ULV.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -94,9 +94,9 @@ if (e.isOwned) // cannot reclaim this voxel. return null; - if (!s.contains(e)) + if (!s.Contains(e)) { // new entity - s.add(e); + s.Add(e); entityValue += e.EntityValue; } } Modified: branches/FreeTrainSDL/core/World/Rail/Platform.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/Platform.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/World/Rail/Platform.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -118,9 +118,9 @@ // notify nodes that this host is going to be destroyed. // we need to copy it into array because nodes will be updated // as we notify children - foreach (Platform p in nodes.toArray(typeof(Platform))) + foreach (Platform p in nodes.ToArray(typeof(Platform))) p.onHostDisconnected(); - Debug.Assert(nodes.isEmpty); + Debug.Assert(nodes.IsEmpty); // see if we can add to the new host. if (value != null && value.hostStation != null) @@ -242,10 +242,10 @@ for (int x = loc1.x; x <= loc2.x; x++) { Station st = Station.get(x, y, z); - if (st != null) result.add(st); + if (st != null) result.Add(st); Platform pt = Platform.get(x, y, z); if (pt != null && pt != this && pt.hostStation != null) - result.add(pt); + result.Add(pt); } } } @@ -257,15 +257,15 @@ for (int z = 0; z < WorldDefinition.World.Size.z; z++) { Station st = Station.get(loc.x, loc.y, z); - if (st != null) result.add(st); + if (st != null) result.Add(st); Platform pt = Platform.get(loc.x, loc.y, z); if (pt != null && pt != this && pt.hostStation != null) - result.add(pt); + result.Add(pt); } } - return (IPlatformHost[])result.toArray(typeof(IPlatformHost)); + return (IPlatformHost[])result.ToArray(typeof(IPlatformHost)); } /// <summary> /// @@ -273,7 +273,7 @@ /// <param name="child"></param> public void addNode(Platform child) { - nodes.add(child); + nodes.Add(child); } /// <summary> /// @@ -281,7 +281,7 @@ /// <param name="child"></param> public void removeNode(Platform child) { - nodes.remove(child); + nodes.Remove(child); } /// <summary> /// Modified: branches/FreeTrainSDL/core/World/Rail/Station.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/Station.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/World/Rail/Station.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -146,9 +146,9 @@ // notify nodes that this host is going to be destroyed. // we need to copy it into array because nodes will be updated // as we notify children - foreach (Platform p in nodes.toArray(typeof(Platform))) + foreach (Platform p in nodes.ToArray(typeof(Platform))) p.onHostDisconnected(); - Debug.Assert(nodes.isEmpty); + Debug.Assert(nodes.IsEmpty); base.remove(); } @@ -175,7 +175,7 @@ /// <param name="child"></param> public void addNode(Platform child) { - nodes.add(child); + nodes.Add(child); } /// <summary> /// @@ -183,7 +183,7 @@ /// <param name="child"></param> public void removeNode(Platform child) { - nodes.remove(child); + nodes.Remove(child); } /// <summary> /// @@ -227,7 +227,7 @@ /// <param name="listener"></param> public void add(IStationListener listener) { - core.add(listener); + core.Add(listener); } /// <summary> /// @@ -235,7 +235,7 @@ /// <param name="listener"></param> public void remove(IStationListener listener) { - core.remove(listener); + core.Remove(listener); } /// <summary> /// Modified: branches/FreeTrainSDL/core/World/Subsidiaries/SubsidiaryMarket.cs =================================================================== --- branches/FreeTrainSDL/core/World/Subsidiaries/SubsidiaryMarket.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/core/World/Subsidiaries/SubsidiaryMarket.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -122,7 +122,7 @@ { get { - return (SubsidiaryCompany[])onSale.toArray(typeof(SubsidiaryCompany)); + return (SubsidiaryCompany[])onSale.ToArray(typeof(SubsidiaryCompany)); } } @@ -131,7 +131,7 @@ /// </summary> internal void add(SubsidiaryCompany company) { - onSale.add(company); + onSale.Add(company); if (persistentEvents.onAdded != null) persistentEvents.onAdded(this, company); if (volatileEvents.onAdded != null) @@ -143,7 +143,7 @@ /// </summary> internal void remove(SubsidiaryCompany company) { - onSale.remove(company); + onSale.Remove(company); if (persistentEvents.onRemoved != null) persistentEvents.onRemoved(this, company); if (volatileEvents.onRemoved != null) @@ -155,7 +155,7 @@ /// </summary> internal bool contains(SubsidiaryCompany company) { - return onSale.contains(company); + return onSale.Contains(company); } } } Modified: branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -107,7 +107,7 @@ this.typeBox.Size = new System.Drawing.Size(197, 21); this.typeBox.Sorted = true; this.typeBox.TabIndex = 2; - this.typeBox.SelectedIndexChanged += new System.EventHandler(this.onTypeChanged); + this.typeBox.SelectedIndexChanged += new System.EventHandler(this.OnTypeChanged); // // preview // @@ -141,7 +141,7 @@ this.buttonRemove.TabIndex = 9; this.buttonRemove.Text = "Remove"; this.buttonRemove.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.buttonRemove.CheckedChanged += new System.EventHandler(this.onTypeChanged); + this.buttonRemove.CheckedChanged += new System.EventHandler(this.OnTypeChanged); // // buttonPlace // @@ -154,7 +154,7 @@ this.buttonPlace.TabStop = true; this.buttonPlace.Text = "Build"; this.buttonPlace.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.buttonPlace.CheckedChanged += new System.EventHandler(this.onTypeChanged); + this.buttonPlace.CheckedChanged += new System.EventHandler(this.OnTypeChanged); // // indexSelector // @@ -177,7 +177,7 @@ this.Controls.Add(this.preview); this.Name = "ControllerForm"; this.Text = "Road Accessories"; - this.Resize += new System.EventHandler(this.updateAfterResize); + this.Resize += new System.EventHandler(this.UpdateAfterResize); ((System.ComponentModel.ISupportInitialize)(this.preview)).EndInit(); this.ResumeLayout(false); @@ -187,7 +187,7 @@ /// <summary> /// /// </summary> - protected bool isPlacing + protected bool IsPlacing { get { @@ -200,7 +200,7 @@ /// </summary> /// <param name="sender"></param> /// <param name="e"></param> - protected virtual void updateAfterResize(object sender, System.EventArgs e) + protected virtual void UpdateAfterResize(object sender, System.EventArgs e) { this.buttonPlace.Left = this.preview.Left; this.buttonPlace.Width = ((this.preview.Width)) / 2; @@ -214,7 +214,7 @@ /// <summary> /// Called when a selection of the structure has changed. /// </summary> - protected virtual void onTypeChanged(object sender, System.EventArgs e) + protected virtual void OnTypeChanged(object sender, System.EventArgs e) { RoadAccessoryContribution builder = (RoadAccessoryContribution)typeBox.SelectedItem; if (builder != null) Modified: branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -74,7 +74,7 @@ else { if( contribution.CanBeBuilt(loc) ) - contribution.create(loc); + contribution.Create(loc); else MessageBox.Show("Cannot place"); Modified: branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/MenuContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/MenuContributionImpl.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/MenuContributionImpl.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -44,12 +44,12 @@ { MenuItem item = new MenuItem("&Accessories..."); - item.Click += new System.EventHandler(onClick); + item.Click += new System.EventHandler(OnClick); containerMenu.MenuItems[3].MenuItems.Add(item); } - private void onClick(object sender, EventArgs e) + private void OnClick(object sender, EventArgs e) { new ControllerForm().Show(); } Modified: branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -116,7 +116,7 @@ /// Create a new road accessory at the specified location. /// </summary> /// <param name="loc"></param> - public void create(Location loc) + public void Create(Location loc) { Debug.Assert(CanBeBuilt(loc)); Modified: branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs =================================================================== --- branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -130,10 +130,10 @@ { private readonly VinylHouseBuilder contrib; - public Logic(VinylHouseBuilder _contrib, IControllerSite site) + public Logic(VinylHouseBuilder contrib, IControllerSite site) : base(site) { - this.contrib = _contrib; + this.contrib = contrib; } /// <summary> Modified: branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseVoxel.cs =================================================================== --- branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseVoxel.cs 2008-04-14 16:43:06 UTC (rev 363) +++ branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseVoxel.cs 2008-04-14 18:05:11 UTC (rev 364) @@ -65,7 +65,6 @@ stationListener.OnRemoved(); } - private readonly StationListenerImpl stationListener; private readonly VinylHouseBuilder contrib; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-14 16:43:20
|
Revision: 363 http://freetrain.svn.sourceforge.net/freetrain/?rev=363&view=rev Author: jendave Date: 2008-04-14 09:43:06 -0700 (Mon, 14 Apr 2008) Log Message: ----------- build "any cpu". other cleanups Modified Paths: -------------- branches/FreeTrainSDL/FreeTrainSDL.csproj branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs branches/FreeTrainSDL/core/Framework/AboutDialog.Designer.cs branches/FreeTrainSDL/core/FreeTrain.csproj branches/FreeTrainSDL/core/World/Car.cs branches/FreeTrainSDL/core/World/Rail/JunctionRailRoad.cs branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs branches/FreeTrainSDL/core/World/Rail/SpecialPurposeRailRoad.cs branches/FreeTrainSDL/core/World/Rail/Train.cs branches/FreeTrainSDL/core/World/Rail/YardRailRoad.cs branches/FreeTrainSDL/core/World/Road/Bus.cs branches/FreeTrainSDL/core/World/Traffic.cs branches/FreeTrainSDL/lib/Controls/FreeTrain.Controls.csproj branches/FreeTrainSDL/plugins/Chiname.DummyCars/FreeTrain.DummyCars.csproj branches/FreeTrainSDL/plugins/Chiname.Generic/FreeTrain.Generic.csproj branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/FreeTrain.RoadAccessory.csproj branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/FreeTrain.HalfVoxelStructure.csproj branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/FreeTrain.ColorTestTrain.csproj branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/FreeTrain.VinylHouse.csproj Modified: branches/FreeTrainSDL/FreeTrainSDL.csproj =================================================================== --- branches/FreeTrainSDL/FreeTrainSDL.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/FreeTrainSDL.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -32,7 +32,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -181,13 +181,13 @@ private void resetArrowLocation() { Train tr = this.selectedTrain; - if (tr == null || !tr.head.state.isInside) + if (tr == null || !tr.head.State.isInside) { arrowLoc.Location = World.Location.Unplaced; } else { - arrowLoc.Location = tr.head.state.asInside().location; + arrowLoc.Location = tr.head.State.asInside().location; } } @@ -208,7 +208,7 @@ if (tr.isPlaced) { // see if the user has clicked the same train - Car c = Car.get(loc); + Car c = Car.Get(loc); if (c is Train.TrainCar && ((Train.TrainCar)c).parent == tr) { // clicking the same train will be considered to reverse its direction @@ -370,10 +370,10 @@ public void DrawAfter(QuarterViewDrawer view, DrawContext dc) { Train tr = this.selectedTrain; - if (tr == null || !tr.head.state.isInside) return; + if (tr == null || !tr.head.State.isInside) return; // draw an arrow that indicates the direction of the train - CarState.Inside ci = tr.head.state.asInside(); + CarState.Inside ci = tr.head.State.asInside(); Point pt = view.fromXYZToClient(ci.location); pt.Y -= 12; Modified: branches/FreeTrainSDL/core/Framework/AboutDialog.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/AboutDialog.Designer.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/Framework/AboutDialog.Designer.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -102,7 +102,7 @@ this.ClientSize = new System.Drawing.Size(339, 215); this.Controls.Add(this.panel1); this.Controls.Add(this.okButton); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; Modified: branches/FreeTrainSDL/core/FreeTrain.csproj =================================================================== --- branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -25,7 +25,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>bin\Debug\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> Modified: branches/FreeTrainSDL/core/World/Car.cs =================================================================== --- branches/FreeTrainSDL/core/World/Car.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Car.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -37,17 +37,17 @@ [Serializable] public abstract class Car { - private CarState _state = CarState.Unplaced.theInstance; + private CarState state = CarState.Unplaced.theInstance; /// <summary> /// Set the new state. /// </summary> /// <returns>the previous state</returns> - protected CarState setState(CarState s) + protected CarState SetState(CarState s) { - CarState oldState = _state; + CarState oldState = state; - CarState.Inside ss = _state.asInside(); + CarState.Inside ss = state.asInside(); if (ss != null) { Debug.Assert(ss.voxel.car == this); @@ -55,7 +55,7 @@ WorldDefinition.World.OnVoxelUpdated(ss.voxel); } - _state = s; + state = s; ss = s.asInside(); if (ss != null) @@ -71,41 +71,41 @@ /// <summary> /// Current location/direction of the car. /// </summary> - public CarState state { get { return _state; } } + public CarState State { get { return state; } } /// <summary> /// 車両を配置する /// </summary> - public void place(Location loc, Direction dir) + public void Place(Location loc, Direction dir) { - Debug.Assert(state.isUnplaced); - setState(new CarState.Inside(loc, dir)); + Debug.Assert(State.isUnplaced); + SetState(new CarState.Inside(loc, dir)); } /// <summary> /// 車両を現在位置から撤去する /// </summary> - public void remove() + public void Remove() { - Debug.Assert(!state.isUnplaced); - setState(CarState.Unplaced.theInstance); + Debug.Assert(!State.isUnplaced); + SetState(CarState.Unplaced.theInstance); } /// <summary> /// Called when a car is clicked. /// </summary> /// <returns>true if the click is processed and consumed</returns> - public virtual bool onClick() { return false; } + public virtual bool OnClick() { return false; } /// <summary> /// Draws the car into the specified location. /// </summary> - public abstract void draw(DrawContext display, Point pt); + public abstract void Draw(DrawContext display, Point pt); /// <summary> /// Gets a car that occupies the specified place, if any. Or null otherwise. /// </summary> - public static Car get(Location loc) + public static Car Get(Location loc) { TrafficVoxel v = TrafficVoxel.get(loc); if (v == null) return null; Modified: branches/FreeTrainSDL/core/World/Rail/JunctionRailRoad.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/JunctionRailRoad.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Rail/JunctionRailRoad.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -44,7 +44,7 @@ public override Direction Guide() { Train.TrainCar car = (Train.TrainCar)Voxel.car; - CarState.Placed state = car.state.asPlaced(); + CarState.Placed state = car.State.asPlaced(); Direction d = state.asInside().direction; if (hasRail(d)) @@ -65,7 +65,7 @@ else { // otherwise follow the previous car - if (previous.state.asPlaced().location == state.location + d) + if (previous.State.asPlaced().location == state.location + d) return d; } Modified: branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -43,7 +43,7 @@ /// <returns></returns> public override Direction Guide() { - Direction d = Voxel.car.state.asInside().direction; + Direction d = Voxel.car.State.asInside().direction; if (hasRail(d)) return d; // 進路変更なし Direction l = d.left; Modified: branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -168,7 +168,7 @@ { // slop rails don't curve. so a car should be // able to go to the same direction - Direction d = Voxel.car.state.asInside().direction; + Direction d = Voxel.car.State.asInside().direction; Debug.Assert(hasRail(d)); return d; } @@ -383,7 +383,7 @@ public static int calcCostOfTearDownSlope(Location loc, Direction dir) { // make sure the first voxel is not occupied by a car - if (Car.get(loc) != null) return 0; + if (Car.Get(loc) != null) return 0; // the 2nd block has a distinctive zangle and zdiff. check it. loc += dir; @@ -395,14 +395,14 @@ return 0; // make sure the 2nd rail is not occupied by a car - if (Car.get(loc) != null) return 0; + if (Car.Get(loc) != null) return 0; // check 3rd and 4th rails. loc += dir; loc.z++; - if (Car.get(loc) != null) return 0; + if (Car.Get(loc) != null) return 0; loc += dir; - if (Car.get(loc) != null) return 0; + if (Car.Get(loc) != null) return 0; return SLOPE_DESTRUCTION_UNIT_COST * Math.Max(1, loc.z - WorldDefinition.World.WaterLevel); } Modified: branches/FreeTrainSDL/core/World/Rail/SpecialPurposeRailRoad.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/SpecialPurposeRailRoad.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Rail/SpecialPurposeRailRoad.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -73,7 +73,7 @@ /// <returns></returns> public override Direction Guide() { - Direction d = Voxel.car.state.asInside().direction; + Direction d = Voxel.car.State.asInside().direction; // we have straight rails only, so the direction must stay the same Debug.Assert(hasRail(d)); return d; Modified: branches/FreeTrainSDL/core/World/Rail/Train.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/Train.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Rail/Train.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -152,10 +152,10 @@ ds[idx] = d; locs[idx] = loc; // determine the next voxel - cars[0].place(loc, d); + cars[0].Place(loc, d); d = rr.Guide(); loc += d; - cars[0].remove(); + cars[0].Remove(); } while (idx != 0); // make sure we are not forming cycles @@ -166,7 +166,7 @@ // can be placed. place all for (int i = 0; i < length; i++) - cars[i].place(locs[i], ds[i]); + cars[i].Place(locs[i], ds[i]); stopCallCount = 0; registerTimer(); @@ -183,7 +183,7 @@ Debug.Assert(isPlaced); foreach (TrainCar car in cars) - car.remove(); + car.Remove(); // make sure that we don't have any pending event WorldDefinition.World.Clock.unregister(new ClockHandler(clockHandler)); @@ -312,7 +312,7 @@ { Debug.Assert(isPlaced); // we should have unregistered the handler when the train was removed. - CarState.Inside ins = head.state.asInside(); + CarState.Inside ins = head.State.asInside(); if (ins != null) { // this car might need to stop TimeLength time = ins.voxel.railRoad.getStopTimeSpan(this, stopCallCount); @@ -337,7 +337,7 @@ TrainStates s = TrainStates.Moving; // determine the next head car state - CarState next = calcNextTrainCarState[head.state]; + CarState next = calcNextTrainCarState[head.State]; if (next != null) { // if it can move forward if (!isBlocked[next]) @@ -350,7 +350,7 @@ { // we can't go forward. turn around reverse(); - next = calcNextTrainCarState[head.state]; + next = calcNextTrainCarState[head.State]; if (next != null && !isBlocked[next]) move(next); @@ -394,7 +394,7 @@ /// </summary> public void playSound(ISoundEffect se) { - CarState.Inside ins = head.state.asInside(); + CarState.Inside ins = head.State.asInside(); if (ins != null) se.play(ins.location); // play the sound } @@ -474,7 +474,7 @@ { // compute the distance between the source state and the current state int dist = passengerSourceState.location. - getDistanceTo(this.head.state.asPlaced().location); + getDistanceTo(this.head.State.asPlaced().location); // record the sales AccountManager.theInstance.earn( @@ -498,7 +498,7 @@ Debug.Assert(n <= passengerCapacity); _passenger = n; // memorize the location where passengers are loaded - passengerSourceState = this.head.state.asPlaced(); + passengerSourceState = this.head.State.asPlaced(); notifyListeners(); } @@ -797,7 +797,7 @@ internal CarState moveTo(CarState newState) { - return base.setState(newState); + return base.SetState(newState); } /// <summary> @@ -805,20 +805,20 @@ /// </summary> public void reverse() { - setState(reverseCarState[this.state]); + SetState(reverseCarState[this.State]); } /// <summary> /// /// </summary> /// <param name="dc"></param> /// <param name="pt"></param> - public override void draw(DrawContext dc, Point pt) + public override void Draw(DrawContext dc, Point pt) { Surface display = dc.Surface; pt.Y -= 9; // offset - CarState.Inside s = state.asInside(); + CarState.Inside s = State.asInside(); Debug.Assert(s != null); RailRoad rr = s.voxel.railRoad; Modified: branches/FreeTrainSDL/core/World/Rail/YardRailRoad.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/YardRailRoad.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Rail/YardRailRoad.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -72,7 +72,7 @@ // calculate the position where the train should stop. int pos; - CarState.Inside ins = tr.head.state.asInside(); + CarState.Inside ins = tr.head.State.asInside(); if (owner.direction == ins.direction) { Modified: branches/FreeTrainSDL/core/World/Road/Bus.cs =================================================================== --- branches/FreeTrainSDL/core/World/Road/Bus.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Road/Bus.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -40,7 +40,7 @@ /// </summary> /// <param name="display"></param> /// <param name="pt"></param> - public override void draw(DrawContext display, Point pt) + public override void Draw(DrawContext display, Point pt) { throw new NotImplementedException(); } Modified: branches/FreeTrainSDL/core/World/Traffic.cs =================================================================== --- branches/FreeTrainSDL/core/World/Traffic.cs 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/core/World/Traffic.cs 2008-04-14 16:43:06 UTC (rev 363) @@ -188,7 +188,7 @@ /// <returns></returns> public override bool OnClick() { - if (car != null && car.onClick()) return true; + if (car != null && car.OnClick()) return true; if (_railRoad != null && _railRoad.OnClick()) return true; return false; } @@ -270,7 +270,7 @@ if (car is Train.TrainCar) ((Train.TrainCar)car).parent.remove(); else - car.remove(); + car.Remove(); } BridgePierVoxel.teardownBridgeSupport(Location, this); if (onEntityRemoved != null) @@ -295,7 +295,7 @@ if (_road != null) _road.DrawBefore(display, pt); if (_accessory != null) _accessory.DrawBefore(display, pt); if (_railRoad != null) _railRoad.drawBefore(display, pt); - if (_car != null) _car.draw(display, pt); + if (_car != null) _car.Draw(display, pt); if (_railRoad != null) _railRoad.drawAfter(display, pt); if (_accessory != null) _accessory.DrawAfter(display, pt); } Modified: branches/FreeTrainSDL/lib/Controls/FreeTrain.Controls.csproj =================================================================== --- branches/FreeTrainSDL/lib/Controls/FreeTrain.Controls.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/lib/Controls/FreeTrain.Controls.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -29,7 +29,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>bin\Debug\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> Modified: branches/FreeTrainSDL/plugins/Chiname.DummyCars/FreeTrain.DummyCars.csproj =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.DummyCars/FreeTrain.DummyCars.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/plugins/Chiname.DummyCars/FreeTrain.DummyCars.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -29,7 +29,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>.\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> Modified: branches/FreeTrainSDL/plugins/Chiname.Generic/FreeTrain.Generic.csproj =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Generic/FreeTrain.Generic.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/plugins/Chiname.Generic/FreeTrain.Generic.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -29,7 +29,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>.\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> Modified: branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/FreeTrain.RoadAccessory.csproj =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/FreeTrain.RoadAccessory.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/FreeTrain.RoadAccessory.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -29,7 +29,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>.\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> Modified: branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/FreeTrain.HalfVoxelStructure.csproj =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/FreeTrain.HalfVoxelStructure.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/FreeTrain.HalfVoxelStructure.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -29,7 +29,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>.\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> @@ -145,4 +145,4 @@ <PostBuildEvent> </PostBuildEvent> </PropertyGroup> -</Project> +</Project> \ No newline at end of file Modified: branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/FreeTrain.ColorTestTrain.csproj =================================================================== --- branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/FreeTrain.ColorTestTrain.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/FreeTrain.ColorTestTrain.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -25,7 +25,7 @@ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> <DefineConstants>DEBUG;TRACE</DefineConstants> <OutputPath>.\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <TreatWarningsAsErrors>false</TreatWarningsAsErrors> <DocumentationFile>FreeTrain.World.Rail.ColorTestTrain.xml</DocumentationFile> </PropertyGroup> Modified: branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/FreeTrain.VinylHouse.csproj =================================================================== --- branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/FreeTrain.VinylHouse.csproj 2008-04-13 05:40:57 UTC (rev 362) +++ branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/FreeTrain.VinylHouse.csproj 2008-04-14 16:43:06 UTC (rev 363) @@ -29,7 +29,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>.\</OutputPath> - <PlatformTarget>x86</PlatformTarget> + <PlatformTarget>AnyCPU</PlatformTarget> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-13 05:40:50
|
Revision: 362 http://freetrain.svn.sourceforge.net/freetrain/?rev=362&view=rev Author: jendave Date: 2008-04-12 22:40:57 -0700 (Sat, 12 Apr 2008) Log Message: ----------- split out multiple classes from files Modified Paths: -------------- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs branches/FreeTrainSDL/core/Contributions/Land/DefaultControllerImpl.cs branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Others/EmptyNewGameContributionImpl.cs branches/FreeTrainSDL/core/Contributions/Others/NewGameContribution.cs branches/FreeTrainSDL/core/Contributions/Others/NewWorldDialog.cs branches/FreeTrainSDL/core/Contributions/Population/BasePopulation.cs branches/FreeTrainSDL/core/Contributions/Population/CombinationPopulation.cs branches/FreeTrainSDL/core/Contributions/Population/ConstantPopulation.cs branches/FreeTrainSDL/core/Contributions/Population/HourlyPopulation.cs branches/FreeTrainSDL/core/Contributions/Population/MultiplierPopulation.cs branches/FreeTrainSDL/core/Contributions/Population/PersistentPopulation.cs branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs branches/FreeTrainSDL/core/Contributions/Rail/TrainControllerContribution.cs branches/FreeTrainSDL/core/Contributions/Road/A3RoadContribution.cs branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs branches/FreeTrainSDL/core/Contributions/Road/RoadContribution.cs branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs branches/FreeTrainSDL/core/Contributions/Sound/BGMContribution.cs branches/FreeTrainSDL/core/Contributions/Sound/BGMFactoryContribution.cs branches/FreeTrainSDL/core/Contributions/Structs/SpecialStructureContribution.cs branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs branches/FreeTrainSDL/core/Controllers/CubeSelectorController.cs branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs branches/FreeTrainSDL/core/Controllers/LocationStore.cs branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs branches/FreeTrainSDL/core/Controllers/Rail/PlatformPropertyDialog.cs branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs branches/FreeTrainSDL/core/Controllers/RectSelectorController.cs branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs branches/FreeTrainSDL/core/Framework/BGMManager.cs branches/FreeTrainSDL/core/Framework/NewWorldDialog.cs branches/FreeTrainSDL/core/FreeTrain.csproj branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs branches/FreeTrainSDL/core/World/Cube.cs branches/FreeTrainSDL/core/World/Development/CommercialStructurePlan.cs branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs branches/FreeTrainSDL/core/World/Development/ULV.cs branches/FreeTrainSDL/core/World/Rail/Platform.cs branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs branches/FreeTrainSDL/core/World/Rail/Station.cs branches/FreeTrainSDL/core/World/Rail/YardRailRoad.cs branches/FreeTrainSDL/core/World/Road/Road.cs branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs branches/FreeTrainSDL/core/World/Structs/StationListenerImpl.cs branches/FreeTrainSDL/core/World/Structs/Structure.cs branches/FreeTrainSDL/core/World/Traffic.cs branches/FreeTrainSDL/lib/Controls/ColorPicker.cs branches/FreeTrainSDL/lib/Controls/FileDropHandler.cs branches/FreeTrainSDL/lib/Controls/FreeTrain.Controls.csproj branches/FreeTrainSDL/lib/Controls/MruMenu.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/FreeTrain.Generic.csproj branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs branches/FreeTrainSDL/plugins/Chiname.Generic/StructCategory.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/FreeTrain.RoadAccessory.csproj branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/FreeTrain.HalfVoxelStructure.csproj branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HalfVoxelContribution.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/FreeTrain.VinylHouse.csproj branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs Added Paths: ----------- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroupGroup.cs branches/FreeTrainSDL/lib/Controls/IColorLibrary.cs branches/FreeTrainSDL/lib/Controls/MruMenuInline.cs branches/FreeTrainSDL/plugins/Chiname.Generic/StructCategories.cs branches/FreeTrainSDL/plugins/Chiname.Generic/StructCategoryTree.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadDisambiguator.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ContributionReference.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HSVColor.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HalfDividedVoxel.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HueShiftSpriteFactory.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HueShiftSpriteFactoryContributionImpl.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/SpriteSet.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/XVinylHouseBuilder.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/YVinylHouseBuilder.cs Removed Paths: ------------- branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HueShiftSprite.cs Modified: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -68,15 +68,15 @@ /// <param name="cube"></param> protected override void OnSelected(Cube cube) { - if (contrib.CanBeBuilt(cube.corner, ControlMode.Player)) + if (contrib.CanBeBuilt(cube.Corner, ControlMode.Player)) { MessageBox.Show("Can not build"); //! MessageBox.Show("設置できません"); } else { - CompletionHandler handler = new CompletionHandler(contrib, cube.corner, true); - new ConstructionSite(cube.corner, new EventHandler(handler.handle), contrib.Size); + CompletionHandler handler = new CompletionHandler(contrib, cube.Corner, true); + new ConstructionSite(cube.Corner, new EventHandler(handler.handle), contrib.Size); } } @@ -104,7 +104,7 @@ /// <param name="pt"></param> public void DrawVoxel(QuarterViewDrawer view, DrawContext canvas, Location loc, Point pt) { - if (currentCube.contains(loc)) + if (CurrentCube.Contains(loc)) alphaSprites.getSprite(loc - this.location).DrawAlpha(canvas.Surface, pt); } Modified: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -57,7 +57,7 @@ /// <param name="cube"></param> protected override void OnSelected(Cube cube) { - PThreeDimStructure s = WorldDefinition.World.GetEntityAt(cube.corner) as PThreeDimStructure; + PThreeDimStructure s = WorldDefinition.World.GetEntityAt(cube.Corner) as PThreeDimStructure; if (s == null || s.type != contrib) { MessageBox.Show("Wrong type"); Modified: branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -205,7 +205,7 @@ XmlElement pop = (XmlElement)e.SelectSingleNode("population"); if (pop != null) - _population = new PersistentPopulation(BasePopulation.load(pop), + _population = new PersistentPopulation(BasePopulation.Load(pop), new PopulationReferenceImpl(ownerId)); } Modified: branches/FreeTrainSDL/core/Contributions/Land/DefaultControllerImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/DefaultControllerImpl.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Land/DefaultControllerImpl.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -46,22 +46,22 @@ /// <summary> /// /// </summary> - /// <param name="_contrib"></param> - /// <param name="_site"></param> - /// <param name="_spriteBuilder"></param> - public DefaultControllerImpl(LandBuilderContribution _contrib, IControllerSite _site, - SpriteBuilder _spriteBuilder) - : base(_site) + /// <param name="contrib"></param> + /// <param name="site"></param> + /// <param name="spriteBuilder"></param> + public DefaultControllerImpl(LandBuilderContribution contrib, IControllerSite site, + SpriteBuilder spriteBuilder) + : base(site) { - this.contrib = _contrib; - this.spriteBuilder = _spriteBuilder; + this.contrib = contrib; + this.spriteBuilder = spriteBuilder; } /// <summary> /// /// </summary> /// <param name="loc1"></param> /// <param name="loc2"></param> - protected override void onRectSelected(Location loc1, Location loc2) + protected override void OnRectSelected(Location loc1, Location loc2) { contrib.Create(loc1, loc2, true); } @@ -80,9 +80,9 @@ /// <param name="pt"></param> public void DrawVoxel(QuarterViewDrawer view, DrawContext canvas, Location loc, Point pt) { - if (loc.z != currentLoc.z) return; + if (loc.z != CurrentLocation.z) return; - if (anchor != UNPLACED && loc.inBetween(anchor, currentLoc)) + if (Anchor != Unplaced && loc.inBetween(Anchor, CurrentLocation)) spriteBuilder().DrawAlpha(canvas.Surface, pt); } /// <summary> Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -136,10 +136,10 @@ public override IModalController CreateRemover(IControllerSite site) { return new DefaultControllerImpl(this, site, - new DefaultControllerImpl.SpriteBuilder(getSprite)); + new DefaultControllerImpl.SpriteBuilder(GetSprite)); } - private static ISprite getSprite() + private static ISprite GetSprite() { return ResourceUtil.RemoverChip; //return ResourceUtil.emptyChip; Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -61,36 +61,4 @@ /// <returns></returns> public override string ToString() { return Name; } } - - /// <summary> - /// Group of LandGroup. - /// - /// This object implements IListSource to support data-binding. - /// </summary> - public class LandBuilderGroupGroup : StructureGroupGroup - { - /// <summary> - /// - /// </summary> - public LandBuilderGroupGroup() { } - /// <summary> - /// - /// </summary> - /// <param name="name"></param> - /// <returns></returns> - public new LandBuilderGroup this[string name] - { - get - { - LandBuilderGroup g = (LandBuilderGroup)core[name]; - if (g == null) - { - core[name] = g = new LandBuilderGroup(name); - list.Add(g); - } - - return g; - } - } - } } Added: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroupGroup.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroupGroup.cs (rev 0) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroupGroup.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -0,0 +1,59 @@ +#region LICENSE +/* + * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#endregion LICENSE + +using System; +using System.Collections; +using System.ComponentModel; +using FreeTrain.Contributions.Common; + +namespace FreeTrain.Contributions.Land +{ + /// <summary> + /// Group of LandGroup. + /// + /// This object implements IListSource to support data-binding. + /// </summary> + public class LandBuilderGroupGroup : StructureGroupGroup + { + /// <summary> + /// + /// </summary> + public LandBuilderGroupGroup() { } + /// <summary> + /// + /// </summary> + /// <param name="name"></param> + /// <returns></returns> + public new LandBuilderGroup this[string name] + { + get + { + LandBuilderGroup g = (LandBuilderGroup)core[name]; + if (g == null) + { + core[name] = g = new LandBuilderGroup(name); + list.Add(g); + } + + return g; + } + } + } +} Property changes on: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroupGroup.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Modified: branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -109,10 +109,10 @@ /// <returns></returns> public override IModalController CreateBuilder(IControllerSite site) { - return new DefaultControllerImpl(this, site, new DefaultControllerImpl.SpriteBuilder(getLandSprite)); + return new DefaultControllerImpl(this, site, new DefaultControllerImpl.SpriteBuilder(GetLandSprite)); } - private ISprite getLandSprite() + private ISprite GetLandSprite() { return getLand().sprite; } Modified: branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -92,10 +92,10 @@ /// <returns></returns> public override IModalController CreateBuilder(IControllerSite site) { - return new DefaultControllerImpl(this, site, new DefaultControllerImpl.SpriteBuilder(getSprite)); + return new DefaultControllerImpl(this, site, new DefaultControllerImpl.SpriteBuilder(GetSprite)); } - private ISprite getSprite() + private ISprite GetSprite() { return sprite; } Modified: branches/FreeTrainSDL/core/Contributions/Others/EmptyNewGameContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Others/EmptyNewGameContributionImpl.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Others/EmptyNewGameContributionImpl.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -39,22 +39,22 @@ /// <summary> /// /// </summary> - public override string author { get { return "-"; } } + public override string Author { get { return "-"; } } /// <summary> /// /// </summary> - public override string name { get { return "Empty map"; } } + public override string Name { get { return "Empty map"; } } //! public override string name { get { return "空マップ"; } } /// <summary> /// /// </summary> - public override string description { get { return "Create a completely empty map"; } } + public override string Description { get { return "Create a completely empty map"; } } //! public override string description { get { return "何もない空のマップを作成します"; } } /// <summary> /// /// </summary> /// <returns></returns> - public override WorldDefinition createNewGame() + public override WorldDefinition CreateNewGame() { using (NewWorldDialog dialog = new NewWorldDialog()) { Modified: branches/FreeTrainSDL/core/Contributions/Others/NewGameContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Others/NewGameContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Others/NewGameContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -39,22 +39,22 @@ /// <summary> /// Name of the new game. /// </summary> - public abstract string name { get; } + public abstract string Name { get; } /// <summary> /// Author of the new game. /// </summary> - public abstract string author { get; } + public abstract string Author { get; } /// <summary> /// Human-readable description of the new game. /// </summary> - public abstract string description { get; } + public abstract string Description { get; } /// <summary> /// Creates a new game by creating a new instance of the World object. /// </summary> /// <returns>null to indicate that the operation was cancelled.</returns> - public abstract WorldDefinition createNewGame(); + public abstract WorldDefinition CreateNewGame(); } } Modified: branches/FreeTrainSDL/core/Contributions/Others/NewWorldDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Others/NewWorldDialog.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Others/NewWorldDialog.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -18,58 +18,58 @@ */ #endregion LICENSE -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; -using FreeTrain.World; - -namespace FreeTrain.Contributions.Others -{ - /// <summary> - /// Dialog box to create a new World object. - /// </summary> - class NewWorldDialog : System.Windows.Forms.Form - { - public NewWorldDialog() { - InitializeComponent(); - } - - /// <summary> - /// 使用されているリソースに後処理を実行します。 - /// </summary> - protected override void Dispose( bool disposing ) { - if( disposing ) { - if(components != null) { - components.Dispose(); - } - } - base.Dispose( disposing ); - } - - #region Windows Form Designer generated code - /// <summary> - /// 必要なデザイナ変数です。 - /// </summary> - private System.ComponentModel.Container components = null; - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox name; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox sizeX; - private System.Windows.Forms.TextBox sizeY; - private System.Windows.Forms.Button okButton; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.TextBox sizeZ; - private System.Windows.Forms.Button cancelButton; - - /// <summary> - /// デザイナ サポートに必要なメソッドです。このメソッドの内容を - /// コード エディタで変更しないでください。 - /// </summary> - private void InitializeComponent() +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; +using FreeTrain.World; + +namespace FreeTrain.Contributions.Others +{ + /// <summary> + /// Dialog box to create a new World object. + /// </summary> + class NewWorldDialog : System.Windows.Forms.Form + { + public NewWorldDialog() { + InitializeComponent(); + } + + /// <summary> + /// 使用されているリソースに後処理を実行します。 + /// </summary> + protected override void Dispose( bool disposing ) { + if( disposing ) { + if(components != null) { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// <summary> + /// 必要なデザイナ変数です。 + /// </summary> + private System.ComponentModel.Container components = null; + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox name; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox sizeX; + private System.Windows.Forms.TextBox sizeY; + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox sizeZ; + private System.Windows.Forms.Button cancelButton; + + /// <summary> + /// デザイナ サポートに必要なメソッドです。このメソッドの内容を + /// コード エディタで変更しないでください。 + /// </summary> + private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.name = new System.Windows.Forms.TextBox(); @@ -198,37 +198,37 @@ this.ResumeLayout(false); this.PerformLayout(); - } - #endregion - - private void validateNumber(object sender, CancelEventArgs e) { - TextBox tb = (TextBox)sender; - try { - // check if the value is a positive integer. - if( int.Parse( tb.Text )>0 ) - return; - } catch( Exception ) {} - - // if not, refuse to move the focus. - e.Cancel = true; - tb.Select(); - } - - - /// <summary> - /// Creates a new empty world as specified by the user. - /// </summary> - public WorldDefinition createWorld() { - int x = int.Parse(sizeX.Text); - int y = int.Parse(sizeY.Text); - int z = int.Parse(sizeZ.Text); - WorldDefinition w = new WorldDefinition( new Distance(x,y+z*2,z), z/4 ); - w.Name = this.name.Text; - if(w.Name==null || w.Name.Length==0) - w.Name = "Terra Incognita"; - //! w.name = "ななしさん"; - return w; - // TODO: Z dimension - } - } -} + } + #endregion + + private void validateNumber(object sender, CancelEventArgs e) { + TextBox tb = (TextBox)sender; + try { + // check if the value is a positive integer. + if( int.Parse( tb.Text )>0 ) + return; + } catch( Exception ) {} + + // if not, refuse to move the focus. + e.Cancel = true; + tb.Select(); + } + + + /// <summary> + /// Creates a new empty world as specified by the user. + /// </summary> + public WorldDefinition createWorld() { + int x = int.Parse(sizeX.Text); + int y = int.Parse(sizeY.Text); + int z = int.Parse(sizeZ.Text); + WorldDefinition w = new WorldDefinition( new Distance(x,y+z*2,z), z/4 ); + w.Name = this.name.Text; + if(w.Name==null || w.Name.Length==0) + w.Name = "Terra Incognita"; + //! w.name = "ななしさん"; + return w; + // TODO: Z dimension + } + } +} Modified: branches/FreeTrainSDL/core/Contributions/Population/BasePopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/BasePopulation.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Population/BasePopulation.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -48,17 +48,17 @@ /// <summary> /// Number of population that is counted toward the total population of the world. /// </summary> - public abstract int residents { get; } + public abstract int Residents { get; } /// <summary> /// Computes the population of the given structure at the given time. /// </summary> - public abstract int calcPopulation(Time currentTime); + public abstract int CalcPopulation(Time currentTime); /// <summary> /// Loads a population from the plug-in manifest file. /// </summary> - public static BasePopulation load(XmlElement e) + public static BasePopulation Load(XmlElement e) { return (BasePopulation)PluginUtil.loadObjectFromManifest(e); } Modified: branches/FreeTrainSDL/core/Contributions/Population/CombinationPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/CombinationPopulation.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Population/CombinationPopulation.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -52,18 +52,18 @@ XmlNodeList nl = e.SelectNodes("population"); children = new BasePopulation[nl.Count]; for (int i = 0; i < nl.Count; i++) - children[i] = BasePopulation.load((XmlElement)nl[i]); + children[i] = BasePopulation.Load((XmlElement)nl[i]); } /// <summary> /// /// </summary> - public override int residents + public override int Residents { get { int r = 0; foreach (BasePopulation p in children) - r += p.residents; + r += p.Residents; return r; } } @@ -72,11 +72,11 @@ /// </summary> /// <param name="currentTime"></param> /// <returns></returns> - public override int calcPopulation(Time currentTime) + public override int CalcPopulation(Time currentTime) { int r = 0; foreach (BasePopulation p in children) - r += p.calcPopulation(currentTime); + r += p.CalcPopulation(currentTime); return r; } } Modified: branches/FreeTrainSDL/core/Contributions/Population/ConstantPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/ConstantPopulation.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Population/ConstantPopulation.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -53,13 +53,13 @@ /// <summary> /// /// </summary> - public override int residents { get { return population; } } + public override int Residents { get { return population; } } /// <summary> /// /// </summary> /// <param name="currentTime"></param> /// <returns></returns> - public override int calcPopulation(Time currentTime) + public override int CalcPopulation(Time currentTime) { return population; } Modified: branches/FreeTrainSDL/core/Contributions/Population/HourlyPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/HourlyPopulation.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Population/HourlyPopulation.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -56,13 +56,13 @@ /// <summary> /// /// </summary> - public override int residents { get { return population; } } + public override int Residents { get { return population; } } /// <summary> /// /// </summary> /// <param name="currentTime"></param> /// <returns></returns> - public override int calcPopulation(Time currentTime) + public override int CalcPopulation(Time currentTime) { if (currentTime.isWeekend) return population * weekendHourTable[currentTime.hour] / 100; Modified: branches/FreeTrainSDL/core/Contributions/Population/MultiplierPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/MultiplierPopulation.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Population/MultiplierPopulation.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -38,21 +38,21 @@ /// /// </summary> /// <param name="f"></param> - /// <param name="_core"></param> - public MultiplierPopulation(int f, BasePopulation _core) + /// <param name="core"></param> + public MultiplierPopulation(int f, BasePopulation core) { this.factor = f; - this.core = _core; + this.core = core; } /// <summary> /// /// </summary> - public override int residents + public override int Residents { get { - return core.residents * factor; + return core.Residents * factor; } } /// <summary> @@ -60,9 +60,9 @@ /// </summary> /// <param name="currentTime"></param> /// <returns></returns> - public override int calcPopulation(Time currentTime) + public override int CalcPopulation(Time currentTime) { - return core.calcPopulation(currentTime) * factor; + return core.CalcPopulation(currentTime) * factor; } } } Modified: branches/FreeTrainSDL/core/Contributions/Population/PersistentPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/PersistentPopulation.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Population/PersistentPopulation.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -44,29 +44,29 @@ /// <summary> /// /// </summary> - /// <param name="_core"></param> - /// <param name="_ref"> + /// <param name="core"></param> + /// <param name="reference"> /// Object that returns a reference to the existing same object. /// This object needs to be serializable, and will be used to /// restore reference correctly. /// </param> - public PersistentPopulation(BasePopulation _core, IObjectReference _ref) + public PersistentPopulation(BasePopulation core, IObjectReference reference) { - this.core = _core; - this.resolver = _ref; + this.core = core; + this.resolver = reference; } /// <summary> /// /// </summary> - public override int residents { get { return core.residents; } } + public override int Residents { get { return core.Residents; } } /// <summary> /// /// </summary> /// <param name="currentTime"></param> /// <returns></returns> - public override int calcPopulation(Time currentTime) + public override int CalcPopulation(Time currentTime) { - return core.calcPopulation(currentTime); + return core.CalcPopulation(currentTime); } // Modified: branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -50,24 +50,39 @@ } /// <summary> name of this sound </summary> - public readonly string name; + private readonly string name; + /// <summary> + /// + /// </summary> + public string Name + { + get { return name; } + } + + /// <summary> Bell sound </summary> - public readonly ISoundEffect sound; + private readonly ISoundEffect sound; + /// <summary> /// /// </summary> + public ISoundEffect Sound + { + get { return sound; } + } + + /// <summary> + /// + /// </summary> /// <returns></returns> public override string ToString() { return name; } - - - /// <summary> Gets all the departure bell contributions in the system. </summary> - public static DepartureBellContribution[] all + public static DepartureBellContribution[] All { get { @@ -77,7 +92,7 @@ } /// <summary> Default bell sound. </summary> - public static DepartureBellContribution DEFAULT + public static DepartureBellContribution Default { get { Modified: branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -45,10 +45,19 @@ } /// <summary> Operation cost of this station per day. </summary> - public readonly int operationCost; + private readonly int operationCost; + /// <summary> /// /// </summary> + public int OperationCost + { + get { return operationCost; } + } + + /// <summary> + /// + /// </summary> /// <param name="name"></param> /// <returns></returns> protected override StructureGroup GetGroup(string name) Modified: branches/FreeTrainSDL/core/Contributions/Rail/TrainControllerContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/TrainControllerContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Rail/TrainControllerContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -42,16 +42,16 @@ /// <summary> /// Creates a new instance of TrainController. /// </summary> - public abstract TrainController newController(string name); + public abstract TrainController NewController(string name); /// <summary> /// Gets the name of this train controller type. /// </summary> - public abstract string name { get; } + public abstract string Name { get; } /// <summary> /// Gets the description of this train controller type. /// </summary> - public abstract string description { get; } + public abstract string Description { get; } } } Modified: branches/FreeTrainSDL/core/Contributions/Road/A3RoadContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/A3RoadContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Road/A3RoadContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -57,7 +57,7 @@ /// </summary> /// <param name="idx"></param> /// <returns></returns> - protected internal override ISprite getSprite(byte idx) + protected internal override ISprite GetSprite(byte idx) { switch (idx) { Modified: branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -38,7 +38,7 @@ [Serializable] public abstract class AbstractRoadContributionImpl : RoadContribution { - private readonly string _name; + private readonly string name; private readonly string description; /// <summary> /// @@ -47,7 +47,7 @@ protected AbstractRoadContributionImpl(XmlElement e) : base(e) { - _name = XmlUtil.SelectSingleNode(e, "name").InnerText; + name = XmlUtil.SelectSingleNode(e, "name").InnerText; description = XmlUtil.SelectSingleNode(e, "description").InnerText; } /// <summary> @@ -55,7 +55,7 @@ /// </summary> /// <param name="dirs"></param> /// <returns></returns> - protected internal abstract ISprite getSprite(byte dirs); + protected internal abstract ISprite GetSprite(byte dirs); /// <summary> /// /// </summary> @@ -78,8 +78,8 @@ if (v == null) return false; // occupied if (v.road != null) { - if (!v.road.canAttach(d) && here != to) return false; - if (!v.road.canAttach(d.opposite) && here != from) return false; + if (!v.road.CanAttach(d) && here != to) return false; + if (!v.road.CanAttach(d.opposite) && here != from) return false; } if (v.car != null) return false; // car is in place // TODO: check v.railRoad @@ -110,12 +110,12 @@ if (here == from) p = RoadPattern.get((byte)(1 << (d.index / 2))); if (here == to) p = RoadPattern.get((byte)(1 << (d.opposite.index / 2))); - create(TrafficVoxel.getOrCreate(here), p); + Create(TrafficVoxel.getOrCreate(here), p); } else { - if (here != from) r.attach(d.opposite); - if (here != to) r.attach(d); + if (here != from) r.Attach(d.opposite); + if (here != to) r.Attach(d); } if (here == to) return; @@ -126,7 +126,7 @@ /// <summary> /// Creates a new road with a given pattern. /// </summary> - protected virtual BaseRoad create(TrafficVoxel voxel, RoadPattern pattern) + protected virtual BaseRoad Create(TrafficVoxel voxel, RoadPattern pattern) { return new RoadImpl(this, voxel, pattern); } @@ -146,7 +146,7 @@ { BaseRoad r = BaseRoad.get(here); if (r != null) - r.detach(d, d.opposite); + r.Detach(d, d.opposite); if (here == to) return; here = here.toward(to); @@ -159,7 +159,7 @@ { get { - return _name; + return name; } } /// <summary> @@ -197,8 +197,8 @@ } while (y >= 0 && x < 10) { - if (previewPattern[PreviewPatternIdx, x, y] > 0) - drawer.Draw(getSprite(previewPattern[PreviewPatternIdx, x, y]), 9 - x, y - 5); + if (PreviewPattern[PreviewPatternIdx, x, y] > 0) + drawer.Draw(GetSprite(PreviewPattern[PreviewPatternIdx, x, y]), 9 - x, y - 5); x++; y--; } @@ -222,7 +222,7 @@ /// <param name="pattern"></param> internal protected RoadImpl(AbstractRoadContributionImpl contrib, TrafficVoxel tv, RoadPattern pattern) : - base(tv, pattern, contrib.style) + base(tv, pattern, contrib.Style) { this.contribution = contrib; @@ -234,16 +234,16 @@ /// </summary> /// <param name="display"></param> /// <param name="pt"></param> - public override void drawBefore(DrawContext display, Point pt) + public override void DrawBefore(DrawContext display, Point pt) { - contribution.getSprite(pattern.dirs).Draw(display.Surface, pt); + contribution.GetSprite(pattern.dirs).Draw(display.Surface, pt); } /// <summary> /// /// </summary> /// <param name="d"></param> /// <returns></returns> - public override bool attach(Direction d) + public override bool Attach(Direction d) { byte dirs = pattern.dirs; dirs |= (byte)(1 << (d.index / 2)); @@ -255,7 +255,7 @@ /// </summary> /// <param name="d1"></param> /// <param name="d2"></param> - public override void detach(Direction d1, Direction d2) + public override void Detach(Direction d1, Direction d2) { byte dirs = pattern.dirs; dirs &= (byte)~(1 << (d1.index / 2)); @@ -276,7 +276,7 @@ /// </summary> /// <param name="d"></param> /// <returns></returns> - public override bool canAttach(Direction d) + public override bool CanAttach(Direction d) { return true; } Modified: branches/FreeTrainSDL/core/Contributions/Road/RoadContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/RoadContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Road/RoadContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -66,8 +66,16 @@ /// <summary> /// /// </summary> - public readonly RoadStyle style; + private readonly RoadStyle style; + /// <summary> + /// + /// </summary> + public RoadStyle Style + { + get { return style; } + } + private int previewPatternIdx = 0; /// <summary> /// @@ -80,7 +88,7 @@ /// <summary> /// /// </summary> - public static readonly byte[, ,] previewPattern = + private static readonly byte[, ,] previewPattern = { { {00,00,00,10,00,00,00,00,00,00}, @@ -119,9 +127,18 @@ {00,00,00,00,00,00,00,00,00,00} } }; // roads are always 4-way. + /// <summary> /// /// </summary> + public static byte[, ,] PreviewPattern + { + get { return RoadContribution.previewPattern; } + } + + /// <summary> + /// + /// </summary> public override sealed DirectionModes DirectionMode { get Modified: branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -73,7 +73,7 @@ /// </summary> /// <param name="idx"></param> /// <returns></returns> - protected internal override ISprite getSprite(byte idx) + protected internal override ISprite GetSprite(byte idx) { return flatSprites[idx]; } Modified: branches/FreeTrainSDL/core/Contributions/Sound/BGMContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Sound/BGMContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Sound/BGMContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -56,10 +56,19 @@ } /// <summary> Title of the music. </summary> - public readonly string name; + private readonly string name; + /// <summary> /// /// </summary> + public string Name + { + get { return name; } + } + + /// <summary> + /// + /// </summary> /// <returns></returns> public override string ToString() { @@ -67,6 +76,15 @@ } /// <summary> File name of the music. </summary> - public readonly string fileName; + private readonly string fileName; + + /// <summary> + /// + /// </summary> + public string FileName + { + get { return fileName; } + } + } } Modified: branches/FreeTrainSDL/core/Contributions/Sound/BGMFactoryContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Sound/BGMFactoryContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Sound/BGMFactoryContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -42,12 +42,12 @@ /// into the set of BGMs. /// </summary> /// <returns></returns> - public abstract BGMContribution[] listContributions(); + public abstract BGMContribution[] ListContributions(); /// <summary> /// Gets the group name of these BGMContributions. /// </summary> - public abstract string title { get; } + public abstract string Title { get; } } internal class BGMFactoryContributionFactory : IContributionFactory @@ -73,7 +73,7 @@ (BGMFactoryContribution)PluginUtil.loadObjectFromManifest(e); // let the factory load BGMs - foreach (BGMContribution bgm in contrib.listContributions()) + foreach (BGMContribution bgm in contrib.ListContributions()) { owner.contributions.Add(bgm); bgm.init(owner, new Uri(owner.dirName)); Modified: branches/FreeTrainSDL/core/Contributions/Structs/SpecialStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Structs/SpecialStructureContribution.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Contributions/Structs/SpecialStructureContribution.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -39,16 +39,16 @@ /// <summary> /// Gets the name used for the menu item. /// </summary> - public abstract string name { get; } + public abstract string Name { get; } /// <summary> /// Gets a one line description of this rail. /// </summary> - public abstract string oneLineDescription { get; } + public abstract string OneLineDescription { get; } /// <summary> /// This method is called when the menu item is selected by the user. /// </summary> - public abstract void showDialog(); + public abstract void ShowDialog(); } } Modified: branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -224,9 +224,9 @@ if (anchor != UNPLACED && isPlacing && currentPos != loc) { if (currentPos != UNPLACED) - WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateInclusive(anchor, currentPos)); currentPos = align(loc); - WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateInclusive(anchor, currentPos)); } } @@ -257,7 +257,7 @@ else // remove existing ones Type.Remove(anchor, loc); - WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, loc)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateInclusive(anchor, loc)); } anchor = UNPLACED; } @@ -277,7 +277,7 @@ { // cancel the anchor if (currentPos != UNPLACED) - WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPos)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateInclusive(anchor, currentPos)); anchor = UNPLACED; } } Modified: branches/FreeTrainSDL/core/Controllers/CubeSelectorController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/CubeSelectorController.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Controllers/CubeSelectorController.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -98,12 +98,12 @@ /// <summary> /// North-west corner of the selected region. /// </summary> - protected Cube currentCube + protected Cube CurrentCube { get { Debug.Assert(location != UNPLACED); - return Cube.createExclusive(location, size); + return Cube.CreateExclusive(location, size); } } @@ -125,7 +125,7 @@ /// <param name="ab"></param> public virtual void OnClick(MapViewWindow view, Location loc, Point ab) { - OnSelected(Cube.createExclusive(loc, size)); + OnSelected(Cube.CreateExclusive(loc, size)); } /// <summary> /// @@ -151,9 +151,9 @@ { // the current location is moved. // update the screen - w.OnVoxelUpdated(currentCube); + w.OnVoxelUpdated(CurrentCube); location = loc; - w.OnVoxelUpdated(currentCube); + w.OnVoxelUpdated(CurrentCube); } } /// <summary> @@ -171,7 +171,7 @@ /// <summary> /// /// </summary> - public virtual void close() + public virtual void Close() { onCanceled(); } Modified: branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -171,7 +171,7 @@ } - protected override void onRectSelected(Location loc1, Location loc2) + protected override void OnRectSelected(Location loc1, Location loc2) { if (owner.isPlacing) buy(loc1, loc2); @@ -183,7 +183,7 @@ /// </summary> /// <param name="loc1"></param> /// <param name="loc2"></param> - protected override void onRectUpdated(Location loc1, Location loc2) + protected override void OnRectUpdated(Location loc1, Location loc2) { if (owner.isPlacing) owner.costBox.cost = computePriceForBuy(loc1, loc2); @@ -205,9 +205,9 @@ /// <param name="pt"></param> public void DrawVoxel(QuarterViewDrawer view, DrawContext canvas, Location loc, Point pt) { - if (loc.z != anchor.z) return; + if (loc.z != Anchor.z) return; - if (anchor != UNPLACED && loc.inBetween(anchor, currentLoc)) + if (Anchor != Unplaced && loc.inBetween(Anchor, CurrentLocation)) { if (owner.isPlacing) LandPropertyVoxel.sprite.DrawAlpha(canvas.Surface, pt); Modified: branches/FreeTrainSDL/core/Controllers/LocationStore.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/LocationStore.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Controllers/LocationStore.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -39,7 +39,7 @@ /// <summary> /// /// </summary> - public Location location + public Location Location { get { Modified: branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -293,7 +293,7 @@ loc2 += direction.right90; // for the attached rail road, width is two } } - WorldDefinition.World.OnVoxelUpdated(Cube.createExclusive(baseLoc, loc2)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateExclusive(baseLoc, loc2)); } /// <summary> @@ -405,7 +405,7 @@ switch (this.currentMode) { case Mode.Station: - if (Cube.createExclusive(baseLoc, alphaSprites.size).contains(loc)) + if (Cube.CreateExclusive(baseLoc, alphaSprites.size).Contains(loc)) alphaSprites.getSprite(loc - baseLoc).DrawAlpha(canvas, pt); break; @@ -414,7 +414,7 @@ if (direction == Direction.NORTH) loc.y += length - 1; if (direction == Direction.WEST) loc.x += length - 1; - if (Cube.createExclusive(baseLoc, alphaSprites.size).contains(loc)) + if (Cube.CreateExclusive(baseLoc, alphaSprites.size).Contains(loc)) alphaSprites.getSprite(loc - baseLoc).DrawAlpha(canvas, pt); break; Modified: branches/FreeTrainSDL/core/Controllers/Rail/PlatformPropertyDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/PlatformPropertyDialog.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Controllers/Rail/PlatformPropertyDialog.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -70,7 +70,7 @@ hostList.SelectedItem = platform.host; // bell sound list - bell.DataSource = DepartureBellContribution.all; + bell.DataSource = DepartureBellContribution.All; bell.SelectedItem = platform.bellSound; } Modified: branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -140,7 +140,7 @@ // cancel the anchor if (currentPosition != unplaced) { - WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPosition)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateInclusive(anchor, currentPosition)); } anchor = unplaced; UpdateDialog(); @@ -160,10 +160,10 @@ // update the screen if (currentPosition != unplaced) { - WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPosition)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateInclusive(anchor, currentPosition)); } currentPosition = location; - WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPosition)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateInclusive(anchor, currentPosition)); int cost; SingleRailRoad.ComputeRoute(anchor, currentPosition, out cost); Modified: branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs 2008-04-13 05:40:57 UTC (rev 362) @@ -414,7 +414,7 @@ loc2.y += direction.offsetY * 3; loc2.z++; - WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(lastMouse, loc2)); + WorldDefinition.World.OnVoxelUpdated(Cube.CreateInclusive(lastMouse, loc2)); } /// <summary> Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs 2008-04-09 20:54:19 UTC (rev 361) +++ branches/FreeT... [truncated message content] |
From: <je...@us...> - 2008-04-09 20:55:09
|
Revision: 361 http://freetrain.svn.sourceforge.net/freetrain/?rev=361&view=rev Author: jendave Date: 2008-04-09 13:54:19 -0700 (Wed, 09 Apr 2008) Log Message: ----------- rollback some icons for linux Modified Paths: -------------- branches/FreeTrainSDL/core/Controllers/Rail/PlatformPropertyDialog.cs branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.resx branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.Designer.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.resx branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.Designer.cs branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.resx Modified: branches/FreeTrainSDL/core/Controllers/Rail/PlatformPropertyDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/PlatformPropertyDialog.cs 2008-04-09 20:43:34 UTC (rev 360) +++ branches/FreeTrainSDL/core/Controllers/Rail/PlatformPropertyDialog.cs 2008-04-09 20:54:19 UTC (rev 361) @@ -131,7 +131,7 @@ // this.left.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.left.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.left.Location = new System.Drawing.Point(96, 17); + this.left.Location = new System.Drawing.Point(94, 17); this.left.Name = "left"; this.left.Size = new System.Drawing.Size(88, 26); this.left.TabIndex = 7; @@ -142,7 +142,7 @@ // this.right.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.right.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.right.Location = new System.Drawing.Point(192, 17); + this.right.Location = new System.Drawing.Point(190, 17); this.right.Name = "right"; this.right.Size = new System.Drawing.Size(80, 26); this.right.TabIndex = 8; @@ -164,7 +164,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.nameBox.Location = new System.Drawing.Point(104, 9); this.nameBox.Name = "nameBox"; - this.nameBox.Size = new System.Drawing.Size(176, 20); + this.nameBox.Size = new System.Drawing.Size(174, 20); this.nameBox.TabIndex = 2; // // groupFat @@ -173,9 +173,9 @@ | System.Windows.Forms.AnchorStyles.Right))); this.groupFat.Controls.Add(this.left); this.groupFat.Controls.Add(this.right); - this.groupFat.Location = new System.Drawing.Point(8, 113); + this.groupFat.Location = new System.Drawing.Point(8, 115); this.groupFat.Name = "groupFat"; - this.groupFat.Size = new System.Drawing.Size(280, 52); + this.groupFat.Size = new System.Drawing.Size(278, 52); this.groupFat.TabIndex = 999; this.groupFat.TabStop = false; this.groupFat.Text = "Connect tracks"; @@ -185,7 +185,7 @@ this.OKbutton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.OKbutton.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKbutton.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.OKbutton.Location = new System.Drawing.Point(104, 173); + this.OKbutton.Location = new System.Drawing.Point(102, 175); this.OKbutton.Name = "OKbutton"; this.OKbutton.Size = new System.Drawing.Size(88, 26); this.OKbutton.TabIndex = 10; @@ -197,7 +197,7 @@ this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.cancelButton.Location = new System.Drawing.Point(200, 173); + this.cancelButton.Location = new System.Drawing.Point(198, 175); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(80, 26); this.cancelButton.TabIndex = 11; @@ -219,14 +219,14 @@ this.hostList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.hostList.Location = new System.Drawing.Point(104, 43); this.hostList.Name = "hostList"; - this.hostList.Size = new System.Drawing.Size(176, 21); + this.hostList.Size = new System.Drawing.Size(174, 21); this.hostList.TabIndex = 4; // // remove // this.remove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.remove.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.remove.Location = new System.Drawing.Point(8, 173); + this.remove.Location = new System.Drawing.Point(6, 175); this.remove.Name = "remove"; this.remove.Size = new System.Drawing.Size(88, 26); this.remove.TabIndex = 9; @@ -249,7 +249,7 @@ this.bell.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.bell.Location = new System.Drawing.Point(104, 78); this.bell.Name = "bell"; - this.bell.Size = new System.Drawing.Size(176, 21); + this.bell.Size = new System.Drawing.Size(174, 21); this.bell.TabIndex = 6; // // label3 @@ -264,7 +264,7 @@ // PlatformPropertyDialog // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(298, 204); + this.ClientSize = new System.Drawing.Size(296, 206); this.ControlBox = false; this.Controls.Add(this.label3); this.Controls.Add(this.bell); Modified: branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.resx =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.resx 2008-04-09 20:43:34 UTC (rev 360) +++ branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.resx 2008-04-09 20:54:19 UTC (rev 361) @@ -249,42 +249,6 @@ <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <value>164, 118</value> </data> - <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAABAAEAHBUAAAEAGABgBwAAFgAAACgAAAAcAAAAKgAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AACqzM53mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZt3mZv///93mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6q - zM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM4AAAAA - AAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gAAAAAAACqzM6qzM6qzM6qzM53mZsAAAB3 - mZt3mZv///+qzM6qzM6qzM6qzM4AAAAAAAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gA - AAAAAACqzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6q - zM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q - zM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6q - zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6q - zM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM4AAAAA - AAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gAAAAAAACqzM6qzM6qzM6qzM53mZsAAAB3 - mZt3mZv///+qzM6qzM6qzM6qzM4AAAAAAAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gA - AAAAAACqzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6q - zM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q - zM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6q - zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6q - zM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM4AAAAA - AAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gAAAAAAACqzM6qzM6qzM6qzM53mZsAAAB3 - mZt3mZv///+qzM6qzM6qzM6qzM4AAAAAAAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gA - AAAAAACqzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6q - zM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q - zM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6q - zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///////////////////////// - //////////////////////////////////////////////////////////////////////////8AAAB3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -</value> - </data> <data name="$this.Text" xml:space="preserve"> <value>Railroad</value> </data> @@ -292,6 +256,6 @@ <value>RailRoadController</value> </data> <data name=">>$this.Type" xml:space="preserve"> - <value>FreeTrain.Controllers.AbstractControllerImpl, FreeTrain, Version=1.0.3020.18062, Culture=neutral, PublicKeyToken=bcc810b413ef8c1c</value> + <value>FreeTrain.Controllers.AbstractControllerImpl, FreeTrain, Version=1.0.3021.22884, Culture=neutral, PublicKeyToken=bcc810b413ef8c1c</value> </data> </root> \ No newline at end of file Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.Designer.cs 2008-04-09 20:43:34 UTC (rev 360) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.Designer.cs 2008-04-09 20:54:19 UTC (rev 361) @@ -254,7 +254,6 @@ this.ClientSize = new System.Drawing.Size(462, 222); this.Controls.Add(this.panel1); this.Controls.Add(this.panel2); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MinimumSize = new System.Drawing.Size(416, 195); this.Name = "TrainPlacementController"; this.Text = "Place Train"; Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.resx =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.resx 2008-04-09 20:43:34 UTC (rev 360) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.resx 2008-04-09 20:54:19 UTC (rev 361) @@ -172,41 +172,4 @@ AQEHAAEBBwABAQGABgABAQGABgABAwGAAQEEAAGAAf8BwAF/BAABwQH/AeAB/wQABP8EAAs= </value> </data> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAABAAEAHBUAAAEAGABgBwAAFgAAACgAAAAcAAAAKgAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AACqzM53mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZt3mZv///93mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZsAAAB3mZt3mZv///+qzM6qzM6qzM53mZsAAAB3mZsAAAAAAAAAAAB3mZt3mZsAAAB3mZuq - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM4AAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACqzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3 - mZt3mZv///+qzM4AAACqzM53mZt3mZt3mZsAAAAAAAAAAAAAAAB3mZt3mZt3mZuqzM4AAAAAAACqzM6q - zM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM53mZt3mZuqzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM53mZsAAAAAAAAAAACqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM4A - AAC67vG67vG67vG67vG67vF3mZu67vG67vG67vG67vG67vGqzM4AAABmd3gAAAAAAAAAAAAAAAAAAAAA - AAAAAAB3mZsAAAB3mZt3mZv///+qzM4AAAAJU+cJU+cJU+e67vF3mZt3mZt3mZu67vGqzM4JU+cJU+cJ - U+cAAABmd3h3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAB3mZt3mZv///+qzM4AAACqzM4JU+cJU+e6 - 7vG67vG67vG67vG67vGqzM4JU+eqzM4JU+cAAABmd3h3mZtmd3h3mZtmd3h3mZtmd3h3mZt3mZsAAAB3 - mZt3mZv///+qzM4AAACqzM4JU+cJU+e67vEJU+cAAAAAAAAJU+eqzM4JU+eqzM4JU+cAAAAAAAB3mZsA - AACqzM4AAACqzM4AAACqzM53mZsAAAB3mZt3mZv///+qzM4AAAAJU+cJU+cJU+e67vEJU+cJU+cJU+cJ - U+eqzM4JU+cJU+cJU+cAAAAAAAB3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAB3mZt3mZv///+qzM4A - AAC67vG67vG67vG67vG67vG67vG67vG67vG67vG67vG67vG67vEAAABmd3h3mZuqzM6qzM6qzM6qzM6q - zM6qzM53mZsAAAB3mZt3mZv///+qzM4AAACqzM6qzM53mZt3mZt3mZt3mZt3mZt3mZt3mZuqzM6qzM66 - 7vEAAABmd3gAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZsAAAB3mZt3mZv///+qzM4AAAC67vG67vGqzM6q - zM6qzM6qzM6qzM6qzM6qzM667vG67vGqzM4AAAAAAAB3mZuqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3 - mZt3mZv///+qzM53mZt3mZt3mZt3mZt3mZt3mZsAAAB3mZt3mZt3mZt3mZt3mZt3mZsAAAB3mZuqzM6q - zM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM4AAAB3mZuqzM667vGqzM4AAACqzM66 - 7vGqzM6qzM53mZsAAAB3mZuqzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q - zM6qzM4AAAAAAAB3mZt3mZsAAAB3mZt3mZt3mZsAAAAAAAB3mZuqzM6qzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM4AAAAAAAAAAAAAAAAAAAAAAAB3mZuqzM6q - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///////////////////////// - //////////////////////////////////////////////////////////////////////////8AAAB3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -</value> - </data> </root> \ No newline at end of file Modified: branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.Designer.cs 2008-04-09 20:43:34 UTC (rev 360) +++ branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.Designer.cs 2008-04-09 20:54:19 UTC (rev 361) @@ -48,7 +48,6 @@ /// </summary> private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MountainController)); this.buttonUp = new System.Windows.Forms.RadioButton(); this.buttonDown = new System.Windows.Forms.RadioButton(); this.preview = new System.Windows.Forms.PictureBox(); @@ -141,7 +140,6 @@ this.Controls.Add(this.buttonUp); this.Controls.Add(this.buttonDown); this.Controls.Add(this.preview); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "MountainController"; this.Text = "Modify Terrain"; ((System.ComponentModel.ISupportInitialize)(this.preview)).EndInit(); Modified: branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.resx =================================================================== --- branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.resx 2008-04-09 20:43:34 UTC (rev 360) +++ branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.resx 2008-04-09 20:54:19 UTC (rev 361) @@ -117,41 +117,4 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAABAAEAHBUAAAEAGABgBwAAFgAAACgAAAAcAAAAKgAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAB3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZt3mZv///93mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3 - mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///93mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZuqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///8AAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZt3mZuqzM6qzM6qzM6q - zM6qzM53mZsAAAB3mZt3mZv///+qzM4AAABEmUBEmUBmu2NEmUBmu2NEmUBEmUBmu2NEmUBEmUBmu2NE - mUBEmUBEmUAAAAB3mZt3mZuqzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM4AAABEmUBEmUBm - u2NEmUBmu2NEmUBEmUBEmUBmu2Nmu2NEmUBmu2NEmUBEmUAAAAB3mZt3mZuqzM6qzM6qzM53mZsAAAB3 - mZt3mZv///+qzM6qzM6qzM4AAABmu2Nmu2Nmu2Nmu2NEmUBmu2NEmUBEmUBmu2Nmu2NEmUBmu2NEmUBE - mUAAAAB3mZt3mZuqzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM4AAABEmUBEmUBmu2Nmu2NE - mUBmu2NEmUBEmUBmu2Nmu2NEmUBEmUBmu2NEmUAAAAB3mZt3mZuqzM53mZsAAAB3mZt3mZv///+qzM6q - zM6qzM6qzM6qzM4AAABmu2NEmUBmu2Nmu2NEmUBEmUBmu2NEmUBmu2Nmu2Nmu2NEmUBEmUBEmUAAAAB3 - mZt3mZt3mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM4AAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACqzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3 - mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q - zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///////////////////////// - //////////////////////////////////////////////////////////////////////////8AAAB3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 - mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZuqzM4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -</value> - </data> </root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-09 20:44:00
|
Revision: 360 http://freetrain.svn.sourceforge.net/freetrain/?rev=360&view=rev Author: jendave Date: 2008-04-09 13:43:34 -0700 (Wed, 09 Apr 2008) Log Message: ----------- icon problem in linux Modified Paths: -------------- branches/FreeTrainSDL/core/Framework/MainWindow.Designer.cs branches/FreeTrainSDL/core/Framework/MainWindow.resx Modified: branches/FreeTrainSDL/core/Framework/MainWindow.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindow.Designer.cs 2008-04-09 20:31:01 UTC (rev 359) +++ branches/FreeTrainSDL/core/Framework/MainWindow.Designer.cs 2008-04-09 20:43:34 UTC (rev 360) @@ -578,7 +578,6 @@ this.Controls.Add(this.statusStrip); this.Controls.Add(this.toolStrip); this.Controls.Add(this.menuStrip); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.IsMdiContainer = true; this.MainMenuStrip = this.menuStrip; this.Name = "MainWindow"; Modified: branches/FreeTrainSDL/core/Framework/MainWindow.resx =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindow.resx 2008-04-09 20:31:01 UTC (rev 359) +++ branches/FreeTrainSDL/core/Framework/MainWindow.resx 2008-04-09 20:43:34 UTC (rev 360) @@ -408,69 +408,4 @@ <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>51</value> </metadata> - <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAABAAIAICAAAAAAAACoCAAAJgAAABAQAAAAAAAAaAUAAM4IAAAoAAAAIAAAAEAAAAABAAgAAAAAAIAE - AAAAAAAAAAAAAAAAAAAAAAAAAAAAALBwAAAgUBAA8PDQAPDQUADwkEAAkJCQABAAYAAwMDAA8NBgAKCg - oAAwQHAA8HAwALCwsAAQACAAIBCQAEBAQACAgIAA0ODgANDQwAAQAHAAUEBwAODg4ADAwNAAMABAAPDw - 8ADg8PAAgHCgAKCg4AAAAOAAEACwAFBgUADw4NAA4ODwAEBAcAAgABAAgHBwAPDg4ADAwMAAQECQAJCQ - wADw4HAAQACQABAAwADw0HAA0LDgAFAAgAAAAMAAUAAQAJCAcADg0NAAwMDwADAQ8AAwAMAAAAAQACBQ - IADAcDAA8GAgAJCQ8AAwgEAAkPCAAECwYADwgDAAoLCwADBA8ADwsEAA8JAwACAgIAAQECAAMADwAICQ - 8ACAMEAA8MBQAPBwQAAAAGAAYCDgAKCw8ABgYFAA8HAgAPDQ0AAQEPAA8KBAADAAUABQQPAAcHDwANDw - 8ABQUPAAUFBQAPDAQAAAAJAAoNDwANCg8ABwcHAA0FAgAMCw8ACAQPAAcFDAAFCQUAAgIPAAcBDwADAA - oABwcIAAkFCAAEBA0ACgMBAA4GAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAsQEBAfJB8VCzExMQsVMTExMTExXDExMTExMQAAAAAHBw8U - Dg4AAAAjIzYLAjZENgtNGxsbLS0VAAAAAAAAAAAADgcYHgcOBw4OAAA2GDYfGwotIBkgIBEAAAAAAAAA - AAAABw4dBx4rHg4ODjYAQzdNTVcfFWBlMQwAAAAAAAAAAA4GCwcjDysrByseFAceFBQUFFk0Hg5pDAwA - AAAAAAAADgYXHCIOKi8eNB4eHh4rKysrK1s0ZGgMDAAAAAAAAAAOCgobGw4PLhQ0KysvLysrKys0Ol9j - RwwAAAAAAAAAAA4KChoSKA4rMDUrKysrKysrNDRaW18HOWkAAAAAAAAOBgoTFhYnDgceNSo0KysrHTRW - OlpeXh5pDAwAAAAAAA4KChMWICYbGw40Kx00NDRAQFUhICFeDzkMDGkAAAAOBgoKFhYWEQotGw40K0BA - RkxMISAgISEhBAUFaQAAAA4KCgoWFhYRCicnJx40NDQ0NEAhICAhIWcFPgwAAAAOBgoKExYWFhEgJQMz - Dgc0NDQ0UFRUGUZiZjk5DAAAAAAOCgoTFhYWERkZGRY6Jw40RSk0U0YhJzg+DAwAAAAAAAUODRIWGRER - GRklFhMDPxQrS09PIBldPgwMAAAAAAAABQUODhURERMZGSUyChkgAxBKFFJHBAwMAAAAAAAAAAAABQUF - DgoRExklJRMKICAgDgxOPgxRDAxJAAAAAAAAAAAAAAUOERElGSUgChYgCg4OST4+BVEFBQU+AAAAAAAA - AAAMDgoRExkhICAKDg4OOD5CBQVRUVFBQVFRAAAAAAAABQQOERETISEgIA45PgVCQgUFBUFRQQQJCQkA - AAAAAAQFDgoRESElICAgDjc3N0IFBQUFBQUFNzc3AwAAAAAABAQOERERISUgICAOOD03BUFBQVFRQQVh - PTcAAAAAAAADCQwOChEgICAgIA43PDdBBARIQUFRBTc8NwAAAAAAAAMJCQkOChEKGRkOCTc8N0EESEFB - WEFRNzw3AAAAAAAAAAMJCQ4RChcZDgksNzw3NzdHCQkEBEE3PDcAAAAAAAAAAAMJCQ4TDg4sCSw3PDw8 - PQIsLAkJBDc8NwAAAAAAAAAAAAAADg4DKQkECTc8Nzc3NwkpCQkJNzw3AAAAAAAAAAAAAAAOAAMJBAQJ - Nzw3BAkJBAQJBAQ3PDcAAAAAAAAAAAAADgAAGQQEBCw3PDc3Nzc3BAQ3Nzc8Nzc3AAAAAAAAAAAOAAAA - AwQJKTc7PDw8PTcEBDc9PDw8PTcAAAAAAAAAAA4AAAAAAAMEBDc3Nzc3NwQDNzc3Nzc3NwAAAAAAAAAO - AAAAAAAAAAAAAykpKQAAAAAAAAAAAAAAAADAAAADwAAAH/AAAB/4AAAP8AAAB/AAAAfwAAAP8AAAB+AA - AAPgAAABwAAAAcAAAAOAAAADwAAAB8AAAA/AAAA/4AAAH/gAAA/wAAAH4AAAB8AAAAfAAAAPwAAAD8AA - AA/gAAAP8AAAD/4AAA/+gAAP/YAAA/3AAAP98AAD+/4f/ygAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAuXoAAP/isQD5oEwAw2ZSACoqKgDXTS0ACAU/APuiTAD/sXMAoaSnAKSl - pgASEkUA/7xjAIeIiQCFhIMA4eHhANjY2ACUlZoAu8LJAM7OzwCjqa0Ax8fHANva2QDW1tcAwsLOABoL - tQAUFEYA/69YAOfs8ADn6esA4ODhANfX1wCwr7QAAAC5AAYCswAdHTYA/7xbAOXu6wDY2NEAqaXEABkI - dgAAAH4ADw8pAP+yWQD/sFcA+65SAJWQjwDHycYAqai0ABoGwwAhD9EAAADpAAMDWwD/rlUA/7FWAP+W - QQAAAOsACAT3AAAA9AD/umIA/7tjAP+1WwD/rVQA/6FJAP/ibAAKCP8Am5f/AAAA5AAAAM8AMDBkAF9g - XwD/uWAA/6tSAP+eRwD/jDoA/3EgAFln+wCKke8AHR3hAAAA0QBUVFUA/7tiAP+nUAD/lUEA/5E+AP9+ - LgD/q1MArqjmANbf/ADg7PQAppz/AOnp6QCIiIgA/7phAP+uZgD/kkIA/5pGAP+CNQD4WxwAutL5ANLv - /gDlXjQAvD02AIyOjwDzWyIA92AkAPeGVQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAABwcHGyQrKytHR11daAAAAAAMDBojKjUMRlFcXFFnAAAABRIMIho0IkVQ - QxpnAAAAAAULGQwiMztET1tNKmsAAAYFCxghKTI6Q05aZVhXZwAFCxEXFSgpOUJNWWQqamcABQoQFhUn - MSlBQVgqZmkAAAQFBRUgJjAmKSlXYwYAAAAACQUVHyYvJgVMVmJiAAAAAwUPFR4mBQUFS1VhV1cAAAMF - DhQdJgU4QEpUYFMAAAACCAUTFQUuNz9JU18AAAAAAAINBQUlLTY+SFJePAAAAAAAAAUcHCwNPTxIDTwA - AAAAAAUAAgINDQ08DTw8AAAAAAAAAAAAAgI8PAAAAAAAAAAHAACAAwAAgAcAAIADAAAAAQAAAAEAAAAD - AAAABwAAgAcAAAADAAAABwAAAA8AAIAHAADgBwAA0AcAAPw/AAA= -</value> - </data> </root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-09 20:31:04
|
Revision: 359 http://freetrain.svn.sourceforge.net/freetrain/?rev=359&view=rev Author: jendave Date: 2008-04-09 13:31:01 -0700 (Wed, 09 Apr 2008) Log Message: ----------- got rid of all CLSCompliant attributes(except for jagged arrays) Modified Paths: -------------- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Others/MenuContribution.cs branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs branches/FreeTrainSDL/core/Contributions/Train/TrainContribution.cs branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs branches/FreeTrainSDL/core/Controllers/Land/LandController.cs branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs branches/FreeTrainSDL/core/Controllers/PointSelectorController.cs branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs branches/FreeTrainSDL/core/Framework/Graphics/Surface.cs branches/FreeTrainSDL/core/Framework/Plugin/DynamicContributionFactory.cs branches/FreeTrainSDL/core/Framework/Plugin/FixedClassContributionFactory.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs branches/FreeTrainSDL/core/Framework/Plugin/XmlUtil.cs branches/FreeTrainSDL/core/Views/GlobalViewOptions.cs branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs branches/FreeTrainSDL/core/World/Accounting/AccountSummaryWindow.cs branches/FreeTrainSDL/core/World/Cube.cs branches/FreeTrainSDL/core/World/Development/DevelopConfigurePlugin.cs branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs branches/FreeTrainSDL/core/World/Development/LandValue.cs branches/FreeTrainSDL/core/World/Development/LandValueInspectorPlugin.cs branches/FreeTrainSDL/core/World/Development/ULV.cs branches/FreeTrainSDL/core/World/EmptyVoxel.cs branches/FreeTrainSDL/core/World/Entity.cs branches/FreeTrainSDL/core/World/Land/LandPropertyVoxel.cs branches/FreeTrainSDL/core/World/Land/LandVoxel.cs branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs branches/FreeTrainSDL/core/World/RRCrossing.cs branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs branches/FreeTrainSDL/core/World/Rail/FatPlatform.cs branches/FreeTrainSDL/core/World/Rail/Platform.cs branches/FreeTrainSDL/core/World/Rail/RailRoad.cs branches/FreeTrainSDL/core/World/Rail/RailStationaryStructure.cs branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs branches/FreeTrainSDL/core/World/Rail/Station.cs branches/FreeTrainSDL/core/World/Rail/StationListener.cs branches/FreeTrainSDL/core/World/Rail/StealSupportedRailContributionImpl.cs branches/FreeTrainSDL/core/World/Rail/TunnelRail.cs branches/FreeTrainSDL/core/World/Road/Road.cs branches/FreeTrainSDL/core/World/SparseVoxelArray.cs branches/FreeTrainSDL/core/World/Structs/Commercial.cs branches/FreeTrainSDL/core/World/Structs/ConstructionSite.cs branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs branches/FreeTrainSDL/core/World/Structs/PopulatedStructure.cs branches/FreeTrainSDL/core/World/Structs/StationListenerImpl.cs branches/FreeTrainSDL/core/World/Structs/Structure.cs branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs branches/FreeTrainSDL/core/World/Terrain/MountainVoxel.cs branches/FreeTrainSDL/core/World/Traffic.cs branches/FreeTrainSDL/core/World/Voxel.cs branches/FreeTrainSDL/core/World/WorldDefinition.cs branches/FreeTrainSDL/lib/Controls/ColorPicker.cs branches/FreeTrainSDL/lib/Controls/MruMenu.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCar.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/MenuContributionImpl.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/MenuContributionImpl.cs branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs branches/FreeTrainSDL/plugins/Chiname.Generic/StructCategory.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/MenuContributionImpl.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessory.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HalfVoxelContribution.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HueShiftSprite.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/MenuContributionImpl.cs branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/ColorConfigCommand.cs branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/ColorConfigDialog.cs branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/ColorTestTrainCar.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseVoxel.cs Modified: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -156,7 +156,7 @@ public override PreviewDrawer CreatePreview(Size pixelSize) { PreviewDrawer drawer = new PreviewDrawer(pixelSize, size); - drawer.drawCenter(sprites); + drawer.DrawCenter(sprites); return drawer; } Modified: branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -91,7 +91,7 @@ /// <summary> /// /// </summary> - public StructureGroup Group + public virtual StructureGroup Group { get { return group; } } Modified: branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -81,9 +81,9 @@ else mv.removeTrees(); } - else if (v.entity != null) + else if (v.Entity != null) { - v.entity.remove(); + v.Entity.remove(); } else { Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -38,18 +38,18 @@ : base(name) { } + ///// <summary> + ///// + ///// </summary> + ///// <param name="idx"></param> + ///// <returns></returns> + //public LandBuilderContribution Get(int idx) + //{ + // return (LandBuilderContribution)base.List[idx]; + //} /// <summary> /// /// </summary> - /// <param name="idx"></param> - /// <returns></returns> - public LandBuilderContribution Get(int idx) - { - return (LandBuilderContribution)base.List[idx]; - } - /// <summary> - /// - /// </summary> /// <param name="sc"></param> public void Remove(LandBuilderContribution sc) { Modified: branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -98,7 +98,7 @@ for (int y = 0; y < 10; y++) for (int x = 0; x < 10; x++) - drawer.draw(getLand().sprite, x, y); + drawer.Draw(getLand().sprite, x, y); return drawer; } Modified: branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -81,7 +81,7 @@ for (int y = 0; y < 10; y++) for (int x = 0; x < 10; x++) - drawer.draw(sprite, x, y); + drawer.Draw(sprite, x, y); return drawer; } Modified: branches/FreeTrainSDL/core/Contributions/Others/MenuContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Others/MenuContribution.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Others/MenuContribution.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -41,6 +41,6 @@ /// <summary> /// The callee can merge menu items into container at this timing. /// </summary> - public abstract void mergeMenu(MainMenu containerMenu); + public abstract void MergeMenu(MainMenu containerMenu); } } Modified: branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -198,12 +198,12 @@ while (y >= 0 && x < 10) { if (previewPattern[PreviewPatternIdx, x, y] > 0) - drawer.draw(getSprite(previewPattern[PreviewPatternIdx, x, y]), 9 - x, y - 5); + drawer.Draw(getSprite(previewPattern[PreviewPatternIdx, x, y]), 9 - x, y - 5); x++; y--; } } - return drawer.createBitmap(); + return drawer.CreateBitmap(); } } } @@ -247,7 +247,7 @@ { byte dirs = pattern.dirs; dirs |= (byte)(1 << (d.index / 2)); - voxel.road = new RoadImpl(contribution, voxel, RoadPattern.get(dirs)); + Voxel.road = new RoadImpl(contribution, Voxel, RoadPattern.get(dirs)); return true; } /// <summary> @@ -263,13 +263,13 @@ if (dirs == 0) // destroy this road - voxel.road = null; + Voxel.road = null; else { - voxel.road = new RoadImpl(contribution, voxel, RoadPattern.get(dirs)); + Voxel.road = new RoadImpl(contribution, Voxel, RoadPattern.get(dirs)); } - WorldDefinition.World.OnVoxelUpdated(location); + WorldDefinition.World.OnVoxelUpdated(Location); } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -217,12 +217,12 @@ int z = 0; for (int i = bottoms.Length - 1; i >= 0; i--) - drawer.draw(bottoms[i], 0, 0, z++); + drawer.Draw(bottoms[i], 0, 0, z++); if (overlay) - drawer.draw(middle, 0, 0, z - 1); - drawer.draw(middle, 0, 0, z++); + drawer.Draw(middle, 0, 0, z - 1); + drawer.Draw(middle, 0, 0, z++); for (int i = tops.Length - 1; i >= 0; i--) - drawer.draw(tops[i], 0, 0, z++); + drawer.Draw(tops[i], 0, 0, z++); return drawer; } @@ -239,16 +239,16 @@ int mh = height - 2; int z = 0; for (int i = bottoms.Length - 1; i >= 0; i--) - drawer.draw(bottoms[i], 0, 0, z++); + drawer.Draw(bottoms[i], 0, 0, z++); if (overlay) { z--; mh++; } for (int i = 0; i < mh; i++) - drawer.draw(middle, 0, 0, z++); + drawer.Draw(middle, 0, 0, z++); for (int i = tops.Length - 1; i >= 0; i--) - drawer.draw(tops[i], 0, 0, z++); + drawer.Draw(tops[i], 0, 0, z++); return drawer; } Modified: branches/FreeTrainSDL/core/Contributions/Train/TrainContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/TrainContribution.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Contributions/Train/TrainContribution.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -127,12 +127,12 @@ // / for (int x = -10; x < 0; x++) { - pd.draw(RailPattern.get(Direction.WEST, Direction.EAST), x, 0); + pd.Draw(RailPattern.get(Direction.WEST, Direction.EAST), x, 0); } - pd.draw(RailPattern.get(Direction.WEST, Direction.SOUTHEAST), 0, 0); + pd.Draw(RailPattern.get(Direction.WEST, Direction.SOUTHEAST), 0, 0); for (int x = 1; x <= 10; x++) { - pd.draw(RailPattern.get(Direction.NORTHWEST, Direction.SOUTHEAST), x, x); + pd.Draw(RailPattern.get(Direction.NORTHWEST, Direction.SOUTHEAST), x, x); } TrainCarContribution[] cars = Create(trainlength); @@ -151,7 +151,7 @@ int[] angle = new int[] { 12, 12, 13, 14, 14, 14, 14, 14 }; int[] offset = new int[] { 0, 0, 0, 0, 4, +2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - using (DrawContext dc = new DrawContext(pd.surface)) + using (DrawContext dc = new DrawContext(pd.Surface)) { for (int i = 7; i >= 0; i--) { @@ -160,8 +160,8 @@ continue; // no car } - Point pt = pd.getPoint(pos[i * 2], pos[i * 2 + 1]); - cars[i].Draw(pd.surface, + Point pt = pd.GetPoint(pos[i * 2], pos[i * 2 + 1]); + cars[i].Draw(pd.Surface, new Point(pt.X + offset[i * 2], pt.Y + offset[i * 2 + 1] - 9), angle[i]); } } Modified: branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -112,7 +112,7 @@ /// デザイナ サポートに必要なメソッドです。このメソッドの内容を /// コード エディタで変更しないでください。 /// </summary> - protected virtual void InitializeComponent() + private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.buttonRemove = new System.Windows.Forms.RadioButton(); Modified: branches/FreeTrainSDL/core/Controllers/Land/LandController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandController.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Controllers/Land/LandController.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -168,7 +168,7 @@ using (PreviewDrawer drawer = builder.CreatePreview(preview.Size)) { if (previewBitmap != null) previewBitmap.Dispose(); - preview.Image = previewBitmap = drawer.createBitmap(); + preview.Image = previewBitmap = drawer.CreateBitmap(); } //currentController = builder.createBuilder(new ControllerSiteImpl(this)); Modified: branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -64,9 +64,9 @@ { for (int x = 0; x < 3; x++) for (int y = 0; y < 3; y++) - drawer.draw(LandPropertyVoxel.sprite, x, y); + drawer.Draw(LandPropertyVoxel.sprite, x, y); if (preview.Image != null) preview.Image.Dispose(); - preview.Image = drawer.createBitmap(); + preview.Image = drawer.CreateBitmap(); } } /// <summary> @@ -233,11 +233,11 @@ for (int y = loc1.y; y <= loc2.y; y++) { Voxel v = WorldDefinition.World[x, y, z]; - if (v != null && !v.entity.isOwned && v.entity.isSilentlyReclaimable) + if (v != null && !v.Entity.isOwned && v.Entity.isSilentlyReclaimable) { // remove the old structure if possible - AccountGenre.Subsidiaries.Spend(v.entity.entityValue); - v.entity.remove(); + AccountGenre.Subsidiaries.Spend(v.Entity.EntityValue); + v.Entity.remove(); } v = WorldDefinition.World[x, y, z]; @@ -267,11 +267,11 @@ for (int y = loc1.y; y <= loc2.y; y++) { Voxel v = WorldDefinition.World[x, y, z]; - if (v != null && !v.entity.isOwned && v.entity.isSilentlyReclaimable) + if (v != null && !v.Entity.isOwned && v.Entity.isSilentlyReclaimable) { // cost for removing this structure - if (s.add(v.entity)) - r += v.entity.entityValue; + if (s.add(v.Entity)) + r += v.Entity.EntityValue; } v = WorldDefinition.World[x, y, z]; @@ -298,7 +298,7 @@ LandPropertyVoxel v = WorldDefinition.World[x, y, z] as LandPropertyVoxel; if (v != null) { - AccountGenre.Subsidiaries.Earn(v.landPrice); + AccountGenre.Subsidiaries.Earn(v.LandPrice); v.remove(); } } @@ -321,7 +321,7 @@ { LandPropertyVoxel v = WorldDefinition.World[x, y, z] as LandPropertyVoxel; if (v != null) - r += v.landPrice; + r += v.LandPrice; } } return r; Modified: branches/FreeTrainSDL/core/Controllers/PointSelectorController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/PointSelectorController.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Controllers/PointSelectorController.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -62,7 +62,7 @@ /// <summary> /// Called when the player selects a location. /// </summary> - protected abstract void onLocationSelected(Location loc); + protected abstract void OnLocationSelected(Location loc); @@ -141,7 +141,7 @@ /// <param name="ab"></param> public void OnClick(MapViewWindow source, Location loc, Point ab) { - onLocationSelected(loc); + OnLocationSelected(loc); } /// <summary> Modified: branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -490,11 +490,11 @@ else { drawer = new PreviewDrawer(stationPicture.ClientSize, selectedStation.Size); - drawer.drawCenter(selectedStation.Sprites); + drawer.DrawCenter(selectedStation.Sprites); } if (stationPreviewBitmap != null) stationPreviewBitmap.Dispose(); - stationPicture.Image = stationPreviewBitmap = drawer.createBitmap(); + stationPicture.Image = stationPreviewBitmap = drawer.CreateBitmap(); drawer.Dispose(); Modified: branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -69,45 +69,45 @@ // direction N using (drawer = new PreviewDrawer(pictureN.ClientSize, new Size(2, 4), 0)) { - drawer.draw(RailPattern.getSlope(Direction.NORTH, 3), 1, -1); - drawer.draw(RailPattern.getSlope(Direction.NORTH, 2), 1, 0); - drawer.draw(RailPattern.getSlope(Direction.NORTH, 1), 0, 2); - drawer.draw(RailPattern.getSlope(Direction.NORTH, 0), 0, 3); + drawer.Draw(RailPattern.getSlope(Direction.NORTH, 3), 1, -1); + drawer.Draw(RailPattern.getSlope(Direction.NORTH, 2), 1, 0); + drawer.Draw(RailPattern.getSlope(Direction.NORTH, 1), 0, 2); + drawer.Draw(RailPattern.getSlope(Direction.NORTH, 0), 0, 3); if (pictureN.Image != null) pictureN.Image.Dispose(); - pictureN.Image = drawer.createBitmap(); + pictureN.Image = drawer.CreateBitmap(); } // direction S using (drawer = new PreviewDrawer(pictureS.ClientSize, new Size(2, 4), 0)) { - drawer.draw(RailPattern.getSlope(Direction.SOUTH, 0), 0, 0); - drawer.draw(RailPattern.getSlope(Direction.SOUTH, 1), 0, 1); - drawer.draw(RailPattern.getSlope(Direction.SOUTH, 2), 1, 1); - drawer.draw(RailPattern.getSlope(Direction.SOUTH, 3), 1, 2); + drawer.Draw(RailPattern.getSlope(Direction.SOUTH, 0), 0, 0); + drawer.Draw(RailPattern.getSlope(Direction.SOUTH, 1), 0, 1); + drawer.Draw(RailPattern.getSlope(Direction.SOUTH, 2), 1, 1); + drawer.Draw(RailPattern.getSlope(Direction.SOUTH, 3), 1, 2); if (pictureS.Image != null) pictureS.Image.Dispose(); - pictureS.Image = drawer.createBitmap(); + pictureS.Image = drawer.CreateBitmap(); } // direction E using (drawer = new PreviewDrawer(pictureE.ClientSize, new Size(4, 2), 0)) { - drawer.draw(RailPattern.getSlope(Direction.EAST, 3), 3, 0); - drawer.draw(RailPattern.getSlope(Direction.EAST, 2), 2, 0); - drawer.draw(RailPattern.getSlope(Direction.EAST, 1), 0, 1); - drawer.draw(RailPattern.getSlope(Direction.EAST, 0), -1, 1); + drawer.Draw(RailPattern.getSlope(Direction.EAST, 3), 3, 0); + drawer.Draw(RailPattern.getSlope(Direction.EAST, 2), 2, 0); + drawer.Draw(RailPattern.getSlope(Direction.EAST, 1), 0, 1); + drawer.Draw(RailPattern.getSlope(Direction.EAST, 0), -1, 1); if (pictureE.Image != null) pictureE.Image.Dispose(); - pictureE.Image = drawer.createBitmap(); + pictureE.Image = drawer.CreateBitmap(); } // direction W using (drawer = new PreviewDrawer(pictureW.ClientSize, new Size(4, 2), 0)) { - drawer.draw(RailPattern.getSlope(Direction.WEST, 3), 1, 0); - drawer.draw(RailPattern.getSlope(Direction.WEST, 2), 2, 0); - drawer.draw(RailPattern.getSlope(Direction.WEST, 1), 2, 1); - drawer.draw(RailPattern.getSlope(Direction.WEST, 0), 3, 1); + drawer.Draw(RailPattern.getSlope(Direction.WEST, 3), 1, 0); + drawer.Draw(RailPattern.getSlope(Direction.WEST, 2), 2, 0); + drawer.Draw(RailPattern.getSlope(Direction.WEST, 1), 2, 1); + drawer.Draw(RailPattern.getSlope(Direction.WEST, 0), 3, 1); if (pictureW.Image != null) pictureW.Image.Dispose(); - pictureW.Image = drawer.createBitmap(); + pictureW.Image = drawer.CreateBitmap(); } } /// <summary> Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -49,8 +49,8 @@ buttonImages.TransparentColor = bmp.GetPixel(0, 0); buttonImages.Images.AddStrip(bmp); - tbDay.Pushed = (WorldDefinition.World.ViewOptions.nightSpriteMode == NightSpriteMode.AlwaysDay); - tbNight.Pushed = (WorldDefinition.World.ViewOptions.nightSpriteMode == NightSpriteMode.AlwaysNight); + tbDay.Pushed = (WorldDefinition.World.ViewOptions.NightSpriteMode == NightSpriteMode.AlwaysDay); + tbNight.Pushed = (WorldDefinition.World.ViewOptions.NightSpriteMode == NightSpriteMode.AlwaysNight); // organize trains into a tree IDictionary types = new SortedList(); @@ -160,7 +160,7 @@ //if (length.Value > selectedTrain.maxLength) length.Value = selectedTrain.maxLength; using (PreviewDrawer pd = selectedTrain.CreatePreview(preview.ClientSize, (int)length.Value)) { - preview.Image = pd.createBitmap(); + preview.Image = pd.CreateBitmap(); } if (count.Value == 0) @@ -197,7 +197,7 @@ using (PreviewDrawer pd = selectedTrain.CreatePreview(preview.ClientSize, (int)length.Value)) { - preview.Image = pd.createBitmap(); + preview.Image = pd.CreateBitmap(); } return; @@ -234,9 +234,9 @@ if (e.Button == tb) { if (tb.Pushed) - WorldDefinition.World.ViewOptions.nightSpriteMode = (NightSpriteMode)tb.Tag; + WorldDefinition.World.ViewOptions.NightSpriteMode = (NightSpriteMode)tb.Tag; else - WorldDefinition.World.ViewOptions.nightSpriteMode = NightSpriteMode.AlignClock; + WorldDefinition.World.ViewOptions.NightSpriteMode = NightSpriteMode.AlignClock; } else { Modified: branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -81,7 +81,7 @@ /// </summary> protected void InitializeComponent() { - base.InitializeComponent(); + //base.InitializeComponent(); this.SuspendLayout(); this.buttonRemove.Location = new System.Drawing.Point(194, 132); this.buttonPlace.Location = new System.Drawing.Point(136, 132); Modified: branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -91,7 +91,7 @@ { pt.X -= Offset.X; pt.Y -= Offset.Y; - int idx = (WorldDefinition.World.ViewOptions.useNightView) ? 1 : 0; + int idx = (WorldDefinition.World.ViewOptions.UseNightView) ? 1 : 0; surface.BlitColorTransform(pt, Picture.surface, Origin, Size, srcColors[idx], dstColors[idx], false); } Modified: branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -67,7 +67,7 @@ pt.X -= Offset.X; pt.Y -= Offset.Y; - int idx = (WorldDefinition.World.ViewOptions.useNightView) ? 1 : 0; + int idx = (WorldDefinition.World.ViewOptions.UseNightView) ? 1 : 0; surface.BlitHueTransform(pt, Picture.surface, Origin, Size, RedTarget, GreenTarget, BlueTarget); Modified: branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -229,7 +229,7 @@ WorldDefinition world = WorldDefinition.World; // reload the surface Clock c = world.Clock; - loaders[(int)c.season, (world.ViewOptions.useNightView) ? 1 : 0].Load(ref _surface); + loaders[(int)c.season, (world.ViewOptions.UseNightView) ? 1 : 0].Load(ref _surface); //_surface.sourceColorKey = key; dirty = false; } Modified: branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -37,9 +37,17 @@ /// <summary> /// /// </summary> - public readonly Surface surface; + private readonly Surface surface; /// <summary> + /// + /// </summary> + public Surface Surface + { + get { return surface; } + } + + /// <summary> /// pixelSize of the canvas. /// </summary> private readonly Size pixelSize; @@ -48,6 +56,7 @@ /// The point in the surface of (X,Y)=(0,0). /// </summary> private readonly Point ptOrigin = new Point(); + /// <summary> /// /// </summary> @@ -77,6 +86,7 @@ Clear(); } + /// <summary> /// /// </summary> @@ -98,16 +108,18 @@ empty.Draw(surface, new Point(x, y)); } } + /// <summary> /// /// </summary> /// <param name="offsetX"></param> /// <param name="offsetY"></param> /// <returns></returns> - public Point getPoint(int offsetX, int offsetY) + public Point GetPoint(int offsetX, int offsetY) { - return getPoint(offsetX, offsetY, 0); + return GetPoint(offsetX, offsetY, 0); } + /// <summary> /// /// </summary> @@ -115,7 +127,7 @@ /// <param name="offsetY"></param> /// <param name="offsetZ"></param> /// <returns></returns> - public Point getPoint(int offsetX, int offsetY, int offsetZ) + public Point GetPoint(int offsetX, int offsetY, int offsetZ) { Point o = ptOrigin; o.X += (offsetX + offsetY) * 16; @@ -123,35 +135,38 @@ o.Y -= offsetZ * 16; return o; } + /// <summary> /// /// </summary> /// <param name="sprite"></param> /// <param name="offsetX"></param> /// <param name="offsetY"></param> - public void draw(ISprite sprite, int offsetX, int offsetY) + public void Draw(ISprite sprite, int offsetX, int offsetY) { - sprite.Draw(surface, getPoint(offsetX, offsetY)); + sprite.Draw(surface, GetPoint(offsetX, offsetY)); } /// <summary> /// /// </summary> /// <param name="sprites"></param> - public void drawCenter(ISprite[,] sprites) + public void DrawCenter(ISprite[,] sprites) { - draw(sprites, 0, 0); + Draw(sprites, 0, 0); } + /// <summary> /// /// </summary> /// <param name="sprites"></param> /// <param name="offsetX"></param> /// <param name="offsetY"></param> - public void draw(ISprite[,] sprites, int offsetX, int offsetY) + public void Draw(ISprite[,] sprites, int offsetX, int offsetY) { - draw(sprites, offsetX, offsetY, 0); + Draw(sprites, offsetX, offsetY, 0); } + /// <summary> /// /// </summary> @@ -159,12 +174,12 @@ /// <param name="offsetX"></param> /// <param name="offsetY"></param> /// <param name="offsetZ"></param> - public void draw(ISprite[,] sprites, int offsetX, int offsetY, int offsetZ) + public void Draw(ISprite[,] sprites, int offsetX, int offsetY, int offsetZ) { int X = sprites.GetLength(0); int Y = sprites.GetLength(1); - Point o = getPoint(offsetX, offsetY, offsetZ); + Point o = GetPoint(offsetX, offsetY, offsetZ); for (int y = 0; y < Y; y++) { @@ -184,10 +199,11 @@ /// </summary> /// <param name="sprites"></param> [CLSCompliant(false)] - public void drawCenter(ISprite[, ,] sprites) + public void DrawCenter(ISprite[, ,] sprites) { - draw(sprites, 0, 0); + Draw(sprites, 0, 0); } + /// <summary> /// /// </summary> @@ -195,10 +211,11 @@ /// <param name="offsetX"></param> /// <param name="offsetY"></param> [CLSCompliant(false)] - public void draw(ISprite[, ,] sprites, int offsetX, int offsetY) + public void Draw(ISprite[, ,] sprites, int offsetX, int offsetY) { - draw(sprites, offsetX, offsetY, 0); + Draw(sprites, offsetX, offsetY, 0); } + /// <summary> /// /// </summary> @@ -207,13 +224,13 @@ /// <param name="offsetY"></param> /// <param name="offsetZ"></param> [CLSCompliant(false)] - public void draw(ISprite[, ,] sprites, int offsetX, int offsetY, int offsetZ) + public void Draw(ISprite[, ,] sprites, int offsetX, int offsetY, int offsetZ) { int X = sprites.GetLength(0); int Y = sprites.GetLength(1); int Z = sprites.GetLength(2); - Point o = getPoint(offsetX, offsetY, offsetZ); + Point o = GetPoint(offsetX, offsetY, offsetZ); for (int z = 0; z < Z; z++) { @@ -254,7 +271,7 @@ /// /// The caller needs to dispose the bitmap. /// </summary> - public Bitmap createBitmap() + public Bitmap CreateBitmap() { return surface.Bitmap; } Modified: branches/FreeTrainSDL/core/Framework/Graphics/Surface.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/Surface.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Graphics/Surface.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -1010,7 +1010,6 @@ ///// </summary> ///// <param name="colorValue"></param> ///// <returns></returns> - //[CLSCompliant(false)] //public System.Drawing.Color GetColor(int colorValue) //{ // byte r, g, b, a; Modified: branches/FreeTrainSDL/core/Framework/Plugin/DynamicContributionFactory.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/DynamicContributionFactory.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Plugin/DynamicContributionFactory.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -38,6 +38,7 @@ { this.baseType = baseType; } + /// <summary> /// /// </summary> @@ -49,6 +50,7 @@ private readonly Type baseType; + /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/Framework/Plugin/FixedClassContributionFactory.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/FixedClassContributionFactory.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Plugin/FixedClassContributionFactory.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -36,6 +36,7 @@ { this.concreteType = concreteType; } + /// <summary> /// Constructor for the use in plugin.xml /// </summary> @@ -45,6 +46,7 @@ (XmlElement)XmlUtil.SelectSingleNode(e, "implementation"))) { } private readonly Type concreteType; + /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -95,6 +95,7 @@ return a.GetType(typeName, true); } + /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/Framework/Plugin/XmlUtil.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/XmlUtil.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Framework/Plugin/XmlUtil.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -36,12 +36,12 @@ /// Performs a node selection and throws an exception if it's not found. /// </summary> /// <exception cref="XmlException"></exception> - public static XmlNode SelectSingleNode(XmlNode node, string xpath) + public static XmlNode SelectSingleNode(XmlNode node, string xPath) { - XmlNode n = node.SelectSingleNode(xpath); + XmlNode n = node.SelectSingleNode(xPath); if (n == null) { - throw new XmlException("unable to find " + xpath, null); + throw new XmlException("unable to find " + xPath, null); } return n; } @@ -53,6 +53,7 @@ { return new Uri(new Uri(context.BaseURI), relative); } + /// <summary> /// /// </summary> @@ -70,6 +71,7 @@ throw new FormatException("Unable to parse " + text + " as point", e); } } + /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/Views/GlobalViewOptions.cs =================================================================== --- branches/FreeTrainSDL/core/Views/GlobalViewOptions.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Views/GlobalViewOptions.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -65,16 +65,13 @@ /// </summary> [NonSerialized] public OptionChangedHandler OnViewOptionChanged; + + NightSpriteMode _nightSpriteMode = NightSpriteMode.AlignClock; + /// <summary> /// - /// /// </summary> - [CLSCompliant(false)] - protected NightSpriteMode _nightSpriteMode = NightSpriteMode.AlignClock; - /// <summary> - /// - /// </summary> - public NightSpriteMode nightSpriteMode + public NightSpriteMode NightSpriteMode { get { return _nightSpriteMode; } set @@ -93,14 +90,14 @@ /// <summary> /// /// </summary> - public bool useNightView + public bool UseNightView { get { - if (nightSpriteMode == NightSpriteMode.AlignClock) + if (NightSpriteMode == NightSpriteMode.AlignClock) return WorldDefinition.World.Clock.dayOrNight == DayNight.Night; else - return nightSpriteMode == NightSpriteMode.AlwaysNight; + return NightSpriteMode == NightSpriteMode.AlwaysNight; } } } Modified: branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs =================================================================== --- branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -365,9 +365,9 @@ if (z == 0) hvb = null; else hvb = world.voxelHVD(h, v, z - 1) as IHoleVoxel; - if (hva != null && !hva.drawGround(false)) + if (hva != null && !hva.DrawGround(false)) return false; - if (hvb != null && !hvb.drawGround(true)) + if (hvb != null && !hvb.DrawGround(true)) return false; return true; @@ -388,7 +388,7 @@ bool noHeightCut = (HeightCutHeight == world.Size.z - 1); Color waterSurfaceColor = waterSurfaceDayColor; - if (world.ViewOptions.useNightView) + if (world.ViewOptions.UseNightView) waterSurfaceColor = ColorMap.getNightColor(waterSurfaceColor); rectAB.Inflate(20, 20); @@ -435,7 +435,7 @@ Point pt = fromHVZToClient(h, v, z); // draw the surface anyway. - if (voxel == null || voxel.transparent) + if (voxel == null || voxel.Transparent) { if (z == groundLevel) { @@ -488,7 +488,7 @@ if (voxel != null) { //DateTime start = DateTime.Now; - voxel.drawVoxel(drawContext, pt, noHeightCut ? -1 : (Z - z + 1)); + voxel.DrawVoxel(drawContext, pt, noHeightCut ? -1 : (Z - z + 1)); //Debug.WriteLine("voxel took: " + (DateTime.Now - start).TotalMilliseconds + "ms"); } if (overlay != null) Modified: branches/FreeTrainSDL/core/World/Accounting/AccountSummaryWindow.cs =================================================================== --- branches/FreeTrainSDL/core/World/Accounting/AccountSummaryWindow.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Accounting/AccountSummaryWindow.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -503,9 +503,18 @@ /// List of displayed genre ids. /// Public only for XmlSerializer. /// </summary> + /// + string[] genre; + + /// <summary> + /// + /// </summary> [XmlElement("genre")] - [CLSCompliant(false)] - public string[] _genre; + public string[] Genre + { + get { return genre; } + set { genre = value; } + } /// <summary> /// /// </summary> @@ -516,9 +525,9 @@ { try { - AccountGenre[] r = new AccountGenre[_genre.Length]; + AccountGenre[] r = new AccountGenre[genre.Length]; for (int i = 0; i < r.Length; i++) - r[i] = (AccountGenre)PluginManager.GetContribution(_genre[i]); + r[i] = (AccountGenre)PluginManager.GetContribution(genre[i]); return r; } catch (Exception e) @@ -534,9 +543,9 @@ } set { - _genre = new string[value.Length]; + genre = new string[value.Length]; for (int i = 0; i < value.Length; i++) - _genre[i] = value[i].Id; + genre[i] = value[i].Id; save(); } } Modified: branches/FreeTrainSDL/core/World/Cube.cs =================================================================== --- branches/FreeTrainSDL/core/World/Cube.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Cube.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -242,7 +242,7 @@ for (int z = corner.z; z < mz; z++) { Voxel v = WorldDefinition.World[x, y, z]; - if (v != null) r.add(v.entity); + if (v != null) r.add(v.Entity); } } } Modified: branches/FreeTrainSDL/core/World/Development/DevelopConfigurePlugin.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/DevelopConfigurePlugin.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Development/DevelopConfigurePlugin.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -41,7 +41,7 @@ /// /// </summary> /// <param name="containerMenu"></param> - public override void mergeMenu(MainMenu containerMenu) + public override void MergeMenu(MainMenu containerMenu) { MenuItem item = new MenuItem(); item.Text = "Adjust Growth Parameters"; Modified: branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -391,7 +391,7 @@ Cube tmp = new Cube(scaning, vhbc.Size, h); int cost = 0; foreach (IEntity e in tmp.getEntities()) - cost += e.entityValue; + cost += e.EntityValue; while (price < cost && h < h2) { if (price < cost) @@ -414,7 +414,7 @@ { Location loc = target.baseLocation; WorldDefinition w = WorldDefinition.World; - int amp = F_PopAmpBase + (int)(Math.Pow(w[loc].landPrice, F_PopAmpPower) * F_PopAmpScale); + int amp = F_PopAmpBase + (int)(Math.Pow(w[loc].LandPrice, F_PopAmpPower) * F_PopAmpScale); // then randomly pick nearby voxel loc.x = Rand(loc.x, amp); loc.y = Rand(loc.y, amp); @@ -425,7 +425,7 @@ Voxel v = w[loc]; if (v != null) { - if (!IsReplaceable(v.entity, v.landPrice)) + if (!IsReplaceable(v.Entity, v.LandPrice)) continue; } return loc; @@ -451,8 +451,8 @@ } else if (e is LandVoxel) { - Debug.WriteLine("LandPrice:" + e.entityValue + " (>" + comPrice); - if (e.entityValue > comPrice) + Debug.WriteLine("LandPrice:" + e.EntityValue + " (>" + comPrice); + if (e.EntityValue > comPrice) return false; } return true; Modified: branches/FreeTrainSDL/core/World/Development/LandValue.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/LandValue.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Development/LandValue.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -214,8 +214,8 @@ if (roadFound != null) { - if (roadFound.style.Type >= MajorRoadType.street) - if (roadFound.style.Sidewalk == SidewalkType.pavement) + if (roadFound.Style.Type >= MajorRoadType.street) + if (roadFound.Style.Sidewalk == SidewalkType.pavement) rho[h, v] = RHO_ROAD; else rho[h, v] = (RHO_ROAD + RHO_BARE_LAND) / 2; Modified: branches/FreeTrainSDL/core/World/Development/LandValueInspectorPlugin.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/LandValueInspectorPlugin.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Development/LandValueInspectorPlugin.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -40,7 +40,7 @@ /// /// </summary> /// <param name="containerMenu"></param> - public override void mergeMenu(MainMenu containerMenu) + public override void MergeMenu(MainMenu containerMenu) { MenuItem item = new MenuItem(); item.Text = "Inspect Land Value"; Modified: branches/FreeTrainSDL/core/World/Development/ULV.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/ULV.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Development/ULV.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -90,14 +90,14 @@ Voxel v = world[x, y, z]; if (v != null) { - IEntity e = v.entity; + IEntity e = v.Entity; if (e.isOwned) // cannot reclaim this voxel. return null; if (!s.contains(e)) { // new entity s.add(e); - entityValue += e.entityValue; + entityValue += e.EntityValue; } } Modified: branches/FreeTrainSDL/core/World/EmptyVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/EmptyVoxel.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/EmptyVoxel.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -35,7 +35,7 @@ /// <summary> /// /// </summary> - public override bool transparent { get { return true; } } + public override bool Transparent { get { return true; } } /// <summary> /// /// </summary> @@ -60,13 +60,13 @@ /// <param name="surface"></param> /// <param name="pt"></param> /// <param name="heightCutDiff"></param> - public override void draw(DrawContext surface, Point pt, int heightCutDiff) + public override void Draw(DrawContext surface, Point pt, int heightCutDiff) { // draw nothing } /// <summary> /// /// </summary> - public override IEntity entity { get { return _entity; } } + public override IEntity Entity { get { return _entity; } } } } Modified: branches/FreeTrainSDL/core/World/Entity.cs =================================================================== --- branches/FreeTrainSDL/core/World/Entity.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Entity.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -47,7 +47,7 @@ /// <summary> /// The monetary value of the entity. /// </summary> - int entityValue { get; } + int EntityValue { get; } // TODO: not sure what this means. // this is certainly not a cash value when you buy/sell the property @@ -104,6 +104,6 @@ /// /// <returns>null if the given aspect is not supported.</returns> /// </summary> - object queryInterface( Type aspect ); + object QueryInterface( Type aspect ); } } Modified: branches/FreeTrainSDL/core/World/Land/LandPropertyVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/Land/LandPropertyVoxel.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Land/LandPropertyVoxel.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -42,14 +42,14 @@ /// <summary> /// /// </summary> - public override IEntity entity { get { return this; } } + public override IEntity Entity { get { return this; } } /// <summary> /// /// </summary> /// <param name="surface"></param> /// <param name="pt"></param> /// <param name="heightCutDiff"></param> - public override void draw(DrawContext surface, Point pt, int heightCutDiff) + public override void Draw(DrawContext surface, Point pt, int heightCutDiff) { sprite.Draw(surface.Surface, pt); } @@ -66,7 +66,7 @@ /// <summary> /// /// </summary> - public int entityValue { get { return 0; } } + public int EntityValue { get { return 0; } } /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/World/Land/LandVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/Land/LandVoxel.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Land/LandVoxel.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -43,11 +43,11 @@ /// <summary> /// /// </summary> - public override bool transparent { get { return true; } } + public override bool Transparent { get { return true; } } /// <summary> /// /// </summary> - public override IEntity entity { get { return this; } } + public override IEntity Entity { get { return this; } } #region Entity implementation /// <summary> @@ -65,7 +65,7 @@ /// <summary> /// /// </summary> - public abstract int entityValue { get; } + public abstract int EntityValue { get; } /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs 2008-04-09 17:34:47 UTC (rev 358) +++ branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs 2008-04-09 20:31:01 UTC (rev 359) @@ -49,15 +49,15 @@ /// <summary> /// /// </summary> - public override void onRemoved() + public override void OnRemoved() { if (stationListener != null) - stationListener.onRemoved(); + stationListener.OnRemoved(); } /// <summary> /// /// </summary> - public override int entityValue { get { return contrib.Price; } } + public override int EntityValue { get { return contrib.Price; } } private readonly StationListenerImpl stationListener; @@ -68,7 +68,7 @@ /// <param name="surface"></param> /// <param name="pt"></param> /// <param name="heightCutDiff"></param> - public override void draw(DrawContext surface, Point pt, int heightCutDiff) + public override void Draw(DrawContext surface, Point pt, int heightCutDiff) { // always draw it regardless of the height cut contrib.sprite.Draw(surface.Surface, pt); @@ -78,13 +78,13 @@ /// </summary> /// <param name="aspect"></param> /// <returns></returns> - public override object queryInterface(Type aspect) + public override object QueryInterface(Type aspect) { // if type.population is null, we don't have any population if (aspect == typeof(IStationListener)) return stationListener; else - return base.queryInterface(aspect); + return base.QueryInterface(aspect); } } } Modified: branches/FreeTrainSDL/core/World/RRCrossing.cs =================================================================== --- branches/FreeTrainSDL/core/World/RRCrossing.cs 2008-04-09 17:3... [truncated message content] |
From: <je...@us...> - 2008-04-09 17:34:41
|
Revision: 358 http://freetrain.svn.sourceforge.net/freetrain/?rev=358&view=rev Author: jendave Date: 2008-04-09 10:34:47 -0700 (Wed, 09 Apr 2008) Log Message: ----------- forgot a few classes that were split out into separate files Added Paths: ----------- branches/FreeTrainSDL/core/Framework/Plugin/IPluginErrorHandler.cs branches/FreeTrainSDL/core/Framework/Plugin/SilentPluginErrorHandler.cs Added: branches/FreeTrainSDL/core/Framework/Plugin/IPluginErrorHandler.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/IPluginErrorHandler.cs (rev 0) +++ branches/FreeTrainSDL/core/Framework/Plugin/IPluginErrorHandler.cs 2008-04-09 17:34:47 UTC (rev 358) @@ -0,0 +1,86 @@ +#region LICENSE +/* + * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#endregion LICENSE + +using System; +using System.Collections; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Windows.Forms; +using FreeTrain.Util; +using FreeTrain.Contributions.Sound; +using FreeTrain.Contributions.Others; +using FreeTrain.Contributions.Rail; +using FreeTrain.Contributions.Land; +using FreeTrain.Contributions.Train; +using FreeTrain.Contributions.Common; +using FreeTrain.Contributions.Structs; +using FreeTrain.Contributions.Road; + +namespace FreeTrain.Framework.Plugin +{ + /// <summary> + /// + /// </summary> + public interface IPluginErrorHandler + { + /// <summary> + /// + /// </summary> + /// <param name="p_1st"></param> + /// <param name="p_2nd"></param> + /// <param name="e"></param> + /// <returns></returns> + bool OnNameDuplicated(PluginDefinition p_1st, PluginDefinition p_2nd, Exception e); + + /// <summary> + /// + /// </summary> + /// <param name="p"></param> + /// <param name="e"></param> + /// <returns></returns> + bool OnPluginLoadError(PluginDefinition p, Exception e); + + /// <summary> + /// + /// </summary> + /// <param name="c"></param> + /// <param name="e"></param> + /// <returns></returns> + bool OnContributionInitError(Contribution c, Exception e); + + /// <summary> + /// + /// </summary> + /// <param name="c_1st"></param> + /// <param name="c_2nd"></param> + /// <param name="e"></param> + /// <returns></returns> + bool OnContribIDDuplicated(Contribution c_1st, Contribution c_2nd, Exception e); + + /// <summary> + /// + /// </summary> + /// <param name="errorPlugins"></param> + /// <param name="totalErrorCount"></param> + /// <returns></returns> + bool OnFinal(IDictionary errorPlugins, int totalErrorCount); + } +} Property changes on: branches/FreeTrainSDL/core/Framework/Plugin/IPluginErrorHandler.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Added: branches/FreeTrainSDL/core/Framework/Plugin/SilentPluginErrorHandler.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/SilentPluginErrorHandler.cs (rev 0) +++ branches/FreeTrainSDL/core/Framework/Plugin/SilentPluginErrorHandler.cs 2008-04-09 17:34:47 UTC (rev 358) @@ -0,0 +1,103 @@ +#region LICENSE +/* + * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#endregion LICENSE + +using System; +using System.Collections; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Windows.Forms; +using FreeTrain.Util; +using FreeTrain.Contributions.Sound; +using FreeTrain.Contributions.Others; +using FreeTrain.Contributions.Rail; +using FreeTrain.Contributions.Land; +using FreeTrain.Contributions.Train; +using FreeTrain.Contributions.Common; +using FreeTrain.Contributions.Structs; +using FreeTrain.Contributions.Road; + +namespace FreeTrain.Framework.Plugin +{ + /// <summary> + /// + /// </summary> + public class SilentPluginErrorHandler : IPluginErrorHandler + { + #region PluginErrorHandler o + /// <summary> + /// + /// </summary> + /// <param name="p_1st"></param> + /// <param name="p_2nd"></param> + /// <param name="e"></param> + /// <returns></returns> + public bool OnNameDuplicated(PluginDefinition p_1st, PluginDefinition p_2nd, Exception e) + { + return false; + } + + /// <summary> + /// + /// </summary> + /// <param name="p"></param> + /// <param name="e"></param> + /// <returns></returns> + public bool OnPluginLoadError(PluginDefinition p, Exception e) + { + return false; + } + + /// <summary> + /// + /// </summary> + /// <param name="c"></param> + /// <param name="e"></param> + /// <returns></returns> + public bool OnContributionInitError(Contribution c, Exception e) + { + return false; + } + + /// <summary> + /// + /// </summary> + /// <param name="c_1st"></param> + /// <param name="c_2nd"></param> + /// <param name="e"></param> + /// <returns></returns> + public bool OnContribIDDuplicated(Contribution c_1st, Contribution c_2nd, Exception e) + { + return false; + } + + /// <summary> + /// + /// </summary> + /// <param name="errorPlugins"></param> + /// <param name="totalErrorCount"></param> + /// <returns></returns> + public bool OnFinal(IDictionary errorPlugins, int totalErrorCount) + { + return true; + } + #endregion + } +} Property changes on: branches/FreeTrainSDL/core/Framework/Plugin/SilentPluginErrorHandler.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-09 17:33:12
|
Revision: 357 http://freetrain.svn.sourceforge.net/freetrain/?rev=357&view=rev Author: jendave Date: 2008-04-09 10:32:58 -0700 (Wed, 09 Apr 2008) Log Message: ----------- Made the pluginmanager a static class Modified Paths: -------------- branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs branches/FreeTrainSDL/core/Contributions/Rail/RailStationaryContribution.cs branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs branches/FreeTrainSDL/core/Contributions/Structs/CommercialStructureContribution.cs branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs branches/FreeTrainSDL/core/Controllers/Land/BulldozeController.cs branches/FreeTrainSDL/core/Controllers/Land/LandController.cs branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs branches/FreeTrainSDL/core/Controllers/Rail/StationaryStructPlacementController.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs branches/FreeTrainSDL/core/Controllers/Structs/CommercialStructPlacementController.cs branches/FreeTrainSDL/core/Controllers/Structs/VarHeightBuildingController.cs branches/FreeTrainSDL/core/Framework/BGMManager.cs branches/FreeTrainSDL/core/Framework/BGMPlaylist.cs branches/FreeTrainSDL/core/Framework/Core.cs branches/FreeTrainSDL/core/Framework/ExternToolsHelper.cs branches/FreeTrainSDL/core/Framework/Graphics/ColorLibrary.cs branches/FreeTrainSDL/core/Framework/Graphics/SpriteFactory.cs branches/FreeTrainSDL/core/Framework/NewWorldDialog.cs branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginDefinition.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginListDialog.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginSerializationBinder.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs branches/FreeTrainSDL/core/Framework/ResourceUtil.cs branches/FreeTrainSDL/core/FreeTrain.csproj branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs branches/FreeTrainSDL/core/World/Accounting/AccountSummaryWindow.cs branches/FreeTrainSDL/core/World/Accounting/GenreSelectorDialog.cs branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs branches/FreeTrainSDL/core/World/WorldDefinition.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs branches/FreeTrainSDL/plugins/Chiname.Generic/StructCategory.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HalfVoxelContribution.cs Modified: branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -308,7 +308,7 @@ /// <returns></returns> public object GetRealObject(StreamingContext context) { - return ((StructureContribution)PluginManager.theInstance.getContribution(id)).Population; + return ((StructureContribution)PluginManager.GetContribution(id)).Population; } } } Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -70,7 +70,7 @@ /// <returns></returns> protected override StructureGroup GetGroup(string name) { - return (StructureGroup)PluginManager.theInstance.landBuilderGroup[name]; + return (StructureGroup)PluginManager.LandBuilderGroup[name]; } /// <summary> Modified: branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -59,7 +59,7 @@ private StaticLandBuilder getLand() { return (StaticLandBuilder) - PluginManager.theInstance.getContribution(lands[random.Next(lands.Length)]); + PluginManager.GetContribution(lands[random.Next(lands.Length)]); } /// <summary> Modified: branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -72,7 +72,7 @@ get { return (DepartureBellContribution[]) - PluginManager.theInstance.listContributions(typeof(DepartureBellContribution)); + PluginManager.ListContributions(typeof(DepartureBellContribution)); } } @@ -81,8 +81,8 @@ { get { - return (DepartureBellContribution)PluginManager.theInstance - .getContribution("{9B087AEA-6E9C-48cd-A1F3-1B774500752E}"); + return (DepartureBellContribution)PluginManager + .GetContribution("{9B087AEA-6E9C-48cd-A1F3-1B774500752E}"); } } } Modified: branches/FreeTrainSDL/core/Contributions/Rail/RailStationaryContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/RailStationaryContribution.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Rail/RailStationaryContribution.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -46,7 +46,7 @@ /// <returns></returns> protected override StructureGroup GetGroup(string name) { - return PluginManager.theInstance.railStationaryGroup[name]; + return PluginManager.RailStationaryGroup[name]; } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -53,7 +53,7 @@ /// <returns></returns> protected override StructureGroup GetGroup(string name) { - return PluginManager.theInstance.stationGroup[name]; + return PluginManager.StationGroup[name]; } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Structs/CommercialStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Structs/CommercialStructureContribution.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Structs/CommercialStructureContribution.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -57,7 +57,7 @@ /// <returns></returns> protected override StructureGroup GetGroup(string name) { - return PluginManager.theInstance.commercialStructureGroup[name]; + return PluginManager.CommercialStructureGroup[name]; } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -99,7 +99,7 @@ /// <returns></returns> protected override StructureGroup GetGroup(string name) { - return PluginManager.theInstance.varHeightBuildingsGroup[name]; + return PluginManager.varHeightBuildingsGroup[name]; } private ISprite[][,] loadSpriteSets(XmlNodeList list) Modified: branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -257,7 +257,7 @@ public static ColoredTrainPictureContribution get(string id) { return (ColoredTrainPictureContribution) - PluginManager.theInstance.getContribution(id); + PluginManager.GetContribution(id); } /// <summary> @@ -266,7 +266,7 @@ public static ColoredTrainPictureContribution[] list() { return (ColoredTrainPictureContribution[]) - PluginManager.theInstance.listContributions(typeof(ColoredTrainPictureContribution)); + PluginManager.ListContributions(typeof(ColoredTrainPictureContribution)); } } Modified: branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -94,7 +94,7 @@ string idref = e.Attributes["carRef"].Value; if (Id == null) throw new FormatException("carRef܂"); - TrainCarContribution contrib = (TrainCarContribution)Core.Plugins.getContribution(idref); + TrainCarContribution contrib = (TrainCarContribution)PluginManager.GetContribution(idref); if (contrib == null) throw new FormatException( string.Format("id='{0}'TrainCarRgr[V܂", idref)); Modified: branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -109,7 +109,7 @@ if (idref == null) throw new FormatException("ref attribute is missing"); //! if(idref==null) throw new FormatException("ref属性がありません"); - TrainCarContribution contrib = (TrainCarContribution)Core.Plugins.getContribution(idref); + TrainCarContribution contrib = (TrainCarContribution)PluginManager.GetContribution(idref); if (contrib == null) throw new FormatException( string.Format("id='{0}' is missing TrainCar contribution", idref)); //! string.Format( "id='{0}'のTrainCarコントリビューションがありません", idref )); Modified: branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -56,7 +56,7 @@ /// </summary> protected internal override void OnInitComplete() { - core = Core.Plugins.getContribution(baseId) as TrainCarContribution; + core = PluginManager.GetContribution(baseId) as TrainCarContribution; if (core == null) throw new FormatException("'" + Id + "' refers to TrainCar contribution '" + baseId + "' that could not be found"); //! throw new FormatException("'"+id+"'が参照するTrainCarコントリビューション'"+baseId+"'が見つかりません"); Modified: branches/FreeTrainSDL/core/Controllers/Land/BulldozeController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/BulldozeController.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Land/BulldozeController.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -53,7 +53,7 @@ InitializeComponent(); previewBitmap = ResourceUtil.LoadSystemBitmap("bulldozer.bmp"); preview.Image = previewBitmap; - LandBuilderContribution builder = (LandBuilderContribution)PluginManager.theInstance.getContribution("{AE43E6DB-39F0-49FE-BE18-EE3FAC248FDE}"); + LandBuilderContribution builder = (LandBuilderContribution)PluginManager.GetContribution("{AE43E6DB-39F0-49FE-BE18-EE3FAC248FDE}"); //TODO: fix this //currentController = builder.createBuilder(new ControllerSiteImpl(this)); } Modified: branches/FreeTrainSDL/core/Controllers/Land/LandController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandController.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Land/LandController.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -53,7 +53,7 @@ InitializeComponent(); // load list of lands - groupBox.DataSource = Core.Plugins.landBuilderGroup; + groupBox.DataSource = PluginManager.LandBuilderGroup; groupBox.DisplayMember = "name"; } /// <summary> Modified: branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -66,15 +66,15 @@ // この呼び出しは Windows フォーム デザイナで必要です。 InitializeComponent(); // colorPickButton1.colorLibraries = new IColorLibrary[]{ - // (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-RAINBOW}"), - // (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-STONES}")//, - //// (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-WOODS}"), - //// (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-METALS}"), - //// (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-BRICKS}"), - //// (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-DIRTS}"), - //// (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-PASTEL}"), - //// (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-COLPLATE}"), - //// (IColorLibrary)PluginManager.theInstance.getContribution("{COLORLIB-ROOF}") + // (IColorLibrary)PluginManager.getContribution("{COLORLIB-RAINBOW}"), + // (IColorLibrary)PluginManager.getContribution("{COLORLIB-STONES}")//, + //// (IColorLibrary)PluginManager.getContribution("{COLORLIB-WOODS}"), + //// (IColorLibrary)PluginManager.getContribution("{COLORLIB-METALS}"), + //// (IColorLibrary)PluginManager.getContribution("{COLORLIB-BRICKS}"), + //// (IColorLibrary)PluginManager.getContribution("{COLORLIB-DIRTS}"), + //// (IColorLibrary)PluginManager.getContribution("{COLORLIB-PASTEL}"), + //// (IColorLibrary)PluginManager.getContribution("{COLORLIB-COLPLATE}"), + //// (IColorLibrary)PluginManager.getContribution("{COLORLIB-ROOF}") // }; //do translation, if you put this in InitialiseComponent then it will get overridden by the @@ -120,7 +120,7 @@ dirW.Image = bitmapW; // load station type list - stationType.DataSource = Core.Plugins.stationGroup; + stationType.DataSource = PluginManager.StationGroup; stationType.DisplayMember = "name"; updateAfterResize(null, null); Modified: branches/FreeTrainSDL/core/Controllers/Rail/StationaryStructPlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/StationaryStructPlacementController.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Rail/StationaryStructPlacementController.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -58,7 +58,7 @@ } #endregion - private StationaryStructPlacementController() : base(Core.Plugins.railStationaryGroup) { } + private StationaryStructPlacementController() : base(PluginManager.RailStationaryGroup) { } /// <summary> LocationDisambiguator implementation </summary> public override bool IsSelectable(Location loc) Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -237,7 +237,7 @@ { // reset menu items newTCMenu.MenuItems.Clear(); - foreach (TrainControllerContribution contrib in Core.Plugins.trainControllers) + foreach (TrainControllerContribution contrib in PluginManager.TrainControllers) { MenuItem mi = new MenuItem(contrib.name); mi.Click += new EventHandler(new TCCreator(this, contrib).onMenuSelected); Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -54,7 +54,7 @@ // organize trains into a tree IDictionary types = new SortedList(); - foreach (TrainContribution tc in Core.Plugins.trains) + foreach (TrainContribution tc in PluginManager.Trains) { IDictionary company = (IDictionary)types[tc.CompanyName]; if (company == null) Modified: branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -185,7 +185,7 @@ private void makeContribTree() { - RoadContribution[] contribs = Core.Plugins.roads; + RoadContribution[] contribs = PluginManager.Roads; if (contribs.Length > 0) { currentContrib = contribs[0]; Modified: branches/FreeTrainSDL/core/Controllers/Structs/CommercialStructPlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Structs/CommercialStructPlacementController.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Structs/CommercialStructPlacementController.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -57,7 +57,7 @@ } #endregion - private CommercialStructPlacementController() : base(Core.Plugins.commercialStructureGroup) { } + private CommercialStructPlacementController() : base(PluginManager.CommercialStructureGroup) { } /// <summary> LocationDisambiguator implementation </summary> public override bool IsSelectable(Location loc) Modified: branches/FreeTrainSDL/core/Controllers/Structs/VarHeightBuildingController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Structs/VarHeightBuildingController.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Controllers/Structs/VarHeightBuildingController.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -45,7 +45,7 @@ /// /// </summary> public VarHeightBuildingController() - : base(Core.Plugins.varHeightBuildingsGroup) + : base(PluginManager.varHeightBuildingsGroup) { InitializeComponent(); buttonPlace.Top += 24; Modified: branches/FreeTrainSDL/core/Framework/BGMManager.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/BGMManager.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/BGMManager.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -56,7 +56,7 @@ musicMenu.Popup += new EventHandler(silence.update); // populate BGM contributions - foreach( BGMContribution contrib in Core.plugins.bgms ) { + foreach( BGMContribution contrib in PluginManager.bgms ) { MusicMenuItem child = new MusicMenuItem(this,contrib); musicMenu.MenuItems.Add( child ); musicMenu.Popup += new EventHandler(child.update); @@ -79,7 +79,7 @@ /// <param name="songname"></param> public void addSong(string songname) { - foreach (BGMContribution contrib in Core.Plugins.bgms) + foreach (BGMContribution contrib in PluginManager.Bgms) { if (contrib.name == songname) currentPlaylist.Add(contrib); } @@ -90,7 +90,7 @@ /// <param name="songname"></param> public void moveUp(string songname) { - foreach (BGMContribution contrib in Core.Plugins.bgms) + foreach (BGMContribution contrib in PluginManager.Bgms) { if (contrib.name == songname) { @@ -109,7 +109,7 @@ /// <param name="songname"></param> public void moveDown(string songname) { - foreach (BGMContribution contrib in Core.Plugins.bgms) + foreach (BGMContribution contrib in PluginManager.Bgms) { if (contrib.name == songname) { @@ -128,7 +128,7 @@ /// <param name="songname"></param> public void removeSong(string songname) { - foreach (BGMContribution contrib in Core.Plugins.bgms) + foreach (BGMContribution contrib in PluginManager.Bgms) { if (contrib.name == songname) { Modified: branches/FreeTrainSDL/core/Framework/BGMPlaylist.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/BGMPlaylist.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/BGMPlaylist.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -28,8 +28,8 @@ using FreeTrain.Contributions.Sound; using FreeTrain.Controllers; +using FreeTrain.Framework.Plugin; - namespace FreeTrain.Framework { /// <summary> @@ -99,8 +99,10 @@ { lstBGMs.Items.Clear(); lstCurrentPlaylist.Items.Clear(); - foreach (BGMContribution contrib in Core.Plugins.bgms) + foreach (BGMContribution contrib in PluginManager.Bgms) + { if (!Core.BgmManager.currentPlaylist.Contains(contrib)) lstBGMs.Items.Add(contrib); + } foreach (BGMContribution contrib in Core.BgmManager.currentPlaylist) { lstCurrentPlaylist.Items.Add(contrib); Modified: branches/FreeTrainSDL/core/Framework/Core.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Core.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/Core.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -56,16 +56,16 @@ } - /// <summary> Plug-ins. </summary> - private static readonly PluginManager plugins = new PluginManager(); + ///// <summary> Plug-ins. </summary> + //private static readonly PluginManager plugins = new PluginManager(); - /// <summary> - /// - /// </summary> - public static PluginManager Plugins - { - get { return Core.plugins; } - } + ///// <summary> + ///// + ///// </summary> + //public static PluginManager Plugins + //{ + // get { return PluginManager; } + //} /// <summary> Global options. </summary> @@ -128,14 +128,14 @@ if (args == null) { - Core.plugins.init(getDefaultProfile(), + PluginManager.Init(getDefaultProfile(), progressHandler, new DefaultPluginErrorHandler(5)); } else { // load plug-ins - Core.plugins.init( + PluginManager.Init( args.Length == 0 ? getDefaultProfile() : parseProfile(args[0]), progressHandler, new DefaultPluginErrorHandler(5)); } @@ -175,7 +175,7 @@ { IList r = new ArrayList(); - string baseDir = PluginManager.getDefaultPluginDirectory(); + string baseDir = PluginManager.GetDefaultPluginDirectory(); foreach (string subdir in Directory.GetDirectories(baseDir)) r.Add(Path.Combine(baseDir, subdir)); Modified: branches/FreeTrainSDL/core/Framework/ExternToolsHelper.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/ExternToolsHelper.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/ExternToolsHelper.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -48,11 +48,11 @@ progressHandler = new ProgressHandler(SilentProgress); IList r = new ArrayList(); - string baseDir = PluginManager.getDefaultPluginDirectory(); + string baseDir = PluginManager.GetDefaultPluginDirectory(); foreach (string subdir in Directory.GetDirectories(baseDir)) r.Add(Path.Combine(baseDir, subdir)); // load plug-ins - Core.Plugins.init(r, progressHandler, errorHandler); + PluginManager.Init(r, progressHandler, errorHandler); if (WorldDefinition.World == null) WorldDefinition.World = new WorldDefinition(new Distance(5, 5, 5), 0); initialized = true; @@ -63,7 +63,7 @@ public static void Clear() { // TODO: - //Core.plugins. + //PluginManager. initialized = false; } Modified: branches/FreeTrainSDL/core/Framework/Graphics/ColorLibrary.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/ColorLibrary.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/Graphics/ColorLibrary.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -70,7 +70,7 @@ /// </summary> static public ColorLibrary NullLibrary { - get { return (ColorLibrary)PluginManager.theInstance.getContribution(null_id); } + get { return (ColorLibrary)PluginManager.GetContribution(null_id); } } /// <summary> /// Modified: branches/FreeTrainSDL/core/Framework/Graphics/SpriteFactory.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/SpriteFactory.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/Graphics/SpriteFactory.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -61,7 +61,7 @@ string name = type.Attributes["name"].Value; // otherwise load from the spriteType element. SpriteFactoryContribution contrib = (SpriteFactoryContribution) - PluginManager.theInstance.getContribution("spriteFactory:" + name); + PluginManager.GetContribution("spriteFactory:" + name); if (contrib == null) throw new FormatException("unable to locate spriteFactory:" + name); return contrib.CreateSpriteFactory(type); Modified: branches/FreeTrainSDL/core/Framework/NewWorldDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/NewWorldDialog.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/NewWorldDialog.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -42,7 +42,7 @@ InitializeComponent(); NewGameContribution[] contribs = (NewGameContribution[]) - PluginManager.theInstance.listContributions(typeof(NewGameContribution)); + PluginManager.ListContributions(typeof(NewGameContribution)); // list view doesn't support databinding. We have to live with // listbox for now. Modified: branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -193,7 +193,7 @@ /// <returns></returns> public object GetRealObject(StreamingContext context) { - object o = Core.Plugins.getContribution(id); + object o = PluginManager.GetContribution(id); if (o == null) throw new SerializationException( "Plugin that contains Contribution \"" + id + "\" could not be found"); Modified: branches/FreeTrainSDL/core/Framework/Plugin/PluginDefinition.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/PluginDefinition.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/Plugin/PluginDefinition.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -141,7 +141,7 @@ (IContributionFactory)PluginUtil.loadObjectFromManifest(contrib); // register it - PluginManager.theInstance.addContributionFactory( + PluginManager.AddContributionFactory( contributionName, factory); } @@ -155,12 +155,12 @@ { ArrayList a = new ArrayList(); if (!this.name.Equals("system")) - a.Add(PluginManager.theInstance.getPlugin("system")); + a.Add(PluginManager.GetPlugin("system")); foreach (XmlElement depend in doc.DocumentElement.SelectNodes("depend")) { string name = depend.Attributes["on"].Value; - PluginDefinition p = PluginManager.theInstance.getPlugin(name); + PluginDefinition p = PluginManager.GetPlugin(name); if (p == null) throw new Exception(String.Format( "Plugin {1} that is needed for plugin {0} could not be found", this.name, name)); @@ -248,10 +248,10 @@ string type = contrib.Attributes["type"].Value; if (type == "contribution") continue; // ignore - IContributionFactory factory = PluginManager.theInstance.getContributionFactory(type); + IContributionFactory factory = PluginManager.GetContributionFactory(type); Contribution c = factory.Load(this, contrib); contributions.Add(c); - PluginManager.theInstance.addContribution(c); + PluginManager.AddContribution(c); c.init(this, baseUri); } catch (Exception e) Modified: branches/FreeTrainSDL/core/Framework/Plugin/PluginListDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/PluginListDialog.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/Plugin/PluginListDialog.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -166,7 +166,7 @@ { // populate the list list.Items.Clear(); - foreach (PluginDefinition p in Core.Plugins) + foreach (PluginDefinition p in PluginManager.Plugins) { list.Items.Add(new ListViewItem( new string[] { p.title, p.author, p.homepage }, 0)); Modified: branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs 2008-04-09 16:59:54 UTC (rev 356) +++ branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs 2008-04-09 17:32:58 UTC (rev 357) @@ -37,176 +37,82 @@ namespace FreeTrain.Framework.Plugin { /// <summary> - /// + /// Loads plug-ins. /// </summary> - public interface IPluginErrorHandler + public static class PluginManager { + ///// <summary> The singleton instance. </summary> + //public static PluginManager theInstance; + /// <summary> - /// + /// All loaded plug-ins. /// </summary> - /// <param name="p_1st"></param> - /// <param name="p_2nd"></param> - /// <param name="e"></param> - /// <returns></returns> - bool OnNameDuplicated(PluginDefinition p_1st, PluginDefinition p_2nd, Exception e); + private static PluginDefinition[] plugins; + /// <summary> /// /// </summary> - /// <param name="p"></param> - /// <param name="e"></param> - /// <returns></returns> - bool OnPluginLoadError(PluginDefinition p, Exception e); - /// <summary> - /// - /// </summary> - /// <param name="c"></param> - /// <param name="e"></param> - /// <returns></returns> - bool OnContributionInitError(Contribution c, Exception e); - /// <summary> - /// - /// </summary> - /// <param name="c_1st"></param> - /// <param name="c_2nd"></param> - /// <param name="e"></param> - /// <returns></returns> - bool OnContribIDDuplicated(Contribution c_1st, Contribution c_2nd, Exception e); - /// <summary> - /// - /// </summary> - /// <param name="errorPlugins"></param> - /// <param name="totalErrorCount"></param> - /// <returns></returns> - bool OnFinal(IDictionary errorPlugins, int totalErrorCount); - } - /// <summary> - /// - /// </summary> - public class SilentPluginErrorHandler : IPluginErrorHandler - { - #region PluginErrorHandler o - /// <summary> - /// - /// </summary> - /// <param name="p_1st"></param> - /// <param name="p_2nd"></param> - /// <param name="e"></param> - /// <returns></returns> - public bool OnNameDuplicated(PluginDefinition p_1st, PluginDefinition p_2nd, Exception e) + public static PluginDefinition[] Plugins { - return false; + get { return PluginManager.plugins; } + set { PluginManager.plugins = value; } } - /// <summary> - /// - /// </summary> - /// <param name="p"></param> - /// <param name="e"></param> - /// <returns></returns> - public bool OnPluginLoadError(PluginDefinition p, Exception e) - { - return false; - } - /// <summary> - /// - /// </summary> - /// <param name="c"></param> - /// <param name="e"></param> - /// <returns></returns> - public bool OnContributionInitError(Contribution c, Exception e) - { - return false; - } - /// <summary> - /// - /// </summary> - /// <param name="c_1st"></param> - /// <param name="c_2nd"></param> - /// <param name="e"></param> - /// <returns></returns> - public bool OnContribIDDuplicated(Contribution c_1st, Contribution c_2nd, Exception e) - { - return false; - } - /// <summary> - /// - /// </summary> - /// <param name="errorPlugins"></param> - /// <param name="totalErrorCount"></param> - /// <returns></returns> - public bool OnFinal(IDictionary errorPlugins, int totalErrorCount) - { - return true; - } - #endregion - } - - - /// <summary> - /// Loads plug-ins. - /// </summary> - public class PluginManager - { - - /// <summary> The singleton instance. </summary> - public static PluginManager theInstance; - /// <summary> - /// All loaded plug-ins. - /// </summary> - private PluginDefinition[] plugins; - - /// <summary> /// Plugins keyed by their names. /// </summary> - private readonly IDictionary pluginMap = new Hashtable(); + private static readonly IDictionary pluginMap = new Hashtable(); /// <summary> /// Contribution factories that are used to load contributions. /// </summary> - private readonly IDictionary contributionFactories = new Hashtable(); + private static readonly IDictionary contributionFactories = new Hashtable(); /// <summary> /// Contributions keyed by their IDs. /// </summary> - private readonly IDictionary contributionMap = new Hashtable(); + private static readonly IDictionary contributionMap = new Hashtable(); - /// <summary> /// /// </summary> - public PluginManager() + static PluginManager() { - theInstance = this; + //theInstance = this; - AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(onAssemblyResolve); + AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(OnAssemblyResolve); } - private static string getModuleName(string name) + private static string GetModuleName(string name) { return name.Substring(0, name.IndexOf(',')); } - private static Assembly onAssemblyResolve(object sender, ResolveEventArgs args) + private static Assembly OnAssemblyResolve(object sender, ResolveEventArgs args) { // TODO: improve performance by having a dictionary from name to Assemblies. // TODO: what is the correct way to use an application specific logic to resolve assemblies Trace.WriteLine("onAssemblyResolve resolving " + args.Name); - string name = getModuleName(args.Name); + string name = GetModuleName(args.Name); - if (Core.Plugins.plugins == null) return null; + if (PluginManager.plugins == null) + { + return null; + } // try assemblies of plug-ins - foreach (Contribution cont in Core.Plugins.publicContributions) + foreach (Contribution cont in PluginManager.PublicContributions) { Assembly asm = cont.Assembly; - if (getModuleName(asm.FullName) == name) + if (GetModuleName(asm.FullName) == name) + { return asm; + } } - Trace.WriteLine("onAssemblyResolve failed"); + Trace.WriteLine("OnAssemblyResolve failed"); return null; } @@ -220,7 +126,7 @@ /// </param> /// <param name="errorHandler"></param> /// <param name="progressHandler"></param> - public void init(ICollection dirs, ProgressHandler progressHandler, IPluginErrorHandler errorHandler) + public static void Init(ICollection dirs, ProgressHandler progressHandler, IPluginErrorHandler errorHandler) { Set pluginSet = new Set(); @@ -230,7 +136,9 @@ float c_max = dirs.Count * 4; bool errBreak = false; if (errorHandler == null) + { errorHandler = new SilentPluginErrorHandler(); + } // locate plugins foreach (string dir in dirs) @@ -239,7 +147,9 @@ //! progressHandler("プラグインを検索中\n"+Path.GetFileName(dir),++count/c_max); if (!File.Exists(Path.Combine(dir, "plugin.xml"))) + { continue; // this directory doesn't have the plugin.xml file. + } PluginDefinition p = null; try { @@ -253,9 +163,13 @@ errorPlugins.Add(p, e); errBreak = errorHandler.OnPluginLoadError(p, e); if (errBreak) + { break; + } else + { continue; + } } if (pluginMap.Contains(p.name)) { @@ -268,18 +182,24 @@ errBreak = errorHandler.OnNameDuplicated(pluginMap[p.name] as PluginDefinition, p, e); errorPlugins.Add(p, e); if (errBreak) + { break; + } else + { continue; + } } pluginMap.Add(p.name, p); pluginSet.add(p); } if (errBreak) + { Environment.Exit(-1); + } {// convert it to an array by sorting them in the order of dependency - this.plugins = new PluginDefinition[pluginSet.Count]; + plugins = new PluginDefinition[pluginSet.Count]; int ptr = 0; PluginDefinition p = null; while (!pluginSet.isEmpty) @@ -294,12 +214,20 @@ PluginDefinition[] deps = p.getDependencies(); int i; for (i = 0; i < deps.Length; i++) + { if (pluginSet.contains(deps[i])) + { break; + } + } if (i == deps.Length) + { break; + } else + { p = deps[i]; + } } } catch (Exception e) @@ -307,16 +235,22 @@ errCount++; errBreak = errorHandler.OnPluginLoadError(p, e); if (!errorPlugins.ContainsKey(p)) + { errorPlugins.Add(p, e); + } if (errBreak) + { break; + } } pluginSet.remove(p); plugins[ptr++] = p; } } if (errBreak) + { Environment.Exit(-2); + } // load all the contributions foreach (PluginDefinition p in plugins) @@ -332,9 +266,13 @@ errCount++; errBreak = errorHandler.OnPluginLoadError(p, e); if (!errorPlugins.ContainsKey(p)) + { errorPlugins.Add(p, e); + } if (errBreak) + { break; + } } } if (errBreak) @@ -342,8 +280,8 @@ // initialize contributions count = (int)c_max; - c_max += publicContributions.Length; - foreach (Contribution contrib in publicContributions) + c_max += PublicContributions.Length; + foreach (Contribution contrib in PublicContributions) { progressHandler("Initializing contributions...\n" + contrib.BaseUri, ++count / c_max); //! progressHandler("コントリビューションを初期化中\n"+contrib.baseUri,++count/c_max); @@ -357,19 +295,25 @@ errBreak = errorHandler.OnContributionInitError(contrib, e); PluginDefinition p = contrib.Parent; if (!errorPlugins.ContainsKey(p)) + { errorPlugins.Add(p, e); + } if (errBreak) + { break; + } } } if (errBreak) + { Environment.Exit(-4); + } {// make sure there's no duplicate id progressHandler("Checking for duplicate IDs...", 1.0f); //! progressHandler("重複IDのチェック中",1.0f); IDictionary dic = new Hashtable(); - foreach (Contribution contrib in publicContributions) + foreach (Contribution contrib in PublicContributions) { if (dic[contrib.Id] != null) { @@ -379,47 +323,62 @@ errBreak = errorHandler.OnContribIDDuplicated(dic[contrib.Id] as Contribution, contrib, e); PluginDefinition p = contrib.Parent; if (!errorPlugins.ContainsKey(p)) + { errorPlugins.Add(p, e); + } if (errBreak) + { break; + } } else + { dic[contrib.Id] = contrib; + } } } if (errBreak) + { Environment.Exit(-5); + } if (errCount > 0) { if (errorHandler.OnFinal(errorPlugins, errCount)) + { Environment.Exit(errCount); + } } } - /// <summary> /// Gets the default plug-in directory. /// </summary> /// <returns></returns> - public static string getDefaultPluginDirectory() + public static string GetDefaultPluginDirectory() { // try the IDE directory first //string pluginDir = Path.GetFullPath(Path.Combine(Core.installationDirectory, @"..\..\plugins" )); string pluginDir = Path.Combine(Application.StartupPath,"plugins"); if (Directory.Exists(pluginDir)) + { return pluginDir; + } pluginDir = Path.Combine(Application.StartupPath, Path.Combine(Path.Combine("..",".."),"plugins")); if (Directory.Exists(pluginDir)) + { return pluginDir; + } // if we can't find it, try the directory under the executable directory pluginDir = Path.GetFullPath(Path.Combine( Core.InstallationDirectory, @"plugins")); if (Directory.Exists(pluginDir)) + { return pluginDir; + } - throw new IOException("unable to find the plug-in directory: " + pluginDir); + throw new IOException("Unable to find the plug-in directory: " + pluginDir); } /// <summary> @@ -428,203 +387,239 @@ /// Normally, this method is called by <c>Plugin</c> but the caller /// can invoke this method before calling the init method. /// </summary> - public void addContributionFactory(string name, IContributionFactory factory) + public static void AddContributionFactory(string name, IContributionFactory factory) { if (contributionFactories.Contains(name)) + { throw new Exception(string.Format( "contribution type \"{0}\" is already registered.", name)); + } contributionFactories.Add(name, factory); } + /// <summary> /// /// </summary> /// <param name="name"></param> /// <returns></returns> - public IContributionFactory getContributionFactory(string name) + public static IContributionFactory GetContributionFactory(string name) { IContributionFactory factory = (IContributionFactory) contributionFactories[name]; if (factory == null) + { throw new Exception(name + " is an unknown contribution"); + } //! throw new Exception(name+"は未知のコントリビューションです"); else + { return factory; + } } - /// <summary> /// Enumerates all plug-in objects. /// </summary> - public IEnumerator GetEnumerator() + public static IEnumerator GetEnumerator() { return new ArrayEnumerator(plugins); } - - - - /// <summary> /// Gets all the station contributions. /// </summary> - public StationContribution[] stations + public static StationContribution[] Stations { get { - return (StationContribution[])listContributions(typeof(StationContribution)); + return (StationContribution[])ListContributions(typeof(StationContribution)); } } + /// <summary> /// /// </summary> - public readonly StructureGroupGroup stationGroup = new StructureGroupGroup(); + private static readonly StructureGroupGroup stationGroup = new StructureGroupGroup(); /// <summary> + /// + /// </summary> + public static StructureGroupGroup StationGroup + { + get { return stationGroup; } + } + + /// <summary> /// Gets all the special rail contributions. /// </summary> - public SpecialRailContribution[] specialRails + public static SpecialRailContribution[] SpecialRails { get { - return (SpecialRailContribution[])listContributions(typeof(SpecialRailContribution)); + return (SpecialRailContribution[])ListContributions(typeof(SpecialRailContribution)); } } /// <summary> /// Gets all the rail stationary contributions /// </summary> - public RailStationaryContribution[] railStationaryStructures + public static RailStationaryContribution[] RailStationaryStructures { get { - return (RailStationaryContribution[])listContributions(typeof(RailStationaryContribution)); + return (RailStationaryContribution[])ListContributions(typeof(RailStationaryContribution)); } } + /// <summary> /// /// </summary> - public readonly StructureGroupGroup railStationaryGroup = new StructureGroupGroup(); + private static readonly StructureGroupGroup railStationaryGroup = new StructureGroupGroup(); /// <summary> + /// + /// </summary> + public static StructureGroupGroup RailStationaryGroup + { + get { return railStationaryGroup; } + } + + /// <summary> /// Gets all the commercial structure contributions. /// </summary> - public CommercialStructureContribution[] commercialStructures + public static CommercialStructureContribution[] CommercialStructures { get { - return (CommercialStructureContribution[])listContributions(typeof(CommercialStructureContribution)); + return (CommercialStructureContribution[])ListContributions(typeof(CommercialStructureContribution)); } } + /// <summary> /// /// </summary> - public readonly StructureGroupGroup commercialStructureGroup = new StructureGroupGroup(); + private static readonly StructureGroupGroup commercialStructureGroup = new StructureGroupGroup(); /// <summary> + /// + /// </summary> + public static StructureGroupGroup CommercialStructureGroup + { + get { return commercialStructureGroup; } + } + + /// <summary> /// Gets all the special structure contributions. /// </summary> - public SpecialStructureContribution[] specialStructures + public static SpecialStructureContribution[] SpecialStructures { get { - return (SpecialStructureContribution[])listContributions(typeof(SpecialStructureContribution)); + return (SpecialStructureContribution[])ListContributions(typeof(SpecialStructureContribution)); } } /// <summary> /// Gets all the road contributions. /// </summary> - public RoadContribution[] roads + public static RoadContribution[] Roads { get { - return (RoadContribution[])listContributions(typeof(RoadContribution)); + return (RoadContribution[])ListContributions(typeof(RoadContribution)); } } - /// <summary> /// Gets all the BGM contributions. /// </summary> - public BGMContribution[] bgms + public static BGMContribution[] Bgms { get { - return (BGMContribution[])listContributions(typeof(BGMContribution)); + return (BGMContribution[])ListContributions(typeof(BGMContribution)); } } /// <summary> /// Gets all the menu item contributions. /// </summary> - public MenuContribution[] menus + public static MenuContribution[] Menus { get { - return (MenuContribution[])listContributions(typeof(MenuContribution)); + return (MenuContribution[])ListContributions(typeof(MenuContribution)); } } /// <summary> /// Gets all the train contributions. /// </summary> - public TrainContribution[] trains + public static TrainContribution[] Trains { get { - return (TrainContribution[])listContributions(typeof(TrainContribution)); + return (TrainContribution[])ListContributions(typeof(TrainContribution)); } } /// <summary> /// Gets all the train controller contributions. /// </summary> - public TrainControllerContribution[] trainControllers + public static TrainControllerContribution[] TrainControllers { get { - return (TrainControllerContribution[])listContributions(typeof(TrainControllerContribution)); + return (TrainControllerContribution[])ListContributions(typeof(TrainControllerContribution)); } } + /// <summary> /// /// </summary> - public VarHeightBuildingContribution[] varHeightBuildings + public static VarHeightBuildingContribution[] VarHeightBuildings { get { - return (VarHeightBuildingContribution[])listContributions(typeof(VarHeightBuildingContribution)); + return (VarHeightBuildingContribution[])ListContributions(typeof(VarHeightBuildingContribution)); } } + /// <summary> /// /// </summary> - public readonly StructureGroupGroup varHeightBuildingsGroup = new StructureGroupGroup(); + public static readonly StructureGroupGroup varHeightBuildingsGroup = new StructureGroupGroup(); - /// <summary> /// /// </summary> - public LandBuilderContribution[] landBuilders + public static LandBuilderContribution[] LandBuilders { get { - return (LandBuilderContribution[])listContributions(typeof(LandBuilderContribution)); + return (LandBuilderContribution[])ListContributions(typeof(LandBuilderContribution)); } } + /// <summary> /// /// </summary> - public readonly LandBuilderGroupGroup landBuilderGroup = new LandBuilderGroupGroup(); + private static readonly LandBuilderGroupGroup landBuilderGroup = new LandBuilderGroupGroup(); + /// <summary> + /// + /// </summary> + public static LandBuilderGroupGroup LandBuilderGroup + { + get { return landBuilderGroup; } + } - /// <summary> /// Lists up contributions of the given type. /// </summary> - public Array listContributions(Type contributionType) + public static Array ListContributions(Type contributionType) { ArrayList list = new ArrayList(); foreach (PluginDefinition p in plugins) @@ -632,25 +627,30 @@ foreach (Contribution contrib in p.contributions) { if (contributionType.IsInstanceOfType(contrib)) + { list.Add(contrib); + } } } return list.ToArray(contributionType); } - /// <summary> /// Gets all contributions. except for runtime generated ones. /// </summary> - public Contribution[] publicContributio... [truncated message content] |
From: <je...@us...> - 2008-04-09 16:59:49
|
Revision: 356 http://freetrain.svn.sourceforge.net/freetrain/?rev=356&view=rev Author: jendave Date: 2008-04-09 09:59:54 -0700 (Wed, 09 Apr 2008) Log Message: ----------- cleanups Modified Paths: -------------- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs branches/FreeTrainSDL/core/Framework/ResourceUtil.cs branches/FreeTrainSDL/core/FreeTrain.csproj branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs branches/FreeTrainSDL/core/World/Direction.cs branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs branches/FreeTrainSDL/core/World/Rail/FatPlatform.cs branches/FreeTrainSDL/core/World/Rail/Platform.cs branches/FreeTrainSDL/core/World/Rail/RailPattern.cs branches/FreeTrainSDL/core/World/Rail/Train.cs branches/FreeTrainSDL/core/World/Structs/ConstructionSite.cs branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs branches/FreeTrainSDL/core/World/Terrain/MountainVoxel.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -141,7 +141,7 @@ private static ISprite getSprite() { - return ResourceUtil.removerChip; + return ResourceUtil.RemoverChip; //return ResourceUtil.emptyChip; } } Modified: branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -46,7 +46,7 @@ string href = XmlUtil.SelectSingleNode(e, "sound/@href").InnerText; sound = new RepeatableSoundEffectImpl( - ResourceUtil.loadSound(XmlUtil.Resolve(e, href))); + ResourceUtil.LoadSound(XmlUtil.Resolve(e, href))); } /// <summary> name of this sound </summary> Modified: branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -212,7 +212,7 @@ if (owner.isPlacing) LandPropertyVoxel.sprite.DrawAlpha(canvas.Surface, pt); else - ResourceUtil.emptyChip.DrawAlpha(canvas.Surface, pt); + ResourceUtil.EmptyChip.DrawAlpha(canvas.Surface, pt); } } Modified: branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -66,7 +66,7 @@ /// <param name="pt"></param> protected override void Draw(Direction d, DrawContext canvas, Point pt) { - ResourceUtil.emptyChip.DrawShape(canvas.Surface, pt, Color.Blue); + ResourceUtil.EmptyChip.DrawShape(canvas.Surface, pt, Color.Blue); // RoadPattern.getStraight(d).drawAlpha( canvas.surface, pt ); } Modified: branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -88,7 +88,7 @@ /// <summary> Clears the canvas by tiling empty chips. </summary> public void Clear() { - ISprite empty = ResourceUtil.getGroundChip(WorldDefinition.World); + ISprite empty = ResourceUtil.GetGroundChip(WorldDefinition.World); for (int y = (ptOrigin.Y % 8) - 16; y < pixelSize.Height; y += 8) { int x = (ptOrigin.X % 32) - 64; Modified: branches/FreeTrainSDL/core/Framework/ResourceUtil.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/ResourceUtil.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/Framework/ResourceUtil.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -24,7 +24,7 @@ using System.IO; using System.Net; using System.Reflection; -//using org.kohsuke.directaudio; + using SdlDotNet.Audio; using FreeTrain.Util; using FreeTrain.Framework.Graphics; @@ -48,32 +48,38 @@ string resourcesDirectory = "Resources"; path = Path.Combine(Core.InstallationDirectory, Path.Combine(resourcesDirectory, name)); - if (File.Exists(path)) return path; + if (File.Exists(path)) + { + return path; + } path = Path.Combine(Core.InstallationDirectory, Path.Combine("..", Path.Combine("..", Path.Combine("core", Path.Combine(resourcesDirectory, name))))); - if (File.Exists(path)) return path; + if (File.Exists(path)) + { + return path; + } path = Path.Combine("..", Path.Combine("..", Path.Combine(resourcesDirectory, name))); - if (File.Exists(path)) return path; + if (File.Exists(path)) + { + return path; + } path = Path.Combine("..", Path.Combine(resourcesDirectory, name)); - if (File.Exists(path)) return path; + if (File.Exists(path)) + { + return path; + } Assembly assembly = Assembly.GetAssembly(typeof(ResourceUtil)); path = Path.Combine(Path.Combine(assembly.Location, ".."), Path.Combine(resourcesDirectory, name)); - if (File.Exists(path)) return path; + if (File.Exists(path)) + { + return path; + } throw new FileNotFoundException("System resource: " + path); } - // private static WebResponse getStream( Uri uri ) { - // return WebRequest.Create(uri).GetResponse(); - // } - - // public static Bitmap loadBitmap( string location ) { - // using(WebResponse res = getStream(uri)) { - // return new Bitmap(res.GetResponseStream()); - // } - // } /// <summary> /// /// </summary> @@ -84,17 +90,12 @@ return new Bitmap(FindSystemResource(name)); } - // public static Icon loadIcon( Uri uri) { - // using(WebResponse res = getStream(uri)) { - // return new Icon(res.GetResponseStream()); - // } - // } /// <summary> /// /// </summary> /// <param name="name"></param> /// <returns></returns> - public static SdlDotNet.Audio.Sound loadSystemSound(String name) + public static SdlDotNet.Audio.Sound LoadSystemSound(String name) { // can't read from stream return new SdlDotNet.Audio.Sound(FindSystemResource(name)); @@ -107,106 +108,146 @@ /// </summary> /// <param name="uri"></param> /// <returns></returns> - public static SdlDotNet.Audio.Sound loadSound(Uri uri) + public static SdlDotNet.Audio.Sound LoadSound(Uri uri) { return new SdlDotNet.Audio.Sound(uri.LocalPath); } + /// <summary> /// /// </summary> /// <param name="name"></param> /// <returns></returns> - public static Picture loadSystemPicture(string name) + public static Picture LoadSystemPicture(string name) { string id = "{8AD4EF28-CBEF-4C73-A8FF-5772B87EF005}:" + name; // check if it has already been loaded if (PictureManager.contains(id)) + { return PictureManager.get(id); + } // otherwise load a new picture return new Picture(id, FindSystemResource(name)); } + /// <summary> /// /// </summary> /// <param name="dayname"></param> /// <param name="nightname"></param> /// <returns></returns> - public static Picture loadSystemPicture(string dayname, string nightname) + public static Picture LoadSystemPicture(string dayName, string nightName) { - string id = "{8AD4EF28-CBEF-4C73-A8FF-5772B87EF005}:" + dayname; + string id = "{8AD4EF28-CBEF-4C73-A8FF-5772B87EF005}:" + dayName; // check if it has already been loaded if (PictureManager.contains(id)) + { return PictureManager.get(id); + } // otherwise load a new picture - return new Picture(id, FindSystemResource(dayname), FindSystemResource(nightname)); + return new Picture(id, FindSystemResource(dayName), FindSystemResource(nightName)); } + /// <summary> /// /// </summary> /// <param name="name"></param> /// <returns></returns> - public static Surface loadTimeIndependentSystemSurface(string name) + public static Surface LoadTimeIndependentSystemSurface(string name) { //using(Bitmap bmp=loadSystemBitmap(name)) // return directDraw.createSprite(bmp); return new Surface(FindSystemResource(name)); } - - /// <summary> /// DirectDraw instance for loading surface objects. /// </summary> //public static readonly DirectDraw directDraw = new DirectDraw(); - private static Picture emptyChips = loadSystemPicture("EmptyChip.bmp", "EmptyChip_n.bmp"); - private static Picture cursorChips = loadSystemPicture("cursorChip.bmp", "cursorChip.bmp"); + private static Picture emptyChips = LoadSystemPicture("EmptyChip.bmp", "EmptyChip_n.bmp"); + private static Picture cursorChips = LoadSystemPicture("cursorChip.bmp", "cursorChip.bmp"); /// <summary> /// /// </summary> - public static ISprite emptyChip + public static ISprite EmptyChip { get { return groundChips[0]; } } + /// <summary> /// /// </summary> /// <param name="w"></param> /// <returns></returns> - public static ISprite getGroundChip(WorldDefinition w) + public static ISprite GetGroundChip(WorldDefinition world) { - if (w.Clock.season != Season.Winter) + if (world.Clock.season != Season.Winter) + { return groundChips[0]; + } else + { return groundChips[1]; + } } private static ISprite[] groundChips = new ISprite[]{ new SimpleSprite(emptyChips,new Point(0,0),new Point( 0,0),new Size(32,16)), new SimpleSprite(emptyChips,new Point(0,0),new Point(32,0),new Size(32,16)) }; + /// <summary> /// /// </summary> - public static ISprite removerChip = + private static ISprite removerChip = new SimpleSprite(cursorChips, new Point(0, 0), new Point(0, 0), new Size(32, 16)); + /// <summary> /// /// </summary> - public static ISprite underWaterChip = + public static ISprite RemoverChip + { + get { return ResourceUtil.removerChip; } + set { ResourceUtil.removerChip = value; } + } + + /// <summary> + /// + /// </summary> + private static ISprite underWaterChip = new SimpleSprite(emptyChips, new Point(0, 0), new Point(64, 0), new Size(32, 16)); + /// <summary> /// /// </summary> - public static ISprite underGroundChip = + public static ISprite UnderWaterChip + { + get { return ResourceUtil.underWaterChip; } + set { ResourceUtil.underWaterChip = value; } + } + + /// <summary> + /// + /// </summary> + private static ISprite underGroundChip = new SimpleSprite(emptyChips, new Point(0, 0), new Point(96, 0), new Size(32, 16)); + + /// <summary> + /// + /// </summary> + public static ISprite UnderGroundChip + { + get { return ResourceUtil.underGroundChip; } + set { ResourceUtil.underGroundChip = value; } + } } } Modified: branches/FreeTrainSDL/core/FreeTrain.csproj =================================================================== --- branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-09 16:59:54 UTC (rev 356) @@ -372,147 +372,147 @@ <Compile Include="Controllers\Terrain\MountainController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\AboutDialog.cs"> + <Compile Include="Controllers\Framework\AboutDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\BGMManager.cs"> + <Compile Include="Controllers\Framework\BGMManager.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\BGMPlaylist.cs"> + <Compile Include="Controllers\Framework\BGMPlaylist.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\BGMPlaylist.Designer.cs"> + <Compile Include="Controllers\Framework\BGMPlaylist.Designer.cs"> <DependentUpon>BGMPlaylist.cs</DependentUpon> </Compile> - <Compile Include="Framework\ConfigDialog.cs"> + <Compile Include="Controllers\Framework\ConfigDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\AboutDialog.Designer.cs"> + <Compile Include="Controllers\Framework\AboutDialog.Designer.cs"> <DependentUpon>AboutDialog.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\Graphics\NightSurfaceLoader.cs" /> - <Compile Include="Framework\Graphics\BitmapSurfaceLoader.cs" /> - <Compile Include="Framework\Graphics\ISprite.cs" /> - <Compile Include="Framework\Graphics\ISurfaceLoader.cs" /> - <Compile Include="Framework\Plugin\IContributionFactory.cs" /> - <Compile Include="Framework\Splash.Designer.cs"> + <Compile Include="Controllers\Framework\Graphics\NightSurfaceLoader.cs" /> + <Compile Include="Controllers\Framework\Graphics\BitmapSurfaceLoader.cs" /> + <Compile Include="Controllers\Framework\Graphics\ISprite.cs" /> + <Compile Include="Controllers\Framework\Graphics\ISurfaceLoader.cs" /> + <Compile Include="Controllers\Framework\Plugin\IContributionFactory.cs" /> + <Compile Include="Controllers\Framework\Splash.Designer.cs"> <DependentUpon>Splash.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\Core.cs"> + <Compile Include="Controllers\Framework\Core.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\ErrorMessageBox.cs"> + <Compile Include="Controllers\Framework\ErrorMessageBox.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\ExternToolsHelper.cs"> + <Compile Include="Controllers\Framework\ExternToolsHelper.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\GlobalOptions.cs"> + <Compile Include="Controllers\Framework\GlobalOptions.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\AlphaBlendSpriteSet.cs"> + <Compile Include="Controllers\Framework\Graphics\AlphaBlendSpriteSet.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\ColorLibrary.cs"> + <Compile Include="Controllers\Framework\Graphics\ColorLibrary.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\ColorMap.cs"> + <Compile Include="Controllers\Framework\Graphics\ColorMap.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\ColorMappedSprite.cs"> + <Compile Include="Controllers\Framework\Graphics\ColorMappedSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\DefaultSpriteLoaderContributionImpl.cs"> + <Compile Include="Controllers\Framework\Graphics\DefaultSpriteLoaderContributionImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\DirectSprite.cs"> + <Compile Include="Controllers\Framework\Graphics\DirectSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\DirtyRect.cs"> + <Compile Include="Controllers\Framework\Graphics\DirtyRect.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\GraphicsException.cs"> + <Compile Include="Controllers\Framework\Graphics\GraphicsException.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\HueTransformSprite.cs"> + <Compile Include="Controllers\Framework\Graphics\HueTransformSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\NullSprite.cs"> + <Compile Include="Controllers\Framework\Graphics\NullSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\Picture.cs"> + <Compile Include="Controllers\Framework\Graphics\Picture.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\PictureManager.cs"> + <Compile Include="Controllers\Framework\Graphics\PictureManager.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\PreviewDrawer.cs"> + <Compile Include="Controllers\Framework\Graphics\PreviewDrawer.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\SimpleSprite.cs"> + <Compile Include="Controllers\Framework\Graphics\SimpleSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\SpriteFactory.cs"> + <Compile Include="Controllers\Framework\Graphics\SpriteFactory.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\SpriteFactoryContribution.cs"> + <Compile Include="Controllers\Framework\Graphics\SpriteFactoryContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\SpriteLoaderContribution.cs"> + <Compile Include="Controllers\Framework\Graphics\SpriteLoaderContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\MainWindow.cs"> + <Compile Include="Controllers\Framework\MainWindow.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\MainWindow.Designer.cs"> + <Compile Include="Controllers\Framework\MainWindow.Designer.cs"> <DependentUpon>MainWindow.cs</DependentUpon> </Compile> - <Compile Include="Framework\NewWorldDialog.cs"> + <Compile Include="Controllers\Framework\NewWorldDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\PersistentOptions.cs"> + <Compile Include="Controllers\Framework\PersistentOptions.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Plugin\Contribution.cs"> + <Compile Include="Controllers\Framework\Plugin\Contribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Plugin\DynamicContributionFactory.cs"> + <Compile Include="Controllers\Framework\Plugin\DynamicContributionFactory.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Plugin\FixedClassContributionFactory.cs"> + <Compile Include="Controllers\Framework\Plugin\FixedClassContributionFactory.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Plugin\PluginDefinition.cs" /> - <Compile Include="Framework\Plugin\PluginListDialog.cs"> + <Compile Include="Controllers\Framework\Plugin\PluginDefinition.cs" /> + <Compile Include="Controllers\Framework\Plugin\PluginListDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\Plugin\PluginManager.cs"> + <Compile Include="Controllers\Framework\Plugin\PluginManager.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Plugin\PluginSerializationBinder.cs"> + <Compile Include="Controllers\Framework\Plugin\PluginSerializationBinder.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Plugin\PluginUtil.cs"> + <Compile Include="Controllers\Framework\Plugin\PluginUtil.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Plugin\XmlUtil.cs"> + <Compile Include="Controllers\Framework\Plugin\XmlUtil.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\ResourceUtil.cs"> + <Compile Include="Controllers\Framework\ResourceUtil.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Sound\RepeatableSoundEffectImpl.cs"> + <Compile Include="Controllers\Framework\Sound\RepeatableSoundEffectImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Sound\SoundEffect.cs"> + <Compile Include="Controllers\Framework\Sound\SoundEffect.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Sound\SoundEffectManager.cs"> + <Compile Include="Controllers\Framework\Sound\SoundEffectManager.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Splash.cs"> + <Compile Include="Controllers\Framework\Splash.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Properties\AssemblyInfo.cs" /> @@ -569,7 +569,7 @@ <Compile Include="Util\Set.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\Graphics\Surface.cs" /> + <Compile Include="Controllers\Framework\Graphics\Surface.cs" /> <Compile Include="Util\Translation.cs" /> <Compile Include="Util\UrlInvoker.cs"> <SubType>Code</SubType> @@ -962,31 +962,31 @@ <EmbeddedResource Include="Controllers\Terrain\MountainController.resx"> <DependentUpon>MountainController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Framework\AboutDialog.resx"> + <EmbeddedResource Include="Controllers\Framework\AboutDialog.resx"> <DependentUpon>AboutDialog.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Framework\BGMPlaylist.resx"> + <EmbeddedResource Include="Controllers\Framework\BGMPlaylist.resx"> <SubType>Designer</SubType> <DependentUpon>BGMPlaylist.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Framework\ConfigDialog.resx"> + <EmbeddedResource Include="Controllers\Framework\ConfigDialog.resx"> <DependentUpon>ConfigDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Framework\ErrorMessageBox.resx"> + <EmbeddedResource Include="Controllers\Framework\ErrorMessageBox.resx"> <DependentUpon>ErrorMessageBox.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Framework\MainWindow.resx"> + <EmbeddedResource Include="Controllers\Framework\MainWindow.resx"> <SubType>Designer</SubType> <DependentUpon>MainWindow.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Framework\NewWorldDialog.resx"> + <EmbeddedResource Include="Controllers\Framework\NewWorldDialog.resx"> <DependentUpon>NewWorldDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Framework\Plugin\PluginListDialog.resx"> + <EmbeddedResource Include="Controllers\Framework\Plugin\PluginListDialog.resx"> <DependentUpon>PluginListDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Framework\Splash.resx"> + <EmbeddedResource Include="Controllers\Framework\Splash.resx"> <DependentUpon>Splash.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.sv-SE.resx"> Modified: branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs =================================================================== --- branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -409,8 +409,8 @@ int Z = HeightCutHeight; int Vmax = Math.Min(rectHV.Bottom + Z * 2, world.Size.y - 1); - emptyChip = ResourceUtil.getGroundChip(world); - waterChip = ResourceUtil.underWaterChip; + emptyChip = ResourceUtil.GetGroundChip(world); + waterChip = ResourceUtil.UnderWaterChip; for (int v = Math.Max(0, rectHV.Top); v <= Vmax; v++) { @@ -461,7 +461,7 @@ { // if the surface voxel is not drawn, draw the "under group" chip if (shouldDrawGround(h, v, z)) - ResourceUtil.underGroundChip.Draw(drawContext.Surface, pt); + ResourceUtil.UnderGroundChip.Draw(drawContext.Surface, pt); } } // } Modified: branches/FreeTrainSDL/core/World/Direction.cs =================================================================== --- branches/FreeTrainSDL/core/World/Direction.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Direction.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -161,8 +161,8 @@ } - private static readonly Surface arrowImage = ResourceUtil.loadTimeIndependentSystemSurface("Arrows.bmp"); - private static readonly Surface darkArrowImage = ResourceUtil.loadTimeIndependentSystemSurface("Arrows.dark.bmp"); + private static readonly Surface arrowImage = ResourceUtil.LoadTimeIndependentSystemSurface("Arrows.bmp"); + private static readonly Surface darkArrowImage = ResourceUtil.LoadTimeIndependentSystemSurface("Arrows.dark.bmp"); /// <summary> Draws an arrow on the given surface. </summary> public void drawArrow(Surface display, Point pt, bool isDark) Modified: branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -185,7 +185,7 @@ - private static readonly Picture theImage = ResourceUtil.loadSystemPicture("BridgePier.bmp"); + private static readonly Picture theImage = ResourceUtil.LoadSystemPicture("BridgePier.bmp"); /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/World/Rail/FatPlatform.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/FatPlatform.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Rail/FatPlatform.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -283,7 +283,7 @@ static FatPlatform() { sprites = new ISprite[4]; - Picture bmp = ResourceUtil.loadSystemPicture("FatPlatform.bmp"); // don't dispose this surface + Picture bmp = ResourceUtil.LoadSystemPicture("FatPlatform.bmp"); // don't dispose this surface sprites[0] = sprites[2] = new SimpleSprite(bmp, new Point(0, 16), new Point(0, 0), new Size(32, 32)); sprites[1] = sprites[3] = new SimpleSprite(bmp, new Point(0, 16), new Point(32, 0), new Size(32, 32)); } @@ -396,7 +396,7 @@ /// /// </summary> private static readonly ISprite theImage = - new SimpleSprite(ResourceUtil.loadSystemPicture("YardChip.bmp"), + new SimpleSprite(ResourceUtil.LoadSystemPicture("YardChip.bmp"), new Point(0, 0), new Point(0, 0), new Size(32, 16)); /// <summary> /// Modified: branches/FreeTrainSDL/core/World/Rail/Platform.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/Platform.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Rail/Platform.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -303,7 +303,7 @@ /// <summary> Warning icon. </summary> protected static readonly Surface warningIcon = - ResourceUtil.loadTimeIndependentSystemSurface("caution.bmp"); + ResourceUtil.LoadTimeIndependentSystemSurface("caution.bmp"); /// <summary> /// Modified: branches/FreeTrainSDL/core/World/Rail/RailPattern.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/RailPattern.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Rail/RailPattern.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -38,8 +38,8 @@ /// <summary> /// Sprite that contains the images of all patterns. /// </summary> - private static readonly Picture railChips = ResourceUtil.loadSystemPicture("RailRoads.bmp", "RailRoads_n.bmp"); - private static readonly Picture ugChips = ResourceUtil.loadSystemPicture("ugslope.bmp"); + private static readonly Picture railChips = ResourceUtil.LoadSystemPicture("RailRoads.bmp", "RailRoads_n.bmp"); + private static readonly Picture ugChips = ResourceUtil.LoadSystemPicture("ugslope.bmp"); // single rail road private static readonly RailPattern[] singlePatterns = new RailPattern[] { Modified: branches/FreeTrainSDL/core/World/Rail/Train.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/Train.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Rail/Train.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -69,7 +69,7 @@ /// Sound-effect of a ringing bell. Used when a train leaves a station. /// </summary> private static readonly ISoundEffect thudSound = new RepeatableSoundEffectImpl( - ResourceUtil.loadSystemSound("train.wav"), 1, 300); + ResourceUtil.LoadSystemSound("train.wav"), 1, 300); Modified: branches/FreeTrainSDL/core/World/Structs/ConstructionSite.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/ConstructionSite.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Structs/ConstructionSite.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -476,7 +476,7 @@ static VoxelImpl() { // load fence sprites - Picture fence = ResourceUtil.loadSystemPicture("ConstructionFence.bmp"); + Picture fence = ResourceUtil.LoadSystemPicture("ConstructionFence.bmp"); fenceSprites = new ISprite[4/*direction*/, 2/*door or no door*/]; for (int i = 0; i < 4; i++) fenceSprites[i, 0] = new SimpleSprite(fence, new Point(0, 16), new Point(32 * i, 0), new Size(32, 32)); @@ -489,7 +489,7 @@ // load ground sprites - Picture ground = ResourceUtil.loadSystemPicture("ConstructionGround.bmp"); + Picture ground = ResourceUtil.LoadSystemPicture("ConstructionGround.bmp"); groundSprites = new ISprite[7]; groundSprites[0] = new SimpleSprite(// ground @@ -509,7 +509,7 @@ // load bone sprites - Picture bone = ResourceUtil.loadSystemPicture("ConstructionBones.bmp"); + Picture bone = ResourceUtil.LoadSystemPicture("ConstructionBones.bmp"); boneSprites = new ISprite[3, 2, 2, 2, 2]; for (int l = 0; l < 3; l++) @@ -532,7 +532,7 @@ } // loa dwall sprites - Picture wall = ResourceUtil.loadSystemPicture("ConstructionWall.bmp"); + Picture wall = ResourceUtil.LoadSystemPicture("ConstructionWall.bmp"); wallSprites = new ISprite[4]; wallSprites[0] = new SimpleSprite(wall, Modified: branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -162,7 +162,7 @@ { // drawing in the height cut mode if (this.location.z == o.baseLocation.z) - ResourceUtil.emptyChip.DrawShape(display.Surface, pt, o.heightCutColor); + ResourceUtil.EmptyChip.DrawShape(display.Surface, pt, o.heightCutColor); } } } Modified: branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -236,7 +236,7 @@ } else if (z == 0) - ResourceUtil.emptyChip.DrawShape(display.Surface, pt, o.heightCutColor); + ResourceUtil.EmptyChip.DrawShape(display.Surface, pt, o.heightCutColor); } } Modified: branches/FreeTrainSDL/core/World/Terrain/MountainVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/Terrain/MountainVoxel.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/core/World/Terrain/MountainVoxel.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -256,7 +256,7 @@ if (heightCutDiff == 0) { - ResourceUtil.emptyChip.DrawShape(display.Surface, pt, + ResourceUtil.EmptyChip.DrawShape(display.Surface, pt, isUnderWater ? waterColors[3] : currentMountainColors[3]); return; } @@ -525,7 +525,7 @@ /// <summary> Load sprites for cliffs. </summary> private static void initCliffSprites() { - Picture picture = ResourceUtil.loadSystemPicture("cliff.bmp"); + Picture picture = ResourceUtil.LoadSystemPicture("cliff.bmp"); for (int side = 0; side < 2; side++) { for (int l = 0; l <= 4; l++) Modified: branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs 2008-04-09 16:09:59 UTC (rev 355) +++ branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs 2008-04-09 16:59:54 UTC (rev 356) @@ -359,9 +359,9 @@ public override void draw(DrawContext display, Point pt, int heightCutDiff) { if (heightCutDiff >= 0) - ResourceUtil.emptyChip.DrawShape(display.Surface, pt, owner.heightCutColor); + ResourceUtil.EmptyChip.DrawShape(display.Surface, pt, owner.heightCutColor); else - ResourceUtil.emptyChip.Draw(display.Surface, pt); + ResourceUtil.EmptyChip.Draw(display.Surface, pt); // above line is needed when my(=477) patch is applied. if (owner.backside != null) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-09 16:10:06
|
Revision: 355 http://freetrain.svn.sourceforge.net/freetrain/?rev=355&view=rev Author: jendave Date: 2008-04-09 09:09:59 -0700 (Wed, 09 Apr 2008) Log Message: ----------- move resources into VS2005 standard directory Modified Paths: -------------- branches/FreeTrainSDL/core/Framework/ResourceUtil.cs branches/FreeTrainSDL/core/FreeTrain.csproj Added Paths: ----------- branches/FreeTrainSDL/core/Resources/Arrows.bmp branches/FreeTrainSDL/core/Resources/Arrows.dark.bmp branches/FreeTrainSDL/core/Resources/BridgePier.bmp branches/FreeTrainSDL/core/Resources/ConstructionBones.bmp branches/FreeTrainSDL/core/Resources/ConstructionFence.bmp branches/FreeTrainSDL/core/Resources/ConstructionGround.bmp branches/FreeTrainSDL/core/Resources/ConstructionWall.bmp branches/FreeTrainSDL/core/Resources/DayNight.bmp branches/FreeTrainSDL/core/Resources/EmptyChip.bmp branches/FreeTrainSDL/core/Resources/EmptyChip_n.bmp branches/FreeTrainSDL/core/Resources/FTicon.gif branches/FreeTrainSDL/core/Resources/FatPlatform.bmp branches/FreeTrainSDL/core/Resources/Item.bmp branches/FreeTrainSDL/core/Resources/PlatformN.bmp branches/FreeTrainSDL/core/Resources/PrivateHouse.bmp branches/FreeTrainSDL/core/Resources/RailRoads.bmp branches/FreeTrainSDL/core/Resources/RailRoads_n.bmp branches/FreeTrainSDL/core/Resources/SignalN.bmp branches/FreeTrainSDL/core/Resources/SubsidiaryMarketWindowToolButton.bmp branches/FreeTrainSDL/core/Resources/Terrain.bmp branches/FreeTrainSDL/core/Resources/Toolbar.bmp branches/FreeTrainSDL/core/Resources/YardChip.bmp branches/FreeTrainSDL/core/Resources/about.html branches/FreeTrainSDL/core/Resources/balanceSheet.html branches/FreeTrainSDL/core/Resources/bulldozer.bmp branches/FreeTrainSDL/core/Resources/caution.bmp branches/FreeTrainSDL/core/Resources/caution.gif branches/FreeTrainSDL/core/Resources/cliff.bmp branches/FreeTrainSDL/core/Resources/construction.wav branches/FreeTrainSDL/core/Resources/cursorChip.bmp branches/FreeTrainSDL/core/Resources/error.ico branches/FreeTrainSDL/core/Resources/ex.png branches/FreeTrainSDL/core/Resources/mountainPalette.xml branches/FreeTrainSDL/core/Resources/mountainPalette.xsl branches/FreeTrainSDL/core/Resources/splash.jpg branches/FreeTrainSDL/core/Resources/train.wav branches/FreeTrainSDL/core/Resources/ugslope.bmp branches/FreeTrainSDL/core/Resources/vehiclePurchase.wav Removed Paths: ------------- branches/FreeTrainSDL/core/Res/ Modified: branches/FreeTrainSDL/core/Framework/ResourceUtil.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/ResourceUtil.cs 2008-04-09 16:04:34 UTC (rev 354) +++ branches/FreeTrainSDL/core/Framework/ResourceUtil.cs 2008-04-09 16:09:59 UTC (rev 355) @@ -45,20 +45,21 @@ public static string FindSystemResource(string name) { string path; + string resourcesDirectory = "Resources"; - path = Path.Combine(Core.InstallationDirectory, Path.Combine("Res", name)); + path = Path.Combine(Core.InstallationDirectory, Path.Combine(resourcesDirectory, name)); if (File.Exists(path)) return path; - path = Path.Combine(Core.InstallationDirectory, Path.Combine("..", Path.Combine("..", Path.Combine("core", Path.Combine("Res", name))))); + path = Path.Combine(Core.InstallationDirectory, Path.Combine("..", Path.Combine("..", Path.Combine("core", Path.Combine(resourcesDirectory, name))))); if (File.Exists(path)) return path; - path = Path.Combine("..", Path.Combine("..", Path.Combine("Res", name))); + path = Path.Combine("..", Path.Combine("..", Path.Combine(resourcesDirectory, name))); if (File.Exists(path)) return path; - path = Path.Combine("..", Path.Combine("Res", name)); + path = Path.Combine("..", Path.Combine(resourcesDirectory, name)); if (File.Exists(path)) return path; Assembly assembly = Assembly.GetAssembly(typeof(ResourceUtil)); - path = Path.Combine(Path.Combine(assembly.Location, ".."), Path.Combine("Res", name)); + path = Path.Combine(Path.Combine(assembly.Location, ".."), Path.Combine(resourcesDirectory, name)); if (File.Exists(path)) return path; throw new FileNotFoundException("System resource: " + path); Modified: branches/FreeTrainSDL/core/FreeTrain.csproj =================================================================== --- branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-09 16:04:34 UTC (rev 354) +++ branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-09 16:09:59 UTC (rev 355) @@ -861,45 +861,44 @@ </Content> <Content Include="Contributions\readme.txt" /> <None Include="Resources\play.png" /> - <Content Include="Res\Arrows.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\BridgePier.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\ConstructionBones.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\ConstructionFence.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\ConstructionGround.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\ConstructionWall.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\DayNight.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\EmptyChip.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\Item.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\RailRoads.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\Toolbar.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\ugslope.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="Res\YardChip.bmp"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> + <Content Include="Resources\about.html" /> + <Content Include="Resources\Arrows.bmp" /> + <Content Include="Resources\Arrows.dark.bmp" /> + <Content Include="Resources\balanceSheet.html" /> + <Content Include="Resources\BridgePier.bmp" /> + <Content Include="Resources\bulldozer.bmp" /> + <Content Include="Resources\caution.bmp" /> + <Content Include="Resources\caution.gif" /> + <Content Include="Resources\cliff.bmp" /> + <Content Include="Resources\construction.wav" /> + <Content Include="Resources\ConstructionBones.bmp" /> + <Content Include="Resources\ConstructionFence.bmp" /> + <Content Include="Resources\ConstructionGround.bmp" /> + <Content Include="Resources\ConstructionWall.bmp" /> + <Content Include="Resources\cursorChip.bmp" /> + <Content Include="Resources\DayNight.bmp" /> + <Content Include="Resources\EmptyChip.bmp" /> + <Content Include="Resources\EmptyChip_n.bmp" /> + <Content Include="Resources\error.ico" /> + <Content Include="Resources\ex.png" /> + <Content Include="Resources\FatPlatform.bmp" /> + <Content Include="Resources\FTicon.gif" /> + <Content Include="Resources\Item.bmp" /> + <Content Include="Resources\mountainPalette.xml" /> + <Content Include="Resources\mountainPalette.xsl" /> + <Content Include="Resources\PlatformN.bmp" /> + <Content Include="Resources\PrivateHouse.bmp" /> + <Content Include="Resources\RailRoads.bmp" /> + <Content Include="Resources\RailRoads_n.bmp" /> + <Content Include="Resources\SignalN.bmp" /> + <Content Include="Resources\splash.jpg" /> + <Content Include="Resources\SubsidiaryMarketWindowToolButton.bmp" /> + <Content Include="Resources\Terrain.bmp" /> + <Content Include="Resources\Toolbar.bmp" /> + <Content Include="Resources\train.wav" /> + <Content Include="Resources\ugslope.bmp" /> + <Content Include="Resources\vehiclePurchase.wav" /> + <Content Include="Resources\YardChip.bmp" /> <EmbeddedResource Include="Contributions\Others\NewWorldDialog.resx"> <DependentUpon>NewWorldDialog.cs</DependentUpon> </EmbeddedResource> @@ -1010,9 +1009,6 @@ <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.ja-JP.Designer.cs</LastGenOutput> </EmbeddedResource> - <EmbeddedResource Include="Res\splash.jpg"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> <EmbeddedResource Include="Util\Command\CommandManager.resx"> <DependentUpon>CommandManager.cs</DependentUpon> </EmbeddedResource> Copied: branches/FreeTrainSDL/core/Resources/Arrows.bmp (from rev 350, branches/FreeTrainSDL/core/Res/Arrows.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/Arrows.dark.bmp (from rev 350, branches/FreeTrainSDL/core/Res/Arrows.dark.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/BridgePier.bmp (from rev 350, branches/FreeTrainSDL/core/Res/BridgePier.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/ConstructionBones.bmp (from rev 350, branches/FreeTrainSDL/core/Res/ConstructionBones.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/ConstructionFence.bmp (from rev 350, branches/FreeTrainSDL/core/Res/ConstructionFence.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/ConstructionGround.bmp (from rev 350, branches/FreeTrainSDL/core/Res/ConstructionGround.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/ConstructionWall.bmp (from rev 350, branches/FreeTrainSDL/core/Res/ConstructionWall.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/DayNight.bmp (from rev 350, branches/FreeTrainSDL/core/Res/DayNight.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/EmptyChip.bmp (from rev 350, branches/FreeTrainSDL/core/Res/EmptyChip.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/EmptyChip_n.bmp (from rev 350, branches/FreeTrainSDL/core/Res/EmptyChip_n.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/FTicon.gif (from rev 350, branches/FreeTrainSDL/core/Res/FTicon.gif) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/FatPlatform.bmp (from rev 350, branches/FreeTrainSDL/core/Res/FatPlatform.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/Item.bmp (from rev 350, branches/FreeTrainSDL/core/Res/Item.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/PlatformN.bmp (from rev 350, branches/FreeTrainSDL/core/Res/PlatformN.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/PrivateHouse.bmp (from rev 350, branches/FreeTrainSDL/core/Res/PrivateHouse.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/RailRoads.bmp (from rev 350, branches/FreeTrainSDL/core/Res/RailRoads.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/RailRoads_n.bmp (from rev 350, branches/FreeTrainSDL/core/Res/RailRoads_n.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/SignalN.bmp (from rev 350, branches/FreeTrainSDL/core/Res/SignalN.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/SubsidiaryMarketWindowToolButton.bmp (from rev 350, branches/FreeTrainSDL/core/Res/SubsidiaryMarketWindowToolButton.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/Terrain.bmp (from rev 350, branches/FreeTrainSDL/core/Res/Terrain.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/Toolbar.bmp (from rev 350, branches/FreeTrainSDL/core/Res/Toolbar.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/YardChip.bmp (from rev 350, branches/FreeTrainSDL/core/Res/YardChip.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/about.html (from rev 350, branches/FreeTrainSDL/core/Res/about.html) =================================================================== --- branches/FreeTrainSDL/core/Resources/about.html (rev 0) +++ branches/FreeTrainSDL/core/Resources/about.html 2008-04-09 16:09:59 UTC (rev 355) @@ -0,0 +1,37 @@ +<html> + <head> + <title></title> + <style> + body { + border: none; + background-color: threedface; + margin-left: 0px; + margin-top: 0px; + cursor: default; + overflow:hidden; + font-family: Georgia; + font-size: 9pt; + } + </style> + <base target="_blank"> + </head> + <body onselect="event.returnValue=false;event.cancelBubble=true;return false;" target="_new"> + <img src="FTicon.gif" style="FLOAT:left"> + <div style="FONT-WEIGHT: bold; FONT-SIZE: 10pt"> + FreeTrain + </div> + <br clear = "all"> + <div> + ©Copyright by Kohsuke Kawaguchi et al, 2002-2007 + ©Copyright by FreeTrain Team, 2008 + </div> + <div> + <a href="http://freetrain.sourceforge.net/">http://freetrain.sourceforge.net/</a> + </div> + <div style="FONT-SIZE: 8pt; TEXT-ALIGN: justify"><br> + FreeTrain is free software, and was made possible by all the contributions + from various people. <a href="http://cs-sdl.sourceforge.net/">SdlDotNet</a> + is used to build FreeTrain. + </div> + </body> +</html> Copied: branches/FreeTrainSDL/core/Resources/balanceSheet.html (from rev 350, branches/FreeTrainSDL/core/Res/balanceSheet.html) =================================================================== --- branches/FreeTrainSDL/core/Resources/balanceSheet.html (rev 0) +++ branches/FreeTrainSDL/core/Resources/balanceSheet.html 2008-04-09 16:09:59 UTC (rev 355) @@ -0,0 +1,69 @@ +<html> + <head> + <title></title> + <style> + .caption { + background-color: activecaption; + color: captiontext; + font-weight: bold; + border: black solid 1px; + width: 100%; + } + .entry { + border-bottom: black solid 1px; + width: 100%; + } + .value { + text-align:right; + font-family: georgia; + } + .box { + width: 260px; + } + body { + border: none; + background-color: threedface; + margin-left: 0px; + margin-top: 0px; + cursor: default; + } + </style> + </head> + <body onselect="event.returnValue=false;event.cancelBubble=true;return false;"> + <table><tr> + <td width="50%" valign=top> + <table class=box><tr><td> + <table class=caption><tr><td> + Asset Value + <!--!資産評価--> + </td><td class=value> + 123 + </td></tr></table> + </td></tr><tr><td> + <table class=entry><tr><td> + Funds + <!--!資金--> + </td><td class=value> + 500,000,000 + </td></tr></table> + </td></tr></table> + </td> + <td width="50%" valign=top> + <table class=box><tr><td> + <table class=caption><tr><td> + Liabilities + <!--!負債--> + </td><td class=value> + 111 + </td></tr></table> + </td></tr><tr><td> + yen + <!--!Y--> + </td></tr></table> + </td> + </tr></table> + <br> + Anybody should feel free to twiddle with the HTML to make this look better! + <!--!誰かHTMLをいじってデザインをかっこよくしてください!--> + </body> +</html> Copied: branches/FreeTrainSDL/core/Resources/bulldozer.bmp (from rev 350, branches/FreeTrainSDL/core/Res/bulldozer.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/caution.bmp (from rev 350, branches/FreeTrainSDL/core/Res/caution.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/caution.gif (from rev 350, branches/FreeTrainSDL/core/Res/caution.gif) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/cliff.bmp (from rev 350, branches/FreeTrainSDL/core/Res/cliff.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/construction.wav (from rev 350, branches/FreeTrainSDL/core/Res/construction.wav) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/cursorChip.bmp (from rev 350, branches/FreeTrainSDL/core/Res/cursorChip.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/error.ico (from rev 350, branches/FreeTrainSDL/core/Res/error.ico) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/ex.png (from rev 350, branches/FreeTrainSDL/core/Res/ex.png) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/mountainPalette.xml (from rev 350, branches/FreeTrainSDL/core/Res/mountainPalette.xml) =================================================================== --- branches/FreeTrainSDL/core/Resources/mountainPalette.xml (rev 0) +++ branches/FreeTrainSDL/core/Resources/mountainPalette.xml 2008-04-09 16:09:59 UTC (rev 355) @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<?xml-stylesheet href="mountainPalette.xsl" type="text/xsl" ?> +<!-- + Defines colors of the mountain textures. + One set of palettes for each season. + + Try opening this file with Internet Explorer. + + @type must be either "hsv" or "rgb". + Different palette set may have different number of + colors, but they must be sorted from dark to bright. +--> +<mountainPalette> + <spring> + <color type="hsv"> 60,162, 90</color> + <color type="hsv"> 60,166,105</color> + <color type="hsv"> 60,170,120</color> + <color type="hsv"> 60,174,130</color> + <color type="hsv"> 60,176,140</color> + <color type="hsv"> 60,178,150</color> + <color type="hsv"> 60,180,165</color> + <color type="hsv"> 60,185,195</color> + </spring> + <summer> + <color type="hsv"> 69,185, 70</color> + <color type="hsv"> 69,180, 80</color> + <color type="hsv"> 69,175, 90</color> + <color type="hsv"> 69,170,100</color> + <color type="hsv"> 69,165,110</color> + <color type="hsv"> 69,160,120</color> + <color type="hsv"> 69,155,140</color> + <color type="hsv"> 69,150,170</color> + </summer> + <autumn> + <color type="hsv"> 39,125, 78</color> + <color type="hsv"> 39,138, 90</color> + <color type="hsv"> 39,150,106</color> + <color type="hsv"> 39,157,119</color> + <color type="hsv"> 39,159,132</color> + <color type="hsv"> 39,160,145</color> + <color type="hsv"> 39,161,165</color> + <color type="hsv"> 39,181,185</color> + </autumn> + <winter> + <color type="hsv">160, 20,166</color> + <color type="hsv">160, 14,180</color> + <color type="hsv">160, 7,190</color> + <color type="hsv">160, 5,200</color> + <color type="hsv">160, 3,210</color> + <color type="hsv">160, 1,220</color> + <color type="hsv">160, 0,230</color> + <color type="hsv">160, 0,239</color> + </winter> + <water> + <color type="hsv">149, 72, 60</color> + <color type="hsv">149, 77, 70</color> + <color type="hsv">149, 82, 80</color> + <color type="hsv">149, 87, 90</color> + <color type="hsv">149, 92,100</color> + <color type="hsv">149, 97,115</color> + <color type="hsv">149,107,135</color> + <color type="hsv">149,122,150</color> + </water> +</mountainPalette> Copied: branches/FreeTrainSDL/core/Resources/mountainPalette.xsl (from rev 350, branches/FreeTrainSDL/core/Res/mountainPalette.xsl) =================================================================== --- branches/FreeTrainSDL/core/Resources/mountainPalette.xsl (rev 0) +++ branches/FreeTrainSDL/core/Resources/mountainPalette.xsl 2008-04-09 16:09:59 UTC (rev 355) @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="iso-8859-1" ?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:msxsl="urn:schemas-microsoft-com:xslt" + xmlns:usr="http://www.kohsuke.org/freetrain/system/mountainPalette/" + > + + <xsl:template match="/"> + <html> + <head> + <title>Mountain Color Palette</title> + </head> + <style> + td { + text-align: center; + font-size: 8pt; + } + </style> + <body> + <xsl:for-each select="/*/*"> + <h1><xsl:value-of select="local-name(.)"/></h1> + <table><tr> + <xsl:for-each select="color"> + <xsl:variable name="rgb"> + <xsl:call-template name="get-color"/> + </xsl:variable> + <td style="background-color:rgb({$rgb}); width:100px; height:100px"> + (<xsl:value-of select="$rgb"/>) + </td> + </xsl:for-each> + </tr></table> + </xsl:for-each> + </body> + </html> + </xsl:template> + + + <!-- HSV to RGB conversion --> + <msxsl:script language="JScript" implements-prefix="usr"> + function toRGB(hsvStr) { + h = new Number(hsvStr.substring(0,hsvStr.indexOf(",")))/40.0; + s = new Number(hsvStr.substring(hsvStr.indexOf(",")+1,hsvStr.lastIndexOf(",")))/240.0; + v = new Number(hsvStr.substring(hsvStr.lastIndexOf(",")+1))/240.0; + + + i = Math.floor(h); + f = h-i; + if( i==0 || i==2 || i==4 || i==6 ) f=1.0-f; + + m = 256.0*v*(1.0-s); + n = 256.0*v*(1.0-s*f); + o = 256.0*v; + + if(i==0) return combine(o,n,m); + if(i==1) return combine(n,o,m); //+":"+v*240; + if(i==2) return combine(m,o,n); + if(i==3) return combine(m,n,o); + if(i==4) return combine(n,m,o); + if(i==5) return combine(o,m,n); + if(i==6) return combine(o,n,m); + return "255,0,0"; // error + } + + function combine(r,g,b) { + return Math.floor(r)+","+Math.floor(g)+","+Math.floor(b); + } + </msxsl:script> + + <xsl:template name="get-color"> + <xsl:choose> + <xsl:when test="@type='rgb'"> + <xsl:value-of select="text()"/> + </xsl:when> + <xsl:when test="@type='hsv'"> + <xsl:value-of select="usr:toRGB(string(text()))"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + unreconigzed type attribute "<xsl:value-of select="@type"/>" + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:template> +</xsl:stylesheet> Copied: branches/FreeTrainSDL/core/Resources/splash.jpg (from rev 350, branches/FreeTrainSDL/core/Res/splash.jpg) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/train.wav (from rev 350, branches/FreeTrainSDL/core/Res/train.wav) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/ugslope.bmp (from rev 350, branches/FreeTrainSDL/core/Res/ugslope.bmp) =================================================================== (Binary files differ) Copied: branches/FreeTrainSDL/core/Resources/vehiclePurchase.wav (from rev 350, branches/FreeTrainSDL/core/Res/vehiclePurchase.wav) =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-09 16:04:57
|
Revision: 354 http://freetrain.svn.sourceforge.net/freetrain/?rev=354&view=rev Author: jendave Date: 2008-04-09 09:04:34 -0700 (Wed, 09 Apr 2008) Log Message: ----------- Gui work Modified Paths: -------------- branches/FreeTrainSDL/Program.cs branches/FreeTrainSDL/core/Contributions/Others/EmptyNewGameContributionImpl.cs branches/FreeTrainSDL/core/Controllers/AbstractControllerImpl.cs branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs branches/FreeTrainSDL/core/Controllers/Rail/SpecialPurposeRailController.cs branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs branches/FreeTrainSDL/core/Framework/BGMManager.cs branches/FreeTrainSDL/core/Framework/Core.cs branches/FreeTrainSDL/core/Framework/ExternToolsHelper.cs branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/DirectSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/NightSurfaceLoader.cs branches/FreeTrainSDL/core/Framework/Graphics/SimpleSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/Surface.cs branches/FreeTrainSDL/core/FreeTrain.csproj branches/FreeTrainSDL/core/Properties/Resources.Designer.cs branches/FreeTrainSDL/core/Properties/Resources.resx branches/FreeTrainSDL/core/Views/Map/MapView.cs branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs branches/FreeTrainSDL/core/Views/WeatherOverlayImpl.cs branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs branches/FreeTrainSDL/core/World/Clock.cs branches/FreeTrainSDL/core/World/Direction.cs branches/FreeTrainSDL/core/World/Rail/FatPlatform.cs branches/FreeTrainSDL/core/World/Rail/Platform.cs branches/FreeTrainSDL/core/World/Rail/Station.cs branches/FreeTrainSDL/core/World/Rail/ThinPlatform.cs branches/FreeTrainSDL/core/World/Terrain/MountainVoxel.cs branches/FreeTrainSDL/plugins/Chiname.Generic/CategoryTreeWnd.cs branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/ColorConfigCommand.cs Added Paths: ----------- branches/FreeTrainSDL/core/Framework/MainWindow.Designer.cs branches/FreeTrainSDL/core/Framework/MainWindow.cs branches/FreeTrainSDL/core/Framework/MainWindow.resx branches/FreeTrainSDL/core/Resources/ branches/FreeTrainSDL/core/Resources/play.png Removed Paths: ------------- branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx Modified: branches/FreeTrainSDL/Program.cs =================================================================== --- branches/FreeTrainSDL/Program.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/Program.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -72,7 +72,7 @@ short oldX; short oldY; bool lastMouseState; - MainWindowMDI mainWindowMDI; + MainWindow mainWindowMDI; #endregion @@ -116,7 +116,7 @@ { if (qView != null) { - controller = MainWindowMDI.mainWindow.CurrentController; + controller = MainWindow.mainWindow.CurrentController; qView.UpdateScreen(); if (WorldDefinition.World.Satellite == null || WorldDefinition.World.Satellite.surface.w != 150 || @@ -217,7 +217,7 @@ sourceRect = new Sdl.SDL_Rect((short)ScrollPosition.X, (short)ScrollPosition.Y, (short)width, (short)height); dst = new Sdl.SDL_Rect(0, 0, (short)width, (short)height); - Tao.Sdl.Sdl.SDL_BlitSurface(qView.OffscreenBuffer.surfacePtr(), ref sourceRect, screen.Handle, ref dst); + Tao.Sdl.Sdl.SDL_BlitSurface(qView.OffscreenBuffer.SurfacePtr(), ref sourceRect, screen.Handle, ref dst); } FinalDraw(); @@ -270,7 +270,7 @@ Core.Init(null, null, null, new ProgressHandler(UpdateMessage), true); world = new WorldDefinition(new Distance(150, 150, 7), 3); WorldDefinition.World = world; - mainWindowMDI = new MainWindowMDI(); + mainWindowMDI = new MainWindow(); timer = new System.Windows.Forms.Timer(); Events.KeyboardDown += new EventHandler<KeyboardEventArgs>(this.KeyDown); Events.MouseButtonDown += Modified: branches/FreeTrainSDL/core/Contributions/Others/EmptyNewGameContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Others/EmptyNewGameContributionImpl.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Contributions/Others/EmptyNewGameContributionImpl.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -58,7 +58,7 @@ { using (NewWorldDialog dialog = new NewWorldDialog()) { - if (dialog.ShowDialog(MainWindowMDI.mainWindow) == DialogResult.OK) + if (dialog.ShowDialog(MainWindow.mainWindow) == DialogResult.OK) return dialog.createWorld(); else return null; Modified: branches/FreeTrainSDL/core/Controllers/AbstractControllerImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/AbstractControllerImpl.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Controllers/AbstractControllerImpl.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -53,7 +53,7 @@ // Attach the control when activated. try { - MainWindowMDI.mainWindow.AttachController(this); + MainWindow.mainWindow.AttachController(this); } catch (NullReferenceException nre) { @@ -68,9 +68,9 @@ protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { // Detach it when it is closed. - if (MainWindowMDI.mainWindow.CurrentController == this) + if (MainWindow.mainWindow.CurrentController == this) { - MainWindowMDI.mainWindow.DetachController(); + MainWindow.mainWindow.DetachController(); } } Modified: branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -52,8 +52,8 @@ { InitializeComponent(); this.contrib = _type; - this.Text = type.Name; - updateAfterResize(null, null); + this.Text = Type.Name; + UpdateAfterResize(null, null); //updatePreview(); } /// <summary> @@ -63,16 +63,18 @@ { if (this.picture.Image != null) this.picture.Image.Dispose(); - Bitmap bmp = type.PreviewBitmap; + Bitmap bmp = Type.PreviewBitmap; this.picture.Image = bmp; this.picture.BackColor = bmp.GetPixel(0, bmp.Size.Height - 1); } private LineContribution contrib; + /// <summary> /// /// </summary> - protected virtual LineContribution type { get { return contrib; } } + protected virtual LineContribution Type { get { return contrib; } } + /// <summary> /// /// </summary> @@ -181,9 +183,6 @@ private bool isPlacing { get { return buttonPlace.Checked; } } - - - /// <summary> /// The first location selected by the user. /// </summary> @@ -204,19 +203,16 @@ { loc.z = anchor.z; - if (type.DirectionMode == SpecialRailContribution.DirectionModes.FourWay) + if (Type.DirectionMode == SpecialRailContribution.DirectionModes.FourWay) return loc.align4To(anchor); - if (type.DirectionMode == SpecialRailContribution.DirectionModes.EightWay) + if (Type.DirectionMode == SpecialRailContribution.DirectionModes.EightWay) return loc.align8To(anchor); Debug.Assert(false); return UNPLACED; } - - - /// <summary> /// /// </summary> @@ -233,6 +229,7 @@ WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPos)); } } + /// <summary> /// /// </summary> @@ -253,18 +250,19 @@ { if (isPlacing) { - if (type.CanBeBuilt(anchor, loc)) + if (Type.CanBeBuilt(anchor, loc)) // build new railroads. - type.Build(anchor, loc); + Type.Build(anchor, loc); } else // remove existing ones - type.Remove(anchor, loc); + Type.Remove(anchor, loc); WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, loc)); } anchor = UNPLACED; } } + /// <summary> /// /// </summary> @@ -283,6 +281,7 @@ anchor = UNPLACED; } } + /// <summary> /// /// </summary> @@ -295,19 +294,20 @@ else return sameLevelDisambiguator; } } + private ILocationDisambiguator sameLevelDisambiguator; - private void modeChanged(object sender, EventArgs e) { anchor = UNPLACED; } + /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> - protected virtual void updateAfterResize(object sender, System.EventArgs e) + protected virtual void UpdateAfterResize(object sender, System.EventArgs e) { this.buttonPlace.Left = this.picture.Left; this.buttonPlace.Width = ((this.picture.Left + this.picture.Width)) / 2; @@ -316,9 +316,6 @@ UpdatePreview(); } - - - private bool inBetween(Location loc, Location lhs, Location rhs) { if (!loc.inBetween(lhs, rhs)) return false; @@ -339,8 +336,9 @@ public void DrawBefore(QuarterViewDrawer view, DrawContext canvas) { if (anchor != UNPLACED && isPlacing) - canvas.Tag = type.CanBeBuilt(anchor, currentPos); + canvas.Tag = Type.CanBeBuilt(anchor, currentPos); } + /// <summary> /// /// </summary> @@ -355,9 +353,10 @@ if (tag != null && (bool)tag && inBetween(loc, anchor, currentPos)) { Direction d = anchor.getDirectionTo(currentPos); - draw(d, canvas, pt); + Draw(d, canvas, pt); } } + /// <summary> /// /// </summary> @@ -370,7 +369,7 @@ /// <summary> /// Draw the preview on the given point. /// </summary> - protected virtual void draw(Direction d, DrawContext canvs, Point pt) + protected virtual void Draw(Direction d, DrawContext canvs, Point pt) { } } } Modified: branches/FreeTrainSDL/core/Controllers/Rail/SpecialPurposeRailController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/SpecialPurposeRailController.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Controllers/Rail/SpecialPurposeRailController.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -49,7 +49,7 @@ /// <param name="d"></param> /// <param name="canvas"></param> /// <param name="pt"></param> - protected override void draw(Direction d, DrawContext canvas, Point pt) + protected override void Draw(Direction d, DrawContext canvas, Point pt) { RailPattern.get(d, d.opposite).DrawAlpha(canvas.Surface, pt); } Modified: branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -55,7 +55,7 @@ /// <summary> /// /// </summary> - protected LineContribution type + protected override LineContribution Type { get { return currentContrib; } } /// <summary> @@ -64,7 +64,7 @@ /// <param name="d"></param> /// <param name="canvas"></param> /// <param name="pt"></param> - protected void Draw(Direction d, DrawContext canvas, Point pt) + protected override void Draw(Direction d, DrawContext canvas, Point pt) { ResourceUtil.emptyChip.DrawShape(canvas.Surface, pt, Color.Blue); // RoadPattern.getStraight(d).drawAlpha( canvas.surface, pt ); @@ -247,7 +247,7 @@ level.Text = ToStyleDescription(currentContrib.style); toolTip.SetToolTip(this.description, this.description.Text); currentContrib.PreviewPatternIdx = currentPattern; - this.Text = type.Name; + this.Text = this.Type.Name; UpdatePreview(); } Modified: branches/FreeTrainSDL/core/Framework/BGMManager.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/BGMManager.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/BGMManager.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -212,7 +212,7 @@ } catch (Exception e) { - MessageBox.Show(MainWindowMDI.mainWindow, + MessageBox.Show(MainWindow.mainWindow, "Can not play back\n" + e.StackTrace, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); //! "再生できません¥n"+e.StackTrace, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error ); } Modified: branches/FreeTrainSDL/core/Framework/Core.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Core.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/Core.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -303,7 +303,7 @@ /// <returns></returns> public bool OnFinal(IDictionary errorPlugins, int totalErrorCount) { - DialogResult res = MessageBox.Show(MainWindowMDI.mainWindow, @"Some plugins could not be loaded. + DialogResult res = MessageBox.Show(MainWindow.mainWindow, @"Some plugins could not be loaded. Some functions may not be available and you might encounter errors. In the worst case, game data might be lost, so it is advised that you quit now. Modified: branches/FreeTrainSDL/core/Framework/ExternToolsHelper.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/ExternToolsHelper.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/ExternToolsHelper.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -42,8 +42,8 @@ { if (initialized) Clear(); - if (MainWindowMDI.mainWindow == null) - MainWindowMDI.mainWindow = new MainWindowMDI(); + if (MainWindow.mainWindow == null) + MainWindow.mainWindow = new MainWindow(); if (progressHandler == null) progressHandler = new ProgressHandler(SilentProgress); Modified: branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -92,7 +92,7 @@ pt.X -= Offset.X; pt.Y -= Offset.Y; int idx = (WorldDefinition.World.ViewOptions.useNightView) ? 1 : 0; - surface.bltColorTransform(pt, Picture.surface, Origin, Size, + surface.BlitColorTransform(pt, Picture.surface, Origin, Size, srcColors[idx], dstColors[idx], false); } } Modified: branches/FreeTrainSDL/core/Framework/Graphics/DirectSprite.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/DirectSprite.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/Graphics/DirectSprite.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -57,6 +57,9 @@ /// </summary> private Surface surface; + /// <summary> + /// + /// </summary> protected Surface Surface { get { return surface; } @@ -66,6 +69,7 @@ /// <summary> /// The point in the image that will be aligned to /// the left-top corner of a voxel. + /// </summary> Point offset; /// <summary> @@ -108,7 +112,7 @@ { pt.X -= offset.X; pt.Y -= offset.Y; - surface.blt(pt, this.surface, origin, size); + surface.Blit(pt, this.surface, origin, size); } /// <summary> @@ -118,7 +122,7 @@ { pt.X -= offset.X; pt.Y -= offset.Y; - surface.bltShape(pt, this.surface, origin, size, color); + surface.BlitShape(pt, this.surface, origin, size, color); } /// <summary> /// @@ -129,7 +133,7 @@ { pt.X -= offset.X; pt.Y -= offset.Y; - surface.bltAlpha(pt, this.surface, origin, size); + surface.BlitAlpha(pt, this.surface, origin, size); } /// <summary> Modified: branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -69,7 +69,7 @@ int idx = (WorldDefinition.World.ViewOptions.useNightView) ? 1 : 0; - surface.bltHueTransform(pt, Picture.surface, Origin, Size, + surface.BlitHueTransform(pt, Picture.surface, Origin, Size, RedTarget, GreenTarget, BlueTarget); } Modified: branches/FreeTrainSDL/core/Framework/Graphics/NightSurfaceLoader.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/NightSurfaceLoader.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/Graphics/NightSurfaceLoader.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -70,7 +70,7 @@ if (this.nightSurface == null) { this.nightSurface = new Surface(fileName); - this.nightSurface.buildNightImage(); + this.nightSurface.BuildNightImage(); } if (surface != null) { Modified: branches/FreeTrainSDL/core/Framework/Graphics/SimpleSprite.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/SimpleSprite.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/Graphics/SimpleSprite.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -90,7 +90,7 @@ { pt.X -= offset.X; pt.Y -= offset.Y; - surface.blt(pt, picture.surface, origin, Size); + surface.Blit(pt, picture.surface, origin, Size); } /// <summary> @@ -100,7 +100,7 @@ { pt.X -= offset.X; pt.Y -= offset.Y; - surface.bltShape(pt, picture.surface, origin, size, color); + surface.BlitShape(pt, picture.surface, origin, size, color); } /// <summary> /// @@ -111,7 +111,7 @@ { pt.X -= offset.X; pt.Y -= offset.Y; - surface.bltAlpha(pt, picture.surface, origin, size); + surface.BlitAlpha(pt, picture.surface, origin, size); } /// <summary> Modified: branches/FreeTrainSDL/core/Framework/Graphics/Surface.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/Surface.cs 2008-04-08 22:34:08 UTC (rev 353) +++ branches/FreeTrainSDL/core/Framework/Graphics/Surface.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -66,16 +66,36 @@ /// <summary> /// /// </summary> - public IntPtr[] surfacePtrs = new IntPtr[TOTAL_SURFACES]; + private IntPtr[] surfacePtrs = new IntPtr[TOTAL_SURFACES]; + + /// <summary> + /// + /// </summary> + public IntPtr[] SurfacePtrs + { + get { return surfacePtrs; } + set { surfacePtrs = value; } + } + private String[] surfaceSignatures = new String[TOTAL_SURFACES]; /// <summary> /// /// </summary> - public IntPtr mask;//, dupSurface; + private IntPtr mask;//, dupSurface; + /// <summary> /// /// </summary> + public IntPtr Mask + { + get { return mask; } + set { mask = value; } + } + + /// <summary> + /// + /// </summary> public Sdl.SDL_Surface surface; //, dupSurface, mask; private Sdl.SDL_PixelFormat pixelFormat; @@ -103,9 +123,9 @@ { bpp = newbpp; this.surfacePtrs[0] = Sdl.SDL_CreateRGBSurface(flags, w, h, bpp, 0, 0, 0, 0); - this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.surfacePtr(), typeof(Sdl.SDL_Surface)); + this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.SurfacePtr(), typeof(Sdl.SDL_Surface)); pixelFormat = (Sdl.SDL_PixelFormat)Marshal.PtrToStructure(this.surface.format, typeof(Sdl.SDL_PixelFormat)); - this.resetClipRect(); + this.ResetClipRect(); this.currentSurfaceCount++; } @@ -115,6 +135,7 @@ /// <param name="w"></param> /// <param name="h"></param> public Surface(int w, int h) : this(w, h, IntPtr.Zero) { } + /// <summary> /// /// </summary> @@ -126,20 +147,21 @@ if (pf == IntPtr.Zero) { this.surfacePtrs[0] = Sdl.SDL_CreateRGBSurface(flags, w, h, bpp, 0, 0, 0, 0); - this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.surfacePtr(), typeof(Sdl.SDL_Surface)); + this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.SurfacePtr(), typeof(Sdl.SDL_Surface)); pixelFormat = (Sdl.SDL_PixelFormat)Marshal.PtrToStructure(this.surface.format, typeof(Sdl.SDL_PixelFormat)); } else { pixelFormat = (Sdl.SDL_PixelFormat)Marshal.PtrToStructure(pf, typeof(Sdl.SDL_PixelFormat)); this.surfacePtrs[0] = Sdl.SDL_CreateRGBSurface(flags, w, h, bpp, pixelFormat.Rmask, pixelFormat.Gmask, pixelFormat.Bmask, pixelFormat.Amask); - this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.surfacePtr(), typeof(Sdl.SDL_Surface)); + this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.SurfacePtr(), typeof(Sdl.SDL_Surface)); } this.SourceColorKey = Color.Magenta; - this.resetClipRect(); + this.ResetClipRect(); this.currentSurfaceCount++; } + /// <summary> /// /// </summary> @@ -147,20 +169,21 @@ public Surface(string filename) { this.surfacePtrs[0] = Tao.Sdl.SdlImage.IMG_Load(filename); - this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.surfacePtr(), typeof(Sdl.SDL_Surface)); + this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.SurfacePtr(), typeof(Sdl.SDL_Surface)); this.pixelFormat = (Sdl.SDL_PixelFormat)Marshal.PtrToStructure(this.surface.format, typeof(Sdl.SDL_PixelFormat)); this.SourceColorKey = Color.Magenta; - this.resetClipRect(); + this.ResetClipRect(); this.currentSurfaceCount++; this._filename = filename; } + internal Surface(IntPtr surface) { this.surfacePtrs[0] = surface; - this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.surfacePtr(), typeof(Sdl.SDL_Surface)); + this.surface = (Sdl.SDL_Surface)Marshal.PtrToStructure(this.SurfacePtr(), typeof(Sdl.SDL_Surface)); this.pixelFormat = (Sdl.SDL_PixelFormat)Marshal.PtrToStructure(this.surface.format, typeof(Sdl.SDL_PixelFormat)); this.SourceColorKey = Color.Magenta; - this.resetClipRect(); + this.ResetClipRect(); this.currentSurfaceCount++; } @@ -168,16 +191,17 @@ /// /// </summary> /// <returns></returns> - public IntPtr surfacePtr() { return this.surfacePtrs[0]; } + public IntPtr SurfacePtr() { return this.surfacePtrs[0]; } /// <summary> /// /// </summary> - public void resetClipRect() + public void ResetClipRect() { Sdl.SDL_Rect r = new Sdl.SDL_Rect(0, 0, (short)Size.Width, (short)Size.Height); - Sdl.SDL_SetClipRect(this.surfacePtr(), ref r); + Sdl.SDL_SetClipRect(this.SurfacePtr(), ref r); } + ///// <summary> ///// ///// </summary> @@ -193,12 +217,12 @@ /// <summary> /// /// </summary> - public Rectangle clipRect + public Rectangle ClipRect { get { Sdl.SDL_Rect r = new Sdl.SDL_Rect(); - Sdl.SDL_GetClipRect(this.surfacePtr(), ref r); + Sdl.SDL_GetClipRect(this.SurfacePtr(), ref r); return new Rectangle(r.x, r.y, r.w, r.h); } set @@ -208,7 +232,7 @@ srect.y = (short)value.Y; srect.w = (short)value.Width; srect.h = (short)value.Height; - Sdl.SDL_SetClipRect(this.surfacePtr(), ref srect); + Sdl.SDL_SetClipRect(this.SurfacePtr(), ref srect); } } @@ -263,7 +287,7 @@ /// <param name="source"></param> /// <param name="srcPos"></param> /// <param name="sz"></param> - public void blt(Point dstPos, Surface source, Point srcPos, Size sz) + public void Blit(Point dstPos, Surface source, Point srcPos, Size sz) { drect.x = (short)dstPos.X; drect.y = (short)dstPos.Y; @@ -273,7 +297,7 @@ srect.y = (short)srcPos.Y; srect.w = (short)sz.Width; srect.h = (short)sz.Height; - blt(drect, source, srect); + Blit(drect, source, srect); } /// <summary> @@ -281,7 +305,7 @@ /// </summary> /// <param name="dstPos"></param> /// <param name="source"></param> - public void blt(Point dstPos, Surface source) + public void Blit(Point dstPos, Surface source) { drect.x = (short)dstPos.X; drect.y = (short)dstPos.Y; @@ -291,19 +315,19 @@ srect.y = 0; srect.w = (short)source.Size.Width; srect.h = (short)source.Size.Height; - blt(drect, source, srect); + Blit(drect, source, srect); } - private void blt(Sdl.SDL_Rect dst, Surface source, Sdl.SDL_Rect src) + private void Blit(Sdl.SDL_Rect dst, Surface source, Sdl.SDL_Rect src) { - Tao.Sdl.Sdl.SDL_BlitSurface(source.surfacePtr(), ref src, this.surfacePtr(), ref dst); + Tao.Sdl.Sdl.SDL_BlitSurface(source.SurfacePtr(), ref src, this.SurfacePtr(), ref dst); } /// <summary> /// /// </summary> /// <param name="val"></param> - public void setAlpha(byte val) + public void SetAlpha(byte val) { //surface.AlphaBlending = true; //surface.Alpha = 128; @@ -317,7 +341,7 @@ /// <param name="source"></param> /// <param name="srcPos"></param> /// <param name="sz"></param> - public void bltAlpha(Point dstPos, Surface source, Point srcPos, Size sz) + public void BlitAlpha(Point dstPos, Surface source, Point srcPos, Size sz) { //Rectangle dst = new Rectangle( dstPos.X,dstPos.Y,sz.Width,sz.Height ); //Rectangle src = new Rectangle( srcPos.X,srcPos.Y,sz.Width,sz.Height ); @@ -327,7 +351,7 @@ src.Left, src.Top, src.Right, src.Bottom, source.colorKey );*/ //source.handle.Transparent = false; - source.setAlpha(128); + source.SetAlpha(128); //this.sourceColorKey = Color.Magenta; @@ -340,8 +364,8 @@ srect.w = (short)sz.Width; srect.h = (short)sz.Height; //Tao.Sdl.Sdl.SDL_BlitSurface(source.surfacePtr, ref nsrc, this.surfacePtr, ref ndst); - blt(drect, source, srect); - source.setAlpha(255); + Blit(drect, source, srect); + source.SetAlpha(255); } /// <summary> @@ -352,7 +376,7 @@ /// <param name="srcPos"></param> /// <param name="sz"></param> /// <param name="fill"></param> - public void bltShape(Point dstPos, Surface source, Point srcPos, Size sz, Color fill) + public void BlitShape(Point dstPos, Surface source, Point srcPos, Size sz, Color fill) { drect.x = (short)dstPos.X; drect.y = (short)dstPos.Y; @@ -379,7 +403,7 @@ //srect.x = 0; //srect.y = 0; - Tao.Sdl.Sdl.SDL_BlitSurface(this.surfacePtrs[index], ref srect, this.surfacePtr(), ref drect); + Tao.Sdl.Sdl.SDL_BlitSurface(this.surfacePtrs[index], ref srect, this.SurfacePtr(), ref drect); } private int checkMask(Surface source, Sdl.SDL_Rect r, Color fill) @@ -410,7 +434,7 @@ { drect.x = (short)xx; drect.y = (short)yy; - if (this.GetIntPixel(source.surfacePtr(), xx, yy) != pink1) Sdl.SDL_FillRect(surfacePtrs[curIndex], ref drect, col); + if (this.GetIntPixel(source.SurfacePtr(), xx, yy) != pink1) Sdl.SDL_FillRect(surfacePtrs[curIndex], ref drect, col); else Sdl.SDL_FillRect(surfacePtrs[curIndex], ref drect, pink2); } } @@ -428,7 +452,7 @@ /// <param name="x"></param> /// <param name="y"></param> /// <returns></returns> - public Color GetPixel(int x, int y) { return GetPixel(this.surfacePtr(), x, y); } + public Color GetPixel(int x, int y) { return GetPixel(this.SurfacePtr(), x, y); } /// <summary> /// /// </summary> @@ -449,7 +473,7 @@ { Sdl.SDL_Surface s; Sdl.SDL_PixelFormat pf; - if (surf != this.surfacePtr()) + if (surf != this.SurfacePtr()) { s = (Sdl.SDL_Surface)Marshal.PtrToStructure(surf, typeof(Sdl.SDL_Surface)); pf = (Sdl.SDL_PixelFormat)Marshal.PtrToStructure(s.format, typeof(Sdl.SDL_PixelFormat)); @@ -496,7 +520,6 @@ return value; } - ///// <summary> ///// ///// </summary> @@ -512,9 +535,9 @@ /// /// </summary> /// <returns></returns> - public Surface createFlippedVerticalSurface() + public Surface CreateFlippedVerticalSurface() { - return new Surface(SdlGfx.rotozoomSurfaceXY(this.surfacePtr(), 0, 1, -1, SdlGfx.SMOOTHING_OFF)); + return new Surface(SdlGfx.rotozoomSurfaceXY(this.SurfacePtr(), 0, 1, -1, SdlGfx.SMOOTHING_OFF)); } //public Tao.Sdl.Sdl.SDL_Surface createFlippedHorizontalSurface() { return null; } @@ -529,10 +552,10 @@ /// <param name="_srcColors"></param> /// <param name="_dstColors"></param> /// <param name="vflip"></param> - public void bltColorTransform(Point dstPos, Surface source, Point srcPos, Size sz, Color[] _srcColors, Color[] _dstColors, bool vflip) + public void BlitColorTransform(Point dstPos, Surface source, Point srcPos, Size sz, Color[] _srcColors, Color[] _dstColors, bool vflip) { if (vflip) Console.WriteLine("VFLIP ! VFLIP ! VFLIP ! VFLIP ! VFLIP ! VFLIP ! VFLIP ! "); - int index = source.reColor(_srcColors, _dstColors); + int index = source.ReColor(_srcColors, _dstColors); //blt(dstPos, source, srcPos,sz); drect.x = (short)dstPos.X; drect.y = (short)dstPos.Y; @@ -542,7 +565,7 @@ srect.y = (short)srcPos.Y; srect.w = (short)sz.Width; srect.h = (short)sz.Height; - Tao.Sdl.Sdl.SDL_BlitSurface(source.surfacePtrs[index], ref srect, this.surfacePtr(), ref drect); + Tao.Sdl.Sdl.SDL_BlitSurface(source.surfacePtrs[index], ref srect, this.SurfacePtr(), ref drect); } /// <summary> @@ -551,7 +574,7 @@ /// <param name="_srcColors"></param> /// <param name="_dstColors"></param> /// <returns></returns> - public int reColor(Color[] _srcColors, Color[] _dstColors) + public int ReColor(Color[] _srcColors, Color[] _dstColors) { String curSig = "recolor"; for (int curCol = 0; curCol < 4; curCol++) @@ -617,7 +640,7 @@ /// <param name="R_dest"></param> /// <param name="G_dest"></param> /// <param name="B_dest"></param> - public void bltHueTransform(Point dstPos, Surface source, Point srcPos, Size sz, Color R_dest, Color G_dest, Color B_dest) + public void BlitHueTransform(Point dstPos, Surface source, Point srcPos, Size sz, Color R_dest, Color G_dest, Color B_dest) { /*RECT dst = Util.toRECT( dstPos, sz ); RECT src = Util.toRECT( srcPos, sz ); @@ -748,7 +771,7 @@ /// <summary> /// /// </summary> - public void buildNightImage() + public void BuildNightImage() { /*byte[] src = new byte[16],src2 = new byte[16], dst = new byte[16]; for (int i = 0; i < 16; i++) @@ -896,7 +919,7 @@ /// </summary> public void Fill(Color c) { - Fill(clipRect, c); + Fill(ClipRect, c); } @@ -913,14 +936,14 @@ srect.y = (short)rect.Y; srect.w = (short)rect.Width; srect.h = (short)rect.Height; - Tao.Sdl.Sdl.SDL_FillRect(this.surfacePtr(), ref srect, Sdl.SDL_MapRGB(this.surface.format, c.R, c.G, c.B)); + Tao.Sdl.Sdl.SDL_FillRect(this.SurfacePtr(), ref srect, Sdl.SDL_MapRGB(this.surface.format, c.R, c.G, c.B)); } private int _colKey; private int colorKey { get { return _colKey; } - set { _colKey = value; Tao.Sdl.Sdl.SDL_SetColorKey(this.surfacePtr(), Sdl.SDL_SRCCOLORKEY | Sdl.SDL_RLEACCEL, _colKey); } + set { _colKey = value; Tao.Sdl.Sdl.SDL_SetColorKey(this.SurfacePtr(), Sdl.SDL_SRCCOLORKEY | Sdl.SDL_RLEACCEL, _colKey); } } /// <summary> @@ -1001,7 +1024,6 @@ /// <param name="surf"></param> /// <param name="colorValue"></param> /// <returns></returns> - [CLSCompliant(false)] public System.Drawing.Color GetColor(IntPtr surf, int colorValue) { byte r, g, b, a; @@ -1013,20 +1035,21 @@ /// /// </summary> /// <param name="r"></param> - public void drawBox(Rectangle r) { drawBox(r, Color.CornflowerBlue); } + public void DrawBox(Rectangle r) { DrawBox(r, Color.CornflowerBlue); } + /// <summary> /// /// </summary> /// <param name="r"></param> /// <param name="c"></param> - public void drawBox(Rectangle r, Color c) + public void DrawBox(Rectangle r, Color c) { /*surface.Draw(new SdlDotNet.Graphics.Primitives.Box((short)r.Left, (short)r.Top, (short)r.Right, (short)r.Bottom), c);*/ //SdlGfx.boxColor(this.surfacePtr(),(short)r.X,(short)r.Y,(short)(r.X+r.Width),(short)(r.Y+r.Height),Sdl.SDL_MapRGB(this.surface.format,c.R,c.G,c.B)); - SdlGfx.rectangleRGBA(this.surfacePtr(), (short)r.X, (short)r.Y, (short)(r.X + r.Width), (short)(r.Y + r.Height), c.R, c.G, c.B, 255); + SdlGfx.rectangleRGBA(this.SurfacePtr(), (short)r.X, (short)r.Y, (short)(r.X + r.Width), (short)(r.Y + r.Height), c.R, c.G, c.B, 255); } ///// <summary> @@ -1052,7 +1075,7 @@ /// </summary> /// <param name="col"></param> /// <param name="pts"></param> - public void fillPolygon(Color col, Point[] pts) + public void FillPolygon(Color col, Point[] pts) { //Surface tx = new Surface(Video.CreateRgbSurface(20,20)); //tx.fill(col); @@ -1064,17 +1087,18 @@ ptX[i] = (short)pts[i].X; ptY[i] = (short)pts[i].Y; } - Tao.Sdl.SdlGfx.filledPolygonRGBA(this.surfacePtr(), ptX, ptY, pts.GetLength(0), col.R, col.G, col.B, 255); + Tao.Sdl.SdlGfx.filledPolygonRGBA(this.SurfacePtr(), ptX, ptY, pts.GetLength(0), col.R, col.G, col.B, 255); } + /// <summary> /// /// </summary> /// <param name="col"></param> /// <param name="pts"></param> - public void drawLines(Color col, Point[] pts) + public void DrawLines(Color col, Point[] pts) { for (int curPoint = 0; curPoint <= (pts.GetLength(0) - 2); curPoint++) - Tao.Sdl.SdlGfx.lineRGBA(this.surfacePtr(), (short)pts[curPoint].X, (short)pts[curPoint].Y, (short)pts[curPoint + 1].X, (short)pts[curPoint + 1].Y, col.R, col.G, col.B, 255); + Tao.Sdl.SdlGfx.lineRGBA(this.SurfacePtr(), (short)pts[curPoint].X, (short)pts[curPoint].Y, (short)pts[curPoint + 1].X, (short)pts[curPoint + 1].Y, col.R, col.G, col.B, 255); // surface.Draw(new SdlDotNet.Graphics.Primitives.Line((Point)pts[curPoint], (Point)pts[curPoint + 1]), col,false,false); } @@ -1104,7 +1128,7 @@ try { Marshal.Copy(arr, 0, i, arr.Length); - Sdl.SDL_SaveBMP_RW(this.surfacePtr(), Sdl.SDL_RWFromMem(i, arr.Length), 1); + Sdl.SDL_SaveBMP_RW(this.SurfacePtr(), Sdl.SDL_RWFromMem(i, arr.Length), 1); Marshal.Copy(i, arr, 0, arr.Length); } catch (AccessViolationException e) Copied: branches/FreeTrainSDL/core/Framework/MainWindow.Designer.cs (from rev 353, branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs) =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindow.Designer.cs (rev 0) +++ branches/FreeTrainSDL/core/Framework/MainWindow.Designer.cs 2008-04-09 16:04:34 UTC (rev 354) @@ -0,0 +1,664 @@ +#region LICENSE +/* + * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#endregion LICENSE + +namespace FreeTrain.Framework +{ + partial class MainWindow + { + /// <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.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.fileMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.printToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.printPreviewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.printSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.editMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); + this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); + this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.viewMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.statusBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.plugingListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.windowsMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.newWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.cascadeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tileVerticalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tileHorizontalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.closeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.arrangeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.contentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.indexToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); + this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStrip = new System.Windows.Forms.ToolStrip(); + this.newToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.openToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.saveToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.printToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.printPreviewToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.helpToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.playButton = new System.Windows.Forms.ToolStripButton(); + this.statusStrip = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.ToolTip = new System.Windows.Forms.ToolTip(this.components); + this.menuStrip.SuspendLayout(); + this.toolStrip.SuspendLayout(); + this.statusStrip.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip + // + this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileMenu, + this.editMenu, + this.viewMenu, + this.toolsMenu, + this.windowsMenu, + this.helpMenu}); + this.menuStrip.Location = new System.Drawing.Point(0, 0); + this.menuStrip.MdiWindowListItem = this.windowsMenu; + this.menuStrip.Name = "menuStrip"; + this.menuStrip.Size = new System.Drawing.Size(525, 24); + this.menuStrip.TabIndex = 0; + this.menuStrip.Text = "MenuStrip"; + // + // fileMenu + // + this.fileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.openToolStripMenuItem, + this.toolStripSeparator3, + this.saveToolStripMenuItem, + this.saveAsToolStripMenuItem, + this.toolStripSeparator4, + this.printToolStripMenuItem, + this.printPreviewToolStripMenuItem, + this.printSetupToolStripMenuItem, + this.toolStripSeparator5, + this.exitToolStripMenuItem}); + this.fileMenu.ImageTransparentColor = System.Drawing.SystemColors.ActiveBorder; + this.fileMenu.Name = "fileMenu"; + this.fileMenu.Size = new System.Drawing.Size(35, 20); + this.fileMenu.Text = "&File"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image"))); + this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); + this.newToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.newToolStripMenuItem.Text = "&New"; + this.newToolStripMenuItem.Click += new System.EventHandler(this.ShowNewForm); + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image"))); + this.openToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); + this.openToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.openToolStripMenuItem.Text = "&Open"; + this.openToolStripMenuItem.Click += new System.EventHandler(this.OpenFile); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(137, 6); + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image"))); + this.saveToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); + this.saveToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.saveToolStripMenuItem.Text = "&Save"; + // + // saveAsToolStripMenuItem + // + this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; + this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.saveAsToolStripMenuItem.Text = "Save &As"; + this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.SaveAsToolStripMenuItem_Click); + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(137, 6); + // + // printToolStripMenuItem + // + this.printToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripMenuItem.Image"))); + this.printToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.printToolStripMenuItem.Name = "printToolStripMenuItem"; + this.printToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P))); + this.printToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.printToolStripMenuItem.Text = "&Print"; + // + // printPreviewToolStripMenuItem + // + this.printPreviewToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printPreviewToolStripMenuItem.Image"))); + this.printPreviewToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.printPreviewToolStripMenuItem.Name = "printPreviewToolStripMenuItem"; + this.printPreviewToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.printPreviewToolStripMenuItem.Text = "Print Pre&view"; + // + // printSetupToolStripMenuItem + // + this.printSetupToolStripMenuItem.Name = "printSetupToolStripMenuItem"; + this.printSetupToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.printSetupToolStripMenuItem.Text = "Print Setup"; + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(137, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.exitToolStripMenuItem.Text = "E&xit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.ExitToolsStripMenuItem_Click); + // + // editMenu + // + this.editMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.undoToolStripMenuItem, + this.redoToolStripMenuItem, + this.toolStripSeparator6, + this.cutToolStripMenuItem, + this.copyToolStripMenuItem, + this.pasteToolStripMenuItem, + this.toolStripSeparator7, + this.selectAllToolStripMenuItem}); + this.editMenu.Name = "editMenu"; + this.editMenu.Size = new System.Drawing.Size(37, 20); + this.editMenu.Text = "&Edit"; + // + // undoToolStripMenuItem + // + this.undoToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("undoToolStripMenuItem.Image"))); + this.undoToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; + this.undoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.undoToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.undoToolStripMenuItem.Text = "&Undo"; + // + // redoToolStripMenuItem + // + this.redoToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("redoToolStripMenuItem.Image"))); + this.redoToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.redoToolStripMenuItem.Name = "redoToolStripMenuItem"; + this.redoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.redoToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.redoToolStripMenuItem.Text = "&Redo"; + // + // toolStripSeparator6 + // + this.toolStripSeparator6.Name = "toolStripSeparator6"; + this.toolStripSeparator6.Size = new System.Drawing.Size(153, 6); + // + // cutToolStripMenuItem + // + this.cutToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripMenuItem.Image"))); + this.cutToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.cutToolStripMenuItem.Name = "cutToolStripMenuItem"; + this.cutToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); + this.cutToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.cutToolStripMenuItem.Text = "Cu&t"; + this.cutToolStripMenuItem.Click += new System.EventHandler(this.CutToolStripMenuItem_Click); + // + // copyToolStripMenuItem + // + this.copyToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripMenuItem.Image"))); + this.copyToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; + this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.copyToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.copyToolStripMenuItem.Text = "&Copy"; + this.copyToolStripMenuItem.Click += new System.EventHandler(this.CopyToolStripMenuItem_Click); + // + // pasteToolStripMenuItem + // + this.pasteToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripMenuItem.Image"))); + this.pasteToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; + this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem"; + this.pasteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.pasteToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.pasteToolStripMenuItem.Text = "&Paste"; + this.pasteToolStripMenuItem.Click += new System.EventHandler(this.PasteToolStripMenuItem_Click); + // + // toolStripSeparator7 + // + this.toolStripSeparator7.Name = "toolStripSeparator7"; + this.toolStripSeparator7.Size = new System.Drawing.Size(153, 6); + // + // selectAllToolStripMenuItem + // + this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem"; + this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); + this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.selectAllToolStripMenuItem.Text = "Select &All"; + // + // viewMenu + // + this.viewMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolBarToolStripMenuItem, + this.statusBarToolStripMenuItem}); + this.viewMenu.Name = "viewMenu"; + this.viewMenu.Size = new System.Drawing.Size(41, 20); + this.viewMenu.Text = "&View"; + // + // toolBarToolStripMenuItem + // + this.toolBarToolStripMenuItem.Checked = true; + this.toolBarToolStripMenuItem.CheckOnClick = true; + this.toolBarToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.toolBarToolStripMenuItem.Name = "toolBarToolStripMenuItem"; + this.toolBarToolStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.toolBarToolStripMenuItem.Text = "&Toolbar"; + this.toolBarToolStripMenuItem.Click += new System.EventHandler(this.ToolBarToolStripMenuItem_Click); + // + // statusBarToolStripMenuItem + // + this.statusBarToolStripMenuItem.Checked = true; + this.statusBarToolStripMenuItem.CheckOnClick = true; + this.statusBarToolStripMenu... [truncated message content] |
From: <je...@us...> - 2008-04-08 22:42:57
|
Revision: 353 http://freetrain.svn.sourceforge.net/freetrain/?rev=353&view=rev Author: jendave Date: 2008-04-08 15:34:08 -0700 (Tue, 08 Apr 2008) Log Message: ----------- Some new dialogs in the Gui Modified Paths: -------------- branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.resx branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.Designer.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.resx branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.Designer.cs branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.resx branches/FreeTrainSDL/core/Framework/ConfigDialog.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginListDialog.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/plugin.xml Added Paths: ----------- branches/FreeTrainSDL/gui/land.ico branches/FreeTrainSDL/gui/rail.ico branches/FreeTrainSDL/gui/train.ico Modified: branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.resx =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.resx 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.resx 2008-04-08 22:34:08 UTC (rev 353) @@ -249,6 +249,42 @@ <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <value>164, 118</value> </data> + <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAEAHBUAAAEAGABgBwAAFgAAACgAAAAcAAAAKgAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AACqzM53mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZt3mZv///93mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6q + zM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM4AAAAA + AAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gAAAAAAACqzM6qzM6qzM6qzM53mZsAAAB3 + mZt3mZv///+qzM6qzM6qzM6qzM4AAAAAAAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gA + AAAAAACqzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6q + zM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q + zM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6q + zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6q + zM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM4AAAAA + AAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gAAAAAAACqzM6qzM6qzM6qzM53mZsAAAB3 + mZt3mZv///+qzM6qzM6qzM6qzM4AAAAAAAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gA + AAAAAACqzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6q + zM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q + zM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6q + zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6q + zM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM4AAAAA + AAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gAAAAAAACqzM6qzM6qzM6qzM53mZsAAAB3 + mZt3mZv///+qzM6qzM6qzM6qzM4AAAAAAAD///9md3gAAAAAAAAAAAAAAAAAAAAAAAAAAAD///9md3gA + AAAAAACqzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6q + zM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q + zM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6qzM6qzM6qzM7///9md3iqzM6qzM6qzM6qzM6q + zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///////////////////////// + //////////////////////////////////////////////////////////////////////////8AAAB3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= +</value> + </data> <data name="$this.Text" xml:space="preserve"> <value>Railroad</value> </data> @@ -256,6 +292,6 @@ <value>RailRoadController</value> </data> <data name=">>$this.Type" xml:space="preserve"> - <value>FreeTrain.Controllers.AbstractControllerImpl, FreeTrain, Version=1.0.3012.24298, Culture=neutral, PublicKeyToken=bcc810b413ef8c1c</value> + <value>FreeTrain.Controllers.AbstractControllerImpl, FreeTrain, Version=1.0.3020.18062, Culture=neutral, PublicKeyToken=bcc810b413ef8c1c</value> </data> </root> \ No newline at end of file Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.Designer.cs 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.Designer.cs 2008-04-08 22:34:08 UTC (rev 353) @@ -254,6 +254,7 @@ this.ClientSize = new System.Drawing.Size(462, 222); this.Controls.Add(this.panel1); this.Controls.Add(this.panel2); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MinimumSize = new System.Drawing.Size(416, 195); this.Name = "TrainPlacementController"; this.Text = "Place Train"; Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.resx =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.resx 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.resx 2008-04-08 22:34:08 UTC (rev 353) @@ -172,4 +172,41 @@ AQEHAAEBBwABAQGABgABAQGABgABAwGAAQEEAAGAAf8BwAF/BAABwQH/AeAB/wQABP8EAAs= </value> </data> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAEAHBUAAAEAGABgBwAAFgAAACgAAAAcAAAAKgAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AACqzM53mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZt3mZv///93mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZsAAAB3mZt3mZv///+qzM6qzM6qzM53mZsAAAB3mZsAAAAAAAAAAAB3mZt3mZsAAAB3mZuq + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM4AAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACqzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3 + mZt3mZv///+qzM4AAACqzM53mZt3mZt3mZsAAAAAAAAAAAAAAAB3mZt3mZt3mZuqzM4AAAAAAACqzM6q + zM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM53mZt3mZuqzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM53mZsAAAAAAAAAAACqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM4A + AAC67vG67vG67vG67vG67vF3mZu67vG67vG67vG67vG67vGqzM4AAABmd3gAAAAAAAAAAAAAAAAAAAAA + AAAAAAB3mZsAAAB3mZt3mZv///+qzM4AAAAJU+cJU+cJU+e67vF3mZt3mZt3mZu67vGqzM4JU+cJU+cJ + U+cAAABmd3h3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAB3mZt3mZv///+qzM4AAACqzM4JU+cJU+e6 + 7vG67vG67vG67vG67vGqzM4JU+eqzM4JU+cAAABmd3h3mZtmd3h3mZtmd3h3mZtmd3h3mZt3mZsAAAB3 + mZt3mZv///+qzM4AAACqzM4JU+cJU+e67vEJU+cAAAAAAAAJU+eqzM4JU+eqzM4JU+cAAAAAAAB3mZsA + AACqzM4AAACqzM4AAACqzM53mZsAAAB3mZt3mZv///+qzM4AAAAJU+cJU+cJU+e67vEJU+cJU+cJU+cJ + U+eqzM4JU+cJU+cJU+cAAAAAAAB3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAB3mZt3mZv///+qzM4A + AAC67vG67vG67vG67vG67vG67vG67vG67vG67vG67vG67vG67vEAAABmd3h3mZuqzM6qzM6qzM6qzM6q + zM6qzM53mZsAAAB3mZt3mZv///+qzM4AAACqzM6qzM53mZt3mZt3mZt3mZt3mZt3mZt3mZuqzM6qzM66 + 7vEAAABmd3gAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZsAAAB3mZt3mZv///+qzM4AAAC67vG67vGqzM6q + zM6qzM6qzM6qzM6qzM6qzM667vG67vGqzM4AAAAAAAB3mZuqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3 + mZt3mZv///+qzM53mZt3mZt3mZt3mZt3mZt3mZsAAAB3mZt3mZt3mZt3mZt3mZt3mZsAAAB3mZuqzM6q + zM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM4AAAB3mZuqzM667vGqzM4AAACqzM66 + 7vGqzM6qzM53mZsAAAB3mZuqzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q + zM6qzM4AAAAAAAB3mZt3mZsAAAB3mZt3mZt3mZsAAAAAAAB3mZuqzM6qzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM4AAAAAAAAAAAAAAAAAAAAAAAB3mZuqzM6q + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///////////////////////// + //////////////////////////////////////////////////////////////////////////8AAAB3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= +</value> + </data> </root> \ No newline at end of file Modified: branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.Designer.cs 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.Designer.cs 2008-04-08 22:34:08 UTC (rev 353) @@ -48,6 +48,7 @@ /// </summary> private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MountainController)); this.buttonUp = new System.Windows.Forms.RadioButton(); this.buttonDown = new System.Windows.Forms.RadioButton(); this.preview = new System.Windows.Forms.PictureBox(); @@ -63,7 +64,7 @@ this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.buttonUp.Appearance = System.Windows.Forms.Appearance.Button; this.buttonUp.Checked = true; - this.buttonUp.Location = new System.Drawing.Point(4, 215); + this.buttonUp.Location = new System.Drawing.Point(4, 258); this.buttonUp.Name = "buttonUp"; this.buttonUp.Size = new System.Drawing.Size(56, 26); this.buttonUp.TabIndex = 2; @@ -75,7 +76,7 @@ // this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonDown.Appearance = System.Windows.Forms.Appearance.Button; - this.buttonDown.Location = new System.Drawing.Point(60, 215); + this.buttonDown.Location = new System.Drawing.Point(153, 258); this.buttonDown.Name = "buttonDown"; this.buttonDown.Size = new System.Drawing.Size(56, 26); this.buttonDown.TabIndex = 4; @@ -90,7 +91,7 @@ this.preview.InitialImage = null; this.preview.Location = new System.Drawing.Point(4, 5); this.preview.Name = "preview"; - this.preview.Size = new System.Drawing.Size(112, 81); + this.preview.Size = new System.Drawing.Size(205, 81); this.preview.TabIndex = 3; this.preview.TabStop = false; // @@ -102,7 +103,7 @@ this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label1.Location = new System.Drawing.Point(4, 93); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(112, 74); + this.label1.Size = new System.Drawing.Size(205, 117); this.label1.TabIndex = 6; this.label1.Text = "Press SHIFT and move mouse to quickly modify terrain."; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -113,9 +114,9 @@ | System.Windows.Forms.AnchorStyles.Right))); this.groupBox1.Controls.Add(this.selSize); this.groupBox1.Enabled = false; - this.groupBox1.Location = new System.Drawing.Point(4, 171); + this.groupBox1.Location = new System.Drawing.Point(4, 214); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(112, 38); + this.groupBox1.Size = new System.Drawing.Size(205, 38); this.groupBox1.TabIndex = 7; this.groupBox1.TabStop = false; this.groupBox1.Text = "Target Size"; @@ -128,19 +129,19 @@ this.selSize.dataSource = null; this.selSize.Location = new System.Drawing.Point(6, 14); this.selSize.Name = "selSize"; - this.selSize.Size = new System.Drawing.Size(96, 17); + this.selSize.Size = new System.Drawing.Size(189, 17); this.selSize.TabIndex = 6; // // MountainController // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(120, 245); + this.ClientSize = new System.Drawing.Size(213, 288); this.Controls.Add(this.groupBox1); this.Controls.Add(this.label1); this.Controls.Add(this.buttonUp); this.Controls.Add(this.buttonDown); this.Controls.Add(this.preview); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "MountainController"; this.Text = "Modify Terrain"; ((System.ComponentModel.ISupportInitialize)(this.preview)).EndInit(); Modified: branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.resx =================================================================== --- branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.resx 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.resx 2008-04-08 22:34:08 UTC (rev 353) @@ -117,4 +117,41 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAEAHBUAAAEAGABgBwAAFgAAACgAAAAcAAAAKgAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAB3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZt3mZv///93mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3 + mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///93mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZuqzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///8AAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB3mZt3mZuqzM6qzM6qzM6q + zM6qzM53mZsAAAB3mZt3mZv///+qzM4AAABEmUBEmUBmu2NEmUBmu2NEmUBEmUBmu2NEmUBEmUBmu2NE + mUBEmUBEmUAAAAB3mZt3mZuqzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM4AAABEmUBEmUBm + u2NEmUBmu2NEmUBEmUBEmUBmu2Nmu2NEmUBmu2NEmUBEmUAAAAB3mZt3mZuqzM6qzM6qzM53mZsAAAB3 + mZt3mZv///+qzM6qzM6qzM4AAABmu2Nmu2Nmu2Nmu2NEmUBmu2NEmUBEmUBmu2Nmu2NEmUBmu2NEmUBE + mUAAAAB3mZt3mZuqzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM4AAABEmUBEmUBmu2Nmu2NE + mUBmu2NEmUBEmUBmu2Nmu2NEmUBEmUBmu2NEmUAAAAB3mZt3mZuqzM53mZsAAAB3mZt3mZv///+qzM6q + zM6qzM6qzM6qzM4AAABmu2NEmUBmu2Nmu2NEmUBEmUBmu2NEmUBmu2Nmu2Nmu2NEmUBEmUBEmUAAAAB3 + mZt3mZt3mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM4AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACqzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3 + mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///+qzM6q + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM53mZsAAAB3mZt3mZv///+qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6q + zM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM6qzM53mZsAAAB3mZt3mZv///////////////////////// + //////////////////////////////////////////////////////////////////////////8AAAB3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZt3 + mZt3mZt3mZt3mZt3mZt3mZt3mZt3mZuqzM4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= +</value> + </data> </root> \ No newline at end of file Modified: branches/FreeTrainSDL/core/Framework/ConfigDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/ConfigDialog.cs 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Framework/ConfigDialog.cs 2008-04-08 22:34:08 UTC (rev 353) @@ -127,6 +127,7 @@ this.buttonCancel.Size = new System.Drawing.Size(80, 26); this.buttonCancel.TabIndex = 1; this.buttonCancel.Text = "&Cancel"; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); // // groupBox1 // @@ -274,6 +275,9 @@ Close(); } - + private void buttonCancel_Click(object sender, EventArgs e) + { + this.Close(); + } } } Modified: branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs 2008-04-08 22:34:08 UTC (rev 353) @@ -100,10 +100,11 @@ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.helpToolStripButton = new System.Windows.Forms.ToolStripButton(); this.playButton = new System.Windows.Forms.ToolStripButton(); + this.pauseButton = new System.Windows.Forms.ToolStripButton(); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.ToolTip = new System.Windows.Forms.ToolTip(this.components); - this.pauseButton = new System.Windows.Forms.ToolStripButton(); + this.plugingListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip.SuspendLayout(); this.toolStrip.SuspendLayout(); this.statusStrip.SuspendLayout(); @@ -150,7 +151,7 @@ this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; this.newToolStripMenuItem.Name = "newToolStripMenuItem"; this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); - this.newToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.newToolStripMenuItem.Text = "&New"; this.newToolStripMenuItem.Click += new System.EventHandler(this.ShowNewForm); // @@ -160,14 +161,14 @@ this.openToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; this.openToolStripMenuItem.Name = "openToolStripMenuItem"; this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.openToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.openToolStripMenuItem.Text = "&Open"; this.openToolStripMenuItem.Click += new System.EventHandler(this.OpenFile); // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(137, 6); + this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); // // saveToolStripMenuItem // @@ -175,20 +176,20 @@ this.saveToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.saveToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.saveToolStripMenuItem.Text = "&Save"; // // saveAsToolStripMenuItem // this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; - this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.saveAsToolStripMenuItem.Text = "Save &As"; this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.SaveAsToolStripMenuItem_Click); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(137, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6); // // printToolStripMenuItem // @@ -196,7 +197,7 @@ this.printToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; this.printToolStripMenuItem.Name = "printToolStripMenuItem"; this.printToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P))); - this.printToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.printToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.printToolStripMenuItem.Text = "&Print"; // // printPreviewToolStripMenuItem @@ -204,24 +205,24 @@ this.printPreviewToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printPreviewToolStripMenuItem.Image"))); this.printPreviewToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black; this.printPreviewToolStripMenuItem.Name = "printPreviewToolStripMenuItem"; - this.printPreviewToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.printPreviewToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.printPreviewToolStripMenuItem.Text = "Print Pre&view"; // // printSetupToolStripMenuItem // this.printSetupToolStripMenuItem.Name = "printSetupToolStripMenuItem"; - this.printSetupToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.printSetupToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.printSetupToolStripMenuItem.Text = "Print Setup"; // // toolStripSeparator5 // this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(137, 6); + this.toolStripSeparator5.Size = new System.Drawing.Size(149, 6); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.exitToolStripMenuItem.Text = "E&xit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.ExitToolsStripMenuItem_Click); // @@ -337,7 +338,8 @@ // toolsMenu // this.toolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.optionsToolStripMenuItem}); + this.optionsToolStripMenuItem, + this.plugingListToolStripMenuItem}); this.toolsMenu.Name = "toolsMenu"; this.toolsMenu.Size = new System.Drawing.Size(44, 20); this.toolsMenu.Text = "&Tools"; @@ -345,8 +347,9 @@ // optionsToolStripMenuItem // this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; - this.optionsToolStripMenuItem.Size = new System.Drawing.Size(111, 22); + this.optionsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.optionsToolStripMenuItem.Text = "&Options"; + this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); // // windowsMenu // @@ -546,6 +549,16 @@ this.playButton.Text = "Play"; this.playButton.Click += new System.EventHandler(this.playButton_Click); // + // pauseButton + // + this.pauseButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.pauseButton.Image = ((System.Drawing.Image)(resources.GetObject("pauseButton.Image"))); + this.pauseButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.pauseButton.Name = "pauseButton"; + this.pauseButton.Size = new System.Drawing.Size(23, 22); + this.pauseButton.Text = "Pause"; + this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click); + // // statusStrip // this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -562,15 +575,12 @@ this.toolStripStatusLabel.Size = new System.Drawing.Size(38, 17); this.toolStripStatusLabel.Text = "Status"; // - // pauseButton + // plugingListToolStripMenuItem // - this.pauseButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.pauseButton.Image = ((System.Drawing.Image)(resources.GetObject("pauseButton.Image"))); - this.pauseButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.pauseButton.Name = "pauseButton"; - this.pauseButton.Size = new System.Drawing.Size(23, 22); - this.pauseButton.Text = "Pause"; - this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click); + this.plugingListToolStripMenuItem.Name = "plugingListToolStripMenuItem"; + this.plugingListToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.plugingListToolStripMenuItem.Text = "Plugin List"; + this.plugingListToolStripMenuItem.Click += new System.EventHandler(this.plugingListToolStripMenuItem_Click); // // MainWindowMDI // @@ -658,6 +668,7 @@ public System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel; private System.Windows.Forms.ToolStripButton playButton; private System.Windows.Forms.ToolStripButton pauseButton; + private System.Windows.Forms.ToolStripMenuItem plugingListToolStripMenuItem; } } Modified: branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs 2008-04-08 22:34:08 UTC (rev 353) @@ -86,10 +86,7 @@ slopeRailRoadController.MdiParent = this; slopeRailRoadController.WindowState = FormWindowState.Maximized; slopeRailRoadController.Show(); - PluginListDialog pluginListDialog = new PluginListDialog(); - pluginListDialog.MdiParent = this; - pluginListDialog.WindowState = FormWindowState.Maximized; - pluginListDialog.Show(); + //RoadController roadController = new RoadController(); //roadController.MdiParent = mainWindowMDI; //roadController.Show(); @@ -156,7 +153,7 @@ private void ShowNewForm(object sender, EventArgs e) { // Create a new instance of the child form. - Form childForm = new Form(); + NewWorldDialog childForm = new NewWorldDialog(); // Make it a child of this MDI form before showing it. childForm.MdiParent = this; childForm.Text = "Window " + childFormNumber++; @@ -271,5 +268,20 @@ //MainWindowMDI.mainWindow.CurrentController = MainWindowMDI.mainWindow.br //MainWindowMDI.mainWindow.AttachController(MainWindowMDI.mainWindow.CurrentController); } + + private void optionsToolStripMenuItem_Click(object sender, EventArgs e) + { + ConfigDialog configDialog = new ConfigDialog(); + configDialog.MdiParent = this; + configDialog.Show(); + } + + private void plugingListToolStripMenuItem_Click(object sender, EventArgs e) + { + PluginListDialog pluginListDialog = new PluginListDialog(); + pluginListDialog.MdiParent = this; + pluginListDialog.WindowState = FormWindowState.Maximized; + pluginListDialog.Show(); + } } } Modified: branches/FreeTrainSDL/core/Framework/Plugin/PluginListDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/PluginListDialog.cs 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/core/Framework/Plugin/PluginListDialog.cs 2008-04-08 22:34:08 UTC (rev 353) @@ -32,7 +32,7 @@ public class PluginListDialog : System.Windows.Forms.Form { private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button buttonOk; private System.Windows.Forms.ListView list; private System.Windows.Forms.ColumnHeader titleColumn; private System.Windows.Forms.ColumnHeader authorColumn; @@ -76,7 +76,7 @@ "test"}, 0, System.Drawing.SystemColors.WindowText, System.Drawing.SystemColors.Window, new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)))); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PluginListDialog)); this.panel1 = new System.Windows.Forms.Panel(); - this.button1 = new System.Windows.Forms.Button(); + this.buttonOk = new System.Windows.Forms.Button(); this.list = new System.Windows.Forms.ListView(); this.titleColumn = new System.Windows.Forms.ColumnHeader(); this.authorColumn = new System.Windows.Forms.ColumnHeader(); @@ -87,23 +87,24 @@ // // panel1 // - this.panel1.Controls.Add(this.button1); + this.panel1.Controls.Add(this.buttonOk); this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel1.Location = new System.Drawing.Point(0, 232); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(424, 43); this.panel1.TabIndex = 0; // - // button1 + // buttonOk // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.DialogResult = System.Windows.Forms.DialogResult.OK; - this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.button1.Location = new System.Drawing.Point(328, 9); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(88, 26); - this.button1.TabIndex = 0; - this.button1.Text = "&OK"; + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOk.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.buttonOk.Location = new System.Drawing.Point(328, 9); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(88, 26); + this.buttonOk.TabIndex = 0; + this.buttonOk.Text = "&OK"; + this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); // // list // @@ -171,5 +172,10 @@ new string[] { p.title, p.author, p.homepage }, 0)); } } + + private void buttonOk_Click(object sender, EventArgs e) + { + this.Close(); + } } } Added: branches/FreeTrainSDL/gui/land.ico =================================================================== (Binary files differ) Property changes on: branches/FreeTrainSDL/gui/land.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/FreeTrainSDL/gui/rail.ico =================================================================== (Binary files differ) Property changes on: branches/FreeTrainSDL/gui/rail.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/FreeTrainSDL/gui/train.ico =================================================================== (Binary files differ) Property changes on: branches/FreeTrainSDL/gui/train.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/FreeTrainSDL/plugins/Chiname.DummyCars/plugin.xml =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.DummyCars/plugin.xml 2008-04-08 18:03:01 UTC (rev 352) +++ branches/FreeTrainSDL/plugins/Chiname.DummyCars/plugin.xml 2008-04-08 22:34:08 UTC (rev 353) @@ -1,23 +1,23 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<plug-in> - <title>Parking Area</title> - <!--//!<title>横断歩道</title> +<?xml version="1.0" encoding="UTF-8" ?> +<plug-in> + <title>Parking Area</title> + <!--//!<title>横断歩道</title> <title>駐車場</title>--> <author>C477</author> - <!--!<author>C477@2両目</author>--> - <homepage>http://www.rocket.ne.jp/~nao/</homepage> - - <contribution type="contribution" id="{0A73F9C6-BDCC-43DF-C477-E28B76058E8C}"> - <name>DummyCar</name> - <class name="FreeTrain.Framework.Plugin.FixedClassContributionFactory"/> - <implementation name="FreeTrain.World.Road.DummyCars.DummyCarContribution" - codebase="FreeTrain.World.Road.DummyCars.dll" /> - </contribution> - - <!-- temporary --> - <contribution type="menu" id="{BFC035E9-8B0E-41D6-C477-72F99D820290}"> - <class name="FreeTrain.World.Road.DummyCars.MenuContributionImpl" - codebase="FreeTrain.World.Road.DummyCars.dll" /> - </contribution> - -</plug-in> + <!--!<author>C477@2両目</author>--> + <homepage>http://www.rocket.ne.jp/~nao/</homepage> + + <contribution type="contribution" id="{0A73F9C6-BDCC-43DF-C477-E28B76058E8C}"> + <name>DummyCar</name> + <class name="FreeTrain.Framework.Plugin.FixedClassContributionFactory"/> + <implementation name="FreeTrain.World.Road.DummyCars.DummyCarContribution" + codebase="FreeTrain.World.Road.DummyCars.dll" /> + </contribution> + + <!-- temporary --> + <contribution type="menu" id="{BFC035E9-8B0E-41D6-C477-72F99D820290}"> + <class name="FreeTrain.World.Road.DummyCars.MenuContributionImpl" + codebase="FreeTrain.World.Road.DummyCars.dll" /> + </contribution> + +</plug-in> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-08 18:03:11
|
Revision: 352 http://freetrain.svn.sourceforge.net/freetrain/?rev=352&view=rev Author: jendave Date: 2008-04-08 11:03:01 -0700 (Tue, 08 Apr 2008) Log Message: ----------- fix casing issue Modified Paths: -------------- branches/FreeTrainSDL/core/Framework/ResourceUtil.cs Modified: branches/FreeTrainSDL/core/Framework/ResourceUtil.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/ResourceUtil.cs 2008-04-08 17:59:05 UTC (rev 351) +++ branches/FreeTrainSDL/core/Framework/ResourceUtil.cs 2008-04-08 18:03:01 UTC (rev 352) @@ -46,19 +46,19 @@ { string path; - path = Path.Combine(Core.InstallationDirectory, Path.Combine("res", name)); + path = Path.Combine(Core.InstallationDirectory, Path.Combine("Res", name)); if (File.Exists(path)) return path; - path = Path.Combine(Core.InstallationDirectory, Path.Combine("..", Path.Combine("..", Path.Combine("core", Path.Combine("res", name))))); + path = Path.Combine(Core.InstallationDirectory, Path.Combine("..", Path.Combine("..", Path.Combine("core", Path.Combine("Res", name))))); if (File.Exists(path)) return path; - path = Path.Combine("..", Path.Combine("..", Path.Combine("res", name))); + path = Path.Combine("..", Path.Combine("..", Path.Combine("Res", name))); if (File.Exists(path)) return path; - path = Path.Combine("..", Path.Combine("res", name)); + path = Path.Combine("..", Path.Combine("Res", name)); if (File.Exists(path)) return path; Assembly assembly = Assembly.GetAssembly(typeof(ResourceUtil)); - path = Path.Combine(Path.Combine(assembly.Location, ".."), Path.Combine("res", name)); + path = Path.Combine(Path.Combine(assembly.Location, ".."), Path.Combine("Res", name)); if (File.Exists(path)) return path; throw new FileNotFoundException("System resource: " + path); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-08 17:59:07
|
Revision: 351 http://freetrain.svn.sourceforge.net/freetrain/?rev=351&view=rev Author: jendave Date: 2008-04-08 10:59:05 -0700 (Tue, 08 Apr 2008) Log Message: ----------- make it easier for Monodevelop to find the resource files Modified Paths: -------------- branches/FreeTrainSDL/core/FreeTrain.csproj Property Changed: ---------------- branches/FreeTrainSDL/plugins/Chiname.DummyCars/ branches/FreeTrainSDL/plugins/Chiname.Generic/ branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/ branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/ Modified: branches/FreeTrainSDL/core/FreeTrain.csproj =================================================================== --- branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-08 16:56:34 UTC (rev 350) +++ branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-08 17:59:05 UTC (rev 351) @@ -860,19 +860,45 @@ <Link>plugin.xml</Link> </Content> <Content Include="Contributions\readme.txt" /> - <Content Include="Res\Arrows.bmp" /> - <Content Include="Res\BridgePier.bmp" /> - <Content Include="Res\ConstructionBones.bmp" /> - <Content Include="Res\ConstructionFence.bmp" /> - <Content Include="Res\ConstructionGround.bmp" /> - <Content Include="Res\ConstructionWall.bmp" /> - <Content Include="Res\DayNight.bmp" /> - <Content Include="Res\EmptyChip.bmp" /> - <Content Include="Res\Item.bmp" /> - <Content Include="Res\RailRoads.bmp" /> - <Content Include="Res\Toolbar.bmp" /> - <Content Include="Res\ugslope.bmp" /> - <Content Include="Res\YardChip.bmp" /> + <Content Include="Res\Arrows.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\BridgePier.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\ConstructionBones.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\ConstructionFence.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\ConstructionGround.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\ConstructionWall.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\DayNight.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\EmptyChip.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\Item.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\RailRoads.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\Toolbar.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\ugslope.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Res\YardChip.bmp"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> <EmbeddedResource Include="Contributions\Others\NewWorldDialog.resx"> <DependentUpon>NewWorldDialog.cs</DependentUpon> </EmbeddedResource> @@ -983,7 +1009,9 @@ <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.ja-JP.Designer.cs</LastGenOutput> </EmbeddedResource> - <EmbeddedResource Include="Res\splash.jpg" /> + <EmbeddedResource Include="Res\splash.jpg"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> <EmbeddedResource Include="Util\Command\CommandManager.resx"> <DependentUpon>CommandManager.cs</DependentUpon> </EmbeddedResource> Property changes on: branches/FreeTrainSDL/plugins/Chiname.DummyCars ___________________________________________________________________ Name: svn:ignore - Tao.Sdl.dll.config Tao.Sdl.dll SdlDotNet.dll.config SdlDotNet.dll FreeTrain.World.Road.DummyCars.dll.mdb FreeTrain.DummyCars.pidb FreeTrain.dll.mdb FreeTrain.dll FreeTrain.Controls.dll.mdb FreeTrain.Controls.dll ControllerForm.resources SDLGFX.net.xml DummyCars.dll DummyCars.pdb RoadAccessory.dll RoadAccessory.pdb RoadAccessory.XML SDLGFX.net.dll SDLGFX.net.pdb *.XML FreeTrain.DummyCars.dll FreeTrain.DummyCars.pdb FreeTrain.DummyCars.xml FreeTrain.RoadAccessory.dll FreeTrain.RoadAccessory.pdb FreeTrain.RoadAccessory.xml .plugin.xml.swp FreeTrain.World.Road.Accessory.dll FreeTrain.World.Road.Accessory.pdb FreeTrain.World.Road.DummyCars.dll FreeTrain.World.Road.DummyCars.pdb FreeTrain.World.Road.Accessory.xml FreeTrain.World.Road.DummyCars.xml obj + Tao.Sdl.dll.config Tao.Sdl.dll SdlDotNet.dll.config SdlDotNet.dll FreeTrain.World.Road.DummyCars.dll.mdb FreeTrain.DummyCars.pidb FreeTrain.dll.mdb FreeTrain.dll FreeTrain.Controls.dll.mdb FreeTrain.Controls.dll ControllerForm.resources SDLGFX.net.xml DummyCars.dll DummyCars.pdb RoadAccessory.dll RoadAccessory.pdb RoadAccessory.XML SDLGFX.net.dll SDLGFX.net.pdb *.XML FreeTrain.DummyCars.dll FreeTrain.DummyCars.pdb FreeTrain.DummyCars.xml FreeTrain.RoadAccessory.dll FreeTrain.RoadAccessory.pdb FreeTrain.RoadAccessory.xml .plugin.xml.swp FreeTrain.World.Road.Accessory.dll FreeTrain.World.Road.Accessory.pdb FreeTrain.World.Road.DummyCars.dll FreeTrain.World.Road.DummyCars.pdb FreeTrain.World.Road.Accessory.xml FreeTrain.World.Road.DummyCars.xml obj Res Property changes on: branches/FreeTrainSDL/plugins/Chiname.Generic ___________________________________________________________________ Name: svn:ignore - obj FreeTrain.ExpandedContributions.dll FreeTrain.ExpandedContributions.pdb FreeTrain.ExpandedContributions.xml SDLGFX.net.dll SDLGFX.net.pdb SDLGFX.net.xml *.tmp .plugin.xml.swp bin FreeTrain.Framework.Plugin.Generic.dll FreeTrain.Framework.Plugin.Generic.pdb FreeTrain.Framework.Plugin.Generic.xml + obj FreeTrain.ExpandedContributions.dll FreeTrain.ExpandedContributions.pdb FreeTrain.ExpandedContributions.xml SDLGFX.net.dll SDLGFX.net.pdb SDLGFX.net.xml *.tmp .plugin.xml.swp bin FreeTrain.Framework.Plugin.Generic.dll FreeTrain.Framework.Plugin.Generic.pdb FreeTrain.Framework.Plugin.Generic.xml Res Property changes on: branches/FreeTrainSDL/plugins/Chiname.RoadAccessory ___________________________________________________________________ Name: svn:ignore - SDLGFX.net.xml DummyCars.dll DummyCars.pdb RoadAccessory.dll RoadAccessory.pdb RoadAccessory.XML SDLGFX.net.dll SDLGFX.net.pdb *.XML FreeTrain.DummyCars.dll FreeTrain.DummyCars.pdb FreeTrain.DummyCars.xml FreeTrain.RoadAccessory.dll FreeTrain.RoadAccessory.pdb FreeTrain.RoadAccessory.xml .plugin.xml.swp FreeTrain.World.Road.Accessory.dll FreeTrain.World.Road.Accessory.pdb FreeTrain.World.Road.DummyCars.dll FreeTrain.World.Road.DummyCars.pdb FreeTrain.World.Road.Accessory.xml FreeTrain.World.Road.DummyCars.xml obj + SDLGFX.net.xml DummyCars.dll DummyCars.pdb RoadAccessory.dll RoadAccessory.pdb RoadAccessory.XML SDLGFX.net.dll SDLGFX.net.pdb *.XML FreeTrain.DummyCars.dll FreeTrain.DummyCars.pdb FreeTrain.DummyCars.xml FreeTrain.RoadAccessory.dll FreeTrain.RoadAccessory.pdb FreeTrain.RoadAccessory.xml .plugin.xml.swp FreeTrain.World.Road.Accessory.dll FreeTrain.World.Road.Accessory.pdb FreeTrain.World.Road.DummyCars.dll FreeTrain.World.Road.DummyCars.pdb FreeTrain.World.Road.Accessory.xml FreeTrain.World.Road.DummyCars.xml obj Res Property changes on: branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel ___________________________________________________________________ Name: svn:ignore - bin obj AxSHDocVw.dll FreeTrain.Controls.dll FreeTrain.Controls.pdb FreeTrain.Controls.xml FreeTrain.HalfVoxelStructure.dll FreeTrain.HalfVoxelStructure.pdb FreeTrain.HalfVoxelStructure.xml SDLGFX.net.dll SDLGFX.net.pdb SDLGFX.net.xml .plugin.xml.swp FreeTrain.World.Structs.HalfVoxelStructure.dll FreeTrain.World.Structs.HalfVoxelStructure.pdb FreeTrain.World.Structs.HalfVoxelStructure.xml + bin obj AxSHDocVw.dll FreeTrain.Controls.dll FreeTrain.Controls.pdb FreeTrain.Controls.xml FreeTrain.HalfVoxelStructure.dll FreeTrain.HalfVoxelStructure.pdb FreeTrain.HalfVoxelStructure.xml SDLGFX.net.dll SDLGFX.net.pdb SDLGFX.net.xml .plugin.xml.swp FreeTrain.World.Structs.HalfVoxelStructure.dll FreeTrain.World.Structs.HalfVoxelStructure.pdb FreeTrain.World.Structs.HalfVoxelStructure.xml Res Property changes on: branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain ___________________________________________________________________ Name: svn:ignore - bin obj FreeTrain.ColorTestTrain.dll FreeTrain.ColorTestTrain.pdb FreeTrain.ColorTestTrain.xml FreeTrain.World.Rail.ColorTestTrain.dll FreeTrain.World.Rail.ColorTestTrain.pdb FreeTrain.World.Rail.ColorTestTrain.xml + bin obj FreeTrain.ColorTestTrain.dll FreeTrain.ColorTestTrain.pdb FreeTrain.ColorTestTrain.xml FreeTrain.World.Rail.ColorTestTrain.dll FreeTrain.World.Rail.ColorTestTrain.pdb FreeTrain.World.Rail.ColorTestTrain.xml Res Property changes on: branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse ___________________________________________________________________ Name: svn:ignore - bin obj FreeTrain.VinylHouse.dll FreeTrain.VinylHouse.pdb FreeTrain.VinylHouse.xml SDLGFX.net.dll SDLGFX.net.pdb SDLGFX.net.xml .plugin.xml.swp FreeTrain.World.Land.VinylHouse.dll FreeTrain.World.Land.VinylHouse.pdb FreeTrain.World.Land.VinylHouse.xml + bin obj FreeTrain.VinylHouse.dll FreeTrain.VinylHouse.pdb FreeTrain.VinylHouse.xml SDLGFX.net.dll SDLGFX.net.pdb SDLGFX.net.xml .plugin.xml.swp FreeTrain.World.Land.VinylHouse.dll FreeTrain.World.Land.VinylHouse.pdb FreeTrain.World.Land.VinylHouse.xml Res This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-08 16:58:38
|
Revision: 350 http://freetrain.svn.sourceforge.net/freetrain/?rev=350&view=rev Author: jendave Date: 2008-04-08 09:56:34 -0700 (Tue, 08 Apr 2008) Log Message: ----------- lots of renaming. Split out multiple classes from single files Modified Paths: -------------- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs branches/FreeTrainSDL/core/Contributions/Common/IPreviewWorldBuilder.cs branches/FreeTrainSDL/core/Contributions/Common/LineContribution.cs branches/FreeTrainSDL/core/Contributions/Common/PictureContribution.cs branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs branches/FreeTrainSDL/core/Contributions/Common/StructureGroup.cs branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs branches/FreeTrainSDL/core/Contributions/Land/DefaultControllerImpl.cs branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Rail/RailStationaryContribution.cs branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs branches/FreeTrainSDL/core/Contributions/Road/A3RoadContribution.cs branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs branches/FreeTrainSDL/core/Contributions/Structs/CommercialStructureContribution.cs branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs branches/FreeTrainSDL/core/Contributions/Train/AbstractTrainContributionImpl.cs branches/FreeTrainSDL/core/Contributions/Train/AsymTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/SymTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/TrainCarContribution.cs branches/FreeTrainSDL/core/Contributions/Train/TrainContribution.cs branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs branches/FreeTrainSDL/core/Controllers/CubeSelectorController.cs branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs branches/FreeTrainSDL/core/Controllers/Rail/SpecialPurposeRailController.cs branches/FreeTrainSDL/core/Controllers/Rail/StationPassagewayController.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs branches/FreeTrainSDL/core/Controllers/Road/RoadController.cs branches/FreeTrainSDL/core/Controllers/Structs/FixedSizeStructController.cs branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs branches/FreeTrainSDL/core/Controllers/Structs/VarHeightBuildingController.cs branches/FreeTrainSDL/core/Framework/Core.cs branches/FreeTrainSDL/core/Framework/Graphics/AlphaBlendSpriteSet.cs branches/FreeTrainSDL/core/Framework/Graphics/ColorLibrary.cs branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/DefaultSpriteLoaderContributionImpl.cs branches/FreeTrainSDL/core/Framework/Graphics/DirectSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/ISprite.cs branches/FreeTrainSDL/core/Framework/Graphics/NullSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/PreviewDrawer.cs branches/FreeTrainSDL/core/Framework/Graphics/SimpleSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/SpriteFactory.cs branches/FreeTrainSDL/core/Framework/Graphics/SpriteFactoryContribution.cs branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginManager.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginSerializationBinder.cs branches/FreeTrainSDL/core/FreeTrain.csproj branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs branches/FreeTrainSDL/core/Views/WeatherOverlayImpl.cs branches/FreeTrainSDL/core/World/Accounting/AccountSummaryWindow.cs branches/FreeTrainSDL/core/World/Development/CommercialStructurePlan.cs branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs branches/FreeTrainSDL/core/World/Development/LandPlan.cs branches/FreeTrainSDL/core/World/Development/VarHeightBuildingPlan.cs branches/FreeTrainSDL/core/World/Land/LandPropertyVoxel.cs branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs branches/FreeTrainSDL/core/World/RRCrossing.cs branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs branches/FreeTrainSDL/core/World/Rail/BridgeRail.cs branches/FreeTrainSDL/core/World/Rail/FatPlatform.cs branches/FreeTrainSDL/core/World/Rail/PassagewayRail.cs branches/FreeTrainSDL/core/World/Rail/RailRoad.cs branches/FreeTrainSDL/core/World/Rail/RailStationaryStructure.cs branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs branches/FreeTrainSDL/core/World/Rail/StealSupportedRailContributionImpl.cs branches/FreeTrainSDL/core/World/Rail/ThinPlatform.cs branches/FreeTrainSDL/core/World/Rail/Train.cs branches/FreeTrainSDL/core/World/Rail/TunnelRail.cs branches/FreeTrainSDL/core/World/Structs/Commercial.cs branches/FreeTrainSDL/core/World/Structs/ConstructionSite.cs branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs branches/FreeTrainSDL/core/World/Terrain/MountainVoxel.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCar.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessory.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HalfVoxelContribution.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HueShiftSprite.cs branches/FreeTrainSDL/plugins/Kohsuke.ColorTestTrain/ColorConfigDialog.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseVoxel.cs Added Paths: ----------- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs branches/FreeTrainSDL/core/Contributions/Common/StructureGroupGroup.cs Removed Paths: ------------- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureController.cs Modified: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -45,16 +45,17 @@ protected FixedSizeStructureContribution(XmlElement e) : base(e) { - _price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); + this.Price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); Size sz = XmlUtil.ParseSize(XmlUtil.SelectSingleNode(e, "size").InnerText); int height = int.Parse(XmlUtil.SelectSingleNode(e, "height").InnerText); this.size = new Distance(sz, height); - _ppa = _price / Math.Max(1, size.x * size.y); + this.PricePerArea = this.Price / Math.Max(1, size.x * size.y); XmlElement spr = (XmlElement)XmlUtil.SelectSingleNode(e, "sprite"); sprites = PluginUtil.getSpriteLoader(spr).load3D(spr, size.x, size.y, height); } + /// <summary> /// /// </summary> @@ -65,43 +66,41 @@ public FixedSizeStructureContribution(IAbstractStructure master, XmlElement pic, XmlElement main, bool opposite) : base(main) { - _price = master.UnitPrice; + this.Price = master.UnitPrice; int height = master.MaxHeight; if (opposite) size = new Distance(master.Size.Height, master.Size.Width, height); else this.size = new Distance(master.Size, height); - _ppa = _price / Math.Max(1, size.x * size.y); + this.PricePerArea = this.Price / Math.Max(1, size.x * size.y); sprites = PluginUtil.getSpriteLoader(pic).load3D(pic, size.x, size.y, height); } - /// <summary>Price of this structure.</summary> - [CLSCompliant(false)] - protected readonly int _price; // TODO: should be moved up /// <summary> - /// + /// Sprite set to draw this structure. Indexed as [x,y,z] + /// and may contain null if there's no need to draw that voxel. /// </summary> - public override int Price { get { return _price; } } + private readonly ISprite[, ,] sprites; + /// <summary> /// /// </summary> - [CLSCompliant(false)] - protected readonly double _ppa; - /// <summary> - /// - /// </summary> - public override double PricePerArea { get { return _ppa; } } + public ISprite[, ,] Sprites + { + get { return sprites; } + } + /// <summary> Size of this structure in voxel by voxel. </summary> + private readonly Distance size; /// <summary> - /// Sprite set to draw this structure. Indexed as [x,y,z] - /// and may contain null if there's no need to draw that voxel. + /// /// </summary> - public readonly ISprite[, ,] sprites; + public Distance Size + { + get { return size; } + } - /// <summary> Size of this structure in voxel by voxel. </summary> - public readonly Distance size; - /// <summary> /// Creates a new instance of this structure type to the specified location. /// </summary> @@ -110,43 +109,45 @@ /// structure is initially owned or not. Otherwise this flag has no effect. /// </param> /// <param name="baseLoc"></param> - public Structure create(Location baseLoc, bool initiallyOwned) + public Structure Create(Location baseLoc, bool initiallyOwned) { - return create(new WorldLocator(WorldDefinition.World, baseLoc), initiallyOwned); + return Create(new WorldLocator(WorldDefinition.World, baseLoc), initiallyOwned); } + /// <summary> /// /// </summary> /// <param name="wloc"></param> /// <param name="initiallyOwned"></param> /// <returns></returns> - public abstract Structure create(WorldLocator wloc, bool initiallyOwned); + public abstract Structure Create(WorldLocator wloc, bool initiallyOwned); - // this method differs from the create method in its return type. - // delegates are so inflexible that we have to do this kind of adjustment. - /// <summary> - /// - /// </summary> - /// <param name="baseLoc"></param> - public void create2(Location baseLoc) - { - create(new WorldLocator(WorldDefinition.World, baseLoc), false); - } + //// this method differs from the create method in its return type. + //// delegates are so inflexible that we have to do this kind of adjustment. + ///// <summary> + ///// + ///// </summary> + ///// <param name="baseLoc"></param> + //public void create2(Location baseLoc) + //{ + // Create(new WorldLocator(WorldDefinition.World, baseLoc), false); + //} /// <summary> /// Returns true iff this structure can be built at the specified location. /// </summary> - public abstract bool canBeBuilt(Location baseLoc, ControlMode cm); + public abstract bool CanBeBuilt(Location baseLoc, ControlMode cm); /// <summary> /// /// </summary> /// <param name="d"></param> /// <returns></returns> - public ISprite getSprite(Distance d) + public ISprite GetSprite(Distance d) { return sprites[d.x, d.y, d.z]; } + /// <summary> /// /// </summary> @@ -158,6 +159,7 @@ drawer.drawCenter(sprites); return drawer; } + /// <summary> /// /// </summary> @@ -167,6 +169,7 @@ { return new FixedSizeStructurePlacementController(this, site); } + /// <summary> /// /// </summary> @@ -176,6 +179,7 @@ { return new FixedSizeStructureRemovalController(this, site); } + #region IPreviewWorldBuilder o /// <summary> /// @@ -187,7 +191,7 @@ { WorldDefinition w = WorldDefinition.CreatePreviewWorld(minsizePixel, size); Location l = w.toXYZ((w.Size.x - size.x + size.y) / 2, w.Size.y - size.y - 2, 0); - create(new WorldLocator(w, l), false); + Create(new WorldLocator(w, l), false); return w; } Deleted: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureController.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureController.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureController.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -1,166 +0,0 @@ -#region LICENSE -/* - * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#endregion LICENSE - -using System; -using System.Drawing; -using System.Windows.Forms; -using FreeTrain.Controllers; -using FreeTrain.Framework; -using FreeTrain.Framework.Graphics; -using FreeTrain.Views; -using FreeTrain.World; -using FreeTrain.World.Structs; - -namespace FreeTrain.Contributions.Common -{ - /// <summary> - /// FixedSizeStructureController - /// </summary> - public class FixedSizeStructurePlacementController : CubeSelectorController, IMapOverlay - { - /// <summary> - /// - /// </summary> - protected readonly FixedSizeStructureContribution contrib; - - private readonly AlphaBlendSpriteSet alphaSprites; - - - /// <summary> - /// - /// </summary> - /// <param name="_contrib"></param> - /// <param name="_site"></param> - public FixedSizeStructurePlacementController(FixedSizeStructureContribution _contrib, IControllerSite _site) - : base(_contrib.size, _site) - { - this.contrib = _contrib; - this.alphaSprites = new AlphaBlendSpriteSet(contrib.sprites); - } - /// <summary> - /// - /// </summary> - /// <param name="cube"></param> - protected override void onSelected(Cube cube) - { - if (contrib.canBeBuilt(cube.corner, ControlMode.Player)) - { - MessageBox.Show("Can not build"); - //! MessageBox.Show("設置できません"); - } - else - { - CompletionHandler handler = new CompletionHandler(contrib, cube.corner, true); - new ConstructionSite(cube.corner, new EventHandler(handler.handle), contrib.size); - } - } - /// <summary> - /// - /// </summary> - public override void OnDetached() - { - alphaSprites.Dispose(); - } - - /// <summary> - /// - /// </summary> - /// <param name="view"></param> - /// <param name="surface"></param> - public void DrawBefore(QuarterViewDrawer view, DrawContext surface) { } - /// <summary> - /// - /// </summary> - /// <param name="view"></param> - /// <param name="canvas"></param> - /// <param name="loc"></param> - /// <param name="pt"></param> - public void DrawVoxel(QuarterViewDrawer view, DrawContext canvas, Location loc, Point pt) - { - if (currentCube.contains(loc)) - alphaSprites.getSprite(loc - this.location).drawAlpha(canvas.Surface, pt); - } - /// <summary> - /// - /// </summary> - /// <param name="view"></param> - /// <param name="surface"></param> - public void DrawAfter(QuarterViewDrawer view, DrawContext surface) { } - - - [Serializable] - private class CompletionHandler - { - internal CompletionHandler(FixedSizeStructureContribution contribution, Location loc, bool owned) - { - this.contribution = contribution; - this.loc = loc; - this.owned = owned; - } - private readonly FixedSizeStructureContribution contribution; - private readonly Location loc; - private readonly bool owned; - /// <summary> - /// - /// </summary> - /// <param name="sender"></param> - /// <param name="args"></param> - public void handle(object sender, EventArgs args) - { - contribution.create(loc, owned); - } - } - } - /// <summary> - /// - /// </summary> - public class FixedSizeStructureRemovalController : CubeSelectorController - { - /// <summary> - /// - /// </summary> - protected readonly FixedSizeStructureContribution contrib; - /// <summary> - /// - /// </summary> - /// <param name="_contrib"></param> - /// <param name="_site"></param> - public FixedSizeStructureRemovalController(FixedSizeStructureContribution _contrib, IControllerSite _site) - : base(_contrib.size, _site) - { - this.contrib = _contrib; - } - /// <summary> - /// - /// </summary> - /// <param name="cube"></param> - protected override void onSelected(Cube cube) - { - PThreeDimStructure s = WorldDefinition.World.GetEntityAt(cube.corner) as PThreeDimStructure; - if (s == null || s.type != contrib) - { - MessageBox.Show("Wrong type"); - //! MessageBox.Show("種類が違います"); - return; - } - s.remove(); - } - } -} Added: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs (rev 0) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -0,0 +1,141 @@ +#region LICENSE +/* + * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#endregion LICENSE + +using System; +using System.Drawing; +using System.Windows.Forms; +using FreeTrain.Controllers; +using FreeTrain.Framework; +using FreeTrain.Framework.Graphics; +using FreeTrain.Views; +using FreeTrain.World; +using FreeTrain.World.Structs; + +namespace FreeTrain.Contributions.Common +{ + /// <summary> + /// FixedSizeStructureController + /// </summary> + public class FixedSizeStructurePlacementController : CubeSelectorController, IMapOverlay + { + /// <summary> + /// + /// </summary> + private readonly FixedSizeStructureContribution contrib; + + /// <summary> + /// + /// </summary> + protected FixedSizeStructureContribution Contrib + { + get { return contrib; } + } + + private readonly AlphaBlendSpriteSet alphaSprites; + + /// <summary> + /// + /// </summary> + /// <param name="contrib"></param> + /// <param name="site"></param> + public FixedSizeStructurePlacementController(FixedSizeStructureContribution contrib, IControllerSite site) + : base(contrib.Size, site) + { + this.contrib = contrib; + this.alphaSprites = new AlphaBlendSpriteSet(this.contrib.Sprites); + } + + /// <summary> + /// + /// </summary> + /// <param name="cube"></param> + protected override void OnSelected(Cube cube) + { + if (contrib.CanBeBuilt(cube.corner, ControlMode.Player)) + { + MessageBox.Show("Can not build"); + //! MessageBox.Show("設置できません"); + } + else + { + CompletionHandler handler = new CompletionHandler(contrib, cube.corner, true); + new ConstructionSite(cube.corner, new EventHandler(handler.handle), contrib.Size); + } + } + + /// <summary> + /// + /// </summary> + public override void OnDetached() + { + alphaSprites.Dispose(); + } + + /// <summary> + /// + /// </summary> + /// <param name="view"></param> + /// <param name="surface"></param> + public void DrawBefore(QuarterViewDrawer view, DrawContext surface) { } + + /// <summary> + /// + /// </summary> + /// <param name="view"></param> + /// <param name="canvas"></param> + /// <param name="loc"></param> + /// <param name="pt"></param> + public void DrawVoxel(QuarterViewDrawer view, DrawContext canvas, Location loc, Point pt) + { + if (currentCube.contains(loc)) + alphaSprites.getSprite(loc - this.location).DrawAlpha(canvas.Surface, pt); + } + + /// <summary> + /// + /// </summary> + /// <param name="view"></param> + /// <param name="surface"></param> + public void DrawAfter(QuarterViewDrawer view, DrawContext surface) { } + + [Serializable] + private class CompletionHandler + { + internal CompletionHandler(FixedSizeStructureContribution contribution, Location loc, bool owned) + { + this.contribution = contribution; + this.loc = loc; + this.owned = owned; + } + private readonly FixedSizeStructureContribution contribution; + private readonly Location loc; + private readonly bool owned; + /// <summary> + /// + /// </summary> + /// <param name="sender"></param> + /// <param name="args"></param> + public void handle(object sender, EventArgs args) + { + contribution.Create(loc, owned); + } + } + } +} Property changes on: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructurePlacementController.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Added: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs (rev 0) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -0,0 +1,70 @@ +#region LICENSE +/* + * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#endregion LICENSE + +using System; +using System.Drawing; +using System.Windows.Forms; +using FreeTrain.Controllers; +using FreeTrain.Framework; +using FreeTrain.Framework.Graphics; +using FreeTrain.Views; +using FreeTrain.World; +using FreeTrain.World.Structs; + +namespace FreeTrain.Contributions.Common +{ + /// <summary> + /// + /// </summary> + public class FixedSizeStructureRemovalController : CubeSelectorController + { + /// <summary> + /// + /// </summary> + protected readonly FixedSizeStructureContribution contrib; + + /// <summary> + /// + /// </summary> + /// <param name="contrib"></param> + /// <param name="site"></param> + public FixedSizeStructureRemovalController(FixedSizeStructureContribution contrib, IControllerSite site) + : base(contrib.Size, site) + { + this.contrib = contrib; + } + + /// <summary> + /// + /// </summary> + /// <param name="cube"></param> + protected override void OnSelected(Cube cube) + { + PThreeDimStructure s = WorldDefinition.World.GetEntityAt(cube.corner) as PThreeDimStructure; + if (s == null || s.type != contrib) + { + MessageBox.Show("Wrong type"); + //! MessageBox.Show("種類が違います"); + return; + } + s.remove(); + } + } +} Property changes on: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureRemovalController.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Modified: branches/FreeTrainSDL/core/Contributions/Common/IPreviewWorldBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/IPreviewWorldBuilder.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Common/IPreviewWorldBuilder.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -33,9 +33,9 @@ /// <summary> /// /// </summary> - /// <param name="minsizePixel"></param> + /// <param name="minSizePixel"></param> /// <param name="options"></param> /// <returns></returns> - WorldDefinition CreatePreviewWorld(Size minsizePixel, IDictionary options); + WorldDefinition CreatePreviewWorld(Size minSizePixel, IDictionary options); } } Modified: branches/FreeTrainSDL/core/Contributions/Common/LineContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/LineContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Common/LineContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -41,37 +41,38 @@ /// <summary> /// Returns true if rails can be built between the two given locations /// </summary> - public abstract bool canBeBuilt(Location loc1, Location loc2); + public abstract bool CanBeBuilt(Location loc1, Location loc2); /// <summary> /// Builds rail roads between the two given locations. /// This method will be called only when canBeBuilt(loc1,loc2) returns true. /// </summary> - public abstract void build(Location loc1, Location loc2); + public abstract void Build(Location loc1, Location loc2); /// <summary> /// Removes this special rail road between the given two locations. /// It is not an error for some other kinds of rail to appear in between /// these two. /// </summary> - public abstract void remove(Location loc1, Location loc2); + public abstract void Remove(Location loc1, Location loc2); /// <summary> /// Gets the name of this special rail. /// </summary> - public abstract string name { get; } + public abstract string Name { get; } /// <summary> /// Gets a one line description of this rail. /// </summary> - public abstract string oneLineDescription { get; } + public abstract string OneLineDescription { get; } /// <summary> /// Gets the bitmap that will be used in the construction dialog. /// Should reload a fresh copy every time this method is called. /// The caller should dispose the object if it becomes unnecessary. /// </summary> - public abstract Bitmap previewBitmap { get; } + public abstract Bitmap PreviewBitmap { get; } + /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/Contributions/Common/PictureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/PictureContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Common/PictureContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -34,17 +34,26 @@ /// <summary> /// /// </summary> - public readonly Picture picture; + private readonly Picture picture; + /// <summary> /// /// </summary> + public Picture Picture + { + get { return picture; } + } + + /// <summary> + /// + /// </summary> /// <param name="e"></param> public PictureContribution(XmlElement e) : base(e) { picture = new Picture( (XmlElement)XmlUtil.SelectSingleNode(e, "picture"), - this.id); + this.Id); // picture object will register itself to the manager. } } Modified: branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -41,7 +41,6 @@ [Serializable] public abstract class StructureContribution : Contribution, IEntityBuilder { - /// <summary> /// Parses a structure contribution from a DOM node. /// </summary> @@ -49,13 +48,14 @@ protected StructureContribution(XmlElement e) : base(e) { - core = new EntityBuilderInternal(e, this.id); + core = new EntityBuilderInternal(e, this.Id); XmlNode groupNode = e.SelectSingleNode("group"); string groupName = (groupNode != null) ? groupNode.InnerText : core.Name; - group = getGroup(groupName); - group.add(this); + group = GetGroup(groupName); + group.Add(this); } + /// <summary> /// /// </summary> @@ -68,13 +68,24 @@ core = original; group = original.group; } + /// <summary> /// /// </summary> - internal protected IEntityBuilder core; + private IEntityBuilder core; + /// <summary> /// /// </summary> + protected internal IEntityBuilder Core + { + get { return core; } + set { core = value; } + } + + /// <summary> + /// + /// </summary> private readonly StructureGroup group; /// <summary> @@ -85,18 +96,18 @@ get { return group; } } - /// <summary> /// Implemented by the derived class and /// used to determine which group this structure should go. /// </summary> - protected abstract StructureGroup getGroup(string name); + protected abstract StructureGroup GetGroup(string name); /// <summary> /// Name of this entity builder. Primarily used as the display name. /// Doesn't need to be unique. /// </summary> public virtual string Name { get { return core.Name; } } + /// <summary> /// /// </summary> @@ -113,6 +124,7 @@ /// True if the player is not allowed to build this structure. /// </summary> public bool PlayerCannotBuild { get { return core.PlayerCannotBuild; } } + /// <summary> /// /// </summary> @@ -149,6 +161,7 @@ /// <param name="pixelSize"></param> /// <returns></returns> public virtual PreviewDrawer CreatePreview(Size pixelSize) { return core.CreatePreview(pixelSize); } + /// <summary> /// /// </summary> @@ -196,7 +209,6 @@ new PopulationReferenceImpl(ownerId)); } - private readonly BasePopulation _population; private readonly bool _computerCannotBuild; private readonly bool _playerCannotBuild; @@ -288,6 +300,7 @@ { internal PopulationReferenceImpl(string id) { this.id = id; } private string id; + /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/Contributions/Common/StructureGroup.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/StructureGroup.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Common/StructureGroup.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -32,102 +32,56 @@ /// <summary> /// /// </summary> - /// <param name="_name"></param> - public StructureGroup(string _name) + /// <param name="name"></param> + public StructureGroup(string name) { - this.name = _name; + this.name = name; } /// <summary> Name of this group. </summary> - public string name; + private string name; /// <summary> /// /// </summary> + public string Name + { + get { return name; } + set { name = value; } + } + + /// <summary> + /// + /// </summary> /// <param name="sc"></param> - public void add(StructureContribution sc) + public void Add(StructureContribution sc) { base.List.Add(sc); } + /// <summary> /// /// </summary> /// <param name="idx"></param> /// <returns></returns> - public StructureContribution get(int idx) + public StructureContribution Get(int idx) { return (StructureContribution)base.List[idx]; } + /// <summary> /// /// </summary> /// <param name="sc"></param> - public void remove(StructureContribution sc) + public void Remove(StructureContribution sc) { base.List.Remove(sc); } + /// <summary> /// /// </summary> /// <returns></returns> public override string ToString() { return name; } } - - /// <summary> - /// Group of StructureGroups. - /// - /// This object implements IListSource to support data-binding. - /// </summary> - public class StructureGroupGroup : IListSource - { - /// <summary> - /// - /// </summary> - public StructureGroupGroup() { } - /// <summary> - /// - /// </summary> - protected readonly Hashtable core = new Hashtable(); - // used for data-binding - /// <summary> - /// - /// </summary> - protected readonly ArrayList list = new ArrayList(); - /// <summary> - /// - /// </summary> - /// <param name="name"></param> - /// <returns></returns> - public StructureGroup this[string name] - { - get - { - StructureGroup g = (StructureGroup)core[name]; - if (g == null) - { - core[name] = g = new StructureGroup(name); - list.Add(g); - } - - return g; - } - } - /// <summary> - /// - /// </summary> - /// <returns></returns> - public IEnumerator getEnumerator() - { - return core.Values.GetEnumerator(); - } - /// <summary> - /// - /// </summary> - /// <returns></returns> - public IList GetList() { return list; } - /// <summary> - /// - /// </summary> - public bool ContainsListCollection { get { return true; } } - } } Added: branches/FreeTrainSDL/core/Contributions/Common/StructureGroupGroup.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/StructureGroupGroup.cs (rev 0) +++ branches/FreeTrainSDL/core/Contributions/Common/StructureGroupGroup.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -0,0 +1,90 @@ +#region LICENSE +/* + * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#endregion LICENSE + +using System; +using System.Collections; +using System.ComponentModel; + +namespace FreeTrain.Contributions.Common +{ + /// <summary> + /// Group of StructureGroups. + /// + /// This object implements IListSource to support data-binding. + /// </summary> + public class StructureGroupGroup : IListSource + { + /// <summary> + /// + /// </summary> + public StructureGroupGroup() { } + + /// <summary> + /// + /// </summary> + protected readonly Hashtable core = new Hashtable(); + + // used for data-binding + /// <summary> + /// + /// </summary> + protected readonly ArrayList list = new ArrayList(); + + /// <summary> + /// + /// </summary> + /// <param name="name"></param> + /// <returns></returns> + public StructureGroup this[string name] + { + get + { + StructureGroup g = (StructureGroup)core[name]; + if (g == null) + { + core[name] = g = new StructureGroup(name); + list.Add(g); + } + + return g; + } + } + + /// <summary> + /// + /// </summary> + /// <returns></returns> + public IEnumerator getEnumerator() + { + return core.Values.GetEnumerator(); + } + + /// <summary> + /// + /// </summary> + /// <returns></returns> + public IList GetList() { return list; } + + /// <summary> + /// + /// </summary> + public bool ContainsListCollection { get { return true; } } + } +} Property changes on: branches/FreeTrainSDL/core/Contributions/Common/StructureGroupGroup.cs ___________________________________________________________________ Name: svn:mime-type + text/x-csharp Name: svn:eol-style + native Modified: branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -51,7 +51,7 @@ /// <summary> /// Gets the land that should be used to fill (x,y) within [x1,y1]-[x2,y2] (inclusive). /// </summary> - public override void create(int x1, int y1, int x2, int y2, int z, bool owned) + public override void Create(int x1, int y1, int x2, int y2, int z, bool owned) { bulldoze(new Location(x1, y1, z), new Location(x2, y2, z)); WorldDefinition.World.OnVoxelUpdated(new Cube(x1, y1, z, x2 - x1 + 1, y2 - y1 + 1, 1)); Modified: branches/FreeTrainSDL/core/Contributions/Land/DefaultControllerImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/DefaultControllerImpl.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Land/DefaultControllerImpl.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -63,7 +63,7 @@ /// <param name="loc2"></param> protected override void onRectSelected(Location loc1, Location loc2) { - contrib.create(loc1, loc2, true); + contrib.Create(loc1, loc2, true); } /// <summary> /// @@ -83,7 +83,7 @@ if (loc.z != currentLoc.z) return; if (anchor != UNPLACED && loc.inBetween(anchor, currentLoc)) - spriteBuilder().drawAlpha(canvas.Surface, pt); + spriteBuilder().DrawAlpha(canvas.Surface, pt); } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -49,39 +49,30 @@ { XmlNode gridNode = e.SelectSingleNode("grid"); if (gridNode == null) - _grid = new Size(1, 1); + grid = new Size(1, 1); else - _grid = XmlUtil.ParseSize(gridNode.InnerText); + grid = XmlUtil.ParseSize(gridNode.InnerText); - _price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); + this.Price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); } - private readonly Size _grid; + private readonly Size grid; + /// <summary> /// /// </summary> - public Size Grid { get { return _grid; } } + public Size Grid { get { return grid; } } - /// <summary> Price of the land per voxel. </summary> - [CLSCompliant(false)] - protected readonly int _price; /// <summary> /// /// </summary> - public override int Price { get { return _price; } } - /// <summary> - /// - /// </summary> - public override double PricePerArea { get { return _price; } } - /// <summary> - /// - /// </summary> /// <param name="name"></param> /// <returns></returns> - protected override StructureGroup getGroup(string name) + protected override StructureGroup GetGroup(string name) { return (StructureGroup)PluginManager.theInstance.landBuilderGroup[name]; } + /// <summary> /// /// </summary> @@ -91,12 +82,12 @@ /// <param name="y2"></param> /// <param name="z"></param> /// <param name="owned"></param> - public abstract void create(int x1, int y1, int x2, int y2, int z, bool owned); + public abstract void Create(int x1, int y1, int x2, int y2, int z, bool owned); /// <summary> /// Fills the specified region with lands. /// </summary> - public void create(Location loc1, Location loc2, bool owned) + public void Create(Location loc1, Location loc2, bool owned) { Debug.Assert(loc1.z == loc2.z); int z = loc1.z; @@ -105,37 +96,38 @@ int wx, wy; if (loc1.x > loc2.x) { - wx = Math.Max(loc1.x - loc2.x, _grid.Width - 1); + wx = Math.Max(loc1.x - loc2.x, grid.Width - 1); maxx = loc1.x; - minx = maxx - wx + wx % _grid.Width; + minx = maxx - wx + wx % grid.Width; } else { - wx = Math.Max(loc2.x - loc1.x, _grid.Width - 1); + wx = Math.Max(loc2.x - loc1.x, grid.Width - 1); minx = loc1.x; - maxx = minx + wx - wx % _grid.Width; + maxx = minx + wx - wx % grid.Width; } if (loc1.y > loc2.y) { - wy = Math.Max(loc1.y - loc2.y, _grid.Height - 1); + wy = Math.Max(loc1.y - loc2.y, grid.Height - 1); maxy = loc1.y; - miny = maxy - wy + wy % _grid.Height; + miny = maxy - wy + wy % grid.Height; } else { - wy = Math.Max(loc2.y - loc1.y, _grid.Height - 1); + wy = Math.Max(loc2.y - loc1.y, grid.Height - 1); miny = loc1.y; - maxy = miny + wy - wy % _grid.Height; + maxy = miny + wy - wy % grid.Height; } - create(minx, miny, maxx, maxy, z, owned); + Create(minx, miny, maxx, maxy, z, owned); } /// <summary> Creates a single patch. </summary> - public void create(Location loc, bool owned) + public void Create(Location loc, bool owned) { - create(loc, loc, owned); + Create(loc, loc, owned); } + /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderGroup.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -33,9 +33,9 @@ /// <summary> /// /// </summary> - /// <param name="_name"></param> - public LandBuilderGroup(string _name) - : base(_name) + /// <param name="name"></param> + public LandBuilderGroup(string name) + : base(name) { } /// <summary> @@ -43,7 +43,7 @@ /// </summary> /// <param name="idx"></param> /// <returns></returns> - public new LandBuilderContribution get(int idx) + public LandBuilderContribution Get(int idx) { return (LandBuilderContribution)base.List[idx]; } @@ -51,7 +51,7 @@ /// /// </summary> /// <param name="sc"></param> - public void remove(LandBuilderContribution sc) + public void Remove(LandBuilderContribution sc) { base.List.Remove(sc); } @@ -59,7 +59,7 @@ /// /// </summary> /// <returns></returns> - public override string ToString() { return name; } + public override string ToString() { return Name; } } /// <summary> Modified: branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -76,7 +76,7 @@ /// <param name="y2"></param> /// <param name="z"></param> /// <param name="owned"></param> - public override void create(int x1, int y1, int x2, int y2, int z, bool owned) + public override void Create(int x1, int y1, int x2, int y2, int z, bool owned) { for (int x = x1; x <= x2; x++) { Modified: branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -57,7 +57,7 @@ /// <summary> /// Gets the land that should be used to fill (x,y) within [x1,y1]-[x2,y2] (inclusive). /// </summary> - public override void create(int x1, int y1, int x2, int y2, int z, bool owned) + public override void Create(int x1, int y1, int x2, int y2, int z, bool owned) { for (int x = x1; x <= x2; x++) { Modified: branches/FreeTrainSDL/core/Contributions/Rail/RailStationaryContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/RailStationaryContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Rail/RailStationaryContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -44,7 +44,7 @@ /// </summary> /// <param name="name"></param> /// <returns></returns> - protected override StructureGroup getGroup(string name) + protected override StructureGroup GetGroup(string name) { return PluginManager.theInstance.railStationaryGroup[name]; } @@ -54,7 +54,7 @@ /// <param name="wLoc"></param> /// <param name="initiallyOwned"></param> /// <returns></returns> - public override Structure create(WorldLocator wLoc, bool initiallyOwned) + public override Structure Create(WorldLocator wLoc, bool initiallyOwned) { return new RailStationaryStructure(this, wLoc); } @@ -64,9 +64,9 @@ /// <param name="baseLoc"></param> /// <param name="cm"></param> /// <returns></returns> - public override bool canBeBuilt(Location baseLoc, ControlMode cm) + public override bool CanBeBuilt(Location baseLoc, ControlMode cm) { - return RailStationaryStructure.canBeBuilt(baseLoc, size, cm); + return RailStationaryStructure.canBeBuilt(baseLoc, Size, cm); } } Modified: branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -51,7 +51,7 @@ /// </summary> /// <param name="name"></param> /// <returns></returns> - protected override StructureGroup getGroup(string name) + protected override StructureGroup GetGroup(string name) { return PluginManager.theInstance.stationGroup[name]; } @@ -61,7 +61,7 @@ /// <param name="wLoc"></param> /// <param name="initiallyOwned"></param> /// <returns></returns> - public override Structure create(WorldLocator wLoc, bool initiallyOwned) + public override Structure Create(WorldLocator wLoc, bool initiallyOwned) { return new Station(this, wLoc); } @@ -71,9 +71,9 @@ /// <param name="baseLoc"></param> /// <param name="cm"></param> /// <returns></returns> - public override bool canBeBuilt(Location baseLoc, ControlMode cm) + public override bool CanBeBuilt(Location baseLoc, ControlMode cm) { - return Station.canBeBuilt(baseLoc, size, cm); + return Station.canBeBuilt(baseLoc, Size, cm); } } } Modified: branches/FreeTrainSDL/core/Contributions/Road/A3RoadContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/A3RoadContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Road/A3RoadContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -41,7 +41,7 @@ : base(e) { // load resource, but don't dispose it as sprites will still refer to this surface. - Picture picture = getPicture(e); + Picture picture = GetPicture(e); sprites = new ISprite[3]; for (int i = 0; i < 3; i++) Modified: branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -62,7 +62,7 @@ /// <param name="from"></param> /// <param name="to"></param> /// <returns></returns> - public override bool canBeBuilt(Location from, Location to) + public override bool CanBeBuilt(Location from, Location to) { if (from == to) return false; @@ -94,9 +94,9 @@ /// </summary> /// <param name="from"></param> /// <param name="to"></param> - public override void build(Location from, Location to) + public override void Build(Location from, Location to) { - Debug.Assert(canBeBuilt(from, to)); + Debug.Assert(CanBeBuilt(from, to)); Direction d = from.getDirectionTo(to); @@ -136,7 +136,7 @@ /// </summary> /// <param name="here"></param> /// <param name="to"></param> - public override void remove(Location here, Location to) + public override void Remove(Location here, Location to) { if (here == to) return; @@ -155,7 +155,7 @@ /// <summary> /// /// </summary> - public override string name + public override string Name { get { @@ -165,7 +165,7 @@ /// <summary> /// /// </summary> - public override string oneLineDescription + public override string OneLineDescription { get { @@ -176,7 +176,7 @@ /// <summary> /// /// </summary> - public override Bitmap previewBitmap + public override Bitmap PreviewBitmap { get { @@ -236,7 +236,7 @@ /// <param name="pt"></param> public override void drawBefore(DrawContext display, Point pt) { - contribution.getSprite(pattern.dirs).draw(display.Surface, pt); + contribution.getSprite(pattern.dirs).Draw(display.Surface, pt); } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -44,7 +44,7 @@ : base(e) { // load resource, but don't dispose it as sprites will still refer to this surface. - Picture pic = getPicture(e); + Picture pic = GetPicture(e); XmlElement picture = (XmlElement)XmlUtil.SelectSingleNode(e, "picture"); Size sz = XmlUtil.ParseSize(picture.Attributes["size"].Value); Modified: branches/FreeTrainSDL/core/Contributions/Structs/CommercialStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Structs/CommercialStructureContribution.cs 2008-04-08 08:01:22 UTC (rev 349) +++ branches/FreeTrainSDL/core/Contributions/Structs/CommercialStructureContribution.cs 2008-04-08 16:56:34 UTC (rev 350) @@ -55,7 +55,7 @@ /// </summary> /// <param name="name"></param> /// <returns></returns> - protected override StructureGroup getGroup(string name) + protected override StructureGroup GetGroup(string name) { return PluginManager.theInstance.commercialStructureGroup[name]; } @@ -65,7 +65,7 @@ /// <param name="wLoc"></param> /// <param name="init... [truncated message content] |
From: <je...@us...> - 2008-04-08 08:01:21
|
Revision: 349 http://freetrain.svn.sourceforge.net/freetrain/?rev=349&view=rev Author: jendave Date: 2008-04-08 01:01:22 -0700 (Tue, 08 Apr 2008) Log Message: ----------- renaming many methods Modified Paths: -------------- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs branches/FreeTrainSDL/core/Contributions/Common/IAbstractStructure.cs branches/FreeTrainSDL/core/Contributions/Common/IEntityBuilder.cs branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Rail/RailAccessoryContribution.cs branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs branches/FreeTrainSDL/core/Controllers/Land/LandController.cs branches/FreeTrainSDL/core/World/Development/CommercialStructurePlan.cs branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs branches/FreeTrainSDL/core/World/Development/LandPlan.cs branches/FreeTrainSDL/core/World/Development/VarHeightBuildingPlan.cs branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs branches/FreeTrainSDL/core/World/Structs/Commercial.cs branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs branches/FreeTrainSDL/core/World/Structs/PopulatedStructure.cs branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HalfVoxelContribution.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseVoxel.cs Modified: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -81,7 +81,7 @@ /// <summary> /// /// </summary> - public override int price { get { return _price; } } + public override int Price { get { return _price; } } /// <summary> /// /// </summary> @@ -90,7 +90,7 @@ /// <summary> /// /// </summary> - public override double pricePerArea { get { return _ppa; } } + public override double PricePerArea { get { return _ppa; } } /// <summary> @@ -152,7 +152,7 @@ /// </summary> /// <param name="pixelSize"></param> /// <returns></returns> - public override PreviewDrawer createPreview(Size pixelSize) + public override PreviewDrawer CreatePreview(Size pixelSize) { PreviewDrawer drawer = new PreviewDrawer(pixelSize, size); drawer.drawCenter(sprites); @@ -163,7 +163,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public override IModalController createBuilder(IControllerSite site) + public override IModalController CreateBuilder(IControllerSite site) { return new FixedSizeStructurePlacementController(this, site); } @@ -172,7 +172,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public override IModalController createRemover(IControllerSite site) + public override IModalController CreateRemover(IControllerSite site) { return new FixedSizeStructureRemovalController(this, site); } Modified: branches/FreeTrainSDL/core/Contributions/Common/IAbstractStructure.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/IAbstractStructure.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Common/IAbstractStructure.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -40,7 +40,7 @@ /// <summary> /// /// </summary> - int UnitPrice { get; } + int UnitPrice { get; set;} /// <summary> /// /// </summary> @@ -48,10 +48,10 @@ /// <summary> /// /// </summary> - int MinHeight { get; } + int MinHeight { get; set;} /// <summary> /// /// </summary> - int MaxHeight { get; } + int MaxHeight { get; set;} } } Modified: branches/FreeTrainSDL/core/Contributions/Common/IEntityBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/IEntityBuilder.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Common/IEntityBuilder.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -35,52 +35,52 @@ /// <summary> /// Population of this structure, or null if this structure is not populated. /// </summary> - BasePopulation population { get; } + BasePopulation Population { get; } /// <summary> /// True if the computer (the development algorithm) is not allowed to /// build this structure. /// </summary> // TODO: make IEntityBuilder responsible for creating a new Plan object. - bool computerCannotBuild { get; } + bool ComputerCannotBuild { get; } /// <summary> /// True if the player is not allowed to build this structure. /// </summary> - bool playerCannotBuild { get; } + bool PlayerCannotBuild { get; } /// <summary> /// Name of this entity builder. Primarily used as the display name. /// Doesn't need to be unique. /// </summary> - string name { get; } + string Name { get; } /// <summary> /// /// </summary> - int price { get; } + int Price { get; set;} /// <summary> /// price par area (minimum). /// </summary> - double pricePerArea { get; } + double PricePerArea { get; set;} /// <summary> /// Creates a preview /// </summary> /// <param name="pixelSize"></param> /// <returns></returns> - PreviewDrawer createPreview(Size pixelSize); + PreviewDrawer CreatePreview(Size pixelSize); /// <summary> /// /// </summary> /// <param name="site"></param> /// <returns></returns> - IModalController createBuilder(IControllerSite site); + IModalController CreateBuilder(IControllerSite site); /// <summary> /// /// </summary> /// <param name="site"></param> /// <returns></returns> - IModalController createRemover(IControllerSite site); + IModalController CreateRemover(IControllerSite site); } } Modified: branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -51,7 +51,7 @@ { core = new EntityBuilderInternal(e, this.id); XmlNode groupNode = e.SelectSingleNode("group"); - string groupName = (groupNode != null) ? groupNode.InnerText : core.name; + string groupName = (groupNode != null) ? groupNode.InnerText : core.Name; group = getGroup(groupName); group.add(this); @@ -75,9 +75,18 @@ /// <summary> /// /// </summary> - public readonly StructureGroup group; + private readonly StructureGroup group; /// <summary> + /// + /// </summary> + public StructureGroup Group + { + get { return group; } + } + + + /// <summary> /// Implemented by the derived class and /// used to determine which group this structure should go. /// </summary> @@ -87,56 +96,76 @@ /// Name of this entity builder. Primarily used as the display name. /// Doesn't need to be unique. /// </summary> - public virtual string name { get { return core.name; } } + public virtual string Name { get { return core.Name; } } /// <summary> /// /// </summary> - public virtual BasePopulation population { get { return core.population; } } + public virtual BasePopulation Population { get { return core.Population; } } /// <summary> /// True if the computer (the development algorithm) is not allowed to /// build this structure. /// </summary> // TODO: make EntityBuilderContribution responsible for creating a new Plan object. - public bool computerCannotBuild { get { return core.computerCannotBuild; } } + public bool ComputerCannotBuild { get { return core.ComputerCannotBuild; } } /// <summary> /// True if the player is not allowed to build this structure. /// </summary> - public bool playerCannotBuild { get { return core.playerCannotBuild; } } + public bool PlayerCannotBuild { get { return core.PlayerCannotBuild; } } /// <summary> /// /// </summary> - public virtual int price { get { return core.price; } } + public virtual int Price + { + get + { + return core.Price; + } + set + { + core.Price = value; + } + } /// <summary> /// price par area (minimum). /// </summary> - public virtual double pricePerArea { get { return core.pricePerArea; } } + public virtual double PricePerArea + { + get + { + return core.PricePerArea; + } + set + { + core.PricePerArea = value; + } + } /// <summary> /// Creates a preview /// </summary> /// <param name="pixelSize"></param> /// <returns></returns> - public virtual PreviewDrawer createPreview(Size pixelSize) { return core.createPreview(pixelSize); } + public virtual PreviewDrawer CreatePreview(Size pixelSize) { return core.CreatePreview(pixelSize); } /// <summary> /// /// </summary> /// <param name="site"></param> /// <returns></returns> - public virtual IModalController createBuilder(IControllerSite site) { return core.createBuilder(site); } + public virtual IModalController CreateBuilder(IControllerSite site) { return core.CreateBuilder(site); } /// <summary> /// /// </summary> /// <param name="site"></param> /// <returns></returns> - public virtual IModalController createRemover(IControllerSite site) { return core.createRemover(site); } + public virtual IModalController CreateRemover(IControllerSite site) { return core.CreateRemover(site); } /// <summary> /// /// </summary> /// <returns></returns> - public override string ToString() { return core.name; } + public override string ToString() { return core.Name; } /// <summary> /// @@ -155,9 +184,9 @@ XmlNode groupNode = e.SelectSingleNode("group"); _name = (nameNode != null) ? nameNode.InnerText : (groupNode != null ? groupNode.InnerText : null); - if (name == null) + if (Name == null) throw new FormatException("<name> and <group> are both missing"); - _price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); + price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); _computerCannotBuild = (e.SelectSingleNode("computerCannotBuild") != null); _playerCannotBuild = (e.SelectSingleNode("playerCannotBuild") != null); @@ -172,43 +201,60 @@ private readonly bool _computerCannotBuild; private readonly bool _playerCannotBuild; private readonly string _name; - /// <summary> - /// - /// </summary> - [CLSCompliant(false)] - protected readonly int _price; + int price; #region IEntityBuilder o /// <summary> /// /// </summary> - public BasePopulation population { get { return _population; } } + public BasePopulation Population { get { return _population; } } /// <summary> /// /// </summary> - public bool computerCannotBuild { get { return _computerCannotBuild; } } + public bool ComputerCannotBuild { get { return _computerCannotBuild; } } /// <summary> /// /// </summary> - public bool playerCannotBuild { get { return _playerCannotBuild; } } + public bool PlayerCannotBuild { get { return _playerCannotBuild; } } /// <summary> /// /// </summary> - public string name { get { return _name; } } + public string Name { get { return _name; } } /// <summary> /// /// </summary> - public int price { get { return _price; } } + public int Price + { + get + { + return price; + } + + set + { + price = value; + } + } /// <summary> /// /// </summary> - public virtual double pricePerArea { get { return _price; } } + public virtual double PricePerArea + { + get + { + return price; + } + set + { + double price = value; + } + } /// <summary> /// /// </summary> /// <param name="pixelSize"></param> /// <returns></returns> - public virtual FreeTrain.Framework.Graphics.PreviewDrawer createPreview(System.Drawing.Size pixelSize) + public virtual FreeTrain.Framework.Graphics.PreviewDrawer CreatePreview(System.Drawing.Size pixelSize) { throw new NotImplementedException(); } @@ -217,7 +263,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public virtual FreeTrain.Controllers.IModalController createBuilder(FreeTrain.Controllers.IControllerSite site) + public virtual FreeTrain.Controllers.IModalController CreateBuilder(FreeTrain.Controllers.IControllerSite site) { throw new NotImplementedException(); } @@ -226,7 +272,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public virtual FreeTrain.Controllers.IModalController createRemover(FreeTrain.Controllers.IControllerSite site) + public virtual FreeTrain.Controllers.IModalController CreateRemover(FreeTrain.Controllers.IControllerSite site) { throw new NotImplementedException(); } @@ -249,7 +295,7 @@ /// <returns></returns> public object GetRealObject(StreamingContext context) { - return ((StructureContribution)PluginManager.theInstance.getContribution(id)).population; + return ((StructureContribution)PluginManager.theInstance.getContribution(id)).Population; } } } Modified: branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Land/Bulldozer.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -99,7 +99,7 @@ /// <summary> /// Creates the preview image of the land builder. /// </summary> - public override PreviewDrawer createPreview(Size pixelSize) + public override PreviewDrawer CreatePreview(Size pixelSize) { return new PreviewDrawer(pixelSize, new Size(10, 10), 0); } @@ -108,9 +108,9 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public override IModalController createBuilder(IControllerSite site) + public override IModalController CreateBuilder(IControllerSite site) { - return createRemover(site); + return CreateRemover(site); } } Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -68,11 +68,11 @@ /// <summary> /// /// </summary> - public override int price { get { return _price; } } + public override int Price { get { return _price; } } /// <summary> /// /// </summary> - public override double pricePerArea { get { return _price; } } + public override double PricePerArea { get { return _price; } } /// <summary> /// /// </summary> @@ -141,7 +141,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public override IModalController createRemover(IControllerSite site) + public override IModalController CreateRemover(IControllerSite site) { return new DefaultControllerImpl(this, site, new DefaultControllerImpl.SpriteBuilder(getSprite)); Modified: branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -92,7 +92,7 @@ /// <summary> /// Creates the preview image of the land builder. /// </summary> - public override PreviewDrawer createPreview(Size pixelSize) + public override PreviewDrawer CreatePreview(Size pixelSize) { PreviewDrawer drawer = new PreviewDrawer(pixelSize, new Size(10, 10), 0); @@ -107,7 +107,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public override IModalController createBuilder(IControllerSite site) + public override IModalController CreateBuilder(IControllerSite site) { return new DefaultControllerImpl(this, site, new DefaultControllerImpl.SpriteBuilder(getLandSprite)); } Modified: branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -75,7 +75,7 @@ /// <summary> /// Creates the preview image of the land builder. /// </summary> - public override PreviewDrawer createPreview(Size pixelSize) + public override PreviewDrawer CreatePreview(Size pixelSize) { PreviewDrawer drawer = new PreviewDrawer(pixelSize, new Size(10, 10), 0); @@ -90,7 +90,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public override IModalController createBuilder(IControllerSite site) + public override IModalController CreateBuilder(IControllerSite site) { return new DefaultControllerImpl(this, site, new DefaultControllerImpl.SpriteBuilder(getSprite)); } Modified: branches/FreeTrainSDL/core/Contributions/Rail/RailAccessoryContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/RailAccessoryContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Rail/RailAccessoryContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -35,7 +35,7 @@ [Serializable] public abstract class RailAccessoryContribution : Contribution, IEntityBuilder { - private readonly string _name; + private readonly string name; /// <summary> /// /// </summary> @@ -43,7 +43,7 @@ public RailAccessoryContribution(XmlElement e) : base(e) { - _name = XmlUtil.SelectSingleNode(e, "name").InnerText; + name = XmlUtil.SelectSingleNode(e, "name").InnerText; } @@ -54,45 +54,65 @@ /// <summary> /// /// </summary> - public virtual string name { get { return _name; } } + public virtual string Name { get { return name; } } /// <summary> /// /// </summary> - public virtual BasePopulation population { get { return null; } } + public virtual BasePopulation Population { get { return null; } } /// <summary> /// /// </summary> - public virtual int price { get { return 0; } } + public virtual int Price + { + get + { + return 0; + } + set + { + int price = value; + } + } /// <summary> /// /// </summary> - public virtual double pricePerArea { get { return 0; } } + public virtual double PricePerArea + { + get + { + return 0; + } + set + { + double price = value; + } + } /// <summary> /// /// </summary> - public bool computerCannotBuild { get { return false; } } + public bool ComputerCannotBuild { get { return false; } } /// <summary> /// /// </summary> - public bool playerCannotBuild { get { return true; } } + public bool PlayerCannotBuild { get { return true; } } /// <summary> /// /// </summary> /// <param name="pixelSize"></param> /// <returns></returns> - public abstract FreeTrain.Framework.Graphics.PreviewDrawer createPreview(System.Drawing.Size pixelSize); + public abstract FreeTrain.Framework.Graphics.PreviewDrawer CreatePreview(System.Drawing.Size pixelSize); /// <summary> /// /// </summary> /// <param name="site"></param> /// <returns></returns> - public abstract FreeTrain.Controllers.IModalController createBuilder(FreeTrain.Controllers.IControllerSite site); + public abstract FreeTrain.Controllers.IModalController CreateBuilder(FreeTrain.Controllers.IControllerSite site); /// <summary> /// /// </summary> /// <param name="site"></param> /// <returns></returns> - public abstract FreeTrain.Controllers.IModalController createRemover(FreeTrain.Controllers.IControllerSite site); + public abstract FreeTrain.Controllers.IModalController CreateRemover(FreeTrain.Controllers.IControllerSite site); #endregion } Modified: branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -118,7 +118,7 @@ /// <summary> /// /// </summary> - public override int price { get { return _price; } } + public override int Price { get { return _price; } } /// <summary> /// /// </summary> @@ -127,7 +127,7 @@ /// <summary> /// /// </summary> - public override double pricePerArea { get { return _price; } } + public override double PricePerArea { get { return _price; } } /// <summary>Sprite sets.</summary> private readonly ISprite[][,] tops, bottoms; @@ -200,7 +200,7 @@ /// </summary> /// <param name="pixelSize"></param> /// <returns></returns> - public override PreviewDrawer createPreview(Size pixelSize) + public override PreviewDrawer CreatePreview(Size pixelSize) { PreviewDrawer drawer = new PreviewDrawer(pixelSize, size, tops.Length + bottoms.Length + 1/*middle*/ ); @@ -245,7 +245,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public override IModalController createBuilder(IControllerSite site) + public override IModalController CreateBuilder(IControllerSite site) { // TODO throw new NotImplementedException(); @@ -255,7 +255,7 @@ /// </summary> /// <param name="site"></param> /// <returns></returns> - public override IModalController createRemover(IControllerSite site) + public override IModalController CreateRemover(IControllerSite site) { // TODO throw new NotImplementedException(); Modified: branches/FreeTrainSDL/core/Controllers/Land/LandController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandController.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/Controllers/Land/LandController.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -165,7 +165,7 @@ public override void UpdatePreview() { LandBuilderContribution builder = (LandBuilderContribution)indexSelector.currentItem; - using (PreviewDrawer drawer = builder.createPreview(preview.Size)) + using (PreviewDrawer drawer = builder.CreatePreview(preview.Size)) { if (previewBitmap != null) previewBitmap.Dispose(); preview.Image = previewBitmap = drawer.createBitmap(); Modified: branches/FreeTrainSDL/core/World/Development/CommercialStructurePlan.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/CommercialStructurePlan.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Development/CommercialStructurePlan.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -42,7 +42,7 @@ this.loc = _loc; } - public override int value { get { return contrib.price; } } + public override int value { get { return contrib.Price; } } public override Cube cube { get { return Cube.createExclusive(loc,contrib.size); } } Modified: branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -50,7 +50,7 @@ { if (contrib is IEntityBuilder) { - if (((IEntityBuilder)contrib).computerCannotBuild) + if (((IEntityBuilder)contrib).ComputerCannotBuild) continue; else { @@ -102,13 +102,13 @@ do { n = (n + 1) >> 1; - int ppa = (int)((IEntityBuilder)array[p]).pricePerArea; + int ppa = (int)((IEntityBuilder)array[p]).PricePerArea; if (ppa >= price) p = Math.Max(0, p - n); else p = Math.Min(array.Count - 1, p + n); } while (n > 1); - if (price > (int)((IEntityBuilder)array[p]).pricePerArea) + if (price > (int)((IEntityBuilder)array[p]).PricePerArea) p++; // Debug.Write(string.Format("First for {0} is at {1} ;",price,p)); // Debug.WriteLine(string.Format("which is {0} -> {1} <- {2}",((IEntityBuilder)array[Math.Max(0,p-1)]).pricePerArea,((IEntityBuilder)array[p]).pricePerArea,((IEntityBuilder)array[Math.Min(array.Count-1,p+1)]).pricePerArea)); @@ -127,14 +127,14 @@ do { n = (n + 1) >> 1; - int ppa = (int)((IEntityBuilder)array[p]).pricePerArea; + int ppa = (int)((IEntityBuilder)array[p]).PricePerArea; if (ppa <= price) p = Math.Min(array.Count - 1, p + n); else p = Math.Max(0, p - n); } while (n > 1); int p1 = Math.Min(array.Count - 1, p + 1); - if (price == (int)((IEntityBuilder)array[p1]).pricePerArea) + if (price == (int)((IEntityBuilder)array[p1]).PricePerArea) p = p1; // Debug.Write(string.Format("Last for {0} is at {1} ;",price,p)); // Debug.WriteLine(string.Format("which is {0} -> {1} <- {2}",((IEntityBuilder)array[Math.Max(0,p-1)]).pricePerArea,((IEntityBuilder)array[p]).pricePerArea,((IEntityBuilder)array[Math.Min(array.Count-1,p+1)]).pricePerArea)); @@ -374,20 +374,20 @@ LandBuilderContribution lbc = entity as LandBuilderContribution; Size size = new Size(Rand(F_LandAveSize, F_LandFlexSize), Rand(F_LandAveSize, F_LandFlexSize)); p = new LandPlan(lbc, dev, scaning, size); - finalPrice = lbc.price * size.Width * size.Height; + finalPrice = lbc.Price * size.Width * size.Height; } else if (entity is CommercialStructureContribution) { CommercialStructureContribution csb = entity as CommercialStructureContribution; p = new CommercialStructurePlan(csb, dev, scaning); - finalPrice = entity.price; + finalPrice = entity.Price; } else if (entity is VarHeightBuildingContribution) { VarHeightBuildingContribution vhbc = entity as VarHeightBuildingContribution; int h = vhbc.minHeight; int h2 = vhbc.maxHeight; - int price = vhbc.price * h; + int price = vhbc.Price * h; Cube tmp = new Cube(scaning, vhbc.size, h); int cost = 0; foreach (IEntity e in tmp.getEntities()) @@ -395,7 +395,7 @@ while (price < cost && h < h2) { if (price < cost) - price += vhbc.price; + price += vhbc.Price; h++; } p = new VarHeightBuildingPlan(vhbc, dev, scaning, h); @@ -477,7 +477,7 @@ IEntityBuilder e2 = y as IEntityBuilder; if (e1 != null && e2 != null) { - return Math.Sign(e1.pricePerArea - e2.pricePerArea); + return Math.Sign(e1.PricePerArea - e2.PricePerArea); } } catch (Exception e) Modified: branches/FreeTrainSDL/core/World/Development/LandPlan.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/LandPlan.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Development/LandPlan.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -41,7 +41,7 @@ this.size = _size; } - public override int value { get { return contrib.price*4; } } + public override int value { get { return contrib.Price*4; } } public override Cube cube { get { return new Cube(loc,size.Width,size.Height,1); } } Modified: branches/FreeTrainSDL/core/World/Development/VarHeightBuildingPlan.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/VarHeightBuildingPlan.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Development/VarHeightBuildingPlan.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -43,7 +43,7 @@ this.h = h; } - public override int value { get { return contrib.price*h; } } + public override int value { get { return contrib.Price*h; } } public override Cube cube { get { return new Cube(loc,contrib.size,h); } } Modified: branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Land/StaticLandVoxel.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -43,8 +43,8 @@ { this.contrib = contrib; - if (contrib.population != null) - this.stationListener = new StationListenerImpl(contrib.population, loc); + if (contrib.Population != null) + this.stationListener = new StationListenerImpl(contrib.Population, loc); } /// <summary> /// @@ -57,7 +57,7 @@ /// <summary> /// /// </summary> - public override int entityValue { get { return contrib.price; } } + public override int entityValue { get { return contrib.Price; } } private readonly StationListenerImpl stationListener; Modified: branches/FreeTrainSDL/core/World/Structs/Commercial.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/Commercial.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Structs/Commercial.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -84,7 +84,7 @@ { get { - return type.price; + return type.Price; } } /// <summary> @@ -136,7 +136,7 @@ /// <summary> /// /// </summary> - public override string name { get { return type.name; } } + public override string name { get { return type.Name; } } /// <summary> /// /// </summary> Modified: branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -75,7 +75,7 @@ /// <summary> /// /// </summary> - public override int entityValue { get { return type.price; } } + public override int entityValue { get { return type.Price; } } /// <summary> /// /// </summary> @@ -98,7 +98,7 @@ /// <summary> /// /// </summary> - public override string name { get { return type.name; } } + public override string name { get { return type.Name; } } /// <summary> /// Modified: branches/FreeTrainSDL/core/World/Structs/PopulatedStructure.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/PopulatedStructure.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Structs/PopulatedStructure.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -42,8 +42,8 @@ public PopulatedStructure( FixedSizeStructureContribution type, WorldLocator wloc ) : base(type,wloc) { - if( type.population!=null && wloc.world==WorldDefinition.World) - stationListener = new StationListenerImpl( type.population, wloc.location ); + if( type.Population!=null && wloc.world==WorldDefinition.World) + stationListener = new StationListenerImpl( type.Population, wloc.location ); } /// <summary> Modified: branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -65,9 +65,9 @@ if (wloc.world == WorldDefinition.World) this.subsidiary = new SubsidiaryCompany(this, initiallyOwned); - if (type.population != null) + if (type.Population != null) stationListener = new StationListenerImpl( - new MultiplierPopulation(height, type.population), baseLocation); + new MultiplierPopulation(height, type.Population), baseLocation); } /// <summary> Voxels that form this structure </summary> @@ -97,7 +97,7 @@ /// <summary> /// /// </summary> - public override string name { get { return type.name; } } + public override string name { get { return type.Name; } } /// <summary> /// /// </summary> @@ -105,7 +105,7 @@ { get { - return type.price * height; + return type.Price * height; } } /// <summary> @@ -146,7 +146,7 @@ { get { - return height * type.price; + return height * type.Price; } } /// <summary> Modified: branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -116,7 +116,7 @@ /// <param name="pixelSize"></param> /// <returns></returns> [CLSCompliant(false)] - public override PreviewDrawer createPreview(Size pixelSize) + public override PreviewDrawer CreatePreview(Size pixelSize) { PreviewDrawer drawer = new PreviewDrawer(pixelSize, new Size(10, 1), 0); for (int x = 9; x >= 0; x--) @@ -133,7 +133,7 @@ /// <param name="site"></param> /// <returns></returns> [CLSCompliant(false)] - public override IModalController createBuilder(IControllerSite site) + public override IModalController CreateBuilder(IControllerSite site) { return new ControllerImpl(this, site, false); } @@ -143,7 +143,7 @@ /// <param name="site"></param> /// <returns></returns> [CLSCompliant(false)] - public override IModalController createRemover(IControllerSite site) + public override IModalController CreateRemover(IControllerSite site) { return new ControllerImpl(this, site, true); } Modified: branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -62,39 +62,39 @@ { XmlNode xn = e.SelectSingleNode("structure"); if (xn != null) - _categories = new StructCategories(xn, this.id); + Categories = new StructCategories(xn, this.id); else - _categories = new StructCategories(); + Categories = new StructCategories(); - if (_categories.Count == 0) + if (Categories.Count == 0) { StructCategory.Root.Entries.Add(this.id); - _categories.Add(StructCategory.Root); + Categories.Add(StructCategory.Root); } try { - _design = e.SelectSingleNode("design").InnerText; + Design = e.SelectSingleNode("design").InnerText; } catch { //! _design = "標準"; - _design = "default"; + Design = "default"; } try { - _unitPrice = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); + UnitPrice = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); } catch { - _unitPrice = 0; + UnitPrice = 0; } Size = new Size(1, 1); - _minHeight = 2; - _maxHeight = 0; + MinHeight = 2; + MaxHeight = 0; } /// <summary> Modified: branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -48,15 +48,15 @@ /// <summary> /// /// </summary> - UNKNOWN, + Unknown, /// <summary> /// /// </summary> - BASIC, + Basic, /// <summary> /// /// </summary> - VARHEIGHT + VarHeight }; /// <summary> @@ -69,40 +69,84 @@ /// <summary> /// /// </summary> - protected static readonly Char[] spliter = new Char[] { '|' }; - /// <summary> sub type of this structure. </summary> - [CLSCompliant(false)] - protected StructCategories _categories; + private static readonly Char[] splitter = new Char[] { '|' }; + /// <summary> /// /// </summary> - public StructCategories categories { get { return _categories; } } + protected static Char[] Splitter + { + get { return GenericStructureContribution.splitter; } + } + /// <summary> sub type of this structure. </summary> - [CLSCompliant(false)] - protected string _design; + private StructCategories categories; /// <summary> /// /// </summary> - public string design { get { return _design; } } - /// <summary> unit price of this structure. equals to whole price for fixed height. </summary> - protected int _unitPrice; + public StructCategories Categories + { + get + { + return categories; + } + set + { + categories = value; + } + } + /// <summary> sub type of this structure. </summary> + private string design; /// <summary> /// /// </summary> - public int UnitPrice { get { return _unitPrice; } } + public string Design + { + get + { + return design; + } + set + { + design = value; + } + } + /// <summary> unit price of this structure. equals to whole price for fixed height. </summary> + int unitPrice; /// <summary> /// /// </summary> - public override int price { get { return _unitPrice; } } - /// <summary> - /// - /// </summary> - protected int _areaPrice; - /// <summary> - /// - /// </summary> - public override double pricePerArea { get { return _areaPrice; } } + public int UnitPrice + { + get + { + return unitPrice; + } + set + { + unitPrice = value; + } + } + ///// <summary> + ///// + ///// </summary> + //int pricePerArea; + ///// <summary> + ///// + ///// </summary> + //public override double PricePerArea + //{ + // get + // { + // return pricePerArea; + // } + // set + // { + // pricePerArea = value; + // } + //} + private Size size; /// <summary> @@ -121,24 +165,44 @@ } /// <summary> valid for variable height structure only. </summary> - [CLSCompliant(false)] - protected int _minHeight; + int minHeight; /// <summary> /// /// </summary> - public int MinHeight { get { return _minHeight; } } + public int MinHeight + { + get + { + return minHeight; + } + set + { + minHeight = value; + } + } /// <summary> used as well as fixed height structure. </summary> - protected int _maxHeight; + private int maxHeight; /// <summary> /// /// </summary> - public int MaxHeight { get { return _maxHeight; } } + public int MaxHeight + { + get + { + return maxHeight; + } + set + { + maxHeight = value; + } + } + /// <summary> sprite table type of this structure. </summary> - protected SpriteTableType stType = SpriteTableType.UNKNOWN; + SpriteTableType stType = SpriteTableType.Unknown; /// <summary> /// /// </summary> - public SpriteTableType patternType { get { return stType; } } + public SpriteTableType PatternType { get { return stType; } } internal Contribution[,] contribs; /// <summary> @@ -232,7 +296,7 @@ /// <returns></returns> public override string ToString() { - return name; + return Name; } /// <summary> @@ -255,45 +319,45 @@ { XmlNode xn = e.SelectSingleNode("structure"); if (xn != null) - _categories = new StructCategories(xn, this.id); + categories = new StructCategories(xn, this.id); else - _categories = new StructCategories(); + categories = new StructCategories(); - if (_categories.Count == 0) + if (categories.Count == 0) { StructCategory.Root.Entries.Add(this.id); - _categories.Add(StructCategory.Root); + categories.Add(StructCategory.Root); } try { - _design = e.SelectSingleNode("design").InnerText; + design = e.SelectSingleNode("design").InnerText; } catch { //! _design = "標準"; - _design = "default"; + design = "default"; } - _unitPrice = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); + unitPrice = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); size = XmlUtil.ParseSize(XmlUtil.SelectSingleNode(e, "size").InnerText); - _areaPrice = _unitPrice / Math.Max(1, size.Width * size.Height); + PricePerArea = unitPrice / Math.Max(1, size.Width * size.Height); - _minHeight = 2; + minHeight = 2; try { - _maxHeight = int.Parse(e.SelectSingleNode("maxHeight").InnerText); + maxHeight = int.Parse(e.SelectSingleNode("maxHeight").InnerText); try { // if minHeight is not defined, use default. - _minHeight = int.Parse(e.SelectSingleNode("minHeight").InnerText); + minHeight = int.Parse(e.SelectSingleNode("minHeight").InnerText); } catch { } } catch { // if maxHeight tag is nod find, height tag must be exist. - _maxHeight = int.Parse(XmlUtil.SelectSingleNode(e, "height").InnerText); + maxHeight = int.Parse(XmlUtil.SelectSingleNode(e, "height").InnerText); } } /// <summary> @@ -321,10 +385,10 @@ { switch (stType) { - case SpriteTableType.UNKNOWN: - stType = SpriteTableType.BASIC; + case SpriteTableType.Unknown: + stType = SpriteTableType.Basic; break; - case SpriteTableType.BASIC: + case SpriteTableType.Basic: break; default: throw new FormatException("<sprite> tag is not available together with <pictures> or <sprites> tags."); @@ -335,10 +399,10 @@ { switch (stType) { - case SpriteTableType.UNKNOWN: - stType = SpriteTableType.VARHEIGHT; + case SpriteTableType.Unknown: + stType = SpriteTableType.VarHeight; break; - case SpriteTableType.VARHEIGHT: + case SpriteTableType.VarHeight: break; default: throw new FormatException("<" + child.Name + "> tag is not available together with <sprite> tag."); @@ -388,7 +452,7 @@ { bool opposite = (sprite.Attributes["opposite"] != null && sprite.Attributes["opposite"].Value.Equals("true")); Contribution newContrib; - if (stType == SpriteTableType.VARHEIGHT) + if (stType == SpriteTableType.VarHeight) { foreach (XmlNode child in sprite.ChildNodes) child.AppendChild(color.Clone()); @@ -415,7 +479,7 @@ if (cn.Name.Equals("direction")) { string front = cn.Attributes["front"].Value; - string[] dirs = front.ToUpper().Split(spliter); + string[] dirs = front.ToUpper().Split(splitter); for (int i = 0; i < dirs.Length; i++) { c++; @@ -467,9 +531,9 @@ /// <param name="pixelSize"></param> /// <returns></returns> [CLSCompliant(false)] - public override PreviewDrawer createPreview(Size pixelSize) + public override PreviewDrawer CreatePreview(Size pixelSize) { - return current.createPreview(pixelSize); + return current.CreatePreview(pixelSize); } /// <summary> /// @@ -477,9 +541,9 @@ /// <param name="site"></param> /// <returns></returns> [CLSCompliant(false)] - public override IModalController createBuilder(IControllerSite site) + public override IModalController CreateBuilder(IControllerSite site) { - return current.createBuilder(site); + return current.CreateBuilder(site); } /// <summary> /// @@ -487,9 +551,9 @@ /// <param name="site"></param> /// <returns></returns> [CLSCompliant(false)] - public override IModalController createRemover(IControllerSite site) + public override IModalController CreateRemover(IControllerSite site) { - return current.createRemover(site); + return current.CreateRemover(site); } } Modified: branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -355,7 +355,7 @@ } else { - using (PreviewDrawer drawer = current.current.createPreview(previewBox.Size)) + using (PreviewDrawer drawer = current.current.CreatePreview(previewBox.Size)) { if (previewBitmap != null) previewBitmap.Dispose(); @@ -832,7 +832,7 @@ { GenericStructureContribution contrib = (GenericStructureContribution)PluginManager.theInstance.getContribution((string)cat.Entries[i]); - string key = contrib.name; + string key = contrib.Name; if (!worktable.ContainsKey(key)) { typeBox.Items.Add(contrib); @@ -858,7 +858,7 @@ for (int i = 0; i < n; i++) { GenericStructureContribution contrib = arrCont[i]; - string key = contrib.name; + string key = contrib.Name; if (!typeMap.ContainsKey(key)) { typeBox.Items.Add(contrib); @@ -880,7 +880,7 @@ if (current.current is VarHeightBuildingContribution) { VarHeightBuildingContribution vhb = (VarHeightBuildingContribution)current.current; - p = vhb.price * (int)numHeight.Value; + p = vhb.Price * (int)numHeight.Value; } else p = current.UnitPrice; @@ -895,20 +895,20 @@ { string buf = ""; - int n = current.categories.Count; - buf += current.categories[0].name; + int n = current.Categories.Count; + buf += current.Categories[0].name; for (int i = 1; i < n; i++) - buf += ";" + current.categories[i].name; + buf += ";" + current.Categories[i].name; buf += "\nMax population:"; //! buf += "\n最大人口:"; - if (current.population == null) + if (current.Population == null) buf += "N/A"; else { if (current.current is VarHeightBuildingContribution) - buf += current.population.residents * (int)numHeight.Value; + buf += current.Population.residents * (int)numHeight.Value; else - buf += current.population.residents; + buf += current.Population.residents; } return buf; @@ -928,7 +928,7 @@ IEnumerator ie = designMap.GetEnumerator(); int i = 0; while (ie.MoveNext()) - subNames[i++] = ((GenericStructureContribution)ie.Current).design; + subNames[i++] = ((GenericStructureContribution)ie.Current).Design; selectorDesign.count = designMap.Count; bool b = (selectorDesign.count > 1); Modified: branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerForm.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -220,7 +220,7 @@ RoadAccessoryContribution builder = (RoadAccessoryContribution)typeBox.SelectedItem; if (builder != null) { - using (PreviewDrawer drawer = builder.createPreview(preview.Size)) + using (PreviewDrawer drawer = builder.CreatePreview(preview.Size)) { if (previewBitmap != null) previewBitmap.Dispose(); preview.Image = previewBitmap = drawer.createBitmap(); Modified: branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -69,7 +69,7 @@ /// <param name="pixelSize"></param> /// <returns></returns> [CLSCompliant(false)] - public override PreviewDrawer createPreview(Size pixelSize) + public override PreviewDrawer CreatePreview(Size pixelSize) { PreviewDrawer drawer = new PreviewDrawer(pixelSize, new Size(10, 1), 0); for (int x = 9; x >= 0; x--) @@ -86,7 +86,7 @@ /// <param name="site"></param> /// <returns></returns> [CLSCompliant(false)] - public override IModalController createBuilder(IControllerSite site) + public override IModalController CreateBuilder(IControllerSite site) { return new ControllerImpl(this, site, false); } @@ -96,7 +96,7 @@ /// <param name="site"></param> /// <returns></returns> [CLSCompliant(false)] - public override IModalController createRemover(IControllerSite site) + public override IModalController CreateRemover(IControllerSite site) { return new ControllerImpl(this, site, true); } Modified: branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs 2008-04-08 07:17:40 UTC (rev 348) +++ branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs 2008-04-08 08:01:22 UTC (rev 349) @@ -437,8 +437,8 @@ { idxColor.count = currentContrib.colors.size; idxColor2.count = currentContrib.getHighlihtPatternCount(); - namelabel.Text = currentContrib.name; - price.cost = currentContrib.price; + namelabel.Text = currentContrib.Name; + price.cost = currentContrib.Price; onButtonClicked(sender, e); onColorChanged(sender, e); onColor2Changed(... [truncated message content] |
From: <je...@us...> - 2008-04-08 07:17:35
|
Revision: 348 http://freetrain.svn.sourceforge.net/freetrain/?rev=348&view=rev Author: jendave Date: 2008-04-08 00:17:40 -0700 (Tue, 08 Apr 2008) Log Message: ----------- Remove SIZE file. It was redundant with the standard Size struct Modified Paths: -------------- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs branches/FreeTrainSDL/core/Contributions/Common/IAbstractStructure.cs branches/FreeTrainSDL/core/Contributions/Common/PictureContribution.cs branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs branches/FreeTrainSDL/core/Contributions/Population/AgriculturalPopulation.cs branches/FreeTrainSDL/core/Contributions/Population/ConstantPopulation.cs branches/FreeTrainSDL/core/Contributions/Population/OfficePopulation.cs branches/FreeTrainSDL/core/Contributions/Population/ResidentialPopulation.cs branches/FreeTrainSDL/core/Contributions/Population/RestaurantPopulation.cs branches/FreeTrainSDL/core/Contributions/Population/ShopperPopulation.cs branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs branches/FreeTrainSDL/core/Contributions/Rail/RailAccessoryContribution.cs branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs branches/FreeTrainSDL/core/Contributions/Sound/BGMContribution.cs branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs branches/FreeTrainSDL/core/Contributions/Train/AbstractTrainContributionImpl.cs branches/FreeTrainSDL/core/Contributions/Train/AsymTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/SymTrainCarImpl.cs branches/FreeTrainSDL/core/Contributions/Train/TrainCarContribution.cs branches/FreeTrainSDL/core/Framework/Graphics/DefaultSpriteLoaderContributionImpl.cs branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs branches/FreeTrainSDL/core/Framework/Plugin/DynamicContributionFactory.cs branches/FreeTrainSDL/core/Framework/Plugin/FixedClassContributionFactory.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginDefinition.cs branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs branches/FreeTrainSDL/core/Framework/Plugin/XmlUtil.cs branches/FreeTrainSDL/core/FreeTrain.csproj branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs branches/FreeTrainSDL/core/World/Cube.cs branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs branches/FreeTrainSDL/core/World/Development/LandPlan.cs branches/FreeTrainSDL/core/World/Location.cs branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs branches/FreeTrainSDL/plugins/Chiname.Generic/StructCategory.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/RoadAccessoryContribution.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HalfVoxelContribution.cs branches/FreeTrainSDL/plugins/Kohsuke.VinylHouse/VinylHouseBuilder.cs Removed Paths: ------------- branches/FreeTrainSDL/core/World/SIZE.cs Modified: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -45,14 +45,14 @@ protected FixedSizeStructureContribution(XmlElement e) : base(e) { - _price = int.Parse(XmlUtil.selectSingleNode(e, "price").InnerText); + _price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); - SIZE sz = XmlUtil.parseSize(XmlUtil.selectSingleNode(e, "size").InnerText); - int height = int.Parse(XmlUtil.selectSingleNode(e, "height").InnerText); + Size sz = XmlUtil.ParseSize(XmlUtil.SelectSingleNode(e, "size").InnerText); + int height = int.Parse(XmlUtil.SelectSingleNode(e, "height").InnerText); this.size = new Distance(sz, height); _ppa = _price / Math.Max(1, size.x * size.y); - XmlElement spr = (XmlElement)XmlUtil.selectSingleNode(e, "sprite"); + XmlElement spr = (XmlElement)XmlUtil.SelectSingleNode(e, "sprite"); sprites = PluginUtil.getSpriteLoader(spr).load3D(spr, size.x, size.y, height); } /// <summary> @@ -65,12 +65,12 @@ public FixedSizeStructureContribution(IAbstractStructure master, XmlElement pic, XmlElement main, bool opposite) : base(main) { - _price = master.unitPrice; - int height = master.maxHeight; + _price = master.UnitPrice; + int height = master.MaxHeight; if (opposite) - size = new Distance(master.size.y, master.size.x, height); + size = new Distance(master.Size.Height, master.Size.Width, height); else - this.size = new Distance(master.size, height); + this.size = new Distance(master.Size, height); _ppa = _price / Math.Max(1, size.x * size.y); sprites = PluginUtil.getSpriteLoader(pic).load3D(pic, size.x, size.y, height); } Modified: branches/FreeTrainSDL/core/Contributions/Common/IAbstractStructure.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/IAbstractStructure.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Common/IAbstractStructure.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -40,18 +40,18 @@ /// <summary> /// /// </summary> - int unitPrice { get; } + int UnitPrice { get; } /// <summary> /// /// </summary> - SIZE size { get; } + Size Size { get; set;} /// <summary> /// /// </summary> - int minHeight { get; } + int MinHeight { get; } /// <summary> /// /// </summary> - int maxHeight { get; } + int MaxHeight { get; } } } Modified: branches/FreeTrainSDL/core/Contributions/Common/PictureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/PictureContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Common/PictureContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -43,7 +43,7 @@ : base(e) { picture = new Picture( - (XmlElement)XmlUtil.selectSingleNode(e, "picture"), + (XmlElement)XmlUtil.SelectSingleNode(e, "picture"), this.id); // picture object will register itself to the manager. } Modified: branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Common/StructureContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -157,7 +157,7 @@ _name = (nameNode != null) ? nameNode.InnerText : (groupNode != null ? groupNode.InnerText : null); if (name == null) throw new FormatException("<name> and <group> are both missing"); - _price = int.Parse(XmlUtil.selectSingleNode(e, "price").InnerText); + _price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); _computerCannotBuild = (e.SelectSingleNode("computerCannotBuild") != null); _playerCannotBuild = (e.SelectSingleNode("playerCannotBuild") != null); Modified: branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Land/LandBuilderContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -51,9 +51,9 @@ if (gridNode == null) _grid = new Size(1, 1); else - _grid = XmlUtil.parseSize(gridNode.InnerText); + _grid = XmlUtil.ParseSize(gridNode.InnerText); - _price = int.Parse(XmlUtil.selectSingleNode(e, "price").InnerText); + _price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); } private readonly Size _grid; Modified: branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Land/RandomLandBuilder.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -45,7 +45,7 @@ : base(e) { ArrayList array = new ArrayList(); - string[] guids = XmlUtil.selectSingleNode(e, "lands").InnerText.Split(' ', '\t', '\r', '\n'); + string[] guids = XmlUtil.SelectSingleNode(e, "lands").InnerText.Split(' ', '\t', '\r', '\n'); for (int i = 0; i < guids.Length; i++) { if (guids[i].Length != 0) Modified: branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Land/StaticLandBuilder.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -46,7 +46,7 @@ : base(e) { // picture - XmlElement spr = (XmlElement)XmlUtil.selectSingleNode(e, "sprite"); + XmlElement spr = (XmlElement)XmlUtil.SelectSingleNode(e, "sprite"); sprite = PluginUtil.getSpriteLoader(spr).load2D(spr, 1, 1, 0)[0, 0]; } Modified: branches/FreeTrainSDL/core/Contributions/Population/AgriculturalPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/AgriculturalPopulation.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Population/AgriculturalPopulation.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -41,7 +41,7 @@ /// </summary> /// <param name="e"></param> public AgriculturalPopulation(XmlElement e) - : this(int.Parse(XmlUtil.selectSingleNode(e, "base").InnerText)) { } + : this(int.Parse(XmlUtil.SelectSingleNode(e, "base").InnerText)) { } // TODO: parameter calibration private static readonly int[] weekdayDistribution = new int[]{ Modified: branches/FreeTrainSDL/core/Contributions/Population/ConstantPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/ConstantPopulation.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Population/ConstantPopulation.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -46,7 +46,7 @@ /// <param name="e"></param> public ConstantPopulation(XmlElement e) { - this.population = int.Parse(XmlUtil.selectSingleNode(e, "base").InnerText); + this.population = int.Parse(XmlUtil.SelectSingleNode(e, "base").InnerText); } private readonly int population; Modified: branches/FreeTrainSDL/core/Contributions/Population/OfficePopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/OfficePopulation.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Population/OfficePopulation.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -41,7 +41,7 @@ /// </summary> /// <param name="e"></param> public OfficePopulation(XmlElement e) - : this(int.Parse(XmlUtil.selectSingleNode(e, "base").InnerText)) { } + : this(int.Parse(XmlUtil.SelectSingleNode(e, "base").InnerText)) { } private static readonly int[] weekdayDistribution = new int[]{ 10, 5, 5, 5, 5, 5, // 0:00- 5:00 Modified: branches/FreeTrainSDL/core/Contributions/Population/ResidentialPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/ResidentialPopulation.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Population/ResidentialPopulation.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -41,7 +41,7 @@ /// </summary> /// <param name="e"></param> public ResidentialPopulation(XmlElement e) - : this(int.Parse(XmlUtil.selectSingleNode(e, "base").InnerText)) { } + : this(int.Parse(XmlUtil.SelectSingleNode(e, "base").InnerText)) { } private static readonly int[] weekdayDistribution = new int[]{ 10, 5, 5, 5, 5, 5, // 0:00- 5:00 Modified: branches/FreeTrainSDL/core/Contributions/Population/RestaurantPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/RestaurantPopulation.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Population/RestaurantPopulation.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -41,7 +41,7 @@ /// </summary> /// <param name="e"></param> public RestaurantPopulation(XmlElement e) - : this(int.Parse(XmlUtil.selectSingleNode(e, "base").InnerText)) { } + : this(int.Parse(XmlUtil.SelectSingleNode(e, "base").InnerText)) { } private static readonly int[] weekdayDistribution = new int[]{ 0, 0, 0, 0, 0, 0, // 0:00- 5:00 Modified: branches/FreeTrainSDL/core/Contributions/Population/ShopperPopulation.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Population/ShopperPopulation.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Population/ShopperPopulation.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -41,7 +41,7 @@ /// </summary> /// <param name="e"></param> public ShopperPopulation( XmlElement e ) - : this( int.Parse( XmlUtil.selectSingleNode(e,"base").InnerText) ) {} + : this( int.Parse( XmlUtil.SelectSingleNode(e,"base").InnerText) ) {} private static readonly int[] weekdayDistribution = new int[]{ 0, 0, 0, 0, 0, 0, // 0:00- 5:00 Modified: branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Rail/DepartureBellContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -42,11 +42,11 @@ : base(e) { - name = XmlUtil.selectSingleNode(e, "name").InnerText; + name = XmlUtil.SelectSingleNode(e, "name").InnerText; - string href = XmlUtil.selectSingleNode(e, "sound/@href").InnerText; + string href = XmlUtil.SelectSingleNode(e, "sound/@href").InnerText; sound = new RepeatableSoundEffectImpl( - ResourceUtil.loadSound(XmlUtil.resolve(e, href))); + ResourceUtil.loadSound(XmlUtil.Resolve(e, href))); } /// <summary> name of this sound </summary> Modified: branches/FreeTrainSDL/core/Contributions/Rail/RailAccessoryContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/RailAccessoryContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Rail/RailAccessoryContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -43,7 +43,7 @@ public RailAccessoryContribution(XmlElement e) : base(e) { - _name = XmlUtil.selectSingleNode(e, "name").InnerText; + _name = XmlUtil.SelectSingleNode(e, "name").InnerText; } Modified: branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Rail/StationContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -41,7 +41,7 @@ public StationContribution(XmlElement e) : base(e) { - operationCost = int.Parse(XmlUtil.selectSingleNode(e, "operationCost").InnerText); + operationCost = int.Parse(XmlUtil.SelectSingleNode(e, "operationCost").InnerText); } /// <summary> Operation cost of this station per day. </summary> Modified: branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Road/AbstractRoadContributionImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -47,8 +47,8 @@ protected AbstractRoadContributionImpl(XmlElement e) : base(e) { - _name = XmlUtil.selectSingleNode(e, "name").InnerText; - description = XmlUtil.selectSingleNode(e, "description").InnerText; + _name = XmlUtil.SelectSingleNode(e, "name").InnerText; + description = XmlUtil.SelectSingleNode(e, "description").InnerText; } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Road/StandardRoadContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -46,8 +46,8 @@ // load resource, but don't dispose it as sprites will still refer to this surface. Picture pic = getPicture(e); - XmlElement picture = (XmlElement)XmlUtil.selectSingleNode(e, "picture"); - Size sz = XmlUtil.parseSize(picture.Attributes["size"].Value); + XmlElement picture = (XmlElement)XmlUtil.SelectSingleNode(e, "picture"); + Size sz = XmlUtil.ParseSize(picture.Attributes["size"].Value); int offsetY = int.Parse(picture.Attributes["offset"].Value); flatSprites = new ISprite[16]; Modified: branches/FreeTrainSDL/core/Contributions/Sound/BGMContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Sound/BGMContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Sound/BGMContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -37,10 +37,10 @@ public BGMContribution(XmlElement e) : base(e) { - this.name = XmlUtil.selectSingleNode(e, "name").InnerText; + this.name = XmlUtil.SelectSingleNode(e, "name").InnerText; - XmlElement href = (XmlElement)XmlUtil.selectSingleNode(e, "href"); - fileName = XmlUtil.resolve(href, href.InnerText).LocalPath; + XmlElement href = (XmlElement)XmlUtil.SelectSingleNode(e, "href"); + fileName = XmlUtil.Resolve(href, href.InnerText).LocalPath; } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Structs/VarHeightBuildingContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -46,19 +46,19 @@ public VarHeightBuildingContribution(XmlElement e) : base(e) { - _price = int.Parse(XmlUtil.selectSingleNode(e, "price").InnerText); + _price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); - size = XmlUtil.parseSize(XmlUtil.selectSingleNode(e, "size").InnerText); - _ppa = _price / Math.Max(1, size.x * size.y); - minHeight = int.Parse(XmlUtil.selectSingleNode(e, "minHeight").InnerText); - maxHeight = int.Parse(XmlUtil.selectSingleNode(e, "maxHeight").InnerText); + size = XmlUtil.ParseSize(XmlUtil.SelectSingleNode(e, "size").InnerText); + _ppa = _price / Math.Max(1, size.Width * size.Height); + minHeight = int.Parse(XmlUtil.SelectSingleNode(e, "minHeight").InnerText); + maxHeight = int.Parse(XmlUtil.SelectSingleNode(e, "maxHeight").InnerText); - XmlElement pics = (XmlElement)XmlUtil.selectSingleNode(e, "pictures"); + XmlElement pics = (XmlElement)XmlUtil.SelectSingleNode(e, "pictures"); tops = loadSpriteSets(pics.SelectNodes("top")); bottoms = loadSpriteSets(pics.SelectNodes("bottom")); - XmlElement m = (XmlElement)XmlUtil.selectSingleNode(pics, "middle"); + XmlElement m = (XmlElement)XmlUtil.SelectSingleNode(pics, "middle"); middle = PluginUtil.getSpriteLoader(m).load2D(m, size, 16); } /// <summary> @@ -71,24 +71,24 @@ public VarHeightBuildingContribution(IAbstractStructure master, XmlElement pic, XmlElement main, bool opposite) : base(main) { - _price = master.unitPrice; + _price = master.UnitPrice; if (opposite) - size = new SIZE(master.size.y, master.size.x); + size = new Size(master.Size.Height, master.Size.Width); else - size = master.size; - _ppa = _price / Math.Max(1, size.x * size.y); - minHeight = master.minHeight; - maxHeight = master.maxHeight; + size = master.Size; + _ppa = _price / Math.Max(1, size.Width * size.Height); + minHeight = master.MinHeight; + maxHeight = master.MaxHeight; tops = loadSpriteSets(pic.SelectNodes("top")); bottoms = loadSpriteSets(pic.SelectNodes("bottom")); - XmlElement m = (XmlElement)XmlUtil.selectSingleNode(pic, "middle"); + XmlElement m = (XmlElement)XmlUtil.SelectSingleNode(pic, "middle"); XmlAttribute a = m.Attributes["overlay"]; if (a != null && a.InnerText.Equals("true")) overlay = true; - middle = PluginUtil.getSpriteLoader(m).load2D(m, size, size.x * 8); + middle = PluginUtil.getSpriteLoader(m).load2D(m, size, size.Width * 8); } /// <summary> /// @@ -107,7 +107,7 @@ int idx = 0; foreach (XmlElement e in list) { - sprites[idx++] = PluginUtil.getSpriteLoader(e).load2D(e, size, size.x * 8); + sprites[idx++] = PluginUtil.getSpriteLoader(e).load2D(e, size, size.Width * 8); } return sprites; } @@ -155,7 +155,7 @@ } /// <summary> Size of the basement of this structure in voxel by voxel. </summary> - public readonly SIZE size; + public readonly Size size; /// <summary> Range of the possible height of the structure in voxel unit. </summary> public readonly int minHeight, maxHeight; @@ -188,8 +188,8 @@ public bool canBeBuilt(Location baseLoc, int height) { for (int z = 0; z < height; z++) - for (int y = 0; y < size.y; y++) - for (int x = 0; x < size.x; x++) + for (int y = 0; y < size.Height; y++) + for (int x = 0; x < size.Width; x++) if (WorldDefinition.World[baseLoc.x + x, baseLoc.y + y, baseLoc.z + z] != null) return false; @@ -269,10 +269,10 @@ /// <returns></returns> public WorldDefinition CreatePreviewWorld(Size minsizePixel, IDictionary options) { - Distance d = new Distance(size.x * 2 + 1, size.y * 2 + 1, maxHeight); + Distance d = new Distance(size.Width * 2 + 1, size.Height * 2 + 1, maxHeight); WorldDefinition w = WorldDefinition.CreatePreviewWorld(minsizePixel, d); - int v = w.Size.y - size.y - 2; - Location l = w.toXYZ((w.Size.x - size.x - size.y - 1) / 2, v, 0); + int v = w.Size.y - size.Height - 2; + Location l = w.toXYZ((w.Size.x - size.Width - size.Height - 1) / 2, v, 0); create(new WorldLocator(w, l), maxHeight, false); l = w.toXYZ((w.Size.x) / 2, v, 0); create(new WorldLocator(w, l), minHeight, false); Modified: branches/FreeTrainSDL/core/Contributions/Train/AbstractTrainContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/AbstractTrainContributionImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Train/AbstractTrainContributionImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -38,16 +38,16 @@ protected AbstractTrainContributionImpl(XmlElement e) : base(e.Attributes["id"].Value) { - _companyName = XmlUtil.selectSingleNode(e, "company").InnerText; - _typeName = XmlUtil.selectSingleNode(e, "type").InnerText; - _nickName = XmlUtil.selectSingleNode(e, "name").InnerText; - _description = XmlUtil.selectSingleNode(e, "description").InnerText; - _author = XmlUtil.selectSingleNode(e, "author").InnerText; + _companyName = XmlUtil.SelectSingleNode(e, "company").InnerText; + _typeName = XmlUtil.SelectSingleNode(e, "type").InnerText; + _nickName = XmlUtil.SelectSingleNode(e, "name").InnerText; + _description = XmlUtil.SelectSingleNode(e, "description").InnerText; + _author = XmlUtil.SelectSingleNode(e, "author").InnerText; - _price = int.Parse(XmlUtil.selectSingleNode(e, "price").InnerText); + _price = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); // TODO: pictures - string speedStr = XmlUtil.selectSingleNode(e, "speed").InnerText.ToLower(); + string speedStr = XmlUtil.SelectSingleNode(e, "speed").InnerText.ToLower(); switch (speedStr) { case "slow": Modified: branches/FreeTrainSDL/core/Contributions/Train/AsymTrainCarImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/AsymTrainCarImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Train/AsymTrainCarImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -50,11 +50,11 @@ levelSprites = new ISprite[16]; slopeSprites = new ISprite[8]; - XmlElement sprite = (XmlElement)XmlUtil.selectSingleNode(e, "sprite"); + XmlElement sprite = (XmlElement)XmlUtil.SelectSingleNode(e, "sprite"); Picture picture = getPicture(sprite); SpriteFactory factory = SpriteFactory.getSpriteFactory(sprite); - Point origin = XmlUtil.parsePoint(sprite.Attributes["origin"].Value); + Point origin = XmlUtil.ParsePoint(sprite.Attributes["origin"].Value); for (int i = 0; i < 16; i++) { Modified: branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Train/ColoredTrainCarImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -60,7 +60,7 @@ public ColoredTrainCarImpl(XmlElement e) : base(e) { - XmlElement colorMap = (XmlElement)XmlUtil.selectSingleNode(e, "colorMap"); + XmlElement colorMap = (XmlElement)XmlUtil.SelectSingleNode(e, "colorMap"); Color cb = getColor(colorMap, "base"); Color cl1 = getColor(colorMap, "line1"); // used to be "stripe" @@ -137,7 +137,7 @@ private static Color getColor(XmlElement e, string name) { // TODO: better error handling - string value = ((XmlAttribute)XmlUtil.selectSingleNode(e, '@' + name)).Value; + string value = ((XmlAttribute)XmlUtil.SelectSingleNode(e, '@' + name)).Value; string[] cmp = value.Split(','); return Color.FromArgb(int.Parse(cmp[0]), int.Parse(cmp[1]), int.Parse(cmp[2])); } @@ -240,7 +240,7 @@ public ColoredTrainPictureContribution(XmlElement e) : base(e) { - this.name = XmlUtil.selectSingleNode(e, "name").InnerText; + this.name = XmlUtil.SelectSingleNode(e, "name").InnerText; } /// <summary> /// Modified: branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Train/ParamTrainImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -40,7 +40,7 @@ public ParamTrainImpl(XmlElement e) : base(e) { - composition = (XmlElement)XmlUtil.selectSingleNode(e, "composition"); + composition = (XmlElement)XmlUtil.SelectSingleNode(e, "composition"); } /// <summary> Modified: branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Train/PatternTrainImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -41,7 +41,7 @@ public PatternTrainImpl(XmlElement e) : base(e) { - config = (XmlElement)XmlUtil.selectSingleNode(e, "config"); + config = (XmlElement)XmlUtil.SelectSingleNode(e, "config"); } /// <summary> Modified: branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Train/ReverseTrainCarImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -45,7 +45,7 @@ : base(e.Attributes["id"].Value, 0) { - XmlElement b = (XmlElement)XmlUtil.selectSingleNode(e, "base"); + XmlElement b = (XmlElement)XmlUtil.SelectSingleNode(e, "base"); baseId = b.Attributes["carRef"].Value; } Modified: branches/FreeTrainSDL/core/Contributions/Train/SymTrainCarImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/SymTrainCarImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Train/SymTrainCarImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -47,11 +47,11 @@ levelSprites = new ISprite[8]; slopeSprites = new ISprite[4]; - XmlElement sprite = (XmlElement)XmlUtil.selectSingleNode(e,"sprite"); + XmlElement sprite = (XmlElement)XmlUtil.SelectSingleNode(e,"sprite"); Picture picture = getPicture(sprite); SpriteFactory factory = SpriteFactory.getSpriteFactory(sprite); - Point origin = XmlUtil.parsePoint( sprite.Attributes["origin"].Value ); + Point origin = XmlUtil.ParsePoint( sprite.Attributes["origin"].Value ); for( int i=0; i<8; i++ ) { Point sprOrigin = new Point( i*32 +origin.X, origin.Y ); Modified: branches/FreeTrainSDL/core/Contributions/Train/TrainCarContribution.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Train/TrainCarContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Contributions/Train/TrainCarContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -40,7 +40,7 @@ public TrainCarContribution(XmlElement e) : base(e) { - _capacity = int.Parse(XmlUtil.selectSingleNode(e, "capacity").InnerText); + _capacity = int.Parse(XmlUtil.SelectSingleNode(e, "capacity").InnerText); } /// <summary> /// Modified: branches/FreeTrainSDL/core/Framework/Graphics/DefaultSpriteLoaderContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/DefaultSpriteLoaderContributionImpl.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Framework/Graphics/DefaultSpriteLoaderContributionImpl.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -50,8 +50,8 @@ return SpriteFactory.getSpriteFactory(sprite).createSprite( getPicture(sprite), new Point(0, h), - XmlUtil.parsePoint(XmlUtil.selectSingleNode(sprite, "@origin").InnerText), - size == null ? new Size(32, 32) : XmlUtil.parseSize(size.Value)); + XmlUtil.ParsePoint(XmlUtil.SelectSingleNode(sprite, "@origin").InnerText), + size == null ? new Size(32, 32) : XmlUtil.ParseSize(size.Value)); } @@ -70,7 +70,7 @@ ISprite[,] sprites = new ISprite[X, Y]; - Point origin = XmlUtil.parsePoint(sprite.Attributes["origin"].Value); + Point origin = XmlUtil.ParsePoint(sprite.Attributes["origin"].Value); int h = height; XmlAttribute att = sprite.Attributes["offset"]; if (att != null) @@ -111,7 +111,7 @@ ISprite[, ,] sprites = new ISprite[X, Y, Z]; - Point origin = XmlUtil.parsePoint(sprite.Attributes["origin"].Value); + Point origin = XmlUtil.ParsePoint(sprite.Attributes["origin"].Value); int h = ((Z << 1) + (X - 1)) << 3; // calculate default offset XmlAttribute att = sprite.Attributes["offset"]; if (att != null) Modified: branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -108,7 +108,7 @@ this.id = _id; // // obtain the size of the bitmap - string baseFileName = XmlUtil.resolve(pic, pic.Attributes["src"].Value).LocalPath; + string baseFileName = XmlUtil.Resolve(pic, pic.Attributes["src"].Value).LocalPath; // this.size = getBitmapSize(baseFileName); ISurfaceLoader[,] specifiedLoaders = new ISurfaceLoader[4, 2]; @@ -138,7 +138,7 @@ if (src != null) { ISurfaceLoader overrideLoader = new BitmapSurfaceLoader( - XmlUtil.resolve(ovr, src.Value).LocalPath); + XmlUtil.Resolve(ovr, src.Value).LocalPath); specifiedLoaders[s, 0] = overrideLoader; } specifiedLoaders[s, 1] = getNightOverride(ovr); @@ -156,7 +156,7 @@ string when = ovr.Attributes["when"].Value; if (when.Equals("night")) return new BitmapSurfaceLoader( - XmlUtil.resolve(ovr, ovr.Attributes["src"].Value).LocalPath); + XmlUtil.Resolve(ovr, ovr.Attributes["src"].Value).LocalPath); else return null; } Modified: branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Framework/Plugin/Contribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -146,7 +146,7 @@ /// <returns>non-null valid object.</returns> protected Picture getPicture(XmlElement sprite) { - XmlElement pic = (XmlElement)XmlUtil.selectSingleNode(sprite, "picture"); + XmlElement pic = (XmlElement)XmlUtil.SelectSingleNode(sprite, "picture"); XmlAttribute r = pic.Attributes["ref"]; if (r != null) Modified: branches/FreeTrainSDL/core/Framework/Plugin/DynamicContributionFactory.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/DynamicContributionFactory.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Framework/Plugin/DynamicContributionFactory.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -45,7 +45,7 @@ public DynamicContributionFactory(XmlElement e) : this(PluginUtil.loadTypeFromManifest( - (XmlElement)XmlUtil.selectSingleNode(e, "implementation"))) { } + (XmlElement)XmlUtil.SelectSingleNode(e, "implementation"))) { } private readonly Type baseType; Modified: branches/FreeTrainSDL/core/Framework/Plugin/FixedClassContributionFactory.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/FixedClassContributionFactory.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Framework/Plugin/FixedClassContributionFactory.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -42,7 +42,7 @@ public FixedClassContributionFactory(XmlElement e) : this(PluginUtil.loadTypeFromManifest( - (XmlElement)XmlUtil.selectSingleNode(e, "implementation"))) { } + (XmlElement)XmlUtil.SelectSingleNode(e, "implementation"))) { } private readonly Type concreteType; /// <summary> Modified: branches/FreeTrainSDL/core/Framework/Plugin/PluginDefinition.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/PluginDefinition.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Framework/Plugin/PluginDefinition.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -108,13 +108,13 @@ doc = loadManifest(dirName); XmlElement root = doc.DocumentElement; - _title = XmlUtil.selectSingleNode(root, "title").InnerText; - _homepage = XmlUtil.selectSingleNode(root, "homepage").InnerText; + _title = XmlUtil.SelectSingleNode(root, "title").InnerText; + _homepage = XmlUtil.SelectSingleNode(root, "homepage").InnerText; if (root.SelectSingleNode("author") == null) _author = ""; else - _author = XmlUtil.selectSingleNode(root, "author").InnerText; + _author = XmlUtil.SelectSingleNode(root, "author").InnerText; Debug.WriteLine("loading plug-in: " + title); Debug.WriteLine(" base dir: " + dirName); @@ -135,7 +135,7 @@ { // load a contribution factory - string contributionName = XmlUtil.selectSingleNode(contrib, "name").InnerText; + string contributionName = XmlUtil.SelectSingleNode(contrib, "name").InnerText; IContributionFactory factory = (IContributionFactory)PluginUtil.loadObjectFromManifest(contrib); Modified: branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Framework/Plugin/PluginUtil.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -47,7 +47,7 @@ /// </summary> public static object loadObjectFromManifest(XmlElement contrib) { - XmlElement el = (XmlElement)XmlUtil.selectSingleNode(contrib, "class"); + XmlElement el = (XmlElement)XmlUtil.SelectSingleNode(contrib, "class"); Type t = loadTypeFromManifest(el); try @@ -84,7 +84,7 @@ else { // load the class from the specified assembly - Uri codeBase = XmlUtil.resolve(e, e.Attributes["codebase"].Value); + Uri codeBase = XmlUtil.Resolve(e, e.Attributes["codebase"].Value); if (!codeBase.IsFile) throw new FormatException("Designated codebase is not a filename: " + codeBase); Modified: branches/FreeTrainSDL/core/Framework/Plugin/XmlUtil.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Plugin/XmlUtil.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/Framework/Plugin/XmlUtil.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -36,18 +36,20 @@ /// Performs a node selection and throws an exception if it's not found. /// </summary> /// <exception cref="XmlException"></exception> - public static XmlNode selectSingleNode(XmlNode node, string xpath) + public static XmlNode SelectSingleNode(XmlNode node, string xpath) { XmlNode n = node.SelectSingleNode(xpath); if (n == null) + { throw new XmlException("unable to find " + xpath, null); + } return n; } /// <summary> /// Resolves a relative URI. /// </summary> - public static Uri resolve(XmlNode context, string relative) + public static Uri Resolve(XmlNode context, string relative) { return new Uri(new Uri(context.BaseURI), relative); } @@ -56,7 +58,7 @@ /// </summary> /// <param name="text"></param> /// <returns></returns> - public static Point parsePoint(string text) + public static Point ParsePoint(string text) { try { @@ -73,12 +75,12 @@ /// </summary> /// <param name="text"></param> /// <returns></returns> - public static SIZE parseSize(string text) + public static Size ParseSize(string text) { try { int idx = text.IndexOf(','); - return new SIZE(int.Parse(text.Substring(0, idx)), int.Parse(text.Substring(idx + 1))); + return new Size(int.Parse(text.Substring(0, idx)), int.Parse(text.Substring(idx + 1))); } catch (Exception e) { Modified: branches/FreeTrainSDL/core/FreeTrain.csproj =================================================================== --- branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-08 07:17:40 UTC (rev 348) @@ -801,9 +801,6 @@ <Compile Include="World\RRCrossing.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\SIZE.cs"> - <SubType>Code</SubType> - </Compile> <Compile Include="World\SparseVoxelArray.cs"> <SubType>Code</SubType> </Compile> @@ -1037,4 +1034,4 @@ <PostBuildEvent> </PostBuildEvent> </PropertyGroup> -</Project> +</Project> \ No newline at end of file Modified: branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs =================================================================== --- branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -37,7 +37,7 @@ public AccountGenre(XmlElement e) : base(e) { - name = XmlUtil.selectSingleNode(e, "name").InnerText; + name = XmlUtil.SelectSingleNode(e, "name").InnerText; WorldDefinition.onNewWorld += new EventHandler(onNewWorld); } Modified: branches/FreeTrainSDL/core/World/Cube.cs =================================================================== --- branches/FreeTrainSDL/core/World/Cube.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/World/Cube.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -73,8 +73,8 @@ /// <param name="_corner"></param> /// <param name="sz"></param> /// <param name="z"></param> - public Cube(Location _corner, SIZE sz, int z) - : this(_corner, sz.x, sz.y, z) { } + public Cube(Location _corner, Size sz, int z) + : this(_corner, sz.Width, sz.Height, z) { } #region factory methods /// <summary> Modified: branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -19,6 +19,7 @@ #endregion LICENSE using System; +using System.Drawing; using System.Collections; using System.Diagnostics; using FreeTrain.Contributions.Common; @@ -371,9 +372,9 @@ if (entity is LandBuilderContribution) { LandBuilderContribution lbc = entity as LandBuilderContribution; - SIZE size = new SIZE(Rand(F_LandAveSize, F_LandFlexSize), Rand(F_LandAveSize, F_LandFlexSize)); + Size size = new Size(Rand(F_LandAveSize, F_LandFlexSize), Rand(F_LandAveSize, F_LandFlexSize)); p = new LandPlan(lbc, dev, scaning, size); - finalPrice = lbc.price * size.x * size.y; + finalPrice = lbc.price * size.Width * size.Height; } else if (entity is CommercialStructureContribution) { Modified: branches/FreeTrainSDL/core/World/Development/LandPlan.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/LandPlan.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/World/Development/LandPlan.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -19,6 +19,7 @@ #endregion LICENSE using System; +using System.Drawing; using FreeTrain.Contributions.Land; namespace FreeTrain.World.Development @@ -31,10 +32,10 @@ { private readonly LandBuilderContribution contrib; private readonly Location loc; - private readonly SIZE size; + private readonly Size size; - internal LandPlan( LandBuilderContribution _contrib, IULVFactory factory, Location _loc, SIZE _size ) - : base(factory.create(new Cube(_loc,_size.x,_size.y,0))) { + internal LandPlan( LandBuilderContribution _contrib, IULVFactory factory, Location _loc, Size _size ) + : base(factory.create(new Cube(_loc,_size.Width,_size.Height, 0))) { this.contrib = _contrib; this.loc = _loc; this.size = _size; @@ -42,10 +43,10 @@ public override int value { get { return contrib.price*4; } } - public override Cube cube { get { return new Cube(loc,size.x,size.y,1); } } + public override Cube cube { get { return new Cube(loc,size.Width,size.Height,1); } } public override void build() { - contrib.create(loc,loc+new Distance(size.x-1,size.y-1,0),false); // inclusive + contrib.create(loc,loc+new Distance(size.Width-1,size.Height-1,0),false); // inclusive } } Modified: branches/FreeTrainSDL/core/World/Location.cs =================================================================== --- branches/FreeTrainSDL/core/World/Location.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/World/Location.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -347,7 +347,7 @@ /// </summary> /// <param name="sz"></param> /// <param name="_z"></param> - public Distance(SIZE sz, int _z) { x = sz.x; y = sz.y; z = _z; } + public Distance(Size sz, int _z) { x = sz.Width; y = sz.Height; z = _z; } /// <summary> /// Deleted: branches/FreeTrainSDL/core/World/SIZE.cs =================================================================== --- branches/FreeTrainSDL/core/World/SIZE.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/World/SIZE.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -1,84 +0,0 @@ -#region LICENSE -/* - * Copyright (C) 2007 - 2008 FreeTrain Team (http://freetrain.sourceforge.net) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#endregion LICENSE - -using System; -using System.Drawing; - -namespace FreeTrain.World -{ - /// <summary> - /// Better "Size" class. - /// </summary> - [Serializable] - public struct SIZE - { - /// <summary> - /// - /// </summary> - /// <param name="sz"></param> - public SIZE(Size sz) - : this(sz.Width, sz.Height) - { - } - /// <summary> - /// - /// </summary> - /// <param name="_x"></param> - /// <param name="_y"></param> - public SIZE(int _x, int _y) - { - this.x = _x; - this.y = _y; - } - - /// <summary> - /// - /// </summary> - public int x; - /// <summary> - /// - /// </summary> - public int y; - - /// <summary> - /// Area of this size. - /// </summary> - public int area - { - get - { - return x * y; - } - } - /// <summary> - /// - /// </summary> - public bool is1 { get { return x == 1 && y == 1; } } - /// <summary> - /// - /// </summary> - /// <param name="sz"></param> - /// <returns></returns> - public static implicit operator Size(SIZE sz) - { - return new Size(sz.x, sz.y); - } - } -} Modified: branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -49,8 +49,8 @@ this.type = _type; this.height = _height; - int Y = type.size.y; - int X = type.size.x; + int Y = type.size.Height; + int X = type.size.Width; int Z = height; this.baseLocation = wloc.location; @@ -115,7 +115,7 @@ { get { - return WorldDefinition.World.LandValue[baseLocation + new Distance(type.size, 0) / 2] * type.size.x * type.size.y; + return WorldDefinition.World.LandValue[baseLocation + new Distance(type.size, 0) / 2] * type.size.Width * type.size.Height; } } /// <summary> Modified: branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/plugins/Chiname.DummyCars/DummyCarContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -50,15 +50,15 @@ : base(e) { // pictures - XmlElement sprite = (XmlElement)XmlUtil.selectSingleNode(e, "sprite"); + XmlElement sprite = (XmlElement)XmlUtil.SelectSingleNode(e, "sprite"); Picture picture = getPicture(sprite); - Point origin = XmlUtil.parsePoint(sprite.Attributes["origin"].Value); + Point origin = XmlUtil.ParsePoint(sprite.Attributes["origin"].Value); int offset = int.Parse(sprite.Attributes["offset"].Value); Size sz = new Size(32, 16 + offset); Point sprOrigin0 = new Point(origin.X, origin.Y); Point sprOrigin1 = new Point(32 + origin.X, origin.Y); - XmlElement splist = (XmlElement)XmlUtil.selectSingleNode(sprite, "variations"); + XmlElement splist = (XmlElement)XmlUtil.SelectSingleNode(sprite, "variations"); colorVariations = 0; IEnumerator ienum = splist.ChildNodes.GetEnumerator(); while (ienum.MoveNext()) colorVariations++; Modified: branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/plugins/Chiname.Generic/GenericLandContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -84,14 +84,14 @@ try { - _unitPrice = int.Parse(XmlUtil.selectSingleNode(e, "price").InnerText); + _unitPrice = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); } catch { _unitPrice = 0; } - _size = new SIZE(1, 1); + Size = new Size(1, 1); _minHeight = 2; _maxHeight = 0; Modified: branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/plugins/Chiname.Generic/GenericStructureContribution.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -43,20 +43,20 @@ /// /// </summary> [Serializable] - public enum SpriteTableType : int - { + public enum SpriteTableType : int + { /// <summary> /// /// </summary> - UNKNOWN, + UNKNOWN, /// <summary> /// /// </summary> - BASIC, + BASIC, /// <summary> /// /// </summary> - VARHEIGHT + VARHEIGHT }; /// <summary> @@ -89,7 +89,7 @@ /// <summary> /// /// </summary> - public int unitPrice { get { return _unitPrice; } } + public int UnitPrice { get { return _unitPrice; } } /// <summary> /// /// </summary> @@ -103,27 +103,36 @@ /// </summary> public override double pricePerArea { get { return _areaPrice; } } - /// <summary> size of this structur. </summary> - [CLSCompliant(false)] - protected SIZE _size; + private Size size; + /// <summary> /// /// </summary> - [CLSCompliant(false)] - public SIZE size { get { return _size; } } + public Size Size + { + get + { + return size; + } + set + { + size = value; + } + } + /// <summary> valid for variable height structure only. </summary> [CLSCompliant(false)] protected int _minHeight; /// <summary> /// /// </summary> - public int minHeight { get { return _minHeight; } } + public int MinHeight { get { return _minHeight; } } /// <summary> used as well as fixed height structure. </summary> protected int _maxHeight; /// <summary> /// /// </summary> - public int maxHeight { get { return _maxHeight; } } + public int MaxHeight { get { return _maxHeight; } } /// <summary> sprite table type of this structure. </summary> protected SpriteTableType stType = SpriteTableType.UNKNOWN; /// <summary> @@ -266,9 +275,9 @@ _design = "default"; } - _unitPrice = int.Parse(XmlUtil.selectSingleNode(e, "price").InnerText); - _size = XmlUtil.parseSize(XmlUtil.selectSingleNode(e, "size").InnerText); - _areaPrice = _unitPrice / Math.Max(1, size.x * size.y); + _unitPrice = int.Parse(XmlUtil.SelectSingleNode(e, "price").InnerText); + size = XmlUtil.ParseSize(XmlUtil.SelectSingleNode(e, "size").InnerText); + _areaPrice = _unitPrice / Math.Max(1, size.Width * size.Height); _minHeight = 2; try @@ -284,7 +293,7 @@ catch { // if maxHeight tag is nod find, height tag must be exist. - _maxHeight = int.Parse(XmlUtil.selectSingleNode(e, "height").InnerText); + _maxHeight = int.Parse(XmlUtil.SelectSingleNode(e, "height").InnerText); } } /// <summary> Modified: branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs 2008-04-07 21:05:40 UTC (rev 347) +++ branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs 2008-04-08 07:17:40 UTC (rev 348) @@ -228,7 +228,7 @@ CommercialStructureContribution csContrib = (CommercialStructureContribution)current.current; if (csContrib.size.volume > 0) // eliminate dummy contribution { - CompletionHandler handler = new CompletionHandler(csContrib, loc, current.maxHeight, true); + CompletionHandler handler = new CompletionHandler(csContrib, loc, current.MaxHeight, true); new ConstructionSite(loc, new EventHandler(handler.handle), csContrib.size); } } @@ -243,7 +243,7 @@ public bool canBeBuilt(Location baseLoc) { int height; - SIZE size; + Size size; if (current.current is VarHeightBuildingContribution) ... [truncated message content] |
From: <je...@us...> - 2008-04-07 21:05:36
|
Revision: 347 http://freetrain.svn.sourceforge.net/freetrain/?rev=347&view=rev Author: jendave Date: 2008-04-07 14:05:40 -0700 (Mon, 07 Apr 2008) Log Message: ----------- rename methods and cleanup Modified Paths: -------------- branches/FreeTrainSDL/Program.cs branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureController.cs branches/FreeTrainSDL/core/Controllers/Disambiguators.cs branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainTrackingWindow.cs branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.cs branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx branches/FreeTrainSDL/core/Framework/ResourceUtil.cs branches/FreeTrainSDL/core/Framework/Sound/RepeatableSoundEffectImpl.cs branches/FreeTrainSDL/core/Views/GlobalViewOptions.cs branches/FreeTrainSDL/core/Views/Map/MapView.cs branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs branches/FreeTrainSDL/core/World/Accounting/Debt.cs branches/FreeTrainSDL/core/World/Accounting/TransactionHistory.cs branches/FreeTrainSDL/core/World/Clock.cs branches/FreeTrainSDL/core/World/Cube.cs branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs branches/FreeTrainSDL/core/World/Development/LandValue.cs branches/FreeTrainSDL/core/World/Development/ULV.cs branches/FreeTrainSDL/core/World/Land/LandVoxel.cs branches/FreeTrainSDL/core/World/RRCrossing.cs branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs branches/FreeTrainSDL/core/World/Rail/Platform.cs branches/FreeTrainSDL/core/World/Rail/RailStationaryStructure.cs branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs branches/FreeTrainSDL/core/World/Rail/Station.cs branches/FreeTrainSDL/core/World/Rail/StealSupportedRailContributionImpl.cs branches/FreeTrainSDL/core/World/Rail/Train.cs branches/FreeTrainSDL/core/World/Rail/TunnelRail.cs branches/FreeTrainSDL/core/World/Structs/Commercial.cs branches/FreeTrainSDL/core/World/Structs/ConstructionSite.cs branches/FreeTrainSDL/core/World/Structs/PThreeDimStructure.cs branches/FreeTrainSDL/core/World/Structs/StationListenerImpl.cs branches/FreeTrainSDL/core/World/Structs/Structure.cs branches/FreeTrainSDL/core/World/Structs/VarHeightBuilding.cs branches/FreeTrainSDL/core/World/Subsidiaries/SubsidiaryCompany.cs branches/FreeTrainSDL/core/World/Subsidiaries/SubsidiaryMarket.cs branches/FreeTrainSDL/core/World/Terrain/MountainVoxel.cs branches/FreeTrainSDL/core/World/TimeLength.cs branches/FreeTrainSDL/core/World/Voxel.cs branches/FreeTrainSDL/core/World/WorldDefinition.cs branches/FreeTrainSDL/plugins/Chiname.DummyCars/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.Generic/MultiSelectorController.cs branches/FreeTrainSDL/plugins/Chiname.RoadAccessory/ControllerImpl.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/HVStructure.cs Modified: branches/FreeTrainSDL/Program.cs =================================================================== --- branches/FreeTrainSDL/Program.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/Program.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -212,8 +212,8 @@ { if (qView != null) { - WorldDefinition.World.clock.tick(); - WorldDefinition.World.clock.tick(); + WorldDefinition.World.Clock.tick(); + WorldDefinition.World.Clock.tick(); sourceRect = new Sdl.SDL_Rect((short)ScrollPosition.X, (short)ScrollPosition.Y, (short)width, (short)height); dst = new Sdl.SDL_Rect(0, 0, (short)width, (short)height); @@ -227,7 +227,7 @@ { if (mainWindowMDI != null && WorldDefinition.World != null) { - mainWindowMDI.toolStripStatusLabel.Text = WorldDefinition.World.clock.displayString; + mainWindowMDI.toolStripStatusLabel.Text = WorldDefinition.World.Clock.displayString; } screen.Update(); } Modified: branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureController.cs =================================================================== --- branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureController.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Contributions/Common/FixedSizeStructureController.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -153,7 +153,7 @@ /// <param name="cube"></param> protected override void onSelected(Cube cube) { - PThreeDimStructure s = WorldDefinition.World.getEntityAt(cube.corner) as PThreeDimStructure; + PThreeDimStructure s = WorldDefinition.World.GetEntityAt(cube.corner) as PThreeDimStructure; if (s == null || s.type != contrib) { MessageBox.Show("Wrong type"); Modified: branches/FreeTrainSDL/core/Controllers/Disambiguators.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Disambiguators.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Disambiguators.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -47,7 +47,7 @@ if (RailRoad.get(loc) != null) return true; // or if we hit the ground - if (WorldDefinition.World.getGroundLevel(loc) >= loc.z) return true; + if (WorldDefinition.World.GetGroundLevel(loc) >= loc.z) return true; return false; } @@ -71,7 +71,7 @@ /// <returns></returns> public bool IsSelectable(Location loc) { - return loc.z == WorldDefinition.World.getGroundLevel(loc); + return loc.z == WorldDefinition.World.GetGroundLevel(loc); } } Modified: branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -244,7 +244,7 @@ if (v == null) { // buy it - AccountGenre.Subsidiaries.Spend(WorldDefinition.World.landValue[new Location(x, y, z)]); + AccountGenre.Subsidiaries.Spend(WorldDefinition.World.LandValue[new Location(x, y, z)]); new LandPropertyVoxel(new Location(x, y, z)); } } @@ -277,7 +277,7 @@ if (v == null) // cost for the land - r += WorldDefinition.World.landValue[new Location(x, y, z)]; + r += WorldDefinition.World.LandValue[new Location(x, y, z)]; } } return r; Modified: branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -254,7 +254,7 @@ RailPattern rp = (RailPattern)dic[location]; if (rp != null) { - for (int j = WorldDefinition.World.getGroundLevel(location); j < location.z; j++) + for (int j = WorldDefinition.World.GetGroundLevel(location); j < location.z; j++) { // TODO: ground level handling BridgePierVoxel.defaultSprite.drawAlpha( Modified: branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -361,7 +361,7 @@ else { // it is always allowed to place it on or under ground - if (WorldDefinition.World.getGroundLevel(loc) >= loc.z) + if (WorldDefinition.World.GetGroundLevel(loc) >= loc.z) return true; // if the new rail road is at the edge of existing rail, @@ -454,7 +454,7 @@ { if (i == 2) loc.z++; - for (int j = WorldDefinition.World.getGroundLevel(loc); j < Z; j++) + for (int j = WorldDefinition.World.GetGroundLevel(loc); j < Z; j++) // TODO: ground level handling BridgePierVoxel.defaultSprite.drawAlpha( canvas, view.fromXYZToClient(loc.x, loc.y, j)); Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainControllerDialog.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -69,7 +69,7 @@ // refresh the list list.BeginUpdate(); list.Items.Clear(); - foreach (TrainController tc in WorldDefinition.World.trainControllers) + foreach (TrainController tc in WorldDefinition.World.TrainControllers) { if (tc.contribution == null) continue; // those are system controllers list.Items.Add(createListViewItem(tc)); @@ -276,7 +276,7 @@ TrainController tc = contrib.newController( string.Format("New diagram{0}", iota++)); //! string.Format("新しいダイヤグラム{0}",iota++)); - WorldDefinition.World.trainControllers.add(tc); + WorldDefinition.World.TrainControllers.add(tc); // update GUI list.Items.Add(createListViewItem(tc)); @@ -302,7 +302,7 @@ { // update data structure // TODO: what will happen to trains that are controlled by this train controller? - WorldDefinition.World.trainControllers.remove(selectedItem); + WorldDefinition.World.TrainControllers.remove(selectedItem); // update GUI list.Items.Remove(list.SelectedItems[0]); Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainPlacementController.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -66,7 +66,7 @@ this.label1.Text = Translation.GetString("CONTROLLER_TRAIN_NAME"); this.Text = Translation.GetString("CONTROLLER_TRAIN_PLACE"); - controllerCombo.DataSource = WorldDefinition.World.trainControllers; + controllerCombo.DataSource = WorldDefinition.World.TrainControllers; tree.ItemMoved = new ItemMovedHandler(onItemDropped); //this.FormBorderStyle = FormBorderStyle.SizableToolWindow; @@ -99,9 +99,9 @@ tree.BeginUpdate(); tree.Nodes.Clear(); - TreeNode root = createNode(WorldDefinition.World.rootTrainGroup); + TreeNode root = createNode(WorldDefinition.World.RootTrainGroup); tree.Nodes.Add(root); - populate(WorldDefinition.World.rootTrainGroup, root.Nodes); + populate(WorldDefinition.World.RootTrainGroup, root.Nodes); tree.ExpandAll(); tree.EndUpdate(); Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainTrackingWindow.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainTrackingWindow.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainTrackingWindow.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -229,7 +229,7 @@ private void buttonSelect_Click(object sender, EventArgs e) { ContextMenu m = new ContextMenu(); - populateMenu(m.MenuItems, WorldDefinition.World.rootTrainGroup); + populateMenu(m.MenuItems, WorldDefinition.World.RootTrainGroup); m.Show(buttonSelect, new Point(0, buttonSelect.Height)); } Modified: branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Rail/TrainTradingDialog.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -44,13 +44,13 @@ { InitializeComponent(); //handler = new OptionChangedHandler(updatePreview); - WorldDefinition.World.viewOptions.OnViewOptionChanged += new OptionChangedHandler(updatePreview); + WorldDefinition.World.ViewOptions.OnViewOptionChanged += new OptionChangedHandler(updatePreview); Bitmap bmp = ResourceUtil.LoadSystemBitmap("DayNight.bmp"); buttonImages.TransparentColor = bmp.GetPixel(0, 0); buttonImages.Images.AddStrip(bmp); - tbDay.Pushed = (WorldDefinition.World.viewOptions.nightSpriteMode == NightSpriteMode.AlwaysDay); - tbNight.Pushed = (WorldDefinition.World.viewOptions.nightSpriteMode == NightSpriteMode.AlwaysNight); + tbDay.Pushed = (WorldDefinition.World.ViewOptions.nightSpriteMode == NightSpriteMode.AlwaysDay); + tbNight.Pushed = (WorldDefinition.World.ViewOptions.nightSpriteMode == NightSpriteMode.AlwaysNight); // organize trains into a tree IDictionary types = new SortedList(); @@ -215,7 +215,7 @@ { // buy trains for (int i = 0; i < (int)count.Value; i++) - new Train(WorldDefinition.World.rootTrainGroup, + new Train(WorldDefinition.World.RootTrainGroup, (int)length.Value, selectedTrain); FreeTrain.Framework.Sound.SoundEffectManager @@ -234,9 +234,9 @@ if (e.Button == tb) { if (tb.Pushed) - WorldDefinition.World.viewOptions.nightSpriteMode = (NightSpriteMode)tb.Tag; + WorldDefinition.World.ViewOptions.nightSpriteMode = (NightSpriteMode)tb.Tag; else - WorldDefinition.World.viewOptions.nightSpriteMode = NightSpriteMode.AlignClock; + WorldDefinition.World.ViewOptions.nightSpriteMode = NightSpriteMode.AlignClock; } else { @@ -247,7 +247,7 @@ private void TrainTradingDialog_Closed(object sender, System.EventArgs e) { - WorldDefinition.World.viewOptions.OnViewOptionChanged -= new OptionChangedHandler(updatePreview); + WorldDefinition.World.ViewOptions.OnViewOptionChanged -= new OptionChangedHandler(updatePreview); } void TrainTradingDialogLoad(object sender, EventArgs e) Modified: branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -64,7 +64,7 @@ protected StructPlacementController(StructureGroupGroup groupGroup) { InitializeComponent(); - WorldDefinition.World.viewOptions.OnViewOptionChanged += new OptionChangedHandler(UpdatePreview); + WorldDefinition.World.ViewOptions.OnViewOptionChanged += new OptionChangedHandler(UpdatePreview); previewBitmap = null; // load station type list structType.DataSource = groupGroup; @@ -77,7 +77,7 @@ /// <param name="disposing"></param> protected override void Dispose(bool disposing) { - WorldDefinition.World.viewOptions.OnViewOptionChanged -= new OptionChangedHandler(UpdatePreview); + WorldDefinition.World.ViewOptions.OnViewOptionChanged -= new OptionChangedHandler(UpdatePreview); if (disposing && components != null) components.Dispose(); base.Dispose(disposing); Modified: branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Controllers/Terrain/MountainController.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -180,7 +180,7 @@ Voxel baseVoxel = w[loc]; - int glevel = w.getGroundLevel(loc); + int glevel = w.GetGroundLevel(loc); if (loc.z != glevel) return false; //mountain can be placed only at the ground level @@ -194,12 +194,12 @@ Location l = new Location(loc.x + x, loc.y + y, loc.z); Direction d = Direction.get(1 - x * 2, -y * 2 - 1); // corner to modify - if (w.isOutsideWorld(l)) + if (w.IsOutsideWorld(l)) continue; // it's OK if it's beyond the border Voxel v = w[l]; - if (glevel != w.getGroundLevel(l)) + if (glevel != w.GetGroundLevel(l)) return false; // different ground level if (v == null) @@ -220,7 +220,7 @@ } } - if (WorldDefinition.World.isOutsideWorld(loc)) + if (WorldDefinition.World.IsOutsideWorld(loc)) return false; return true; @@ -288,7 +288,7 @@ } else { - int glevel = world.getGroundLevel(loc); + int glevel = world.GetGroundLevel(loc); if (glevel != loc.z && glevel != loc.z - 1) return false; if (loc.z == 0) @@ -315,7 +315,7 @@ } } - if (WorldDefinition.World.isOutsideWorld(loc)) + if (WorldDefinition.World.IsOutsideWorld(loc)) return false; return true; Modified: branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Framework/Graphics/ColorMappedSprite.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -91,7 +91,7 @@ { pt.X -= offset.X; pt.Y -= offset.Y; - int idx = (WorldDefinition.World.viewOptions.useNightView) ? 1 : 0; + int idx = (WorldDefinition.World.ViewOptions.useNightView) ? 1 : 0; surface.bltColorTransform(pt, picture.surface, origin, size, srcColors[idx], dstColors[idx], false); } Modified: branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Framework/Graphics/HueTransformSprite.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -67,7 +67,7 @@ pt.X -= offset.X; pt.Y -= offset.Y; - int idx = (WorldDefinition.World.viewOptions.useNightView) ? 1 : 0; + int idx = (WorldDefinition.World.ViewOptions.useNightView) ? 1 : 0; surface.bltHueTransform(pt, picture.surface, origin, size, RedTarget, GreenTarget, BlueTarget); Modified: branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Framework/Graphics/Picture.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -228,8 +228,8 @@ { WorldDefinition world = WorldDefinition.World; // reload the surface - Clock c = world.clock; - loaders[(int)c.season, (world.viewOptions.useNightView) ? 1 : 0].Load(ref _surface); + Clock c = world.Clock; + loaders[(int)c.season, (world.ViewOptions.useNightView) ? 1 : 0].Load(ref _surface); //_surface.sourceColorKey = key; dirty = false; } Modified: branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -99,10 +99,11 @@ this.printPreviewToolStripButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.helpToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.playButton = new System.Windows.Forms.ToolStripButton(); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.ToolTip = new System.Windows.Forms.ToolTip(this.components); - this.playButton = new System.Windows.Forms.ToolStripButton(); + this.pauseButton = new System.Windows.Forms.ToolStripButton(); this.menuStrip.SuspendLayout(); this.toolStrip.SuspendLayout(); this.statusStrip.SuspendLayout(); @@ -460,7 +461,8 @@ this.printPreviewToolStripButton, this.toolStripSeparator2, this.helpToolStripButton, - this.playButton}); + this.playButton, + this.pauseButton}); this.toolStrip.Location = new System.Drawing.Point(0, 24); this.toolStrip.Name = "toolStrip"; this.toolStrip.Size = new System.Drawing.Size(525, 25); @@ -534,6 +536,16 @@ this.helpToolStripButton.Size = new System.Drawing.Size(23, 22); this.helpToolStripButton.Text = "Help"; // + // playButton + // + this.playButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.playButton.Image = ((System.Drawing.Image)(resources.GetObject("playButton.Image"))); + this.playButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.playButton.Name = "playButton"; + this.playButton.Size = new System.Drawing.Size(23, 22); + this.playButton.Text = "Play"; + this.playButton.Click += new System.EventHandler(this.playButton_Click); + // // statusStrip // this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -550,15 +562,15 @@ this.toolStripStatusLabel.Size = new System.Drawing.Size(38, 17); this.toolStripStatusLabel.Text = "Status"; // - // playButton + // pauseButton // - this.playButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.playButton.Image = ((System.Drawing.Image)(resources.GetObject("playButton.Image"))); - this.playButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.playButton.Name = "playButton"; - this.playButton.Size = new System.Drawing.Size(23, 22); - this.playButton.Text = "toolStripButton1"; - this.playButton.Click += new System.EventHandler(this.playButton_Click); + this.pauseButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.pauseButton.Image = ((System.Drawing.Image)(resources.GetObject("pauseButton.Image"))); + this.pauseButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.pauseButton.Name = "pauseButton"; + this.pauseButton.Size = new System.Drawing.Size(23, 22); + this.pauseButton.Text = "Pause"; + this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click); // // MainWindowMDI // @@ -645,6 +657,7 @@ /// </summary> public System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel; private System.Windows.Forms.ToolStripButton playButton; + private System.Windows.Forms.ToolStripButton pauseButton; } } Modified: branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -265,5 +265,11 @@ { MainWindowMDI.mainWindow.DetachController(); } + + private void pauseButton_Click(object sender, EventArgs e) + { + //MainWindowMDI.mainWindow.CurrentController = MainWindowMDI.mainWindow.br + //MainWindowMDI.mainWindow.AttachController(MainWindowMDI.mainWindow.CurrentController); + } } } Modified: branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx 2008-04-07 21:05:40 UTC (rev 347) @@ -414,6 +414,21 @@ s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC </value> </data> + <data name="pauseButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL + U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI + VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ + QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4 + /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9 + cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j + 3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR + dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb + NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE + s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC +</value> + </data> <metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> Modified: branches/FreeTrainSDL/core/Framework/ResourceUtil.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/ResourceUtil.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Framework/ResourceUtil.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -182,7 +182,7 @@ /// <returns></returns> public static ISprite getGroundChip(WorldDefinition w) { - if (w.clock.season != Season.Winter) + if (w.Clock.season != Season.Winter) return groundChips[0]; else return groundChips[1]; Modified: branches/FreeTrainSDL/core/Framework/Sound/RepeatableSoundEffectImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Sound/RepeatableSoundEffectImpl.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Framework/Sound/RepeatableSoundEffectImpl.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -92,7 +92,7 @@ /*if( countOverlap()+queue < concurrentPlaybackMax )*/ if (queue++ == 0) - WorldDefinition.World.clock.endOfTurnHandlers += new EventHandler(onTurnEnd); + WorldDefinition.World.Clock.endOfTurnHandlers += new EventHandler(onTurnEnd); } // called at the end of turn Modified: branches/FreeTrainSDL/core/Views/GlobalViewOptions.cs =================================================================== --- branches/FreeTrainSDL/core/Views/GlobalViewOptions.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Views/GlobalViewOptions.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -98,7 +98,7 @@ get { if (nightSpriteMode == NightSpriteMode.AlignClock) - return WorldDefinition.World.clock.dayOrNight == DayNight.Night; + return WorldDefinition.World.Clock.dayOrNight == DayNight.Night; else return nightSpriteMode == NightSpriteMode.AlwaysNight; } Modified: branches/FreeTrainSDL/core/Views/Map/MapView.cs =================================================================== --- branches/FreeTrainSDL/core/Views/Map/MapView.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Views/Map/MapView.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -478,7 +478,7 @@ } else { - int h = height - WorldDefinition.World.waterLevel; + int h = height - WorldDefinition.World.WaterLevel; if (h == 0) this.Text = "Water level"; //! if( h==0 ) this.Text = "地表"; else this.Text = h.ToString(); Modified: branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs =================================================================== --- branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/Views/QuarterViewDrawer.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -292,7 +292,7 @@ public bool IsVisible(Location loc) { // find the bounding box in (A,B) axes - return WorldDefinition.World.getBoundingBox(loc).IntersectsWith(this.visibleRect); + return WorldDefinition.World.GetBoundingBox(loc).IntersectsWith(this.visibleRect); } /// <summary> @@ -317,7 +317,7 @@ /// <param name="loc"></param> public void OnUpdateVoxel(Location loc) { - Rectangle boundingBox = world.getBoundingBox(loc); + Rectangle boundingBox = world.GetBoundingBox(loc); if (boundingBox.IntersectsWith(this.visibleRect)) { dirtyRect.add(boundingBox); @@ -384,11 +384,11 @@ // the same rectangle in the client coordinates Rectangle rectClient = fromABToClient(rectAB); - int waterLevel = world.waterLevel; + int waterLevel = world.WaterLevel; bool noHeightCut = (HeightCutHeight == world.Size.z - 1); Color waterSurfaceColor = waterSurfaceDayColor; - if (world.viewOptions.useNightView) + if (world.ViewOptions.useNightView) waterSurfaceColor = ColorMap.getNightColor(waterSurfaceColor); rectAB.Inflate(20, 20); Modified: branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs =================================================================== --- branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Accounting/AccountGenre.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -60,9 +60,9 @@ { if (_history == null) { - _history = (TransactionHistory)WorldDefinition.World.otherObjects[this]; + _history = (TransactionHistory)WorldDefinition.World.OtherObjects[this]; if (_history == null) - WorldDefinition.World.otherObjects.Add(this, _history = new TransactionHistory()); + WorldDefinition.World.OtherObjects.Add(this, _history = new TransactionHistory()); } return _history; Modified: branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs =================================================================== --- branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Accounting/AccountManager.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -53,7 +53,7 @@ { get { - return WorldDefinition.World.account; + return WorldDefinition.World.Account; } } Modified: branches/FreeTrainSDL/core/World/Accounting/Debt.cs =================================================================== --- branches/FreeTrainSDL/core/World/Accounting/Debt.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Accounting/Debt.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -41,7 +41,7 @@ this.genre = genre; manager.addDebt(this); - WorldDefinition.World.clock.registerOneShot(new ClockHandler(onDue), span); + WorldDefinition.World.Clock.registerOneShot(new ClockHandler(onDue), span); } @@ -57,7 +57,7 @@ /// <summary> TimeLength before the due date </summary> public TimeLength span { - get { return due - WorldDefinition.World.clock; } + get { return due - WorldDefinition.World.Clock; } } /// <summary> @@ -70,6 +70,6 @@ manager.removeDebt(this); } - private AccountManager manager { get { return WorldDefinition.World.account; } } + private AccountManager manager { get { return WorldDefinition.World.Account; } } } } Modified: branches/FreeTrainSDL/core/World/Accounting/TransactionHistory.cs =================================================================== --- branches/FreeTrainSDL/core/World/Accounting/TransactionHistory.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Accounting/TransactionHistory.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -54,7 +54,7 @@ private long _dayTotal; private long _monthTotal; private long _yearTotal; - private readonly Clock clock = WorldDefinition.World.clock; + private readonly Clock clock = WorldDefinition.World.Clock; internal Recorder() { Modified: branches/FreeTrainSDL/core/World/Clock.cs =================================================================== --- branches/FreeTrainSDL/core/World/Clock.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Clock.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -119,7 +119,7 @@ /// </summary> public void registerOneShot(ClockHandler handler, Time time) { - registerOneShot(handler, time - WorldDefinition.World.clock); + registerOneShot(handler, time - WorldDefinition.World.Clock); } Modified: branches/FreeTrainSDL/core/World/Cube.cs =================================================================== --- branches/FreeTrainSDL/core/World/Cube.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Cube.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -181,7 +181,7 @@ { for (int y = y1; y < my; y++) { - if (WorldDefinition.World.getGroundLevel(x, y) != z1) + if (WorldDefinition.World.GetGroundLevel(x, y) != z1) return false; if (WorldDefinition.World[x, y, z1] is MountainVoxel) return false; Modified: branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Development/DevelopmentAlgorithm.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -151,10 +151,10 @@ /// </summary> private void doClock() { - Clock c = WorldDefinition.World.clock; + Clock c = WorldDefinition.World.Clock; if (c.hour == 0) { - foreach (Station s in WorldDefinition.World.stations) + foreach (Station s in WorldDefinition.World.Stations) { if (s.ScoreTrains > 0) { @@ -266,10 +266,10 @@ { if (strength <= 0) break; - Clock c = WorldDefinition.World.clock; + Clock c = WorldDefinition.World.Clock; if (c.hour < vie) scaning = pickPlace(4); - if (scaning != Location.Unplaced && WorldDefinition.World.isInsideWorld(scaning)) + if (scaning != Location.Unplaced && WorldDefinition.World.IsInsideWorld(scaning)) phase++; else strength += strength * (1 - F_StrDiffuse) / 7; @@ -277,8 +277,8 @@ break; case Phase.SelectStruct1: { - Debug.Assert(WorldDefinition.World.isInsideWorld(scaning)); - int minVal = (int)(WorldDefinition.World.landValue[scaning] * F_LandPriceScale); + Debug.Assert(WorldDefinition.World.IsInsideWorld(scaning)); + int minVal = (int)(WorldDefinition.World.LandValue[scaning] * F_LandPriceScale); int maxVal = Math.Max(minVal + 15, (int)(minVal * 1.2)); //maxVal = Math.Max(maxVal,(int)Math.Pow(strength,F_MaxPricePower)); Debug.WriteLine(string.Format("target price: {0} to {1}", minVal, maxVal), "devalgo"); @@ -322,7 +322,7 @@ { //bool OK = true; - if (WorldDefinition.World.isOutsideWorld(plan.cube) || !plan.cube.isOnGround) + if (WorldDefinition.World.IsOutsideWorld(plan.cube) || !plan.cube.isOnGround) { phase = Phase.Start; break; @@ -330,7 +330,7 @@ IEntity[] es = plan.cube.getEntities(); foreach (IEntity e in es) { - if (!IsReplaceable(e, WorldDefinition.World.landValue[scaning])) + if (!IsReplaceable(e, WorldDefinition.World.LandValue[scaning])) { strength += (int)Math.Pow(plan.value, 1.0 / F_MaxPricePower); phase = Phase.Start; @@ -417,10 +417,10 @@ // then randomly pick nearby voxel loc.x = Rand(loc.x, amp); loc.y = Rand(loc.y, amp); - loc.z = w.getGroundLevel(loc); - if (w.isOutsideWorld(loc)) + loc.z = w.GetGroundLevel(loc); + if (w.IsOutsideWorld(loc)) continue; - if (loc.z < w.waterLevel) continue;// below water + if (loc.z < w.WaterLevel) continue;// below water Voxel v = w[loc]; if (v != null) { Modified: branches/FreeTrainSDL/core/World/Development/LandValue.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/LandValue.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Development/LandValue.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -44,7 +44,7 @@ /// <param name="w"></param> public LandValue(WorldDefinition w) { - w.otherObjects["{51CD7E24-4296-4043-B58D-A654AB71F121}"] = this; + w.OtherObjects["{51CD7E24-4296-4043-B58D-A654AB71F121}"] = this; H = w.Size.x; V = w.Size.y; @@ -59,7 +59,7 @@ // register the event notification so that we can update rho correctly w.onVoxelChanged += new VoxelChangeListener(updateRho); - w.clock.registerRepeated(new ClockHandler(next), TimeLength.fromHours(UPDATE_FREQUENCY)); + w.Clock.registerRepeated(new ClockHandler(next), TimeLength.fromHours(UPDATE_FREQUENCY)); } /// <summary> "tempratures" for each (h,v) </summary> @@ -210,7 +210,7 @@ hasMountain = true; } - bool hasSea = WorldDefinition.World.getGroundLevelFromHV(h, v) < WorldDefinition.World.waterLevel; + bool hasSea = WorldDefinition.World.getGroundLevelFromHV(h, v) < WorldDefinition.World.WaterLevel; if (roadFound != null) { Modified: branches/FreeTrainSDL/core/World/Development/ULV.cs =================================================================== --- branches/FreeTrainSDL/core/World/Development/ULV.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Development/ULV.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -77,14 +77,14 @@ WorldDefinition world = WorldDefinition.World; Set s = new Set(); - if (z < world.waterLevel) return null; // underwater + if (z < world.WaterLevel) return null; // underwater for (int x = cube.x1; x < mx; x++) { for (int y = cube.y1; y < my; y++) { - if (world.getGroundLevel(x, y) != z) + if (world.GetGroundLevel(x, y) != z) return null; // not on the ground Voxel v = world[x, y, z]; @@ -101,7 +101,7 @@ } } - landValue += world.landValue[new Location(x, y, z)]; + landValue += world.LandValue[new Location(x, y, z)]; } } Modified: branches/FreeTrainSDL/core/World/Land/LandVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/Land/LandVoxel.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Land/LandVoxel.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -38,7 +38,7 @@ : base(loc) { Debug.Assert(canBeBuilt(loc)); - Debug.Assert(loc.z == WorldDefinition.World.getGroundLevel(loc)); + Debug.Assert(loc.z == WorldDefinition.World.GetGroundLevel(loc)); } /// <summary> /// @@ -87,7 +87,7 @@ /// </summary> public static bool canBeBuilt(Location loc) { - if (WorldDefinition.World.getGroundLevel(loc) != loc.z) + if (WorldDefinition.World.GetGroundLevel(loc) != loc.z) return false; // can only be placed on the ground return WorldDefinition.World.isReusable(loc); } Modified: branches/FreeTrainSDL/core/World/RRCrossing.cs =================================================================== --- branches/FreeTrainSDL/core/World/RRCrossing.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/RRCrossing.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -140,11 +140,11 @@ } private void registerTimer() { - int min = FLASH_FREQUENCY-(WorldDefinition.World.clock.minutes%FLASH_FREQUENCY); + int min = FLASH_FREQUENCY-(WorldDefinition.World.Clock.minutes%FLASH_FREQUENCY); if(min==0) min=FLASH_FREQUENCY; if( currentState!=State.Open ) // register the handler while the Xing is closed. - WorldDefinition.World.clock.registerOneShot( new ClockHandler(followUp), TimeLength.fromMinutes(min) ); + WorldDefinition.World.Clock.registerOneShot( new ClockHandler(followUp), TimeLength.fromMinutes(min) ); } public void followUp() { @@ -205,7 +205,7 @@ if( currentState!=State.Closed ) return (int)currentState; else - return ((WorldDefinition.World.clock.minutes/FLASH_FREQUENCY)%2==0)?2:3; + return ((WorldDefinition.World.Clock.minutes/FLASH_FREQUENCY)%2==0)?2:3; } } Modified: branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/BridgePierVoxel.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -82,7 +82,7 @@ return; // if we can, do it - for (int z = WorldDefinition.World.getGroundLevel(loc); z < loc.z; z++) + for (int z = WorldDefinition.World.GetGroundLevel(loc); z < loc.z; z++) { Activator.CreateInstance( (z == loc.z - 1) ? topBridgeType : otherBridgeType, Modified: branches/FreeTrainSDL/core/World/Rail/Platform.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/Platform.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/Platform.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -49,7 +49,7 @@ this.name = string.Format("Platform {0,2:d}", iota++); //! this.name = string.Format("ホーム{0,2:d}",iota++); this.bellSound = DepartureBellContribution.DEFAULT; - WorldDefinition.World.clock.registerRepeated(new ClockHandler(onClockPerDay), TimeLength.ONEDAY); + WorldDefinition.World.Clock.registerRepeated(new ClockHandler(onClockPerDay), TimeLength.ONEDAY); // attach to the nearby station. foreach (IPlatformHost h in listHosts()) @@ -168,7 +168,7 @@ /// </summary> public virtual void remove() { - WorldDefinition.World.clock.unregister(new ClockHandler(onClockPerDay)); + WorldDefinition.World.Clock.unregister(new ClockHandler(onClockPerDay)); if (onEntityRemoved != null) onEntityRemoved(this, null); } /// <summary> Modified: branches/FreeTrainSDL/core/World/Rail/RailStationaryStructure.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/RailStationaryStructure.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/RailStationaryStructure.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -79,7 +79,7 @@ /// </summary> public static RailStationaryStructure get(Location loc) { - return WorldDefinition.World.getEntityAt(loc) as RailStationaryStructure; + return WorldDefinition.World.GetEntityAt(loc) as RailStationaryStructure; } /// <summary> /// Modified: branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/SingleRailRoad.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -142,8 +142,8 @@ /// <param name="loc"></param> private static int calcRailRoadCost(Location loc, Direction d1, Direction d2) { - int waterLevel = WorldDefinition.World.waterLevel; - int glevel = WorldDefinition.World.getGroundLevel(loc); + int waterLevel = WorldDefinition.World.WaterLevel; + int glevel = WorldDefinition.World.GetGroundLevel(loc); // int multiplier = Math.Max( loc.z-World.world.waterLevel, 1 ); int multiplier = Math.Abs(loc.z - glevel) + 1; @@ -308,7 +308,7 @@ here = here.toward(there); } - return cost * RAILROAD_DESTRUCTION_UNIT_COST * Math.Max(1, here.z - world.waterLevel); + return cost * RAILROAD_DESTRUCTION_UNIT_COST * Math.Max(1, here.z - world.WaterLevel); } /// <summary> Modified: branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/SlopeRailRoad.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -213,7 +213,7 @@ for (int i = 0; i < 4; i++) { - if (_base.z < WorldDefinition.World.getGroundLevel(_base)) + if (_base.z < WorldDefinition.World.GetGroundLevel(_base)) { new SlopeRailRoad(entity, TrafficVoxel.getOrCreate( _base.x, _base.y, _base.z + (i / 2)), @@ -267,7 +267,7 @@ : base(entity, x, y, z) { - int glevel = WorldDefinition.World.getGroundLevel(location); + int glevel = WorldDefinition.World.GetGroundLevel(location); drawSurfaceBelow = !(idx < 2 && glevel >= z); drawSurfaceAbove = !(idx >= 2 && glevel >= z + 1); } @@ -296,7 +296,7 @@ : base(entity, x, y, z) { - int glevel = WorldDefinition.World.getGroundLevel(location); + int glevel = WorldDefinition.World.GetGroundLevel(location); drawSurfaceBelow = !(idx < 2 && glevel >= z); drawSurfaceAbove = !(idx >= 2 && glevel >= z + 1); sprite = s; @@ -363,7 +363,7 @@ _base += dir; } - return SLOPE_CONSTRUCTION_UNIT_COST * Math.Max(1, _base.z - WorldDefinition.World.waterLevel); + return SLOPE_CONSTRUCTION_UNIT_COST * Math.Max(1, _base.z - WorldDefinition.World.WaterLevel); } /// <summary> /// @@ -404,7 +404,7 @@ loc += dir; if (Car.get(loc) != null) return 0; - return SLOPE_DESTRUCTION_UNIT_COST * Math.Max(1, loc.z - WorldDefinition.World.waterLevel); + return SLOPE_DESTRUCTION_UNIT_COST * Math.Max(1, loc.z - WorldDefinition.World.WaterLevel); } /// <summary> Modified: branches/FreeTrainSDL/core/World/Rail/Station.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/Station.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/Station.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -53,9 +53,9 @@ this._name = string.Format("ST{0,2:d}", iota++); if (wloc.world == WorldDefinition.World) { - WorldDefinition.World.stations.add(this); - WorldDefinition.World.clock.registerRepeated(new ClockHandler(clockHandlerHour), TimeLength.fromHours(1)); - WorldDefinition.World.clock.registerRepeated(new ClockHandler(clockHandlerDay), TimeLength.fromHours(24)); + WorldDefinition.World.Stations.add(this); + WorldDefinition.World.Clock.registerRepeated(new ClockHandler(clockHandlerHour), TimeLength.fromHours(1)); + WorldDefinition.World.Clock.registerRepeated(new ClockHandler(clockHandlerDay), TimeLength.fromHours(24)); } Distance r = new Distance(REACH_RANGE, REACH_RANGE, REACH_RANGE); @@ -131,13 +131,13 @@ public override void remove() { - WorldDefinition.World.clock.unregister(new ClockHandler(clockHandlerHour)); - WorldDefinition.World.clock.unregister(new ClockHandler(clockHandlerDay)); + WorldDefinition.World.Clock.unregister(new ClockHandler(clockHandlerHour)); + WorldDefinition.World.Clock.unregister(new ClockHandler(clockHandlerDay)); // first, remove this station from the list of all stations. // this will allow disconnected structures to find the next // nearest station. - WorldDefinition.World.stations.remove(this); + WorldDefinition.World.Stations.remove(this); // notify listeners foreach (IStationListener l in listeners) @@ -372,7 +372,7 @@ import.AddAmount(r); trains.AddAmount(1); Debug.WriteLine(string.Format("devQ on unload v={0} for {1} passengers.", import.LastWeek / 24, r)); - WorldDefinition.World.landValue.addQ(location, Math.Min((float)(import.LastWeek / 24), r)); + WorldDefinition.World.LandValue.addQ(location, Math.Min((float)(import.LastWeek / 24), r)); accumulatedUnloadedPassengers += r; GlobalTrafficMonitor.TheInstance.NotifyPassengerTransport(this, r); } @@ -396,7 +396,7 @@ gonePassengers += pass; accumulatedLoadedPassengers += pass; - WorldDefinition.World.landValue.addQ(location, pass); + WorldDefinition.World.LandValue.addQ(location, pass); Debug.WriteLine(name + ": # of passengers gone (up to) " + gonePassengers); tr.loadPassengers(this, pass); @@ -448,7 +448,7 @@ /// </summary> public static Station get(Location loc) { - return WorldDefinition.World.getEntityAt(loc) as Station; + return WorldDefinition.World.GetEntityAt(loc) as Station; } /// <summary> /// @@ -487,7 +487,7 @@ thisweek += Math.Pow(today, 1 / LogFactor); yesterday = today; today = 0; - Clock c = WorldDefinition.World.clock; + Clock c = WorldDefinition.World.Clock; if (c.dayOfWeek == 6) { lastweek = Math.Pow(thisweek / 7, LogFactor); @@ -508,7 +508,7 @@ /// </summary> public double ThisWeek { - get { return Math.Pow(thisweek / (WorldDefinition.World.clock.dayOfWeek + 1), LogFactor); } + get { return Math.Pow(thisweek / (WorldDefinition.World.Clock.dayOfWeek + 1), LogFactor); } } /// <summary> /// Modified: branches/FreeTrainSDL/core/World/Rail/StealSupportedRailContributionImpl.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/StealSupportedRailContributionImpl.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/StealSupportedRailContributionImpl.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -122,7 +122,7 @@ return false; // rail is running } - if (WorldDefinition.World.getGroundLevel(here) >= here.z) + if (WorldDefinition.World.GetGroundLevel(here) >= here.z) return false; // must be all raised if (here == to) return true; Modified: branches/FreeTrainSDL/core/World/Rail/Train.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/Train.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/Train.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -186,7 +186,7 @@ car.remove(); // make sure that we don't have any pending event - WorldDefinition.World.clock.unregister(new ClockHandler(clockHandler)); + WorldDefinition.World.Clock.unregister(new ClockHandler(clockHandler)); State = TrainStates.Unplaced; } @@ -299,7 +299,7 @@ private void registerTimer(TimeLength time) { - WorldDefinition.World.clock.registerOneShot(new ClockHandler(clockHandler), time); + WorldDefinition.World.Clock.registerOneShot(new ClockHandler(clockHandler), time); } /// <summary> Counter that remembers the # of consecutive times this train is told to stop. </summary> @@ -547,7 +547,7 @@ Location newLoc = state.location + go; newLoc.z += rr.ZDiff(state.direction); - if (WorldDefinition.World.isBorderOfWorld(newLoc)) + if (WorldDefinition.World.IsBorderOfWorld(newLoc)) { // go outside the world return new CarState.Outside(newLoc, go, OUTSIDE_COUNTER_INITIAL_VALUE); Modified: branches/FreeTrainSDL/core/World/Rail/TunnelRail.cs =================================================================== --- branches/FreeTrainSDL/core/World/Rail/TunnelRail.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Rail/TunnelRail.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -158,7 +158,7 @@ public override bool canBeBuilt(Location from, Location to) { if (from == to) return false; - if (from.z < WorldDefinition.World.waterLevel) return false; // below the water level + if (from.z < WorldDefinition.World.WaterLevel) return false; // below the water level Debug.Assert(from.z == to.z); Modified: branches/FreeTrainSDL/core/World/Structs/Commercial.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/Commercial.cs 2008-04-04 20:57:33 UTC (rev 346) +++ branches/FreeTrainSDL/core/World/Structs/Commercial.cs 2008-04-07 21:05:40 UTC (rev 347) @@ -94,7 +94,7 @@ { get { - return WorldDefinition.World.landValue[baseLocation + type.size / 2] * type.size.x * type.size.y; + return WorldDefinition.World.LandValue[baseLocation + type.size / 2] * type.size.x * type.size.y; } } /// <summary> @@ -148,7 +148,7 @@ /// </summary> public static Commercial get(Location loc) { - return WorldDefinition.World.getEntityAt(loc) as Commercial; + return WorldDefinition.World.GetEntityAt(loc) as Commercial; } /// <summary> /// Modified: branches/FreeTrainSDL/core/World/Structs/ConstructionSite.cs =================================================================== --- branches/FreeTrainSDL/core/World/Structs/... [truncated message content] |
From: <je...@us...> - 2008-04-04 20:57:26
|
Revision: 346 http://freetrain.svn.sourceforge.net/freetrain/?rev=346&view=rev Author: jendave Date: 2008-04-04 13:57:33 -0700 (Fri, 04 Apr 2008) Log Message: ----------- beginnings of a "play" button in the ControlCenter window Modified Paths: -------------- branches/FreeTrainSDL/Program.cs branches/FreeTrainSDL/core/Controllers/AbstractControllerImpl.cs branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs branches/FreeTrainSDL/core/Controllers/Land/LandController.cs branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs branches/FreeTrainSDL/core/Framework/BGMPlaylist.cs branches/FreeTrainSDL/core/Framework/Core.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx branches/FreeTrainSDL/core/Framework/Splash.Designer.cs branches/FreeTrainSDL/core/FreeTrain.csproj branches/FreeTrainSDL/core/World/WorldDefinition.cs branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs Modified: branches/FreeTrainSDL/Program.cs =================================================================== --- branches/FreeTrainSDL/Program.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/Program.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -171,7 +171,6 @@ { dragMode = false; Mouse.MousePosition = new Point(oldX, oldY); - Mouse.ShowCursor = true; } @@ -182,7 +181,10 @@ Point ab = qView.fromClientToAB(e.X + ScrollPosition.X, e.Y + ScrollPosition.Y); Location xyz = qView.fromABToXYZ(ab, controller); - if (e.Button == MouseButton.PrimaryButton) controller.OnClick(null, xyz, ab); + if (e.Button == MouseButton.PrimaryButton) + { + controller.OnClick(null, xyz, ab); + } } } lastMouseState = e.ButtonPressed; @@ -196,7 +198,6 @@ } else { - //gui.checkMouseMovement(e.EventStruct.motion); if (controller != null) { Point ab = qView.fromClientToAB(e.X + ScrollPosition.X, e.Y + ScrollPosition.Y); @@ -262,8 +263,6 @@ private void Go() { - - splashscreen = new Splash(); splashscreen.Show(); splashscreen.BringToFront(); Modified: branches/FreeTrainSDL/core/Controllers/AbstractControllerImpl.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/AbstractControllerImpl.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Controllers/AbstractControllerImpl.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -144,7 +144,7 @@ /// <summary> /// /// </summary> - public void UpdatePreview() + public virtual void UpdatePreview() { } } } Modified: branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Controllers/AbstractLineController.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -59,7 +59,7 @@ /// <summary> /// /// </summary> - public void UpdatePreview() + public override void UpdatePreview() { if (this.picture.Image != null) this.picture.Image.Dispose(); Modified: branches/FreeTrainSDL/core/Controllers/Land/LandController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandController.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Controllers/Land/LandController.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -162,7 +162,7 @@ /// <summary> /// /// </summary> - public void UpdatePreview() + public override void UpdatePreview() { LandBuilderContribution builder = (LandBuilderContribution)indexSelector.currentItem; using (PreviewDrawer drawer = builder.createPreview(preview.Size)) Modified: branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Controllers/Land/LandPropertyController.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -58,7 +58,7 @@ /// <summary> /// /// </summary> - public void UpdatePreview() + public override void UpdatePreview() { using (PreviewDrawer drawer = new PreviewDrawer(preview.Size, new Size(3, 3), 0)) { Modified: branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Controllers/Rail/PlatformController.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -504,7 +504,7 @@ /// <summary> /// /// </summary> - public void UpdatePreview() + public override void UpdatePreview() { if (this.currentMode == Mode.Station) onStationChanged(null, null); Modified: branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Controllers/Rail/RailRoadController.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -90,7 +90,7 @@ /// /// </summary> /// <param name="source"></param> - /// <param name="loc"></param> + /// <param name="location"></param> /// <param name="ab"></param> public override void OnClick(MapViewWindow source, Location location, Point ab) { @@ -127,17 +127,21 @@ /// /// </summary> /// <param name="source"></param> - /// <param name="loc"></param> + /// <param name="location"></param> /// <param name="ab"></param> public override void OnRightClick(MapViewWindow source, Location location, Point ab) { if (anchor == unplaced) + { Close(); // cancel + } else { // cancel the anchor if (currentPosition != unplaced) + { WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPosition)); + } anchor = unplaced; UpdateDialog(); } @@ -147,7 +151,7 @@ /// /// </summary> /// <param name="view"></param> - /// <param name="loc"></param> + /// <param name="location"></param> /// <param name="ab"></param> public override void OnMouseMove(MapViewWindow view, Location location, Point ab) { @@ -155,7 +159,9 @@ { // update the screen if (currentPosition != unplaced) + { WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPosition)); + } currentPosition = location; WorldDefinition.World.OnVoxelUpdated(Cube.createInclusive(anchor, currentPosition)); @@ -172,6 +178,16 @@ /// <summary> /// /// </summary> + /// <param name="e"></param> + protected override void OnDeactivate(EventArgs e) + { + base.OnDeactivate(e); + anchor = unplaced; + } + + /// <summary> + /// + /// </summary> public override void OnDetached() { anchor = unplaced; @@ -185,8 +201,14 @@ get { // the 2nd selection must go to the same height as the anchor. - if (anchor == unplaced) return RailRoadDisambiguator.theInstance; - else return sameLevelDisambiguator; + if (anchor == unplaced) + { + return RailRoadDisambiguator.theInstance; + } + else + { + return sameLevelDisambiguator; + } } } @@ -211,7 +233,9 @@ int cost; canvas.Tag = SingleRailRoad.ComputeRoute(anchor, currentPosition, out cost); if (canvas.Tag != null) + { Debug.WriteLine(((IDictionary)canvas.Tag).Count); + } } } @@ -220,8 +244,8 @@ /// </summary> /// <param name="view"></param> /// <param name="canvas"></param> - /// <param name="loc"></param> - /// <param name="pt"></param> + /// <param name="location"></param> + /// <param name="point"></param> public void DrawVoxel(QuarterViewDrawer view, DrawContext canvas, Location location, Point point) { IDictionary dic = (IDictionary)canvas.Tag; @@ -231,10 +255,12 @@ if (rp != null) { for (int j = WorldDefinition.World.getGroundLevel(location); j < location.z; j++) + { // TODO: ground level handling BridgePierVoxel.defaultSprite.drawAlpha( canvas.Surface, view.fromXYZToClient(location.x, location.y, j)); + } rp.drawAlpha(canvas.Surface, point); } Modified: branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Controllers/Rail/SlopeRailRoadController.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -59,7 +59,7 @@ /// <summary> /// /// </summary> - public void UpdatePreview() + public override void UpdatePreview() { PreviewDrawer drawer; Modified: branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs =================================================================== --- branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Controllers/Structs/StructPlacementController.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -323,11 +323,10 @@ /// <summary> /// /// </summary> - public void UpdatePreview() + public override void UpdatePreview() { - /*using( PreviewDrawer drawer = selectedType.createPreview(preview.Size) ) + /*using( PreviewDrawer drawer = selectedType.createPreview(preview.Size) ) { - if( previewBitmap!=null ) previewBitmap.Dispose(); preview.Image = previewBitmap = drawer.createBitmap(); }*/ Modified: branches/FreeTrainSDL/core/Framework/BGMPlaylist.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/BGMPlaylist.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Framework/BGMPlaylist.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -25,7 +25,9 @@ using System.Drawing; using System.Text; using System.Windows.Forms; + using FreeTrain.Contributions.Sound; +using FreeTrain.Controllers; namespace FreeTrain.Framework @@ -33,7 +35,7 @@ /// <summary> /// /// </summary> - public partial class BGMPlaylist : Form + public partial class BGMPlaylist : AbstractControllerImpl { private bool isPlaying = false; /// <summary> Modified: branches/FreeTrainSDL/core/Framework/Core.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Core.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Framework/Core.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -59,6 +59,9 @@ /// <summary> Plug-ins. </summary> private static readonly PluginManager plugins = new PluginManager(); + /// <summary> + /// + /// </summary> public static PluginManager Plugins { get { return Core.plugins; } @@ -68,6 +71,9 @@ /// <summary> Global options. </summary> private static readonly GlobalOptions options = new GlobalOptions().load(); + /// <summary> + /// + /// </summary> public static GlobalOptions Options { get { return Core.options; } Modified: branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Framework/MainWindowMDI.Designer.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -102,6 +102,7 @@ this.statusStrip = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.ToolTip = new System.Windows.Forms.ToolTip(this.components); + this.playButton = new System.Windows.Forms.ToolStripButton(); this.menuStrip.SuspendLayout(); this.toolStrip.SuspendLayout(); this.statusStrip.SuspendLayout(); @@ -458,7 +459,8 @@ this.printToolStripButton, this.printPreviewToolStripButton, this.toolStripSeparator2, - this.helpToolStripButton}); + this.helpToolStripButton, + this.playButton}); this.toolStrip.Location = new System.Drawing.Point(0, 24); this.toolStrip.Name = "toolStrip"; this.toolStrip.Size = new System.Drawing.Size(525, 25); @@ -516,6 +518,7 @@ this.printPreviewToolStripButton.Name = "printPreviewToolStripButton"; this.printPreviewToolStripButton.Size = new System.Drawing.Size(23, 22); this.printPreviewToolStripButton.Text = "Print Preview"; + this.printPreviewToolStripButton.Click += new System.EventHandler(this.printPreviewToolStripButton_Click); // // toolStripSeparator2 // @@ -547,6 +550,16 @@ this.toolStripStatusLabel.Size = new System.Drawing.Size(38, 17); this.toolStripStatusLabel.Text = "Status"; // + // playButton + // + this.playButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.playButton.Image = ((System.Drawing.Image)(resources.GetObject("playButton.Image"))); + this.playButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.playButton.Name = "playButton"; + this.playButton.Size = new System.Drawing.Size(23, 22); + this.playButton.Text = "toolStripButton1"; + this.playButton.Click += new System.EventHandler(this.playButton_Click); + // // MainWindowMDI // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -623,8 +636,15 @@ private System.Windows.Forms.ToolStripButton printPreviewToolStripButton; private System.Windows.Forms.ToolStripButton helpToolStripButton; private System.Windows.Forms.ToolTip ToolTip; + /// <summary> + /// + /// </summary> public System.Windows.Forms.StatusStrip statusStrip; + /// <summary> + /// + /// </summary> public System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel; + private System.Windows.Forms.ToolStripButton playButton; } } Modified: branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Framework/MainWindowMDI.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -118,9 +118,13 @@ public void AttachController(IModalController newHandler) { if (controller == newHandler) + { return; // already activated + } if (controller != null) + { DetachController(); // deactive the current handler first + } controller = newHandler; controller.OnAttached(); @@ -135,7 +139,10 @@ /// </summary> public void DetachController() { - if (controller == null) return; + if (controller == null) + { + return; + } controller.OnDetached(); controller = null; @@ -248,5 +255,15 @@ AboutDialog aboutDialog = new AboutDialog(); aboutDialog.ShowDialog(); } + + private void printPreviewToolStripButton_Click(object sender, EventArgs e) + { + + } + + private void playButton_Click(object sender, EventArgs e) + { + MainWindowMDI.mainWindow.DetachController(); + } } } Modified: branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx =================================================================== --- branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Framework/MainWindowMDI.resx 2008-04-04 20:57:33 UTC (rev 346) @@ -399,6 +399,21 @@ wTF/EP4JaStxoteu5NMAAAAASUVORK5CYII= </value> </data> + <data name="playButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL + U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI + VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ + QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4 + /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9 + cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j + 3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR + dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb + NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE + s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC +</value> + </data> <metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> Modified: branches/FreeTrainSDL/core/Framework/Splash.Designer.cs =================================================================== --- branches/FreeTrainSDL/core/Framework/Splash.Designer.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/Framework/Splash.Designer.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -46,6 +46,9 @@ private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.ImageList imageList; private System.Windows.Forms.ProgressBar progressBar; + /// <summary> + /// + /// </summary> public TextBox status; private System.ComponentModel.IContainer components; Modified: branches/FreeTrainSDL/core/FreeTrain.csproj =================================================================== --- branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-04 20:57:33 UTC (rev 346) @@ -859,8 +859,8 @@ <SubType>Code</SubType> </Compile> <Compile Include="World\WorldDefinition.cs" /> - <Content Include="..\plugins\system\Plugin.xml"> - <Link>Plugin.xml</Link> + <Content Include="..\plugins\system\plugin.xml"> + <Link>plugin.xml</Link> </Content> <Content Include="Contributions\readme.txt" /> <Content Include="Res\Arrows.bmp" /> Modified: branches/FreeTrainSDL/core/World/WorldDefinition.cs =================================================================== --- branches/FreeTrainSDL/core/World/WorldDefinition.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/core/World/WorldDefinition.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -761,7 +761,7 @@ /// <summary> /// /// </summary> - /// <param name="v"></param> + /// <param name="voxel"></param> public void OnVoxelUpdated(Voxel voxel) { OnVoxelUpdated(voxel.location); Modified: branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs =================================================================== --- branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs 2008-04-01 19:37:35 UTC (rev 345) +++ branches/FreeTrainSDL/plugins/Chiname.Structure.HalfVoxel/ControllerForm.cs 2008-04-04 20:57:33 UTC (rev 346) @@ -41,7 +41,6 @@ /// Controller that allows the user to /// place/remove cars. /// </summary> - [CLSCompliant(false)] public class ControllerForm : AbstractControllerImpl { private System.Windows.Forms.Label label1; @@ -366,7 +365,7 @@ this.Controls.Add(this.price); this.Name = "ControllerForm"; this.Text = "Half-tile Construction"; - this.Resize += new System.EventHandler(this.updateSize); + this.Resize += new System.EventHandler(this.UpdateSize); ((System.ComponentModel.ISupportInitialize)(this.preview)).EndInit(); this.group.ResumeLayout(false); this.ResumeLayout(false); @@ -377,7 +376,7 @@ /// <summary> /// /// </summary> - public bool isPlacing + public bool IsPlacing { get { @@ -394,7 +393,6 @@ } } - private int currentColor { get @@ -431,7 +429,7 @@ #region Event Handlers private void onTypeChanged(object sender, System.EventArgs e) { - idxDesign.count = currentGroup.size; + idxDesign.count = currentGroup.Size; onDesignChanged(sender, e); } @@ -508,7 +506,7 @@ /// </summary> /// <param name="sender"></param> /// <param name="e"></param> - protected virtual void updateSize(object sender, System.EventArgs e) + protected virtual void UpdateSize(object sender, System.EventArgs e) { UpdatePreview(); } @@ -518,8 +516,7 @@ /// <summary> /// Called when a selection of the structure has changed. /// </summary> - [CLSCompliant(false)] - public void UpdatePreview() + public override void UpdatePreview() { using (PreviewDrawer drawer = currentContrib.createPreview(preview.Size)) { @@ -528,15 +525,20 @@ } } - #region SubGroup private class SubGroup : object { - public readonly string name; + private readonly string name; + + public string Name + { + get { return name; } + } + private ArrayList arr; - public SubGroup(string _name) + public SubGroup(string name) { - name = _name; + this.name = name; arr = new ArrayList(); } @@ -545,7 +547,7 @@ arr.Add(contrib); } - public int size + public int Size { get { return arr.Count; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-01 19:37:39
|
Revision: 345 http://freetrain.svn.sourceforge.net/freetrain/?rev=345&view=rev Author: jendave Date: 2008-04-01 12:37:35 -0700 (Tue, 01 Apr 2008) Log Message: ----------- fix project due to directory name changes Modified Paths: -------------- branches/FreeTrainSDL/core/FreeTrain.csproj Modified: branches/FreeTrainSDL/core/FreeTrain.csproj =================================================================== --- branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-01 19:30:00 UTC (rev 344) +++ branches/FreeTrainSDL/core/FreeTrain.csproj 2008-04-01 19:37:35 UTC (rev 345) @@ -95,168 +95,168 @@ </Reference> </ItemGroup> <ItemGroup> - <Compile Include="Contributions\common\FixedSizeStructureContribution.cs"> + <Compile Include="Contributions\Common\FixedSizeStructureContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\common\FixedSizeStructureController.cs"> + <Compile Include="Contributions\Common\FixedSizeStructureController.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\common\IAbstractStructure.cs" /> - <Compile Include="Contributions\common\IEntityBuilder.cs"> + <Compile Include="Contributions\Common\IAbstractStructure.cs" /> + <Compile Include="Contributions\Common\IEntityBuilder.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\common\IPreviewWorldBuilder.cs"> + <Compile Include="Contributions\Common\IPreviewWorldBuilder.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\common\LineContribution.cs"> + <Compile Include="Contributions\Common\LineContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\common\PictureContribution.cs"> + <Compile Include="Contributions\Common\PictureContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\common\StructureContribution.cs"> + <Compile Include="Contributions\Common\StructureContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\common\StructureGroup.cs"> + <Compile Include="Contributions\Common\StructureGroup.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\common\SubDividedStructureContribution.cs"> + <Compile Include="Contributions\Common\SubDividedStructureContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\land\Bulldozer.cs"> + <Compile Include="Contributions\Land\Bulldozer.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\land\DefaultControllerImpl.cs"> + <Compile Include="Contributions\Land\DefaultControllerImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\land\LandBuilderContribution.cs"> + <Compile Include="Contributions\Land\LandBuilderContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\land\LandBuilderGroup.cs"> + <Compile Include="Contributions\Land\LandBuilderGroup.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\land\RandomLandBuilder.cs"> + <Compile Include="Contributions\Land\RandomLandBuilder.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\land\StaticLandBuilder.cs"> + <Compile Include="Contributions\Land\StaticLandBuilder.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\others\EmptyNewGameContributionImpl.cs"> + <Compile Include="Contributions\Others\EmptyNewGameContributionImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\others\MenuContribution.cs"> + <Compile Include="Contributions\Others\MenuContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\others\NewGameContribution.cs"> + <Compile Include="Contributions\Others\NewGameContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\others\NewWorldDialog.cs"> + <Compile Include="Contributions\Others\NewWorldDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Contributions\population\AgriculturalPopulation.cs"> + <Compile Include="Contributions\Population\AgriculturalPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\BasePopulation.cs" /> - <Compile Include="Contributions\population\CombinationPopulation.cs"> + <Compile Include="Contributions\Population\BasePopulation.cs" /> + <Compile Include="Contributions\Population\CombinationPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\ConstantPopulation.cs"> + <Compile Include="Contributions\Population\ConstantPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\HourlyPopulation.cs"> + <Compile Include="Contributions\Population\HourlyPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\MultiplierPopulation.cs"> + <Compile Include="Contributions\Population\MultiplierPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\OfficePopulation.cs"> + <Compile Include="Contributions\Population\OfficePopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\PersistentPopulation.cs"> + <Compile Include="Contributions\Population\PersistentPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\ResidentialPopulation.cs"> + <Compile Include="Contributions\Population\ResidentialPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\RestaurantPopulation.cs"> + <Compile Include="Contributions\Population\RestaurantPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\population\ShopperPopulation.cs"> + <Compile Include="Contributions\Population\ShopperPopulation.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\rail\DepartureBellContribution.cs"> + <Compile Include="Contributions\Rail\DepartureBellContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\rail\RailAccessoryContribution.cs"> + <Compile Include="Contributions\Rail\RailAccessoryContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\rail\RailStationaryContribution.cs"> + <Compile Include="Contributions\Rail\RailStationaryContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\rail\SpecialRailContribution.cs"> + <Compile Include="Contributions\Rail\SpecialRailContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\rail\StationContribution.cs"> + <Compile Include="Contributions\Rail\StationContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\rail\TrainControllerContribution.cs"> + <Compile Include="Contributions\Rail\TrainControllerContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\road\A3RoadContribution.cs"> + <Compile Include="Contributions\Road\A3RoadContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\road\AbstractRoadContributionImpl.cs"> + <Compile Include="Contributions\Road\AbstractRoadContributionImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\road\RoadContribution.cs"> + <Compile Include="Contributions\Road\RoadContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\road\StandardRoadContribution.cs"> + <Compile Include="Contributions\Road\StandardRoadContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\sound\BGMContribution.cs"> + <Compile Include="Contributions\Sound\BGMContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\sound\BGMFactoryContribution.cs"> + <Compile Include="Contributions\Sound\BGMFactoryContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\structs\CommercialStructureContribution.cs"> + <Compile Include="Contributions\Structs\CommercialStructureContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\structs\SpecialStructureContribution.cs"> + <Compile Include="Contributions\Structs\SpecialStructureContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\structs\VarHeightBuildingContribution.cs"> + <Compile Include="Contributions\Structs\VarHeightBuildingContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\AbstractTrainContributionImpl.cs"> + <Compile Include="Contributions\Train\AbstractTrainContributionImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\AsymTrainCarImpl.cs"> + <Compile Include="Contributions\Train\AsymTrainCarImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\ColoredTrainCarImpl.cs"> + <Compile Include="Contributions\Train\ColoredTrainCarImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\ParamTrainImpl.cs"> + <Compile Include="Contributions\Train\ParamTrainImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\PatternTrainImpl.cs"> + <Compile Include="Contributions\Train\PatternTrainImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\ReverseTrainCarImpl.cs"> + <Compile Include="Contributions\Train\ReverseTrainCarImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\SymTrainCarImpl.cs"> + <Compile Include="Contributions\Train\SymTrainCarImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\TrainCarContribution.cs"> + <Compile Include="Contributions\Train\TrainCarContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\TrainContribution.cs"> + <Compile Include="Contributions\Train\TrainContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Contributions\train\TrainContributionFactory.cs"> + <Compile Include="Contributions\Train\TrainContributionFactory.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Controllers\AbstractControllerImpl.cs"> @@ -276,13 +276,13 @@ </Compile> <Compile Include="Controllers\ILocationDisambiguator.cs" /> <Compile Include="Controllers\IModalController.cs" /> - <Compile Include="Controllers\land\BulldozeController.cs"> + <Compile Include="Controllers\Land\BulldozeController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\land\LandController.cs"> + <Compile Include="Controllers\Land\LandController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\land\LandPropertyController.cs"> + <Compile Include="Controllers\Land\LandPropertyController.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Controllers\LocationStore.cs"> @@ -291,85 +291,85 @@ <Compile Include="Controllers\PointSelectorController.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Controllers\rail\PlatformController.Designer.cs"> + <Compile Include="Controllers\Rail\PlatformController.Designer.cs"> <DependentUpon>PlatformController.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\TrainTradingDialog.Designer.cs"> + <Compile Include="Controllers\Rail\TrainTradingDialog.Designer.cs"> <DependentUpon>TrainTradingDialog.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\TrainPlacementController.Designer.cs"> + <Compile Include="Controllers\Rail\TrainPlacementController.Designer.cs"> <DependentUpon>TrainPlacementController.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\RailRoadController.Designer.cs"> + <Compile Include="Controllers\Rail\RailRoadController.Designer.cs"> <DependentUpon>RailRoadController.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\PlatformController.cs"> + <Compile Include="Controllers\Rail\PlatformController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\PlatformPropertyDialog.cs"> + <Compile Include="Controllers\Rail\PlatformPropertyDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\RailRoadController.cs"> + <Compile Include="Controllers\Rail\RailRoadController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\SlopeRailRoadController.cs"> + <Compile Include="Controllers\Rail\SlopeRailRoadController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\SpecialPurposeRailController.cs"> + <Compile Include="Controllers\Rail\SpecialPurposeRailController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\StationaryStructPlacementController.cs"> + <Compile Include="Controllers\Rail\StationaryStructPlacementController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\StationPassagewayController.cs"> + <Compile Include="Controllers\Rail\StationPassagewayController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\StationPropertyDialog.cs"> + <Compile Include="Controllers\Rail\StationPropertyDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\TrainControllerDialog.cs"> + <Compile Include="Controllers\Rail\TrainControllerDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\TrainPlacementController.cs"> + <Compile Include="Controllers\Rail\TrainPlacementController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\TrainTrackingWindow.cs"> + <Compile Include="Controllers\Rail\TrainTrackingWindow.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\rail\TrainTradingDialog.cs"> + <Compile Include="Controllers\Rail\TrainTradingDialog.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Controllers\RectSelectorController.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Controllers\road\RoadController.cs"> + <Compile Include="Controllers\Road\RoadController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\structs\CommercialStructPlacementController.cs"> + <Compile Include="Controllers\Structs\CommercialStructPlacementController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\structs\VarHeightBuildingController.Designer.cs"> + <Compile Include="Controllers\Structs\VarHeightBuildingController.Designer.cs"> <DependentUpon>VarHeightBuildingController.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\structs\FixedSizeStructController.cs"> + <Compile Include="Controllers\Structs\FixedSizeStructController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\structs\StructPlacementController.cs"> + <Compile Include="Controllers\Structs\StructPlacementController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\structs\VarHeightBuildingController.cs"> + <Compile Include="Controllers\Structs\VarHeightBuildingController.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\terrain\MountainController.Designer.cs"> + <Compile Include="Controllers\Terrain\MountainController.Designer.cs"> <DependentUpon>MountainController.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Controllers\terrain\MountainController.cs"> + <Compile Include="Controllers\Terrain\MountainController.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Framework\AboutDialog.cs"> @@ -391,11 +391,11 @@ <DependentUpon>AboutDialog.cs</DependentUpon> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\graphics\NightSurfaceLoader.cs" /> - <Compile Include="Framework\graphics\BitmapSurfaceLoader.cs" /> - <Compile Include="Framework\graphics\ISprite.cs" /> - <Compile Include="Framework\graphics\ISurfaceLoader.cs" /> - <Compile Include="Framework\plugin\IContributionFactory.cs" /> + <Compile Include="Framework\Graphics\NightSurfaceLoader.cs" /> + <Compile Include="Framework\Graphics\BitmapSurfaceLoader.cs" /> + <Compile Include="Framework\Graphics\ISprite.cs" /> + <Compile Include="Framework\Graphics\ISurfaceLoader.cs" /> + <Compile Include="Framework\Plugin\IContributionFactory.cs" /> <Compile Include="Framework\Splash.Designer.cs"> <DependentUpon>Splash.cs</DependentUpon> <SubType>Form</SubType> @@ -412,55 +412,55 @@ <Compile Include="Framework\GlobalOptions.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\AlphaBlendSpriteSet.cs"> + <Compile Include="Framework\Graphics\AlphaBlendSpriteSet.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\ColorLibrary.cs"> + <Compile Include="Framework\Graphics\ColorLibrary.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\ColorMap.cs"> + <Compile Include="Framework\Graphics\ColorMap.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\ColorMappedSprite.cs"> + <Compile Include="Framework\Graphics\ColorMappedSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\DefaultSpriteLoaderContributionImpl.cs"> + <Compile Include="Framework\Graphics\DefaultSpriteLoaderContributionImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\DirectSprite.cs"> + <Compile Include="Framework\Graphics\DirectSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\DirtyRect.cs"> + <Compile Include="Framework\Graphics\DirtyRect.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\GraphicsException.cs"> + <Compile Include="Framework\Graphics\GraphicsException.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\HueTransformSprite.cs"> + <Compile Include="Framework\Graphics\HueTransformSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\NullSprite.cs"> + <Compile Include="Framework\Graphics\NullSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\Picture.cs"> + <Compile Include="Framework\Graphics\Picture.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\PictureManager.cs"> + <Compile Include="Framework\Graphics\PictureManager.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\PreviewDrawer.cs"> + <Compile Include="Framework\Graphics\PreviewDrawer.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\SimpleSprite.cs"> + <Compile Include="Framework\Graphics\SimpleSprite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\SpriteFactory.cs"> + <Compile Include="Framework\Graphics\SpriteFactory.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\SpriteFactoryContribution.cs"> + <Compile Include="Framework\Graphics\SpriteFactoryContribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\SpriteLoaderContribution.cs"> + <Compile Include="Framework\Graphics\SpriteLoaderContribution.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Framework\MainWindowMDI.cs"> @@ -475,41 +475,41 @@ <Compile Include="Framework\PersistentOptions.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\plugin\Contribution.cs"> + <Compile Include="Framework\Plugin\Contribution.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\plugin\DynamicContributionFactory.cs"> + <Compile Include="Framework\Plugin\DynamicContributionFactory.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\plugin\FixedClassContributionFactory.cs"> + <Compile Include="Framework\Plugin\FixedClassContributionFactory.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\plugin\PluginDefinition.cs" /> - <Compile Include="Framework\plugin\PluginListDialog.cs"> + <Compile Include="Framework\Plugin\PluginDefinition.cs" /> + <Compile Include="Framework\Plugin\PluginListDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Framework\plugin\PluginManager.cs"> + <Compile Include="Framework\Plugin\PluginManager.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\plugin\PluginSerializationBinder.cs"> + <Compile Include="Framework\Plugin\PluginSerializationBinder.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\plugin\PluginUtil.cs"> + <Compile Include="Framework\Plugin\PluginUtil.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\plugin\XmlUtil.cs"> + <Compile Include="Framework\Plugin\XmlUtil.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Framework\ResourceUtil.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\sound\RepeatableSoundEffectImpl.cs"> + <Compile Include="Framework\Sound\RepeatableSoundEffectImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\sound\SoundEffect.cs"> + <Compile Include="Framework\Sound\SoundEffect.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\sound\SoundEffectManager.cs"> + <Compile Include="Framework\Sound\SoundEffectManager.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Framework\Splash.cs"> @@ -539,19 +539,19 @@ <Compile Include="Util\ArrayEnumerator.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Util\command\Command.cs"> + <Compile Include="Util\Command\Command.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Util\command\CommandExecutor.cs"> + <Compile Include="Util\Command\CommandExecutor.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Util\command\CommandManager.cs"> + <Compile Include="Util\Command\CommandManager.cs"> <SubType>Component</SubType> </Compile> - <Compile Include="Util\controls\DDTreeView.cs"> + <Compile Include="Util\Controls\DDTreeView.cs"> <SubType>Component</SubType> </Compile> - <Compile Include="Util\controls\ToolBarCustomizerUI.cs"> + <Compile Include="Util\Controls\ToolBarCustomizerUI.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Util\CurrencyUtil.cs"> @@ -569,7 +569,7 @@ <Compile Include="Util\Set.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="Framework\graphics\Surface.cs" /> + <Compile Include="Framework\Graphics\Surface.cs" /> <Compile Include="Util\Translation.cs" /> <Compile Include="Util\UrlInvoker.cs"> <SubType>Code</SubType> @@ -584,13 +584,13 @@ <SubType>Code</SubType> </Compile> <Compile Include="Views\IMapOverlay.cs" /> - <Compile Include="Views\map\HeightCutWindow.cs"> + <Compile Include="Views\Map\HeightCutWindow.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Views\map\MapView.cs"> + <Compile Include="Views\Map\MapView.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="Views\map\PreviewForm.cs"> + <Compile Include="Views\Map\PreviewForm.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Views\NullWeatherOverlay.cs"> @@ -608,25 +608,25 @@ <Compile Include="Views\WeatherOverlaySpriteSet.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\accounting\AccountGenre.cs"> + <Compile Include="World\Accounting\AccountGenre.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\accounting\AccountManager.cs"> + <Compile Include="World\Accounting\AccountManager.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\accounting\AccountSummaryWindow.cs"> + <Compile Include="World\Accounting\AccountSummaryWindow.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="World\accounting\BalanceSheetForm.cs"> + <Compile Include="World\Accounting\BalanceSheetForm.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="World\accounting\Debt.cs"> + <Compile Include="World\Accounting\Debt.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\accounting\GenreSelectorDialog.cs"> + <Compile Include="World\Accounting\GenreSelectorDialog.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="World\accounting\TransactionHistory.cs"> + <Compile Include="World\Accounting\TransactionHistory.cs"> <SubType>Code</SubType> </Compile> <Compile Include="World\Car.cs"> @@ -641,40 +641,40 @@ <Compile Include="World\Cube.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\CommercialStructurePlan.cs"> + <Compile Include="World\Development\CommercialStructurePlan.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\DevelopConfigure.cs"> + <Compile Include="World\Development\DevelopConfigure.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="World\development\DevelopConfigurePlugin.cs"> + <Compile Include="World\Development\DevelopConfigurePlugin.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\DevelopmentAlgorithm.cs"> + <Compile Include="World\Development\DevelopmentAlgorithm.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\LandPlan.cs"> + <Compile Include="World\Development\LandPlan.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\LandValue.cs"> + <Compile Include="World\Development\LandValue.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\LandValueInspector.cs"> + <Compile Include="World\Development\LandValueInspector.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="World\development\LandValueInspectorPlugin.cs"> + <Compile Include="World\Development\LandValueInspectorPlugin.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\Plan.cs"> + <Compile Include="World\Development\Plan.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\ULV.cs"> + <Compile Include="World\Development\ULV.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\ULVFactory.cs"> + <Compile Include="World\Development\ULVFactory.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\development\VarHeightBuildingPlan.cs"> + <Compile Include="World\Development\VarHeightBuildingPlan.cs"> <SubType>Code</SubType> </Compile> <Compile Include="World\Direction.cs"> @@ -690,13 +690,13 @@ <SubType>Code</SubType> </Compile> <Compile Include="World\IVoxelOutlookListener.cs" /> - <Compile Include="World\land\LandPropertyVoxel.cs"> + <Compile Include="World\Land\LandPropertyVoxel.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\land\LandVoxel.cs"> + <Compile Include="World\Land\LandVoxel.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\land\StaticLandVoxel.cs"> + <Compile Include="World\Land\StaticLandVoxel.cs"> <SubType>Code</SubType> </Compile> <Compile Include="World\Location.cs"> @@ -705,97 +705,97 @@ <Compile Include="World\Matrix.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\BridgePierVoxel.cs"> + <Compile Include="World\Rail\BridgePierVoxel.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\BridgeRail.cs"> + <Compile Include="World\Rail\BridgeRail.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\DelegationTrainControllerImpl.cs"> + <Compile Include="World\Rail\DelegationTrainControllerImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\FatPlatform.cs"> + <Compile Include="World\Rail\FatPlatform.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\GlobalTrafficMonitor.cs"> + <Compile Include="World\Rail\GlobalTrafficMonitor.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\JunctionRailRoad.cs"> + <Compile Include="World\Rail\JunctionRailRoad.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\PassagewayRail.cs"> + <Compile Include="World\Rail\PassagewayRail.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\Platform.cs"> + <Compile Include="World\Rail\Platform.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\PlatformHost.cs"> + <Compile Include="World\Rail\PlatformHost.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\RailPattern.cs"> + <Compile Include="World\Rail\RailPattern.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\RailRoad.cs"> + <Compile Include="World\Rail\RailRoad.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\RailStationaryStructure.cs"> + <Compile Include="World\Rail\RailStationaryStructure.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\SimpleTrainControllerImpl.cs"> + <Compile Include="World\Rail\SimpleTrainControllerImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\SingleRailRoad.cs"> + <Compile Include="World\Rail\SingleRailRoad.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\SlopeRailRoad.cs"> + <Compile Include="World\Rail\SlopeRailRoad.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\SpecialPurposeRailRoad.cs"> + <Compile Include="World\Rail\SpecialPurposeRailRoad.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\Station.cs"> + <Compile Include="World\Rail\Station.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\StationListener.cs"> + <Compile Include="World\Rail\StationListener.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\StealSupportedRailContributionImpl.cs"> + <Compile Include="World\Rail\StealSupportedRailContributionImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\ThinPlatform.cs"> + <Compile Include="World\Rail\ThinPlatform.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\Train.cs"> + <Compile Include="World\Rail\Train.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\TrainController.cs"> + <Compile Include="World\Rail\TrainController.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\TrainGroup.cs"> + <Compile Include="World\Rail\TrainGroup.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\TrainHarbor.cs"> + <Compile Include="World\Rail\TrainHarbor.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\TrainItem.cs"> + <Compile Include="World\Rail\TrainItem.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\TunnelRail.cs"> + <Compile Include="World\Rail\TunnelRail.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\rail\YardRailRoad.cs"> + <Compile Include="World\Rail\YardRailRoad.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\road\Bus.cs"> + <Compile Include="World\Road\Bus.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\road\Road.cs"> + <Compile Include="World\Road\Road.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\road\RoadPattern.cs"> + <Compile Include="World\Road\RoadPattern.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\road\RoadStyle.cs"> + <Compile Include="World\Road\RoadStyle.cs"> <SubType>Code</SubType> </Compile> <Compile Include="World\RRCrossing.cs"> @@ -807,43 +807,43 @@ <Compile Include="World\SparseVoxelArray.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\structs\Commercial.cs"> + <Compile Include="World\Structs\Commercial.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\structs\ConstructionSite.cs"> + <Compile Include="World\Structs\ConstructionSite.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\structs\PopulatedStructure.cs"> + <Compile Include="World\Structs\PopulatedStructure.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\structs\PThreeDimStructure.cs"> + <Compile Include="World\Structs\PThreeDimStructure.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\structs\StationListenerImpl.cs"> + <Compile Include="World\Structs\StationListenerImpl.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\structs\Structure.cs"> + <Compile Include="World\Structs\Structure.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\structs\VarHeightBuilding.cs"> + <Compile Include="World\Structs\VarHeightBuilding.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\subsidiaries\MarketWindow.cs"> + <Compile Include="World\Subsidiaries\MarketWindow.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="World\subsidiaries\Parameters.cs"> + <Compile Include="World\Subsidiaries\Parameters.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\subsidiaries\SubsidiaryCompany.cs"> + <Compile Include="World\Subsidiaries\SubsidiaryCompany.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\subsidiaries\SubsidiaryEntity.cs"> + <Compile Include="World\Subsidiaries\SubsidiaryEntity.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\subsidiaries\SubsidiaryMarket.cs"> + <Compile Include="World\Subsidiaries\SubsidiaryMarket.cs"> <SubType>Code</SubType> </Compile> - <Compile Include="World\terrain\MountainVoxel.cs"> + <Compile Include="World\Terrain\MountainVoxel.cs"> <SubType>Code</SubType> </Compile> <Compile Include="World\Time.cs"> @@ -859,8 +859,8 @@ <SubType>Code</SubType> </Compile> <Compile Include="World\WorldDefinition.cs" /> - <Content Include="..\plugins\system\plugin.xml"> - <Link>plugin.xml</Link> + <Content Include="..\plugins\system\Plugin.xml"> + <Link>Plugin.xml</Link> </Content> <Content Include="Contributions\readme.txt" /> <Content Include="Res\Arrows.bmp" /> @@ -876,7 +876,7 @@ <Content Include="Res\Toolbar.bmp" /> <Content Include="Res\ugslope.bmp" /> <Content Include="Res\YardChip.bmp" /> - <EmbeddedResource Include="Contributions\others\NewWorldDialog.resx"> + <EmbeddedResource Include="Contributions\Others\NewWorldDialog.resx"> <DependentUpon>NewWorldDialog.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Controllers\AbstractControllerImpl.resx"> @@ -885,58 +885,58 @@ <EmbeddedResource Include="Controllers\AbstractLineController.resx"> <DependentUpon>AbstractLineController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\land\BulldozeController.resx"> + <EmbeddedResource Include="Controllers\Land\BulldozeController.resx"> <DependentUpon>BulldozeController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\land\LandController.resx"> + <EmbeddedResource Include="Controllers\Land\LandController.resx"> <DependentUpon>LandController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\land\LandPropertyController.resx"> + <EmbeddedResource Include="Controllers\Land\LandPropertyController.resx"> <DependentUpon>LandPropertyController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\PlatformController.resx"> + <EmbeddedResource Include="Controllers\Rail\PlatformController.resx"> <DependentUpon>PlatformController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\PlatformPropertyDialog.resx"> + <EmbeddedResource Include="Controllers\Rail\PlatformPropertyDialog.resx"> <DependentUpon>PlatformPropertyDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\RailRoadController.resx"> + <EmbeddedResource Include="Controllers\Rail\RailRoadController.resx"> <DependentUpon>RailRoadController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\SlopeRailRoadController.resx"> + <EmbeddedResource Include="Controllers\Rail\SlopeRailRoadController.resx"> <DependentUpon>SlopeRailRoadController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\StationPassagewayController.resx"> + <EmbeddedResource Include="Controllers\Rail\StationPassagewayController.resx"> <DependentUpon>StationPassagewayController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\StationPropertyDialog.resx"> + <EmbeddedResource Include="Controllers\Rail\StationPropertyDialog.resx"> <DependentUpon>StationPropertyDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\TrainControllerDialog.resx"> + <EmbeddedResource Include="Controllers\Rail\TrainControllerDialog.resx"> <DependentUpon>TrainControllerDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\TrainPlacementController.resx"> + <EmbeddedResource Include="Controllers\Rail\TrainPlacementController.resx"> <DependentUpon>TrainPlacementController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\TrainTrackingWindow.resx"> + <EmbeddedResource Include="Controllers\Rail\TrainTrackingWindow.resx"> <DependentUpon>TrainTrackingWindow.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\rail\TrainTradingDialog.resx"> + <EmbeddedResource Include="Controllers\Rail\TrainTradingDialog.resx"> <DependentUpon>TrainTradingDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\road\RoadController.resx"> + <EmbeddedResource Include="Controllers\Road\RoadController.resx"> <DependentUpon>RoadController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\structs\FixedSizeStructController.resx"> + <EmbeddedResource Include="Controllers\Structs\FixedSizeStructController.resx"> <DependentUpon>FixedSizeStructController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\structs\StructPlacementController.resx"> + <EmbeddedResource Include="Controllers\Structs\StructPlacementController.resx"> <DependentUpon>StructPlacementController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\structs\VarHeightBuildingController.resx"> + <EmbeddedResource Include="Controllers\Structs\VarHeightBuildingController.resx"> <DependentUpon>VarHeightBuildingController.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Controllers\terrain\MountainController.resx"> + <EmbeddedResource Include="Controllers\Terrain\MountainController.resx"> <DependentUpon>MountainController.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Framework\AboutDialog.resx"> @@ -960,7 +960,7 @@ <EmbeddedResource Include="Framework\NewWorldDialog.resx"> <DependentUpon>NewWorldDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Framework\plugin\PluginListDialog.resx"> + <EmbeddedResource Include="Framework\Plugin\PluginListDialog.resx"> <DependentUpon>PluginListDialog.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Framework\Splash.resx"> @@ -987,37 +987,37 @@ <LastGenOutput>Resources.ja-JP.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Include="Res\splash.jpg" /> - <EmbeddedResource Include="Util\command\CommandManager.resx"> + <EmbeddedResource Include="Util\Command\CommandManager.resx"> <DependentUpon>CommandManager.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Views\map\HeightCutWindow.resx"> + <EmbeddedResource Include="Views\Map\HeightCutWindow.resx"> <DependentUpon>HeightCutWindow.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Views\map\MapView.resx"> + <EmbeddedResource Include="Views\Map\MapView.resx"> <DependentUpon>MapView.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Views\map\PreviewForm.resx"> + <EmbeddedResource Include="Views\Map\PreviewForm.resx"> <DependentUpon>PreviewForm.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="World\accounting\AccountSummaryWindow.resx"> + <EmbeddedResource Include="World\Accounting\AccountSummaryWindow.resx"> <DependentUpon>AccountSummaryWindow.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="World\accounting\BalanceSheetForm.resx"> + <EmbeddedResource Include="World\Accounting\BalanceSheetForm.resx"> <DependentUpon>BalanceSheetForm.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="World\accounting\GenreSelectorDialog.resx"> + <EmbeddedResource Include="World\Accounting\GenreSelectorDialog.resx"> <DependentUpon>GenreSelectorDialog.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="World\development\DevelopConfigure.resx"> + <EmbeddedResource Include="World\Development\DevelopConfigure.resx"> <DependentUpon>DevelopConfigure.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="World\development\LandValueInspector.resx"> + <EmbeddedResource Include="World\Development\LandValueInspector.resx"> <DependentUpon>LandValueInspector.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="World\subsidiaries\MarketWindow.resx"> + <EmbeddedResource Include="World\Subsidiaries\MarketWindow.resx"> <DependentUpon>MarketWindow.cs</DependentUpon> </EmbeddedResource> </ItemGroup> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-01 19:29:56
|
Revision: 344 http://freetrain.svn.sourceforge.net/freetrain/?rev=344&view=rev Author: jendave Date: 2008-04-01 12:30:00 -0700 (Tue, 01 Apr 2008) Log Message: ----------- Renamed remotely Added Paths: ----------- branches/FreeTrainSDL/core/Contributions/Train/ Removed Paths: ------------- branches/FreeTrainSDL/core/Contributions/train/ Copied: branches/FreeTrainSDL/core/Contributions/Train (from rev 343, branches/FreeTrainSDL/core/Contributions/train) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-01 19:29:46
|
Revision: 343 http://freetrain.svn.sourceforge.net/freetrain/?rev=343&view=rev Author: jendave Date: 2008-04-01 12:29:48 -0700 (Tue, 01 Apr 2008) Log Message: ----------- Renamed remotely Added Paths: ----------- branches/FreeTrainSDL/core/Contributions/Structs/ Removed Paths: ------------- branches/FreeTrainSDL/core/Contributions/structs/ Copied: branches/FreeTrainSDL/core/Contributions/Structs (from rev 342, branches/FreeTrainSDL/core/Contributions/structs) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-01 19:29:36
|
Revision: 342 http://freetrain.svn.sourceforge.net/freetrain/?rev=342&view=rev Author: jendave Date: 2008-04-01 12:29:35 -0700 (Tue, 01 Apr 2008) Log Message: ----------- Renamed remotely Added Paths: ----------- branches/FreeTrainSDL/core/Contributions/Sound/ Removed Paths: ------------- branches/FreeTrainSDL/core/Contributions/sound/ Copied: branches/FreeTrainSDL/core/Contributions/Sound (from rev 341, branches/FreeTrainSDL/core/Contributions/sound) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-01 19:29:28
|
Revision: 341 http://freetrain.svn.sourceforge.net/freetrain/?rev=341&view=rev Author: jendave Date: 2008-04-01 12:29:25 -0700 (Tue, 01 Apr 2008) Log Message: ----------- Renamed remotely Added Paths: ----------- branches/FreeTrainSDL/core/Contributions/Road/ Removed Paths: ------------- branches/FreeTrainSDL/core/Contributions/road/ Copied: branches/FreeTrainSDL/core/Contributions/Road (from rev 340, branches/FreeTrainSDL/core/Contributions/road) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <je...@us...> - 2008-04-01 19:27:18
|
Revision: 340 http://freetrain.svn.sourceforge.net/freetrain/?rev=340&view=rev Author: jendave Date: 2008-04-01 12:27:09 -0700 (Tue, 01 Apr 2008) Log Message: ----------- Renamed remotely Added Paths: ----------- branches/FreeTrainSDL/core/Contributions/Rail/ Removed Paths: ------------- branches/FreeTrainSDL/core/Contributions/rail/ Copied: branches/FreeTrainSDL/core/Contributions/Rail (from rev 339, branches/FreeTrainSDL/core/Contributions/rail) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |