Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Metody obsługi zdarzeń kliknięcia opcji Menu
- private void RamkaOn_Click(object sender, RoutedEventArgs e) // Włączenie ramki
- {
- if(brdRamka != null)
- brdRamka.BorderThickness= new Thickness(3);
- }
- private void RamkaOff_Click(object sender, RoutedEventArgs e) // Wyłączenie ramki
- {
- if (brdRamka != null)
- brdRamka.BorderThickness = new Thickness(0);
- }
- private void Zapisz_Click(object sender, RoutedEventArgs e) // Zapisanie strony
- // do pliku
- {
- Microsoft.Win32.SaveFileDialog dialog = new Microsoft.Win32.SaveFileDialog();
- dialog.Filter = "WebPage|*.html";
- dialog.DefaultExt = ".html";
- dynamic doc = wbPrzegladarka.Document;
- if (doc != null)
- {
- var htmlText = doc.documentElement.InnerHtml;
- if (dialog.ShowDialog() == true && htmlText != null)
- {
- File.WriteAllText(dialog.FileName, htmlText); // File wymaga
- // using System.IO;
- }
- }
- }
- private void Tmp_Click(object sender, RoutedEventArgs e) // Tymczasowa metoda
- // dla niegotowych opcji
- {
- MessageBox.Show("Opcja w budowie");
- }
- private void OProgramie_Click(object sender, RoutedEventArgs e) // Informacje
- // o programie
- {
- MessageBox.Show("Prosta przeglądarka www, Wersja 1.0, Helion 2017");
- }
- private void Exit_Click(object sender, RoutedEventArgs e) // Wyjście (zamknięcie
- // okna aplikacji)
- {
- Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement