CSL.ErrorWindow.IssueCreateEmptyDirectoriesWarning C# (CSharp) Method

IssueCreateEmptyDirectoriesWarning() public method

public IssueCreateEmptyDirectoriesWarning ( string message, string submessage ) : bool
message string
submessage string
return bool
        public bool IssueCreateEmptyDirectoriesWarning(string message, string submessage)
        {
            InstructionalLabel.Text = message;
            ErrorLabel.Text = submessage;
            DiscardButton.Visible = false;

            this.Text = "[CSL] -- Warning";
            this.Activate();
            this.ShowDialog();

            return this.okButtonSelected;
        }

Usage Example

Ejemplo n.º 1
0
 private void createDirectoriesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ErrorWindow ew = new ErrorWindow();
     bool response = ew.IssueCreateEmptyDirectoriesWarning("Click OK to proceed", "This option will create the save structure\n directories of the current torrents");
     if (response)
     {
         try
         {
             List<String> save_structures = new List<string>();
             foreach (DataGridViewRow r in dgvh.dv.Rows)
             {
                 try
                 {
                     save_structures.Add((string)r.Cells["Save Structure"].Value);
                 }
                 catch { }
             }
             DirectoryHandler.CreateEmptyDirectories(save_structures);
         }
         catch
         { }
     }
 }