Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MainWindow.xaml
<Window x:Class="BloogBot.UI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BloogBot.UI"
mc:Ignorable="d"
Title="BloogBot" MinHeight="600" Height="600" MaxHeight="600" MinWidth="400" Width="400" MaxWidth="400" ResizeMode="NoResize" SizeToContent="WidthAndHeight">
<Window.DataContext>
<local:MainViewModel />
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="140"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid>
<TabControl>
<TabItem>
<TabItem.Header>
Overview
</TabItem.Header>
<Grid Margin="10,0,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button
Command="{Binding StartCommand}"
Grid.Column="0"
Content="Start"
Height="24"
HorizontalAlignment="Left"
Margin="0,0,10,0"
Padding="6,0,6,0" />
<Button
Command="{Binding StopCommand}"
Grid.Column="1"
Content="Stop"
Height="24"
HorizontalAlignment="Left"
Margin="0,0,10,0"
Padding="6,0,6,0" />
<Button
Command="{Binding ReloadBotCommand}"
Grid.Column="2"
Content="Reload Bots"
Height="24"
HorizontalAlignment="Left"
Margin="0,0,10,0"
Padding="6,0,6,0" />
<Button
Command="{Binding SaveSettingsCommand}"
Grid.Column="3"
Content="Save Settings"
Height="24"
HorizontalAlignment="Left"
Margin="0,0,10,0"
Padding="6,0,6,0" />
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label
Content="Bot:"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Right"
VerticalAlignment="Center" />
<ComboBox
Grid.Column="1"
VerticalContentAlignment="Center"
SelectedItem="{Binding Path=CurrentBot, Mode=TwoWay}"
ItemsSource="{Binding Path=Bots, Mode=OneWay}"
Margin="0,4">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}">
<Binding Path="Name"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label
Grid.Row="1"
Content="Grinding Hotspot:"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Right"/>
<ComboBox
Grid.Row="1"
Grid.Column="1"
Margin="0,4"
VerticalContentAlignment="Center"
SelectedItem="{Binding Path=GrindingHotspot, Mode=TwoWay}"
ItemsSource="{Binding Path=Hotspots, Mode=OneWay}"
Grid.ColumnSpan="2">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}">
<Binding Path="DisplayName"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid Grid.Row="3" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label
Content="Food:"
VerticalContentAlignment="Center"
HorizontalAlignment="Right"
VerticalAlignment="Center" />
<TextBox
Grid.Column="1"
Margin="0,4,0,4"
VerticalContentAlignment="Center" />
</Grid>
</Grid>
</TabItem>
<TabItem>
<TabItem.Header>
Settings
</TabItem.Header>
<Grid Margin="10,0,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button
Command="{Binding SaveSettingsCommand}"
Content="Save Settings"
Height="24"
HorizontalAlignment="Left"
Padding="6,0,6,0"
Margin="0,8,0,8"/>
<Label
Grid.Row="1"
Content="GENERAL"
VerticalContentAlignment="Center"
Padding="0"
FontWeight="Bold" />
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label
Content="Food:"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Right"/>
<TextBox
Grid.Column="1"
Text="{Binding Path=Food}"
Margin="0,4,0,4"
VerticalContentAlignment="Center"/>
</Grid>
</Grid>
</TabItem>
<TabItem>
<TabItem.Header>
Hotspots
</TabItem.Header>
<Grid Margin="10,0,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button
Command="{Binding StartRecordingHotspotCommand}"
IsEnabled="{Binding Path=StartRecordingHotspotCommandEnabled}"
Content="Record"
Height="24"
HorizontalAlignment="Left"
Margin="0,0,10,0"
Padding="6,0,6,0"/>
<Button
Grid.Column="1"
Command="{Binding AddHotspotWaypointCommand}"
IsEnabled="{Binding Path=AddHotspotWaypointCommandEnabled}"
Content="Add Waypoint"
Height="24"
HorizontalAlignment="Left"
Margin="0,0,10,0"
Padding="6,0,6,0"/>
<Button
Grid.Column="2"
Command="{Binding SaveHotspotCommand}"
IsEnabled="{Binding Path=SaveHotspotCommandEnabled}"
Content="Save"
Height="24"
HorizontalAlignment="Left"
Margin="0,0,10,0"
Padding="6,0,6,0"/>
<Button
Grid.Column="3"
Command="{Binding CancelHotspotCommand}"
IsEnabled="{Binding Path=CancelHotspotCommandEnabled}"
Content="Cancel"
Height="24"
HorizontalAlignment="Left"
Padding="6,0,6,0"/>
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label
Content="Description:"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Right"/>
<TextBox
Grid.Column="1"
Text="{Binding Path=NewHotspotDescription}"
VerticalContentAlignment="Center"
Margin="0,4,0,4"/>
<Label
Grid.Row="1"
Content="Min. Level:"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Right"/>
<TextBox
Grid.Row="1"
Grid.Column="1"
Text="{Binding Path=NewHotspotMinLevel}"
VerticalContentAlignment="Center"
HorizontalAlignment="Left"
Width="60"
Margin="0,4,0,4"/>
<Grid Grid.Row="2" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label
Content="Faction:"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Right"/>
<CheckBox
Grid.Column="1"
VerticalAlignment="Center" VerticalContentAlignment="Center"
Content="Horde"
Margin="0,0,16,0"
IsChecked="{Binding NewHotspotHorde}"/>
<CheckBox
Grid.Column="2"
VerticalAlignment="Center" VerticalContentAlignment="Center"
Content="Alliance"
IsChecked="{Binding NewHotspotAlliance}"/>
</Grid>
</Grid>
</Grid>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Row="1" Margin="10">
<ScrollViewer Name="Console" Padding="10" Background="DimGray">
<StackPanel>
<ItemsControl ItemsSource="{Binding ConsoleOutput, Mode=OneWay}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=.}" TextWrapping="Wrap" Foreground="White" FontFamily="Consolas"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>
</Grid>
</Grid>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment