Skip to content

Commit

Permalink
Add solution files
Browse files Browse the repository at this point in the history
  • Loading branch information
paulem committed Dec 29, 2019
1 parent 47a7851 commit c0c7cce
Show file tree
Hide file tree
Showing 55 changed files with 3,777 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Resxul.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Resxul", "src\Resxul\Resxul.csproj", "{E2FE05DA-5E5F-446E-8ABF-DFB3D7B987D5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E2FE05DA-5E5F-446E-8ABF-DFB3D7B987D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2FE05DA-5E5F-446E-8ABF-DFB3D7B987D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2FE05DA-5E5F-446E-8ABF-DFB3D7B987D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2FE05DA-5E5F-446E-8ABF-DFB3D7B987D5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {730742F6-D3D1-4F32-835D-CDE37CFC6C01}
EndGlobalSection
EndGlobal
92 changes: 92 additions & 0 deletions build/Resxul.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define ApplicationName "Resxul"
#define ApplicationExeName "Resxul.exe"
#define ApplicationDir "..\src\Resxul\bin\Release"
#define ApplicationVersion GetStringFileInfo(AddBackslash(ApplicationDir) + ApplicationExeName, 'ProductVersion')
#define ApplicationPublisher "7room"
#define ApplicationPublisherURL "https://7room.net"
#define ApplicationURL "https://7room.net"
#define ApplicationCopyright "2020 7room"

[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={{CC65472F-F70C-4324-9B71-F76AF2D7F6EB}
AppName={#ApplicationName}
AppVersion={#ApplicationVersion}
VersionInfoVersion={#ApplicationVersion}
VersionInfoCompany={#ApplicationPublisher}
AppPublisher={#ApplicationPublisher}
AppPublisherURL={#ApplicationPublisherURL}
AppSupportURL={#ApplicationURL}
AppUpdatesURL={#ApplicationURL}
DefaultDirName={pf}\{#ApplicationPublisher}\{#ApplicationName}
DefaultGroupName={#ApplicationName}
AllowNoIcons=yes
;LicenseFile={#ApplicationDir}\license.txt
OutputBaseFilename={#ApplicationName + ".Setup." + ApplicationVersion}
Compression=lzma
SolidCompression=yes
OutputDir=..\artifacts
;WizardImageFile=welcomefinish.bmp
;WizardSmallImageFile=header.bmp
WizardImageStretch=False
AppCopyright={#ApplicationCopyright}
ShowLanguageDialog=yes
UninstallDisplayIcon={app}\{#ApplicationExeName}
UninstallDisplayName={#ApplicationName}
VersionInfoCopyright={#ApplicationCopyright}
VersionInfoProductVersion={#ApplicationVersion}
MinVersion=0,6.1
ArchitecturesInstallIn64BitMode=x64
;SignedUninstaller=yes
;SignTool=Standard $f

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Icons]
Name: "{group}\{#ApplicationName}"; Filename: "{app}\{#ApplicationExeName}"
Name: "{group}\{#ApplicationName} Website"; Filename: "{#ApplicationURL}"
Name: "{group}\{cm:UninstallProgram,{#ApplicationName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#ApplicationName}"; Filename: "{app}\{#ApplicationExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#ApplicationExeName}"; Flags: nowait postinstall runascurrentuser skipifsilent; Description: "{cm:LaunchProgram,{#StringChange(ApplicationName, '&', '&&')}}"

[Components]
Name: "profiles"; Description: "Profiles"; Types: full
Name: "profiles\aya"; Description: "7room Aya"; Types: full

[Files]
Source: "{#ApplicationDir}\Tools\resgen.exe"; DestDir: "{app}\Tools"; Flags: ignoreversion
Source: "{#ApplicationDir}\Tools\al.exe"; DestDir: "{app}\Tools"; Flags: ignoreversion

Source: "{#ApplicationDir}\Resxul.exe"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#ApplicationDir}\Pixelmaniac.dll"; DestDir: "{app}"; Flags: ignoreversion signonce

Source: "{#ApplicationDir}\Profiles\aya.json"; DestDir: "{app}\Profiles"; Components: profiles\aya;

Source: "{#ApplicationDir}\Caliburn.Micro.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ApplicationDir}\Caliburn.Micro.Platform.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ApplicationDir}\Caliburn.Micro.Platform.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ApplicationDir}\System.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ApplicationDir}\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ApplicationDir}\Serilog.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#ApplicationDir}\Serilog.Sinks.File.dll"; DestDir: "{app}"; Flags: ignoreversion

[UninstallDelete]
Type: filesandordirs; Name: "{group}"
Type: filesandordirs; Name: "{app}"
Type: dirifempty; Name: "{app}"

[InstallDelete]
Type: filesandordirs; Name: "{app}"
Type: dirifempty; Name: "{app}"
Binary file added lib/Pixelmaniac.dll
Binary file not shown.
9 changes: 9 additions & 0 deletions profiles/aya.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ProfileName": "7room Aya",
"AppName": "Aya",
"AppFilePath": "%ProgramFiles%\\7room\\Aya\\Aya.exe",
"AppStartupArgs": "c {LangTag}",
"ResxNamespace": "{AppName}.Properties",
"SatelliteAssemblyName": "{AppName}.resources.dll",
"SatelliteAssemblyFolderPath": "%ProgramFiles%\\7room\\Aya\\{LangTag}"
}
Binary file added resources/icon/png/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon/png/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon/png/256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon/png/32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon/png/64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon/resxul.ico
Binary file not shown.
Binary file added resources/logo/psd/resxul.psd
Binary file not shown.
Binary file added resources/logo/resxul.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/screenshots/psd/resxul.psd
Binary file not shown.
Binary file added resources/screenshots/resxul-880.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
113 changes: 113 additions & 0 deletions src/Resxul/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<Application x:Class="Resxul.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:resxul="clr-namespace:Resxul"
xmlns:converters="clr-namespace:Resxul.Framework.Converters"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<Application.Resources>
<ResourceDictionary>

<ResourceDictionary.MergedDictionaries>

<ResourceDictionary>
<resxul:AppBootstrapper x:Key="Bootstrapper" />
</ResourceDictionary>

<ResourceDictionary Source="pack://application:,,,/Pixelmaniac;component/Themes/Pixelmaniac.xaml" />
<ResourceDictionary Source="pack://application:,,,/Pixelmaniac;component/Templates/Templates.xaml" />

</ResourceDictionary.MergedDictionaries>

<!-- Styles -->

<Style x:Key="TextBlock.Caption" TargetType="TextBlock">
<Setter Property="Margin" Value="0,0,0,5"/>
</Style>

<!-- Converters -->

<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
<converters:NullToVisibilityInverseConverter x:Key="NullToVisibilityInverseConverter" />

<!-- Constants -->

<Thickness x:Key="Margins.Window">16,14,16,16</Thickness>
<Thickness x:Key="Paddings.Footer">16,14</Thickness>
<system:Double x:Key="Text.LineHeight">20</system:Double>
<system:Double x:Key="Text.FontSize.Logo">26</system:Double>
<system:Double x:Key="Text.FontSize.Title">17</system:Double>
<system:Double x:Key="Text.FontSize.Description">14</system:Double>
<system:Double x:Key="Text.FontSize.Console">11</system:Double>

<!-- Brushes -->

<SolidColorBrush x:Key="Brush.Logo">#FF2116</SolidColorBrush>

<!-- Geometries -->

<StreamGeometry x:Key="Geometry.64.Lighting">M44 0l-36 36h22l-10 28 36-36h-22z</StreamGeometry>

<CombinedGeometry x:Key="Geometry.16.Edit">
<CombinedGeometry.Geometry1>
M11.445 0.055l-8.945 8.945h1.5v1h1v1h1v1h1v1.495l8.945-8.939c0.5-2-2.5-5-4.5-4.5z
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
M6 13h-1v-1h-1v-1h-1v-1h-0.857l-2.143 6 6-2.144z
</CombinedGeometry.Geometry2>
</CombinedGeometry>

<CombinedGeometry x:Key="Geometry.16.Menu">
<CombinedGeometry.Geometry1>
<CombinedGeometry>
<CombinedGeometry.Geometry1>
M1 3h14v2h-14v-2z
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
M1 7h14v2h-14v-2z
</CombinedGeometry.Geometry2>
</CombinedGeometry>
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
M1 11h14v2h-14v-2z
</CombinedGeometry.Geometry2>
</CombinedGeometry>

<CombinedGeometry x:Key="Geometry.16.Add">
<CombinedGeometry.Geometry1>
M15 7h-6v-6h-2v6h-6v2h6v6h2v-6h6z
</CombinedGeometry.Geometry1>
</CombinedGeometry>

<CombinedGeometry x:Key="Geometry.16.Remove">
<CombinedGeometry.Geometry1>
M2 5v10c0 0.55 0.45 1 1 1h9c0.55 0 1-0.45 1-1v-10h-11zM5 14h-1v-7h1v7zM7 14h-1v-7h1v7zM9 14h-1v-7h1v7zM11 14h-1v-7h1v7z
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
M13.25 2h-3.25v-1.25c0-0.412-0.338-0.75-0.75-0.75h-3.5c-0.412 0-0.75 0.338-0.75 0.75v1.25h-3.25c-0.413 0-0.75 0.337-0.75 0.75v1.25h13v-1.25c0-0.413-0.338-0.75-0.75-0.75zM9 2h-3v-0.987h3v0.987z
</CombinedGeometry.Geometry2>
</CombinedGeometry>

<CombinedGeometry x:Key="Geometry.24.MoreVert">
<CombinedGeometry.Geometry1>
M12 15.984c1.078 0 2.016 0.938 2.016 2.016s-0.938 2.016-2.016 2.016-2.016-0.938-2.016-2.016 0.938-2.016 2.016-2.016zM12 9.984c1.078 0 2.016 0.938 2.016 2.016s-0.938 2.016-2.016 2.016-2.016-0.938-2.016-2.016 0.938-2.016 2.016-2.016zM12 8.016c-1.078 0-2.016-0.938-2.016-2.016s0.938-2.016 2.016-2.016 2.016 0.938 2.016 2.016-0.938 2.016-2.016 2.016z
</CombinedGeometry.Geometry1>
</CombinedGeometry>

<CombinedGeometry x:Key="Geometry.24.MoreHoriz">
<CombinedGeometry.Geometry1>
M12 9.984c1.078 0 2.016 0.938 2.016 2.016s-0.938 2.016-2.016 2.016-2.016-0.938-2.016-2.016 0.938-2.016 2.016-2.016zM18 9.984c1.078 0 2.016 0.938 2.016 2.016s-0.938 2.016-2.016 2.016-2.016-0.938-2.016-2.016 0.938-2.016 2.016-2.016zM6 9.984c1.078 0 2.016 0.938 2.016 2.016s-0.938 2.016-2.016 2.016-2.016-0.938-2.016-2.016 0.938-2.016 2.016-2.016z
</CombinedGeometry.Geometry1>
</CombinedGeometry>

<CombinedGeometry x:Key="Geometry.32.Logo">
<CombinedGeometry.Geometry1>
M15.251 0h-0.502l-14.749 7.901v14.258l14.696 9.841h0.608l14.696-9.841v-14.258l-14.749-7.901zM26.882 8.5l-4.782 2.562-5.313-2.846 4.782-2.562 5.313 2.846zM15 2.134l4.782 2.562-4.782 2.562-4.782-2.562 4.782-2.562zM8.431 5.654l4.782 2.562-5.313 2.846-4.782-2.562 5.313-2.846zM6.159 23.876l-4.159-2.785v-4.848l4.159 2.599v5.033zM6.159 16.853l-4.159-2.599v-4.083l4.159 2.228v4.455zM14 29.127l-6.154-4.121v-5.109l6.154 3.846v5.383zM14 21.753l-6.154-3.846v-4.605l6.154 3.297v5.155zM15 14.866l-5.313-2.846 5.313-2.846 5.313 2.846-5.313 2.846zM22.154 25.006l-6.154 4.121v-5.383l6.154-3.846v5.109zM22.154 17.907l-6.154 3.846v-5.155l6.154-3.297v4.605zM28 21.091l-4.159 2.785v-5.033l4.159-2.599v4.848zM28 14.253l-4.159 2.599v-4.454l4.159-2.228v4.083z
</CombinedGeometry.Geometry1>
</CombinedGeometry>

</ResourceDictionary>
</Application.Resources>
</Application>
11 changes: 11 additions & 0 deletions src/Resxul/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Windows;

namespace Resxul
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
71 changes: 71 additions & 0 deletions src/Resxul/AppBootstrapper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows;
using System.Windows.Threading;
using Caliburn.Micro;
using Resxul.Properties;
using Resxul.Services;
using Resxul.ViewModels;
using Serilog;

namespace Resxul
{
public class AppBootstrapper : BootstrapperBase
{
SimpleContainer _container;

public AppBootstrapper()
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.File(Path.Combine(Global.LogsFolderPath, Global.LogFileName), rollingInterval: RollingInterval.Day)
.CreateLogger();

Initialize();
}

protected override void Configure()
{
_container = new SimpleContainer();

_container.Singleton<ProfileService>();
_container.Singleton<CompilerService>();

_container.Singleton<IWindowManager, WindowManager>();
_container.Singleton<IEventAggregator, EventAggregator>();
_container.PerRequest<IShell, MainViewModel>();
}

protected override object GetInstance(Type service, string key)
{
var instance = _container.GetInstance(service, key);
if (instance != null)
return instance;

throw new InvalidOperationException("Could not locate any instances.");
}

protected override IEnumerable<object> GetAllInstances(Type service)
{
return _container.GetAllInstances(service);
}

protected override void BuildUp(object instance)
{
_container.BuildUp(instance);
}

protected override void OnStartup(object sender, StartupEventArgs e)
{
DisplayRootViewFor<IShell>();
}

protected override void OnUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
Log.Error(e.Exception, Resources.UnhandledExceptionOccurred);
MessageBox.Show($"{Resources.UnhandledExceptionOccurred}{Environment.NewLine}{string.Format(Resources.ViewLogFile, Path.GetFullPath(Global.LogsFolderPath))}");
base.OnUnhandledException(sender, e);
}
}
}
47 changes: 47 additions & 0 deletions src/Resxul/Framework/Behaviors/DropDownButtonBehavior.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Interactivity;

namespace Resxul.Framework.Behaviors
{
public class DropDownButtonBehavior : Behavior<Button>
{
private bool _isContextMenuOpen;

protected override void OnAttached()
{
base.OnAttached();
AssociatedObject.AddHandler(ButtonBase.ClickEvent, new RoutedEventHandler(AssociatedObject_Click), true);
}

void AssociatedObject_Click(object sender, RoutedEventArgs e)
{
Button source = sender as Button;
if (source?.ContextMenu != null)
{
if (!_isContextMenuOpen)
{
source.ContextMenu.AddHandler(ContextMenu.ClosedEvent, new RoutedEventHandler(ContextMenu_Closed), true);
source.ContextMenu.PlacementTarget = source;
source.ContextMenu.Placement = PlacementMode.Bottom;
source.ContextMenu.IsOpen = true;
_isContextMenuOpen = true;
}
}
}

protected override void OnDetaching()
{
base.OnDetaching();
AssociatedObject.RemoveHandler(ButtonBase.ClickEvent, new RoutedEventHandler(AssociatedObject_Click));
}

void ContextMenu_Closed(object sender, RoutedEventArgs e)
{
_isContextMenuOpen = false;
var contextMenu = sender as ContextMenu;
contextMenu?.RemoveHandler(ContextMenu.ClosedEvent, new RoutedEventHandler(ContextMenu_Closed));
}
}
}
Loading

0 comments on commit c0c7cce

Please sign in to comment.