Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Upgraded to use v 1.0.1.17 of nuget
Upgraded to use v 1.0.1.17 of nuget this version can communicate with the web version of the sdk
- Loading branch information
GSiry
committed
Sep 17, 2018
1 parent
a135002
commit 55ff276
Showing
16 changed files
with
500 additions
and
207 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||
<section name="AppRTCDemo.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
<appSettings> | ||
<add key="SignalingUrl" value="192.3.24.139:8080/" /> | ||
<add key="SignalingUrl" value="https://rtc-signaling-service.herokuapp.com:443/" /> | ||
|
||
</appSettings> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="CefSharp" publicKeyToken="40c4b6fc221f4138" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-53.0.1.0" newVersion="53.0.1.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="CefSharp.Core" publicKeyToken="40c4b6fc221f4138" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-53.0.1.0" newVersion="53.0.1.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-0.86.0.518" newVersion="0.86.0.518" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Data; | ||
|
||
namespace AppRTCDemo | ||
{ | ||
public class InvertVisibilityConverter : IValueConverter | ||
{ | ||
|
||
public Object Convert(Object value, Type targetType, Object parameter, CultureInfo culture) | ||
{ | ||
if (targetType == typeof(Visibility)) | ||
{ | ||
Visibility vis = (Visibility)value; | ||
return vis == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed; | ||
} | ||
throw new InvalidOperationException("Converter can only convert to value of type Visibility."); | ||
} | ||
|
||
public Object ConvertBack(Object value, Type targetType, Object parameter, CultureInfo culture) | ||
{ | ||
throw new Exception("Invalid call - one way only"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows.Documents; | ||
using System.Windows; | ||
using System.Windows.Media; | ||
using System.Threading; | ||
|
||
/// cool Adorner helper class provided by https://marlongrech.wordpress.com/2008/02/28/wpf-overlays-or-better-adorner/ | ||
|
||
namespace AppRTCDemo | ||
{ | ||
/// <summary> | ||
/// Adorner that disables all controls that fall under it | ||
/// </summary> | ||
public class CustomAdorner : Adorner | ||
{ | ||
public UIElement el; | ||
#region Properties | ||
|
||
/// <summary> | ||
/// Gets or sets the color to paint | ||
/// </summary> | ||
public Brush Color | ||
{ | ||
get { return (Brush)GetValue(ColorProperty); } | ||
set { SetValue(ColorProperty, value); } | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the color to paint | ||
/// </summary> | ||
public static readonly DependencyProperty ColorProperty = | ||
DependencyProperty.Register("Color", typeof(Brush), typeof(CustomAdorner), | ||
new PropertyMetadata((Brush)new BrushConverter().ConvertFromString("#7F4047F7"))); | ||
|
||
|
||
/// <summary> | ||
/// Gets or sets the border | ||
/// </summary> | ||
public Pen Border | ||
{ | ||
get { return (Pen)GetValue(BorderProperty); } | ||
set { SetValue(BorderProperty, value); } | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the border | ||
/// </summary> | ||
public static readonly DependencyProperty BorderProperty = | ||
DependencyProperty.Register("Border", typeof(Pen), typeof(CustomAdorner), | ||
new UIPropertyMetadata(new Pen(Brushes.Gray, 1))); | ||
|
||
//the start point where to start drawing | ||
private static readonly Point startPoint = | ||
new Point(0, 0); | ||
|
||
/// <summary> | ||
/// Gets or sets the text to display | ||
/// </summary> | ||
public string OverlayedText | ||
{ | ||
get { return (string)GetValue(OverlayedTextProperty); } | ||
set { SetValue(OverlayedTextProperty, value); } | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the text to display | ||
/// </summary> | ||
public static readonly DependencyProperty OverlayedTextProperty = | ||
DependencyProperty.Register("OverlayedText", typeof(string), typeof(CustomAdorner), new UIPropertyMetadata("")); | ||
|
||
/// <summary> | ||
/// Gets or sets the foreground to use for the text | ||
/// </summary> | ||
public Brush ForeGround | ||
{ | ||
get { return (Brush)GetValue(ForeGroundProperty); } | ||
set { SetValue(ForeGroundProperty, value); } | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the foreground to use for the text | ||
/// </summary> | ||
public static readonly DependencyProperty ForeGroundProperty = | ||
DependencyProperty.Register("ForeGround", typeof(Brush), typeof(CustomAdorner), | ||
new UIPropertyMetadata(Brushes.Aquamarine)); | ||
|
||
|
||
/// <summary> | ||
/// Gets or sets the font size for the text | ||
/// </summary> | ||
public double FontSize | ||
{ | ||
get { return (double)GetValue(FontSizeProperty); } | ||
set { SetValue(FontSizeProperty, value); } | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the font size for the text | ||
/// </summary> | ||
public static readonly DependencyProperty FontSizeProperty = | ||
DependencyProperty.Register("FontSize", typeof(double), typeof(CustomAdorner), new UIPropertyMetadata(10.0)); | ||
|
||
|
||
/// <summary> | ||
/// Gets or sets the Typeface for the text | ||
/// </summary> | ||
public Typeface Typeface | ||
{ | ||
get { return (Typeface)GetValue(TypefaceProperty); } | ||
set { SetValue(TypefaceProperty, value); } | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the Typeface for the text | ||
/// </summary> | ||
public static readonly DependencyProperty TypefaceProperty = | ||
DependencyProperty.Register("Typeface", typeof(Typeface), typeof(CustomAdorner), | ||
new UIPropertyMetadata(new Typeface("Verdana"))); | ||
|
||
|
||
|
||
#endregion | ||
|
||
/// <summary> | ||
/// Constructor for the adorner | ||
/// </summary> | ||
/// <param name="adornerElement">The element to be adorned</param> | ||
public CustomAdorner(UIElement adornerElement) | ||
: base(adornerElement) | ||
{ | ||
el = adornerElement; | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Called to draw on screen | ||
/// </summary> | ||
/// <param name="drawingContext">The drawind context in which we can draw</param> | ||
protected override void OnRender(System.Windows.Media.DrawingContext drawingContext) | ||
{ | ||
FormattedText text = new FormattedText(OverlayedText, Thread.CurrentThread.CurrentUICulture, | ||
FlowDirection.LeftToRight, Typeface, FontSize, ForeGround); | ||
|
||
// Find the center of the client area. | ||
double xmid = el.RenderSize.Width / 2; | ||
double ymid = el.RenderSize.Height; | ||
Point center = | ||
new Point(xmid, ymid - text.Height); | ||
|
||
|
||
drawingContext.DrawText(text, center); | ||
|
||
//drawingContext.DrawRectangle(Color, Border, new Rect(startPoint, DesiredSize)); | ||
base.OnRender(drawingContext); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
|
||
namespace AppRTCDemo | ||
{ | ||
class ErrorCollectionToVisibility : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | ||
{ | ||
var collection = value as ReadOnlyCollection<ValidationError>; | ||
if (collection != null && collection.Count > 0) | ||
return Visibility.Visible; | ||
else | ||
return Visibility.Collapsed; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | ||
{ | ||
return new object(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace AppRTCDemo | ||
{ | ||
public static class Helper | ||
{ | ||
private static readonly Random _rng = new Random(); | ||
private const string _chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | ||
|
||
/// <summary> | ||
/// generate random string | ||
/// </summary> | ||
/// <param name="size">size of generated string</param> | ||
/// <returns></returns> | ||
public static string RandomString(int size) | ||
{ | ||
char[] buffer = new char[size]; | ||
|
||
for (int i = 0; i < size; i++) | ||
{ | ||
buffer[i] = _chars[_rng.Next(_chars.Length)]; | ||
} | ||
return new string(buffer); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.