Exemplo n.º 1
0
        public string CreateConnect(DocuSignApiConfiguration conf, string name, string url)
        {
            var connectApi = new ConnectApi(conf.Configuration);
            var connect    = new ConnectConfiguration(name, url);
            var result     = connectApi.CreateConnect(conf.AccountId, connect);

            return(result.Data.connectId);
        }
Exemplo n.º 2
0
        public string ActivateConnect(DocuSignApiConfiguration conf, ConnectConfiguration connect)
        {
            var connectApi = new ConnectApi(conf.Configuration);

            connect.allowEnvelopePublish = "true";
            var response = connectApi.UpdateConnect(conf.AccountId, connect);

            return(response.Data.connectId);
        }
Exemplo n.º 3
0
        public void TestInit()
        {
            ConnectConfiguration configuration = ConnectConfigurationView.Instance.Configuration;

            Assert.IsNotNull(configuration);

            Assert.IsNotNull(configuration.Keys["SpringObjectFile"]);
            Assert.IsNotNull(configuration.Keys["IBatisMapping"]);
        }
Exemplo n.º 4
0
        public void TestCreateMapper()
        {
            ConnectConfiguration configuration = ConnectConfigurationView.Instance.Configuration;

            ISqlMapper ibatisMapper = null;

            string ibatisMapping = configuration.Keys["IBatisMapping"].Value;

            ibatisMapper = ISqlMapHelper.CreateSqlMapper(ibatisMapping, true);

            Assert.IsNotNull(ibatisMapper);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Событие загрузки формы
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MainForm_Load(object sender, EventArgs e)
 {
     this.Text             = ConnectConfiguration.UserName + " " + ConnectConfiguration.Port;
     textBox1.Text         = ConnectConfiguration.CurrentAddress().ToString();
     btnStopServer.Enabled = false;
     btnStopClient.Enabled = false;
     try
     {
         //_presenter.StartPlay(videoScreen1);
         _presenter.StartRecording();
     }
     catch
     {
     }
 }
Exemplo n.º 6
0
        public void GetModemStatusTest()
        {
            var configuration = new ConnectConfiguration
            {
                ConnectionType = ConnectionType.Usb,
                BaudRate       = int.Parse(ConfigurationManager.AppSettings["baudrate"]),
                PortName       = ConfigurationManager.AppSettings["port"]
            };

            var status = new ModemStatus
            {
                IsSuccess     = false,
                State         = "Not initialized",
                Manufacturer  = "None",
                ModelName     = string.Empty,
                SerialNumber  = "SN xyz",
                SignalQuality = new SignalQuality {
                    dBmW = 0, Percent = "0.0", IsValid = false
                },
                Imsi         = string.Empty,
                Imei         = string.Empty,
                OperatorName = string.Empty
            };

            var request = new ModemRequestContext
            {
                Response   = status,
                Connection = configuration
            };

            var commands = new Dictionary <string, AbstractModemCommandHandler>
            {
                { "AT", new RequestEchoHandler() },
                { "AT+GMI", new RequestManufaturerHandler() },
                { "AT+GMM", new RequestModelHandler() },
                { "AT+CGMR", new RequestRevisionIdentificationHandler() }
            };
            var results = new Dictionary <string, ModemRequestContext>();

            foreach (var command in commands)
            {
                var commandString = command.Key;
                var commandClass  = command.Value;
                var commandResult = commandClass.Handle(request, commandString);
                results.Add(commandString, commandResult);
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// Событие загрузки формы
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MainForm_Load(object sender, EventArgs e)
 {
     this.Text     = ConnectConfiguration.UserName + " " + ConnectConfiguration.Port;
     textBox1.Text = ConnectConfiguration.CurrentAddress().ToString();
     //_presenter.StartRecording();
 }