/// <summary>
 /// Internal constructor. We use it as a convenient location to subscribe to our custom event
 /// </summary>
 /// <remarks>The constructor will be called when the button is first clicked</remarks>
 internal Module1()
 {
     NameChangedEvent.Subscribe((args) =>
     {
         MessageBox.Show($"Name has changed:\r\nOld: {args.OldName}\r\nNew: {args.NewName}", "NameChangedEvent");
     });
 }
        /// <summary>
        /// Execute the button onclick action
        /// </summary>
        protected override void OnClick()
        {
            //Change the name
            string oldName = FrameworkApplication.Name;

            FrameworkApplication.SubTitle = DateTime.Now.ToString("h:mm:ss tt zz");
            //publish our custom event
            NameChangedEvent.Publish(new NameChangedEventArgs(oldName, FrameworkApplication.Name));
        }