SourceForge has been redesigned. Learn more.
Close

[cf67b8]: / wBattle.xaml  Maximize  Restore  History

Download this file

79 lines (71 with data), 5.3 kB

<Window x:Class="YuGiOh_Ultra.wBattle"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:self="clr-namespace:YuGiOh_Ultra"
        Title="wBattle" Height="652.59" Width="950.301" Closing="Window_Closing" Icon="yugionline.ico">
    <Window.Resources>
        <Style TargetType="{x:Type ListBox}">
            <Setter Property="ItemTemplate">
                <Setter.Value>
                    <DataTemplate DataType="{x:Type self:ACard}">
                        <Image Source="{Binding Img}" Stretch="Fill" Width="100" Height="120" RenderTransformOrigin="0.5,0.5" >
                            <Image.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform Angle="{Binding ImgRot}"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Image.RenderTransform>
                        </Image>
                    </DataTemplate>
                </Setter.Value>
            </Setter>

            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <WrapPanel />
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>

    <Grid>
        <ListBox x:Name="lbhand" ItemsSource="{Binding}" Margin="120,0,10,0" Height="136" VerticalAlignment="Bottom" ContextMenuOpening="lbhand_ContextMenuOpening" >
            <ListBox.ContextMenu>
                <ContextMenu x:Name="cmenhand">
                    <MenuItem x:Name="BtSummon" Header="Summon" Click="BtSummon_Click"/>
                    <MenuItem x:Name="BtActivate" Header="Activate"/>
                    <MenuItem x:Name="BtPlace" Header="Place" Click="BtPlace_Click"/>
                    <MenuItem x:Name="BtDiscard" Header="Discard" Click="BtDiscard_Click"/>
                    <MenuItem x:Name="BtHandBanish" Header="Banish" Click="BtHandBanish_Click"/>
                    <MenuItem x:Name="BtHandToDeckTop" Header="To Top of Deck"/>
                    <MenuItem x:Name="BtHandToDeckBottom" Header="To Bottom if Deck"/>
                </ContextMenu>
            </ListBox.ContextMenu>
        </ListBox>

        <ListBox x:Name="lbenemyfieldmonsters" ItemsSource="{Binding}" Height="129" Margin="120,35,10,0" VerticalAlignment="Top"/>

        <ListBox x:Name="lbfieldmonsters" ItemsSource="{Binding}" Margin="120,0,10,292" Height="129" VerticalAlignment="Bottom">
            <ListBox.ContextMenu>
                <ContextMenu>
                    <MenuItem x:Name="mfchangepos" Header="Change pos" Click="mfchangepos_Click" />
                    <MenuItem x:Name="mftograve" Header="To graveyeard" Click="mftograve_Click"/>
                    <MenuItem x:Name="mfbanish" Header="Banish" Click="mfbanish_Click"/>
                    <MenuItem x:Name="mftohand" Header="To Hand"/>
                </ContextMenu>
            </ListBox.ContextMenu>
        </ListBox>
        <ListBox x:Name="lbfieldcards" ItemsSource="{Binding}" Margin="120,0,10,158" Height="129" VerticalAlignment="Bottom"/>
        <Button x:Name="btnnewturn" Content="Draw Phase" HorizontalAlignment="Left" Margin="10,119,0,0" VerticalAlignment="Top" Width="92" Background="#FF87E418" FontSize="14"/>
        <Button x:Name="btnmainphase" Content="Main Phase" HorizontalAlignment="Left" Margin="10,147,0,0" VerticalAlignment="Top" Width="92" FontSize="14"/>
        <Button x:Name="btnbattlephase" Content="Battle Phase" HorizontalAlignment="Left" Margin="10,175,0,0" VerticalAlignment="Top" Width="92" FontSize="14"/>
        <Button x:Name="btnendturn" Content="End Phase" HorizontalAlignment="Left" Margin="10,203,0,0" VerticalAlignment="Top" Width="92" FontSize="14"/>

        <Button x:Name="btnclientcon" Content="Client Connect" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="92" Click="btnclientcon_Click"/>
        <Button x:Name="btnservercon" Content="Server Connect" HorizontalAlignment="Left" Margin="10,35,0,0" VerticalAlignment="Top" Width="92" Click="btnservercon_Click"/>
        <Button x:Name="btnsendnetmsg" Content="Send net msg" HorizontalAlignment="Left" Margin="10,60,0,0" VerticalAlignment="Top" Width="92" Click="btnsendnetmsg_Click"/>

        <Button x:Name="btnviewdeck" Content="View Deck" HorizontalAlignment="Left" Margin="10,486,0,0" VerticalAlignment="Top" Width="92" FontSize="14" Click="btnviewdeck_Click"/>
        <Button x:Name="btnviewgraveyard" Content="View Graveyard" HorizontalAlignment="Left" Margin="10,458,0,0" VerticalAlignment="Top" Width="92" FontSize="14" Click="btnviewgraveyard_Click" />
        <Button x:Name="btndraw" Content="Draw" HorizontalAlignment="Left" Margin="10,514,0,0" VerticalAlignment="Top" Width="92" FontSize="14" Click="btndraw_Click"/>
        <Button x:Name="btnviewgbanished" Content="View Banished" HorizontalAlignment="Left" Margin="10,430,0,0" VerticalAlignment="Top" Width="92" FontSize="14" Click="btnviewgbanished_Click" />

    </Grid>
</Window>