Example #1
0
        /// <summary>
        /// Raised when the settings button has been clicked.
        /// Subscribes the SettingChanged delegate to listen for when the window
        /// reports a valid Attributes change
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="routedEventArguments"></param>
        protected void Settings_Click(object sender, RoutedEventArgs routedEventArguments)
        {
            PingSettings settingsWindow = new PingSettings(_attributes);

            settingsWindow.Closed += new EventHandler(SettingChanged);

            settingsWindow.Show();
        }
Example #2
0
        /// <summary>
        /// Raised when the PingSettings Window has changed the attributes.
        /// Binds the current Attribute Set after mutating the state of the current attributes
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventArguments"></param>
        protected virtual void SettingChanged(object sender, EventArgs eventArguments)
        {
            try {
                PingSettings settingsWindow = (PingSettings)sender;

                _attributes = settingsWindow.Attributes;

                Bind(_attributes);

                settingsWindow.Closed -= SettingChanged;
            }catch (Exception exception) { Console.WriteLine(exception.Message); }
        }