Пример #1
0
        private void MnuLoadSavedBinds_Click(object sender, EventArgs e)
        {
            string file = Dialogs.Helper.OpenExcelFile();

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

            var coder = new DataManager.Binds.Readers.ReaderBuilder().Build(file);

            coder.RunWorkerCompleted += Coder_RunWorkerCompleted;
            coder.ShowDialog(this);
        }
Пример #2
0
        private void MnuAddBindsExcel_Click(object sender, EventArgs e)
        {
            var excel = Dialogs.Helper.OpenExcelFile(!Properties.Settings.Default.DoNotShowImportExcelMessage);

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

            var coder = Helpers.GeocoderHelper.GetGeocoder();

            if (coder == null)
            {
                return;
            }

            var dialog = new DataManager.Binds.Readers.ReaderBuilder().Build(excel, coder);

            dialog.RunWorkerCompleted += Coder_RunWorkerCompleted;
            dialog.ShowDialog(this);
        }
Пример #3
0
        private void MnuAddBindsInputBox_Click(object sender, EventArgs e)
        {
            var lines = Dialogs.Helper.GetBindsStrings();

            if (lines == null || lines.Length == 0)
            {
                return;
            }

            var coder = Helpers.GeocoderHelper.GetGeocoder();

            if (coder == null)
            {
                return;
            }

            lines = lines.Where(a => !string.IsNullOrEmpty(a)).Distinct().ToArray();
            var dialog = new DataManager.Binds.Readers.ReaderBuilder().Build(lines, coder);

            dialog.RunWorkerCompleted += Coder_RunWorkerCompleted;
            dialog.ShowDialog(this);
        }