コード例 #1
0
        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));
            }
        }
コード例 #2
0
        private void LZSSloaded(object sender, RoutedEventArgs e)
        {
            if (InputText.Text == "")
            {
                return;
            }
            string input = InputText.Text;

            LZSSout.Text = LZSS.CompressLZSS(input);
        }
コード例 #3
0
        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();
            }
        }