Пример #1
0
        // Constructor
        public MainPage()
        {
            var lChannel = new WinInetHttpClientChannel {TargetUrl = "http://toxa.dyndns.org:8099"};
            this.clientChannel = lChannel;

            var lMessage = new BinMessage();
            this.message = lMessage;

            // If we have previously created the unique id, use it otherwise create one.
            if (IsolatedStorageSettings.ApplicationSettings.Contains("DeviceId"))
            {
                // Retrieve the unique id saved in the isolated storage.
                this.deviceId = (Guid)IsolatedStorageSettings.ApplicationSettings["DeviceId"];
            }
            else
            {
                // Create a new guid and save it in the isolated storage
                this.deviceId = Guid.NewGuid();
                IsolatedStorageSettings.ApplicationSettings["DeviceId"] = this.deviceId;
            }

            InitializeComponent();

            RegisterOnMpns();
        }
Пример #2
0
        public DataClass()
        {
            httpChannel = new IpHttpClientChannel();
            Message     = new BinMessage();

            httpChannel.TargetUrl = System.Configuration.ConfigurationManager.AppSettings["ServerName"];
            rpsession             = CoRPLoginService.Create(Message, httpChannel);
            rpUsuario             = new RemObjects.DataAbstract.Server.UserInfo();
            //rpsession.Login(usuario, pwd, out rpUsuario);

            //servidor = CoRPDataService.Create(Message, httpChannel);
        }