Example #1
0
 internal void _varMgr_VariableChanging(object sender, VariableChangeEventArgs ea)
 {
     throw new NotImplementedException("The method or operation is not implemented.");
 }
Example #2
0
 public void VariableSelected_DummyHandler(object sender, VariableChangeEventArgs ea)
 {
     VariableSelected_TimesCalled++;
 }
Example #3
0
 internal void _varMgr_VariableChanged(object sender, VariableChangeEventArgs ea)
 {
     if (sender!=null)
     {
         if (ea.Activity == Activity.Delete || ea.Activity == Activity.Modify)
         {
             IElement el  = null;
             foreach (KeyValuePair<Guid,IElement> kvp in ElementsMgr)
             {
                 el = kvp.Value;
                 el.UpdateVariableDependencies(ea.VarName, ea.Activity);
             }
         }
     }
 }
Example #4
0
        public void VariableChangedEventHandlerForwardsTheVarChangeInfoToAllElementsWhenAVariableIsModified()
        {
            var wkSpce = new WorkSpace();
            var args = new VariableChangeEventArgs("Var A", Activity.Modify);

            var mockEl = new Mock<IElement>();
            var mockVarMgr = new Mock<IVarMgr>();
            var elMgr = new Common.WorkSpace.Elements();
            wkSpce.ElementsMgr = elMgr;

            elMgr.Add(mockEl.Object);               //  need elements in the elMgr to update
            wkSpce._varMgr_VariableChanged(mockVarMgr.Object, args);
            mockEl.Verify(m => m.UpdateVariableDependencies(null, args.Activity), Times.AtMostOnce());
        }