@@ -26,7 +26,7 @@ protected override void UpdateView() {
26
26
27
27
this . Model . ModuleDisabled += ModelOnModuleDisabled ;
28
28
29
- this . View . EnableModuleClicked += ViewOnEnableModuleClicked ;
29
+ this . View . EnableModuleClicked += ViewOnEnableModuleClicked ;
30
30
this . View . DisableModuleClicked += ViewOnDisableModuleClicked ;
31
31
32
32
SubscribeToModuleRunState ( ) ;
@@ -73,14 +73,14 @@ private void InvalidateViewState(bool staticDetails = false, bool stateDetails =
73
73
private void DisplayStaticDetails ( ) {
74
74
// Load static details based on the manifest
75
75
76
- this . View . ModuleName = this . Model . Manifest . Name ;
77
- this . View . ModuleNamespace = this . Model . Manifest . Namespace ;
78
- this . View . ModuleDescription = this . Model . Manifest . Description ;
79
- this . View . ModuleVersion = this . Model . Manifest . Version ;
76
+ this . View . ModuleName = this . Model . Manifest . Name ;
77
+ this . View . ModuleNamespace = this . Model . Manifest . Namespace ;
78
+ this . View . ModuleDescription = this . Model . Manifest . Description ;
79
+ this . View . ModuleVersion = this . Model . Manifest . Version ;
80
80
this . View . ModuleAssemblyStateDirtied = this . Model . IsModuleAssemblyStateDirty ;
81
81
82
82
this . View . AuthorImage = GetModuleAuthorImage ( ) ;
83
- this . View . AuthorName = GetModuleAuthor ( ) ;
83
+ this . View . AuthorName = GetModuleAuthor ( ) ;
84
84
}
85
85
86
86
private void DisplaySettingMenu ( ) {
@@ -104,7 +104,7 @@ private ContextMenuStripItem BuildDeleteModuleMenuItem() {
104
104
}
105
105
106
106
private ContextMenuStripItem BuildClearSettingsMenuItem ( ) {
107
- var clearSettings = new ContextMenuStripItem ( ) { Text = Strings . GameServices . ModulesService . ModuleOption_ClearSettings } ;
107
+ var clearSettings = new ContextMenuStripItem ( ) { Text = Strings . GameServices . ModulesService . ModuleOption_ClearSettings } ;
108
108
109
109
clearSettings . BasicTooltipText = ( clearSettings . Enabled = ! this . Model . Enabled ) == true
110
110
? Strings . GameServices . ModulesService . ModuleOption_ClearSettings_DescriptionEnabled
@@ -119,11 +119,11 @@ private IEnumerable<ContextMenuStripItem> BuildOpenDirsMenuItem() {
119
119
var dirs = this . Model . Manifest . Directories ?? new List < string > ( 0 ) ;
120
120
121
121
foreach ( string dir in dirs ) {
122
- var dirItem = new ContextMenuStripItem ( ) { Text = string . Format ( Strings . GameServices . ModulesService . ModuleOption_OpenDir , dir . Titleize ( ) ) } ;
122
+ var dirItem = new ContextMenuStripItem ( ) { Text = string . Format ( Strings . GameServices . ModulesService . ModuleOption_OpenDir , dir . Titleize ( ) ) } ;
123
123
string dirPath = DirectoryUtil . RegisterDirectory ( dir ) ;
124
124
125
125
dirItem . BasicTooltipText = dirPath ;
126
- dirItem . Enabled = Directory . Exists ( dirPath ) ;
126
+ dirItem . Enabled = Directory . Exists ( dirPath ) ;
127
127
128
128
dirItem . Click += delegate {
129
129
Process . Start ( "explorer.exe" , $ "/open, \" { dirPath } \\ \" ") ;
@@ -135,7 +135,10 @@ private IEnumerable<ContextMenuStripItem> BuildOpenDirsMenuItem() {
135
135
136
136
private void DisplayStateDetails ( ) {
137
137
if ( ! GameService . Module . ModuleIsExplicitlyIncompatible ( this . Model ) ) {
138
- this . View . ModuleState = Model . ModuleInstance ? . RunState ?? ModuleRunState . Unloaded ;
138
+ var runState = Model . ModuleInstance ? . RunState ?? ModuleRunState . Unloaded ;
139
+ this . View . ModuleErrorReason = runState == ModuleRunState . FatalError ? this . Model . ModuleInstance ? . ErrorReason : null ;
140
+
141
+ this . View . ModuleState = runState ;
139
142
140
143
GameService . Settings . Save ( ) ;
141
144
} else {
@@ -160,7 +163,7 @@ private void DisplaySettingsView(bool enable) {
160
163
}
161
164
162
165
private void DisplayStatedOptions ( ) {
163
- this . View . CanEnable = GetModuleCanEnable ( ) ;
166
+ this . View . CanEnable = GetModuleCanEnable ( ) ;
164
167
this . View . CanDisable = GetModuleCanDisable ( ) ;
165
168
}
166
169
0 commit comments