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

This commit is contained in:
nikbel2004@outlook.com 2024-04-05 11:46:20 +04:00
parent 1ab51b7b8a
commit aa02bd5976
16 changed files with 217 additions and 109 deletions

View File

@ -1,10 +0,0 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

View File

@ -1,11 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>

View File

@ -1,73 +0,0 @@
<Window x:Class="Lab2.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:Lab2"
mc:Ignorable="d"
Title="MainWindow" Height="800" Width="1200">
<Grid x:Name="MainGrid" Background="AliceBlue">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Border BorderBrush="#FFA500" BorderThickness="4" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2">
<StackPanel Name="ButtonPanel" Background="#5F5F5F">
<Image Source="E:\2 cource\TSCHMI\labs\Lab2\Lab2\Lab2\src\free2.png" Margin="25"/>
<Button Margin="20" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">
Галерея
</Button>
<Button Margin="20" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">
Клипы
</Button>
<Button Margin="20" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">
Редактор
</Button>
<Button Margin="20" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">
Корзина
</Button>
<Button Margin="20" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">
Просмотр видео
</Button>
</StackPanel>
</Border>
<Border Grid.Column="1" Grid.Row="0" BorderBrush="#FFA500" BorderThickness="0, 4, 4, 4" Grid.ColumnSpan="2" Background="#5F5F5F">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Label FontSize="18" Foreground="#FFA500" VerticalAlignment="center">
<Bold> Видеоплеер UlPlayer </Bold>
</Label>
</WrapPanel>
</Border>
<Border Grid.Column="2" Grid.Row="1" BorderBrush="DarkOliveGreen" BorderThickness="3, 0, 0, 0">
<StackPanel>
<Label FontSize="18" Foreground="#FFA500" HorizontalAlignment="Center">
<Bold>Инструменты</Bold>
</Label>
<Button Margin="15" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">
Запуск
</Button>
<Button Margin="15" Foreground="Blue" BorderBrush="#FFA500" BorderThickness="3" Background="#90F5DF">
Пуск
</Button>
</StackPanel>
</Border>
<DockPanel Grid.Column="1" Grid.Row="1">
<MediaElement x:Name="LectVideo" Grid.Column="3" HorizontalAlignment="Left" Margin="0,0,0,0" Grid.Row="1" Source="" Volume="0" LoadedBehavior="Manual" Stretch="Fill">
<MediaElement.Style>
<Style/>
</MediaElement.Style>
</MediaElement>
</DockPanel>
</Grid>
</Window>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34622.214
VisualStudioVersion = 17.7.34202.233
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab2", "Lab2\Lab2.csproj", "{53416734-E4DD-4E45-9FBA-AD26097BEA8F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab3", "Lab3\Lab3.csproj", "{4C08AD9D-C600-4AE3-A1A9-8F091C10C357}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -11,15 +11,15 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{53416734-E4DD-4E45-9FBA-AD26097BEA8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53416734-E4DD-4E45-9FBA-AD26097BEA8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53416734-E4DD-4E45-9FBA-AD26097BEA8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53416734-E4DD-4E45-9FBA-AD26097BEA8F}.Release|Any CPU.Build.0 = Release|Any CPU
{4C08AD9D-C600-4AE3-A1A9-8F091C10C357}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C08AD9D-C600-4AE3-A1A9-8F091C10C357}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C08AD9D-C600-4AE3-A1A9-8F091C10C357}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C08AD9D-C600-4AE3-A1A9-8F091C10C357}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9792C90A-8C03-49A8-862B-A01F8115DAE1}
SolutionGuid = {DA7E26C5-8A91-4254-8966-F6347AE928E4}
EndGlobalSection
EndGlobal

View File

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

View File

@ -1,8 +1,12 @@
using System.Configuration;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace Lab2
namespace Lab3
{
/// <summary>
/// Interaction logic for App.xaml
@ -10,5 +14,4 @@ namespace Lab2
public partial class App : Application
{
}
}

10
Lab3/Lab3/AssemblyInfo.cs Normal file
View File

@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

BIN
Lab3/Lab3/Images/exit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
Lab3/Lab3/Images/foto.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

BIN
Lab3/Lab3/Images/foto2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
Lab3/Lab3/Images/foto3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

56
Lab3/Lab3/Lab3.csproj Normal file
View File

@ -0,0 +1,56 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<Page Update="MainWindow.xaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Page>
</ItemGroup>
<ItemGroup>
<Folder Include="Source\" />
</ItemGroup>
<ItemGroup>
<None Update="Images\exit.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Images\foto.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Images\foto2.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Images\foto3.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Images\unnamed.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Source\Forsazh.mp4">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Source\Hobbit.mp4">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Source\Kung-Fu-Panda.mp4">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Source\Piraty-Caribean.mp4">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Source\zv2.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Source\zvuk1.mp3">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

125
Lab3/Lab3/MainWindow.xaml Normal file
View File

@ -0,0 +1,125 @@
<Window x:Class="Lab3.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:Lab3"
mc:Ignorable="d"
Title="MainWindow" Height="640" Width="900">
<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"/>
<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>
<Style x:Key="btnPicture" TargetType="Button">
<Setter Property="Control.HorizontalAlignment" Value="Center" />
<Setter Property="TextBlock.Background" Value="#90F5DF" />
<Setter Property="TextBlock.Foreground" Value="Blue" />
<Setter Property="FontFamily" Value="Times New Roman"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Border.BorderBrush" Value="#FFA500"/>
<Setter Property="Border.BorderThickness" Value="3"/>
</Style>
<Style x:Key="buttons" TargetType="Button">
<Setter Property="FontFamily" Value="Times New Roman"/>
<Setter Property="FontSize" Value="16"/>
</Style>
<Style x:Key="Title" TargetType="Label">
<Setter Property="FontFamily" Value="Book Antiqua"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style x:Key="textStyle">
<Setter Property="TextBlock.FontFamily" Value="Book Antiqua"/>
<Setter Property="TextBlock.FontSize" Value="12"/>
<Setter Property="TextBlock.Foreground" Value="#191970"/>
<Setter Property="TextBlock.Margin" Value="10"/>
<Setter Property="TextBlock.MaxWidth" Value="250" />
<Setter Property="Control.VerticalAlignment" Value="Center" />
<Setter Property="Control.HorizontalAlignment" Value="Center" />
</Style>
<SolidColorBrush x:Key="OrangeBrush" Color="#FFA500" />
</Window.Resources>
<Grid x:Name="MainGrid" Background="AliceBlue">
<Grid.RowDefinitions>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="1.5*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<Border BorderBrush="#FFA500" BorderThickness="4" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3">
<StackPanel Name="ButtonPanel" Background="#5F5F5F">
<Image Source="E:\2 cource\TSCHMI\Labs\Lab3\Lab3\Lab3\Images\unnamed.jpg" Margin="25"/>
<Button Margin="20" Foreground="Blue" BorderThickness="3" BorderBrush="{StaticResource OrangeBrush}" Background="#90F5DF">
Галерея
</Button>
<Button Margin="20" Foreground="Blue" BorderBrush="{StaticResource OrangeBrush}" BorderThickness="3" Background="#90F5DF">
Клипы
</Button>
<Button x:Name="btnAnimation1" Style="{StaticResource buttons}" Margin="5">
<Button.Content>
<Image Source="E:\2 cource\TSCHMI\Labs\Lab3\Lab3\Lab3\Images\foto.jpg" Stretch="UniformToFill" />
</Button.Content>
</Button>
<Button x:Name="btnAnimation2" Style="{StaticResource buttons}" Margin="5">
<Button.Content>
<Image Source="E:\2 cource\TSCHMI\Labs\Lab3\Lab3\Lab3\Images\foto2.jpg" Stretch="UniformToFill"/>
</Button.Content>
</Button>
<Button x:Name="btnAnimation3" Style="{StaticResource buttons}" Margin="5">
<Button.Content>
<Image Source="E:\2 cource\TSCHMI\Labs\Lab3\Lab3\Lab3\Images\foto3.jpg" Stretch="UniformToFill"/>
</Button.Content>
</Button>
</StackPanel>
</Border>
<Border Grid.Column="1" Grid.Row="0" BorderBrush="#FFA500" BorderThickness="0, 4, 4, 4" Grid.ColumnSpan="2" Background="#5F5F5F">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Label Foreground="#FFA500" Style="{StaticResource Title}">
<Bold>Видеоплеер UlPlayer</Bold>
</Label>
</WrapPanel>
</Border>
<Border Grid.Column="2" Grid.Row="1" Grid.RowSpan="2" BorderBrush="DarkOliveGreen" BorderThickness="3, 0, 0, 0">
<StackPanel>
<Label FontSize="18" Foreground="#FFA500" Style="{StaticResource textStyle}" >
<Bold>Инструменты</Bold>
</Label>
<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="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>
</StackPanel>
</Border>
<Slider Name="vol" Grid.Column="1" Grid.Row="2" Maximum="1" Value="0.5" LargeChange="0.1" SmallChange="0.01" Margin="10" VerticalAlignment="Center"/>
</Grid>
</Window>

View File

@ -1,15 +1,23 @@
using System.Text;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
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 Lab2
namespace Lab3
{
/// <summary>
/// Interaction logic for MainWindow.xaml