Пример #1
0
        void GetPersonalImageStart()
        {
            string thingXml = @"        <info>
        <group>
            <filter>
                <type-id>a5294488-f865-4ce3-92fa-187cd3b58930</type-id>
                <thing-state>Active</thing-state>
            </filter>
            <format>
                <section>core</section>
                <section>blobpayload</section>
                <type-version-format>a5294488-f865-4ce3-92fa-187cd3b58930</type-version-format>
                <blob-payload-request>
                    <blob-format>
                        <blob-format-spec>inline</blob-format-spec>
                    </blob-format>
                </blob-payload-request>
            </format>
        </group>
        </info>";

            XElement info = XElement.Parse(thingXml);

            CHBaseRequest request = new CHBaseRequest("GetThings", "3", info, GetPersonalImageCompleted);

            App.HealthVaultService.BeginSendRequest(request);
            SetProgressBarVisibility(true);
        }
Пример #2
0
        void c_SaveWeight_Click(object sender, RoutedEventArgs e)
        {
            string thingXml = @"<info><thing>
                <type-id>3d34d87e-7fc1-4153-800f-f56592cb0d17</type-id>
                <thing-state>Active</thing-state>
                <flags>0</flags>
                <data-xml>
                    <weight>
                        {0}
                        <value>
                            <kg>{1}</kg>
                            <display units=""pounds"">{2}</display>
                        </value>
                    </weight>
                    <common/>
                </data-xml>
            </thing></info>";

            double weight = Double.Parse(c_textWeight.Text);

            c_textWeight.Text = "";
            string whenString = GetDateTime(DateTime.Now, "when");
            string xml        = String.Format(thingXml, whenString, weight / 2.204, weight);

            XElement info = XElement.Parse(xml);

            CHBaseRequest request = new CHBaseRequest("PutThings", "2", info, PutThingsCompleted);

            App.HealthVaultService.BeginSendRequest(request);
            c_progressBar.Visibility = Visibility.Visible;
        }
Пример #3
0
        void c_ClearWeight_Click(object sender, RoutedEventArgs e)
        {
            XElement info = new XElement("info");

            foreach (string thingIdText in _currentThingIds)
            {
                info.Add(XElement.Parse(thingIdText));
            }

            CHBaseRequest request = new CHBaseRequest("RemoveThings", "1", info, RemoveThingsCompleted);

            App.HealthVaultService.BeginSendRequest(request);
            SetProgressBarVisibility(true);
        }
Пример #4
0
        void GetThingsStart()
        {
            string thingXml = @"        <info>
            <group>
                <filter>
                    <type-id>3d34d87e-7fc1-4153-800f-f56592cb0d17</type-id>
                    <thing-state>Active</thing-state>
                </filter>
                <format>
                    <section>core</section>
                    <xml/>
                    <type-version-format>3d34d87e-7fc1-4153-800f-f56592cb0d17</type-version-format>
                </format>
            </group>
        </info>";

            XElement info = XElement.Parse(thingXml);

            CHBaseRequest request = new CHBaseRequest("GetThings", "3", info, GetThingsCompleted);

            App.HealthVaultService.BeginSendRequest(request);
            SetProgressBarVisibility(true);
        }