Exemple #1
0
 private void PolygonBufZone_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
 {
     if (DialogResult == DialogResult.Cancel)
     {
         e.Cancel = false;
         return;
     }
     if (string.IsNullOrEmpty(m_ZoneName))
     {
         WinUtils.ShowMandatoryError(labelControl1.Text);
         e.Cancel = true;
     }
 }
Exemple #2
0
        private void BufZonesLayer_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
        {
            if (DialogResult == DialogResult.Cancel)
            {
                e.Cancel = false;
                return;
            }
            if (string.IsNullOrEmpty(m_ZoneLayerName))
            {
                WinUtils.ShowMandatoryError(labelControl1.Text);
                e.Cancel = true;
            }

            var dict = (Dictionary <Guid, string>)UserDbLayersManager.GetLayersNames(UserDbLayerType.BuffZones);

            if (dict.ContainsValue(m_ZoneLayerName))
            {
                ErrorForm.ShowWarningFormat("gisErrBufZoneNameDuplication", "", textName.Text);

                e.Cancel = true;
            }
        }