From fc725ab7b2ca13d5220ac748f15d370bf03d6fe9 Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Sat, 10 Jun 2023 00:12:59 +0100 Subject: [PATCH 1/8] Changes required to make this run on my system in 2023 --- Management/Management.csproj | 1 + Management/Models/AzureAccount.cs | 10 - Management/Models/AzureResources.cs | 10 - Management/Models/Canvas.cs | 10 - Management/Models/Clock.cs | 10 - Management/Models/ClockTypes.cs | 10 - Management/Models/Content.cs | 10 - Management/Models/ContentTypes.cs | 10 - Management/Models/DMModel.Context.cs | 12 +- Management/Models/DMModel.Designer.cs | 12 +- Management/Models/DMModel.cs | 12 +- Management/Models/DMModel.edmx | 2275 ++++++++++----------- Management/Models/Display.cs | 10 - Management/Models/DisplayAutoLoadModes.cs | 10 - Management/Models/EncryptionMethods.cs | 10 - Management/Models/ExchangeAccount.cs | 10 - Management/Models/Frame.cs | 10 - Management/Models/FullScreen.cs | 10 - Management/Models/Html.cs | 10 - Management/Models/Level.cs | 10 - Management/Models/Location.cs | 10 - Management/Models/Memo.cs | 10 - Management/Models/News.cs | 10 - Management/Models/OauthAccount.cs | 10 - Management/Models/OauthProviders.cs | 10 - Management/Models/Outlook.cs | 10 - Management/Models/OutlookEwsVersions.cs | 10 - Management/Models/OutlookModes.cs | 10 - Management/Models/OutlookPrivacy.cs | 10 - Management/Models/Panel.cs | 10 - Management/Models/Picture.cs | 10 - Management/Models/Powerbi.cs | 10 - Management/Models/PowerbiTypes.cs | 10 - Management/Models/RenderModes.cs | 10 - Management/Models/Report.cs | 10 - Management/Models/ReportServer.cs | 10 - Management/Models/Setting.cs | 10 - Management/Models/SettingTypes.cs | 10 - Management/Models/Template.cs | 10 - Management/Models/Video.cs | 10 - Management/Models/Weather.cs | 10 - Management/Models/WeatherProviders.cs | 10 - Management/Models/WeatherTypes.cs | 10 - Management/Models/YTAspect.cs | 10 - Management/Models/YTQuality.cs | 10 - Management/Models/YTRate.cs | 10 - Management/Models/Youtube.cs | 10 - Management/Web.config | 2 +- 48 files changed, 1137 insertions(+), 1597 deletions(-) diff --git a/Management/Management.csproj b/Management/Management.csproj index 0e9cbe7c..5cfc4d20 100644 --- a/Management/Management.csproj +++ b/Management/Management.csproj @@ -466,6 +466,7 @@ + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/Management/Models/AzureAccount.cs b/Management/Models/AzureAccount.cs index ab0b544b..a74a48b5 100644 --- a/Management/Models/AzureAccount.cs +++ b/Management/Models/AzureAccount.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/AzureResources.cs b/Management/Models/AzureResources.cs index cf076e12..646f3374 100644 --- a/Management/Models/AzureResources.cs +++ b/Management/Models/AzureResources.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Canvas.cs b/Management/Models/Canvas.cs index 4b8e4eeb..a2a9478a 100644 --- a/Management/Models/Canvas.cs +++ b/Management/Models/Canvas.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Clock.cs b/Management/Models/Clock.cs index cf088c1b..00248668 100644 --- a/Management/Models/Clock.cs +++ b/Management/Models/Clock.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/ClockTypes.cs b/Management/Models/ClockTypes.cs index 545ad69b..993a95e3 100644 --- a/Management/Models/ClockTypes.cs +++ b/Management/Models/ClockTypes.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Content.cs b/Management/Models/Content.cs index bf03dc01..bf454c81 100644 --- a/Management/Models/Content.cs +++ b/Management/Models/Content.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/ContentTypes.cs b/Management/Models/ContentTypes.cs index 8324f062..1399dac9 100644 --- a/Management/Models/ContentTypes.cs +++ b/Management/Models/ContentTypes.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/DMModel.Context.cs b/Management/Models/DMModel.Context.cs index 55a35151..3169a888 100644 --- a/Management/Models/DMModel.Context.cs +++ b/Management/Models/DMModel.Context.cs @@ -1,14 +1,4 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated from a template. // diff --git a/Management/Models/DMModel.Designer.cs b/Management/Models/DMModel.Designer.cs index 03aaae4d..98667dab 100644 --- a/Management/Models/DMModel.Designer.cs +++ b/Management/Models/DMModel.Designer.cs @@ -1,14 +1,4 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - -// T4 code generation is enabled for model 'E:\project\DisplayMonkey\Management\Models\DMModel.edmx'. +// T4 code generation is enabled for model 'C:\Users\alexjones\RiderProjects\DisplayMonkey\Management\Models\DMModel.edmx'. // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model // is open in the designer. diff --git a/Management/Models/DMModel.cs b/Management/Models/DMModel.cs index 206b5983..0c4c97d7 100644 --- a/Management/Models/DMModel.cs +++ b/Management/Models/DMModel.cs @@ -1,14 +1,4 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated from a template. // diff --git a/Management/Models/DMModel.edmx b/Management/Models/DMModel.edmx index 3d6bf8c9..5586b0ce 100644 --- a/Management/Models/DMModel.edmx +++ b/Management/Models/DMModel.edmx @@ -4,847 +4,837 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1454,308 +1444,307 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Management/Models/Display.cs b/Management/Models/Display.cs index b69ebdb5..d105f095 100644 --- a/Management/Models/Display.cs +++ b/Management/Models/Display.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/DisplayAutoLoadModes.cs b/Management/Models/DisplayAutoLoadModes.cs index abd11563..2e25ce23 100644 --- a/Management/Models/DisplayAutoLoadModes.cs +++ b/Management/Models/DisplayAutoLoadModes.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/EncryptionMethods.cs b/Management/Models/EncryptionMethods.cs index 451d8764..cfaadbae 100644 --- a/Management/Models/EncryptionMethods.cs +++ b/Management/Models/EncryptionMethods.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/ExchangeAccount.cs b/Management/Models/ExchangeAccount.cs index 3fa77e6d..a6a77fb3 100644 --- a/Management/Models/ExchangeAccount.cs +++ b/Management/Models/ExchangeAccount.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Frame.cs b/Management/Models/Frame.cs index 6268e18c..69abada3 100644 --- a/Management/Models/Frame.cs +++ b/Management/Models/Frame.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/FullScreen.cs b/Management/Models/FullScreen.cs index 10989745..d0389fc3 100644 --- a/Management/Models/FullScreen.cs +++ b/Management/Models/FullScreen.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Html.cs b/Management/Models/Html.cs index bc3c96b9..da33f2e4 100644 --- a/Management/Models/Html.cs +++ b/Management/Models/Html.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Level.cs b/Management/Models/Level.cs index 7fe4340c..d56cb682 100644 --- a/Management/Models/Level.cs +++ b/Management/Models/Level.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Location.cs b/Management/Models/Location.cs index fdee732d..1af7e0f6 100644 --- a/Management/Models/Location.cs +++ b/Management/Models/Location.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Memo.cs b/Management/Models/Memo.cs index 45b59bdc..0cf61369 100644 --- a/Management/Models/Memo.cs +++ b/Management/Models/Memo.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/News.cs b/Management/Models/News.cs index 5405033b..dc146ddb 100644 --- a/Management/Models/News.cs +++ b/Management/Models/News.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OauthAccount.cs b/Management/Models/OauthAccount.cs index 6b7f6660..30f680c4 100644 --- a/Management/Models/OauthAccount.cs +++ b/Management/Models/OauthAccount.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OauthProviders.cs b/Management/Models/OauthProviders.cs index 614591b2..da06de8b 100644 --- a/Management/Models/OauthProviders.cs +++ b/Management/Models/OauthProviders.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Outlook.cs b/Management/Models/Outlook.cs index ad23b3e0..e8f93090 100644 --- a/Management/Models/Outlook.cs +++ b/Management/Models/Outlook.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OutlookEwsVersions.cs b/Management/Models/OutlookEwsVersions.cs index c7ee3b4e..0008bd4b 100644 --- a/Management/Models/OutlookEwsVersions.cs +++ b/Management/Models/OutlookEwsVersions.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OutlookModes.cs b/Management/Models/OutlookModes.cs index 466c3d43..36bb986e 100644 --- a/Management/Models/OutlookModes.cs +++ b/Management/Models/OutlookModes.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OutlookPrivacy.cs b/Management/Models/OutlookPrivacy.cs index b13bd9f2..fe74c90c 100644 --- a/Management/Models/OutlookPrivacy.cs +++ b/Management/Models/OutlookPrivacy.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Panel.cs b/Management/Models/Panel.cs index 7e3c3987..55975b4e 100644 --- a/Management/Models/Panel.cs +++ b/Management/Models/Panel.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Picture.cs b/Management/Models/Picture.cs index a055e217..9361e06d 100644 --- a/Management/Models/Picture.cs +++ b/Management/Models/Picture.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Powerbi.cs b/Management/Models/Powerbi.cs index 13664087..2cce0877 100644 --- a/Management/Models/Powerbi.cs +++ b/Management/Models/Powerbi.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/PowerbiTypes.cs b/Management/Models/PowerbiTypes.cs index 903dac04..f8cc527b 100644 --- a/Management/Models/PowerbiTypes.cs +++ b/Management/Models/PowerbiTypes.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/RenderModes.cs b/Management/Models/RenderModes.cs index 0cb16409..e2e09ce3 100644 --- a/Management/Models/RenderModes.cs +++ b/Management/Models/RenderModes.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Report.cs b/Management/Models/Report.cs index 10f26aed..4a7eb755 100644 --- a/Management/Models/Report.cs +++ b/Management/Models/Report.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/ReportServer.cs b/Management/Models/ReportServer.cs index 62d42c7b..921ccb32 100644 --- a/Management/Models/ReportServer.cs +++ b/Management/Models/ReportServer.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Setting.cs b/Management/Models/Setting.cs index 74b18f44..fe3b1296 100644 --- a/Management/Models/Setting.cs +++ b/Management/Models/Setting.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/SettingTypes.cs b/Management/Models/SettingTypes.cs index 6082e269..61da161b 100644 --- a/Management/Models/SettingTypes.cs +++ b/Management/Models/SettingTypes.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Template.cs b/Management/Models/Template.cs index 73223774..434649c2 100644 --- a/Management/Models/Template.cs +++ b/Management/Models/Template.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Video.cs b/Management/Models/Video.cs index 38dcac47..ed7f1a0e 100644 --- a/Management/Models/Video.cs +++ b/Management/Models/Video.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Weather.cs b/Management/Models/Weather.cs index 4a148713..bd578500 100644 --- a/Management/Models/Weather.cs +++ b/Management/Models/Weather.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/WeatherProviders.cs b/Management/Models/WeatherProviders.cs index 6a99d580..17d11fcb 100644 --- a/Management/Models/WeatherProviders.cs +++ b/Management/Models/WeatherProviders.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/WeatherTypes.cs b/Management/Models/WeatherTypes.cs index 09b93bc2..44499f0f 100644 --- a/Management/Models/WeatherTypes.cs +++ b/Management/Models/WeatherTypes.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/YTAspect.cs b/Management/Models/YTAspect.cs index dac514aa..dfd77c33 100644 --- a/Management/Models/YTAspect.cs +++ b/Management/Models/YTAspect.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/YTQuality.cs b/Management/Models/YTQuality.cs index 2c489de6..eca92b01 100644 --- a/Management/Models/YTQuality.cs +++ b/Management/Models/YTQuality.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/YTRate.cs b/Management/Models/YTRate.cs index 74e9164a..a8a1fcb3 100644 --- a/Management/Models/YTRate.cs +++ b/Management/Models/YTRate.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Youtube.cs b/Management/Models/Youtube.cs index 7bc84607..983abd3d 100644 --- a/Management/Models/Youtube.cs +++ b/Management/Models/Youtube.cs @@ -1,13 +1,3 @@ -/*! -* DisplayMonkey source file -* http://displaymonkey.org -* -* Copyright (c) 2019 Fuel9 LLC and contributors -* -* Released under the MIT license: -* http://opensource.org/licenses/MIT -*/ - //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Web.config b/Management/Web.config index c3593ea4..0b259375 100644 --- a/Management/Web.config +++ b/Management/Web.config @@ -9,7 +9,7 @@ - + From 1a5d17ea1a8c85fc0163a9408e8a5c9513e9dfa7 Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Fri, 16 Jun 2023 12:21:53 +0100 Subject: [PATCH 2/8] Replace getOutlook method with call to MS Graph API rather than EWS API --- Presentation/Outlook.cs | 3 +- Presentation/Presentation.csproj | 148 ++++++++++++- Presentation/Web.config | 85 ++++++-- Presentation/getOutlook.ashx.cs | 352 ++++++++++--------------------- Presentation/packages.config | 46 ++++ 5 files changed, 381 insertions(+), 253 deletions(-) diff --git a/Presentation/Outlook.cs b/Presentation/Outlook.cs index 1b1a5587..31b3bfcb 100644 --- a/Presentation/Outlook.cs +++ b/Presentation/Outlook.cs @@ -19,6 +19,7 @@ using Microsoft.Exchange.WebServices.Data; using System.Web.Script.Serialization; using DisplayMonkey.Language; +using Microsoft.Graph.Models; namespace DisplayMonkey { @@ -44,7 +45,7 @@ public class Outlook : Frame private int ShowAsFlags { get; set; } - public bool IsShowAsAllowed(LegacyFreeBusyStatus flag) + public bool IsShowAsAllowed(FreeBusyStatus flag) { return (ShowAsFlags & (1 << (int)flag)) != 0; } diff --git a/Presentation/Presentation.csproj b/Presentation/Presentation.csproj index bc3b1b6d..723d1e12 100644 --- a/Presentation/Presentation.csproj +++ b/Presentation/Presentation.csproj @@ -13,7 +13,7 @@ Properties DisplayMonkey DisplayMonkey.Presentation - v4.5 + v4.8 @@ -48,6 +48,15 @@ false + + ..\packages\Azure.Core.1.32.0\lib\net461\Azure.Core.dll + + + ..\packages\Azure.Identity.1.9.0\lib\netstandard2.0\Azure.Identity.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + ..\packages\EWS-Api-2.1.1.0.0\lib\net35\Microsoft.Exchange.WebServices.dll @@ -55,13 +64,136 @@ ..\packages\EWS-Api-2.1.1.0.0\lib\net35\Microsoft.Exchange.WebServices.Auth.dll + + ..\packages\Microsoft.Graph.5.14.0\lib\netstandard2.0\Microsoft.Graph.dll + + + ..\packages\Microsoft.Graph.Core.3.0.7\lib\net462\Microsoft.Graph.Core.dll + + + ..\packages\Microsoft.Identity.Client.4.49.1\lib\net461\Microsoft.Identity.Client.dll + + + ..\packages\Microsoft.Identity.Client.Extensions.Msal.2.25.3\lib\net45\Microsoft.Identity.Client.Extensions.Msal.dll + + + ..\packages\Microsoft.IdentityModel.Abstractions.6.30.1\lib\net472\Microsoft.IdentityModel.Abstractions.dll + + + ..\packages\Microsoft.IdentityModel.JsonWebTokens.6.30.1\lib\net472\Microsoft.IdentityModel.JsonWebTokens.dll + + + ..\packages\Microsoft.IdentityModel.Logging.6.30.1\lib\net472\Microsoft.IdentityModel.Logging.dll + + + ..\packages\Microsoft.IdentityModel.Protocols.6.30.1\lib\net472\Microsoft.IdentityModel.Protocols.dll + + + ..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.6.30.1\lib\net472\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll + + + ..\packages\Microsoft.IdentityModel.Tokens.6.30.1\lib\net472\Microsoft.IdentityModel.Tokens.dll + + + ..\packages\Microsoft.Kiota.Abstractions.1.1.2\lib\netstandard2.0\Microsoft.Kiota.Abstractions.dll + + + ..\packages\Microsoft.Kiota.Authentication.Azure.1.0.2\lib\netstandard2.0\Microsoft.Kiota.Authentication.Azure.dll + + + ..\packages\Microsoft.Kiota.Http.HttpClientLibrary.1.0.2\lib\netstandard2.0\Microsoft.Kiota.Http.HttpClientLibrary.dll + + + ..\packages\Microsoft.Kiota.Serialization.Form.1.0.1\lib\netstandard2.0\Microsoft.Kiota.Serialization.Form.dll + + + ..\packages\Microsoft.Kiota.Serialization.Json.1.0.6\lib\netstandard2.0\Microsoft.Kiota.Serialization.Json.dll + + + ..\packages\Microsoft.Kiota.Serialization.Text.1.0.1\lib\netstandard2.0\Microsoft.Kiota.Serialization.Text.dll + + + + ..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + - + + ..\packages\System.Diagnostics.DiagnosticSource.6.0.0\lib\net461\System.Diagnostics.DiagnosticSource.dll + + + + ..\packages\System.IdentityModel.Tokens.Jwt.6.30.1\lib\net472\System.IdentityModel.Tokens.Jwt.dll + + + ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + ..\packages\System.Memory.Data.1.0.2\lib\net461\System.Memory.Data.dll + + + ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll + + + ..\packages\System.Net.Http.WinHttpHandler.7.0.0\lib\net462\System.Net.Http.WinHttpHandler.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + + + + ..\packages\System.Security.Claims.4.3.0\lib\net46\System.Security.Claims.dll + + + ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll + + + ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + + + ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + + + ..\packages\System.Security.Cryptography.ProtectedData.4.7.0\lib\net461\System.Security.Cryptography.ProtectedData.dll + + + ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + + + ..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll + + + ..\packages\System.Text.Json.6.0.0\lib\net461\System.Text.Json.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + + @@ -70,6 +202,9 @@ + + ..\packages\Tavis.UriTemplates.2.0.0\lib\netstandard2.0\Tavis.UriTemplates.dll + @@ -450,6 +585,15 @@ xcopy "$(SolutionDir)Management\Content\Site.css" "$(SolutionDir)Presentation\Styles\Site.css" /Y /U + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + + + + - + - + + + + + + - + - + - - + + - - + + - - - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Presentation/getOutlook.ashx.cs b/Presentation/getOutlook.ashx.cs index b5620da5..8d85c13c 100644 --- a/Presentation/getOutlook.ashx.cs +++ b/Presentation/getOutlook.ashx.cs @@ -10,14 +10,14 @@ using System; using System.Collections.Generic; +using System.Configuration; using System.Linq; using System.Web; -//using System.Web.UI; -//using System.Web.UI.WebControls; using System.Web.Script.Serialization; -using Microsoft.Exchange.WebServices.Data; -using System.Net; +using Azure.Identity; using DisplayMonkey.Language; +using Microsoft.Graph; +using Microsoft.Graph.Models; namespace DisplayMonkey { @@ -223,7 +223,7 @@ public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContex private class OutlookData { - public IEnumerable events = null; + public IEnumerable events; public TimeSpan startTime = new TimeSpan(0, 0, 0); public TimeSpan endTime = new TimeSpan(23, 59, 59); public TimeZoneInfo timeZone = TimeZoneInfo.Local; @@ -236,254 +236,124 @@ public OutlookData(Outlook outlook, Location location, int reserveMinutes) #region -------- EWS Data Call --------f - private static ExtendedPropertyDefinition PR_TextBody = new ExtendedPropertyDefinition(0x1000, MapiPropertyType.String); - private static ExtendedPropertyDefinition PR_Sensitivity = new ExtendedPropertyDefinition(0x0036, MapiPropertyType.Integer); - private OutlookData() { } - public static async System.Threading.Tasks.Task FromFrameAsync(Outlook outlook, Location location, int reserveMinutes) + public static async System.Threading.Tasks.Task FromFrameAsync(Outlook outlook, + Location location, int reserveMinutes) { - OutlookData data = new OutlookData(); - DateTime - locationTime = location.LocationTime, - locationToday = new DateTime(locationTime.Year, locationTime.Month, locationTime.Day), - windowBeg = locationToday, //locationTime, - windowEnd = locationToday.AddDays(1).AddMilliseconds(-1) - ; - - // EWS: create connection point - ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack; - - ExchangeService service = new ExchangeService(outlook.EwsVersion) - { - Credentials = new WebCredentials( - outlook.Account, - Encryptor.Current.Decrypt(outlook.Password) // 1.4.0 - ), - }; - - // https://msdn.microsoft.com/en-us/library/office/dn458789%28v=exchg.150%29.aspx?f=255&MSPPError=-2147217396#bk_howmaintained - // https://social.msdn.microsoft.com/Forums/lync/en-US/bd032e3d-2501-40ba-a2b0-29a404685c35/error-exchange-web-services-are-not-currently-available?forum=exchangesvrdevelopment - service.HttpHeaders.Add("X-AnchorMailbox", outlook.Account); - - // EWS: get URL - if (!string.IsNullOrWhiteSpace(outlook.URL)) - { - service.Url = new Uri(outlook.URL); - } - else + var tenantId = ConfigurationManager.AppSettings["AzureActiveDirectoryTenantId"]; + var clientId = ConfigurationManager.AppSettings["AzureActiveDirectoryClientId"]; + if (tenantId == default || clientId == default) { - service.Url = await HttpRuntime.Cache.GetOrAddSlidingAsync( - string.Format("exchange_account_{0}", outlook.Account), - async (expire) => - { - expire.After = TimeSpan.FromMinutes(60); - return await System.Threading.Tasks.Task.Run(() => - { - service.AutodiscoverUrl(outlook.Account, RedirectionUrlValidationCallback); - return service.Url; - }); - }); + throw new Exception( + "App Settings must specify Azure Active Directory Client and Tenant ID to use Outlook frame"); } - // mailbox: get display name - data.DisplayName = outlook.Name; - if (string.IsNullOrWhiteSpace(data.DisplayName)) - { - var match = await System.Threading.Tasks.Task.Run(() => service.ResolveName(outlook.Mailbox)); - if (match.Count > 0) + var useNamePasswordCredential = new UsernamePasswordCredential(outlook.Account, + Encryptor.Current.Decrypt(outlook.Password), + tenantId, + clientId); + + // We don't provide a way for the user to consent to these scopes. + // Either issue admin consent in AAD or use another method to trigger the user consent flow. + var graphServiceClient = new GraphServiceClient(useNamePasswordCredential, + new[] { "user.read", "calendars.readwrite", "calendars.readwrite.shared", "MailboxSettings.Read" }); + + // The data we'll now fill, and then return to the client. + var data = new OutlookData(); + var locationTime = location.LocationTime; + var locationToday = new DateTime(locationTime.Year, locationTime.Month, locationTime.Day); + var windowBeg = locationToday; + var windowEnd = locationToday.AddDays(1).AddMilliseconds(-1); + + // 1. Get the owner name of the specified mailboxes calendar and set the data.DisplayName property + // 2. Check if the user has working hours set. If they do, set data.startTime and data.endTime and data.timeZone to those working hours + // 3. If reserveMinutes > 0 then create a new event in the calendar for reserveMinutes number of minutes + // 4. Get a list of events today + // 5. Filter those events based on TBC criteria and map to data.events + + // Working Hours are stored in a users Mailbox Settings. + var mailboxSettings = await graphServiceClient.Me.MailboxSettings.GetAsync( + config => { - if (match[0].Contact != null) - { - data.DisplayName = - match[0].Contact.CompleteName.FullName - ?? match[0].Contact.DisplayName - ?? data.DisplayName - ; - } - - else if (match[0].Mailbox != null) - { - data.DisplayName = - match[0].Mailbox.Name - ?? data.DisplayName - ; - } - } - //else - // throw new ApplicationException(string.Format("Mailbox {0} not found", mailbox)); + config.QueryParameters.Select = new[] { "workingHours" }; + }); + + // If we have working hours set, then set the start and end times. Note we always assume Local time. This might be bad? + // I'm unsure of the behaviour of the graph api when there are no working hours set. + if (mailboxSettings.WorkingHours != null) + { + data.startTime = mailboxSettings.WorkingHours.StartTime?.DateTime.TimeOfDay ?? DateTime.Today.TimeOfDay; + data.endTime = mailboxSettings.WorkingHours.EndTime?.DateTime.TimeOfDay ?? + DateTime.Today.AddHours(23).AddMinutes(59).TimeOfDay; + data.timeZone = TimeZoneInfo.Local; } - // mailbox: get availability - GetUserAvailabilityResults uars = await System.Threading.Tasks.Task.Run(() => + // Get the name of the owner of the calendar. + var calendarDetails = await graphServiceClient.Users[outlook.Account].Calendar.GetAsync(c => { - return service.GetUserAvailability( - new AttendeeInfo[] { new AttendeeInfo(outlook.Mailbox, MeetingAttendeeType.Required, true) }, - new TimeWindow(locationToday, locationToday.AddDays(1)), - AvailabilityData.FreeBusy - ); + c.QueryParameters.Select = new[] { "owner" }; }); - var u = uars.AttendeesAvailability[0]; - if (u.WorkingHours != null) - { - data.startTime = u.WorkingHours.StartTime; - data.endTime = u.WorkingHours.EndTime; - data.timeZone = u.WorkingHours.TimeZone; - } + data.DisplayName = calendarDetails.Owner.Name; + // Do we need to create an event in the calendar? if (reserveMinutes > 0) { - Appointment appointment = new Appointment(service) + _ = await graphServiceClient.Users[outlook.Account].Calendar.Events.PostAsync(new Event { Subject = outlook.BookingSubject, - Body = string.Format("{0} | {1}", Resources.Outlook_BookingOnDemand, Resources.DisplayMonkey), - Start = DateTime.Now, - End = DateTime.Now.AddMinutes(reserveMinutes), - }; - - if (outlook.Mailbox == outlook.Account) - { - await System.Threading.Tasks.Task.Run(() => + Body = new ItemBody { - appointment.Save(SendInvitationsMode.SendToNone); - return true; - }); - } - else - { - appointment.Resources.Add(outlook.Mailbox); - await System.Threading.Tasks.Task.Run(() => + Content = $"{Resources.Outlook_BookingOnDemand} | {Resources.DisplayMonkey}", + }, + Start = new DateTimeTimeZone { - appointment.Save(SendInvitationsMode.SendOnlyToAll); - return true; - }); - } + DateTime = DateTime.Now.ToString("O") + }, + End = new DateTimeTimeZone + { + DateTime = DateTime.Now.AddMinutes(reserveMinutes).ToString("O") + } + }); } - - // events: prep filter - FolderId folderId = new FolderId(WellKnownFolderName.Calendar, new Mailbox(outlook.Mailbox)); - CalendarFolder calendar = await System.Threading.Tasks.Task.Run(() => CalendarFolder.Bind(service, folderId, new PropertySet())); - CalendarView cView = new CalendarView(windowBeg, windowEnd) + + // Get list of events in the calendar + var calendarView = await graphServiceClient.Users[outlook.Account].CalendarView.GetAsync(c => { - PropertySet = new PropertySet( - //BasePropertySet.FirstClassProperties, - AppointmentSchema.Subject, - AppointmentSchema.DateTimeCreated, - AppointmentSchema.Start, - AppointmentSchema.End, - AppointmentSchema.Duration, - AppointmentSchema.Sensitivity, - AppointmentSchema.LegacyFreeBusyStatus - ) - }; - - // events: get list - var appointments = await System.Threading.Tasks.Task.Run(() => calendar.FindAppointments(cView)); - data.events = appointments - //.FindAppointments(cView) - .Where(a => - (outlook.Privacy != Models.OutlookPrivacy.OutlookPrivacy_NoClassified || a.Sensitivity == Sensitivity.Normal) && - (outlook.IsShowAsAllowed(a.LegacyFreeBusyStatus)) - ) - .OrderBy(i => i.Start) - .ThenBy(i => i.DateTimeCreated) - .ThenBy(i => i.Subject) - //.Take(Math.Max(1, outlook.ShowEvents)) + c.Headers.Add("Prefer", "outlook.body-content-type=\"text\""); + c.QueryParameters.Select = new[] { "subject", "body", "start", "end", "bodyPreview", "createdDateTime", "sensitivity", "showAs"}; + c.QueryParameters.StartDateTime = windowBeg.ToString("O"); + c.QueryParameters.EndDateTime = windowEnd.ToString("O"); + }); + data.events = calendarView.Value + .Where(a => + (outlook.Privacy != Models.OutlookPrivacy.OutlookPrivacy_NoClassified || + a.Sensitivity == Sensitivity.Normal) && + outlook.IsShowAsAllowed(a.ShowAs ?? FreeBusyStatus.Busy) + ) .Select(a => new EventEntry { Subject = - outlook.Privacy == Models.OutlookPrivacy.OutlookPrivacy_All || a.Sensitivity == Sensitivity.Normal ? a.Subject : - DataAccess.StringResource(string.Format("EWS_Sensitivity_{0}", a.Sensitivity.ToString())), - CreatedOn = a.DateTimeCreated, - Starts = a.Start, - Ends = a.End, - Duration = a.Duration, - Sensitivity = a.Sensitivity, + outlook.Privacy == Models.OutlookPrivacy.OutlookPrivacy_All || + a.Sensitivity == Sensitivity.Normal + ? a.Subject + : DataAccess.StringResource($"EWS_Sensitivity_{a.Sensitivity.ToString()}"), + CreatedOn = a.CreatedDateTime?.DateTime ?? new DateTime(), + Starts = DateTime.Parse(a.Start.DateTime), + Ends = DateTime.Parse(a.End.DateTime), + Duration = DateTime.Parse(a.End.DateTime) - DateTime.Parse(a.Start.DateTime), + Sensitivity = a.Sensitivity ?? Sensitivity.Normal, Today = locationToday, - ShowAs = a.LegacyFreeBusyStatus, + ShowAs = a.ShowAs ?? FreeBusyStatus.Busy, }) - .ToList() - ; + .ToList(); return data; } #endregion - - #region -------- EWS Callbacks -------- - - private static bool RedirectionUrlValidationCallback(string redirectionUrl) - { - // The default for the validation callback is to reject the URL. - bool result = false; - - Uri redirectionUri = new Uri(redirectionUrl); - - // Validate the contents of the redirection URL. In this simple validation - // callback, the redirection URL is considered valid if it is using HTTPS - // to encrypt the authentication credentials. - if (redirectionUri.Scheme == "https") - { - result = true; - } - return result; - } - - private static bool CertificateValidationCallBack( - object sender, - System.Security.Cryptography.X509Certificates.X509Certificate certificate, - System.Security.Cryptography.X509Certificates.X509Chain chain, - System.Net.Security.SslPolicyErrors sslPolicyErrors - ) - { - //return true; - // If the certificate is a valid, signed certificate, return true. - if (sslPolicyErrors == System.Net.Security.SslPolicyErrors.None) - { - return true; - } - - // If there are errors in the certificate chain, look at each error to determine the cause. - if ((sslPolicyErrors & System.Net.Security.SslPolicyErrors.RemoteCertificateChainErrors) != 0) - { - if (chain != null && chain.ChainStatus != null) - { - foreach (System.Security.Cryptography.X509Certificates.X509ChainStatus status - in chain.ChainStatus) - { - if ((certificate.Subject == certificate.Issuer) && - (status.Status == - System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.UntrustedRoot)) - { - // Self-signed certificates with an untrusted root are valid. - continue; - } - else - { - if (status.Status != - System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.NoError) - { - // If there are any other errors in the certificate chain, the certificate is invalid, - // so the method returns false. - return false; - } - } - } - } - - // When processing reaches this line, the only errors in the certificate chain are - // untrusted root errors for self-signed certificates. These certificates are valid - // for default Exchange server installations, so return true. - return true; - } - - // In all other cases, return false. - return false; - } - - #endregion } #endregion @@ -499,7 +369,7 @@ private class EventEntry : IComparable public TimeSpan Duration { get; set; } public DateTime Today { get; set; } public Sensitivity Sensitivity { get; set; } - public LegacyFreeBusyStatus ShowAs { get; set; } + public FreeBusyStatus ShowAs { get; set; } public int CompareTo(EventEntry rhs) { @@ -510,7 +380,7 @@ public int CompareTo(EventEntry rhs) int createdCheck = this.CreatedOn.CompareTo(rhs.CreatedOn); if (createdCheck != 0) return createdCheck; - + return this.Subject.CompareTo(rhs.Subject); } } @@ -564,7 +434,7 @@ public override object Deserialize(IDictionary dictionary, Type #region Private members private static Dictionary _sens; - private static Dictionary _showAs; + private static Dictionary _showAs; private static IEnumerable _supportedTypes; private class EventEntryAttribute @@ -578,18 +448,28 @@ static EventEntryConverter() _supportedTypes = new[] { typeof(EventEntry) }; _sens = new Dictionary(4); - _sens.Add(Sensitivity.Normal, new EventEntryAttribute { Flag = "normal", Resource = "EWS_Sensitivity_Normal" }); // 0 - _sens.Add(Sensitivity.Personal, new EventEntryAttribute { Flag = "personal", Resource = "EWS_Sensitivity_Personal" }); // 1 - _sens.Add(Sensitivity.Private, new EventEntryAttribute { Flag = "private", Resource = "EWS_Sensitivity_Private" }); // 2 - _sens.Add(Sensitivity.Confidential, new EventEntryAttribute { Flag = "confidential", Resource = "EWS_Sensitivity_Confidential" }); // 3 - - _showAs = new Dictionary(6); - _showAs.Add(LegacyFreeBusyStatus.Free, new EventEntryAttribute { Flag = "free", Resource = "EWS_ShowAs_Free" }); // 0 - _showAs.Add(LegacyFreeBusyStatus.Tentative, new EventEntryAttribute { Flag = "tentative", Resource = "EWS_ShowAs_Tentative" }); // 1 - _showAs.Add(LegacyFreeBusyStatus.Busy, new EventEntryAttribute { Flag = "busy", Resource = "EWS_ShowAs_Busy" }); // 2 - _showAs.Add(LegacyFreeBusyStatus.OOF, new EventEntryAttribute { Flag = "oof", Resource = "EWS_ShowAs_Oof" }); // 3 - _showAs.Add(LegacyFreeBusyStatus.WorkingElsewhere, new EventEntryAttribute { Flag = "wew", Resource = "EWS_ShowAs_Wew" }); // 4 - _showAs.Add(LegacyFreeBusyStatus.NoData, new EventEntryAttribute { Flag = "noData", Resource = "EWS_ShowAs_NoData" }); // 5 + _sens.Add(Sensitivity.Normal, + new EventEntryAttribute { Flag = "normal", Resource = "EWS_Sensitivity_Normal" }); // 0 + _sens.Add(Sensitivity.Personal, + new EventEntryAttribute { Flag = "personal", Resource = "EWS_Sensitivity_Personal" }); // 1 + _sens.Add(Sensitivity.Private, + new EventEntryAttribute { Flag = "private", Resource = "EWS_Sensitivity_Private" }); // 2 + _sens.Add(Sensitivity.Confidential, + new EventEntryAttribute { Flag = "confidential", Resource = "EWS_Sensitivity_Confidential" }); // 3 + + _showAs = new Dictionary(6); + _showAs.Add(FreeBusyStatus.Free, + new EventEntryAttribute { Flag = "free", Resource = "EWS_ShowAs_Free" }); // 0 + _showAs.Add(FreeBusyStatus.Tentative, + new EventEntryAttribute { Flag = "tentative", Resource = "EWS_ShowAs_Tentative" }); // 1 + _showAs.Add(FreeBusyStatus.Busy, + new EventEntryAttribute { Flag = "busy", Resource = "EWS_ShowAs_Busy" }); // 2 + _showAs.Add(FreeBusyStatus.Oof, + new EventEntryAttribute { Flag = "oof", Resource = "EWS_ShowAs_Oof" }); // 3 + _showAs.Add(FreeBusyStatus.WorkingElsewhere, + new EventEntryAttribute { Flag = "wew", Resource = "EWS_ShowAs_Wew" }); // 4 + _showAs.Add(FreeBusyStatus.Unknown, + new EventEntryAttribute { Flag = "noData", Resource = "EWS_ShowAs_NoData" }); // 5 } #endregion diff --git a/Presentation/packages.config b/Presentation/packages.config index 12214891..80fe2892 100644 --- a/Presentation/packages.config +++ b/Presentation/packages.config @@ -1,7 +1,53 @@  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From a59dcda6aa64bf2a0c9306d8af36257c502dfd2a Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Fri, 16 Jun 2023 12:23:16 +0100 Subject: [PATCH 3/8] file cleanup --- Presentation/getOutlook.ashx.cs | 106 ++++++++++++++++++-------------- 1 file changed, 60 insertions(+), 46 deletions(-) diff --git a/Presentation/getOutlook.ashx.cs b/Presentation/getOutlook.ashx.cs index 8d85c13c..d0b80d33 100644 --- a/Presentation/getOutlook.ashx.cs +++ b/Presentation/getOutlook.ashx.cs @@ -24,9 +24,9 @@ namespace DisplayMonkey public partial class getOutlook : HttpTaskAsyncHandler { public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContext context) - { - HttpRequest request = context.Request; - HttpResponse response = context.Response; + { + HttpRequest request = context.Request; + HttpResponse response = context.Response; int frameId = request.IntOrZero("frame"); int panelId = request.IntOrZero("panel"); @@ -35,17 +35,17 @@ public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContex int reserveMinutes = request.IntOrZero("reserveMinutes"); int trace = request.IntOrZero("trace"); - string json = ""; - - try - { + string json = ""; + + try + { // set culture Outlook outlook = new Outlook(frameId); Location location = new Location(displayId); if (string.IsNullOrWhiteSpace(culture)) culture = location.Culture; - + if (!string.IsNullOrWhiteSpace(culture)) { System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo(culture); @@ -56,7 +56,7 @@ public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContex // EWS: get data OutlookData data = await HttpRuntime.Cache.GetOrAddAbsoluteAsync( string.Format("outlook_{0}_{1}_{2}", location.LocationId, outlook.FrameId, outlook.Version), - async (expire) => + async (expire) => { expire.When = DateTime.Now.AddMinutes(outlook.CacheInterval); return await OutlookData.FromFrameAsync(outlook, location, reserveMinutes); @@ -70,12 +70,12 @@ public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContex //int showEvents = outlook.ShowEvents; List currentList = data.events - .Where(e => e.Ends >= locationTime) - .Take(Math.Max(1, outlook.ShowEvents)) - .ToList() + .Where(e => e.Ends >= locationTime) + .Take(Math.Max(1, outlook.ShowEvents)) + .ToList() ; - - EventEntry + + EventEntry currentEvent = null, firstEvent = currentList.FirstOrDefault() ; @@ -86,26 +86,29 @@ public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContex } DateTime endTime = locationToday.Add(data.endTime); - string + string strCurrentEvent = "", strCurrentStatus = string.Format( Resources.Outlook_AvailableUntil, endTime.ToShortTimeString() - ) + ) ; TimeSpan availableTime = new TimeSpan(0); - + if (currentEvent != null) { DateTime tomorrow = locationToday.AddDays(1); - strCurrentEvent = string.Format("{0}, {1} - {2}", + strCurrentEvent = string.Format("{0}, {1} - {2}", currentEvent.Subject, - (currentEvent.Starts >= tomorrow ? currentEvent.Starts.ToShortDateString() + " " : "") + currentEvent.Starts.ToShortTimeString(), - (currentEvent.Ends >= tomorrow ? currentEvent.Ends.ToShortDateString() + " " : "") + currentEvent.Ends.ToShortTimeString() - ); + (currentEvent.Starts >= tomorrow ? currentEvent.Starts.ToShortDateString() + " " : "") + + currentEvent.Starts.ToShortTimeString(), + (currentEvent.Ends >= tomorrow ? currentEvent.Ends.ToShortDateString() + " " : "") + + currentEvent.Ends.ToShortTimeString() + ); TimeSpan gap = currentEvent.Ends.Subtract(locationTime); if (gap.Hours > 0) - strCurrentStatus = string.Format(Resources.Outlook_EndsInHrsMin, (int)gap.TotalHours, gap.Minutes); + strCurrentStatus = string.Format(Resources.Outlook_EndsInHrsMin, (int)gap.TotalHours, + gap.Minutes); else strCurrentStatus = string.Format(Resources.Outlook_EndsInMin, gap.Minutes); } @@ -113,7 +116,8 @@ public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContex { availableTime = firstEvent.Starts.Subtract(locationTime); if (availableTime.Hours > 0) - strCurrentStatus = string.Format(Resources.Outlook_AvailableForHrsMin, (int)availableTime.TotalHours, availableTime.Minutes); + strCurrentStatus = string.Format(Resources.Outlook_AvailableForHrsMin, + (int)availableTime.TotalHours, availableTime.Minutes); else strCurrentStatus = string.Format(Resources.Outlook_AvailableForMin, availableTime.Minutes); } @@ -165,23 +169,23 @@ public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContex { items = currentList, }, - labels = new[] + labels = new[] { - new {key = "subject", value = Resources.Outlook_Event}, - new {key = "starts", value = Resources.Outlook_Starts}, - new {key = "ends", value = Resources.Outlook_Ends}, - new {key = "duration", value = Resources.Outlook_Duration}, - new {key = "sensitivity", value = Resources.Outlook_Sensitivity}, - new {key = "showAs", value = Resources.OutlookShowAs}, - new {key = "noEvents", value = Resources.Outlook_NoEventsToday}, - new {key = "bookingImpossible", value = Resources.Outlook_BookingImpossible}, - new {key = "bookingSent", value = Resources.Outlook_BookingSent}, + new { key = "subject", value = Resources.Outlook_Event }, + new { key = "starts", value = Resources.Outlook_Starts }, + new { key = "ends", value = Resources.Outlook_Ends }, + new { key = "duration", value = Resources.Outlook_Duration }, + new { key = "sensitivity", value = Resources.Outlook_Sensitivity }, + new { key = "showAs", value = Resources.OutlookShowAs }, + new { key = "noEvents", value = Resources.Outlook_NoEventsToday }, + new { key = "bookingImpossible", value = Resources.Outlook_BookingImpossible }, + new { key = "bookingSent", value = Resources.Outlook_BookingSent }, }, }); - } + } - catch (Exception ex) - { + catch (Exception ex) + { JavaScriptSerializer s = new JavaScriptSerializer(); if (trace == 0) json = s.Serialize(new @@ -215,7 +219,7 @@ public override async System.Threading.Tasks.Task ProcessRequestAsync(HttpContex response.Cache.SetSlidingExpiration(true); response.Cache.SetNoStore(); response.ContentType = "application/json"; - response.Write(json); + response.Write(json); response.Flush(); } @@ -387,7 +391,10 @@ public int CompareTo(EventEntry rhs) private class EventEntryConverter : JavaScriptConverter { - public override IEnumerable SupportedTypes { get { return _supportedTypes; } } + public override IEnumerable SupportedTypes + { + get { return _supportedTypes; } + } public override IDictionary Serialize(object obj, JavaScriptSerializer serializer) { @@ -400,33 +407,40 @@ public override IDictionary Serialize(object obj, JavaScriptSeri serialized["showAs"] = ""; List flags = new List(); - foreach (var x in _sens.Where(e => e.Key == evt.Sensitivity)) // one and only + foreach (var x in _sens.Where(e => e.Key == evt.Sensitivity)) // one and only { flags.Add(x.Value.Flag); serialized["sensitivity"] = DataAccess.StringResource(x.Value.Resource); break; } - foreach (var x in _showAs.Where(e => e.Key == evt.ShowAs)) // one and only + + foreach (var x in _showAs.Where(e => e.Key == evt.ShowAs)) // one and only { flags.Add(x.Value.Flag); serialized["showAs"] = DataAccess.StringResource(x.Value.Resource); break; } + serialized["flags"] = flags.ToArray(); - + DateTime tomorrow = evt.Today.AddDays(1); - serialized["starts"] = (evt.Starts >= tomorrow ? evt.Starts.ToShortDateString() + " " : "") + evt.Starts.ToShortTimeString(); - serialized["ends"] = (evt.Ends >= tomorrow ? evt.Ends.ToShortDateString() + " " : "") + evt.Ends.ToShortTimeString(); - + serialized["starts"] = (evt.Starts >= tomorrow ? evt.Starts.ToShortDateString() + " " : "") + + evt.Starts.ToShortTimeString(); + serialized["ends"] = (evt.Ends >= tomorrow ? evt.Ends.ToShortDateString() + " " : "") + + evt.Ends.ToShortTimeString(); + if ((int)evt.Duration.TotalHours > 0) - serialized["duration"] = string.Format(Resources.Outlook_HrsMin, (int)evt.Duration.TotalHours, evt.Duration.Minutes); + serialized["duration"] = string.Format(Resources.Outlook_HrsMin, (int)evt.Duration.TotalHours, + evt.Duration.Minutes); else serialized["duration"] = string.Format(Resources.Outlook_Min, evt.Duration.Minutes); } + return serialized; } - public override object Deserialize(IDictionary dictionary, Type type, JavaScriptSerializer serializer) + public override object Deserialize(IDictionary dictionary, Type type, + JavaScriptSerializer serializer) { throw new NotImplementedException(); } From a9c6607b175c71cbe5c7ec2832ea725ad10312d5 Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Fri, 16 Jun 2023 12:26:13 +0100 Subject: [PATCH 4/8] Revert "Changes required to make this run on my system in 2023" This reverts commit fc725ab7b2ca13d5220ac748f15d370bf03d6fe9. --- Management/Management.csproj | 1 - Management/Models/AzureAccount.cs | 10 + Management/Models/AzureResources.cs | 10 + Management/Models/Canvas.cs | 10 + Management/Models/Clock.cs | 10 + Management/Models/ClockTypes.cs | 10 + Management/Models/Content.cs | 10 + Management/Models/ContentTypes.cs | 10 + Management/Models/DMModel.Context.cs | 12 +- Management/Models/DMModel.Designer.cs | 12 +- Management/Models/DMModel.cs | 12 +- Management/Models/DMModel.edmx | 2275 +++++++++++---------- Management/Models/Display.cs | 10 + Management/Models/DisplayAutoLoadModes.cs | 10 + Management/Models/EncryptionMethods.cs | 10 + Management/Models/ExchangeAccount.cs | 10 + Management/Models/Frame.cs | 10 + Management/Models/FullScreen.cs | 10 + Management/Models/Html.cs | 10 + Management/Models/Level.cs | 10 + Management/Models/Location.cs | 10 + Management/Models/Memo.cs | 10 + Management/Models/News.cs | 10 + Management/Models/OauthAccount.cs | 10 + Management/Models/OauthProviders.cs | 10 + Management/Models/Outlook.cs | 10 + Management/Models/OutlookEwsVersions.cs | 10 + Management/Models/OutlookModes.cs | 10 + Management/Models/OutlookPrivacy.cs | 10 + Management/Models/Panel.cs | 10 + Management/Models/Picture.cs | 10 + Management/Models/Powerbi.cs | 10 + Management/Models/PowerbiTypes.cs | 10 + Management/Models/RenderModes.cs | 10 + Management/Models/Report.cs | 10 + Management/Models/ReportServer.cs | 10 + Management/Models/Setting.cs | 10 + Management/Models/SettingTypes.cs | 10 + Management/Models/Template.cs | 10 + Management/Models/Video.cs | 10 + Management/Models/Weather.cs | 10 + Management/Models/WeatherProviders.cs | 10 + Management/Models/WeatherTypes.cs | 10 + Management/Models/YTAspect.cs | 10 + Management/Models/YTQuality.cs | 10 + Management/Models/YTRate.cs | 10 + Management/Models/Youtube.cs | 10 + Management/Web.config | 2 +- 48 files changed, 1597 insertions(+), 1137 deletions(-) diff --git a/Management/Management.csproj b/Management/Management.csproj index 5cfc4d20..0e9cbe7c 100644 --- a/Management/Management.csproj +++ b/Management/Management.csproj @@ -466,7 +466,6 @@ - SettingsSingleFileGenerator Settings.Designer.cs diff --git a/Management/Models/AzureAccount.cs b/Management/Models/AzureAccount.cs index a74a48b5..ab0b544b 100644 --- a/Management/Models/AzureAccount.cs +++ b/Management/Models/AzureAccount.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/AzureResources.cs b/Management/Models/AzureResources.cs index 646f3374..cf076e12 100644 --- a/Management/Models/AzureResources.cs +++ b/Management/Models/AzureResources.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Canvas.cs b/Management/Models/Canvas.cs index a2a9478a..4b8e4eeb 100644 --- a/Management/Models/Canvas.cs +++ b/Management/Models/Canvas.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Clock.cs b/Management/Models/Clock.cs index 00248668..cf088c1b 100644 --- a/Management/Models/Clock.cs +++ b/Management/Models/Clock.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/ClockTypes.cs b/Management/Models/ClockTypes.cs index 993a95e3..545ad69b 100644 --- a/Management/Models/ClockTypes.cs +++ b/Management/Models/ClockTypes.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Content.cs b/Management/Models/Content.cs index bf454c81..bf03dc01 100644 --- a/Management/Models/Content.cs +++ b/Management/Models/Content.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/ContentTypes.cs b/Management/Models/ContentTypes.cs index 1399dac9..8324f062 100644 --- a/Management/Models/ContentTypes.cs +++ b/Management/Models/ContentTypes.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/DMModel.Context.cs b/Management/Models/DMModel.Context.cs index 3169a888..55a35151 100644 --- a/Management/Models/DMModel.Context.cs +++ b/Management/Models/DMModel.Context.cs @@ -1,4 +1,14 @@ -//------------------------------------------------------------------------------ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + +//------------------------------------------------------------------------------ // // This code was generated from a template. // diff --git a/Management/Models/DMModel.Designer.cs b/Management/Models/DMModel.Designer.cs index 98667dab..03aaae4d 100644 --- a/Management/Models/DMModel.Designer.cs +++ b/Management/Models/DMModel.Designer.cs @@ -1,4 +1,14 @@ -// T4 code generation is enabled for model 'C:\Users\alexjones\RiderProjects\DisplayMonkey\Management\Models\DMModel.edmx'. +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + +// T4 code generation is enabled for model 'E:\project\DisplayMonkey\Management\Models\DMModel.edmx'. // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model // is open in the designer. diff --git a/Management/Models/DMModel.cs b/Management/Models/DMModel.cs index 0c4c97d7..206b5983 100644 --- a/Management/Models/DMModel.cs +++ b/Management/Models/DMModel.cs @@ -1,4 +1,14 @@ -//------------------------------------------------------------------------------ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + +//------------------------------------------------------------------------------ // // This code was generated from a template. // diff --git a/Management/Models/DMModel.edmx b/Management/Models/DMModel.edmx index 5586b0ce..3d6bf8c9 100644 --- a/Management/Models/DMModel.edmx +++ b/Management/Models/DMModel.edmx @@ -4,837 +4,847 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1444,307 +1454,308 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Management/Models/Display.cs b/Management/Models/Display.cs index d105f095..b69ebdb5 100644 --- a/Management/Models/Display.cs +++ b/Management/Models/Display.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/DisplayAutoLoadModes.cs b/Management/Models/DisplayAutoLoadModes.cs index 2e25ce23..abd11563 100644 --- a/Management/Models/DisplayAutoLoadModes.cs +++ b/Management/Models/DisplayAutoLoadModes.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/EncryptionMethods.cs b/Management/Models/EncryptionMethods.cs index cfaadbae..451d8764 100644 --- a/Management/Models/EncryptionMethods.cs +++ b/Management/Models/EncryptionMethods.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/ExchangeAccount.cs b/Management/Models/ExchangeAccount.cs index a6a77fb3..3fa77e6d 100644 --- a/Management/Models/ExchangeAccount.cs +++ b/Management/Models/ExchangeAccount.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Frame.cs b/Management/Models/Frame.cs index 69abada3..6268e18c 100644 --- a/Management/Models/Frame.cs +++ b/Management/Models/Frame.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/FullScreen.cs b/Management/Models/FullScreen.cs index d0389fc3..10989745 100644 --- a/Management/Models/FullScreen.cs +++ b/Management/Models/FullScreen.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Html.cs b/Management/Models/Html.cs index da33f2e4..bc3c96b9 100644 --- a/Management/Models/Html.cs +++ b/Management/Models/Html.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Level.cs b/Management/Models/Level.cs index d56cb682..7fe4340c 100644 --- a/Management/Models/Level.cs +++ b/Management/Models/Level.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Location.cs b/Management/Models/Location.cs index 1af7e0f6..fdee732d 100644 --- a/Management/Models/Location.cs +++ b/Management/Models/Location.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Memo.cs b/Management/Models/Memo.cs index 0cf61369..45b59bdc 100644 --- a/Management/Models/Memo.cs +++ b/Management/Models/Memo.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/News.cs b/Management/Models/News.cs index dc146ddb..5405033b 100644 --- a/Management/Models/News.cs +++ b/Management/Models/News.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OauthAccount.cs b/Management/Models/OauthAccount.cs index 30f680c4..6b7f6660 100644 --- a/Management/Models/OauthAccount.cs +++ b/Management/Models/OauthAccount.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OauthProviders.cs b/Management/Models/OauthProviders.cs index da06de8b..614591b2 100644 --- a/Management/Models/OauthProviders.cs +++ b/Management/Models/OauthProviders.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Outlook.cs b/Management/Models/Outlook.cs index e8f93090..ad23b3e0 100644 --- a/Management/Models/Outlook.cs +++ b/Management/Models/Outlook.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OutlookEwsVersions.cs b/Management/Models/OutlookEwsVersions.cs index 0008bd4b..c7ee3b4e 100644 --- a/Management/Models/OutlookEwsVersions.cs +++ b/Management/Models/OutlookEwsVersions.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OutlookModes.cs b/Management/Models/OutlookModes.cs index 36bb986e..466c3d43 100644 --- a/Management/Models/OutlookModes.cs +++ b/Management/Models/OutlookModes.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/OutlookPrivacy.cs b/Management/Models/OutlookPrivacy.cs index fe74c90c..b13bd9f2 100644 --- a/Management/Models/OutlookPrivacy.cs +++ b/Management/Models/OutlookPrivacy.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Panel.cs b/Management/Models/Panel.cs index 55975b4e..7e3c3987 100644 --- a/Management/Models/Panel.cs +++ b/Management/Models/Panel.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Picture.cs b/Management/Models/Picture.cs index 9361e06d..a055e217 100644 --- a/Management/Models/Picture.cs +++ b/Management/Models/Picture.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Powerbi.cs b/Management/Models/Powerbi.cs index 2cce0877..13664087 100644 --- a/Management/Models/Powerbi.cs +++ b/Management/Models/Powerbi.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/PowerbiTypes.cs b/Management/Models/PowerbiTypes.cs index f8cc527b..903dac04 100644 --- a/Management/Models/PowerbiTypes.cs +++ b/Management/Models/PowerbiTypes.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/RenderModes.cs b/Management/Models/RenderModes.cs index e2e09ce3..0cb16409 100644 --- a/Management/Models/RenderModes.cs +++ b/Management/Models/RenderModes.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Report.cs b/Management/Models/Report.cs index 4a7eb755..10f26aed 100644 --- a/Management/Models/Report.cs +++ b/Management/Models/Report.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/ReportServer.cs b/Management/Models/ReportServer.cs index 921ccb32..62d42c7b 100644 --- a/Management/Models/ReportServer.cs +++ b/Management/Models/ReportServer.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Setting.cs b/Management/Models/Setting.cs index fe3b1296..74b18f44 100644 --- a/Management/Models/Setting.cs +++ b/Management/Models/Setting.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/SettingTypes.cs b/Management/Models/SettingTypes.cs index 61da161b..6082e269 100644 --- a/Management/Models/SettingTypes.cs +++ b/Management/Models/SettingTypes.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Template.cs b/Management/Models/Template.cs index 434649c2..73223774 100644 --- a/Management/Models/Template.cs +++ b/Management/Models/Template.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Video.cs b/Management/Models/Video.cs index ed7f1a0e..38dcac47 100644 --- a/Management/Models/Video.cs +++ b/Management/Models/Video.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Weather.cs b/Management/Models/Weather.cs index bd578500..4a148713 100644 --- a/Management/Models/Weather.cs +++ b/Management/Models/Weather.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/WeatherProviders.cs b/Management/Models/WeatherProviders.cs index 17d11fcb..6a99d580 100644 --- a/Management/Models/WeatherProviders.cs +++ b/Management/Models/WeatherProviders.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/WeatherTypes.cs b/Management/Models/WeatherTypes.cs index 44499f0f..09b93bc2 100644 --- a/Management/Models/WeatherTypes.cs +++ b/Management/Models/WeatherTypes.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/YTAspect.cs b/Management/Models/YTAspect.cs index dfd77c33..dac514aa 100644 --- a/Management/Models/YTAspect.cs +++ b/Management/Models/YTAspect.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/YTQuality.cs b/Management/Models/YTQuality.cs index eca92b01..2c489de6 100644 --- a/Management/Models/YTQuality.cs +++ b/Management/Models/YTQuality.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/YTRate.cs b/Management/Models/YTRate.cs index a8a1fcb3..74e9164a 100644 --- a/Management/Models/YTRate.cs +++ b/Management/Models/YTRate.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Models/Youtube.cs b/Management/Models/Youtube.cs index 983abd3d..7bc84607 100644 --- a/Management/Models/Youtube.cs +++ b/Management/Models/Youtube.cs @@ -1,3 +1,13 @@ +/*! +* DisplayMonkey source file +* http://displaymonkey.org +* +* Copyright (c) 2019 Fuel9 LLC and contributors +* +* Released under the MIT license: +* http://opensource.org/licenses/MIT +*/ + //------------------------------------------------------------------------------ // // This code was generated from a template. diff --git a/Management/Web.config b/Management/Web.config index 0b259375..c3593ea4 100644 --- a/Management/Web.config +++ b/Management/Web.config @@ -9,7 +9,7 @@ - + From 274153c9a04e04ecc74e44bfb99be2a3849c2055 Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Mon, 14 Aug 2023 16:07:07 +0100 Subject: [PATCH 5/8] Hide EWS fields no longer used --- Management/Views/ExchangeAccount/_Edit.cshtml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Management/Views/ExchangeAccount/_Edit.cshtml b/Management/Views/ExchangeAccount/_Edit.cshtml index 8a2de09a..1087a5ef 100644 --- a/Management/Views/ExchangeAccount/_Edit.cshtml +++ b/Management/Views/ExchangeAccount/_Edit.cshtml @@ -28,18 +28,18 @@ @Html.ValidationMessageFor(model => model.PasswordUnmasked) -
- @Html.LabelFor(model => model.Url) -
-
- @Html.EditorFor(model => model.Url) - @Html.ValidationMessageFor(model => model.Url) -
- -
- @Html.LabelFor(model => model.EwsVersion) -
-
- @Html.DropDownListFor(model => model.EwsVersion, ewsVersions) - @Html.ValidationMessageFor(model => model.EwsVersion) -
+ @*
*@ + @* @Html.LabelFor(model => model.Url) *@ + @*
*@ + @*
*@ + @* @Html.EditorFor(model => model.Url) *@ + @* @Html.ValidationMessageFor(model => model.Url) *@ + @*
*@ + @* *@ + @*
*@ + @* @Html.LabelFor(model => model.EwsVersion) *@ + @*
*@ + @*
*@ + @* @Html.DropDownListFor(model => model.EwsVersion, ewsVersions) *@ + @* @Html.ValidationMessageFor(model => model.EwsVersion) *@ + @*
*@ From 2d316104b04f4850de503cf14b47469dfebf09da Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Mon, 14 Aug 2023 16:07:48 +0100 Subject: [PATCH 6/8] Remove checks of EWS, save password regardless of whether it works --- Management/Controllers/ExchangeAccountController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Management/Controllers/ExchangeAccountController.cs b/Management/Controllers/ExchangeAccountController.cs index 45e7c756..90d042a2 100644 --- a/Management/Controllers/ExchangeAccountController.cs +++ b/Management/Controllers/ExchangeAccountController.cs @@ -271,10 +271,11 @@ public ActionResult Edit([Bind(Include = "AccountId,Name,Account,PasswordUnmaske Match lnk = _emailRgx.Match(ews.Account); ews.Account = lnk.Success ? lnk.Value : ""; - resolveAccount(ews); + // resolveAccount(ews); // Not required since we use MS Graph - but some validation here would probably be sensible if (ModelState.IsValid) { + ews.UpdatePassword(db); db.Entry(ews).State = EntityState.Modified; db.Entry(ews).Property(l => l.Password).IsModified = ews.PasswordSet; //db.Entry(ews).Property(l => l.Url).IsModified = false; From 82c5767b0a1fb19e87f1b28dd84052a8c5fe86cc Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Mon, 14 Aug 2023 16:47:48 +0100 Subject: [PATCH 7/8] Fix missing timezones from created events --- Presentation/getOutlook.ashx.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Presentation/getOutlook.ashx.cs b/Presentation/getOutlook.ashx.cs index d0b80d33..3a5c8e67 100644 --- a/Presentation/getOutlook.ashx.cs +++ b/Presentation/getOutlook.ashx.cs @@ -18,6 +18,7 @@ using DisplayMonkey.Language; using Microsoft.Graph; using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; namespace DisplayMonkey { @@ -315,10 +316,12 @@ public static async System.Threading.Tasks.Task FromFrameAsync(Outl Start = new DateTimeTimeZone { DateTime = DateTime.Now.ToString("O") + DateTime = DateTime.Now.ToString("O"), }, End = new DateTimeTimeZone { DateTime = DateTime.Now.AddMinutes(reserveMinutes).ToString("O") + DateTime = DateTime.Now.AddMinutes(reserveMinutes).ToString("O"), } }); } From b73fcf031371e7f81d9f90d9f179fa4061679c91 Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Mon, 14 Aug 2023 16:52:17 +0100 Subject: [PATCH 8/8] Better exception handling when creating booking --- Presentation/getOutlook.ashx.cs | 41 +++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/Presentation/getOutlook.ashx.cs b/Presentation/getOutlook.ashx.cs index 3a5c8e67..1b26586e 100644 --- a/Presentation/getOutlook.ashx.cs +++ b/Presentation/getOutlook.ashx.cs @@ -306,26 +306,33 @@ public static async System.Threading.Tasks.Task FromFrameAsync(Outl // Do we need to create an event in the calendar? if (reserveMinutes > 0) { - _ = await graphServiceClient.Users[outlook.Account].Calendar.Events.PostAsync(new Event + try { - Subject = outlook.BookingSubject, - Body = new ItemBody + _ = await graphServiceClient.Users[outlook.Account].Calendar.Events.PostAsync(new Event { - Content = $"{Resources.Outlook_BookingOnDemand} | {Resources.DisplayMonkey}", - }, - Start = new DateTimeTimeZone - { - DateTime = DateTime.Now.ToString("O") - DateTime = DateTime.Now.ToString("O"), - }, - End = new DateTimeTimeZone - { - DateTime = DateTime.Now.AddMinutes(reserveMinutes).ToString("O") - DateTime = DateTime.Now.AddMinutes(reserveMinutes).ToString("O"), - } - }); + Subject = outlook.BookingSubject, + Body = new ItemBody + { + Content = $"{Resources.Outlook_BookingOnDemand} | {Resources.DisplayMonkey}", + }, + Start = new DateTimeTimeZone + { + DateTime = DateTime.Now.ToString("O"), + TimeZone = TimeZone.CurrentTimeZone.StandardName + }, + End = new DateTimeTimeZone + { + DateTime = DateTime.Now.AddMinutes(reserveMinutes).ToString("O"), + TimeZone = TimeZone.CurrentTimeZone.StandardName + } + }); + } + catch (ODataError e) + { + throw new Exception(e.Error.Message); + } } - + // Get list of events in the calendar var calendarView = await graphServiceClient.Users[outlook.Account].CalendarView.GetAsync(c => {