コード例 #1
0
        //protected void OnSpeciesButtonClick(object sender, EventArgs e)
        //{
        //    if (_viewLoading) { return; }
        //    Button button = (Button)sender;
        //    SubPop subPop = (SubPop)button.Tag;

        //    var tree = DataService.CreateNewTreeEntry(subPop.SG.Stratum, subPop.SG, subPop.TDV, true);
        //    tree.TreeCount = 1;

        //    DialogService.AskCruiser(tree);

        //    DataService.AddNonPlotTree(tree);
        //    DataEntryForm.GotoTreePage();
        //}

        protected void OnTallySettingsClicked(object sender, EventArgs e)
        {
            var       row   = (ITallyButton)sender;
            CountTree count = row.Count;

            try
            {
                count.Save();
                var countTreeDataService = new CountTreeDataService(DataService.DataStore, count);
                using (FormTallySettings view = new FormTallySettings(countTreeDataService, SampleSelectorRepository))
                {
#if !NetCF
                    view.Owner = this.TopLevelControl as Form;
#endif
                    view.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                return;
            }

            //row.DiscriptionLabel.Text = count.Tally.Description;
        }
コード例 #2
0
        void ShowTallySettings(CountTree count)
        {
            this.ViewLogicController.SavePlotTrees();
            try
            {
                count.Save();
                var countDataService = new CountTreeDataService(DataService.DataStore, count);
                using (FormTallySettings view = new FormTallySettings(countDataService, SampleSelectorRepository))
                {
#if !NetCF
                    view.ShowDialog(this);
#else
                    view.ShowDialog();
#endif
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                return;
            }
        }