Лабораторная работа 5

This commit is contained in:
nikbel2004@outlook.com 2024-04-08 15:35:44 +04:00
parent f9cea4042e
commit 07f331ec78
18 changed files with 78 additions and 25 deletions

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34202.233
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab4", "Lab4\Lab4.csproj", "{E5D79941-0705-43CF-8F48-9C0FD532C9CF}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab5", "Lab5\Lab5.csproj", "{6E87FC45-CDAB-4A76-A01A-D44F275756B4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -11,15 +11,15 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E5D79941-0705-43CF-8F48-9C0FD532C9CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5D79941-0705-43CF-8F48-9C0FD532C9CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5D79941-0705-43CF-8F48-9C0FD532C9CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5D79941-0705-43CF-8F48-9C0FD532C9CF}.Release|Any CPU.Build.0 = Release|Any CPU
{6E87FC45-CDAB-4A76-A01A-D44F275756B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E87FC45-CDAB-4A76-A01A-D44F275756B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E87FC45-CDAB-4A76-A01A-D44F275756B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E87FC45-CDAB-4A76-A01A-D44F275756B4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4E809292-D6D4-4727-8BAF-CBC36EEB4783}
SolutionGuid = {7579837F-AA08-4D2A-8320-610BB818B417}
EndGlobalSection
EndGlobal

View File

@ -1,7 +1,7 @@
<Application x:Class="Lab4.App"
<Application x:Class="Lab5.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Lab4"
xmlns:local="clr-namespace:Lab5"
StartupUri="MainWindow.xaml">
<Application.Resources>

View File

@ -6,7 +6,7 @@ using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace Lab4
namespace Lab5
{
/// <summary>
/// Interaction logic for App.xaml

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 278 KiB

After

Width:  |  Height:  |  Size: 278 KiB

View File

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -1,19 +1,61 @@
<Window x:Class="Lab4.MainWindow"
<Window x:Class="Lab5.MainWindow"
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:local="clr-namespace:Lab4"
xmlns:local="clr-namespace:Lab5"
mc:Ignorable="d"
Title="MainWindow" Height="640" Width="900">
Title="MainWindow" Height="640" Width="900">
<Window.Triggers>
<EventTrigger RoutedEvent="Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard TargetProperty="Opacity" TargetName="btnAnimation1" RepeatBehavior="Forever">
<DoubleAnimation From="1.0"
To="0.1"
Duration="0:0:2"
AutoReverse="True"/>
<DoubleAnimation From="0.1"
To="1.0"
Duration="0:0:2"
BeginTime="0:0:2"/>
</Storyboard>
</BeginStoryboard>
<BeginStoryboard>
<Storyboard TargetProperty="Opacity" TargetName="btnAnimation2" RepeatBehavior="Forever">
<DoubleAnimation From="1.0"
To="0.1"
Duration="0:0:2"
AutoReverse="True"/>
<DoubleAnimation From="0.1"
To="1.0"
Duration="0:0:2"
BeginTime="0:0:2"/>
</Storyboard>
</BeginStoryboard>
<BeginStoryboard>
<Storyboard TargetProperty="Opacity" TargetName="btnAnimation3" RepeatBehavior="Forever">
<DoubleAnimation From="1.0"
To="0.1"
Duration="0:0:2"
AutoReverse="True"/>
<DoubleAnimation From="0.1"
To="1.0"
Duration="0:0:2"
BeginTime="0:0:2"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Window.Triggers>
<Window.Resources>
<ImageBrush x:Key="TileBrush" TileMode="Tile"
ViewportUnits="Absolute" Viewport="0 0 30 20"
ImageSource="E:\2 cource\TSCHMI\Labs\Lab3\Lab3\Lab3\Images\exit.png" Opacity="0.3"/>
ViewportUnits="Absolute" Viewport="0 0 30 20"
ImageSource="E:\2 cource\TSCHMI\Labs\Lab3\Lab3\Lab3\Images\exit.png" Opacity="0.3"/>
<ImageBrush x:Key="TileBrushCourse" TileMode="Tile"
ViewportUnits="Absolute" Viewport="0 0 30 20"
ImageSource="E:\2 cource\TSCHMI\Labs\Lab3\Lab3\Lab3\Images\unnamed.jpg" Opacity="0.3"></ImageBrush>
ViewportUnits="Absolute" Viewport="0 0 30 20"
ImageSource="E:\2 cource\TSCHMI\Labs\Lab3\Lab3\Lab3\Images\unnamed.jpg" Opacity="0.3"></ImageBrush>
<Style x:Key="btnPicture" TargetType="Button">
<Setter Property="Control.HorizontalAlignment" Value="Center" />
@ -104,22 +146,30 @@
<Label FontSize="18" Foreground="#FFA500" Style="{StaticResource textStyle}" >
<Bold>Инструменты</Bold>
</Label>
<Button Name="btn1" Style="{StaticResource buttons}" Margin="10">Добавить видео</Button>
<Button Name="btn1" Style="{StaticResource buttons}" Margin="10" >Добавить видео</Button>
<Button Name="btn2" Style="{StaticResource buttons}" Margin="10" >Удалить видео</Button>
<Button Name="btn3" Style="{StaticResource buttons}" Margin="10" >Сменить видео</Button>
<Button Name="btn4" Style="{StaticResource buttons}" Margin="10" Background="{StaticResource TileBrushCourse}">Включить звук</Button>
<Button Name="btn5" Style="{StaticResource buttons}" Background="{StaticResource TileBrush}" Margin="10">Выключить звук</Button>
<Button Name="btn4" Style="{StaticResource buttons}" Margin="10" Background="{StaticResource TileBrushCourse}" >Включить звук</Button>
<Button Name="btn5" Style="{StaticResource buttons}" Background="{StaticResource TileBrush}" Margin="10" >Выключить звук</Button>
<Button Name="btn6" Margin="15" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">Запуск</Button>
<Button Name="btn7" Margin="15" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">Стоп</Button>
<Button Name="btn6" Margin="15" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF" >Запуск</Button>
<Button Name="btn7" Margin="15" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF" >Стоп</Button>
<Button Margin="10" Style="{StaticResource btnPicture}">Спрятать интерфейс</Button>
<Button Margin="10" Style="{StaticResource btnPicture}">Показать интерфейс</Button>
<Button Margin="10" Style="{StaticResource btnPicture}" >Спрятать интерфейс</Button>
<Button Margin="10" Style="{StaticResource btnPicture}" >Показать интерфейс</Button>
</StackPanel>
</Border>
<ListBox x:Name="videoListBox" Grid.Column="2" Grid.Row="2" Visibility="Collapsed">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Rectangle Stroke="Black" StrokeThickness="3" Margin="10" Grid.Column="1" Grid.Row="1" MaxHeight="250"/>
<Slider Name="vol" Grid.Column="1" Grid.Row="2" Maximum="1" Value="0.5" LargeChange="0.1" SmallChange="0.01" Margin="10" VerticalAlignment="Center"/>

View File

@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
@ -9,11 +11,12 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Lab4
namespace Lab5
{
/// <summary>
/// Interaction logic for MainWindow.xaml

Binary file not shown.

BIN
Lab5/Lab5/Source/Hobbit.mp4 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Lab5/Lab5/Source/zv2.wav Normal file

Binary file not shown.

BIN
Lab5/Lab5/Source/zvuk1.mp3 Normal file

Binary file not shown.