Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart Hunter overlay Monster missing #26

Open
wants to merge 86 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
fb36f24
Initial support for Icebrone
gabrielefilipp Jan 18, 2020
90f0460
Monster Widget Support
gabrielefilipp Jan 18, 2020
dd5d7ee
Fix Monster Widget
gabrielefilipp Jan 19, 2020
7cf20b9
Initial Support for Monsters Parts (may crash due to empty parts list)
gabrielefilipp Jan 20, 2020
f388c02
Something new i guess
gabrielefilipp Jan 22, 2020
5eac118
Added an AutoUpdater
gabrielefilipp Jan 22, 2020
542536b
Don't know what happened to last commit (Fix AutoUpdater commit)
gabrielefilipp Jan 22, 2020
305b8a5
Fix in AutoUpdater
gabrielefilipp Jan 22, 2020
6b7d96b
Fix
gabrielefilipp Jan 22, 2020
51eb60d
Found Size Address (Crown) and ofc new bugs yeee!
gabrielefilipp Jan 23, 2020
ed7766f
Added new monsters (if you find new monster ids please report it to me)
gabrielefilipp Jan 24, 2020
128ff40
Update README.md
gabrielefilipp Jan 24, 2020
513c858
Fixed monsters not showing in UI, fixed monster parts, added all mons…
gabrielefilipp Jan 25, 2020
3318972
Merge branch 'master' of https://github.com/gabrielefilipp/SmartHunter
gabrielefilipp Jan 25, 2020
833f662
Added Gold Rathian, Silver Rathalos. Fixed Glavenus typos and added m…
gabrielefilipp Jan 25, 2020
e800e60
Update README.md
gabrielefilipp Jan 25, 2020
0d13926
Fixed typos
gabrielefilipp Jan 26, 2020
5aeed96
Reduced start up time
gabrielefilipp Jan 26, 2020
aafb8f6
Reduced start up time
gabrielefilipp Jan 26, 2020
e4979a4
Removed unnecessary platform.
sir-wilhelm Jan 28, 2020
88e1e65
Set LangVersion to latest for c# 8 features/syntax.
sir-wilhelm Jan 28, 2020
a94e55a
Fixed gitignore for the new build directories.
sir-wilhelm Jan 28, 2020
6ee8027
Added an editor config to help VS/editors hints for code styles.
sir-wilhelm Jan 28, 2020
7c4c677
Removed unused converter.
sir-wilhelm Jan 28, 2020
bd9a979
Removed build artifacts.
sir-wilhelm Jan 28, 2020
cf4a68a
Updated SmartHunter.csproj to use the SDK format.
sir-wilhelm Jan 28, 2020
d4406a6
Code cleanup.
sir-wilhelm Jan 28, 2020
6f33d75
Added the debug compiled files back for auto updates
sir-wilhelm Jan 28, 2020
ee0b1c0
Added exe to old update path so the older versions can get the auto u…
sir-wilhelm Jan 28, 2020
3b984e1
Added statuses (NOT rage & stamina), and bug fixes
gabrielefilipp Jan 29, 2020
6cd611f
Merge branch 'dev' into code-cleanup
sir-wilhelm Jan 29, 2020
b76e081
Merge pull request #4 from sir-wilhelm/code-cleanup
gabrielefilipp Jan 30, 2020
3780919
Code cleanup
gabrielefilipp Jan 30, 2020
7a09776
Fixed AutoUpdater
gabrielefilipp Jan 30, 2020
0c27875
Added rage timer
gabrielefilipp Jan 31, 2020
1dc890a
Bug fix
gabrielefilipp Jan 31, 2020
23e1737
Bug fix
gabrielefilipp Jan 31, 2020
a576038
Fixed array overflow (hopefully)
gabrielefilipp Jan 31, 2020
26f83c2
Update README.md
gabrielefilipp Feb 1, 2020
038b733
Bug fix?
gabrielefilipp Feb 2, 2020
9ac041e
Added new statuses
gabrielefilipp Feb 2, 2020
ea65a85
Fixef monster sizes
gabrielefilipp Feb 2, 2020
74fa74a
Bug fix
gabrielefilipp Feb 3, 2020
ae151c9
Added Monsters Removable Parts
gabrielefilipp Feb 3, 2020
58db7b2
Create LICENSE.txt
gabrielefilipp Feb 4, 2020
f988151
AutoUpdater will now replace the default exe instead of appending has…
zakuciael Feb 6, 2020
2ef9261
Code cleanup (Optimized imports)
zakuciael Feb 6, 2020
87c69b1
Fix for the new patch
gabrielefilipp Feb 6, 2020
0e13187
Merge branch 'master' of https://github.com/r00telement/SmartHunter
zakuciael Feb 7, 2020
5098e38
Updated the executable after merging upstream.
zakuciael Feb 7, 2020
8ca7e4b
Merge branch 'master' of https://github.com/gabrielefilipp/SmartHunter
zakuciael Feb 7, 2020
17072f5
Merge pull request #21 from zakuciael/master
gabrielefilipp Feb 7, 2020
5ebecef
Fixed crash
gabrielefilipp Feb 7, 2020
e9015b5
Initial support for player widget
gabrielefilipp Feb 9, 2020
502c976
Update README.md
gabrielefilipp Feb 9, 2020
73450e1
New stuff (and bugs)
gabrielefilipp Feb 17, 2020
d8d8838
Update README.md
gabrielefilipp Feb 17, 2020
88ed6c6
Bug fix
gabrielefilipp Feb 18, 2020
e7b4398
Buf fix for new patch
gabrielefilipp Feb 20, 2020
0256d11
Update README.md
gabrielefilipp Feb 22, 2020
899d186
Update README.md
gabrielefilipp Feb 24, 2020
3233d9a
Update README.md
gabrielefilipp Feb 24, 2020
88f9305
Add files via upload
gabrielefilipp Mar 1, 2020
e0fda31
Monster data sharing with server
gabrielefilipp Mar 3, 2020
456d135
Bug fix
gabrielefilipp Mar 4, 2020
e405fb6
Added expedition damage calculation
gabrielefilipp Mar 7, 2020
e667826
Fixed server
gabrielefilipp Mar 12, 2020
9822e1b
Crash fix
gabrielefilipp Mar 13, 2020
9d471a5
Added new monsters localization
gabrielefilipp Mar 14, 2020
c49ec91
Added settings tab
gabrielefilipp Mar 18, 2020
04e55e4
Fixed monster data
gabrielefilipp Mar 21, 2020
ce89aaa
Fix typo
AxeBane Apr 9, 2020
da413b3
Fix Buff, Add Monster
dragonyue0417 Apr 13, 2020
87b994c
Update Test
dragonyue0417 Apr 14, 2020
7588b5f
2020.04.13.01
dragonyue0417 Apr 14, 2020
bdd10d3
Fix Anger not displayed
dragonyue0417 Apr 16, 2020
2132139
Fix buff
dragonyue0417 Apr 16, 2020
1d72c23
Fix Buff
dragonyue0417 Apr 17, 2020
4106fa9
2020.04.17.00
dragonyue0417 Apr 17, 2020
7b3c76b
Fix Wording
dragonyue0417 Apr 19, 2020
599179d
Copy damage and percentage to clipboard.
dragonyue0417 Apr 19, 2020
ef885b8
Merge pull request #74 from dragonyue0417/master
gabrielefilipp Apr 21, 2020
09dbb8c
Merge pull request #72 from AxeBane/patch-1
gabrielefilipp Apr 21, 2020
7eeae6f
Update README.md
gabrielefilipp Mar 16, 2021
440f4e8
Update README.md
gabrielefilipp Mar 16, 2021
a3a821d
Create smarthunter.php
gabrielefilipp Apr 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 182 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# http://editorconfig.org

