~wirc-dev/wchat/devel

« back to all changes in this revision

Viewing changes to Ircsil/Views/MainWindow.xaml

  • Committer: Alex Regueiro
  • Date: 2010-05-07 01:51:27 UTC
  • Revision ID: alexreg@gmail.com-20100507015127-6vtkdiz4oymuyqjr
dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<local:CustomWindow x:Class="Ircsil.MainWindow"
2
 
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
 
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
 
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
 
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
 
                    xmlns:sys="clr-namespace:System;assembly=mscorlib"
7
 
                    xmlns:local="clr-namespace:Ircsil"
8
 
                    mc:Ignorable="d" 
9
 
                    d:DesignWidth="640" d:DesignHeight="480"
10
 
                    MinWidth="240" MinHeight="55"
11
 
                    Title="Ircsil" Icon="{StaticResource MainIconImage}"
12
 
                    Loaded="Window_Loaded" Unloaded="Window_Unloaded"
13
 
                    MouseDoubleClick="Window_MouseDoubleClick">
 
1
<Window x:Class="Ircsil.MainWindow"
 
2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
4
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 
5
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 
6
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
 
7
        xmlns:local="clr-namespace:Ircsil"
 
8
        mc:Ignorable="d" 
 
9
        d:DesignWidth="640" d:DesignHeight="480"
 
10
        Title="Ircsil" Icon="{StaticResource MainIconImage}" Style="{StaticResource WindowStyle}"
 
11
        Loaded="Window_Loaded" Unloaded="Window_Unloaded">
14
12
 
15
 
    <local:CustomWindow.Resources>
 
13
    <Window.Resources>
16
14
        <ResourceDictionary>
17
15
 
18
16
            <ResourceDictionary.MergedDictionaries>
19
17
                <ResourceDictionary Source="/Skins/Default/MainSkin.xaml"/>
20
18
            </ResourceDictionary.MergedDictionaries>
21
19
 
 
20
            <ContextMenu x:Key="headerContextMenu">
 
21
                <MenuItem Name="aboutMenuItem" Header="_About..." Click="aboutMenuItem_Click">
 
22
                    <MenuItem.Icon>
 
23
                        <Image Source="{StaticResource InformationImage}"/>
 
24
                    </MenuItem.Icon>
 
25
                </MenuItem>
 
26
                <Separator/>
 
27
                <MenuItem Name="closeMenuItem" Header="_Close" Click="closeMenuItem_Click">
 
28
                    <MenuItem.Icon>
 
29
                        <Image Source="{StaticResource ApplicationImage}"/>
 
30
                    </MenuItem.Icon>
 
31
                </MenuItem>
 
32
            </ContextMenu>
 
33
 
22
34
        </ResourceDictionary>
23
 
    </local:CustomWindow.Resources>
24
 
 
25
 
    <Grid Background="White">
26
 
 
27
 
        <Grid.RowDefinitions>
28
 
            <RowDefinition Height="Auto"/>
29
 
            <RowDefinition Height="*"/>
30
 
            <RowDefinition Height="Auto"/>
31
 
        </Grid.RowDefinitions>
32
 
 
33
 
        <Grid.ColumnDefinitions>
34
 
            <ColumnDefinition Width="Auto" MinWidth="80" MaxWidth="10000"/>
35
 
            <ColumnDefinition Width="*" MinWidth="80"/>
36
 
        </Grid.ColumnDefinitions>
37
 
 
38
 
        <Border Name="headerBorder" Padding="12,8,12,8" Background="#FF00A9DA" BorderThickness="0" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
39
 
                MouseLeftButtonDown="headerBorder_MouseLeftButtonDown">
40
 
            <Border.ContextMenu>
41
 
                <ContextMenu>
42
 
                    <MenuItem Name="aboutMenuItem" Header="_About..." Click="aboutMenuItem_Click">
43
 
                        <MenuItem.Icon>
44
 
                            <Image Source="{StaticResource InformationImage}"/>
45
 
                        </MenuItem.Icon>
46
 
                    </MenuItem>
47
 
                    <Separator/>
48
 
                    <MenuItem Name="closeMenuItem" Header="_Close" Click="closeMenuItem_Click">
49
 
                        <MenuItem.Icon>
50
 
                            <Image Source="{StaticResource ApplicationImage}"/>
51
 
                        </MenuItem.Icon>
52
 
                    </MenuItem>
53
 
                </ContextMenu>
54
 
            </Border.ContextMenu>
 
35
    </Window.Resources>
 
36
 
 
37
    <DockPanel>
 
38
 
 
39
        <Border Style="{StaticResource HeaderStyle}" Margin="0,-4,0,0" DockPanel.Dock="Top">
 
40
 
55
41
            <StackPanel Orientation="Vertical">
56
42
 
57
 
                <Grid>
58
 
 
59
 
                    <TextBlock Padding="0" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="#D9D9D9" Text="IRCSIL" FontSize="12" FontWeight="Bold"/>
60
 
 
61
 
                    <Button Name="settingsButton" Margin="0,0,60,0" HorizontalAlignment="Right" VerticalAlignment="Center">
62
 
                        <Button.Template>
63
 
                            <ControlTemplate TargetType="Button">
64
 
                                <TextBlock Name="textBlock" Margin="4,0,16,0" HorizontalAlignment="Right" VerticalAlignment="Top" Foreground="#D9D9D9" FontSize="10" Text="SETTINGS"/>
65
 
                                <ControlTemplate.Triggers>
66
 
                                    <Trigger Property="IsMouseOver" Value="True">
67
 
                                        <Setter TargetName="textBlock" Property="Foreground" Value="#BFBFBF"/>
68
 
                                    </Trigger>
69
 
                                </ControlTemplate.Triggers>
70
 
                            </ControlTemplate>
