Вход

Курсовая работа разработка мобильного приложения для widows phone или android

Рекомендуемая категория для самостоятельной подготовки:
Курсовая работа*
Код 206678
Дата создания 06 мая 2017
Страниц 15
Мы сможем обработать ваш заказ (!) 27 апреля в 12:00 [мск]
Файлы будут доступны для скачивания только после обработки заказа.
1 600руб.
КУПИТЬ

Описание

Заключение
В ходе курсовой работы было разработано программное обеспечение для мобильного телефона Windows Phone.
Программный продукт разработан на языке C# в среде Microsoft Visual Studio for Windows Express 2013 с применением технологии Silverlight.
Цели и задачи курсовой работы выполнены полностью.


...

Содержание

СОДЕРЖАНИЕ

Введение 3
1. Выбор языка программирования и среды проектирования. 4
2. Состав программного продукта 5
3. Руководство пользователя. 6
3.1. Установка приложения на телефон 6
3.2. Экран приветствия. 9
3.3. Игровой экран 10
Заключение 14
Список используемой литературы 15
Приложение 1 Листинг программы 16


Введение

Введение
Целью курсовой работы является закрепление полученных теоретических навыков по дисциплине «Операционные системы» на практике. Задачами курсовой работы являются формализации предметной области, разработка модели данных, а также составление и программирование алгоритма решения поставленной задачи.
В рамках курсовой работы создается приложение для мобильного телефона Windows Phone – игра «Крестики-нолики». В приложении реализуется удобный интерфейс пользователя, а также реализуется простой алгоритм искусственного интеллекта для игры в крестики-нолики с компьютером.
В качестве языка программирования выбран язык C#, соответственно в качестве среды разработки программного продукта выбрано средство Microsoft Visual Studio for Windows 2013 Express. Оно является бесплатным и наиболее удобн ым по функциям редактирования, подсветки синтаксиса, автоматического завершения кода и встроенной справки по функциям.


Фрагмент работы для ознакомления

