Esempio n. 1
0
        // set zip file password
        void passwordToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // show dialog
            var dlg = new UserInputDialog();

            dlg.Font = this.Font;
            string new_password = dlg.GetString("Choose a password", _zipFile.Password);

            // if user provided a new password, use it
            if (new_password != null)
            {
                _zipFile.Password = new_password;
            }
        }
Esempio n. 2
0
 // edit zip file comment
 void fileToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(_zipFile.FileName))
     {
         var dlg = new UserInputDialog();
         dlg.Font = this.Font;
         var comment = dlg.GetString("Enter new comment for the zip file", _zipFile.Comment);
         if (comment != null)
         {
             _zipFile.Comment = comment;
         }
         UpdateStatusBar();
     }
 }
Esempio n. 3
0
 // edit selected entry comment
 void entryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (_list.SelectedItems.Count > 0)
     {
         // get current comment, if any
         var ze  = (C1ZipEntry)_list.SelectedItems[0].Tag;
         var dlg = new UserInputDialog();
         dlg.Font = this.Font;
         var comment = dlg.GetString("Enter new comment for the zip file", ze.Comment);
         if (comment != null)
         {
             ze.Comment = comment;
         }
         UpdateStatusBar();
     }
 }