71
 
                        </Button.Template>
72
 
                    </Button>
73
 
 
74
 
                    <StackPanel Name="windowButtonsPanel" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
75
 
 
76
 
                        <StackPanel.Resources>
77
 
 
78
 
                            <SolidColorBrush x:Key="FigureNormalBrush">White</SolidColorBrush>
79
 
                            <SolidColorBrush x:Key="FigureHoverBrush">LightGray</SolidColorBrush>
80
 
 
81
 
                            <Style TargetType="Button">
82
 
                                <Setter Property="Width" Value="10"/>
83
 
                                <Setter Property="Height" Value="10"/>
84
 
                                <Setter Property="Margin" Value="4,0,4,0"/>
85
 
                                <Setter Property="Foreground" Value="{StaticResource FigureNormalBrush}"/>
86
 
                                <Style.Triggers>
87
 
                                    <Trigger Property="IsMouseOver" Value="True">
88
 
                                        <Setter Property="Foreground" Value="{StaticResource FigureHoverBrush}"/>
89
 
                                    </Trigger>
90
 
                                </Style.Triggers>
91
 
                            </Style>
92
 
 
93
 
                            <Style x:Key="ButtonPathStyle" TargetType="Path">
94
 
                                <Setter Property="VerticalAlignment" Value="Bottom"/>
95
 
                                <Setter Property="Stretch" Value="Uniform"/>
96
 
                                <Setter Property="Fill" Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Button}}"/>
97
 
                                <Setter Property="Stroke" Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Button}}"/>
98
 
                            </Style>
99
 
 
100
 
                        </StackPanel.Resources>
101
 
 
102
 
                        <Button Name="minimizeButton" Click="minimizeButton_Click">
103
 
                            <Button.Template>
104
 
                                <ControlTemplate TargetType="Button">
105
 
                                    <Border Background="Transparent">
106
 
                                        <Path Name="figure" Style="{StaticResource ButtonPathStyle}">
107
 
                                            <Path.Data>
108
 
                                                <PathGeometry Figures="M 0.0,0.8 h 1 v 0.2 h -1 v -0.2"/>
109
 
                                            </Path.Data>
110
 
                                        </Path>
111
 
                                    </Border>
112
 
                                </ControlTemplate>
113
 
                            </Button.Template>
114
 
                        </Button>
115
 
 
116
 
                        <Button Name="maximizeButton" Click="maximizeButton_Click" Visibility="{Binding WindowState, RelativeSource={RelativeSource AncestorType=Window},
117
 
                            Converter={StaticResource EqualityToVisibilityConverter}, ConverterParameter={x:Static WindowState.Normal}}">
118
 
                            <Button.Template>
119
 
                                <ControlTemplate TargetType="Button">
120
 
                                    <Border Background="Transparent">
121
 
                                        <Path Name="figure" Style="{StaticResource ButtonPathStyle}">
122
 
                                            <Path.Data>
123
 
                                                <PathGeometry Figures="M 0.0,0.0 h 1 v 1 h -1 v -1 M 0.0,0.2 h 1 v 0.8 h -1 v -0.8"/>
124
 
                                            </Path.Data>
125
 
                                        </Path>
126
 
                                    </Border>
127
 
                                </ControlTemplate>
128
 
                            </Button.Template>
129
 
                        </Button>
130
 
 
131
 
                        <Button Name="restoreButton" Click="restoreButton_Click" Visibility="{Binding WindowState, RelativeSource={RelativeSource AncestorType=Window},
132
 
                            Converter={StaticResource EqualityToVisibilityConverter}, ConverterParameter={x:Static WindowState.Maximized}}">
133
 
                            <Button.Template>
134
 
                                <ControlTemplate TargetType="Button">
135
 
                                    <Border Background="Transparent">
136
 
                                        <Path Name="figure" Style="{StaticResource ButtonPathStyle}">
137
 
                                            <Path.Data>
138
 
                                                <GeometryGroup>
139
 
                                                    <PathGeometry Figures="M 0.0,0.0 h 1 v 1 h -0.4 v -0.6 h -0.6 v -0.4 M 0.0,0.2 h 1 v 0.8 h -0.4 v -0.6 h -0.6 v -0.2">
140
 
                                                        <PathGeometry.Transform>
141
 
                                                            <TranslateTransform X="0.4" Y="-0.4"/>
142
 
                                                        </PathGeometry.Transform>
143
 
                                                    </PathGeometry>
144
 
                                                    <PathGeometry Figures="M 0.0,0.0 h 1 v 1 h -1 v -1 M 0.0,0.2 h 1 v 0.8 h -1 v -0.8"/>
145
 
                                                </GeometryGroup>
146
 
                                            </Path.Data>
147
 
                                        </Path>
148
 
                                    </Border>
149
 
                                </ControlTemplate>
150
 
                            </Button.Template>
151
 
                        </Button>
152
 
 
153
 
                        <Button Name="closeButton" Click="closeButton_Click">
154
 
                            <Button.Template>
155
 
                                <ControlTemplate TargetType="Button">
156
 
                                    <Border Background="Transparent">
157
 
                                        <Path Name="figure" Style="{StaticResource ButtonPathStyle}">
158
 
                                            <Path.Data>
159
 
                                                <PathGeometry Figures="M 0.2,0.0 h 0.1 v 0.2 h 0.2 v 0.1 h -0.2 v 0.2 h -0.1 v -0.2 h -0.2 v -0.1 h 0.2 v -0.2">
160
 
                                                    <PathGeometry.Transform>
161
 
                                                        <RotateTransform Angle="45"/>
162
 
                                                    </PathGeometry.Transform>
163
 
                                                </PathGeometry>
164
 
                                            </Path.Data>
165
 
                                        </Path>
