示例#1
0
        private async void send_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(feedbackTextBox.Text.Trim()))
            {
                var dialog = new MessageDialog("反馈不能为空哦!");
                var cmdOK  = new UICommand("确定");
                dialog.Commands.Add(cmdOK);
                dialog.CancelCommandIndex = 0;
                var result = await dialog.ShowAsync();

                return;
            }
            else if (!NetworkHelper.CheckInternet())
            {
                var dialog = new MessageDialog("当前无网络!");
                var cmdOK  = new UICommand("确定");
                dialog.Commands.Add(cmdOK);
                dialog.CancelCommandIndex = 0;
                var result = await dialog.ShowAsync();

                return;
            }

            if (dataLoader == null)
            {
                dataLoader = new DataLoader();
            }

            if (dataLoader.Busy)
            {
                return;
            }

            string url   = "http://data.meitu.com/feedback_iphone.php&";
            string param = string.Empty;

            param += "&" + "software" + "=" + "WPMTTT";
            param += "&" + "version" + "=" + "1.0.0.0";
            param += "&" + "module" + "=" + "WindowsPhone";
            param += "&" + "message" + "=" + feedbackTextBox.Text.Trim();
            param += "&" + "contact" + "=" + contactTextBox.Text.Trim();
            param += "&" + "itype" + "=" + feedbackType;
            url    = string.Format("http://data.meitu.com/feedback_iphone.php?{0}", param);

            dataLoader.Load(url, OnSent);
        }