public void Perform() { var imageSettings = Services.GetImageSettings(); SettingsForm.For(imageSettings).ShowDialog(); Services.GetImageHolder().RecreateImage(imageSettings); }
public void Perform() { var dragonSettings = CreateRandomSettings(); // редактируем настройки: SettingsForm.For(dragonSettings).ShowDialog(); // создаём painter с такими настройками var painter = new DragonPainter(Services.GetImageHolder(), dragonSettings); painter.Paint(); }
public void Perform() { var dialog = new SaveFileDialog { CheckFileExists = false, InitialDirectory = Path.GetFullPath(Services.GetAppSettings().ImagesDirectory), DefaultExt = "bmp", FileName = "image.bmp", Filter = "Изображения (*.bmp)|*.bmp" }; var res = dialog.ShowDialog(); if (res == DialogResult.OK) { Services.GetImageHolder().SaveImage(dialog.FileName); } }
public void Perform() { var painter = new KochPainter(Services.GetImageHolder(), Services.GetPalette()); painter.Paint(); }