Exemple #1
0
        public Feats(byte[] dates, byte[] states)
        {
            allFeats = new List <Feat>(96);

            for (int i = 0; i < 96; i++)
            {
                Feat f = new Feat();
                f.Date = StupidDate.GetDateFromOffset(i, dates);
                switch (i % 2)
                {
                case 1:
                    f.State = (State)((states[i / 2] & 0xF0) >> 4);
                    break;

                case 0:
                    f.State = (State)((states[i / 2] & 0x0F));
                    break;
                }
                f.Name = FeatList[i];

                allFeats.Add(f);
            }
        }
Exemple #2
0
        private void stateComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Feat f = featListBox.SelectedItem as Feat;

            f.State = (State)stateComboBox.SelectedItem;
        }
Exemple #3
0
        public Feats( byte[] dates, byte[] states )
        {
            allFeats = new List<Feat>( 96 );

            for( int i = 0; i < 96; i++ )
            {
                Feat f = new Feat();
                f.Date = StupidDate.GetDateFromOffset( i, dates );
                switch( i % 2 )
                {
                    case 1:
                        f.State = (State)((states[i / 2] & 0xF0) >> 4);
                        break;
                    case 0:
                        f.State = (State)((states[i / 2] & 0x0F));
                        break;
                }
                f.Name = FeatList[i];

                allFeats.Add( f );
            }
        }