166
 
                                    </Border>
167
 
                                </ControlTemplate>
168
 
                            </Button.Template>
169
 
                        </Button>
170
 
 
171
 
                    </StackPanel>
172
 
 
173
 
                </Grid>
174
 
 
175
 
                <TextBlock Margin="0,4,0,0" Foreground="White" FontSize="26" Text="##csharp"/>
 
43
                <TextBlock Margin="0,0,0,0" Foreground="White" FontSize="26" Text="##csharp"/>
176
44
 
177
45
                <TextBlock Margin="22,0,0,0" Foreground="White" FontSize="14" Opacity="0.8" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis"
178
 
                           Text="C# Developer discussions | No Spoonfeeding | Please read http://wiki.freenode-csharp.net/wiki/"/>
 
46
                       Text="C# Developer discussions | No Spoonfeeding | Please read http://wiki.freenode-csharp.net/wiki/"/>
179
47
 
180
48
            </StackPanel>
 
49
 
181
50
        </Border>
182
51
 
183
 
        <ScrollViewer Margin="12,12,6,12" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto" BorderThickness="0"
184
 
                      Grid.Row="1" Grid.Column="0" Grid.RowSpan="2">
185
 
 
186
 
            <StackPanel Orientation="Vertical">
187
 
 
188
 
                <Expander Header="GimpNet" IsExpanded="True" Style="{StaticResource NetworkExpanderStyle}">
189
 
                    <ItemsControl Style="{StaticResource ChannelListItemsControlStyle}">
190
 
                        <TextBlock Text="#mono"/>
191
 
                        <TextBlock Text="#monodev"/>
192
 
                    </ItemsControl>
193
 
                </Expander>
194
 
 
195
 
                <Expander Header="Freenode" IsExpanded="True" Style="{StaticResource NetworkExpanderStyle}">
196
 
                    <ItemsControl Style="{StaticResource ChannelListItemsControlStyle}">
197
 
                        <TextBlock Text="#freenode"/>
198
 
                        <TextBlock Text="##csharp"/>
199
 
                        <TextBlock Text="##wpf"/>
200
 
                        <TextBlock Text="#ircsil"/>
201
 
                    </ItemsControl>
202
 
                </Expander>
203
 
 
204
 
            </StackPanel>
205
 
 
206
 
        </ScrollViewer>
207
 
 
208
 
        <RichTextBox MinHeight="80" Margin="6,12,12,12" IsReadOnly="True" AcceptsReturn="False" IsDocumentEnabled="True" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible"
209
 
                     Grid.Row="1" Grid.Column="1">
210
 
 
211
 
            <RichTextBox.Resources>
212
 
                <Style TargetType="{x:Type Paragraph}">
213
 
                    <Setter Property="Margin" Value="0" />
214
 
                </Style>
215
 
            </RichTextBox.Resources>
216
 
 
217
 
            <FlowDocument>
218
 
                <Paragraph>
219
 
                    <Bold>
220
 
                        <Run Text="Windcape:"/>
221
 
                    </Bold>
222
 
                    <Run Text=" "/>
223
 
                    <Span Foreground="#009933">
224
 
                        <Run Text="Moose"/>
225
 
                    </Span>
226
 
                    <Run Text=" we actually ran into some problem with Mono not support it properly :("/>
227
 
                </Paragraph>
228
 
                <Paragraph>
229
 
                    <Bold>
230
 
                        <Run Text="humanMeat:"/>
231
 
                    </Bold>
232
 
                    <Run Text=" you win 7 million dollars from clay mathematics instute"/>
233
 
                </Paragraph>
234
 
                <Paragraph>
235
 
                    <Bold>
236
 
                        <Run Text="humanMeat:"/>
237
 
                    </Bold>
238
 
                    <Run Text=" if youc an show"/>
239
 
                </Paragraph>
240
 
                <Paragraph>
241
 
                    <Bold>
242
 
                        <Run Text="humanMeat:"/>
243
 
                    </Bold>
244
 
                    <Run Text=" that RSA is crap"/>
245
 
                </Paragraph>
246
 
                <Paragraph>
247
 
                    <Bold>
248
 
                        <Run Text="Windcape:"/>
249
 
                    </Bold>
250
 
                    <Run Text=" but I didn't tell the teachers, as I wouldn't want to hear about &quot;why didn't you use Java instead&quot;"/>
251
 
                </Paragraph>
252
 
                <Paragraph>
253
 
                    <Bold>
254
 
                        <Run Text="Moose:"/>
255
 
                    </Bold>
256
 
                    <Run Text=" "/>
257
 
                    <Span Foreground="#009933">
258
 
                        <Run Text="Windcape"/>
259
 
                    </Span>
260
 
                    <Run Text=" : How can something not support RSA properly?"/>
261
 
                </Paragraph>
262
 
                <Paragraph>
263
 
                    <Bold>
264
 
                        <Run Text="humanMeat:"/>
265
 
                    </Bold>
266
 
                    <Run Text=" and you also break the Internet"/>
267
 
                </Paragraph>
268
 
                <Paragraph>
269
 
                    <Bold>
270
 
                        <Run Text="Moose:"/>
271
 
                    </Bold>
272
 
                    <Run Text=" RSA is a cryptographic primitive, "/>
273
 
                    <Span Foreground="#009933">
274
 
                        <Run Text="Windcape"/>
275
 
                    </Span>
276
 
                </Paragraph>
277
 
                <Paragraph>
278
 
                    <Bold>
279
 
                        <Run Text="Moose:"/>
280
 
                    </Bold>
281
 
                    <Run Text=" You can implement it."/>
282
 
                </Paragraph>
283
 
                <Paragraph>
284
 
                    <Bold>
285
 
                        <Run Text="humanMeat:"/>
