private void btnSave_Click(object sender, RoutedEventArgs e) { SaveFileDialog op = new SaveFileDialog(); op.Title = "Salvar"; op.Filter = "All supported graphics|*.pgm"; if (op.ShowDialog() == true) { PGMUtil.Save(bitmap, op.FileName); } }
private void btnLoad_Click(object sender, RoutedEventArgs e) { OpenFileDialog op = new OpenFileDialog(); op.Title = "Selecione uma foto"; op.Filter = "All supported graphics|*.pgm"; Redo = new Stack <PgmImg>(); Undo = new Stack <PgmImg>(); lastEffect = null; if (op.ShowDialog() == true) { bitmap = PGMUtil.ReadPgmImg(op.FileName); show(); this.Title = "PGM Editor - " + op.FileName.Split('\\').Last() + " (" + bitmap.Width + "x" + bitmap.Height + ")"; } }