IsAttached) { // A navigation has failed; break into the debugger Debugger.Break(); } } // Code to execute on Unhandled Exceptions private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { if (Debugger.IsAttached) { // An unhandled exception has occurred; break into the debugger Debugger.Break(); } } #region Phone application initialization // Avoid double-initialization private bool phoneApplicationInitialized = false; // Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized)return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = new PhoneApplicationFrame(); RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Handle reset requests for clearing the backstack RootFrame.Navigated += CheckForResetNavigation; // Ensure we don't initialize again phoneApplicationInitialized = true; } // Do not add any additional code to this method private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e) { // Set the root visual to allow the application to render if (RootVisual != RootFrame) RootVisual = RootFrame; // Remove this handler since it is no longer needed RootFrame.Navigated -= CompleteInitializePhoneApplication; } private void CheckForResetNavigation(object sender, NavigationEventArgs e) { // If the app has received a 'reset' navigation, then we need to check // on the next navigation to see if the page stack should be reset if (e.NavigationMode == NavigationMode.Reset) RootFrame.Navigated += ClearBackStackAfterReset; } private void ClearBackStackAfterReset(object sender, NavigationEventArgs e) { // Unregister the event so it doesn't get called again RootFrame.Navigated -= ClearBackStackAfterReset; // Only clear the stack for 'new' (forward) and 'refresh' navigations if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh) return; // For UI consistency, clear the entire page stack while (RootFrame.RemoveBackEntry() != null) { ; // do nothing } } #endregion // Initialize the app's font and flow direction as defined in its localized resource strings. // // To ensure that the font of your application is aligned with its supported languages and that the // FlowDirection for each of those languages follows its traditional direction, ResourceLanguage // and ResourceFlowDirection should be initialized in each resx file to match these values with that // file's culture. For example: // // AppResources.es-ES.resx // ResourceLanguage's value should be "es-ES" // ResourceFlowDirection's value should be "LeftToRight" // // AppResources.ar-SA.resx // ResourceLanguage's value should be "ar-SA" // ResourceFlowDirection's value should be "RightToLeft" // // For more info on localizing Windows Phone apps see http://go.microsoft.com/fwlink/?LinkId=262072. // private void InitializeLanguage() { try { // Set the font to match the display language defined by the // ResourceLanguage resource string for each supported language. // // Fall back to the font of the neutral language if the Display // language of the phone is not supported. // // If a compiler error is hit then ResourceLanguage is missing from // the resource file. RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage); // Set the FlowDirection of all elements under the root frame based // on the ResourceFlowDirection resource string for each // supported language. // // If a compiler error is hit then ResourceFlowDirection is missing from // the resource file. FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection); RootFrame.FlowDirection = flow; } catch { // If an exception is caught here it is most likely due to either // ResourceLangauge not being correctly set to a supported language // code or ResourceFlowDirection is set to a value other than LeftToRight // or RightToLeft. if (Debugger.IsAttached) { Debugger.Break(); } throw; } } }}Файл finishcontent.xaml<UserControl x:Class="TicTacToe.FinishContent" 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" mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" d:DesignHeight="480" d:DesignWidth="480"> <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}"> <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="42" x:Name="text">Вы выиграли!</TextBlock> </Grid></UserControl>Файл finishcontent.xamlusing System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Navigation;using Microsoft.Phone.Controls;using Microsoft.Phone.Shell;namespace TicTacToe{ public partial class FinishContent : UserControl { public FinishContent() { InitializeComponent(); } }}Файл gamecontent.xaml<UserControl x:Class="TicTacToe.GameContent" 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" mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" d:DesignHeight="480" d:DesignWidth="480"> <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}"> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="28"></RowDefinition> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <Grid.Resources> <Style TargetType="Button"> <Setter Property="Background" Value="LightBlue"></Setter> <Setter Property="Foreground" Value="Black"></Setter> <Setter Property="FontSize" Value="48"></Setter> </Style> </Grid.Resources> <TextBlock Grid.ColumnSpan="3" HorizontalAlignment="Center" x:Name="msg">Инициализация</TextBlock> <Button x:Name="bu00" Grid.Row="1" Grid.Column="0" Click="bu00_Click">X</Button> <Button x:Name="bu01" Grid.Row="1" Grid.Column="1" Click="bu00_Click">X</Button> <Button x:Name="bu02" Grid.Row="1" Grid.Column="2" Click="bu00_Click">X</Button> <Button x:Name="bu10" Grid.Row="2" Grid.Column="0" Click="bu00_Click">X</Button> <Button x:Name="bu11" Grid.Row="2" Grid.Column="1" Click="bu00_Click">X</Button> <Button x:Name="bu12" Grid.Row="2" Grid.Column="2" Click="bu00_Click">X</Button> <Button x:Name="bu20" Grid.Row="3" Grid.Column="0" Click="bu00_Click">X</Button> <Button x:Name="bu21" Grid.Row="3" Grid.Column="1" Click="bu00_Click">X</Button> <Button x:Name="bu22" Grid.Row="3" Grid.Column="2" Click="bu00_Click">X</Button> </Grid></UserControl>Файл gamecontent.xaml.csusing System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Navigation;using Microsoft.Phone.Controls;using Microsoft.Phone.Shell;using System.Windows.Media;namespace TicTacToe{ public partial class GameContent : UserControl { public GameContent() { InitializeComponent(); } List<Button> buttons = new List<Button>(); private void bu00_Click(object sender, RoutedEventArgs e) { Button b = sender as Button; if (b!=null) { b.Content = "X"; b.IsHitTestVisible = false; computer(); } } Model model; public void GameInit(Model model) { this.model = model; buttons.Clear(); buttons.Add(bu00); buttons.Add(bu01); buttons.Add(bu02); buttons.Add(bu10); buttons.Add(bu11); buttons.Add(bu12); buttons.Add(bu20); buttons.Add(bu21); buttons.Add(bu22); foreach (var b in buttons) { b.Content = ""; b.IsHitTestVisible = true; b.FontSize = 48; } msg.Text = "Ваш ход!"; } private void computer() { string[] data = new string[9]; int i = 0; foreach (var b in buttons) { string s = b.Content as string; if (s != null) { data[i] = s; } else { data[i] = ""; } i++; } if (analyse()) return; if (data[4] == "") { step(buttons[4]); } else if (data[0] == "") { step(buttons[0]); } else if (data[0]=="X" && data[1]=="X" && data[2]=="") { step(buttons[2]); } else if (data[3] == "X" && data[4] == "X" && data[5] == "") { step(buttons[5]); } else if (data[6] == "X" && data[7] == "X" && data[8] == "") { step(buttons[8]); } else if (data[0] == "X" && data[2] == "X" && data[1] == "") { step(buttons[1]); } else if (data[3] == "X" && data[5] == "X" && data[4] == "") { step(buttons[4]); } else if (data[6] == "X" && data[8] == "X" && data[7] == "") { step(buttons[7]); } else { for (int j = 0; j < 9; j++) if (string.IsNullOrEmpty(data[j])) { step(buttons[j]); break; } } bool complete = true; foreach (var s in data) { if (string.IsNullOrEmpty(s)) complete = false; } if (analyse()) return; //if (!model.Win) //{ // model.

Список литературы

Список используемой литературы
1. Чарльз Петзольд. Программируем Windows Phone 7.- 695с ISBN: 978-0-7356-4335-2
2. Мэтью Мак-Дональд WPF: Windows Presentation Foundation в .NET 4.5 с примерами на C# 5.0 для профессионалов, 4-е издание = Pro WPF 4.5 in C# 2012: Windows Presentation Foundation in .NET 4.5, 4th edition. — М.: «Вильямс», 2013. — 1024 с. — ISBN 978-5-8459-1854-3
3. Андерсон, Крис Основы Windows Presentation Foundation. — СПб.: БХВ-Петербург, 2008. — 432 с. — ISBN 978-5-9775-0265-8



Очень похожие работы
Пожалуйста, внимательно изучайте содержание и фрагменты работы. Деньги за приобретённые готовые работы по причине несоответствия данной работы вашим требованиям или её уникальности не возвращаются.
* Категория работы носит оценочный характер в соответствии с качественными и количественными параметрами предоставляемого материала. Данный материал ни целиком, ни любая из его частей не является готовым научным трудом, выпускной квалификационной работой, научным докладом или иной работой, предусмотренной государственной системой научной аттестации или необходимой для прохождения промежуточной или итоговой аттестации. Данный материал представляет собой субъективный результат обработки, структурирования и форматирования собранной его автором информации и предназначен, прежде всего, для использования в качестве источника для самостоятельной подготовки работы указанной тематики.
bmt: 0.00525
© Рефератбанк, 2002 - 2024