public async Task <bool> ShowPublishPromptAsync() { var xProjectProperties = await ProjectProperties.GetConfigurationGeneralPropertiesAsync().ConfigureAwait(false); var xOutputType = await xProjectProperties.OutputType.GetEvaluatedValueAtEndAsync().ConfigureAwait(false); if (String.Equals(xOutputType, OutputTypeValues.Bootable, StringComparison.OrdinalIgnoreCase)) { await ProjectThreadingService.SwitchToUIThread(); var xBinOutputPath = await xProjectProperties.BinOutputPath.GetEvaluatedValueAtEndAsync().ConfigureAwait(false); var xDefaultIsoPublishPath = ConfiguredProject.UnconfiguredProject.MakeRooted( Path.Combine(xBinOutputPath, Path.ChangeExtension(Path.GetFileName(ConfiguredProject.UnconfiguredProject.FullPath), "iso"))); var xDefaultPublishProperties = new DefaultPublishProperties(xDefaultIsoPublishPath); var xPublishWindow = new PublishWindow(xDefaultPublishProperties); mPublishSettings = xPublishWindow.ShowModal(); return(mPublishSettings != null); } else { return(true); } }
public PublishWindowViewModel(PublishWindow aPublishWindow, DefaultPublishProperties aDefaultProperties) { mPublishWindow = aPublishWindow; mIsoPublishPath = aDefaultProperties.IsoPublishPath; mBrowseIsoPublishPathCommand = new BrowseIsoPublishPathCommand(this, IsoPublishPath); mReturnPublishSettingsCommand = new ReturnPublishSettingsCommand(this); WqlEventQuery xDeviceInsertedQuery = new WqlEventQuery("SELECT * FROM __InstanceCreationEvent WITHIN 2 WHERE TargetInstance ISA 'Win32_USBHub'"); var xDeviceInsertedWatcher = new ManagementEventWatcher(xDeviceInsertedQuery); xDeviceInsertedWatcher.EventArrived += DrivesChanged; xDeviceInsertedWatcher.Start(); WqlEventQuery xDeviceRemovedQuery = new WqlEventQuery("SELECT * FROM __InstanceDeletionEvent WITHIN 2 WHERE TargetInstance ISA 'Win32_USBHub'"); var xDeviceRemovedWatcher = new ManagementEventWatcher(xDeviceRemovedQuery); xDeviceRemovedWatcher.EventArrived += DrivesChanged; xDeviceRemovedWatcher.Start(); }
public PublishWindow(DefaultPublishProperties aDefaultProperties, string aHelpTopic) : base(aHelpTopic) { InitializeComponent(); Initialize(aDefaultProperties); }
private void Initialize(DefaultPublishProperties aDefaultProperties) { mViewModel = new PublishWindowViewModel(this, aDefaultProperties); DataContext = mViewModel; }
public PublishWindow(DefaultPublishProperties aDefaultProperties) { InitializeComponent(); Initialize(aDefaultProperties); }