Exemple #1
0
        private void MnuSaveBindsToKml_Click(object sender, EventArgs e)
        {
            var binds = olvBinds.CollectCheckedObjects <Bind>(ObjectListViewHelper.ObjectListViewCollector.All)
                        .Where(a => a.Error == null).ToList();

            if (binds.Count == 0)
            {
                return;
            }

            string path = Dialogs.Helper.SaveAsKml();

            if (string.IsNullOrEmpty(path))
            {
                return;
            }

            if (System.IO.File.Exists(path))
            {
                System.IO.File.Delete(path);
            }

            var progress = new DataManager.Binds.Writers.WriterBuilder().Build(binds, path);

            progress.RunWorkerCompleted += Progress_RunWorkerCompleted;
            progress.ShowDialog(this, binds);
        }
Exemple #2
0
        private void MnuSaveBindsToExcel_Click(object sender, EventArgs e)
        {
            var binds = olvBinds.CollectCheckedObjects <Bind>(ObjectListViewHelper.ObjectListViewCollector.All)
                        .Where(a => a.Error == null).ToList();

            if (binds.Count == 0)
            {
                return;
            }

            var progress = new DataManager.Binds.Writers.WriterBuilder().Build(binds);

            progress.RunWorkerCompleted += Progress_RunWorkerCompleted;
            progress.ShowDialog(this, binds);
        }