/// <summary> /// Will fill the dialog with existing information coming from the database. /// </summary> /// <param name="incomingData">The model in which the existing information is stored.</param> public void AutoFillDialog(FieldNotes incomingData) { //Keep existingDataDetailStructure = incomingData; //Set _structID = existingDataDetailStructure.structure.StructureID; _structName = existingDataDetailStructure.structure.StructureName; _structParentID = existingDataDetailStructure.structure.StructureParentID; _structDetail = existingDataDetailStructure.structure.StructureDetail; _structAzim = existingDataDetailStructure.structure.StructureAzimuth.ToString(); _structDip = existingDataDetailStructure.structure.StructureDipPlunge.ToString(); _structFabric = existingDataDetailStructure.structure.StructureFabric; _structNote = existingDataDetailStructure.structure.StructureNotes; _structSense = existingDataDetailStructure.structure.StructureSense; if (existingDataDetailStructure.structure.StructureType != null) { _structType = existingDataDetailStructure.structure.StructureType.ToString(); } if (existingDataDetailStructure.structure.StructureClass != null) { _structClass = existingDataDetailStructure.structure.StructureClass.ToString(); } _strucclasstypedetail = existingDataDetailStructure.structure.getClassTypeDetail; _selectedStructFlat = existingDataDetailStructure.structure.StructureFlattening; _selectedStructMethod = existingDataDetailStructure.structure.StructureMethod; _selectedStructRel = existingDataDetailStructure.structure.StructureRelated; _selectedStructStrain = existingDataDetailStructure.structure.StructureStrain; //Update UI RaisePropertyChanged("StructID"); RaisePropertyChanged("StructName"); RaisePropertyChanged("StructDetail"); RaisePropertyChanged("StructAzim"); RaisePropertyChanged("StructDip"); RaisePropertyChanged("StructFabric"); RaisePropertyChanged("StructNote"); RaisePropertyChanged("StructSense"); RaisePropertyChanged("StructType"); RaisePropertyChanged("StructParentID"); RaisePropertyChanged("StructClassTypeDetail"); RaisePropertyChanged("SelectedStructFlat"); RaisePropertyChanged("SelectedStructMethod"); RaisePropertyChanged("SelectedStructRelated"); RaisePropertyChanged("SelectedStructStrain"); //Take care of related structure if (true) { } AutoFillDialog2ndRound(incomingData); doStructureUpdate = true; }
/// <summary> /// Will fill the dialog with existing information coming from the database. /// </summary> /// <param name="incomingData">The model in which the existing information is stored.</param> public void AutoFillDialog(FieldNotes incomingData) { //Keep existingDataDetailPflow = incomingData; //Set _pflowID = existingDataDetailPflow.paleoflow.PFlowID; _pflowName = existingDataDetailPflow.paleoflow.PFlowName; _pflowParentID = existingDataDetailPflow.paleoflow.PFlowParentID; _pflowNote = existingDataDetailPflow.paleoflow.PFlowNotes; _pflowDipPlunge = existingDataDetailPflow.paleoflow.PFlowDip.ToString(); _pflowAzim = existingDataDetailPflow.paleoflow.PFlowAzimuth.ToString(); if (existingDataDetailPflow.paleoflow.PFlowMainDir == Dictionaries.DatabaseLiterals.boolYes) { _pflowMainDirection = true; } else { _pflowMainDirection = false; } _selectedPflowClass = existingDataDetailPflow.paleoflow.PFlowClass; _selectedPflowDir = existingDataDetailPflow.paleoflow.PFlowSense; _selectedPflowConfidence = existingDataDetailPflow.paleoflow.PFlowConfidence; _selectedPflowBedSurface = existingDataDetailPflow.paleoflow.PFlowBedsurf; _selectedPflowDefined = existingDataDetailPflow.paleoflow.PFlowDefinition; _selectedPflowNoIndicator = existingDataDetailPflow.paleoflow.PFlowNumIndic; _selectedPflowAge = existingDataDetailPflow.paleoflow.PFlowRelAge; _selectedPflowMethod = existingDataDetailPflow.paleoflow.PFlowMethod; _selectedPflowRelative = existingDataDetailPflow.paleoflow.PFlowRelation; _selectedPflowFeature = existingDataDetailPflow.paleoflow.PFlowFeature; //Update UI RaisePropertyChanged("PflowID"); RaisePropertyChanged("PflowAge"); RaisePropertyChanged("PflowParentID"); RaisePropertyChanged("PflowAzim"); RaisePropertyChanged("PflowNote"); RaisePropertyChanged("PflowDip"); RaisePropertyChanged("PflowName"); RaisePropertyChanged("PflowMainDirection"); //TODO Main direction parsing RaisePropertyChanged("SelectedPflowClass"); RaisePropertyChanged("SelectedPflowDir"); RaisePropertyChanged("SelectedPflowFeature"); RaisePropertyChanged("SelectedPflowConfidence"); RaisePropertyChanged("SelectedPflowBedSurface"); RaisePropertyChanged("SelectedPflowDefined"); RaisePropertyChanged("SelectedPflowNoIndicator"); RaisePropertyChanged("SelectedPflowage"); RaisePropertyChanged("SelectedPflowMethod"); RaisePropertyChanged("SelectedPflowRelative"); doPflowUpdate = true; }
/// <summary> /// Will make a quick station record in station table, from a given xy position. /// XY will be used to create a quick location first /// </summary> /// <param name="inPosition"></param> /// <returns>A detail report class</returns> public FieldNotes QuickStation(FieldLocation inPosition) { //Create a quick location first string quickLocID = QuickLocation(inPosition); //Calculate air and traverse # FillAirPhotoNo_TraverseNo(); //Save the new station StationModel.StationID = _stationid; //Prime key StationModel.LocationID = quickLocID; //Foreign key StationModel.StationAlias = _alias; StationModel.StationVisitDate = _dateDate = CalculateStationDate(); //Calculate new value StationModel.StationVisitTime = _dateTime = CalculateStationTime(); //Calculate new value StationModel.StationAirNo = _airno; if (_stationTravNo != string.Empty) { StationModel.StationTravNo = Convert.ToInt32(_stationTravNo); } accessData.SaveFromSQLTableObject(StationModel, false); FieldNotes outputStationReport = new FieldNotes(); outputStationReport.ParentID = quickLocID; outputStationReport.GenericID = _stationid; outputStationReport.GenericAliasName = _alias; outputStationReport.GenericTableName = Dictionaries.DatabaseLiterals.TableStation; outputStationReport.station = StationModel; return(outputStationReport); }
/// <summary> /// Will fill the dialog with existing information coming from the database. /// </summary> /// <param name="incomingData">The model in which the existing information is stored.</param> public void AutoFillDialog(FieldNotes incomingData) { //Keep existingDataDetailSample = incomingData; //Set _sampleID = existingDataDetailSample.sample.SampleID; _sampleNote = existingDataDetailSample.sample.SampleNotes; _sampleEartmatID = existingDataDetailSample.ParentID; _sampleAlias = existingDataDetailSample.sample.SampleName; _selectedSampleType = existingDataDetailSample.sample.SampleType; _selectedSampleSurface = existingDataDetailSample.sample.SampleSurface; _selectedSampleQuality = existingDataDetailSample.sample.SampleQuality; _selectedSampleFormat = existingDataDetailSample.sample.SampleFormat; _sampleAzim = existingDataDetailSample.sample.SampleAzim; _sampleDip = existingDataDetailSample.sample.SampleDiplunge; //Update UI RaisePropertyChanged("SampleID"); RaisePropertyChanged("SampleAlias"); RaisePropertyChanged("SelectedSampleType"); RaisePropertyChanged("SampleNote"); RaisePropertyChanged("SampleDip"); RaisePropertyChanged("SampleAzim"); RaisePropertyChanged("SelectedSampleFormat"); RaisePropertyChanged("SelectedSampleQuality"); RaisePropertyChanged("SelectedSampleSurface"); //Update list view UnPipePurposes(existingDataDetailSample.sample.SamplePurpose); doSampleUpdate = true; }
/// <summary> /// Will fill the dialog with existing information coming from the database. /// </summary> /// <param name="incomingData">The model in which the existing information is stored.</param> public void AutoFillDialog(FieldNotes incomingData) { //Keep existingDataDetailFossil = incomingData; //Set _fossilID = existingDataDetailFossil.fossil.FossilID; _fossilName = existingDataDetailFossil.fossil.FossilIDName; _fossilParentID = existingDataDetailFossil.fossil.FossilParentID; _fossilNote = existingDataDetailFossil.fossil.FossilNote; _selectedFossilType = existingDataDetailFossil.fossil.FossilType; //Update UI RaisePropertyChanged("FossilID"); RaisePropertyChanged("FossilParentID"); RaisePropertyChanged("FossilNote"); RaisePropertyChanged("FossilName"); //TODO Main direction parsing RaisePropertyChanged("SelectedFossilType"); doFossilUpdate = true; }
/// <summary> /// Will fill the dialog with existing information coming from the database, based user selected mineralization / alteration. This /// round of filling is dependant on a value. /// </summary> /// <param name="incomingData">The model in which the existing information is stored.</param> public void AutoFillDialog2ndRound(FieldNotes incomingData) { //Refill some comboboxes FillDistribution(); FillMinerals(); //Keep existingDataDetailMineralAlt = incomingData; //Set _selectedMineralAltMineral = existingDataDetailMineralAlt.mineralAlteration.MAMineral; //Clean _mineralAltDistValues.Clear(); //Update list view ConcatenatedCombobox ccBox = new ConcatenatedCombobox(); foreach (string d in ccBox.UnpipeString(existingDataDetailMineralAlt.mineralAlteration.MADistribute)) { AddADistribution(d); } RaisePropertyChanged("SelectedMineralAltDist"); RaisePropertyChanged("SelectedMineralAltMineral"); RaisePropertyChanged("MineralAltDistValues"); }
public void AutoFillDialog(FieldNotes incomingData, bool isWaypoint) { existingDataDetail = incomingData; if (isWaypoint) { _enability = false; RaisePropertyChanged("Enability"); } _latitude = Convert.ToDouble(existingDataDetail.location.LocationLat); _longitude = Convert.ToDouble(existingDataDetail.location.LocationLong); _elevation = Convert.ToDouble(existingDataDetail.location.LocationElev); _alias = existingDataDetail.station.StationAlias; _notes = existingDataDetail.station.StationNote; _airno = existingDataDetail.station.StationAirNo; _slsnotes = existingDataDetail.station.StationSLSNotes; _stationOCSize = existingDataDetail.station.StationOCSize; _stationTravNo = existingDataDetail.station.StationTravNo.ToString(); _selectedStationTypes = existingDataDetail.station.StationObsType; _selectedStationQuality = existingDataDetail.station.StationOCQuality; _selectedStationPhysEnv = existingDataDetail.station.StationPhysEnv; RaisePropertyChanged("Notes"); RaisePropertyChanged("Alias"); RaisePropertyChanged("AirPhoto"); RaisePropertyChanged("SlSNotes"); RaisePropertyChanged("StationOCSize"); RaisePropertyChanged("SelectedStationTypes"); RaisePropertyChanged("SelectedStationQuality"); RaisePropertyChanged("SelectedStationPhysEnv"); RaisePropertyChanged("TraverseNo"); }
public MineralViewModel(FieldNotes inReportModel) { //On init for new samples calculates values for default UI form if (inReportModel.GenericTableName == Dictionaries.DatabaseLiterals.TableEarthMat) { _mineralEarthmatID = inReportModel.GenericID; } else if (inReportModel.earthmat.EarthMatID != null) //Case mineral is created from earthmat dialog { _mineralEarthmatID = inReportModel.earthmat.EarthMatID; } _mineralID = mineralIDCalculator.CalculateMineralID(); _mineralAlias = mineralIDCalculator.CalculateMineralAlias(_mineralEarthmatID, inReportModel.earthmat.EarthMatName); existingDataDetailMineral = inReportModel; if (existingDataDetailMineral.GenericID != null) { CalculateResidual(); } FillMineral(); FillColour(); FillForm(); FillHabit(); FillOccur(); FillMode(); }
/// <summary> /// Will fill the dialog with existing information coming from the database. /// </summary> /// <param name="incomingData">The model in which the existing information is stored.</param> public void AutoFillDialog(FieldNotes incomingData) { //Keep existingDataDetailLocation = incomingData; //Set _locationID = existingDataDetailLocation.location.LocationID; _locationAlias = existingDataDetailLocation.location.LocationAlias; _locationLatitude = existingDataDetailLocation.location.LocationLat.ToString(); _locationLongitude = existingDataDetailLocation.location.LocationLong.ToString(); _locationElevation = existingDataDetailLocation.location.LocationElev.ToString(); _locationNotes = existingDataDetailLocation.location.LocationNotes; _locationEasting = existingDataDetailLocation.location.LocationEasting.ToString(); _locationNorthing = existingDataDetailLocation.location.LocationNorthing.ToString(); _selectedLocationDatums = existingDataDetailLocation.location.LocationDatum; //Update UI RaisePropertyChanged("LocationID"); RaisePropertyChanged("LocationAlias"); RaisePropertyChanged("LocationLongitude"); RaisePropertyChanged("LocationLatitude"); RaisePropertyChanged("LocationElevation"); RaisePropertyChanged("LocationNotes"); RaisePropertyChanged("LocationEasting"); RaisePropertyChanged("LocationNorthing"); RaisePropertyChanged("SelectedLocationDatums"); doLocationUpdate = true; }
private void LocationDialog_Unloaded(object sender, RoutedEventArgs e) { //Detect manual entry, if it's the case pop station dialog if (locationVM.entryType == Dictionaries.DatabaseLiterals.locationEntryTypeManual && locationVM.doLocationUpdate == false && !isBackButtonPressed) { //Create a field note report to act like a parent FieldNotes stationParent = new FieldNotes(); stationParent.location = locationVM.locationModel; stationParent.GenericAliasName = locationVM.LocationAlias; stationParent.GenericID = locationVM.LocationID; stationParent.GenericID = Dictionaries.DatabaseLiterals.TableLocation; //Create a map point var modal = Window.Current.Content as ModalDialog; var view = modal.ModalContent as Views.StationDataPart; modal.ModalContent = view = new Views.StationDataPart(stationParent, false); view.mapPosition = locationVM.locationModel; view.ViewModel.newStationEdit += locationVM.NavigateToReportAsync; //Detect when the add/edit request has finished. modal.IsModal = true; DataLocalSettings dLocalSettings = new DataLocalSettings(); dLocalSettings.SetSettingValue("forceNoteRefresh", true); } else { locationVM.newLocationEdit += locationVM.NavigateToReportAsync; } }
public LocationViewModel(FieldNotes inReport) { //On init for new stations calculate values so UI shows stuff. _locationID = idCalculator.CalculateLocationID(); _locationAlias = idCalculator.CalculateLocationAlias(); FillDatum(); }
public EarthmatDialog(FieldNotes inDetailViewModel) { parentViewMode = inDetailViewModel; this.InitializeComponent(); ViewModel = new EarthmatViewModel(inDetailViewModel); this.Loading += EarthmatDialog_Loading; this.earthmatSaveButton.GotFocus += EarthmatSaveButton_GotFocus; }
public FossilViewModel(FieldNotes inReportDetail) { //On init for new samples calculates values for default UI form _fossilParentID = inReportDetail.GenericID; _fossilID = fossilCalculator.CalculateFossilID(); _fossilName = fossilCalculator.CalculateFossilAlias(_fossilParentID, inReportDetail.earthmat.EarthMatName); FillFossilType(); }
public PaleoflowDialog(FieldNotes inDetailViewModel) { pflowParentViewModel = inDetailViewModel; pflowModel = new PaleoflowViewModel(inDetailViewModel); this.InitializeComponent(); this.Loading += Paleoflow_Loading; this.pflowSaveButton.GotFocus += PflowSaveButton_GotFocus; }
public FossilDialog(FieldNotes inDetailViewModel) { fossilParentViewModel = inDetailViewModel; fossilModel = new FossilViewModel(fossilParentViewModel); this.InitializeComponent(); this.Loading += FossilDialog_Loading; this.fossilSaveButton.GotFocus += FossilSaveButton_GotFocus; }
public MineralizationAlterationDialog(FieldNotes inDetailVM) { parentViewModel = inDetailVM; this.InitializeComponent(); MAViewModel = new MineralizationAlterationViewModel(inDetailVM); this.Loading += MineralAlterationDialog_Loading; this.mineralAltSaveButton.GotFocus += MineralAltSaveButton_GotFocus; }
public MineralDialog(FieldNotes inDetailViewModel) { parentViewModel = inDetailViewModel; this.InitializeComponent(); MineralVM = new MineralViewModel(inDetailViewModel); this.Loading += MineralDialog_Loading; this.mineralSaveButton.GotFocus += MineralSaveButton_GotFocus; }
public SampleDialog(FieldNotes inDetailViewModel, bool isQuickSample) { parentViewModel = inDetailViewModel; isAQuickSample = isQuickSample; this.InitializeComponent(); ViewModel = new SampleViewModel(inDetailViewModel); this.Loading += SampleDialog_Loading; this.sampleSaveButton.GotFocus += SampleSaveButton_GotFocus; }
/// <summary> /// Will fill the dialog with existing information coming from the database. /// </summary> /// <param name="incomingData">The model in which the existing information is stored.</param> public void AutoFillDialog(FieldNotes incomingData) { //Keep existingDataDetailMineral = incomingData; //Set _mineralID = existingDataDetailMineral.mineral.MineralID; _mineralNote = existingDataDetailMineral.mineral.MineralNote; _mineralEarthmatID = existingDataDetailMineral.ParentID; _mineralAlias = existingDataDetailMineral.mineral.MineralIDName; if (existingDataDetailMineral.mineral.MineralSizeMax != null) { _mineralSizeMax = existingDataDetailMineral.mineral.MineralSizeMax.ToString(); } else { _mineralSizeMax = 0.ToString(); } if (existingDataDetailMineral.mineral.MineralSizeMin != null) { _mineralSizeMin = existingDataDetailMineral.mineral.MineralSizeMin.ToString(); } else { _mineralSizeMin = 0.ToString(); } _selectedMineralModeText = existingDataDetailMineral.mineral.MineralMode; _selectedMineralColor = existingDataDetailMineral.mineral.MineralColour; _selectedMineralForm = existingDataDetailMineral.mineral.MineralForm; _selectedMineralHabit = existingDataDetailMineral.mineral.MineralHabit; _selectedMineralNames = existingDataDetailMineral.mineral.MineralName; _selectedMineralOccur = existingDataDetailMineral.mineral.MineralOccur; //Update UI RaisePropertyChanged("MineralID"); RaisePropertyChanged("MineralAlias"); RaisePropertyChanged("MineralNote"); RaisePropertyChanged("MineralEarthmatID"); RaisePropertyChanged("MineralMode"); RaisePropertyChanged("MineralSizeMin"); RaisePropertyChanged("MineralSizeMax"); RaisePropertyChanged("SelectedMineralColor"); RaisePropertyChanged("SelectedMineralForm"); RaisePropertyChanged("SelectedMineralHabit"); RaisePropertyChanged("SelectedMineralOccur"); RaisePropertyChanged("SelectedMineralName"); RaisePropertyChanged("SelectedMineralModeText"); doMineralUpdate = true; }
/// <summary> /// Force a cascade delete if user get's out of sample dialog while in quick sample mode. /// </summary> /// <param name="inParentModel"></param> public void DeleteCascadeOnQuickSample(FieldNotes inParentModel) { //Get the location id Station stationModel = new Station(); List <object> stationTableLRaw = accessData.ReadTable(stationModel.GetType(), null); IEnumerable <Station> stationTable = stationTableLRaw.Cast <Station>(); //Cast to proper list type IEnumerable <string> stats = from s in stationTable where s.StationID == inParentModel.ParentID select s.LocationID; List <string> locationFromStat = stats.ToList(); //Delete location accessData.DeleteRecord(Dictionaries.DatabaseLiterals.TableLocation, Dictionaries.DatabaseLiterals.FieldLocationID, locationFromStat[0]); }
public DocumentDialog(FieldNotes inDetailViewModel, FieldNotes stationSummaryID, bool quickPhoto) { parentViewModel = inDetailViewModel; isQuickPhoto = quickPhoto; this.InitializeComponent(); DocViewModel = new DocumentViewModel(parentViewModel, stationSummaryID); this.Loading += DocumentDialog_Loading; this.Loaded += DocumentDialog_Loaded; this.documentSaveButton.GotFocus += DocumentSaveButton_GotFocus; }
//Main public SampleViewModel(FieldNotes inDetailModel) { //On init for new samples calculates values for default UI form _sampleEartmatID = inDetailModel.GenericID; _sampleID = sampleIDCalculator.CalculateSampleID(); _sampleAlias = sampleIDCalculator.CalculateSampleAlias(_sampleEartmatID, inDetailModel.earthmat.EarthMatName); FillSamplePurpose(); FillSampleType(); FillSurface(); FillFormat(); FillQuality(); }
public StructureViewModel(FieldNotes inReport) { //On init for new samples calculates values for default UI form _structParentID = inReport.GenericID; _structID = structureCalculator.CalculateStructureID(); _structName = structureCalculator.CalculateStructureAlias(_structParentID, inReport.earthmat.EarthMatName); existingDataDetailStructure = inReport; // First order vocabs //FillStructureFormat(); FillStructureMethod(); FillStructureStrain(); FillStructureFlattening(); FillStructureRelated(); }
/// <summary> /// Will create a quick mineral record inside mineral table, from a given parent report model and mineral name, no eartmat will be created in the process /// </summary> /// <param name="parentModel">Earhtmat parent model</param> /// <param name="inMineralName">The new mineral name to add inside table</param> /// <returns>A detail report class</returns> public void QuickMineralRecordOnly(FieldNotes parentModel, string inMineralName) { if (!_minerals.Contains(inMineralName)) { //Get current class information and add to model mineralModel.MineralParentID = _mineralEarthmatID; //Foreigh key mineralModel.MineralIDName = _mineralAlias; mineralModel.MineralID = _mineralID; //Prime key mineralModel.MineralName = inMineralName; mineralModel.MineralSizeMax = 0.ToString(); mineralModel.MineralSizeMin = 0.ToString(); //Save model class accessData.SaveFromSQLTableObject(mineralModel, false); } }
public StructureDialog(FieldNotes inDetailViewModel, bool isQuickStructure) { parentViewModel = inDetailViewModel; isAQuickStructure = isQuickStructure; this.InitializeComponent(); strucViewModel = new StructureViewModel(inDetailViewModel); this.Loading += StructureDialog_Loading; this.structSaveButton.GotFocus += StructSaveButton_GotFocus; SolidColorBrush defaultBorderBrush = this.strucType.BorderBrush as SolidColorBrush; defaultBorderColor = defaultBorderBrush.Color; //testing = 75; }
public LocationDialog(FieldNotes inDetailViewModel) { parentViewModel = inDetailViewModel; this.InitializeComponent(); locationVM = new LocationViewModel(inDetailViewModel); locationVM.LocationAlias = parentViewModel.location.LocationAlias; locationVM.LocationID = parentViewModel.location.LocationID; //Keep in memory that this is a manual entry. locationVM.entryType = parentViewModel.location.LocationEntryType; this.LocationSaveButton.GotFocus += LocationSaveButton_GotFocusAsync; this.Loading += LocationDialog_Loading; this.Unloaded += LocationDialog_Unloaded; }
/// <summary> /// Will fill the dialog with existing information coming from the database. /// </summary> /// <param name="incomingData">The model in which the existing information is stored.</param> public void AutoFillDialog2ndRound(FieldNotes incomingData) { // Refille second order vocab FillStructureAttitude(); FillStructureYounging(); FillStructureGeneration(); FillStructureFormat(); //Set _selectedStructFormat = existingDataDetailStructure.structure.StructureFormat; _selectedStructAttitude = incomingData.structure.StructureAttitude; _selectedStructGen = incomingData.structure.StructureGeneration; _selectedStructYoung = incomingData.structure.StructureYounging; RaisePropertyChanged("SelectedStructFormat"); RaisePropertyChanged("SelectedStructAttitude"); RaisePropertyChanged("SelectedStructGen"); RaisePropertyChanged("SelectedStructYoung"); }
public PaleoflowViewModel(FieldNotes inReportDetail) { //On init for new samples calculates values for default UI form _pflowParentID = inReportDetail.GenericID; _pflowID = pflowCalculator.CalculatePFlowID(); _pflowName = pflowCalculator.CalculatePflowAlias(_pflowParentID, inReportDetail.earthmat.EarthMatName); FillPflowClass(); FillPflowDirection(); FillPflowConfidence(); FillPflowBedrockSurface(); FillPflowDefition(); FillPflowIndicatorNumber(); FillPflowRelAge(); FillPflowRelation(); FillPflowMethod(); FillPflowFeature(); }
public StationDataPart(FieldNotes inParentReport, bool isWaypoint) { if (inParentReport != null) { parentStationReport = inParentReport; } _isWaypoint = isWaypoint; this.InitializeComponent(); this.ViewModel = new StationViewModel(isWaypoint); if (mapPosition != null) { this.ViewModel.Location = mapPosition; } this.Loading += StationDataPart_Loading; this.Loaded += StationDataPart_Loaded; this.stationSaveButton.GotFocus += StationSaveButton_GotFocus; //bug 306 }
public MineralizationAlterationViewModel(FieldNotes inReportModel) { _mineralAltID = mineralAltIDCalculator.CalculateMineralAlterationID(); _mineralAltParentID = inReportModel.GenericID; _mineralAltAlias = mineralAltIDCalculator.CalculateMineralAlterationAlias(_mineralAltParentID, inReportModel.station.StationAlias); existingDataDetailMineralAlt = inReportModel; if (existingDataDetailMineralAlt.GenericID != null) { CalculateResidual(); } //First order lists FillMineralAlterations(); FillUnit(); //Fill second order comboboxes (dependant on selected litho type) //NOTE: needs at least to be initialized and filled at init, else re-selecting an item after init doesn't seem to work. FillDistribution(); FillMinerals(); }