예제 #1
0
        private string getNewName(string originalName)
        {
            string outPath = originalName;

            Forms.MapServices.frmInputBox inb = new Forms.MapServices.frmInputBox();
            inb.TopLevel = true;
            inb.Label    = "Please type in a new name for the " + p.ToString() + " Directory";
            inb.Text     = "New Output Name";
            System.Windows.Forms.DialogResult rstl = inb.ShowDialog();
            if (rstl == System.Windows.Forms.DialogResult.OK)
            {
                outPath = System.IO.Path.GetDirectoryName(originalName) + "\\" + inb.ArcGISConnection;
                outPath = checkNewName(outPath);
            }
            inb.Dispose();
            return(outPath);
        }
 private void btnAdd_Click(object sender, EventArgs e)
 {
     frmInputBox input = new frmInputBox();
     DialogResult dRslt = input.ShowDialog();
     if (dRslt != DialogResult.OK)
     {
         return;
     }
     string con = input.ArcGISConnection;
     input.Dispose();
     if (msUtil.getServiceConnection(con) == null)
     {
         MessageBox.Show("Can't connect to ArcGIS server " + con);
         return;
     }
     msUtil.updateConnectionTable(con);
     msUtil.updateServiceTable(con);
     loadConnection();
     cmbCon.SelectedItem = con;
 }
예제 #3
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmInputBox  input = new frmInputBox();
            DialogResult dRslt = input.ShowDialog();

            if (dRslt != DialogResult.OK)
            {
                return;
            }
            string con = input.ArcGISConnection;

            input.Dispose();
            if (msUtil.getServiceConnection(con) == null)
            {
                MessageBox.Show("Can't connect to ArcGIS server " + con);
                return;
            }
            msUtil.updateConnectionTable(con);
            msUtil.updateServiceTable(con);
            loadConnection();
            cmbCon.SelectedItem = con;
        }
 private string getNewName(string originalName)
 {
     string outPath = originalName;
     Forms.MapServices.frmInputBox inb = new Forms.MapServices.frmInputBox();
     inb.TopLevel = true;
     inb.Label = "Please type in a new name for the " + p.ToString() + " Directory";
     inb.Text = "New Output Name";
     System.Windows.Forms.DialogResult rstl = inb.ShowDialog();
     if (rstl == System.Windows.Forms.DialogResult.OK)
     {
         outPath = System.IO.Path.GetDirectoryName(originalName) + "\\" + inb.ArcGISConnection;
         outPath = checkNewName(outPath);
     }
     inb.Dispose();
     return outPath;
 }