Win8 Hangman Oyunu Yapımı

Tasarım konusunda pek becerikli olmasamda elimden geleni yapmaya çalışıyorum oldugu kadarıylar artık.Onemli olan kod kısmı zaten tasarımı herkes yapabilir.

İlk giriş sayfamızı bu şekilde tasarımını yaptık.Arka planda bir resim ve yan menude 4 adet buton bulunuyor.Şimdi bu butonların yapacakları işleri tanımlayalım.

Tasarmı sayfası xaml kodu

[php]</pre>
<div><Page</div>
<div>    x:Class="HangMan.MainPage"</div>
<div>    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</div>
<div>    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"</div>
<div>    xmlns:local="using:HangMan"</div>
<div>    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"</div>
<div>    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"</div>
<div>    mc:Ignorable="d"></div>
<div></div>
<div>    <Grid></div>
<div>        <Grid.Background></div>
<div>            <ImageBrush ImageSource="Images/mainBack.jpg"/></div>
<div>        </Grid.Background></div>
<div>        <Button Content="Yeni Oyun" HorizontalAlignment="Left" Margin="920,224,0,0" VerticalAlignment="Top" Width="350" Height="44" FontFamily="Algerian" FontSize="30" Grid.RowSpan="1" BorderThickness="0" Click="Button_Click_1"/></div>
<div>        <Button Content="Devam Et" HorizontalAlignment="Left" Margin="920,331,0,0" VerticalAlignment="Top" Width="366" Height="47" FontFamily="Algerian" FontSize="30" BorderThickness="0"/></div>
<div>        <Button Content="En Yüksek Puan" HorizontalAlignment="Left" Margin="920,439,0,0" VerticalAlignment="Top" Width="366" Height="47" FontFamily="Algerian" FontSize="30" BorderThickness="0"/></div>
<div>        <Button Content="Çıkış" HorizontalAlignment="Left" Margin="933,551,0,0" VerticalAlignment="Top" Width="353" Height="48" FontFamily="Algerian" FontSize="30" BorderThickness="0"/></div>
<div>        <TextBlock x:Name="txbTitle" HorizontalAlignment="Left" Margin="368.086,359.949,0,0" TextWrapping="Wrap" Text="HANGMAN " VerticalAlignment="Top" FontWeight="Bold" FontSize="48" Foreground="#FFA38FD8" RenderTransformOrigin="0.5,0.5" Height="107.244" UseLayoutRounding="False" Width="335.466" d:LayoutRounding="Auto" FontFamily="Viner Hand ITC"></div>
<div>            <TextBlock.Projection></div>
<div>                <PlaneProjection CenterOfRotationZ="6"/></div>
<div>            </TextBlock.Projection></div>
<div>            <TextBlock.RenderTransform></div>
<div>                <CompositeTransform Rotation="-51.62" SkewX="6" SkewY="5.428" ScaleX="1.01" TranslateX="3.804" TranslateY="16.996"/></div>
<div>            </TextBlock.RenderTransform></div>
<div>        </TextBlock></div>
<div>        <MediaElement HorizontalAlignment="Left" Height="100" Margin="157,439,0,0" VerticalAlignment="Top" Width="100" Source="music/ses.WAV"/></div>
<div>        <TextBlock HorizontalAlignment="Left" Margin="694.999,385,0,0" TextWrapping="Wrap" Text="HANGMAN " VerticalAlignment="Top" FontSize="48" FontFamily="Viner Hand ITC" Foreground="#FFA38FD8" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto"></div>
<div>            <TextBlock.RenderTransform></div>
<div>                <CompositeTransform Rotation="-141.242"/></div>
<div>            </TextBlock.RenderTransform></div>
<div>        </TextBlock></div>
<div>        <TextBlock HorizontalAlignment="Left" Margin="658.999,83.5,0,0" TextWrapping="Wrap" Text="HANGMAN " VerticalAlignment="Top" FontSize="48" FontFamily="Viner Hand ITC" Foreground="#FFA38FD8" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto"></div>
<div>            <TextBlock.RenderTransform></div>
<div>                <CompositeTransform Rotation="-180.133"/></div>
<div>            </TextBlock.RenderTransform></div>
<div>        </TextBlock></div>
<div>        <TextBlock x:Name="txbTitle_Copy" HorizontalAlignment="Left" Margin="327.681,94.781,0,0" TextWrapping="Wrap" Text="HANGMAN " VerticalAlignment="Top" FontWeight="Bold" FontSize="48" Foreground="#FFA38FD8" RenderTransformOrigin="0.5,0.5" Height="107.244" UseLayoutRounding="False" Width="305.506" d:LayoutRounding="Auto" FontFamily="Viner Hand ITC"></div>
<div>            <TextBlock.Projection></div>
<div>                <PlaneProjection CenterOfRotationZ="6"/></div>
<div>            </TextBlock.Projection></div>
<div>            <TextBlock.RenderTransform></div>
<div>                <CompositeTransform Rotation="-7.443" SkewX="6" SkewY="5.428" ScaleX="1.01" TranslateX="3.804" TranslateY="16.996"/></div>
<div>            </TextBlock.RenderTransform></div>
<div>        </TextBlock></div>
<div>        <TextBlock x:Name="txbTitle_Copy1" HorizontalAlignment="Left" Margin="506.181,169.781,0,0" TextWrapping="Wrap" Text="HANGMAN " VerticalAlignment="Top" FontWeight="Bold" FontSize="48" Foreground="#FFA38FD8" RenderTransformOrigin="0.5,0.5" Height="107.244" UseLayoutRounding="False" Width="305.506" d:LayoutRounding="Auto" FontFamily="Viner Hand ITC"></div>
<div>            <TextBlock.Projection></div>
<div>                <PlaneProjection CenterOfRotationZ="6"/></div>
<div>            </TextBlock.Projection></div>
<div>            <TextBlock.RenderTransform></div>
<div>                <CompositeTransform Rotation="-96.021" SkewX="6" SkewY="5.428" ScaleX="1.01" TranslateX="3.804" TranslateY="16.996"/></div>
<div>            </TextBlock.RenderTransform></div>
<div>        </TextBlock></div>
<div>        <TextBlock x:Name="txbTitle_Copy2" HorizontalAlignment="Left" Margin="498.681,-14.719,0,0" TextWrapping="Wrap" Text="HANGMAN " VerticalAlignment="Top" FontWeight="Bold" FontSize="48" Foreground="#FFA38FD8" RenderTransformOrigin="0.5,0.5" Height="107.244" UseLayoutRounding="False" Width="305.506" d:LayoutRounding="Auto" FontFamily="Viner Hand ITC"></div>
<div>            <TextBlock.Projection></div>
<div>                <PlaneProjection CenterOfRotationZ="6"/></div>
<div>            </TextBlock.Projection></div>
<div>            <TextBlock.RenderTransform></div>
<div>                <CompositeTransform Rotation="-6.002" SkewX="6" SkewY="5.428" ScaleX="1.01" TranslateX="3.804" TranslateY="16.996"/></div>
<div>            </TextBlock.RenderTransform></div>
<div>        </TextBlock></div>
<div>    </Grid></div>
<div></Page></div>
<div></div>
<pre>
[/php]

