public PlotDetailsViewModel(INavigation navigation, string selectedPlotID) { _navigation = navigation; _plot = new PLOT(); _plot.PLOTID = selectedPlotID; _plotRepository = new PlotRepository(); UpdatePlotCommand = new Command(async() => await UpdatePlot()); DeletePlotCommand = new Command(async() => await DeletePlot()); ListFMU = PickerService.ForestItems().OrderBy(c => c.NAME).ToList(); CommentsCommand = new Command(async() => await ShowComments()); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList(); ListCanopyOrigin = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList(); ListCanopyStructure = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList(); ListMaturityClass = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList(); ListMeasurementType = PickerService.MeasurementTypeItems().OrderBy(c => c.NAME).ToList(); ListNonStandardType = PickerService.NonStandardTypeItems().OrderBy(c => c.NAME).ToList(); ListAccessCondition = PickerService.AccessConditionItems().OrderBy(c => c.NAME).ToList(); StandInfoCommand = new Command(async() => await ShowStandInfo()); ForestHealthCommand = new Command(async() => await ShowForestHealth()); PlotCrewCommand = new Command(async() => await ShowPlotCrew()); PhotoCommand = new Command(async() => await ShowPhoto()); LocationCommand = new Command(async() => await DoLocation()); ValidateCommand = new Command(async() => await DoValidate()); ListGrowthPlot = PickerService.GrowthPlotItems().OrderBy(c => c.NAME).ToList(); ListGrowthPlotType = PickerService.GrowthPlotTypeItems().OrderBy(c => c.NAME).ToList(); FetchPlotDetails(); IsChanged = false; OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); // ListPerson = FillPersonPicker().OrderBy(c => c.NAME).ToList(); ListPerson = PickerService.FillPersonPicker(_plotRepository.GetPersonList(_plot.PROJECTID)).OrderBy(c => c.NAME).ToList(); }
public AddSoilViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _soil = new SOIL(); _soil.SOILID = selectedID; _soilRepository = new SoilRepository(); _fk = selectedID; _soil.DEPTHFROM = 0; _soil.DEPTHTO = 0; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListPorePattern = PickerService.PorePatternItems().ToList(); SoilHorizonCommand = new Command(async() => await ShowSoilHorizon()); SoilStructureCommand = new Command(async() => await ShowSoilStructure()); ColourCommand = new Command(async() => await ShowColour()); MottleColourCommand = new Command(async() => await ShowMottleColour()); GleyColourCommand = new Command(async() => await ShowGleyColour()); TextureCommand = new Command(async() => await ShowTexture()); IsChanged = false; OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); if (util.AllowAutoNumber) { _soil.HORIZONNUMBER = _soilRepository.GetNextNumber(_fk); } }
public TreeDetailsViewModel(INavigation navigation, string selectedTreeID) { _navigation = navigation; _tree = new TREE(); _tree.TREEID = selectedTreeID; _treeRepository = new TreeRepository(); UpdateTreeCommand = new Command(async() => await UpdateTree()); DeleteTreeCommand = new Command(async() => await DeleteTree()); CommentsCommand = new Command(async() => await ShowComments()); ResetCommand = new Command(async() => await ResetValues()); StemMapCommand = new Command(async() => await ShowStemMap()); DeformityCommand = new Command(async() => await ShowDeformity()); AgeCommand = new Command(async() => await ShowAge()); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.ID).ToList(); ListVigour = PickerService.VigourItems().OrderBy(c => c.NAME).ToList(); ListCrownDamage = PickerService.CrownDamageItems().OrderBy(c => c.NAME).ToList(); ListDefoliatingInsect = PickerService.DefoliatingInsectItems().OrderBy(c => c.NAME).ToList(); ListFoliarDisease = PickerService.FoliarDiseaseItems().OrderBy(c => c.NAME).ToList(); ListBarkRetention = PickerService.BarkRetentionItems().OrderBy(c => c.NAME).ToList(); ListWoodCondition = PickerService.WoodConditionItems().OrderBy(c => c.NAME).ToList(); ListMortalityCause = PickerService.MortalityCauseItems().OrderBy(c => c.NAME).ToList(); ListDecayClass = PickerService.DecayClassItems().OrderBy(c => c.NAME).ToList(); ListCrownPosition = PickerService.CrownPositionItems().OrderBy(c => c.NAME).ToList(); ListCrownClass = PickerService.CrownClassItems().OrderBy(c => c.NAME).ToList(); ListStemQuality = PickerService.StemQualityItems().OrderBy(c => c.NAME).ToList(); FetchTreeDetails(); IsChanged = false; OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); }
public EcositeDetailsViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _ecosite = new ECOSITE(); _ecosite.PLOTID = selectedID; _ecositeRepository = new EcositeRepository(); _fk = selectedID; UpdateCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); CommentsCommand = new Command(async() => await ShowComments()); EcositeCommand = new Command(async() => await ShowEcosite()); PhotoCommand = new Command(async() => await ShowPhoto()); ListDrainage = PickerService.DrainageItems().ToList(); ListPorePattern = PickerService.PorePatternItems().ToList(); ListMoistureRegime = PickerService.MoistureRegimeItems().ToList(); ListHumusForm = PickerService.HumusFormItems().ToList(); ListDepthClass = PickerService.DepthClassItems().ToList(); ListDeposition = PickerService.DepositionItems().ToList(); // Get the ecosite if it exists if (_ecositeRepository.IsEcositeExists(_fk)) { FetchDetails(_fk); } }
public SoilHorizonViewModel(INavigation navigation, SOIL _soil) { _navigation = navigation; _thissoil = _soil; ListHorizon = PickerService.HorizonItems().ToList(); ListHorizonSuffix = PickerService.HorizonSuffixItems().ToList(); ClearCommand = new Command(() => ClearItems()); SetCalc(); }
public AddPlotViewModel(INavigation navigation) { _navigation = navigation; _plotValidator = new PlotValidator(); _plot = new PLOT(); _plotRepository = new PlotRepository(); AddCommand = new Command(async() => await AddPlot("")); ViewAllCommand = new Command(async() => await ShowList()); ListFMU = PickerService.ForestItems().OrderBy(c => c.NAME).ToList(); }
public DefaultViewModel(INavigation navigation) { _navigation = navigation; util = new Utils(); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.ID).ToList(); ListPerson = PickerService.FillPersonPicker(_plotRepository.GetPersonList()).OrderBy(c => c.NAME).ToList(); // databasehelper = new DatabaseHelper(); // FetchSettings(); }
public string getSppComp(List <TREE> list) // for calculating a species string for a set of trees { List <SpeciesList> _spplist = new List <SpeciesList>(); bool added = false; double batot = 0; foreach (var tree in list) { if (tree.TREESTATUSCODE == "L" || tree.TREESTATUSCODE == "V") { var ba = Math.Pow(tree.DBH, 2) * Math.PI; foreach (var itm in _spplist) { if (itm.spp == tree.SPECIESCODE) { itm.BA = itm.BA + ba; batot = batot + ba; added = true; } } if (!added) { _spplist.Add(new SpeciesList() { spp = tree.SPECIESCODE, BA = ba }); batot = batot + ba; added = false; } added = false; } } // now that list of species is made, sort it, and build a species string string sppcomp = ""; List <SpeciesList> _spplistsort = _spplist.OrderByDescending(x => x.BA).ToList(); List <PickerItems> _masterlist = PickerService.SpeciesMaster().ToList(); if (batot > 0) { foreach (var itm in _spplistsort) { if (!UseAlphaSpecies) { sppcomp = sppcomp + itm.spp.ToString() + " " + (Math.Round((itm.BA / batot) * 100)).ToString() + "% "; } else { sppcomp = sppcomp + PickerService.GetValue(_masterlist, itm.spp) + " " + (Math.Round((itm.BA / batot) * 100)).ToString() + "% "; } } } return(sppcomp); }
// public string GetScientific { get; set; } public AddVegetationViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _vegetation = new VEGETATION(); _vegetation.VEGETATIONID = selectedID; _vegetationRepository = new VegetationRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListVeg = PickerService.VegItems().ToList(); }
public AddSmallTreeViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _smallTree = new SMALLTREE(); _smallTree.SMALLTREEID = selectedID; _smallTreeRepository = new SmallTreeRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListSpecies = PickerService.SpeciesItems().ToList().OrderBy(c => c.NAME).ToList(); }
void SetEcositeCode(int ecocode) { if (ecocode == 1) { GetEcosite1 = PickerService.GetItem(ListEcosite, PRI_ECO).NAME; } else { GetEcosite2 = PickerService.GetItem(ListEcosite, SEC_ECO).NAME; } }
public SoilStructureViewModel(INavigation navigation, SOIL _soil) { _navigation = navigation; _thissoil = _soil; ListGrade = PickerService.GradeItems().ToList(); ListKind = PickerService.KindItems().ToList(); ListClass = PickerService.ClassItems().ToList(); ClearCommand = new Command(() => ClearItems()); SetCalc(); }
public AddDeformityViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _deformity = new DEFORMITY(); _deformity.TREEID = selectedID; _deformityRepository = new DeformityRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListCause = PickerService.CauseItems().ToList(); ListType = PickerService.TypeItems().ToList(); }
public DeformityDetailsViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _deformity = new DEFORMITY(); //_vegetation.VEGETATIONID = selectedID; _deformityRepository = new DeformityRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListCause = PickerService.CauseItems().ToList(); ListType = PickerService.TypeItems().ToList(); FetchDetails(selectedID); }
public ForestHealthViewModel(INavigation navigation, PLOT _thisplot) { _navigation = navigation; _plot = new PLOT(); _plot = _thisplot; _plotRepository = new PlotRepository(); if (_plot.FORESTHEALTHDATE == System.DateTime.MinValue) { _plot.FORESTHEALTHDATE = System.DateTime.Now; } // ListPerson = FillPersonPicker().OrderBy(c => c.NAME).ToList(); ListPerson = PickerService.FillPersonPicker(_plotRepository.GetPersonList(_plot.PROJECTID)).OrderBy(c => c.NAME).ToList(); }
public AddSmallTreeViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _smallTree = new SMALLTREE(); _smallTree.PLOTID = selectedID; _smallTreeRepository = new SmallTreeRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListSpecies = PickerService.SmallTreeSpeciesItems().ToList().OrderBy(c => c.ID).ToList(); IsChanged = false; OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); }
public VegetationCensusDetailsViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _vegetation = new VEGETATIONCENSUS(); //_vegetation.VEGETATIONID = selectedID; _vegetationCensusRepository = new VegetationCensusRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListVeg = PickerService.VegItems().ToList(); OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); FetchDetails(selectedID); }
public AddPlotViewModel(INavigation navigation, string fk) { _navigation = navigation; _plotValidator = new PlotValidator(); _plot = new PLOT(); _plotRepository = new PlotRepository(); _selectedprojectid = fk; Utils util = new Utils(); //Do defaults _plot.VSNPLOTNAME = "VSN"; _plot.IsDeleted = "N"; _plot.DATUM = "NAD83"; _plot.PROJECTID = fk; _plot.ACCESSCONDITIONCODE = 1; _plot.PLOTOVERVIEWDATE = System.DateTime.Now; _plot.MEASUREYEAR = _plot.PLOTOVERVIEWDATE.Year; _plot.CANOPYSTRUCTURECODE1 = "S"; _plot.MATURITYCLASSCODE1 = "S"; _plot.MATURITYCLASSRATIONALE1 = "Dominant cohort has achieved crown closure"; _plot.FOLLOWUPREQUIRED = "N"; if (util.UseDefaultDeclination) { _plot.DECLINATION = util.DefaultDeclination; } AddCommand = new Command(async() => await AddPlot(_selectedprojectid)); ViewAllCommand = new Command(async() => await ShowList()); ListFMU = PickerService.ForestItems().OrderBy(c => c.NAME).ToList(); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList(); ListMeasurementType = PickerService.MeasurementTypeItems().OrderBy(c => c.NAME).ToList(); ListNonStandardType = PickerService.NonStandardTypeItems().OrderBy(c => c.NAME).ToList(); // ListPerson = FillPersonPicker().OrderBy(c => c.NAME).ToList(); ListPerson = PickerService.FillPersonPicker(_plotRepository.GetPersonList(_selectedprojectid)).OrderBy(c => c.NAME).ToList(); ListGrowthPlot = PickerService.GrowthPlotItems().OrderBy(c => c.NAME).ToList(); ListGrowthPlotType = PickerService.GrowthPlotTypeItems().OrderBy(c => c.NAME).ToList(); ListAccessCondition = PickerService.AccessConditionItems().OrderBy(c => c.NAME).ToList(); CommentsCommand = new Command(async() => await ShowComments()); StandInfoCommand = new Command(async() => await ShowStandInfo()); ForestHealthCommand = new Command(async() => await ShowForestHealth()); PlotCrewCommand = new Command(async() => await ShowPlotCrew()); PhotoCommand = new Command(async() => await ShowPhoto()); OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); LocationCommand = new Command(async() => await DoLocation()); }
public AddSoilViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _soil = new SOIL(); _soil.SOILID = selectedID; _soilRepository = new SoilRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListPorePattern = PickerService.PorePatternItems().ToList(); SoilHorizonCommand = new Command(async() => await ShowSoilHorizon()); SoilStructureCommand = new Command(async() => await ShowSoilStructure()); ColourCommand = new Command(async() => await ShowColour()); MottleColourCommand = new Command(async() => await ShowMottleColour()); }
public AddVegetationCensusViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _vegetation = new VEGETATIONCENSUS(); _vegetation.PLOTID = selectedID; _vegetationCensusRepository = new VegetationCensusRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListVeg = PickerService.VegItems().ToList(); OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); IsChanged = false; }
public SmallTreeTallyDetailsViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _smallTreeTally = new SMALLTREETALLY(); _smallTreeTally.SMALLTREETALLYID = selectedID; _smallTreeTallyRepository = new SmallTreeTallyRepository(); _fk = selectedID; UpdateCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListSpecies = PickerService.SmallTreeSpeciesItems().ToList().OrderBy(c => c.ID).ToList(); FetchDetails(selectedID); IsChanged = false; OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); }
public AddDeformityViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _deformity = new DEFORMITY(); _deformity.TREEID = selectedID; _deformityRepository = new DeformityRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListCause = PickerService.CauseItems().ToList(); ListType = PickerService.TypeItems().OrderBy(x => x.ID).ToList(); IsChanged = false; OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); }
public AddDWDViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _dwd = new DWD(); _dwd.DWDID = selectedID; _dwdRepository = new DWDRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); AddAccumCommand = new Command(async() => await Update(true)); DeleteCommand = new Command(async() => await Delete()); ListSpecies = PickerService.SpeciesItems().ToList(); ListOrigin = PickerService.OriginItems().ToList(); ListDecompClass = PickerService.DecompClassItems().ToList(); ListLine = PickerService.LineItems().ToList(); }
public EcositeDetailsViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _ecosite = new ECOSITE(); _ecosite.PLOTID = selectedID; _ecositeRepository = new EcositeRepository(); _fk = selectedID; UpdateCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); CommentsCommand = new Command(async() => await ShowComments()); EcositeCommand = new Command(async() => await ShowEcosite()); PhotoCommand = new Command(async() => await ShowPhoto()); SoilCommand = new Command(async() => await ShowSoil()); TextureCommand = new Command(async() => await ShowTexture()); ListDrainage = PickerService.DrainageItems().ToList(); ListPorePattern = PickerService.PorePatternItems().ToList(); ListMoistureRegime = PickerService.MoistureRegimeItems().ToList(); ListHumusForm = PickerService.HumusFormItems().ToList(); ListDepthClass = PickerService.DepthClassItems().ToList(); ListDeposition = PickerService.DepositionItems().ToList(); ListPerson = PickerService.FillPersonPicker(_ecositeRepository.GetPersonList()).OrderBy(c => c.NAME).ToList(); ImageCommand = new Command(async() => await ShowImage()); OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); // Get the ecosite if it exists if (_ecositeRepository.IsEcositeExists(_fk)) { FetchDetails(_fk); } else { _ecosite.SUBSTRATEDATE = System.DateTime.Now; _ecosite.DEPTHTOCARBONATES = 999; _ecosite.DEPTHTOBEDROCK = 999; _ecosite.DEPTHTODISTINCTMOTTLES = 999; _ecosite.DEPTHTOGLEY = 999; _ecosite.DEPTHTOIMPASSABLECOARSEFRAGMENTS = 999; _ecosite.DEPTHTOPROMINENTMOTTLES = 999; _ecosite.DEPTHTOROOTRESTRICTION = 999; _ecosite.DEPTHTOSEEPAGE = 999; _ecosite.DEPTHTOWATERTABLE = 999; _ecosite.STRATIFIED = "N"; _ecosite.PROBLEMATICSITE = "N"; _ecosite.PRI_ECO_PCT = 100; } Refresh(); }
public DWDDetailsViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _dwd = new DWD(); //_vegetation.VEGETATIONID = selectedID; _dwdRepository = new DWDRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update(false)); AddAccumCommand = new Command(async() => await Update(true)); DeleteCommand = new Command(async() => await Delete()); ListSpecies = PickerService.SpeciesItems().ToList(); ListOrigin = PickerService.OriginItems().ToList(); ListDecompClass = PickerService.DecompClassItems().ToList(); ListLine = PickerService.LineItems().ToList(); FetchDetails(selectedID); }
public PlotDetailsViewModel(INavigation navigation, string selectedPlotID) { _navigation = navigation; _plot = new PLOT(); _plot.PLOTID = selectedPlotID; _plotRepository = new PlotRepository(); UpdatePlotCommand = new Command(async() => await UpdatePlot()); DeletePlotCommand = new Command(async() => await DeletePlot()); ListFMU = PickerService.ForestItems().OrderBy(c => c.NAME).ToList(); CommentsCommand = new Command(async() => await ShowComments()); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList(); ListCanopyOrigin = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList(); ListCanopyStructure = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList(); ListMaturityClass = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList(); FetchPlotDetails(); }
public AddPlotViewModel(INavigation navigation, string fk) { _navigation = navigation; _plotValidator = new PlotValidator(); _plot = new PLOT(); _plotRepository = new PlotRepository(); _selectedprojectid = fk; AddCommand = new Command(async() => await AddPlot(_selectedprojectid)); ViewAllCommand = new Command(async() => await ShowList()); ListFMU = PickerService.ForestItems().OrderBy(c => c.NAME).ToList(); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList(); ListCanopyOrigin = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList(); ListCanopyStructure = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList(); ListMaturityClass = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList(); CommentsCommand = new Command(async() => await ShowComments()); }
public AddTreeViewModel(INavigation navigation) { _navigation = navigation; //_treeValidator = new TreeValidator(); _tree = new TREE(); _treeRepository = new TreeRepository(); AddCommand = new Command(async() => await AddTree("")); ViewAllCommand = new Command(async() => await ShowList()); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList(); ListVigour = PickerService.VigourItems().ToList(); ListCrownDamage = PickerService.CrownDamageItems().ToList(); ListDefoliatingInsect = PickerService.DefoliatingInsectItems().ToList(); ListFoliarDisease = PickerService.FoliarDiseaseItems().ToList(); ListBarkRetention = PickerService.BarkRetentionItems().ToList(); ListWoodCondition = PickerService.WoodConditionItems().ToList(); ListMortalityCause = PickerService.MortalityCauseItems().ToList(); ListDecayClass = PickerService.DecayClassItems().ToList(); }
public StandInfoViewModel(INavigation navigation, PLOT _thisplot) { _navigation = navigation; _plot = new PLOT(); _plot = _thisplot; _plotRepository = new PlotRepository(); if (_plot.STANDINFODATE == System.DateTime.MinValue) { _plot.STANDINFODATE = System.DateTime.Now; } // ListPerson = FillPersonPicker().OrderBy(c => c.NAME).ToList(); ListPerson = PickerService.FillPersonPicker(_plotRepository.GetPersonList(_plot.PROJECTID)).OrderBy(c => c.NAME).ToList(); ListCanopyOrigin = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList(); ListCanopyStructure = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList(); ListMaturityClass = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList(); ListDisturbanceCode = PickerService.DisturbanceItems().OrderBy(c => c.NAME).ToList(); ListMaturityClassRationale = PickerService.MaturityClassRationaleItems().ToList(); OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); }
public TreeAgeViewModel(INavigation navigation, TREE tree) { _navigation = navigation; _tree = tree; // _tree.TREEID = selectedTreeID; _treeRepository = new TreeRepository(); _dosave = false; UpdateTreeCommand = new Command(async() => await UpdateTree()); CommentsCommand = new Command(async() => await ShowComments()); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList(); ListCoreStatus = PickerService.CoreStatusItems().OrderBy(c => c.NAME).ToList(); //FetchTreeDetails(); //defaults if (_tree.HEIGHTTOCORE == 0) { _tree.HEIGHTTOCORE = 1.3F; } OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); }
/// <summary> /// Constructor /// </summary> /// <param name="type">The Type of object that can be edited by this control.</param> protected PickerBase(Type type) { base.SetStyle(ControlStyles.Selectable, true); base.SetStyle(ControlStyles.FixedHeight, true); base.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); base.ResizeRedraw = true; paintValueOnly = false; paintValueFrame = true; paintValueWidth = 20; textEditable = true; autoCompletion = true; dropDownCommit = false; editingText = false; editedType = type; typeEditor = null; typeConverter = null; typeContext = null; parseMethod = null; editedValue = null; base.SuspendLayout(); base.CausesValidation = true; pickerButton = new PickerButton(this); pickerValueBox = new PickerValueBox(this); pickerTextBox = new TextBox(); pickerListBox = new PickerListBox(this); pickerService = new PickerService(this); // pickerButton pickerButton.Visible = true; pickerButton.Cursor = Cursors.Default; pickerButton.MouseDown += new MouseEventHandler(pickerButton_MouseDown); pickerButton.MouseUp += new MouseEventHandler(pickerButton_MouseUp); // pickerValueBox pickerValueBox.Visible = false; pickerValueBox.Cursor = Cursors.Default; pickerValueBox.MouseDown += new MouseEventHandler(pickerValueBox_MouseDown); // pickerTextBox pickerTextBox.AcceptsReturn = false; pickerTextBox.AcceptsTab = false; pickerTextBox.CausesValidation = false; pickerTextBox.BorderStyle = BorderStyle.None; pickerTextBox.KeyDown += new KeyEventHandler(pickerTextBox_KeyDown); pickerTextBox.KeyPress += new KeyPressEventHandler(pickerTextBox_KeyPress); pickerTextBox.KeyUp += new KeyEventHandler(pickerTextBox_KeyUp); pickerTextBox.TextChanged += new EventHandler(pickerTextBox_TextChanged); pickerTextBox.GotFocus += new EventHandler(pickerTextBox_GotFocus); pickerTextBox.LostFocus += new EventHandler(pickerTextBox_LostFocus); pickerTextBox.Validating += new CancelEventHandler(pickerTextBox_Validating); pickerTextBox.Validated += new EventHandler(pickerTextBox_Validated); // pickerListBox pickerListBox.Visible = true; pickerListBox.MouseUp += new MouseEventHandler(pickerListBox_MouseUp); pickerListBox.SelectedIndexChanged += new EventHandler(pickerListBox_SelectedIndexChanged); // pickerBase BackColor = SystemColors.Window; ForeColor = SystemColors.WindowText; base.Controls.Add(pickerButton); base.Controls.Add(pickerValueBox); base.Controls.Add(pickerTextBox); base.ResumeLayout(); }
public DropDownHolder(PickerService service) { currentControl = null; parentService = service; Text = ""; base.StartPosition = FormStartPosition.Manual; base.ShowInTaskbar = false; base.ControlBox = false; base.MinimizeBox = false; base.MaximizeBox = false; base.FormBorderStyle = FormBorderStyle.FixedToolWindow; base.Visible = false; }