Exemple #1
0
        /// <summary>
        /// Handles the <see cref="Hyperlink.Click"/> event for the website <see cref="Hyperlink"/>.
        /// </summary>
        /// <param name="sender">
        /// The <see cref="Object"/> where the event handler is attached.</param>
        /// <param name="args">
        /// A <see cref="RoutedEventArgs"/> object containing event data.</param>
        /// <remarks>
        /// <b>OnLinkWebsite</b> supplies the URL of the application website to Windows Explorer
        /// which should respond by launching the default web browser and showing that URL.
        /// </remarks>

        private void OnLinkWebsite(object sender, RoutedEventArgs args)
        {
            args.Handled = true;
            try {
                // request default web browser
                Process.Start(ApplicationInfo.Website);
            }
            catch (Exception e) {
                ApplicationUtility.ShowExplorerError(this, Strings.DialogExplorerWebError, e);
            }
        }
Exemple #2
0
        /// <summary>
        /// Handles the <see cref="Hyperlink.Click"/> event for the author <see cref="Hyperlink"/>.
        /// </summary>
        /// <param name="sender">
        /// The <see cref="Object"/> where the event handler is attached.</param>
        /// <param name="args">
        /// A <see cref="RoutedEventArgs"/> object containing event data.</param>
        /// <remarks>
        /// <b>OnLinkAuthor</b> supplies a "mailto:" URL to Windows Explorer that contains the
        /// author's e-mail address and the application signature. Explorer should respond by
        /// launching the default e-mail client and letting the user write an e-mail.</remarks>

        private void OnLinkAuthor(object sender, RoutedEventArgs args)
        {
            args.Handled = true;

            // construct shell command to e-mail comments
            string mailto = String.Format(
                CultureInfo.InvariantCulture, "mailto:{0}?subject={1} Comments",
                ApplicationInfo.Email, ApplicationInfo.Signature);

            try {
                // request default e-mail client
                Process.Start(mailto);
            }
            catch (Exception e) {
                ApplicationUtility.ShowExplorerError(this, Strings.DialogExplorerMailError, e);
            }
        }
Exemple #3
0
        /// <summary>
        /// Handles the <see cref="CommandBinding.Executed"/> event for the <see
        /// cref="ApplicationCommands.Help"/> command.</summary>
        /// <param name="sender">
        /// The <see cref="Object"/> where the event handler is attached.</param>
        /// <param name="args">
        /// An <see cref="ExecutedRoutedEventArgs"/> object containing event data.</param>
        /// <remarks>
        /// <b>HelpExecuted</b> opens the application help file on the help page for the <see
        /// cref="AboutDialog"/>.</remarks>

        private void HelpExecuted(object sender, ExecutedRoutedEventArgs args)
        {
            args.Handled = true;
            ApplicationUtility.ShowHelp("DlgAbout.html");
        }