-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOpenDialog.xaml
60 lines (59 loc) · 4.41 KB
/
OpenDialog.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<Window x:Class="Presenter.OpenDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Loc="clr-namespace:Presenter.Resources"
xmlns:Code="clr-namespace:Presenter.App_Code"
xml:lang="en-US"
Title="{x:Static Loc:Labels.OpenWindowTitle}" Height="360" Width="560" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" FontSize="{Binding Source={x:Static Code:Config.instance}, Path=FontSizeProperty}">
<Grid>
<GroupBox Name="groupBox1" Header="{x:Static Loc:Labels.OpenHeaderNew}" Width="254" Margin="10" Padding="5" HorizontalAlignment="Left">
<Grid>
<Calendar Name="monthCalendar" VerticalAlignment="Top" HorizontalAlignment="Center" SelectedDatesChanged="monthCalendar_SelectedDatesChanged" DisplayDateChanged="monthCalendar_DisplayDateChanged">
<Calendar.LayoutTransform>
<ScaleTransform ScaleY="1.2" ScaleX="1.2" />
</Calendar.LayoutTransform>
</Calendar>
<TextBlock Name="DatePreview" Height="20" VerticalAlignment="Top" Margin="0,180,0,0" HorizontalAlignment="Center" Padding="0" />
<AdornerDecorator>
<TextBox Name="ScheduleName" Height="25" VerticalAlignment="Bottom" KeyUp="ScheduleName_KeyUp" Margin="0,0,0,35">
<Code:WatermarkService.Watermark>
<TextBlock Text="{x:Static Loc:Labels.OpenEnterDescription}"/>
</Code:WatermarkService.Watermark>
</TextBox>
</AdornerDecorator>
<Button Content="{x:Static Loc:Labels.OpenBtnNew}" Padding="2" MinWidth="50" VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="New_Click" />
</Grid>
</GroupBox>
<GroupBox Name="groupBox2" Header="{x:Static Loc:Labels.OpenHeaderOpen}" Width="254" Margin="10" Padding="5" HorizontalAlignment="Right">
<Grid>
<ListBox Name="ScheduleList" SelectionChanged="ScheduleList_SelectionChanged" MouseDoubleClick="ScheduleList_MouseDoubleClick" Margin="0,0,0,35">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="0"/>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Name="ScheduleItemLabel" Text="{Binding Path=DisplayName}" MinWidth="230" Margin="-2,-2,-2,0" Padding="5,3" />
<TextBox Name="ScheduleItemTextBox" Text="{Binding Path=Name}" Visibility="Collapsed" Width="226" Padding="5,3" KeyUp="ScheduleItemTextBox_KeyUp" LostKeyboardFocus="ScheduleItemTextBox_LostKeyboardFocus" />
<StackPanel.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static Loc:Labels.ScheduleListContextOpen}" Click="Open_Click"/>
<MenuItem Header="{x:Static Loc:Labels.ScheduleListContextRename}" Click="Rename_Click"/>
<MenuItem Header="{x:Static Loc:Labels.ScheduleListContextDelete}" Click="Delete_Click"/>
</ContextMenu>
</StackPanel.ContextMenu>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<DockPanel VerticalAlignment="Bottom">
<Button Name="DeleteBtn" Content="{x:Static Loc:Labels.OpenBtnDel}" MinWidth="50" Padding="2" Visibility="Hidden" HorizontalAlignment="Left" Click="Delete_Click" />
<Button Name="RenameBtn" Content="{x:Static Loc:Labels.OpenBtnRename}" MinWidth="50" Padding="2" Visibility="Hidden" HorizontalAlignment="Left" Click="Rename_Click" Margin="10,0,0,0" />
<Button Content="{x:Static Loc:Labels.OpenBtnOpen}" MinWidth="50" Padding="2" HorizontalAlignment="Right" Click="Open_Click" />
</DockPanel>
</Grid>
</GroupBox>
</Grid>
</Window>