Skip to content

Commit

Permalink
Actually add and commit from correct directory
Browse files Browse the repository at this point in the history
  • Loading branch information
alansley committed Nov 14, 2018
1 parent 3c455cb commit 4b77faf
Show file tree
Hide file tree
Showing 20 changed files with 87 additions and 3,056 deletions.
2,882 changes: 0 additions & 2,882 deletions Documentation/HTML/SoniFight_User_Guide.htm

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions SoniFight/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Threading;

using au.edu.federation.SoniFight.Properties;
using DavyKager;

//using System.Diagnostics;
//using System.Text.RegularExpressions;
Expand Down Expand Up @@ -101,12 +102,22 @@ public partial class MainForm : Form
private Label triggerTypeLabel = new Label();
private ComboBox triggerAllowanceComboBox = new ComboBox();

// Flag to keep track of whether we've loaded the Tolk library
private static bool tolkLoaded = false;

// Constructor
public MainForm()
{
InitializeComponent();
gameConfig = new GameConfig();

// Load tolk library ready for use and flip the flag so we only ever load it once
if (!tolkLoaded)
{
Tolk.Load();
tolkLoaded = true;
}

// Initially we aren't running so we add that the current status is stopped to the window title
this.Text = formTitle + Resources.ResourceManager.GetString("statusStoppedString");

Expand Down Expand Up @@ -313,6 +324,10 @@ private void runConfig_Click(object senderender, EventArgs e)
gameConfig.Valid = gameConfig.validate();
gameConfig.Active = gameConfig.activate();

// Brief delay then announce that we're running if tolk is available. Delay is so announcing the button doesn't overwrite our speech, final true means interupt!
Thread.Sleep(100);
Tolk.Output("SoniFight running config" + gameConfig.ConfigDirectory, true);

// If we have a valid, active config and we're not already running then start our sonification background worker,
// which calls the 'performSonification' method.
if (gameConfig.Valid && gameConfig.Active)
Expand Down Expand Up @@ -486,7 +501,9 @@ private void tabControl_SelectedIndexChanged(object senderender, EventArgs e)
this.Text = formTitle + Resources.ResourceManager.GetString("statusStoppedString");
running = false;

// Pause then announce we've stopped
Thread.Sleep(500);
Tolk.Output("SoniFight stopped", false);
}

// Loading an existing config? Okay...
Expand Down Expand Up @@ -541,6 +558,8 @@ private void stopConfigButton_Click(object senderender, EventArgs e)
Thread.Sleep(500);

Program.irrKlang.UnloadAllSamples();

Tolk.Output("SoniFight stopped", true);
}

