예제 #1
0
        private void EditErrorProperty(object sender, EventArgs e)
        {
            ErrorSurfaceProperty errProp = grdRegions.SelectedRows[0].DataBoundItem as ErrorSurfaceProperty;

            frmRegionErrorProperty frm = new frmRegionErrorProperty(errProp.Name, errProp, DEM.AssocSurfaces.ToList(), ErrorSurface == null);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                ErrProps.ResetBindings();
            }
        }
예제 #2
0
        public frmRegionErrorProperty(string region, ErrorSurfaceProperty errProp, List <AssocSurface> assocs, bool bEdit)
        {
            InitializeComponent();

            txtRegion.Text = region;
            ucErrProp.InitializeExisting(errProp, assocs, bEdit);

            if (!bEdit)
            {
                cmdOK.Visible  = false;
                cmdCancel.Text = "Close";
            }
        }
예제 #3
0
 public void InitializeExisting(ErrorSurfaceProperty errProp, List <AssocSurface> assocs, bool editable = true)
 {
     AssociatedSurfaces = new BindingList <AssocSurface>(assocs);
     ErrSurfProperty    = errProp;
     Editable           = editable;
 }
예제 #4
0
 public void InitializeNew(string regionName, List <AssocSurface> assocs)
 {
     AssociatedSurfaces = new BindingList <AssocSurface>(assocs);
     ErrSurfProperty    = new ErrorSurfaceProperty(regionName);
     Editable           = true;
 }