private void CriticalPathCheckBox_Unchecked(object sender, RoutedEventArgs e)
 {
     foreach (PredecessorItem predecessorItem in PertChartView.GetCriticalDependencies())
     {
         SetCriticalPathHighlighting(predecessorItem, false);
     }
     foreach (PertChartItem item in PertChartView.GetCriticalItems())
     {
         SetCriticalPathHighlighting(item, false);
     }
     SetDependencyColorButton.IsEnabled = true;
     SetColorButton.IsEnabled           = true;
 }
Esempio n. 2
0
 public void HighlightCriticalPathButton_Click(object sender, EventArgs e)
 {
     // Reset the view.
     foreach (PertChartItem item in PertChartView.Items)
     {
         item.ShapeStroke = null;
         foreach (PredecessorItem predecessorItem in item.Predecessors)
         {
             predecessorItem.DependencyLineStroke = null;
         }
     }
     // Set up red as shape stroke properties for the critical items.
     foreach (PertChartItem item in PertChartView.GetCriticalItems())
     {
         item.ShapeStroke = Color.Red;
     }
     foreach (PredecessorItem predecessorItem in PertChartView.GetCriticalDependencies())
     {
         predecessorItem.DependencyLineStroke = Color.Red;
     }
 }
 private void CriticalPathCheckBox_Checked(object sender, RoutedEventArgs e)
 {
     SetColorButton.IsEnabled           = false;
     SetDependencyColorButton.IsEnabled = false;
     foreach (PertChartItem item in PertChartView.ManagedItems)
     {
         SetCriticalPathHighlighting(item, false);
         if (item.Predecessors != null)
         {
             foreach (PredecessorItem predecessorItem in item.Predecessors)
             {
                 SetCriticalPathHighlighting(predecessorItem, false);
             }
         }
     }
     foreach (PertChartItem item in PertChartView.GetCriticalItems())
     {
         SetCriticalPathHighlighting(item, true);
     }
     foreach (PredecessorItem predecessorItem in PertChartView.GetCriticalDependencies())
     {
         SetCriticalPathHighlighting(predecessorItem, true);
     }
 }