Example #1
0
        private void DisplayLogOutput()
        {
            if (ApplicationOptions.LogOutput)
            {
                mnuLogOutput.IsChecked       = false;
                ApplicationOptions.LogOutput = false;
                return;
            }


            // Display folder browse dialog box.
            ApplicationOptions.BlurWindows();
            var dialog = new System.Windows.Forms.FolderBrowserDialog();

            dialog.Description = "Select a location for the log files.";
            System.Windows.Forms.DialogResult result = dialog.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                ApplicationOptions.LogPath   = dialog.SelectedPath;
                ApplicationOptions.LogOutput = true;
            }
            else
            {
                ApplicationOptions.LogOutput = false;
            }
            mnuLogOutput.IsChecked = ApplicationOptions.LogOutput;

            ApplicationOptions.RemoveBlurWindows();
        }
Example #2
0
        private void mnuManageFavorites_Click(object sender, RoutedEventArgs e)
        {
            // Display manage favorites window.
            ApplicationOptions.BlurWindows();
            var manageFavoritesWindow = new ManageFavoritesWindow();

            manageFavoritesWindow.Owner = this;
            manageFavoritesWindow.ShowDialog();
            RefreshFavorites();

            ApplicationOptions.RemoveBlurWindows();
        }
Example #3
0
        private void DisplayEmailAlerts()
        {
            if (ApplicationOptions.EmailAlert)
            {
                mnuEmailAlerts.IsChecked      = false;
                ApplicationOptions.EmailAlert = false;
                return;
            }

            // Display email alerts window
            ApplicationOptions.BlurWindows();
            var emailAlertWindow = new EmailAlertWindow();

            emailAlertWindow.Owner = this;

            emailAlertWindow.ShowDialog();
            mnuEmailAlerts.IsChecked = ApplicationOptions.EmailAlert;

            ApplicationOptions.RemoveBlurWindows();
        }
Example #4
0
        private void mnuAddToFavorites_Click(object sender, RoutedEventArgs e)
        {
            // Display add to favorites window.
            ApplicationOptions.BlurWindows();
            var addToFavoritesWindow = new AddToFavoritesWindow();

            addToFavoritesWindow.Owner = this;
            if (addToFavoritesWindow.ShowDialog() == true)
            {
                var currentHostList = new List <string>();
                for (int i = 0; i < _pingItems.Count; ++i)
                {
                    currentHostList.Add(_pingItems[i].Hostname);
                }
                Favorite.AddFavoriteEntry(addToFavoritesWindow.FavoriteTitle, currentHostList, (int)sliderColumns.Value);
                RefreshFavorites();
            }

            ApplicationOptions.RemoveBlurWindows();
        }