private void frmAssociatedSurface_Load(object sender, EventArgs e) { cboType.DataSource = AssocSurface.GetAssocatedSurfaceTypes(); SelectedAssociatedSurfaceType = AssocType; if (Assoc == null) { cmdOK.Text = Properties.Resources.CreateButtonText; ucRaster.Visible = false; txtPath.Width = ucRaster.Right - txtPath.Left; cboType.Enabled = false; this.txtName.TextChanged += txtName_TextChanged; switch (AssocType) { case AssocSurface.AssociatedSurfaceTypes.SlopeDegree: txtName.Text = "Slope Degrees"; break; case AssocSurface.AssociatedSurfaceTypes.SlopePercent: txtName.Text = "Slope Percent"; break; case AssocSurface.AssociatedSurfaceTypes.PointDensity: txtName.Text = "Point Density"; break; } ucRasterProperties1.Visible = false; Height -= cmdOK.Top - ucRasterProperties1.Top; FormBorderStyle = FormBorderStyle.FixedDialog; } else { txtName.Text = Assoc.Name; txtPath.Text = ProjectManager.Project.GetRelativePath(Assoc.Raster.GISFileInfo); cmdOK.Text = Properties.Resources.UpdateButtonText; txtPath.Visible = false; ucRaster.Width = ucRaster.Right - txtPath.Left; ucRaster.Left = txtPath.Left; ucRaster.InitializeExisting("Associated Surface", Assoc.Raster); ucRasterProperties1.Initialize(Assoc.Noun, Assoc.Raster); } tTip.SetToolTip(txtName, "The name used to refer to this associated surface within this GCD project. It cannot be empty and must be unique among all associated surfaces for the parent DEM survey."); tTip.SetToolTip(txtPath, "The relative file path where this associated surface raster is stored."); tTip.SetToolTip(cboType, "The type of values represented in this associated surface."); }
/// <summary> /// Constructor for new type /// </summary> /// <param name="dem"></param> /// <param name="eType"></param> public frmAssociatedSurface(DEMSurvey dem, AssocSurface.AssociatedSurfaceTypes eType) { InitializeComponent(); DEM = dem; AssocType = eType; }