コード例 #1
0
        public void         setupByForm(IConnection aConnection, IWin32Window aOwner)
        {
            Connection lConnection = (Connection)aConnection;

            using (var lSetupForm = new ConnectionSetupForm(lConnection, false))
            {
                lSetupForm.ShowDialog(aOwner);
            }
        }
コード例 #2
0
        public IConnection  createByForm(IWin32Window aOwner)
        {
            Connection lConnection = new Connection();

            using (var lSetupForm = new ConnectionSetupForm(lConnection, true))
            {
                if (lSetupForm.ShowDialog(aOwner) == DialogResult.Cancel)
                {
                    if (lConnection.Connected)
                    {
                        lConnection.disconnect();
                    }
                    lConnection.Dispose();
                    lConnection = null;
                }
            }
            return(lConnection);
        }