286
 
                    </Bold>
287
 
                    <Run Text=" RSA is based on the fact that no one has found a solution to NPC problems"/>
288
 
                </Paragraph>
289
 
                <Paragraph>
290
 
                    <Bold>
291
 
                        <Run Text="humanMeat:"/>
292
 
                    </Bold>
293
 
                    <Run Text=" in polynomial time"/>
294
 
                </Paragraph>
295
 
                <Paragraph>
296
 
                    <Bold>
297
 
                        <Run Text="Moose:"/>
298
 
                    </Bold>
299
 
                    <Run Text=" It's not difficult by any means, you need an arbitrary precision integer class that supports prime generation and modular exponentiation"/>
300
 
                </Paragraph>
301
 
                <Paragraph>
302
 
                    <Bold>
303
 
                        <Run Text="Windcape:"/>
304
 
                    </Bold>
305
 
                    <Run Text=" "/>
306
 
                    <Span Foreground="#009933">
307
 
                        <Run Text="Moose"/>
308
 
                    </Span>
309
 
                    <Run Text=" it's quite a while ago, I can't remember the precise issue. Would have to find the mails for the precise problem."/>
310
 
                </Paragraph>
311
 
                <Paragraph>
312
 
                    <Bold>
313
 
                        <Run Text="humanMeat:"/>
314
 
                    </Bold>
315
 
                    <Run Text=" so if you can say RSA is crap and broken in polynomial time. congratulations new millionaire"/>
316
 
                </Paragraph>
317
 
                <Paragraph>
318
 
                    <Bold>
319
 
                        <Run Text="humanMeat:"/>
320
 
                    </Bold>
321
 
                    <Run Text=" you are the smartest man on earth."/>
322
 
                </Paragraph>
323
 
                <Paragraph>
324
 
                    <Bold>
325
 
                        <Run Text="Moose:"/>
326
 
                    </Bold>
327
 
                    <Run Text=" I'd say RSA is going to be broken probably in the near future, and we have a lack of alternatives and that's a bad thing."/>
328
 
                </Paragraph>
329
 
                <Paragraph>
330
 
                    <Bold>
331
 
                        <Run Text="Windcape:"/>
332
 
                    </Bold>
333
 
                    <Run Text=" "/>
334
 
                    <Span Foreground="#009933">
335
 
                        <Run Text="Moose"/>
336
 
                    </Span>
337
 
                    <Run Text=" and it wasn't the algorithm, but PKCS#12 "/>
338
 
                    <Hyperlink Foreground="Blue" NavigateUri="http://en.wikipedia.org/wiki/PKCS12">
339
 
                        <Run Text="http://en.wikipedia.org/wiki/PKCS12"/>
340
 
                    </Hyperlink>
341
 
                </Paragraph>
342
 
                <Paragraph>
343
 
                    <Bold>
344
 
                        <Run Text="Moose:"/>
345
 
                    </Bold>
346
 
                    <Run Text=" If RSA is broken, so is basically every other asymmetric algorithm that is considered secure today."/>
347
 
                </Paragraph>
348
 
                <Paragraph>
349
 
                    <Bold>
350
 
                        <Run Text="humanMeat:"/>
351
 
                    </Bold>
352
 
                    <Run Text=" "/>
353
 
                    <Span Foreground="#009933">
354
 
                        <Run Text="Moose"/>
355
 
                    </Span>
356
 
                    <Run Text=" , time to read Cook's Theorem."/>
357
 
                </Paragraph>
358
 
                <Paragraph>
359
 
                    <Bold>
360
 
                        <Run Text="Windcape:"/>
361
 
                    </Bold>
362
 
                    <Run Text=" which had some edge-case issues in Mono. We had a chat with their lead-dev on the crypto about it"/>
363
 
                </Paragraph>
364
 
                <Paragraph>
365
 
                    <Bold>
366
 
                        <Run Text="humanMeat:"/>
367
 
                    </Bold>
368
 
                    <Run Text=" you say that you can prove p=np like it's a walk in the park"/>
369
 
                </Paragraph>
370
 
                <Paragraph>
371
 
                    <Bold>
372
 
                        <Run Text="Windcape:"/>
373
 
                    </Bold>
374
 
                    <Run Text=" "/>
375
 
                    <Span Foreground="#009933">
376
 
                        <Run Text="humanMeat"/>
377
 
                    </Span>
378
 
                    <Run Text=" but still, you did CS, and ended up doing software engineering work?"/>
379
 
                </Paragraph>
380
 
                <Paragraph>
381
 
                    <Bold>
382
 
                        <Run Text="Moose:"/>
383
 
                    </Bold>
384
 
                    <Run Text=" "/>
385
 
                    <Span Foreground="#009933">
386
 
                        <Run Text="humanMeat"/>
387
 
                    </Span>
388
 
                    <Run Text=" : I never said I could prove anything"/>
389
 
                </Paragraph>
390
 
                <Paragraph>
391
 
                    <Bold>
392
 
                        <Run Text="Moose:"/>
393
 
                    </Bold>
394
 
                    <Run Text=" I'm saying if it's broken, we don't have really any alternatives right now."/>
395
 
                </Paragraph>
396
 
                <Paragraph>
397
 
                    <Bold>
398
 
                        <Run Text="Moose:"/>
399
 
                    </Bold>
400
 
                    <Run Text=" And that's a bad thing."/>
401
 
                </Paragraph>
402
 
                <Paragraph>
403
 
                    <Bold>
404
 
                        <Run Text="humanMeat:"/>
405
 
                    </Bold>
406
 
                    <Run Text=" "/>
407
 
                    <Span Foreground="#009933">
408
 
                        <Run Text="Moose"/>
409
 
                    </Span>
410
 
                    <Run Text=" I'd say RSA is going to be broken probably in the near future, and we have a lack of alternatives and that's a bad thing."/>
411
 
                </Paragraph>
412
 
                <Paragraph>
413
 
                    <Bold>
414
 
                        <Run Text="Moose:"/>
415
 
                    </Bold>
416
 
                    <Run Text=" Yes, in the near future... 10 or 20 years I'd estimate."/>
417
 
                </Paragraph>
418
 
                <Paragraph>
419
 
                    <Bold>
420
 
                        <Run Text="Moose:"/>
421
 
                    </Bold>
422
 
                    <Run Text=" Maybe sooner."/>
423
 
                </Paragraph>
424
 
            </FlowDocument>
425
 
        </RichTextBox>
426
 
 
427
 
        <GridSplitter Name="gridSplitter" Width="5" Margin="0,12,-3,12" HorizontalAlignment="Right" VerticalAlignment="Stretch" Background="Transparent" ShowsPreview="True"
428
 
                      Grid.Row="1" Grid.Column="0" Grid.RowSpan="2">
429
 
            <!--<GridSplitter.Template>
 
52
        <Grid Style="{StaticResource BodyStyle}">
 
53
 
 
54
            <Grid.RowDefinitions>
 
55
                <RowDefinition Height="*"/>
 
56
                <RowDefinition Height="Auto"/>
 
57
            </Grid.RowDefinitions>
 
58
 
 
59
            <Grid.ColumnDefinitions>
 
60
                <ColumnDefinition Width="Auto" MinWidth="80" MaxWidth="10000"/>
 
61
                <ColumnDefinition Width="*" MinWidth="80"/>
 
62
            </Grid.ColumnDefinitions>
 
63
 
 
64
            <ScrollViewer Margin="0,0,6,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto" BorderThickness="0"
 
65
                      Grid.Row="0" Grid.Column="0" Grid.RowSpan="2">
 
66
 
 
67
                <StackPanel Orientation="Vertical">
 
68
 
 
69
                    <Expander Header="GimpNet" IsExpanded="True" Style="{StaticResource NetworkExpanderStyle}">
 
70
                        <ItemsControl Style="{StaticResource ChannelListItemsControlStyle}">
 
71
                            <TextBlock Text="#mono"/>
 
72
                            <TextBlock Text="#monodev"/>
 
73
                        </ItemsControl>
 
74
                    </Expander>
 
75
 
 
76
                    <Expander Header="Freenode" IsExpanded="True" Style="{StaticResource NetworkExpanderStyle}">
 
77
                        <ItemsControl Style="{StaticResource ChannelListItemsControlStyle}">
 
78
                            <TextBlock Text="#freenode"/>
 
79
                            <TextBlock Text="##csharp"/>
 
80
                            <TextBlock Text="##wpf"/>
 
81
                            <TextBlock Text="#ircsil"/>
 
82
                        </ItemsControl>
 
83
                    </Expander>
 
84
 
 
85
                </StackPanel>
 
86
 
 
87
            </ScrollViewer>
 
88
 
 
89
            <RichTextBox MinHeight="80" Margin="6,0,0,6" IsReadOnly="True" AcceptsReturn="False" IsDocumentEnabled="True" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible"
 
90
                     Grid.Row="0" Grid.Column="1">
 
91
 
 
92
                <RichTextBox.Resources>
 
93
                    <Style TargetType="{x:Type Paragraph}">
 
94
                        <Setter Property="Margin" Value="0" />
 
95
                    </Style>
 
96
                </RichTextBox.Resources>
 
97
 
 
98
                <FlowDocument>
 
99
                    <Paragraph>
 
100
                        <Bold>
 
101
                            <Run Text="Windcape:"/>
 
102
                        </Bold>
 
103
                        <Run Text=" "/>
 
104
                        <Span Foreground="#009933">
 
105
                            <Run Text="Moose"/>
 
106
                        </Span>
 
107
                        <Run Text=" we actually ran into some problem with Mono not support it properly :("/>
 
108
                    </Paragraph>
 
109
                    <Paragraph>
 
110
                        <Bold>
 
111
                            <Run Text="humanMeat:"/>
 
112
                        </Bold>
 
113
                        <Run Text=" you win 7 million dollars from clay mathematics instute"/>
 
114
                    </Paragraph>
 
115
                    <Paragraph>
 
116
                        <Bold>
 
117
                            <Run Text="humanMeat:"/>
 
118
                        </Bold>
 
119
                        <Run Text=" if youc an show"/>
 
120
                    </Paragraph>
 
121
                    <Paragraph>
 
122
                        <Bold>
 
123
                            <Run Text="humanMeat:"/>
 
124
                        </Bold>
 
125
                        <Run Text=" that RSA is crap"/>
 
126
                    </Paragraph>
 
127
                    <Paragraph>
 
128
                        <Bold>
 
129
                            <Run Text="Windcape:"/>
 
130
                        </Bold>
 
131
                        <Run Text=" but I didn't tell the teachers, as I wouldn't want to hear about &quot;why didn't you use Java instead&quot;"/>
 
132
                    </Paragraph>
 
133
                    <Paragraph>
 
134
                        <Bold>
 
135
                            <Run Text="Moose:"/>
 
136
                        </Bold>
 
137
                        <Run Text=" "/>
 
138
                        <Span Foreground="#009933">
 
139
                            <Run Text="Windcape"/>
 
140
                        </Span>
 
141
                        <Run Text=" : How can something not support RSA properly?"/>
 
142
                    </Paragraph>
 
143
                    <Paragraph>
 
144
                        <Bold>
 
145
                            <Run Text="humanMeat:"/>
 
146
                        </Bold>
 
147
                        <Run Text=" and you also break the Internet"/>
 
148
                    </Paragraph>
 
