Esempio n. 1
0
        //public Dictionary<object, Hashtable> ChangedPropertyItems = new Dictionary<object, Hashtable>();

        //public bool ValueChanged { get; set; }

        //private object SelectedObject { get; set; }
        //private bool GridUpdated { get; set; }


        //private object PreviousSelectedObject { get; set; }

        /// <summary>
        /// Save the time of the Object Selected event.
        /// Used to deside if to update the window.
        /// </summary>
        //private DateTime SelectedObjectTimeStamp { get; set; }

        //private DispatcherTimer UpdateTimer { get;set;}


        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            this.Title   = PROPERTY_GRID_NAME;
            this.Content = PGrid;

            ExecuteMessageEvent.Register(this, SPM2Commands.ObjectSelected, message => SelectObject(message.Parameter.Parameter));
            ExecuteMessageEvent.Register(this, ApplicationCommands.Save, message => this.PGrid.Update(), message => message.CanExecute(this.PGrid.ValueChanged));
        }
Esempio n. 2
0
        private void CommandBinding()
        {
            ExecuteMessageEvent.Register(this, ApplicationCommands.Close, message => this.Close(), message => message.CanExecute(true));

            ExecuteMessageEvent.Register(this, SPM2Commands.ObjectSelected, message => SelectObject(message.Parameter.Parameter));
        }