private void stupidDateEditor_DateChangedEvent(object sender, EventArgs e) { Artefact a = artefactsListBox.SelectedItem as Artefact; a.Date = stupidDateEditor.CurrentDate; FireDataChangedEvent(); }
private void artefactsListBox_ItemCheck(object sender, ItemCheckEventArgs e) { Artefact a = artefactsListBox.Items[e.Index] as Artefact; a.Discovered = (e.NewValue == CheckState.Checked); FireDataChangedEvent(); }
public Artefacts(byte[] dates, byte[] states) { allArtefacts = new List <Artefact>(48); for (int i = 0; i < 47; i++) { Artefact w = new Artefact(); w.Date = StupidDate.GetDateFromOffset(i, dates); w.Name = ArtefactList[i]; w.Discovered = (states[(i + 1) / 8] & (0x01 << ((i + 1) % 8))) > 0; allArtefacts.Add(w); } }
private void artefactsListBox_SelectedIndexChanged(object sender, EventArgs e) { Artefact a = artefactsListBox.SelectedItem as Artefact; stupidDateEditor.CurrentDate = a.Date; }
public Artefacts( byte[] dates, byte[] states ) { allArtefacts = new List<Artefact>( 48 ); for( int i = 0; i < 47; i++ ) { Artefact w = new Artefact(); w.Date = StupidDate.GetDateFromOffset( i, dates ); w.Name = ArtefactList[i]; w.Discovered = (states[(i + 1) / 8] & (0x01 << ((i + 1) % 8))) > 0; allArtefacts.Add( w ); } }