/// <summary>
/// Method called when the dialog is closing. This calls the dispose for the view model.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void Dispatcher_ShutdownStarted(object sender, EventArgs e)
{
if (vm != null)
{
vm.Dispose();
vm = null;
}
}