Skip to content

Commit f729699

Browse files
committed
Initial version
1 parent 01f9dc5 commit f729699

18 files changed

+1034
-0
lines changed

App.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /> </startup>
5+
</configuration>

App.xaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Application
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
x:Class="WPF_NDIlib_Send.App"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
<ResourceDictionary>
8+
<ResourceDictionary.MergedDictionaries>
9+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
10+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
11+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepOrange.xaml" />
12+
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Indigo.xaml" />
13+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
14+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
15+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
16+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
17+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
18+
</ResourceDictionary.MergedDictionaries>
19+
</ResourceDictionary>
20+
</Application.Resources>
21+
</Application>

App.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace Whiteboard
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}

Libraries/NDILibDotNet2.dll

51 KB
Binary file not shown.

Libraries/Processing.NDI.Lib.x64.dll

6.5 MB
Binary file not shown.

Libraries/Processing.NDI.Lib.x86.dll

3.33 MB
Binary file not shown.

MainWindow.xaml

Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
<Controls:MetroWindow x:Class="Whiteboard.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:NDI="clr-namespace:NewTek.NDI.WPF;assembly=NDIlibDotNet2"
5+
xmlns:whiteboard="clr-namespace:Whiteboard"
6+
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
7+
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
8+
Title="Whiteboard"
9+
WindowStartupLocation="CenterScreen"
10+
FontFamily="Montserrat"
11+
BorderBrush="#EA4333"
12+
BorderThickness="1"
13+
Width="800"
14+
Height="523.921"
15+
KeyDown="MainWindow_KeyDown">
16+
<Window.Resources>
17+
</Window.Resources>
18+
<Grid Margin="0,0,0,-6">
19+
<Grid.RowDefinitions>
20+
<RowDefinition Height="Auto" />
21+
<RowDefinition Height="Auto" />
22+
<RowDefinition Height="*" />
23+
</Grid.RowDefinitions>
24+
<Grid.ColumnDefinitions>
25+
<ColumnDefinition Width="*" />
26+
</Grid.ColumnDefinitions>
27+
28+
<Border Grid.Row="1"
29+
Margin="5"
30+
BorderBrush="Black"
31+
BorderThickness="1">
32+
<NDI:NdiSendContainer NdiWidth="1280" NdiHeight="720"
33+
NdiName="Whiteboard"
34+
HorizontalAlignment="Stretch"
35+
VerticalAlignment="Stretch">
36+
<whiteboard:WhiteboardCanvas x:Name="theWhiteboard"
37+
Width="1280" Height="720"
38+
Background="White"
39+
ClipToBounds="True"
40+
Cursor="Pen" />
41+
</NDI:NdiSendContainer>
42+
</Border>
43+
44+
<StackPanel Name="DrawSettings" Grid.Row="2"
45+
Orientation="Horizontal"
46+
HorizontalAlignment="Center"
47+
Margin="5">
48+
49+
<Border Name="Border_Btn_Delete"
50+
BorderThickness="0 0 0 3"
51+
BorderBrush="Transparent">
52+
<Button Name="Btn_Delete"
53+
Width="30"
54+
Height="32"
55+
Style="{StaticResource MaterialDesignToolForegroundButton}"
56+
materialDesign:RippleAssist.IsCentered="True"
57+
VerticalAlignment="Bottom"
58+
ClipToBounds="True"
59+
Click="Btn_Delete_Click">
60+
<materialDesign:PackIcon Kind="Delete" />
61+
</Button>
62+
</Border>
63+
64+
<Border Name="Border_Btn_White"
65+
BorderThickness="0 0 0 3"
66+
BorderBrush="Transparent">
67+
<Button Name="Btn_White"
68+
Width="30"
69+
Height="32"
70+
Style="{StaticResource MaterialDesignToolForegroundButton}"
71+
materialDesign:RippleAssist.IsCentered="True"
72+
VerticalAlignment="Bottom"
73+
ClipToBounds="True"
74+
Click="Btn_White_Click">
75+
<materialDesign:PackIcon Kind="Square" />
76+
</Button>
77+
</Border>
78+
79+
<Border Name="Border_Btn_Chroma"
80+
BorderThickness="0 0 0 3"
81+
BorderBrush="Transparent">
82+
<Button Name="Btn_Chroma"
83+
Width="30"
84+
Height="32"
85+
Style="{StaticResource MaterialDesignToolForegroundButton}"
86+
materialDesign:RippleAssist.IsCentered="True"
87+
VerticalAlignment="Bottom"
88+
ClipToBounds="True"
89+
Click="Btn_Chroma_Click" Foreground="#FF23FF00">
90+
<materialDesign:PackIcon Kind="Square" />
91+
</Button>
92+
</Border>
93+
94+
<Border Name="Border_Btn_Transparent"
95+
BorderThickness="0 0 0 3"
96+
BorderBrush="Transparent">
97+
<Button Name="Btn_Transparent"
98+
Width="30"
99+
Height="32"
100+
Style="{StaticResource MaterialDesignToolForegroundButton}"
101+
materialDesign:RippleAssist.IsCentered="True"
102+
VerticalAlignment="Bottom"
103+
ClipToBounds="True"
104+
Click="Btn_Transparent_Click">
105+
<materialDesign:PackIcon Kind="Square" Foreground="Gray" />
106+
</Button>
107+
</Border>
108+
109+
<Border Name="Border_Btn_BlackBrush"
110+
BorderThickness="0 0 0 3"
111+
BorderBrush="Transparent">
112+
<Button Name="Btn_BlackBrush"
113+
Width="30"
114+
Height="32"
115+
Style="{StaticResource MaterialDesignToolForegroundButton}"
116+
materialDesign:RippleAssist.IsCentered="True"
117+
VerticalAlignment="Bottom"
118+
ClipToBounds="True"
119+
Click="Btn_Pen_Click" Foreground="Black">
120+
<materialDesign:PackIcon Kind="Pencil" />
121+
</Button>
122+
</Border>
123+
<Border Name="Border_Btn_RedBrush"
124+
BorderThickness="0 0 0 3"
125+
BorderBrush="Transparent">
126+
<Button Name="Btn_RedBrush"
127+
Width="30"
128+
Height="32"
129+
Style="{StaticResource MaterialDesignToolForegroundButton}"
130+
materialDesign:RippleAssist.IsCentered="True"
131+
VerticalAlignment="Bottom"
132+
ClipToBounds="True"
133+
Click="Btn_Pen_Click" Foreground="Red">
134+
<materialDesign:PackIcon Kind="Pencil" />
135+
</Button>
136+
</Border>
137+
<Border Name="Border_Btn_YellowBrush"
138+
BorderThickness="0 0 0 3"
139+
BorderBrush="Transparent">
140+
<Button Name="Btn_YellowBrush"
141+
Width="30"
142+
Height="32"
143+
Style="{StaticResource MaterialDesignToolForegroundButton}"
144+
materialDesign:RippleAssist.IsCentered="True"
145+
VerticalAlignment="Bottom"
146+
ClipToBounds="True"
147+
Click="Btn_Pen_Click" Foreground="Yellow">
148+
<materialDesign:PackIcon Kind="Pencil" />
149+
</Button>
150+
</Border>
151+
<Border Name="Border_Btn_BlueBrush"
152+
BorderThickness="0 0 0 3"
153+
BorderBrush="Transparent">
154+
<Button Name="Btn_BlueBrush"
155+
Width="30"
156+
Height="32"
157+
Style="{StaticResource MaterialDesignToolForegroundButton}"
158+
materialDesign:RippleAssist.IsCentered="True"
159+
VerticalAlignment="Bottom"
160+
ClipToBounds="True"
161+
Click="Btn_Pen_Click" Foreground="Blue">
162+
<materialDesign:PackIcon Kind="Pencil" />
163+
</Button>
164+
</Border>
165+
<Border Name="Border_Btn_GreenBrush"
166+
BorderThickness="0 0 0 3"
167+
BorderBrush="Transparent">
168+
<Button Name="Btn_GreenBrush"
169+
Width="30"
170+
Height="32"
171+
Style="{StaticResource MaterialDesignToolForegroundButton}"
172+
materialDesign:RippleAssist.IsCentered="True"
173+
VerticalAlignment="Bottom"
174+
ClipToBounds="True"
175+
Click="Btn_Pen_Click" Foreground="#FF23FF00">
176+
<materialDesign:PackIcon Kind="Pencil" />
177+
</Button>
178+
</Border>
179+
180+
<Border Name="Border_Btn_Size1"
181+
BorderThickness="0 0 0 3"
182+
BorderBrush="Transparent">
183+
<Button Name="Btn_Size1"
184+
Width="30"
185+
Height="32"
186+
Style="{StaticResource MaterialDesignToolForegroundButton}"
187+
materialDesign:RippleAssist.IsCentered="True"
188+
VerticalAlignment="Bottom"
189+
ClipToBounds="True"
190+
Click="Btn_Size1_Click" Foreground="Black" RenderTransformOrigin="0.5,0.5">
191+
<Button.RenderTransform>
192+
<TransformGroup>
193+
<ScaleTransform ScaleX="0.2" ScaleY="0.2"/>
194+
<SkewTransform/>
195+
<RotateTransform/>
196+
<TranslateTransform/>
197+
</TransformGroup>
198+
</Button.RenderTransform>
199+
<materialDesign:PackIcon Kind="Circle" />
200+
</Button>
201+
</Border>
202+
203+
<Border Name="Border_Btn_Size2"
204+
BorderThickness="0 0 0 3"
205+
BorderBrush="Transparent">
206+
<Button Name="Btn_Size2"
207+
Width="30"
208+
Height="32"
209+
Style="{StaticResource MaterialDesignToolForegroundButton}"
210+
materialDesign:RippleAssist.IsCentered="True"
211+
VerticalAlignment="Bottom"
212+
ClipToBounds="True"
213+
Click="Btn_Size2_Click" Foreground="Black" RenderTransformOrigin="0.5,0.5">
214+
<Button.RenderTransform>
215+
<TransformGroup>
216+
<ScaleTransform ScaleX="0.4" ScaleY="0.4"/>
217+
<SkewTransform/>
218+
<RotateTransform/>
219+
<TranslateTransform/>
220+
</TransformGroup>
221+
</Button.RenderTransform>
222+
<materialDesign:PackIcon Kind="Circle" />
223+
</Button>
224+
</Border>
225+
226+
<Border Name="Border_Btn_Size3"
227+
BorderThickness="0 0 0 3"
228+
BorderBrush="Transparent">
229+
<Button Name="Btn_Size3"
230+
Width="30"
231+
Height="32"
232+
Style="{StaticResource MaterialDesignToolForegroundButton}"
233+
materialDesign:RippleAssist.IsCentered="True"
234+
VerticalAlignment="Bottom"
235+
ClipToBounds="True"
236+
Click="Btn_Size3_Click" Foreground="Black" RenderTransformOrigin="0.5,0.5">
237+
<Button.RenderTransform>
238+
<TransformGroup>
239+
<ScaleTransform ScaleX="0.6" ScaleY="0.6"/>
240+
<SkewTransform/>
241+
<RotateTransform/>
242+
<TranslateTransform/>
243+
</TransformGroup>
244+
</Button.RenderTransform>
245+
<materialDesign:PackIcon Kind="Circle" />
246+
</Button>
247+
</Border>
248+
249+
<Border Name="Border_Btn_Size4"
250+
BorderThickness="0 0 0 3"
251+
BorderBrush="Transparent">
252+
<Button Name="Btn_Size4"
253+
Width="30"
254+
Height="32"
255+
Style="{StaticResource MaterialDesignToolForegroundButton}"
256+
materialDesign:RippleAssist.IsCentered="True"
257+
VerticalAlignment="Bottom"
258+
ClipToBounds="True"
259+
Click="Btn_Size4_Click" Foreground="Black" RenderTransformOrigin="0.5,0.5">
260+
<Button.RenderTransform>
261+
<TransformGroup>
262+
<ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
263+
<SkewTransform/>
264+
<RotateTransform/>
265+
<TranslateTransform/>
266+
</TransformGroup>
267+
</Button.RenderTransform>
268+
<materialDesign:PackIcon Kind="Circle" />
269+
</Button>
270+
</Border>
271+
272+
<Border Name="Border_Btn_Size5"
273+
BorderThickness="0 0 0 3"
274+
BorderBrush="Transparent">
275+
<Button Name="Btn_Size5"
276+
Width="30"
277+
Height="32"
278+
Style="{StaticResource MaterialDesignToolForegroundButton}"
279+
materialDesign:RippleAssist.IsCentered="True"
280+
VerticalAlignment="Bottom"
281+
ClipToBounds="True"
282+
Click="Btn_Size5_Click" Foreground="Black">
283+
<materialDesign:PackIcon Kind="Circle" />
284+
</Button>
285+
</Border>
286+
287+
</StackPanel>
288+
289+
</Grid>
290+
</Controls:MetroWindow>

0 commit comments

Comments
 (0)