Example #1
0
 public NodeVM()
 {
     Entity = new Core.Entity.NodeEntity();
     Name = "NoName";
     Proxy = new RunProxy.SolutionRunner();
     Proxy.Closed += (a, b) => { State = false; };
     AppNames = new ObservableCollection<string>();
 }
Example #2
0
 public NodeVM(ErlangEditor.Core.Entity.NodeEntity aEntity)
 {
     Entity = aEntity;
     if (aEntity != null)
     {
         Name = aEntity.NodeName;
     }
     Proxy = new RunProxy.SolutionRunner();
     Proxy.Closed += (a, b) => { State = false; ErlangEditor.Core.NodeUtil.StopNode(aEntity.NodeName); };
     AppNames = new ObservableCollection<string>();
     foreach (var i in aEntity.Apps)
         AppNames.Add(i);
     Proxy.NewOutput += (a, b) => { Dispatcher.Invoke(new Action(() => { App.MainViewModel.Output.Add(new OutputVM { NodeName = b.NodeName, Info = b.Data }); })); };
 }