Разработка системы рассылки СМС сообщений

Автор работы: Пользователь скрыл имя, 29 Января 2013 в 17:29, курсовая работа

Краткое описание

Целью курсовой работы является автоматизация рассылки SMS сообщений, для ускорения и облегчения работы по оповещению студентов.
Задачей, для достижения данной цели является создание приложения SmsMessenger, которое будет производить автоматизацию рассылки SMS.

Содержание

Введение 2
1. Описание предметной области 3
1.1. Предметная область курсового проекта 3
1.2. Информационно-логическая модель предметной области 3
2. Создание приложения SmsMessenger 6
2.1. Логическое проектирование 6
2.2. Модель данных 7
2.3. Описание представлений и представителей 8
3. Тестирование программы 17
Заключение 25
Список литературы 26
Пиложение А. Задание на курсовой проект 27
Приложение Б. Структура исходных файлов 28
Приложение В. XAML код всех представлений и библиотек ресурсов 30
Приложение Г. Код классов программы. 62

Вложенные файлы: 1 файл

Kursovik.docx

— 6.63 Мб (Скачать файл)

                 ItemsSource="{Binding Path=ViewModel.Groups}" ItemTemplate="{DynamicResource TreeLevel1}" ItemContainerStyle="{DynamicResource SmsTreeViewStyle}"

                 BorderThickness="0"

                 Grid.Row="2">

            <TreeView.Resources>

                <ResourceDictionary>

                    <ResourceDictionary.MergedDictionaries>

                        <ResourceDictionary Source="/Resources/SmsTreeTemplates.xaml"/>

                    </ResourceDictionary.MergedDictionaries>

                </ResourceDictionary>

            </TreeView.Resources>

        </TreeView>

       

        <DockPanel Grid.Row="1">

            <StackPanel Orientation="Vertical" DockPanel.Dock="Top">

                <Label Target="{Binding ElementName=title }" Content="Название рассылки:"

                      Margin="5 5 5 2"

                      Padding="0"></Label>

                <TextBox x:Name="title"

                        Style="{StaticResource ResourceKey=ContactEditorField}"

                        HorizontalAlignment="Left"

                        Margin="5 0 5 5"

                        Text="{Binding Path=DistributionList.Title}"/>

            </StackPanel>

        </DockPanel>

 

        <Button Grid.Row="3"

               Click="SaveButton_click"

               Width="32"

               Height="32"

               HorizontalAlignment="Left"

               Margin="4">

            <Button.Content>

                <Image Source="/Images/save.png" />

            </Button.Content>

        </Button>

    </Grid>

</UserControl>

 

 

EditGroupView.xaml

<UserControl x:Class="SmsMessanger.Views.EditGroupView"

            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

            mc:Ignorable="d"

            d:DesignHeight="300" d:DesignWidth="300">

    <DockPanel>

        <StackPanel Grid.Row="7"

                       Grid.Column="2"

                       DockPanel.Dock="Bottom">

            <Button x:Name="SaveButton"

               Click="saveButton_Click"

               Grid.Row="2"

               Width="32"

               Height="32"

               HorizontalAlignment="Left"

               Margin="4">

                <Button.Content>

                    <Image Source="/Images/save.png" />

                </Button.Content>

                <Button.ToolTip>

                    <TextBlock Text="Сохранить" />

                </Button.ToolTip>

            </Button>

        </StackPanel>

 

        <WrapPanel>

            <GroupBox Padding="10"

                         BorderThickness="2"

                         BorderBrush="#145e9d">

 

                <GroupBox.Header>

                    <Border Background="#145e9d"

                               Padding="5"

                               CornerRadius="5">

                        <TextBlock Text="Информация о Группе"

                                      Foreground="White"

                                      FontWeight="Bold"/>

                    </Border>

                </GroupBox.Header>

 

                <Grid>

                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width="auto"/>

                    </Grid.ColumnDefinitions>

                    <StackPanel Orientation="Vertical"

                           DockPanel.Dock="Right"

                           Grid.Column="1"

                           VerticalAlignment="Top">

 

                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">

                            <Label Content="Название:"

                         Target="{Binding ElementName=title}" />

                            <TextBox x:Name="title"

                           Text="{Binding Path=Group.Title}"

                           Style="{StaticResource ResourceKey=ContactEditorField}"/>

                        </StackPanel>

 

                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">

                            <Label Content="Год начала обучения:"

                          Target="{Binding ElementName=firstYear}" />

                            <TextBox x:Name="firstYear"

                            Text="{Binding Path=Group.LastYear}"

                            Style="{StaticResource ResourceKey=ContactEditorField}"/>

                        </StackPanel>

 

                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">

                            <Label Content="Год выпуска:"

                          Target="{Binding ElementName=lastYear}" />

                            <TextBox x:Name="lastYear"

                            Text="{Binding Path=Group.LastYear}"

                            Style="{StaticResource ResourceKey=ContactEditorField}"/>

                        </StackPanel>

 

                    </StackPanel>

                </Grid>

            </GroupBox>

 

 

        </WrapPanel>

    </DockPanel>

