Skip to content

Commit

Permalink
Obsidian 1.4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Crauzer committed Nov 6, 2017
1 parent 969dcef commit a08904c
Show file tree
Hide file tree
Showing 17 changed files with 502 additions and 203 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Fantome.Libraries.League"]
path = Fantome.Libraries.League
url = https://github.com/LoL-Fantome/Fantome.Libraries.League
1 change: 1 addition & 0 deletions Fantome.Libraries.League
2 changes: 1 addition & 1 deletion Obsidian.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.15
VisualStudioVersion = 15.0.27004.2005
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Obsidian", "Obsidian\Obsidian.csproj", "{7ABEFBE2-A68B-4D8E-A24E-7867C4AD1364}"
EndProject
Expand Down
6 changes: 3 additions & 3 deletions Obsidian/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</configuration>
</configuration>
2 changes: 1 addition & 1 deletion Obsidian/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</Window.Triggers>
<Grid>
<StackPanel Orientation="Vertical">
<TextBlock x:Name="textBlockSelectedEntryName" Margin="11,10,9,0" Height="20"/>
<ProgressBar x:Name="progressBarWadExtraction" Margin="11,10,9,0" Height="20" Visibility="Hidden"/>
<Grid>
<DataGrid Height="475" x:Name="datagridWadEntries" Margin="10,10,10,0" AutoGenerateColumns="False" GridLinesVisibility="Vertical" VerticalGridLinesBrush="#7F000000" SelectedCellsChanged="datagridWadEntries_SelectedCellsChanged" BeginningEdit="datagridWadEntries_BeginningEdit">
<DataGrid.Columns>
Expand Down
368 changes: 222 additions & 146 deletions Obsidian/MainWindow.xaml.cs

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions Obsidian/Obsidian.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Obsidian</RootNamespace>
<AssemblyName>Obsidian</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -33,7 +34,13 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
Expand All @@ -58,6 +65,9 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Utils\ConfigUtilities.cs" />
<Compile Include="Utils\Logging.cs" />
<Compile Include="Utils\WADHashGenerator.cs" />
<Compile Include="ValueConverters\WadNameConverter.cs" />
<Compile Include="ValueConverters\SizeValueConverter.cs" />
<Compile Include="Windows\AboutWindow.xaml.cs">
Expand Down Expand Up @@ -125,8 +135,8 @@
<Resource Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Fantome.Libraries.League\Fantome.League\Fantome.Libraries.League.csproj">
<Project>{80F5DF93-19A2-4731-8CD1-982F165D7361}</Project>
<ProjectReference Include="..\Fantome.Libraries.League\Fantome.League\Fantome.Libraries.League.csproj">
<Project>{80f5df93-19a2-4731-8cd1-982f165d7361}</Project>
<Name>Fantome.Libraries.League</Name>
</ProjectReference>
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Obsidian/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.0.1")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
44 changes: 18 additions & 26 deletions Obsidian/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 9 additions & 13 deletions Obsidian/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions Obsidian/Utils/ConfigUtilities.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using log4net.Core;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;

namespace Obsidian.Utils
{
public static class ConfigUtilities
{
public static readonly Dictionary<string, object> DefaultConfig = new Dictionary<string, object>()
{
{ "LoggingPattern", "[%utcdate{ABSOLUTE}] | [%-5level] | [%-20logger: (%-4line)] | %message%newline" },
{ "LogLevel", Level.Info },
{ "WadSaveMajorVersion", 2 },
{ "WadSaveMinorVersion", 0 },
{ "GenerateWadDictionary", true },
{ "ParallelExtraction", true }
};

public static Dictionary<string, object> ReadConfig()
{
return JsonConvert.DeserializeObject<Dictionary<string, object>>(File.ReadAllText("config.json"));
}

public static void WriteDefaultConfig()
{
File.WriteAllText("config.json", JsonConvert.SerializeObject(DefaultConfig, Formatting.Indented));
}
}
}
38 changes: 38 additions & 0 deletions Obsidian/Utils/Logging.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using log4net;
using log4net.Appender;
using log4net.Config;
using log4net.Core;
using log4net.Layout;
using System;
using System.Windows;

namespace Obsidian.Utils
{
public static class Logging
{
public static void InitializeLogger(string loggingPattern, Level logLevel)
{
FileAppender appender = new FileAppender
{
Layout = new PatternLayout(loggingPattern),
File = "ObsidianLog.txt",
AppendToFile = true,
Threshold = logLevel
};
appender.ActivateOptions();
BasicConfigurator.Configure(appender);
}

public static void LogException(ILog logger, string message, Exception exception)
{
MessageBox.Show(string.Format("{0}\n{1}\n{2}", message, exception.Message, exception.StackTrace), "", MessageBoxButton.OK, MessageBoxImage.Error);
logger.Error(message, exception);
}

public static void LogFatal(ILog logger, string message, Exception exception)
{
MessageBox.Show(string.Format("{0}\n{1}\n{2}", message, exception.Message, exception.StackTrace), "", MessageBoxButton.OK, MessageBoxImage.Error);
logger.Fatal(message, exception);
}
}
}
Loading

0 comments on commit a08904c

Please sign in to comment.