From 72288e218890be2addc48467a38650ceaaea17f2 Mon Sep 17 00:00:00 2001 From: Daniel Ong Date: Sun, 2 Sep 2018 14:25:02 -0700 Subject: [PATCH] Fixed decompilation errors --- App.cs | 4 ++-- MainWindow.xaml.cs | 40 ++++--------------------------------- mainwindow.xaml | 1 + mhw_damage_meter_1_0.csproj | 20 +++++++++++++++++++ mhw_damage_meter_1_0.sln | 18 +++++++++++++---- 5 files changed, 41 insertions(+), 42 deletions(-) diff --git a/App.cs b/App.cs index 1b15717..674c4a2 100644 --- a/App.cs +++ b/App.cs @@ -13,7 +13,7 @@ namespace mhw_dps_wpf { public class App : Application { - [DebuggerNonUserCode] + // [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] public void InitializeComponent() { @@ -21,7 +21,7 @@ public void InitializeComponent() } [STAThread] - [DebuggerNonUserCode] + // [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] public static void Main() { diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 7374b28..388fad8 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -40,8 +40,6 @@ public partial class MainWindow : Window, IComponentConnector private double last_activated = MainWindow.time(); private Process game; private bool init_finished; - internal Canvas front_canvas; - private bool _contentLoaded; public MainWindow() { @@ -217,10 +215,10 @@ private void init_canvas() Canvas.SetLeft((UIElement) this.player_dmg_tbs[index], this.front_canvas.ActualWidth - this.player_dmg_tbs[index].Width - 3.0); this.front_canvas.Children.Add((UIElement) this.player_dmg_tbs[index]); } - this.player_name_tbs[0].Text = "拖统计条:移动窗口"; - this.player_name_tbs[1].Text = "drag bars to move"; - this.player_name_tbs[2].Text = "滚轮:放大缩小窗口"; - this.player_name_tbs[3].Text = "mouse wheel to zoom"; + this.player_name_tbs[0].Text = "This is Daniel"; + this.player_name_tbs[1].Text = "I'm modifying the mod now!"; + this.player_name_tbs[2].Text = "Click and drag to move"; + this.player_name_tbs[3].Text = "Scroll mouse wheel to zoom"; this.update_layout(); } @@ -290,35 +288,5 @@ private void Window_MouseWheel(object sender, MouseWheelEventArgs e) } } - [DebuggerNonUserCode] - [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] - public void InitializeComponent() - { - if (this._contentLoaded) - return; - this._contentLoaded = true; - Application.LoadComponent((object) this, new Uri("/mhw_dps_wpf;component/mainwindow.xaml", UriKind.Relative)); - } - - [DebuggerNonUserCode] - [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] - [EditorBrowsable(EditorBrowsableState.Never)] - void IComponentConnector.Connect(int connectionId, object target) - { - if (connectionId != 1) - { - if (connectionId == 2) - this.front_canvas = (Canvas) target; - else - this._contentLoaded = true; - } - else - { - ((FrameworkElement) target).Loaded += new RoutedEventHandler(this.Window_Loaded); - ((FrameworkElement) target).SizeChanged += new SizeChangedEventHandler(this.Window_SizeChanged); - ((UIElement) target).MouseDown += new MouseButtonEventHandler(this.Window_MouseDown); - ((UIElement) target).MouseWheel += new MouseWheelEventHandler(this.Window_MouseWheel); - } - } } } diff --git a/mainwindow.xaml b/mainwindow.xaml index 92a0592..337cb7f 100644 --- a/mainwindow.xaml +++ b/mainwindow.xaml @@ -4,6 +4,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:mhw_dps_wpf" + Loaded="Window_Loaded" SizeChanged="Window_SizeChanged" MouseDown="Window_MouseDown" MouseWheel="Window_MouseWheel" Title="mhw_dps_display" Height="187" Width="369" MinWidth="300" MinHeight="140" Background="Transparent"> diff --git a/mhw_damage_meter_1_0.csproj b/mhw_damage_meter_1_0.csproj index 1228595..7b203c6 100644 --- a/mhw_damage_meter_1_0.csproj +++ b/mhw_damage_meter_1_0.csproj @@ -31,6 +31,26 @@ prompt 4 + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + true + diff --git a/mhw_damage_meter_1_0.sln b/mhw_damage_meter_1_0.sln index ca767f9..f6abf02 100644 --- a/mhw_damage_meter_1_0.sln +++ b/mhw_damage_meter_1_0.sln @@ -1,20 +1,30 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mhw_dps_wpf", "mhw_damage_meter_1_0.csproj", "{D4F66696-B9F6-4DDD-B068-7C09EBDD4242}" +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2016 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mhw_damage_meter_1_0", "mhw_damage_meter_1_0.csproj", "{D4F66696-B9F6-4DDD-B068-7C09EBDD4242}" 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 {D4F66696-B9F6-4DDD-B068-7C09EBDD4242}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D4F66696-B9F6-4DDD-B068-7C09EBDD4242}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4F66696-B9F6-4DDD-B068-7C09EBDD4242}.Debug|x64.ActiveCfg = Debug|x64 + {D4F66696-B9F6-4DDD-B068-7C09EBDD4242}.Debug|x64.Build.0 = Debug|x64 {D4F66696-B9F6-4DDD-B068-7C09EBDD4242}.Release|Any CPU.ActiveCfg = Release|Any CPU {D4F66696-B9F6-4DDD-B068-7C09EBDD4242}.Release|Any CPU.Build.0 = Release|Any CPU + {D4F66696-B9F6-4DDD-B068-7C09EBDD4242}.Release|x64.ActiveCfg = Release|x64 + {D4F66696-B9F6-4DDD-B068-7C09EBDD4242}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4144D727-8B45-4CE5-B879-CD2E9A0D7CE1} + EndGlobalSection EndGlobal