# Top-most EditorConfig file
root = true

# Default settings:
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# C# files
[*.cs]
end_of_line = crlf

# Documentation for Visual Studio .editorconfig configuration:
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference

## Advanced
dotnet_sort_system_directives_first = true

## Code Style

### General

# 'this.' preferences
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion

# Predefined type preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# 'using' preferences
csharp_using_directive_placement = outside_namespace:suggestion

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion
dotnet_style_readonly_field = true:suggestion

# parenthesis preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion

# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:none
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion

## Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion

# Variable preferences
csharp_style_inlined_variable_declaration = true:suggestion

# Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion

# 'var' preferences'
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion

# Expression-bodied members
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion

### Formatting

#### Indentation
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left

#### New Lines
# braces
csharp_new_line_before_open_brace = all
# keywords
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
# expressions
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_within_query_expression_clauses = true

#### Spacing
# method declarations
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
# method calls
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
# other spacing options
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_parentheses = false
csharp_space_after_cast = false
csharp_space_around_declaration_statements = do_not_ignore
# brackets
csharp_space_before_open_square_brackets = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_square_brackets = false
# delimiters
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_semicolon_in_for_statement = true
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_semicolon_in_for_statement = false
# operators
csharp_space_around_binary_operators = before_and_after

