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
 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;
 }