kod kısmınıda şu şekilde yazıyoruz.

[php]

</pre>
<div>using System;</div>
<div>using System.Collections.Generic;</div>
<div>using System.IO;</div>
<div>using System.Linq;</div>
<div>using Windows.Foundation;</div>
<div>using Windows.Foundation.Collections;</div>
<div>using Windows.UI.Xaml;</div>
<div>using Windows.UI.Xaml.Controls;</div>
<div>using Windows.UI.Xaml.Controls.Primitives;</div>
<div>using Windows.UI.Xaml.Data;</div>
<div>using Windows.UI.Xaml.Input;</div>
<div>using Windows.UI.Xaml.Media;</div>
<div>using Windows.UI.Xaml.Navigation;</div>
<div>using Windows.Media;</div>
<div></div>
<div>// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238</div>
<div></div>
<div>namespace HangMan</div>
<div>{</div>
<div>    /// <summary></div>
<div>    /// An empty page that can be used on its own or navigated to within a Frame.</div>
<div>    /// </summary></div>
<div>    public sealed partial class MainPage : Page</div>
<div>    {</div>
<div>        public MainPage()</div>
<div>        {</div>
<div>            this.InitializeComponent();</div>
<div>            //DispatcherTimer timer = new DispatcherTimer();</div>
<div>            //timer.Interval = new TimeSpan(10);</div>
<div>            //timer.Start();</div>
<div>            //MediaElement me = new MediaElement();</div>
<div></div>
<div></div>
<div></div>
<div>          //  me.Source = "G:/sesKayit/ses.wav";</div>
<div></div>
<div></div>
<div>        }</div>
<div></div>
<div></div>
<div>        /// <summary></div>
<div>        /// Invoked when this page is about to be displayed in a Frame.</div>
<div>        /// </summary></div>
<div>        /// <param name="e">Event data that describes how this page was reached.  The Parameter</div>
<div>        /// property is typically used to configure the page.</param></div>
<div>        protected override void OnNavigatedTo(NavigationEventArgs e)</div>
<div>        {</div>
<div>        }</div>
<div></div>
<div>        private void Button_Click_1(object sender, RoutedEventArgs e)</div>
<div>        {</div>
<div>            this.Frame.Navigate(typeof(NewGame));</div>
<div>        }</div>
<div>    }</div>
<div>}</div>
<div></div>
<pre>