</UserControl>

 

 

EditSmsTemplateGroupView.xaml

<UserControl x:Class="SmsMessanger.Views.EditSmsTemplateGroupView"

            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

            mc:Ignorable="d"

            d:DesignHeight="300" d:DesignWidth="300">

    <Grid>

        <Grid.RowDefinitions>

            <RowDefinition Height="32" />

            <RowDefinition Height="*" />

            <RowDefinition Height="70" />

        </Grid.RowDefinitions>

        <Border CornerRadius="0 0 32 32"

               Background="{StaticResource MediumBlue}">

            <Viewbox MaxWidth="250">

            <TextBlock Text="Редактирование группы шаблонов"

                      Foreground="White"

                      FontWeight="Bold"

                      FontFamily="Arial"

                      FontSize="18"

                      VerticalAlignment="Center"

                      HorizontalAlignment="Center"/>

            </Viewbox>

        </Border>

       

        <Grid Grid.Row="1">           

            <StackPanel Orientation="Vertical"

                       HorizontalAlignment="Center"

                       VerticalAlignment="Center"

                       DockPanel.Dock="Right">

                <TextBlock Text="Название" VerticalAlignment="Center" HorizontalAlignment="Center"

                          Margin="0 0 10 0"/>

                <TextBox HorizontalAlignment="Right" VerticalAlignment="Center" Width="200"

                        Text="{Binding Path=SmsTemplateGroup.Title}"/>

            </StackPanel>

        </Grid>

        <StackPanel Orientation="Horizontal"

                   VerticalAlignment="Center"

                   HorizontalAlignment="Center"

                   Grid.Row="2">

        <Button Click="saveButton_click">

            <Button.Content>

                    <Image Source="/Images/save.png" />

            </Button.Content>

                <Button.ToolTip>

                    <TextBlock Text="Сохранить"/>

                </Button.ToolTip>

            </Button>

        </StackPanel>

    </Grid>

</UserControl>

 

 

EditSmsView.xaml

