-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
141 lines (141 loc) · 8.32 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<Window x:Class="YouTube_Video_Uploader.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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:YouTube_Video_Uploader"
mc:Ignorable="d"
WindowStyle="None"
Background="Transparent" AllowsTransparency="True"
ResizeMode="CanMinimize"
Title="MainWindow" Height="800" Width="800"
WindowStartupLocation="CenterScreen">
<Border Background="White" CornerRadius="20">
<Grid>
<Border x:Name="TitleBar" Background="#FD0012" CornerRadius="20,20,0,0" Margin="0,0,0,745" MouseDown="TitleBar_OnMouseDown" >
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="713,0,0,0" Width="87" Height="55" VerticalAlignment="Center">
<Button Width="40" Height="40" FontSize="26" Content="🗕" BorderThickness="0" Foreground="White" FontWeight="Bold" Click="ButtonMinimize_Click">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#EA0010"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button Width="40" Height="40" FontSize="26" Content="✕" BorderThickness="0" Foreground="White" FontWeight="Bold" Click="CloseButton_Click">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#EA0010"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</StackPanel>
</Border>
<TextBlock FontSize="30" Foreground="White" Text="YouTube Video Uploader" FontFamily="YouTube Sans" FontWeight="Medium" Margin="0,0,0,754" Height="37" VerticalAlignment="Bottom" HorizontalAlignment="Center" Width="298"/>
<Grid >
<Grid>
<Rectangle
AllowDrop="True"
Drop="DropFiles"
Fill="WhiteSmoke"
RadiusX="10"
RadiusY="10"
StrokeDashArray="10"
StrokeThickness="2"
StrokeDashCap="Round"
Stroke="Silver"
Height="300"
Width="300" Margin="60,247,440,253">
</Rectangle>
<StackPanel
HorizontalAlignment="Left"
VerticalAlignment="Center" Margin="131,0,0,0" Opacity="1">
<Path
Data="M16 7C13.351563 7 11.050781 8.238281 9.40625 10.0625C9.269531 10.046875 9.148438 10 9 10C6.800781 10 5 11.800781 5 14C3.269531 15.054688 2 16.835938 2 19C2 22.300781 4.699219 25 8 25L13 25L13 23L8 23C5.78125 23 4 21.21875 4 19C4 17.339844 5.007813 15.921875 6.4375 15.3125L7.125 15.03125L7.03125 14.28125C7.011719 14.117188 7 14.023438 7 14C7 12.882813 7.882813 12 9 12C9.140625 12 9.296875 12.019531 9.46875 12.0625L10.09375 12.21875L10.46875 11.71875C11.75 10.074219 13.75 9 16 9C19.277344 9 22.011719 11.253906 22.78125 14.28125L22.96875 15.0625L23.8125 15.03125C24.023438 15.019531 24.070313 15 24 15C26.21875 15 28 16.78125 28 19C28 21.21875 26.21875 23 24 23L19 23L19 25L24 25C27.300781 25 30 22.300781 30 19C30 15.84375 27.511719 13.316406 24.40625 13.09375C23.183594 9.574219 19.925781 7 16 7 Z M 16 15L12 19L15 19L15 27L17 27L17 19L20 19Z"
Fill="Gray"
Stretch="Uniform"
Height="50"/>
<TextBlock
Foreground="Gray"
FontFamily="YouTube Sans" FontWeight="Medium"
Text="Drop files to upload"
FontSize="20"/>
</StackPanel>
</Grid>
</Grid>
<Button
x:Name="btn_choosefiles"
Background="#EA0010"
BorderThickness="0"
Content="Choose File(s)"
Foreground="White"
FontSize="20"
FontFamily="YouTube Sans" FontWeight="Medium"
Height="50"
Width="150"
Click="ButtonChooseFiles_Click" Margin="135,582,515,168">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
</Style>
</Button.Resources>
</Button>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="OR"
FontFamily="YouTube Sans" FontWeight="Medium"
Foreground="Gray" FontSize="50" Margin="444,367,0,0"/>
<Button
x:Name="btn_choosefolder"
Background="#EA0010"
BorderThickness="0"
Content="Choose Folder"
Foreground="White"
FontSize="20"
FontFamily="YouTube Sans" FontWeight="Medium"
Height="50"
Width="150"
Click="ButtonChooseFolder_Click" Margin="588,372,62,378">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
</Style>
</Button.Resources>
</Button>
<Frame x:Name="Main" NavigationUIVisibility="Hidden" Navigated="TitleNavigated">
<Frame.CommandBindings>
<CommandBinding Command="NavigationCommands.BrowseBack" Executed="CommandBinding_Executed_BrowseBack"/>
</Frame.CommandBindings>
</Frame>
<Border Name="BorderError" Opacity="0" Margin="240,675,240,45" Background="WhiteSmoke" CornerRadius=" 10">
<TextBlock Opacity="0" FontFamily="YouTube Sans" FontWeight="Medium" Foreground="#EA0010" FontSize="30" Text="Error: Missing mp4 files" HorizontalAlignment="Center" Name="TextBlockError" Height="40" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Window>