本文整理汇总了C#中Task.ReadActive方法的典型用法代码示例。如果您正苦于以下问题:C# Task.ReadActive方法的具体用法?C# Task.ReadActive怎么用?C# Task.ReadActive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Task
的用法示例。
在下文中一共展示了Task.ReadActive方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnCancel_Click
protected void btnCancel_Click(object sender, EventArgs e)
{
Task task = new Task();
GridViewRow gvRow = (GridViewRow)(sender as Control).Parent.Parent;
int taskID = Convert.ToInt32(gvTasks.DataKeys[gvRow.RowIndex].Value);
task.DeleteActiveTask(taskID);
Master.Msgbox(Utility.Message);
gvTasks.DataSource = task.ReadActive();
gvTasks.DataBind();
gvUcTasks.DataSource = task.ReadActiveUC();
gvUcTasks.DataBind();
}
示例2: btnCancelMc_Click
protected void btnCancelMc_Click(object sender, EventArgs e)
{
Task task = new Task();
GridViewRow gvRow = (GridViewRow)(sender as Control).Parent.Parent;
int mcTaskID = Convert.ToInt32(gvMcTasks.DataKeys[gvRow.RowIndex].Value);
string groupName = gvRow.Cells[2].Text;
string pid = (gvRow.Cells[3].Text);
task.DeleteActiveMcTask(mcTaskID, groupName, pid);
Master.Msgbox(Utility.Message);
gvMcTasks.DataSource = task.ReadActiveMC();
gvMcTasks.DataBind();
gvTasks.DataSource = task.ReadActive();
gvTasks.DataBind();
}
示例3: Timer_Tick
protected void Timer_Tick(object sender, EventArgs e)
{
Task task = new Task();
gvTasks.DataSource = task.ReadActive();
gvTasks.DataBind();
gvUcTasks.DataSource = task.ReadActiveUC();
gvUcTasks.DataBind();
UpdatePanel1.Update();
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["clickTracker"] = "1";
Task task = new Task();
gvTasks.DataSource = task.ReadActive();
gvTasks.DataBind();
gvUcTasks.DataSource = task.ReadActiveUC();
gvUcTasks.DataBind();
gvMcTasks.DataSource = task.ReadActiveMC();
gvMcTasks.DataBind();
GetMCInfo();
Master.Msgbox(Utility.Message);
}
}
示例5: cancelTasks_Click
protected void cancelTasks_Click(object sender, EventArgs e)
{
Task task = new Task();
task.CancelAll();
gvMcTasks.DataSource = task.ReadActiveMC();
gvMcTasks.DataBind();
gvUcTasks.DataSource = task.ReadActiveUC();
gvUcTasks.DataBind();
gvTasks.DataSource = task.ReadActive();
gvTasks.DataBind();
Master.Msgbox(Utility.Message);
}
示例6: ValidateSettings
protected bool ValidateSettings()
{
/*if(txtIP.Text.Contains(":"))
{
Utility.Message="The CrucibleWDS Server Port Cannot Be Changed";
return false;
}*/
Task task = new Task();
var isActiveTasks = task.ReadActive();
if (isActiveTasks.Rows.Count > 0)
{
Utility.Message = "Settings Cannot Be Changed While Tasks Are Active";
return false;
}
if (txtPort.Text != "80" && txtPort.Text != "443" && !string.IsNullOrEmpty(txtPort.Text))
{
txtWebService.Text = "http://[server-ip]:" + txtPort.Text + "/cruciblewds/service/client.asmx/";
}
if (txtPort.Text == "80" || txtPort.Text == "443" || string.IsNullOrEmpty(txtPort.Text))
{
txtWebService.Text = "http://[server-ip]/cruciblewds/service/client.asmx/";
}
if (ddlSSL.Text == "Yes")
{
if (txtWebService.Text.ToLower().Contains("http://"))
txtWebService.Text = txtWebService.Text.Replace("http://", "https://");
}
else
if (txtWebService.Text.ToLower().Contains("https://"))
txtWebService.Text = txtWebService.Text.Replace("https://", "http://");
if (!txtImagePath.Text.Trim().EndsWith(Path.DirectorySeparatorChar.ToString()))
txtImagePath.Text += Path.DirectorySeparatorChar;
if (!txtImageHoldPath.Text.Trim().EndsWith(Path.DirectorySeparatorChar.ToString()))
txtImageHoldPath.Text += Path.DirectorySeparatorChar;
if (!txtTFTPPath.Text.Trim().EndsWith(Path.DirectorySeparatorChar.ToString()))
txtTFTPPath.Text += Path.DirectorySeparatorChar;
if (!txtNFSPath.Text.Trim().EndsWith("/"))
txtNFSPath.Text += "/";
if (!txtNFSDeploy.Text.Trim().EndsWith("/"))
txtNFSDeploy.Text += ("/");
if (!txtWebService.Text.Trim().EndsWith("/"))
txtWebService.Text += ("/");
if (txtSMBPath.Text.Contains("\\"))
txtSMBPath.Text = txtSMBPath.Text.Replace("\\","/");
int startPort = Convert.ToInt32(txtStartPort.Text);
int endPort = Convert.ToInt32(txtEndPort.Text);
if (startPort % 2 != 0)
{
startPort++;
txtStartPort.Text = startPort.ToString();
}
if (endPort % 2 != 0)
{
endPort++;
txtEndPort.Text = endPort.ToString();
}
try
{
if ((startPort >= 2) && (endPort - startPort >= 2))
{
return true;
}
else
{
Utility.Message = "End Port Must Be At Least 2 More Than Starting Port";
return false;
}
}
catch (Exception ex)
{
Logger.Log(ex.Message);
return false;
}
}