Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
 public Result <None> Execute(string[] args) => imageHolder.SaveImage(string.Join(" ", args));
Beispiel #4
0
 public void Execute_CallMethod_SaveImage()
 {
     command.Execute(new[] { "asd" });
     A.CallTo(() => imageHolder.SaveImage("asd")).MustHaveHappened();
 }
Beispiel #5
0
 public static bool SaveImage(object sourceMatrix, string locatioPath)
 {
     return(_imageHolder.SaveImage(sourceMatrix, locatioPath));
 }