Imagara 3 năm trước cách đây
mục cha
commit
a527dfdd27
2 tập tin đã thay đổi với 1 bổ sung20 xóa
  1. 0 5
      Encrypter/MainWindow.xaml
  2. 1 15
      Encrypter/MainWindow.xaml.cs

+ 0 - 5
Encrypter/MainWindow.xaml

@@ -126,11 +126,6 @@
                         <ColumnDefinition/>
                         <ColumnDefinition/>
                     </Grid.ColumnDefinitions>
-                    <Label Content="ASCII"
-                           HorizontalAlignment="Center"
-                           VerticalAlignment="Top"
-                           Grid.ColumnSpan="2"
-                           FontSize="30"/>
                     <StackPanel Orientation="Vertical"
                                 VerticalAlignment="Center"
                                 HorizontalAlignment="Center"

+ 1 - 15
Encrypter/MainWindow.xaml.cs

@@ -2,22 +2,10 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
-using System.Threading.Tasks;
 using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
 
 namespace Encrypter
 {
-    /// <summary>
-    /// Логика взаимодействия для MainWindow.xaml
-    /// </summary>
     public partial class MainWindow : Window
     {
         Encoding ascii = Encoding.ASCII;
@@ -28,7 +16,6 @@ namespace Encrypter
         }
         private void sposob1_encrypt(object sender, RoutedEventArgs e)
         {
-
             string input = sposob1_input.Text, output = "";
 
             Dictionary<char, int> dictionarys = input.GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count());
@@ -52,8 +39,7 @@ namespace Encrypter
         private void sposob1_decrypt(object sender, RoutedEventArgs e)
         {
             string input = sposob1_input2.Text, output = "";
-
-            string[] mass = input.Split('%');
+            string[] mass = input.Remove(input.Length - 1, 1).Split('%');
 
             int[,] array = new int[mass.Length, 2];