diff --git a/AffdexMe/AffdexMe.csproj b/AffdexMe/AffdexMe.csproj new file mode 100644 index 0000000..0cd24cd --- /dev/null +++ b/AffdexMe/AffdexMe.csproj @@ -0,0 +1,112 @@ + + + + + Debug + AnyCPU + {5B893EA1-EB11-425A-BF8A-05822F5E2C9A} + WinExe + Properties + AffdexMe + AffdexMe + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + C:\AffdexMe\AffdexMe\Resources\AffdexMe_Logo.ico + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\Program Files (x86)\Affectiva\Affdex SDK\bin\debug\Affdex.dll + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + Code + + + C:\AffdexMe\AffdexMe\MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + C:\AffdexMe\AffdexMe\Settings.settings + True + + + ResXFileCodeGenerator + C:\AffdexMe\AffdexMe\Resources.Designer.cs + + + + SettingsSingleFileGenerator + C:\AffdexMe\AffdexMe\Settings.Designer.cs + + + + + + + + + + + + + \ No newline at end of file diff --git a/AffdexMe/AffdexMe.csproj.template b/AffdexMe/AffdexMe.csproj.template new file mode 100644 index 0000000..772e47f --- /dev/null +++ b/AffdexMe/AffdexMe.csproj.template @@ -0,0 +1,115 @@ + + + + + Debug + AnyCPU + {510690A2-DFD6-49AE-BB72-397D9CE8DC41} + WinExe + Properties + AffdexMe + AffdexMe + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + x86 + true + full + false + ${EXECUTABLE_OUTPUT_PATH}\Debug + DEBUG;TRACE + prompt + 4 + + + ${DOS_STYLE_SOURCE_DIR}\Resources\AffdexMe_Logo.ico + + + AnyCPU + pdbonly + true + ${EXECUTABLE_OUTPUT_PATH}\Release + TRACE + prompt + 4 + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + Code + + + ${DOS_STYLE_SOURCE_DIR}\MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + ${DOS_STYLE_SOURCE_DIR}\Settings.settings + True + + + ResXFileCodeGenerator + ${DOS_STYLE_SOURCE_DIR}\Resources.Designer.cs + + + + SettingsSingleFileGenerator + ${DOS_STYLE_SOURCE_DIR}\Settings.Designer.cs + + + + + + + + + {c110158b-63b7-431d-bd07-fbed3226c2b7} + affdex-sdk-cli + + + + + + + + + + \ No newline at end of file diff --git a/AffdexMe/App.config b/AffdexMe/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/AffdexMe/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AffdexMe/App.cs b/AffdexMe/App.cs new file mode 100644 index 0000000..9168056 --- /dev/null +++ b/AffdexMe/App.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +using Microsoft.VisualBasic.ApplicationServices; + +namespace AffdexMe +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + + + /// + /// From reference source: https://msdn.microsoft.com/en-us/library/vstudio/ms771662(v=vs.90).aspx + /// + public class EntryPoint + { + [STAThread] + public static void Main(string[] args) + { + SingleInstanceManager manager = new SingleInstanceManager(); + manager.Run(args); + } + } + + // Using VB bits to detect single instances and process accordingly: + // * OnStartup is fired when the first instance loads + // * OnStartupNextInstance is fired when the application is re-run again + // NOTE: it is redirected to this instance thanks to IsSingleInstance + public class SingleInstanceManager : WindowsFormsApplicationBase + { + SingleInstanceApplication app; + + public SingleInstanceManager() + { + this.IsSingleInstance = true; + } + + + protected override bool OnStartup(Microsoft.VisualBasic.ApplicationServices.StartupEventArgs e) + { + // First time app is launched + app = new SingleInstanceApplication(); + app.Run(); + return false; + } + + protected override void OnStartupNextInstance(StartupNextInstanceEventArgs eventArgs) + { + // Subsequent launches + base.OnStartupNextInstance(eventArgs); + app.Activate(); + } + } + + public class SingleInstanceApplication : Application + { + + protected override void OnStartup(System.Windows.StartupEventArgs e) + { + base.OnStartup(e); + + // Create and show the application's main window + MainWindow window = new MainWindow(); + window.Show(); + } + + public void Activate() + { + // Reactivate application's main window + this.MainWindow.Activate(); + } + } +} diff --git a/AffdexMe/App.xaml b/AffdexMe/App.xaml new file mode 100644 index 0000000..868f299 --- /dev/null +++ b/AffdexMe/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/AffdexMe/App.xaml.cs b/AffdexMe/App.xaml.cs new file mode 100644 index 0000000..8514a22 --- /dev/null +++ b/AffdexMe/App.xaml.cs @@ -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 AffdexMe +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/AffdexMe/Apple AffdexMe Screenshot.PNG b/AffdexMe/Apple AffdexMe Screenshot.PNG new file mode 100644 index 0000000..2e027d5 Binary files /dev/null and b/AffdexMe/Apple AffdexMe Screenshot.PNG differ diff --git a/AffdexMe/CMakelists.txt b/AffdexMe/CMakelists.txt new file mode 100644 index 0000000..d68d584 --- /dev/null +++ b/AffdexMe/CMakelists.txt @@ -0,0 +1,24 @@ +# -------------- +# CMake file AFFDEX-SDK-NET +# -------------- + +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +set(subProject AffdexMe) + +PROJECT(${subProject}) + +#file(GLOB SRCS src/*.c*) +#file(GLOB HDRS include/*.h*) +FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" DOS_STYLE_SOURCE_DIR) +CONFIGURE_FILE(${subProject}.csproj.template ${subProject}.csproj) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Properties/Resources.resx.template Properties/Resources.resx) +file( RELATIVE_PATH PROJECT_SUBDIR ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) +include_external_msproject( + ${subProject} ${PROJECT_SUBDIR}/${subProject}.csproj + TYPE 510690A2-DFD6-49AE-BB72-397D9CE8DC41 ${AFFDEX_DOTNET_SDK_PROJECT_NAME}) + +add_dependencies(${subProject} ${AFFDEX_DOTNET_SDK_PROJECT_NAME}) + +SET (RELEASE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/Release/${subProject}.exe") +install(FILES ${RELEASE_OUTPUT_PATH} DESTINATION ${RUNTIME_INSTALL_DIRECTORY}) \ No newline at end of file diff --git a/AffdexMe/Fonts/Square.ttf b/AffdexMe/Fonts/Square.ttf new file mode 100644 index 0000000..9f1867e Binary files /dev/null and b/AffdexMe/Fonts/Square.ttf differ diff --git a/AffdexMe/Images/AffectivaLogo1.png b/AffdexMe/Images/AffectivaLogo1.png new file mode 100644 index 0000000..831ef03 Binary files /dev/null and b/AffdexMe/Images/AffectivaLogo1.png differ diff --git a/AffdexMe/MainWindow.xaml b/AffdexMe/MainWindow.xaml new file mode 100644 index 0000000..264d2ab --- /dev/null +++ b/AffdexMe/MainWindow.xaml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +