work
This commit is contained in:
parent
4f9ff38f3d
commit
aa45c0e090
@ -17,8 +17,8 @@
|
|||||||
<ColumnDefinition Width="0*"/>
|
<ColumnDefinition Width="0*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="Load" Content="Load" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="35" Width="65" Click="LoadFilesClick"/>
|
<Button x:Name="Load" Content="Load" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="35" Width="65" Click="LoadFilesClick"/>
|
||||||
<TextBox x:Name="Input_Folder" Margin="80,10,10,0" TextWrapping="Wrap" Text="INPUT FOLDER" VerticalAlignment="Top" Height="35"/>
|
<TextBox x:Name="Input_Folder" Margin="80,10,10,0" TextWrapping="Wrap" Text="INPUT FOLDER" VerticalAlignment="Top" Height="35" IsReadOnly="True"/>
|
||||||
<TextBox x:Name="Input_Files" TextWrapping="Wrap" Text="INPUT FILES" Margin="10,50,10,50"/>
|
<TextBox x:Name="Input_Files" TextWrapping="Wrap" Text="INPUT FILES" Margin="10,50,10,50" IsReadOnly="True"/>
|
||||||
<Button x:Name="Run" Content="Run" Click="RunOp" Margin="10,0,0,10" HorizontalAlignment="Left" Width="65" Height="35" VerticalAlignment="Bottom"/>
|
<Button x:Name="Run" Content="Run" Click="RunOp" Margin="10,0,0,10" HorizontalAlignment="Left" Width="65" Height="35" VerticalAlignment="Bottom"/>
|
||||||
<ProgressBar x:Name="Progress" Height="35" Margin="80,0,8,10" VerticalAlignment="Bottom"/>
|
<ProgressBar x:Name="Progress" Height="35" Margin="80,0,8,10" VerticalAlignment="Bottom"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -55,9 +55,27 @@ namespace Tranquility
|
|||||||
if (files == null)
|
if (files == null)
|
||||||
throw new Exception("Please select files before running");
|
throw new Exception("Please select files before running");
|
||||||
|
|
||||||
|
Progress.Value = 10;
|
||||||
|
|
||||||
ReadWriteTexture2D<Bgra32, float4>[] images = Cupola.Cupola.Load(files);
|
ReadWriteTexture2D<Bgra32, float4>[] images = Cupola.Cupola.Load(files);
|
||||||
|
|
||||||
|
Progress.Value = 30;
|
||||||
|
|
||||||
finalImage = Cupola.Cupola.RunSingle(images);
|
finalImage = Cupola.Cupola.RunSingle(images);
|
||||||
|
|
||||||
|
Progress.Value = 90;
|
||||||
|
|
||||||
|
CommonSaveFileDialog saveFileDialog = new CommonSaveFileDialog();
|
||||||
|
saveFileDialog.DefaultExtension = ".jpg";
|
||||||
|
saveFileDialog.EnsurePathExists = true;
|
||||||
|
CommonFileDialogResult result = saveFileDialog.ShowDialog();
|
||||||
|
|
||||||
|
if (result != CommonFileDialogResult.Ok)
|
||||||
|
throw new Exception("please set location valid OKAY");
|
||||||
|
|
||||||
|
finalImage.Save(saveFileDialog.FileName);
|
||||||
|
|
||||||
|
Progress.Value = 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user