Esempio n. 1
0
        private void btnCheckPath_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            bool   hasInsertedPath = true;
            string selectedPath    = String.Empty;
            string insertedPath    = txtImportFolder.Text;

            if (insertedPath == null || insertedPath == "")
            {
                Tools.UserInfoHandler.ShowError("Please insert or select a folder.");
                this.Cursor = Cursors.Default;
                return;
            }

            if (CountryAdministrator.ConsiderOldAddOnFileStructure(_fromAddOn))
            {
                _importCountry = ImportExportAdministrator.GetImportAddOn_OldStyle(out selectedPath, hasInsertedPath, insertedPath);
            }
            else
            {
                _importCountry = ImportExportAdministrator.GetImportCountry(out selectedPath, _fromAddOn, hasInsertedPath, insertedPath);
            }
            if (_importCountry == null)
            {
                this.Cursor = Cursors.Default;
                return;
            }


            displayCountrySystems();
            this.Cursor = Cursors.Default;
        }
Esempio n. 2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (txtImportFolder.Text == string.Empty)
            {
                UserInfoHandler.ShowError("Please select a version to compare with."); return;
            }

            Cursor = Cursors.WaitCursor;
            bool   hasInsertedPath = true;
            string insertedPath    = txtImportFolder.Text;
            string selectedPath    = String.Empty;

            if (CountryAdministrator.ConsiderOldAddOnFileStructure(_fromAddOn))
            {
                _importCountry = ImportExportAdministrator.GetImportAddOn_OldStyle(out selectedPath, hasInsertedPath, insertedPath);
            }
            else
            {
                _importCountry = ImportExportAdministrator.GetImportCountry(out selectedPath, _fromAddOn, hasInsertedPath, insertedPath);
            }
            if (_importCountry == null)
            {
                Cursor = Cursors.Default;
                return;
            }

            DialogResult = DialogResult.OK;
            Close();
        }
Esempio n. 3
0
        void btnSelectImportFolder_Click(object sender, EventArgs e)
        {
            string path = string.Empty;

            if (CountryAdministrator.ConsiderOldAddOnFileStructure(_fromAddOn))
            {
                _importCountry = ImportExportAdministrator.GetImportAddOn_OldStyle(out path);
            }
            else
            {
                _importCountry = ImportExportAdministrator.GetImportCountry(out path, _fromAddOn);
            }
            if (_importCountry == null)
            {
                return;
            }

            txtImportFolder.Text = path;
            displayCountrySystems();
        }