Skip to content

Commit

Permalink
FModel 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
4sval committed May 14, 2020
1 parent 53443b0 commit 9b1385f
Show file tree
Hide file tree
Showing 650 changed files with 28,198 additions and 33,744 deletions.
18 changes: 11 additions & 7 deletions FModel.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.452
VisualStudioVersion = 16.0.29806.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FModel", "FModel\FModel.csproj", "{8AAB27BD-18D7-4164-8BBC-AB534D55D30F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FModel", "FModel\FModel.csproj", "{A42F8737-D056-4FA5-BEB5-AA96E1639F8A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8AAB27BD-18D7-4164-8BBC-AB534D55D30F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8AAB27BD-18D7-4164-8BBC-AB534D55D30F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8AAB27BD-18D7-4164-8BBC-AB534D55D30F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8AAB27BD-18D7-4164-8BBC-AB534D55D30F}.Release|Any CPU.Build.0 = Release|Any CPU
{A42F8737-D056-4FA5-BEB5-AA96E1639F8A}.Debug|Any CPU.ActiveCfg = Debug|x64
{A42F8737-D056-4FA5-BEB5-AA96E1639F8A}.Debug|x64.ActiveCfg = Debug|x64
{A42F8737-D056-4FA5-BEB5-AA96E1639F8A}.Debug|x64.Build.0 = Debug|x64
{A42F8737-D056-4FA5-BEB5-AA96E1639F8A}.Release|Any CPU.ActiveCfg = Release|x64
{A42F8737-D056-4FA5-BEB5-AA96E1639F8A}.Release|x64.ActiveCfg = Release|x64
{A42F8737-D056-4FA5-BEB5-AA96E1639F8A}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {42CA5618-EB78-4DDF-95A4-BD589CC52791}
SolutionGuid = {FE6EA91D-BBB8-4FBC-875C-25AD92EDB519}
EndGlobalSection
EndGlobal
213 changes: 0 additions & 213 deletions FModel/App.config

This file was deleted.

10 changes: 3 additions & 7 deletions FModel/App.xaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<Application x:Class="FModel.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FModel"
StartupUri="FModel_Main.xaml"
ShutdownMode="OnMainWindowClose"
StartupUri="MainWindow.xaml" ShutdownMode="OnMainWindowClose"
DispatcherUnhandledException="OnDispatcherUnhandledException">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes\Styles.xaml" />
<ResourceDictionary Source="Forms/HexViewer/BrushesDictionary.xaml" />
<ResourceDictionary Source="Forms/HexViewer/MiscelanousDictionary.xaml" />
<ResourceDictionary Source="Forms/HexViewer/ToolTipDictionary.xaml" />
<ResourceDictionary Source="pack://application:,,,/Theme/Style.xaml" />
<ResourceDictionary Source="pack://application:,,,/ToastNotifications.Messages;component/Themes/Default.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Expand Down
72 changes: 66 additions & 6 deletions FModel/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,80 @@
using FModel.Methods.MessageBox;
using FModel.Methods.Utilities;
using FModel.Discord;
using FModel.Logger;
using FModel.Utils;
using FModel.ViewModels.StatusBar;
using FModel.Windows.DarkMessageBox;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows;
using System.Windows.Threading;

namespace FModel
{
/// <summary>
/// Logique d'interaction pour App.xaml
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
void OnDispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
internal static Stopwatch StartTimer { get; private set; }
static bool framerateSet = false;

protected override void OnStartup(StartupEventArgs e)
{
string errorMessage = string.Format("An unhandled exception occurred: {0}", e.Exception.Message);
StartTimer = Stopwatch.StartNew();

//Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");

DebugHelper.Init(LogsFilePath);
DebugHelper.WriteLine("{0} {1}", "[FModel]", "––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––");
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Version]", Assembly.GetExecutingAssembly().GetName().Version.ToString());
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Build]", Globals.Build);
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[OS]", Logger.Logger.GetOperatingSystemProductName(true));
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Runtime]", RuntimeInformation.FrameworkDescription);
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Culture]", Thread.CurrentThread.CurrentUICulture);

StatusBarVm.statusBarViewModel.Set(FModel.Properties.Resources.Initializing, FModel.Properties.Resources.Loading);
DiscordIntegration.StartClient();

base.OnStartup(e);
}

public static string LogsFilePath
{
get
{
string filename = string.Format("FModel-Log-{0:yyyy-MM-dd}.txt", DateTime.Now);

// Copy user settings from previous application version if necessary
if (FModel.Properties.Settings.Default.UpdateSettings)
FModel.Properties.Settings.Default.Upgrade();

Folders.LoadFolders();

return Path.Combine(FModel.Properties.Settings.Default.OutputPath + "\\Logs", filename);
}
}

private void OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
string errorMessage = string.Format(FModel.Properties.Resources.UnhandledExceptionOccured, e.Exception.Message);
DebugHelper.WriteException(e.Exception, "thrown in App.xaml.cs by OnDispatcherUnhandledException");
DarkMessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
DarkMessageBoxHelper.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
e.Handled = true;
}

internal static void SetFramerate()
{
if (!framerateSet)
{
System.Windows.Media.Animation.Timeline.DesiredFrameRateProperty.OverrideMetadata(
typeof(System.Windows.Media.Animation.Timeline),
new FrameworkPropertyMetadata { DefaultValue = 10 });
framerateSet = true;
}
}
}
}
10 changes: 10 additions & 0 deletions FModel/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
12 changes: 0 additions & 12 deletions FModel/Commands/FModel_Commands.cs

This file was deleted.

Loading

0 comments on commit 9b1385f

Please sign in to comment.