-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApplication.xaml.vb
41 lines (29 loc) · 1.4 KB
/
Application.xaml.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Imports System
Imports System.Reflection.Assembly
Imports System.IO
Class Application
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Public WithEvents currentDomain As AppDomain = AppDomain.CurrentDomain
Public WindowSRRItemEditor As New WindowSRRItemEditor
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Public Sub App_Startup(ByVal Sender As Object, ByVal E As StartupEventArgs)
' WindowSRRItemEditor.Show()
End Sub
Private Shared Function app_domain_AssemblyResolve(
sender As Object, args As ResolveEventArgs) As System.Reflection.Assembly Handles currentDomain.AssemblyResolve
'.AppDomain.AssemblyResolve()
Dim aaa As String = args.Name
Dim _asm As String() = args.Name.Split(",".ToCharArray())
Dim currDir As String = Directory.GetCurrentDirectory
Dim ParentDir As String = Directory.GetParent(currDir).FullName
Dim _asmname As String = ParentDir & "\Shadowrun_Data\Managed\" + _asm(0) + ".dll"
Dim myassembly As System.Reflection.Assembly = Nothing
Try
myassembly = System.Reflection.Assembly.LoadFrom(_asmname)
Catch ex As Exception
End Try
Return myassembly
End Function
End Class