149
                    <Paragraph>
 
150
                        <Bold>
 
151
                            <Run Text="Moose:"/>
 
152
                        </Bold>
 
153
                        <Run Text=" RSA is a cryptographic primitive, "/>
 
154
                        <Span Foreground="#009933">
 
155
                            <Run Text="Windcape"/>
 
156
                        </Span>
 
157
                    </Paragraph>
 
158
                    <Paragraph>
 
159
                        <Bold>
 
160
                            <Run Text="Moose:"/>
 
161
                        </Bold>
 
162
                        <Run Text=" You can implement it."/>
 
163
                    </Paragraph>
 
164
                    <Paragraph>
 
165
                        <Bold>
 
166
                            <Run Text="humanMeat:"/>
 
167
                        </Bold>
 
168
                        <Run Text=" RSA is based on the fact that no one has found a solution to NPC problems"/>
 
169
                    </Paragraph>
 
170
                    <Paragraph>
 
171
                        <Bold>
 
172
                            <Run Text="humanMeat:"/>
 
173
                        </Bold>
 
174
                        <Run Text=" in polynomial time"/>
 
175
                    </Paragraph>
 
176
                    <Paragraph>
 
177
                        <Bold>
 
178
                            <Run Text="Moose:"/>
 
179
                        </Bold>
 
180
                        <Run Text=" It's not difficult by any means, you need an arbitrary precision integer class that supports prime generation and modular exponentiation"/>
 
181
                    </Paragraph>
 
182
                    <Paragraph>
 
183
                        <Bold>
 
184
                            <Run Text="Windcape:"/>
 
185
                        </Bold>
 
186
                        <Run Text=" "/>
 
187
                        <Span Foreground="#009933">
 
188
                            <Run Text="Moose"/>
 
189
                        </Span>
 
190
                        <Run Text=" it's quite a while ago, I can't remember the precise issue. Would have to find the mails for the precise problem."/>
 
191
                    </Paragraph>
 
192
                    <Paragraph>
 
193
                        <Bold>
 
194
                            <Run Text="humanMeat:"/>
 
195
                        </Bold>
 
196
                        <Run Text=" so if you can say RSA is crap and broken in polynomial time. congratulations new millionaire"/>
 
197
                    </Paragraph>
 
198
                    <Paragraph>
 
199
                        <Bold>
 
200
                            <Run Text="humanMeat:"/>
 
201
                        </Bold>
 
202
                        <Run Text=" you are the smartest man on earth."/>
 
203
                    </Paragraph>
 
204
                    <Paragraph>
 
205
                        <Bold>
 
206
                            <Run Text="Moose:"/>
 
207
                        </Bold>
 
208
                        <Run Text=" I'd say RSA is going to be broken probably in the near future, and we have a lack of alternatives and that's a bad thing."/>
 
209
                    </Paragraph>
 
210
                    <Paragraph>
 
211
                        <Bold>
 
212
                            <Run Text="Windcape:"/>
 
213
                        </Bold>
 
214
                        <Run Text=" "/>
 
215
                        <Span Foreground="#009933">
 
216
                            <Run Text="Moose"/>
 
217
                        </Span>
 
218
                        <Run Text=" and it wasn't the algorithm, but PKCS#12 "/>
 
219
                        <Hyperlink Foreground="Blue" NavigateUri="http://en.wikipedia.org/wiki/PKCS12">
 
220
                            <Run Text="http://en.wikipedia.org/wiki/PKCS12"/>
 
221
                        </Hyperlink>
 
222
                    </Paragraph>
 
223
                    <Paragraph>
 
224
                        <Bold>
 
225
                            <Run Text="Moose:"/>
 
226
                        </Bold>
 
227
                        <Run Text=" If RSA is broken, so is basically every other asymmetric algorithm that is considered secure today."/>
 
228
                    </Paragraph>
 
229
                    <Paragraph>
 
230
                        <Bold>
 
231
                            <Run Text="humanMeat:"/>
 
232
                        </Bold>
 
233
                        <Run Text=" "/>
 
234
                        <Span Foreground="#009933">
 
235
                            <Run Text="Moose"/>
 
236
                        </Span>
 
237
                        <Run Text=" , time to read Cook's Theorem."/>
 
238
                    </Paragraph>
 
239
                    <Paragraph>
 
240
                        <Bold>
 
241
                            <Run Text="Windcape:"/>
 
242
                        </Bold>
 
243
                        <Run Text=" which had some edge-case issues in Mono. We had a chat with their lead-dev on the crypto about it"/>
 
244
                    </Paragraph>
 
245
                    <Paragraph>
 
246
                        <Bold>
 
247
                            <Run Text="humanMeat:"/>
 
248
                        </Bold>
 
249
                        <Run Text=" you say that you can prove p=np like it's a walk in the park"/>
 
250
                    </Paragraph>
 
251
                    <Paragraph>
 
252
                        <Bold>
 
253
                            <Run Text="Windcape:"/>
 
254
                        </Bold>
 
255
                        <Run Text=" "/>
 
256
                        <Span Foreground="#009933">
 
257
                            <Run Text="humanMeat"/>
 
258
                        </Span>
 
259
                        <Run Text=" but still, you did CS, and ended up doing software engineering work?"/>
 
260
                    </Paragraph>
 
261
                    <Paragraph>
 
262
                        <Bold>
 
263
                            <Run Text="Moose:"/>
 
264
                        </Bold>
 
265
                        <Run Text=" "/>
 
266
                        <Span Foreground="#009933">
 
267
                            <Run Text="humanMeat"/>
 
268
                        </Span>
 
269
                        <Run Text=" : I never said I could prove anything"/>
 
270
                    </Paragraph>
 
271
                    <Paragraph>
 
272
                        <Bold>
 
