Пример #1
0
 private void SelectedBio_Dead(object sender, bool e)
 {
     selectedBio.ChangePointer -= SelectedBio_ChangePointer;
     selectedBio.Dead          -= SelectedBio_Dead;
     selectedBio.IsSelected     = false;
     selectedBio     = null;
     GenomViewModels = null;
 }
Пример #2
0
        public void SetSelectedBio(ViewModelBio viewModelBio)
        {
            selectedBio     = viewModelBio;
            GenomViewModels = new ObservableCollection <GenomViewModel>();

            if (viewModelBio == null)
            {
                return;
            }

            for (int i = 0; i < constants.SizeBrain; i++)
            {
                GenomViewModels.Add(new GenomViewModel(i % 8, i / (constants.SizeBrain / 8), selectedBio.Pointer == i, selectedBio.Brain[i].ToString()));
            }

            selectedBio.Dead          += SelectedBio_Dead;
            selectedBio.ChangePointer += SelectedBio_ChangePointer;
        }