Save imported image in the same format (WIP)
[master-thesis.git] / Parasitemia / ParasitemiaUIControls / MainWindow.xaml
1 <Window
2     x:Class="ParasitemiaUIControls.MainWindow"
3     xmlns:local="clr-namespace:ParasitemiaUIControls"
4     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
5     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8     mc:Ignorable="d"
9     Height="700" Width="1000" MinHeight="300" MinWidth="400" Icon="/ParasitemiaUIControls;component/Resources/icon.ico" ResizeMode="CanResizeWithGrip"
10 >
11     <DockPanel x:Name="dockPanelMain" LastChildFill="True">
12         <Menu DockPanel.Dock="Top">
13             <MenuItem Header="_File">
14                 <MenuItem x:Name="menuNew" x:FieldModifier="public" Header="_New" InputGestureText="Ctrl+N" />
15                 <MenuItem x:Name="menuOpen" x:FieldModifier="public" Header="_Open" InputGestureText="Ctrl+O" />
16                 <MenuItem x:Name="menuSave" x:FieldModifier="public" Header="_Save" InputGestureText="Ctrl+S" />
17                 <MenuItem x:Name="menuSaveAs" x:FieldModifier="public" Header="Save _As..." InputGestureText="Ctrl+Shift+S" />
18                 <Separator />
19                 <MenuItem x:Name="menuAddSourceImage" x:FieldModifier="public" Header="_Import Images..." InputGestureText="Ctrl+A" />
20                 <Separator />
21                 <MenuItem x:Name="menuExportResults" x:FieldModifier="public" Header="E_xport Results As Text..." InputGestureText="Ctrl+E" />
22                 <Separator />
23                 <MenuItem x:Name="menuExit" x:FieldModifier="public" Header="_Exit" />
24             </MenuItem>
25             <MenuItem x:Name="menuAnalysis" x:FieldModifier="public" Header="_Analysis">
26                 <MenuItem x:Name="menuStartAnalysis" x:FieldModifier="public" Header="_Show Analysis Window" InputGestureText="Ctrl+Y" />
27             </MenuItem>
28             <MenuItem x:Name="menuView" x:FieldModifier="public" Header="_View">
29                 <MenuItem x:Name="menuHightlightRBC" x:FieldModifier="public" Header="_Highlight All Erythrocytes" IsCheckable="True" InputGestureText="Ctrl+H" />
30             </MenuItem>
31             <MenuItem x:Name="menuHelp" x:FieldModifier="public" Header="_Help">
32                 <MenuItem x:Name="menuCommandLineArguments" x:FieldModifier="public" Header="_Command Line Arguments" />
33                 <MenuItem x:Name="menuAbout" x:FieldModifier="public" Header="_About" />
34             </MenuItem>
35         </Menu>
36         <StatusBar DockPanel.Dock="Bottom" >
37             <StatusBarItem>
38                 <TextBlock x:Name="txtDocumentStatus" x:FieldModifier="public" />
39             </StatusBarItem>
40             <StatusBarItem>
41                 <TextBlock x:Name="txtMessageStatus" x:FieldModifier="public" />
42             </StatusBarItem>
43         </StatusBar>
44         <Grid x:Name="gridMain">
45             <Grid.RowDefinitions>
46                 <RowDefinition Height="Auto"/>
47                 <RowDefinition/>
48             </Grid.RowDefinitions>
49             <Grid.ColumnDefinitions>
50                 <ColumnDefinition Width="180" />
51                 <ColumnDefinition/>
52             </Grid.ColumnDefinitions>
53             <Grid x:Name="gridGlobalInfo" Grid.ColumnSpan="2" Margin="3,3,3,3" >
54                 <Grid.ColumnDefinitions>
55                     <ColumnDefinition Width="101"/>
56                     <ColumnDefinition Width="21"/>
57                     <ColumnDefinition/>
58                 </Grid.ColumnDefinitions>
59                 <Grid.RowDefinitions>
60                     <RowDefinition Height="Auto"/>
61                     <RowDefinition Height="Auto"/>
62                 </Grid.RowDefinitions>
63                 <Label x:Name="lblPatient" x:FieldModifier="public" Margin="10,0,3,0 " Content="Patient ID" Grid.ColumnSpan="2"/>
64                 <Label x:Name="lblGlobalParasitemia" x:FieldModifier="public" Margin="10,0,3,0" Content="Global parasitemia" Grid.Row="1" Grid.ColumnSpan="2" />
65                 <TextBox x:Name="txtPatient" x:FieldModifier="public" Grid.Column="2" Margin="3,4,10,4" TextWrapping="Wrap" VerticalAlignment="Center" />
66                 <Border BorderThickness="1" VerticalAlignment="Center" Margin="3,4,10,4" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" Grid.Column="2" Grid.Row="1" >
67                     <TextBlock x:Name="txtGlobalParasitemia" x:FieldModifier="public" Margin="1" TextWrapping="Wrap"  />
68                 </Border>
69             </Grid>
70             <Border BorderBrush="Black" BorderThickness="0"  Margin="3" Grid.Row="1" >
71                 <ScrollViewer x:Name="scrollPreviews" x:FieldModifier="public" VerticalScrollBarVisibility="Auto" >
72                     <StackPanel x:Name="stackPreviews" x:FieldModifier="public" />
73                 </ScrollViewer>
74             </Border>
75             <Grid Grid.Column="2" Grid.Row="2">
76                 <Grid.RowDefinitions>
77                     <RowDefinition Height="100"/>
78                     <RowDefinition/>
79                     <RowDefinition Height="Auto"/>
80                 </Grid.RowDefinitions>
81                 <ScrollViewer x:Name="scrollViewCurrentImage" x:FieldModifier="public" Grid.Row="1" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" MinHeight="100" MinWidth="100" Background="#FF3E3E3E">
82                     <Border x:Name="borderCurrentImage" x:FieldModifier="public" BorderBrush="Transparent">
83                         <Canvas x:Name="canvasCurrentImage" x:FieldModifier="public" Height="100" Width="100" />
84                     </Border>
85                 </ScrollViewer>
86                 <Border Grid.Row="1" x:Name="imgLogos" x:FieldModifier="public">
87                     <Grid>
88                         <Grid.RowDefinitions>
89                             <RowDefinition Height="1*"/>
90                             <RowDefinition Height="Auto"/>
91                             <RowDefinition Height="Auto"/>
92                             <RowDefinition Height="1*"/>
93                         </Grid.RowDefinitions>
94                         <Image Grid.Row="1" Source="/ParasitemiaUIControls;component/Resources/chuv_logo.png" Stretch="None" Panel.ZIndex="1" Margin="0,0,0,10" />
95                         <Image Grid.Row="2" Source="/ParasitemiaUIControls;component/Resources/hes-so_logo.png" Stretch="None" Panel.ZIndex="1" Margin="0,10,0,0" />
96                     </Grid>
97                 </Border>
98                 <ScrollViewer x:Name="scrollRBC" x:FieldModifier="public" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Visible" Grid.RowSpan="1"  Margin="3">
99                     <StackPanel x:Name="stackRBC" x:FieldModifier="public" Orientation="Horizontal" />
100                 </ScrollViewer>
101                 <Grid x:Name="gridImageInformation" x:FieldModifier="public" Grid.Row="2">
102                     <Grid.ColumnDefinitions>
103                         <ColumnDefinition Width="1*"/>
104                         <ColumnDefinition Width="1*"/>
105                     </Grid.ColumnDefinitions>
106                     <Grid.RowDefinitions>
107                         <RowDefinition Height="Auto" />
108                         <RowDefinition Height="1*" />
109                     </Grid.RowDefinitions>
110                     <Grid Grid.ColumnSpan="2" Grid.Row="0" Margin="0,3,3,0">
111                         <Grid.ColumnDefinitions>
112                             <ColumnDefinition Width="Auto"/>
113                             <ColumnDefinition Width="1*"/>
114                         </Grid.ColumnDefinitions>
115                         <Label Content="Image name" Grid.Column="0"></Label>
116                         <TextBox x:Name="txtImageName" x:FieldModifier="public" Grid.Column="1" VerticalAlignment="Center"></TextBox>
117                     </Grid>
118                     <TextBlock x:Name="txtImageInformation1" x:FieldModifier="public" TextWrapping="Wrap" Margin="3" Grid.Column="0" Grid.Row="1" />
119                     <TextBlock x:Name="txtImageInformation2" x:FieldModifier="public" TextWrapping="Wrap" Margin="3" Grid.Column="1" Grid.Row="1" />
120                 </Grid>
121             </Grid>
122         </Grid>
123     </DockPanel>
124 </Window>