예제 #1
0
        private void LoadDropDownValues()
        {
            dropDownValues = new ConnectionEditorForm.NamedArrayList[]
            {
                connectionStringLastValue =
                    new ConnectionEditorForm.NamedArrayList("ConnectionStringLast"),
                serverDropDownValues   = new ConnectionEditorForm.NamedArrayList("Server"),
                portDropDownValues     = new ConnectionEditorForm.NamedArrayList("Port"),
                databaseDropDownValues = new ConnectionEditorForm.NamedArrayList("Database"),
                userDropDownValues     = new ConnectionEditorForm.NamedArrayList("User"),
                groupDropDownValues    = new ConnectionEditorForm.NamedArrayList("Group"),
                roleDropDownValues     = new ConnectionEditorForm.NamedArrayList("Role")
            };
            ConnectionEditorForm.LoadValuesFromApplicationDataFolder(              // load from ConnectionEditor.xml
                dropDownValues, ConnectionEditorForm.ApplicationDataFileName);

            //	this.comboServer.Text = ConnectionEditorForm.GetValueOfKeyword(nv, DrvConst.DRV_PROP_HOST);
            this.comboServer.Items.AddRange(serverDropDownValues.ToArray());
            if (serverDropDownValues.IndexOf("(local)") == -1)
            {
                this.comboServer.Items.Add("(local)");
            }

            //	this.comboPort.Text = ConnectionEditorForm.GetValueOfKeyword(nv, DrvConst.DRV_PROP_PORT, "II7");
            this.comboPort.Items.AddRange(portDropDownValues.ToArray());

            //	this.comboDatabase.Text = ConnectionEditorForm.GetValueOfKeyword(nv, DrvConst.DRV_PROP_DB);
            this.comboDatabase.Items.AddRange(databaseDropDownValues.ToArray());

            //	this.comboUser.Text = ConnectionEditorForm.GetValueOfKeyword(nv, DrvConst.DRV_PROP_USR);
            this.comboUser.Items.AddRange(userDropDownValues.ToArray());
        }          // LoadDropDownValues
예제 #2
0
        private void SaveDropDownValues()
        {
            if (dropDownValues == null)
            {
                return;
            }

            ConnectionEditorForm.SaveValuesToApplicationDataFolder(
                dropDownValues, ConnectionEditorForm.ApplicationDataFileName);
        }
예제 #3
0
 private void btnResetServerCache_Click(object sender, EventArgs e)
 {
     using (var rsc = new ConnectionEditorForm()) {
         if (rsc.ShowDialog(this.ParentForm,
                            btnResetServerCache.RectangleToScreen(btnResetServerCache.Bounds)) == DialogResult.OK)
         {
             foreach (var conn in rsc.SelectedConnections)
             {
                 var arasConn = conn.ArasLogin();
                 arasConn.Process(new Command("<Item/>").WithAction("ResetServerCache"));
             }
         }
     }
 }
예제 #4
0
    private void btnResetServerCache_Click(object sender, EventArgs e)
    {
      using (var rsc = new ConnectionEditorForm()) {
        if (rsc.ShowDialog(this.ParentForm,
          btnResetServerCache.RectangleToScreen(btnResetServerCache.Bounds)) == DialogResult.OK)
        {
          foreach (var conn in rsc.SelectedConnections)
          {
            var arasConn = conn.ArasLogin();
            arasConn.Process(new Command("<Item/>").WithAction("ResetServerCache"));
          }
        }
      }

    }
예제 #5
0
 private void btnEditConnection_Click(object sender, EventArgs e)
 {
     using (var dialog = new ConnectionEditorForm())
     {
         dialog.Multiselect = false;
         if (_connData != null)
         {
             dialog.SetSelected(_connData);
         }
         if (dialog.ShowDialog(this, menuStrip.RectangleToScreen(btnEditConnection.Bounds)) ==
             System.Windows.Forms.DialogResult.OK)
         {
             SetConnection(dialog.SelectedConnections.First());
         }
     }
 }
예제 #6
0
        private void btnResetServerCache_Click(object sender, EventArgs e)
        {
            string msg;
              using (var rsc = new ConnectionEditorForm()) {
            if (rsc.ShowDialog(this.ParentForm) == DialogResult.OK)
            {
              foreach (var conn in rsc.SelectedConnections)
              {
            var arasConn = ConnectionEditor.Login(conn, out msg);
            if (arasConn == null)
            {
              MessageBox.Show(msg);
            }
            else
            {
              arasConn.CallAction("ResetServerCache", "<Item/>");
            }

              }
            }
              }
        }
예제 #7
0
        private void btnResetServerCache_Click(object sender, EventArgs e)
        {
            string msg;

            using (var rsc = new ConnectionEditorForm()) {
                if (rsc.ShowDialog(this.ParentForm) == DialogResult.OK)
                {
                    foreach (var conn in rsc.SelectedConnections)
                    {
                        var arasConn = ConnectionEditor.Login(conn, out msg);
                        if (arasConn == null)
                        {
                            MessageBox.Show(msg);
                        }
                        else
                        {
                            arasConn.CallAction("ResetServerCache", "<Item/>");
                        }
                    }
                }
            }
        }
예제 #8
0
 private void btnEditConnection_Click(object sender, EventArgs e)
 {
   using (var dialog = new ConnectionEditorForm())
   {
     dialog.Multiselect = false;
     if (_connData != null)
       dialog.SetSelected(_connData);
     if (dialog.ShowDialog(this, menuStrip.RectangleToScreen(btnEditConnection.Bounds)) ==
       System.Windows.Forms.DialogResult.OK)
     {
       SetConnection(dialog.SelectedConnections.First());
     }
   }
 }
예제 #9
0
 private static ConnectionEditorForm.NamedArrayList UpdateDropDownList(
     ConnectionEditorForm.NamedArrayList array, string str)
 {
     return(ConnectionEditorForm.UpdateDropDownList(array, str));
 }