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

Автор работы: Пользователь скрыл имя, 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 Мб (Скачать файл)

                                                      Margin="5 0 0 0"

                                                      FontWeight="Bold"/>

                                    </StackPanel>

                                    <StackPanel Orientation="Horizontal"

                                                   VerticalAlignment="Center"

                                                   HorizontalAlignment="Right"

                                                   Grid.Column="1">

                                        <Button Style="{StaticResource ResourceKey=SideBarControlButton}"

                                                   Click="editGroupButton_Click"

                                               ToolTip="Редактировать группу">

                                            <Button.Content>

                                                <Image Source="/Images/Edit32.png" Stretch="Uniform" />

                                            </Button.Content>

                                        </Button>

 

                                        <ToggleButton Style="{StaticResource ResourceKey=SideBarControlButton}"

                                                     Click="editContactButton_Click"

                                                     Checked="TooGleUsersButton_checked"

                                                     Unchecked="TooGleUsersButton_unChecked"

                                                     ToolTip="Показать студентов группы">

                                            <ToggleButton.Content>

                                                <Image Source="/Images/User32.png" Stretch="Uniform" />

                                            </ToggleButton.Content>

                                        </ToggleButton>

 

                                        <Button Style="{StaticResource ResourceKey=SideBarControlButton}"

                                                   Click="addUserToGroupButton_Click"

                                               ToolTip="Добавить студента в группу">

                                            <Button.Content>

                                                <Image Source="/Images/AddUser32.png" Stretch="Uniform" />

                                            </Button.Content>

                                        </Button>

 

                                        <Button Style="{StaticResource ResourceKey=SideBarControlButton}"

                                                   Click="deleteGroupButton_click"

                                               ToolTip="Удалить группу">

                                            <Button.Content>

                                                <Image Source="/Images/Delete32.png" Stretch="Uniform" />

                                            </Button.Content>

                                        </Button>

                                    </StackPanel>

                                </Grid>

                            </Border>

                        </DataTemplate>

                </ItemsControl.ItemTemplate>

                    </ItemsControl>

                </ScrollViewer>

               

            </DockPanel>

        </GroupBox>

       

        <GroupBox BorderThickness="2"

                 BorderBrush="{StaticResource ResourceKey=MediumBlue}"

                 Padding="5"

                 Grid.Row="1">

            <GroupBox.Header>

                <Border Background="{StaticResource ResourceKey=MediumBlue}"

                       CornerRadius="5"

                       Padding="5">

                    <TextBlock Text="Студенты:"

                              FontWeight="Bold"

                              Foreground="White"/>

                </Border>

            </GroupBox.Header>

            <DockPanel>

               

                <DockPanel DockPanel.Dock="Bottom">

                    <Button Width="32" DockPanel.Dock="Left"

                           Click="newContactButton_Click"

                           ToolTip="Создать студента">

                        <Button.Content>

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

                        </Button.Content>

                    </Button>

                    <TextBlock DockPanel.Dock="Left"></TextBlock>

                </DockPanel>

               

                <ScrollViewer VerticalScrollBarVisibility="Auto">

                    <ItemsControl x:Name="studetnsList"

                             ItemsSource="{Binding Path=CurrentContacts}"

                             >

                        <ItemsControl.ItemTemplate>

                            <DataTemplate>

                                <Border Margin="3"

                                       Padding="5"

                                       AllowDrop="True"

                                       Drop="dropToStudent">

                                    <Grid>

                                                        <Grid.ColumnDefinitions>

                                        <ColumnDefinition Width="32" />

                                        <ColumnDefinition Width="150" />

                                        <ColumnDefinition Width="*" />

                                    </Grid.ColumnDefinitions>

                                                                <Image Grid.Column="0"

                                              Source="{Binding Path=Photo}"

                                              Stretch="Uniform"

                                              DockPanel.Dock="Left"

                                              Width="32"

                                              Height="32"/>

                                                                            <StackPanel Grid.Column="1">

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

                                                      Margin="5 0 0 0"

                                                      FontWeight="Bold"/>

                                            <TextBlock Text="{Binding Path=Group.Title, StringFormat=Группа: \{0\}}"

                                                      Margin="5 0 0 0"/>

                                            <TextBlock Text="{Binding Path=CellPhone, StringFormat=Сотовый: \{0\}}"

                                                      Margin="5 0 0 0"/>

                                        </StackPanel>

                                            <StackPanel Orientation="Horizontal"

                                                       VerticalAlignment="Center"

                                                       HorizontalAlignment="Right"

                                                       Grid.Column="2">

                                                <Button Style="{StaticResource ResourceKey=SideBarControlButton}"

                                                       Click="editContactButton_Click"

                                                       ToolTip="Редактировать студента">

                                                    <Button.Content>

                                                        <Image Source="/Images/Edit32.png" Stretch="Uniform" />

                                                    </Button.Content>

                                                </Button>

                                                <Button Style="{StaticResource ResourceKey=SideBarControlButton}"

                                                       ToolTip="Отправить SMS"

                                                       Click="sendSmsToContact_button">

                                                <Button.Content>

                                                    <Image Source="/Images/Chat32.png" Stretch="Uniform" />

                                                    </Button.Content>

                                                </Button>

                                                <Button Style="{StaticResource ResourceKey=SideBarControlButton}"

                                                       Click="deleteContactButton_click"

                                                       ToolTip="Удалить студента">

                                                    <Button.Content>

                                                        <Image Source="/Images/Delete32.png" Stretch="Uniform" />

                                                    </Button.Content>

                                                </Button>

                                            </StackPanel>

                                    </Grid>

                                </Border>

                            </DataTemplate>

                        </ItemsControl.ItemTemplate>

 

                    </ItemsControl>

                </ScrollViewer>

            </DockPanel>

        </GroupBox>

    </Grid>

