Ejemplo n.º 1
0
        private void btnExplodeTheme_Click(object sender, EventArgs e)
        {
            var ed    = m_owner.EditorService;
            var layer = ed.GetEditedResource() as ILayerDefinition;
            var style = m_point as IVectorStyle ?? m_line as IVectorStyle ?? m_area as IVectorStyle;
            var diag  = new ExplodeThemeDialog(ed, m_parent, style, layer);

            if (diag.ShowDialog() == DialogResult.OK)
            {
                var options = new ExplodeThemeOptions()
                {
                    ActiveStyle     = style,
                    FolderId        = diag.CreateInFolder,
                    Layer           = layer,
                    LayerNameFormat = diag.LayerNameFormat,
                    LayerPrefix     = diag.LayerPrefix,
                    Range           = m_parent
                };

                var progress = new ProgressDialog();
                var worker   = new BackgroundWorker();
                worker.WorkerReportsProgress = true;
                progress.RunOperationAsync(null, ExplodeThemeWorker, options);
            }
        }
Ejemplo n.º 2
0
        private void btnExplodeTheme_Click(object sender, EventArgs e)
        {
            var ed = m_owner.EditorService;
            var layer = ed.GetEditedResource() as ILayerDefinition;
            var style = m_point as IVectorStyle ?? m_line as IVectorStyle ?? m_area as IVectorStyle;
            var diag = new ExplodeThemeDialog(ed, m_parent, style, layer);
            if (diag.ShowDialog() == DialogResult.OK)
            {
                var options = new ExplodeThemeOptions()
                {
                    ActiveStyle = style,
                    FolderId = diag.CreateInFolder,
                    Layer = layer,
                    LayerNameFormat = diag.LayerNameFormat,
                    LayerPrefix = diag.LayerPrefix,
                    Range = m_parent
                };

                var progress = new ProgressDialog();
                var worker = new BackgroundWorker();
                worker.WorkerReportsProgress = true;
                progress.RunOperationAsync(null, ExplodeThemeWorker, options);
            }
        }