#### Wrapping
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false

### Naming
# name all constant fields using PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style

dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const

dotnet_naming_style.pascal_case_style.capitalization = pascal_case

# static fields should have s_ prefix
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style

dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static

dotnet_naming_style.static_prefix_style.required_prefix = s_
dotnet_naming_style.static_prefix_style.capitalization = camel_case

# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style

dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal

dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case

# Markdown files
[*.md]
trim_trailing_whitespace = false
14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.vs
bin
obj
*.user
SmartHunter/bin/Debug/*
SmartHunter/bin/Release/*
SmartHunter/SmartHunter.csproj.user
obj/
.vs/

# allow for auto updates
!SmartHunter/bin/Debug/Default.xaml
!SmartHunter/bin/Debug/Newtonsoft.Json.dll
!SmartHunter/bin/Debug/SmartHunter.exe
Binary file added Expedition Damage Calculation.pdf
Binary file not shown.
Binary file added Monsters Data Distribution Explanation.pdf
Binary file not shown.
69 changes: 59 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,63 @@
# SmartHunter - Overlay
# SmartHunter - Monster Hunter: World Overlay

![SmartHunter](https://staticdelivery.nexusmods.com/mods/2531/images/793/793-1557865677-1599196365.png)
A complete overlay for Monster Hunter: World on PC. Distributed on [Nexus Mods](https://www.nexusmods.com/monsterhunterworld/mods/2556). Features include:

A complete overlay for Monster Hunter: World on PC. Distributed on [Nexus Mods](https://www.nexusmods.com/monsterhunterworld/mods/793). See the mod page for up-to-date details.
- Monster widget - name, health, parts, status effect buildup, and crown.
- Team widget - name and damage meters.
- Player widget - buff, debuff, and equipment/mantle timers.
- Open source - freely learn from and contribute to the project.
- Skinnable - create and distribute your own rich styles and animations with XAML.
- Easy localization - create and distribute your own translations for our international friends.

## Contributors
## Changelog

- Pull requests are welcome. Please submit to the dev branch.
- Give your pull request sufficient context so I don't have to guess what it does.
- Keep your code in line with the project's style conventions.
- Bug fixes: if you're unsure, open an issue with your intent to fix and I will verify the bug.
- New data: always looking to extend data for supported features if you can find it in memory. E.g. new buffs, status effects, etc.
- New features: open an issue with your intent so we can scope it, because I'm not likely to accept a random pull request if it's a bit... "out there".
- Look [here](https://forums.nexusmods.com/index.php?/topic/8356533-smarthunter-for-iceborne/)

## Requirements

- Windows.
- [The latest .NET Framework runtime](https://dotnet.microsoft.com/download/dotnet-framework-runtime).

## How to install

- Download `SmartHunter.exe` and `Newtonsoft.Json.dll` from [here](https://github.com/gabrielefilipp/SmartHunter/tree/master/SmartHunter/bin/Debug).
- Place them in a new folder.
- IMPORTANT: If you are replacing the new `.exe` in the same folder of the old SmartHunter please just follow the instructions `## How to update`.
- You're ready for the hunt.

## How to use

- Launch `SmartHunter.exe`.
- Hold `LeftAlt` to view widget locations.
- Click and drag widgets to move them.
- Scroll over widgets to rescale them.

## How to update

- Following this [commit](https://github.com/gabrielefilipp/SmartHunter/commit/305b8a55eb4cd40c31a06a30ab862b4f803baa84) I've added an AutoUpdater module to this Application.
- To enable this feature just set the key 'AutomaticallyCheckAndDownloadUpdates' to 'true', if present, otherwise just add it, to the file `Config.json`.
- NOTE that this feature is already active if it's the first time you follow the "How to install" steps and download the mentioned files in a new directory.
- To force an update just delete the file `Versions.json` and restart the application.

## How to create and use new localizations

- Create a copy of `en-US.json` and rename it for the locale you are translating to.
- Translate the strings in the second part of each key value pair. Do not change the keys.
- Ensure the new file is in the SmartHunter folder.
- Open `Config.json` and point `LocalizationFileName` to the new file.

## How to create and use new skins

- Create a copy of `Default.xaml` and rename it appropriately.
- Make changes to the new file.
- Ensure the new file is in the SmartHunter folder.
- Open `Config.json` and point `SkinFileName` to the new file.

## Credits

- [r00telement](https://www.nexusmods.com/monsterhunterworld/users/64406676) for his original [project](https://github.com/r00telement/SmartHunter).
- [Phil-Pa](https://github.com/Phil-Pa) for his [idea](https://github.com/gabrielefilipp/SmartHunter/pull/57/commits/4e2394e98ca63626b2ddcb4503a0ba0b0ed70c72)

## Disclaimer

Use with care and at your own risk. It is possible to get banned from games for using mods and overlays. There have been reports of people being banned from other games, such as PUBG, if overlays are accidentally left running in the background. To date, there have been no reports of players being banned from Monster Hunter: World for using mods and overlays, but that doesn't preclude it from happening in the future.
17 changes: 8 additions & 9 deletions SmartHunter.sln
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.106
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartHunter", "SmartHunter\SmartHunter.csproj", "{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmartHunter", "SmartHunter\SmartHunter.csproj", "{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2A20B067-F085-4EB5-8667-7E708ACE5755}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
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
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Debug|x64.ActiveCfg = Debug|x64
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Debug|x64.Build.0 = Debug|x64
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Release|Any CPU.Build.0 = Release|Any CPU
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Release|x64.ActiveCfg = Release|x64
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion SmartHunter/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
</configuration>
36 changes: 27 additions & 9 deletions SmartHunter/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
using SmartHunter.Core;
using SmartHunter.Game;
using SmartHunter.Game.Data.ViewModels;
using SmartHunter.Game.Helpers;
using SmartHunter.Ui.Windows;
using System;
using System.IO;
using System.Reflection;
using System.Text;
using System.Windows;
using System.Xaml;
using SmartHunter.Core;
using SmartHunter.Game;
using SmartHunter.Game.Data.ViewModels;
using SmartHunter.Game.Helpers;
using SmartHunter.Ui.Windows;
using XamlReader = System.Windows.Markup.XamlReader;

namespace SmartHunter
{
Expand Down Expand Up @@ -39,7 +41,23 @@ protected override void OnStartup(StartupEventArgs e)
m_SkinFile.Changed += (s1, e1) => { LoadSkin(); };
LoadSkin();

m_Overlay = new MhwOverlay(new ConsoleWindow(), new TeamWidgetWindow(), new MonsterWidgetWindow(), new PlayerWidgetWindow());
try
{
string[] files = Directory.GetFiles(".");
foreach (string file in files)
{
if (Path.GetExtension(file).Equals(".exe") && file.Contains("SmartHunter_"))
{
File.Delete(file);
}
}
}
catch
{

}

m_Overlay = new MhwOverlay(new ConsoleWindow(), new TeamWidgetWindow(), new MonsterWidgetWindow(), new PlayerWidgetWindow(), new DebugWidgetWindow());

base.OnStartup(e);
}
Expand Down Expand Up @@ -78,16 +96,16 @@ void LoadSkin()
{
ResourceDictionary resourceDictionary = null;

using (var streamReader = new StreamReader(m_SkinFile.FullPathFileName, System.Text.Encoding.UTF8))
using (var streamReader = new StreamReader(m_SkinFile.FullPathFileName, Encoding.UTF8))
{
var xmlReaderSettings = new XamlXmlReaderSettings
{
LocalAssembly = Assembly.GetExecutingAssembly()
};

using (var xamlReader = new XamlXmlReader(streamReader.BaseStream, System.Windows.Markup.XamlReader.GetWpfSchemaContext(), xmlReaderSettings))
using (var xamlReader = new XamlXmlReader(streamReader.BaseStream, XamlReader.GetWpfSchemaContext(), xmlReaderSettings))
{
resourceDictionary = System.Windows.Markup.XamlReader.Load(xamlReader) as ResourceDictionary;
resourceDictionary = XamlReader.Load(xamlReader) as ResourceDictionary;
}
}

Expand Down
Loading