[/php]

Burada yazdıgımız tek kod şimdilik yeni oyun butonunun altına yazılmıstır.Bu buton Yeni oyun sayfasına bizi yonlendiriyor.

Yeni oyun sayfası

[php]

<Page
x:Class="HangMan.NewGame"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:HangMan"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Grid>
<Grid.Background>
<ImageBrush ImageSource="ms-appx:/Images/newGameBack.jpg"/>
</Grid.Background>

<Ellipse x:Name="elpRightArm" HorizontalAlignment="Left" Height="100" Margin="1114,351,0,0" Stroke="Black" StrokeThickness="0" VerticalAlignment="Top" Width="100">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/armR.jpg"/>
</Ellipse.Fill>
</Ellipse>

<Ellipse x:Name="elpLeftArm" HorizontalAlignment="Left" Height="100" Margin="952,351,0,0" Stroke="Black" StrokeThickness="0" VerticalAlignment="Top" Width="100">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/armLe.jpg"/>
</Ellipse.Fill>
</Ellipse>

<Ellipse x:Name="elpRightLeg" HorizontalAlignment="Left" Height="100" Margin="1057,570,0,0" Stroke="Black" StrokeThickness="0" VerticalAlignment="Top" Width="100" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
<Ellipse.RenderTransform>
<CompositeTransform Rotation="-42.185"/>
</Ellipse.RenderTransform>
<Ellipse.Fill>
<ImageBrush ImageSource="Images/images.jpg"/>
</Ellipse.Fill>
</Ellipse>

