Beispiel #1
0
        /// <summary>
        /// Отобразить форму настроек соединения
        /// </summary>
        public static DialogResult Show(CommSettings commSettings)
        {
            if (commSettings == null)
                throw new ArgumentNullException("commSettings");

            FrmCommSettings frmCommSettings = new FrmCommSettings();
            frmCommSettings.commSettings = commSettings;
            frmCommSettings.txtServerHost.Text = commSettings.ServerHost;
            frmCommSettings.numServerPort.SetNumericValue(commSettings.ServerPort);
            frmCommSettings.numServerTimeout.SetNumericValue(commSettings.ServerTimeout);
            frmCommSettings.txtServerUser.Text = commSettings.ServerUser;
            frmCommSettings.txtServerPwd.Text = commSettings.ServerPwd;
            return frmCommSettings.ShowDialog();
        }
Beispiel #2
0
        /// <summary>
        /// Отобразить форму настроек соединения
        /// </summary>
        public static DialogResult Show(CommSettings commSettings)
        {
            if (commSettings == null)
            {
                throw new ArgumentNullException("commSettings");
            }

            FrmCommSettings frmCommSettings = new FrmCommSettings();

            frmCommSettings.commSettings       = commSettings;
            frmCommSettings.txtServerHost.Text = commSettings.ServerHost;
            frmCommSettings.numServerPort.SetValue(commSettings.ServerPort);
            frmCommSettings.numServerTimeout.SetValue(commSettings.ServerTimeout);
            frmCommSettings.txtServerUser.Text = commSettings.ServerUser;
            frmCommSettings.txtServerPwd.Text  = commSettings.ServerPwd;
            return(frmCommSettings.ShowDialog());
        }