//конструктор
 public Model(EnvironmentPreset env, double eng, Vector3D pos)
 {
     data = env;
     energy = eng;
     position = pos;
     rand = new Random();
 }
 public ModellingSession(EnvironmentPreset env, double energy, Vector3D position)
 {
     this.rnd = new Random();
     this.model = new Model(env, energy, position);
     this.neutrons = new List<Result>();
     this.averageL = new List<DataPoint>();
     this.averageR2 = new List<DataPoint>();
     this.averageTau = new List<DataPoint>();
     this.averageTauM = new List<DataPoint>();
 }
        public StartModelWindow()
        {
            InitializeComponent();

            environments = new List<EnvironmentPreset>(); //добавляем параметры для различных сред
            environments.Add(new EnvironmentPreset("H2O", 1, new Element[]{new Element(1, 20.4), new Element(16, 3.76)}, new int[]{2, 1}));
            environments.Add(new EnvironmentPreset("D2O", 1.11f, new Element[] { new Element(2, 3.39), new Element(16, 3.76) }, new int[] {2, 1}));
            environments.Add(new EnvironmentPreset("Be", 1.848f, new Element[]{new Element(9, 6.14)}, new int[]{1}));
            environments.Add(new EnvironmentPreset("BeO", 3.02f, new Element[] { new Element(9, 6.14), new Element(16, 3.76) }, new int[] {1, 1}));
            environments.Add(new EnvironmentPreset("C", 2.25f, new Element[] { new Element(12, 4.75) }, new int[] {1}));

            lstEnvironment.ItemsSource = environments;
            lstEnvironment.SelectedItem = environments.Last();

            this.position = new Vector3D(0, 0, 0); //координаты источника
            this.energy = 3; //начальная энергия (МэВ)
            this.count = 10; //число судеб для рассмотрения

            //по умолчанию среда - углерод
            this.env = ((EnvironmentPreset)lstEnvironment.SelectedItem);

            this.DataContext = this;
        }
 private void lstEnvironment_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     EnvironmentPreset preset = (EnvironmentPreset)e.AddedItems[0];
     env = preset;
 }