<Ellipse x:Name="elpLeftLeg" HorizontalAlignment="Left" Height="109" Margin="1000,560,0,0" Stroke="Black" VerticalAlignment="Top" Width="78" StrokeThickness="0">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/images.jpg"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="A" HorizontalAlignment="Left" Height="40" Margin="168,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="A_PointerPressed" PointerMoved="A_PointerMoved" PointerExited="A_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/Adsız.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="B" HorizontalAlignment="Left" Height="40" Margin="231,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="B_PointerPressed" PointerMoved="B_PointerMoved" PointerExited="B_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/B.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="C" HorizontalAlignment="Left" Height="40" Margin="298,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="40" PointerPressed="C_PointerPressed" PointerMoved="C_PointerMoved" PointerExited="C_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/C.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="D" HorizontalAlignment="Left" Height="40" Margin="418,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="41" PointerPressed="D_PointerPressed" PointerMoved="D_PointerMoved" PointerExited="D_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/D.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="E" HorizontalAlignment="Left" Height="40" Margin="474,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="E_PointerPressed" PointerMoved="E_PointerMoved" PointerExited="E_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/E.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="F" HorizontalAlignment="Left" Height="40" Margin="543,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="F_PointerPressed" PointerMoved="F_PointerMoved" PointerExited="F_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/F.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="G" HorizontalAlignment="Left" Height="40" Margin="606,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="G_PointerPressed" PointerMoved="G_PointerMoved" PointerExited="G_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/G.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="Gg" HorizontalAlignment="Left" Height="40" Margin="676,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="Gg_PointerPressed" PointerMoved="Gg_PointerMoved" PointerExited="Gg_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/YG.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="H" HorizontalAlignment="Left" Height="40" Margin="168,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="H_PointerPressed" PointerMoved="H_PointerMoved" PointerExited="H_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/H.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="I" HorizontalAlignment="Left" Height="40" Margin="231,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="I_PointerPressed" PointerMoved="I_PointerMoved" PointerExited="I_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/I.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="Ii" HorizontalAlignment="Left" Height="40" Margin="298,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="40" PointerPressed="Ii_PointerPressed" PointerMoved="Ii_PointerMoved" PointerExited="Ii_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/kucuki.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="J" HorizontalAlignment="Left" Height="40" Margin="353,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="J_PointerPressed" PointerMoved="J_PointerMoved" PointerExited="J_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/J.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="K" HorizontalAlignment="Left" Height="40" Margin="410,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="41" PointerPressed="K_PointerPressed" PointerMoved="K_PointerMoved" PointerExited="K_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/K.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="L" HorizontalAlignment="Left" Height="40" Margin="476,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="43" PointerPressed="L_PointerPressed" PointerMoved="L_PointerMoved" PointerExited="L_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/L.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="M" HorizontalAlignment="Left" Height="40" Margin="542,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="M_PointerPressed" PointerMoved="M_PointerMoved" PointerExited="M_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/M.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="N" HorizontalAlignment="Left" Height="40" Margin="612,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="N_PointerPressed" PointerMoved="N_PointerMoved" PointerExited="N_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/N.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="O" HorizontalAlignment="Left" Height="40" Margin="676,309,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="O_PointerPressed" PointerMoved="O_PointerMoved" PointerExited="O_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/O.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="Oo" HorizontalAlignment="Left" Height="40" Margin="170,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="44" PointerPressed="Oo_PointerPressed" PointerMoved="Oo_PointerMoved" PointerExited="Oo_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/Oo.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="P" HorizontalAlignment="Left" Height="40" Margin="238,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="P_PointerPressed" PointerMoved="P_PointerMoved" PointerExited="P_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/P.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="R" HorizontalAlignment="Left" Height="40" Margin="293,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="43" RenderTransformOrigin="0.478,0.375" PointerPressed="R_PointerPressed" PointerMoved="R_PointerMoved" PointerExited="R_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/R.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="S" HorizontalAlignment="Left" Height="40" Margin="349,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="43" PointerPressed="S_PointerPressed" PointerMoved="S_PointerMoved" PointerExited="S_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/S.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="Ss" HorizontalAlignment="Left" Height="40" Margin="418,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="41" PointerPressed="Ss_PointerPressed" PointerMoved="Ss_PointerMoved" PointerExited="Ss_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/Ss.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="T" HorizontalAlignment="Left" Height="40" Margin="481,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="T_PointerPressed" PointerMoved="T_PointerMoved" PointerExited="T_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/T.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="U" HorizontalAlignment="Left" Height="40" Margin="550,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="43" PointerPressed="U_PointerPressed" PointerMoved="U_PointerMoved" PointerExited="U_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/U.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="Uu" HorizontalAlignment="Left" Height="40" Margin="612,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="43" PointerPressed="Uu_PointerPressed" PointerMoved="Uu_PointerMoved" PointerExited="Uu_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/Uu.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="V" HorizontalAlignment="Left" Height="40" Margin="676,370,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="V_PointerPressed" PointerMoved="V_PointerMoved" PointerExited="V_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/V.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="Y" HorizontalAlignment="Left" Height="40" Margin="402,427,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="Y_PointerPressed" PointerMoved="Y_PointerMoved" PointerExited="Y_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/Y.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="Z" HorizontalAlignment="Left" Height="40" Margin="461,427,0,0" Stroke="Black" VerticalAlignment="Top" Width="41" PointerPressed="Z_PointerPressed" PointerMoved="Z_PointerMoved" PointerExited="Z_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/Z.png"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="Cc" HorizontalAlignment="Left" Height="40" Margin="361,253,0,0" Stroke="Black" VerticalAlignment="Top" Width="42" PointerPressed="Cc_PointerPressed" PointerMoved="Cc_PointerMoved" PointerExited="Cc_PointerExited">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/letter/Cc.png"/>
</Ellipse.Fill>
</Ellipse>
<TextBox x:Name="txtDeneme" HorizontalAlignment="Left" Margin="991,77,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="208"/>
<Image HorizontalAlignment="Left" Height="100" Margin="1032,264,0,0" VerticalAlignment="Top" Width="100"/>
<Ellipse x:Name="elpBody" HorizontalAlignment="Left" Height="257" Margin="1015,333,0,0" Stroke="Black" VerticalAlignment="Top" Width="131" StrokeThickness="0">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/bod.jpg"/>
</Ellipse.Fill>
</Ellipse>
<Ellipse x:Name="elpHead" HorizontalAlignment="Left" Height="127" Margin="1004,237,0,0" Stroke="Black" VerticalAlignment="Top" Width="142" StrokeThickness="0">
<Ellipse.Fill>
<ImageBrush ImageSource="Images/gargamel.jpg"/>
</Ellipse.Fill>
</Ellipse>
<TextBlock x:Name="txbWriting" HorizontalAlignment="Left" Margin="7.819,652,0,0" TextWrapping="Wrap" Text="TextBlockTextBlockTextBlock" VerticalAlignment="Top" Height="86" Width="1348.372" FontFamily="Ravie" FontSize="48" LineHeight="8" TextAlignment="Center" CharacterSpacing="4" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" Foreground="#FFF9DDDD" FontWeight="Bold">
<TextBlock.RenderTransform>
<CompositeTransform SkewX="4"/>
</TextBlock.RenderTransform>
</TextBlock>
<StackPanel x:Name="stcpanelInformation" HorizontalAlignment="Left" Height="227" Margin="382,183,0,0" VerticalAlignment="Top" Width="459" Background="#FF102525">
<TextBlock x:Name="txtInformation" TextWrapping="Wrap" Text="TextBlock" Foreground="#FFDDF7E1" FontSize="24" FontFamily="Chiller"/>
</StackPanel>
<Ellipse x:Name="elpContinue" HorizontalAlignment="Left" Height="41" Margin="786.643,350.511,0,0" Stroke="Black" StrokeThickness="0" VerticalAlignment="Top" Width="45.977" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto" PointerPressed="elpContinue_PointerPressed" PointerMoved="elpContinue_PointerMoved" PointerExited="elpContinue_PointerExited">
<Ellipse.RenderTransform>
<CompositeTransform Rotation="-90.716"/>
</Ellipse.RenderTransform>
<Ellipse.Fill>
<ImageBrush ImageSource="Images/arrow.jpg"/>
</Ellipse.Fill>
</Ellipse>
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Toplam Puan: " VerticalAlignment="Top" FontSize="22" Foreground="#FF0C110E" FontFamily="Algerian" Margin="0,10,0,0"/>
<TextBlock x:Name="txbScore" HorizontalAlignment="Left" Height="106" Margin="168,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="197" FontSize="48" FontFamily="Chiller"/>
<TextBlock x:Name="txtbNowScore" HorizontalAlignment="Left" Margin="208,179,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontFamily="Chiller" FontSize="48" Width="72"/>
<TextBlock HorizontalAlignment="Left" Margin="0,192,0,0" TextWrapping="Wrap" Text="Kelimenin Değeri" VerticalAlignment="Top" FontFamily="Algerian" FontSize="22" Foreground="#FF191111"/>
<TextBlock x:Name="txtbLevel" HorizontalAlignment="Left" Margin="543,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="54" FontFamily="Chiller" FontSize="24"/>
<TextBlock HorizontalAlignment="Left" Margin="436,10,0,0" TextWrapping="Wrap" Text="Seviye: " VerticalAlignment="Top" FontFamily="Algerian" FontSize="22" Foreground="#FF292424"/>

