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

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

                               CornerRadius="5">

                    <TextBlock Text="Успешно отправленные сообщения:"

                                      Foreground="White"

                                      FontWeight="Bold"/>

                </Border>

            </GroupBox.Header>

            <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">

                <ListView ItemsSource="{Binding Path=Report.SuccessContacts}"

                         ItemTemplate="{StaticResource StudentTemplate}"/>

            </ScrollViewer>

        </GroupBox>

        <GroupBox Padding="10"

                 BorderThickness="2"

                 BorderBrush="#d13333"

                 Margin="5"

                 Grid.Row="1">

 

            <GroupBox.Header>

                <Border Background="#d13333"

                               Padding="5"

                               CornerRadius="5">

                    <TextBlock Text="Не удалось отправить сообщения:"

                                      Foreground="White"

                                      FontWeight="Bold"/>

                </Border>

            </GroupBox.Header>

            <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto">

                <ListView ItemsSource="{Binding Path=Report.FailContacts}"

                         ItemTemplate="{StaticResource StudentTemplate}"/>

            </ScrollViewer>

        </GroupBox>

    </Grid>

</UserControl>

 

DistributionTreeBar.xaml

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

            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"

xmlns:ee="http://schemas.microsoft.com/expression/2010/effects"

            mc:Ignorable="d"

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

    <UserControl.Resources>

 

        <DataTemplate x:Key="DistributionTreeLevel3">

            <Border CornerRadius="5"

                   Background="#94a8ce"

                   Margin="2"

                   Padding="2"

                   DockPanel.Dock="Top"

                   Width="Auto"

                   AllowDrop="True"

                   Drop="dropToStudent">

                    <Grid DockPanel.Dock="Top">

                        <Grid.ColumnDefinitions>

                            <ColumnDefinition Width="*" />

                            <ColumnDefinition Width="*" />

                            <ColumnDefinition Width="60"/>

                        </Grid.ColumnDefinitions>

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

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

              FontWeight="Bold"

              Foreground="White"

                                  Grid.Column="1"

                                  VerticalAlignment="Center"

                                  Width="100"

                                  TextWrapping="Wrap"/>

                        <StackPanel Grid.Column="2" Orientation="Horizontal" Margin="4 0 4 0"

                                   HorizontalAlignment="Right">

                            <Button Style="{StaticResource SmsControlButton}"

                                   ToolTip="Редактировать пользователя"

                                   Click="EditContactButtonClick">

                                <Button.Content>

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

                                </Button.Content>

                            </Button>

 

                        </StackPanel>

                    </Grid>

            </Border>

        </DataTemplate>

 

        <HierarchicalDataTemplate x:Key="DistributionTreeLevel2"

  ItemsSource="{Binding Path=Contacts}"

                                 ItemTemplate="{StaticResource DistributionTreeLevel3}">

            <Border CornerRadius="5" Background="#FF2F71A9" Padding="5 2 5 3">

                <StackPanel Orientation="Horizontal">

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

                </StackPanel>

            </Border>

        </HierarchicalDataTemplate>

 

        <HierarchicalDataTemplate x:Key="DistributionTreeLevel1"

  ItemsSource="{Binding Path=Groups}"

  ItemTemplate="{StaticResource DistributionTreeLevel2}">

            <Border CornerRadius="3" Background="#FF2F71A9" Padding="5"

                   Drop="distributionList_drop"

                   AllowDrop="True">

                <StackPanel Orientation="Horizontal">

                    <StackPanel Orientation="Vertical">

                        <TextBlock Text="{Binding Path=Title}" Foreground="White" Width="100"

                                  TextWrapping="Wrap"/>

                    </StackPanel>

                    <Button HorizontalAlignment="Left"

                           Height="16"

                           Width="16"

                           Margin="2"

                           Click="EditDistributionButtin_click">

                        <Button.Content>

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

                            </Image>

                        </Button.Content>

                        <Button.ToolTip>

                            <StackPanel Orientation="Horizontal">

                                <TextBlock Text="Редактировать список рассылки" />

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

                            </StackPanel>

                        </Button.ToolTip>

                    </Button>

                    <Button HorizontalAlignment="Left"

                           Height="16"

                           Width="16"

                           Margin="2"

                           Click="SendSmsButton_click">

                        <Button.Content>

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

                            </Image>

                        </Button.Content>

                        <Button.ToolTip>

                            <StackPanel Orientation="Horizontal">

                                <TextBlock Text="Отправить SMS для списка " />

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

                            </StackPanel>

                        </Button.ToolTip>

                    </Button>

                    <Button HorizontalAlignment="Left"

                           Height="16"

                           Width="16"

                           Margin="2"

                           Click="deleteDistributionListButton_click">

                        <Button.Content>

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

                            </Image>

                        </Button.Content>

                        <Button.ToolTip>

                            <StackPanel Orientation="Horizontal">

                                <TextBlock Text="Удалить список рассылки " />

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

                            </StackPanel>

                        </Button.ToolTip>

                    </Button>

                </StackPanel>

            </Border>

        </HierarchicalDataTemplate>

    </UserControl.Resources>

   

    <Grid>

        <Grid.RowDefinitions>

            <RowDefinition Height="32" />

            <RowDefinition Height="*"/>

            <RowDefinition Height="50"/>

        </Grid.RowDefinitions>

       

        <Border Grid.Row="0"

               Style="{StaticResource TabTopHeader}"

               Background="{StaticResource MediumBlue}">

            <TextBlock Text="Списки рассылки"

                      HorizontalAlignment="Center"

                      Foreground="White"

                      FontSize="14"

                      FontWeight="Bold"/>

        </Border>

 

        <ScrollViewer VerticalScrollBarVisibility="Auto"

                     Grid.Row="1">

            <TreeView ItemsSource="{Binding СurrentDistributionLists}" ItemTemplate="{DynamicResource DistributionTreeLevel1}" ItemContainerStyle="{DynamicResource SmsTreeViewStyle}"

                 BorderThickness="0">

            <TreeView.Resources>

                <ResourceDictionary>

                    <ResourceDictionary.MergedDictionaries>

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

                    </ResourceDictionary.MergedDictionaries>

                </ResourceDictionary>

            </TreeView.Resources>

        </TreeView>

        </ScrollViewer>

 

        <Button Grid.Row="2"

               Width="32"

               Height="32"

               HorizontalAlignment="Left"

               Margin="5"

               Click="AddDistributionList_click">

            <Button.Content>

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

            </Button.Content>

        </Button>

    </Grid>

 

