Example #1
0
        public IBackup CreateBackup()
        {
            CreateBackup cb = new CreateBackup("Create new JarBackup", "Name:", "Description:", "File:", "", "", Data.minecraftbin, false);

            if (cb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (File.Exists(cb.path))
                {
                    if (cb.name != "")
                    {
                        Backup_Jar backup = new Backup_Jar(cb.name, cb.description, cb.path);
                        return(backup);
                    }
                    else
                    {
                        ErrorReporter.Error("You have to enter a name for the backup!");
                        return(null);
                    }
                }
                else
                {
                    ErrorReporter.Error("Invalid file!");
                    return(null);
                }
            }
            return(null);
        }
Example #2
0
 private void TsmiBackupCreate_Click(object sender, EventArgs e)
 {
     using (var dialog = new CreateBackup())
     {
         dialog.ShowDialog();
     }
 }