</Grid>
</Page>

[/php]

Burada toplam puanı, seviyeyi ve kelimenin puanını tutan textblock elemenleri bulunuyor.Birde en altta tahmin edilecek kelimeyi tuttugumuz textblox elementi bulunuyor.Yan taraftaki gargameli parcalara boldum.Baş, govde, kollar ve bacaklar olmak uzere.Tabi bunlar icin ayrı ayrı elipse koydum.Elipsin imageSource larını tek tek gargamelin kafasını, govdesini, sag ve sol kolunu en son olarak sag ve sol bacaklarını ayrı ayrı koydum.Yani toplamda 6 adet elipse kullandım (sadece resim kısmında).

Harflerin de hepsi ayrı ayrı birer elipse dir.Yine aynı şekilde bunlarada background resim ekledim. En ondeki siyah renkteki stackpanel ise ilk oyuna girdiginde yada kelime bildiginde yada kelime bilemediginde yani game over oldugunda gorunur oluyor ve oyuncuyu bilgilendiriyor.

Kod kısmı çok karışık ve cok amatorce oldu.Biraz baştan savma oldu diyebilirim.Çunku gerçekten çok yogunum.Bunu yapabilmek icin bir gunumu harcadım diyebilirim.Tasarım kısmı gercekten cok zaman kaybettiriyor.

kod kısmında kullandıgım simple clası

[php]

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Storage;

namespace HangMan
{
class simple
{
public static int gameOver=0;
public static int level = 1;
public static int health = 6;
public static int totolScore = 0;
public static int nowPoint = 0;
public static int letterCount = 0;
public static int gameState = -1;

&nbsp;

}
}

[/php]

Yeni oyun kod sayfası

[php]

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Popups;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using System.IO;
using System.Text;
using System.Collections;
using Windows.Storage;
using Windows.Storage.AccessCache;
using System.Threading.Tasks;
using Windows.ApplicationModel;
using System.Text.RegularExpressions;

