mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Add stubs for IOsServiceManager
This commit is contained in:
parent
b1df448946
commit
a53cdc63e9
@ -14,6 +14,7 @@ public class GtkModule : GuiModule
|
||||
|
||||
builder.RegisterType<GtkScannedImagePrinter>().As<IScannedImagePrinter>();
|
||||
builder.RegisterType<GtkDarkModeProvider>().As<IDarkModeProvider>().SingleInstance();
|
||||
builder.RegisterType<LinuxServiceManager>().As<IOsServiceManager>();
|
||||
|
||||
builder.RegisterType<GtkDesktopForm>().As<DesktopForm>();
|
||||
builder.RegisterType<GtkPreviewForm>().As<PreviewForm>();
|
||||
|
15
NAPS2.Lib.Gtk/Platform/LinuxServiceManager.cs
Normal file
15
NAPS2.Lib.Gtk/Platform/LinuxServiceManager.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace NAPS2.Platform;
|
||||
|
||||
// TODO
|
||||
public class LinuxServiceManager : IOsServiceManager
|
||||
{
|
||||
public bool IsRegistered => false;
|
||||
|
||||
public void Register()
|
||||
{
|
||||
}
|
||||
|
||||
public void Unregister()
|
||||
{
|
||||
}
|
||||
}
|
@ -17,6 +17,7 @@ public class WinFormsModule : GuiModule
|
||||
builder.RegisterType<PrintDocumentPrinter>().As<IScannedImagePrinter>();
|
||||
// TODO: Change this when implementing dark mode on Windows
|
||||
builder.RegisterType<StubDarkModeProvider>().As<IDarkModeProvider>().SingleInstance();
|
||||
builder.RegisterType<WindowsServiceManager>().As<IOsServiceManager>().SingleInstance();
|
||||
|
||||
builder.RegisterType<WinFormsDesktopForm>().As<DesktopForm>();
|
||||
|
||||
|
15
NAPS2.Lib.WinForms/Platform/Windows/WindowsServiceManager.cs
Normal file
15
NAPS2.Lib.WinForms/Platform/Windows/WindowsServiceManager.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace NAPS2.Platform.Windows;
|
||||
|
||||
// TODO
|
||||
public class WindowsServiceManager : IOsServiceManager
|
||||
{
|
||||
public bool IsRegistered => false;
|
||||
|
||||
public void Register()
|
||||
{
|
||||
}
|
||||
|
||||
public void Unregister()
|
||||
{
|
||||
}
|
||||
}
|
@ -47,8 +47,9 @@ public class ScannerSharingForm : EtoDialogBase
|
||||
Shortcut = Keys.Delete
|
||||
};
|
||||
|
||||
_shareAsService.Checked = _osServiceManager.IsRegistered;
|
||||
_shareAsService.CheckedChanged += ShareAsServiceCheckedChanged;
|
||||
// TODO: Enable
|
||||
// _shareAsService.Checked = _osServiceManager.IsRegistered;
|
||||
// _shareAsService.CheckedChanged += ShareAsServiceCheckedChanged;
|
||||
_listView.ImageSize = 48;
|
||||
_listView.SelectionChanged += SelectionChanged;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user