</UserControl>

 

 

SmsTemplateBar.xaml

<UserControl x:Class="SmsMessanger.UserControls.SmsTemplateBar"

            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">

    <UserControl.Resources>

 

        <DataTemplate x:Key="SmsLevel">

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

                   MouseDown="smsTemplate_mouseDown"

                   MouseMove="smsTemplate_mouseMove">

                <DockPanel>

                    <Grid DockPanel.Dock="Top">

                        <Grid.ColumnDefinitions>

                            <ColumnDefinition Width="*" />

                            <ColumnDefinition Width="50"/>

                        </Grid.ColumnDefinitions>

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

              DockPanel.Dock="Top"

              FontWeight="Bold"

              Foreground="White"

                                  Grid.Column="0"

                                  Width="150"/>

                        <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">

                            <Button Style="{StaticResource SmsControlButton}"

                               Click="editSmsTemplateButton_click"

                                   ToolTip="Редактировать">

                                <Button.Content>

                                    <Image Source="/Images/Edit32.png" Stretch="Uniform"/>

                                </Button.Content>

                            </Button>

                           

                            <Button Style="{StaticResource SmsControlButton}"

                                   Click="DeleteSmsTemplateButton_click"

                                   ToolTip="Удалить шаблон">

                                <Button.Content>

                                    <Image Source="/Images/Delete32.png" Stretch="Uniform"/>

                                </Button.Content>

                            </Button>

 

                        </StackPanel>

                    </Grid>

                    <TextBlock Text="{Binding Path=Text}" DockPanel.Dock="Bottom" TextWrapping="Wrap" Height="auto" MaxWidth="180" HorizontalAlignment="Left"/>

                </DockPanel>

            </Border>

        </DataTemplate>

 

        <HierarchicalDataTemplate x:Key="SmsGroupsLevel"

  ItemsSource="{Binding Path=SmsTemplates}"

  ItemTemplate="{StaticResource SmsLevel}">

            <Border CornerRadius="5" Background="#FF2F71A9" Margin="0,2" Padding="5">

                <StackPanel Orientation="Horizontal">

                    <TextBlock Text="{Binding Path=Title}" Foreground="White"></TextBlock>

                    <Button HorizontalAlignment="Left"

                           Height="24"

                           Width="24"

                           Margin="5 2 2 2"

                           Style="{DynamicResource TransparentButton}"

                           Click="AddSmsTemplateButton_click">

                        <Button.Content>

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

                        </Button.Content>

                        <Button.ToolTip>

                            <StackPanel Orientation="Horizontal">

                                <TextBlock Text="Создать шаблон SMS для группы " />

                                <TextBlock Text="{Binding Path=Title, StringFormat=\{0\}}" />

                            </StackPanel>

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