@@ -46,11 +46,16 @@ public void AddMods(HashSet<ModConfiguration> mods)
4646 // add mods
4747 foreach ( var mod in mods )
4848 {
49+ string versionString = "" ;
50+ if ( mod . Version != null )
51+ {
52+ versionString = mod . Version . ToString ( ) ;
53+ }
4954
50- int index = this . dataGridView1 . Rows . Add ( new object [ ] { false , mod , mod . DisplayName } ) ;
55+ int index = this . dataGridView1 . Rows . Add ( new object [ ] { false , mod , mod . DisplayName , versionString } ) ;
5156
5257 if ( GetConfiguratorPath ( index ) != null )
53- this . dataGridView1 . Rows [ index ] . Cells [ 3 ] . ReadOnly = true ;
58+ this . dataGridView1 . Rows [ index ] . Cells [ 4 ] . ReadOnly = true ;
5459 }
5560
5661 // sort mods
@@ -67,7 +72,7 @@ private void btnCancel_Click(object sender, EventArgs e)
6772
6873 private void dataGridView_CellDoubleClick ( Object sender , DataGridViewCellEventArgs e )
6974 {
70- if ( e . RowIndex != 0 && e . ColumnIndex == 3 && GetConfiguratorPath ( e . RowIndex ) != null )
75+ if ( e . RowIndex != 0 && e . ColumnIndex == 4 && GetConfiguratorPath ( e . RowIndex ) != null )
7176 {
7277 // execute configurator and close uninstaller
7378 ExecuteConfigurator ( GetModConfiguration ( e . RowIndex ) ) ;
@@ -80,7 +85,7 @@ private void dataGridView_CellDoubleClick(Object sender, DataGridViewCellEventAr
8085
8186 private void dataGridView_CellContentClick ( object sender , DataGridViewCellEventArgs e )
8287 {
83- if ( e . RowIndex != 0 && e . ColumnIndex == 3 && GetConfiguratorPath ( e . RowIndex ) != null )
88+ if ( e . RowIndex != 0 && e . ColumnIndex == 4 && GetConfiguratorPath ( e . RowIndex ) != null )
8489 {
8590 // execute configurator and close uninstaller
8691 ExecuteConfigurator ( GetModConfiguration ( e . RowIndex ) ) ;
@@ -153,7 +158,7 @@ private void btnUninstall_Click(object sender, EventArgs e)
153158
154159 private void dataGridView_CellPainting ( object sender , DataGridViewCellPaintingEventArgs e )
155160 {
156- if ( e . ColumnIndex == 3 && this . dataGridView1 . SelectedRows . Count > 0 )
161+ if ( e . ColumnIndex == 4 && this . dataGridView1 . SelectedRows . Count > 0 )
157162 {
158163 if ( e . RowIndex > 0 )
159164 {
0 commit comments