Example #1
0
        private async Task MergeStyle()
        {
            var result = ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(
                "Merging Style: \n" + _styleToMerge + "\n Into: \n" +
                _dictionaryPath,
                "Merge Style", MessageBoxButton.OKCancel, MessageBoxImage.Exclamation);

            if (result.ToString() != "OK")
            {
                return;
            }

            var styleToMerge = await StyleUtil.GetStyleItem(_styleToMerge);

            var style = await StyleUtil.GetStyleItem(_dictionaryPath);

            if (!StyleUtil.IsStyleEditable(style))
            {
                return;
            }

            var mergeStyle = new MergeStyle(style);
            await QueuedTask.Run(() =>
            {
                mergeStyle.Merge(styleToMerge, ReplaceKeys);
            });

            ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(
                "Merge Complete: " + style +
                "\nNumber of Symbols Added: " + mergeStyle.NumSymbolsAdded +
                "\nNumber of Symbols Ignored: " + mergeStyle.NumSymbolsNotAdded,
                "Merge Style", MessageBoxButton.OK, MessageBoxImage.Exclamation);
        }
        private async Task UpdateColorLocking()
        {
            StyleProjectItem style = await StyleUtil.GetStyleItem(_dictionaryPath);

            if (!StyleUtil.IsStyleEditable(style))
            {
                return;
            }

            await _UpdateColorLocking(style);
        }