public GraphStateVariablesViewModel(ObservableGraph graph) : base("State Variables")
        {
            Graph = graph ?? throw new ArgumentNullException(nameof(graph));

            StateVariables = ObservableStateVariable.MakeObservableCollection(Graph, true, ChildIsDirtyChanged);
            StateVariables.CollectionChanged += StateVariables_CollectionChanged;
        }
예제 #2
0
파일: Messages.cs 프로젝트: jonthysell/TEGS
 public ShowGraphPropertiesMessage(ObservableGraph graph, Action <GraphPropertiesViewModel> callback = null) : base(new GraphPropertiesViewModel(graph), callback)
 {
 }
예제 #3
0
        public static ObservableCollection <ObservableStateVariable> MakeObservableCollection(ObservableGraph graph, bool clone, IsDirtyChangedEventHandler onIsDirtyChanged = null)
        {
            if (graph is null)
            {
                throw new ArgumentNullException(nameof(graph));
            }

            return(MakeObservableCollection(graph.InternalObject.StateVariables, item => new ObservableStateVariable(item), clone, onIsDirtyChanged));
        }
예제 #4
0
 public GraphPropertiesViewModel(ObservableGraph graph) : base("Properties")
 {
     Graph        = graph ?? throw new ArgumentNullException(nameof(graph));
     _name        = Graph.Name;
     _description = Graph.Description;
 }