From 85727a8e2ffce670b5c621e648149b1c0dad6253 Mon Sep 17 00:00:00 2001 From: ms Date: Thu, 22 Nov 2018 16:45:09 +0100 Subject: [PATCH] StartDatei --- .gitattributes | 63 +++++ .gitignore | 261 ++++++++++++++++++ Doku.sln | 31 +++ Doku/App.config | 6 + Doku/Application.xaml | 9 + Doku/Application.xaml.vb | 6 + Doku/Doku.vbproj | 135 +++++++++ Doku/MainWindow.xaml | 12 + Doku/MainWindow.xaml.vb | 3 + Doku/My Project/AssemblyInfo.vb | 59 ++++ .../My Project/MyExtensions/MyWpfExtension.vb | 121 ++++++++ Doku/My Project/Resources.Designer.vb | 62 +++++ Doku/My Project/Resources.resx | 117 ++++++++ Doku/My Project/Settings.Designer.vb | 73 +++++ Doku/My Project/Settings.settings | 7 + 15 files changed, 965 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Doku.sln create mode 100644 Doku/App.config create mode 100644 Doku/Application.xaml create mode 100644 Doku/Application.xaml.vb create mode 100644 Doku/Doku.vbproj create mode 100644 Doku/MainWindow.xaml create mode 100644 Doku/MainWindow.xaml.vb create mode 100644 Doku/My Project/AssemblyInfo.vb create mode 100644 Doku/My Project/MyExtensions/MyWpfExtension.vb create mode 100644 Doku/My Project/Resources.Designer.vb create mode 100644 Doku/My Project/Resources.resx create mode 100644 Doku/My Project/Settings.Designer.vb create mode 100644 Doku/My Project/Settings.settings diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c4efe2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,261 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/Doku.sln b/Doku.sln new file mode 100644 index 0000000..4c9d53b --- /dev/null +++ b/Doku.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Dokumentation", "..\..\..\Documents\Visual Studio 2017\Sebastian Spielwiese\Dokumentation\Dokumentation\Dokumentation.vbproj", "{AAC83634-C001-43FC-8E9D-07A263ED0600}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Dokumentation_Updater", "..\..\..\Documents\Visual Studio 2017\Sebastian Spielwiese\Dokumentation\Dokumentation_Updater\Dokumentation_Updater.vbproj", "{5C2A947D-17F3-4975-8781-3B662FC72EAB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AAC83634-C001-43FC-8E9D-07A263ED0600}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAC83634-C001-43FC-8E9D-07A263ED0600}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAC83634-C001-43FC-8E9D-07A263ED0600}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAC83634-C001-43FC-8E9D-07A263ED0600}.Release|Any CPU.Build.0 = Release|Any CPU + {5C2A947D-17F3-4975-8781-3B662FC72EAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C2A947D-17F3-4975-8781-3B662FC72EAB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C2A947D-17F3-4975-8781-3B662FC72EAB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C2A947D-17F3-4975-8781-3B662FC72EAB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A0916F8B-2B5C-4FF4-87E2-2CB6247F625F} + EndGlobalSection +EndGlobal diff --git a/Doku/App.config b/Doku/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/Doku/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Doku/Application.xaml b/Doku/Application.xaml new file mode 100644 index 0000000..900eaa0 --- /dev/null +++ b/Doku/Application.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Doku/Application.xaml.vb b/Doku/Application.xaml.vb new file mode 100644 index 0000000..6d44da7 --- /dev/null +++ b/Doku/Application.xaml.vb @@ -0,0 +1,6 @@ +Class Application + + ' Ereignisse auf Anwendungsebene wie Startup, Exit und DispatcherUnhandledException + ' können in dieser Datei verarbeitet werden. + +End Class diff --git a/Doku/Doku.vbproj b/Doku/Doku.vbproj new file mode 100644 index 0000000..180a5ad --- /dev/null +++ b/Doku/Doku.vbproj @@ -0,0 +1,135 @@ + + + + Debug + AnyCPU + {52E4B660-3F02-4623-A742-94BCD3AC456A} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} + WinExe + Doku + Doku + v4.6.1 + Custom + true + true + + + AnyCPU + true + full + true + true + true + bin\Debug\ + Doku.xml + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 + + + AnyCPU + pdbonly + false + false + true + false + true + bin\Release\ + Doku.xml + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + 4.0 + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Application.xaml + Code + + + MainWindow.xaml + Code + + + + + + + + + + + + + + + + + + + + + + + + Code + + + Microsoft.VisualBasic.WPF.MyExtension + 1.0.0.0 + + + True + True + Resources.resx + + + True + Settings.settings + True + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + + + SettingsSingleFileGenerator + Settings.Designer.vb + + + + + + + \ No newline at end of file diff --git a/Doku/MainWindow.xaml b/Doku/MainWindow.xaml new file mode 100644 index 0000000..79a9fa2 --- /dev/null +++ b/Doku/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/Doku/MainWindow.xaml.vb b/Doku/MainWindow.xaml.vb new file mode 100644 index 0000000..922a5de --- /dev/null +++ b/Doku/MainWindow.xaml.vb @@ -0,0 +1,3 @@ +Class MainWindow + +End Class diff --git a/Doku/My Project/AssemblyInfo.vb b/Doku/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..9b18a13 --- /dev/null +++ b/Doku/My Project/AssemblyInfo.vb @@ -0,0 +1,59 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices +Imports System.Globalization +Imports System.Resources +Imports System.Windows + +' Allgemeine Informationen über eine Assembly werden über die folgenden +' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +' die einer Assembly zugeordnet sind. + +' Werte der Assemblyattribute überprüfen + + + + + + + + + +'Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie +'ImCodeVerwendeteKultur in der VBPROJ-Datei +'in einer fest. Wenn Sie in den Quelldateien beispielsweise Deutsch +'(Deutschland) verwenden, legen Sie auf "de-DE" fest. Heben Sie dann die Auskommentierung +'des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile, +'sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt. + +' + + +'Das ThemeInfo-Attribut beschreibt, wo Sie designspezifische und generische Ressourcenwörterbücher finden. +'1. Parameter: Speicherort der designspezifischen Ressourcenwörterbücher +'(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird, +' oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.) + +'2. Parameter: Speicherort des generischen Ressourcenwörterbuchs +'(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird, +'in der Anwendung sowie in den designspezifischen Ressourcenwörterbüchern nicht gefunden werden kann) + + + + +'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. + + +' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +' +' Hauptversion +' Nebenversion +' Buildnummer +' Revision +' +' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +' übernehmen, indem Sie "*" eingeben: +' + + + diff --git a/Doku/My Project/MyExtensions/MyWpfExtension.vb b/Doku/My Project/MyExtensions/MyWpfExtension.vb new file mode 100644 index 0000000..9a89619 --- /dev/null +++ b/Doku/My Project/MyExtensions/MyWpfExtension.vb @@ -0,0 +1,121 @@ +#If _MyType <> "Empty" Then + +Namespace My + ''' + ''' Modul zum Definieren der im My-Namespace für WPF verfügbaren Eigenschaften + ''' + ''' + _ + Module MyWpfExtension + Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.Computer) + Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.User) + Private s_Windows As New ThreadSafeObjectProvider(Of MyWindows) + Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.Log) + ''' + ''' Gibt das Anwendungsobjekt für die ausgeführte Anwendung zurück. + ''' + _ + Friend ReadOnly Property Application() As Application + Get + Return CType(Global.System.Windows.Application.Current, Application) + End Get + End Property + ''' + ''' Gibt Informationen über den Hostcomputer zurück. + ''' + _ + Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.Computer + Get + Return s_Computer.GetInstance() + End Get + End Property + ''' + ''' Gibt Informationen über den aktuellen Benutzer zurück. Wenn Sie die Anwendung mit den aktuellen Windows- + ''' Anmeldeinformationen ausführen möchten, rufen Sie My.User.InitializeWithWindowsUser() auf. + ''' + _ + Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.User + Get + Return s_User.GetInstance() + End Get + End Property + ''' + ''' Gibt das Anwendungsprotokoll zurück. Die Listener können in der Konfigurationsdatei der Anwendung konfiguriert werden. + ''' + _ + Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.Log + Get + Return s_Log.GetInstance() + End Get + End Property + + ''' + ''' Gibt die im Projekt definierte Windows-Sammlung zurück. + ''' + _ + Friend ReadOnly Property Windows() As MyWindows + _ + Get + Return s_Windows.GetInstance() + End Get + End Property + _ + _ + Friend NotInheritable Class MyWindows + _ + Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Window})(ByVal Instance As T) As T + If Instance Is Nothing Then + If s_WindowBeingCreated IsNot Nothing Then + If s_WindowBeingCreated.ContainsKey(GetType(T)) = True Then + Throw New Global.System.InvalidOperationException("The window cannot be accessed via My.Windows from the Window constructor.") + End If + Else + s_WindowBeingCreated = New Global.System.Collections.Hashtable() + End If + s_WindowBeingCreated.Add(GetType(T), Nothing) + Return New T() + s_WindowBeingCreated.Remove(GetType(T)) + Else + Return Instance + End If + End Function + _ + _ + Private Sub Dispose__Instance__(Of T As Global.System.Windows.Window)(ByRef instance As T) + instance = Nothing + End Sub + _ + _ + Public Sub New() + MyBase.New() + End Sub + Private Shared s_WindowBeingCreated As Global.System.Collections.Hashtable + Public Overrides Function Equals(ByVal o As Object) As Boolean + Return MyBase.Equals(o) + End Function + Public Overrides Function GetHashCode() As Integer + Return MyBase.GetHashCode + End Function + _ + _ + Friend Overloads Function [GetType]() As Global.System.Type + Return GetType(MyWindows) + End Function + Public Overrides Function ToString() As String + Return MyBase.ToString + End Function + End Class + End Module +End Namespace +Partial Class Application + Inherits Global.System.Windows.Application + _ + _ + Friend ReadOnly Property Info() As Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo + _ + Get + Return New Global.Microsoft.VisualBasic.ApplicationServices.AssemblyInfo(Global.System.Reflection.Assembly.GetExecutingAssembly()) + End Get + End Property +End Class +#End If \ No newline at end of file diff --git a/Doku/My Project/Resources.Designer.vb b/Doku/My Project/Resources.Designer.vb new file mode 100644 index 0000000..e7ecddc --- /dev/null +++ b/Doku/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:$clrversion$ +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("$safeprojectname$.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/Doku/My Project/Resources.resx b/Doku/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Doku/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Doku/My Project/Settings.Designer.vb b/Doku/My Project/Settings.Designer.vb new file mode 100644 index 0000000..63b19db --- /dev/null +++ b/Doku/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.Doku.My.MySettings + Get + Return Global.Doku.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/Doku/My Project/Settings.settings b/Doku/My Project/Settings.settings new file mode 100644 index 0000000..40ed9fd --- /dev/null +++ b/Doku/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file