【发布时间】:2013-10-25 08:57:17
【问题描述】:
因为如果没有用户交互,WinRT会在一段时间后锁定屏幕,所以我使用后台任务。我需要在连接到 Web 服务时更新 SQLite 中的表。
在创建 BackgroundTask 项目后不确定从哪里开始。需要一些帮助,例如连接 SQLite 以及插入和更新函数。谢谢
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel.Background;
namespace BackgroundTaskProject
{
//
// A background task always implements the IBackgroundTask interface.
//
public sealed class BackgroundTask : IBackgroundTask
{
//
// The Run method is the entry point of a background task.
//
public void Run(IBackgroundTaskInstance taskInstance)
{
}
}
}
【问题讨论】:
标签: sqlite windows-8 windows-runtime microsoft-metro windows-store-apps