diff --git a/ImageHandlingLibrary/Filing.cs b/ImageHandlingLibrary/Filing.cs
new file mode 100644
index 0000000..1dbe12b
--- /dev/null
+++ b/ImageHandlingLibrary/Filing.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ImageHandlingLibrary
+{
+ public class Filing
+ {
+
+ }
+}
diff --git a/ImageHandlingLibrary/ImageHandlingLibrary.csproj b/ImageHandlingLibrary/ImageHandlingLibrary.csproj
new file mode 100644
index 0000000..7a03a1c
--- /dev/null
+++ b/ImageHandlingLibrary/ImageHandlingLibrary.csproj
@@ -0,0 +1,53 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {CF1C98B6-5093-4B93-8B14-A0278B1AF724}
+ Library
+ Properties
+ ImageHandlingLibrary
+ ImageHandlingLibrary
+ v4.7.2
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ImageHandlingLibrary/InterFaces/IRegistring.cs b/ImageHandlingLibrary/InterFaces/IRegistring.cs
new file mode 100644
index 0000000..3e69784
--- /dev/null
+++ b/ImageHandlingLibrary/InterFaces/IRegistring.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ImageHandlingLibrary.InterFaces
+{
+ public interface IRegistring
+ {
+ string GetRegistryRootDir();
+ void SetRegistryValues(string rootDir);
+ }
+}
diff --git a/ImageHandlingLibrary/Properties/AssemblyInfo.cs b/ImageHandlingLibrary/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..e61c373
--- /dev/null
+++ b/ImageHandlingLibrary/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ImageHandlingLibrary")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ImageHandlingLibrary")]
+[assembly: AssemblyCopyright("Copyright © 2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("cf1c98b6-5093-4b93-8b14-a0278b1af724")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ImageHandlingLibrary/Registring.cs b/ImageHandlingLibrary/Registring.cs
new file mode 100644
index 0000000..c125b21
--- /dev/null
+++ b/ImageHandlingLibrary/Registring.cs
@@ -0,0 +1,59 @@
+using ImageHandlingLibrary.InterFaces;
+using Microsoft.Win32;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ImageHandlingLibrary
+{
+ public class Registring :IRegistring
+ {
+ public Registring()
+ {
+ CU = Registry.CurrentUser;
+ }
+ public RegistryKey CU { get; set; }
+
+ public string GetRegistryRootDir()
+ {
+ string output;
+ RegistryKey PictureHandling = CU.OpenSubKey(@"SOFTWARE\IdoIt4u\PictureHandling");
+ if (PictureHandling == null)
+ {
+ output = @"D:\OurPictures";
+ SetRegistryValues(output);
+ }
+ else
+ {
+ output = (string)PictureHandling.GetValue(@"RootMap");
+ }
+ return output;
+ }
+
+ public void SetRegistryValues(string rootDir)
+ {
+ RegistryKey IdoIt4u = CU.OpenSubKey(@"SOFTWARE\IdoIt4u", true);
+ RegistryKey PictureHandling = null;
+ if (IdoIt4u != null)
+ {
+ PictureHandling = IdoIt4u.OpenSubKey(@"PictureHandling", true);
+ }
+
+ if (PictureHandling == null)
+ {
+ if (IdoIt4u == null)
+ {
+ IdoIt4u = Registry.CurrentUser.CreateSubKey(@"Software\IdoIt4u", true);
+ }
+ else
+ PictureHandling = IdoIt4u.CreateSubKey(@"PictureHandling", true);
+ }
+ else
+ {
+ PictureHandling.SetValue(@"RootMap", rootDir);
+ }
+ }
+ }
+}
diff --git a/ImageHandlingUI/Bootstrapper.cs b/ImageHandlingUI/Bootstrapper.cs
index 2e82096..c2072e1 100644
--- a/ImageHandlingUI/Bootstrapper.cs
+++ b/ImageHandlingUI/Bootstrapper.cs
@@ -11,14 +11,57 @@ namespace ImageHandlingUI
{
public class Bootstrapper : BootstrapperBase
{
+ // implementing SimpleContainer (dependency injection system in Caliburn micro)
+ private SimpleContainer _container = new SimpleContainer();
+
public Bootstrapper()
{
Initialize();
}
+ // implementing SimpleContainer (dependency injection system in Caliburn micro)
+ //
+ protected override void Configure()
+ {
+ _container.Instance(_container);
+
+ _container
+ .Singleton()
+ .Singleton();
+
+ GetType().Assembly.GetTypes()
+ .Where(type => type.IsClass)
+ .Where(type => type.Name.EndsWith("ViewModel"))
+ .ToList()
+ .ForEach(viewModelType => _container.RegisterPerRequest(
+ viewModelType, viewModelType.ToString(), viewModelType));
+ }
+ //
+ // implementing SimpleContainer (dependency injection system in Caliburn micro)
+
protected override void OnStartup(object sender, StartupEventArgs e)
{
DisplayRootViewFor();
}
+
+ // implementing SimpleContainer (dependency injection system in Caliburn micro)
+ //
+ protected override object GetInstance(Type service, string key)
+ {
+ return _container.GetInstance(service, key);
+ }
+
+ protected override IEnumerable