</UserControl>

 

 

Menu.xaml

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

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

    <Menu DockPanel.Dock="Top">

        <MenuItem Header="Файл">

            <MenuItem Header="Выход"

                     Click="exitMenuClick"></MenuItem>

        </MenuItem>

        <MenuItem Header="Инструменты">

            <MenuItem Header="Просмотр событий"

                         Click="OpenLog_click">

                <MenuItem.Icon>

                    <Image Source="/images/icons/log.png" Width="24" Height="24" />

                </MenuItem.Icon>

            </MenuItem>

            <MenuItem Header="Настройки"

                         Click="OpenSettings_click">

                <MenuItem.Icon>

                    <Image Source="/images/settings.png" Width="24" Height="24" />

                </MenuItem.Icon>

            </MenuItem>

        </MenuItem>

        <MenuItem Header="Справка">

            <MenuItem Header="Помощь"

                     Click="ShowHelp_click"/>

        </MenuItem>

    </Menu>

</UserControl>

 

 

SideBar.xaml

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

            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"

            Width="300">

    <Grid>

        <Grid.RowDefinitions>

            <RowDefinition Height=".5*"></RowDefinition>

            <RowDefinition Height="*"></RowDefinition>

            <RowDefinition Height="auto"></RowDefinition>

        </Grid.RowDefinitions>

 

        <GroupBox BorderThickness="2"

                 BorderBrush="{StaticResource ResourceKey=MediumBlue}"

                 Padding="5">

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

                           ToolTip="Создать группу">

                        <Button.Content>

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

                        </Button.Content>

                    </Button>

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

                </DockPanel>

                <ScrollViewer VerticalScrollBarVisibility="Auto">

                    <ItemsControl x:Name="groupList"

                                 ItemsSource="{Binding Path=CurrentGroups}">

                                                                                                                                                                                                                                                                                                                                                                                                                        <ItemsControl.ItemTemplate>

                    <DataTemplate>

                            <Border Margin="3"

                                   Padding="5">

                                <Grid>

                                    <Grid.ColumnDefinitions>

                                        <ColumnDefinition Width="182" />

                                        <ColumnDefinition Width="*" />

                                    </Grid.ColumnDefinitions>

                                    <StackPanel Grid.Column="0">

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

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