// Method to refresh the main config selection dropdown menu
Expand Down
228 changes: 60 additions & 168 deletions SoniFight/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@
<value>0</value>
</data>
<data name="appTitleLabel.Text" xml:space="preserve">
<value>SoniFight v1.1.2</value>
<value>SoniFight v1.1.3</value>
</data>
<data name="appTitleLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
Expand Down Expand Up @@ -993,151 +993,22 @@
<data name="&gt;&gt;mainTabPage.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;holderPanel.Name" xml:space="preserve">
<value>holderPanel</value>
</data>
<data name="&gt;&gt;holderPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;holderPanel.Parent" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;holderPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;saveConfigButton.Name" xml:space="preserve">
<value>saveConfigButton</value>
</data>
<data name="&gt;&gt;saveConfigButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;saveConfigButton.Parent" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;saveConfigButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;cloneTriggerButton.Name" xml:space="preserve">
<value>cloneTriggerButton</value>
</data>
<data name="&gt;&gt;cloneTriggerButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cloneTriggerButton.Parent" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;cloneTriggerButton.ZOrder" xml:space="preserve">
<data name="gcPanel.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;addTriggerButton.Name" xml:space="preserve">
<value>addTriggerButton</value>
</data>
<data name="&gt;&gt;addTriggerButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;addTriggerButton.Parent" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;addTriggerButton.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;cloneWatchButton.Name" xml:space="preserve">
<value>cloneWatchButton</value>
</data>
<data name="&gt;&gt;cloneWatchButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cloneWatchButton.Parent" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;cloneWatchButton.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;addWatchButton.Name" xml:space="preserve">
<value>addWatchButton</value>
</data>
<data name="&gt;&gt;addWatchButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;addWatchButton.Parent" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;addWatchButton.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;currentUILabel.Name" xml:space="preserve">
<value>currentUILabel</value>
</data>
<data name="&gt;&gt;currentUILabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;currentUILabel.Parent" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;currentUILabel.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;gcTreeView.Name" xml:space="preserve">
<value>gcTreeView</value>
</data>
<data name="&gt;&gt;gcTreeView.Type" xml:space="preserve">
<value>System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gcTreeView.Parent" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;gcTreeView.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="editTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="editTabPage.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="editTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>866, 515</value>
</data>
<data name="editTabPage.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="editTabPage.Text" xml:space="preserve">
<value>Edit Config</value>
</data>
<data name="&gt;&gt;editTabPage.Name" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;editTabPage.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;editTabPage.Parent" xml:space="preserve">
<value>tabControl</value>
</data>
<data name="&gt;&gt;editTabPage.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<data name="gcPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tabControl.Location" type="System.Drawing.Point, System.Drawing">
<data name="gcPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
<value>874, 541</value>
</data>
<data name="tabControl.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tabControl.Name" xml:space="preserve">
<value>tabControl</value>
</data>
<data name="&gt;&gt;tabControl.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="gcPanel.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;tabControl.Parent" xml:space="preserve">
<value>$this</value>
<data name="gcPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>508, 475</value>
</data>
<data name="&gt;&gt;tabControl.ZOrder" xml:space="preserve">
<data name="gcPanel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;gcPanel.Name" xml:space="preserve">
Expand Down Expand Up @@ -1176,36 +1047,6 @@
<data name="&gt;&gt;holderPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="gcPanel.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="gcPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="gcPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="gcPanel.RowCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="gcPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>508, 475</value>
</data>
<data name="gcPanel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;gcPanel.Name" xml:space="preserve">
<value>gcPanel</value>
</data>
<data name="&gt;&gt;gcPanel.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gcPanel.Parent" xml:space="preserve">
<value>holderPanel</value>
</data>
<data name="&gt;&gt;gcPanel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="saveConfigButton.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 12pt</value>
</data>
Expand Down Expand Up @@ -1392,6 +1233,57 @@
<data name="&gt;&gt;gcTreeView.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="editTabPage.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="editTabPage.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="editTabPage.Size" type="System.Drawing.Size, System.Drawing">
<value>866, 515</value>
</data>
<data name="editTabPage.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="editTabPage.Text" xml:space="preserve">
<value>Edit Config</value>
</data>
<data name="&gt;&gt;editTabPage.Name" xml:space="preserve">
<value>editTabPage</value>
</data>
<data name="&gt;&gt;editTabPage.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;editTabPage.Parent" xml:space="preserve">
<value>tabControl</value>
</data>
<data name="&gt;&gt;editTabPage.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tabControl.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tabControl.Size" type="System.Drawing.Size, System.Drawing">
<value>874, 541</value>
</data>
<data name="tabControl.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tabControl.Name" xml:space="preserve">
<value>tabControl</value>
</data>
<data name="&gt;&gt;tabControl.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabControl.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tabControl.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion SoniFight/GameConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ public bool validate()
return false;
}

// Ensure we have at least one watch
// Ensure we have at least one trigger
if (triggerList.Count == 0)
{
MessageBox.Show("Validation Error: GameConfig does not have any triggers.");
Expand Down
4 changes: 2 additions & 2 deletions SoniFight/MultilingualResources/SoniFight.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1992,8 +1992,8 @@
<target state="needs-review-translation">0</target>
</trans-unit>
<trans-unit id="appTitleLabel.Text" translate="no" xml:space="preserve">
<source>SoniFight v1.1.2</source>
<target state="final">SoniFight v1.1.2</target>
<source>SoniFight v1.1.3</source>
<target state="final">SoniFight v1.1.3</target>
</trans-unit>
<trans-unit id="appTitleLabel.TextAlign" translate="yes" extype="System.Drawing.ContentAlignment, System.Drawing" xml:space="preserve">
<source>MiddleCenter</source>
Expand Down
2 changes: 1 addition & 1 deletion SoniFight/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public static bool performDependentComparison(Trigger t, dynamic watchValue)
// This is the DoWork method for the sonification BackgroundWorker
public static void performSonification(object sender, System.ComponentModel.DoWorkEventArgs e)
{
// Load tolk library ready for use
// Load tolk read for use
Tolk.Load();

// Try to detect a screen reader and set a flag if we find one so we know we can use it for sonification events.
Expand Down
6 changes: 4 additions & 2 deletions SoniFight/Trigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ public Trigger()
allowanceType = Trigger.AllowanceType.Any;

WatchIdList = new List<int>();

SecondaryIdList = new List<int>();
Value = -1;

Value = -1;

PreviousValueList = new List<dynamic>();

Expand All @@ -232,7 +234,7 @@ public Trigger()
Active = true;
IsClock = false;
ModificationActive = false;
UseTolk = false;
UseTolk = true; // Changed using tolk to default as it's far more likely to be used than samples (creating samples is time consuming!)

hotkey = new Hotkey();
}
Expand Down

0 comments on commit 4b77faf

Please sign in to comment.