diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index c3bb61386..cc5b19546 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -196,6 +196,7 @@ namespace BeWo bool printerSettingsUsePaperKind = false; var hideServiceRecordInsertedByAndInsertedOn = false; bool isEndDateVisible = false; + bool isOnlyYearMonthVisible = false; AppSettings.ShowAdvisedAttendedFlag = false; String timeRecordingMenuName = "Zeiterfassung"; @@ -229,6 +230,11 @@ namespace BeWo isEndDateVisible = true; } + val = GetSettingValue(_Mandator.Settings, "IsOnlyYearMonthVisible"); + if (val != null && val.Equals("1")) + { + isOnlyYearMonthVisible = true; + } val = GetSettingValue(_Mandator.Settings, "MaxDaysEditServiceRecordsAllowed"); int result; @@ -373,7 +379,8 @@ namespace BeWo AppSettings.ShowDatevFields = showDatevFields; AppSettings.IsServiceRecordNoticeMandatory = isServiceRecordNoticeMandatory; AppSettings.IsPasswordSecurityActiv = isPasswordSecurityActiv; - AppSettings.IsEndDateVisible = isEndDateVisible; + AppSettings.IsEndDateVisible = isEndDateVisible; + AppSettings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible; AppSettings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed; AppSettings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl; AppSettings.AnzTageZeiterfassErfolgt = anzTageZeiterfassErfolgt; diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs index aecfa0b2f..85bad7187 100644 --- a/BeWo/Core/Config/AppSettings.cs +++ b/BeWo/Core/Config/AppSettings.cs @@ -12,6 +12,8 @@ namespace BeWo.Core.Config private bool mIsEndDateVisible = true; + private bool misOnlyYearMonthVisible = true; + private bool mShowOnlyMySupportConcepts = true; private WindowStateType mWindowStateType = WindowStateType.Default; @@ -45,6 +47,13 @@ namespace BeWo.Core.Config set { mIsEndDateVisible = value; } } + public bool IsOnlyYearMonthVisible + { + get { return misOnlyYearMonthVisible; } + + set { misOnlyYearMonthVisible = value; } + } + public int MaxDaysEditServiceRecordsAllowed { get; set; } public int HilfeplanAuslaufAuswahl { get; set; } diff --git a/BeWo/Core/DocumentWatcher.cs b/BeWo/Core/DocumentWatcher.cs index 888cac170..24f94289d 100644 --- a/BeWo/Core/DocumentWatcher.cs +++ b/BeWo/Core/DocumentWatcher.cs @@ -44,6 +44,8 @@ namespace BeWo.Core if (dwi != null) { ueberwachteDateien.Remove(dwi); + watcher.EnableRaisingEvents = false; + watcher.Dispose(); } } @@ -61,10 +63,10 @@ namespace BeWo.Core watcher = new FileSystemWatcher(fi.DirectoryName); watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite - | NotifyFilters.FileName | NotifyFilters.DirectoryName; - - watcher.EnableRaisingEvents = true; + | NotifyFilters.FileName | NotifyFilters.DirectoryName; + watcher.Changed += new FileSystemEventHandler(OnChanged); + watcher.EnableRaisingEvents = true; } @@ -80,12 +82,12 @@ namespace BeWo.Core { if (WirdDateiUeberwacht(e.FullPath)) { - BeWoApp.CurrentBeWo.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate - { - if (!offeneDialoge.ContainsKey(e.FullPath)) - { + if (!offeneDialoge.ContainsKey(e.FullPath) ) + { + BeWoApp.CurrentBeWo.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate + { var dialog = new UploadDialog(e.FullPath, x); - + offeneDialoge.Add(e.FullPath, true); dialog.ShowDialog(); @@ -100,11 +102,11 @@ namespace BeWo.Core dialog.Upload = false; } offeneDialoge.Remove(e.FullPath); - } - }); + }); + } } - Console.WriteLine("Datei " + e.FullPath + " hat sich geändert. Veränderungstyp: " + e.ChangeType); + // Console.WriteLine("Datei " + e.FullPath + " hat sich geändert. Veränderungstyp: " + e.ChangeType); } private bool WirdDateiUeberwacht(string fileName) diff --git a/BeWo/View/BeWoFileView.xaml.cs b/BeWo/View/BeWoFileView.xaml.cs index 7b37a91ba..40526bc57 100644 --- a/BeWo/View/BeWoFileView.xaml.cs +++ b/BeWo/View/BeWoFileView.xaml.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.IO; using System.Linq; using System.Windows; @@ -590,15 +591,16 @@ namespace BeWo.View uFileStream.Write(lFA.BinaryData, 0, lFA.BinaryData.Length); } - System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(tmp)); - BeWoApp.CurrentBeWo.DocumentWatcher.FileCreated -= DocumentWatcher_FileCreated; BeWoApp.CurrentBeWo.DocumentWatcher.FileDeleted -= DocumentWatcher_FileDeleted; BeWoApp.CurrentBeWo.DocumentWatcher.StoppeDateiUeberwachung(tmp); + + System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(tmp)); + BeWoApp.CurrentBeWo.DocumentWatcher.StarteDateiUeberwachung(new DocumentWatcherInfo(tmp, cb.Description, cb.BeWoFolderOid, cb.FileAttachmentOid, cb.FileAttachmentVersion, _ObjectOid, _ObjectTid)); BeWoApp.CurrentBeWo.DocumentWatcher.FileCreated += DocumentWatcher_FileCreated; BeWoApp.CurrentBeWo.DocumentWatcher.FileDeleted += DocumentWatcher_FileDeleted; - + return; } diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml index 3bba7082a..f9b5a6443 100644 --- a/BeWo/View/Detail/MandatorView.xaml +++ b/BeWo/View/Detail/MandatorView.xaml @@ -90,7 +90,7 @@ - + diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml b/BeWo/View/Detail/ServiceRecordView2.xaml index 306be0c76..8492b6338 100644 --- a/BeWo/View/Detail/ServiceRecordView2.xaml +++ b/BeWo/View/Detail/ServiceRecordView2.xaml @@ -605,127 +605,220 @@ x:Name="chkServiceRecordTypeContent" IsChecked="{Binding Path=PrototypeVM.IsServiceRecordTypeContent}" Visibility="Visible" /> - - - - - - - - - - - - - + -