Esempio n. 1
0
 public PlantViewModel(Plant plant, JupiterViewModel JVM)
 {
     jVM        = JVM;
     this.plant = plant;
     Name       = plant.Name;
     ID         = plant.IDNumber;
 }
Esempio n. 2
0
 public PlantViewModel(Plant plant, JupiterViewModel JVM)
 {
   jVM = JVM;
   this.plant = plant;
   Name = plant.Name;
   ID = plant.IDNumber;
 }
    public static void MyClassInitialize(TestContext testContext)
    {
      target = new JupiterViewModel();
      target.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(target_PropertyChanged);
      sw.Start();
      target.ReadJupiter(@"..\..\..\..\JupiterTools\TestData\AlbertslundNytFormat.mdb");

    }
 void WritePermits_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
   JVM = DataContext as JupiterViewModel;
   if (JVM != null)
   {
     Distyear.Text = JVM.SelectionEndTime.Year.ToString();
     StartYear.Text = JVM.SelectionStartTime.Year.ToString();
     EndYear.Text = JVM.SelectionEndTime.Year.ToString();
   }
 }
    public void MoveIntakesToChalkTest()
    {

      JupiterViewModel jvm = new JupiterViewModel();
      jvm.ReadJupiter(@"C:\Users\Jacob\Projekter\MikeSheWrapperForGEUS\MCNordjylland.mdb");
      jvm.LoadMikeSheMethod(@"C:\Users\Jacob\Projekter\MikeSheWrapperForGEUS\novomr6\result\Novomr6_inv10.she");

      MikeSheViewModel target = jvm.Mshe;

      target.Layers.Single(var => var.DfsLayerNumber == 0).IsChalkLayer = true;
    }
Esempio n. 6
0
        private JupiterViewModel jvm; //Necessary to change between well list


        public MikeSheViewModel(Model Mshe, JupiterViewModel JVM)
        {
            jvm                 = JVM;
            mshe                = Mshe;
            Layers              = new ObservableCollection <MikeSheLayerViewModel>();
            ScreensToMove       = new ObservableCollection <MoveToChalkViewModel>();
            ScreensAboveTerrain = new ObservableCollection <MoveToChalkViewModel>();
            ScreensBelowBottom  = new ObservableCollection <MoveToChalkViewModel>();

            for (int i = 0; i < mshe.GridInfo.NumberOfLayers; i++)
            {
                MikeSheLayerViewModel msvm = new MikeSheLayerViewModel(i, mshe.GridInfo.NumberOfLayers);
//        if(mshe.Input.MIKESHE_FLOWMODEL.SaturatedZone.TypeOfVerDiscr==2)
                msvm.DisplayName = mshe.Input.MIKESHE_FLOWMODEL.SaturatedZone.CompLayersSZ.Layer_2s[mshe.GridInfo.NumberOfLayers - 1 - i].Name;
                //      else
                //      msvm.DisplayName = "Computational layer
                Layers.Add(msvm);
            }
            Layers.First().IsChalkLayer = true;

            Chalks = new SortedDictionary <string, string>();
            Clays  = new SortedDictionary <string, string>();
            string dir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            var    doc = XDocument.Load(Path.Combine(dir, "LithologyGroups.xml")).Element("LithologyGroups");

            foreach (var el in doc.Element("Chalks").Elements())
            {
                Chalks.Add(el.Value, "");
            }

            foreach (var el in doc.Element("Clays").Elements())
            {
                Clays.Add(el.Value, "");
            }

            foreach (var msvm in Layers)
            {
                msvm.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(msvm_PropertyChanged);
            }


            RaisePropertyChanged("Layers");

            ShowExtractionWells = true;
        }
    private JupiterViewModel jvm; //Necessary to change between well list


    public MikeSheViewModel(Model Mshe, JupiterViewModel JVM)
    {
      jvm = JVM;
      mshe = Mshe;
      Layers = new ObservableCollection<MikeSheLayerViewModel>();
      ScreensToMove = new ObservableCollection<MoveToChalkViewModel>();
      ScreensAboveTerrain = new ObservableCollection<MoveToChalkViewModel>();
      ScreensBelowBottom = new ObservableCollection<MoveToChalkViewModel>();

      for (int i = 0; i < mshe.GridInfo.NumberOfLayers; i++)
      {
        
        MikeSheLayerViewModel msvm = new MikeSheLayerViewModel(i, mshe.GridInfo.NumberOfLayers);
//        if(mshe.Input.MIKESHE_FLOWMODEL.SaturatedZone.TypeOfVerDiscr==2)
          msvm.DisplayName = mshe.Input.MIKESHE_FLOWMODEL.SaturatedZone.CompLayersSZ.Layer_2s[mshe.GridInfo.NumberOfLayers - 1 - i].Name;
  //      else 
    //      msvm.DisplayName = "Computational layer 
        Layers.Add(msvm);
      }
      Layers.First().IsChalkLayer = true;

      Chalks = new SortedDictionary<string, string>();
      Clays = new SortedDictionary<string, string>();
      string dir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
      var doc = XDocument.Load(Path.Combine(dir,"LithologyGroups.xml")).Element("LithologyGroups");

      foreach (var el in doc.Element("Chalks").Elements())
        Chalks.Add(el.Value, "");

      foreach (var el in doc.Element("Clays").Elements())
        Clays.Add(el.Value, "");
 
      foreach(var msvm in Layers)
        msvm.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(msvm_PropertyChanged);


      RaisePropertyChanged("Layers");

      ShowExtractionWells = true;
    }