Skip to content

Commit

Permalink
Ability to test the siren in the extruder
Browse files Browse the repository at this point in the history
Link to create an account
  • Loading branch information
lprichar committed Oct 30, 2014
1 parent 2ac77e5 commit 4fa193d
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 57 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -106,4 +106,5 @@ Desktop.ini
## wyBuild
############

Releases/Updates
Releases/Updates
/SirenOfShame.Extruder/Services/MySosOnlineService.cs
2 changes: 1 addition & 1 deletion SirenOfShame.Extruder/BrowserPage.cs
Expand Up @@ -33,7 +33,7 @@ public void EnsureConnected(ExtruderSettings settings)
var asciiEncoding = new ASCIIEncoding();
byte[] credentials = asciiEncoding.GetBytes(credentialsAsString);

const string url = SosOnlineService.SOS_URL + "/Mobile/App";
string url = SosOnlineService.SOS_URL + "/Mobile/App";
_webBrowser.Navigate(url, null, credentials, "Content-Type: application/x-www-form-urlencoded");
_webBrowser.Url = new Uri(url);
}
Expand Down
7 changes: 7 additions & 0 deletions SirenOfShame.Extruder/MainForm.cs
Expand Up @@ -56,6 +56,13 @@ private void InitializeSettingsPage()
_settingsPage.Settings = _settings;
_settingsPage.OnToggleConnection += SettingsPageOnOnToggleConnection;
_settingsPage.OnCloseSettings += SettingsPageOnOnCloseSettings;
_settingsPage.OnTestSiren += SettingsPageOnTestSiren;
}

private void SettingsPageOnTestSiren(object sender, TestSirenEventArgs args)
{
OnSetLights(1, new TimeSpan(0, 0, 10));
OnSetAudio(1, new TimeSpan(0, 0, 10));
}

private void SettingsPageOnOnCloseSettings(object sender, CloseSettingsEventArgs args)
Expand Down
4 changes: 2 additions & 2 deletions SirenOfShame.Extruder/Services/SosOnlineService.cs
Expand Up @@ -9,9 +9,9 @@

namespace SirenOfShame.Extruder.Services
{
public sealed class SosOnlineService
public sealed partial class SosOnlineService
{
public const string SOS_URL = "http://localhost:3115";
public static string SOS_URL = "http://sirenofshame.com";
private readonly ILog _log = MyLogManager.GetLog(typeof (SosOnlineService));
private HubConnection _connection;
private IHubProxy _proxy;
Expand Down
110 changes: 57 additions & 53 deletions SirenOfShame.Extruder/SettingsPage.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions SirenOfShame.Extruder/SettingsPage.cs
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using System.Windows.Forms;
using SirenOfShame.Extruder.Models;
Expand Down Expand Up @@ -90,6 +91,11 @@ private void _close_Click(object sender, EventArgs e)
{
InvokeOnCloseSettings();
}

private void CreateAccount_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("http://sirenofshame.com/Account/Register");
}
}

public delegate void CloseSettingsEvent(object sender, CloseSettingsEventArgs args);
Expand Down
1 change: 1 addition & 0 deletions SirenOfShame.Extruder/SirenOfShame.Extruder.csproj
Expand Up @@ -83,6 +83,7 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\MyLogManager.cs" />
<Compile Include="Services\MySosOnlineService.cs" />
<Compile Include="Services\SetTrayIconEvent.cs" />
<Compile Include="Services\SosOnlineService.cs" />
<Compile Include="Services\SosToolTipIcon.cs" />
Expand Down

0 comments on commit 4fa193d

Please sign in to comment.