Esempio n. 1
0
        public override void Execute()
        {
            var vm  = new ScaleViewModel(models);
            var dia = new ScaleDialog(vm);

            if (models.Window.ShowDialog(dia) != true)
            {
                return;
            }

            models.Images.ScaleImages(new Size3(vm.Width, vm.Height));
        }
Esempio n. 2
0
		void Command_Numeric_Scale(ScaleDialog.Result result)
		{
			var ratio = (result.NewMax - result.NewMin) / (result.PrevMax - result.PrevMin);
			ReplaceSelections(Selections.AsParallel().AsOrdered().Select(range => ((double.Parse(GetString(range)) - result.PrevMin) * ratio + result.NewMin).ToString()).ToList());
		}