Beispiel #1
0
        private void stupidDateEditor_DateChangedEvent(object sender, EventArgs e)
        {
            Artefact a = artefactsListBox.SelectedItem as Artefact;

            a.Date = stupidDateEditor.CurrentDate;
            FireDataChangedEvent();
        }
Beispiel #2
0
        private void artefactsListBox_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            Artefact a = artefactsListBox.Items[e.Index] as Artefact;

            a.Discovered = (e.NewValue == CheckState.Checked);
            FireDataChangedEvent();
        }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
        private void artefactsListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Artefact a = artefactsListBox.SelectedItem as Artefact;

            stupidDateEditor.CurrentDate = a.Date;
        }
Beispiel #5
0
        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 );
            }
        }