public void Perform() { var dialog = new SaveFileDialog { CheckFileExists = false, DefaultExt = "png", FileName = "picture.png", Filter = "Image Files(*.BMP;*.JPEG;*.JPG;*.PNG;)|*.BMP;*.JPEG;*.JPG;*.PNG|All files (*.*)|*.*" }; var res = dialog.ShowDialog(); if (res == DialogResult.OK) { imageHolder.SaveImage(dialog.FileName); } }
public void Perform() { var dialog = new SaveFileDialog { CheckFileExists = false, InitialDirectory = Path.GetFullPath(imageDirectoryProvider.ImagesDirectory), DefaultExt = "bmp", FileName = "image.bmp", Filter = "Изображения (*.bmp)|*.bmp" }; var res = dialog.ShowDialog(); if (res == DialogResult.OK) { imageHolder.SaveImage(dialog.FileName); } }
public Result <None> Execute(string[] args) => imageHolder.SaveImage(string.Join(" ", args));
public void Execute_CallMethod_SaveImage() { command.Execute(new[] { "asd" }); A.CallTo(() => imageHolder.SaveImage("asd")).MustHaveHappened(); }
public static bool SaveImage(object sourceMatrix, string locatioPath) { return(_imageHolder.SaveImage(sourceMatrix, locatioPath)); }