<UserControl x:Class="SmsMessanger.Views.EditSmsView"

            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

            mc:Ignorable="d"

            d:DesignHeight="300" d:DesignWidth="300">

    <Grid>

        <Grid.RowDefinitions>

            <RowDefinition Height="*" />

            <RowDefinition Height="40" />

        </Grid.RowDefinitions>

 

        <Button x:Name="SaveButton"

               Click="saveButton_Click"

               Grid.Row="2"

               Width="32"

               Height="32"

               HorizontalAlignment="Left"

               Margin="4">

            <Button.Content>

                <Image Source="/Images/save.png" />

            </Button.Content>

            <Button.ToolTip>

                <TextBlock Text="Сохранить" />

            </Button.ToolTip>

        </Button>

 

        <GroupBox Padding="10"

                     BorderThickness="2"

                     BorderBrush="#145e9d"

                     Grid.Row="0">

                <GroupBox.Header>

                    <Border Background="#145e9d"

                               Padding="5"

                               CornerRadius="5">

                        <TextBlock Text="Редактирование SMS"

                                      Foreground="White"

                                      FontWeight="Bold"/>

                    </Border>

                </GroupBox.Header>

 

                <Grid>

                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width="auto"/>

                    </Grid.ColumnDefinitions>

                    <StackPanel Orientation="Vertical"

                           DockPanel.Dock="Right"

                           Grid.Column="1"

                           VerticalAlignment="Top">

 

                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">

                            <Label Content="Заголовок:"

                         Target="{Binding ElementName=title}" />

                            <TextBox x:Name="title"

                           Text="{Binding Path=SmsTemplate.Title}"

                           Style="{StaticResource ResourceKey=ContactEditorField}"/>

                        </StackPanel>

 

                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">

                            <Label Content="Текст:"

                          Target="{Binding ElementName=text}" />

                            <TextBox x:Name="text"

                            Text="{Binding Path=SmsTemplate.Text}"

                            Style="{StaticResource ResourceKey=ContactEditorField}"

                                    MinLines="5"

                                    TextWrapping="Wrap"/>

                        </StackPanel>

 

                    </StackPanel>

                </Grid>

            </GroupBox>

 

    </Grid>

</UserControl>

 

 

LogView.xaml

<UserControl x:Class="SmsMessanger.Views.LogView"

            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

            mc:Ignorable="d"

            d:DesignHeight="300" d:DesignWidth="500">

    <UserControl.Resources>

        <DataTemplate x:Key="LogEventTemplate">

            <StackPanel Orientation="Horizontal">

                <Image Source="{Binding Path=MiniImage}" />

                <TextBlock Text="{Binding Path=Date}"

                          Margin="5 0 5 0"/>

                <TextBlock Text="-"/>

                <TextBlock Text="{Binding Path=Text}"

                          Margin="5 0 5 0"/>

            </StackPanel>

        </DataTemplate>

    </UserControl.Resources>

   

    <DockPanel>

        <DockPanel DockPanel.Dock="Top">

            <StackPanel Orientation="Horizontal"

                       Margin="2">

                <TextBlock Text="Начало периода:"

                          VerticalAlignment="Center"

                          Margin="3"/>

                <DatePicker x:Name="BeginDatePicker"

                           SelectedDate="{Binding BeginDate}"/>

                <TextBlock Text="Конец периода:"

                          VerticalAlignment="Center"

                          Margin="3"/>

                <DatePicker x:Name="EndDatePicker"

                           SelectedDate="{Binding EndDate}"/>

            </StackPanel>

        </DockPanel>

       

        <ScrollViewer VerticalScrollBarVisibility="Auto">

            <ListView x:Name="eventsList"

                     ItemsSource="{Binding Path=CurrentLogEvents}"

                     ItemTemplate="{StaticResource LogEventTemplate}">

            </ListView>

        </ScrollViewer>

    </DockPanel>

</UserControl>

 

 

SendSmsByListView.xaml

<UserControl x:Class="SmsMessanger.Views.SendSmsByListView"

            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

            mc:Ignorable="d"

            d:DesignHeight="300" d:DesignWidth="500">

    <UserControl.Resources>

 

        <DataTemplate x:Key="TreeLevel2">

            <Border CornerRadius="5" Background="#94a8ce" Margin="2" Padding="2" DockPanel.Dock="Top" Width="Auto">

                <Grid DockPanel.Dock="Top" Width="200">

                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width="40" />

                        <ColumnDefinition Width="*" />

                        <ColumnDefinition Width="40" />

                    </Grid.ColumnDefinitions>

                    <Image Source="{Binding Path=Photo}" Width="24" Height="24" Stretch="Uniform" Margin="3 0 8 0" HorizontalAlignment="Left" />

                    <TextBlock Text="{Binding Path=Fio}"

              FontWeight="Bold"

Информация о работе Разработка системы рассылки СМС сообщений