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

            a.Date = stupidDateEditor.CurrentDate;
            FireDataChangedEvent();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
        private void artefactsListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Artefact a = artefactsListBox.SelectedItem as Artefact;

            stupidDateEditor.CurrentDate = a.Date;
        }
Ejemplo n.º 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 );
            }
        }