本文整理汇总了C#中Feature.getPercentComplete方法的典型用法代码示例。如果您正苦于以下问题:C# Feature.getPercentComplete方法的具体用法?C# Feature.getPercentComplete怎么用?C# Feature.getPercentComplete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feature
的用法示例。
在下文中一共展示了Feature.getPercentComplete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getFeatureLines
private string getFeatureLines(Feature ftr)
{
string retString = "";
if (ftr.myChildren.Count > 0)
{
if (ftr.getPercentComplete() == 100)
{
retString += "<li title=\"" + ftr.getFeatureDescription() + "\"><table width=\"100%\"><tr><td align=\"left\">" + ftr.getFeatureName() + " <font color=\"green\"><i>" + ftr.getPercentComplete() + "%</i></font></td></tr></table><ul><hr style=\"height:1px; margin:2px;\" />";
}
else
{
retString += "<li title=\"" + ftr.getFeatureDescription() + "\"><table width=\"100%\"><tr><td align=\"left\">" + ftr.getFeatureName() + " <font color=\"red\"><i>" + ftr.getPercentComplete() + "%</i></font></td></tr></table><ul><hr style=\"height:1px; margin:2px;\" />";
}
foreach (Feature child in ftr.myChildren)
{
retString += getFeatureLines(child);
}
retString += "</ul></li>";
}
else
{
if (ftr.getPercentComplete() == 100)
{
retString += "<li title=\"" + ftr.getFeatureDescription() + "\"><table width=\"100%\"><tr><td align=\"left\">" + ftr.getFeatureName() + " <font color=\"green\"><i>" + ftr.getPercentComplete() + "%</i></font></td></tr></table><hr style=\"height:1px; margin:2px;\" />";
}
else
{
retString += "<li title=\"" + ftr.getFeatureDescription() + "\"><table width=\"100%\"><tr><td align=\"left\">" + ftr.getFeatureName() + " <font color=\"red\"><i>" + ftr.getPercentComplete() + "%</i></font></td></tr></table><hr style=\"height:1px; margin:2px;\" />";
}
}
return retString;
}
示例2: FillMilestones
public void FillMilestones()
{
string IP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ?? Request.ServerVariables["REMOTE_ADDR"];
DataTable DT = theCake.getMilestones(theCake.getActiveUserName(IP), Int32.Parse(Request.QueryString["ID"].ToString()));
int projectID = int.Parse(Request.QueryString["ID"].ToString());
string headerControl = "";
headerControl += "<div class=\"container-fluid\"><div id=\"three_summaries\" class=\"row-fluid\">";
lit_Milestones.Text = headerControl;
if (DT.Rows.Count > 0)
{
foreach (DataRow DR in DT.Rows)
{
Feature headFeature = new Feature(int.Parse(DR["ID"].ToString()));
string milestoneControl = "";
milestoneControl += "<div class=\"span6\"><div class=\"widget\"><div style=\"font-size:1.2em; font-family: 'Kite One', sans-serif;\">" +
headFeature.getFeatureName() + "</div><progress value=\"" +
((decimal)(headFeature.getPercentComplete()) / 100) + "\"></progress>";
milestoneControl += getFeatureLines(headFeature);
milestoneControl += "</div></div>";
lit_Milestones.Text += milestoneControl;
}
}
else
{
lit_Milestones.Text = "No Milestones set up yet!";
}
string footerControl = "";
footerControl += "</div></div>";
lit_Milestones.Text += footerControl;
progress_Header.Text = "<progress value=\"" + ((decimal)(theCake.getProjectPercentComplete(projectID)))/100 +"\" />";
}
示例3: generateReport
public void generateReport()
{
List<int> myMilestones = currentProject.getMilestones();
string headerControl = "";
headerControl += "<div class=\"container-fluid\"><div id=\"three_summaries\" class=\"row-fluid\">";
lit_ProjectDetails.Text = headerControl;
if (myMilestones.Count > 0)
{
foreach (int milestoneID in myMilestones)
{
Feature headFeature = new Feature(milestoneID);
string milestoneControl = "";
milestoneControl += "<div class=\"span6\"><div class=\"widget\"><div style=\"font-size:1.2em; font-family: 'Kite One', sans-serif;\">" +
headFeature.getFeatureName() + "</div><progress value=\"" +
((decimal)(headFeature.getPercentComplete()) / 100) + "\"></progress>";
milestoneControl += getFeatureLines(headFeature);
milestoneControl += "</div></div>";
lit_ProjectDetails.Text += milestoneControl;
}
}
else
{
lit_ProjectDetails.Text = "No Milestones set up yet!";
}
string footerControl = "";
footerControl += "</div></div>";
lit_ProjectDetails.Text += footerControl;
lit_ProjectTotalComplete.Text = "Total Project Completion: <strong>" + currentProject.getPercentComplete() + "%</strong>";
}
示例4: updateProjectPercent
private void updateProjectPercent()
{
int projectID = int.Parse(Request.QueryString["ID"].ToString());
string IP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ?? Request.ServerVariables["REMOTE_ADDR"];
DataTable DT = theCake.getMilestones(theCake.getActiveUserName(IP), Int32.Parse(Request.QueryString["ID"].ToString()));
decimal total = 0;
decimal counter = 0;
if (DT.Rows.Count > 0)
{
foreach (DataRow DR in DT.Rows)
{
Feature ftr = new Feature(int.Parse(DR["ID"].ToString()));
counter++;
total += ftr.getPercentComplete();
}
theCake.updateProjectPercentComplete((int)(total / counter), projectID);
}
else
{
theCake.updateProjectPercentComplete(0, projectID);
}
}
示例5: getFeatureLines
private string getFeatureLines(Feature ftr)
{
string retString = "";
if (ftr.myChildren.Count > 0)
{
if (ftr.getPercentComplete() == 100)
{
retString += "<li title=\"" + ftr.getFeatureDescription() + "\"><table width=\"100%\"><tr><td align=\"left\">" + ftr.getFeatureName() + " <font color=\"green\"><i>" + ftr.getPercentComplete() + "%</i></font></td><td align=\"right\"><a class=\"google button blue\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#addChildFeature\" title=\"Add New Sub-Objective\">+</a><a class=\"google button\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#editChildFeature\" title=\"Edit Objective\">E</a></td></tr></table><ul><hr style=\"height:1px; margin:2px;\" />";
}
else
{
retString += "<li title=\"" + ftr.getFeatureDescription() + "\"><table width=\"100%\"><tr><td align=\"left\">" + ftr.getFeatureName() + " <font color=\"red\"><i>" + ftr.getPercentComplete() + "%</i></font></td><td align=\"right\"><a class=\"google button blue\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#addChildFeature\" title=\"Add New Sub-Objective\">+</a><a class=\"google button\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#editChildFeature\" title=\"Edit Objective\">E</a></td></tr></table><ul><hr style=\"height:1px; margin:2px;\" />";
}
foreach (Feature child in ftr.myChildren)
{
retString += getFeatureLines(child);
}
retString += "</ul></li>";
}
else
{
if (ftr.getPercentComplete() == 100)
{
retString += "<li title=\"" + ftr.getFeatureDescription() + "\"><table width=\"100%\"><tr><td align=\"left\">" + ftr.getFeatureName() + " <font color=\"green\"><i>" + ftr.getPercentComplete() + "%</i></font></td><td align=\"right\"><a class=\"google button blue\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#addChildFeature\" title=\"Add New Sub-Objective\">+</a><a class=\"google button\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#editChildFeature\" title=\"Edit Objective\">E</a><a class=\"google button red\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#removeChildFeature\" title=\"Remove Objective\">×</a></li></td></tr></table><hr style=\"height:1px; margin:2px;\" />";
}
else
{
retString += "<li title=\"" + ftr.getFeatureDescription() + "\"><table width=\"100%\"><tr><td align=\"left\">" + ftr.getFeatureName() + " <font color=\"red\"><i>" + ftr.getPercentComplete() + "%</i></font></td><td align=\"right\"><a class=\"google button blue\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#addChildFeature\" title=\"Add New Sub-Objective\">+</a><a class=\"google button\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#editChildFeature\" title=\"Edit Objective\">E</a><a class=\"google button red\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#removeChildFeature\" title=\"Remove Objective\">×</a><a class=\"google button green\" href=\"?ID=" + ID + "&feat=" + ftr.getID() + "#quickComplete\" title=\"Complete Objective\">✓</a></li></td></tr></table><hr style=\"height:1px; margin:2px;\" />";
}
}
return retString;
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
MaintainScrollPositionOnPostBack = true;
if (Request.QueryString["ID"] != null)
{
updateProjectPercent();
ID = Request.QueryString["ID"].ToString();
string IP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ?? Request.ServerVariables["REMOTE_ADDR"];
currentProject = new Project(int.Parse(ID));
//DataTable DT = theCake.getTask(Int32.Parse(ID), theCake.getActiveUserName(IP));
if (!currentProject.isValid)
{
Response.Redirect("Home.aspx");
}
//string ownerAlias = userClass.getUserAlias(Int32.Parse(DT.Rows[0]["ownerID"].ToString()));
userClass projOwner = new userClass(currentProject.getOwnerID());
if (theCake.getActiveUserName(IP) != projOwner.getOwnerAlias())
{
int userID = theCake.getUserID(theCake.getActiveUserName(IP));
DataTable permissionChecker = theCake.getUserProjectPermissions(userID, Int32.Parse(ID));
if (permissionChecker.Rows[0]["permission_Project_Write"].ToString() == "0")
ProjectWrite = false;
if (permissionChecker.Rows[0]["permission_Board_Write"].ToString() == "0")
BoardWrite = false;
}
if (!ProjectWrite)
{
pnl_EditOperations.Visible = false;
pnl_SpecialOptions.Visible = false;
}
if (!BoardWrite)
{
btn_AddComment.Visible = false;
}
lbl_TaskName.Text = currentProject.getTaskName(); //DT.Rows[0]["taskName"].ToString();
lbl_Description.Text = currentProject.getTaskDescription(); //DT.Rows[0]["taskDescription"].ToString();
lbl_projectOwner.Text = "<a href=\"UserProfile.aspx?userID=" + currentProject.getOwnerID() + "\">" + projOwner.getDisplayName();
btn_ViewProjectReport.PostBackUrl = "printProjectReport.aspx?ID=" + Request.QueryString["ID"].ToString();
btn_ViewMemberReport.PostBackUrl = "printMemberReport.aspx?ID=" + Request.QueryString["ID"].ToString();
if (!IsPostBack)
{
txt_Edit_TaskName.Text = currentProject.getTaskName();
txt_Edit_TaskDescription.Text = currentProject.getTaskDescription(); //DT.Rows[0]["taskDescription"].ToString();
}
lbl_ExpectedStart.Text = currentProject.getExpectedStart().ToShortDateString();
lbl_ExpectedStop.Text = currentProject.getExpectedStop().ToShortDateString();
if (currentProject.getActualStart() == DateTime.MinValue) lbl_ActualStart.Text = "Not Yet Started";
else lbl_ActualStart.Text = currentProject.getActualStart().ToShortDateString();
if (currentProject.getActualStop() == DateTime.MinValue) lbl_ActualStop.Text = "Not Yet Completed";
else lbl_ActualStop.Text = currentProject.getActualStop().ToShortDateString();
if (currentProject.getDoneFlag())
{
btn_markDone.Visible = false;
btn_markWip.Visible = true;
btn_UpgradeSize.Visible = false;
AddComments.Visible = false;
FillMilestones();
getallBoards();
}
else
{
if (Request.QueryString["feat"] != null)
{
if (!IsPostBack)
{
Feature ftr = new Feature(int.Parse(Request.QueryString["feat"].ToString()));
lbl_remChildFeature_Name.Text = ftr.getFeatureName();
lbl_remChildFeature_Description.Text = ftr.getFeatureDescription();
lbl_remChildFeature_PercentComplete.Text = ftr.getPercentComplete().ToString() + "%";
btnRemFeature.CommandArgument = ftr.getID().ToString();
txt_editChildFeature_Name.Text = ftr.getFeatureName();
txt_editChildFeature_Description.Text = ftr.getFeatureDescription();
for (int i = 0; i <= 100; i++)
{
ddl_editChildFeature_PercentComplete.Items.Add(i.ToString());
}
for (int i = 1; i <= 5; i++)
{
ddl_editChildFeature_Weight.Items.Add(i.ToString());
ddl_addChildFeature_Weight.Items.Add(i.ToString());
}
ddl_editChildFeature_PercentComplete.SelectedIndex = ftr.getPercentComplete();
ddl_editChildFeature_Weight.SelectedIndex = ftr.getWeight() - 1;
if (ftr.hasChildren)
{
//.........这里部分代码省略.........