コード例 #1
0
 bool ShowEditTreeDefault(TreeDefaultValueDO tdv)
 {
     using (FormEditTreeDefault view = new FormEditTreeDefault(Controller.DataStore))
     {
         return(view.ShowDialog(tdv) == DialogResult.OK);
     }
 }
コード例 #2
0
        private void _editTDV_BTN_Click(object sender, EventArgs e)
        {
            TreeDefaultValueDO tdv = new TreeDefaultValueDO();

            using (var view = new FormEditTreeDefault((FMSC.ORM.Core.DatastoreRedux)null))
            {
                view.Load += (Object sndr, EventArgs args) =>
                    {
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.SPECIES).Text = "test";
                        view.Controls.Find<ComboBox>(TREEDEFAULTVALUE.LIVEDEAD).Text = "D";
                        view.Controls.Find<ComboBox>(TREEDEFAULTVALUE.PRIMARYPRODUCT).Text = "02";
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.FIACODE).Text = 1.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.AVERAGEZ).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.BARKTHICKNESSRATIO).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.CONTRACTSPECIES).Text = "test";
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.CULLPRIMARY).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.CULLSECONDARY).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.FORMCLASS).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.HIDDENPRIMARY).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.HIDDENSECONDARY).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.MERCHHEIGHTLOGLENGTH).Text = 1.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.MERCHHEIGHTTYPE).Text = "test";
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.RECOVERABLE).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.REFERENCEHEIGHTPERCENT).Text = .2f.ToString();
                        view.Controls.Find<TextBox>(TREEDEFAULTVALUE.TREEGRADE).Text = "test";
                    };
                view.ShowDialog(tdv);

                Debug.Assert(tdv.Species == "test");
                Debug.Assert(tdv.LiveDead == "D");
                Debug.Assert(tdv.PrimaryProduct == "02");
                Debug.Assert(tdv.FIAcode == 1);

                Debug.Assert(tdv.AverageZ == .2f);
                Debug.Assert(tdv.BarkThicknessRatio == .2f);
                Debug.Assert(tdv.ContractSpecies == "test");
                Debug.Assert(tdv.CullPrimary == .2f);
                Debug.Assert(tdv.CullSecondary == .2f);
                Debug.Assert(tdv.FormClass == .2f);
                Debug.Assert(tdv.HiddenPrimary == .2f);
                Debug.Assert(tdv.HiddenSecondary == .2f);
                Debug.Assert(tdv.MerchHeightLogLength == 1);
                Debug.Assert(tdv.MerchHeightType == "test");
                Debug.Assert(tdv.Recoverable == .2f);
                Debug.Assert(tdv.ReferenceHeightPercent == .2f);
                Debug.Assert(tdv.TreeGrade == "test");
            }
        }
コード例 #3
0
 public override DialogResult ShowEditTreeDefault(TreeDefaultValueDO tdv)
 {
     using (FormEditTreeDefault view = new FormEditTreeDefault(ApplicationController._cDal))
     {
         return view.ShowDialog(tdv);
     }
 }