Пример #1
0
        /// <summary>
        /// Tracks any user selections on the interface to preserve them between views/sessions.
        /// </summary>
        private void TrackChanges(string name, object value)
        {
            // Change the information of the property in the model
            var property = table.GetType().GetProperty(name);

            property.SetValue(table, value);

            // Track this change in the command history
            ChangeProperty command = new ChangeProperty(table, name, value);

            explorer.CommandHistory.Add(command);
        }
Пример #2
0
        /// <summary>
        /// Track changes made to the view
        /// </summary>
        private void OnTrackChanges(object sender, PivotTableView.TrackChangesArgs args)
        {
            // Change the information of the property in the model
            var p = table.GetType().GetProperty(args.Name);

            p.SetValue(table, args.Value);

            // Track this change in the command history
            ChangeProperty command = new ChangeProperty(table, args.Name, args.Value);

            explorer.CommandHistory.Add(command);
        }