Esempio n. 1
0
        public ZipDialog(bool IsZip, string FileName = null)
        {
            InitializeComponent();

            this.IsZip = IsZip;

            if (IsZip)
            {
                FName.Text = FileName + ".zip";
                FName.SelectAll();

                ZipMethod.Items.Add(Globalization.GetString("Zip_Dialog_Level_1"));
                ZipMethod.Items.Add(Globalization.GetString("Zip_Dialog_Level_2"));
                ZipMethod.Items.Add(Globalization.GetString("Zip_Dialog_Level_3"));

                ZipCryption.SelectedIndex = 0;
                ZipMethod.SelectedIndex   = 1;
            }
            else
            {
                Title = Globalization.GetString("Zip_Dialog_Password_Title");
                Pass.PlaceholderText = Globalization.GetString("Zip_Dialog_Password_PlaceholderText");

                FName.Visibility          = Visibility.Collapsed;
                ZipMethod.Visibility      = Visibility.Collapsed;
                EnableCryption.Visibility = Visibility.Collapsed;
            }

            Loaded += ZipDialog_Loaded;
        }
Esempio n. 2
0
 public ZipDialog(bool IsZip, string FileName = null)
 {
     InitializeComponent();
     this.IsZip = IsZip;
     if (IsZip)
     {
         if (FileName != null)
         {
             FName.Text = FileName + ".zip";
         }
         FName.SelectAll();
         ZipCryption.SelectedIndex = 0;
         ZipMethod.SelectedIndex   = 2;
     }
     else
     {
         Title                     = "需要解压密码";
         FName.Visibility          = Visibility.Collapsed;
         Pass.PlaceholderText      = "输入解密密码";
         ZipMethod.Visibility      = Visibility.Collapsed;
         EnableCryption.Visibility = Visibility.Collapsed;
     }
     Loaded += (s, e) =>
     {
         if (!IsZip)
         {
             Pass.Visibility = Visibility.Visible;
         }
     };
 }
Esempio n. 3
0
        public ZipDialog(string FileName)
        {
            InitializeComponent();

            FName.Text = FileName + ".zip";
            FName.SelectAll();

            ZipMethod.Items.Add(Globalization.GetString("Zip_Dialog_Level_1"));
            ZipMethod.Items.Add(Globalization.GetString("Zip_Dialog_Level_2"));
            ZipMethod.Items.Add(Globalization.GetString("Zip_Dialog_Level_3"));

            ZipMethod.SelectedIndex = 1;
        }