Пример #1
0
        private void miSendFeedback_Click(object sender, RoutedEventArgs e)
        {
            if (lvSW.SelectedItems.Count > 0)
            {
                try
                {
                    GetSoftware oSelectedItem = ((GetSoftware)lvSW.SelectedItem);
                    var         vDB           = Task.Run(() =>
                    {
                        try
                        {
                            AnonymousDelegate update = delegate()
                            {
                                FeedbackForm oFeedBack = new FeedbackForm();
                                oFeedBack.Title        = oSelectedItem.ProductName + " " + oSelectedItem.ProductVersion;
                                oFeedBack.ShowDialog();

                                if (oFeedBack.hasFeedback)
                                {
                                    RZRestAPI.Feedback(oSelectedItem.ProductName, oSelectedItem.ProductVersion, oSelectedItem.Manufacturer, "", oFeedBack.isWorking.ToString(), Properties.Settings.Default.UserKey, oFeedBack.tbFeedback.Text).ConfigureAwait(false);;
                                }
                            };
                            Dispatcher.Invoke(update);
                        }
                        catch { }
                    });
                }
                catch { }
            }
        }
Пример #2
0
        private void miSendFeedback_Click(object sender, RoutedEventArgs e)
        {
            if (lvSW.SelectedItems.Count > 0)
            {
                try
                {
                    GetSoftware oSelectedItem = ((GetSoftware)lvSW.SelectedItem);
                    var         vDB           = Task.Run(() =>
                    {
                        try
                        {
                            AnonymousDelegate update = delegate()
                            {
                                FeedbackForm oFeedBack = new FeedbackForm();
                                oFeedBack.Title        = oSelectedItem.ProductName + " " + oSelectedItem.ProductVersion;
                                oFeedBack.ShowDialog();

                                if (oFeedBack.hasFeedback)
                                {
                                    RZRestAPIv2.Feedback(oSelectedItem.ProductName, oSelectedItem.ProductVersion, oSelectedItem.Manufacturer, oFeedBack.isWorking.ToString(), System.Reflection.Assembly.GetExecutingAssembly().GetName().Name, oFeedBack.tbFeedback.Text, RZRestAPIv2.CustomerID).ConfigureAwait(false);;
                                }
                            };
                            Dispatcher.Invoke(update);
                        }
                        catch { }
                    });
                }
                catch { }
            }
        }