&nbsp;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace HangMan
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class NewGame : Page
{

static char[] character;
static char[] initCharakter;
static char[] initCharakter0;
static String isim="";
public NewGame()
{
ReadTextFile(@"MyFolder\words.txt");
// FileRead();
this.InitializeComponent();
txbWriting.Text = "";
mistakeControl();
txtInformation.Text = simple.level + ". Seviye\nHazır Mısın?";
//Class1 myClass = new Class1(isim);

txbWriting.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

txtbNowScore.Text = "0";
txbScore.Text = simple.totolScore.ToString();
txtbLevel.Text = simple.level.ToString();

}

/// <summary>
/// Invoked when this page is about to be displayed in a Frame.
/// </summary>
/// <param name="e">Event data that describes how this page was reached. The Parameter
/// property is typically used to configure the page.</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{

}
public void textBoxInıt(string writing)
{
for (int i = 0; i < writing.Length; i++)
{
txbWriting.Text += "– ";
}

}
public void textBoxConfig(char[] karakter)
{
txbWriting.Text = "";
for (int i = 0; i < karakter.Length; i++)
{
if (karakter[i]==’0′)
{
txbWriting.Text += " — ";

}
else
{
txbWriting.Text +=" "+ karakter[i]+" ";
}
}
if (simple.letterCount==isim.Length)
{
simple.level++;
simple.gameState = 1;
stcpanelInformation.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpContinue.Visibility = Windows.UI.Xaml.Visibility.Visible;
txtInformation.Text = "Tebrikler Kazandınız.\n" + simple.level + ". Seviye";
}

}
public static int seekControl(string a)
{
int counter = 0;
for (int i = 0; i <character.Length ; i++)
{
if (character[i]==Convert.ToChar(a.Trim()))
{
initCharakter[i] = Convert.ToChar(a.Trim());
counter++;
simple.letterCount++;
}
}
return counter;
}
public void pressButton(string text)
{
int cont;
if ((cont = seekControl(text.ToUpper()))!=0)
{
textBoxConfig(initCharakter);
}
else
{
simple.nowPoint -= 10 * simple.level;
nowPointConfig(10*simple.level);
simple.health -= 1;
mistakeControl();
if (simple.health == 0)
{
stcpanelInformation.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpContinue.Visibility = Windows.UI.Xaml.Visibility.Visible;
txtInformation.Text = "Kaybettiniz! Üzülmeyin.\nBaştan Başla";
simple.gameOver = 1;
simple.gameState = 0;
}

}

}
private void A_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("a");
A.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

}

private void A_PointerMoved(object sender, PointerRoutedEventArgs e)
{

Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);

if (A.Width>55)
{

}
else
{
A.Width = A.Width + 10;
}
if (A.Height>55)
{

}
else
{
A.Height += 10;
}

}

private void A_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
A.Width -= 10;
A.Height -= 10;

}

private void B_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("b");

B.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

}

private void B_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (B.Width > 55) { }
else {B.Width +=10;}
if (B.Height > 55) { }
else { B.Height += 10; }

}

private void B_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
B.Width -= 10;
B.Height -= 10;
}

private void C_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("c");

C.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void C_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);

if (C.Width > 55)
{

}
else
{
C.Width += 10;
}
if (C.Height > 55)
{

}
else
{
C.Height += 10;
}

}

private void C_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
C.Width -= 10;
C.Height -= 10;
}

private void Cc_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("Ç");
Cc.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void Cc_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (Cc.Width > 55) { }
else { Cc.Width += 10; }
if (Cc.Height > 55) { }
else { Cc.Height += 10; }
}

private void Cc_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Cc.Width -= 10;
Cc.Height -= 10;
}

private void D_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("d");

D.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void D_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (D.Width > 55) { }
else { D.Width += 10; }
if (D.Height > 55) { }
else { D.Height += 10; }
}

private void D_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
D.Width -= 10;
D.Height -= 10;

}

private void E_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("e");

E.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void E_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (E.Width > 55) { }
else { E.Width += 10; }
if (E.Height > 55) { }
else { E.Height += 10; }
}

private void E_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
E.Width -= 10;
E.Height -= 10;
}

private void F_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("f");

F.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void F_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (F.Width > 55) { }
else { F.Width += 10; }
if (F.Height > 55) { }
else { F.Height += 10; }
}

private void F_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
F.Width -= 10;
F.Height -= 10;

}

private void G_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("g");

G.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void G_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (G.Width > 55) { }
else { G.Width += 10; }
if (G.Height > 55) { }
else { G.Height += 10; }
}

private void G_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
G.Width -= 10;
G.Height -= 10;
}

