• R/O
  • SSH
  • HTTPS

nlgp1: Commit


Commit MetaInfo

Revision576 (tree)
Time2010-11-13 19:16:44
Authorbiikame

Log Message

ImageIndexを復帰

Change Summary

Incremental Difference

--- trunk/Nlgp1/Nlgp1.StageEditor/Notifies/ChipNotify.cs (revision 575)
+++ trunk/Nlgp1/Nlgp1.StageEditor/Notifies/ChipNotify.cs (revision 576)
@@ -21,6 +21,10 @@
2121 get;
2222 private set;
2323 }
24+ public int ImageIndex {
25+ get;
26+ private set;
27+ }
2428 public string Name {
2529 get;
2630 private set;
@@ -40,6 +44,7 @@
4044
4145 public ChipNotify( int index ) {
4246 this.Index = index;
47+ this.ImageIndex = index;
4348 this.Type = "";
4449 this.Name = index.ToString();
4550 this.FrictionCoefficient = 1;
@@ -48,12 +53,13 @@
4853
4954 public void SetIndex( int index ) {
5055 this.Index = index;
56+ this.ImageIndex = index;
5157
5258 OnPropertyChanged( "SetIndex" );
5359 }
5460
5561 public void SetProperty( ChipProperty chipProperty ) {
56- this.Index = chipProperty.Index;
62+ this.ImageIndex = chipProperty.ImageIndex;
5763 this.Name = chipProperty.Name;
5864 this.Type = chipProperty.Type;
5965 this.FrictionCoefficient = chipProperty.FrictionCoefficient;
@@ -64,7 +70,8 @@
6470
6571 private class NoneChipNotify : ChipNotify {
6672 public NoneChipNotify()
67- : base( ChipsetImage.NoneIndex ) {
73+ : base( NoneIndex ) {
74+ this.ImageIndex = ChipsetImage.NoneIndex;
6875 this.Name = "EMPT";
6976 this.Type = "";
7077 this.FrictionCoefficient = 0;
--- trunk/Nlgp1/Nlgp1.StageEditor/Notifies/ChipProperties/ChipProperty.cs (revision 575)
+++ trunk/Nlgp1/Nlgp1.StageEditor/Notifies/ChipProperties/ChipProperty.cs (revision 576)
@@ -9,6 +9,11 @@
99 public class ChipProperty {
1010 public int Index {
1111 get;
12+ private set;
13+ }
14+ [Browsable( false )]
15+ public int ImageIndex {
16+ get;
1217 set;
1318 }
1419 public string Name {
@@ -31,6 +36,7 @@
3136
3237 public ChipProperty( ChipNotify chip ) {
3338 this.Index = chip.Index;
39+ this.ImageIndex = chip.ImageIndex;
3440 this.Name = chip.Name;
3541 this.Type = chip.Type;
3642 this.FrictionCoefficient = chip.FrictionCoefficient;
--- trunk/Nlgp1/Nlgp1.StageEditor/Notifies/StageNotifyLoader.cs (revision 575)
+++ trunk/Nlgp1/Nlgp1.StageEditor/Notifies/StageNotifyLoader.cs (revision 576)
@@ -51,7 +51,7 @@
5151 commonChipset.ToList().ForEach( commonChip => {
5252 var chipProperty = new ChipProperty();
5353 //chipProperty.ID = commonChip.CellTypeID;
54- chipProperty.Index = commonChip.Index;
54+ chipProperty.ImageIndex = commonChip.Index;
5555 chipProperty.Name = commonChip.Name;
5656 chipProperty.FrictionCoefficient = commonChip.FrictionCoefficient;
5757 chipProperty.Type = ToStringFromChipType( commonChip.Type );
--- trunk/Nlgp1/Nlgp1.StageEditor/Viewers/ChipsetViewer.cs (revision 575)
+++ trunk/Nlgp1/Nlgp1.StageEditor/Viewers/ChipsetViewer.cs (revision 576)
@@ -142,7 +142,7 @@
142142 foreach( var chip in chipset ) {
143143 var x = ( i % column ) * chipSize;
144144 var y = ( i / column ) * chipSize;
145- var imageNumber = chip.Index;
145+ var imageNumber = chip.ImageIndex;
146146 var image = chipsetImage[imageNumber];
147147 if( image != null ) {
148148 e.Graphics.DrawImage( image , x , y );
--- trunk/Nlgp1/Nlgp1.StageEditor/Viewers/MapViewer.cs (revision 575)
+++ trunk/Nlgp1/Nlgp1.StageEditor/Viewers/MapViewer.cs (revision 576)
@@ -413,7 +413,7 @@
413413 var x = (j - hScroll.Value) * chipSize;
414414 var y = (i - vScroll.Value) * chipSize;
415415 var chip = chipTable[chipIndex];
416- var imageIndex = chip.Index;
416+ var imageIndex = chip.ImageIndex;
417417 var image = chipsetImage[imageIndex];
418418 graphics.DrawImage(image, x, y, chipSize, chipSize);
419419 }
--- trunk/Nlgp1/Nlgp1.StageEditor/Viewers/ChipPropertyViewer.cs (revision 575)
+++ trunk/Nlgp1/Nlgp1.StageEditor/Viewers/ChipPropertyViewer.cs (revision 576)
@@ -83,7 +83,7 @@
8383 #endregion
8484
8585 private void UpdateView() {
86- var imageNumber = CurrentChip.Index;
86+ var imageNumber = CurrentChip.ImageIndex;
8787 this.ThumbImage.Image = chipImageSet[imageNumber];
8888
8989 if( CurrentChip == ChipNotify.None ||
@@ -101,7 +101,7 @@
101101 return;
102102
103103 this.chipImageSelectForm.LayerImage = chipImageSet;
104- this.chipImageSelectForm.SelectedNumber = currentChip.Index;
104+ this.chipImageSelectForm.SelectedNumber = currentChip.ImageIndex;
105105
106106 var result = chipImageSelectForm.ShowDialog();
107107 if( result != DialogResult.OK )
@@ -108,7 +108,7 @@
108108 return;
109109
110110 var propertyData = (ChipProperty)PropertyGrid.SelectedObject;
111- propertyData.Index = chipImageSelectForm.SelectedNumber;
111+ propertyData.ImageIndex = chipImageSelectForm.SelectedNumber;
112112 OnChipPropertyChanged( propertyData );
113113 }
114114
--- trunk/Nlgp1/Nlgp1.StageEditor/Controllers/ChipsetViewerController.cs (revision 575)
+++ trunk/Nlgp1/Nlgp1.StageEditor/Controllers/ChipsetViewerController.cs (revision 576)
@@ -9,7 +9,7 @@
99
1010 namespace Nlgp1.StageEditor.Controllers
1111 {
12- public static class ChipsetViewerController
12+ public static class ChipListViewerController
1313 {
1414 public static void Setup(ChipsetViewer chipsetViewer, EditorNotify editor, StageNotify stage)
1515 {
--- trunk/Nlgp1/Nlgp1.StageEditor/Program.cs (revision 575)
+++ trunk/Nlgp1/Nlgp1.StageEditor/Program.cs (revision 576)
@@ -47,7 +47,7 @@
4747 StageEditorFormController.Setup( stageEditor , editor , stage );
4848 MapViewerController.Setup( stageEditor.MapViewer , editor , stage );
4949 ChipPropertyViewerController.Setup( stageEditor.ChipPropertyViewer , editor , stage );
50- ChipsetViewerController.Setup( stageEditor.ChipsetViewer , editor , stage );
50+ ChipListViewerController.Setup( stageEditor.ChipsetViewer , editor , stage );
5151 LayersTabViewerController.Setup( stageEditor.LayersTabViewer , editor , stage );
5252
5353 stageEditor.Show();
Show on old repository browser