273
                            <Run Text="Moose:"/>
 
274
                        </Bold>
 
275
                        <Run Text=" I'm saying if it's broken, we don't have really any alternatives right now."/>
 
276
                    </Paragraph>
 
277
                    <Paragraph>
 
278
                        <Bold>
 
279
                            <Run Text="Moose:"/>
 
280
                        </Bold>
 
281
                        <Run Text=" And that's a bad thing."/>
 
282
                    </Paragraph>
 
283
                    <Paragraph>
 
284
                        <Bold>
 
285
                            <Run Text="humanMeat:"/>
 
286
                        </Bold>
 
287
                        <Run Text=" "/>
 
288
                        <Span Foreground="#009933">
 
289
                            <Run Text="Moose"/>
 
290
                        </Span>
 
291
                        <Run Text=" I'd say RSA is going to be broken probably in the near future, and we have a lack of alternatives and that's a bad thing."/>
 
292
                    </Paragraph>
 
293
                    <Paragraph>
 
294
                        <Bold>
 
295
                            <Run Text="Moose:"/>
 
296
                        </Bold>
 
297
                        <Run Text=" Yes, in the near future... 10 or 20 years I'd estimate."/>
 
298
                    </Paragraph>
 
299
                    <Paragraph>
 
300
                        <Bold>
 
301
                            <Run Text="Moose:"/>
 
302
                        </Bold>
 
303
                        <Run Text=" Maybe sooner."/>
 
304
                    </Paragraph>
 
305
                </FlowDocument>
 
306
            </RichTextBox>
 
307
 
 
308
            <GridSplitter Name="gridSplitter" Width="5" Margin="0,0,-3,0" HorizontalAlignment="Right" VerticalAlignment="Stretch" Background="Transparent" ShowsPreview="True"
 
309
                      Grid.Row="0" Grid.Column="0" Grid.RowSpan="2">
 
310
                <!--<GridSplitter.Template>
430
311
                <ControlTemplate>
431
312
                    <Grid>
432
313
                        <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Fill="Transparent"/>
434
315
                    </Grid>
435
316
                </ControlTemplate>
436
317
            </GridSplitter.Template>-->
437
 
        </GridSplitter>
438
 
 
439
 
        <Grid Name="messagePanel" Margin="6,0,12,20" Grid.Row="2" Grid.Column="1">
440
 
 
441
 
            <TextBox Name="messageTextBox" Height="62" Padding="4,4,60,4" VerticalAlignment="Top" BorderThickness="1" TextWrapping="Wrap"/>
442
 
 
443
 
            <Button Height="{Binding ActualHeight, ElementName=messageTextBox}" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="Hand"
444
 
                    IsEnabled="{Binding Text.Length, ElementName=messageTextBox, Converter={StaticResource InequalityToBooleanConverter}, ConverterParameter={StaticResource ZeroInt32}}">
445
 
                <Button.Template>
446
 
                    <ControlTemplate TargetType="Button">
447
 
                        <Viewbox Stretch="Uniform" Margin="10">
448
 
                            <Grid>
449
 
                                <Path Name="circlePath" Width="50" Height="50" Stretch="Uniform" Fill="#fff" Stroke="#999" StrokeThickness="2">
450
 
                                    <Path.Data>
451
 
                                        <EllipseGeometry Center="1,1" RadiusX="1" RadiusY="1"/>
452
 
                                    </Path.Data>
453
 
                                </Path>
454
 
                                <Path Name="chatBoxPath" Width="20" Height="20" Stretch="Uniform" Fill="#999">
455
 
                                    <Path.Data>
456
 
                                        <PathGeometry Figures="M 0,1 a 1,1 0 0 1 1,-1 h 8 a 1,1 0 0 1 1,1 v 5 a 1,1 0 0 1 -1,1 h -8 a 1,1 0 0 1 -1,-1 M 2,7 v 3 l 3,-3"/>
457
 
                                    </Path.Data>
458
 
                                </Path>
459
 
                            </Grid>
460
 
                        </Viewbox>
461
 
                        <ControlTemplate.Triggers>
462
 
                            <Trigger Property="IsEnabled" Value="False">
463
 
                                <Setter TargetName="circlePath" Property="Fill" Value="#fff"/>
464
 
                                <Setter TargetName="circlePath" Property="Stroke" Value="#ccc"/>
465
 
                                <Setter TargetName="chatBoxPath" Property="Fill" Value="#ccc"/>
466
 
                            </Trigger>
467
 
                            <Trigger Property="IsMouseOver" Value="True">
468
 
                                <Setter TargetName="circlePath" Property="Fill" Value="#eee"/>
469
 
                                <Setter TargetName="circlePath" Property="Stroke" Value="#777"/>
470
 
                                <Setter TargetName="chatBoxPath" Property="Fill" Value="#777"/>
471
 
                            </Trigger>
472
 
                            <Trigger Property="IsPressed" Value="True">
473
 
                                <Setter TargetName="circlePath" Property="Fill" Value="#ddd"/>
474
 
                                <Setter TargetName="circlePath" Property="Stroke" Value="#555"/>
475
 
                                <Setter TargetName="chatBoxPath" Property="Fill" Value="#555"/>
476
 
                            </Trigger>
477
 
                        </ControlTemplate.Triggers>
478
 
                    </ControlTemplate>
479
 
                </Button.Template>
480
 
            </Button>
 
318
            </GridSplitter>
 
319
 
 
320
            <Grid Name="messagePanel" Margin="6,6,0,8" Grid.Row="1" Grid.Column="1">
 
321
 
 
322
                <Grid.ColumnDefinitions>
 
323
                    <ColumnDefinition Width="*"/>
 
324
                    <ColumnDefinition Width="Auto"/>
 
325
                </Grid.ColumnDefinitions>
 
