Beispiel #1
0
        /// <summary>
        /// Подключиться к SmartCOM.
        /// </summary>
        /// <param name="host">Адрес сервера.</param>
        /// <param name="port">Порт сервера.</param>
        /// <param name="login">Логин.</param>
        /// <param name="password">Пароль.</param>
        protected override void OnConnect(string host, short port, string login, string password)
        {
            var server = SafeGetServer();

            if (!ClientSettings.IsEmpty())
            {
                server.ConfigureClient(ClientSettings);
            }

            if (!ServerSettings.IsEmpty())
            {
                server.ConfigureServer(ServerSettings);
            }

            server.connect(host, port, login, password);
        }