private void WczytajDoLZSS(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "plik skompresowany lzss|*.lzss"; if (openFileDialog.ShowDialog() == true) { DecompressedText.Text = LZSS.DecompressLZSS(File.ReadAllText(openFileDialog.FileName)); } }
private void LZSSloaded(object sender, RoutedEventArgs e) { if (InputText.Text == "") { return; } string input = InputText.Text; LZSSout.Text = LZSS.CompressLZSS(input); }
private void WczytajPlik(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "pliki tekstowe .txt|*.txt"; if (openFileDialog.ShowDialog() == true) { InputText.Text = File.ReadAllText(openFileDialog.FileName); LZSSout.Text = LZSS.CompressLZSS(File.ReadAllText(openFileDialog.FileName)); stopienkompresji.Text = (100 * LZSSout.Text.Length / InputText.Text.Length).ToString(); } }