예제 #1
0
파일: MainForm.cs 프로젝트: a-kr/jsyoda
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            SpriteExtractor.LoadPalette(PaletteFname);

            SpriteExtractor.Yodesk = this.GetReader();
            itemCollection = new ItemCollection(this.GetReader());

            itemsForm = new ItemsForm();
            itemsForm.SetCollection(itemCollection);

            int[] zoneOffsets = File.ReadAllLines(ZoneOffsetsFname).Select(s => int.Parse(s)).ToArray();
            zonesForm = new ZonesForm();
            zonesForm.SetThings(this.GetReader(), zoneOffsets);
        }
예제 #2
0
파일: ItemsForm.cs 프로젝트: a-kr/jsyoda
 public void SetCollection(ItemCollection collection)
 {
     Collection = collection;
     lbItems.Items.Clear();
     lbItems.Items.AddRange(Enumerable.Range(0, collection.Items.Length).Cast<object>().ToArray());
 }