Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
AnalysisProjectOptionsPanelXaml.xaml.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterForstmeier committed Sep 15, 2012
1 parent 46e2087 commit 3fc84ac
Showing 1 changed file with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,35 +140,40 @@ void ReadRuleString()
RuleTreeNode ruleNode;
if (rules.TryGetValue(rule, out ruleNode)) {
ruleNode.IsChecked = active;
//ruleNode.isError = error;
ruleNode.isError = error;
ruleNode.Index = 1;
}
}


userCheck = true;
SetCheckedState();
SetCategoryIcon();
}


void SetCategoryIcon() {
void SetCheckedState()
{
foreach (SharpTreeNode cat in ruleTreeView.Root.Children) {
bool noneChecked = true;
foreach (RuleTreeNode rtn in cat.Children) {
if ((bool)rtn.IsChecked) {
noneChecked = false;
break;
}
}
cat.IsChecked = !noneChecked;
}
}


private void SetCategoryIcon() {

Console.WriteLine("SetCategoryicon");
foreach (CategoryTreeNode categoryNode in ruleTreeView.Root.Children) {
categoryNode.CheckMode();
/*
if (!categoryNode.NewErrorState.HasValue) {
Console.WriteLine ("\t{0} is Mixed Mode",categoryNode.Text);
categoryNode.AddMixedMode();
} else{
if (categoryNode.NewErrorState == true) {
Console.WriteLine ("\t{0} is Error",categoryNode.Text);
// categoryNode.Index = 1;
} else {
Console.WriteLine ("\t{0} is Warning",categoryNode.Text);
// categoryNode.Index = ;
}
}
*/
}

Console.WriteLine("--------------");

}
Expand Down

0 comments on commit 3fc84ac

Please sign in to comment.