我需要顯示一個窗口通知與數據網格或表格格式的數據和Windows窗體應運行背景24/7。顯示窗口通知與DataGrid或表格格式數據在C#
我需要每15分鐘及時調用web服務並讀取數據顯示在帶有datagrid的windows通知上。
請讓我知道,如何做到這一點?
我需要顯示一個窗口通知與數據網格或表格格式的數據和Windows窗體應運行背景24/7。顯示窗口通知與DataGrid或表格格式數據在C#
我需要每15分鐘及時調用web服務並讀取數據顯示在帶有datagrid的windows通知上。
請讓我知道,如何做到這一點?
使用每15
分鐘
using System.Timers;
Timer tmrExecutor = new Timer();
protected override void OnStart(string[] args)
{
tmrExecutor.Elapsed += new ElapsedEventHandler(tmrExecutor_Elapsed); // adding Event
tmrExecutor.Interval = 15000; // Set your time here
tmrExecutor.Enabled = true;
tmrExecutor.Start();
}
private void tmrExecutor_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
//call your web-service here
}
protected override void OnStop()
{
tmrExecutor.Enabled = false;
}
http://www.codeproject.com/Questions/540617/windowsplusserviceplustoplusrunpluseveryplusoneplu
運行那麼對於數據網格形式的一個窗口服務,一般
DataGridView
對象並將您的數據綁定到它。http://www.dotnetperls.com/datagridview-tutorial
但是因爲你需要顯示一個表單,你可能無法直接使用該服務。 創建一個Windows窗體應用程序,然後使用該服務每隔15
分鐘調用您的應用程序
如何顯示帶有數據網格或表格格式數據的窗體? – James123
這類問題的問題在於它太寬泛。每個元素都有大量需要學習/討論的信息。 – OneFineDay