The easy to use and full featured Irc Bot everyone is talking about!
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <Window x:Class="Interface.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:Interface"
  5. xmlns:prop="clr-namespace:Interface.Properties"
  6. xmlns:view="clr-namespace:Interface.ViewModels"
  7. xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
  8. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  9. Title="{Binding ApplicationTitle, Mode=TwoWay}" Height="372" Width="850" ResizeMode="CanResize">
  10. <Window.Resources>
  11. <CollectionViewSource x:Key="SortedLocations" Source="{Binding LocationList}">
  12. <CollectionViewSource.SortDescriptions>
  13. <componentModel:SortDescription Direction="Ascending"/>
  14. </CollectionViewSource.SortDescriptions>
  15. </CollectionViewSource>
  16. </Window.Resources>
  17. <Grid Margin="0,0,0,2">
  18. <Button x:Name="ToggleConnectionButton" Content="{Binding ToggleConnectionText}" Margin="10,0,0,10" Command="{Binding ToggleConnection}" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="100"/>
  19. <ComboBox x:Name="ServerListBox" ItemsSource="{Binding ServerList, Mode=TwoWay}" SelectedItem="{Binding SelectedServer, Mode=TwoWay}" Height="25" Margin="0,10,10,0" VerticalAlignment="Top" HorizontalAlignment="Right" Width="125"/>
  20. <ListBox x:Name="LocationListBox" ItemsSource="{Binding Source={StaticResource SortedLocations}}" SelectedItem="{Binding SelectedLocation, Mode=TwoWay}" HorizontalAlignment="Right" Margin="0,40,10,38" Width="125">
  21. <ListBox.ContextMenu>
  22. <ContextMenu>
  23. <MenuItem Header="Clear Buffer" Command="{Binding ClearLocation}"></MenuItem>
  24. <MenuItem Header="Remove" Command="{Binding RemoveLocation}"/>
  25. </ContextMenu>
  26. </ListBox.ContextMenu>
  27. </ListBox>
  28. <TextBox x:Name="InputBox" Text="{Binding InputBoxText, UpdateSourceTrigger=PropertyChanged}" Margin="115,0,140,10" TextWrapping="NoWrap" AcceptsTab="True" Height="23" VerticalAlignment="Bottom" AcceptsReturn="True">
  29. <TextBox.InputBindings>
  30. <KeyBinding Command="{Binding SubmitText}" Key="Enter"/>
  31. </TextBox.InputBindings>
  32. </TextBox>
  33. <Button x:Name="SubmitButton" Content="Submit" Command="{Binding SubmitText}" Margin="0,0,10,10" HorizontalAlignment="Right" Width="125" Height="23" VerticalAlignment="Bottom"/>
  34. <RichTextBox x:Name="BufferWindow" Margin="10,10,140,38" VerticalScrollBarVisibility="Auto" IsReadOnly="True">
  35. <RichTextBox.ContextMenu>
  36. <ContextMenu>
  37. <MenuItem Header="Clear Buffer" Command="{Binding ClearLocation}"></MenuItem>
  38. </ContextMenu>
  39. </RichTextBox.ContextMenu>
  40. <i:Interaction.Triggers>
  41. <i:EventTrigger EventName="TextChanged">
  42. <local:ScrollToBottomAction/>
  43. </i:EventTrigger>
  44. </i:Interaction.Triggers>
  45. <FlowDocument>
  46. <Paragraph>
  47. <Run Text="{Binding CurrentBuffer, Mode=TwoWay}"/>
  48. </Paragraph>
  49. </FlowDocument>
  50. </RichTextBox>
  51. </Grid>
  52. </Window>