private void Gg_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("Ğ");

Gg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void Gg_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (Gg.Width > 55) { }
else { Gg.Width += 10; }
if (Gg.Height > 55) { }
else { Gg.Height += 10; }
}

private void Gg_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Gg.Width -= 10;
Gg.Height -= 10;
}

private void H_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("h");

H.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void H_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (H.Width > 55) { }
else { H.Width += 10; }
if (H.Height > 55) { }
else { H.Height += 10; }
}

private void H_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
H.Width -= 10;
H.Height -= 10;

}

private void I_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("ı");

I.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void I_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (I.Width > 55) { }
else { I.Width += 10; }
if (I.Height > 55) { }
else { I.Height += 10; }
}

private void I_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
I.Width -= 10;
I.Height -= 10;
}

private void Ii_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("İ");

Ii.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void Ii_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (Ii.Width > 55) { }
else { Ii.Width += 10; }
if (Ii.Height > 55) { }
else { Ii.Height += 10; }
}

private void Ii_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Ii.Width -= 10;
Ii.Height -= 10;
}

private void J_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("j");

J.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void J_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (J.Width > 55) { }
else { J.Width += 10; }
if (J.Height > 55) { }
else { J.Height += 10; }
}

private void J_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
J.Width -= 10;
J.Height -= 10;
}

private void K_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("k");

K.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void K_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (K.Width > 55) { }
else { K.Width += 10; }
if (K.Height > 55) { }
else { K.Height += 10; }
}

private void K_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
K.Width -= 10;
K.Height -= 10;
}

private void L_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("l");

L.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void L_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (L.Width > 55) { }
else { L.Width += 10; }
if (L.Height > 55) { }
else { L.Height += 10; }
}

private void L_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
L.Width -= 10;
L.Height -= 10;
}

private void M_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("m");

M.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void M_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (M.Width > 55) { }
else { M.Width +=10; }
if (M.Height > 55) { }
else { M.Height += 10; }
}

private void M_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
M.Width -= 10;
M.Height -= 10;
}

private void N_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("n");

N.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void N_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (N.Width > 55) { }
else { N.Width += 10; }
if (N.Height > 55) { }
else { N.Height += 10; }
}

private void N_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
N.Width -= 10;
N.Height -= 10;
}

private void O_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("O");
O.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void O_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (O.Width > 55) { }
else { O.Width += 10; }
if (O.Height > 55) { }
else { O.Height += 10; }
}

private void O_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
O.Width -= 10;
O.Height -= 10;
}

private void Oo_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("ö");

Oo.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void Oo_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (Oo.Width > 55) { }
else { Oo.Width += 10; }
if (Oo.Height > 55) { }
else { Oo.Height += 10; }
}

private void Oo_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Oo.Width -= 10;
Oo.Height -= 10;
}

private void P_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("p");

P.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void P_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (P.Width > 55) { }
else { P.Width += 10; }
if (P.Height > 55) { }
else { P.Height += 10; }
}

private void P_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
P.Width -= 10;
P.Height -= 10;
}

private void R_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("r");

R.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void R_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (R.Width > 55) { }
else { R.Width += 10; }
if (R.Height > 55) { }
else { R.Height += 10; }
}

private void R_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
R.Width -= 10;
R.Height -= 10;
}

private void S_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("s");

S.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void S_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (S.Width > 55) { }
else { S.Width += 10; }
if (S.Height > 55) { }
else { S.Height += 10; }

}

private void S_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
S.Width -= 10;
S.Height -= 10;
}

private void Ss_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("Ş");

Ss.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void Ss_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (Ss.Width > 55) { }
else { Ss.Width += 10; }
if (Ss.Height > 55) { }
else { Ss.Height += 10; }
}

private void Ss_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Ss.Width -= 10;
Ss.Height -= 10;
}

private void T_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("t");

T.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void T_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (T.Width > 55) { }
else { T.Width += 10; }
if (T.Height > 55) { }
else { T.Height += 10; }
}

private void T_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
T.Width -= 10;
T.Height -= 10;
}

private void U_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("u");

U.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void U_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (U.Width > 55) { }
else { U.Width += 10; }
if (U.Height > 55) { }
else { U.Height += 10; }

}

private void U_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
U.Width -= 10;
U.Height -= 10;
}

private void Uu_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("Ü");

Uu.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void Uu_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (Uu.Width > 55) { }
else { Uu.Width += 10; }
if (Uu.Height > 55) { }
else { Uu.Height += 10; }

}

private void Uu_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Uu.Width -= 10;
Uu.Height -= 10;
}

private void V_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("v");

V.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void V_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (V.Width > 55) { }
else { V.Width += 10; }
if (V.Height > 55) { }
else { V.Height += 10; }
}

private void V_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
V.Width -= 10;
V.Height -= 10;

}

private void Y_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("y");

Y.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void Y_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (Y.Width > 55) { }
else { Y.Width += 10; }
if (Y.Height > 55) { }
else { Y.Height += 10; }
}

private void Y_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Y.Width -= 10;
Y.Height -= 10;
}

private void Z_PointerPressed(object sender, PointerRoutedEventArgs e)
{
this.pressButton("z");

Z.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}

private void Z_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
if (Z.Width > 55) { }
else { Z.Width += 10; }
if (Z.Height > 55) { }
else { Z.Height += 10; }
}

private void Z_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Z.Width -= 10;
Z.Height -= 10;
}

public void mistakeControl()
{
if (simple.health==6)
{
elpHead.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpBody.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpLeftArm.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpRightArm.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpLeftLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpRightLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

}
else if (simple.health==5)
{

elpHead.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpBody.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpLeftArm.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpRightArm.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpLeftLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpRightLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

}
else if (simple.health ==4)
{

elpHead.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpBody.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpLeftArm.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpRightArm.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpLeftLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpRightLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

}
else if (simple.health == 3)
{

elpHead.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpBody.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpLeftArm.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpRightArm.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpLeftLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpRightLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

}
else if (simple.health == 2)
{

elpHead.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpBody.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpLeftArm.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpRightArm.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpLeftLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpRightLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

}
else if (simple.health == 1)
{

elpHead.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpBody.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpLeftArm.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpRightArm.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpLeftLeg.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpRightLeg.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

}
else if (simple.health == 0)
{

elpHead.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpBody.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpLeftArm.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpRightArm.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpLeftLeg.Visibility = Windows.UI.Xaml.Visibility.Visible;
elpRightLeg.Visibility = Windows.UI.Xaml.Visibility.Visible;

}
}

private void elpContinue_PointerPressed(object sender, PointerRoutedEventArgs e)
{
if (simple.gameState==1)
{
simple.health = 6;
simple.letterCount = 0;
simple.totolScore += simple.nowPoint;
txtbNowScore.Text = simple.nowPoint.ToString();
this.Frame.Navigate(typeof(NewGame));
simple.gameState = -1;
}
else if (simple.gameState==0)
{
simple.nowPoint = 0;
simple.totolScore = 0;
simple.letterCount = 0;
simple.level = 1;
simple.health = 6;
simple.gameOver = 0;
simple.gameState = -1;
this.Frame.Navigate(typeof(NewGame));

}
else if (simple.gameState==-1)
{
txbWriting.Visibility = Windows.UI.Xaml.Visibility.Visible;
stcpanelInformation.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
elpContinue.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

Random rnd = new Random();
int estim = rnd.Next(0, 75980);
isim =CurrentFileBuffer[estim];

while (true)
{
if (isim.IndexOf(‘ ‘) >= 0 || (isim.IndexOf(‘,’) >= 0) || (isim.Length)>=13)
{
estim = rnd.Next(0, 75980);
isim = CurrentFileBuffer[estim];
}
else break;
}

initCharakter = new char[isim.Length];
character = new char[isim.Length];
for (int i = 0; i < isim.Length; i++)
{
initCharakter[i] = ‘0’;
}
simple.nowPoint = 10 * simple.level * isim.Length;
txtbNowScore.Text = simple.nowPoint.ToString();
txbScore.Text = simple.totolScore.ToString();
isim = isim.ToUpper();
textBoxInıt(isim);
character = isim.ToCharArray();
txtDeneme.Text = isim;
}

}

private void elpContinue_PointerMoved(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1);
}

private void elpContinue_PointerExited(object sender, PointerRoutedEventArgs e)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
}
public void totalScoreConfig(int a)
{
int b = Convert.ToInt32(txbScore.Text);
txbScore.Text = (a + b).ToString();

}
public void nowPointConfig(int a)
{
int b = Convert.ToInt32(txtbNowScore.Text);
txtbNowScore.Text = (b – a).ToString();

}

IList<String> CurrentFileBuffer = new List<string>();

public async void ReadTextFile(string Path)
{
var folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
var file = await folder.GetFileAsync(Path);
var read = await FileIO.ReadLinesAsync(file);
CurrentFileBuffer = read;
}

}

}

[/php]

Projeyi bitirdikten sonra paylaşmayı duşunuyorum.

Çalışır hali

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir