Esempio n. 1
0
        public static void UpdateZoneLayerDict()
        {
            m_ZoneLayerDict.Clear();
            var dict = (Dictionary <Guid, string>)UserDbLayersManager.GetLayersNames(UserDbLayerType.BuffZones);

            foreach (var item in dict)
            {
                m_ZoneLayerDict.Add(new KeyValuePairWrapper(item.Key, item.Value));
            }
            //m_ZoneLayerDict =

            if (ZoneLayerDictUpdated != null)
            {
                ZoneLayerDictUpdated(null, EventArgs.Empty);
            }
        }
Esempio n. 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;
            }
        }