326
 
 
327
                <TextBox Name="messageTextBox" Height="62" Padding="4,4,60,4" VerticalAlignment="Top" BorderThickness="1" TextWrapping="Wrap" Grid.Column="0"/>
 
328
 
 
329
                <Button Name="sendButton" Height="{Binding ActualHeight, ElementName=messageTextBox}" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="Hand"
 
330
                        IsEnabled="{Binding Text.Length, ElementName=messageTextBox, Converter={StaticResource InequalityToBooleanConverter}, ConverterParameter={StaticResource ZeroInt32}}"
 
331
                        Grid.Column="0">
 
332
                    <Button.Template>
 
333
                        <ControlTemplate TargetType="Button">
 
334
                            <Viewbox Stretch="Uniform" Margin="10">
 
335
                                <Grid>
 
336
                                    <Path Name="circlePath" Width="50" Height="50" Stretch="Uniform" Fill="#fff" Stroke="#999" StrokeThickness="2">
 
337
                                        <Path.Data>
 
338
                                            <EllipseGeometry Center="1,1" RadiusX="1" RadiusY="1"/>
 
339
                                        </Path.Data>
 
340
                                    </Path>
 
341
                                    <Path Name="chatBoxPath" Width="20" Height="20" Stretch="Uniform" Fill="#999">
 
342
                                        <Path.Data>
 
343
                                            <PathGeometry Figures="M 0,1 a 1,1 0 0 1 1,-1 h 8 a 1,1 0 0 1 1,1 v 5 a 1,1 0 0 1 -1,1 h -8 a 1,1 0 0 1 -1,-1 M 2,7 v 3 l 3,-3"/>
 
344
                                        </Path.Data>
 
345
                                    </Path>
 
346
                                </Grid>
 
347
                            </Viewbox>
 
348
                            <ControlTemplate.Triggers>
 
349
                                <Trigger Property="IsEnabled" Value="False">
 
350
                                    <Setter TargetName="circlePath" Property="Fill" Value="#fff"/>
 
351
                                    <Setter TargetName="circlePath" Property="Stroke" Value="#ccc"/>
 
352
                                    <Setter TargetName="chatBoxPath" Property="Fill" Value="#ccc"/>
 
353
                                </Trigger>
 
354
                                <Trigger Property="IsMouseOver" Value="True">
 
355
                                    <Setter TargetName="circlePath" Property="Fill" Value="#eee"/>
 
356
                                    <Setter TargetName="circlePath" Property="Stroke" Value="#777"/>
 
357
                                    <Setter TargetName="chatBoxPath" Property="Fill" Value="#777"/>
 
358
                                </Trigger>
 
359
                                <Trigger Property="IsPressed" Value="True">
 
360
                                    <Setter TargetName="circlePath" Property="Fill" Value="#ddd"/>
 
361
                                    <Setter TargetName="circlePath" Property="Stroke" Value="#555"/>
 
362
                                    <Setter TargetName="chatBoxPath" Property="Fill" Value="#555"/>
 
363
                                </Trigger>
 
364
                            </ControlTemplate.Triggers>
 
365
                        </ControlTemplate>
 
366
                    </Button.Template>
 
367
                </Button>
 
368
 
 
369
                <StackPanel Margin="12,0,0,0" Orientation="Horizontal" Grid.Column="1">
 
370
 
 
371
                    <Button Name="usersButton" Height="{Binding ActualHeight, ElementName=messageTextBox}" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="Hand"
 
372
                            IsEnabled="{Binding Text.Length, ElementName=messageTextBox, Converter={StaticResource InequalityToBooleanConverter}, ConverterParameter={StaticResource ZeroInt32}}">
 
373
                        <Button.Template>
 
374
                            <ControlTemplate TargetType="Button">
 
375
                                <Viewbox Stretch="Uniform" Margin="10">
 
376
                                    <Grid>
 
377
                                        <Path Name="circlePath" Width="50" Height="50" Stretch="Uniform" Fill="#fff" Stroke="#999" StrokeThickness="2">
 
378
                                            <Path.Data>
 
379
                                                <EllipseGeometry Center="1,1" RadiusX="1" RadiusY="1"/>
 
380
                                            </Path.Data>
 
381
                                        </Path>
 
382
                                        <Path Name="headPath" Width="20" Height="20" Stretch="Uniform" Fill="#999" Stroke="#999" StrokeThickness="2">
 
383
                                            <Path.Data>
 
384
                                                <EllipseGeometry Center="1,1" RadiusX="1" RadiusY="2"/>
 
385
                                            </Path.Data>
 
386
                                        </Path>
 
387
                                    </Grid>
 
388
                                </Viewbox>
 
389
                                <ControlTemplate.Triggers>
 
390
                                    <Trigger Property="IsEnabled" Value="False">
 
391
                                        <Setter TargetName="circlePath" Property="Fill" Value="#fff"/>
 
392
                                    </Trigger>
 
393
                                    <Trigger Property="IsMouseOver" Value="True">
 
394
                                        <Setter TargetName="circlePath" Property="Fill" Value="#eee"/>
 
395
                                    </Trigger>
 
396
                                    <Trigger Property="IsPressed" Value="True">
 
397
                                        <Setter TargetName="circlePath" Property="Fill" Value="#ddd"/>
 
398
                                    </Trigger>
 
399
                                </ControlTemplate.Triggers>
 
400
                            </ControlTemplate>
 
401
                        </Button.Template>
 
402
                    </Button>
 
403
 
 
404
                </StackPanel>
 
405
 
 
406
            </Grid>
481
407
 
482
408
        </Grid>
483
409
 
484
 
    </Grid>
 
410
    </DockPanel>
485
411
 
486
 
</local:CustomWindow>
 
412
</Window>