Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CP-43651, one inconsistency, layout tweaks, and minor refactoring on MultipleDvdIsoList. #3248

Merged
merged 6 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions XenAdmin/Controls/MultipleDvdIsoList.cs
danilo-delbusso marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,26 @@ private void comboBoxDrive_SelectedIndexChanged(object sender, EventArgs e)
cdChanger1.Drive = (comboBoxDrive.SelectedItem as VbdCombiItem)?.Vbd;
}


private void newCDLabel_Click(object sender, EventArgs e)
{
if (VM != null)
{
var createDriveAction = new CreateCdDriveAction(VM);
createDriveAction.ShowUserInstruction += CreateDriveAction_ShowUserInstruction;
if (VM == null)
return;

using (var dlg = new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee))
dlg.ShowDialog(this);
if (VM.IsHVM())
{
using (var dialog = new WarningDialog(
string.Format(Messages.NEW_DVD_DRIVE_CREATE_CONFIRMATION, VM.Name()),
new ThreeButtonDialog.TBDButton(Messages.NEW_DVD_DRIVE_CREATE_YES_BUTTON, DialogResult.Yes, ThreeButtonDialog.ButtonType.ACCEPT, true),
ThreeButtonDialog.ButtonNo))
if (dialog.ShowDialog(Program.MainWindow) != DialogResult.Yes)
danilo-delbusso marked this conversation as resolved.
Show resolved Hide resolved
return;
}

var createDriveAction = new CreateCdDriveAction(VM);
createDriveAction.ShowUserInstruction += CreateDriveAction_ShowUserInstruction;

using (var dlg = new ActionProgressDialog(createDriveAction, ProgressBarStyle.Marquee))
dlg.ShowDialog(this);
}

private void CreateDriveAction_ShowUserInstruction(string message)
Expand Down
20 changes: 20 additions & 0 deletions XenModel/Messages.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions XenModel/Messages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -9101,9 +9101,17 @@ You should only proceed if you have verified that these settings are correct.</v
<data name="NEVER" xml:space="preserve">
<value>Never</value>
</data>
<data name="NEW_DVD_DRIVE_CREATE_CONFIRMATION" xml:space="preserve">
<value>Are you sure you want to create a new DVD drive on VM '{0}'?

This action will create a new Virtual Block Device (VBD) that cannot be hot-unplugged.</value>
</data>
<data name="NEW_DVD_DRIVE_CREATE_TITLE" xml:space="preserve">
<value>Creating new DVD drive on VM {0}</value>
</data>
<data name="NEW_DVD_DRIVE_CREATE_YES_BUTTON" xml:space="preserve">
<value>&amp;Yes, Create</value>
</data>
<data name="NEW_DVD_DRIVE_CREATING" xml:space="preserve">
<value>Creating new DVD drive</value>
</data>
Expand Down