Example #1
0
 public static void Save(PingMassage post)
 {
     using (var db = DbConnection)
     {
         db.Insert(post);
     }
 }
Example #2
0
        private async void AppServiceConnection_RequestReceivedAsync(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args)
        {
            var reply = new PingMassage
            {
                PingId    = _pingId,
                Date      = _pingDate,
                IpAddress = Convert.ToString(args.Request.Message["host"]),
                Time      = Convert.ToInt64(args.Request.Message["time"]),
                Size      = Convert.ToInt32(args.Request.Message["size"]),
                Ttl       = Convert.ToInt32(args.Request.Message["ttl"]),
                Response  = Convert.ToString(args.Request.Message["response"]),
            };
            await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                                                                        () => (PingCollaction ?? (PingCollaction = new ObservableCollection <PingMassage>())).Add(reply));

            await NotifyUIAsync(() => SQLiteHelper.Save(reply));
        }
Example #3
0
 public void SaveMassage(PingMassage post)
 {
     SQLiteHelper.Save(post);
 }