diff --git a/.gitignore b/.gitignore index d1d0e13ef..6a0adad09 100644 --- a/.gitignore +++ b/.gitignore @@ -377,3 +377,4 @@ /ReportImp/TabulaRasa/obj/Release /ReportImp/KirschbaumManz/obj/Debug /ReportImp/KirschbaumManz/obj/Release +/ReportImp/VkmRietberg/obj/Debug diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 5201a5c91..2ca56988c 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -102,6 +102,7 @@ + @@ -282,6 +283,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -604,6 +609,7 @@ + @@ -820,6 +826,9 @@ BudgetView.xaml + + FlexibleReportEntryDetail.xaml + Component diff --git a/BeWo/Converter/NullableBoolToBoolConverter.cs b/BeWo/Converter/NullableBoolToBoolConverter.cs new file mode 100644 index 000000000..41303415b --- /dev/null +++ b/BeWo/Converter/NullableBoolToBoolConverter.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Converter +{ + public class NullableBoolToBoolConverter : System.Windows.Data.IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return false; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs index c5213ee0a..f048298e0 100644 --- a/BeWo/Core/BeWoUtils.cs +++ b/BeWo/Core/BeWoUtils.cs @@ -1951,7 +1951,7 @@ namespace BeWo.Core ThemeManager.SetTheme(window, Theme.Office2010Black); } - ThemeManager.SetTheme(documentPreviewControl, Theme.Office2007Black); + //ThemeManager.SetTheme(documentPreviewControl, Theme.Office2007Black); documentPreviewControl.DocumentSource = report; diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs index 396c5ed37..0a85838aa 100644 --- a/BeWo/MainControl.xaml.cs +++ b/BeWo/MainControl.xaml.cs @@ -1115,7 +1115,7 @@ namespace BeWo private void button_Support_Click(object sender, RoutedEventArgs e) { - var mailButton = new Button + var mailButton = new Button { Content = "*", FontFamily = new FontFamily("Wingdings"), @@ -1199,12 +1199,35 @@ namespace BeWo { Foreground = Brushes.Black, Margin = new Thickness(45, 5, 5, 5), + FontSize = 12 }; - + + String linkText = "Teamviewer herunterladen"; + String url = "https://get.teamviewer.com/dj5y4zy"; + + if (!String.IsNullOrWhiteSpace(BeWoApp.Mandator.SupportToolUrl)) + { + url = BeWoApp.Mandator.SupportToolUrl; + if (BeWoApp.Mandator.SupportToolUrl.Contains("<") && BeWoApp.Mandator.SupportToolUrl.Contains(">") && BeWoApp.Mandator.SupportToolUrl.IndexOf("<") > 0) + { + linkText = BeWoApp.Mandator.SupportToolUrl.Substring(0, BeWoApp.Mandator.SupportToolUrl.IndexOf("<")); + url = BeWoApp.Mandator.SupportToolUrl.Substring(BeWoApp.Mandator.SupportToolUrl.IndexOf("<")); + url = url.Replace("<", "").Replace(">", ""); + } + + } + Hyperlink link = new Hyperlink(); - link.Inlines.Add("Teamviewer herunterladen"); + link.NavigateUri = new Uri(url); + link.TargetName = "newWindow"; + link.Inlines.Add(linkText); supportToolLink.Inlines.Add(link); + link.RequestNavigate += (s, e2) => + { + System.Diagnostics.Process.Start( + new System.Diagnostics.ProcessStartInfo((s as Hyperlink).NavigateUri.ToString())); + }; BeWoWindow bewoWindow = BeWoWpfUtils.CreateBeWoPopupWindow(300, 1000, true); diff --git a/BeWo/MainWindow.xaml.cs b/BeWo/MainWindow.xaml.cs index dbcc36e9e..6fba923e1 100644 --- a/BeWo/MainWindow.xaml.cs +++ b/BeWo/MainWindow.xaml.cs @@ -4,7 +4,7 @@ using System.Windows; using BeWo.Core.Config; using BeWo.MultiLanguage; using BS.Shared.Translation; - +using DevExpress.Xpf.Core; namespace BeWo { @@ -16,6 +16,9 @@ namespace BeWo public MainWindow() { InitializeComponent(); + + ApplicationThemeHelper.ApplicationThemeName = "Office2010Black"; + ShowLoginControl(); } diff --git a/BeWo/View/Detail/DokumentationstypView.xaml.cs b/BeWo/View/Detail/DokumentationstypView.xaml.cs index caf1a58ef..838a1f671 100644 --- a/BeWo/View/Detail/DokumentationstypView.xaml.cs +++ b/BeWo/View/Detail/DokumentationstypView.xaml.cs @@ -139,7 +139,7 @@ namespace BeWo.View.Detail this.ViewModel.AddNewVMToList(); } else { - MessageBox.Show("Es können maximal fünf Dokumentationstypen angelegt werden.", "Hinzufügen nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show("Es können maximal fünf Dokumentationsfelder angelegt werden.", "Hinzufügen nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information); } // grid.DataSource = null; diff --git a/BeWo/View/Detail/Report/FlexibleReportEntryDetail.xaml b/BeWo/View/Detail/Report/FlexibleReportEntryDetail.xaml new file mode 100644 index 000000000..5de402570 --- /dev/null +++ b/BeWo/View/Detail/Report/FlexibleReportEntryDetail.xaml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BeWo/View/Detail/Report/FlexibleReportEntryDetail.xaml.cs b/BeWo/View/Detail/Report/FlexibleReportEntryDetail.xaml.cs new file mode 100644 index 000000000..caf0bd018 --- /dev/null +++ b/BeWo/View/Detail/Report/FlexibleReportEntryDetail.xaml.cs @@ -0,0 +1,50 @@ +using BeWo.Core; +using BeWo.ServiceProxy; +using BS.Shared.Extensions; +using DevExpress.Utils; +using DevExpress.XtraGrid.Views.Grid.ViewInfo; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using BS.Shared.DataContracts; +using DevExpress.Data; +using DevExpress.Xpf.Grid; +using DevExpress.Xpf.Scheduler.UI; +using static BeWo.View.Detail.Report.FlexibleReportView; + +namespace BeWo.View.Detail.Report +{ + public partial class FlexibleReportEntryDetail + { + #region Konstruktor + + public FlexibleReportEntryDetail(List list, IReadOnlyList docTypes) + { + InitializeComponent(); + DatagridRegions.ItemsSource = list; + + ColumnDauer.EditSettings.DisplayFormat = "{0:N2} Std."; + ColumnKilometer.EditSettings.DisplayFormat = "{0:N1} km"; + + var noticeColumns = new[] { ColumnNotice, ColumnNotice2, ColumnNotice3, ColumnNotice4, ColumnNotice5 }; + + for (var i = 0; i < docTypes.Count && i < noticeColumns.Length; i++) + { + noticeColumns[i].Header = docTypes[i].TypeDescription; + noticeColumns[i].Visible = true; + } + } + + #endregion + + #region Propeties + + public List Entries { get; set; } + + #endregion + } +} diff --git a/BeWo/View/Detail/Report/FlexibleReportView.xaml b/BeWo/View/Detail/Report/FlexibleReportView.xaml index e3246be41..d19724173 100644 --- a/BeWo/View/Detail/Report/FlexibleReportView.xaml +++ b/BeWo/View/Detail/Report/FlexibleReportView.xaml @@ -13,127 +13,166 @@ x:Class="BeWo.View.Detail.Report.FlexibleReportView" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -