示例#1
0
 public void UnSelectSolution(SelCaseSolution 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();
 }
示例#2
0
        public void SelectSolutionByIndex(int index)
        {
            if (index < 0 || index >= _caseSolutions.Count)
            {
                return;
            }
            if (HasSolutionSelected(index))
            {
                return;
            }
            // instantiate new SelCaseSolution
            SelCaseSolution selCaseSolution = new SelCaseSolution(ParentDocument, this, _caseSolutions[index]);

            // insert in list
            _selectedSolutions.Add(selCaseSolution);
            // fire event
            if (null != SolutionSelected)
            {
                SolutionSelected(this, selCaseSolution);
            }
            //  set document modified
            ParentDocument.Modify();
        }
示例#3
0
 public void SelectSolutionByIndex(int index)
 {
     if (index < 0 || index >= _caseSolutions.Count)
         return;
     if (HasSolutionSelected(index)) return;
     // instantiate new SelCaseSolution 
     SelCaseSolution selCaseSolution = new SelCaseSolution(ParentDocument, this, _caseSolutions[index]);
     // insert in list
     _selectedSolutions.Add(selCaseSolution);
     // fire event
     if (null != SolutionSelected)
         SolutionSelected(this, selCaseSolution);
     //  set document modified
     ParentDocument.Modify();
 }
示例#4
0
 public void UnSelectSolution(SelCaseSolution 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();
 }