-
Notifications
You must be signed in to change notification settings - Fork 19
/
MultipleMailboxes.xaml
127 lines (123 loc) · 8.86 KB
/
MultipleMailboxes.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<wpfwiz:WizardRegularPageBase x:Class="SMLetsExchangeConnectorSettingsUI.MultipleMailboxes"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpfwiz="clr-namespace:Microsoft.EnterpriseManagement.UI.WpfWizardFramework;assembly=Microsoft.EnterpriseManagement.UI.WpfWizardFramework"
xmlns:smcontrols="clr-namespace:Microsoft.EnterpriseManagement.UI.WpfControls;assembly=Microsoft.EnterpriseManagement.UI.SmControls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Custom="http://schemas.microsoft.com/SystemCenter/Common/UI/Wpf" mc:Ignorable="d" MinWidth="900" MinHeight="550"
xmlns:local="clr-namespace:SMLetsExchangeConnectorSettingsUI.Validation" >
<Grid Name="ConfigurationGrid" Margin="5px" Width="Auto" Height="Auto">
<Grid Margin="5px">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- header -->
<Label Content="Multiple Mailbox Configuration" Margin="0,10,10,0" VerticalAlignment="Top" Height="48" FontWeight="Bold" FontSize="26" Grid.Row="0"/>
<TextBlock Margin="10,58,10,0" VerticalAlignment="Top" Height="32" FontWeight="Light" FontSize="14" TextWrapping="Wrap">
<Run Text="Process multiple mailboxes as though they were one with distinct templates."/>
<InlineUIContainer>
<TextBlock>
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://github.com/AdhocAdam/smletsexchangeconnector/wiki/Configuring-for-Multiple-Inboxes-(Email-Redirection,-not-Forwarding)">Help me configure this.</Hyperlink>
</TextBlock>
</InlineUIContainer>
</TextBlock>
<!-- configuration -->
<StackPanel Name="stackPanel" Orientation="Vertical" VerticalAlignment="Top" Grid.Row="1">
<CheckBox Name="chkMultipleMailboxConfig" FlowDirection="LeftToRight" IsChecked="{Binding Path=UseMailboxRedirection, Mode=TwoWay}" >
<TextBlock FlowDirection="LeftToRight" Text="Process Multiple Inboxes" />
</CheckBox>
<Button Content="Add Mailbox" Width="120" Height="25" Margin="0,0,175,0" IsEnabled="{Binding IsChecked, ElementName=chkMultipleMailboxConfig}" Click="AddMailbox_Click" HorizontalAlignment="Right" />
<Button Content="Remove Mailbox" Width="120" Height="25" HorizontalAlignment="Right" Margin="0,-25,25,0" IsEnabled="{Binding IsChecked, ElementName=chkMultipleMailboxConfig}" Click="RemoveMailbox_Click" />
</StackPanel>
<!-- Mailbox configuration rows & columns -->
<ListView x:Name="MailboxListViewControl" IsEnabled="{Binding ElementName=chkMultipleMailboxConfig, Path=IsChecked}" Grid.Row="2" Width="Auto" >
<ListView.View>
<GridView>
<GridViewColumn Header="Email Address">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBox Text="{Binding MailboxAddress}" Custom:Validation.RegexPattern="^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(\+[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z]))*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Work Item Type">
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox SelectedItem="{Binding MailboxWorkItemType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
<sys:String>IR</sys:String>
<sys:String>SR</sys:String>
<sys:String>CR</sys:String>
<sys:String>PR</sys:String>
</ComboBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="IR Template">
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox x:Name="cbMMIRTemplateName" ItemsSource="{Binding Path=MailboxIRTemplates}" DisplayMemberPath="DisplayName" >
<ComboBox.SelectedItem>
<Binding Path="MailboxIRTemplate">
<Binding.ValidationRules>
<local:SelectionValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.SelectedItem>
</ComboBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="SR Template">
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox x:Name="cbMMSRTemplateName" ItemsSource="{Binding Path=MailboxSRTemplates}" DisplayMemberPath="DisplayName" >
<ComboBox.SelectedItem>
<Binding Path="MailboxSRTemplate">
<Binding.ValidationRules>
<local:SelectionValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.SelectedItem>
</ComboBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="CR Template">
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox x:Name="cbMMCRTemplateName" ItemsSource="{Binding Path=MailboxCRTemplates}" DisplayMemberPath="DisplayName" >
<ComboBox.SelectedItem>
<Binding Path="MailboxCRTemplate">
<Binding.ValidationRules>
<local:SelectionValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.SelectedItem>
</ComboBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="PR Template">
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox x:Name="cbMMPRTemplateName" ItemsSource="{Binding Path=MailboxPRTemplates}" DisplayMemberPath="DisplayName" >
<ComboBox.SelectedItem>
<Binding Path="MailboxPRTemplate">
<Binding.ValidationRules>
<local:SelectionValidationRule ValidatesOnTargetUpdated="True"/>
</Binding.ValidationRules>
</Binding>
</ComboBox.SelectedItem>
</ComboBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</Grid>
</Grid>
</wpfwiz:WizardRegularPageBase>