private void OnExecutedVerifyCommand(Object sender, ExecutedRoutedEventArgs args) { if (!this.FileItems.Any()) { this.LoadFiles(); return; } if (!this.FileItems.Any(x => x.CanVerify)) { DialogBox.Show(this, "At least one file with at least one checksum to verify is required.", DialogSymbol.Exclamation); return; } VerifyDialog dialog = new VerifyDialog(this); dialog.ShowDialog(); }
private void verify_Click( object sender , RoutedEventArgs e ) { Grid currGrid = windowManager.SelectedContent as Grid; SlopeCanvas currCanvas = null; if ( currGrid != null ) { currCanvas = currGrid.Children[2] as SlopeCanvas; } if ( currCanvas == null ) return; VerifyDialog dlg = new VerifyDialog( this ); dlg.ShowDialog(); if ( dlg.ErrorCount == 0 ) { currCanvas.IsVerified = true; currCanvas.IsSaved = false; ClosableCanvasTabItem currTab = windowManager.SelectedItem as ClosableCanvasTabItem; currCanvas.SaveInputFile( (string) currTab.Tag ); } }