public void UnSelectSolution(SelSolution selSolution)
 {
     if (null == selSolution)
     {
         return;                      // this solution not selected
     }
     // remove from list
     _selectedSolutions.Remove(selSolution);
     ParentDocument.RemoveItem(selSolution);
     // fire event
     if (null != SolutionSelectionRemoved)
     {
         SolutionSelectionRemoved(this, selSolution);
     }
     // set document modified (not analysis, otherwise selected solutions are erased)
     ParentDocument.Modify();
 }
        public void SelectSolutionByIndex(int index)
        {
            if (index < 0 || index > _solutions.Count)
            {
                return;  // no solution with this index
            }
            if (HasSolutionSelected(index))
            {
                return;                                         // solution already selected
            }
            // instantiate new SelSolution
            SelSolution selSolution = new SelSolution(ParentDocument, this, _solutions[index]);

            // insert in list
            _selectedSolutions.Add(selSolution);
            // fire event
            if (null != SolutionSelected)
            {
                SolutionSelected(this, selSolution);
            }
            // set document modified (not analysis, otherwise selected solutions are erased)
            ParentDocument.Modify();
        }
Example #3
0
 public void UnSelectSolution(SelSolution selSolution)
 {
     if (null == selSolution) return; // this solution not selected
     // remove from list
     _selectedSolutions.Remove(selSolution);
     ParentDocument.RemoveItem(selSolution);
     // fire event
     if (null != SolutionSelectionRemoved)
         SolutionSelectionRemoved(this, selSolution);
     // set document modified (not analysis, otherwise selected solutions are erased)
     ParentDocument.Modify();
 }
Example #4
0
 public void SelectSolutionByIndex(int index)
 {
     if (index < 0 || index > _solutions.Count)
         return;  // no solution with this index
     if (HasSolutionSelected(index)) return;             // solution already selected
     // instantiate new SelSolution
     SelSolution selSolution = new SelSolution(ParentDocument, this, _solutions[index]);
     // insert in list
     _selectedSolutions.Add(selSolution);
     // fire event
     if (null != SolutionSelected)
         SolutionSelected(this, selSolution);
     // set document modified (not analysis, otherwise selected solutions are erased)
     ParentDocument.Modify();
 }