File tree 2 files changed +1
-19
lines changed
NAPS2.Lib.WinForms/EtoForms/Ui
2 files changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ namespace NAPS2.EtoForms.Ui;
16
16
17
17
public class WinFormsDesktopForm : DesktopForm
18
18
{
19
- public static WF . ApplicationContext ? ApplicationContext { get ; set ; }
20
-
21
19
private readonly Dictionary < DesktopToolbarMenuType , WF . ToolStripSplitButton > _menuButtons = new ( ) ;
22
20
private readonly ToolbarFormatter _toolbarFormatter = new ( new StringWrapper ( ) ) ;
23
21
private readonly WF . Form _form ;
@@ -109,17 +107,6 @@ protected override LayoutElement GetZoomButtons()
109
107
110
108
private WF . ListView NativeListView => ( ( WinFormsListView < UiImage > ) _listView ) . NativeControl ;
111
109
112
- protected override void SetMainForm ( Form newMainForm )
113
- {
114
- base . SetMainForm ( newMainForm ) ;
115
- if ( ApplicationContext == null )
116
- {
117
- Log . Error ( "ApplicationContext should not be null" ) ;
118
- return ;
119
- }
120
- ApplicationContext . MainForm = newMainForm . ToSWF ( ) ;
121
- }
122
-
123
110
protected override void SetCulture ( string cultureId )
124
111
{
125
112
SaveToolStripLocation ( ) ;
Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ protected virtual void SetCulture(string cultureId)
454
454
FormStateController . DoSaveFormState ( ) ;
455
455
var newDesktop = FormFactory . Create < DesktopForm > ( ) ;
456
456
newDesktop . Show ( ) ;
457
- SetMainForm ( newDesktop ) ;
457
+ Application . Instance . MainForm = newDesktop ;
458
458
Close ( ) ;
459
459
}
460
460
finally
@@ -464,11 +464,6 @@ protected virtual void SetCulture(string cultureId)
464
464
// TODO: If we make any other forms non-modal, we will need to refresh them too
465
465
}
466
466
467
- protected virtual void SetMainForm ( Form newMainForm )
468
- {
469
- Application . Instance . MainForm = newMainForm ;
470
- }
471
-
472
467
protected virtual void UpdateToolbar ( )
473
468
{
474
469
// Top-level toolbar items
You can’t perform that action at this time.
0 commit comments