-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
495 changed files
with
4,832,291 additions
and
0 deletions.
There are no files selected for viewing
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,106 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#include <idp.iss> | ||
|
||
#define MyAppName "MMaze Behavior" | ||
#define MyAppVersion "2.0" | ||
#define MyAppPublisher "Texas Biomedical Device Center" | ||
#define MyAppURL "http://www.utdallas.edu/txbdc" | ||
#define MyAppExeName "MMazeBehavior.exe" | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. | ||
; Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{F1847654-3187-45F1-9691-C85E64765D44} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
;AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName=C:\{#MyAppName} | ||
DefaultGroupName={#MyAppName} | ||
DisableProgramGroupPage=yes | ||
OutputDir=Z:\TBI\Behavior Code\MMazeBehavior\Installer | ||
OutputBaseFilename=MMazeBehaviorSetup | ||
Compression=lzma | ||
SolidCompression=yes | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
|
||
[Files] | ||
Source: "Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\bin\Release\MMazeBehavior.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\bin\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
|
||
[Icons] | ||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" | ||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon | ||
|
||
[Run] | ||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent | ||
|
||
|
||
[Code] | ||
function Framework45IsNotInstalled(): Boolean; | ||
var | ||
bSuccess: Boolean; | ||
regVersion: Cardinal; | ||
begin | ||
Result := True; | ||
bSuccess := RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', regVersion); | ||
if (True = bSuccess) and (regVersion >= 378389) then begin | ||
Result := False; | ||
end; | ||
end; | ||
procedure InitializeWizard; | ||
begin | ||
if Framework45IsNotInstalled() then | ||
begin | ||
idpAddFile('http://go.microsoft.com/fwlink/?LinkId=780596', ExpandConstant('{tmp}\NetFrameworkInstaller.exe')); | ||
idpDownloadAfter(wpReady); | ||
end; | ||
end; | ||
procedure InstallFramework; | ||
var | ||
StatusText: string; | ||
ResultCode: Integer; | ||
begin | ||
StatusText := WizardForm.StatusLabel.Caption; | ||
WizardForm.StatusLabel.Caption := 'Installing .NET Framework 4.6.2. This might take a few minutes...'; | ||
WizardForm.ProgressGauge.Style := npbstMarquee; | ||
try | ||
if not Exec(ExpandConstant('{tmp}\NetFrameworkInstaller.exe'), '/passive /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then | ||
begin | ||
MsgBox('.NET installation failed with code: ' + IntToStr(ResultCode) + '.', mbError, MB_OK); | ||
end; | ||
finally | ||
WizardForm.StatusLabel.Caption := StatusText; | ||
WizardForm.ProgressGauge.Style := npbstNormal; | ||
DeleteFile(ExpandConstant('{tmp}\NetFrameworkInstaller.exe')); | ||
end; | ||
end; | ||
procedure CurStepChanged(CurStep: TSetupStep); | ||
begin | ||
case CurStep of | ||
ssPostInstall: | ||
begin | ||
if Framework45IsNotInstalled() then | ||
begin | ||
InstallFramework(); | ||
end; | ||
end; | ||
end; | ||
end; |
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,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25123.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MMazeBehavior", "MMazeBehavior\MMazeBehavior.csproj", "{17350830-E42E-4E27-BAF8-A2954FC1C5B5}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{17350830-E42E-4E27-BAF8-A2954FC1C5B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{17350830-E42E-4E27-BAF8-A2954FC1C5B5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{17350830-E42E-4E27-BAF8-A2954FC1C5B5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{17350830-E42E-4E27-BAF8-A2954FC1C5B5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Application x:Class="MMazeBehavior.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:MMazeBehavior" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
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,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace MMazeBehavior | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
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,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MMazeBehavior | ||
{ | ||
/// <summary> | ||
/// This defines how we determine when to deliver cues to the animal | ||
/// </summary> | ||
public enum CueDeliveryType | ||
{ | ||
[Description("Cues are delivered at precisely timed intervals, independent of what the rat is doing.")] | ||
AbsoluteFixedIntervals, | ||
|
||
[Description("Cues are delivered according to a fixed interval schedule, but must be triggered by rat movement. The timer for the next cue does not start until the current cue is delivered.")] | ||
FixedIntervals_BehaviorDependent1, | ||
|
||
[Description("Cues are delivered according to a fixed interval schedule, but must be triggered by rat movement. The timer for the next cue starts immediately once the timer for the previous cue has finished.")] | ||
FixedIntervals_BehaviorDependent2, | ||
|
||
[Description("Cues are delivered according to a fixed interval schedule, but must be triggered by rat movement unless a maximum timer interval is reached. The timer for the next cue does not start until the current cue is delivered.")] | ||
IntervalRange_BehaviorDependent, | ||
|
||
[Description("Cues are delivered on a random set of trials according to a pre-defined proportion.")] | ||
RandomProportionOfTrials, | ||
|
||
[Description("Undefined")] | ||
Undefined | ||
} | ||
} |
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,57 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Text.RegularExpressions; | ||
using System.Threading.Tasks; | ||
|
||
namespace MMazeBehavior | ||
{ | ||
public static class HelperMethods | ||
{ | ||
/// <summary> | ||
/// Cleans an input string to it contains only alphanumeric characters | ||
/// </summary> | ||
/// <param name="strIn">The input string</param> | ||
/// <returns>The output string</returns> | ||
public static string CleanInput(string strIn) | ||
{ | ||
// Replace invalid characters with empty strings. | ||
try | ||
{ | ||
return Regex.Replace(strIn, @"[^\w\-]", "", | ||
RegexOptions.None, TimeSpan.FromSeconds(1.5)); | ||
} | ||
// If we timeout when replacing invalid characters, | ||
// we should return Empty. | ||
catch (RegexMatchTimeoutException) | ||
{ | ||
return String.Empty; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Parses a list of numbers in string format, and returns a List<int> object of all the numbers found. | ||
/// </summary> | ||
/// <param name="list">The string containing the list of numbers</param> | ||
/// <param name="sep">The delimitor between the numbers in the string</param> | ||
/// <returns>A list of numbers as a List object</returns> | ||
public static List<int> ParseNumberList (string list, char sep = ',') | ||
{ | ||
List<int> result = new List<int>(); | ||
|
||
var string_list = list.Split(new char[] { sep }); | ||
for (int i = 0; i < string_list.Length; i++) | ||
{ | ||
int new_number = 0; | ||
bool success = Int32.TryParse(string_list[i].Trim(), out new_number); | ||
if (success) | ||
{ | ||
result.Add(new_number); | ||
} | ||
} | ||
|
||
return result; | ||
} | ||
} | ||
} |
Oops, something went wrong.