Exemplo n.º 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();
            }
        }
Exemplo n.º 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";
            }
        }
Exemplo n.º 3
0
 public void InitializeExisting(ErrorSurfaceProperty errProp, List <AssocSurface> assocs, bool editable = true)
 {
     AssociatedSurfaces = new BindingList <AssocSurface>(assocs);
     ErrSurfProperty    = errProp;
     Editable           = editable;
 }
Exemplo n.º 4
0
 public void InitializeNew(string regionName, List <AssocSurface> assocs)
 {
     AssociatedSurfaces = new BindingList <AssocSurface>(assocs);
     ErrSurfProperty    = new ErrorSurfaceProperty(regionName);
     Editable           = true;
 }