From 7d9be5620d59a968087edffe2bcfd2ca5951f3bb Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Thu, 28 Feb 2013 17:15:46 +1100 Subject: [PATCH] GIT: perform LF normalization --- .gitattributes | 22 + .nuget/NuGet.Config | 10 +- .nuget/NuGet.targets | 304 +- Disco.BI/BI/AttachmentBI/Utilities.cs | 192 +- Disco.BI/BI/DataStore.cs | 62 +- Disco.BI/BI/DeviceBI/BatchUtilities.cs | 42 +- Disco.BI/BI/DeviceBI/EnrolSafeException.cs | 28 +- Disco.BI/BI/DeviceBI/EnrolmentLog.cs | 964 +- Disco.BI/BI/DeviceBI/Searching.cs | 112 +- Disco.BI/BI/DisposableImageCollection.cs | 42 +- .../DocumentTemplateQRCodeLocationCache.cs | 144 +- .../DocumentUniqueIdentifier.cs | 406 +- .../Importer/DocumentDropBoxMonitor.cs | 170 +- .../Importer/DocumentImporterCleanCacheJob.cs | 126 +- .../Importer/DocumentImporterJob.cs | 240 +- .../Importer/DocumentImporterLog.cs | 608 +- Disco.BI/BI/DocumentTemplateBI/Utilities.cs | 98 +- .../EvaluateExpressionParseException.cs | 54 +- .../BI/Expressions/EvaluateExpressionPart.cs | 168 +- Disco.BI/BI/Expressions/Expression.cs | 518 +- Disco.BI/BI/Expressions/ExpressionCache.cs | 206 +- .../Expressions/ExpressionCachePreloadTask.cs | 86 +- .../Expressions/ExpressionTypeDescriptor.cs | 116 +- .../ExpressionTypeMemberDescriptor.cs | 122 +- Disco.BI/BI/Expressions/Extensions/DataExt.cs | 352 +- .../BI/Expressions/Extensions/DeviceExt.cs | 102 +- .../BI/Expressions/Extensions/ImageExt.cs | 280 +- .../BaseImageExpressionResult.cs | 140 +- .../BitmapImageExpressionResult.cs | 54 +- .../FileImageExpressionResult.cs | 64 +- .../FileMontageImageExpressionResult.cs | 362 +- Disco.BI/BI/Expressions/Extensions/UserExt.cs | 102 +- Disco.BI/BI/Expressions/IExpressionPart.cs | 32 +- Disco.BI/BI/Expressions/TextExpressionPart.cs | 148 +- .../Extensions/AttachmentActionExtensions.cs | 106 +- .../BI/Extensions/AttachmentExtensions.cs | 392 +- .../BI/Extensions/ClientServicesExtensions.cs | 140 +- .../BI/Extensions/DeviceActionExtensions.cs | 266 +- .../BI/Extensions/DeviceBatchExtensions.cs | 62 +- .../Extensions/DeviceCertificateExtensions.cs | 88 +- .../BI/Extensions/DeviceProfileExtensions.cs | 108 +- .../Extensions/DocumentTemplateExtensions.cs | 440 +- Disco.BI/BI/Extensions/JobActionExtensions.cs | 830 +- Disco.BI/BI/Extensions/JobFlagExtensions.cs | 160 +- Disco.BI/BI/Extensions/JobTableExtensions.cs | 188 +- Disco.BI/BI/Extensions/UserExtensions.cs | 130 +- Disco.BI/BI/Extensions/UtilityExtensions.cs | 626 +- .../WirelessCertificateExtensions.cs | 36 +- .../ActiveDirectory/ActiveDirectory.cs | 794 +- .../ActiveDirectoryCachedGroups.cs | 372 +- .../ActiveDirectory/ActiveDirectoryHelpers.cs | 338 +- ...ActiveDirectoryMachineAccountExtensions.cs | 592 +- .../ActiveDirectoryOrganisationalUnit.cs | 28 +- .../ActiveDirectoryUserAccountExtensions.cs | 84 +- Disco.BI/BI/Interop/MimeTypes.cs | 170 +- Disco.BI/BI/Interop/Pdf/PdfGenerator.cs | 502 +- Disco.BI/BI/Interop/Pdf/PdfImporter.cs | 942 +- .../PluginServices/IDiscoScheduledTask.cs | 28 +- .../BI/Interop/PluginServices/Utilities.cs | 90 +- .../SignalRHandlers/UserHeldDevices.cs | 46 +- Disco.BI/BI/JobBI/Searching.cs | 186 +- .../BI/JobBI/Statistics/DailyOpenedClosed.cs | 284 +- Disco.BI/BI/JobBI/Utilities.cs | 342 +- Disco.BI/BI/UserBI/Searching.cs | 122 +- Disco.BI/BI/UserBI/UserCache.cs | 386 +- Disco.BI/BI/UserBI/Utilities.cs | 152 +- Disco.BI/BI/Wireless/BaseWirelessProvider.cs | 166 +- .../BI/Wireless/WirelessCertificatesLog.cs | 608 +- .../eduSTAR/eduSTARWirelessProvider.cs | 566 +- Disco.BI/Properties/Resources.Designer.cs | 226 +- Disco.BI/Properties/Resources.resx | 270 +- Disco.BI/app.config | 40 +- Disco.BI/packages.config | 16 +- Disco.Client/App.config | 12 +- Disco.Client/Disco.Client.csproj | 280 +- Disco.Client/ErrorReporting.cs | 384 +- .../Extensions/ClientServiceException.cs | 36 +- .../Extensions/ClientServicesExtensions.cs | 112 +- Disco.Client/Extensions/EnrolExtensions.cs | 376 +- Disco.Client/Extensions/WhoAmIExtensions.cs | 72 +- Disco.Client/Interop/Certificates.cs | 206 +- Disco.Client/Interop/LocalAuthentication.cs | 118 +- Disco.Client/Interop/Network.cs | 654 +- Disco.Client/Presentation.cs | 208 +- Disco.Client/Program.cs | 274 +- Disco.Client/Properties/app.manifest | 96 +- Disco.Client/Start.bat | 16 +- Disco.Client/packages.config | 6 +- Disco.ClientBootstrapper/BootstrapperLoop.cs | 504 +- .../BootstrapperWorkstationInstall.vbs | 20 +- .../Disco.ClientBootstrapper.csproj | 668 +- .../FormStatus.Designer.cs | 250 +- Disco.ClientBootstrapper/FormStatus.cs | 164 +- Disco.ClientBootstrapper/FormStatus.resx | 238 +- Disco.ClientBootstrapper/IStatus.cs | 24 +- .../InstallBootstrapper.vbs | 122 +- Disco.ClientBootstrapper/InstallLoop.cs | 110 +- .../Interop/CertificateInterop.cs | 360 +- .../Interop/InstallInterop.cs | 1050 +- .../Interop/NetworkAdapter.cs | 328 +- .../Interop/NetworkInterop.cs | 578 +- .../Interop/RegistryInterop.cs | 216 +- .../Interop/ShutdownInterop.cs | 206 +- .../Interop/WIMInterop.cs | 3170 +- Disco.ClientBootstrapper/NullStatus.cs | 30 +- Disco.ClientBootstrapper/Program.cs | 382 +- .../Properties/Resources.Designer.cs | 146 +- .../Properties/Resources.resx | 246 +- .../Properties/Settings.Designer.cs | 60 +- .../Properties/Settings.settings | 14 +- .../Properties/app.manifest | 96 +- .../UninstallBootstrapper.vbs | 106 +- .../Disco.Configuration.vbproj | 230 +- .../My Project/Application.Designer.vb | 26 +- .../My Project/Application.myapp | 20 +- .../My Project/AssemblyInfo.vb | 70 +- .../My Project/Resources.Designer.vb | 124 +- Disco.Configuration/My Project/Resources.resx | 232 +- .../My Project/Settings.Designer.vb | 146 +- .../My Project/Settings.settings | 14 +- Disco.Data/App.config | 38 +- Disco.Data/Configuration/ConfigurationBase.cs | 72 +- .../Modules/BootstrapperConfiguration.cs | 82 +- .../Modules/DeviceProfileConfiguration.cs | 172 +- .../Modules/DeviceProfilesConfiguration.cs | 140 +- .../OrganisationAddressesConfiguration.cs | 178 +- .../Modules/WirelessConfiguration.cs | 218 +- Disco.Data/Disco.Data.sln | 40 +- .../201204250418485_DBv0.Designer.cs | 48 +- Disco.Data/Migrations/201204250418485_DBv0.cs | 1208 +- .../201205100307196_DBv1.Designer.cs | 48 +- Disco.Data/Migrations/201205100307196_DBv1.cs | 50 +- .../201205290205162_DBv2.Designer.cs | 48 +- Disco.Data/Migrations/201205290205162_DBv2.cs | 34 +- .../201206140712161_DBv3.Designer.cs | 48 +- Disco.Data/Migrations/201206140712161_DBv3.cs | 60 +- .../201206280337277_DBv4.Designer.cs | 48 +- Disco.Data/Migrations/201206280337277_DBv4.cs | 104 +- .../201211090325116_DBv5.Designer.cs | 54 +- Disco.Data/Migrations/201211090325116_DBv5.cs | 192 +- .../Migrations/201211090325116_DBv5.resx | 244 +- .../201301150107063_DBv6.Designer.cs | 54 +- Disco.Data/Migrations/201301150107063_DBv6.cs | 36 +- .../Migrations/201301150107063_DBv6.resx | 244 +- Disco.Data/Migrations/Configuration.cs | 42 +- Disco.Data/Migrations/DiscoDataMigrator.cs | 194 +- Disco.Data/Properties/Resources.Designer.cs | 146 +- Disco.Data/Properties/Resources.resx | 246 +- Disco.Data/Repository/DiscoDataContext.cs | 144 +- .../Repository/DiscoDataContextInitializer.cs | 38 +- .../DiscoDatabaseConnectionFactory.cs | 176 +- Disco.Data/packages.config | 8 +- Disco.Logging/App.config | 26 +- Disco.Logging/Disco.Logging.csproj | 248 +- Disco.Logging/LogBase.cs | 86 +- Disco.Logging/LogContext.cs | 622 +- Disco.Logging/LogReInitalizeJob.cs | 40 +- Disco.Logging/Models/LogEvent.cs | 44 +- Disco.Logging/Models/LogEventType.cs | 132 +- Disco.Logging/Models/LogLiveEvent.cs | 114 +- Disco.Logging/Models/LogModule.cs | 42 +- Disco.Logging/Properties/AssemblyInfo.cs | 72 +- Disco.Logging/ReadLogContext.cs | 358 +- Disco.Logging/SystemLog.cs | 252 +- Disco.Logging/Targets/LogLiveContext.cs | 110 +- Disco.Logging/Targets/LogPersistContext.cs | 46 +- Disco.Logging/Utilities.cs | 526 +- Disco.Logging/packages.config | 16 +- Disco.Models/App.config | 32 +- Disco.Models/BI/Config/OrganisationAddress.cs | 148 +- .../BI/DocumentTemplate/DocumentState.cs | 118 +- .../BI/Expressions/IImageExpressionResult.cs | 36 +- .../BI/Interop/Community/UpdateRequestBase.cs | 32 +- .../BI/Interop/Community/UpdateResponse.cs | 48 +- Disco.Models/BI/Job/JobTableModel.cs | 148 +- .../Job/Statistics/DailyOpenedClosedItem.cs | 30 +- .../BI/Search/DeviceSearchResultItem.cs | 68 +- .../BI/Search/UserSearchResultItem.cs | 34 +- Disco.Models/ClientServices/Enrol.cs | 62 +- Disco.Models/ClientServices/EnrolResponse.cs | 62 +- Disco.Models/ClientServices/MacEnrol.cs | 56 +- .../ClientServices/MacEnrolResponse.cs | 38 +- .../ClientServices/MacSecureEnrolResponse.cs | 64 +- Disco.Models/ClientServices/ServiceBase.cs | 32 +- Disco.Models/ClientServices/WhoAmI.cs | 32 +- Disco.Models/ClientServices/WhoAmIResponse.cs | 38 +- .../ActiveDirectoryMachineAccount.cs | 90 +- .../ActiveDirectoryUserAccount.cs | 82 +- Disco.Models/Repository/ConfigurationItem.cs | 38 +- .../Repository/Device/DeviceAttachment.cs | 74 +- Disco.Models/Repository/Device/DeviceBatch.cs | 122 +- .../Repository/Device/DeviceCertificate.cs | 70 +- .../Repository/Device/DeviceComponent.cs | 48 +- .../Repository/Device/DeviceDetail.cs | 52 +- Disco.Models/Repository/Device/DeviceModel.cs | 98 +- .../Repository/Device/DeviceProfile.cs | 166 +- .../Repository/Device/DeviceUserAssignment.cs | 52 +- .../DocumentTemplate/DocumentTemplate.cs | 88 +- Disco.Models/Repository/Job/Job.cs | 264 +- Disco.Models/Repository/Job/JobAssignment.cs | 60 +- Disco.Models/Repository/Job/JobAttachment.cs | 74 +- Disco.Models/Repository/Job/JobComponent.cs | 56 +- Disco.Models/Repository/Job/JobLog.cs | 56 +- .../Job/JobMeta/JobMetaInsurance.cs | 136 +- .../Job/JobMeta/JobMetaNonWarranty.cs | 134 +- .../Repository/Job/JobMeta/JobMetaWarranty.cs | 54 +- Disco.Models/Repository/Job/JobSubType.cs | 74 +- Disco.Models/Repository/Job/JobType.cs | 68 +- Disco.Models/Repository/User/User.cs | 158 +- .../Repository/User/UserAttachment.cs | 72 +- Disco.Models/Repository/User/UserDetail.cs | 52 +- Disco.Services/App.config | 32 +- Disco.Services/Logging/LogBase.cs | 86 +- Disco.Services/Logging/LogContext.cs | 628 +- Disco.Services/Logging/LogReInitalizeJob.cs | 40 +- Disco.Services/Logging/Models/LogEvent.cs | 46 +- Disco.Services/Logging/Models/LogEventType.cs | 134 +- Disco.Services/Logging/Models/LogLiveEvent.cs | 118 +- Disco.Services/Logging/Models/LogModule.cs | 44 +- Disco.Services/Logging/ReadLogContext.cs | 358 +- Disco.Services/Logging/SystemLog.cs | 280 +- .../Logging/Targets/LogLiveContext.cs | 112 +- .../Logging/Targets/LogPersistContext.cs | 46 +- Disco.Services/Logging/Utilities.cs | 532 +- .../CertificateProviderFeature.cs | 36 +- .../CertificateProviderLog.cs | 608 +- .../InteroperabilityProviderFeature.cs | 26 +- .../Plugins/Features/Other/OtherFeature.cs | 26 +- .../WarrantyProviderFeature.cs | 98 +- .../WarrantyProviderSubmitJobException.cs | 24 +- .../InvalidFeatureCategoryTypeException.cs | 100 +- .../Plugins/PluginConfigurationHandler.cs | 94 +- .../Plugins/PluginFeatureAttribute.cs | 30 +- .../Plugins/PluginFeatureCategoryAttribute.cs | 28 +- Disco.Services/Plugins/PluginWebHandler.cs | 458 +- .../Plugins/PluginWebHandlerController.cs | 242 +- .../Plugins/UnknownPluginException.cs | 74 +- Disco.Services/Tasks/ScheduledTaskStatus.cs | 702 +- .../Tasks/ScheduledTaskStatusLive.cs | 112 +- .../Tasks/ScheduledTasksLiveStatusService.cs | 112 +- Disco.Services/Tasks/ScheduledTasksLog.cs | 392 +- Disco.Silverlight.AttachmentUpload/App.xaml | 26 +- .../App.xaml.vb | 74 +- .../Assets/Styles.xaml | 698 +- .../Disco.Silverlight.AttachmentUpload.vbproj | 390 +- .../FileUploader.vb | 154 +- .../JavascriptNavigator.vb | 48 +- .../MainPage.xaml | 72 +- .../MainPage.xaml.vb | 118 +- .../My Project/AppManifest.xml | 14 +- .../My Project/AssemblyInfo.vb | 68 +- .../Views/ErrorWindow.xaml | 66 +- .../Views/ErrorWindow.xaml.vb | 54 +- .../Views/File.xaml | 48 +- .../Views/File.xaml.vb | 124 +- .../Views/FileWindow.xaml | 98 +- .../Views/FileWindow.xaml.vb | 110 +- .../Views/Hidden.xaml | 28 +- .../Views/Hidden.xaml.vb | 26 +- .../Views/WebCam.xaml | 72 +- .../Views/WebCam.xaml.vb | 286 +- .../WriteableBitmapExtensions.vb | 80 +- Disco.Utilities/Disco.Utilities.vbproj | 348 +- Disco.Utilities/ModuleMain.vb | 262 +- .../My Project/Application.Designer.vb | 26 +- Disco.Utilities/My Project/Application.myapp | 20 +- Disco.Utilities/My Project/AssemblyInfo.vb | 70 +- .../My Project/Resources.Designer.vb | 126 +- Disco.Utilities/My Project/Resources.resx | 232 +- .../My Project/Settings.Designer.vb | 146 +- Disco.Utilities/My Project/Settings.settings | 14 +- Disco.Utilities/My Project/app.manifest | 96 +- Disco.Utilities/app.config | 62 +- Disco.Utilities/packages.config | 6 +- Disco.Web.Extensions/App.config | 32 +- .../OrganisationAddressExtensions.cs | 72 +- .../BIModelExtensions/UtilityExtensions.cs | 58 +- .../DeviceBatchExtensions.cs | 64 +- .../DeviceModelExtensions.cs | 64 +- .../DeviceProfileExtensions.cs | 62 +- .../DocumentTemplateExtensions.cs | 40 +- .../JobSubTypeExtensions.cs | 60 +- .../DataModelExtension/JobTypeExtensions.cs | 96 +- .../MvcExtensions/Bundles/BundleTable.cs | 140 +- .../MvcExtensions/Bundles/BundleUnordered.cs | 34 +- .../MvcExtensions/Bundles/JsJoin.cs | 126 +- .../MvcExtensions/Bundles/LessCompile.cs | 280 +- .../MvcExtensions/JsonNet/JsonNetResult.cs | 116 +- .../PartialCompiledHtmlExtensions.cs | 102 +- .../MvcExtensions/XmlResult.cs | 140 +- .../MvcExtensions/dbAdminController.cs | 24 +- .../MvcExtensions/dbController.cs | 66 +- Disco.Web/App_Code/AjaxHelpers.cshtml | 62 +- Disco.Web/App_Code/AjaxHelpers.generated.cs | 422 +- Disco.Web/App_Code/CommonHelpers.cshtml | 262 +- Disco.Web/App_Code/CommonHelpers.generated.cs | 1968 +- Disco.Web/App_Start/BundleConfig.cs | 102 +- Disco.Web/App_Start/FilterConfig.cs | 24 +- Disco.Web/App_Start/WebApiConfig.cs | 44 +- Disco.Web/Areas/API/APIAreaRegistration.cs | 76 +- .../API/Controllers/BootstrapperController.cs | 110 +- .../API/Controllers/DeviceBatchController.cs | 938 +- .../Areas/API/Controllers/DeviceController.cs | 936 +- .../API/Controllers/DeviceModelController.cs | 676 +- .../Controllers/DeviceProfileController.cs | 786 +- .../Controllers/DocumentTemplateController.cs | 938 +- .../API/Controllers/ExpressionsController.cs | 34 +- .../Areas/API/Controllers/JobController.cs | 3900 +- .../API/Controllers/LoggingController.cs | 124 +- .../Areas/API/Controllers/UserController.cs | 360 +- .../API/Models/Attachment/AttachmentModel.cs | 24 +- .../API/Models/Attachment/AttachmentsModel.cs | 24 +- .../API/Models/Attachment/_AttachmentModel.cs | 156 +- .../DeviceBatch/DeviceBatchTimelineEvent.cs | 60 +- .../DeviceBatchTimelineEventSource.cs | 28 +- .../API/Models/DeviceModel/ComponentModel.cs | 24 +- .../API/Models/DeviceModel/_ComponentModel.cs | 52 +- .../API/Models/DeviceModel/_DeviceModel.cs | 54 +- .../ImporterUndetectedDataIdLookupModel.cs | 76 +- .../ImporterUndetectedFilesModel.cs | 26 +- .../Expressions/ValidateExpressionModel.cs | 72 +- .../Areas/API/Models/Job/CommentPostModel.cs | 24 +- .../Areas/API/Models/Job/CommentsModel.cs | 24 +- .../Areas/API/Models/Job/ComponentModel.cs | 24 +- .../Areas/API/Models/Job/_CommentModel.cs | 100 +- .../Areas/API/Models/Job/_ComponentModel.cs | 46 +- .../Areas/API/Models/Job/_DateChangeModel.cs | 26 +- .../API/Models/Logs/LogEventTypeModel.cs | 48 +- .../Areas/API/Models/Logs/LogModuleModel.cs | 56 +- .../UpdateLastNetworkLogonDatesModel.cs | 24 +- .../Config/Controllers/ConfigController.cs | 52 +- .../Controllers/DeviceBatchController.cs | 158 +- .../Controllers/DeviceModelController.cs | 114 +- .../Controllers/DeviceProfileController.cs | 200 +- .../Controllers/DocumentTemplateController.cs | 246 +- .../Config/Controllers/EnrolmentController.cs | 58 +- .../Controllers/ExpressionsController.cs | 46 +- .../Controllers/OrganisationController.cs | 52 +- .../Controllers/SystemConfigController.cs | 64 +- .../Areas/Config/Models/Config/IndexModel.cs | 50 +- .../Config/Models/DeviceBatch/IndexModel.cs | 66 +- .../Config/Models/DeviceBatch/ShowModel.cs | 32 +- .../DeviceBatch/_IndexModelDeviceBatch.cs | 44 +- .../DeviceModel/DeviceComponentsModel.cs | 28 +- .../Config/Models/DeviceModel/IndexModel.cs | 58 +- .../Config/Models/DeviceModel/ShowModel.cs | 36 +- .../DeviceModel/_IndexModelDeviceModel.cs | 50 +- .../Models/DeviceProfile/DefaultsModel.cs | 28 +- .../Config/Models/DeviceProfile/IndexModel.cs | 78 +- .../Config/Models/DeviceProfile/ShowModel.cs | 38 +- .../DeviceProfile/_IndexModelDeviceProfile.cs | 62 +- .../Models/DocumentTemplate/CreateModel.cs | 172 +- .../ExpressionBrowserModel.cs | 40 +- .../Models/DocumentTemplate/IndexModel.cs | 22 +- .../Models/DocumentTemplate/ShowModel.cs | 146 +- .../DocumentTemplate/UndetectedPagesModel.cs | 58 +- .../Config/Models/Enrolment/IndexModel.cs | 22 +- .../Config/Models/Expressions/EditorModel.cs | 30 +- .../Areas/Config/Models/Logging/IndexModel.cs | 26 +- .../Config/Models/Logging/TaskStatusModel.cs | 22 +- .../Config/Models/Organisation/IndexModel.cs | 32 +- .../Config/Models/Shared/LogEventsModel.cs | 38 +- .../Config/Models/SystemConfig/IndexModel.cs | 250 +- .../Models/WirelessCertificate/IndexModel.cs | 40 +- .../Areas/Config/Views/Config/Index.cshtml | 172 +- .../Config/Views/Config/Index.generated.cs | 608 +- .../Config/Views/DeviceBatch/Create.cshtml | 78 +- .../Views/DeviceBatch/Create.generated.cs | 296 +- .../Config/Views/DeviceBatch/Index.cshtml | 138 +- .../Views/DeviceBatch/Index.generated.cs | 638 +- .../Config/Views/DeviceBatch/Show.cshtml | 1008 +- .../Views/DeviceBatch/Show.generated.cs | 2308 +- .../Config/Views/DeviceBatch/Timeline.cshtml | 244 +- .../Views/DeviceBatch/Timeline.generated.cs | 262 +- .../DeviceModel/GenericComponents.cshtml | 8 +- .../GenericComponents.generated.cs | 126 +- .../Config/Views/DeviceModel/Index.cshtml | 90 +- .../Views/DeviceModel/Index.generated.cs | 346 +- .../Config/Views/DeviceModel/Show.cshtml | 410 +- .../Views/DeviceModel/Show.generated.cs | 916 +- .../Config/Views/DeviceProfile/Create.cshtml | 86 +- .../Views/DeviceProfile/Create.generated.cs | 348 +- .../Views/DeviceProfile/Defaults.cshtml | 120 +- .../Views/DeviceProfile/Defaults.generated.cs | 384 +- .../Config/Views/DeviceProfile/Index.cshtml | 18 +- .../Views/DeviceProfile/Index.generated.cs | 182 +- .../Config/Views/DeviceProfile/Show.cshtml | 1072 +- .../Views/DeviceProfile/Show.generated.cs | 2138 +- .../Config/Views/DeviceProfile/_Table.cshtml | 30 +- .../Views/DeviceProfile/_Table.generated.cs | 218 +- .../Views/DeviceProfile/_TableRender.cshtml | 78 +- .../DeviceProfile/_TableRender.generated.cs | 372 +- .../Views/DocumentTemplate/Create.cshtml | 190 +- .../DocumentTemplate/Create.generated.cs | 598 +- .../DocumentTemplate/ExpressionBrowser.cshtml | 262 +- .../ExpressionBrowser2.generated.cs | 564 +- .../Views/DocumentTemplate/Index.cshtml | 72 +- .../Views/DocumentTemplate/Index.generated.cs | 336 +- .../DocumentTemplate/UndetectedPages.cshtml | 478 +- .../UndetectedPages.generated.cs | 740 +- .../DocumentTemplate/_ExpressionsTable.cshtml | 150 +- .../_ExpressionsTable.generated.cs | 692 +- .../Areas/Config/Views/Enrolment/Index.cshtml | 260 +- .../Config/Views/Enrolment/Index.generated.cs | 670 +- .../Config/Views/Organisation/Index.cshtml | 740 +- .../Views/Organisation/Index.generated.cs | 1564 +- .../Config/Views/Plugins/Configure.cshtml | 26 +- .../ProviderConfiguration.generated.cs | 230 +- Disco.Web/Areas/Config/Views/Web.config | 124 +- .../Areas/Config/Views/_ViewStart.cshtml | 6 +- .../Config/Views/_ViewStart.generated.cs | 110 +- .../Public/Controllers/PublicController.cs | 58 +- .../Controllers/UserHeldDevicesController.cs | 264 +- .../UserHeldDevices/HeldJobDeviceModel.cs | 134 +- .../UserHeldDevices/UserHeldDeviceModel.cs | 42 +- .../Areas/Public/PublicAreaRegistration.cs | 86 +- .../Areas/Public/Views/Public/Credits.cshtml | 678 +- .../Public/Views/Public/Credits.generated.cs | 1890 +- .../Areas/Public/Views/Public/Index.cshtml | 58 +- .../Public/Views/Public/Index.generated.cs | 230 +- .../Areas/Public/Views/Public/Licence.cshtml | 1082 +- .../Public/Views/Public/Licence.generated.cs | 1244 +- .../Areas/Public/Views/Shared/_Layout.cshtml | 84 +- .../Public/Views/Shared/_Layout.generated.cs | 484 +- .../Public/Views/UserHeldDevices/Index.cshtml | 154 +- .../Views/UserHeldDevices/Index.generated.cs | 792 +- .../Views/UserHeldDevices/Noticeboard.cshtml | 988 +- .../UserHeldDevices/Noticeboard.generated.cs | 1004 +- Disco.Web/Areas/Public/Views/Web.config | 124 +- .../Areas/Public/Views/_ViewStart.cshtml | 4 +- .../Public/Views/_ViewStart.generated.cs | 108 +- .../Services/Controllers/ClientController.cs | 262 +- .../Services/ServicesAreaRegistration.cs | 48 +- .../Core/disco.dataTables.extensions.js | 78 +- .../disco.unobtrusiveValidation.extensions.js | 68 +- .../Scripts/Core/jquery.watermark.js | 1196 +- .../Scripts/Modules/Disco-AjaxHelperIcons.js | 8 +- .../Modules/Disco-AjaxHelperIcons.js.bundle | 6 +- .../Modules/Disco-AjaxHelperIcons.min.js | 2 +- .../Modules/Disco-AjaxHelperIcons.min.js.map | 16 +- .../disco.ajaxhelpericons.js | 4 +- .../Scripts/Modules/Disco-CreateJob.js.bundle | 6 +- .../Scripts/Modules/Disco-DataTableHelpers.js | 288 +- .../Modules/Disco-DataTableHelpers.js.bundle | 6 +- .../Modules/Disco-DataTableHelpers.min.js | 2 +- .../Modules/Disco-DataTableHelpers.min.js.map | 16 +- .../disco.datatablehelpers.js | 284 +- .../Scripts/Modules/Disco-ExpressionEditor.js | 226 +- .../Modules/Disco-ExpressionEditor.js.bundle | 6 +- .../Modules/Disco-ExpressionEditor.min.js | 2 +- .../Modules/Disco-ExpressionEditor.min.js.map | 16 +- .../disco.expressioneditor.js | 222 +- .../Modules/Disco-PropertyChangeHelpers.js | 396 +- .../Disco-PropertyChangeHelpers.js.bundle | 6 +- .../Disco-PropertyChangeHelpers.min.js | 2 +- .../Disco-PropertyChangeHelpers.min.js.map | 16 +- .../disco.propertychangehelpers.js | 392 +- .../Scripts/Modules/Disco-jQueryExtensions.js | 166 +- .../Modules/Disco-jQueryExtensions.js.bundle | 6 +- .../Modules/Disco-jQueryExtensions.min.js | 2 +- .../Modules/Disco-jQueryExtensions.min.js.map | 16 +- .../disco.jQueryExtensions.js | 162 +- .../Scripts/Modules/Highcharts.js.bundle | 6 +- .../ClientSource/Scripts/Modules/Shadowbox.js | 4 +- .../Scripts/Modules/Shadowbox.js.bundle | 6 +- .../Scripts/Modules/Shadowbox.min.js | 2 +- .../Scripts/Modules/Shadowbox.min.js.map | 16 +- .../Scripts/Modules/Silverlight.js | 6 +- .../Scripts/Modules/Silverlight.js.bundle | 6 +- .../Scripts/Modules/Silverlight.min.js | 2 +- .../Scripts/Modules/Silverlight.min.js.map | 16 +- .../Modules/Silverlight/Silverlight.js | 2 +- .../Scripts/Modules/Timeline.js.bundle | 16 +- .../Scripts/Modules/Timeline.min.js | 2 +- .../Scripts/Modules/Timeline.min.js.map | 16 +- .../Timeline/disco.simileajaxextensions.js | 12 +- .../Timeline/disco.timelineextensions.js | 10 +- .../Timeline/simile-ajax-bundle-DiscoMod.js | 2 +- .../Scripts/Modules/jQuery-Isotope.js.bundle | 6 +- .../Scripts/Modules/jQuery-NumberFormatter.js | 1056 +- .../Modules/jQuery-NumberFormatter.js.bundle | 8 +- .../Modules/jQuery-NumberFormatter.min.js | 2 +- .../Modules/jQuery-NumberFormatter.min.js.map | 16 +- .../jquery.numberformatter.js | 1018 +- .../jQuery-NumberFormatter/jshashtable-2.1.js | 30 +- .../Scripts/Modules/jQuery-SignalR.js | 3048 +- .../Scripts/Modules/jQuery-SignalR.js.bundle | 6 +- .../Scripts/Modules/jQuery-SignalR.min.js | 2 +- .../Scripts/Modules/jQuery-SignalR.min.js.map | 16 +- .../jQuery-SignalR/jquery.signalR-0.5.3.js | 3044 +- .../Scripts/Modules/jQueryUI-DynaTree.js | 4 +- .../Modules/jQueryUI-DynaTree.js.bundle | 6 +- .../Scripts/Modules/jQueryUI-DynaTree.min.js | 2 +- .../Modules/jQueryUI-DynaTree.min.js.map | 16 +- .../Scripts/Modules/jQueryUI-TimePicker.js | 3356 +- .../Modules/jQueryUI-TimePicker.js.bundle | 6 +- .../Modules/jQueryUI-TimePicker.min.js | 2 +- .../Modules/jQueryUI-TimePicker.min.js.map | 16 +- .../jquery-ui-timepicker-addon.js | 3352 +- .../ClientSource/Scripts/Modules/timeline.js | 48 +- .../Scripts/Modules/tinymce.js.bundle | 10 +- .../tinymce/disco.tinymceextensions.js | 8 +- .../Scripts/Modules/tinymce/license.txt | 1008 +- .../Modules/tinymce/themes/advanced/about.htm | 104 +- .../tinymce/themes/advanced/anchor.htm | 52 +- .../tinymce/themes/advanced/charmap.htm | 110 +- .../tinymce/themes/advanced/color_picker.htm | 140 +- .../Modules/tinymce/themes/advanced/image.htm | 160 +- .../tinymce/themes/advanced/js/about.js | 146 +- .../tinymce/themes/advanced/js/anchor.js | 112 +- .../tinymce/themes/advanced/js/charmap.js | 726 +- .../tinymce/themes/advanced/js/image.js | 506 +- .../tinymce/themes/advanced/js/link.js | 318 +- .../themes/advanced/js/source_editor.js | 156 +- .../Modules/tinymce/themes/advanced/link.htm | 114 +- .../tinymce/themes/advanced/shortcuts.htm | 94 +- .../themes/advanced/skins/default/content.css | 100 +- .../themes/advanced/skins/default/dialog.css | 236 +- .../themes/advanced/skins/default/ui.css | 438 +- .../advanced/skins/highcontrast/content.css | 48 +- .../advanced/skins/highcontrast/dialog.css | 212 +- .../themes/advanced/skins/highcontrast/ui.css | 212 +- .../themes/advanced/skins/o2k7/content.css | 96 +- .../themes/advanced/skins/o2k7/dialog.css | 236 +- .../tinymce/themes/advanced/skins/o2k7/ui.css | 444 +- .../themes/advanced/skins/o2k7/ui_black.css | 14 +- .../themes/advanced/skins/o2k7/ui_silver.css | 10 +- .../tinymce/themes/advanced/source_editor.htm | 50 +- .../themes/simple/editor_template_src.js | 166 +- .../themes/simple/skins/default/content.css | 50 +- .../themes/simple/skins/default/ui.css | 64 +- .../themes/simple/skins/o2k7/content.css | 34 +- .../tinymce/themes/simple/skins/o2k7/ui.css | 70 +- .../Modules/tinymce/utils/editable_selects.js | 140 +- .../Modules/tinymce/utils/form_utils.js | 420 +- .../Scripts/Modules/tinymce/utils/mctabs.js | 322 +- .../Scripts/Modules/tinymce/utils/validate.js | 504 +- .../ClientSource/Style/BundleSite.css.bundle | 8 +- Disco.Web/ClientSource/Style/Credits.less | 310 +- .../ClientSource/Style/Declarations.less | 90 +- Disco.Web/ClientSource/Style/Dialog.less | 24 +- .../ClientSource/Style/ExpressionEditor.css | 54 +- .../ClientSource/Style/ExpressionEditor.htm | 22 +- .../Images/AttachmentTypes/MimeTypeIcons.cs | 64 +- .../ClientSource/Style/InitialConfig.less | 202 +- .../ClientSource/Style/IsotopeStyles.css | 90 +- .../Style/Public/UserHeldDevices.less | 64 +- .../Public/UserHeldDevicesNoticeboard.less | 172 +- Disco.Web/ClientSource/Style/Shadowbox.css | 8 +- .../ClientSource/Style/Shadowbox.css.bundle | 10 +- Disco.Web/ClientSource/Style/Shared.less | 242 +- Disco.Web/ClientSource/Style/Timeline.css | 354 +- .../ClientSource/Style/Timeline.css.bundle | 10 +- .../Timeline/disco.timelineextensions.less | 16 +- .../ClientSource/Style/Timeline/graphics.css | 342 +- Disco.Web/ClientSource/Style/User.less | 232 +- .../Style/jQueryUI/dynatree/ui.dynatree.css | 904 +- .../Style/jQueryUIExtensions.less | 202 +- .../Controllers/PluginWebHandlerController.cs | 108 +- Disco.Web/Controllers/SearchController.cs | 298 +- Disco.Web/Extensions/HtmlExtensions.cs | 252 +- Disco.Web/Global.asax | 2 +- Disco.Web/Models/Device/AddOfflineModel.cs | 32 +- .../Models/InitialConfig/DatabaseModel.cs | 220 +- .../Models/InitialConfig/FileStoreModel.cs | 360 +- Disco.Web/Models/Job/CreateModelOld.cs | 306 +- Disco.Web/Models/Job/CreateRedirectModel.cs | 24 +- Disco.Web/Models/Job/LogWarrantyModel.cs | 196 +- .../Job/WarrantyProviderJobDetailsModel.cs | 32 +- Disco.Web/Models/Search/QueryModel.cs | 34 +- .../Views/Device/DeviceParts/Resources.cshtml | 384 +- .../Device/DeviceParts/Resources.generated.cs | 960 +- Disco.Web/Views/Device/Index.cshtml | 18 +- Disco.Web/Views/Device/Index.generated.cs | 160 +- Disco.Web/Views/Device/_DeviceActions.cshtml | 246 +- .../Views/Device/_DeviceActions.generated.cs | 652 +- Disco.Web/Views/Device/_DeviceTable.cshtml | 178 +- .../Views/Device/_DeviceTable.generated.cs | 774 +- .../_DeviceUserAssignmentHistoryTable.cshtml | 70 +- ...iceUserAssignmentHistoryTable.generated.cs | 284 +- Disco.Web/Views/Device/_ViewStart.cshtml | 4 +- .../Views/Device/_ViewStart.generated.cs | 108 +- Disco.Web/Views/InitialConfig/Complete.cshtml | 400 +- .../Views/InitialConfig/Complete.generated.cs | 1452 +- Disco.Web/Views/InitialConfig/Database.cshtml | 238 +- .../Views/InitialConfig/Database.generated.cs | 634 +- .../Views/InitialConfig/FileStore.cshtml | 498 +- .../InitialConfig/FileStore.generated.cs | 658 +- .../Views/InitialConfig/RestartWebApp.cshtml | 68 +- .../InitialConfig/RestartWebApp.generated.cs | 222 +- Disco.Web/Views/InitialConfig/Welcome.cshtml | 68 +- .../Views/InitialConfig/Welcome.generated.cs | 266 +- Disco.Web/Views/InitialConfig/_Layout.cshtml | 68 +- .../Views/InitialConfig/_Layout.generated.cs | 436 +- .../Views/InitialConfig/_ViewStart.cshtml | 6 +- .../InitialConfig/_ViewStart.generated.cs | 110 +- Disco.Web/Views/Job/Create_Redirect.cshtml | 42 +- .../Views/Job/Create_Redirect.generated.cs | 174 +- Disco.Web/Views/Job/Index.cshtml | 262 +- Disco.Web/Views/Job/Index.generated.cs | 382 +- Disco.Web/Views/Job/JobParts/Insurance.cshtml | 760 +- .../Views/Job/JobParts/Insurance.generated.cs | 2190 +- .../Job/JobParts/JobMetaAdditions.cshtml | 36 +- .../JobParts/JobMetaAdditions1.generated.cs | 238 +- .../Views/Job/JobParts/NonWarranty.cshtml | 32 +- .../Job/JobParts/NonWarranty.generated.cs | 246 +- .../Job/JobParts/NonWarrantyFinance.cshtml | 368 +- .../JobParts/NonWarrantyFinance.generated.cs | 1122 +- Disco.Web/Views/Job/JobParts/Repairs.cshtml | 170 +- .../Views/Job/JobParts/Repairs.generated.cs | 512 +- Disco.Web/Views/Job/JobParts/Resources.cshtml | 664 +- .../Views/Job/JobParts/Resources.generated.cs | 1436 +- Disco.Web/Views/Job/List.cshtml | 8 +- Disco.Web/Views/Job/List.generated.cs | 126 +- Disco.Web/Views/Job/LogWarranty.cshtml | 272 +- Disco.Web/Views/Job/LogWarranty.generated.cs | 876 +- .../Views/Job/LogWarrantyDisclose.cshtml | 214 +- .../Job/LogWarrantyDisclose.generated.cs | 872 +- Disco.Web/Views/Job/LogWarrantyError.cshtml | 248 +- .../Views/Job/LogWarrantyError.generated.cs | 832 +- .../Job/WarrantyProviderJobDetails.cshtml | 106 +- .../WarrantyProviderJobDetails.generated.cs | 474 +- Disco.Web/Views/Job/_CreateSubject.cshtml | 82 +- .../Views/Job/_CreateSubject.generated.cs | 508 +- Disco.Web/Views/Job/_ViewStart.cshtml | 4 +- Disco.Web/Views/Job/_ViewStart.generated.cs | 108 +- Disco.Web/Views/Search/Query.cshtml | 72 +- Disco.Web/Views/Search/Query.generated.cs | 338 +- Disco.Web/Views/Shared/Error.cshtml | 20 +- Disco.Web/Views/Shared/Error.generated.cs | 136 +- Disco.Web/Views/Shared/_DialogLayout.cshtml | 42 +- .../Views/Shared/_DialogLayout.generated.cs | 264 +- Disco.Web/Views/Shared/_EmptyLayout.cshtml | 42 +- .../Views/Shared/_EmptyLayout.generated.cs | 262 +- Disco.Web/Views/Shared/_JobTable.cshtml | 52 +- Disco.Web/Views/Shared/_JobTable.generated.cs | 262 +- Disco.Web/Views/Shared/_JobTableRender.cshtml | 216 +- .../Views/Shared/_JobTableRender.generated.cs | 1464 +- Disco.Web/Views/Shared/_SearchDialog.cshtml | 68 +- .../Views/Shared/_SearchDialog.generated.cs | 338 +- Disco.Web/Views/User/Index.cshtml | 12 +- Disco.Web/Views/User/Index.generated.cs | 130 +- Disco.Web/Views/User/Show.cshtml | 170 +- Disco.Web/Views/User/Show.generated.cs | 600 +- .../Views/User/UserParts/Resources.cshtml | 386 +- .../User/UserParts/Resources.generated.cs | 958 +- .../_UserDeviceAssignmentHistoryTable.cshtml | 160 +- ...rDeviceAssignmentHistoryTable.generated.cs | 668 +- Disco.Web/Views/User/_UserTable.cshtml | 118 +- Disco.Web/Views/User/_UserTable.generated.cs | 422 +- Disco.Web/Views/User/_ViewStart.cshtml | 4 +- Disco.Web/Views/User/_ViewStart.generated.cs | 108 +- Disco.Web/Views/Web.config | 124 +- Disco.Web/Views/_ViewStart.cshtml | 4 +- Disco.Web/Views/_ViewStart.generated.cs | 108 +- Disco.Web/Web.Debug.config | 60 +- .../Microsoft.VC90.CRT.manifest | 10 +- .../Microsoft.VC90.CRT.manifest | 10 +- Resources/.gitignore | 2 +- .../DotNetZip/Source/BZip2/BZip2Compressor.cs | 3838 +- .../DotNetZip/Source/BZip2/BitWriter.cs | 494 +- .../Libraries/DotNetZip/Source/BZip2/Rand.cs | 196 +- .../DotNetZip/Source/CommonSrc/CRC32.cs | 1626 +- .../DotNetZip/Source/Zip/ComHelper.cs | 230 +- .../Source/Zip/EncryptionAlgorithm.cs | 270 +- .../Libraries/DotNetZip/Source/Zip/Events.cs | 1368 +- .../DotNetZip/Source/Zip/Exceptions.cs | 600 +- .../Source/Zip/ExtractExistingFileAction.cs | 170 +- .../DotNetZip/Source/Zip/FileSelector.cs | 3216 +- .../DotNetZip/Source/Zip/OffsetStream.cs | 226 +- .../Libraries/DotNetZip/Source/Zip/Shared.cs | 1802 +- .../DotNetZip/Source/Zip/WinZipAes.cs | 1882 +- .../DotNetZip/Source/Zip/ZipConstants.cs | 102 +- .../DotNetZip/Source/Zip/ZipCrypto.cs | 910 +- .../DotNetZip/Source/Zip/ZipDirEntry.cs | 762 +- .../DotNetZip/Source/Zip/ZipEntry.Extract.cs | 2912 +- .../DotNetZip/Source/Zip/ZipEntry.Read.cs | 1596 +- .../DotNetZip/Source/Zip/ZipEntry.Write.cs | 5164 +- .../DotNetZip/Source/Zip/ZipEntry.cs | 5936 +- .../DotNetZip/Source/Zip/ZipEntrySource.cs | 136 +- .../DotNetZip/Source/Zip/ZipErrorAction.cs | 194 +- .../DotNetZip/Source/Zip/ZipFile.AddUpdate.cs | 4326 +- .../DotNetZip/Source/Zip/ZipFile.Check.cs | 702 +- .../DotNetZip/Source/Zip/ZipFile.Events.cs | 2438 +- .../DotNetZip/Source/Zip/ZipFile.Extract.cs | 596 +- .../DotNetZip/Source/Zip/ZipFile.Read.cs | 2220 +- .../DotNetZip/Source/Zip/ZipFile.Save.cs | 1928 +- .../Source/Zip/ZipFile.SaveSelfExtractor.cs | 2200 +- .../DotNetZip/Source/Zip/ZipFile.Selector.cs | 2928 +- .../Libraries/DotNetZip/Source/Zip/ZipFile.cs | 7820 +- .../Source/Zip/ZipFile.x-IEnumerable.cs | 308 +- .../DotNetZip/Source/Zip/ZipInputStream.cs | 1652 +- .../DotNetZip/Source/Zip/ZipOutputStream.cs | 3632 +- .../Source/Zip/ZipSegmentedStream.cs | 1140 +- .../DotNetZip/Source/Zlib/Deflate.cs | 3756 +- .../DotNetZip/Source/Zlib/DeflateStream.cs | 1480 +- .../DotNetZip/Source/Zlib/GZipStream.cs | 2058 +- .../DotNetZip/Source/Zlib/InfTree.cs | 870 +- .../DotNetZip/Source/Zlib/Inflate.cs | 3590 +- .../Zlib/ParallelDeflateOutputStream.cs | 2772 +- .../Libraries/DotNetZip/Source/Zlib/Tree.cs | 844 +- .../Libraries/DotNetZip/Source/Zlib/Zlib.cs | 1090 +- .../DotNetZip/Source/Zlib/ZlibBaseStream.cs | 1254 +- .../DotNetZip/Source/Zlib/ZlibCodec.cs | 1432 +- .../DotNetZip/Source/Zlib/ZlibConstants.cs | 256 +- .../DotNetZip/Source/Zlib/ZlibStream.cs | 1448 +- .../LibTiff.NET/BitMiracle.LibTiff.NET.xml | 8526 +- .../Libraries/Quartz/ClientProfile/Quartz.xml | 40132 +++---- Resources/Libraries/Quartz/Quartz.xml | 40132 +++---- Resources/Libraries/Spring.NET/Spring.Aop.xml | 23502 ++-- .../Libraries/Spring.NET/Spring.Core.xml | 98582 ++++++++-------- .../Spring.NET/Spring.Data.NHibernate20.xml | 12190 +- .../Spring.NET/Spring.Data.NHibernate21.xml | 13422 +-- .../Spring.NET/Spring.Data.NHibernate30.xml | 13422 +-- .../Spring.NET/Spring.Data.NHibernate31.xml | 13422 +-- .../Spring.NET/Spring.Data.NHibernate32.xml | 13422 +-- .../Libraries/Spring.NET/Spring.Data.xml | 23386 ++-- .../Spring.NET/Spring.Messaging.Ems.xml | 9844 +- .../Spring.NET/Spring.Messaging.Nms.xml | 8938 +- .../Libraries/Spring.NET/Spring.Messaging.xml | 5370 +- .../Spring.NET/Spring.Scheduling.Quartz.xml | 4080 +- .../Libraries/Spring.NET/Spring.Services.xml | 4254 +- .../Spring.NET/Spring.Template.Velocity.xml | 1396 +- .../Spring.NET/Spring.Testing.Microsoft.xml | 1042 +- .../Spring.NET/Spring.Testing.NUnit.xml | 1310 +- .../Spring.NET/Spring.Web.Extensions.xml | 100 +- .../Libraries/Spring.NET/Spring.Web.Mvc.xml | 520 +- .../Libraries/Spring.NET/Spring.Web.Mvc3.xml | 436 +- Resources/Libraries/Spring.NET/Spring.Web.xml | 18508 +-- 729 files changed, 300734 insertions(+), 300712 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..412eeda7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.nuget/NuGet.Config b/.nuget/NuGet.Config index 6a318ad9..67f8ea04 100644 --- a/.nuget/NuGet.Config +++ b/.nuget/NuGet.Config @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/.nuget/NuGet.targets b/.nuget/NuGet.targets index 1f7c9b51..d3befdac 100644 --- a/.nuget/NuGet.targets +++ b/.nuget/NuGet.targets @@ -1,153 +1,153 @@ - - - - $(MSBuildProjectDirectory)\..\ - - - false - - - false - - - true - - - false - - - - - - - - - - - $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) - $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) - $([System.IO.Path]::Combine($(SolutionDir), "packages")) - - - - - $(SolutionDir).nuget - packages.config - $(SolutionDir)packages - - - - - $(NuGetToolsPath)\nuget.exe - @(PackageSource) - - "$(NuGetExePath)" - mono --runtime=v4.0.30319 $(NuGetExePath) - - $(TargetDir.Trim('\\')) - - -RequireConsent - - $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)" - $(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols - - - - RestorePackages; - $(ResolveReferencesDependsOn); - - - - - $(BuildDependsOn); - BuildPackage; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + $(MSBuildProjectDirectory)\..\ + + + false + + + false + + + true + + + false + + + + + + + + + + + $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) + $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) + $([System.IO.Path]::Combine($(SolutionDir), "packages")) + + + + + $(SolutionDir).nuget + packages.config + $(SolutionDir)packages + + + + + $(NuGetToolsPath)\nuget.exe + @(PackageSource) + + "$(NuGetExePath)" + mono --runtime=v4.0.30319 $(NuGetExePath) + + $(TargetDir.Trim('\\')) + + -RequireConsent + + $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)" + $(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols + + + + RestorePackages; + $(ResolveReferencesDependsOn); + + + + + $(BuildDependsOn); + BuildPackage; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Disco.BI/BI/AttachmentBI/Utilities.cs b/Disco.BI/BI/AttachmentBI/Utilities.cs index 54ce4815..92a46502 100644 --- a/Disco.BI/BI/AttachmentBI/Utilities.cs +++ b/Disco.BI/BI/AttachmentBI/Utilities.cs @@ -1,96 +1,96 @@ -using System; -using System.Drawing; -using System.IO; -using System.Linq; -using Disco.BI.Extensions; -using iTextSharp.text.pdf; - -namespace Disco.BI.AttachmentBI -{ - public static class Utilities - { - - public static bool GenerateThumbnail(Stream Source, string SourceMimeType, Stream OutStream) - { - if (Source != null) - { - // GDI+ (jpg, png, gif, bmp) - if (SourceMimeType.Equals("image/jpeg", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("jpg") || - SourceMimeType.Equals("image/png", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("png") || - SourceMimeType.Equals("image/gif", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("gif") || - SourceMimeType.Equals("image/bmp", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("bmp")) - { - try - { - using (Image sourceImage = Image.FromStream(Source)) - { - using (Image thumbImage = sourceImage.ResizeImage(48, 48)) - { - using (Image mimeTypeIcon = Disco.Properties.Resources.MimeType_img16) - thumbImage.EmbedIconOverlay(mimeTypeIcon); - thumbImage.SaveJpg(90, OutStream); - return true; - } - } - } - catch (Exception) - { - // Ignore Thumbnail Generation exceptions for images - //throw; - } - - } - - // PDF - if (SourceMimeType.Equals("application/pdf", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("pdf")) - { - PdfReader pdfReader = new PdfReader(Source); - try - { - using (DisposableImageCollection pdfPageImages = pdfReader.PdfPageImages(1)) - { - if (pdfPageImages.Count() > 0) - { - // Find Biggest Image on Page - Image biggestImage = pdfPageImages.OrderByDescending(i => i.Height * i.Width).First(); - using (Image thumbImage = biggestImage.ResizeImage(48, 48, Brushes.White)) - { - using (Image mimeTypeIcon = Disco.Properties.Resources.MimeType_pdf16) - thumbImage.EmbedIconOverlay(mimeTypeIcon); - thumbImage.SaveJpg(90, OutStream); - return true; - } - } - } - } - finally - { - if (pdfReader != null) - pdfReader.Close(); - } - } - } - return false; - } - public static bool GenerateThumbnail(string SourceFilename, string SourceMimeType, string DestinationFilename) - { - using (FileStream sourceStream = new FileStream(SourceFilename, FileMode.Open, FileAccess.Read)) - { - return GenerateThumbnail(sourceStream, SourceMimeType, DestinationFilename); - } - } - public static bool GenerateThumbnail(Stream Source, string SourceMimeType, string DestinationFilename) - { - bool result; - using (FileStream destinationStream = new FileStream(DestinationFilename, FileMode.Create, FileAccess.Write, FileShare.None)) - { - result = GenerateThumbnail(Source, SourceMimeType, destinationStream); - } - if (!result && File.Exists(DestinationFilename)) - File.Delete(DestinationFilename); - - return result; - } - - } -} +using System; +using System.Drawing; +using System.IO; +using System.Linq; +using Disco.BI.Extensions; +using iTextSharp.text.pdf; + +namespace Disco.BI.AttachmentBI +{ + public static class Utilities + { + + public static bool GenerateThumbnail(Stream Source, string SourceMimeType, Stream OutStream) + { + if (Source != null) + { + // GDI+ (jpg, png, gif, bmp) + if (SourceMimeType.Equals("image/jpeg", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("jpg") || + SourceMimeType.Equals("image/png", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("png") || + SourceMimeType.Equals("image/gif", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("gif") || + SourceMimeType.Equals("image/bmp", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("bmp")) + { + try + { + using (Image sourceImage = Image.FromStream(Source)) + { + using (Image thumbImage = sourceImage.ResizeImage(48, 48)) + { + using (Image mimeTypeIcon = Disco.Properties.Resources.MimeType_img16) + thumbImage.EmbedIconOverlay(mimeTypeIcon); + thumbImage.SaveJpg(90, OutStream); + return true; + } + } + } + catch (Exception) + { + // Ignore Thumbnail Generation exceptions for images + //throw; + } + + } + + // PDF + if (SourceMimeType.Equals("application/pdf", StringComparison.InvariantCultureIgnoreCase) || SourceMimeType.Contains("pdf")) + { + PdfReader pdfReader = new PdfReader(Source); + try + { + using (DisposableImageCollection pdfPageImages = pdfReader.PdfPageImages(1)) + { + if (pdfPageImages.Count() > 0) + { + // Find Biggest Image on Page + Image biggestImage = pdfPageImages.OrderByDescending(i => i.Height * i.Width).First(); + using (Image thumbImage = biggestImage.ResizeImage(48, 48, Brushes.White)) + { + using (Image mimeTypeIcon = Disco.Properties.Resources.MimeType_pdf16) + thumbImage.EmbedIconOverlay(mimeTypeIcon); + thumbImage.SaveJpg(90, OutStream); + return true; + } + } + } + } + finally + { + if (pdfReader != null) + pdfReader.Close(); + } + } + } + return false; + } + public static bool GenerateThumbnail(string SourceFilename, string SourceMimeType, string DestinationFilename) + { + using (FileStream sourceStream = new FileStream(SourceFilename, FileMode.Open, FileAccess.Read)) + { + return GenerateThumbnail(sourceStream, SourceMimeType, DestinationFilename); + } + } + public static bool GenerateThumbnail(Stream Source, string SourceMimeType, string DestinationFilename) + { + bool result; + using (FileStream destinationStream = new FileStream(DestinationFilename, FileMode.Create, FileAccess.Write, FileShare.None)) + { + result = GenerateThumbnail(Source, SourceMimeType, destinationStream); + } + if (!result && File.Exists(DestinationFilename)) + File.Delete(DestinationFilename); + + return result; + } + + } +} diff --git a/Disco.BI/BI/DataStore.cs b/Disco.BI/BI/DataStore.cs index 66ccbd90..e93bb1ca 100644 --- a/Disco.BI/BI/DataStore.cs +++ b/Disco.BI/BI/DataStore.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Data.Repository; -using Disco.Data.Configuration; - -namespace Disco.BI -{ - public static class DataStore - { - - public static string CreateLocation(DiscoDataContext dbContext, string SubLocation, DateTime? SubSubLocationTimestamp = null) - { - return CreateLocation(dbContext.DiscoConfiguration, SubLocation, SubSubLocationTimestamp); - } - public static string CreateLocation(ConfigurationContext DiscoConfiguration, string SubLocation, DateTime? SubSubLocationTimestamp = null) - { - string SubSubLocation = string.Empty; - if (SubSubLocationTimestamp.HasValue) - SubSubLocation = SubSubLocationTimestamp.Value.ToString(@"yyyy\\MM"); - - string storeDirectory = System.IO.Path.Combine(DiscoConfiguration.DataStoreLocation, SubLocation, SubSubLocation); - if (!System.IO.Directory.Exists(storeDirectory)) - System.IO.Directory.CreateDirectory(storeDirectory); - - return storeDirectory; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Data.Repository; +using Disco.Data.Configuration; + +namespace Disco.BI +{ + public static class DataStore + { + + public static string CreateLocation(DiscoDataContext dbContext, string SubLocation, DateTime? SubSubLocationTimestamp = null) + { + return CreateLocation(dbContext.DiscoConfiguration, SubLocation, SubSubLocationTimestamp); + } + public static string CreateLocation(ConfigurationContext DiscoConfiguration, string SubLocation, DateTime? SubSubLocationTimestamp = null) + { + string SubSubLocation = string.Empty; + if (SubSubLocationTimestamp.HasValue) + SubSubLocation = SubSubLocationTimestamp.Value.ToString(@"yyyy\\MM"); + + string storeDirectory = System.IO.Path.Combine(DiscoConfiguration.DataStoreLocation, SubLocation, SubSubLocation); + if (!System.IO.Directory.Exists(storeDirectory)) + System.IO.Directory.CreateDirectory(storeDirectory); + + return storeDirectory; + } + + } +} diff --git a/Disco.BI/BI/DeviceBI/BatchUtilities.cs b/Disco.BI/BI/DeviceBI/BatchUtilities.cs index c2b91d9d..31ac7538 100644 --- a/Disco.BI/BI/DeviceBI/BatchUtilities.cs +++ b/Disco.BI/BI/DeviceBI/BatchUtilities.cs @@ -1,21 +1,21 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; - -namespace Disco.BI.DeviceBI -{ - public static class BatchUtilities - { - public static DeviceBatch DefaultNewDeviceBatch(DiscoDataContext dbContext) - { - return new DeviceBatch() - { - PurchaseDate = DateTime.Today - }; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; + +namespace Disco.BI.DeviceBI +{ + public static class BatchUtilities + { + public static DeviceBatch DefaultNewDeviceBatch(DiscoDataContext dbContext) + { + return new DeviceBatch() + { + PurchaseDate = DateTime.Today + }; + } + + } +} diff --git a/Disco.BI/BI/DeviceBI/EnrolSafeException.cs b/Disco.BI/BI/DeviceBI/EnrolSafeException.cs index 85244d8b..daf15bd1 100644 --- a/Disco.BI/BI/DeviceBI/EnrolSafeException.cs +++ b/Disco.BI/BI/DeviceBI/EnrolSafeException.cs @@ -1,14 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Threading; -namespace Disco.BI -{ - public class EnrolSafeException : System.Exception - { - public EnrolSafeException(string Message) : base(Message) - { - } - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Threading; +namespace Disco.BI +{ + public class EnrolSafeException : System.Exception + { + public EnrolSafeException(string Message) : base(Message) + { + } + } +} diff --git a/Disco.BI/BI/DeviceBI/EnrolmentLog.cs b/Disco.BI/BI/DeviceBI/EnrolmentLog.cs index de68bea6..1af730e7 100644 --- a/Disco.BI/BI/DeviceBI/EnrolmentLog.cs +++ b/Disco.BI/BI/DeviceBI/EnrolmentLog.cs @@ -1,482 +1,482 @@ -using Disco.Services.Logging; -using Disco.Services.Logging.Models; -using Disco.Models.ClientServices; -using System; -using System.Collections.Generic; -using System.Diagnostics; -namespace Disco.BI.DeviceBI -{ - public class EnrolmentLog : LogBase - { - public enum EventTypeIds - { - SessionStarting = 10, - SessionProgress, - SessionDevice, - SessionDeviceInfo, - SessionFinished = 20, - SessionDiagnosticInformation, - SessionWarning, - SessionError, - SessionErrorWithInner, - SessionClientError, - SessionTaskAddedDevice = 50, - SessionTaskUpdatingDevice, - SessionTaskCreatedDeviceModel = 56, - SessionTaskProvisioningADAccount = 58, - SessionTaskAssigningUser = 60, - SessionTaskProvisioningWirelessCertificate = 62, - SessionTaskRenamingDevice = 64, - SessionTaskMovingDeviceOrganisationUnit = 66, - ClientError = 400 - } - private const int _ModuleId = 50; - public static EnrolmentLog Current - { - get - { - return (EnrolmentLog)LogContext.LogModules[50]; - } - } - public override string ModuleDescription - { - get - { - return "Device Enrolment"; - } - } - public override int ModuleId - { - get - { - return 50; - } - } - public override string ModuleName - { - get - { - return "DeviceEnrolment"; - } - } - [System.Diagnostics.DebuggerNonUserCode] - public EnrolmentLog() - { - } - private static void Log(EnrolmentLog.EventTypeIds EventTypeId, params object[] Args) - { - EnrolmentLog.Current.Log((int)EventTypeId, Args); - } - public static void LogSessionStarting(string SessionId, string HostId, DeviceEnrol.EnrolmentTypes EnrolmentType) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionStarting, new object[] - { - SessionId, - HostId, - System.Enum.GetName(EnrolmentType.GetType(), EnrolmentType) - }); - } - public static void LogSessionDevice(string SessionId, string DeviceSerialNumber, int? DeviceModelId) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionDevice, new object[] - { - SessionId, - DeviceSerialNumber, - DeviceModelId - }); - } - public static void LogSessionDeviceInfo(string SessionId, string SerialNumber, string UUID, string ComputerName, string LanMacAddress, string WlanMacAddress, string Manufacturer, string Model, string ModelType) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionDeviceInfo, new object[] - { - SessionId, - SerialNumber, - UUID, - ComputerName, - LanMacAddress, - WlanMacAddress, - Manufacturer, - Model, - ModelType - }); - } - public static void LogSessionDeviceInfo(string SessionId, MacEnrol Request) - { - EnrolmentLog.LogSessionDeviceInfo(SessionId, Request.DeviceSerialNumber, Request.DeviceUUID, Request.DeviceComputerName, Request.DeviceLanMacAddress, Request.DeviceWlanMacAddress, Request.DeviceManufacturer, Request.DeviceModel, Request.DeviceModelType); - } - public static void LogSessionDeviceInfo(string SessionId, Models.ClientServices.Enrol Request) - { - EnrolmentLog.LogSessionDeviceInfo(SessionId, Request.DeviceSerialNumber, Request.DeviceUUID, Request.DeviceComputerName, Request.DeviceLanMacAddress, Request.DeviceWlanMacAddress, Request.DeviceManufacturer, Request.DeviceModel, Request.DeviceModelType); - } - public static void LogSessionProgress(string SessionId, int Progress, string Status) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionProgress, new object[] - { - SessionId, - Progress, - Status - }); - } - public static void LogSessionFinished(string SessionId) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionFinished, new object[] - { - SessionId - }); - } - public static void LogSessionDiagnosticInformation(string SessionId, string Message) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionDiagnosticInformation, new object[] - { - SessionId, - Message - }); - } - public static void LogSessionWarning(string SessionId, string Message) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionWarning, new object[] - { - SessionId, - Message - }); - } - public static void LogSessionError(string SessionId, System.Exception Ex) - { - if (Ex.InnerException == null) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionError, new object[] - { - SessionId, - Ex.GetType().Name, - Ex.Message, - Ex.StackTrace - }); - } - else - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionErrorWithInner, new object[] - { - SessionId, - Ex.GetType().Name, - Ex.Message, - Ex.InnerException.GetType().Name, - Ex.InnerException.Message, - Ex.StackTrace, - Ex.InnerException.StackTrace - }); - } - } - public static void LogSessionClientError(string SessionId, string ClientIP, string ClientIdentifier, string ClientVersion, string Error, string RawError) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionClientError, new object[] - { - SessionId, - ClientIP, - ClientIdentifier, - ClientVersion, - Error, - RawError - }); - } - public static void LogSessionTaskAddedDevice(string SessionId, string DeviceSerialNumber) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskAddedDevice, new object[] - { - SessionId, - DeviceSerialNumber - }); - } - public static void LogSessionTaskUpdatingDevice(string SessionId, string DeviceSerialNumber) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskUpdatingDevice, new object[] - { - SessionId, - DeviceSerialNumber - }); - } - public static void LogSessionTaskCreatedDeviceModel(string SessionId, string DeviceSerialNumber, string Manufacturer, string Model) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskCreatedDeviceModel, new object[] - { - SessionId, - DeviceSerialNumber, - Manufacturer, - Model - }); - } - public static void LogSessionTaskProvisioningADAccount(string SessionId, string DeviceSerialNumber, string ADAccountName) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskProvisioningADAccount, new object[] - { - SessionId, - DeviceSerialNumber, - ADAccountName - }); - } - public static void LogSessionTaskAssigningUser(string SessionId, string DeviceSerialNumber, string UserDisplayName, string UserUsername, string UserDomain, string UserSID) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskAssigningUser, new object[] - { - SessionId, - DeviceSerialNumber, - UserDisplayName, - UserUsername, - UserDomain, - UserSID - }); - } - public static void LogSessionTaskProvisioningWirelessCertificate(string SessionId, string DeviceSerialNumber, string CertificateName) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskProvisioningWirelessCertificate, new object[] - { - SessionId, - DeviceSerialNumber, - CertificateName - }); - } - public static void LogSessionTaskRenamingDevice(string SessionId, string OldComputerName, string NewComputerName) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskRenamingDevice, new object[] - { - SessionId, - OldComputerName, - NewComputerName - }); - } - public static void LogSessionTaskMovingDeviceOrganisationUnit(string SessionId, string OldOrganisationUnit, string NewOrganisationUnit) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskMovingDeviceOrganisationUnit, new object[] - { - SessionId, - OldOrganisationUnit, - NewOrganisationUnit - }); - } - public static void LogClientError(string ClientIP, string ClientIdentifier, string ClientVersion, string Error, string RawError) - { - EnrolmentLog.Log(EnrolmentLog.EventTypeIds.ClientError, new object[] - { - ClientIP, - ClientIdentifier, - ClientVersion, - Error, - RawError - }); - } - protected override System.Collections.Generic.List LoadEventTypes() - { - return new System.Collections.Generic.List - { - new LogEventType - { - Id = 10, - ModuleId = 50, - Name = "Session Starting", - Format = "Starting '{2}' Enrolment for {1} (Session# {0})", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 12, - ModuleId = 50, - Name = "Session Device", - Format = null, - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = false - }, - new LogEventType - { - Id = 11, - ModuleId = 50, - Name = "Session Progress", - Format = "Processing Session# {0}; {1}% Complete; Status: {2}", - Severity = 0, - UseLive = true, - UsePersist = false, - UseDisplay = false - }, - new LogEventType - { - Id = 13, - ModuleId = 50, - Name = "Session Device Info", - Format = null, - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 20, - ModuleId = 50, - Name = "Session Finished", - Format = "Finished Session# {0}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 21, - ModuleId = 50, - Name = "Session Diagnostic Information", - Format = null, - Severity = 0, - UseLive = true, - UsePersist = false, - UseDisplay = false - }, - new LogEventType - { - Id = 22, - ModuleId = 50, - Name = "Session Warning", - Format = null, - Severity = 1, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 23, - ModuleId = 50, - Name = "Session Error", - Format = "An Error Occurred: [{1}] {2}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 24, - ModuleId = 50, - Name = "Session Error with Internal", - Format = "An Error Occurred: [{1}] {2}; Internal Error: [{3}] {4}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.SessionClientError, - ModuleId = _ModuleId, - Name = "Client Error", - Format = "IP: {1}; Device ID: {2}; Version: {3} Error: {4}; Session# {0}", - Severity = (int)LogEventType.Severities.Error, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 50, - ModuleId = 50, - Name = "Task - Added Device", - Format = "Creating Disco Device {1}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 51, - ModuleId = 50, - Name = "Task - Updating Device", - Format = "Updating Disco Device {1}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 56, - ModuleId = 50, - Name = "Task - Creating Device Model", - Format = "Creating Device Model '{2} {3}' for Device {1}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 58, - ModuleId = 50, - Name = "Task - Provisioning Active Directory Account", - Format = "Provisioning Active Directory Account '{2}' for Device {1}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 60, - ModuleId = 50, - Name = "Task - Assigning User", - Format = "Assigning User '{2}' ({4}\\{3} {{{5}}}) for Device {1}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 62, - ModuleId = 50, - Name = "Task - Provisioning Wireless Certificate", - Format = "Provisioning Wireless Certificate '{2}' for Device {1}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 64, - ModuleId = 50, - Name = "Task - Renaming Device", - Format = "Renaming Device '{1}' to '{2}'", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 66, - ModuleId = 50, - Name = "Task - Moving Device Organisation Unit", - Format = "Moving Device Organisation Unit '{1}' to '{2}'", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.ClientError, - ModuleId = _ModuleId, - Name = "Client Error", - Format = "IP: {0}; Device ID: {1}; Version: {2} Error: {3}", - Severity = (int)LogEventType.Severities.Error, - UseLive = true, - UsePersist = true, - UseDisplay = true - } - }; - } - } -} +using Disco.Services.Logging; +using Disco.Services.Logging.Models; +using Disco.Models.ClientServices; +using System; +using System.Collections.Generic; +using System.Diagnostics; +namespace Disco.BI.DeviceBI +{ + public class EnrolmentLog : LogBase + { + public enum EventTypeIds + { + SessionStarting = 10, + SessionProgress, + SessionDevice, + SessionDeviceInfo, + SessionFinished = 20, + SessionDiagnosticInformation, + SessionWarning, + SessionError, + SessionErrorWithInner, + SessionClientError, + SessionTaskAddedDevice = 50, + SessionTaskUpdatingDevice, + SessionTaskCreatedDeviceModel = 56, + SessionTaskProvisioningADAccount = 58, + SessionTaskAssigningUser = 60, + SessionTaskProvisioningWirelessCertificate = 62, + SessionTaskRenamingDevice = 64, + SessionTaskMovingDeviceOrganisationUnit = 66, + ClientError = 400 + } + private const int _ModuleId = 50; + public static EnrolmentLog Current + { + get + { + return (EnrolmentLog)LogContext.LogModules[50]; + } + } + public override string ModuleDescription + { + get + { + return "Device Enrolment"; + } + } + public override int ModuleId + { + get + { + return 50; + } + } + public override string ModuleName + { + get + { + return "DeviceEnrolment"; + } + } + [System.Diagnostics.DebuggerNonUserCode] + public EnrolmentLog() + { + } + private static void Log(EnrolmentLog.EventTypeIds EventTypeId, params object[] Args) + { + EnrolmentLog.Current.Log((int)EventTypeId, Args); + } + public static void LogSessionStarting(string SessionId, string HostId, DeviceEnrol.EnrolmentTypes EnrolmentType) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionStarting, new object[] + { + SessionId, + HostId, + System.Enum.GetName(EnrolmentType.GetType(), EnrolmentType) + }); + } + public static void LogSessionDevice(string SessionId, string DeviceSerialNumber, int? DeviceModelId) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionDevice, new object[] + { + SessionId, + DeviceSerialNumber, + DeviceModelId + }); + } + public static void LogSessionDeviceInfo(string SessionId, string SerialNumber, string UUID, string ComputerName, string LanMacAddress, string WlanMacAddress, string Manufacturer, string Model, string ModelType) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionDeviceInfo, new object[] + { + SessionId, + SerialNumber, + UUID, + ComputerName, + LanMacAddress, + WlanMacAddress, + Manufacturer, + Model, + ModelType + }); + } + public static void LogSessionDeviceInfo(string SessionId, MacEnrol Request) + { + EnrolmentLog.LogSessionDeviceInfo(SessionId, Request.DeviceSerialNumber, Request.DeviceUUID, Request.DeviceComputerName, Request.DeviceLanMacAddress, Request.DeviceWlanMacAddress, Request.DeviceManufacturer, Request.DeviceModel, Request.DeviceModelType); + } + public static void LogSessionDeviceInfo(string SessionId, Models.ClientServices.Enrol Request) + { + EnrolmentLog.LogSessionDeviceInfo(SessionId, Request.DeviceSerialNumber, Request.DeviceUUID, Request.DeviceComputerName, Request.DeviceLanMacAddress, Request.DeviceWlanMacAddress, Request.DeviceManufacturer, Request.DeviceModel, Request.DeviceModelType); + } + public static void LogSessionProgress(string SessionId, int Progress, string Status) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionProgress, new object[] + { + SessionId, + Progress, + Status + }); + } + public static void LogSessionFinished(string SessionId) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionFinished, new object[] + { + SessionId + }); + } + public static void LogSessionDiagnosticInformation(string SessionId, string Message) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionDiagnosticInformation, new object[] + { + SessionId, + Message + }); + } + public static void LogSessionWarning(string SessionId, string Message) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionWarning, new object[] + { + SessionId, + Message + }); + } + public static void LogSessionError(string SessionId, System.Exception Ex) + { + if (Ex.InnerException == null) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionError, new object[] + { + SessionId, + Ex.GetType().Name, + Ex.Message, + Ex.StackTrace + }); + } + else + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionErrorWithInner, new object[] + { + SessionId, + Ex.GetType().Name, + Ex.Message, + Ex.InnerException.GetType().Name, + Ex.InnerException.Message, + Ex.StackTrace, + Ex.InnerException.StackTrace + }); + } + } + public static void LogSessionClientError(string SessionId, string ClientIP, string ClientIdentifier, string ClientVersion, string Error, string RawError) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionClientError, new object[] + { + SessionId, + ClientIP, + ClientIdentifier, + ClientVersion, + Error, + RawError + }); + } + public static void LogSessionTaskAddedDevice(string SessionId, string DeviceSerialNumber) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskAddedDevice, new object[] + { + SessionId, + DeviceSerialNumber + }); + } + public static void LogSessionTaskUpdatingDevice(string SessionId, string DeviceSerialNumber) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskUpdatingDevice, new object[] + { + SessionId, + DeviceSerialNumber + }); + } + public static void LogSessionTaskCreatedDeviceModel(string SessionId, string DeviceSerialNumber, string Manufacturer, string Model) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskCreatedDeviceModel, new object[] + { + SessionId, + DeviceSerialNumber, + Manufacturer, + Model + }); + } + public static void LogSessionTaskProvisioningADAccount(string SessionId, string DeviceSerialNumber, string ADAccountName) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskProvisioningADAccount, new object[] + { + SessionId, + DeviceSerialNumber, + ADAccountName + }); + } + public static void LogSessionTaskAssigningUser(string SessionId, string DeviceSerialNumber, string UserDisplayName, string UserUsername, string UserDomain, string UserSID) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskAssigningUser, new object[] + { + SessionId, + DeviceSerialNumber, + UserDisplayName, + UserUsername, + UserDomain, + UserSID + }); + } + public static void LogSessionTaskProvisioningWirelessCertificate(string SessionId, string DeviceSerialNumber, string CertificateName) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskProvisioningWirelessCertificate, new object[] + { + SessionId, + DeviceSerialNumber, + CertificateName + }); + } + public static void LogSessionTaskRenamingDevice(string SessionId, string OldComputerName, string NewComputerName) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskRenamingDevice, new object[] + { + SessionId, + OldComputerName, + NewComputerName + }); + } + public static void LogSessionTaskMovingDeviceOrganisationUnit(string SessionId, string OldOrganisationUnit, string NewOrganisationUnit) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.SessionTaskMovingDeviceOrganisationUnit, new object[] + { + SessionId, + OldOrganisationUnit, + NewOrganisationUnit + }); + } + public static void LogClientError(string ClientIP, string ClientIdentifier, string ClientVersion, string Error, string RawError) + { + EnrolmentLog.Log(EnrolmentLog.EventTypeIds.ClientError, new object[] + { + ClientIP, + ClientIdentifier, + ClientVersion, + Error, + RawError + }); + } + protected override System.Collections.Generic.List LoadEventTypes() + { + return new System.Collections.Generic.List + { + new LogEventType + { + Id = 10, + ModuleId = 50, + Name = "Session Starting", + Format = "Starting '{2}' Enrolment for {1} (Session# {0})", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 12, + ModuleId = 50, + Name = "Session Device", + Format = null, + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = false + }, + new LogEventType + { + Id = 11, + ModuleId = 50, + Name = "Session Progress", + Format = "Processing Session# {0}; {1}% Complete; Status: {2}", + Severity = 0, + UseLive = true, + UsePersist = false, + UseDisplay = false + }, + new LogEventType + { + Id = 13, + ModuleId = 50, + Name = "Session Device Info", + Format = null, + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 20, + ModuleId = 50, + Name = "Session Finished", + Format = "Finished Session# {0}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 21, + ModuleId = 50, + Name = "Session Diagnostic Information", + Format = null, + Severity = 0, + UseLive = true, + UsePersist = false, + UseDisplay = false + }, + new LogEventType + { + Id = 22, + ModuleId = 50, + Name = "Session Warning", + Format = null, + Severity = 1, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 23, + ModuleId = 50, + Name = "Session Error", + Format = "An Error Occurred: [{1}] {2}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 24, + ModuleId = 50, + Name = "Session Error with Internal", + Format = "An Error Occurred: [{1}] {2}; Internal Error: [{3}] {4}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.SessionClientError, + ModuleId = _ModuleId, + Name = "Client Error", + Format = "IP: {1}; Device ID: {2}; Version: {3} Error: {4}; Session# {0}", + Severity = (int)LogEventType.Severities.Error, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 50, + ModuleId = 50, + Name = "Task - Added Device", + Format = "Creating Disco Device {1}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 51, + ModuleId = 50, + Name = "Task - Updating Device", + Format = "Updating Disco Device {1}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 56, + ModuleId = 50, + Name = "Task - Creating Device Model", + Format = "Creating Device Model '{2} {3}' for Device {1}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 58, + ModuleId = 50, + Name = "Task - Provisioning Active Directory Account", + Format = "Provisioning Active Directory Account '{2}' for Device {1}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 60, + ModuleId = 50, + Name = "Task - Assigning User", + Format = "Assigning User '{2}' ({4}\\{3} {{{5}}}) for Device {1}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 62, + ModuleId = 50, + Name = "Task - Provisioning Wireless Certificate", + Format = "Provisioning Wireless Certificate '{2}' for Device {1}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 64, + ModuleId = 50, + Name = "Task - Renaming Device", + Format = "Renaming Device '{1}' to '{2}'", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 66, + ModuleId = 50, + Name = "Task - Moving Device Organisation Unit", + Format = "Moving Device Organisation Unit '{1}' to '{2}'", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.ClientError, + ModuleId = _ModuleId, + Name = "Client Error", + Format = "IP: {0}; Device ID: {1}; Version: {2} Error: {3}", + Severity = (int)LogEventType.Severities.Error, + UseLive = true, + UsePersist = true, + UseDisplay = true + } + }; + } + } +} diff --git a/Disco.BI/BI/DeviceBI/Searching.cs b/Disco.BI/BI/DeviceBI/Searching.cs index e4fb1f11..6b2c1131 100644 --- a/Disco.BI/BI/DeviceBI/Searching.cs +++ b/Disco.BI/BI/DeviceBI/Searching.cs @@ -1,56 +1,56 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.BI.Search; -using Disco.Models.Repository; -using Disco.Data.Repository; - -namespace Disco.BI.DeviceBI -{ - public static class Searching - { - private static List Search_SelectDeviceSearchResultItem(IQueryable Query, int? LimitCount = null){ - if (LimitCount.HasValue) - Query = Query.Take(LimitCount.Value); - - return Query.Select(d => new DeviceSearchResultItem() - { - SerialNumber = d.SerialNumber, - AssetNumber = d.AssetNumber, - ComputerName = d.ComputerName, - DeviceModelDescription = d.DeviceModel.Description, - DeviceProfileDescription = d.DeviceProfile.Description, - DecommissionedDate = d.DecommissionedDate, - AssignedUserId = d.AssignedUserId, - AssignedUserDisplayName = d.AssignedUser.DisplayName, - JobCount = d.Jobs.Count() - }).ToList(); - } - - public static List Search(DiscoDataContext dbContext, string Term, int? LimitCount = null) - { - return Search_SelectDeviceSearchResultItem(dbContext.Devices.Where(d => - d.AssetNumber.Contains(Term) || - d.ComputerName.Contains(Term) || - d.SerialNumber.Contains(Term) || - d.Location.Contains(Term) || - Term.Contains(d.SerialNumber) - ), LimitCount); - } - - public static List SearchDeviceModel(DiscoDataContext dbContext, int DeviceModelId, int? LimitCount = null) - { - return Search_SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceModelId == DeviceModelId), LimitCount); - } - public static List SearchDeviceProfile(DiscoDataContext dbContext, int DeviceProfileId, int? LimitCount = null) - { - return Search_SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceProfileId == DeviceProfileId), LimitCount); - } - public static List SearchDeviceBatch(DiscoDataContext dbContext, int DeviceBatchId, int? LimitCount = null) - { - return Search_SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceBatchId == DeviceBatchId), LimitCount); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.BI.Search; +using Disco.Models.Repository; +using Disco.Data.Repository; + +namespace Disco.BI.DeviceBI +{ + public static class Searching + { + private static List Search_SelectDeviceSearchResultItem(IQueryable Query, int? LimitCount = null){ + if (LimitCount.HasValue) + Query = Query.Take(LimitCount.Value); + + return Query.Select(d => new DeviceSearchResultItem() + { + SerialNumber = d.SerialNumber, + AssetNumber = d.AssetNumber, + ComputerName = d.ComputerName, + DeviceModelDescription = d.DeviceModel.Description, + DeviceProfileDescription = d.DeviceProfile.Description, + DecommissionedDate = d.DecommissionedDate, + AssignedUserId = d.AssignedUserId, + AssignedUserDisplayName = d.AssignedUser.DisplayName, + JobCount = d.Jobs.Count() + }).ToList(); + } + + public static List Search(DiscoDataContext dbContext, string Term, int? LimitCount = null) + { + return Search_SelectDeviceSearchResultItem(dbContext.Devices.Where(d => + d.AssetNumber.Contains(Term) || + d.ComputerName.Contains(Term) || + d.SerialNumber.Contains(Term) || + d.Location.Contains(Term) || + Term.Contains(d.SerialNumber) + ), LimitCount); + } + + public static List SearchDeviceModel(DiscoDataContext dbContext, int DeviceModelId, int? LimitCount = null) + { + return Search_SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceModelId == DeviceModelId), LimitCount); + } + public static List SearchDeviceProfile(DiscoDataContext dbContext, int DeviceProfileId, int? LimitCount = null) + { + return Search_SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceProfileId == DeviceProfileId), LimitCount); + } + public static List SearchDeviceBatch(DiscoDataContext dbContext, int DeviceBatchId, int? LimitCount = null) + { + return Search_SelectDeviceSearchResultItem(dbContext.Devices.Where(d => d.DeviceBatchId == DeviceBatchId), LimitCount); + } + + } +} diff --git a/Disco.BI/BI/DisposableImageCollection.cs b/Disco.BI/BI/DisposableImageCollection.cs index 8283e740..5db5f777 100644 --- a/Disco.BI/BI/DisposableImageCollection.cs +++ b/Disco.BI/BI/DisposableImageCollection.cs @@ -1,21 +1,21 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Drawing; - -namespace Disco.BI -{ - public class DisposableImageCollection : List, IDisposable - { - public void Dispose() - { - foreach (Image i in this) - { - if (i != null) - i.Dispose(); - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Drawing; + +namespace Disco.BI +{ + public class DisposableImageCollection : List, IDisposable + { + public void Dispose() + { + foreach (Image i in this) + { + if (i != null) + i.Dispose(); + } + } + + } +} diff --git a/Disco.BI/BI/DocumentTemplateBI/DocumentTemplateQRCodeLocationCache.cs b/Disco.BI/BI/DocumentTemplateBI/DocumentTemplateQRCodeLocationCache.cs index d48cb80f..e223e818 100644 --- a/Disco.BI/BI/DocumentTemplateBI/DocumentTemplateQRCodeLocationCache.cs +++ b/Disco.BI/BI/DocumentTemplateBI/DocumentTemplateQRCodeLocationCache.cs @@ -1,72 +1,72 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections.Concurrent; -using Disco.Models.Repository; -using Disco.Data.Repository; -using Disco.BI.Extensions; -using System.Web; -using System.Drawing; -using iTextSharp.text.pdf; - -namespace Disco.BI.DocumentTemplateBI -{ - class DocumentTemplateQRCodeLocationCache - { - private static ConcurrentDictionary> _Cache = new ConcurrentDictionary>(); - - public static List GetLocations(DocumentTemplate dt, DiscoDataContext dbContext) - { - // Check Cache - List locations; - if (_Cache.TryGetValue(dt.Id, out locations)) - { - return locations; - } - // Generate Cache - return GenerateLocations(dt, dbContext); - } - - public static bool InvalidateLocations(DocumentTemplate dt) - { - List locations; - return _Cache.TryRemove(dt.Id, out locations); - } - - private static bool SetValue(string DocumentTemplateId, List Locations) - { - if (_Cache.ContainsKey(DocumentTemplateId)) - { - List oldLocations; - if (_Cache.TryGetValue(DocumentTemplateId, out oldLocations)) - { - return _Cache.TryUpdate(DocumentTemplateId, Locations, oldLocations); - } - } - return _Cache.TryAdd(DocumentTemplateId, Locations); - } - - internal static List GenerateLocations(DocumentTemplate dt, DiscoDataContext dbContext) - { - string templateFilename = dt.RepositoryFilename(dbContext); - PdfReader pdfReader = new PdfReader(templateFilename); - List locations = new List(); - - if (pdfReader.AcroFields.Fields.ContainsKey("DiscoAttachmentId")) - { - foreach (var pdfFieldPosition in pdfReader.AcroFields.GetFieldPositions("DiscoAttachmentId")) - { - var pdfPageSize = pdfReader.GetPageSize(pdfFieldPosition.page); - locations.Add(new RectangleF((float)System.Math.Min(1.0, System.Math.Max(0.0, (double)(pdfFieldPosition.position.Left / pdfPageSize.Width) - 0.1)), (float)System.Math.Min(1.0, System.Math.Max(0.0, (double)((pdfPageSize.Height - pdfFieldPosition.position.Top) / pdfPageSize.Height) - 0.1)), (float)System.Math.Min(1.0, System.Math.Max(0.0, (double)(pdfFieldPosition.position.Width / pdfPageSize.Width) + 0.2)), (float)System.Math.Min(1.0, System.Math.Max(0.0, (double)(pdfFieldPosition.position.Height / pdfPageSize.Height) + 0.2)))); - } - } - pdfReader.Close(); - - // Update Cache - SetValue(dt.Id, locations); - return locations; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections.Concurrent; +using Disco.Models.Repository; +using Disco.Data.Repository; +using Disco.BI.Extensions; +using System.Web; +using System.Drawing; +using iTextSharp.text.pdf; + +namespace Disco.BI.DocumentTemplateBI +{ + class DocumentTemplateQRCodeLocationCache + { + private static ConcurrentDictionary> _Cache = new ConcurrentDictionary>(); + + public static List GetLocations(DocumentTemplate dt, DiscoDataContext dbContext) + { + // Check Cache + List locations; + if (_Cache.TryGetValue(dt.Id, out locations)) + { + return locations; + } + // Generate Cache + return GenerateLocations(dt, dbContext); + } + + public static bool InvalidateLocations(DocumentTemplate dt) + { + List locations; + return _Cache.TryRemove(dt.Id, out locations); + } + + private static bool SetValue(string DocumentTemplateId, List Locations) + { + if (_Cache.ContainsKey(DocumentTemplateId)) + { + List oldLocations; + if (_Cache.TryGetValue(DocumentTemplateId, out oldLocations)) + { + return _Cache.TryUpdate(DocumentTemplateId, Locations, oldLocations); + } + } + return _Cache.TryAdd(DocumentTemplateId, Locations); + } + + internal static List GenerateLocations(DocumentTemplate dt, DiscoDataContext dbContext) + { + string templateFilename = dt.RepositoryFilename(dbContext); + PdfReader pdfReader = new PdfReader(templateFilename); + List locations = new List(); + + if (pdfReader.AcroFields.Fields.ContainsKey("DiscoAttachmentId")) + { + foreach (var pdfFieldPosition in pdfReader.AcroFields.GetFieldPositions("DiscoAttachmentId")) + { + var pdfPageSize = pdfReader.GetPageSize(pdfFieldPosition.page); + locations.Add(new RectangleF((float)System.Math.Min(1.0, System.Math.Max(0.0, (double)(pdfFieldPosition.position.Left / pdfPageSize.Width) - 0.1)), (float)System.Math.Min(1.0, System.Math.Max(0.0, (double)((pdfPageSize.Height - pdfFieldPosition.position.Top) / pdfPageSize.Height) - 0.1)), (float)System.Math.Min(1.0, System.Math.Max(0.0, (double)(pdfFieldPosition.position.Width / pdfPageSize.Width) + 0.2)), (float)System.Math.Min(1.0, System.Math.Max(0.0, (double)(pdfFieldPosition.position.Height / pdfPageSize.Height) + 0.2)))); + } + } + pdfReader.Close(); + + // Update Cache + SetValue(dt.Id, locations); + return locations; + } + + } +} diff --git a/Disco.BI/BI/DocumentTemplateBI/DocumentUniqueIdentifier.cs b/Disco.BI/BI/DocumentTemplateBI/DocumentUniqueIdentifier.cs index 08eaca39..4b4efe17 100644 --- a/Disco.BI/BI/DocumentTemplateBI/DocumentUniqueIdentifier.cs +++ b/Disco.BI/BI/DocumentTemplateBI/DocumentUniqueIdentifier.cs @@ -1,203 +1,203 @@ -using Disco.Data.Repository; -using Disco.Models.Repository; -using System; -namespace Disco.BI.DocumentTemplateBI -{ - public class DocumentUniqueIdentifier - { - private bool? _loadedComponentsOk; - private DocumentTemplate _documentTemplate; - private object _data; - private string _dataDescription; - public string TemplateTypeId { get; private set; } - public string DataId { get; private set; } - public string DocumentUniqueId - { - get - { - return string.Format("{0}|{1}", this.TemplateTypeId, this.DataId); - } - } - public string CreatorId { get; private set; } - public System.DateTime TimeStamp { get; private set; } - public int Page { get; private set; } - public string Tag { get; private set; } - public DocumentTemplate DocumentTemplate - { - get - { - bool flag = this._loadedComponentsOk.HasValue && this._loadedComponentsOk.Value; - if (flag) - { - return this._documentTemplate; - } - throw new System.Exception("Document Unique Identifier Components not loaded or invalid"); - } - } - public object Data - { - get - { - bool flag = this._loadedComponentsOk.HasValue && this._loadedComponentsOk.Value; - if (flag) - { - return this._data; - } - throw new System.Exception("Document Unique Identifier Components not loaded or invalid"); - } - } - public string DataDescription - { - get - { - bool flag = this._loadedComponentsOk.HasValue && this._loadedComponentsOk.Value; - if (flag) - { - return this._dataDescription; - } - throw new System.Exception("Document Unique Identifier Components not loaded or invalid"); - } - } - public string DataScope { get; private set; } - public static bool IsDocumentUniqueIdentifier(string UniqueIdentifier) - { - return UniqueIdentifier.StartsWith("Disco|", System.StringComparison.InvariantCultureIgnoreCase); - } - public DocumentUniqueIdentifier(string TemplateTypeId, string DataId, string CreatorId, DateTime TimeStamp, int? Page = null, string Tag = null) - { - this.Tag = Tag; - this.TemplateTypeId = TemplateTypeId; - this.DataId = DataId; - this.CreatorId = CreatorId; - this.TimeStamp = TimeStamp; - this.Page = Page ?? 0; - } - public DocumentUniqueIdentifier(string UniqueIdentifier, string Tag) - { - if (!DocumentUniqueIdentifier.IsDocumentUniqueIdentifier(UniqueIdentifier)) - { - throw new System.ArgumentException("Invalid Document Unique Identifier", "UniqueIdentifier"); - } - this.Tag = Tag; - string[] s = UniqueIdentifier.Split(new char[] { '|' }); - string left = s[1].ToUpper(); - if (left == "AT" || left == "1") - { - if (s.Length >= 3) - { - this.TemplateTypeId = s[2]; - } - if (s.Length >= 4) - { - this.DataId = s[3]; - } - if (s.Length >= 5) - { - this.CreatorId = s[4]; - } - if (s.Length >= 6) - { - System.DateTime timeStamp; - if (System.DateTime.TryParse(s[5], out timeStamp)) - { - this.TimeStamp = timeStamp; - } - } - if (s.Length >= 7) - { - int page = 0; - if (int.TryParse(s[6], out page)) - { - this.Page = page; - } - } - return; - } - throw new System.ArgumentException(string.Format("Invalid Document Unique Identifier Version ({0})", s[1]), "UniqueIdentifier"); - } - public bool LoadComponents(DiscoDataContext Context) - { - bool LoadComponents; - if (!this._loadedComponentsOk.HasValue) - { - string scopeType; - if (this.TemplateTypeId.StartsWith("--")) - { - string templateTypeId = this.TemplateTypeId; - switch (this.TemplateTypeId) - { - case "--DEVICE": - scopeType = DocumentTemplate.DocumentTemplateScopes.Device; - break; - case "--JOB": - scopeType = DocumentTemplate.DocumentTemplateScopes.Job; - break; - case "--USER": - scopeType = DocumentTemplate.DocumentTemplateScopes.User; - break; - default: - scopeType = null; - break; - } - } - else - { - this._documentTemplate = Context.DocumentTemplates.Find(this.TemplateTypeId); - if (this._documentTemplate != null) - { - scopeType = this._documentTemplate.Scope; - } - else - { - scopeType = null; - } - } - if (scopeType != null) - { - this.DataScope = scopeType; - switch (scopeType) - { - case DocumentTemplate.DocumentTemplateScopes.Device: - Device d = Context.Devices.Find(this.DataId); - if (d != null) - { - this._data = d; - this._dataDescription = d.SerialNumber; - this._loadedComponentsOk = true; - LoadComponents = true; - return LoadComponents; - } - break; - case DocumentTemplate.DocumentTemplateScopes.Job: - Job i = Context.Jobs.Find(int.Parse(this.DataId)); - if (i != null) - { - this._data = i; - this._dataDescription = i.Id.ToString(); - this._loadedComponentsOk = true; - LoadComponents = true; - return LoadComponents; - } - break; - case DocumentTemplate.DocumentTemplateScopes.User: - User u = Context.Users.Find(this.DataId); - if (u != null) - { - this._data = u; - this._dataDescription = u.DisplayName; - this._loadedComponentsOk = true; - LoadComponents = true; - return LoadComponents; - } - break; - default: - break; - } - } - this._loadedComponentsOk = false; - } - LoadComponents = this._loadedComponentsOk.Value; - return LoadComponents; - } - } -} +using Disco.Data.Repository; +using Disco.Models.Repository; +using System; +namespace Disco.BI.DocumentTemplateBI +{ + public class DocumentUniqueIdentifier + { + private bool? _loadedComponentsOk; + private DocumentTemplate _documentTemplate; + private object _data; + private string _dataDescription; + public string TemplateTypeId { get; private set; } + public string DataId { get; private set; } + public string DocumentUniqueId + { + get + { + return string.Format("{0}|{1}", this.TemplateTypeId, this.DataId); + } + } + public string CreatorId { get; private set; } + public System.DateTime TimeStamp { get; private set; } + public int Page { get; private set; } + public string Tag { get; private set; } + public DocumentTemplate DocumentTemplate + { + get + { + bool flag = this._loadedComponentsOk.HasValue && this._loadedComponentsOk.Value; + if (flag) + { + return this._documentTemplate; + } + throw new System.Exception("Document Unique Identifier Components not loaded or invalid"); + } + } + public object Data + { + get + { + bool flag = this._loadedComponentsOk.HasValue && this._loadedComponentsOk.Value; + if (flag) + { + return this._data; + } + throw new System.Exception("Document Unique Identifier Components not loaded or invalid"); + } + } + public string DataDescription + { + get + { + bool flag = this._loadedComponentsOk.HasValue && this._loadedComponentsOk.Value; + if (flag) + { + return this._dataDescription; + } + throw new System.Exception("Document Unique Identifier Components not loaded or invalid"); + } + } + public string DataScope { get; private set; } + public static bool IsDocumentUniqueIdentifier(string UniqueIdentifier) + { + return UniqueIdentifier.StartsWith("Disco|", System.StringComparison.InvariantCultureIgnoreCase); + } + public DocumentUniqueIdentifier(string TemplateTypeId, string DataId, string CreatorId, DateTime TimeStamp, int? Page = null, string Tag = null) + { + this.Tag = Tag; + this.TemplateTypeId = TemplateTypeId; + this.DataId = DataId; + this.CreatorId = CreatorId; + this.TimeStamp = TimeStamp; + this.Page = Page ?? 0; + } + public DocumentUniqueIdentifier(string UniqueIdentifier, string Tag) + { + if (!DocumentUniqueIdentifier.IsDocumentUniqueIdentifier(UniqueIdentifier)) + { + throw new System.ArgumentException("Invalid Document Unique Identifier", "UniqueIdentifier"); + } + this.Tag = Tag; + string[] s = UniqueIdentifier.Split(new char[] { '|' }); + string left = s[1].ToUpper(); + if (left == "AT" || left == "1") + { + if (s.Length >= 3) + { + this.TemplateTypeId = s[2]; + } + if (s.Length >= 4) + { + this.DataId = s[3]; + } + if (s.Length >= 5) + { + this.CreatorId = s[4]; + } + if (s.Length >= 6) + { + System.DateTime timeStamp; + if (System.DateTime.TryParse(s[5], out timeStamp)) + { + this.TimeStamp = timeStamp; + } + } + if (s.Length >= 7) + { + int page = 0; + if (int.TryParse(s[6], out page)) + { + this.Page = page; + } + } + return; + } + throw new System.ArgumentException(string.Format("Invalid Document Unique Identifier Version ({0})", s[1]), "UniqueIdentifier"); + } + public bool LoadComponents(DiscoDataContext Context) + { + bool LoadComponents; + if (!this._loadedComponentsOk.HasValue) + { + string scopeType; + if (this.TemplateTypeId.StartsWith("--")) + { + string templateTypeId = this.TemplateTypeId; + switch (this.TemplateTypeId) + { + case "--DEVICE": + scopeType = DocumentTemplate.DocumentTemplateScopes.Device; + break; + case "--JOB": + scopeType = DocumentTemplate.DocumentTemplateScopes.Job; + break; + case "--USER": + scopeType = DocumentTemplate.DocumentTemplateScopes.User; + break; + default: + scopeType = null; + break; + } + } + else + { + this._documentTemplate = Context.DocumentTemplates.Find(this.TemplateTypeId); + if (this._documentTemplate != null) + { + scopeType = this._documentTemplate.Scope; + } + else + { + scopeType = null; + } + } + if (scopeType != null) + { + this.DataScope = scopeType; + switch (scopeType) + { + case DocumentTemplate.DocumentTemplateScopes.Device: + Device d = Context.Devices.Find(this.DataId); + if (d != null) + { + this._data = d; + this._dataDescription = d.SerialNumber; + this._loadedComponentsOk = true; + LoadComponents = true; + return LoadComponents; + } + break; + case DocumentTemplate.DocumentTemplateScopes.Job: + Job i = Context.Jobs.Find(int.Parse(this.DataId)); + if (i != null) + { + this._data = i; + this._dataDescription = i.Id.ToString(); + this._loadedComponentsOk = true; + LoadComponents = true; + return LoadComponents; + } + break; + case DocumentTemplate.DocumentTemplateScopes.User: + User u = Context.Users.Find(this.DataId); + if (u != null) + { + this._data = u; + this._dataDescription = u.DisplayName; + this._loadedComponentsOk = true; + LoadComponents = true; + return LoadComponents; + } + break; + default: + break; + } + } + this._loadedComponentsOk = false; + } + LoadComponents = this._loadedComponentsOk.Value; + return LoadComponents; + } + } +} diff --git a/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentDropBoxMonitor.cs b/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentDropBoxMonitor.cs index 635f1871..5e02162a 100644 --- a/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentDropBoxMonitor.cs +++ b/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentDropBoxMonitor.cs @@ -1,85 +1,85 @@ -using System; -using System.IO; -using System.Web.Caching; -using Disco.Data.Repository; -using Quartz; -using Quartz.Impl; -using Quartz.Impl.Triggers; - -namespace Disco.BI.DocumentTemplateBI.Importer -{ - public class DocumentDropBoxMonitor : System.IDisposable - { - private IScheduler _scheduler; - private FileSystemWatcher _fsw; - private Cache _httpCache; - - public const string WatcherFilter = "*.pdf"; - public string DropBoxLocation { get; private set; } - - public DocumentDropBoxMonitor(DiscoDataContext Context, ISchedulerFactory SchedulerFactory, Cache HttpCache) - { - if (Context == null) - throw new System.ArgumentNullException("Context"); - - this._httpCache = HttpCache; - - var location = DataStore.CreateLocation(Context, "DocumentDropBox"); - this.DropBoxLocation = location.EndsWith(@"\") ? location : string.Concat(location, @"\"); - - this._scheduler = SchedulerFactory.GetScheduler(); - this._scheduler.Start(); - } - public void ScheduleCurrentFiles(int Delay) - { - foreach (var filename in System.IO.Directory.GetFiles(this.DropBoxLocation, "*.pdf")) - { - this.ScheduleFile(filename, Delay); - } - } - public void StartWatching() - { - if (this._fsw == null) - { - this._fsw = new FileSystemWatcher(this.DropBoxLocation, "*.pdf"); - this._fsw.Created += new FileSystemEventHandler(this.FSW_Created); - } - this._fsw.EnableRaisingEvents = true; - } - public void StopWatching() - { - if (this._fsw != null) - { - this._fsw.EnableRaisingEvents = false; - } - } - public void ScheduleFile(string Filename, int Delay) - { - System.Guid guid = System.Guid.NewGuid(); - JobDetailImpl jd = new JobDetailImpl(guid.ToString(), typeof(DocumentImporterJob)); - jd.JobDataMap.Add("Filename", Filename); - jd.JobDataMap.Add("RetryCount", 0); - jd.JobDataMap.Add("HttpCache", this._httpCache); - guid = System.Guid.NewGuid(); - - System.DateTimeOffset startTimeUtc = new System.DateTimeOffset(DateTime.Now.AddSeconds((double)Delay)); - SimpleTriggerImpl trig = new SimpleTriggerImpl(guid.ToString(), startTimeUtc); - - this._scheduler.ScheduleJob(jd, trig); - } - private void FSW_Created(object sender, FileSystemEventArgs e) - { - if ((e.ChangeType & WatcherChangeTypes.Deleted) != WatcherChangeTypes.Deleted) - this.ScheduleFile(e.FullPath, 5); - } - - public void Dispose() - { - this.StopWatching(); - if (this._fsw != null) - this._fsw.Dispose(); - if (this._scheduler != null) - this._scheduler.Shutdown(false); - } - } -} +using System; +using System.IO; +using System.Web.Caching; +using Disco.Data.Repository; +using Quartz; +using Quartz.Impl; +using Quartz.Impl.Triggers; + +namespace Disco.BI.DocumentTemplateBI.Importer +{ + public class DocumentDropBoxMonitor : System.IDisposable + { + private IScheduler _scheduler; + private FileSystemWatcher _fsw; + private Cache _httpCache; + + public const string WatcherFilter = "*.pdf"; + public string DropBoxLocation { get; private set; } + + public DocumentDropBoxMonitor(DiscoDataContext Context, ISchedulerFactory SchedulerFactory, Cache HttpCache) + { + if (Context == null) + throw new System.ArgumentNullException("Context"); + + this._httpCache = HttpCache; + + var location = DataStore.CreateLocation(Context, "DocumentDropBox"); + this.DropBoxLocation = location.EndsWith(@"\") ? location : string.Concat(location, @"\"); + + this._scheduler = SchedulerFactory.GetScheduler(); + this._scheduler.Start(); + } + public void ScheduleCurrentFiles(int Delay) + { + foreach (var filename in System.IO.Directory.GetFiles(this.DropBoxLocation, "*.pdf")) + { + this.ScheduleFile(filename, Delay); + } + } + public void StartWatching() + { + if (this._fsw == null) + { + this._fsw = new FileSystemWatcher(this.DropBoxLocation, "*.pdf"); + this._fsw.Created += new FileSystemEventHandler(this.FSW_Created); + } + this._fsw.EnableRaisingEvents = true; + } + public void StopWatching() + { + if (this._fsw != null) + { + this._fsw.EnableRaisingEvents = false; + } + } + public void ScheduleFile(string Filename, int Delay) + { + System.Guid guid = System.Guid.NewGuid(); + JobDetailImpl jd = new JobDetailImpl(guid.ToString(), typeof(DocumentImporterJob)); + jd.JobDataMap.Add("Filename", Filename); + jd.JobDataMap.Add("RetryCount", 0); + jd.JobDataMap.Add("HttpCache", this._httpCache); + guid = System.Guid.NewGuid(); + + System.DateTimeOffset startTimeUtc = new System.DateTimeOffset(DateTime.Now.AddSeconds((double)Delay)); + SimpleTriggerImpl trig = new SimpleTriggerImpl(guid.ToString(), startTimeUtc); + + this._scheduler.ScheduleJob(jd, trig); + } + private void FSW_Created(object sender, FileSystemEventArgs e) + { + if ((e.ChangeType & WatcherChangeTypes.Deleted) != WatcherChangeTypes.Deleted) + this.ScheduleFile(e.FullPath, 5); + } + + public void Dispose() + { + this.StopWatching(); + if (this._fsw != null) + this._fsw.Dispose(); + if (this._scheduler != null) + this._scheduler.Shutdown(false); + } + } +} diff --git a/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterCleanCacheJob.cs b/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterCleanCacheJob.cs index 2b5dc099..97795704 100644 --- a/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterCleanCacheJob.cs +++ b/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterCleanCacheJob.cs @@ -1,63 +1,63 @@ -using Disco.Data.Repository; -using Disco.Services.Logging; -using Quartz; -using Quartz.Impl; -using Disco.Services.Tasks; - -namespace Disco.BI.DocumentTemplateBI.Importer -{ - public class DocumentImporterCleanCacheJob : ScheduledTask - { - public override string TaskName { get { return "Document Importer - Clean Cache Task"; } } - - public override bool SingleInstanceTask { get { return true; } } - public override bool CancelInitiallySupported { get { return false; } } - - public override void InitalizeScheduledTask(DiscoDataContext dbContext) - { - // Trigger Daily @ 12:30am - TriggerBuilder triggerBuilder = TriggerBuilder.Create().WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 30)); - - this.ScheduleTask(triggerBuilder); - } - - protected override void ExecuteTask() - { - string dataStoreLocation; - using (DiscoDataContext dbContext = new DiscoDataContext()) - { - dataStoreLocation = DataStore.CreateLocation(dbContext, "Cache\\DocumentDropBox_SessionPages"); - } - - int deleteCount = 0; - int errorCount = 0; - - System.IO.DirectoryInfo dataStoreInfo = new System.IO.DirectoryInfo(dataStoreLocation); - - System.DateTime today = System.DateTime.Today; - - foreach (System.IO.FileInfo file in dataStoreInfo.GetFiles()) - { - try - { - if (file.CreationTime < today) - { - file.Delete(); - deleteCount++; - } - } - catch - { - errorCount++; - } - } - - SystemLog.LogInformation( - string.Format("Cleared DocumentDropBox_SessionPages Cache, Deleted {0} File/s, with {1} Error/s", deleteCount, errorCount), - deleteCount, - errorCount - ); - } - - } -} +using Disco.Data.Repository; +using Disco.Services.Logging; +using Quartz; +using Quartz.Impl; +using Disco.Services.Tasks; + +namespace Disco.BI.DocumentTemplateBI.Importer +{ + public class DocumentImporterCleanCacheJob : ScheduledTask + { + public override string TaskName { get { return "Document Importer - Clean Cache Task"; } } + + public override bool SingleInstanceTask { get { return true; } } + public override bool CancelInitiallySupported { get { return false; } } + + public override void InitalizeScheduledTask(DiscoDataContext dbContext) + { + // Trigger Daily @ 12:30am + TriggerBuilder triggerBuilder = TriggerBuilder.Create().WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 30)); + + this.ScheduleTask(triggerBuilder); + } + + protected override void ExecuteTask() + { + string dataStoreLocation; + using (DiscoDataContext dbContext = new DiscoDataContext()) + { + dataStoreLocation = DataStore.CreateLocation(dbContext, "Cache\\DocumentDropBox_SessionPages"); + } + + int deleteCount = 0; + int errorCount = 0; + + System.IO.DirectoryInfo dataStoreInfo = new System.IO.DirectoryInfo(dataStoreLocation); + + System.DateTime today = System.DateTime.Today; + + foreach (System.IO.FileInfo file in dataStoreInfo.GetFiles()) + { + try + { + if (file.CreationTime < today) + { + file.Delete(); + deleteCount++; + } + } + catch + { + errorCount++; + } + } + + SystemLog.LogInformation( + string.Format("Cleared DocumentDropBox_SessionPages Cache, Deleted {0} File/s, with {1} Error/s", deleteCount, errorCount), + deleteCount, + errorCount + ); + } + + } +} diff --git a/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterJob.cs b/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterJob.cs index f06297fc..85e79fb7 100644 --- a/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterJob.cs +++ b/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterJob.cs @@ -1,120 +1,120 @@ -using System; -using System.IO; -using System.Web.Caching; -using Disco.Data.Repository; -using Quartz; -using Quartz.Impl.Triggers; - -namespace Disco.BI.DocumentTemplateBI.Importer -{ - [PersistJobDataAfterExecution] - public class DocumentImporterJob : IJob - { - - void IJob.Execute(IJobExecutionContext context) - { - string sessionId = context.JobDetail.JobDataMap["SessionId"] as string; - if (string.IsNullOrEmpty(sessionId)) - { - sessionId = Guid.NewGuid().ToString(); - context.JobDetail.JobDataMap["SessionId"] = sessionId; - } - - string filename = context.JobDetail.JobDataMap["Filename"] as string; - int retryCount = (int)context.JobDetail.JobDataMap["RetryCount"]; - Cache httpCache = context.JobDetail.JobDataMap["HttpCache"] as Cache; - - var friendlyFilename = filename; - if (!string.IsNullOrEmpty(friendlyFilename)) - friendlyFilename = System.IO.Path.GetFileName(friendlyFilename); - - DocumentImporterLog.LogImportStarting(sessionId, friendlyFilename); - - if (!File.Exists(filename)) - { - DocumentImporterLog.LogImportWarning(sessionId, string.Format("File not found: {0}", filename)); - DocumentImporterLog.LogImportFinished(sessionId); - context.Scheduler.DeleteJob(context.JobDetail.Key); - return; - } - - try - { - using (DiscoDataContext dbContext = new DiscoDataContext()) - { - if (retryCount < 18) - { - context.JobDetail.JobDataMap["RetryCount"] = (++retryCount); - bool processResult = Interop.Pdf.PdfImporter.ProcessPdfAttachment(filename, dbContext, sessionId, httpCache); - - if (processResult) - { - // Import Successful - Delete - if (File.Exists(filename)) - File.Delete(filename); - } - else - { - // Import Failed - Move to Errors Folder - if (File.Exists(filename)) - { - try - { - string folderError = DataStore.CreateLocation(dbContext, "DocumentDropBox_Errors"); - string filenameError = Path.Combine(folderError, Path.GetFileName(filename)); - int filenameErrorCount = 0; - while (File.Exists(filenameError)) - { - filenameError = Path.Combine(folderError, string.Format("{0} ({1}){2}", Path.GetFileNameWithoutExtension(filename), ++filenameErrorCount, Path.GetExtension(filename))); - } - File.Move(filename, filenameError); - } - catch - { - // Ignore Errors - } - } - } - } - else - { - // To Many Errors - DocumentImporterLog.LogImportError(sessionId, string.Format("To many errors occurred trying to import '{1}' (SessionId: {0})", sessionId, friendlyFilename)); - // Move to Errors Folder - if (File.Exists(filename)) - { - try - { - string folderError = DataStore.CreateLocation(dbContext, "DocumentDropBox_Errors"); - string filenameError = Path.Combine(folderError, Path.GetFileName(filename)); - int filenameErrorCount = 0; - while (File.Exists(filenameError)) - { - filenameError = Path.Combine(folderError, string.Format("{0} ({1}){2}", Path.GetFileNameWithoutExtension(filename), ++filenameErrorCount, Path.GetExtension(filename))); - } - File.Move(filename, filenameError); - } - catch - { - // Ignore Errors - } - } - } - } - DocumentImporterLog.LogImportFinished(sessionId); - - // All Done - context.Scheduler.DeleteJob(context.JobDetail.Key); - } - catch (Exception ex) - { - DocumentImporterLog.LogImportWarning(sessionId, string.Format("{0}; Will try again in 10 Seconds", ex.Message)); - // Reschedule Job for 10 seconds - SimpleTriggerImpl trig = new SimpleTriggerImpl(Guid.NewGuid().ToString(), new DateTimeOffset(DateTime.Now.AddSeconds(10))); - context.Scheduler.RescheduleJob(context.Trigger.Key, trig); - } - - } - - } -} +using System; +using System.IO; +using System.Web.Caching; +using Disco.Data.Repository; +using Quartz; +using Quartz.Impl.Triggers; + +namespace Disco.BI.DocumentTemplateBI.Importer +{ + [PersistJobDataAfterExecution] + public class DocumentImporterJob : IJob + { + + void IJob.Execute(IJobExecutionContext context) + { + string sessionId = context.JobDetail.JobDataMap["SessionId"] as string; + if (string.IsNullOrEmpty(sessionId)) + { + sessionId = Guid.NewGuid().ToString(); + context.JobDetail.JobDataMap["SessionId"] = sessionId; + } + + string filename = context.JobDetail.JobDataMap["Filename"] as string; + int retryCount = (int)context.JobDetail.JobDataMap["RetryCount"]; + Cache httpCache = context.JobDetail.JobDataMap["HttpCache"] as Cache; + + var friendlyFilename = filename; + if (!string.IsNullOrEmpty(friendlyFilename)) + friendlyFilename = System.IO.Path.GetFileName(friendlyFilename); + + DocumentImporterLog.LogImportStarting(sessionId, friendlyFilename); + + if (!File.Exists(filename)) + { + DocumentImporterLog.LogImportWarning(sessionId, string.Format("File not found: {0}", filename)); + DocumentImporterLog.LogImportFinished(sessionId); + context.Scheduler.DeleteJob(context.JobDetail.Key); + return; + } + + try + { + using (DiscoDataContext dbContext = new DiscoDataContext()) + { + if (retryCount < 18) + { + context.JobDetail.JobDataMap["RetryCount"] = (++retryCount); + bool processResult = Interop.Pdf.PdfImporter.ProcessPdfAttachment(filename, dbContext, sessionId, httpCache); + + if (processResult) + { + // Import Successful - Delete + if (File.Exists(filename)) + File.Delete(filename); + } + else + { + // Import Failed - Move to Errors Folder + if (File.Exists(filename)) + { + try + { + string folderError = DataStore.CreateLocation(dbContext, "DocumentDropBox_Errors"); + string filenameError = Path.Combine(folderError, Path.GetFileName(filename)); + int filenameErrorCount = 0; + while (File.Exists(filenameError)) + { + filenameError = Path.Combine(folderError, string.Format("{0} ({1}){2}", Path.GetFileNameWithoutExtension(filename), ++filenameErrorCount, Path.GetExtension(filename))); + } + File.Move(filename, filenameError); + } + catch + { + // Ignore Errors + } + } + } + } + else + { + // To Many Errors + DocumentImporterLog.LogImportError(sessionId, string.Format("To many errors occurred trying to import '{1}' (SessionId: {0})", sessionId, friendlyFilename)); + // Move to Errors Folder + if (File.Exists(filename)) + { + try + { + string folderError = DataStore.CreateLocation(dbContext, "DocumentDropBox_Errors"); + string filenameError = Path.Combine(folderError, Path.GetFileName(filename)); + int filenameErrorCount = 0; + while (File.Exists(filenameError)) + { + filenameError = Path.Combine(folderError, string.Format("{0} ({1}){2}", Path.GetFileNameWithoutExtension(filename), ++filenameErrorCount, Path.GetExtension(filename))); + } + File.Move(filename, filenameError); + } + catch + { + // Ignore Errors + } + } + } + } + DocumentImporterLog.LogImportFinished(sessionId); + + // All Done + context.Scheduler.DeleteJob(context.JobDetail.Key); + } + catch (Exception ex) + { + DocumentImporterLog.LogImportWarning(sessionId, string.Format("{0}; Will try again in 10 Seconds", ex.Message)); + // Reschedule Job for 10 seconds + SimpleTriggerImpl trig = new SimpleTriggerImpl(Guid.NewGuid().ToString(), new DateTimeOffset(DateTime.Now.AddSeconds(10))); + context.Scheduler.RescheduleJob(context.Trigger.Key, trig); + } + + } + + } +} diff --git a/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterLog.cs b/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterLog.cs index cb8f4b1b..12960d6d 100644 --- a/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterLog.cs +++ b/Disco.BI/BI/DocumentTemplateBI/Importer/DocumentImporterLog.cs @@ -1,304 +1,304 @@ -using Disco.Services.Logging; -using Disco.Services.Logging.Models; -using System; -using System.Collections.Generic; -using System.Diagnostics; -namespace Disco.BI.DocumentTemplateBI.Importer -{ - public class DocumentImporterLog : LogBase - { - public enum EventTypeIds - { - ImportStarting = 10, - ImportProgress, - ImportFinished, - ImportWarning = 15, - ImportError, - ImportPageStarting = 100, - ImportPageImageUpdate = 104, - ImportPageProgress, - ImportPageDetected = 110, - ImportPageUndetected = 115, - ImportPageError = 120, - ImportPageUndetectedStored = 150 - } - - private const int _ModuleId = 40; - - public static DocumentImporterLog Current - { - get - { - return (DocumentImporterLog)LogContext.LogModules[_ModuleId]; - } - } - - public override string ModuleDescription - { - get - { - return "Document Importer"; - } - } - public override int ModuleId - { - get - { - return _ModuleId; - } - } - public override string ModuleName - { - get - { - return "DocumentImporter"; - } - } - private static void Log(DocumentImporterLog.EventTypeIds EventTypeId, params object[] Args) - { - DocumentImporterLog.Current.Log((int)EventTypeId, Args); - } - public static void LogImportStarting(string SessionId, string DocumentName) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportStarting, new object[] - { - SessionId, - DocumentName - }); - } - public static void LogImportProgress(string SessionId, int? Progress, string Status) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportProgress, new object[] - { - SessionId, - Progress, - Status - }); - } - public static void LogImportFinished(string SessionId) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportFinished, new object[] - { - SessionId - }); - } - public static void LogImportWarning(string SessionId, string Message) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportWarning, new object[] - { - SessionId, - Message - }); - } - public static void LogImportError(string SessionId, string Message) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportError, new object[] - { - SessionId, - Message - }); - } - public static void LogImportPageStarting(string SessionId, int PageNumber) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageStarting, new object[] - { - SessionId, - PageNumber - }); - } - public static void LogImportPageImageUpdate(string SessionId, int PageNumber) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageImageUpdate, new object[] - { - SessionId, - PageNumber - }); - } - public static void LogImportPageProgress(string SessionId, int PageNumber, int? Progress, string Status) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageProgress, new object[] - { - SessionId, - PageNumber, - Progress, - Status - }); - } - public static void LogImportPageDetected(string SessionId, int PageNumber, string DocumentTypeId, string DocumentTypeName, string TargetType, string AssignedId, string AssignedName) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageDetected, new object[] - { - SessionId, - PageNumber, - DocumentTypeId, - DocumentTypeName, - TargetType, - AssignedId, - AssignedName - }); - } - public static void LogImportPageUndetected(string SessionId, int PageNumber) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageUndetected, new object[] - { - SessionId, - PageNumber - }); - } - public static void LogImportPageError(string SessionId, int PageNumber, string Message) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageError, new object[] - { - SessionId, - PageNumber, - Message - }); - } - public static void LogImportPageUndetectedStored(string SessionId, int PageNumber) - { - DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageUndetectedStored, new object[] - { - SessionId, - PageNumber - }); - } - protected override System.Collections.Generic.List LoadEventTypes() - { - return new System.Collections.Generic.List - { - new LogEventType - { - Id = 10, - ModuleId = 40, - Name = "Import Starting", - Format = "Starting import of document: {1} (SessionId: {0})", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 11, - ModuleId = 40, - Name = "Import Progress", - Format = "Processing: {1}% Complete; Status: {2}", - Severity = 0, - UseLive = true, - UsePersist = false, - UseDisplay = false - }, - new LogEventType - { - Id = 12, - ModuleId = 40, - Name = "Import Finished", - Format = "Import of document complete (SessionId: {0})", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 15, - ModuleId = 40, - Name = "Import Warning", - Format = "Import Warning: {1} (SessionId: {0})", - Severity = 1, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 16, - ModuleId = 40, - Name = "Import Error", - Format = "Import Error: {1} (SessionId: {0})", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 100, - ModuleId = 40, - Name = "Import Page Starting", - Format = "Starting import of page: {1} (SessionId: {0})", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 104, - ModuleId = 40, - Name = "Import Page Image Update", - Format = null, - Severity = 0, - UseLive = true, - UsePersist = false, - UseDisplay = false - }, - new LogEventType - { - Id = 105, - ModuleId = 40, - Name = "Import Page Progress", - Format = "Processing: Page {1}; {2}% Complete; Status: {3}", - Severity = 0, - UseLive = true, - UsePersist = false, - UseDisplay = false - }, - new LogEventType - { - Id = 110, - ModuleId = 40, - Name = "Import Page Assigned", - Format = "Page {1} of type '{3}' assigned to {4}: '{6}'", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 115, - ModuleId = 40, - Name = "Import Page Undetected", - Format = "Page {1} not detected", - Severity = 1, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 120, - ModuleId = 40, - Name = "Import Page Error", - Format = "Page {1}, Import Error: {2}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 150, - ModuleId = 40, - Name = "Import Page Undetected Stored", - Format = null, - Severity = 0, - UseLive = true, - UsePersist = false, - UseDisplay = false - } - }; - } - } -} +using Disco.Services.Logging; +using Disco.Services.Logging.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +namespace Disco.BI.DocumentTemplateBI.Importer +{ + public class DocumentImporterLog : LogBase + { + public enum EventTypeIds + { + ImportStarting = 10, + ImportProgress, + ImportFinished, + ImportWarning = 15, + ImportError, + ImportPageStarting = 100, + ImportPageImageUpdate = 104, + ImportPageProgress, + ImportPageDetected = 110, + ImportPageUndetected = 115, + ImportPageError = 120, + ImportPageUndetectedStored = 150 + } + + private const int _ModuleId = 40; + + public static DocumentImporterLog Current + { + get + { + return (DocumentImporterLog)LogContext.LogModules[_ModuleId]; + } + } + + public override string ModuleDescription + { + get + { + return "Document Importer"; + } + } + public override int ModuleId + { + get + { + return _ModuleId; + } + } + public override string ModuleName + { + get + { + return "DocumentImporter"; + } + } + private static void Log(DocumentImporterLog.EventTypeIds EventTypeId, params object[] Args) + { + DocumentImporterLog.Current.Log((int)EventTypeId, Args); + } + public static void LogImportStarting(string SessionId, string DocumentName) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportStarting, new object[] + { + SessionId, + DocumentName + }); + } + public static void LogImportProgress(string SessionId, int? Progress, string Status) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportProgress, new object[] + { + SessionId, + Progress, + Status + }); + } + public static void LogImportFinished(string SessionId) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportFinished, new object[] + { + SessionId + }); + } + public static void LogImportWarning(string SessionId, string Message) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportWarning, new object[] + { + SessionId, + Message + }); + } + public static void LogImportError(string SessionId, string Message) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportError, new object[] + { + SessionId, + Message + }); + } + public static void LogImportPageStarting(string SessionId, int PageNumber) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageStarting, new object[] + { + SessionId, + PageNumber + }); + } + public static void LogImportPageImageUpdate(string SessionId, int PageNumber) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageImageUpdate, new object[] + { + SessionId, + PageNumber + }); + } + public static void LogImportPageProgress(string SessionId, int PageNumber, int? Progress, string Status) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageProgress, new object[] + { + SessionId, + PageNumber, + Progress, + Status + }); + } + public static void LogImportPageDetected(string SessionId, int PageNumber, string DocumentTypeId, string DocumentTypeName, string TargetType, string AssignedId, string AssignedName) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageDetected, new object[] + { + SessionId, + PageNumber, + DocumentTypeId, + DocumentTypeName, + TargetType, + AssignedId, + AssignedName + }); + } + public static void LogImportPageUndetected(string SessionId, int PageNumber) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageUndetected, new object[] + { + SessionId, + PageNumber + }); + } + public static void LogImportPageError(string SessionId, int PageNumber, string Message) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageError, new object[] + { + SessionId, + PageNumber, + Message + }); + } + public static void LogImportPageUndetectedStored(string SessionId, int PageNumber) + { + DocumentImporterLog.Log(DocumentImporterLog.EventTypeIds.ImportPageUndetectedStored, new object[] + { + SessionId, + PageNumber + }); + } + protected override System.Collections.Generic.List LoadEventTypes() + { + return new System.Collections.Generic.List + { + new LogEventType + { + Id = 10, + ModuleId = 40, + Name = "Import Starting", + Format = "Starting import of document: {1} (SessionId: {0})", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 11, + ModuleId = 40, + Name = "Import Progress", + Format = "Processing: {1}% Complete; Status: {2}", + Severity = 0, + UseLive = true, + UsePersist = false, + UseDisplay = false + }, + new LogEventType + { + Id = 12, + ModuleId = 40, + Name = "Import Finished", + Format = "Import of document complete (SessionId: {0})", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 15, + ModuleId = 40, + Name = "Import Warning", + Format = "Import Warning: {1} (SessionId: {0})", + Severity = 1, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 16, + ModuleId = 40, + Name = "Import Error", + Format = "Import Error: {1} (SessionId: {0})", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 100, + ModuleId = 40, + Name = "Import Page Starting", + Format = "Starting import of page: {1} (SessionId: {0})", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 104, + ModuleId = 40, + Name = "Import Page Image Update", + Format = null, + Severity = 0, + UseLive = true, + UsePersist = false, + UseDisplay = false + }, + new LogEventType + { + Id = 105, + ModuleId = 40, + Name = "Import Page Progress", + Format = "Processing: Page {1}; {2}% Complete; Status: {3}", + Severity = 0, + UseLive = true, + UsePersist = false, + UseDisplay = false + }, + new LogEventType + { + Id = 110, + ModuleId = 40, + Name = "Import Page Assigned", + Format = "Page {1} of type '{3}' assigned to {4}: '{6}'", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 115, + ModuleId = 40, + Name = "Import Page Undetected", + Format = "Page {1} not detected", + Severity = 1, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 120, + ModuleId = 40, + Name = "Import Page Error", + Format = "Page {1}, Import Error: {2}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 150, + ModuleId = 40, + Name = "Import Page Undetected Stored", + Format = null, + Severity = 0, + UseLive = true, + UsePersist = false, + UseDisplay = false + } + }; + } + } +} diff --git a/Disco.BI/BI/DocumentTemplateBI/Utilities.cs b/Disco.BI/BI/DocumentTemplateBI/Utilities.cs index 0d54bc45..5e66e0aa 100644 --- a/Disco.BI/BI/DocumentTemplateBI/Utilities.cs +++ b/Disco.BI/BI/DocumentTemplateBI/Utilities.cs @@ -1,49 +1,49 @@ -using iTextSharp.text; -using iTextSharp.text.pdf; - -namespace Disco.BI.DocumentTemplateBI -{ - public static class Utilities - { - public static System.IO.Stream JoinPdfs(params System.IO.Stream[] Pdfs) - { - if (Pdfs.Length == 0) - throw new System.ArgumentNullException("Pdfs"); - - // Only One PDF - Possible Reference Bug v's Memory/Speed (Returning Param Memory Stream) - if (Pdfs.Length == 1) - return Pdfs[0]; - - // Join Pdfs - System.IO.MemoryStream msBuilder = new System.IO.MemoryStream(); - - Document pdfDoc = new Document(); - PdfCopy pdfCopy = new PdfCopy(pdfDoc, msBuilder); - pdfDoc.Open(); - pdfCopy.CloseStream = false; - - for (int i = 0; i < Pdfs.Length; i++) - { - System.IO.Stream pdf = Pdfs[i]; - PdfReader pdfReader = new PdfReader(pdf); - - for (int indexPage = 1; indexPage <= pdfReader.NumberOfPages; indexPage++) - { - iTextSharp.text.Rectangle pageSize = pdfReader.GetPageSizeWithRotation(indexPage); - PdfImportedPage page = pdfCopy.GetImportedPage(pdfReader, indexPage); - pdfDoc.SetPageSize(pageSize); - pdfDoc.NewPage(); - pdfCopy.AddPage(page); - } - - pdfReader.Close(); - } - - pdfDoc.Close(); - pdfCopy.Close(); - msBuilder.Position = 0; - - return msBuilder; - } - } -} +using iTextSharp.text; +using iTextSharp.text.pdf; + +namespace Disco.BI.DocumentTemplateBI +{ + public static class Utilities + { + public static System.IO.Stream JoinPdfs(params System.IO.Stream[] Pdfs) + { + if (Pdfs.Length == 0) + throw new System.ArgumentNullException("Pdfs"); + + // Only One PDF - Possible Reference Bug v's Memory/Speed (Returning Param Memory Stream) + if (Pdfs.Length == 1) + return Pdfs[0]; + + // Join Pdfs + System.IO.MemoryStream msBuilder = new System.IO.MemoryStream(); + + Document pdfDoc = new Document(); + PdfCopy pdfCopy = new PdfCopy(pdfDoc, msBuilder); + pdfDoc.Open(); + pdfCopy.CloseStream = false; + + for (int i = 0; i < Pdfs.Length; i++) + { + System.IO.Stream pdf = Pdfs[i]; + PdfReader pdfReader = new PdfReader(pdf); + + for (int indexPage = 1; indexPage <= pdfReader.NumberOfPages; indexPage++) + { + iTextSharp.text.Rectangle pageSize = pdfReader.GetPageSizeWithRotation(indexPage); + PdfImportedPage page = pdfCopy.GetImportedPage(pdfReader, indexPage); + pdfDoc.SetPageSize(pageSize); + pdfDoc.NewPage(); + pdfCopy.AddPage(page); + } + + pdfReader.Close(); + } + + pdfDoc.Close(); + pdfCopy.Close(); + msBuilder.Position = 0; + + return msBuilder; + } + } +} diff --git a/Disco.BI/BI/Expressions/EvaluateExpressionParseException.cs b/Disco.BI/BI/Expressions/EvaluateExpressionParseException.cs index 88d90554..059723d9 100644 --- a/Disco.BI/BI/Expressions/EvaluateExpressionParseException.cs +++ b/Disco.BI/BI/Expressions/EvaluateExpressionParseException.cs @@ -1,27 +1,27 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Spring.Expressions.Parser.antlr; - -namespace Disco.BI.Expressions -{ - public class EvaluateExpressionParseException - { - public string Expression { get; set; } - public int PositionRow { get; set; } - public int PositionColumn { get; set; } - public string Message { get; set; } - - internal static EvaluateExpressionParseException FromRecognitionException(RecognitionException e, string Expression) - { - return new EvaluateExpressionParseException() - { - Expression = Expression, - Message = e.Message, - PositionRow = e.getLine(), - PositionColumn = e.getColumn() - }; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Spring.Expressions.Parser.antlr; + +namespace Disco.BI.Expressions +{ + public class EvaluateExpressionParseException + { + public string Expression { get; set; } + public int PositionRow { get; set; } + public int PositionColumn { get; set; } + public string Message { get; set; } + + internal static EvaluateExpressionParseException FromRecognitionException(RecognitionException e, string Expression) + { + return new EvaluateExpressionParseException() + { + Expression = Expression, + Message = e.Message, + PositionRow = e.getLine(), + PositionColumn = e.getColumn() + }; + } + } +} diff --git a/Disco.BI/BI/Expressions/EvaluateExpressionPart.cs b/Disco.BI/BI/Expressions/EvaluateExpressionPart.cs index f258c286..69db1d17 100644 --- a/Disco.BI/BI/Expressions/EvaluateExpressionPart.cs +++ b/Disco.BI/BI/Expressions/EvaluateExpressionPart.cs @@ -1,84 +1,84 @@ -using System; -using System.Collections; -using System.Runtime.CompilerServices; -using Spring.Expressions.Parser.antlr; - -namespace Disco.BI.Expressions -{ - public class EvaluateExpressionPart : IExpressionPart - { - private Spring.Expressions.IExpression _Expression; - private RecognitionException _ExpressionParseException; - private EvaluateExpressionParseException _EvaluateParseException; - - public string RawSource { get; set; } - public string Source { get; set; } - public bool ErrorsAllowed { get; set; } - public bool IsDynamic { get { return true; } set { return; } } - - public EvaluateExpressionParseException ParseException - { - get - { - if (_ExpressionParseException == null) - return null; - else - if (_EvaluateParseException == null) - _EvaluateParseException = EvaluateExpressionParseException.FromRecognitionException(_ExpressionParseException, this.Source); - return _EvaluateParseException; - } - } - - public bool ParseError - { - get { return (_ExpressionParseException != null); } - } - public string ParseErrorMessage - { - get - { - if (ParseError) - return ParseException.Message; - else - return null; - } - } - - public EvaluateExpressionPart(string Source) - { - this.RawSource = Source; - - if (Source.StartsWith("{") && Source.EndsWith("}")) - Source = Source.Substring(1, Source.Length - 2); - - if (Source[0] == '~') - { - this.ErrorsAllowed = true; - this.Source = Source.Substring(1); - } - else - { - this.ErrorsAllowed = false; - this.Source = Source; - } - try - { - this._Expression = Spring.Expressions.Expression.Parse(this.Source); - - } - catch (RecognitionException ex) - { - this._ExpressionParseException = ex; - } - } - object IExpressionPart.Evaluate(object ExpressionContext, System.Collections.IDictionary Variables) - { - if (this._ExpressionParseException == null) - { - return this._Expression.GetValue(ExpressionContext, Variables); - } - throw this._ExpressionParseException; - } - - } -} +using System; +using System.Collections; +using System.Runtime.CompilerServices; +using Spring.Expressions.Parser.antlr; + +namespace Disco.BI.Expressions +{ + public class EvaluateExpressionPart : IExpressionPart + { + private Spring.Expressions.IExpression _Expression; + private RecognitionException _ExpressionParseException; + private EvaluateExpressionParseException _EvaluateParseException; + + public string RawSource { get; set; } + public string Source { get; set; } + public bool ErrorsAllowed { get; set; } + public bool IsDynamic { get { return true; } set { return; } } + + public EvaluateExpressionParseException ParseException + { + get + { + if (_ExpressionParseException == null) + return null; + else + if (_EvaluateParseException == null) + _EvaluateParseException = EvaluateExpressionParseException.FromRecognitionException(_ExpressionParseException, this.Source); + return _EvaluateParseException; + } + } + + public bool ParseError + { + get { return (_ExpressionParseException != null); } + } + public string ParseErrorMessage + { + get + { + if (ParseError) + return ParseException.Message; + else + return null; + } + } + + public EvaluateExpressionPart(string Source) + { + this.RawSource = Source; + + if (Source.StartsWith("{") && Source.EndsWith("}")) + Source = Source.Substring(1, Source.Length - 2); + + if (Source[0] == '~') + { + this.ErrorsAllowed = true; + this.Source = Source.Substring(1); + } + else + { + this.ErrorsAllowed = false; + this.Source = Source; + } + try + { + this._Expression = Spring.Expressions.Expression.Parse(this.Source); + + } + catch (RecognitionException ex) + { + this._ExpressionParseException = ex; + } + } + object IExpressionPart.Evaluate(object ExpressionContext, System.Collections.IDictionary Variables) + { + if (this._ExpressionParseException == null) + { + return this._Expression.GetValue(ExpressionContext, Variables); + } + throw this._ExpressionParseException; + } + + } +} diff --git a/Disco.BI/BI/Expressions/Expression.cs b/Disco.BI/BI/Expressions/Expression.cs index 67960977..10b57c98 100644 --- a/Disco.BI/BI/Expressions/Expression.cs +++ b/Disco.BI/BI/Expressions/Expression.cs @@ -1,259 +1,259 @@ -using Disco.Data.Repository; -using Disco.Models.BI.DocumentTemplates; -using Disco.Models.Repository; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Text; -using Disco.Models.BI.Expressions; - -namespace Disco.BI.Expressions -{ - public sealed class Expression : System.Collections.Generic.List - { - public string Name { get; private set; } - public string Source { get; private set; } - public bool IsDynamic { get; private set; } - public int Ordinal { get; private set; } - - private Expression(string Name, string Source, int Ordinal) - { - this.Name = Name; - this.Source = Source; - this.Ordinal = Ordinal; - } - - public static void InitializeExpressions() - { - Spring.Core.TypeResolution.TypeRegistry.RegisterType("DataExt", typeof(Extensions.DataExt)); - Spring.Core.TypeResolution.TypeRegistry.RegisterType("UserExt", typeof(Extensions.UserExt)); - Spring.Core.TypeResolution.TypeRegistry.RegisterType("DeviceExt", typeof(Extensions.DeviceExt)); - Spring.Core.TypeResolution.TypeRegistry.RegisterType("ImageExt", typeof(Extensions.ImageExt)); - } - - public T EvaluateFirst(object ExpressionContext, System.Collections.IDictionary Variables) - { - T result = default(T); - if (this.Count > 0) - { - try - { - object expressionResult = this[0].Evaluate(ExpressionContext, Variables); - if (expressionResult != null) - { - if (expressionResult is T) - { - result = (T)expressionResult; - } - else - { - throw new InvalidOperationException("Expression returned an invalid type"); - } - } - } - catch (System.Exception ex) - { - throw new InvalidOperationException("Expression evaluation resulted in an error", ex); - } - } - - return result; - } - - public Tuple Evaluate(object ExpressionContext, System.Collections.IDictionary Variables) - { - System.Text.StringBuilder resultValue = new System.Text.StringBuilder(); - object resultObject = null; - bool resultError = false; - foreach (var expressionPart in this) - { - try - { - object partValue = expressionPart.Evaluate(ExpressionContext, Variables); - if (partValue != null) - { - // Check for Result Objects - if (partValue is IImageExpressionResult) - resultObject = partValue; - else - resultValue.Append(partValue.ToString()); - } - } - catch (System.Exception ex) - { - if (!expressionPart.ErrorsAllowed) - { - resultValue.Append("## ERROR # "); - resultValue.Append(ex.Message); - resultValue.Append(" ##"); - resultError = true; - } - } - } - return new Tuple(resultValue.ToString(), resultError, resultObject); - } - public static Expression TokenizeSingleDynamic(string Name, string ExpressionSource, int Ordinal) - { - Expression e = new Expression(Name, ExpressionSource, Ordinal); - if (ExpressionSource != null && !string.IsNullOrWhiteSpace(ExpressionSource)) - e.Add(new EvaluateExpressionPart(ExpressionSource)); - e.IsDynamic = true; - return e; - } - public static Expression Tokenize(string Name, string ExpressionSource, int Ordinal) - { - Expression e = new Expression(Name, ExpressionSource, Ordinal); - if (!ExpressionSource.Contains("{") || !ExpressionSource.Contains("}")) - { - e.Add(new TextExpressionPart(ExpressionSource)); - } - else - { - System.Text.StringBuilder token = new System.Text.StringBuilder(); - bool tokenEval = false; - int tokenEvalDepth = 0; - foreach (char c in ExpressionSource) - { - switch (c) - { - case '{': - { - if (!tokenEval) - { - if (token.Length > 0) - { - e.Add(new TextExpressionPart(token.ToString())); - token = new System.Text.StringBuilder(); - } - tokenEval = true; - tokenEvalDepth = 0; - } - tokenEvalDepth++; - token.Append(c); - break; - } - case '}': - { - token.Append(c); - if (tokenEval) - { - tokenEvalDepth--; - if (tokenEvalDepth <= 0) - { - if (token.Length != 2 && (token.Length != 3 || token[1] != '@')) - { - e.Add(new EvaluateExpressionPart(token.ToString())); - e.IsDynamic = true; - token = new System.Text.StringBuilder(); - } - tokenEval = false; - } - } - break; - } - default: - { - token.Append(c); - break; - } - } - } - if (token.Length > 0) - { - e.Add(new TextExpressionPart(token.ToString())); - } - } - return e; - } - - public static IDictionary StandardVariables(DocumentTemplate AttachmentType, DiscoDataContext DataContext, User User, System.DateTime TimeStamp, DocumentState DocumentState) - { - return new Hashtable - { - - { - "DataContext", - DataContext - }, - - { - "User", - User - }, - - { - "TimeStamp", - TimeStamp - }, - - { - "AttachmentType", - AttachmentType - }, - - { - "State", - DocumentState - } - }; - } - public static Dictionary StandardVariableTypes() - { - return new Dictionary - { - - { - "#DataContext", - typeof(DiscoDataContext).AssemblyQualifiedName - }, - - { - "#User", - typeof(User).AssemblyQualifiedName - }, - - { - "#TimeStamp", - typeof(System.DateTime).AssemblyQualifiedName - }, - - { - "#AttachmentType", - typeof(DocumentTemplate).AssemblyQualifiedName - }, - - { - "#State", - typeof(DocumentState).AssemblyQualifiedName - } - }; - } - public static Dictionary ExtensionLibraryTypes() - { - return new Dictionary - { - { - "DataExt", - typeof(Extensions.DataExt).AssemblyQualifiedName - }, - - { - "DeviceExt", - typeof(Extensions.DeviceExt).AssemblyQualifiedName - }, - - { - "ImageExt", - typeof(Extensions.ImageExt).AssemblyQualifiedName - }, - - { - "UserExt", - typeof(Extensions.UserExt).AssemblyQualifiedName - } - }; - } - - } -} +using Disco.Data.Repository; +using Disco.Models.BI.DocumentTemplates; +using Disco.Models.Repository; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Text; +using Disco.Models.BI.Expressions; + +namespace Disco.BI.Expressions +{ + public sealed class Expression : System.Collections.Generic.List + { + public string Name { get; private set; } + public string Source { get; private set; } + public bool IsDynamic { get; private set; } + public int Ordinal { get; private set; } + + private Expression(string Name, string Source, int Ordinal) + { + this.Name = Name; + this.Source = Source; + this.Ordinal = Ordinal; + } + + public static void InitializeExpressions() + { + Spring.Core.TypeResolution.TypeRegistry.RegisterType("DataExt", typeof(Extensions.DataExt)); + Spring.Core.TypeResolution.TypeRegistry.RegisterType("UserExt", typeof(Extensions.UserExt)); + Spring.Core.TypeResolution.TypeRegistry.RegisterType("DeviceExt", typeof(Extensions.DeviceExt)); + Spring.Core.TypeResolution.TypeRegistry.RegisterType("ImageExt", typeof(Extensions.ImageExt)); + } + + public T EvaluateFirst(object ExpressionContext, System.Collections.IDictionary Variables) + { + T result = default(T); + if (this.Count > 0) + { + try + { + object expressionResult = this[0].Evaluate(ExpressionContext, Variables); + if (expressionResult != null) + { + if (expressionResult is T) + { + result = (T)expressionResult; + } + else + { + throw new InvalidOperationException("Expression returned an invalid type"); + } + } + } + catch (System.Exception ex) + { + throw new InvalidOperationException("Expression evaluation resulted in an error", ex); + } + } + + return result; + } + + public Tuple Evaluate(object ExpressionContext, System.Collections.IDictionary Variables) + { + System.Text.StringBuilder resultValue = new System.Text.StringBuilder(); + object resultObject = null; + bool resultError = false; + foreach (var expressionPart in this) + { + try + { + object partValue = expressionPart.Evaluate(ExpressionContext, Variables); + if (partValue != null) + { + // Check for Result Objects + if (partValue is IImageExpressionResult) + resultObject = partValue; + else + resultValue.Append(partValue.ToString()); + } + } + catch (System.Exception ex) + { + if (!expressionPart.ErrorsAllowed) + { + resultValue.Append("## ERROR # "); + resultValue.Append(ex.Message); + resultValue.Append(" ##"); + resultError = true; + } + } + } + return new Tuple(resultValue.ToString(), resultError, resultObject); + } + public static Expression TokenizeSingleDynamic(string Name, string ExpressionSource, int Ordinal) + { + Expression e = new Expression(Name, ExpressionSource, Ordinal); + if (ExpressionSource != null && !string.IsNullOrWhiteSpace(ExpressionSource)) + e.Add(new EvaluateExpressionPart(ExpressionSource)); + e.IsDynamic = true; + return e; + } + public static Expression Tokenize(string Name, string ExpressionSource, int Ordinal) + { + Expression e = new Expression(Name, ExpressionSource, Ordinal); + if (!ExpressionSource.Contains("{") || !ExpressionSource.Contains("}")) + { + e.Add(new TextExpressionPart(ExpressionSource)); + } + else + { + System.Text.StringBuilder token = new System.Text.StringBuilder(); + bool tokenEval = false; + int tokenEvalDepth = 0; + foreach (char c in ExpressionSource) + { + switch (c) + { + case '{': + { + if (!tokenEval) + { + if (token.Length > 0) + { + e.Add(new TextExpressionPart(token.ToString())); + token = new System.Text.StringBuilder(); + } + tokenEval = true; + tokenEvalDepth = 0; + } + tokenEvalDepth++; + token.Append(c); + break; + } + case '}': + { + token.Append(c); + if (tokenEval) + { + tokenEvalDepth--; + if (tokenEvalDepth <= 0) + { + if (token.Length != 2 && (token.Length != 3 || token[1] != '@')) + { + e.Add(new EvaluateExpressionPart(token.ToString())); + e.IsDynamic = true; + token = new System.Text.StringBuilder(); + } + tokenEval = false; + } + } + break; + } + default: + { + token.Append(c); + break; + } + } + } + if (token.Length > 0) + { + e.Add(new TextExpressionPart(token.ToString())); + } + } + return e; + } + + public static IDictionary StandardVariables(DocumentTemplate AttachmentType, DiscoDataContext DataContext, User User, System.DateTime TimeStamp, DocumentState DocumentState) + { + return new Hashtable + { + + { + "DataContext", + DataContext + }, + + { + "User", + User + }, + + { + "TimeStamp", + TimeStamp + }, + + { + "AttachmentType", + AttachmentType + }, + + { + "State", + DocumentState + } + }; + } + public static Dictionary StandardVariableTypes() + { + return new Dictionary + { + + { + "#DataContext", + typeof(DiscoDataContext).AssemblyQualifiedName + }, + + { + "#User", + typeof(User).AssemblyQualifiedName + }, + + { + "#TimeStamp", + typeof(System.DateTime).AssemblyQualifiedName + }, + + { + "#AttachmentType", + typeof(DocumentTemplate).AssemblyQualifiedName + }, + + { + "#State", + typeof(DocumentState).AssemblyQualifiedName + } + }; + } + public static Dictionary ExtensionLibraryTypes() + { + return new Dictionary + { + { + "DataExt", + typeof(Extensions.DataExt).AssemblyQualifiedName + }, + + { + "DeviceExt", + typeof(Extensions.DeviceExt).AssemblyQualifiedName + }, + + { + "ImageExt", + typeof(Extensions.ImageExt).AssemblyQualifiedName + }, + + { + "UserExt", + typeof(Extensions.UserExt).AssemblyQualifiedName + } + }; + } + + } +} diff --git a/Disco.BI/BI/Expressions/ExpressionCache.cs b/Disco.BI/BI/Expressions/ExpressionCache.cs index 8f433689..4e4143c5 100644 --- a/Disco.BI/BI/Expressions/ExpressionCache.cs +++ b/Disco.BI/BI/Expressions/ExpressionCache.cs @@ -1,103 +1,103 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections.Concurrent; - -namespace Disco.BI.Expressions -{ - public static class ExpressionCache - { - private static ConcurrentDictionary> _Cache = new ConcurrentDictionary>(); - - public delegate Expression CreateValueDelegate(); - - public static ConcurrentDictionary GetModule(string Module, bool Create = false) - { - ConcurrentDictionary moduleCache; - if (_Cache.TryGetValue(Module, out moduleCache)) - return moduleCache; - else - { - if (Create) - { - moduleCache = new ConcurrentDictionary(); - _Cache.TryAdd(Module, moduleCache); - return moduleCache; - } - else - return null; - } - } - private static Expression GetModuleValue(string Module, string Key, CreateValueDelegate CreateValue) - { - ConcurrentDictionary moduleCache = GetModule(Module, (CreateValue != null)); - if (moduleCache != null) - { - Expression expression; - if (moduleCache.TryGetValue(Key, out expression)) - { - return expression; - } - if (CreateValue != null) - { - expression = CreateValue(); - Expression oldExpression; - if (moduleCache.TryGetValue(Key, out oldExpression)) - moduleCache.TryUpdate(Key, expression, oldExpression); - else - moduleCache.TryAdd(Key, expression); - return expression; - } - } - return null; - } - - public static Expression GetValue(string Module, string Key, CreateValueDelegate CreateValue) - { - return GetModuleValue(Module, Key, CreateValue); - } - - public static Expression GetValue(string Module, string Key) - { - return GetModuleValue(Module, Key, null); - } - - public static bool InvalidModule(string Module) - { - ConcurrentDictionary moduleCache; - return _Cache.TryRemove(Module, out moduleCache); - } - - public static bool InvalidateKey(string Module, string Key) - { - Expression expression; - ConcurrentDictionary moduleCache = GetModule(Module, false); - if (moduleCache != null) - { - bool removeResult = moduleCache.TryRemove(Key, out expression); - if (moduleCache.Count == 0) - InvalidModule(Module); - return removeResult; - } - else - return false; - } - - public static bool SetValue(string Module, string Key, Expression Expression) - { - ConcurrentDictionary moduleCache = GetModule(Module, true); - - if (moduleCache.ContainsKey(Key)) - { - Expression oldExpression; - if (moduleCache.TryGetValue(Key, out oldExpression)) - { - return moduleCache.TryUpdate(Key, Expression, oldExpression); - } - } - return moduleCache.TryAdd(Key, Expression); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections.Concurrent; + +namespace Disco.BI.Expressions +{ + public static class ExpressionCache + { + private static ConcurrentDictionary> _Cache = new ConcurrentDictionary>(); + + public delegate Expression CreateValueDelegate(); + + public static ConcurrentDictionary GetModule(string Module, bool Create = false) + { + ConcurrentDictionary moduleCache; + if (_Cache.TryGetValue(Module, out moduleCache)) + return moduleCache; + else + { + if (Create) + { + moduleCache = new ConcurrentDictionary(); + _Cache.TryAdd(Module, moduleCache); + return moduleCache; + } + else + return null; + } + } + private static Expression GetModuleValue(string Module, string Key, CreateValueDelegate CreateValue) + { + ConcurrentDictionary moduleCache = GetModule(Module, (CreateValue != null)); + if (moduleCache != null) + { + Expression expression; + if (moduleCache.TryGetValue(Key, out expression)) + { + return expression; + } + if (CreateValue != null) + { + expression = CreateValue(); + Expression oldExpression; + if (moduleCache.TryGetValue(Key, out oldExpression)) + moduleCache.TryUpdate(Key, expression, oldExpression); + else + moduleCache.TryAdd(Key, expression); + return expression; + } + } + return null; + } + + public static Expression GetValue(string Module, string Key, CreateValueDelegate CreateValue) + { + return GetModuleValue(Module, Key, CreateValue); + } + + public static Expression GetValue(string Module, string Key) + { + return GetModuleValue(Module, Key, null); + } + + public static bool InvalidModule(string Module) + { + ConcurrentDictionary moduleCache; + return _Cache.TryRemove(Module, out moduleCache); + } + + public static bool InvalidateKey(string Module, string Key) + { + Expression expression; + ConcurrentDictionary moduleCache = GetModule(Module, false); + if (moduleCache != null) + { + bool removeResult = moduleCache.TryRemove(Key, out expression); + if (moduleCache.Count == 0) + InvalidModule(Module); + return removeResult; + } + else + return false; + } + + public static bool SetValue(string Module, string Key, Expression Expression) + { + ConcurrentDictionary moduleCache = GetModule(Module, true); + + if (moduleCache.ContainsKey(Key)) + { + Expression oldExpression; + if (moduleCache.TryGetValue(Key, out oldExpression)) + { + return moduleCache.TryUpdate(Key, Expression, oldExpression); + } + } + return moduleCache.TryAdd(Key, Expression); + } + + } +} diff --git a/Disco.BI/BI/Expressions/ExpressionCachePreloadTask.cs b/Disco.BI/BI/Expressions/ExpressionCachePreloadTask.cs index c9291837..9bb5ab55 100644 --- a/Disco.BI/BI/Expressions/ExpressionCachePreloadTask.cs +++ b/Disco.BI/BI/Expressions/ExpressionCachePreloadTask.cs @@ -1,43 +1,43 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Services.Tasks; -using Disco.Data.Repository; -using Quartz; -using Disco.BI.Extensions; -using System.Diagnostics; - -namespace Disco.BI.Expressions -{ - public class ExpressionCachePreloadTask : ScheduledTask - { - - public override string TaskName { get { return "Expression Cache - Preload Task"; } } - public override bool SingleInstanceTask { get { return true; } } - public override bool CancelInitiallySupported { get { return false; } } - - public override void InitalizeScheduledTask(DiscoDataContext dbContext) - { - // Run in Background 1 Second after Scheduled (on App Startup) - TriggerBuilder triggerBuilder = TriggerBuilder.Create().StartAt(new DateTimeOffset(DateTime.Now).AddSeconds(5)); - - this.ScheduleTask(triggerBuilder); - } - - protected override void ExecuteTask() - { - // Cache Document Template Filter Expressions - using (DiscoDataContext dbContext = new DiscoDataContext()) - { - foreach (var documentTemplate in dbContext.DocumentTemplates.Where(dt => dt.FilterExpression != null && dt.FilterExpression != string.Empty)) - { - if (!string.IsNullOrWhiteSpace(documentTemplate.FilterExpression)) - documentTemplate.FilterExpressionFromCache(); - } - } - - - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Services.Tasks; +using Disco.Data.Repository; +using Quartz; +using Disco.BI.Extensions; +using System.Diagnostics; + +namespace Disco.BI.Expressions +{ + public class ExpressionCachePreloadTask : ScheduledTask + { + + public override string TaskName { get { return "Expression Cache - Preload Task"; } } + public override bool SingleInstanceTask { get { return true; } } + public override bool CancelInitiallySupported { get { return false; } } + + public override void InitalizeScheduledTask(DiscoDataContext dbContext) + { + // Run in Background 1 Second after Scheduled (on App Startup) + TriggerBuilder triggerBuilder = TriggerBuilder.Create().StartAt(new DateTimeOffset(DateTime.Now).AddSeconds(5)); + + this.ScheduleTask(triggerBuilder); + } + + protected override void ExecuteTask() + { + // Cache Document Template Filter Expressions + using (DiscoDataContext dbContext = new DiscoDataContext()) + { + foreach (var documentTemplate in dbContext.DocumentTemplates.Where(dt => dt.FilterExpression != null && dt.FilterExpression != string.Empty)) + { + if (!string.IsNullOrWhiteSpace(documentTemplate.FilterExpression)) + documentTemplate.FilterExpressionFromCache(); + } + } + + + } + } +} diff --git a/Disco.BI/BI/Expressions/ExpressionTypeDescriptor.cs b/Disco.BI/BI/Expressions/ExpressionTypeDescriptor.cs index bec6dc14..5b4bee1a 100644 --- a/Disco.BI/BI/Expressions/ExpressionTypeDescriptor.cs +++ b/Disco.BI/BI/Expressions/ExpressionTypeDescriptor.cs @@ -1,58 +1,58 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; - -namespace Disco.BI.Expressions -{ - public class ExpressionTypeDescriptor - { - public string ExpressionType { get; set; } - public string Name { get; set; } - public List Members { get; set; } - - public static ExpressionTypeDescriptor Build(System.Type t, bool StaticDeclaredMembersOnly = true) - { - ExpressionTypeDescriptor i = new ExpressionTypeDescriptor - { - ExpressionType = t.AssemblyQualifiedName, - Name = t.Name - }; - i.Members = new System.Collections.Generic.List(); - - System.Reflection.MemberInfo[] members; - if (StaticDeclaredMembersOnly) - members = t.GetMembers(BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly); - else - members = t.GetMembers(BindingFlags.Public | BindingFlags.Instance); - - for (int j = 0; j < members.Length; j++) - { - System.Reflection.MemberInfo member = members[j]; - if (member is System.Reflection.PropertyInfo) - { - System.Reflection.PropertyInfo pi = (System.Reflection.PropertyInfo)member; - if (!pi.IsSpecialName && pi.CanRead) - { - i.Members.Add(ExpressionTypeMemberDescriptor.Build(pi)); - } - } - if (member is System.Reflection.MethodInfo) - { - System.Reflection.MethodInfo mi2 = (System.Reflection.MethodInfo)member; - if (!mi2.IsSpecialName) - { - i.Members.Add(ExpressionTypeMemberDescriptor.Build(mi2)); - } - } - } - i.Members = ( - from mi in i.Members - orderby mi.Name - select mi).ToList(); - return i; - } - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; + +namespace Disco.BI.Expressions +{ + public class ExpressionTypeDescriptor + { + public string ExpressionType { get; set; } + public string Name { get; set; } + public List Members { get; set; } + + public static ExpressionTypeDescriptor Build(System.Type t, bool StaticDeclaredMembersOnly = true) + { + ExpressionTypeDescriptor i = new ExpressionTypeDescriptor + { + ExpressionType = t.AssemblyQualifiedName, + Name = t.Name + }; + i.Members = new System.Collections.Generic.List(); + + System.Reflection.MemberInfo[] members; + if (StaticDeclaredMembersOnly) + members = t.GetMembers(BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly); + else + members = t.GetMembers(BindingFlags.Public | BindingFlags.Instance); + + for (int j = 0; j < members.Length; j++) + { + System.Reflection.MemberInfo member = members[j]; + if (member is System.Reflection.PropertyInfo) + { + System.Reflection.PropertyInfo pi = (System.Reflection.PropertyInfo)member; + if (!pi.IsSpecialName && pi.CanRead) + { + i.Members.Add(ExpressionTypeMemberDescriptor.Build(pi)); + } + } + if (member is System.Reflection.MethodInfo) + { + System.Reflection.MethodInfo mi2 = (System.Reflection.MethodInfo)member; + if (!mi2.IsSpecialName) + { + i.Members.Add(ExpressionTypeMemberDescriptor.Build(mi2)); + } + } + } + i.Members = ( + from mi in i.Members + orderby mi.Name + select mi).ToList(); + return i; + } + } +} diff --git a/Disco.BI/BI/Expressions/ExpressionTypeMemberDescriptor.cs b/Disco.BI/BI/Expressions/ExpressionTypeMemberDescriptor.cs index 433c7312..f23efbed 100644 --- a/Disco.BI/BI/Expressions/ExpressionTypeMemberDescriptor.cs +++ b/Disco.BI/BI/Expressions/ExpressionTypeMemberDescriptor.cs @@ -1,61 +1,61 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; - -namespace Disco.BI.Expressions -{ - public class ExpressionTypeMemberDescriptor - { - public const string FunctionKind = "function"; - public const string PropertyKind = "property"; - public const string ParameterKind = "parameter"; - - public string Kind {get;set;} - public string Name {get;set;} - public string ReturnType {get;set;} - public string ReturnExpressionType{get;set;} - public List Parameters{get;set;} - - public static ExpressionTypeMemberDescriptor Build(System.Reflection.MethodInfo m) - { - ExpressionTypeMemberDescriptor md = new ExpressionTypeMemberDescriptor - { - Kind = "function", - Name = m.Name, - ReturnType = m.ReturnType.Name, - ReturnExpressionType = m.ReturnType.AssemblyQualifiedName - }; - md.Parameters = ( - from mdp in m.GetParameters() - select ExpressionTypeMemberDescriptor.Build(mdp)).ToList(); - return md; - } - public static ExpressionTypeMemberDescriptor Build(System.Reflection.PropertyInfo p) - { - ExpressionTypeMemberDescriptor md = new ExpressionTypeMemberDescriptor - { - Kind = "property", - Name = p.Name, - ReturnType = p.PropertyType.Name, - ReturnExpressionType = p.PropertyType.AssemblyQualifiedName - }; - md.Parameters = ( - from mdp in p.GetIndexParameters() - select ExpressionTypeMemberDescriptor.Build(mdp)).ToList(); - return md; - } - public static ExpressionTypeMemberDescriptor Build(System.Reflection.ParameterInfo pi) - { - return new ExpressionTypeMemberDescriptor - { - Kind = "parameter", - Name = pi.Name, - ReturnType = pi.ParameterType.Name, - ReturnExpressionType = pi.ParameterType.AssemblyQualifiedName - }; - } - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; + +namespace Disco.BI.Expressions +{ + public class ExpressionTypeMemberDescriptor + { + public const string FunctionKind = "function"; + public const string PropertyKind = "property"; + public const string ParameterKind = "parameter"; + + public string Kind {get;set;} + public string Name {get;set;} + public string ReturnType {get;set;} + public string ReturnExpressionType{get;set;} + public List Parameters{get;set;} + + public static ExpressionTypeMemberDescriptor Build(System.Reflection.MethodInfo m) + { + ExpressionTypeMemberDescriptor md = new ExpressionTypeMemberDescriptor + { + Kind = "function", + Name = m.Name, + ReturnType = m.ReturnType.Name, + ReturnExpressionType = m.ReturnType.AssemblyQualifiedName + }; + md.Parameters = ( + from mdp in m.GetParameters() + select ExpressionTypeMemberDescriptor.Build(mdp)).ToList(); + return md; + } + public static ExpressionTypeMemberDescriptor Build(System.Reflection.PropertyInfo p) + { + ExpressionTypeMemberDescriptor md = new ExpressionTypeMemberDescriptor + { + Kind = "property", + Name = p.Name, + ReturnType = p.PropertyType.Name, + ReturnExpressionType = p.PropertyType.AssemblyQualifiedName + }; + md.Parameters = ( + from mdp in p.GetIndexParameters() + select ExpressionTypeMemberDescriptor.Build(mdp)).ToList(); + return md; + } + public static ExpressionTypeMemberDescriptor Build(System.Reflection.ParameterInfo pi) + { + return new ExpressionTypeMemberDescriptor + { + Kind = "parameter", + Name = pi.Name, + ReturnType = pi.ParameterType.Name, + ReturnExpressionType = pi.ParameterType.AssemblyQualifiedName + }; + } + } +} diff --git a/Disco.BI/BI/Expressions/Extensions/DataExt.cs b/Disco.BI/BI/Expressions/Extensions/DataExt.cs index d7efbd1d..4fbf0d4e 100644 --- a/Disco.BI/BI/Expressions/Extensions/DataExt.cs +++ b/Disco.BI/BI/Expressions/Extensions/DataExt.cs @@ -1,176 +1,176 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using System.Data.Odbc; - -namespace Disco.BI.Expressions.Extensions -{ - public static class DataExt - { - #region SqlClient - - private static SqlConnection BuildSqlConnection(string Server, string Database, string Username, string Password) - { - SqlConnectionStringBuilder dbConnectionStringBuilder = new SqlConnectionStringBuilder(); - dbConnectionStringBuilder.ApplicationName = "Disco"; - dbConnectionStringBuilder.DataSource = Server; - dbConnectionStringBuilder.InitialCatalog = Database; - dbConnectionStringBuilder.MultipleActiveResultSets = true; - dbConnectionStringBuilder.PersistSecurityInfo = true; - if (Username == null || Password == null) - dbConnectionStringBuilder.IntegratedSecurity = true; - else - { - dbConnectionStringBuilder.UserID = Username; - dbConnectionStringBuilder.Password = Password; - } - - return new SqlConnection(dbConnectionStringBuilder.ConnectionString); - } - private static void BuildSqlParameters(SqlCommand dbCommand, Hashtable SqlParameters) - { - if (SqlParameters != null) - { - foreach (var sqlParameterKey in SqlParameters.Keys) - { - string key = sqlParameterKey.ToString(); - if (!key.StartsWith("@")) - key = string.Concat("@", key); - dbCommand.Parameters.AddWithValue(key, SqlParameters[sqlParameterKey]); - } - } - } - - public static DataTable QuerySqlDatabase(string Server, string Database, string Username, string Password, string SqlQuery, Hashtable SqlParameters) - { - using (SqlConnection dbConnection = BuildSqlConnection(Server, Database, Username, Password)) - { - using (SqlCommand dbCommand = new SqlCommand(SqlQuery, dbConnection)) - { - BuildSqlParameters(dbCommand, SqlParameters); - using (SqlDataAdapter dbAdapter = new SqlDataAdapter(dbCommand)) - { - var dbTable = new DataTable(); - dbAdapter.Fill(dbTable); - return dbTable; - } - } - } - } - public static DataTable QuerySqlDatabase(string Server, string Database, string SqlQuery, Hashtable SqlParameters) - { - return QuerySqlDatabase(Server, Database, null, null, SqlQuery, SqlParameters); - } - public static DataTable QuerySqlDatabase(string Server, string Database, string SqlQuery) - { - return QuerySqlDatabase(Server, Database, null, null, SqlQuery, null); - } - - public static object QuerySqlDatabaseScalar(string Server, string Database, string Username, string Password, string SqlQuery, Hashtable SqlParameters) - { - using (SqlConnection dbConnection = BuildSqlConnection(Server, Database, Username, Password)) - { - using (SqlCommand dbCommand = new SqlCommand(SqlQuery, dbConnection)) - { - BuildSqlParameters(dbCommand, SqlParameters); - try - { - dbConnection.Open(); - return dbCommand.ExecuteScalar(); - } - catch (Exception) - { - throw; - } - finally - { - dbConnection.Close(); - } - } - } - } - public static object QuerySqlDatabaseScalar(string Server, string Database, string SqlQuery, Hashtable SqlParameters) - { - return QuerySqlDatabaseScalar(Server, Database, null, null, SqlQuery, SqlParameters); - } - public static object QuerySqlDatabaseScalar(string Server, string Database, string SqlQuery) - { - return QuerySqlDatabaseScalar(Server, Database, null, null, SqlQuery, null); - } - - #endregion - - #region ODBC - - private static OdbcConnection BuildOdbcConnection(string ConnectionString) - { - return new OdbcConnection(ConnectionString); - } - private static void BuildOdbcParameters(OdbcCommand dbCommand, Hashtable OdbcParameters) - { - if (OdbcParameters != null) - { - foreach (var odbcParameterKey in OdbcParameters.Keys) - { - string key = odbcParameterKey.ToString(); - dbCommand.Parameters.AddWithValue(key, OdbcParameters[odbcParameterKey]); - } - } - } - - public static DataTable QueryOdbcDatabase(string ConnectionString, string OdbcQuery, Hashtable OdbcParameters) - { - using (OdbcConnection dbConnection = BuildOdbcConnection(ConnectionString)) - { - using (OdbcCommand dbCommand = new OdbcCommand(OdbcQuery, dbConnection)) - { - BuildOdbcParameters(dbCommand, OdbcParameters); - using (OdbcDataAdapter dbAdapter = new OdbcDataAdapter(dbCommand)) - { - var dbTable = new DataTable(); - dbAdapter.Fill(dbTable); - return dbTable; - } - } - } - } - public static DataTable QueryOdbcDatabase(string ConnectionString, string OdbcQuery) - { - return QueryOdbcDatabase(ConnectionString, OdbcQuery, null); - } - - public static object QueryOdbcDatabaseScalar(string ConnectionString, string OdbcQuery, Hashtable OdbcParameters) - { - using (OdbcConnection dbConnection = BuildOdbcConnection(ConnectionString)) - { - using (OdbcCommand dbCommand = new OdbcCommand(OdbcQuery, dbConnection)) - { - BuildOdbcParameters(dbCommand, OdbcParameters); - try - { - dbConnection.Open(); - return dbCommand.ExecuteScalar(); - } - catch (Exception) - { - throw; - } - finally - { - dbConnection.Close(); - } - } - } - } - public static object QueryOdbcDatabaseScalar(string ConnectionString, string OdbcQuery) - { - return QueryOdbcDatabaseScalar(ConnectionString, OdbcQuery, null); - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; +using System.Data.SqlClient; +using System.Collections; +using System.Data.Odbc; + +namespace Disco.BI.Expressions.Extensions +{ + public static class DataExt + { + #region SqlClient + + private static SqlConnection BuildSqlConnection(string Server, string Database, string Username, string Password) + { + SqlConnectionStringBuilder dbConnectionStringBuilder = new SqlConnectionStringBuilder(); + dbConnectionStringBuilder.ApplicationName = "Disco"; + dbConnectionStringBuilder.DataSource = Server; + dbConnectionStringBuilder.InitialCatalog = Database; + dbConnectionStringBuilder.MultipleActiveResultSets = true; + dbConnectionStringBuilder.PersistSecurityInfo = true; + if (Username == null || Password == null) + dbConnectionStringBuilder.IntegratedSecurity = true; + else + { + dbConnectionStringBuilder.UserID = Username; + dbConnectionStringBuilder.Password = Password; + } + + return new SqlConnection(dbConnectionStringBuilder.ConnectionString); + } + private static void BuildSqlParameters(SqlCommand dbCommand, Hashtable SqlParameters) + { + if (SqlParameters != null) + { + foreach (var sqlParameterKey in SqlParameters.Keys) + { + string key = sqlParameterKey.ToString(); + if (!key.StartsWith("@")) + key = string.Concat("@", key); + dbCommand.Parameters.AddWithValue(key, SqlParameters[sqlParameterKey]); + } + } + } + + public static DataTable QuerySqlDatabase(string Server, string Database, string Username, string Password, string SqlQuery, Hashtable SqlParameters) + { + using (SqlConnection dbConnection = BuildSqlConnection(Server, Database, Username, Password)) + { + using (SqlCommand dbCommand = new SqlCommand(SqlQuery, dbConnection)) + { + BuildSqlParameters(dbCommand, SqlParameters); + using (SqlDataAdapter dbAdapter = new SqlDataAdapter(dbCommand)) + { + var dbTable = new DataTable(); + dbAdapter.Fill(dbTable); + return dbTable; + } + } + } + } + public static DataTable QuerySqlDatabase(string Server, string Database, string SqlQuery, Hashtable SqlParameters) + { + return QuerySqlDatabase(Server, Database, null, null, SqlQuery, SqlParameters); + } + public static DataTable QuerySqlDatabase(string Server, string Database, string SqlQuery) + { + return QuerySqlDatabase(Server, Database, null, null, SqlQuery, null); + } + + public static object QuerySqlDatabaseScalar(string Server, string Database, string Username, string Password, string SqlQuery, Hashtable SqlParameters) + { + using (SqlConnection dbConnection = BuildSqlConnection(Server, Database, Username, Password)) + { + using (SqlCommand dbCommand = new SqlCommand(SqlQuery, dbConnection)) + { + BuildSqlParameters(dbCommand, SqlParameters); + try + { + dbConnection.Open(); + return dbCommand.ExecuteScalar(); + } + catch (Exception) + { + throw; + } + finally + { + dbConnection.Close(); + } + } + } + } + public static object QuerySqlDatabaseScalar(string Server, string Database, string SqlQuery, Hashtable SqlParameters) + { + return QuerySqlDatabaseScalar(Server, Database, null, null, SqlQuery, SqlParameters); + } + public static object QuerySqlDatabaseScalar(string Server, string Database, string SqlQuery) + { + return QuerySqlDatabaseScalar(Server, Database, null, null, SqlQuery, null); + } + + #endregion + + #region ODBC + + private static OdbcConnection BuildOdbcConnection(string ConnectionString) + { + return new OdbcConnection(ConnectionString); + } + private static void BuildOdbcParameters(OdbcCommand dbCommand, Hashtable OdbcParameters) + { + if (OdbcParameters != null) + { + foreach (var odbcParameterKey in OdbcParameters.Keys) + { + string key = odbcParameterKey.ToString(); + dbCommand.Parameters.AddWithValue(key, OdbcParameters[odbcParameterKey]); + } + } + } + + public static DataTable QueryOdbcDatabase(string ConnectionString, string OdbcQuery, Hashtable OdbcParameters) + { + using (OdbcConnection dbConnection = BuildOdbcConnection(ConnectionString)) + { + using (OdbcCommand dbCommand = new OdbcCommand(OdbcQuery, dbConnection)) + { + BuildOdbcParameters(dbCommand, OdbcParameters); + using (OdbcDataAdapter dbAdapter = new OdbcDataAdapter(dbCommand)) + { + var dbTable = new DataTable(); + dbAdapter.Fill(dbTable); + return dbTable; + } + } + } + } + public static DataTable QueryOdbcDatabase(string ConnectionString, string OdbcQuery) + { + return QueryOdbcDatabase(ConnectionString, OdbcQuery, null); + } + + public static object QueryOdbcDatabaseScalar(string ConnectionString, string OdbcQuery, Hashtable OdbcParameters) + { + using (OdbcConnection dbConnection = BuildOdbcConnection(ConnectionString)) + { + using (OdbcCommand dbCommand = new OdbcCommand(OdbcQuery, dbConnection)) + { + BuildOdbcParameters(dbCommand, OdbcParameters); + try + { + dbConnection.Open(); + return dbCommand.ExecuteScalar(); + } + catch (Exception) + { + throw; + } + finally + { + dbConnection.Close(); + } + } + } + } + public static object QueryOdbcDatabaseScalar(string ConnectionString, string OdbcQuery) + { + return QueryOdbcDatabaseScalar(ConnectionString, OdbcQuery, null); + } + + #endregion + } +} diff --git a/Disco.BI/BI/Expressions/Extensions/DeviceExt.cs b/Disco.BI/BI/Expressions/Extensions/DeviceExt.cs index 9d603aa8..d7476e9b 100644 --- a/Disco.BI/BI/Expressions/Extensions/DeviceExt.cs +++ b/Disco.BI/BI/Expressions/Extensions/DeviceExt.cs @@ -1,51 +1,51 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.BI.Extensions; -using Disco.BI.Interop.ActiveDirectory; - -namespace Disco.BI.Expressions.Extensions -{ - public static class DeviceExt - { - public static object GetActiveDirectoryObjectValue(Device Device, string PropertyName, int Index = 0) - { - var adMachineAccount = Device.ActiveDirectoryAccount(PropertyName); - if (adMachineAccount != null) - return adMachineAccount.GetPropertyValue(PropertyName, Index); - else - return null; - } - - public static string GetActiveDirectoryStringValue(Device Device, string PropertyName, int Index = 0) - { - var objectValue = GetActiveDirectoryObjectValue(Device, PropertyName, Index); - string stringValue = objectValue as string; - if (stringValue == null && objectValue != null) - stringValue = objectValue.ToString(); - return stringValue; - } - - public static int GetActiveDirectoryIntegerValue(Device Device, string PropertyName, int Index = 0) - { - var objectValue = GetActiveDirectoryObjectValue(Device, PropertyName, Index); - if (objectValue == null) - return default(int); - else - { - int intValue; - try - { - intValue = (int)Convert.ChangeType(objectValue, typeof(int)); - } - catch (Exception) - { - throw; - } - return intValue; - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.BI.Extensions; +using Disco.BI.Interop.ActiveDirectory; + +namespace Disco.BI.Expressions.Extensions +{ + public static class DeviceExt + { + public static object GetActiveDirectoryObjectValue(Device Device, string PropertyName, int Index = 0) + { + var adMachineAccount = Device.ActiveDirectoryAccount(PropertyName); + if (adMachineAccount != null) + return adMachineAccount.GetPropertyValue(PropertyName, Index); + else + return null; + } + + public static string GetActiveDirectoryStringValue(Device Device, string PropertyName, int Index = 0) + { + var objectValue = GetActiveDirectoryObjectValue(Device, PropertyName, Index); + string stringValue = objectValue as string; + if (stringValue == null && objectValue != null) + stringValue = objectValue.ToString(); + return stringValue; + } + + public static int GetActiveDirectoryIntegerValue(Device Device, string PropertyName, int Index = 0) + { + var objectValue = GetActiveDirectoryObjectValue(Device, PropertyName, Index); + if (objectValue == null) + return default(int); + else + { + int intValue; + try + { + intValue = (int)Convert.ChangeType(objectValue, typeof(int)); + } + catch (Exception) + { + throw; + } + return intValue; + } + } + } +} diff --git a/Disco.BI/BI/Expressions/Extensions/ImageExt.cs b/Disco.BI/BI/Expressions/Extensions/ImageExt.cs index 85914ad0..910a4df7 100644 --- a/Disco.BI/BI/Expressions/Extensions/ImageExt.cs +++ b/Disco.BI/BI/Expressions/Extensions/ImageExt.cs @@ -1,140 +1,140 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.BI.Expressions; -using Disco.BI.Expressions.Extensions.ImageResultImplementations; -using Disco.Models.Repository; -using Disco.BI.Extensions; -using Disco.Data.Repository; -using System.Collections; -using System.IO; -using System.Drawing; - -namespace Disco.BI.Expressions.Extensions -{ - public static class ImageExt - { - public static FileImageExpressionResult ImageFromFile(string AbsoluteFilePath) - { - return new FileImageExpressionResult(AbsoluteFilePath); - } - public static FileImageExpressionResult ImageFromDataStoreFile(string RelativeFilePath) - { - var configCache = new Disco.Data.Configuration.ConfigurationContext(null); - string DataStoreLocation = configCache.DataStoreLocation; - string AbsoluteFilePath = System.IO.Path.Combine(DataStoreLocation, RelativeFilePath); - return new FileImageExpressionResult(AbsoluteFilePath); - } - public static FileImageExpressionResult JobAttachmentFirstImage(Job Job, DiscoDataContext dbContext) - { - var attachment = Job.JobAttachments.FirstOrDefault(ja => ja.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)); - if (attachment != null) - { - var filename = attachment.RepositoryFilename(dbContext); - return new FileImageExpressionResult(filename); - } - else - return null; - } - public static FileImageExpressionResult JobAttachmentLastImage(Job Job, DiscoDataContext dbContext) - { - var attachment = Job.JobAttachments.LastOrDefault(ja => ja.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)); - if (attachment != null) - { - var filename = attachment.RepositoryFilename(dbContext); - return new FileImageExpressionResult(filename); - } - else - return null; - } - public static FileImageExpressionResult JobAttachmentImage(JobAttachment JobAttachment, DiscoDataContext dbContext) - { - if (JobAttachment == null) - throw new ArgumentNullException("JobAttachment"); - if (!JobAttachment.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)) - throw new ArgumentException("Invalid Image MimeType for Attachment"); - - var filename = JobAttachment.RepositoryFilename(dbContext); - return new FileImageExpressionResult(filename); - } - public static FileMontageImageExpressionResult JobAttachmentImageMontage(Job Job, DiscoDataContext dbContext) - { - if (Job == null) - throw new ArgumentNullException("Job"); - if (Job.JobAttachments == null) - throw new ArgumentException("Job.JobAttachments is null", "Job"); - - var attachments = Job.JobAttachments.Where(a => a.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)).ToList(); - - if (attachments.Count > 0) - { - var attachmentFilepaths = attachments.Select(a => a.RepositoryFilename(dbContext)).ToList(); - - return new FileMontageImageExpressionResult(attachmentFilepaths); - } - else - return null; - } - public static FileMontageImageExpressionResult JobAttachmentsImageMontage(ArrayList JobAttachments, DiscoDataContext dbContext) - { - if (JobAttachments == null) - throw new ArgumentNullException("JobAttachments"); - - var attachments = JobAttachments.Cast().Where(a => a.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)).ToList(); - - if (attachments.Count > 0) - { - var attachmentFilepaths = attachments.Select(a => a.RepositoryFilename(dbContext)).ToList(); - - return new FileMontageImageExpressionResult(attachmentFilepaths); - } - else - return null; - } - - public static BitmapImageExpressionResult ImageFromStream(Stream ImageStream) - { - if (ImageStream == null) - throw new ArgumentNullException("ImageStream"); - - return new BitmapImageExpressionResult(Bitmap.FromStream(ImageStream)); - } - public static BitmapImageExpressionResult ImageFromByteArray(byte[] ImageByteArray) - { - if (ImageByteArray == null) - throw new ArgumentNullException("ImageByteArray"); - - return new BitmapImageExpressionResult(Bitmap.FromStream(new MemoryStream(ImageByteArray))); - } - public static BitmapImageExpressionResult DeviceModelImage(DeviceModel DeviceModel) - { - if (DeviceModel == null) - throw new ArgumentNullException("DeviceModel"); - - using (Stream deviceModelImage = DeviceModel.Image()) - { - if (deviceModelImage == null) - return null; - else - return ImageFromStream(deviceModelImage); - } - //if (DeviceModel.Image == null || DeviceModel.Image.Length == 0) - // return null; - - //return ImageFromByteArray(DeviceModel.Image); - } - public static BitmapImageExpressionResult OrganisationLogo() - { - var configCache = new Disco.Data.Configuration.ConfigurationContext(null); - BitmapImageExpressionResult result; - using (var orgLogo = configCache.OrganisationLogo) - { - result = ImageFromStream(orgLogo); - } - result.LosslessFormat = true; - return result; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.BI.Expressions; +using Disco.BI.Expressions.Extensions.ImageResultImplementations; +using Disco.Models.Repository; +using Disco.BI.Extensions; +using Disco.Data.Repository; +using System.Collections; +using System.IO; +using System.Drawing; + +namespace Disco.BI.Expressions.Extensions +{ + public static class ImageExt + { + public static FileImageExpressionResult ImageFromFile(string AbsoluteFilePath) + { + return new FileImageExpressionResult(AbsoluteFilePath); + } + public static FileImageExpressionResult ImageFromDataStoreFile(string RelativeFilePath) + { + var configCache = new Disco.Data.Configuration.ConfigurationContext(null); + string DataStoreLocation = configCache.DataStoreLocation; + string AbsoluteFilePath = System.IO.Path.Combine(DataStoreLocation, RelativeFilePath); + return new FileImageExpressionResult(AbsoluteFilePath); + } + public static FileImageExpressionResult JobAttachmentFirstImage(Job Job, DiscoDataContext dbContext) + { + var attachment = Job.JobAttachments.FirstOrDefault(ja => ja.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)); + if (attachment != null) + { + var filename = attachment.RepositoryFilename(dbContext); + return new FileImageExpressionResult(filename); + } + else + return null; + } + public static FileImageExpressionResult JobAttachmentLastImage(Job Job, DiscoDataContext dbContext) + { + var attachment = Job.JobAttachments.LastOrDefault(ja => ja.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)); + if (attachment != null) + { + var filename = attachment.RepositoryFilename(dbContext); + return new FileImageExpressionResult(filename); + } + else + return null; + } + public static FileImageExpressionResult JobAttachmentImage(JobAttachment JobAttachment, DiscoDataContext dbContext) + { + if (JobAttachment == null) + throw new ArgumentNullException("JobAttachment"); + if (!JobAttachment.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)) + throw new ArgumentException("Invalid Image MimeType for Attachment"); + + var filename = JobAttachment.RepositoryFilename(dbContext); + return new FileImageExpressionResult(filename); + } + public static FileMontageImageExpressionResult JobAttachmentImageMontage(Job Job, DiscoDataContext dbContext) + { + if (Job == null) + throw new ArgumentNullException("Job"); + if (Job.JobAttachments == null) + throw new ArgumentException("Job.JobAttachments is null", "Job"); + + var attachments = Job.JobAttachments.Where(a => a.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)).ToList(); + + if (attachments.Count > 0) + { + var attachmentFilepaths = attachments.Select(a => a.RepositoryFilename(dbContext)).ToList(); + + return new FileMontageImageExpressionResult(attachmentFilepaths); + } + else + return null; + } + public static FileMontageImageExpressionResult JobAttachmentsImageMontage(ArrayList JobAttachments, DiscoDataContext dbContext) + { + if (JobAttachments == null) + throw new ArgumentNullException("JobAttachments"); + + var attachments = JobAttachments.Cast().Where(a => a.MimeType.StartsWith("image/", StringComparison.InvariantCultureIgnoreCase)).ToList(); + + if (attachments.Count > 0) + { + var attachmentFilepaths = attachments.Select(a => a.RepositoryFilename(dbContext)).ToList(); + + return new FileMontageImageExpressionResult(attachmentFilepaths); + } + else + return null; + } + + public static BitmapImageExpressionResult ImageFromStream(Stream ImageStream) + { + if (ImageStream == null) + throw new ArgumentNullException("ImageStream"); + + return new BitmapImageExpressionResult(Bitmap.FromStream(ImageStream)); + } + public static BitmapImageExpressionResult ImageFromByteArray(byte[] ImageByteArray) + { + if (ImageByteArray == null) + throw new ArgumentNullException("ImageByteArray"); + + return new BitmapImageExpressionResult(Bitmap.FromStream(new MemoryStream(ImageByteArray))); + } + public static BitmapImageExpressionResult DeviceModelImage(DeviceModel DeviceModel) + { + if (DeviceModel == null) + throw new ArgumentNullException("DeviceModel"); + + using (Stream deviceModelImage = DeviceModel.Image()) + { + if (deviceModelImage == null) + return null; + else + return ImageFromStream(deviceModelImage); + } + //if (DeviceModel.Image == null || DeviceModel.Image.Length == 0) + // return null; + + //return ImageFromByteArray(DeviceModel.Image); + } + public static BitmapImageExpressionResult OrganisationLogo() + { + var configCache = new Disco.Data.Configuration.ConfigurationContext(null); + BitmapImageExpressionResult result; + using (var orgLogo = configCache.OrganisationLogo) + { + result = ImageFromStream(orgLogo); + } + result.LosslessFormat = true; + return result; + } + + } +} diff --git a/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/BaseImageExpressionResult.cs b/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/BaseImageExpressionResult.cs index bd703af5..04922aed 100644 --- a/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/BaseImageExpressionResult.cs +++ b/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/BaseImageExpressionResult.cs @@ -1,70 +1,70 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.BI.Expressions; -using System.IO; -using System.Drawing; -using Disco.BI.Extensions; - -namespace Disco.BI.Expressions.Extensions.ImageResultImplementations -{ - public abstract class BaseImageExpressionResult : IImageExpressionResult - { - public byte Quality { get; set; } - public bool LosslessFormat { get; set; } - public bool ShowField { get; set; } - public string BackgroundColour { get; set; } - public bool BackgroundPreferTransparent { get; set; } - - public BaseImageExpressionResult() - { - this.LosslessFormat = false; - this.Quality = 90; - this.ShowField = false; - this.BackgroundPreferTransparent = true; - } - - public abstract Stream GetImage(int Width, int Height); - - protected Stream RenderImage(Image SourceImage, int Width, int Height) - { - if (SourceImage == null) - throw new ArgumentNullException("SourceImage"); - if (Width <= 0) - throw new ArgumentOutOfRangeException("Width", "Width must be > 0"); - if (Height <= 0) - throw new ArgumentOutOfRangeException("Height", "Height must be > 0"); - - Brush backgroundBrush = null; - if (!LosslessFormat || !BackgroundPreferTransparent) - { - if (string.IsNullOrEmpty(this.BackgroundColour)) - backgroundBrush = Brushes.White; - else - backgroundBrush = new SolidBrush(ColorTranslator.FromHtml(this.BackgroundColour)); - } - - using (Image resizedImage = SourceImage.ResizeImage(Width, Height, backgroundBrush)) - { - return OutputImage(resizedImage); - } - } - - protected Stream OutputImage(Image SourceImage) - { - MemoryStream imageStream = new MemoryStream(); - if (LosslessFormat) - { // Lossless Format - PNG - SourceImage.SavePng(imageStream); - } - else - { // Lossy Format - JPG - byte quality = Math.Min((byte)100, Math.Max((byte)1, this.Quality)); - SourceImage.SaveJpg(quality, imageStream); - } - imageStream.Position = 0; - return imageStream; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.BI.Expressions; +using System.IO; +using System.Drawing; +using Disco.BI.Extensions; + +namespace Disco.BI.Expressions.Extensions.ImageResultImplementations +{ + public abstract class BaseImageExpressionResult : IImageExpressionResult + { + public byte Quality { get; set; } + public bool LosslessFormat { get; set; } + public bool ShowField { get; set; } + public string BackgroundColour { get; set; } + public bool BackgroundPreferTransparent { get; set; } + + public BaseImageExpressionResult() + { + this.LosslessFormat = false; + this.Quality = 90; + this.ShowField = false; + this.BackgroundPreferTransparent = true; + } + + public abstract Stream GetImage(int Width, int Height); + + protected Stream RenderImage(Image SourceImage, int Width, int Height) + { + if (SourceImage == null) + throw new ArgumentNullException("SourceImage"); + if (Width <= 0) + throw new ArgumentOutOfRangeException("Width", "Width must be > 0"); + if (Height <= 0) + throw new ArgumentOutOfRangeException("Height", "Height must be > 0"); + + Brush backgroundBrush = null; + if (!LosslessFormat || !BackgroundPreferTransparent) + { + if (string.IsNullOrEmpty(this.BackgroundColour)) + backgroundBrush = Brushes.White; + else + backgroundBrush = new SolidBrush(ColorTranslator.FromHtml(this.BackgroundColour)); + } + + using (Image resizedImage = SourceImage.ResizeImage(Width, Height, backgroundBrush)) + { + return OutputImage(resizedImage); + } + } + + protected Stream OutputImage(Image SourceImage) + { + MemoryStream imageStream = new MemoryStream(); + if (LosslessFormat) + { // Lossless Format - PNG + SourceImage.SavePng(imageStream); + } + else + { // Lossy Format - JPG + byte quality = Math.Min((byte)100, Math.Max((byte)1, this.Quality)); + SourceImage.SaveJpg(quality, imageStream); + } + imageStream.Position = 0; + return imageStream; + } + } +} diff --git a/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/BitmapImageExpressionResult.cs b/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/BitmapImageExpressionResult.cs index 938e3c41..0f3f8eb4 100644 --- a/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/BitmapImageExpressionResult.cs +++ b/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/BitmapImageExpressionResult.cs @@ -1,27 +1,27 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; -using System.Drawing; - -namespace Disco.BI.Expressions.Extensions.ImageResultImplementations -{ - public class BitmapImageExpressionResult : BaseImageExpressionResult - { - public Image Image { get; set; } - - public BitmapImageExpressionResult(Image Image) - { - if (Image == null) - throw new ArgumentNullException("Image"); - - this.Image = Image; - } - - public override Stream GetImage(int Width, int Height) - { - return this.RenderImage(this.Image, Width, Height); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Drawing; + +namespace Disco.BI.Expressions.Extensions.ImageResultImplementations +{ + public class BitmapImageExpressionResult : BaseImageExpressionResult + { + public Image Image { get; set; } + + public BitmapImageExpressionResult(Image Image) + { + if (Image == null) + throw new ArgumentNullException("Image"); + + this.Image = Image; + } + + public override Stream GetImage(int Width, int Height) + { + return this.RenderImage(this.Image, Width, Height); + } + } +} diff --git a/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/FileImageExpressionResult.cs b/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/FileImageExpressionResult.cs index 9d9be068..b4641f14 100644 --- a/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/FileImageExpressionResult.cs +++ b/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/FileImageExpressionResult.cs @@ -1,32 +1,32 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; -using System.Drawing; - -namespace Disco.BI.Expressions.Extensions.ImageResultImplementations -{ - public class FileImageExpressionResult : BaseImageExpressionResult - { - public string AbsoluteFilePath { get; set; } - - public FileImageExpressionResult(string AbsoluteFilePath) - { - if (string.IsNullOrWhiteSpace(AbsoluteFilePath)) - throw new ArgumentNullException("AbsoluteFilePath"); - if (!File.Exists(AbsoluteFilePath)) - throw new FileNotFoundException("Image not found", AbsoluteFilePath); - - this.AbsoluteFilePath = AbsoluteFilePath; - } - - public override Stream GetImage(int Width, int Height) - { - using (Image SourceImage = Bitmap.FromFile(this.AbsoluteFilePath)) - { - return this.RenderImage(SourceImage, Width, Height); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Drawing; + +namespace Disco.BI.Expressions.Extensions.ImageResultImplementations +{ + public class FileImageExpressionResult : BaseImageExpressionResult + { + public string AbsoluteFilePath { get; set; } + + public FileImageExpressionResult(string AbsoluteFilePath) + { + if (string.IsNullOrWhiteSpace(AbsoluteFilePath)) + throw new ArgumentNullException("AbsoluteFilePath"); + if (!File.Exists(AbsoluteFilePath)) + throw new FileNotFoundException("Image not found", AbsoluteFilePath); + + this.AbsoluteFilePath = AbsoluteFilePath; + } + + public override Stream GetImage(int Width, int Height) + { + using (Image SourceImage = Bitmap.FromFile(this.AbsoluteFilePath)) + { + return this.RenderImage(SourceImage, Width, Height); + } + } + } +} diff --git a/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/FileMontageImageExpressionResult.cs b/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/FileMontageImageExpressionResult.cs index 7500b6d3..cf46b6ee 100644 --- a/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/FileMontageImageExpressionResult.cs +++ b/Disco.BI/BI/Expressions/Extensions/ImageResultImplementations/FileMontageImageExpressionResult.cs @@ -1,181 +1,181 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; -using System.Drawing; -using System.Drawing.Drawing2D; -using Disco.BI.Extensions; - -namespace Disco.BI.Expressions.Extensions.ImageResultImplementations -{ - public class FileMontageImageExpressionResult : BaseImageExpressionResult - { - public List AbsoluteFilePaths { get; set; } - public bool MontageHorizontalLayout { get; set; } - public bool MontageVerticalLayout { get; set; } - public bool MontageTableLayout { get; set; } - public int Padding { get; set; } - - public FileMontageImageExpressionResult(List AbsoluteFilePaths) - { - if (AbsoluteFilePaths == null) - throw new ArgumentNullException("AbsoluteFilePaths"); - if (AbsoluteFilePaths.Count == 0) - throw new ArgumentException("AbsoluteFilePaths is empty", "AbsoluteFilePaths"); - - this.AbsoluteFilePaths = AbsoluteFilePaths; - this.MontageTableLayout = true; - this.Padding = 4; - } - - public override Stream GetImage(int Width, int Height) - { - List Images = new List(); - try - { - // Load Images - foreach (string imageFilePath in this.AbsoluteFilePaths) - Images.Add(Bitmap.FromFile(imageFilePath)); - - // Build Montage - using (Bitmap montageImage = new Bitmap(Width, Height)) - { - using (Graphics montageGraphics = Graphics.FromImage(montageImage)) - { - montageGraphics.CompositingQuality = CompositingQuality.HighQuality; - montageGraphics.InterpolationMode = InterpolationMode.HighQualityBicubic; - montageGraphics.SmoothingMode = SmoothingMode.HighQuality; - - // Draw Background - if (!LosslessFormat || !BackgroundPreferTransparent) - { - Brush backgroundBrush = Brushes.White; - if (!string.IsNullOrEmpty(this.BackgroundColour)) - backgroundBrush = new SolidBrush(ColorTranslator.FromHtml(this.BackgroundColour)); - montageGraphics.FillRectangle(backgroundBrush, montageGraphics.VisibleClipBounds); - } - - if (this.MontageHorizontalLayout) - DoHorizontalLayout(Images, montageGraphics); - else - if (this.MontageVerticalLayout) - DoVirticalLayout(Images, montageGraphics); - else - DoTableLayout(Images, montageGraphics); - } - - return this.OutputImage(montageImage); - } - } - catch (Exception) { throw; } - finally - { - // Dispose of any Images - if (Images != null) - foreach (Image i in Images) - i.Dispose(); - } - } - - private void DoHorizontalLayout(List Images, Graphics MontageGraphics) - { - - float imageScale; - float imagePosition = 0; - int imagesWidthTotal = Images.Sum(i => i.Width); - int imagesHeightMax = Images.Max(i => i.Height); - int imagesPadding = ((Images.Count - 1) * this.Padding); - - imageScale = (float)(MontageGraphics.VisibleClipBounds.Width - imagesPadding) / (float)imagesWidthTotal; - if ((MontageGraphics.VisibleClipBounds.Height / (float)imagesHeightMax) < imageScale) - imageScale = (float)MontageGraphics.VisibleClipBounds.Height / (float)imagesHeightMax; - foreach (Image image in Images) - { - MontageGraphics.DrawImageResized(image, imageScale, imagePosition, 0); - imagePosition += (imageScale * image.Width) + this.Padding; - } - } - private void DoVirticalLayout(List Images, Graphics MontageGraphics) - { - float imageScale; - float imagePosition = 0; - int imagesWidthMax = Images.Max(i => i.Width); - int imagesHeightTotal = Images.Sum(i => i.Height); - int imagesPadding = ((Images.Count - 1) * this.Padding); - - imageScale = (float)(MontageGraphics.VisibleClipBounds.Height - imagesPadding) / (float)imagesHeightTotal; - if ((MontageGraphics.VisibleClipBounds.Width / (float)imagesWidthMax) < imageScale) - imageScale = (float)MontageGraphics.VisibleClipBounds.Width / (float)imagesWidthMax; - foreach (Image image in Images) - { - MontageGraphics.DrawImageResized(image, imageScale, 0, imagePosition); - imagePosition += (imageScale * image.Height) + this.Padding; - } - } - private void DoTableLayout(List Images, Graphics MontageGraphics) - { - var stageSize = MontageGraphics.VisibleClipBounds.Size.ToSize(); - var itemAverageSize = new SizeF(Images.Average(i => (float)i.Size.Width), Images.Average(i => (float)i.Size.Height)); - - var calculatedLayout = CalculateColumnCount(stageSize, itemAverageSize, Images.Count); - - SizeF cellSize = new SizeF((MontageGraphics.VisibleClipBounds.Width - ((calculatedLayout.Item1 - 1) * this.Padding)) / calculatedLayout.Item1, - (MontageGraphics.VisibleClipBounds.Height - ((calculatedLayout.Item2 - 1) * this.Padding)) / calculatedLayout.Item2); - - int imageIndex = 0; - for (int rowIndex = 0; rowIndex < calculatedLayout.Item2; rowIndex++) - { - for (int columnIndex = 0; columnIndex < calculatedLayout.Item1; columnIndex++) - { - if (imageIndex < Images.Count) - { - var image = Images[imageIndex]; - var cellPoint = new PointF((cellSize.Width * columnIndex) + (this.Padding * columnIndex), (cellSize.Height * rowIndex) + (this.Padding * rowIndex)); - MontageGraphics.Clip = new Region(new RectangleF(cellPoint, cellSize)); - MontageGraphics.DrawImageResized(image); - imageIndex++; - } - else - break; - } - } - } - - private Tuple CalculateColumnCount(Size StageSize, SizeF ItemAverageSize, int ItemCount) - { - double? bestUsedSpace = null; - int bestColumnCount = 1; - int bestRowCount = 1; - double bestItemRatio = 1; - - for (int columnCount = 1; columnCount <= ItemCount; columnCount++) - { - int rowCount = (int)Math.Ceiling((double)ItemCount / (double)columnCount); - - int requiredWidthPadding = (columnCount - 1) * this.Padding; - int requiredHeightPadding = (rowCount - 1) * this.Padding; - Size usableStageSize = new Size(StageSize.Width - requiredWidthPadding, StageSize.Height - requiredHeightPadding); - double stageWidthRatio = (float)usableStageSize.Width / (float)usableStageSize.Height; - double stageHeightRatio = (float)usableStageSize.Height / (float)usableStageSize.Width; - - int requiredWidth = (int)Math.Ceiling(ItemAverageSize.Width * columnCount); - int requiredHeight = (int)Math.Ceiling(ItemAverageSize.Height * rowCount); - - int usedSpace = requiredWidth * requiredHeight; - int stageArea = Math.Max((requiredWidth * (int)Math.Ceiling(requiredWidth * stageHeightRatio)), - (requiredHeight * (int)Math.Ceiling(requiredHeight * stageWidthRatio))); - double usedStageSpace = (double)usedSpace / stageArea; - if (bestUsedSpace == null || bestUsedSpace < usedStageSpace) - { - bestUsedSpace = usedStageSpace; - bestColumnCount = columnCount; - bestRowCount = rowCount; - bestItemRatio = Math.Min((double)usableStageSize.Width / (double)requiredWidth, (double)usableStageSize.Height / (double)requiredHeight); - } - } - - return new Tuple(bestColumnCount, bestRowCount, bestItemRatio); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Drawing; +using System.Drawing.Drawing2D; +using Disco.BI.Extensions; + +namespace Disco.BI.Expressions.Extensions.ImageResultImplementations +{ + public class FileMontageImageExpressionResult : BaseImageExpressionResult + { + public List AbsoluteFilePaths { get; set; } + public bool MontageHorizontalLayout { get; set; } + public bool MontageVerticalLayout { get; set; } + public bool MontageTableLayout { get; set; } + public int Padding { get; set; } + + public FileMontageImageExpressionResult(List AbsoluteFilePaths) + { + if (AbsoluteFilePaths == null) + throw new ArgumentNullException("AbsoluteFilePaths"); + if (AbsoluteFilePaths.Count == 0) + throw new ArgumentException("AbsoluteFilePaths is empty", "AbsoluteFilePaths"); + + this.AbsoluteFilePaths = AbsoluteFilePaths; + this.MontageTableLayout = true; + this.Padding = 4; + } + + public override Stream GetImage(int Width, int Height) + { + List Images = new List(); + try + { + // Load Images + foreach (string imageFilePath in this.AbsoluteFilePaths) + Images.Add(Bitmap.FromFile(imageFilePath)); + + // Build Montage + using (Bitmap montageImage = new Bitmap(Width, Height)) + { + using (Graphics montageGraphics = Graphics.FromImage(montageImage)) + { + montageGraphics.CompositingQuality = CompositingQuality.HighQuality; + montageGraphics.InterpolationMode = InterpolationMode.HighQualityBicubic; + montageGraphics.SmoothingMode = SmoothingMode.HighQuality; + + // Draw Background + if (!LosslessFormat || !BackgroundPreferTransparent) + { + Brush backgroundBrush = Brushes.White; + if (!string.IsNullOrEmpty(this.BackgroundColour)) + backgroundBrush = new SolidBrush(ColorTranslator.FromHtml(this.BackgroundColour)); + montageGraphics.FillRectangle(backgroundBrush, montageGraphics.VisibleClipBounds); + } + + if (this.MontageHorizontalLayout) + DoHorizontalLayout(Images, montageGraphics); + else + if (this.MontageVerticalLayout) + DoVirticalLayout(Images, montageGraphics); + else + DoTableLayout(Images, montageGraphics); + } + + return this.OutputImage(montageImage); + } + } + catch (Exception) { throw; } + finally + { + // Dispose of any Images + if (Images != null) + foreach (Image i in Images) + i.Dispose(); + } + } + + private void DoHorizontalLayout(List Images, Graphics MontageGraphics) + { + + float imageScale; + float imagePosition = 0; + int imagesWidthTotal = Images.Sum(i => i.Width); + int imagesHeightMax = Images.Max(i => i.Height); + int imagesPadding = ((Images.Count - 1) * this.Padding); + + imageScale = (float)(MontageGraphics.VisibleClipBounds.Width - imagesPadding) / (float)imagesWidthTotal; + if ((MontageGraphics.VisibleClipBounds.Height / (float)imagesHeightMax) < imageScale) + imageScale = (float)MontageGraphics.VisibleClipBounds.Height / (float)imagesHeightMax; + foreach (Image image in Images) + { + MontageGraphics.DrawImageResized(image, imageScale, imagePosition, 0); + imagePosition += (imageScale * image.Width) + this.Padding; + } + } + private void DoVirticalLayout(List Images, Graphics MontageGraphics) + { + float imageScale; + float imagePosition = 0; + int imagesWidthMax = Images.Max(i => i.Width); + int imagesHeightTotal = Images.Sum(i => i.Height); + int imagesPadding = ((Images.Count - 1) * this.Padding); + + imageScale = (float)(MontageGraphics.VisibleClipBounds.Height - imagesPadding) / (float)imagesHeightTotal; + if ((MontageGraphics.VisibleClipBounds.Width / (float)imagesWidthMax) < imageScale) + imageScale = (float)MontageGraphics.VisibleClipBounds.Width / (float)imagesWidthMax; + foreach (Image image in Images) + { + MontageGraphics.DrawImageResized(image, imageScale, 0, imagePosition); + imagePosition += (imageScale * image.Height) + this.Padding; + } + } + private void DoTableLayout(List Images, Graphics MontageGraphics) + { + var stageSize = MontageGraphics.VisibleClipBounds.Size.ToSize(); + var itemAverageSize = new SizeF(Images.Average(i => (float)i.Size.Width), Images.Average(i => (float)i.Size.Height)); + + var calculatedLayout = CalculateColumnCount(stageSize, itemAverageSize, Images.Count); + + SizeF cellSize = new SizeF((MontageGraphics.VisibleClipBounds.Width - ((calculatedLayout.Item1 - 1) * this.Padding)) / calculatedLayout.Item1, + (MontageGraphics.VisibleClipBounds.Height - ((calculatedLayout.Item2 - 1) * this.Padding)) / calculatedLayout.Item2); + + int imageIndex = 0; + for (int rowIndex = 0; rowIndex < calculatedLayout.Item2; rowIndex++) + { + for (int columnIndex = 0; columnIndex < calculatedLayout.Item1; columnIndex++) + { + if (imageIndex < Images.Count) + { + var image = Images[imageIndex]; + var cellPoint = new PointF((cellSize.Width * columnIndex) + (this.Padding * columnIndex), (cellSize.Height * rowIndex) + (this.Padding * rowIndex)); + MontageGraphics.Clip = new Region(new RectangleF(cellPoint, cellSize)); + MontageGraphics.DrawImageResized(image); + imageIndex++; + } + else + break; + } + } + } + + private Tuple CalculateColumnCount(Size StageSize, SizeF ItemAverageSize, int ItemCount) + { + double? bestUsedSpace = null; + int bestColumnCount = 1; + int bestRowCount = 1; + double bestItemRatio = 1; + + for (int columnCount = 1; columnCount <= ItemCount; columnCount++) + { + int rowCount = (int)Math.Ceiling((double)ItemCount / (double)columnCount); + + int requiredWidthPadding = (columnCount - 1) * this.Padding; + int requiredHeightPadding = (rowCount - 1) * this.Padding; + Size usableStageSize = new Size(StageSize.Width - requiredWidthPadding, StageSize.Height - requiredHeightPadding); + double stageWidthRatio = (float)usableStageSize.Width / (float)usableStageSize.Height; + double stageHeightRatio = (float)usableStageSize.Height / (float)usableStageSize.Width; + + int requiredWidth = (int)Math.Ceiling(ItemAverageSize.Width * columnCount); + int requiredHeight = (int)Math.Ceiling(ItemAverageSize.Height * rowCount); + + int usedSpace = requiredWidth * requiredHeight; + int stageArea = Math.Max((requiredWidth * (int)Math.Ceiling(requiredWidth * stageHeightRatio)), + (requiredHeight * (int)Math.Ceiling(requiredHeight * stageWidthRatio))); + double usedStageSpace = (double)usedSpace / stageArea; + if (bestUsedSpace == null || bestUsedSpace < usedStageSpace) + { + bestUsedSpace = usedStageSpace; + bestColumnCount = columnCount; + bestRowCount = rowCount; + bestItemRatio = Math.Min((double)usableStageSize.Width / (double)requiredWidth, (double)usableStageSize.Height / (double)requiredHeight); + } + } + + return new Tuple(bestColumnCount, bestRowCount, bestItemRatio); + } + } +} diff --git a/Disco.BI/BI/Expressions/Extensions/UserExt.cs b/Disco.BI/BI/Expressions/Extensions/UserExt.cs index 97492b4f..be007c86 100644 --- a/Disco.BI/BI/Expressions/Extensions/UserExt.cs +++ b/Disco.BI/BI/Expressions/Extensions/UserExt.cs @@ -1,51 +1,51 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.BI.Extensions; -using Disco.BI.Interop.ActiveDirectory; - -namespace Disco.BI.Expressions.Extensions -{ - public static class UserExt - { - public static object GetActiveDirectoryObjectValue(User User, string PropertyName, int Index = 0) - { - var adUserAccount = User.ActiveDirectoryAccount(PropertyName); - if (adUserAccount != null) - return adUserAccount.GetPropertyValue(PropertyName, Index); - else - return null; - } - - public static string GetActiveDirectoryStringValue(User User, string PropertyName, int Index = 0) - { - var objectValue = GetActiveDirectoryObjectValue(User, PropertyName, Index); - string stringValue = objectValue as string; - if (stringValue == null && objectValue != null) - stringValue = objectValue.ToString(); - return stringValue; - } - - public static int GetActiveDirectoryIntegerValue(User User, string PropertyName, int Index = 0) - { - var objectValue = GetActiveDirectoryObjectValue(User, PropertyName, Index); - if (objectValue == null) - return default(int); - else - { - int intValue; - try - { - intValue = (int)Convert.ChangeType(objectValue, typeof(int)); - } - catch (Exception) - { - throw; - } - return intValue; - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.BI.Extensions; +using Disco.BI.Interop.ActiveDirectory; + +namespace Disco.BI.Expressions.Extensions +{ + public static class UserExt + { + public static object GetActiveDirectoryObjectValue(User User, string PropertyName, int Index = 0) + { + var adUserAccount = User.ActiveDirectoryAccount(PropertyName); + if (adUserAccount != null) + return adUserAccount.GetPropertyValue(PropertyName, Index); + else + return null; + } + + public static string GetActiveDirectoryStringValue(User User, string PropertyName, int Index = 0) + { + var objectValue = GetActiveDirectoryObjectValue(User, PropertyName, Index); + string stringValue = objectValue as string; + if (stringValue == null && objectValue != null) + stringValue = objectValue.ToString(); + return stringValue; + } + + public static int GetActiveDirectoryIntegerValue(User User, string PropertyName, int Index = 0) + { + var objectValue = GetActiveDirectoryObjectValue(User, PropertyName, Index); + if (objectValue == null) + return default(int); + else + { + int intValue; + try + { + intValue = (int)Convert.ChangeType(objectValue, typeof(int)); + } + catch (Exception) + { + throw; + } + return intValue; + } + } + } +} diff --git a/Disco.BI/BI/Expressions/IExpressionPart.cs b/Disco.BI/BI/Expressions/IExpressionPart.cs index dbe6304b..68a250f2 100644 --- a/Disco.BI/BI/Expressions/IExpressionPart.cs +++ b/Disco.BI/BI/Expressions/IExpressionPart.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections; - -namespace Disco.BI.Expressions -{ - public interface IExpressionPart - { - string RawSource { get; set; } - string Source { get; set; } - bool ErrorsAllowed { get; set; } - bool ParseError { get; } - string ParseErrorMessage { get; } - bool IsDynamic { get; set; } - object Evaluate(object ExpressionContext, System.Collections.IDictionary Variables); - } -} +using System; +using System.Collections; + +namespace Disco.BI.Expressions +{ + public interface IExpressionPart + { + string RawSource { get; set; } + string Source { get; set; } + bool ErrorsAllowed { get; set; } + bool ParseError { get; } + string ParseErrorMessage { get; } + bool IsDynamic { get; set; } + object Evaluate(object ExpressionContext, System.Collections.IDictionary Variables); + } +} diff --git a/Disco.BI/BI/Expressions/TextExpressionPart.cs b/Disco.BI/BI/Expressions/TextExpressionPart.cs index 980e80a1..9ade0ac2 100644 --- a/Disco.BI/BI/Expressions/TextExpressionPart.cs +++ b/Disco.BI/BI/Expressions/TextExpressionPart.cs @@ -1,74 +1,74 @@ -using System; -using System.Collections; - -namespace Disco.BI.Expressions -{ - public class TextExpressionPart : IExpressionPart - { - private string _Source; - - bool IExpressionPart.ErrorsAllowed - { - get - { - return false; - } - set - { - return; - } - } - string IExpressionPart.Source - { - get - { - return this._Source; - } - set - { - return; - } - } - string IExpressionPart.RawSource - { - get - { - return this._Source; - } - set - { - return; - } - } - bool IExpressionPart.IsDynamic - { - get - { - return false; - } - set - { - return; - } - } - public bool ParseError - { - get { return false; } - } - - public string ParseErrorMessage - { - get { return null; } - } - - public TextExpressionPart(string Source) - { - this._Source = Source; - } - object IExpressionPart.Evaluate(object ExpressionContext, System.Collections.IDictionary Variables) - { - return this._Source; - } - - } -} +using System; +using System.Collections; + +namespace Disco.BI.Expressions +{ + public class TextExpressionPart : IExpressionPart + { + private string _Source; + + bool IExpressionPart.ErrorsAllowed + { + get + { + return false; + } + set + { + return; + } + } + string IExpressionPart.Source + { + get + { + return this._Source; + } + set + { + return; + } + } + string IExpressionPart.RawSource + { + get + { + return this._Source; + } + set + { + return; + } + } + bool IExpressionPart.IsDynamic + { + get + { + return false; + } + set + { + return; + } + } + public bool ParseError + { + get { return false; } + } + + public string ParseErrorMessage + { + get { return null; } + } + + public TextExpressionPart(string Source) + { + this._Source = Source; + } + object IExpressionPart.Evaluate(object ExpressionContext, System.Collections.IDictionary Variables) + { + return this._Source; + } + + } +} diff --git a/Disco.BI/BI/Extensions/AttachmentActionExtensions.cs b/Disco.BI/BI/Extensions/AttachmentActionExtensions.cs index cb500598..7a24383f 100644 --- a/Disco.BI/BI/Extensions/AttachmentActionExtensions.cs +++ b/Disco.BI/BI/Extensions/AttachmentActionExtensions.cs @@ -1,53 +1,53 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; - -namespace Disco.BI.Extensions -{ - public static class AttachmentActionExtensions - { - - #region Delete - public static bool CanDelete(this DeviceAttachment da) - { - return true; // Placeholder - Currently Can Always Delete; - } - public static void OnDelete(this DeviceAttachment da, DiscoDataContext dbContext) - { - if (!da.CanDelete()) - throw new InvalidOperationException("Deletion of Attachment is Denied"); - - da.RepositoryDelete(dbContext); - dbContext.DeviceAttachments.Remove(da); - } - public static bool CanDelete(this JobAttachment ja) - { - return true; // Placeholder - Currently Can Always Delete; - } - public static void OnDelete(this JobAttachment ja, DiscoDataContext dbContext) - { - if (!ja.CanDelete()) - throw new InvalidOperationException("Deletion of Attachment is Denied"); - - ja.RepositoryDelete(dbContext); - dbContext.JobAttachments.Remove(ja); - } - public static bool CanDelete(this UserAttachment ua) - { - return true; // Placeholder - Currently Can Always Delete; - } - public static void OnDelete(this UserAttachment ua, DiscoDataContext dbContext) - { - if (!ua.CanDelete()) - throw new InvalidOperationException("Deletion of Attachment is Denied"); - - ua.RepositoryDelete(dbContext); - dbContext.UserAttachments.Remove(ua); - } - #endregion - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; + +namespace Disco.BI.Extensions +{ + public static class AttachmentActionExtensions + { + + #region Delete + public static bool CanDelete(this DeviceAttachment da) + { + return true; // Placeholder - Currently Can Always Delete; + } + public static void OnDelete(this DeviceAttachment da, DiscoDataContext dbContext) + { + if (!da.CanDelete()) + throw new InvalidOperationException("Deletion of Attachment is Denied"); + + da.RepositoryDelete(dbContext); + dbContext.DeviceAttachments.Remove(da); + } + public static bool CanDelete(this JobAttachment ja) + { + return true; // Placeholder - Currently Can Always Delete; + } + public static void OnDelete(this JobAttachment ja, DiscoDataContext dbContext) + { + if (!ja.CanDelete()) + throw new InvalidOperationException("Deletion of Attachment is Denied"); + + ja.RepositoryDelete(dbContext); + dbContext.JobAttachments.Remove(ja); + } + public static bool CanDelete(this UserAttachment ua) + { + return true; // Placeholder - Currently Can Always Delete; + } + public static void OnDelete(this UserAttachment ua, DiscoDataContext dbContext) + { + if (!ua.CanDelete()) + throw new InvalidOperationException("Deletion of Attachment is Denied"); + + ua.RepositoryDelete(dbContext); + dbContext.UserAttachments.Remove(ua); + } + #endregion + + } +} diff --git a/Disco.BI/BI/Extensions/AttachmentExtensions.cs b/Disco.BI/BI/Extensions/AttachmentExtensions.cs index 4c11ee82..f7a5a7c8 100644 --- a/Disco.BI/BI/Extensions/AttachmentExtensions.cs +++ b/Disco.BI/BI/Extensions/AttachmentExtensions.cs @@ -1,196 +1,196 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; -using System.IO; -using Disco.BI.DocumentTemplateBI; - -namespace Disco.BI.Extensions -{ - public static class AttachmentExtensions - { - - public static bool ImportPdfAttachment(this DocumentUniqueIdentifier UniqueIdentifier, DiscoDataContext dbContext, System.IO.Stream PdfContent, byte[] PdfThumbnail) - { - - UniqueIdentifier.LoadComponents(dbContext); - DocumentTemplate documentTemplate = UniqueIdentifier.DocumentTemplate; - string filename; - string comments; - - if (documentTemplate == null) - { - filename = string.Format("{0}_{1:yyyyMMdd-HHmmss}.pdf", UniqueIdentifier.DataId, UniqueIdentifier.TimeStamp); - comments = string.Format("Uploaded: {0:s}", UniqueIdentifier.TimeStamp); - } - else - { - filename = string.Format("{0}_{1:yyyyMMdd-HHmmss}.pdf", UniqueIdentifier.TemplateTypeId, UniqueIdentifier.TimeStamp); - comments = string.Format("Generated: {0:s}", UniqueIdentifier.TimeStamp); - } - - User creatorUser = UserBI.UserCache.GetUser(UniqueIdentifier.CreatorId, dbContext); - if (creatorUser == null) - { - // No Creator User (or Username invalid) - creatorUser = UserBI.UserCache.CurrentUser; - } - switch (UniqueIdentifier.DataScope) - { - case DocumentTemplate.DocumentTemplateScopes.Device: - Device d = (Device)UniqueIdentifier.Data; - d.CreateAttachment(dbContext, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail); - return true; - case DocumentTemplate.DocumentTemplateScopes.Job: - Job j = (Job)UniqueIdentifier.Data; - j.CreateAttachment(dbContext, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail); - return true; - case DocumentTemplate.DocumentTemplateScopes.User: - User u = (User)UniqueIdentifier.Data; - u.CreateAttachment(dbContext, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail); - return true; - default: - return false; - } - - } - - public static string RepositoryFilename(this DeviceAttachment da, DiscoDataContext dbContext) - { - return Path.Combine(DataStore.CreateLocation(dbContext, "DeviceAttachments", da.Timestamp), string.Format("{0}_{1}_file", da.DeviceSerialNumber, da.Id)); - } - public static string RepositoryFilename(this JobAttachment ja, DiscoDataContext dbContext) - { - return Path.Combine(DataStore.CreateLocation(dbContext, "JobAttachments", ja.Timestamp), string.Format("{0}_{1}_file", ja.JobId, ja.Id)); - } - public static string RepositoryFilename(this UserAttachment ua, DiscoDataContext dbContext) - { - return Path.Combine(DataStore.CreateLocation(dbContext, "UserAttachments", ua.Timestamp), string.Format("{0}_{1}_file", ua.UserId, ua.Id)); - } - - private static string RepositoryThumbnailFilenameInternal(string DirectoryPath, string Filename) - { - return Path.Combine(DirectoryPath, Filename); - } - public static string RepositoryThumbnailFilename(this DeviceAttachment da, DiscoDataContext dbContext) - { - return RepositoryThumbnailFilenameInternal(DataStore.CreateLocation(dbContext, "DeviceAttachments", da.Timestamp), string.Format("{0}_{1}_thumb.jpg", da.DeviceSerialNumber, da.Id)); - } - public static string RepositoryThumbnailFilename(this JobAttachment ja, DiscoDataContext dbContext) - { - return RepositoryThumbnailFilenameInternal(DataStore.CreateLocation(dbContext, "JobAttachments", ja.Timestamp), string.Format("{0}_{1}_thumb.jpg", ja.JobId, ja.Id)); - } - public static string RepositoryThumbnailFilename(this UserAttachment ua, DiscoDataContext dbContext) - { - return RepositoryThumbnailFilenameInternal(DataStore.CreateLocation(dbContext, "UserAttachments", ua.Timestamp), string.Format("{0}_{1}_thumb.jpg", ua.UserId, ua.Id)); - } - - public static void RepositoryDelete(this DeviceAttachment da, DiscoDataContext dbContext) - { - RepositoryDelete(da.RepositoryFilename(dbContext), da.RepositoryThumbnailFilename(dbContext)); - } - public static void RepositoryDelete(this JobAttachment ja, DiscoDataContext dbContext) - { - RepositoryDelete(ja.RepositoryFilename(dbContext), ja.RepositoryThumbnailFilename(dbContext)); - } - public static void RepositoryDelete(this UserAttachment ua, DiscoDataContext dbContext) - { - RepositoryDelete(ua.RepositoryFilename(dbContext), ua.RepositoryThumbnailFilename(dbContext)); - } - private static void RepositoryDelete(params string[] filePaths) - { - foreach (string filePath in filePaths) - { - if (File.Exists(filePath)) - File.Delete(filePath); - } - } - - public static string SaveAttachment(this DeviceAttachment da, DiscoDataContext dbContext, Stream FileContent) - { - string filePath = da.RepositoryFilename(dbContext); - SaveAttachment(filePath, FileContent); - return filePath; - } - public static string SaveAttachment(this JobAttachment ja, DiscoDataContext dbContext, Stream FileContent) - { - string filePath = ja.RepositoryFilename(dbContext); - SaveAttachment(filePath, FileContent); - return filePath; - } - public static string SaveAttachment(this UserAttachment ua, DiscoDataContext dbContext, Stream FileContent) - { - string filePath = ua.RepositoryFilename(dbContext); - SaveAttachment(filePath, FileContent); - return filePath; - } - public static string SaveThumbnailAttachment(this DeviceAttachment da, DiscoDataContext dbContext, byte[] FileContent) - { - string filePath = da.RepositoryThumbnailFilename(dbContext); - File.WriteAllBytes(filePath, FileContent); - return filePath; - } - public static string SaveThumbnailAttachment(this JobAttachment ja, DiscoDataContext dbContext, byte[] FileContent) - { - string filePath = ja.RepositoryThumbnailFilename(dbContext); - File.WriteAllBytes(filePath, FileContent); - return filePath; - } - public static string SaveThumbnailAttachment(this UserAttachment ua, DiscoDataContext dbContext, byte[] FileContent) - { - string filePath = ua.RepositoryThumbnailFilename(dbContext); - File.WriteAllBytes(filePath, FileContent); - return filePath; - } - private static void SaveAttachment(string FilePath, Stream FileContent) - { - using (FileStream sw = new FileStream(FilePath, FileMode.Create, FileAccess.Write, FileShare.None)) - { - FileContent.CopyTo(sw); - sw.Flush(); - sw.Close(); - } - } - - public static string GenerateThumbnail(this DeviceAttachment da, DiscoDataContext dbContext) - { - string filePath = da.RepositoryThumbnailFilename(dbContext); - AttachmentBI.Utilities.GenerateThumbnail(da.RepositoryFilename(dbContext), da.MimeType, filePath); - return filePath; - } - public static string GenerateThumbnail(this JobAttachment ja, DiscoDataContext dbContext) - { - string filePath = ja.RepositoryThumbnailFilename(dbContext); - AttachmentBI.Utilities.GenerateThumbnail(ja.RepositoryFilename(dbContext), ja.MimeType, filePath); - return filePath; - } - public static string GenerateThumbnail(this UserAttachment ua, DiscoDataContext dbContext) - { - string filePath = ua.RepositoryThumbnailFilename(dbContext); - AttachmentBI.Utilities.GenerateThumbnail(ua.RepositoryFilename(dbContext), ua.MimeType, filePath); - return filePath; - } - public static string GenerateThumbnail(this DeviceAttachment da, DiscoDataContext dbContext, Stream SourceFile) - { - string filePath = da.RepositoryThumbnailFilename(dbContext); - AttachmentBI.Utilities.GenerateThumbnail(SourceFile, da.MimeType, filePath); - return filePath; - } - public static string GenerateThumbnail(this JobAttachment ja, DiscoDataContext dbContext, Stream SourceFile) - { - string filePath = ja.RepositoryThumbnailFilename(dbContext); - AttachmentBI.Utilities.GenerateThumbnail(SourceFile, ja.MimeType, filePath); - return filePath; - } - public static string GenerateThumbnail(this UserAttachment ua, DiscoDataContext dbContext, Stream SourceFile) - { - string filePath = ua.RepositoryThumbnailFilename(dbContext); - AttachmentBI.Utilities.GenerateThumbnail(SourceFile, ua.MimeType, filePath); - return filePath; - } - - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; +using System.IO; +using Disco.BI.DocumentTemplateBI; + +namespace Disco.BI.Extensions +{ + public static class AttachmentExtensions + { + + public static bool ImportPdfAttachment(this DocumentUniqueIdentifier UniqueIdentifier, DiscoDataContext dbContext, System.IO.Stream PdfContent, byte[] PdfThumbnail) + { + + UniqueIdentifier.LoadComponents(dbContext); + DocumentTemplate documentTemplate = UniqueIdentifier.DocumentTemplate; + string filename; + string comments; + + if (documentTemplate == null) + { + filename = string.Format("{0}_{1:yyyyMMdd-HHmmss}.pdf", UniqueIdentifier.DataId, UniqueIdentifier.TimeStamp); + comments = string.Format("Uploaded: {0:s}", UniqueIdentifier.TimeStamp); + } + else + { + filename = string.Format("{0}_{1:yyyyMMdd-HHmmss}.pdf", UniqueIdentifier.TemplateTypeId, UniqueIdentifier.TimeStamp); + comments = string.Format("Generated: {0:s}", UniqueIdentifier.TimeStamp); + } + + User creatorUser = UserBI.UserCache.GetUser(UniqueIdentifier.CreatorId, dbContext); + if (creatorUser == null) + { + // No Creator User (or Username invalid) + creatorUser = UserBI.UserCache.CurrentUser; + } + switch (UniqueIdentifier.DataScope) + { + case DocumentTemplate.DocumentTemplateScopes.Device: + Device d = (Device)UniqueIdentifier.Data; + d.CreateAttachment(dbContext, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail); + return true; + case DocumentTemplate.DocumentTemplateScopes.Job: + Job j = (Job)UniqueIdentifier.Data; + j.CreateAttachment(dbContext, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail); + return true; + case DocumentTemplate.DocumentTemplateScopes.User: + User u = (User)UniqueIdentifier.Data; + u.CreateAttachment(dbContext, creatorUser, filename, DocumentTemplate.PdfMimeType, comments, PdfContent, documentTemplate, PdfThumbnail); + return true; + default: + return false; + } + + } + + public static string RepositoryFilename(this DeviceAttachment da, DiscoDataContext dbContext) + { + return Path.Combine(DataStore.CreateLocation(dbContext, "DeviceAttachments", da.Timestamp), string.Format("{0}_{1}_file", da.DeviceSerialNumber, da.Id)); + } + public static string RepositoryFilename(this JobAttachment ja, DiscoDataContext dbContext) + { + return Path.Combine(DataStore.CreateLocation(dbContext, "JobAttachments", ja.Timestamp), string.Format("{0}_{1}_file", ja.JobId, ja.Id)); + } + public static string RepositoryFilename(this UserAttachment ua, DiscoDataContext dbContext) + { + return Path.Combine(DataStore.CreateLocation(dbContext, "UserAttachments", ua.Timestamp), string.Format("{0}_{1}_file", ua.UserId, ua.Id)); + } + + private static string RepositoryThumbnailFilenameInternal(string DirectoryPath, string Filename) + { + return Path.Combine(DirectoryPath, Filename); + } + public static string RepositoryThumbnailFilename(this DeviceAttachment da, DiscoDataContext dbContext) + { + return RepositoryThumbnailFilenameInternal(DataStore.CreateLocation(dbContext, "DeviceAttachments", da.Timestamp), string.Format("{0}_{1}_thumb.jpg", da.DeviceSerialNumber, da.Id)); + } + public static string RepositoryThumbnailFilename(this JobAttachment ja, DiscoDataContext dbContext) + { + return RepositoryThumbnailFilenameInternal(DataStore.CreateLocation(dbContext, "JobAttachments", ja.Timestamp), string.Format("{0}_{1}_thumb.jpg", ja.JobId, ja.Id)); + } + public static string RepositoryThumbnailFilename(this UserAttachment ua, DiscoDataContext dbContext) + { + return RepositoryThumbnailFilenameInternal(DataStore.CreateLocation(dbContext, "UserAttachments", ua.Timestamp), string.Format("{0}_{1}_thumb.jpg", ua.UserId, ua.Id)); + } + + public static void RepositoryDelete(this DeviceAttachment da, DiscoDataContext dbContext) + { + RepositoryDelete(da.RepositoryFilename(dbContext), da.RepositoryThumbnailFilename(dbContext)); + } + public static void RepositoryDelete(this JobAttachment ja, DiscoDataContext dbContext) + { + RepositoryDelete(ja.RepositoryFilename(dbContext), ja.RepositoryThumbnailFilename(dbContext)); + } + public static void RepositoryDelete(this UserAttachment ua, DiscoDataContext dbContext) + { + RepositoryDelete(ua.RepositoryFilename(dbContext), ua.RepositoryThumbnailFilename(dbContext)); + } + private static void RepositoryDelete(params string[] filePaths) + { + foreach (string filePath in filePaths) + { + if (File.Exists(filePath)) + File.Delete(filePath); + } + } + + public static string SaveAttachment(this DeviceAttachment da, DiscoDataContext dbContext, Stream FileContent) + { + string filePath = da.RepositoryFilename(dbContext); + SaveAttachment(filePath, FileContent); + return filePath; + } + public static string SaveAttachment(this JobAttachment ja, DiscoDataContext dbContext, Stream FileContent) + { + string filePath = ja.RepositoryFilename(dbContext); + SaveAttachment(filePath, FileContent); + return filePath; + } + public static string SaveAttachment(this UserAttachment ua, DiscoDataContext dbContext, Stream FileContent) + { + string filePath = ua.RepositoryFilename(dbContext); + SaveAttachment(filePath, FileContent); + return filePath; + } + public static string SaveThumbnailAttachment(this DeviceAttachment da, DiscoDataContext dbContext, byte[] FileContent) + { + string filePath = da.RepositoryThumbnailFilename(dbContext); + File.WriteAllBytes(filePath, FileContent); + return filePath; + } + public static string SaveThumbnailAttachment(this JobAttachment ja, DiscoDataContext dbContext, byte[] FileContent) + { + string filePath = ja.RepositoryThumbnailFilename(dbContext); + File.WriteAllBytes(filePath, FileContent); + return filePath; + } + public static string SaveThumbnailAttachment(this UserAttachment ua, DiscoDataContext dbContext, byte[] FileContent) + { + string filePath = ua.RepositoryThumbnailFilename(dbContext); + File.WriteAllBytes(filePath, FileContent); + return filePath; + } + private static void SaveAttachment(string FilePath, Stream FileContent) + { + using (FileStream sw = new FileStream(FilePath, FileMode.Create, FileAccess.Write, FileShare.None)) + { + FileContent.CopyTo(sw); + sw.Flush(); + sw.Close(); + } + } + + public static string GenerateThumbnail(this DeviceAttachment da, DiscoDataContext dbContext) + { + string filePath = da.RepositoryThumbnailFilename(dbContext); + AttachmentBI.Utilities.GenerateThumbnail(da.RepositoryFilename(dbContext), da.MimeType, filePath); + return filePath; + } + public static string GenerateThumbnail(this JobAttachment ja, DiscoDataContext dbContext) + { + string filePath = ja.RepositoryThumbnailFilename(dbContext); + AttachmentBI.Utilities.GenerateThumbnail(ja.RepositoryFilename(dbContext), ja.MimeType, filePath); + return filePath; + } + public static string GenerateThumbnail(this UserAttachment ua, DiscoDataContext dbContext) + { + string filePath = ua.RepositoryThumbnailFilename(dbContext); + AttachmentBI.Utilities.GenerateThumbnail(ua.RepositoryFilename(dbContext), ua.MimeType, filePath); + return filePath; + } + public static string GenerateThumbnail(this DeviceAttachment da, DiscoDataContext dbContext, Stream SourceFile) + { + string filePath = da.RepositoryThumbnailFilename(dbContext); + AttachmentBI.Utilities.GenerateThumbnail(SourceFile, da.MimeType, filePath); + return filePath; + } + public static string GenerateThumbnail(this JobAttachment ja, DiscoDataContext dbContext, Stream SourceFile) + { + string filePath = ja.RepositoryThumbnailFilename(dbContext); + AttachmentBI.Utilities.GenerateThumbnail(SourceFile, ja.MimeType, filePath); + return filePath; + } + public static string GenerateThumbnail(this UserAttachment ua, DiscoDataContext dbContext, Stream SourceFile) + { + string filePath = ua.RepositoryThumbnailFilename(dbContext); + AttachmentBI.Utilities.GenerateThumbnail(SourceFile, ua.MimeType, filePath); + return filePath; + } + + + } +} diff --git a/Disco.BI/BI/Extensions/ClientServicesExtensions.cs b/Disco.BI/BI/Extensions/ClientServicesExtensions.cs index 8c66fe36..d13012d7 100644 --- a/Disco.BI/BI/Extensions/ClientServicesExtensions.cs +++ b/Disco.BI/BI/Extensions/ClientServicesExtensions.cs @@ -1,70 +1,70 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.ClientServices; -using System.Web; -using Disco.Data.Repository; -using Disco.Models.Repository; - -namespace Disco.BI.Extensions -{ - public static class ClientServicesExtensions - { - public static EnrolResponse BuildResponse(this Enrol request) - { - if (HttpContext.Current == null) - throw new PlatformNotSupportedException("This function can only be accessed from within ASP.NET"); - - string username = null; - if (HttpContext.Current.Request.IsAuthenticated) - username = HttpContext.Current.User.Identity.Name; - - using (DiscoDataContext dbContext = new DiscoDataContext()) - { - EnrolResponse response = DeviceBI.DeviceEnrol.Enrol(dbContext, username, request); - dbContext.SaveChanges(); - return response; - } - } - - public static WhoAmIResponse BuildResponse(this WhoAmI request) - { - if (HttpContext.Current == null) - throw new PlatformNotSupportedException("This function can only be accessed from within ASP.NET"); - - string username = null; - if (HttpContext.Current.Request.IsAuthenticated) - username = HttpContext.Current.User.Identity.Name; - - if (username == null) - throw new InvalidOperationException("Unauthenticated Http Context"); - - using (DiscoDataContext dbContext = new DiscoDataContext()) - { - User user = UserBI.UserCache.GetUser(username, dbContext, true); - WhoAmIResponse response = new WhoAmIResponse() - { - Username = user.Id, - DisplayName = user.DisplayName, - Type = user.Type - }; - return response; - } - } - - public static MacEnrolResponse BuildResponse(this MacEnrol request) - { - if (HttpContext.Current == null) - throw new PlatformNotSupportedException("This function can only be accessed from within ASP.NET"); - - using (DiscoDataContext dbContext = new DiscoDataContext()) - { - MacEnrolResponse response = DeviceBI.DeviceEnrol.MacEnrol(dbContext, request, false); - dbContext.SaveChanges(); - return response; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.ClientServices; +using System.Web; +using Disco.Data.Repository; +using Disco.Models.Repository; + +namespace Disco.BI.Extensions +{ + public static class ClientServicesExtensions + { + public static EnrolResponse BuildResponse(this Enrol request) + { + if (HttpContext.Current == null) + throw new PlatformNotSupportedException("This function can only be accessed from within ASP.NET"); + + string username = null; + if (HttpContext.Current.Request.IsAuthenticated) + username = HttpContext.Current.User.Identity.Name; + + using (DiscoDataContext dbContext = new DiscoDataContext()) + { + EnrolResponse response = DeviceBI.DeviceEnrol.Enrol(dbContext, username, request); + dbContext.SaveChanges(); + return response; + } + } + + public static WhoAmIResponse BuildResponse(this WhoAmI request) + { + if (HttpContext.Current == null) + throw new PlatformNotSupportedException("This function can only be accessed from within ASP.NET"); + + string username = null; + if (HttpContext.Current.Request.IsAuthenticated) + username = HttpContext.Current.User.Identity.Name; + + if (username == null) + throw new InvalidOperationException("Unauthenticated Http Context"); + + using (DiscoDataContext dbContext = new DiscoDataContext()) + { + User user = UserBI.UserCache.GetUser(username, dbContext, true); + WhoAmIResponse response = new WhoAmIResponse() + { + Username = user.Id, + DisplayName = user.DisplayName, + Type = user.Type + }; + return response; + } + } + + public static MacEnrolResponse BuildResponse(this MacEnrol request) + { + if (HttpContext.Current == null) + throw new PlatformNotSupportedException("This function can only be accessed from within ASP.NET"); + + using (DiscoDataContext dbContext = new DiscoDataContext()) + { + MacEnrolResponse response = DeviceBI.DeviceEnrol.MacEnrol(dbContext, request, false); + dbContext.SaveChanges(); + return response; + } + } + + } +} diff --git a/Disco.BI/BI/Extensions/DeviceActionExtensions.cs b/Disco.BI/BI/Extensions/DeviceActionExtensions.cs index 3db5a5db..187eadf0 100644 --- a/Disco.BI/BI/Extensions/DeviceActionExtensions.cs +++ b/Disco.BI/BI/Extensions/DeviceActionExtensions.cs @@ -1,133 +1,133 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; -using Disco.BI.Interop.ActiveDirectory; - -namespace Disco.BI.Extensions -{ - public static class DeviceActionExtensions - { - - public static bool CanCreateJob(this Device d) - { - return !d.DecommissionedDate.HasValue; - } - - #region Decommission - public static bool CanDecommission(this Device d) - { - if (d.DecommissionedDate.HasValue) - return false; // Already Decommissioned - - if (d.AssignedUserId != null) - return false; // User Assigned to Device - - if (d.Jobs.Count(j => !j.ClosedDate.HasValue) > 0) - return false; // Device linked to > 0 Open Jobs - - return true; - } - public static void OnDecommission(this Device d) - { - if (!d.CanDecommission()) - throw new InvalidOperationException("Decommission of Device is Denied"); - - d.DecommissionedDate = DateTime.Now; - - // Disable AD Account - if (d.ComputerName != null) - { - var adAccount = d.ActiveDirectoryAccount(); - if (adAccount != null) - { - adAccount.DisableAccount(); - } - } - } - #endregion - #region Recommission - public static bool CanRecommission(this Device d) - { - return d.DecommissionedDate.HasValue; - } - public static void OnRecommission(this Device d) - { - if (!d.CanRecommission()) - throw new InvalidOperationException("Recommission of Device is Denied"); - - d.DecommissionedDate = null; - - // Enable AD Account - if (d.ComputerName != null) - { - var adAccount = d.ActiveDirectoryAccount(); - if (adAccount != null) - { - adAccount.EnableAccount(); - } - } - } - #endregion - - #region Delete - public static bool CanDelete(this Device d) - { - return d.DecommissionedDate.HasValue; - } - public static void OnDelete(this Device d, DiscoDataContext dbContext) - { - // Delete Jobs - foreach (Job j in dbContext.Jobs.Where(i => i.DeviceSerialNumber == d.SerialNumber)) - { - if (j.UserId == null) - { // No User associated, thus must Delete whole Job - if (j.CanDelete()) - j.OnDelete(dbContext); - else - throw new InvalidOperationException(string.Format("Deletion of Device is Denied (See Job# {0})", j.Id)); - } - else - { - // User associated to Job, thus just remove Devices' association - j.DeviceSerialNumber = null; - - // Write Job Log - JobLog jobLog = new JobLog() - { - JobId = j.Id, - TechUserId = UserBI.UserCache.CurrentUser.Id, - Timestamp = DateTime.Now, - Comments = string.Format("Device Deleted{0}{0}Serial Number: {1}{0}Computer Name: {2}{0}Model: {3}{0}Profile: {4}", - Environment.NewLine, d.SerialNumber, d.ComputerName, d.DeviceModel, d.DeviceProfile) - }; - dbContext.JobLogs.Add(jobLog); - } - } - - // Disable Wireless Certificates - foreach (var wc in dbContext.DeviceCertificates.Where(i => i.DeviceSerialNumber == d.SerialNumber)) - { - wc.DeviceSerialNumber = null; - wc.Enabled = false; - } - // Delete Device Details - foreach (var dd in dbContext.DeviceDetails.Where(i => i.DeviceSerialNumber == d.SerialNumber)) - dbContext.DeviceDetails.Remove(dd); - // Delete Device Attachments - foreach (var da in dbContext.DeviceAttachments.Where(i => i.DeviceSerialNumber == d.SerialNumber)) - { - da.RepositoryDelete(dbContext); - dbContext.DeviceAttachments.Remove(da); - } - // Delete Device User Assignments - foreach (var dua in dbContext.DeviceUserAssignments.Where(i => i.DeviceSerialNumber == d.SerialNumber)) - dbContext.DeviceUserAssignments.Remove(dua); - - dbContext.Devices.Remove(d); - } - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; +using Disco.BI.Interop.ActiveDirectory; + +namespace Disco.BI.Extensions +{ + public static class DeviceActionExtensions + { + + public static bool CanCreateJob(this Device d) + { + return !d.DecommissionedDate.HasValue; + } + + #region Decommission + public static bool CanDecommission(this Device d) + { + if (d.DecommissionedDate.HasValue) + return false; // Already Decommissioned + + if (d.AssignedUserId != null) + return false; // User Assigned to Device + + if (d.Jobs.Count(j => !j.ClosedDate.HasValue) > 0) + return false; // Device linked to > 0 Open Jobs + + return true; + } + public static void OnDecommission(this Device d) + { + if (!d.CanDecommission()) + throw new InvalidOperationException("Decommission of Device is Denied"); + + d.DecommissionedDate = DateTime.Now; + + // Disable AD Account + if (d.ComputerName != null) + { + var adAccount = d.ActiveDirectoryAccount(); + if (adAccount != null) + { + adAccount.DisableAccount(); + } + } + } + #endregion + #region Recommission + public static bool CanRecommission(this Device d) + { + return d.DecommissionedDate.HasValue; + } + public static void OnRecommission(this Device d) + { + if (!d.CanRecommission()) + throw new InvalidOperationException("Recommission of Device is Denied"); + + d.DecommissionedDate = null; + + // Enable AD Account + if (d.ComputerName != null) + { + var adAccount = d.ActiveDirectoryAccount(); + if (adAccount != null) + { + adAccount.EnableAccount(); + } + } + } + #endregion + + #region Delete + public static bool CanDelete(this Device d) + { + return d.DecommissionedDate.HasValue; + } + public static void OnDelete(this Device d, DiscoDataContext dbContext) + { + // Delete Jobs + foreach (Job j in dbContext.Jobs.Where(i => i.DeviceSerialNumber == d.SerialNumber)) + { + if (j.UserId == null) + { // No User associated, thus must Delete whole Job + if (j.CanDelete()) + j.OnDelete(dbContext); + else + throw new InvalidOperationException(string.Format("Deletion of Device is Denied (See Job# {0})", j.Id)); + } + else + { + // User associated to Job, thus just remove Devices' association + j.DeviceSerialNumber = null; + + // Write Job Log + JobLog jobLog = new JobLog() + { + JobId = j.Id, + TechUserId = UserBI.UserCache.CurrentUser.Id, + Timestamp = DateTime.Now, + Comments = string.Format("Device Deleted{0}{0}Serial Number: {1}{0}Computer Name: {2}{0}Model: {3}{0}Profile: {4}", + Environment.NewLine, d.SerialNumber, d.ComputerName, d.DeviceModel, d.DeviceProfile) + }; + dbContext.JobLogs.Add(jobLog); + } + } + + // Disable Wireless Certificates + foreach (var wc in dbContext.DeviceCertificates.Where(i => i.DeviceSerialNumber == d.SerialNumber)) + { + wc.DeviceSerialNumber = null; + wc.Enabled = false; + } + // Delete Device Details + foreach (var dd in dbContext.DeviceDetails.Where(i => i.DeviceSerialNumber == d.SerialNumber)) + dbContext.DeviceDetails.Remove(dd); + // Delete Device Attachments + foreach (var da in dbContext.DeviceAttachments.Where(i => i.DeviceSerialNumber == d.SerialNumber)) + { + da.RepositoryDelete(dbContext); + dbContext.DeviceAttachments.Remove(da); + } + // Delete Device User Assignments + foreach (var dua in dbContext.DeviceUserAssignments.Where(i => i.DeviceSerialNumber == d.SerialNumber)) + dbContext.DeviceUserAssignments.Remove(dua); + + dbContext.Devices.Remove(d); + } + #endregion + } +} diff --git a/Disco.BI/BI/Extensions/DeviceBatchExtensions.cs b/Disco.BI/BI/Extensions/DeviceBatchExtensions.cs index 9c71b67d..cfc04013 100644 --- a/Disco.BI/BI/Extensions/DeviceBatchExtensions.cs +++ b/Disco.BI/BI/Extensions/DeviceBatchExtensions.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; - -namespace Disco.BI.Extensions -{ - public static class DeviceBatchExtensions - { - public static bool CanDelete(this DeviceBatch db, DiscoDataContext dbContext) - { - // Can't Delete if Contains Devices - var deviceCount = dbContext.Devices.Count(d => d.DeviceBatchId == db.Id); - if (deviceCount > 0) - return false; - - return true; - } - - public static void Delete(this DeviceBatch db, DiscoDataContext dbContext) - { - if (!db.CanDelete(dbContext)) - throw new InvalidOperationException("The state of this Device Batch doesn't allow it to be deleted"); - - // Delete Batch - dbContext.DeviceBatches.Remove(db); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; + +namespace Disco.BI.Extensions +{ + public static class DeviceBatchExtensions + { + public static bool CanDelete(this DeviceBatch db, DiscoDataContext dbContext) + { + // Can't Delete if Contains Devices + var deviceCount = dbContext.Devices.Count(d => d.DeviceBatchId == db.Id); + if (deviceCount > 0) + return false; + + return true; + } + + public static void Delete(this DeviceBatch db, DiscoDataContext dbContext) + { + if (!db.CanDelete(dbContext)) + throw new InvalidOperationException("The state of this Device Batch doesn't allow it to be deleted"); + + // Delete Batch + dbContext.DeviceBatches.Remove(db); + } + } +} diff --git a/Disco.BI/BI/Extensions/DeviceCertificateExtensions.cs b/Disco.BI/BI/Extensions/DeviceCertificateExtensions.cs index 0d6cac42..c4889e2a 100644 --- a/Disco.BI/BI/Extensions/DeviceCertificateExtensions.cs +++ b/Disco.BI/BI/Extensions/DeviceCertificateExtensions.cs @@ -1,44 +1,44 @@ -using System.Linq; -using Disco.Data.Repository; -using Disco.Models.Repository; -using Disco.Services.Plugins; -using Disco.Services.Plugins.Features.CertificateProvider; -using System; -using System.Collections.Generic; - -namespace Disco.BI.Extensions -{ - public static class DeviceCertificateExtensions - { - - public static Tuple> AllocateCertificate(this Device device, DiscoDataContext dbContext) - { - if (!string.IsNullOrEmpty(device.DeviceProfile.CertificateProviderId)) - { - // REMOVED 2012-07-18 G# - Plugin is responsible for checking - //var deviceCertificates = dbContext.DeviceCertificates.Where(c => - // c.DeviceSerialNumber == device.SerialNumber && - // c.ProviderId == device.DeviceProfile.CertificateProviderId && - // c.Enabled == true).ToList(); - - // Load Plugin - PluginFeatureManifest featureManifest = Plugins.GetPluginFeature(device.DeviceProfile.CertificateProviderId, typeof(CertificateProviderFeature)); - - using (CertificateProviderFeature providerFeature = featureManifest.CreateInstance()) - { - // REMOVED 2012-07-18 G# - Plugin is responsible for checking - // Already Allocated Certificate - //if (deviceCertificates.Count > 0) - // return new Tuple>(deviceCertificates[0], providerPlugin.RemoveExistingCertificateNames()); - //else - - return providerFeature.AllocateCertificate(dbContext, device); - } - } - - // Device Profile does not allow certificate allocation - return null; - } - - } -} +using System.Linq; +using Disco.Data.Repository; +using Disco.Models.Repository; +using Disco.Services.Plugins; +using Disco.Services.Plugins.Features.CertificateProvider; +using System; +using System.Collections.Generic; + +namespace Disco.BI.Extensions +{ + public static class DeviceCertificateExtensions + { + + public static Tuple> AllocateCertificate(this Device device, DiscoDataContext dbContext) + { + if (!string.IsNullOrEmpty(device.DeviceProfile.CertificateProviderId)) + { + // REMOVED 2012-07-18 G# - Plugin is responsible for checking + //var deviceCertificates = dbContext.DeviceCertificates.Where(c => + // c.DeviceSerialNumber == device.SerialNumber && + // c.ProviderId == device.DeviceProfile.CertificateProviderId && + // c.Enabled == true).ToList(); + + // Load Plugin + PluginFeatureManifest featureManifest = Plugins.GetPluginFeature(device.DeviceProfile.CertificateProviderId, typeof(CertificateProviderFeature)); + + using (CertificateProviderFeature providerFeature = featureManifest.CreateInstance()) + { + // REMOVED 2012-07-18 G# - Plugin is responsible for checking + // Already Allocated Certificate + //if (deviceCertificates.Count > 0) + // return new Tuple>(deviceCertificates[0], providerPlugin.RemoveExistingCertificateNames()); + //else + + return providerFeature.AllocateCertificate(dbContext, device); + } + } + + // Device Profile does not allow certificate allocation + return null; + } + + } +} diff --git a/Disco.BI/BI/Extensions/DeviceProfileExtensions.cs b/Disco.BI/BI/Extensions/DeviceProfileExtensions.cs index e3019bff..28c42d9b 100644 --- a/Disco.BI/BI/Extensions/DeviceProfileExtensions.cs +++ b/Disco.BI/BI/Extensions/DeviceProfileExtensions.cs @@ -1,54 +1,54 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; -using Disco.Data.Configuration.Modules; - -namespace Disco.BI.Extensions -{ - public static class DeviceProfileExtensions - { - public const string ComputerNameExpressionCacheModule = "ComputerNameTemplate"; - - public static void ComputerNameInvalidateCache(this DeviceProfile deviceProfile) - { - Expressions.ExpressionCache.InvalidateKey(ComputerNameExpressionCacheModule, deviceProfile.Id.ToString()); - } - - public static bool CanDelete(this DeviceProfile dp, DiscoDataContext dbContext) - { - // Can't Delete Default Profile (Id: 1) - if (dp.Id == 1) - return false; - - // Can't Delete if Contains Devices - if (dbContext.Devices.Count(d => d.DeviceProfileId == dp.Id) > 0) - return false; - - return true; - } - public static void Delete(this DeviceProfile dp, DiscoDataContext dbContext) - { - if (!dp.CanDelete(dbContext)) - throw new InvalidOperationException("The state of this Device Profile doesn't allow it to be deleted"); - - // Update Defaults - if (dbContext.DiscoConfiguration.DeviceProfiles.DefaultDeviceProfileId == dp.Id) - dbContext.DiscoConfiguration.DeviceProfiles.DefaultDeviceProfileId = 1; - if (dbContext.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId == dp.Id) - dbContext.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId = 1; - - // Delete Profile - dbContext.DeviceProfiles.Remove(dp); - } - - // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. - //public static DeviceProfileConfiguration Configuration(this DeviceProfile dp, DiscoDataContext dbContext) - //{ - // return dbContext.DiscoConfiguration.DeviceProfiles.DeviceProfile(dp); - //} - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; +using Disco.Data.Configuration.Modules; + +namespace Disco.BI.Extensions +{ + public static class DeviceProfileExtensions + { + public const string ComputerNameExpressionCacheModule = "ComputerNameTemplate"; + + public static void ComputerNameInvalidateCache(this DeviceProfile deviceProfile) + { + Expressions.ExpressionCache.InvalidateKey(ComputerNameExpressionCacheModule, deviceProfile.Id.ToString()); + } + + public static bool CanDelete(this DeviceProfile dp, DiscoDataContext dbContext) + { + // Can't Delete Default Profile (Id: 1) + if (dp.Id == 1) + return false; + + // Can't Delete if Contains Devices + if (dbContext.Devices.Count(d => d.DeviceProfileId == dp.Id) > 0) + return false; + + return true; + } + public static void Delete(this DeviceProfile dp, DiscoDataContext dbContext) + { + if (!dp.CanDelete(dbContext)) + throw new InvalidOperationException("The state of this Device Profile doesn't allow it to be deleted"); + + // Update Defaults + if (dbContext.DiscoConfiguration.DeviceProfiles.DefaultDeviceProfileId == dp.Id) + dbContext.DiscoConfiguration.DeviceProfiles.DefaultDeviceProfileId = 1; + if (dbContext.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId == dp.Id) + dbContext.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId = 1; + + // Delete Profile + dbContext.DeviceProfiles.Remove(dp); + } + + // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. + //public static DeviceProfileConfiguration Configuration(this DeviceProfile dp, DiscoDataContext dbContext) + //{ + // return dbContext.DiscoConfiguration.DeviceProfiles.DeviceProfile(dp); + //} + + } +} diff --git a/Disco.BI/BI/Extensions/DocumentTemplateExtensions.cs b/Disco.BI/BI/Extensions/DocumentTemplateExtensions.cs index be4c8a52..2318dc25 100644 --- a/Disco.BI/BI/Extensions/DocumentTemplateExtensions.cs +++ b/Disco.BI/BI/Extensions/DocumentTemplateExtensions.cs @@ -1,220 +1,220 @@ -using System; -using System.Collections.Concurrent; -using System.Linq; -using System.Web; -using Disco.Data.Repository; -using Disco.Models.BI.DocumentTemplates; -using Disco.Models.Repository; -using System.Collections; -using System.Collections.Generic; -using iTextSharp.text.pdf; -using Disco.BI.Expressions; -using System.Drawing; -using System.IO; -using Disco.BI.DocumentTemplateBI; - -namespace Disco.BI.Extensions -{ - public static class DocumentTemplateExtensions - { - private const string DocumentTemplateExpressionCacheTemplate = "DocumentTemplate_{0}"; - - public static string RepositoryFilename(this DocumentTemplate dt, DiscoDataContext dbContext) - { - return System.IO.Path.Combine(DataStore.CreateLocation(dbContext, "DocumentTemplates"), string.Format("{0}.pdf", dt.Id)); - } - public static string SavePdfTemplate(this DocumentTemplate dt, DiscoDataContext dbContext, Stream TemplateFile) - { - string filePath = dt.RepositoryFilename(dbContext); - using (FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write)) - { - TemplateFile.CopyTo(fs); - } - Expressions.ExpressionCache.InvalidModule(string.Format(DocumentTemplateExpressionCacheTemplate, dt.Id)); - return filePath; - } - - public static DisposableImageCollection PdfPageImages(this PdfReader pdfReader, int PageNumber) - { - return Interop.Pdf.PdfImporter.GetPageImages(pdfReader, PageNumber); - } - - public static ConcurrentDictionary PdfExpressionsFromCache(this DocumentTemplate dt, DiscoDataContext dbContext) - { - string cacheModuleKey = string.Format(DocumentTemplateExpressionCacheTemplate, dt.Id); - var module = Expressions.ExpressionCache.GetModule(cacheModuleKey); - if (module == null) - { - // Cache - string templateFilename = dt.RepositoryFilename(dbContext); - PdfReader pdfReader = new PdfReader(templateFilename); - int pdfFieldOrdinal = 0; - foreach (string pdfFieldKey in pdfReader.AcroFields.Fields.Keys) - { - var pdfFieldValue = pdfReader.AcroFields.GetField(pdfFieldKey); - Expressions.ExpressionCache.SetValue(cacheModuleKey, pdfFieldKey, Expressions.Expression.Tokenize(pdfFieldKey, pdfFieldValue, pdfFieldOrdinal)); - pdfFieldOrdinal++; - } - pdfReader.Close(); - module = Expressions.ExpressionCache.GetModule(cacheModuleKey, true); - } - return module; - } - - public static List ExtractPdfExpressions(this DocumentTemplate dt, DiscoDataContext dbContext) - { - return dt.PdfExpressionsFromCache(dbContext).Values.OrderBy(e => e.Ordinal).ToList(); - } - public static System.IO.Stream GeneratePdfBulk(this DocumentTemplate dt, DiscoDataContext dbContext, User CreatorUser, System.DateTime Timestamp, params string[] DataObjectsIds) - { - return Interop.Pdf.PdfGenerator.GenerateBulkFromTemplate(dt, dbContext, CreatorUser, Timestamp, DataObjectsIds); - } - public static System.IO.Stream GeneratePdfBulk(this DocumentTemplate dt, DiscoDataContext dbContext, User CreatorUser, System.DateTime Timestamp, params object[] DataObjects) - { - return Interop.Pdf.PdfGenerator.GenerateBulkFromTemplate(dt, dbContext, CreatorUser, Timestamp, DataObjects); - } - public static System.IO.Stream GeneratePdf(this DocumentTemplate dt, DiscoDataContext dbContext, object Data, User CreatorUser, System.DateTime TimeStamp, DocumentState State, bool FlattenFields = false) - { - return Interop.Pdf.PdfGenerator.GenerateFromTemplate(dt, dbContext, Data, CreatorUser, TimeStamp, State, FlattenFields); - } - - public static Expression FilterExpressionFromCache(this DocumentTemplate dt) - { - return ExpressionCache.GetValue("DocumentTemplateFilterExpression", dt.Id, () => { return Expression.TokenizeSingleDynamic(null, dt.FilterExpression, 0); }); - } - public static void FilterExpressionInvalidateCache(this DocumentTemplate dt) - { - ExpressionCache.InvalidateKey("DocumentTemplateFilterExpression", dt.Id); - } - public static bool FilterExpressionMatches(this DocumentTemplate dt, object Data, DiscoDataContext DataContext, User User, System.DateTime TimeStamp, DocumentState State) - { - if (!string.IsNullOrEmpty(dt.FilterExpression)) - { - Expression compiledExpression = dt.FilterExpressionFromCache(); - System.Collections.IDictionary evaluatorVariables = Expression.StandardVariables(dt, DataContext, User, TimeStamp, State); - try - { - object er = compiledExpression.EvaluateFirst(Data, evaluatorVariables); - if (er is bool) - { - return (bool)er; - } - bool erBool; - if (bool.TryParse(er.ToString(), out erBool)) - { - return erBool; - } - } - catch - { - return false; - } - } - return true; - } - public static string GetDataId(this DocumentTemplate dt, object Data) - { - if (Data is string) - { - return (string)Data; - } - else - { - switch (dt.Scope) - { - case Models.Repository.DocumentTemplate.DocumentTemplateScopes.Device: - if (!(Data is Device)) - throw new ArgumentException("This Document Template is configured for Devices only", "Data"); - Device d = (Device)Data; - return d.SerialNumber; - case Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job: - if (!(Data is Job)) - throw new ArgumentException("This Document Template is configured for Jobs only", "Data"); - Job d2 = (Job)Data; - return d2.Id.ToString(); - case Models.Repository.DocumentTemplate.DocumentTemplateScopes.User: - if (!(Data is User)) - throw new ArgumentException("This Document Template is configured for Users only", "Data"); - User d3 = (User)Data; - return d3.Id; - default: - throw new InvalidOperationException("Invalid Document Template Scope"); - } - } - } - public static string UniqueIdentifier(string DocumentTemplateId, string DataId, string CreatorId, System.DateTime Timestamp) - { - return string.Format("Disco|1|{0}|{1}|{2}|{3:s}", - DocumentTemplateId, - DataId, - CreatorId, - Timestamp - ); - } - public static string UniqueIdentifier(this DocumentTemplate dt, object Data, string CreatorId, System.DateTime Timestamp) - { - return string.Format("Disco|1|{0}|{1}|{2}|{3:s}", - dt.Id, - dt.GetDataId(System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Data)), - CreatorId, - Timestamp - ); - } - public static string UniquePageIdentifier(this DocumentTemplate dt, object Data, string CreatorId, System.DateTime Timestamp, int Page) - { - return string.Format("Disco|1|{0}|{1}|{2}|{3:s}|{4}", - dt.Id, - dt.GetDataId(System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Data)), - CreatorId, - Timestamp, - Page - ); - } - public static List QRCodeLocations(this DocumentTemplate dt, DiscoDataContext dbContext) - { - return DocumentTemplateBI.DocumentTemplateQRCodeLocationCache.GetLocations(dt, dbContext); - } - public static void Delete(this DocumentTemplate dt, DiscoDataContext Context) - { - // Find & Rename all references - foreach (DeviceAttachment a in Context.DeviceAttachments.Where(a => a.DocumentTemplateId == dt.Id)) - { - a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments); - if (a.Comments.Length > 500) - a.Comments = a.Comments.Substring(0, 500); - a.DocumentTemplateId = null; - a.DocumentTemplate = null; - } - foreach (JobAttachment a in Context.JobAttachments.Where(a => a.DocumentTemplateId == dt.Id)) - { - a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments); - if (a.Comments.Length > 500) - a.Comments = a.Comments.Substring(0, 500); - a.DocumentTemplateId = null; - a.DocumentTemplate = null; - } - foreach (UserAttachment a in Context.UserAttachments.Where(a => a.DocumentTemplateId == dt.Id)) - { - a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments); - if (a.Comments.Length > 500) - a.Comments = a.Comments.Substring(0, 500); - a.DocumentTemplateId = null; - a.DocumentTemplate = null; - } - - // Delete SubTypes - dt.JobSubTypes.Clear(); - - // Delete Template - string templateRepositoryFilename = dt.RepositoryFilename(Context); - if (System.IO.File.Exists(templateRepositoryFilename)) - System.IO.File.Delete(templateRepositoryFilename); - - // Remove from Cache - dt.FilterExpressionInvalidateCache(); - - // Delete Document Template from Repository - Context.DocumentTemplates.Remove(dt); - } - } -} +using System; +using System.Collections.Concurrent; +using System.Linq; +using System.Web; +using Disco.Data.Repository; +using Disco.Models.BI.DocumentTemplates; +using Disco.Models.Repository; +using System.Collections; +using System.Collections.Generic; +using iTextSharp.text.pdf; +using Disco.BI.Expressions; +using System.Drawing; +using System.IO; +using Disco.BI.DocumentTemplateBI; + +namespace Disco.BI.Extensions +{ + public static class DocumentTemplateExtensions + { + private const string DocumentTemplateExpressionCacheTemplate = "DocumentTemplate_{0}"; + + public static string RepositoryFilename(this DocumentTemplate dt, DiscoDataContext dbContext) + { + return System.IO.Path.Combine(DataStore.CreateLocation(dbContext, "DocumentTemplates"), string.Format("{0}.pdf", dt.Id)); + } + public static string SavePdfTemplate(this DocumentTemplate dt, DiscoDataContext dbContext, Stream TemplateFile) + { + string filePath = dt.RepositoryFilename(dbContext); + using (FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write)) + { + TemplateFile.CopyTo(fs); + } + Expressions.ExpressionCache.InvalidModule(string.Format(DocumentTemplateExpressionCacheTemplate, dt.Id)); + return filePath; + } + + public static DisposableImageCollection PdfPageImages(this PdfReader pdfReader, int PageNumber) + { + return Interop.Pdf.PdfImporter.GetPageImages(pdfReader, PageNumber); + } + + public static ConcurrentDictionary PdfExpressionsFromCache(this DocumentTemplate dt, DiscoDataContext dbContext) + { + string cacheModuleKey = string.Format(DocumentTemplateExpressionCacheTemplate, dt.Id); + var module = Expressions.ExpressionCache.GetModule(cacheModuleKey); + if (module == null) + { + // Cache + string templateFilename = dt.RepositoryFilename(dbContext); + PdfReader pdfReader = new PdfReader(templateFilename); + int pdfFieldOrdinal = 0; + foreach (string pdfFieldKey in pdfReader.AcroFields.Fields.Keys) + { + var pdfFieldValue = pdfReader.AcroFields.GetField(pdfFieldKey); + Expressions.ExpressionCache.SetValue(cacheModuleKey, pdfFieldKey, Expressions.Expression.Tokenize(pdfFieldKey, pdfFieldValue, pdfFieldOrdinal)); + pdfFieldOrdinal++; + } + pdfReader.Close(); + module = Expressions.ExpressionCache.GetModule(cacheModuleKey, true); + } + return module; + } + + public static List ExtractPdfExpressions(this DocumentTemplate dt, DiscoDataContext dbContext) + { + return dt.PdfExpressionsFromCache(dbContext).Values.OrderBy(e => e.Ordinal).ToList(); + } + public static System.IO.Stream GeneratePdfBulk(this DocumentTemplate dt, DiscoDataContext dbContext, User CreatorUser, System.DateTime Timestamp, params string[] DataObjectsIds) + { + return Interop.Pdf.PdfGenerator.GenerateBulkFromTemplate(dt, dbContext, CreatorUser, Timestamp, DataObjectsIds); + } + public static System.IO.Stream GeneratePdfBulk(this DocumentTemplate dt, DiscoDataContext dbContext, User CreatorUser, System.DateTime Timestamp, params object[] DataObjects) + { + return Interop.Pdf.PdfGenerator.GenerateBulkFromTemplate(dt, dbContext, CreatorUser, Timestamp, DataObjects); + } + public static System.IO.Stream GeneratePdf(this DocumentTemplate dt, DiscoDataContext dbContext, object Data, User CreatorUser, System.DateTime TimeStamp, DocumentState State, bool FlattenFields = false) + { + return Interop.Pdf.PdfGenerator.GenerateFromTemplate(dt, dbContext, Data, CreatorUser, TimeStamp, State, FlattenFields); + } + + public static Expression FilterExpressionFromCache(this DocumentTemplate dt) + { + return ExpressionCache.GetValue("DocumentTemplateFilterExpression", dt.Id, () => { return Expression.TokenizeSingleDynamic(null, dt.FilterExpression, 0); }); + } + public static void FilterExpressionInvalidateCache(this DocumentTemplate dt) + { + ExpressionCache.InvalidateKey("DocumentTemplateFilterExpression", dt.Id); + } + public static bool FilterExpressionMatches(this DocumentTemplate dt, object Data, DiscoDataContext DataContext, User User, System.DateTime TimeStamp, DocumentState State) + { + if (!string.IsNullOrEmpty(dt.FilterExpression)) + { + Expression compiledExpression = dt.FilterExpressionFromCache(); + System.Collections.IDictionary evaluatorVariables = Expression.StandardVariables(dt, DataContext, User, TimeStamp, State); + try + { + object er = compiledExpression.EvaluateFirst(Data, evaluatorVariables); + if (er is bool) + { + return (bool)er; + } + bool erBool; + if (bool.TryParse(er.ToString(), out erBool)) + { + return erBool; + } + } + catch + { + return false; + } + } + return true; + } + public static string GetDataId(this DocumentTemplate dt, object Data) + { + if (Data is string) + { + return (string)Data; + } + else + { + switch (dt.Scope) + { + case Models.Repository.DocumentTemplate.DocumentTemplateScopes.Device: + if (!(Data is Device)) + throw new ArgumentException("This Document Template is configured for Devices only", "Data"); + Device d = (Device)Data; + return d.SerialNumber; + case Models.Repository.DocumentTemplate.DocumentTemplateScopes.Job: + if (!(Data is Job)) + throw new ArgumentException("This Document Template is configured for Jobs only", "Data"); + Job d2 = (Job)Data; + return d2.Id.ToString(); + case Models.Repository.DocumentTemplate.DocumentTemplateScopes.User: + if (!(Data is User)) + throw new ArgumentException("This Document Template is configured for Users only", "Data"); + User d3 = (User)Data; + return d3.Id; + default: + throw new InvalidOperationException("Invalid Document Template Scope"); + } + } + } + public static string UniqueIdentifier(string DocumentTemplateId, string DataId, string CreatorId, System.DateTime Timestamp) + { + return string.Format("Disco|1|{0}|{1}|{2}|{3:s}", + DocumentTemplateId, + DataId, + CreatorId, + Timestamp + ); + } + public static string UniqueIdentifier(this DocumentTemplate dt, object Data, string CreatorId, System.DateTime Timestamp) + { + return string.Format("Disco|1|{0}|{1}|{2}|{3:s}", + dt.Id, + dt.GetDataId(System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Data)), + CreatorId, + Timestamp + ); + } + public static string UniquePageIdentifier(this DocumentTemplate dt, object Data, string CreatorId, System.DateTime Timestamp, int Page) + { + return string.Format("Disco|1|{0}|{1}|{2}|{3:s}|{4}", + dt.Id, + dt.GetDataId(System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Data)), + CreatorId, + Timestamp, + Page + ); + } + public static List QRCodeLocations(this DocumentTemplate dt, DiscoDataContext dbContext) + { + return DocumentTemplateBI.DocumentTemplateQRCodeLocationCache.GetLocations(dt, dbContext); + } + public static void Delete(this DocumentTemplate dt, DiscoDataContext Context) + { + // Find & Rename all references + foreach (DeviceAttachment a in Context.DeviceAttachments.Where(a => a.DocumentTemplateId == dt.Id)) + { + a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments); + if (a.Comments.Length > 500) + a.Comments = a.Comments.Substring(0, 500); + a.DocumentTemplateId = null; + a.DocumentTemplate = null; + } + foreach (JobAttachment a in Context.JobAttachments.Where(a => a.DocumentTemplateId == dt.Id)) + { + a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments); + if (a.Comments.Length > 500) + a.Comments = a.Comments.Substring(0, 500); + a.DocumentTemplateId = null; + a.DocumentTemplate = null; + } + foreach (UserAttachment a in Context.UserAttachments.Where(a => a.DocumentTemplateId == dt.Id)) + { + a.Comments = string.Format("{0} - {1}", dt.Description, a.Comments); + if (a.Comments.Length > 500) + a.Comments = a.Comments.Substring(0, 500); + a.DocumentTemplateId = null; + a.DocumentTemplate = null; + } + + // Delete SubTypes + dt.JobSubTypes.Clear(); + + // Delete Template + string templateRepositoryFilename = dt.RepositoryFilename(Context); + if (System.IO.File.Exists(templateRepositoryFilename)) + System.IO.File.Delete(templateRepositoryFilename); + + // Remove from Cache + dt.FilterExpressionInvalidateCache(); + + // Delete Document Template from Repository + Context.DocumentTemplates.Remove(dt); + } + } +} diff --git a/Disco.BI/BI/Extensions/JobActionExtensions.cs b/Disco.BI/BI/Extensions/JobActionExtensions.cs index 937d351b..cb6f471e 100644 --- a/Disco.BI/BI/Extensions/JobActionExtensions.cs +++ b/Disco.BI/BI/Extensions/JobActionExtensions.cs @@ -1,415 +1,415 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Disco.Data.Repository; -using Disco.Models.BI.Config; -using Disco.Models.Repository; -using Disco.Services.Plugins; -using Disco.Services.Plugins.Features.WarrantyProvider; - -namespace Disco.BI.Extensions -{ - public static class JobActionExtensions - { - - #region Device Held - public static bool CanDeviceHeld(this Job j) - { - return (!j.ClosedDate.HasValue) && (j.DeviceSerialNumber != null) && - (!j.DeviceHeld.HasValue || j.DeviceReturnedDate.HasValue); - } - public static void OnDeviceHeld(this Job j, User Technician) - { - if (!j.CanDeviceHeld()) - throw new InvalidOperationException("Holding Device was Denied"); - - j.DeviceHeld = DateTime.Now; - j.DeviceHeldTechUserId = Technician.Id; - j.DeviceReadyForReturn = null; - j.DeviceReadyForReturnTechUserId = null; - j.DeviceReturnedDate = null; - j.DeviceReturnedTechUserId = null; - } - #endregion - - #region Device Ready for Return - public static bool CanDeviceReadyForReturn(this Job j) - { - return (!j.ClosedDate.HasValue) && j.DeviceHeld.HasValue && - !j.DeviceReadyForReturn.HasValue && !j.DeviceReturnedDate.HasValue; - } - public static void OnDeviceReadyForReturn(this Job j, User Technician) - { - if (!j.CanDeviceReadyForReturn()) - throw new InvalidOperationException("Device Ready for Return was Denied"); - - j.DeviceReadyForReturn = DateTime.Now; - j.DeviceReadyForReturnTechUserId = Technician.Id; - } - #endregion - - #region Device Returned - public static bool CanDeviceReturned(this Job j) - { - return (!j.ClosedDate.HasValue) && j.DeviceHeld.HasValue && - !j.DeviceReturnedDate.HasValue; - } - public static void OnDeviceReturned(this Job j, User Technician) - { - if (!j.CanDeviceReturned()) - throw new InvalidOperationException("Device Return was Denied"); - - j.DeviceReturnedDate = DateTime.Now; - j.DeviceReturnedTechUserId = Technician.Id; - } - #endregion - - #region Waiting For User Action - public static bool CanWaitingForUserAction(this Job j) - { - return !j.ClosedDate.HasValue && (j.UserId != null) && !j.WaitingForUserAction.HasValue; - } - public static void OnWaitingForUserAction(this Job j, DiscoDataContext dbContext, User Technician, string Reason) - { - if (!j.CanWaitingForUserAction()) - throw new InvalidOperationException("Waiting for User Action was Denied"); - - j.WaitingForUserAction = DateTime.Now; - - // Write Log - JobLog jobLog = new JobLog() - { - JobId = j.Id, - TechUserId = Technician.Id, - Timestamp = DateTime.Now, - Comments = string.Format("Waiting on User Action{0}Reason: {1}", Environment.NewLine, Reason) - }; - dbContext.JobLogs.Add(jobLog); - } - #endregion - - #region Not Waiting For User Action - public static bool CanNotWaitingForUserAction(this Job j) - { - return j.WaitingForUserAction.HasValue; - } - public static void OnNotWaitingForUserAction(this Job j, DiscoDataContext dbContext, User Technician, string Resolution) - { - if (!j.CanNotWaitingForUserAction()) - throw new InvalidOperationException("Not Waiting for User Action was Denied"); - - j.WaitingForUserAction = null; - - // Write Log - JobLog jobLog = new JobLog() - { - JobId = j.Id, - TechUserId = Technician.Id, - Timestamp = DateTime.Now, - Comments = string.Format("User Action Resolved{0}Resolution: {1}", Environment.NewLine, Resolution) - }; - dbContext.JobLogs.Add(jobLog); - } - #endregion - - #region Log Warranty - public static bool CanLogWarranty(this Job j) - { - return !j.ClosedDate.HasValue && - (j.DeviceSerialNumber != null) && - j.JobTypeId == JobType.JobTypeIds.HWar && - string.IsNullOrEmpty(j.JobMetaWarranty.ExternalReference); - } - public static void OnLogWarranty(this Job j, DiscoDataContext dbContext, string FaultDescription, PluginFeatureManifest WarrantyProviderDefinition, OrganisationAddress Address, User TechUser, Dictionary WarrantyProviderProperties) - { - if (!j.CanLogWarranty()) - throw new InvalidOperationException("Log Warranty was Denied"); - - if (string.IsNullOrWhiteSpace(FaultDescription)) - FaultDescription = j.GenerateFaultDescriptionFooter(dbContext, WarrantyProviderDefinition); - else - FaultDescription = string.Concat(FaultDescription, Environment.NewLine, Environment.NewLine, j.GenerateFaultDescriptionFooter(dbContext, WarrantyProviderDefinition)); - - using (WarrantyProviderFeature WarrantyProvider = WarrantyProviderDefinition.CreateInstance()) - { - string providerRef = WarrantyProvider.SubmitJob(dbContext, j, Address, TechUser, FaultDescription, WarrantyProviderProperties); - - j.JobMetaWarranty.ExternalLoggedDate = DateTime.Now; - j.JobMetaWarranty.ExternalName = WarrantyProvider.WarrantyProviderId; - - if (providerRef.Length > 100) - j.JobMetaWarranty.ExternalReference = providerRef.Substring(0, 100); - else - j.JobMetaWarranty.ExternalReference = providerRef; - - // Write Log - JobLog jobLog = new JobLog() - { - JobId = j.Id, - TechUserId = TechUser.Id, - Timestamp = DateTime.Now, - Comments = string.Format("Warranty Claim Submitted{0}{0}Provider: {1}{0}Repair Address: {2}{0}Provider Reference: {3}{0}{0}{4}", Environment.NewLine, WarrantyProvider.Manifest.Name, Address.Name, providerRef, FaultDescription) - }; - dbContext.JobLogs.Add(jobLog); - } - } - #endregion - - #region Convert HWar to HNWar - public static bool CanConvertHWarToHNWar(this Job j) - { - return !j.ClosedDate.HasValue && (j.DeviceSerialNumber != null) && - j.JobTypeId == JobType.JobTypeIds.HWar && string.IsNullOrEmpty(j.JobMetaWarranty.ExternalReference); - } - public static void OnConvertHWarToHNWar(this Job j, DiscoDataContext dbContext) - { - if (!j.CanConvertHWarToHNWar()) - throw new InvalidOperationException("Convert HWar to HNWar was Denied"); - - var techUser = UserBI.UserCache.CurrentUser; - - // Remove JobMetaWarranty - if (j.JobMetaWarranty != null) - dbContext.JobMetaWarranties.Remove(j.JobMetaWarranty); - - // Add JobMetaNonWarranty - var metaHNWar = new JobMetaNonWarranty() { Job = j }; - dbContext.JobMetaNonWarranties.Add(metaHNWar); - - // Swap Job Sub Types - List jobSubTypes = j.JobSubTypes.Select(jst => jst.Id).ToList(); - j.JobSubTypes.Clear(); - foreach (var jst in dbContext.JobSubTypes.Where(i => i.JobTypeId == JobType.JobTypeIds.HNWar && jobSubTypes.Contains(i.Id))) - j.JobSubTypes.Add(jst); - - // Add Components - var components = dbContext.DeviceComponents.Include("JobSubTypes").Where(c => !c.DeviceModelId.HasValue || c.DeviceModelId == j.Device.DeviceModelId); - var jobComponents = new List(); - foreach (var component in components) - { - if (!component.DeviceModelId.HasValue) - { - jobComponents.Add(component); - } - else - { - foreach (var st in component.JobSubTypes) - { - foreach (var jst in j.JobSubTypes) - { - if (st.JobTypeId == jst.JobTypeId && st.Id == jst.Id) - { - jobComponents.Add(component); - break; - } - } - if (jobComponents.Contains(component)) - break; - } - } - } - foreach (var component in jobComponents) - { - dbContext.JobComponents.Add(new JobComponent() - { - Job = j, - TechUserId = techUser.Id, - Cost = component.Cost, - Description = component.Description - }); - } - - // Write Log - JobLog jobLog = new JobLog() - { - JobId = j.Id, - TechUserId = techUser.Id, - Timestamp = DateTime.Now, - Comments = string.Format("Job Type Converted{0}From: {1}{0}To: {2}", Environment.NewLine, dbContext.JobTypes.Find(JobType.JobTypeIds.HWar), dbContext.JobTypes.Find(JobType.JobTypeIds.HNWar)) - }; - dbContext.JobLogs.Add(jobLog); - - j.JobTypeId = JobType.JobTypeIds.HNWar; - } - #endregion - - #region Warranty Completed - public static bool CanWarrantyCompleted(this Job j) - { - return (j.JobTypeId == JobType.JobTypeIds.HWar) && - j.JobMetaWarranty.ExternalLoggedDate.HasValue && - !j.JobMetaWarranty.ExternalCompletedDate.HasValue; - } - public static void OnWarrantyCompleted(this Job j) - { - if (!j.CanWarrantyCompleted()) - throw new InvalidOperationException("Warranty Completed was Denied"); - - j.JobMetaWarranty.ExternalCompletedDate = DateTime.Now; - } - #endregion - - #region Insurance Claim Form Sent - public static bool CanInsuranceClaimFormSent(this Job j) - { - return (j.JobTypeId == JobType.JobTypeIds.HNWar) && - j.JobMetaNonWarranty.IsInsuranceClaim && - !j.JobMetaInsurance.ClaimFormSentDate.HasValue; - } - public static void OnInsuranceClaimFormSent(this Job j) - { - if (!j.CanInsuranceClaimFormSent()) - throw new InvalidOperationException("Insurance Claim Form Sent was Denied"); - - var techUser = UserBI.UserCache.CurrentUser; - - j.JobMetaInsurance.ClaimFormSentDate = DateTime.Now; - j.JobMetaInsurance.ClaimFormSentUserId = techUser.Id; - } - #endregion - - #region Log Repair - public static bool CanLogRepair(this Job j) - { - return (j.JobTypeId == JobType.JobTypeIds.HNWar) && - (j.DeviceSerialNumber != null) && - !j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && - !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue; - } - public static void OnLogRepair(this Job j, string RepairerName, string RepairerReference) - { - if (!j.CanLogRepair()) - throw new InvalidOperationException("Log Repair was Denied"); - - if (j.JobMetaNonWarranty.RepairerName != RepairerName) - j.JobMetaNonWarranty.RepairerName = RepairerName; - if (j.JobMetaNonWarranty.RepairerReference != RepairerReference) - j.JobMetaNonWarranty.RepairerReference = RepairerReference; - j.JobMetaNonWarranty.RepairerLoggedDate = DateTime.Now; - } - #endregion - - #region Repair Complete - public static bool CanRepairComplete(this Job j) - { - return (j.JobTypeId == JobType.JobTypeIds.HNWar) && - j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && - !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue; - } - public static void OnRepairComplete(this Job j) - { - if (!j.CanRepairComplete()) - throw new InvalidOperationException("Repair Complete was Denied"); - - j.JobMetaNonWarranty.RepairerCompletedDate = DateTime.Now; - } - #endregion - - #region Close - public static bool CanClose(this Job j) - { - if (j.ClosedDate.HasValue) - return false; // Job already Closed - - if (j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue) - return false; // Device not returned to User - - if (j.WaitingForUserAction.HasValue) - return false; // Job waiting on User Action - - switch (j.JobTypeId) - { - case JobType.JobTypeIds.HWar: - if (!string.IsNullOrEmpty(j.JobMetaWarranty.ExternalReference) && !j.JobMetaWarranty.ExternalCompletedDate.HasValue) - return false; // Job Logged (Warranty) but not completed - break; - case JobType.JobTypeIds.HNWar: - if (j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue) - return false; // Job Logged (Repair) but not completed - if (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue || !j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue)) - return false; // Accounting Charge Required, but not added or paid - - // Removed Rule: 2012-05-31 - A Job can be closed if the decision has been made for the user not to pay... - //if (j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue) - // return false; // Accounting Charge Added, but not paid - - if (j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue) - return false; // Is Insurance Claim, but claim form not sent - break; - } - - return true; - } - public static void OnClose(this Job j, User Technician) - { - if (!j.CanClose()) - throw new InvalidOperationException("Close was Denied"); - - j.ClosedDate = DateTime.Now; - j.ClosedTechUserId = Technician.Id; - } - #endregion - - #region Reopen - public static bool CanReopen(this Job j) - { - return j.ClosedDate.HasValue; - } - public static void OnReopen(this Job j) - { - if (!j.CanReopen()) - throw new InvalidOperationException("Reopen was Denied"); - - j.ClosedDate = null; - j.ClosedTechUserId = null; - } - #endregion - - #region Delete - public static bool CanDelete(this Job j) - { - return j.ClosedDate.HasValue; - } - public static void OnDelete(this Job j, DiscoDataContext dbContext) - { - // Job Sub Types - j.JobSubTypes.Clear(); - - // Job Attachments - foreach (var ja in j.JobAttachments.ToArray()) - ja.OnDelete(dbContext); - j.JobAttachments.Clear(); - - // Job Components - foreach (var jc in j.JobComponents.ToArray()) - dbContext.JobComponents.Remove(jc); - j.JobComponents.Clear(); - - // Job Logs - foreach (var jl in j.JobLogs.ToArray()) - dbContext.JobLogs.Remove(jl); - j.JobLogs.Clear(); - - // Job Meta - if (j.JobMetaInsurance != null) - { - dbContext.JobMetaInsurances.Remove(j.JobMetaInsurance); - j.JobMetaInsurance = null; - } - if (j.JobMetaNonWarranty != null) - { - dbContext.JobMetaNonWarranties.Remove(j.JobMetaNonWarranty); - j.JobMetaNonWarranty = null; - } - if (j.JobMetaWarranty != null) - { - dbContext.JobMetaWarranties.Remove(j.JobMetaWarranty); - j.JobMetaWarranty = null; - } - - // Job - dbContext.Jobs.Remove(j); - } - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using Disco.Data.Repository; +using Disco.Models.BI.Config; +using Disco.Models.Repository; +using Disco.Services.Plugins; +using Disco.Services.Plugins.Features.WarrantyProvider; + +namespace Disco.BI.Extensions +{ + public static class JobActionExtensions + { + + #region Device Held + public static bool CanDeviceHeld(this Job j) + { + return (!j.ClosedDate.HasValue) && (j.DeviceSerialNumber != null) && + (!j.DeviceHeld.HasValue || j.DeviceReturnedDate.HasValue); + } + public static void OnDeviceHeld(this Job j, User Technician) + { + if (!j.CanDeviceHeld()) + throw new InvalidOperationException("Holding Device was Denied"); + + j.DeviceHeld = DateTime.Now; + j.DeviceHeldTechUserId = Technician.Id; + j.DeviceReadyForReturn = null; + j.DeviceReadyForReturnTechUserId = null; + j.DeviceReturnedDate = null; + j.DeviceReturnedTechUserId = null; + } + #endregion + + #region Device Ready for Return + public static bool CanDeviceReadyForReturn(this Job j) + { + return (!j.ClosedDate.HasValue) && j.DeviceHeld.HasValue && + !j.DeviceReadyForReturn.HasValue && !j.DeviceReturnedDate.HasValue; + } + public static void OnDeviceReadyForReturn(this Job j, User Technician) + { + if (!j.CanDeviceReadyForReturn()) + throw new InvalidOperationException("Device Ready for Return was Denied"); + + j.DeviceReadyForReturn = DateTime.Now; + j.DeviceReadyForReturnTechUserId = Technician.Id; + } + #endregion + + #region Device Returned + public static bool CanDeviceReturned(this Job j) + { + return (!j.ClosedDate.HasValue) && j.DeviceHeld.HasValue && + !j.DeviceReturnedDate.HasValue; + } + public static void OnDeviceReturned(this Job j, User Technician) + { + if (!j.CanDeviceReturned()) + throw new InvalidOperationException("Device Return was Denied"); + + j.DeviceReturnedDate = DateTime.Now; + j.DeviceReturnedTechUserId = Technician.Id; + } + #endregion + + #region Waiting For User Action + public static bool CanWaitingForUserAction(this Job j) + { + return !j.ClosedDate.HasValue && (j.UserId != null) && !j.WaitingForUserAction.HasValue; + } + public static void OnWaitingForUserAction(this Job j, DiscoDataContext dbContext, User Technician, string Reason) + { + if (!j.CanWaitingForUserAction()) + throw new InvalidOperationException("Waiting for User Action was Denied"); + + j.WaitingForUserAction = DateTime.Now; + + // Write Log + JobLog jobLog = new JobLog() + { + JobId = j.Id, + TechUserId = Technician.Id, + Timestamp = DateTime.Now, + Comments = string.Format("Waiting on User Action{0}Reason: {1}", Environment.NewLine, Reason) + }; + dbContext.JobLogs.Add(jobLog); + } + #endregion + + #region Not Waiting For User Action + public static bool CanNotWaitingForUserAction(this Job j) + { + return j.WaitingForUserAction.HasValue; + } + public static void OnNotWaitingForUserAction(this Job j, DiscoDataContext dbContext, User Technician, string Resolution) + { + if (!j.CanNotWaitingForUserAction()) + throw new InvalidOperationException("Not Waiting for User Action was Denied"); + + j.WaitingForUserAction = null; + + // Write Log + JobLog jobLog = new JobLog() + { + JobId = j.Id, + TechUserId = Technician.Id, + Timestamp = DateTime.Now, + Comments = string.Format("User Action Resolved{0}Resolution: {1}", Environment.NewLine, Resolution) + }; + dbContext.JobLogs.Add(jobLog); + } + #endregion + + #region Log Warranty + public static bool CanLogWarranty(this Job j) + { + return !j.ClosedDate.HasValue && + (j.DeviceSerialNumber != null) && + j.JobTypeId == JobType.JobTypeIds.HWar && + string.IsNullOrEmpty(j.JobMetaWarranty.ExternalReference); + } + public static void OnLogWarranty(this Job j, DiscoDataContext dbContext, string FaultDescription, PluginFeatureManifest WarrantyProviderDefinition, OrganisationAddress Address, User TechUser, Dictionary WarrantyProviderProperties) + { + if (!j.CanLogWarranty()) + throw new InvalidOperationException("Log Warranty was Denied"); + + if (string.IsNullOrWhiteSpace(FaultDescription)) + FaultDescription = j.GenerateFaultDescriptionFooter(dbContext, WarrantyProviderDefinition); + else + FaultDescription = string.Concat(FaultDescription, Environment.NewLine, Environment.NewLine, j.GenerateFaultDescriptionFooter(dbContext, WarrantyProviderDefinition)); + + using (WarrantyProviderFeature WarrantyProvider = WarrantyProviderDefinition.CreateInstance()) + { + string providerRef = WarrantyProvider.SubmitJob(dbContext, j, Address, TechUser, FaultDescription, WarrantyProviderProperties); + + j.JobMetaWarranty.ExternalLoggedDate = DateTime.Now; + j.JobMetaWarranty.ExternalName = WarrantyProvider.WarrantyProviderId; + + if (providerRef.Length > 100) + j.JobMetaWarranty.ExternalReference = providerRef.Substring(0, 100); + else + j.JobMetaWarranty.ExternalReference = providerRef; + + // Write Log + JobLog jobLog = new JobLog() + { + JobId = j.Id, + TechUserId = TechUser.Id, + Timestamp = DateTime.Now, + Comments = string.Format("Warranty Claim Submitted{0}{0}Provider: {1}{0}Repair Address: {2}{0}Provider Reference: {3}{0}{0}{4}", Environment.NewLine, WarrantyProvider.Manifest.Name, Address.Name, providerRef, FaultDescription) + }; + dbContext.JobLogs.Add(jobLog); + } + } + #endregion + + #region Convert HWar to HNWar + public static bool CanConvertHWarToHNWar(this Job j) + { + return !j.ClosedDate.HasValue && (j.DeviceSerialNumber != null) && + j.JobTypeId == JobType.JobTypeIds.HWar && string.IsNullOrEmpty(j.JobMetaWarranty.ExternalReference); + } + public static void OnConvertHWarToHNWar(this Job j, DiscoDataContext dbContext) + { + if (!j.CanConvertHWarToHNWar()) + throw new InvalidOperationException("Convert HWar to HNWar was Denied"); + + var techUser = UserBI.UserCache.CurrentUser; + + // Remove JobMetaWarranty + if (j.JobMetaWarranty != null) + dbContext.JobMetaWarranties.Remove(j.JobMetaWarranty); + + // Add JobMetaNonWarranty + var metaHNWar = new JobMetaNonWarranty() { Job = j }; + dbContext.JobMetaNonWarranties.Add(metaHNWar); + + // Swap Job Sub Types + List jobSubTypes = j.JobSubTypes.Select(jst => jst.Id).ToList(); + j.JobSubTypes.Clear(); + foreach (var jst in dbContext.JobSubTypes.Where(i => i.JobTypeId == JobType.JobTypeIds.HNWar && jobSubTypes.Contains(i.Id))) + j.JobSubTypes.Add(jst); + + // Add Components + var components = dbContext.DeviceComponents.Include("JobSubTypes").Where(c => !c.DeviceModelId.HasValue || c.DeviceModelId == j.Device.DeviceModelId); + var jobComponents = new List(); + foreach (var component in components) + { + if (!component.DeviceModelId.HasValue) + { + jobComponents.Add(component); + } + else + { + foreach (var st in component.JobSubTypes) + { + foreach (var jst in j.JobSubTypes) + { + if (st.JobTypeId == jst.JobTypeId && st.Id == jst.Id) + { + jobComponents.Add(component); + break; + } + } + if (jobComponents.Contains(component)) + break; + } + } + } + foreach (var component in jobComponents) + { + dbContext.JobComponents.Add(new JobComponent() + { + Job = j, + TechUserId = techUser.Id, + Cost = component.Cost, + Description = component.Description + }); + } + + // Write Log + JobLog jobLog = new JobLog() + { + JobId = j.Id, + TechUserId = techUser.Id, + Timestamp = DateTime.Now, + Comments = string.Format("Job Type Converted{0}From: {1}{0}To: {2}", Environment.NewLine, dbContext.JobTypes.Find(JobType.JobTypeIds.HWar), dbContext.JobTypes.Find(JobType.JobTypeIds.HNWar)) + }; + dbContext.JobLogs.Add(jobLog); + + j.JobTypeId = JobType.JobTypeIds.HNWar; + } + #endregion + + #region Warranty Completed + public static bool CanWarrantyCompleted(this Job j) + { + return (j.JobTypeId == JobType.JobTypeIds.HWar) && + j.JobMetaWarranty.ExternalLoggedDate.HasValue && + !j.JobMetaWarranty.ExternalCompletedDate.HasValue; + } + public static void OnWarrantyCompleted(this Job j) + { + if (!j.CanWarrantyCompleted()) + throw new InvalidOperationException("Warranty Completed was Denied"); + + j.JobMetaWarranty.ExternalCompletedDate = DateTime.Now; + } + #endregion + + #region Insurance Claim Form Sent + public static bool CanInsuranceClaimFormSent(this Job j) + { + return (j.JobTypeId == JobType.JobTypeIds.HNWar) && + j.JobMetaNonWarranty.IsInsuranceClaim && + !j.JobMetaInsurance.ClaimFormSentDate.HasValue; + } + public static void OnInsuranceClaimFormSent(this Job j) + { + if (!j.CanInsuranceClaimFormSent()) + throw new InvalidOperationException("Insurance Claim Form Sent was Denied"); + + var techUser = UserBI.UserCache.CurrentUser; + + j.JobMetaInsurance.ClaimFormSentDate = DateTime.Now; + j.JobMetaInsurance.ClaimFormSentUserId = techUser.Id; + } + #endregion + + #region Log Repair + public static bool CanLogRepair(this Job j) + { + return (j.JobTypeId == JobType.JobTypeIds.HNWar) && + (j.DeviceSerialNumber != null) && + !j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && + !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue; + } + public static void OnLogRepair(this Job j, string RepairerName, string RepairerReference) + { + if (!j.CanLogRepair()) + throw new InvalidOperationException("Log Repair was Denied"); + + if (j.JobMetaNonWarranty.RepairerName != RepairerName) + j.JobMetaNonWarranty.RepairerName = RepairerName; + if (j.JobMetaNonWarranty.RepairerReference != RepairerReference) + j.JobMetaNonWarranty.RepairerReference = RepairerReference; + j.JobMetaNonWarranty.RepairerLoggedDate = DateTime.Now; + } + #endregion + + #region Repair Complete + public static bool CanRepairComplete(this Job j) + { + return (j.JobTypeId == JobType.JobTypeIds.HNWar) && + j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && + !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue; + } + public static void OnRepairComplete(this Job j) + { + if (!j.CanRepairComplete()) + throw new InvalidOperationException("Repair Complete was Denied"); + + j.JobMetaNonWarranty.RepairerCompletedDate = DateTime.Now; + } + #endregion + + #region Close + public static bool CanClose(this Job j) + { + if (j.ClosedDate.HasValue) + return false; // Job already Closed + + if (j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue) + return false; // Device not returned to User + + if (j.WaitingForUserAction.HasValue) + return false; // Job waiting on User Action + + switch (j.JobTypeId) + { + case JobType.JobTypeIds.HWar: + if (!string.IsNullOrEmpty(j.JobMetaWarranty.ExternalReference) && !j.JobMetaWarranty.ExternalCompletedDate.HasValue) + return false; // Job Logged (Warranty) but not completed + break; + case JobType.JobTypeIds.HNWar: + if (j.JobMetaNonWarranty.RepairerLoggedDate.HasValue && !j.JobMetaNonWarranty.RepairerCompletedDate.HasValue) + return false; // Job Logged (Repair) but not completed + if (j.JobMetaNonWarranty.AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue || !j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue)) + return false; // Accounting Charge Required, but not added or paid + + // Removed Rule: 2012-05-31 - A Job can be closed if the decision has been made for the user not to pay... + //if (j.JobMetaNonWarranty.AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty.AccountingChargePaidDate.HasValue) + // return false; // Accounting Charge Added, but not paid + + if (j.JobMetaNonWarranty.IsInsuranceClaim && !j.JobMetaInsurance.ClaimFormSentDate.HasValue) + return false; // Is Insurance Claim, but claim form not sent + break; + } + + return true; + } + public static void OnClose(this Job j, User Technician) + { + if (!j.CanClose()) + throw new InvalidOperationException("Close was Denied"); + + j.ClosedDate = DateTime.Now; + j.ClosedTechUserId = Technician.Id; + } + #endregion + + #region Reopen + public static bool CanReopen(this Job j) + { + return j.ClosedDate.HasValue; + } + public static void OnReopen(this Job j) + { + if (!j.CanReopen()) + throw new InvalidOperationException("Reopen was Denied"); + + j.ClosedDate = null; + j.ClosedTechUserId = null; + } + #endregion + + #region Delete + public static bool CanDelete(this Job j) + { + return j.ClosedDate.HasValue; + } + public static void OnDelete(this Job j, DiscoDataContext dbContext) + { + // Job Sub Types + j.JobSubTypes.Clear(); + + // Job Attachments + foreach (var ja in j.JobAttachments.ToArray()) + ja.OnDelete(dbContext); + j.JobAttachments.Clear(); + + // Job Components + foreach (var jc in j.JobComponents.ToArray()) + dbContext.JobComponents.Remove(jc); + j.JobComponents.Clear(); + + // Job Logs + foreach (var jl in j.JobLogs.ToArray()) + dbContext.JobLogs.Remove(jl); + j.JobLogs.Clear(); + + // Job Meta + if (j.JobMetaInsurance != null) + { + dbContext.JobMetaInsurances.Remove(j.JobMetaInsurance); + j.JobMetaInsurance = null; + } + if (j.JobMetaNonWarranty != null) + { + dbContext.JobMetaNonWarranties.Remove(j.JobMetaNonWarranty); + j.JobMetaNonWarranty = null; + } + if (j.JobMetaWarranty != null) + { + dbContext.JobMetaWarranties.Remove(j.JobMetaWarranty); + j.JobMetaWarranty = null; + } + + // Job + dbContext.Jobs.Remove(j); + } + #endregion + } +} diff --git a/Disco.BI/BI/Extensions/JobFlagExtensions.cs b/Disco.BI/BI/Extensions/JobFlagExtensions.cs index ad47df74..505a1756 100644 --- a/Disco.BI/BI/Extensions/JobFlagExtensions.cs +++ b/Disco.BI/BI/Extensions/JobFlagExtensions.cs @@ -1,80 +1,80 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using System.ComponentModel.DataAnnotations; - -namespace Disco.BI.Extensions -{ - public static class JobFlagExtensions - { - - private static Dictionary> allFlags; - private static void CacheAllFlags() - { - if (allFlags == null) - { - var fType = typeof(Job.UserManagementFlags); - var fMembers = fType.GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static); - - var flags = new Dictionary>(); - foreach (var f in fMembers) - { - DisplayAttribute display = (DisplayAttribute)(f.GetCustomAttributes(typeof(DisplayAttribute), false)[0]); - string gn = display.GroupName; - Dictionary g; - if (!flags.TryGetValue(gn, out g)) - { - g = new Dictionary(); - flags.Add(gn, g); - } - g[(long)f.GetRawConstantValue()] = display.Name; - } - allFlags = flags; - } - } - - public static Dictionary>> ValidFlagsGrouped(this Job j) - { - Dictionary>> validFlags = new Dictionary>>(); - - CacheAllFlags(); - - var currentFlags = j.Flags ?? 0; - - foreach (var jt in j.JobSubTypes) - { - Dictionary g; - if (allFlags.TryGetValue(jt.Id, out g)) - { - validFlags[jt.Id] = g.Select(f => new Tuple(f.Key, f.Value, ((currentFlags & f.Key) == f.Key))).ToList(); - } - else - { - validFlags[jt.Id] = null; - } - } - return validFlags; - } - public static Dictionary> ValidFlags(this Job j) - { - Dictionary> validFlags = new Dictionary>(); - - CacheAllFlags(); - - var currentFlags = j.Flags ?? 0; - - foreach (var jt in j.JobSubTypes) - { - Dictionary g; - if (allFlags.TryGetValue(jt.Id, out g)) - { - foreach (var f in g) - validFlags[f.Key] = new Tuple(string.Format("{0}: {1}", jt.Description, f.Value), ((currentFlags & f.Key) == f.Key)); - } - } - return validFlags; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using System.ComponentModel.DataAnnotations; + +namespace Disco.BI.Extensions +{ + public static class JobFlagExtensions + { + + private static Dictionary> allFlags; + private static void CacheAllFlags() + { + if (allFlags == null) + { + var fType = typeof(Job.UserManagementFlags); + var fMembers = fType.GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static); + + var flags = new Dictionary>(); + foreach (var f in fMembers) + { + DisplayAttribute display = (DisplayAttribute)(f.GetCustomAttributes(typeof(DisplayAttribute), false)[0]); + string gn = display.GroupName; + Dictionary g; + if (!flags.TryGetValue(gn, out g)) + { + g = new Dictionary(); + flags.Add(gn, g); + } + g[(long)f.GetRawConstantValue()] = display.Name; + } + allFlags = flags; + } + } + + public static Dictionary>> ValidFlagsGrouped(this Job j) + { + Dictionary>> validFlags = new Dictionary>>(); + + CacheAllFlags(); + + var currentFlags = j.Flags ?? 0; + + foreach (var jt in j.JobSubTypes) + { + Dictionary g; + if (allFlags.TryGetValue(jt.Id, out g)) + { + validFlags[jt.Id] = g.Select(f => new Tuple(f.Key, f.Value, ((currentFlags & f.Key) == f.Key))).ToList(); + } + else + { + validFlags[jt.Id] = null; + } + } + return validFlags; + } + public static Dictionary> ValidFlags(this Job j) + { + Dictionary> validFlags = new Dictionary>(); + + CacheAllFlags(); + + var currentFlags = j.Flags ?? 0; + + foreach (var jt in j.JobSubTypes) + { + Dictionary g; + if (allFlags.TryGetValue(jt.Id, out g)) + { + foreach (var f in g) + validFlags[f.Key] = new Tuple(string.Format("{0}: {1}", jt.Description, f.Value), ((currentFlags & f.Key) == f.Key)); + } + } + return validFlags; + } + } +} diff --git a/Disco.BI/BI/Extensions/JobTableExtensions.cs b/Disco.BI/BI/Extensions/JobTableExtensions.cs index 0fdccdd2..4e45e1eb 100644 --- a/Disco.BI/BI/Extensions/JobTableExtensions.cs +++ b/Disco.BI/BI/Extensions/JobTableExtensions.cs @@ -1,94 +1,94 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.BI.Job; -using Disco.Models.Repository; -using Disco.Data.Repository; - -namespace Disco.BI.Extensions -{ - public static class JobTableExtensions - { - - public static void Fill(this JobTableModel model, DiscoDataContext dbContext, IQueryable Jobs) - { - if (model.ShowStatus) - { - - var jobItems = Jobs.Select(j => new JobTableModel.JobTableItemModelIncludeStatus() - { - Id = j.Id, - DeviceAddressId = j.Device.DeviceProfile.DefaultOrganisationAddress, - OpenedDate = j.OpenedDate, - ClosedDate = j.ClosedDate, - TypeId = j.JobTypeId, - TypeDescription = j.JobType.Description, - DeviceSerialNumber = j.Device.SerialNumber, - DeviceModelDescription = j.Device.DeviceModel.Description, - UserId = j.UserId, - UserDisplayName = j.User.DisplayName, - OpenedTechUserId = j.OpenedTechUserId, - OpenedTechUserDisplayName = j.OpenedTechUser.DisplayName, - Location = j.DeviceHeldLocation, - - JobMetaWarranty_ExternalReference = j.JobMetaWarranty.ExternalReference, - JobMetaWarranty_ExternalCompletedDate = j.JobMetaWarranty.ExternalCompletedDate, - JobMetaNonWarranty_RepairerLoggedDate = j.JobMetaNonWarranty.RepairerLoggedDate, - JobMetaNonWarranty_RepairerCompletedDate = j.JobMetaNonWarranty.RepairerCompletedDate, - JobMetaNonWarranty_AccountingChargeAddedDate = j.JobMetaNonWarranty.AccountingChargeAddedDate, - JobMetaNonWarranty_AccountingChargePaidDate = j.JobMetaNonWarranty.AccountingChargePaidDate, - JobMetaNonWarranty_AccountingChargeRequiredDate = j.JobMetaNonWarranty.AccountingChargeRequiredDate, - JobMetaNonWarranty_IsInsuranceClaim = j.JobMetaNonWarranty.IsInsuranceClaim, - JobMetaInsurance_ClaimFormSentDate = j.JobMetaInsurance.ClaimFormSentDate, - - WaitingForUserAction = j.WaitingForUserAction, - DeviceReadyForReturn = j.DeviceReadyForReturn, - DeviceHeld = j.DeviceHeld, - DeviceReturnedDate = j.DeviceReturnedDate, - JobMetaWarranty_ExternalName = j.JobMetaWarranty.ExternalName, - JobMetaNonWarranty_RepairerName = j.JobMetaNonWarranty.RepairerName - }); - - model.Items = new List(); - foreach (var j in jobItems) - { - j.StatusId = j.CalculateStatusId(); - j.StatusDescription = JobBI.Utilities.JobStatusDescription(j.StatusId, j); - - model.Items.Add(j); - } - } - else - { - model.Items = Jobs.Select(j => new JobTableModel.JobTableItemModel() - { - Id = j.Id, - DeviceAddressId = j.Device.DeviceProfile.DefaultOrganisationAddress, - OpenedDate = j.OpenedDate, - ClosedDate = j.ClosedDate, - TypeId = j.JobTypeId, - TypeDescription = j.JobType.Description, - DeviceSerialNumber = j.Device.SerialNumber, - DeviceModelDescription = j.Device.DeviceModel.Description, - UserId = j.UserId, - UserDisplayName = j.User.DisplayName, - OpenedTechUserId = j.OpenedTechUserId, - OpenedTechUserDisplayName = j.OpenedTechUser.DisplayName, - Location = j.DeviceHeldLocation - }).ToList(); - } - - if (!model.ShowDeviceAddress.HasValue) - model.ShowDeviceAddress = dbContext.DiscoConfiguration.MultiSiteMode; - - if (model.ShowDeviceAddress.Value) - { - foreach (var j in model.Items) - if (j.DeviceAddressId.HasValue) - j.DeviceAddress = dbContext.DiscoConfiguration.OrganisationAddresses.GetAddress(j.DeviceAddressId.Value).Name; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.BI.Job; +using Disco.Models.Repository; +using Disco.Data.Repository; + +namespace Disco.BI.Extensions +{ + public static class JobTableExtensions + { + + public static void Fill(this JobTableModel model, DiscoDataContext dbContext, IQueryable Jobs) + { + if (model.ShowStatus) + { + + var jobItems = Jobs.Select(j => new JobTableModel.JobTableItemModelIncludeStatus() + { + Id = j.Id, + DeviceAddressId = j.Device.DeviceProfile.DefaultOrganisationAddress, + OpenedDate = j.OpenedDate, + ClosedDate = j.ClosedDate, + TypeId = j.JobTypeId, + TypeDescription = j.JobType.Description, + DeviceSerialNumber = j.Device.SerialNumber, + DeviceModelDescription = j.Device.DeviceModel.Description, + UserId = j.UserId, + UserDisplayName = j.User.DisplayName, + OpenedTechUserId = j.OpenedTechUserId, + OpenedTechUserDisplayName = j.OpenedTechUser.DisplayName, + Location = j.DeviceHeldLocation, + + JobMetaWarranty_ExternalReference = j.JobMetaWarranty.ExternalReference, + JobMetaWarranty_ExternalCompletedDate = j.JobMetaWarranty.ExternalCompletedDate, + JobMetaNonWarranty_RepairerLoggedDate = j.JobMetaNonWarranty.RepairerLoggedDate, + JobMetaNonWarranty_RepairerCompletedDate = j.JobMetaNonWarranty.RepairerCompletedDate, + JobMetaNonWarranty_AccountingChargeAddedDate = j.JobMetaNonWarranty.AccountingChargeAddedDate, + JobMetaNonWarranty_AccountingChargePaidDate = j.JobMetaNonWarranty.AccountingChargePaidDate, + JobMetaNonWarranty_AccountingChargeRequiredDate = j.JobMetaNonWarranty.AccountingChargeRequiredDate, + JobMetaNonWarranty_IsInsuranceClaim = j.JobMetaNonWarranty.IsInsuranceClaim, + JobMetaInsurance_ClaimFormSentDate = j.JobMetaInsurance.ClaimFormSentDate, + + WaitingForUserAction = j.WaitingForUserAction, + DeviceReadyForReturn = j.DeviceReadyForReturn, + DeviceHeld = j.DeviceHeld, + DeviceReturnedDate = j.DeviceReturnedDate, + JobMetaWarranty_ExternalName = j.JobMetaWarranty.ExternalName, + JobMetaNonWarranty_RepairerName = j.JobMetaNonWarranty.RepairerName + }); + + model.Items = new List(); + foreach (var j in jobItems) + { + j.StatusId = j.CalculateStatusId(); + j.StatusDescription = JobBI.Utilities.JobStatusDescription(j.StatusId, j); + + model.Items.Add(j); + } + } + else + { + model.Items = Jobs.Select(j => new JobTableModel.JobTableItemModel() + { + Id = j.Id, + DeviceAddressId = j.Device.DeviceProfile.DefaultOrganisationAddress, + OpenedDate = j.OpenedDate, + ClosedDate = j.ClosedDate, + TypeId = j.JobTypeId, + TypeDescription = j.JobType.Description, + DeviceSerialNumber = j.Device.SerialNumber, + DeviceModelDescription = j.Device.DeviceModel.Description, + UserId = j.UserId, + UserDisplayName = j.User.DisplayName, + OpenedTechUserId = j.OpenedTechUserId, + OpenedTechUserDisplayName = j.OpenedTechUser.DisplayName, + Location = j.DeviceHeldLocation + }).ToList(); + } + + if (!model.ShowDeviceAddress.HasValue) + model.ShowDeviceAddress = dbContext.DiscoConfiguration.MultiSiteMode; + + if (model.ShowDeviceAddress.Value) + { + foreach (var j in model.Items) + if (j.DeviceAddressId.HasValue) + j.DeviceAddress = dbContext.DiscoConfiguration.OrganisationAddresses.GetAddress(j.DeviceAddressId.Value).Name; + } + } + + } +} diff --git a/Disco.BI/BI/Extensions/UserExtensions.cs b/Disco.BI/BI/Extensions/UserExtensions.cs index 5e2e5254..37cc30df 100644 --- a/Disco.BI/BI/Extensions/UserExtensions.cs +++ b/Disco.BI/BI/Extensions/UserExtensions.cs @@ -1,65 +1,65 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; -using System.IO; -using Disco.Models.BI.DocumentTemplates; -using Disco.Models.Interop.ActiveDirectory; - -namespace Disco.BI.Extensions -{ - public static class UserExtensions - { - public static UserAttachment CreateAttachment(this User User, DiscoDataContext dbContext, User CreatorUser, string Filename, string MimeType, string Comments, Stream Content, DocumentTemplate DocumentTemplate = null, byte[] PdfThumbnail = null) - { - if (string.IsNullOrEmpty(MimeType) || MimeType.Equals("unknown/unknown", StringComparison.InvariantCultureIgnoreCase)) - MimeType = Interop.MimeTypes.ResolveMimeType(Filename); - - UserAttachment ua = new UserAttachment() - { - UserId = User.Id, - TechUserId = CreatorUser.Id, - Filename = Filename, - MimeType = MimeType, - Timestamp = DateTime.Now, - Comments = Comments - }; - - if (DocumentTemplate != null) - ua.DocumentTemplateId = DocumentTemplate.Id; - - dbContext.UserAttachments.Add(ua); - dbContext.SaveChanges(); - - ua.SaveAttachment(dbContext, Content); - Content.Position = 0; - if (PdfThumbnail == null) - ua.GenerateThumbnail(dbContext, Content); - else - ua.SaveThumbnailAttachment(dbContext, PdfThumbnail); - - return ua; - } - - public static List AvailableDocumentTemplates(this User u, DiscoDataContext dbContext, User User, DateTime TimeStamp) - { - var dts = dbContext.DocumentTemplates.Include("JobSubTypes") - .Where(dt => dt.Scope == DocumentTemplate.DocumentTemplateScopes.User) - .ToArray() - .Where(dt => dt.FilterExpressionMatches(u, dbContext, User, TimeStamp, DocumentState.DefaultState())).ToList(); - - return dts; - } - - public static List CurrentDeviceUserAssignments(this User u) - { - return u.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).ToList(); - } - public static ActiveDirectoryUserAccount ActiveDirectoryAccount(this User User, params string[] AdditionalProperties) - { - return Interop.ActiveDirectory.ActiveDirectory.GetUserAccount(User.Id, AdditionalProperties); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; +using System.IO; +using Disco.Models.BI.DocumentTemplates; +using Disco.Models.Interop.ActiveDirectory; + +namespace Disco.BI.Extensions +{ + public static class UserExtensions + { + public static UserAttachment CreateAttachment(this User User, DiscoDataContext dbContext, User CreatorUser, string Filename, string MimeType, string Comments, Stream Content, DocumentTemplate DocumentTemplate = null, byte[] PdfThumbnail = null) + { + if (string.IsNullOrEmpty(MimeType) || MimeType.Equals("unknown/unknown", StringComparison.InvariantCultureIgnoreCase)) + MimeType = Interop.MimeTypes.ResolveMimeType(Filename); + + UserAttachment ua = new UserAttachment() + { + UserId = User.Id, + TechUserId = CreatorUser.Id, + Filename = Filename, + MimeType = MimeType, + Timestamp = DateTime.Now, + Comments = Comments + }; + + if (DocumentTemplate != null) + ua.DocumentTemplateId = DocumentTemplate.Id; + + dbContext.UserAttachments.Add(ua); + dbContext.SaveChanges(); + + ua.SaveAttachment(dbContext, Content); + Content.Position = 0; + if (PdfThumbnail == null) + ua.GenerateThumbnail(dbContext, Content); + else + ua.SaveThumbnailAttachment(dbContext, PdfThumbnail); + + return ua; + } + + public static List AvailableDocumentTemplates(this User u, DiscoDataContext dbContext, User User, DateTime TimeStamp) + { + var dts = dbContext.DocumentTemplates.Include("JobSubTypes") + .Where(dt => dt.Scope == DocumentTemplate.DocumentTemplateScopes.User) + .ToArray() + .Where(dt => dt.FilterExpressionMatches(u, dbContext, User, TimeStamp, DocumentState.DefaultState())).ToList(); + + return dts; + } + + public static List CurrentDeviceUserAssignments(this User u) + { + return u.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).ToList(); + } + public static ActiveDirectoryUserAccount ActiveDirectoryAccount(this User User, params string[] AdditionalProperties) + { + return Interop.ActiveDirectory.ActiveDirectory.GetUserAccount(User.Id, AdditionalProperties); + } + } +} diff --git a/Disco.BI/BI/Extensions/UtilityExtensions.cs b/Disco.BI/BI/Extensions/UtilityExtensions.cs index 9a901b77..6a5eceb9 100644 --- a/Disco.BI/BI/Extensions/UtilityExtensions.cs +++ b/Disco.BI/BI/Extensions/UtilityExtensions.cs @@ -1,313 +1,313 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.IO; -using System.Drawing.Imaging; - -namespace Disco.BI.Extensions -{ - public static class UtilityExtensions - { - - public static string StreamToString(this System.IO.Stream stream) - { - if (stream.Position != 0 && stream.CanSeek) - { - stream.Position = 0; - } - using (System.IO.StreamReader sr = new System.IO.StreamReader(stream)) - { - return sr.ReadToEnd(); - } - } - - #region Date/Time Extensions - public static string ToFuzzy(this DateTime d) - { - var n = DateTime.Now; - - // Today - if (d.Date == n.Date) - { - if (d < n) - { - // Earlier - if (d > n.AddMinutes(-1)) - return "A moment ago"; - - if (d > n.AddMinutes(-10)) - return "A few minutes ago"; - } - else - { - // Later - if (d < n.AddMinutes(1)) - return "In a moment"; - - if (d < n.AddMinutes(10)) - return "In a few minutes"; - } - - return string.Format("Today at {0:h:mm tt}", d); - } - - if (d.Date < n.Date) - { - // PAST - var dif = n.Subtract(d); - - // Yesterday - if (d.Date == n.Date.AddDays(-1)) - return string.Format("Yesterday at {0:h:mm tt}", d); - // Last Week - if (dif.TotalDays <= 7) - return string.Format("Last {0:dddd} at {0:h:mm tt}", d); - // Within 8 Weeks - if (d > n.Date.AddMonths(-2)) - return string.Format("{0} Weeks ago, {1:ddd, d MMM}", (int)(dif.TotalDays / 7), d); - // Same Year - if (d.Year == n.Year) - return string.Format("{0} Months ago, {1:ddd, d MMM}", (int)(dif.TotalDays / 30), d); - } - else - { - // Future - var dif = d.Subtract(n); - - // Tomorrow - if (d.Date == n.Date.AddDays(1)) - return string.Format("Tomorrow at {0:h:mm tt}", d); - // Next Week - if (dif.TotalDays <= 7) - return string.Format("Next {0:dddd} at {0:h:mm tt}", d); - // < 2 Month - if (d < n.Date.AddMonths(2)) - return string.Format("In {0} Weeks, {1:ddd, d MMM}", (int)(dif.TotalDays / 7), d); - // Same Year - if (d.Year == n.Year) - return string.Format("In {0} Months, {1:ddd, d MMM}", (int)(dif.TotalDays / 30), d); - } - - return d.ToString("ddd, d MMM yyyy"); - } - public static string ToFuzzy(this DateTime? d, string NullValue = "N/A") - { - if (d.HasValue) - return ToFuzzy(d.Value); - else - return NullValue; - } - public static string ToFullDateTime(this DateTime d) - { - return d.ToString("ddd, d MMM yyyy @ h:mm:sstt"); - } - public static string ToFullDateTime(this DateTime? d, string NullValue = "N/A") - { - if (d.HasValue) - return ToFullDateTime(d.Value); - else - return NullValue; - } - public static long ToSortableDateTime(this DateTime? d) - { - if (d.HasValue) - return d.Value.ToBinary(); - else - return -1; - } - public static long ToSortableDateTime(this DateTime d) - { - return d.ToBinary(); - } - #endregion - - #region Image Extensions - public static Bitmap ResizeImage(this Image Source, int Width, int Height, Brush BackgroundColor = null) - { - Bitmap destination = new Bitmap(Width, Height); - destination.SetResolution(72, 72); - using (Graphics destinationGraphics = Graphics.FromImage(destination)) - { - destinationGraphics.CompositingQuality = CompositingQuality.HighQuality; - destinationGraphics.InterpolationMode = InterpolationMode.HighQualityBicubic; - destinationGraphics.SmoothingMode = SmoothingMode.HighQuality; - - if (BackgroundColor != null) - destinationGraphics.FillRectangle(BackgroundColor, destinationGraphics.VisibleClipBounds); - - float ratio = Math.Min((float)(destination.Width) / (float)(Source.Width), (float)(destination.Height) / (float)(Source.Height)); - - destinationGraphics.DrawImageResized(Source, ratio); - } - - return destination; - } - public static void DrawImageResized(this Graphics graphics, Image SourceImage, float? Scale = null, float LocationX = -1, float LocationY = -1) - { - RectangleF clipBounds = graphics.VisibleClipBounds; - if (Scale == null) // Calculate Scale - Scale = Math.Min(clipBounds.Width / SourceImage.Width, clipBounds.Height / SourceImage.Height); - float newWidth = SourceImage.Width * Scale.Value; - float newHeight = SourceImage.Height * Scale.Value; - float newLeft = LocationX; - float newTop = LocationY; - - if (newLeft < 0 || newTop < 0) - { - if (newWidth < clipBounds.Width) - newLeft = (clipBounds.Width - newWidth) / 2; - else - newLeft = 0; - if (newHeight < clipBounds.Height) - newTop = (clipBounds.Height - newHeight) / 2; - else - newTop = 0; - } - newLeft += clipBounds.Left; - newTop += clipBounds.Top; - - graphics.DrawImage(SourceImage, new RectangleF(newLeft, newTop, newWidth, newHeight), new RectangleF(0, 0, SourceImage.Width, SourceImage.Height), GraphicsUnit.Pixel); - } - public static void EmbedIconOverlay(this Image Source, Image Icon) - { - int top = Math.Max(0, Source.Height - Icon.Height); - int left = Math.Max(0, Source.Width - Icon.Width); - - using (Graphics sourceGraphics = Graphics.FromImage(Source)) - { - sourceGraphics.DrawImage(Icon, left, top); - } - } - public static void SavePng(this Image Source, string Filename) - { - using (FileStream outStream = new FileStream(Filename, FileMode.Create, FileAccess.Write, FileShare.None)) - { - SavePng(Source, outStream); - outStream.Flush(); - outStream.Close(); - } - } - public static void SavePng(this Image Source, Stream OutStream) - { - Source.Save(OutStream, ImageFormat.Png); - } - public static Stream SavePng(this Image Source) - { - MemoryStream outStream = new MemoryStream(); - Source.SavePng(outStream); - outStream.Position = 0; - return outStream; - } - public static Stream SaveJpg(this Image Source, int Quality) - { - MemoryStream outStream = new MemoryStream(); - Source.SaveJpg(Quality, outStream); - outStream.Position = 0; - return outStream; - } - public static void SaveJpg(this Image Source, int Quality, string Filename) - { - using (FileStream outStream = new FileStream(Filename, FileMode.Create, FileAccess.Write, FileShare.None)) - { - SaveJpg(Source, Quality, outStream); - outStream.Flush(); - outStream.Close(); - } - } - public static void SaveJpg(this Image Source, int Quality, Stream OutStream) - { - ImageCodecInfo jpgCodec = ImageCodecInfo.GetImageEncoders().Where(c => c.MimeType.Equals("image/jpeg", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault(); - if (jpgCodec != null) - { - if (Quality < 0 || Quality > 100) - throw new ArgumentOutOfRangeException("Quality", "Quality must be a positive integer <= 100"); - using (EncoderParameters ep = new EncoderParameters(1)) - { - ep.Param[0] = new EncoderParameter(Encoder.Quality, Quality); - Source.Save(OutStream, jpgCodec, ep); - } - } - else - { - // Fallback - Source.Save(OutStream, ImageFormat.Jpeg); - } - } - public static ImageMontage BuildImageMontage(this IEnumerable Images, int MaxHeight = -1, int MaxWidth = -1, bool EnforceDimensions = false) - { - if (EnforceDimensions && (MaxHeight < 0 || MaxWidth < 0)) - throw new ArgumentOutOfRangeException("EnforceDimensions", "Dimensions can only be enforced when a MaxHeight and MaxWidth is supplied"); - - Dictionary imageLocations = new Dictionary(); - double imageScale = 1.0; - int totalHeight = Images.Max(i => i.Height); - int totalWidth = Images.Sum(i => i.Width); - if (MaxHeight > 0 && totalHeight > MaxHeight) - { - imageScale = (double)MaxHeight / (double)totalHeight; - } - if (MaxWidth > 0 && totalWidth > MaxWidth) - { - imageScale = System.Math.Min(imageScale, (double)MaxWidth / (double)totalWidth); - } - int scaledHeight = EnforceDimensions ? MaxHeight : (int)System.Math.Round((double)totalHeight * imageScale); - int scaledWidth = EnforceDimensions ? MaxWidth : (int)System.Math.Round((double)totalWidth * imageScale); - System.Drawing.Bitmap imageResult = new System.Drawing.Bitmap(scaledWidth, scaledHeight); - imageResult.SetResolution(72f, 72f); - - using (Graphics g = Graphics.FromImage(imageResult)) - { - g.FillRectangle(Brushes.White, new Rectangle(Point.Empty, imageResult.Size)); - - int imageResultNextOffset = 0; - foreach (Image i in Images) - { - Rectangle imagePosition = new Rectangle(imageResultNextOffset, 0, (int)System.Math.Round((double)i.Width * imageScale), (int)System.Math.Round((double)i.Height * imageScale)); - System.Drawing.Rectangle imageSize = new System.Drawing.Rectangle(0, 0, i.Width, i.Height); - g.DrawImage(i, imagePosition, imageSize, System.Drawing.GraphicsUnit.Pixel); - imageLocations[i] = imageResultNextOffset; - imageResultNextOffset += imagePosition.Width; - } - } - - return new ImageMontage() { Montage = imageResult, MontageScale = imageScale, MontageSourceImageOffsets = imageLocations }; - } - public class ImageMontage : IDisposable - { - - public Image Montage { get; set; } - public double MontageScale { get; set; } - public Dictionary MontageSourceImageOffsets { get; set; } - - public void Dispose() - { - if (Montage != null) - { - Montage.Dispose(); - Montage = null; - } - if (MontageSourceImageOffsets != null) - { - MontageSourceImageOffsets.Clear(); - MontageSourceImageOffsets = null; - } - } - } - - public static Color InterpolateColours(this Color Start, Color End, double Progress) - { - if (Progress > 1 || Progress < 0) - throw new ArgumentOutOfRangeException("Progress", "Progress must be >= 0 && <= 1"); - - return Color.FromArgb( - (byte)(Start.A * (1 - Progress) + (End.A * Progress)), - (byte)(Start.R * (1 - Progress) + (End.R * Progress)), - (byte)(Start.G * (1 - Progress) + (End.G * Progress)), - (byte)(Start.B * (1 - Progress) + (End.B * Progress)) - ); - } - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.IO; +using System.Drawing.Imaging; + +namespace Disco.BI.Extensions +{ + public static class UtilityExtensions + { + + public static string StreamToString(this System.IO.Stream stream) + { + if (stream.Position != 0 && stream.CanSeek) + { + stream.Position = 0; + } + using (System.IO.StreamReader sr = new System.IO.StreamReader(stream)) + { + return sr.ReadToEnd(); + } + } + + #region Date/Time Extensions + public static string ToFuzzy(this DateTime d) + { + var n = DateTime.Now; + + // Today + if (d.Date == n.Date) + { + if (d < n) + { + // Earlier + if (d > n.AddMinutes(-1)) + return "A moment ago"; + + if (d > n.AddMinutes(-10)) + return "A few minutes ago"; + } + else + { + // Later + if (d < n.AddMinutes(1)) + return "In a moment"; + + if (d < n.AddMinutes(10)) + return "In a few minutes"; + } + + return string.Format("Today at {0:h:mm tt}", d); + } + + if (d.Date < n.Date) + { + // PAST + var dif = n.Subtract(d); + + // Yesterday + if (d.Date == n.Date.AddDays(-1)) + return string.Format("Yesterday at {0:h:mm tt}", d); + // Last Week + if (dif.TotalDays <= 7) + return string.Format("Last {0:dddd} at {0:h:mm tt}", d); + // Within 8 Weeks + if (d > n.Date.AddMonths(-2)) + return string.Format("{0} Weeks ago, {1:ddd, d MMM}", (int)(dif.TotalDays / 7), d); + // Same Year + if (d.Year == n.Year) + return string.Format("{0} Months ago, {1:ddd, d MMM}", (int)(dif.TotalDays / 30), d); + } + else + { + // Future + var dif = d.Subtract(n); + + // Tomorrow + if (d.Date == n.Date.AddDays(1)) + return string.Format("Tomorrow at {0:h:mm tt}", d); + // Next Week + if (dif.TotalDays <= 7) + return string.Format("Next {0:dddd} at {0:h:mm tt}", d); + // < 2 Month + if (d < n.Date.AddMonths(2)) + return string.Format("In {0} Weeks, {1:ddd, d MMM}", (int)(dif.TotalDays / 7), d); + // Same Year + if (d.Year == n.Year) + return string.Format("In {0} Months, {1:ddd, d MMM}", (int)(dif.TotalDays / 30), d); + } + + return d.ToString("ddd, d MMM yyyy"); + } + public static string ToFuzzy(this DateTime? d, string NullValue = "N/A") + { + if (d.HasValue) + return ToFuzzy(d.Value); + else + return NullValue; + } + public static string ToFullDateTime(this DateTime d) + { + return d.ToString("ddd, d MMM yyyy @ h:mm:sstt"); + } + public static string ToFullDateTime(this DateTime? d, string NullValue = "N/A") + { + if (d.HasValue) + return ToFullDateTime(d.Value); + else + return NullValue; + } + public static long ToSortableDateTime(this DateTime? d) + { + if (d.HasValue) + return d.Value.ToBinary(); + else + return -1; + } + public static long ToSortableDateTime(this DateTime d) + { + return d.ToBinary(); + } + #endregion + + #region Image Extensions + public static Bitmap ResizeImage(this Image Source, int Width, int Height, Brush BackgroundColor = null) + { + Bitmap destination = new Bitmap(Width, Height); + destination.SetResolution(72, 72); + using (Graphics destinationGraphics = Graphics.FromImage(destination)) + { + destinationGraphics.CompositingQuality = CompositingQuality.HighQuality; + destinationGraphics.InterpolationMode = InterpolationMode.HighQualityBicubic; + destinationGraphics.SmoothingMode = SmoothingMode.HighQuality; + + if (BackgroundColor != null) + destinationGraphics.FillRectangle(BackgroundColor, destinationGraphics.VisibleClipBounds); + + float ratio = Math.Min((float)(destination.Width) / (float)(Source.Width), (float)(destination.Height) / (float)(Source.Height)); + + destinationGraphics.DrawImageResized(Source, ratio); + } + + return destination; + } + public static void DrawImageResized(this Graphics graphics, Image SourceImage, float? Scale = null, float LocationX = -1, float LocationY = -1) + { + RectangleF clipBounds = graphics.VisibleClipBounds; + if (Scale == null) // Calculate Scale + Scale = Math.Min(clipBounds.Width / SourceImage.Width, clipBounds.Height / SourceImage.Height); + float newWidth = SourceImage.Width * Scale.Value; + float newHeight = SourceImage.Height * Scale.Value; + float newLeft = LocationX; + float newTop = LocationY; + + if (newLeft < 0 || newTop < 0) + { + if (newWidth < clipBounds.Width) + newLeft = (clipBounds.Width - newWidth) / 2; + else + newLeft = 0; + if (newHeight < clipBounds.Height) + newTop = (clipBounds.Height - newHeight) / 2; + else + newTop = 0; + } + newLeft += clipBounds.Left; + newTop += clipBounds.Top; + + graphics.DrawImage(SourceImage, new RectangleF(newLeft, newTop, newWidth, newHeight), new RectangleF(0, 0, SourceImage.Width, SourceImage.Height), GraphicsUnit.Pixel); + } + public static void EmbedIconOverlay(this Image Source, Image Icon) + { + int top = Math.Max(0, Source.Height - Icon.Height); + int left = Math.Max(0, Source.Width - Icon.Width); + + using (Graphics sourceGraphics = Graphics.FromImage(Source)) + { + sourceGraphics.DrawImage(Icon, left, top); + } + } + public static void SavePng(this Image Source, string Filename) + { + using (FileStream outStream = new FileStream(Filename, FileMode.Create, FileAccess.Write, FileShare.None)) + { + SavePng(Source, outStream); + outStream.Flush(); + outStream.Close(); + } + } + public static void SavePng(this Image Source, Stream OutStream) + { + Source.Save(OutStream, ImageFormat.Png); + } + public static Stream SavePng(this Image Source) + { + MemoryStream outStream = new MemoryStream(); + Source.SavePng(outStream); + outStream.Position = 0; + return outStream; + } + public static Stream SaveJpg(this Image Source, int Quality) + { + MemoryStream outStream = new MemoryStream(); + Source.SaveJpg(Quality, outStream); + outStream.Position = 0; + return outStream; + } + public static void SaveJpg(this Image Source, int Quality, string Filename) + { + using (FileStream outStream = new FileStream(Filename, FileMode.Create, FileAccess.Write, FileShare.None)) + { + SaveJpg(Source, Quality, outStream); + outStream.Flush(); + outStream.Close(); + } + } + public static void SaveJpg(this Image Source, int Quality, Stream OutStream) + { + ImageCodecInfo jpgCodec = ImageCodecInfo.GetImageEncoders().Where(c => c.MimeType.Equals("image/jpeg", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault(); + if (jpgCodec != null) + { + if (Quality < 0 || Quality > 100) + throw new ArgumentOutOfRangeException("Quality", "Quality must be a positive integer <= 100"); + using (EncoderParameters ep = new EncoderParameters(1)) + { + ep.Param[0] = new EncoderParameter(Encoder.Quality, Quality); + Source.Save(OutStream, jpgCodec, ep); + } + } + else + { + // Fallback + Source.Save(OutStream, ImageFormat.Jpeg); + } + } + public static ImageMontage BuildImageMontage(this IEnumerable Images, int MaxHeight = -1, int MaxWidth = -1, bool EnforceDimensions = false) + { + if (EnforceDimensions && (MaxHeight < 0 || MaxWidth < 0)) + throw new ArgumentOutOfRangeException("EnforceDimensions", "Dimensions can only be enforced when a MaxHeight and MaxWidth is supplied"); + + Dictionary imageLocations = new Dictionary(); + double imageScale = 1.0; + int totalHeight = Images.Max(i => i.Height); + int totalWidth = Images.Sum(i => i.Width); + if (MaxHeight > 0 && totalHeight > MaxHeight) + { + imageScale = (double)MaxHeight / (double)totalHeight; + } + if (MaxWidth > 0 && totalWidth > MaxWidth) + { + imageScale = System.Math.Min(imageScale, (double)MaxWidth / (double)totalWidth); + } + int scaledHeight = EnforceDimensions ? MaxHeight : (int)System.Math.Round((double)totalHeight * imageScale); + int scaledWidth = EnforceDimensions ? MaxWidth : (int)System.Math.Round((double)totalWidth * imageScale); + System.Drawing.Bitmap imageResult = new System.Drawing.Bitmap(scaledWidth, scaledHeight); + imageResult.SetResolution(72f, 72f); + + using (Graphics g = Graphics.FromImage(imageResult)) + { + g.FillRectangle(Brushes.White, new Rectangle(Point.Empty, imageResult.Size)); + + int imageResultNextOffset = 0; + foreach (Image i in Images) + { + Rectangle imagePosition = new Rectangle(imageResultNextOffset, 0, (int)System.Math.Round((double)i.Width * imageScale), (int)System.Math.Round((double)i.Height * imageScale)); + System.Drawing.Rectangle imageSize = new System.Drawing.Rectangle(0, 0, i.Width, i.Height); + g.DrawImage(i, imagePosition, imageSize, System.Drawing.GraphicsUnit.Pixel); + imageLocations[i] = imageResultNextOffset; + imageResultNextOffset += imagePosition.Width; + } + } + + return new ImageMontage() { Montage = imageResult, MontageScale = imageScale, MontageSourceImageOffsets = imageLocations }; + } + public class ImageMontage : IDisposable + { + + public Image Montage { get; set; } + public double MontageScale { get; set; } + public Dictionary MontageSourceImageOffsets { get; set; } + + public void Dispose() + { + if (Montage != null) + { + Montage.Dispose(); + Montage = null; + } + if (MontageSourceImageOffsets != null) + { + MontageSourceImageOffsets.Clear(); + MontageSourceImageOffsets = null; + } + } + } + + public static Color InterpolateColours(this Color Start, Color End, double Progress) + { + if (Progress > 1 || Progress < 0) + throw new ArgumentOutOfRangeException("Progress", "Progress must be >= 0 && <= 1"); + + return Color.FromArgb( + (byte)(Start.A * (1 - Progress) + (End.A * Progress)), + (byte)(Start.R * (1 - Progress) + (End.R * Progress)), + (byte)(Start.G * (1 - Progress) + (End.G * Progress)), + (byte)(Start.B * (1 - Progress) + (End.B * Progress)) + ); + } + #endregion + } +} diff --git a/Disco.BI/BI/Extensions/WirelessCertificateExtensions.cs b/Disco.BI/BI/Extensions/WirelessCertificateExtensions.cs index d6cb268b..f47cc816 100644 --- a/Disco.BI/BI/Extensions/WirelessCertificateExtensions.cs +++ b/Disco.BI/BI/Extensions/WirelessCertificateExtensions.cs @@ -1,18 +1,18 @@ -using Disco.Models.Repository; -using System; -using System.Security.Cryptography.X509Certificates; -namespace Disco.BI.Extensions -{ - public static class WirelessCertificateExtensions - { - public static System.DateTime? CertificateExpirationDate(this DeviceCertificate wc) - { - if (wc.Content == null || wc.Content.Length == 0) - { - return null; - } - X509Certificate2 c = new X509Certificate2(wc.Content, "password"); - return c.NotAfter; - } - } -} +using Disco.Models.Repository; +using System; +using System.Security.Cryptography.X509Certificates; +namespace Disco.BI.Extensions +{ + public static class WirelessCertificateExtensions + { + public static System.DateTime? CertificateExpirationDate(this DeviceCertificate wc) + { + if (wc.Content == null || wc.Content.Length == 0) + { + return null; + } + X509Certificate2 c = new X509Certificate2(wc.Content, "password"); + return c.NotAfter; + } + } +} diff --git a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectory.cs b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectory.cs index 15eb38db..458ed31b 100644 --- a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectory.cs +++ b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectory.cs @@ -1,397 +1,397 @@ -using Disco.Models.Interop.ActiveDirectory; -using Disco.BI.DeviceBI; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.DirectoryServices; -using System.Linq; -using System.IO; - -namespace Disco.BI.Interop.ActiveDirectory -{ - public static class ActiveDirectory - { - public static ActiveDirectoryMachineAccount GetMachineAccount(string ComputerName, System.Guid? UUIDNetbootGUID = null, System.Guid? MacAddressNetbootGUID = null, params string[] AdditionalProperties) - { - if (string.IsNullOrWhiteSpace(ComputerName)) - throw new System.ArgumentException("Invalid Computer Name - Empty", "ComputerName"); - if (ComputerName.Contains("\\")) - ComputerName = ComputerName.Substring(checked(ComputerName.IndexOf("\\") + 1)); - if (ComputerName.Length > 24) - throw new System.ArgumentException("Invalid Computer Name - Length > 24", "ComputerName"); - string sAMAccountName = ComputerName; - if (!sAMAccountName.EndsWith("$")) - sAMAccountName = string.Format("{0}$", sAMAccountName); - - using (DirectoryEntry dRootEntry = ActiveDirectoryHelpers.DefaultLdapRoot) - { - var loadProperties = new List { "name", "distinguishedName", "sAMAccountName", "objectSid", "dNSHostName", "netbootGUID", "isCriticalSystemObject" }; - loadProperties.AddRange(AdditionalProperties); - using (DirectorySearcher dSearcher = new DirectorySearcher(dRootEntry, string.Format("(&(objectClass=computer)(sAMAccountName={0}))", ActiveDirectoryHelpers.EscapeLdapQuery(sAMAccountName)), loadProperties.ToArray(), SearchScope.Subtree)) - { - SearchResult dResult = dSearcher.FindOne(); - if (dResult != null) - { - return ActiveDirectory.DirectorySearchResultToMachineAccount(dResult, AdditionalProperties); - } - } - - if (UUIDNetbootGUID.HasValue) - { - using (DirectorySearcher dSearcher = new DirectorySearcher(dRootEntry, string.Format("(&(objectClass=computer)(netbootGUID={0}))", ActiveDirectoryHelpers.FormatGuidForLdapQuery(UUIDNetbootGUID.Value)), loadProperties.ToArray(), SearchScope.Subtree)) - { - SearchResult dResult = dSearcher.FindOne(); - if (dResult != null) - { - return ActiveDirectory.DirectorySearchResultToMachineAccount(dResult, AdditionalProperties); - } - } - } - if (MacAddressNetbootGUID.HasValue) - { - using (DirectorySearcher dSearcher = new DirectorySearcher(dRootEntry, string.Format("(&(objectClass=computer)(netbootGUID={0}))", ActiveDirectoryHelpers.FormatGuidForLdapQuery(MacAddressNetbootGUID.Value)), loadProperties.ToArray(), SearchScope.Subtree)) - { - SearchResult dResult = dSearcher.FindOne(); - if (dResult != null) - { - return ActiveDirectory.DirectorySearchResultToMachineAccount(dResult, AdditionalProperties); - } - } - } - - } - - return null; - } - private static ActiveDirectoryMachineAccount DirectorySearchResultToMachineAccount(SearchResult result, params string[] AdditionalProperties) - { - string name = result.Properties["name"][0].ToString(); - string sAMAccountName = result.Properties["sAMAccountName"][0].ToString(); - string distinguishedName = result.Properties["distinguishedName"][0].ToString(); - string objectSid = ActiveDirectoryHelpers.ConvertBytesToSIDString((byte[])result.Properties["objectSid"][0]); - - var dNSNameProperty = result.Properties["dNSHostName"]; - string dNSName = null; - if (dNSNameProperty.Count > 0) - dNSName = dNSNameProperty[0].ToString(); - else - dNSName = string.Format("{0}.{1}", sAMAccountName.TrimEnd('$'), ActiveDirectoryHelpers.DefaultDomainQualifiedName); - - bool isCriticalSystemObject = (bool)result.Properties["isCriticalSystemObject"][0]; - - System.Guid netbootGUIDResult = default(System.Guid); - ResultPropertyValueCollection netbootGUIDProp = result.Properties["netbootGUID"]; - if (netbootGUIDProp.Count > 0) - { - netbootGUIDResult = new System.Guid((byte[])netbootGUIDProp[0]); - } - - // Additional Properties - Dictionary additionalProperties = new Dictionary(); - foreach (string propertyName in AdditionalProperties) - { - var property = result.Properties[propertyName]; - var propertyValues = new List(); - for (int index = 0; index < property.Count; index++) - propertyValues.Add(property[index]); - additionalProperties.Add(propertyName, propertyValues.ToArray()); - } - - return new ActiveDirectoryMachineAccount - { - Name = name, - DistinguishedName = distinguishedName, - sAMAccountName = sAMAccountName, - ObjectSid = objectSid, - NetbootGUID = netbootGUIDResult, - Path = result.Path, - Domain = ActiveDirectoryHelpers.DefaultDomainNetBiosName, - DnsName = dNSName, - IsCriticalSystemObject = isCriticalSystemObject, - LoadedProperties = additionalProperties - }; - } - private static ActiveDirectoryUserAccount SearchResultToActiveDirectoryUserAccount(SearchResult result, params string[] AdditionalProperties) - { - string name = result.Properties["name"][0].ToString(); - string username = result.Properties["sAMAccountName"][0].ToString(); - string distinguishedName = result.Properties["distinguishedName"][0].ToString(); - string objectSid = ActiveDirectoryHelpers.ConvertBytesToSIDString((byte[])result.Properties["objectSid"][0]); - - ResultPropertyValueCollection displayNameProp = result.Properties["displayName"]; - string displayName = username; - if (displayNameProp.Count > 0) - displayName = displayNameProp[0].ToString(); - string surname = null; - ResultPropertyValueCollection surnameProp = result.Properties["sn"]; - if (surnameProp.Count > 0) - surname = surnameProp[0].ToString(); - string givenName = null; - ResultPropertyValueCollection givenNameProp = result.Properties["givenName"]; - if (givenNameProp.Count > 0) - givenName = givenNameProp[0].ToString(); - string email = null; - ResultPropertyValueCollection emailProp = result.Properties["mail"]; - if (emailProp.Count > 0) - email = emailProp[0].ToString(); - string phone = null; - ResultPropertyValueCollection phoneProp = result.Properties["telephoneNumber"]; - if (phoneProp.Count > 0) - phone = phoneProp[0].ToString(); - - IEnumerable groupCNs = result.Properties["memberOf"].Cast(); - List groups = ActiveDirectoryCachedGroups.GetGroups(groupCNs).Select(g => g.ToLower()).ToList(); - - //foreach (string groupCN in result.Properties["memberOf"]) - //{ - // Removed 2012-11-30 G# - Moved to Recursive Cache - //var groupCNlower = groupCN.ToLower(); - //if (groupCNlower.StartsWith("cn=")) - // groups.Add(groupCNlower.Substring(3, groupCNlower.IndexOf(",") - 3)); - // End Removed 2012-11-30 G# - //} - - string type = null; - if (groups.Contains("domain admins") || groups.Contains("disco admins")) - { - type = "Admin"; - } - else - { - if (groups.Contains("staff")) - { - type = "Staff"; - } - else - { - if (groups.Contains("students")) - { - type = "Student"; - } - } - } - - // Additional Properties - Dictionary additionalProperties = new Dictionary(); - foreach (string propertyName in AdditionalProperties) - { - var property = result.Properties[propertyName]; - var propertyValues = new List(); - for (int index = 0; index < property.Count; index++) - propertyValues.Add(property[index]); - additionalProperties.Add(propertyName, propertyValues.ToArray()); - } - - return new ActiveDirectoryUserAccount - { - Domain = ActiveDirectoryHelpers.DefaultDomainNetBiosName, - Name = name, - Surname = surname, - GivenName = givenName, - Email = email, - Phone = phone, - DistinguishedName = distinguishedName, - sAMAccountName = username, - DisplayName = displayName, - ObjectSid = objectSid, - Type = type, - Path = result.Path, - LoadedProperties = additionalProperties - }; - } - public static ActiveDirectoryUserAccount GetUserAccount(string Username, params string[] AdditionalProperties) - { - if (string.IsNullOrWhiteSpace(Username)) - throw new System.ArgumentException("Invalid User Account", "Username"); - string sAMAccountName = Username; - if (sAMAccountName.Contains("\\")) - sAMAccountName = sAMAccountName.Substring(checked(sAMAccountName.IndexOf("\\") + 1)); - - using (DirectoryEntry dRootEntry = ActiveDirectoryHelpers.DefaultLdapRoot) - { - var loadProperties = new List { - "name", - "distinguishedName", - "sAMAccountName", - "objectSid", - "displayName", - "sn", - "givenName", - "memberOf", - "mail", - "telephoneNumber" - }; - loadProperties.AddRange(AdditionalProperties); - using (DirectorySearcher dSearcher = new DirectorySearcher(dRootEntry, string.Format("(&(objectClass=user)(sAMAccountName={0}))", ActiveDirectoryHelpers.EscapeLdapQuery(sAMAccountName)), loadProperties.ToArray(), SearchScope.Subtree)) - { - SearchResult dResult = dSearcher.FindOne(); - if (dResult != null) - return ActiveDirectory.SearchResultToActiveDirectoryUserAccount(dResult, AdditionalProperties); - else - return null; - } - } - } - public static string OfflineDomainJoinProvision(ref ActiveDirectoryMachineAccount ExistingAccount, string ComputerName, string OrganisationalUnit = null, string EnrolSessionId = null) - { - if (ExistingAccount != null && ExistingAccount.IsCriticalSystemObject) - throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", ExistingAccount.DistinguishedName)); - - string DJoinResult = null; - if (string.IsNullOrWhiteSpace(ComputerName) || ComputerName.Length > 24) - throw new System.ArgumentException("Invalid Computer Name; > 0 and <= 24", "ComputerName"); - - // Added 2012-10-25 G# - // Ensure Specified OU Exists - if (!string.IsNullOrEmpty(OrganisationalUnit)) - { - var ouPath = string.Format("{0}{1},{2}", ActiveDirectoryHelpers.DefaultLdapPath, OrganisationalUnit, ActiveDirectoryHelpers.DefaultDomainQualifiedName); - try - { - using (DirectoryEntry ou = new DirectoryEntry(ouPath)) - { - if (ou == null) - { - throw new Exception("OU's Directory Entry couldn't be found"); - } - } - } - catch (Exception ex) - { - throw new ArgumentException(string.Format("An error occurred while trying to locate the specified OU: {0}", ouPath), "OrganisationalUnit", ex); - } - } - // End Added 2012-10-25 G# - - // Delete Existing - if (ExistingAccount != null) - ExistingAccount.DeleteAccount(); - - string tempFileName = System.IO.Path.GetTempFileName(); - string argumentOU = (!string.IsNullOrWhiteSpace(OrganisationalUnit)) ? string.Format(" /MACHINEOU \"{0},{1}\"", OrganisationalUnit, ActiveDirectoryHelpers.DefaultDomainQualifiedName) : string.Empty; - string arguments = string.Format("/PROVISION /DOMAIN \"{0}\" /DCNAME \"{1}\" /MACHINE \"{2}\"{3} /REUSE /SAVEFILE \"{4}\"", - ActiveDirectoryHelpers.DefaultDomainName, - ActiveDirectoryHelpers.DefaultDomainPDCName, - ComputerName, - argumentOU, - tempFileName - ); - ProcessStartInfo commandStarter = new ProcessStartInfo("DJOIN.EXE", arguments) - { - CreateNoWindow = true, - ErrorDialog = false, - LoadUserProfile = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - UseShellExecute = false - }; - if (EnrolSessionId != null) - { - EnrolmentLog.LogSessionDiagnosticInformation(EnrolSessionId, string.Format("{0} {1}{2}", "DJOIN.EXE", arguments, System.Environment.NewLine)); - } - - string stdOutput; - string stdError; - using (Process commandProc = Process.Start(commandStarter)) - { - commandProc.WaitForExit(20000); - stdOutput = commandProc.StandardOutput.ReadToEnd(); - stdError = commandProc.StandardError.ReadToEnd(); - } - if (EnrolSessionId != null) - { - if (!string.IsNullOrWhiteSpace(stdOutput)) - EnrolmentLog.LogSessionDiagnosticInformation(EnrolSessionId, stdOutput + System.Environment.NewLine); - if (!string.IsNullOrWhiteSpace(stdError)) - EnrolmentLog.LogSessionDiagnosticInformation(EnrolSessionId, stdError + System.Environment.NewLine); - } - - if (System.IO.File.Exists(tempFileName)) - { - DJoinResult = System.Convert.ToBase64String(System.IO.File.ReadAllBytes(tempFileName)); - System.IO.File.Delete(tempFileName); - } - if (string.IsNullOrWhiteSpace(DJoinResult)) - throw new System.InvalidOperationException(string.Format("Domain Join Unsuccessful{0}Error: {1}{0}Output: {2}", System.Environment.NewLine, stdError, stdOutput)); - ExistingAccount = ActiveDirectory.GetMachineAccount(ComputerName); - return DJoinResult; - } - - public static List SearchUsers(string term) - { - List users = new List(); - string defaultQualifiedDomainName = ActiveDirectoryHelpers.DefaultDomainQualifiedName; - string defaultNetBiosDomainName = ActiveDirectoryHelpers.DefaultDomainNetBiosName; - term = ActiveDirectoryHelpers.EscapeLdapQuery(term); - using (DirectoryEntry entry = new DirectoryEntry(string.Format("LDAP://{0}", defaultQualifiedDomainName))) - { - using (DirectorySearcher searcher = new DirectorySearcher(entry, string.Format("(&(objectClass=User)(objectCategory=Person)(|(sAMAccountName=*{0}*)(displayName=*{0}*)))", term), new string[] - { - "name", - "distinguishedName", - "sAMAccountName", - "objectSid", - "displayName", - "sn", - "givenName", - "memberOf", - "mail", - "telephoneNumber" - }, SearchScope.Subtree)) - { - searcher.SizeLimit = 30; - SearchResultCollection results = searcher.FindAll(); - foreach (SearchResult result in results) - { - users.Add(ActiveDirectory.SearchResultToActiveDirectoryUserAccount(result)); - } - } - } - return users; - } - public static List GetOrganisationalUnitStructure() - { - ActiveDirectoryOrganisationalUnit DomainOUs = new ActiveDirectoryOrganisationalUnit - { - Children = new System.Collections.Generic.List() - }; - string defaultQualifiedDomainName = ActiveDirectoryHelpers.DefaultDomainQualifiedName; - - using (DirectoryEntry entry = new DirectoryEntry(string.Format("LDAP://{0}", defaultQualifiedDomainName))) - { - ActiveDirectory.GetOrganisationalUnitStructure_Recursive(ref DomainOUs, entry); - } - return DomainOUs.Children; - } - private static void GetOrganisationalUnitStructure_Recursive(ref ActiveDirectoryOrganisationalUnit ParentOU, DirectoryEntry Container) - { - using (DirectorySearcher searcher = new DirectorySearcher(Container, "(objectCategory=organizationalUnit)", new string[] - { - "name", - "distinguishedName" - }, SearchScope.OneLevel)) - { - using (SearchResultCollection results = searcher.FindAll()) - { - foreach (SearchResult result in results) - { - string i = result.Properties["name"][0].ToString(); - string dn = result.Properties["distinguishedName"][0].ToString(); - ActiveDirectoryOrganisationalUnit ChildOU = new ActiveDirectoryOrganisationalUnit - { - Name = i, - Path = dn.Substring(0, dn.IndexOf(",DC=")), - Children = new List() - }; - ActiveDirectory.GetOrganisationalUnitStructure_Recursive(ref ChildOU, result.GetDirectoryEntry()); - if (ChildOU.Children.Count == 0) - ChildOU.Children = null; - ParentOU.Children.Add(ChildOU); - } - } - } - - } - } -} +using Disco.Models.Interop.ActiveDirectory; +using Disco.BI.DeviceBI; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.DirectoryServices; +using System.Linq; +using System.IO; + +namespace Disco.BI.Interop.ActiveDirectory +{ + public static class ActiveDirectory + { + public static ActiveDirectoryMachineAccount GetMachineAccount(string ComputerName, System.Guid? UUIDNetbootGUID = null, System.Guid? MacAddressNetbootGUID = null, params string[] AdditionalProperties) + { + if (string.IsNullOrWhiteSpace(ComputerName)) + throw new System.ArgumentException("Invalid Computer Name - Empty", "ComputerName"); + if (ComputerName.Contains("\\")) + ComputerName = ComputerName.Substring(checked(ComputerName.IndexOf("\\") + 1)); + if (ComputerName.Length > 24) + throw new System.ArgumentException("Invalid Computer Name - Length > 24", "ComputerName"); + string sAMAccountName = ComputerName; + if (!sAMAccountName.EndsWith("$")) + sAMAccountName = string.Format("{0}$", sAMAccountName); + + using (DirectoryEntry dRootEntry = ActiveDirectoryHelpers.DefaultLdapRoot) + { + var loadProperties = new List { "name", "distinguishedName", "sAMAccountName", "objectSid", "dNSHostName", "netbootGUID", "isCriticalSystemObject" }; + loadProperties.AddRange(AdditionalProperties); + using (DirectorySearcher dSearcher = new DirectorySearcher(dRootEntry, string.Format("(&(objectClass=computer)(sAMAccountName={0}))", ActiveDirectoryHelpers.EscapeLdapQuery(sAMAccountName)), loadProperties.ToArray(), SearchScope.Subtree)) + { + SearchResult dResult = dSearcher.FindOne(); + if (dResult != null) + { + return ActiveDirectory.DirectorySearchResultToMachineAccount(dResult, AdditionalProperties); + } + } + + if (UUIDNetbootGUID.HasValue) + { + using (DirectorySearcher dSearcher = new DirectorySearcher(dRootEntry, string.Format("(&(objectClass=computer)(netbootGUID={0}))", ActiveDirectoryHelpers.FormatGuidForLdapQuery(UUIDNetbootGUID.Value)), loadProperties.ToArray(), SearchScope.Subtree)) + { + SearchResult dResult = dSearcher.FindOne(); + if (dResult != null) + { + return ActiveDirectory.DirectorySearchResultToMachineAccount(dResult, AdditionalProperties); + } + } + } + if (MacAddressNetbootGUID.HasValue) + { + using (DirectorySearcher dSearcher = new DirectorySearcher(dRootEntry, string.Format("(&(objectClass=computer)(netbootGUID={0}))", ActiveDirectoryHelpers.FormatGuidForLdapQuery(MacAddressNetbootGUID.Value)), loadProperties.ToArray(), SearchScope.Subtree)) + { + SearchResult dResult = dSearcher.FindOne(); + if (dResult != null) + { + return ActiveDirectory.DirectorySearchResultToMachineAccount(dResult, AdditionalProperties); + } + } + } + + } + + return null; + } + private static ActiveDirectoryMachineAccount DirectorySearchResultToMachineAccount(SearchResult result, params string[] AdditionalProperties) + { + string name = result.Properties["name"][0].ToString(); + string sAMAccountName = result.Properties["sAMAccountName"][0].ToString(); + string distinguishedName = result.Properties["distinguishedName"][0].ToString(); + string objectSid = ActiveDirectoryHelpers.ConvertBytesToSIDString((byte[])result.Properties["objectSid"][0]); + + var dNSNameProperty = result.Properties["dNSHostName"]; + string dNSName = null; + if (dNSNameProperty.Count > 0) + dNSName = dNSNameProperty[0].ToString(); + else + dNSName = string.Format("{0}.{1}", sAMAccountName.TrimEnd('$'), ActiveDirectoryHelpers.DefaultDomainQualifiedName); + + bool isCriticalSystemObject = (bool)result.Properties["isCriticalSystemObject"][0]; + + System.Guid netbootGUIDResult = default(System.Guid); + ResultPropertyValueCollection netbootGUIDProp = result.Properties["netbootGUID"]; + if (netbootGUIDProp.Count > 0) + { + netbootGUIDResult = new System.Guid((byte[])netbootGUIDProp[0]); + } + + // Additional Properties + Dictionary additionalProperties = new Dictionary(); + foreach (string propertyName in AdditionalProperties) + { + var property = result.Properties[propertyName]; + var propertyValues = new List(); + for (int index = 0; index < property.Count; index++) + propertyValues.Add(property[index]); + additionalProperties.Add(propertyName, propertyValues.ToArray()); + } + + return new ActiveDirectoryMachineAccount + { + Name = name, + DistinguishedName = distinguishedName, + sAMAccountName = sAMAccountName, + ObjectSid = objectSid, + NetbootGUID = netbootGUIDResult, + Path = result.Path, + Domain = ActiveDirectoryHelpers.DefaultDomainNetBiosName, + DnsName = dNSName, + IsCriticalSystemObject = isCriticalSystemObject, + LoadedProperties = additionalProperties + }; + } + private static ActiveDirectoryUserAccount SearchResultToActiveDirectoryUserAccount(SearchResult result, params string[] AdditionalProperties) + { + string name = result.Properties["name"][0].ToString(); + string username = result.Properties["sAMAccountName"][0].ToString(); + string distinguishedName = result.Properties["distinguishedName"][0].ToString(); + string objectSid = ActiveDirectoryHelpers.ConvertBytesToSIDString((byte[])result.Properties["objectSid"][0]); + + ResultPropertyValueCollection displayNameProp = result.Properties["displayName"]; + string displayName = username; + if (displayNameProp.Count > 0) + displayName = displayNameProp[0].ToString(); + string surname = null; + ResultPropertyValueCollection surnameProp = result.Properties["sn"]; + if (surnameProp.Count > 0) + surname = surnameProp[0].ToString(); + string givenName = null; + ResultPropertyValueCollection givenNameProp = result.Properties["givenName"]; + if (givenNameProp.Count > 0) + givenName = givenNameProp[0].ToString(); + string email = null; + ResultPropertyValueCollection emailProp = result.Properties["mail"]; + if (emailProp.Count > 0) + email = emailProp[0].ToString(); + string phone = null; + ResultPropertyValueCollection phoneProp = result.Properties["telephoneNumber"]; + if (phoneProp.Count > 0) + phone = phoneProp[0].ToString(); + + IEnumerable groupCNs = result.Properties["memberOf"].Cast(); + List groups = ActiveDirectoryCachedGroups.GetGroups(groupCNs).Select(g => g.ToLower()).ToList(); + + //foreach (string groupCN in result.Properties["memberOf"]) + //{ + // Removed 2012-11-30 G# - Moved to Recursive Cache + //var groupCNlower = groupCN.ToLower(); + //if (groupCNlower.StartsWith("cn=")) + // groups.Add(groupCNlower.Substring(3, groupCNlower.IndexOf(",") - 3)); + // End Removed 2012-11-30 G# + //} + + string type = null; + if (groups.Contains("domain admins") || groups.Contains("disco admins")) + { + type = "Admin"; + } + else + { + if (groups.Contains("staff")) + { + type = "Staff"; + } + else + { + if (groups.Contains("students")) + { + type = "Student"; + } + } + } + + // Additional Properties + Dictionary additionalProperties = new Dictionary(); + foreach (string propertyName in AdditionalProperties) + { + var property = result.Properties[propertyName]; + var propertyValues = new List(); + for (int index = 0; index < property.Count; index++) + propertyValues.Add(property[index]); + additionalProperties.Add(propertyName, propertyValues.ToArray()); + } + + return new ActiveDirectoryUserAccount + { + Domain = ActiveDirectoryHelpers.DefaultDomainNetBiosName, + Name = name, + Surname = surname, + GivenName = givenName, + Email = email, + Phone = phone, + DistinguishedName = distinguishedName, + sAMAccountName = username, + DisplayName = displayName, + ObjectSid = objectSid, + Type = type, + Path = result.Path, + LoadedProperties = additionalProperties + }; + } + public static ActiveDirectoryUserAccount GetUserAccount(string Username, params string[] AdditionalProperties) + { + if (string.IsNullOrWhiteSpace(Username)) + throw new System.ArgumentException("Invalid User Account", "Username"); + string sAMAccountName = Username; + if (sAMAccountName.Contains("\\")) + sAMAccountName = sAMAccountName.Substring(checked(sAMAccountName.IndexOf("\\") + 1)); + + using (DirectoryEntry dRootEntry = ActiveDirectoryHelpers.DefaultLdapRoot) + { + var loadProperties = new List { + "name", + "distinguishedName", + "sAMAccountName", + "objectSid", + "displayName", + "sn", + "givenName", + "memberOf", + "mail", + "telephoneNumber" + }; + loadProperties.AddRange(AdditionalProperties); + using (DirectorySearcher dSearcher = new DirectorySearcher(dRootEntry, string.Format("(&(objectClass=user)(sAMAccountName={0}))", ActiveDirectoryHelpers.EscapeLdapQuery(sAMAccountName)), loadProperties.ToArray(), SearchScope.Subtree)) + { + SearchResult dResult = dSearcher.FindOne(); + if (dResult != null) + return ActiveDirectory.SearchResultToActiveDirectoryUserAccount(dResult, AdditionalProperties); + else + return null; + } + } + } + public static string OfflineDomainJoinProvision(ref ActiveDirectoryMachineAccount ExistingAccount, string ComputerName, string OrganisationalUnit = null, string EnrolSessionId = null) + { + if (ExistingAccount != null && ExistingAccount.IsCriticalSystemObject) + throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", ExistingAccount.DistinguishedName)); + + string DJoinResult = null; + if (string.IsNullOrWhiteSpace(ComputerName) || ComputerName.Length > 24) + throw new System.ArgumentException("Invalid Computer Name; > 0 and <= 24", "ComputerName"); + + // Added 2012-10-25 G# + // Ensure Specified OU Exists + if (!string.IsNullOrEmpty(OrganisationalUnit)) + { + var ouPath = string.Format("{0}{1},{2}", ActiveDirectoryHelpers.DefaultLdapPath, OrganisationalUnit, ActiveDirectoryHelpers.DefaultDomainQualifiedName); + try + { + using (DirectoryEntry ou = new DirectoryEntry(ouPath)) + { + if (ou == null) + { + throw new Exception("OU's Directory Entry couldn't be found"); + } + } + } + catch (Exception ex) + { + throw new ArgumentException(string.Format("An error occurred while trying to locate the specified OU: {0}", ouPath), "OrganisationalUnit", ex); + } + } + // End Added 2012-10-25 G# + + // Delete Existing + if (ExistingAccount != null) + ExistingAccount.DeleteAccount(); + + string tempFileName = System.IO.Path.GetTempFileName(); + string argumentOU = (!string.IsNullOrWhiteSpace(OrganisationalUnit)) ? string.Format(" /MACHINEOU \"{0},{1}\"", OrganisationalUnit, ActiveDirectoryHelpers.DefaultDomainQualifiedName) : string.Empty; + string arguments = string.Format("/PROVISION /DOMAIN \"{0}\" /DCNAME \"{1}\" /MACHINE \"{2}\"{3} /REUSE /SAVEFILE \"{4}\"", + ActiveDirectoryHelpers.DefaultDomainName, + ActiveDirectoryHelpers.DefaultDomainPDCName, + ComputerName, + argumentOU, + tempFileName + ); + ProcessStartInfo commandStarter = new ProcessStartInfo("DJOIN.EXE", arguments) + { + CreateNoWindow = true, + ErrorDialog = false, + LoadUserProfile = false, + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false + }; + if (EnrolSessionId != null) + { + EnrolmentLog.LogSessionDiagnosticInformation(EnrolSessionId, string.Format("{0} {1}{2}", "DJOIN.EXE", arguments, System.Environment.NewLine)); + } + + string stdOutput; + string stdError; + using (Process commandProc = Process.Start(commandStarter)) + { + commandProc.WaitForExit(20000); + stdOutput = commandProc.StandardOutput.ReadToEnd(); + stdError = commandProc.StandardError.ReadToEnd(); + } + if (EnrolSessionId != null) + { + if (!string.IsNullOrWhiteSpace(stdOutput)) + EnrolmentLog.LogSessionDiagnosticInformation(EnrolSessionId, stdOutput + System.Environment.NewLine); + if (!string.IsNullOrWhiteSpace(stdError)) + EnrolmentLog.LogSessionDiagnosticInformation(EnrolSessionId, stdError + System.Environment.NewLine); + } + + if (System.IO.File.Exists(tempFileName)) + { + DJoinResult = System.Convert.ToBase64String(System.IO.File.ReadAllBytes(tempFileName)); + System.IO.File.Delete(tempFileName); + } + if (string.IsNullOrWhiteSpace(DJoinResult)) + throw new System.InvalidOperationException(string.Format("Domain Join Unsuccessful{0}Error: {1}{0}Output: {2}", System.Environment.NewLine, stdError, stdOutput)); + ExistingAccount = ActiveDirectory.GetMachineAccount(ComputerName); + return DJoinResult; + } + + public static List SearchUsers(string term) + { + List users = new List(); + string defaultQualifiedDomainName = ActiveDirectoryHelpers.DefaultDomainQualifiedName; + string defaultNetBiosDomainName = ActiveDirectoryHelpers.DefaultDomainNetBiosName; + term = ActiveDirectoryHelpers.EscapeLdapQuery(term); + using (DirectoryEntry entry = new DirectoryEntry(string.Format("LDAP://{0}", defaultQualifiedDomainName))) + { + using (DirectorySearcher searcher = new DirectorySearcher(entry, string.Format("(&(objectClass=User)(objectCategory=Person)(|(sAMAccountName=*{0}*)(displayName=*{0}*)))", term), new string[] + { + "name", + "distinguishedName", + "sAMAccountName", + "objectSid", + "displayName", + "sn", + "givenName", + "memberOf", + "mail", + "telephoneNumber" + }, SearchScope.Subtree)) + { + searcher.SizeLimit = 30; + SearchResultCollection results = searcher.FindAll(); + foreach (SearchResult result in results) + { + users.Add(ActiveDirectory.SearchResultToActiveDirectoryUserAccount(result)); + } + } + } + return users; + } + public static List GetOrganisationalUnitStructure() + { + ActiveDirectoryOrganisationalUnit DomainOUs = new ActiveDirectoryOrganisationalUnit + { + Children = new System.Collections.Generic.List() + }; + string defaultQualifiedDomainName = ActiveDirectoryHelpers.DefaultDomainQualifiedName; + + using (DirectoryEntry entry = new DirectoryEntry(string.Format("LDAP://{0}", defaultQualifiedDomainName))) + { + ActiveDirectory.GetOrganisationalUnitStructure_Recursive(ref DomainOUs, entry); + } + return DomainOUs.Children; + } + private static void GetOrganisationalUnitStructure_Recursive(ref ActiveDirectoryOrganisationalUnit ParentOU, DirectoryEntry Container) + { + using (DirectorySearcher searcher = new DirectorySearcher(Container, "(objectCategory=organizationalUnit)", new string[] + { + "name", + "distinguishedName" + }, SearchScope.OneLevel)) + { + using (SearchResultCollection results = searcher.FindAll()) + { + foreach (SearchResult result in results) + { + string i = result.Properties["name"][0].ToString(); + string dn = result.Properties["distinguishedName"][0].ToString(); + ActiveDirectoryOrganisationalUnit ChildOU = new ActiveDirectoryOrganisationalUnit + { + Name = i, + Path = dn.Substring(0, dn.IndexOf(",DC=")), + Children = new List() + }; + ActiveDirectory.GetOrganisationalUnitStructure_Recursive(ref ChildOU, result.GetDirectoryEntry()); + if (ChildOU.Children.Count == 0) + ChildOU.Children = null; + ParentOU.Children.Add(ChildOU); + } + } + } + + } + } +} diff --git a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryCachedGroups.cs b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryCachedGroups.cs index 9fa8bc46..cffee7f7 100644 --- a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryCachedGroups.cs +++ b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryCachedGroups.cs @@ -1,186 +1,186 @@ -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.DirectoryServices; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Disco.Data.Repository; -using Disco.Services.Tasks; -using Quartz; - -namespace Disco.BI.Interop.ActiveDirectory -{ - public class ActiveDirectoryCachedGroups : ScheduledTask - { - private static ConcurrentDictionary> _Cache = new ConcurrentDictionary>(); - private const long CacheTimeoutTicks = 6000000000; // 10 Minutes - - public static IEnumerable GetGroups(IEnumerable GroupCNs) - { - List groups = new List(); - - foreach (var groupCN in GroupCNs) - foreach (var group in GetGroupsRecursive(groupCN, new Stack())) - if (!groups.Contains(group)) - { - groups.Add(group); - yield return group.FriendlyName; - } - } - public static IEnumerable GetGroups(string GroupCN) - { - foreach (var group in GetGroupsRecursive(GroupCN, new Stack())) - yield return group.FriendlyName; - } - private static IEnumerable GetGroupsRecursive(string GroupCN, Stack RecursiveTree) - { - var group = GetGroup(GroupCN); - - if (group != null && !RecursiveTree.Contains(group)) - { - yield return group; - - if (group.MemberOf != null) - { - RecursiveTree.Push(group); - - foreach (var memberOfGroupCN in group.MemberOf) - foreach (var memberOfGroup in GetGroupsRecursive(memberOfGroupCN, RecursiveTree)) - yield return memberOfGroup; - - RecursiveTree.Pop(); - } - } - } - - private static ADCachedGroup GetGroup(string GroupCN) - { - // Check Cache - Tuple groupRecord = TryCache(GroupCN); - - if (groupRecord == null) - { - // Load from AD - var group = ADCachedGroup.LoadFromAD(GroupCN); - SetValue(GroupCN, group); - - return group; - } - else - { - // Return from Cache - return groupRecord.Item1; - } - } - - private static Tuple TryCache(string GroupCN) - { - string groupCN = GroupCN.ToLower(); - Tuple groupRecord; - if (_Cache.TryGetValue(groupCN, out groupRecord)) - { - if (groupRecord.Item2 > DateTime.Now) - return groupRecord; - else - _Cache.TryRemove(groupCN, out groupRecord); - } - return null; - } - private static bool SetValue(string GroupCN, ADCachedGroup GroupRecord) - { - string key = GroupCN.ToLower(); - Tuple groupRecord = new Tuple(GroupRecord, DateTime.Now.AddTicks(CacheTimeoutTicks)); - if (_Cache.ContainsKey(key)) - { - Tuple oldGroupRecord; - if (_Cache.TryGetValue(key, out oldGroupRecord)) - { - return _Cache.TryUpdate(key, groupRecord, oldGroupRecord); - } - } - return _Cache.TryAdd(key, groupRecord); - } - - private class ADCachedGroup - { - public string CN { get; private set; } - public string FriendlyName { get; private set; } - - public List MemberOf { get; private set; } - - public static ADCachedGroup LoadFromAD(string CN) - { - ADCachedGroup group = null; - - using (DirectoryEntry groupDE = new DirectoryEntry(string.Concat(ActiveDirectoryHelpers.DefaultLdapPath, CN))) - { - if (groupDE != null) - { - group = new ADCachedGroup() - { - CN = CN - }; - - group.FriendlyName = (string)groupDE.Properties["sAMAccountName"].Value; - - var groupMemberOf = groupDE.Properties["memberOf"]; - if (groupMemberOf != null && groupMemberOf.Count > 0) - { - group.MemberOf = groupMemberOf.Cast().ToList(); - } - } - } - - return group; - } - - private ADCachedGroup() - { - // Private Constructor - } - } - - private static void CleanStaleCache() - { - var groupKeys = _Cache.Keys.ToArray(); - foreach (string groupKey in groupKeys) - { - Tuple groupRecord; - if (_Cache.TryGetValue(groupKey, out groupRecord)) - { - if (groupRecord.Item2 <= DateTime.Now) - _Cache.TryRemove(groupKey, out groupRecord); - } - } - } - - public override string TaskName { get { return "AD Group Cache - Clean Stale Cache"; } } - - public override bool SingleInstanceTask { get { return true; } } - public override bool CancelInitiallySupported { get { return false; } } - public override bool LogExceptionsOnly { get { return true; } } - - public override void InitalizeScheduledTask(DiscoDataContext dbContext) - { - // Run @ every 15mins - - // Next 15min interval - DateTime now = DateTime.Now; - int mins = (15 - (now.Minute % 15)); - if (mins < 10) - mins += 15; - DateTimeOffset startAt = new DateTimeOffset(now).AddMinutes(mins).AddSeconds(now.Second * -1).AddMilliseconds(now.Millisecond * -1); - - TriggerBuilder triggerBuilder = TriggerBuilder.Create().StartAt(startAt). - WithSchedule(SimpleScheduleBuilder.RepeatMinutelyForever(15)); - - this.ScheduleTask(triggerBuilder); - } - - protected override void ExecuteTask() - { - CleanStaleCache(); - } - } -} +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.DirectoryServices; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Disco.Data.Repository; +using Disco.Services.Tasks; +using Quartz; + +namespace Disco.BI.Interop.ActiveDirectory +{ + public class ActiveDirectoryCachedGroups : ScheduledTask + { + private static ConcurrentDictionary> _Cache = new ConcurrentDictionary>(); + private const long CacheTimeoutTicks = 6000000000; // 10 Minutes + + public static IEnumerable GetGroups(IEnumerable GroupCNs) + { + List groups = new List(); + + foreach (var groupCN in GroupCNs) + foreach (var group in GetGroupsRecursive(groupCN, new Stack())) + if (!groups.Contains(group)) + { + groups.Add(group); + yield return group.FriendlyName; + } + } + public static IEnumerable GetGroups(string GroupCN) + { + foreach (var group in GetGroupsRecursive(GroupCN, new Stack())) + yield return group.FriendlyName; + } + private static IEnumerable GetGroupsRecursive(string GroupCN, Stack RecursiveTree) + { + var group = GetGroup(GroupCN); + + if (group != null && !RecursiveTree.Contains(group)) + { + yield return group; + + if (group.MemberOf != null) + { + RecursiveTree.Push(group); + + foreach (var memberOfGroupCN in group.MemberOf) + foreach (var memberOfGroup in GetGroupsRecursive(memberOfGroupCN, RecursiveTree)) + yield return memberOfGroup; + + RecursiveTree.Pop(); + } + } + } + + private static ADCachedGroup GetGroup(string GroupCN) + { + // Check Cache + Tuple groupRecord = TryCache(GroupCN); + + if (groupRecord == null) + { + // Load from AD + var group = ADCachedGroup.LoadFromAD(GroupCN); + SetValue(GroupCN, group); + + return group; + } + else + { + // Return from Cache + return groupRecord.Item1; + } + } + + private static Tuple TryCache(string GroupCN) + { + string groupCN = GroupCN.ToLower(); + Tuple groupRecord; + if (_Cache.TryGetValue(groupCN, out groupRecord)) + { + if (groupRecord.Item2 > DateTime.Now) + return groupRecord; + else + _Cache.TryRemove(groupCN, out groupRecord); + } + return null; + } + private static bool SetValue(string GroupCN, ADCachedGroup GroupRecord) + { + string key = GroupCN.ToLower(); + Tuple groupRecord = new Tuple(GroupRecord, DateTime.Now.AddTicks(CacheTimeoutTicks)); + if (_Cache.ContainsKey(key)) + { + Tuple oldGroupRecord; + if (_Cache.TryGetValue(key, out oldGroupRecord)) + { + return _Cache.TryUpdate(key, groupRecord, oldGroupRecord); + } + } + return _Cache.TryAdd(key, groupRecord); + } + + private class ADCachedGroup + { + public string CN { get; private set; } + public string FriendlyName { get; private set; } + + public List MemberOf { get; private set; } + + public static ADCachedGroup LoadFromAD(string CN) + { + ADCachedGroup group = null; + + using (DirectoryEntry groupDE = new DirectoryEntry(string.Concat(ActiveDirectoryHelpers.DefaultLdapPath, CN))) + { + if (groupDE != null) + { + group = new ADCachedGroup() + { + CN = CN + }; + + group.FriendlyName = (string)groupDE.Properties["sAMAccountName"].Value; + + var groupMemberOf = groupDE.Properties["memberOf"]; + if (groupMemberOf != null && groupMemberOf.Count > 0) + { + group.MemberOf = groupMemberOf.Cast().ToList(); + } + } + } + + return group; + } + + private ADCachedGroup() + { + // Private Constructor + } + } + + private static void CleanStaleCache() + { + var groupKeys = _Cache.Keys.ToArray(); + foreach (string groupKey in groupKeys) + { + Tuple groupRecord; + if (_Cache.TryGetValue(groupKey, out groupRecord)) + { + if (groupRecord.Item2 <= DateTime.Now) + _Cache.TryRemove(groupKey, out groupRecord); + } + } + } + + public override string TaskName { get { return "AD Group Cache - Clean Stale Cache"; } } + + public override bool SingleInstanceTask { get { return true; } } + public override bool CancelInitiallySupported { get { return false; } } + public override bool LogExceptionsOnly { get { return true; } } + + public override void InitalizeScheduledTask(DiscoDataContext dbContext) + { + // Run @ every 15mins + + // Next 15min interval + DateTime now = DateTime.Now; + int mins = (15 - (now.Minute % 15)); + if (mins < 10) + mins += 15; + DateTimeOffset startAt = new DateTimeOffset(now).AddMinutes(mins).AddSeconds(now.Second * -1).AddMilliseconds(now.Millisecond * -1); + + TriggerBuilder triggerBuilder = TriggerBuilder.Create().StartAt(startAt). + WithSchedule(SimpleScheduleBuilder.RepeatMinutelyForever(15)); + + this.ScheduleTask(triggerBuilder); + } + + protected override void ExecuteTask() + { + CleanStaleCache(); + } + } +} diff --git a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryHelpers.cs b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryHelpers.cs index 293f47a4..ad077645 100644 --- a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryHelpers.cs +++ b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryHelpers.cs @@ -1,169 +1,169 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.DirectoryServices; -using System.DirectoryServices.ActiveDirectory; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading; - -namespace Disco.BI.Interop.ActiveDirectory -{ - internal static class ActiveDirectoryHelpers - { - #region Static Cached Properties - private static string _DefaultDomainName; - private static string _DefaultDomainPDCName; - private static System.Collections.Generic.List _DefaultDomainDCNames; - private static string _DefaultDomainNetBiosName; - private static string _DefaultDomainQualifiedName; - private static string _DefaultLdapPath; - private static bool _DetermineDomainProperties_Loaded = false; - private static object _DetermineDomainProperties_Lock = new object(); - internal static string DefaultDomainName - { - get - { - ActiveDirectoryHelpers.DetermineDomainProperties(); - return ActiveDirectoryHelpers._DefaultDomainName; - } - } - internal static string DefaultDomainPDCName - { - get - { - ActiveDirectoryHelpers.DetermineDomainProperties(); - return ActiveDirectoryHelpers._DefaultDomainPDCName; - } - } - internal static System.Collections.Generic.List DefaultDomainDCNames - { - get - { - ActiveDirectoryHelpers.DetermineDomainProperties(); - return ActiveDirectoryHelpers._DefaultDomainDCNames; - } - } - internal static string DefaultDomainNetBiosName - { - get - { - ActiveDirectoryHelpers.DetermineDomainProperties(); - return ActiveDirectoryHelpers._DefaultDomainNetBiosName; - } - } - internal static string DefaultDomainQualifiedName - { - get - { - ActiveDirectoryHelpers.DetermineDomainProperties(); - return ActiveDirectoryHelpers._DefaultDomainQualifiedName; - } - } - internal static string DefaultLdapPath - { - get - { - ActiveDirectoryHelpers.DetermineDomainProperties(); - return ActiveDirectoryHelpers._DefaultLdapPath; - } - } - internal static string DefaultDCLdapPath(string DC) - { - return string.Format("LDAP://{0}/", DC); - } - internal static DirectoryEntry DefaultLdapRoot - { - get - { - return new DirectoryEntry(string.Concat(ActiveDirectoryHelpers.DefaultLdapPath, ActiveDirectoryHelpers.DefaultDomainQualifiedName)); - } - } - internal static DirectoryEntry DefaultDCLdapRoot(string DC) - { - return new DirectoryEntry(string.Concat(ActiveDirectoryHelpers.DefaultDCLdapPath(DC), ActiveDirectoryHelpers.DefaultDomainQualifiedName)); - } - - private static void DetermineDomainProperties() - { - if (!ActiveDirectoryHelpers._DetermineDomainProperties_Loaded) - { - lock (ActiveDirectoryHelpers._DetermineDomainProperties_Lock) - { - - if (!ActiveDirectoryHelpers._DetermineDomainProperties_Loaded) - { - using (Domain domain = Domain.GetDomain(new DirectoryContext(DirectoryContextType.Domain))) - { - ActiveDirectoryHelpers._DefaultDomainName = domain.Name; - ActiveDirectoryHelpers._DefaultDomainPDCName = domain.PdcRoleOwner.Name; - ActiveDirectoryHelpers._DefaultDomainDCNames = new System.Collections.Generic.List(domain.DomainControllers.Count); - foreach (DomainController dc in domain.DomainControllers) - { - ActiveDirectoryHelpers._DefaultDomainDCNames.Add(dc.Name); - } - } - ActiveDirectoryHelpers._DefaultDomainQualifiedName = string.Format("DC={0}", ActiveDirectoryHelpers._DefaultDomainName.Replace(".", ",DC=")); - ActiveDirectoryHelpers._DefaultLdapPath = string.Format("LDAP://{0}/", ActiveDirectoryHelpers._DefaultDomainPDCName); - using (DirectoryEntry entry = new DirectoryEntry(string.Format("{0}CN=Partitions,CN=Configuration,{1}", ActiveDirectoryHelpers._DefaultLdapPath, ActiveDirectoryHelpers._DefaultDomainQualifiedName))) - { - using (DirectorySearcher searcher = new DirectorySearcher(entry, "(&(objectClass=crossRef)(nETBIOSName=*))", new string[] { "nETBIOSName" })) - { - SearchResult result = searcher.FindOne(); - if (result != null) - { - ActiveDirectoryHelpers._DefaultDomainNetBiosName = result.Properties["nETBIOSName"][0].ToString(); - } - else - { - ActiveDirectoryHelpers._DefaultDomainNetBiosName = ActiveDirectoryHelpers._DefaultDomainQualifiedName; - } - } - } - } - ActiveDirectoryHelpers._DetermineDomainProperties_Loaded = true; - } - } - } - #endregion - - [System.Runtime.InteropServices.DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] - private static extern bool ConvertSidToStringSid(byte[] pSID, ref System.Text.StringBuilder ptrSid); - internal static string ConvertBytesToSIDString(byte[] SID) - { - System.Text.StringBuilder sidString = new System.Text.StringBuilder(); - bool flag = ActiveDirectoryHelpers.ConvertSidToStringSid(SID, ref sidString); - string ConvertBytesToSIDString; - if (flag) - { - ConvertBytesToSIDString = sidString.ToString(); - } - else - { - ConvertBytesToSIDString = null; - } - return ConvertBytesToSIDString; - } - - internal static string EscapeLdapQuery(string query) - { - return query.Replace("*", "\\2a").Replace("(", "\\28").Replace(")", "\\29").Replace("\\", "\\5c").Replace("NUL", "\\00").Replace("/", "\\2f"); - } - internal static string FormatGuidForLdapQuery(System.Guid g) - { - checked - { - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - byte[] array = g.ToByteArray(); - for (int i = 0; i < array.Length; i++) - { - byte b = array[i]; - sb.Append("\\"); - sb.Append(b.ToString("X2")); - } - return sb.ToString(); - } - } - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.DirectoryServices; +using System.DirectoryServices.ActiveDirectory; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; + +namespace Disco.BI.Interop.ActiveDirectory +{ + internal static class ActiveDirectoryHelpers + { + #region Static Cached Properties + private static string _DefaultDomainName; + private static string _DefaultDomainPDCName; + private static System.Collections.Generic.List _DefaultDomainDCNames; + private static string _DefaultDomainNetBiosName; + private static string _DefaultDomainQualifiedName; + private static string _DefaultLdapPath; + private static bool _DetermineDomainProperties_Loaded = false; + private static object _DetermineDomainProperties_Lock = new object(); + internal static string DefaultDomainName + { + get + { + ActiveDirectoryHelpers.DetermineDomainProperties(); + return ActiveDirectoryHelpers._DefaultDomainName; + } + } + internal static string DefaultDomainPDCName + { + get + { + ActiveDirectoryHelpers.DetermineDomainProperties(); + return ActiveDirectoryHelpers._DefaultDomainPDCName; + } + } + internal static System.Collections.Generic.List DefaultDomainDCNames + { + get + { + ActiveDirectoryHelpers.DetermineDomainProperties(); + return ActiveDirectoryHelpers._DefaultDomainDCNames; + } + } + internal static string DefaultDomainNetBiosName + { + get + { + ActiveDirectoryHelpers.DetermineDomainProperties(); + return ActiveDirectoryHelpers._DefaultDomainNetBiosName; + } + } + internal static string DefaultDomainQualifiedName + { + get + { + ActiveDirectoryHelpers.DetermineDomainProperties(); + return ActiveDirectoryHelpers._DefaultDomainQualifiedName; + } + } + internal static string DefaultLdapPath + { + get + { + ActiveDirectoryHelpers.DetermineDomainProperties(); + return ActiveDirectoryHelpers._DefaultLdapPath; + } + } + internal static string DefaultDCLdapPath(string DC) + { + return string.Format("LDAP://{0}/", DC); + } + internal static DirectoryEntry DefaultLdapRoot + { + get + { + return new DirectoryEntry(string.Concat(ActiveDirectoryHelpers.DefaultLdapPath, ActiveDirectoryHelpers.DefaultDomainQualifiedName)); + } + } + internal static DirectoryEntry DefaultDCLdapRoot(string DC) + { + return new DirectoryEntry(string.Concat(ActiveDirectoryHelpers.DefaultDCLdapPath(DC), ActiveDirectoryHelpers.DefaultDomainQualifiedName)); + } + + private static void DetermineDomainProperties() + { + if (!ActiveDirectoryHelpers._DetermineDomainProperties_Loaded) + { + lock (ActiveDirectoryHelpers._DetermineDomainProperties_Lock) + { + + if (!ActiveDirectoryHelpers._DetermineDomainProperties_Loaded) + { + using (Domain domain = Domain.GetDomain(new DirectoryContext(DirectoryContextType.Domain))) + { + ActiveDirectoryHelpers._DefaultDomainName = domain.Name; + ActiveDirectoryHelpers._DefaultDomainPDCName = domain.PdcRoleOwner.Name; + ActiveDirectoryHelpers._DefaultDomainDCNames = new System.Collections.Generic.List(domain.DomainControllers.Count); + foreach (DomainController dc in domain.DomainControllers) + { + ActiveDirectoryHelpers._DefaultDomainDCNames.Add(dc.Name); + } + } + ActiveDirectoryHelpers._DefaultDomainQualifiedName = string.Format("DC={0}", ActiveDirectoryHelpers._DefaultDomainName.Replace(".", ",DC=")); + ActiveDirectoryHelpers._DefaultLdapPath = string.Format("LDAP://{0}/", ActiveDirectoryHelpers._DefaultDomainPDCName); + using (DirectoryEntry entry = new DirectoryEntry(string.Format("{0}CN=Partitions,CN=Configuration,{1}", ActiveDirectoryHelpers._DefaultLdapPath, ActiveDirectoryHelpers._DefaultDomainQualifiedName))) + { + using (DirectorySearcher searcher = new DirectorySearcher(entry, "(&(objectClass=crossRef)(nETBIOSName=*))", new string[] { "nETBIOSName" })) + { + SearchResult result = searcher.FindOne(); + if (result != null) + { + ActiveDirectoryHelpers._DefaultDomainNetBiosName = result.Properties["nETBIOSName"][0].ToString(); + } + else + { + ActiveDirectoryHelpers._DefaultDomainNetBiosName = ActiveDirectoryHelpers._DefaultDomainQualifiedName; + } + } + } + } + ActiveDirectoryHelpers._DetermineDomainProperties_Loaded = true; + } + } + } + #endregion + + [System.Runtime.InteropServices.DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] + private static extern bool ConvertSidToStringSid(byte[] pSID, ref System.Text.StringBuilder ptrSid); + internal static string ConvertBytesToSIDString(byte[] SID) + { + System.Text.StringBuilder sidString = new System.Text.StringBuilder(); + bool flag = ActiveDirectoryHelpers.ConvertSidToStringSid(SID, ref sidString); + string ConvertBytesToSIDString; + if (flag) + { + ConvertBytesToSIDString = sidString.ToString(); + } + else + { + ConvertBytesToSIDString = null; + } + return ConvertBytesToSIDString; + } + + internal static string EscapeLdapQuery(string query) + { + return query.Replace("*", "\\2a").Replace("(", "\\28").Replace(")", "\\29").Replace("\\", "\\5c").Replace("NUL", "\\00").Replace("/", "\\2f"); + } + internal static string FormatGuidForLdapQuery(System.Guid g) + { + checked + { + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + byte[] array = g.ToByteArray(); + for (int i = 0; i < array.Length; i++) + { + byte b = array[i]; + sb.Append("\\"); + sb.Append(b.ToString("X2")); + } + return sb.ToString(); + } + } + } +} diff --git a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryMachineAccountExtensions.cs b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryMachineAccountExtensions.cs index 73e75938..a3aafa5e 100644 --- a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryMachineAccountExtensions.cs +++ b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryMachineAccountExtensions.cs @@ -1,296 +1,296 @@ -using Disco.Models.Interop.ActiveDirectory; -using Disco.Models.Repository; -using System; -using System.Collections; -using System.Collections.Generic; -using System.DirectoryServices; -using System.Text; -using System.Net.NetworkInformation; -using System.Management; - -namespace Disco.BI.Interop.ActiveDirectory -{ - public static class ActiveDirectoryMachineAccountExtensions - { - public static void DeleteAccount(this ActiveDirectoryMachineAccount account) - { - if (account.IsCriticalSystemObject) - throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); - - using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) - { - DeleteAccountRecursive(machineDE); - - using (var machineDEParent = machineDE.Parent) - { - machineDEParent.Children.Remove(machineDE); - } - } - } - private static void DeleteAccountRecursive(DirectoryEntry parent) - { - List children = new List(); - foreach (DirectoryEntry child in parent.Children) - children.Add(child); - - foreach (var child in children) - { - DeleteAccountRecursive(child); - parent.Children.Remove(child); - child.Dispose(); - } - } - private static void SetNetbootGUID(this ActiveDirectoryMachineAccount account, System.Guid updatedNetbootGUID) - { - if (account.IsCriticalSystemObject) - throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); - - using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) - { - PropertyValueCollection netbootGUIDProp = machineDE.Properties["netbootGUID"]; - bool flag = netbootGUIDProp.Count > 0; - if (flag) - { - netbootGUIDProp.Clear(); - } - netbootGUIDProp.Add(updatedNetbootGUID.ToByteArray()); - machineDE.CommitChanges(); - } - } - public static void SetDescription(this ActiveDirectoryMachineAccount account, string Description) - { - using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) - { - PropertyValueCollection descriptionProp = machineDE.Properties["description"]; - bool flag = descriptionProp.Count > 0; - if (flag) - { - descriptionProp.Clear(); - } - flag = !string.IsNullOrEmpty(Description); - if (flag) - { - descriptionProp.Add(Description); - } - machineDE.CommitChanges(); - } - } - public static void SetDescription(this ActiveDirectoryMachineAccount account, Device Device) - { - System.Text.StringBuilder descriptionBuilder = new System.Text.StringBuilder(); - bool flag = Device.AssignedUserId != null; - if (flag) - { - descriptionBuilder.Append(Device.AssignedUser.Id); - descriptionBuilder.Append(" ("); - descriptionBuilder.Append(Device.AssignedUser.DisplayName); - descriptionBuilder.Append("); "); - } - flag = Device.DeviceModelId.HasValue; - if (flag) - { - descriptionBuilder.Append(Device.DeviceModel.Description); - descriptionBuilder.Append("; "); - } - descriptionBuilder.Append(Device.DeviceProfile.Description); - descriptionBuilder.Append("; "); - string description = descriptionBuilder.ToString().Trim(); - flag = (description.Length > 1024); - if (flag) - { - description = description.Substring(0, 1024); - } - account.SetDescription(description); - } - - public static void DisableAccount(this ActiveDirectoryMachineAccount account) - { - if (account.IsCriticalSystemObject) - throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); - - using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) - { - int accountControl = (int)machineDE.Properties["userAccountControl"][0]; - int updatedAccountControl = (accountControl | 2); - if (accountControl != updatedAccountControl) - { - machineDE.Properties["userAccountControl"][0] = updatedAccountControl; - machineDE.CommitChanges(); - } - } - } - public static void EnableAccount(this ActiveDirectoryMachineAccount account) - { - if (account.IsCriticalSystemObject) - throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); - - using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) - { - int accountControl = (int)machineDE.Properties["userAccountControl"][0]; - if ((accountControl & 2) == 2) - { - int updatedAccountControl = (accountControl ^ 2); - machineDE.Properties["userAccountControl"][0] = updatedAccountControl; - machineDE.CommitChanges(); - } - } - } - - public static bool UpdateNetbootGUID(this ActiveDirectoryMachineAccount account, string UUID, string MACAddress) - { - if (account.IsCriticalSystemObject) - throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); - - System.Guid netbootGUID = System.Guid.Empty; - bool flag = !string.IsNullOrWhiteSpace(UUID); - if (flag) - { - netbootGUID = ActiveDirectoryMachineAccountExtensions.NetbootGUIDFromUUID(UUID); - } - else - { - flag = !string.IsNullOrWhiteSpace(MACAddress); - if (flag) - { - netbootGUID = ActiveDirectoryMachineAccountExtensions.NetbootGUIDFromMACAddress(MACAddress); - } - } - flag = (netbootGUID != System.Guid.Empty && netbootGUID != account.NetbootGUID); - bool UpdateNetbootGUID; - if (flag) - { - account.SetNetbootGUID(netbootGUID); - UpdateNetbootGUID = true; - } - else - { - UpdateNetbootGUID = false; - } - return UpdateNetbootGUID; - } - internal static System.Guid NetbootGUIDFromMACAddress(string MACAddress) - { - string strippedMACAddress = MACAddress.Trim().Replace(":", string.Empty).Replace("-", string.Empty); - bool flag = strippedMACAddress.Length == 12; - System.Guid NetbootGUIDFromMACAddress; - if (flag) - { - System.Guid guid = new System.Guid(string.Format("00000000-0000-0000-0000-{0}", strippedMACAddress)); - NetbootGUIDFromMACAddress = guid; - } - else - { - NetbootGUIDFromMACAddress = System.Guid.Empty; - } - return NetbootGUIDFromMACAddress; - } - internal static System.Guid NetbootGUIDFromUUID(string UUID) - { - System.Guid result = new System.Guid(UUID); - return result; - } - - public static object GetPropertyValue(this ActiveDirectoryMachineAccount account, string PropertyName, int Index = 0) - { - switch (PropertyName.ToLower()) - { - case "name": - return account.Name; - case "samaccountname": - return account.sAMAccountName; - case "distinguishedname": - return account.DistinguishedName; - case "objectsid": - return account.ObjectSid; - case "netbootguid": - return account.NetbootGUID; - default: - object[] adProperty; - if (account.LoadedProperties.TryGetValue(PropertyName, out adProperty) && Index <= adProperty.Length) - return adProperty[Index]; - else - return null; - } - } - - public static IPStatus PingComputer(this ActiveDirectoryMachineAccount account, int Timeout = 2000) - { - using (var p = new Ping()) - { - PingReply reply = p.Send(account.DnsName, Timeout); - return reply.Status; - } - } - - // Didn't Work - WMI Limitation? - // G# - 2012-06-18 - //public static void OnlineRenameComputer(this ActiveDirectoryMachineAccount account, string NewComputerName) - //{ - // if (account.IsCriticalSystemObject) - // throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); - - // try - // { - // IPStatus pingResult = account.PingComputer(); - // if (pingResult != IPStatus.Success) - // throw new Exception(string.Format("Ping Error Result: {0}", pingResult.ToString())); - // } - // catch (Exception ex) - // { - // throw new Exception(string.Format("Error trying to Ping the Device: {0}; {1}", account.DnsName, ex.Message), ex); - // } - - // ConnectionOptions wmiConnectionOptions = new ConnectionOptions() - // { - // Authentication = AuthenticationLevel.PacketPrivacy, - // Impersonation = ImpersonationLevel.Impersonate, - // EnablePrivileges = true, - // Timeout = new TimeSpan(0, 0, 6) - // }; - // ManagementPath wmiPath = new ManagementPath() - // { - // Server = account.DnsName, - // NamespacePath = @"root\cimv2", - // ClassName = "Win32_ComputerSystem" - // }; - - // ManagementScope wmiScope = new ManagementScope(wmiPath, wmiConnectionOptions); - - // ObjectGetOptions wmiGetOptions = new ObjectGetOptions() { Timeout = new TimeSpan(0, 1, 0) }; - - // using (ManagementClass wmiClass = new ManagementClass(wmiScope, wmiPath, wmiGetOptions)) - // { - // foreach (ManagementObject wmiWin32ComputerSystem in wmiClass.GetInstances()) - // { - // UInt32 result = (UInt32)wmiWin32ComputerSystem.InvokeMethod("Rename", new object[] { NewComputerName }); - // if (result != 0) - // throw new Exception(string.Format("Error Renaming Computer; WMI Remote Method 'Rename' returned: {0}", result)); - // } - // } - //} - - public static void MoveOrganisationUnit(this ActiveDirectoryMachineAccount account, string NewOrganisationUnit) - { - if (account.IsCriticalSystemObject) - throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); - - if (!account.ParentDistinguishedName.Equals(NewOrganisationUnit, StringComparison.InvariantCultureIgnoreCase)) - { - string ouPath; - if (string.IsNullOrWhiteSpace(NewOrganisationUnit)) - ouPath = string.Format("{0}CN=Computers,{1}", ActiveDirectoryHelpers.DefaultLdapPath, ActiveDirectoryHelpers.DefaultDomainQualifiedName); - else - ouPath = string.Format("{0}{1},{2}", ActiveDirectoryHelpers.DefaultLdapPath, NewOrganisationUnit, ActiveDirectoryHelpers.DefaultDomainQualifiedName); - - using (DirectoryEntry ou = new DirectoryEntry(ouPath)) - { - using (DirectoryEntry i = new DirectoryEntry(account.Path) { UsePropertyCache = false }) - { - i.MoveTo(ou); - } - } - } - } - - } -} +using Disco.Models.Interop.ActiveDirectory; +using Disco.Models.Repository; +using System; +using System.Collections; +using System.Collections.Generic; +using System.DirectoryServices; +using System.Text; +using System.Net.NetworkInformation; +using System.Management; + +namespace Disco.BI.Interop.ActiveDirectory +{ + public static class ActiveDirectoryMachineAccountExtensions + { + public static void DeleteAccount(this ActiveDirectoryMachineAccount account) + { + if (account.IsCriticalSystemObject) + throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); + + using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) + { + DeleteAccountRecursive(machineDE); + + using (var machineDEParent = machineDE.Parent) + { + machineDEParent.Children.Remove(machineDE); + } + } + } + private static void DeleteAccountRecursive(DirectoryEntry parent) + { + List children = new List(); + foreach (DirectoryEntry child in parent.Children) + children.Add(child); + + foreach (var child in children) + { + DeleteAccountRecursive(child); + parent.Children.Remove(child); + child.Dispose(); + } + } + private static void SetNetbootGUID(this ActiveDirectoryMachineAccount account, System.Guid updatedNetbootGUID) + { + if (account.IsCriticalSystemObject) + throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); + + using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) + { + PropertyValueCollection netbootGUIDProp = machineDE.Properties["netbootGUID"]; + bool flag = netbootGUIDProp.Count > 0; + if (flag) + { + netbootGUIDProp.Clear(); + } + netbootGUIDProp.Add(updatedNetbootGUID.ToByteArray()); + machineDE.CommitChanges(); + } + } + public static void SetDescription(this ActiveDirectoryMachineAccount account, string Description) + { + using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) + { + PropertyValueCollection descriptionProp = machineDE.Properties["description"]; + bool flag = descriptionProp.Count > 0; + if (flag) + { + descriptionProp.Clear(); + } + flag = !string.IsNullOrEmpty(Description); + if (flag) + { + descriptionProp.Add(Description); + } + machineDE.CommitChanges(); + } + } + public static void SetDescription(this ActiveDirectoryMachineAccount account, Device Device) + { + System.Text.StringBuilder descriptionBuilder = new System.Text.StringBuilder(); + bool flag = Device.AssignedUserId != null; + if (flag) + { + descriptionBuilder.Append(Device.AssignedUser.Id); + descriptionBuilder.Append(" ("); + descriptionBuilder.Append(Device.AssignedUser.DisplayName); + descriptionBuilder.Append("); "); + } + flag = Device.DeviceModelId.HasValue; + if (flag) + { + descriptionBuilder.Append(Device.DeviceModel.Description); + descriptionBuilder.Append("; "); + } + descriptionBuilder.Append(Device.DeviceProfile.Description); + descriptionBuilder.Append("; "); + string description = descriptionBuilder.ToString().Trim(); + flag = (description.Length > 1024); + if (flag) + { + description = description.Substring(0, 1024); + } + account.SetDescription(description); + } + + public static void DisableAccount(this ActiveDirectoryMachineAccount account) + { + if (account.IsCriticalSystemObject) + throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); + + using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) + { + int accountControl = (int)machineDE.Properties["userAccountControl"][0]; + int updatedAccountControl = (accountControl | 2); + if (accountControl != updatedAccountControl) + { + machineDE.Properties["userAccountControl"][0] = updatedAccountControl; + machineDE.CommitChanges(); + } + } + } + public static void EnableAccount(this ActiveDirectoryMachineAccount account) + { + if (account.IsCriticalSystemObject) + throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); + + using (DirectoryEntry machineDE = new DirectoryEntry(account.Path)) + { + int accountControl = (int)machineDE.Properties["userAccountControl"][0]; + if ((accountControl & 2) == 2) + { + int updatedAccountControl = (accountControl ^ 2); + machineDE.Properties["userAccountControl"][0] = updatedAccountControl; + machineDE.CommitChanges(); + } + } + } + + public static bool UpdateNetbootGUID(this ActiveDirectoryMachineAccount account, string UUID, string MACAddress) + { + if (account.IsCriticalSystemObject) + throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); + + System.Guid netbootGUID = System.Guid.Empty; + bool flag = !string.IsNullOrWhiteSpace(UUID); + if (flag) + { + netbootGUID = ActiveDirectoryMachineAccountExtensions.NetbootGUIDFromUUID(UUID); + } + else + { + flag = !string.IsNullOrWhiteSpace(MACAddress); + if (flag) + { + netbootGUID = ActiveDirectoryMachineAccountExtensions.NetbootGUIDFromMACAddress(MACAddress); + } + } + flag = (netbootGUID != System.Guid.Empty && netbootGUID != account.NetbootGUID); + bool UpdateNetbootGUID; + if (flag) + { + account.SetNetbootGUID(netbootGUID); + UpdateNetbootGUID = true; + } + else + { + UpdateNetbootGUID = false; + } + return UpdateNetbootGUID; + } + internal static System.Guid NetbootGUIDFromMACAddress(string MACAddress) + { + string strippedMACAddress = MACAddress.Trim().Replace(":", string.Empty).Replace("-", string.Empty); + bool flag = strippedMACAddress.Length == 12; + System.Guid NetbootGUIDFromMACAddress; + if (flag) + { + System.Guid guid = new System.Guid(string.Format("00000000-0000-0000-0000-{0}", strippedMACAddress)); + NetbootGUIDFromMACAddress = guid; + } + else + { + NetbootGUIDFromMACAddress = System.Guid.Empty; + } + return NetbootGUIDFromMACAddress; + } + internal static System.Guid NetbootGUIDFromUUID(string UUID) + { + System.Guid result = new System.Guid(UUID); + return result; + } + + public static object GetPropertyValue(this ActiveDirectoryMachineAccount account, string PropertyName, int Index = 0) + { + switch (PropertyName.ToLower()) + { + case "name": + return account.Name; + case "samaccountname": + return account.sAMAccountName; + case "distinguishedname": + return account.DistinguishedName; + case "objectsid": + return account.ObjectSid; + case "netbootguid": + return account.NetbootGUID; + default: + object[] adProperty; + if (account.LoadedProperties.TryGetValue(PropertyName, out adProperty) && Index <= adProperty.Length) + return adProperty[Index]; + else + return null; + } + } + + public static IPStatus PingComputer(this ActiveDirectoryMachineAccount account, int Timeout = 2000) + { + using (var p = new Ping()) + { + PingReply reply = p.Send(account.DnsName, Timeout); + return reply.Status; + } + } + + // Didn't Work - WMI Limitation? + // G# - 2012-06-18 + //public static void OnlineRenameComputer(this ActiveDirectoryMachineAccount account, string NewComputerName) + //{ + // if (account.IsCriticalSystemObject) + // throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); + + // try + // { + // IPStatus pingResult = account.PingComputer(); + // if (pingResult != IPStatus.Success) + // throw new Exception(string.Format("Ping Error Result: {0}", pingResult.ToString())); + // } + // catch (Exception ex) + // { + // throw new Exception(string.Format("Error trying to Ping the Device: {0}; {1}", account.DnsName, ex.Message), ex); + // } + + // ConnectionOptions wmiConnectionOptions = new ConnectionOptions() + // { + // Authentication = AuthenticationLevel.PacketPrivacy, + // Impersonation = ImpersonationLevel.Impersonate, + // EnablePrivileges = true, + // Timeout = new TimeSpan(0, 0, 6) + // }; + // ManagementPath wmiPath = new ManagementPath() + // { + // Server = account.DnsName, + // NamespacePath = @"root\cimv2", + // ClassName = "Win32_ComputerSystem" + // }; + + // ManagementScope wmiScope = new ManagementScope(wmiPath, wmiConnectionOptions); + + // ObjectGetOptions wmiGetOptions = new ObjectGetOptions() { Timeout = new TimeSpan(0, 1, 0) }; + + // using (ManagementClass wmiClass = new ManagementClass(wmiScope, wmiPath, wmiGetOptions)) + // { + // foreach (ManagementObject wmiWin32ComputerSystem in wmiClass.GetInstances()) + // { + // UInt32 result = (UInt32)wmiWin32ComputerSystem.InvokeMethod("Rename", new object[] { NewComputerName }); + // if (result != 0) + // throw new Exception(string.Format("Error Renaming Computer; WMI Remote Method 'Rename' returned: {0}", result)); + // } + // } + //} + + public static void MoveOrganisationUnit(this ActiveDirectoryMachineAccount account, string NewOrganisationUnit) + { + if (account.IsCriticalSystemObject) + throw new InvalidOperationException(string.Format("This account {0} is a Critical System Active Directory Object and Disco refuses to modify it", account.DistinguishedName)); + + if (!account.ParentDistinguishedName.Equals(NewOrganisationUnit, StringComparison.InvariantCultureIgnoreCase)) + { + string ouPath; + if (string.IsNullOrWhiteSpace(NewOrganisationUnit)) + ouPath = string.Format("{0}CN=Computers,{1}", ActiveDirectoryHelpers.DefaultLdapPath, ActiveDirectoryHelpers.DefaultDomainQualifiedName); + else + ouPath = string.Format("{0}{1},{2}", ActiveDirectoryHelpers.DefaultLdapPath, NewOrganisationUnit, ActiveDirectoryHelpers.DefaultDomainQualifiedName); + + using (DirectoryEntry ou = new DirectoryEntry(ouPath)) + { + using (DirectoryEntry i = new DirectoryEntry(account.Path) { UsePropertyCache = false }) + { + i.MoveTo(ou); + } + } + } + } + + } +} diff --git a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryOrganisationalUnit.cs b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryOrganisationalUnit.cs index 289d4d8a..06241629 100644 --- a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryOrganisationalUnit.cs +++ b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryOrganisationalUnit.cs @@ -1,14 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.BI.Interop.ActiveDirectory -{ - public class ActiveDirectoryOrganisationalUnit - { - public string Name { get; set; } - public string Path { get; set; } - public List Children { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.BI.Interop.ActiveDirectory +{ + public class ActiveDirectoryOrganisationalUnit + { + public string Name { get; set; } + public string Path { get; set; } + public List Children { get; set; } + } +} diff --git a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryUserAccountExtensions.cs b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryUserAccountExtensions.cs index 630bb462..4b0bc303 100644 --- a/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryUserAccountExtensions.cs +++ b/Disco.BI/BI/Interop/ActiveDirectory/ActiveDirectoryUserAccountExtensions.cs @@ -1,42 +1,42 @@ -using Disco.Models.Interop.ActiveDirectory; -using System; -using Disco.Models.Repository; -namespace Disco.BI.Interop.ActiveDirectory -{ - internal static class ActiveDirectoryUserAccountExtensions - { - public static bool HasRole(this ActiveDirectoryUserAccount account, string Role) - { - return account.Groups != null && account.Groups.Contains(Role.ToLower()); - } - - public static object GetPropertyValue(this ActiveDirectoryUserAccount account, string PropertyName, int Index = 0) - { - switch (PropertyName.ToLower()) - { - case "name": - return account.Name; - case "samaccountname": - return account.sAMAccountName; - case "distinguishedname": - return account.DistinguishedName; - case "objectsid": - return account.ObjectSid; - case "sn": - return account.Surname; - case "givenname": - return account.GivenName; - case "mail": - return account.Email; - case "telephonenumber": - return account.Phone; - default: - object[] adProperty; - if (account.LoadedProperties.TryGetValue(PropertyName, out adProperty) && Index <= adProperty.Length) - return adProperty[Index]; - else - return null; - } - } - } -} +using Disco.Models.Interop.ActiveDirectory; +using System; +using Disco.Models.Repository; +namespace Disco.BI.Interop.ActiveDirectory +{ + internal static class ActiveDirectoryUserAccountExtensions + { + public static bool HasRole(this ActiveDirectoryUserAccount account, string Role) + { + return account.Groups != null && account.Groups.Contains(Role.ToLower()); + } + + public static object GetPropertyValue(this ActiveDirectoryUserAccount account, string PropertyName, int Index = 0) + { + switch (PropertyName.ToLower()) + { + case "name": + return account.Name; + case "samaccountname": + return account.sAMAccountName; + case "distinguishedname": + return account.DistinguishedName; + case "objectsid": + return account.ObjectSid; + case "sn": + return account.Surname; + case "givenname": + return account.GivenName; + case "mail": + return account.Email; + case "telephonenumber": + return account.Phone; + default: + object[] adProperty; + if (account.LoadedProperties.TryGetValue(PropertyName, out adProperty) && Index <= adProperty.Length) + return adProperty[Index]; + else + return null; + } + } + } +} diff --git a/Disco.BI/BI/Interop/MimeTypes.cs b/Disco.BI/BI/Interop/MimeTypes.cs index 38580f2d..bb30205b 100644 --- a/Disco.BI/BI/Interop/MimeTypes.cs +++ b/Disco.BI/BI/Interop/MimeTypes.cs @@ -1,85 +1,85 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Win32; - -namespace Disco.BI.Interop -{ - public static class MimeTypes - { - public static string ResolveMimeType(string Filename) - { - string fileExtension; - if (Filename.Contains(".")) - fileExtension = Filename.Substring(Filename.LastIndexOf(".") + 1).ToLower(); - else - fileExtension = Filename.ToLower(); - - // Try Known Mime Types - switch (fileExtension) - { - case "pdf": - return "application/pdf"; - case "doc": - return "application/msword"; - case "docx": - return "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; - case "docm": - return "application/vnd.ms-word.document.macroEnabled.12"; - case "xml": - return "text/xml"; - case "xls": - return "application/vnd.ms-excel"; - case "xlsx": - return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; - case "xlsm": - return "application/vnd.ms-excel.sheet.macroEnabled.12"; - case "csv": - return "application/vnd.ms-excel"; - case "jpg": - return "image/jpeg"; - case "gif": - return "image/gif"; - case "png": - return "image/png"; - case "bmp": - return "image/bmp"; - case "avi": - return "video/avi"; - case "mpeg": - case "mpg": - return "video/mpeg"; - case "mp3": - return "audio/mpeg"; - case "mp4": - return "video/mp4"; - case "wmv": - return "video/x-ms-wmv"; - case "mov": - return "video/quicktime"; - } - - // Check System Registry - try - { - RegistryKey regExtensionKey = Registry.ClassesRoot.OpenSubKey("." + fileExtension); - if (regExtensionKey != null) - { - string regExtensionContentType = regExtensionKey.GetValue("Content Type") as string; - if (regExtensionContentType != null) - { - return regExtensionContentType; - } - } - } - catch - { - // Ignore Errors - } - - // Return Default - return "unknown/unknown"; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Win32; + +namespace Disco.BI.Interop +{ + public static class MimeTypes + { + public static string ResolveMimeType(string Filename) + { + string fileExtension; + if (Filename.Contains(".")) + fileExtension = Filename.Substring(Filename.LastIndexOf(".") + 1).ToLower(); + else + fileExtension = Filename.ToLower(); + + // Try Known Mime Types + switch (fileExtension) + { + case "pdf": + return "application/pdf"; + case "doc": + return "application/msword"; + case "docx": + return "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; + case "docm": + return "application/vnd.ms-word.document.macroEnabled.12"; + case "xml": + return "text/xml"; + case "xls": + return "application/vnd.ms-excel"; + case "xlsx": + return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; + case "xlsm": + return "application/vnd.ms-excel.sheet.macroEnabled.12"; + case "csv": + return "application/vnd.ms-excel"; + case "jpg": + return "image/jpeg"; + case "gif": + return "image/gif"; + case "png": + return "image/png"; + case "bmp": + return "image/bmp"; + case "avi": + return "video/avi"; + case "mpeg": + case "mpg": + return "video/mpeg"; + case "mp3": + return "audio/mpeg"; + case "mp4": + return "video/mp4"; + case "wmv": + return "video/x-ms-wmv"; + case "mov": + return "video/quicktime"; + } + + // Check System Registry + try + { + RegistryKey regExtensionKey = Registry.ClassesRoot.OpenSubKey("." + fileExtension); + if (regExtensionKey != null) + { + string regExtensionContentType = regExtensionKey.GetValue("Content Type") as string; + if (regExtensionContentType != null) + { + return regExtensionContentType; + } + } + } + catch + { + // Ignore Errors + } + + // Return Default + return "unknown/unknown"; + } + } +} diff --git a/Disco.BI/BI/Interop/Pdf/PdfGenerator.cs b/Disco.BI/BI/Interop/Pdf/PdfGenerator.cs index eaebd62b..f2368369 100644 --- a/Disco.BI/BI/Interop/Pdf/PdfGenerator.cs +++ b/Disco.BI/BI/Interop/Pdf/PdfGenerator.cs @@ -1,251 +1,251 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; -using Disco.Models.BI.DocumentTemplates; -using System.IO; -using iTextSharp.text.pdf; -using System.Collections.Concurrent; -using Disco.BI.Expressions; -using System.Collections; -using Disco.BI.Extensions; -using Disco.Models.BI.Expressions; - -namespace Disco.BI.Interop.Pdf -{ - public static class PdfGenerator - { - - public static System.IO.Stream GenerateBulkFromTemplate(DocumentTemplate dt, DiscoDataContext dbContext, User CreatorUser, System.DateTime Timestamp, params object[] DataObjects) - { - if (DataObjects.Length > 0) - { - List generatedPdfs = new List(DataObjects.Length); - using (Models.BI.DocumentTemplates.DocumentState state = Models.BI.DocumentTemplates.DocumentState.DefaultState()) - { - foreach (object d in DataObjects) - { - generatedPdfs.Add(dt.GeneratePdf(dbContext, d, CreatorUser, Timestamp, state, true)); - state.SequenceNumber++; - state.FlushScopeCache(); - } - } - if (generatedPdfs.Count == 1) - { - return generatedPdfs[0]; - } - else - { - Stream bulkPdf = DocumentTemplateBI.Utilities.JoinPdfs(generatedPdfs.ToArray()); - foreach (Stream singlePdf in generatedPdfs) - singlePdf.Dispose(); - return bulkPdf; - } - } - return null; - } - - public static System.IO.Stream GenerateBulkFromTemplate(DocumentTemplate dt, DiscoDataContext dbContext, User CreatorUser, System.DateTime Timestamp, params string[] DataObjectsIds) - { - object[] DataObjects; - - switch (dt.Scope) - { - case DocumentTemplate.DocumentTemplateScopes.Device: - DataObjects = dbContext.Devices.Where(d => DataObjectsIds.Contains(d.SerialNumber)).ToArray(); - break; - case DocumentTemplate.DocumentTemplateScopes.Job: - int[] intDataObjectsIds = DataObjectsIds.Select(i => int.Parse(i)).ToArray(); - DataObjects = dbContext.Jobs.Where(j => intDataObjectsIds.Contains(j.Id)).ToArray(); - break; - case DocumentTemplate.DocumentTemplateScopes.User: - DataObjects = new object[DataObjectsIds.Length]; - for (int idIndex = 0; idIndex < DataObjectsIds.Length; idIndex++) - { - DataObjects[idIndex] = UserBI.UserCache.GetUser(DataObjectsIds[idIndex], dbContext, true); - if (DataObjects[idIndex] == null) - throw new Exception(string.Format("Unknown Username specified: {0}", DataObjectsIds[idIndex])); - } - break; - default: - throw new InvalidOperationException("Invalid DocumentType Scope"); - } - - return GenerateBulkFromTemplate(dt, dbContext, CreatorUser, Timestamp, DataObjects); - } - - public static System.IO.Stream GenerateFromTemplate(DocumentTemplate dt, DiscoDataContext dbContext, object Data, User CreatorUser, System.DateTime TimeStamp, DocumentState State, bool FlattenFields = false) - { - // Validate Data - switch (dt.Scope) - { - case DocumentTemplate.DocumentTemplateScopes.Device: - if (!(Data is Device)) - throw new ArgumentException("This AttachmentType is configured for Devices only", "Data"); - break; - case DocumentTemplate.DocumentTemplateScopes.Job: - if (!(Data is Job)) - throw new ArgumentException("This AttachmentType is configured for Jobs only", "Data"); - break; - case DocumentTemplate.DocumentTemplateScopes.User: - if (!(Data is User)) - throw new ArgumentException("This AttachmentType is configured for Users only", "Data"); - break; - default: - throw new InvalidOperationException("Invalid AttachmentType Scope"); - } - - dbContext.Configuration.LazyLoadingEnabled = true; - - // Override FlattenFields if Document Template instructs. - if (dt.FlattenForm) - FlattenFields = true; - - ConcurrentDictionary expressionCache = dt.PdfExpressionsFromCache(dbContext); - - string templateFilename = dt.RepositoryFilename(dbContext); - PdfReader pdfReader = new PdfReader(templateFilename); - - MemoryStream pdfGeneratedStream = new MemoryStream(); - PdfStamper pdfStamper = new PdfStamper(pdfReader, pdfGeneratedStream); - - pdfStamper.FormFlattening = FlattenFields; - pdfStamper.Writer.CloseStream = false; - - IDictionary expressionVariables = Expression.StandardVariables(dt, dbContext, CreatorUser, TimeStamp, State); - - foreach (string pdfFieldKey in pdfStamper.AcroFields.Fields.Keys) - { - if (pdfFieldKey.Equals("DiscoAttachmentId", StringComparison.InvariantCultureIgnoreCase)) - { - AcroFields.Item fields = pdfStamper.AcroFields.Fields[pdfFieldKey]; - string fieldValue = dt.UniqueIdentifier(Data, CreatorUser.Id, TimeStamp); - if (FlattenFields) - pdfStamper.AcroFields.SetField(pdfFieldKey, String.Empty); - else - pdfStamper.AcroFields.SetField(pdfFieldKey, fieldValue); - - IList pdfFieldPositions = pdfStamper.AcroFields.GetFieldPositions(pdfFieldKey); - for (int pdfFieldOrdinal = 0; pdfFieldOrdinal < fields.Size; pdfFieldOrdinal++) - { - AcroFields.FieldPosition pdfFieldPosition = pdfFieldPositions[pdfFieldOrdinal]; - string pdfBarcodeContent = dt.UniquePageIdentifier(Data, CreatorUser.Id, TimeStamp, pdfFieldPosition.page); - BarcodeQRCode pdfBarcode = new BarcodeQRCode(pdfBarcodeContent, (int)pdfFieldPosition.position.Width, (int)pdfFieldPosition.position.Height, null); - iTextSharp.text.Image pdfBarcodeImage = pdfBarcode.GetImage(); - pdfBarcodeImage.SetAbsolutePosition(pdfFieldPosition.position.Left, pdfFieldPosition.position.Bottom); - pdfStamper.GetOverContent(pdfFieldPosition.page).AddImage(pdfBarcodeImage); - } - // Hide Fields - PdfDictionary field = fields.GetValue(0); - if ((PdfName)field.Get(PdfName.TYPE) == PdfName.ANNOT) - { - field.Put(PdfName.F, new PdfNumber(6)); - } - else - { - PdfArray fieldKids = (PdfArray)field.Get(PdfName.KIDS); - foreach (PdfIndirectReference fieldKidRef in fieldKids) - { - ((PdfDictionary)pdfReader.GetPdfObject(fieldKidRef.Number)).Put(PdfName.F, new PdfNumber(6)); - } - } - } - else - { - Expression fieldExpression = null; - if (expressionCache.TryGetValue(pdfFieldKey, out fieldExpression)) - { - if (fieldExpression.IsDynamic) - { - Tuple fieldExpressionResult = fieldExpression.Evaluate(Data, expressionVariables); - - if (fieldExpressionResult.Item3 != null) - { - IImageExpressionResult imageResult = (fieldExpressionResult.Item3 as IImageExpressionResult); - if (imageResult != null) - { - // Output Image - AcroFields.Item fields = pdfStamper.AcroFields.Fields[pdfFieldKey]; - IList pdfFieldPositions = pdfStamper.AcroFields.GetFieldPositions(pdfFieldKey); - for (int pdfFieldOrdinal = 0; pdfFieldOrdinal < fields.Size; pdfFieldOrdinal++) - { - AcroFields.FieldPosition pdfFieldPosition = pdfFieldPositions[pdfFieldOrdinal]; - iTextSharp.text.Image pdfImage = iTextSharp.text.Image.GetInstance(imageResult.GetImage((int)pdfFieldPosition.position.Width, (int)pdfFieldPosition.position.Height)); - pdfImage.SetAbsolutePosition(pdfFieldPosition.position.Left, pdfFieldPosition.position.Bottom); - pdfStamper.GetOverContent(pdfFieldPosition.page).AddImage(pdfImage); - } - if (!fieldExpressionResult.Item2 && !imageResult.ShowField) - { - // Hide Fields - PdfDictionary field = fields.GetValue(0); - if ((PdfName)field.Get(PdfName.TYPE) == PdfName.ANNOT) - { - field.Put(PdfName.F, new PdfNumber(6)); - } - else - { - PdfArray fieldKids = (PdfArray)field.Get(PdfName.KIDS); - foreach (PdfIndirectReference fieldKidRef in fieldKids) - { - ((PdfDictionary)pdfReader.GetPdfObject(fieldKidRef.Number)).Put(PdfName.F, new PdfNumber(6)); - } - } - } - } - } - - pdfStamper.AcroFields.SetField(pdfFieldKey, fieldExpressionResult.Item1); - - if (fieldExpressionResult.Item2) // Expression Error - { - AcroFields.Item fields = pdfStamper.AcroFields.Fields[pdfFieldKey]; - for (int pdfFieldOrdinal = 0; pdfFieldOrdinal < fields.Size; pdfFieldOrdinal++) - { - PdfDictionary field = fields.GetValue(pdfFieldOrdinal); - PdfDictionary fieldMK; - if (field.Contains(PdfName.MK)) - fieldMK = field.GetAsDict(PdfName.MK); - else - { - fieldMK = new PdfDictionary(PdfName.MK); - field.Put(PdfName.MK, fieldMK); - } - fieldMK.Put(PdfName.BC, new PdfArray(new float[] { 1, 0, 0 })); - } - } - } - } - else - { - throw new InvalidOperationException("Pdf template field expressions are out of sync with the expression cache"); - } - } - State.FlushFieldCache(); - } - - pdfStamper.Close(); - pdfReader.Close(); - - if (dt.Scope == DocumentTemplate.DocumentTemplateScopes.Job) - { - // Write Job Log - - Job j = (Job)Data; - JobLog jl = new JobLog() - { - JobId = j.Id, - TechUserId = CreatorUser.Id, - Timestamp = DateTime.Now - }; - jl.Comments = string.Format("Document Generated{0}{1} [{2}]", Environment.NewLine, dt.Description, dt.Id); - dbContext.JobLogs.Add(jl); - } - - pdfGeneratedStream.Position = 0; - return pdfGeneratedStream; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; +using Disco.Models.BI.DocumentTemplates; +using System.IO; +using iTextSharp.text.pdf; +using System.Collections.Concurrent; +using Disco.BI.Expressions; +using System.Collections; +using Disco.BI.Extensions; +using Disco.Models.BI.Expressions; + +namespace Disco.BI.Interop.Pdf +{ + public static class PdfGenerator + { + + public static System.IO.Stream GenerateBulkFromTemplate(DocumentTemplate dt, DiscoDataContext dbContext, User CreatorUser, System.DateTime Timestamp, params object[] DataObjects) + { + if (DataObjects.Length > 0) + { + List generatedPdfs = new List(DataObjects.Length); + using (Models.BI.DocumentTemplates.DocumentState state = Models.BI.DocumentTemplates.DocumentState.DefaultState()) + { + foreach (object d in DataObjects) + { + generatedPdfs.Add(dt.GeneratePdf(dbContext, d, CreatorUser, Timestamp, state, true)); + state.SequenceNumber++; + state.FlushScopeCache(); + } + } + if (generatedPdfs.Count == 1) + { + return generatedPdfs[0]; + } + else + { + Stream bulkPdf = DocumentTemplateBI.Utilities.JoinPdfs(generatedPdfs.ToArray()); + foreach (Stream singlePdf in generatedPdfs) + singlePdf.Dispose(); + return bulkPdf; + } + } + return null; + } + + public static System.IO.Stream GenerateBulkFromTemplate(DocumentTemplate dt, DiscoDataContext dbContext, User CreatorUser, System.DateTime Timestamp, params string[] DataObjectsIds) + { + object[] DataObjects; + + switch (dt.Scope) + { + case DocumentTemplate.DocumentTemplateScopes.Device: + DataObjects = dbContext.Devices.Where(d => DataObjectsIds.Contains(d.SerialNumber)).ToArray(); + break; + case DocumentTemplate.DocumentTemplateScopes.Job: + int[] intDataObjectsIds = DataObjectsIds.Select(i => int.Parse(i)).ToArray(); + DataObjects = dbContext.Jobs.Where(j => intDataObjectsIds.Contains(j.Id)).ToArray(); + break; + case DocumentTemplate.DocumentTemplateScopes.User: + DataObjects = new object[DataObjectsIds.Length]; + for (int idIndex = 0; idIndex < DataObjectsIds.Length; idIndex++) + { + DataObjects[idIndex] = UserBI.UserCache.GetUser(DataObjectsIds[idIndex], dbContext, true); + if (DataObjects[idIndex] == null) + throw new Exception(string.Format("Unknown Username specified: {0}", DataObjectsIds[idIndex])); + } + break; + default: + throw new InvalidOperationException("Invalid DocumentType Scope"); + } + + return GenerateBulkFromTemplate(dt, dbContext, CreatorUser, Timestamp, DataObjects); + } + + public static System.IO.Stream GenerateFromTemplate(DocumentTemplate dt, DiscoDataContext dbContext, object Data, User CreatorUser, System.DateTime TimeStamp, DocumentState State, bool FlattenFields = false) + { + // Validate Data + switch (dt.Scope) + { + case DocumentTemplate.DocumentTemplateScopes.Device: + if (!(Data is Device)) + throw new ArgumentException("This AttachmentType is configured for Devices only", "Data"); + break; + case DocumentTemplate.DocumentTemplateScopes.Job: + if (!(Data is Job)) + throw new ArgumentException("This AttachmentType is configured for Jobs only", "Data"); + break; + case DocumentTemplate.DocumentTemplateScopes.User: + if (!(Data is User)) + throw new ArgumentException("This AttachmentType is configured for Users only", "Data"); + break; + default: + throw new InvalidOperationException("Invalid AttachmentType Scope"); + } + + dbContext.Configuration.LazyLoadingEnabled = true; + + // Override FlattenFields if Document Template instructs. + if (dt.FlattenForm) + FlattenFields = true; + + ConcurrentDictionary expressionCache = dt.PdfExpressionsFromCache(dbContext); + + string templateFilename = dt.RepositoryFilename(dbContext); + PdfReader pdfReader = new PdfReader(templateFilename); + + MemoryStream pdfGeneratedStream = new MemoryStream(); + PdfStamper pdfStamper = new PdfStamper(pdfReader, pdfGeneratedStream); + + pdfStamper.FormFlattening = FlattenFields; + pdfStamper.Writer.CloseStream = false; + + IDictionary expressionVariables = Expression.StandardVariables(dt, dbContext, CreatorUser, TimeStamp, State); + + foreach (string pdfFieldKey in pdfStamper.AcroFields.Fields.Keys) + { + if (pdfFieldKey.Equals("DiscoAttachmentId", StringComparison.InvariantCultureIgnoreCase)) + { + AcroFields.Item fields = pdfStamper.AcroFields.Fields[pdfFieldKey]; + string fieldValue = dt.UniqueIdentifier(Data, CreatorUser.Id, TimeStamp); + if (FlattenFields) + pdfStamper.AcroFields.SetField(pdfFieldKey, String.Empty); + else + pdfStamper.AcroFields.SetField(pdfFieldKey, fieldValue); + + IList pdfFieldPositions = pdfStamper.AcroFields.GetFieldPositions(pdfFieldKey); + for (int pdfFieldOrdinal = 0; pdfFieldOrdinal < fields.Size; pdfFieldOrdinal++) + { + AcroFields.FieldPosition pdfFieldPosition = pdfFieldPositions[pdfFieldOrdinal]; + string pdfBarcodeContent = dt.UniquePageIdentifier(Data, CreatorUser.Id, TimeStamp, pdfFieldPosition.page); + BarcodeQRCode pdfBarcode = new BarcodeQRCode(pdfBarcodeContent, (int)pdfFieldPosition.position.Width, (int)pdfFieldPosition.position.Height, null); + iTextSharp.text.Image pdfBarcodeImage = pdfBarcode.GetImage(); + pdfBarcodeImage.SetAbsolutePosition(pdfFieldPosition.position.Left, pdfFieldPosition.position.Bottom); + pdfStamper.GetOverContent(pdfFieldPosition.page).AddImage(pdfBarcodeImage); + } + // Hide Fields + PdfDictionary field = fields.GetValue(0); + if ((PdfName)field.Get(PdfName.TYPE) == PdfName.ANNOT) + { + field.Put(PdfName.F, new PdfNumber(6)); + } + else + { + PdfArray fieldKids = (PdfArray)field.Get(PdfName.KIDS); + foreach (PdfIndirectReference fieldKidRef in fieldKids) + { + ((PdfDictionary)pdfReader.GetPdfObject(fieldKidRef.Number)).Put(PdfName.F, new PdfNumber(6)); + } + } + } + else + { + Expression fieldExpression = null; + if (expressionCache.TryGetValue(pdfFieldKey, out fieldExpression)) + { + if (fieldExpression.IsDynamic) + { + Tuple fieldExpressionResult = fieldExpression.Evaluate(Data, expressionVariables); + + if (fieldExpressionResult.Item3 != null) + { + IImageExpressionResult imageResult = (fieldExpressionResult.Item3 as IImageExpressionResult); + if (imageResult != null) + { + // Output Image + AcroFields.Item fields = pdfStamper.AcroFields.Fields[pdfFieldKey]; + IList pdfFieldPositions = pdfStamper.AcroFields.GetFieldPositions(pdfFieldKey); + for (int pdfFieldOrdinal = 0; pdfFieldOrdinal < fields.Size; pdfFieldOrdinal++) + { + AcroFields.FieldPosition pdfFieldPosition = pdfFieldPositions[pdfFieldOrdinal]; + iTextSharp.text.Image pdfImage = iTextSharp.text.Image.GetInstance(imageResult.GetImage((int)pdfFieldPosition.position.Width, (int)pdfFieldPosition.position.Height)); + pdfImage.SetAbsolutePosition(pdfFieldPosition.position.Left, pdfFieldPosition.position.Bottom); + pdfStamper.GetOverContent(pdfFieldPosition.page).AddImage(pdfImage); + } + if (!fieldExpressionResult.Item2 && !imageResult.ShowField) + { + // Hide Fields + PdfDictionary field = fields.GetValue(0); + if ((PdfName)field.Get(PdfName.TYPE) == PdfName.ANNOT) + { + field.Put(PdfName.F, new PdfNumber(6)); + } + else + { + PdfArray fieldKids = (PdfArray)field.Get(PdfName.KIDS); + foreach (PdfIndirectReference fieldKidRef in fieldKids) + { + ((PdfDictionary)pdfReader.GetPdfObject(fieldKidRef.Number)).Put(PdfName.F, new PdfNumber(6)); + } + } + } + } + } + + pdfStamper.AcroFields.SetField(pdfFieldKey, fieldExpressionResult.Item1); + + if (fieldExpressionResult.Item2) // Expression Error + { + AcroFields.Item fields = pdfStamper.AcroFields.Fields[pdfFieldKey]; + for (int pdfFieldOrdinal = 0; pdfFieldOrdinal < fields.Size; pdfFieldOrdinal++) + { + PdfDictionary field = fields.GetValue(pdfFieldOrdinal); + PdfDictionary fieldMK; + if (field.Contains(PdfName.MK)) + fieldMK = field.GetAsDict(PdfName.MK); + else + { + fieldMK = new PdfDictionary(PdfName.MK); + field.Put(PdfName.MK, fieldMK); + } + fieldMK.Put(PdfName.BC, new PdfArray(new float[] { 1, 0, 0 })); + } + } + } + } + else + { + throw new InvalidOperationException("Pdf template field expressions are out of sync with the expression cache"); + } + } + State.FlushFieldCache(); + } + + pdfStamper.Close(); + pdfReader.Close(); + + if (dt.Scope == DocumentTemplate.DocumentTemplateScopes.Job) + { + // Write Job Log + + Job j = (Job)Data; + JobLog jl = new JobLog() + { + JobId = j.Id, + TechUserId = CreatorUser.Id, + Timestamp = DateTime.Now + }; + jl.Comments = string.Format("Document Generated{0}{1} [{2}]", Environment.NewLine, dt.Description, dt.Id); + dbContext.JobLogs.Add(jl); + } + + pdfGeneratedStream.Position = 0; + return pdfGeneratedStream; + } + + } +} diff --git a/Disco.BI/BI/Interop/Pdf/PdfImporter.cs b/Disco.BI/BI/Interop/Pdf/PdfImporter.cs index 48a00a2f..28ba6dd6 100644 --- a/Disco.BI/BI/Interop/Pdf/PdfImporter.cs +++ b/Disco.BI/BI/Interop/Pdf/PdfImporter.cs @@ -1,471 +1,471 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using iTextSharp.text.pdf; -using System.IO; -using System.Drawing; -using Disco.BI.DocumentTemplateBI.Importer; -using Disco.BI.DocumentTemplateBI; -using System.Drawing.Drawing2D; -using com.google.zxing; -using com.google.zxing.multi.qrcode; -using Disco.Data.Repository; -using System.Web.Caching; -using Disco.BI.Extensions; -using Disco.Models.Repository; -using System.Collections; -using com.google.zxing.common; -using BitMiracle.LibTiff.Classic; - -namespace Disco.BI.Interop.Pdf -{ - public static class PdfImporter - { - - private class DetectImageResult : IDisposable - { - public Result Result { get; set; } - public Point ResultOffset { get; set; } - public double ResultScale { get; set; } - - public void Dispose() - { - // Do Nothing; yet... - } - } - - private class DetectPageResult : IDisposable - { - public int PageNumber { get; set; } - public DocumentUniqueIdentifier DetectedIdentifier { get; set; } - public Disco.BI.Extensions.UtilityExtensions.ImageMontage ThumbnailImage { get; set; } - public MemoryStream AttachmentThumbnailImage { get; set; } - public Disco.BI.Extensions.UtilityExtensions.ImageMontage UndetectedPageImage { get; set; } - - public void DrawThumbnailImageResult(DetectImageResult Result, Image DetectedImage) - { - if (Result.Result.ResultPoints.Length == 4) - { // Draw Square on Thumbnail - using (Graphics thumbnailGraphics = Graphics.FromImage(ThumbnailImage.Montage)) - { - var thumbnailOffset = ThumbnailImage.MontageSourceImageOffsets[DetectedImage]; - - var linePoints = Result.Result.ResultPoints.Select(p => new Point((int)(thumbnailOffset + ((Result.ResultOffset.X + p.X) * Result.ResultScale * ThumbnailImage.MontageScale)), (int)((p.Y + Result.ResultOffset.Y) * Result.ResultScale * ThumbnailImage.MontageScale))).ToArray(); - using (GraphicsPath graphicsPath = new GraphicsPath()) - { - for (int linePointIndex = 0; linePointIndex < (linePoints.Length - 1); linePointIndex++) - graphicsPath.AddLine(linePoints[linePointIndex], linePoints[linePointIndex + 1]); - graphicsPath.AddLine(linePoints[linePoints.Length - 1], linePoints[0]); - using (SolidBrush graphicsBrush = new SolidBrush(Color.FromArgb(128, 255, 0, 0))) - thumbnailGraphics.FillPath(graphicsBrush, graphicsPath); - using (Pen graphicsPen = new Pen(Color.FromArgb(200, 255, 0, 0), 2)) - thumbnailGraphics.DrawPath(graphicsPen, graphicsPath); - } - } - } - } - - public void Dispose() - { - if (ThumbnailImage != null) - { - ThumbnailImage.Dispose(); - ThumbnailImage = null; - } - if (AttachmentThumbnailImage != null) - { - AttachmentThumbnailImage.Dispose(); - AttachmentThumbnailImage = null; - } - if (UndetectedPageImage != null) - { - UndetectedPageImage.Dispose(); - UndetectedPageImage = null; - } - } - } - - private static DetectImageResult DetectImage(DiscoDataContext dbContext, Bitmap pageImageOriginal, string SessionId, IEnumerable detectDocumentTemplates) - { - Bitmap pageImage = pageImageOriginal; - double pageImageModifiedScale = 1; - - try - { - // Resize if Resolution > 80; Set to 72 Dpi - if (pageImage.HorizontalResolution > 80 || pageImage.VerticalResolution > 80) - { - pageImageModifiedScale = pageImage.HorizontalResolution / 72; - int newWidth = (int)((72 / pageImage.HorizontalResolution) * pageImage.Width); - int newHeight = (int)((72 / pageImage.VerticalResolution) * pageImage.Height); - pageImage = pageImage.ResizeImage(newWidth, newHeight); - } - - Result zxingResult = default(Result); - Point zxingResultOffset = Point.Empty; - QRCodeMultiReader zxingMfr = new QRCodeMultiReader(); - Hashtable zxingMfrHints = new Hashtable(); - zxingMfrHints.Add(DecodeHintType.TRY_HARDER, true); - // Look in 'Known' locations - foreach (DocumentTemplate dt in detectDocumentTemplates) - { - var locationBag = dt.QRCodeLocations(dbContext); - foreach (var location in locationBag) - { - System.Drawing.Rectangle region = new Rectangle( - (int)(pageImage.Width * location.Left), - (int)(pageImage.Width * location.Top), - (int)(pageImage.Width * location.Width), - (int)(pageImage.Height * location.Height)); - RGBLuminanceSource zxingSource; - using (Bitmap pageImageRegion = new Bitmap(region.Width, region.Height)) - { - using (Graphics pageImageRegionGraphics = Graphics.FromImage(pageImageRegion)) - { - pageImageRegionGraphics.DrawImage(pageImage, 0, 0, region, GraphicsUnit.Pixel); - } - zxingSource = new RGBLuminanceSource(pageImageRegion, region.Width, region.Height); - } - var zxingHB = new HybridBinarizer(zxingSource); - var zxingBB = new BinaryBitmap(zxingHB); - try - { - zxingResult = zxingMfr.decode(zxingBB, zxingMfrHints); - zxingResultOffset = region.Location; - break; - } - catch (ReaderException) - { - // Ignore Location Errors - } - } - if (zxingResult != null) - break; - } - if (zxingResult == null) - { - // Not found with 'known' locations - // Try whole image - var zxingSource = new RGBLuminanceSource(pageImage, pageImage.Width, pageImage.Height); - var zxingHB = new HybridBinarizer(zxingSource); - var zxingBB = new BinaryBitmap(zxingHB); - try - { - zxingResult = zxingMfr.decode(zxingBB, zxingMfrHints); - } - catch (ReaderException) - { - // Ignore Errors - } - } - - if (zxingResult != null) - return new DetectImageResult() { Result = zxingResult, ResultOffset = zxingResultOffset, ResultScale = pageImageModifiedScale }; - else - return null; - } - catch (Exception ex) - { - throw ex; - } - finally - { - if (pageImageOriginal != pageImage) - pageImage.Dispose(); - } - } - - private static DetectPageResult DetectPage(DiscoDataContext dbContext, PdfReader pdfReader, int PageNumber, string SessionId, string DataStoreSessionCacheLocation, IEnumerable detectDocumentTemplates) - { - DetectPageResult result = new DetectPageResult() { PageNumber = PageNumber }; - - DocumentImporterLog.LogImportPageProgress(SessionId, PageNumber, 10, "Loading Page Images"); - - using (DisposableImageCollection pageImages = pdfReader.PdfPageImages(PageNumber)) - { - if (pageImages.Count > 0) - { - result.ThumbnailImage = pageImages.BuildImageMontage(256, 256); - var pageThumbnailFilename = Path.Combine(DataStoreSessionCacheLocation, string.Format("{0}-{1}", SessionId, PageNumber)); - - result.ThumbnailImage.Montage.SavePng(pageThumbnailFilename); - DocumentImporterLog.LogImportPageImageUpdate(SessionId, PageNumber); - - double pageProgressInterval = 90 / pageImages.Count; - - foreach (var pageImageOriginal in pageImages) - { - DocumentImporterLog.LogImportPageProgress(SessionId, PageNumber, (int)(10 + (pageProgressInterval * pageImages.IndexOf(pageImageOriginal))), String.Format("Processing Page Image {0} of {1}", pageImages.IndexOf(pageImageOriginal) + 1, pageImages.Count)); - - using (var zxingResult = DetectImage(dbContext, pageImageOriginal, SessionId, detectDocumentTemplates)) - { - if (zxingResult != null) - { - if (DocumentUniqueIdentifier.IsDocumentUniqueIdentifier(zxingResult.Result.Text)) - { - result.DrawThumbnailImageResult(zxingResult, pageImageOriginal); - result.ThumbnailImage.Montage.SavePng(pageThumbnailFilename); - DocumentImporterLog.LogImportPageImageUpdate(SessionId, PageNumber); - - result.AttachmentThumbnailImage = new MemoryStream(); - using (var attachmentThumbImage = pageImages.BuildImageMontage(48, 48, true)) - { - using (Image mimeTypeIcon = Disco.Properties.Resources.MimeType_pdf16) - attachmentThumbImage.Montage.EmbedIconOverlay(mimeTypeIcon); - attachmentThumbImage.Montage.SaveJpg(95, result.AttachmentThumbnailImage); - } - - result.DetectedIdentifier = new DocumentUniqueIdentifier(zxingResult.Result.Text, PageNumber.ToString()); - - return result; - } - } - } - } - - // Page Unassigned - result.UndetectedPageImage = pageImages.BuildImageMontage(700, 700); - } - - return result; - } - } - - public static bool ProcessPdfAttachment(string Filename, DiscoDataContext dbContext, string SessionId, Cache HttpCache) - { - var dataStoreUnassignedLocation = DataStore.CreateLocation(dbContext, "DocumentDropBox_Unassigned"); - - DocumentImporterLog.LogImportProgress(SessionId, 0, "Reading File"); - - using (FileStream fs = new FileStream(Filename, FileMode.Open, FileAccess.ReadWrite, FileShare.None)) - { - var pdfReader = new PdfReader(fs); - - var pdfPagesAssigned = new Dictionary>(); - - var dataStoreSessionPagesCacheLocation = DataStore.CreateLocation(dbContext, "Cache\\DocumentDropBox_SessionPages"); - var detectDocumentTemplates = dbContext.DocumentTemplates.ToArray(); - - double progressInterval = 70 / pdfReader.NumberOfPages; - - for (int PageNumber = 1; PageNumber <= pdfReader.NumberOfPages; PageNumber++) - { - DocumentImporterLog.LogImportProgress(SessionId, (int)(PageNumber * progressInterval), string.Format("Processing Page {0} of {1}", PageNumber, pdfReader.NumberOfPages)); - DocumentImporterLog.LogImportPageStarting(SessionId, PageNumber); - - using (var pageResult = DetectPage(dbContext, pdfReader, PageNumber, SessionId, dataStoreSessionPagesCacheLocation, detectDocumentTemplates)) - { - if (pageResult.DetectedIdentifier != null) - { - var docId = pageResult.DetectedIdentifier; - pdfPagesAssigned.Add(PageNumber, new Tuple(docId, pageResult.AttachmentThumbnailImage.ToArray())); - - docId.LoadComponents(dbContext); - DocumentImporterLog.LogImportPageDetected(SessionId, PageNumber, docId.DocumentUniqueId, docId.DocumentTemplate.Description, docId.DocumentTemplate.Scope, docId.DataId, docId.DataDescription); - } - else - { - // Undetected Page - Write Preview-Images while still in Memory - DocumentImporterLog.LogImportPageUndetected(SessionId, PageNumber); - - // Thumbnail: - string unassignedImageThumbnailFilename = Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}_thumbnail.png", SessionId, PageNumber)); - pageResult.ThumbnailImage.Montage.SavePng(unassignedImageThumbnailFilename); - // Large Preview - string unassignedImageFilename = Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}.jpg", SessionId, PageNumber)); - pageResult.UndetectedPageImage.Montage.SaveJpg(90, unassignedImageFilename); - } - } - - } - - // Write out Assigned Documents - var assignedDocuments = pdfPagesAssigned.GroupBy(u => u.Value.Item1.DocumentUniqueId).ToList(); - if (assignedDocuments.Count > 0) - { - progressInterval = 20 / assignedDocuments.Count; - - foreach (var documentPortion in assignedDocuments) - { - DocumentImporterLog.LogImportProgress(SessionId, (int)(70 + (assignedDocuments.IndexOf(documentPortion) * progressInterval)), string.Format("Importing Documents {0} of {1}", assignedDocuments.IndexOf(documentPortion) + 1, assignedDocuments.Count)); - - var documentPortionInfo = documentPortion.First().Value; - var documentPortionIdentifier = documentPortionInfo.Item1; - var documentPortionThumbnail = documentPortionInfo.Item2; - - if (!documentPortionIdentifier.LoadComponents(dbContext)) - { - // Unknown Document Unique Id - foreach (var dp in documentPortion) - { - var tag = int.Parse(dp.Value.Item1.Tag); - if (pdfPagesAssigned.ContainsKey(tag)) - pdfPagesAssigned.Remove(tag); - } - } - else - { - using (MemoryStream msBuilder = new MemoryStream()) - { - var pdfDoc = new iTextSharp.text.Document(); - var pdfCopy = new PdfCopy(pdfDoc, msBuilder); - - pdfDoc.Open(); - pdfCopy.CloseStream = false; - - foreach (var dp in documentPortion.OrderBy(dg => dg.Value.Item1.Page)) - { - var pageSize = pdfReader.GetPageSizeWithRotation(dp.Key); - var page = pdfCopy.GetImportedPage(pdfReader, dp.Key); - - pdfDoc.SetPageSize(pageSize); - pdfDoc.NewPage(); - - pdfCopy.AddPage(page); - } - - pdfDoc.Close(); - pdfCopy.Close(); - - msBuilder.Position = 0; - - var attachmentSuccess = documentPortionIdentifier.ImportPdfAttachment(dbContext, msBuilder, documentPortionThumbnail); - - if (!attachmentSuccess) - { // Unable to add Attachment - foreach (var dp in documentPortion) - { - var tag = int.Parse(dp.Value.Item1.Tag); - if (pdfPagesAssigned.ContainsKey(tag)) - pdfPagesAssigned.Remove(tag); - } - } - } - } - - - } - } - - // Write out Unassigned Pages - List pdfPagesUnassigned = new List(); - for (int PageNumber = 1; PageNumber <= pdfReader.NumberOfPages; PageNumber++) - if (!pdfPagesAssigned.ContainsKey(PageNumber)) - pdfPagesUnassigned.Add(PageNumber); - if (pdfPagesUnassigned.Count > 0) - { - progressInterval = 10 / pdfPagesUnassigned.Count; - //dataStoreUnassignedLocation - foreach (var PageNumber in pdfPagesUnassigned) - { - DocumentImporterLog.LogImportProgress(SessionId, (int)(90 + (pdfPagesUnassigned.IndexOf(PageNumber) * progressInterval)), string.Format("Processing Undetected Documents {0} of {1}", pdfPagesUnassigned.IndexOf(PageNumber) + 1, pdfPagesUnassigned.Count)); - - using (MemoryStream msBuilder = new MemoryStream()) - { - var pdfDoc = new iTextSharp.text.Document(); - var pdfCopy = new PdfCopy(pdfDoc, msBuilder); - - pdfDoc.Open(); - pdfCopy.CloseStream = false; - - var pageSize = pdfReader.GetPageSizeWithRotation(PageNumber); - var page = pdfCopy.GetImportedPage(pdfReader, PageNumber); - pdfDoc.SetPageSize(pageSize); - pdfDoc.NewPage(); - - pdfCopy.AddPage(page); - pdfDoc.Close(); - pdfCopy.Close(); - - File.WriteAllBytes(Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}.pdf", SessionId, PageNumber)), msBuilder.ToArray()); - - DocumentImporterLog.LogImportPageUndetectedStored(SessionId, PageNumber); - } - } - } - - } - - DocumentImporterLog.LogImportProgress(SessionId, 100, "Finished Importing Document"); - - return true; - } - public static bool ProcessPdfAttachment(string Filename, DiscoDataContext dbContext, string DocumentTemplateId, string DataId, string UserId, DateTime Timestamp) - { - using (FileStream fs = new FileStream(Filename, FileMode.Open, FileAccess.ReadWrite, FileShare.None)) - { - DocumentUniqueIdentifier identifier = new DocumentUniqueIdentifier(DocumentTemplateId, DataId, UserId, Timestamp); - identifier.LoadComponents(dbContext); - return identifier.ImportPdfAttachment(dbContext, fs, null); - } - } - - public static DisposableImageCollection GetPageImages(PdfReader pdfReader, int PageNumber) - { - var pageImages = new DisposableImageCollection(); - - var pdfPage = pdfReader.GetPageN(PageNumber); - PdfDictionary pdfPageResouces = (PdfDictionary)((PdfDictionary)pdfPage.GetDirectObject(PdfName.RESOURCES)).GetDirectObject(PdfName.XOBJECT); - - foreach (var pdfResKey in pdfPageResouces.Keys) - { - var pdfRes = pdfPageResouces.GetDirectObject(pdfResKey); - if (pdfRes.IsStream()) - { - var pdfResStream = (PdfStream)pdfRes; - var pdfResSubType = pdfResStream.Get(PdfName.SUBTYPE); - if (pdfResSubType != null && pdfResSubType == PdfName.IMAGE) - { - if (pdfResStream.Get(PdfName.FILTER) == PdfName.CCITTFAXDECODE) - { // TIFF - // Try Using GDI+ for TIFF... - var width = ((PdfNumber)(pdfResStream.Get(PdfName.WIDTH))).IntValue; - var height = ((PdfNumber)(pdfResStream.Get(PdfName.HEIGHT))).IntValue; - var bpc = ((PdfNumber)(pdfResStream.Get(PdfName.BITSPERCOMPONENT))).IntValue; - - var compressionMethod = Compression.CCITTFAX3; - - var decodeParams = pdfResStream.GetAsDict(PdfName.DECODEPARMS); - if (decodeParams != null && decodeParams.Contains(PdfName.K) && decodeParams.GetAsNumber(PdfName.K).IntValue < 0) - compressionMethod = Compression.CCITTFAX4; - - using (MemoryStream tiffStream = PdfToTiffStream(PdfReader.GetStreamBytesRaw((PRStream)pdfResStream), width, height, bpc, compressionMethod)) - { - pageImages.Add((Bitmap)Bitmap.FromStream(tiffStream)); - } - continue; - } - if (pdfResStream.Get(PdfName.FILTER) == PdfName.DCTDECODE) - { // JPG - using (MemoryStream jpgStream = new MemoryStream(PdfReader.GetStreamBytesRaw((PRStream)pdfResStream))) - { - pageImages.Add((Bitmap)Bitmap.FromStream(jpgStream, true, true)); - } - continue; - } - } - } - } - - return pageImages; - } - - private static MemoryStream PdfToTiffStream(byte[] PdfStream, int Width, int Height, int BitsPerComponent, Compression CompressionMethod) - { - var ms = new MemoryStream(); - - Tiff tif = Tiff.ClientOpen("in-memory", "w", ms, new TiffStream()); - tif.SetField(TiffTag.IMAGEWIDTH, Width); - tif.SetField(TiffTag.IMAGELENGTH, Height); - tif.SetField(TiffTag.COMPRESSION, CompressionMethod); - tif.SetField(TiffTag.BITSPERSAMPLE, BitsPerComponent); - tif.SetField(TiffTag.SAMPLESPERPIXEL, 1); - tif.WriteRawStrip(0, PdfStream, PdfStream.Length); - tif.Flush(); - - return ms; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using iTextSharp.text.pdf; +using System.IO; +using System.Drawing; +using Disco.BI.DocumentTemplateBI.Importer; +using Disco.BI.DocumentTemplateBI; +using System.Drawing.Drawing2D; +using com.google.zxing; +using com.google.zxing.multi.qrcode; +using Disco.Data.Repository; +using System.Web.Caching; +using Disco.BI.Extensions; +using Disco.Models.Repository; +using System.Collections; +using com.google.zxing.common; +using BitMiracle.LibTiff.Classic; + +namespace Disco.BI.Interop.Pdf +{ + public static class PdfImporter + { + + private class DetectImageResult : IDisposable + { + public Result Result { get; set; } + public Point ResultOffset { get; set; } + public double ResultScale { get; set; } + + public void Dispose() + { + // Do Nothing; yet... + } + } + + private class DetectPageResult : IDisposable + { + public int PageNumber { get; set; } + public DocumentUniqueIdentifier DetectedIdentifier { get; set; } + public Disco.BI.Extensions.UtilityExtensions.ImageMontage ThumbnailImage { get; set; } + public MemoryStream AttachmentThumbnailImage { get; set; } + public Disco.BI.Extensions.UtilityExtensions.ImageMontage UndetectedPageImage { get; set; } + + public void DrawThumbnailImageResult(DetectImageResult Result, Image DetectedImage) + { + if (Result.Result.ResultPoints.Length == 4) + { // Draw Square on Thumbnail + using (Graphics thumbnailGraphics = Graphics.FromImage(ThumbnailImage.Montage)) + { + var thumbnailOffset = ThumbnailImage.MontageSourceImageOffsets[DetectedImage]; + + var linePoints = Result.Result.ResultPoints.Select(p => new Point((int)(thumbnailOffset + ((Result.ResultOffset.X + p.X) * Result.ResultScale * ThumbnailImage.MontageScale)), (int)((p.Y + Result.ResultOffset.Y) * Result.ResultScale * ThumbnailImage.MontageScale))).ToArray(); + using (GraphicsPath graphicsPath = new GraphicsPath()) + { + for (int linePointIndex = 0; linePointIndex < (linePoints.Length - 1); linePointIndex++) + graphicsPath.AddLine(linePoints[linePointIndex], linePoints[linePointIndex + 1]); + graphicsPath.AddLine(linePoints[linePoints.Length - 1], linePoints[0]); + using (SolidBrush graphicsBrush = new SolidBrush(Color.FromArgb(128, 255, 0, 0))) + thumbnailGraphics.FillPath(graphicsBrush, graphicsPath); + using (Pen graphicsPen = new Pen(Color.FromArgb(200, 255, 0, 0), 2)) + thumbnailGraphics.DrawPath(graphicsPen, graphicsPath); + } + } + } + } + + public void Dispose() + { + if (ThumbnailImage != null) + { + ThumbnailImage.Dispose(); + ThumbnailImage = null; + } + if (AttachmentThumbnailImage != null) + { + AttachmentThumbnailImage.Dispose(); + AttachmentThumbnailImage = null; + } + if (UndetectedPageImage != null) + { + UndetectedPageImage.Dispose(); + UndetectedPageImage = null; + } + } + } + + private static DetectImageResult DetectImage(DiscoDataContext dbContext, Bitmap pageImageOriginal, string SessionId, IEnumerable detectDocumentTemplates) + { + Bitmap pageImage = pageImageOriginal; + double pageImageModifiedScale = 1; + + try + { + // Resize if Resolution > 80; Set to 72 Dpi + if (pageImage.HorizontalResolution > 80 || pageImage.VerticalResolution > 80) + { + pageImageModifiedScale = pageImage.HorizontalResolution / 72; + int newWidth = (int)((72 / pageImage.HorizontalResolution) * pageImage.Width); + int newHeight = (int)((72 / pageImage.VerticalResolution) * pageImage.Height); + pageImage = pageImage.ResizeImage(newWidth, newHeight); + } + + Result zxingResult = default(Result); + Point zxingResultOffset = Point.Empty; + QRCodeMultiReader zxingMfr = new QRCodeMultiReader(); + Hashtable zxingMfrHints = new Hashtable(); + zxingMfrHints.Add(DecodeHintType.TRY_HARDER, true); + // Look in 'Known' locations + foreach (DocumentTemplate dt in detectDocumentTemplates) + { + var locationBag = dt.QRCodeLocations(dbContext); + foreach (var location in locationBag) + { + System.Drawing.Rectangle region = new Rectangle( + (int)(pageImage.Width * location.Left), + (int)(pageImage.Width * location.Top), + (int)(pageImage.Width * location.Width), + (int)(pageImage.Height * location.Height)); + RGBLuminanceSource zxingSource; + using (Bitmap pageImageRegion = new Bitmap(region.Width, region.Height)) + { + using (Graphics pageImageRegionGraphics = Graphics.FromImage(pageImageRegion)) + { + pageImageRegionGraphics.DrawImage(pageImage, 0, 0, region, GraphicsUnit.Pixel); + } + zxingSource = new RGBLuminanceSource(pageImageRegion, region.Width, region.Height); + } + var zxingHB = new HybridBinarizer(zxingSource); + var zxingBB = new BinaryBitmap(zxingHB); + try + { + zxingResult = zxingMfr.decode(zxingBB, zxingMfrHints); + zxingResultOffset = region.Location; + break; + } + catch (ReaderException) + { + // Ignore Location Errors + } + } + if (zxingResult != null) + break; + } + if (zxingResult == null) + { + // Not found with 'known' locations + // Try whole image + var zxingSource = new RGBLuminanceSource(pageImage, pageImage.Width, pageImage.Height); + var zxingHB = new HybridBinarizer(zxingSource); + var zxingBB = new BinaryBitmap(zxingHB); + try + { + zxingResult = zxingMfr.decode(zxingBB, zxingMfrHints); + } + catch (ReaderException) + { + // Ignore Errors + } + } + + if (zxingResult != null) + return new DetectImageResult() { Result = zxingResult, ResultOffset = zxingResultOffset, ResultScale = pageImageModifiedScale }; + else + return null; + } + catch (Exception ex) + { + throw ex; + } + finally + { + if (pageImageOriginal != pageImage) + pageImage.Dispose(); + } + } + + private static DetectPageResult DetectPage(DiscoDataContext dbContext, PdfReader pdfReader, int PageNumber, string SessionId, string DataStoreSessionCacheLocation, IEnumerable detectDocumentTemplates) + { + DetectPageResult result = new DetectPageResult() { PageNumber = PageNumber }; + + DocumentImporterLog.LogImportPageProgress(SessionId, PageNumber, 10, "Loading Page Images"); + + using (DisposableImageCollection pageImages = pdfReader.PdfPageImages(PageNumber)) + { + if (pageImages.Count > 0) + { + result.ThumbnailImage = pageImages.BuildImageMontage(256, 256); + var pageThumbnailFilename = Path.Combine(DataStoreSessionCacheLocation, string.Format("{0}-{1}", SessionId, PageNumber)); + + result.ThumbnailImage.Montage.SavePng(pageThumbnailFilename); + DocumentImporterLog.LogImportPageImageUpdate(SessionId, PageNumber); + + double pageProgressInterval = 90 / pageImages.Count; + + foreach (var pageImageOriginal in pageImages) + { + DocumentImporterLog.LogImportPageProgress(SessionId, PageNumber, (int)(10 + (pageProgressInterval * pageImages.IndexOf(pageImageOriginal))), String.Format("Processing Page Image {0} of {1}", pageImages.IndexOf(pageImageOriginal) + 1, pageImages.Count)); + + using (var zxingResult = DetectImage(dbContext, pageImageOriginal, SessionId, detectDocumentTemplates)) + { + if (zxingResult != null) + { + if (DocumentUniqueIdentifier.IsDocumentUniqueIdentifier(zxingResult.Result.Text)) + { + result.DrawThumbnailImageResult(zxingResult, pageImageOriginal); + result.ThumbnailImage.Montage.SavePng(pageThumbnailFilename); + DocumentImporterLog.LogImportPageImageUpdate(SessionId, PageNumber); + + result.AttachmentThumbnailImage = new MemoryStream(); + using (var attachmentThumbImage = pageImages.BuildImageMontage(48, 48, true)) + { + using (Image mimeTypeIcon = Disco.Properties.Resources.MimeType_pdf16) + attachmentThumbImage.Montage.EmbedIconOverlay(mimeTypeIcon); + attachmentThumbImage.Montage.SaveJpg(95, result.AttachmentThumbnailImage); + } + + result.DetectedIdentifier = new DocumentUniqueIdentifier(zxingResult.Result.Text, PageNumber.ToString()); + + return result; + } + } + } + } + + // Page Unassigned + result.UndetectedPageImage = pageImages.BuildImageMontage(700, 700); + } + + return result; + } + } + + public static bool ProcessPdfAttachment(string Filename, DiscoDataContext dbContext, string SessionId, Cache HttpCache) + { + var dataStoreUnassignedLocation = DataStore.CreateLocation(dbContext, "DocumentDropBox_Unassigned"); + + DocumentImporterLog.LogImportProgress(SessionId, 0, "Reading File"); + + using (FileStream fs = new FileStream(Filename, FileMode.Open, FileAccess.ReadWrite, FileShare.None)) + { + var pdfReader = new PdfReader(fs); + + var pdfPagesAssigned = new Dictionary>(); + + var dataStoreSessionPagesCacheLocation = DataStore.CreateLocation(dbContext, "Cache\\DocumentDropBox_SessionPages"); + var detectDocumentTemplates = dbContext.DocumentTemplates.ToArray(); + + double progressInterval = 70 / pdfReader.NumberOfPages; + + for (int PageNumber = 1; PageNumber <= pdfReader.NumberOfPages; PageNumber++) + { + DocumentImporterLog.LogImportProgress(SessionId, (int)(PageNumber * progressInterval), string.Format("Processing Page {0} of {1}", PageNumber, pdfReader.NumberOfPages)); + DocumentImporterLog.LogImportPageStarting(SessionId, PageNumber); + + using (var pageResult = DetectPage(dbContext, pdfReader, PageNumber, SessionId, dataStoreSessionPagesCacheLocation, detectDocumentTemplates)) + { + if (pageResult.DetectedIdentifier != null) + { + var docId = pageResult.DetectedIdentifier; + pdfPagesAssigned.Add(PageNumber, new Tuple(docId, pageResult.AttachmentThumbnailImage.ToArray())); + + docId.LoadComponents(dbContext); + DocumentImporterLog.LogImportPageDetected(SessionId, PageNumber, docId.DocumentUniqueId, docId.DocumentTemplate.Description, docId.DocumentTemplate.Scope, docId.DataId, docId.DataDescription); + } + else + { + // Undetected Page - Write Preview-Images while still in Memory + DocumentImporterLog.LogImportPageUndetected(SessionId, PageNumber); + + // Thumbnail: + string unassignedImageThumbnailFilename = Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}_thumbnail.png", SessionId, PageNumber)); + pageResult.ThumbnailImage.Montage.SavePng(unassignedImageThumbnailFilename); + // Large Preview + string unassignedImageFilename = Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}.jpg", SessionId, PageNumber)); + pageResult.UndetectedPageImage.Montage.SaveJpg(90, unassignedImageFilename); + } + } + + } + + // Write out Assigned Documents + var assignedDocuments = pdfPagesAssigned.GroupBy(u => u.Value.Item1.DocumentUniqueId).ToList(); + if (assignedDocuments.Count > 0) + { + progressInterval = 20 / assignedDocuments.Count; + + foreach (var documentPortion in assignedDocuments) + { + DocumentImporterLog.LogImportProgress(SessionId, (int)(70 + (assignedDocuments.IndexOf(documentPortion) * progressInterval)), string.Format("Importing Documents {0} of {1}", assignedDocuments.IndexOf(documentPortion) + 1, assignedDocuments.Count)); + + var documentPortionInfo = documentPortion.First().Value; + var documentPortionIdentifier = documentPortionInfo.Item1; + var documentPortionThumbnail = documentPortionInfo.Item2; + + if (!documentPortionIdentifier.LoadComponents(dbContext)) + { + // Unknown Document Unique Id + foreach (var dp in documentPortion) + { + var tag = int.Parse(dp.Value.Item1.Tag); + if (pdfPagesAssigned.ContainsKey(tag)) + pdfPagesAssigned.Remove(tag); + } + } + else + { + using (MemoryStream msBuilder = new MemoryStream()) + { + var pdfDoc = new iTextSharp.text.Document(); + var pdfCopy = new PdfCopy(pdfDoc, msBuilder); + + pdfDoc.Open(); + pdfCopy.CloseStream = false; + + foreach (var dp in documentPortion.OrderBy(dg => dg.Value.Item1.Page)) + { + var pageSize = pdfReader.GetPageSizeWithRotation(dp.Key); + var page = pdfCopy.GetImportedPage(pdfReader, dp.Key); + + pdfDoc.SetPageSize(pageSize); + pdfDoc.NewPage(); + + pdfCopy.AddPage(page); + } + + pdfDoc.Close(); + pdfCopy.Close(); + + msBuilder.Position = 0; + + var attachmentSuccess = documentPortionIdentifier.ImportPdfAttachment(dbContext, msBuilder, documentPortionThumbnail); + + if (!attachmentSuccess) + { // Unable to add Attachment + foreach (var dp in documentPortion) + { + var tag = int.Parse(dp.Value.Item1.Tag); + if (pdfPagesAssigned.ContainsKey(tag)) + pdfPagesAssigned.Remove(tag); + } + } + } + } + + + } + } + + // Write out Unassigned Pages + List pdfPagesUnassigned = new List(); + for (int PageNumber = 1; PageNumber <= pdfReader.NumberOfPages; PageNumber++) + if (!pdfPagesAssigned.ContainsKey(PageNumber)) + pdfPagesUnassigned.Add(PageNumber); + if (pdfPagesUnassigned.Count > 0) + { + progressInterval = 10 / pdfPagesUnassigned.Count; + //dataStoreUnassignedLocation + foreach (var PageNumber in pdfPagesUnassigned) + { + DocumentImporterLog.LogImportProgress(SessionId, (int)(90 + (pdfPagesUnassigned.IndexOf(PageNumber) * progressInterval)), string.Format("Processing Undetected Documents {0} of {1}", pdfPagesUnassigned.IndexOf(PageNumber) + 1, pdfPagesUnassigned.Count)); + + using (MemoryStream msBuilder = new MemoryStream()) + { + var pdfDoc = new iTextSharp.text.Document(); + var pdfCopy = new PdfCopy(pdfDoc, msBuilder); + + pdfDoc.Open(); + pdfCopy.CloseStream = false; + + var pageSize = pdfReader.GetPageSizeWithRotation(PageNumber); + var page = pdfCopy.GetImportedPage(pdfReader, PageNumber); + pdfDoc.SetPageSize(pageSize); + pdfDoc.NewPage(); + + pdfCopy.AddPage(page); + pdfDoc.Close(); + pdfCopy.Close(); + + File.WriteAllBytes(Path.Combine(dataStoreUnassignedLocation, string.Format("{0}_{1}.pdf", SessionId, PageNumber)), msBuilder.ToArray()); + + DocumentImporterLog.LogImportPageUndetectedStored(SessionId, PageNumber); + } + } + } + + } + + DocumentImporterLog.LogImportProgress(SessionId, 100, "Finished Importing Document"); + + return true; + } + public static bool ProcessPdfAttachment(string Filename, DiscoDataContext dbContext, string DocumentTemplateId, string DataId, string UserId, DateTime Timestamp) + { + using (FileStream fs = new FileStream(Filename, FileMode.Open, FileAccess.ReadWrite, FileShare.None)) + { + DocumentUniqueIdentifier identifier = new DocumentUniqueIdentifier(DocumentTemplateId, DataId, UserId, Timestamp); + identifier.LoadComponents(dbContext); + return identifier.ImportPdfAttachment(dbContext, fs, null); + } + } + + public static DisposableImageCollection GetPageImages(PdfReader pdfReader, int PageNumber) + { + var pageImages = new DisposableImageCollection(); + + var pdfPage = pdfReader.GetPageN(PageNumber); + PdfDictionary pdfPageResouces = (PdfDictionary)((PdfDictionary)pdfPage.GetDirectObject(PdfName.RESOURCES)).GetDirectObject(PdfName.XOBJECT); + + foreach (var pdfResKey in pdfPageResouces.Keys) + { + var pdfRes = pdfPageResouces.GetDirectObject(pdfResKey); + if (pdfRes.IsStream()) + { + var pdfResStream = (PdfStream)pdfRes; + var pdfResSubType = pdfResStream.Get(PdfName.SUBTYPE); + if (pdfResSubType != null && pdfResSubType == PdfName.IMAGE) + { + if (pdfResStream.Get(PdfName.FILTER) == PdfName.CCITTFAXDECODE) + { // TIFF + // Try Using GDI+ for TIFF... + var width = ((PdfNumber)(pdfResStream.Get(PdfName.WIDTH))).IntValue; + var height = ((PdfNumber)(pdfResStream.Get(PdfName.HEIGHT))).IntValue; + var bpc = ((PdfNumber)(pdfResStream.Get(PdfName.BITSPERCOMPONENT))).IntValue; + + var compressionMethod = Compression.CCITTFAX3; + + var decodeParams = pdfResStream.GetAsDict(PdfName.DECODEPARMS); + if (decodeParams != null && decodeParams.Contains(PdfName.K) && decodeParams.GetAsNumber(PdfName.K).IntValue < 0) + compressionMethod = Compression.CCITTFAX4; + + using (MemoryStream tiffStream = PdfToTiffStream(PdfReader.GetStreamBytesRaw((PRStream)pdfResStream), width, height, bpc, compressionMethod)) + { + pageImages.Add((Bitmap)Bitmap.FromStream(tiffStream)); + } + continue; + } + if (pdfResStream.Get(PdfName.FILTER) == PdfName.DCTDECODE) + { // JPG + using (MemoryStream jpgStream = new MemoryStream(PdfReader.GetStreamBytesRaw((PRStream)pdfResStream))) + { + pageImages.Add((Bitmap)Bitmap.FromStream(jpgStream, true, true)); + } + continue; + } + } + } + } + + return pageImages; + } + + private static MemoryStream PdfToTiffStream(byte[] PdfStream, int Width, int Height, int BitsPerComponent, Compression CompressionMethod) + { + var ms = new MemoryStream(); + + Tiff tif = Tiff.ClientOpen("in-memory", "w", ms, new TiffStream()); + tif.SetField(TiffTag.IMAGEWIDTH, Width); + tif.SetField(TiffTag.IMAGELENGTH, Height); + tif.SetField(TiffTag.COMPRESSION, CompressionMethod); + tif.SetField(TiffTag.BITSPERSAMPLE, BitsPerComponent); + tif.SetField(TiffTag.SAMPLESPERPIXEL, 1); + tif.WriteRawStrip(0, PdfStream, PdfStream.Length); + tif.Flush(); + + return ms; + } + + } +} diff --git a/Disco.BI/BI/Interop/PluginServices/IDiscoScheduledTask.cs b/Disco.BI/BI/Interop/PluginServices/IDiscoScheduledTask.cs index 5c817728..0f5916c3 100644 --- a/Disco.BI/BI/Interop/PluginServices/IDiscoScheduledTask.cs +++ b/Disco.BI/BI/Interop/PluginServices/IDiscoScheduledTask.cs @@ -1,14 +1,14 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Disco.Data.Repository; -//using Quartz; - -//namespace Disco.BI.Interop.PluginServices -//{ -// interface IDiscoScheduledTask -// { -// void InitalizeScheduledTask(DiscoDataContext dbContext, IScheduler Scheduler); -// } -//} +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using Disco.Data.Repository; +//using Quartz; + +//namespace Disco.BI.Interop.PluginServices +//{ +// interface IDiscoScheduledTask +// { +// void InitalizeScheduledTask(DiscoDataContext dbContext, IScheduler Scheduler); +// } +//} diff --git a/Disco.BI/BI/Interop/PluginServices/Utilities.cs b/Disco.BI/BI/Interop/PluginServices/Utilities.cs index 73568295..14a8d9b4 100644 --- a/Disco.BI/BI/Interop/PluginServices/Utilities.cs +++ b/Disco.BI/BI/Interop/PluginServices/Utilities.cs @@ -1,45 +1,45 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Disco.Data.Repository; -//using Quartz; - -//namespace Disco.BI.Interop.PluginServices -//{ -// public static class Utilities -// { - -// public static void InitalizeScheduledTasks(DiscoDataContext dbContext, ISchedulerFactory SchedulerFactory) -// { - -// var scheduler = SchedulerFactory.GetScheduler(); - -// // Discover IDiscoScheduledTasks (Only from Disco Assemblies) -// var appDomain = AppDomain.CurrentDomain; - -// var scheduledTaskTypes = (from a in appDomain.GetAssemblies() -// where !a.GlobalAssemblyCache && !a.IsDynamic && a.FullName.StartsWith("Disco.", StringComparison.InvariantCultureIgnoreCase) -// from type in a.GetTypes() -// where typeof(IDiscoScheduledTask).IsAssignableFrom(type) && !type.IsAbstract -// select type); -// foreach (Type scheduledTaskType in scheduledTaskTypes) -// { -// IDiscoScheduledTask instance = (IDiscoScheduledTask)Activator.CreateInstance(scheduledTaskType); -// try -// { -// instance.InitalizeScheduledTask(dbContext, scheduler); -// } -// catch (Exception ex) -// { -// if (instance == null) -// Logging.SystemLog.LogException("Initializing Scheduled Task; Disco.BI.Interop.Plugins.Utilities.InitalizeScheduledTasks()", ex); -// else -// Logging.SystemLog.LogException(string.Format("Initializing Scheduled Task: '{0}'; Disco.BI.Interop.Plugins.Utilities.InitalizeScheduledTasks()", instance.GetType().Name), ex); -// } -// } - -// } - -// } -//} +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using Disco.Data.Repository; +//using Quartz; + +//namespace Disco.BI.Interop.PluginServices +//{ +// public static class Utilities +// { + +// public static void InitalizeScheduledTasks(DiscoDataContext dbContext, ISchedulerFactory SchedulerFactory) +// { + +// var scheduler = SchedulerFactory.GetScheduler(); + +// // Discover IDiscoScheduledTasks (Only from Disco Assemblies) +// var appDomain = AppDomain.CurrentDomain; + +// var scheduledTaskTypes = (from a in appDomain.GetAssemblies() +// where !a.GlobalAssemblyCache && !a.IsDynamic && a.FullName.StartsWith("Disco.", StringComparison.InvariantCultureIgnoreCase) +// from type in a.GetTypes() +// where typeof(IDiscoScheduledTask).IsAssignableFrom(type) && !type.IsAbstract +// select type); +// foreach (Type scheduledTaskType in scheduledTaskTypes) +// { +// IDiscoScheduledTask instance = (IDiscoScheduledTask)Activator.CreateInstance(scheduledTaskType); +// try +// { +// instance.InitalizeScheduledTask(dbContext, scheduler); +// } +// catch (Exception ex) +// { +// if (instance == null) +// Logging.SystemLog.LogException("Initializing Scheduled Task; Disco.BI.Interop.Plugins.Utilities.InitalizeScheduledTasks()", ex); +// else +// Logging.SystemLog.LogException(string.Format("Initializing Scheduled Task: '{0}'; Disco.BI.Interop.Plugins.Utilities.InitalizeScheduledTasks()", instance.GetType().Name), ex); +// } +// } + +// } + +// } +//} diff --git a/Disco.BI/BI/Interop/SignalRHandlers/UserHeldDevices.cs b/Disco.BI/BI/Interop/SignalRHandlers/UserHeldDevices.cs index c14ccb24..4c9738a3 100644 --- a/Disco.BI/BI/Interop/SignalRHandlers/UserHeldDevices.cs +++ b/Disco.BI/BI/Interop/SignalRHandlers/UserHeldDevices.cs @@ -1,23 +1,23 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using SignalR; -using SignalR.Hosting.AspNet; -using SignalR.Infrastructure; - -namespace Disco.BI.Interop.SignalRHandlers -{ - public class UserHeldDevices : PersistentConnection - { - - internal static void UserJobUpdated(string JobUserId) - { - var connectionManager = GlobalHost.ConnectionManager; - var connectionContext = connectionManager.GetConnectionContext(); - if (connectionContext != null) - connectionContext.Connection.Broadcast(JobUserId); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SignalR; +using SignalR.Hosting.AspNet; +using SignalR.Infrastructure; + +namespace Disco.BI.Interop.SignalRHandlers +{ + public class UserHeldDevices : PersistentConnection + { + + internal static void UserJobUpdated(string JobUserId) + { + var connectionManager = GlobalHost.ConnectionManager; + var connectionContext = connectionManager.GetConnectionContext(); + if (connectionContext != null) + connectionContext.Connection.Broadcast(JobUserId); + } + + } +} diff --git a/Disco.BI/BI/JobBI/Searching.cs b/Disco.BI/BI/JobBI/Searching.cs index 072951b4..85cfc78f 100644 --- a/Disco.BI/BI/JobBI/Searching.cs +++ b/Disco.BI/BI/JobBI/Searching.cs @@ -1,93 +1,93 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.BI.Job; -using Disco.Data.Repository; -using Disco.Models.Repository; -using Disco.BI.Extensions; - -namespace Disco.BI.JobBI -{ - public static class Searching - { - public static JobTableModel Search(DiscoDataContext dbContext, string Term, int? LimitCount = null, bool IncludeJobStatus = true, bool SearchDetails = false) - { - int termInt = default(int); - - IQueryable query = default(IQueryable); - - if (int.TryParse(Term, out termInt)) - { - // Term is a Number (int) - if (SearchDetails) - { - query = BuildJobTableModel(dbContext).Where(j => - j.Id == termInt || - j.DeviceHeldLocation.Contains(Term) || - j.Device.SerialNumber.Contains(Term) || - j.Device.AssetNumber.Contains(Term) || - j.User.Id == Term || - j.User.Surname.Contains(Term) || - j.User.GivenName.Contains(Term) || - j.User.DisplayName.Contains(Term) || - j.JobLogs.Any(jl => jl.Comments.Contains(Term)) || - j.JobAttachments.Any(ja => ja.Comments.Contains(Term))); - } - else - { - query = BuildJobTableModel(dbContext).Where(j => - j.Id == termInt || - j.DeviceHeldLocation.Contains(Term) || - j.Device.SerialNumber.Contains(Term) || - j.Device.AssetNumber.Contains(Term) || - j.User.Id == Term || - j.User.Surname.Contains(Term) || - j.User.GivenName.Contains(Term) || - j.User.DisplayName.Contains(Term)); - } - } - else - { - if (SearchDetails) - { - query = BuildJobTableModel(dbContext).Where(j => - j.DeviceHeldLocation.Contains(Term) || - j.Device.SerialNumber.Contains(Term) || - j.Device.AssetNumber.Contains(Term) || - j.User.Id == Term || - j.User.Surname.Contains(Term) || - j.User.GivenName.Contains(Term) || - j.User.DisplayName.Contains(Term) || - j.JobLogs.Any(jl => jl.Comments.Contains(Term)) || - j.JobAttachments.Any(ja => ja.Comments.Contains(Term))); - } - else - { - query = BuildJobTableModel(dbContext).Where(j => - j.DeviceHeldLocation.Contains(Term) || - j.Device.SerialNumber.Contains(Term) || - j.Device.AssetNumber.Contains(Term) || - j.User.Id == Term || - j.User.Surname.Contains(Term) || - j.User.GivenName.Contains(Term) || - j.User.DisplayName.Contains(Term)); - } - } - - if (LimitCount.HasValue) - query = query.Take(LimitCount.Value); - - JobTableModel model = new JobTableModel() { ShowStatus = IncludeJobStatus }; - model.Fill(dbContext, query); - - return model; - } - - public static IQueryable BuildJobTableModel(DiscoDataContext dbContext) - { - return dbContext.Jobs.Include("JobType").Include("Device").Include("User").Include("OpenedTechUser"); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.BI.Job; +using Disco.Data.Repository; +using Disco.Models.Repository; +using Disco.BI.Extensions; + +namespace Disco.BI.JobBI +{ + public static class Searching + { + public static JobTableModel Search(DiscoDataContext dbContext, string Term, int? LimitCount = null, bool IncludeJobStatus = true, bool SearchDetails = false) + { + int termInt = default(int); + + IQueryable query = default(IQueryable); + + if (int.TryParse(Term, out termInt)) + { + // Term is a Number (int) + if (SearchDetails) + { + query = BuildJobTableModel(dbContext).Where(j => + j.Id == termInt || + j.DeviceHeldLocation.Contains(Term) || + j.Device.SerialNumber.Contains(Term) || + j.Device.AssetNumber.Contains(Term) || + j.User.Id == Term || + j.User.Surname.Contains(Term) || + j.User.GivenName.Contains(Term) || + j.User.DisplayName.Contains(Term) || + j.JobLogs.Any(jl => jl.Comments.Contains(Term)) || + j.JobAttachments.Any(ja => ja.Comments.Contains(Term))); + } + else + { + query = BuildJobTableModel(dbContext).Where(j => + j.Id == termInt || + j.DeviceHeldLocation.Contains(Term) || + j.Device.SerialNumber.Contains(Term) || + j.Device.AssetNumber.Contains(Term) || + j.User.Id == Term || + j.User.Surname.Contains(Term) || + j.User.GivenName.Contains(Term) || + j.User.DisplayName.Contains(Term)); + } + } + else + { + if (SearchDetails) + { + query = BuildJobTableModel(dbContext).Where(j => + j.DeviceHeldLocation.Contains(Term) || + j.Device.SerialNumber.Contains(Term) || + j.Device.AssetNumber.Contains(Term) || + j.User.Id == Term || + j.User.Surname.Contains(Term) || + j.User.GivenName.Contains(Term) || + j.User.DisplayName.Contains(Term) || + j.JobLogs.Any(jl => jl.Comments.Contains(Term)) || + j.JobAttachments.Any(ja => ja.Comments.Contains(Term))); + } + else + { + query = BuildJobTableModel(dbContext).Where(j => + j.DeviceHeldLocation.Contains(Term) || + j.Device.SerialNumber.Contains(Term) || + j.Device.AssetNumber.Contains(Term) || + j.User.Id == Term || + j.User.Surname.Contains(Term) || + j.User.GivenName.Contains(Term) || + j.User.DisplayName.Contains(Term)); + } + } + + if (LimitCount.HasValue) + query = query.Take(LimitCount.Value); + + JobTableModel model = new JobTableModel() { ShowStatus = IncludeJobStatus }; + model.Fill(dbContext, query); + + return model; + } + + public static IQueryable BuildJobTableModel(DiscoDataContext dbContext) + { + return dbContext.Jobs.Include("JobType").Include("Device").Include("User").Include("OpenedTechUser"); + } + + } +} diff --git a/Disco.BI/BI/JobBI/Statistics/DailyOpenedClosed.cs b/Disco.BI/BI/JobBI/Statistics/DailyOpenedClosed.cs index 41766bc2..554e5856 100644 --- a/Disco.BI/BI/JobBI/Statistics/DailyOpenedClosed.cs +++ b/Disco.BI/BI/JobBI/Statistics/DailyOpenedClosed.cs @@ -1,142 +1,142 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Quartz; -using Disco.Models.BI.Job.Statistics; -using Disco.Data.Repository; -using Quartz.Impl; -using Disco.Services.Tasks; - -namespace Disco.BI.JobBI.Statistics -{ - public class DailyOpenedClosed : ScheduledTask - { - - private static List _data; - private static object _dataLock = new object(); - - - public override string TaskName { get { return "Job Statistics - Daily Opened/Closed Task"; } } - public override bool SingleInstanceTask { get { return true; } } - public override bool CancelInitiallySupported { get { return false; } } - - public override void InitalizeScheduledTask(DiscoDataContext dbContext) - { - // Trigger Daily @ 12:29am - TriggerBuilder triggerBuilder = TriggerBuilder.Create().WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 29)); - - this.ScheduleTask(triggerBuilder); - } - protected override void ExecuteTask() - { - using (var dbContext = new DiscoDataContext()) - { - UpdateDataHistory(dbContext, true); - } - } - - //public void InitalizeScheduledTask(DiscoDataContext dbContext, IScheduler Scheduler) - //{ - // // Run @ 12:29am - // IJobDetail jobDetail = new JobDetailImpl("JobStatisticsDailyOpenedClosed", typeof(DailyOpenedClosed)); - // ITrigger trigger = TriggerBuilder.Create(). - // WithIdentity("JobStatisticsDailyOpenedClosedTrigger"). - // StartNow(). - // WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 29)). - // Build(); - // Scheduler.ScheduleJob(jobDetail, trigger); - //} - - //public void Execute(IJobExecutionContext context) - //{ - // try - // { - // using (var dbContext = new DiscoDataContext()) - // { - // UpdateDataHistory(dbContext, true); - // } - // } - // catch (Exception ex) - // { - // Logging.SystemLog.LogException("Disco.BI.JobBI.Statistics.DailyOpenedClosed", ex); - // } - //} - - private static void UpdateDataHistory(DiscoDataContext dbContext, bool Refresh = false) - { - DateTime historyEnd = DateTime.Now.AddDays(-1).Date; - - if (Refresh || _data == null || _data.Count == 0 || _data.Last().Timestamp < historyEnd) - { - lock (_dataLock) - { - if (Refresh || _data == null || _data.Count == 0 || _data.Last().Timestamp < historyEnd) - { - DateTime historyStart = DateTime.Now.AddDays(-28).Date; - - // Initialize Memory Store - List resultData; - if (Refresh || _data == null) - resultData = new List(); - else - resultData = _data; - - // Remove Old Data - while (resultData.Count > 0 && resultData[0].Timestamp < historyStart) - resultData.RemoveAt(0); - - // Calculate Update Scope - DateTime processDate = historyStart; - if (resultData.Count > 0) - processDate = resultData.Last().Timestamp.AddDays(-1); - - // Cache Data - while (processDate <= historyEnd) - { - resultData.Add(Data(dbContext, processDate)); - processDate = processDate.AddDays(1); - } - - _data = resultData; - } - } - } - } - - private static DailyOpenedClosedItem Data(DiscoDataContext dbContext, DateTime ProcessDate) - { - DateTime processDateStart = ProcessDate; - DateTime processDateEnd = ProcessDate.AddDays(1); - - int totalJobs = dbContext.Jobs.Where(j => j.OpenedDate < processDateEnd && (!j.ClosedDate.HasValue || j.ClosedDate > processDateEnd)).Count(); - int openedJobs = dbContext.Jobs.Where(j => j.OpenedDate > processDateStart && j.OpenedDate < processDateEnd).Count(); - int closedJobs = dbContext.Jobs.Where(j => j.ClosedDate > processDateStart && j.ClosedDate < processDateEnd).Count(); - - return new DailyOpenedClosedItem() - { - Timestamp = ProcessDate, - TotalJobs = totalJobs, - OpenedJobs = openedJobs, - ClosedJobs = closedJobs - }; - } - - public static List Data(DiscoDataContext dbContext, bool FilterUnimportantWeekends = false) - { - List resultData; - - UpdateDataHistory(dbContext); - - if (FilterUnimportantWeekends) - resultData = _data.Where(i => (i.Timestamp.DayOfWeek != DayOfWeek.Saturday && i.Timestamp.DayOfWeek != DayOfWeek.Sunday) || - (i.OpenedJobs > 0 || i.ClosedJobs > 0)).ToList(); - else - resultData = _data.ToList(); - - resultData.Add(Data(dbContext, DateTime.Today)); - - return resultData; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Quartz; +using Disco.Models.BI.Job.Statistics; +using Disco.Data.Repository; +using Quartz.Impl; +using Disco.Services.Tasks; + +namespace Disco.BI.JobBI.Statistics +{ + public class DailyOpenedClosed : ScheduledTask + { + + private static List _data; + private static object _dataLock = new object(); + + + public override string TaskName { get { return "Job Statistics - Daily Opened/Closed Task"; } } + public override bool SingleInstanceTask { get { return true; } } + public override bool CancelInitiallySupported { get { return false; } } + + public override void InitalizeScheduledTask(DiscoDataContext dbContext) + { + // Trigger Daily @ 12:29am + TriggerBuilder triggerBuilder = TriggerBuilder.Create().WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 29)); + + this.ScheduleTask(triggerBuilder); + } + protected override void ExecuteTask() + { + using (var dbContext = new DiscoDataContext()) + { + UpdateDataHistory(dbContext, true); + } + } + + //public void InitalizeScheduledTask(DiscoDataContext dbContext, IScheduler Scheduler) + //{ + // // Run @ 12:29am + // IJobDetail jobDetail = new JobDetailImpl("JobStatisticsDailyOpenedClosed", typeof(DailyOpenedClosed)); + // ITrigger trigger = TriggerBuilder.Create(). + // WithIdentity("JobStatisticsDailyOpenedClosedTrigger"). + // StartNow(). + // WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 29)). + // Build(); + // Scheduler.ScheduleJob(jobDetail, trigger); + //} + + //public void Execute(IJobExecutionContext context) + //{ + // try + // { + // using (var dbContext = new DiscoDataContext()) + // { + // UpdateDataHistory(dbContext, true); + // } + // } + // catch (Exception ex) + // { + // Logging.SystemLog.LogException("Disco.BI.JobBI.Statistics.DailyOpenedClosed", ex); + // } + //} + + private static void UpdateDataHistory(DiscoDataContext dbContext, bool Refresh = false) + { + DateTime historyEnd = DateTime.Now.AddDays(-1).Date; + + if (Refresh || _data == null || _data.Count == 0 || _data.Last().Timestamp < historyEnd) + { + lock (_dataLock) + { + if (Refresh || _data == null || _data.Count == 0 || _data.Last().Timestamp < historyEnd) + { + DateTime historyStart = DateTime.Now.AddDays(-28).Date; + + // Initialize Memory Store + List resultData; + if (Refresh || _data == null) + resultData = new List(); + else + resultData = _data; + + // Remove Old Data + while (resultData.Count > 0 && resultData[0].Timestamp < historyStart) + resultData.RemoveAt(0); + + // Calculate Update Scope + DateTime processDate = historyStart; + if (resultData.Count > 0) + processDate = resultData.Last().Timestamp.AddDays(-1); + + // Cache Data + while (processDate <= historyEnd) + { + resultData.Add(Data(dbContext, processDate)); + processDate = processDate.AddDays(1); + } + + _data = resultData; + } + } + } + } + + private static DailyOpenedClosedItem Data(DiscoDataContext dbContext, DateTime ProcessDate) + { + DateTime processDateStart = ProcessDate; + DateTime processDateEnd = ProcessDate.AddDays(1); + + int totalJobs = dbContext.Jobs.Where(j => j.OpenedDate < processDateEnd && (!j.ClosedDate.HasValue || j.ClosedDate > processDateEnd)).Count(); + int openedJobs = dbContext.Jobs.Where(j => j.OpenedDate > processDateStart && j.OpenedDate < processDateEnd).Count(); + int closedJobs = dbContext.Jobs.Where(j => j.ClosedDate > processDateStart && j.ClosedDate < processDateEnd).Count(); + + return new DailyOpenedClosedItem() + { + Timestamp = ProcessDate, + TotalJobs = totalJobs, + OpenedJobs = openedJobs, + ClosedJobs = closedJobs + }; + } + + public static List Data(DiscoDataContext dbContext, bool FilterUnimportantWeekends = false) + { + List resultData; + + UpdateDataHistory(dbContext); + + if (FilterUnimportantWeekends) + resultData = _data.Where(i => (i.Timestamp.DayOfWeek != DayOfWeek.Saturday && i.Timestamp.DayOfWeek != DayOfWeek.Sunday) || + (i.OpenedJobs > 0 || i.ClosedJobs > 0)).ToList(); + else + resultData = _data.ToList(); + + resultData.Add(Data(dbContext, DateTime.Today)); + + return resultData; + } + } +} diff --git a/Disco.BI/BI/JobBI/Utilities.cs b/Disco.BI/BI/JobBI/Utilities.cs index a7fb228a..52cb983d 100644 --- a/Disco.BI/BI/JobBI/Utilities.cs +++ b/Disco.BI/BI/JobBI/Utilities.cs @@ -1,171 +1,171 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; -using Disco.Models.BI.Job; - -namespace Disco.BI.JobBI -{ - public static class Utilities - { - public static Job Create(DiscoDataContext dbContext, Device device, User user, JobType type, List subTypes, User initialTech) - { - Job j = new Job() - { - JobType = type, - OpenedTechUserId = initialTech.Id, - OpenedTechUser = initialTech, - OpenedDate = DateTime.Now - }; - - // Device - if (device != null) - { - j.Device = device; - j.DeviceSerialNumber = device.SerialNumber; - } - - // User - if (user != null) - { - j.User = user; - j.UserId = user.Id; - } - - // Sub Types - List jobSubTypes = subTypes.ToList(); - j.JobSubTypes = jobSubTypes; - - dbContext.Jobs.Add(j); - - switch (type.Id) - { - case JobType.JobTypeIds.HWar: - dbContext.JobMetaWarranties.Add(new JobMetaWarranty() { Job = j }); - break; - case JobType.JobTypeIds.HNWar: - dbContext.JobMetaNonWarranties.Add(new JobMetaNonWarranty() { Job = j }); - if (device != null) - { - // Add Job Components - var components = dbContext.DeviceComponents.Include("JobSubTypes").Where(c => !c.DeviceModelId.HasValue || c.DeviceModelId == j.Device.DeviceModelId); - var addedComponents = new List(); - foreach (var c in components) - { - if (c.JobSubTypes.Count == 0) - { // No Filter - addedComponents.Add(c); - } - else - { - foreach (var st in c.JobSubTypes) - { - foreach (var jst in jobSubTypes) - { - if (st.JobTypeId == jst.JobTypeId && st.Id == jst.Id) - { - addedComponents.Add(c); - break; - } - } - if (addedComponents.Contains(c)) - break; - } - } - } - foreach (var c in addedComponents) - dbContext.JobComponents.Add(new JobComponent() - { - Job = j, - TechUserId = initialTech.Id, - Cost = c.Cost, - Description = c.Description - }); - } - break; - } - - return j; - } - - public static string JobStatusDescription(string StatusId, Job j = null) - { - switch (StatusId) - { - case Job.JobStatusIds.Open: - return "Open"; - case Job.JobStatusIds.Closed: - return "Closed"; - case Job.JobStatusIds.AwaitingWarrantyRepair: - if (j == null) - return "Awaiting Warranty Repair"; - else - if (j.DeviceHeld.HasValue) - return string.Format("Awaiting Warranty Repair ({0})", j.JobMetaWarranty.ExternalName); - else - return string.Format("Awaiting Warranty Repair - Not Held ({0})", j.JobMetaWarranty.ExternalName); - case Job.JobStatusIds.AwaitingRepairs: - if (j == null) - return "Awaiting Repairs"; - else - if (j.DeviceHeld.HasValue) - return string.Format("Awaiting Repairs ({0})", j.JobMetaNonWarranty.RepairerName); - else - return string.Format("Awaiting Repairs - Not Held ({0})", j.JobMetaNonWarranty.RepairerName); - case Job.JobStatusIds.AwaitingDeviceReturn: - return "Awaiting Device Return"; - case Job.JobStatusIds.AwaitingUserAction: - return "Awaiting User Action"; - case Job.JobStatusIds.AwaitingAccountingPayment: - return "Awaiting Accounting Payment"; - case Job.JobStatusIds.AwaitingAccountingCharge: - return "Awaiting Accounting Charge"; - case Job.JobStatusIds.AwaitingInsuranceProcessing: - return "Awaiting Insurance Processing"; - default: - return "Unknown"; - } - } - public static string JobStatusDescription(string StatusId, JobTableModel.JobTableItemModelIncludeStatus j = null) - { - switch (StatusId) - { - case Job.JobStatusIds.Open: - return "Open"; - case Job.JobStatusIds.Closed: - return "Closed"; - case Job.JobStatusIds.AwaitingWarrantyRepair: - if (j == null) - return "Awaiting Warranty Repair"; - else - if (j.DeviceHeld.HasValue) - return string.Format("Awaiting Warranty Repair ({0})", j.JobMetaWarranty_ExternalName); - else - return string.Format("Awaiting Warranty Repair - Not Held ({0})", j.JobMetaWarranty_ExternalName); - case Job.JobStatusIds.AwaitingRepairs: - if (j == null) - return "Awaiting Repairs"; - else - if (j.DeviceHeld.HasValue) - return string.Format("Awaiting Repairs ({0})", j.JobMetaNonWarranty_RepairerName); - else - return string.Format("Awaiting Repairs - Not Held ({0})", j.JobMetaNonWarranty_RepairerName); - case Job.JobStatusIds.AwaitingDeviceReturn: - return "Awaiting Device Return"; - case Job.JobStatusIds.AwaitingUserAction: - return "Awaiting User Action"; - case Job.JobStatusIds.AwaitingAccountingPayment: - return "Awaiting Accounting Payment"; - case Job.JobStatusIds.AwaitingAccountingCharge: - return "Awaiting Accounting Charge"; - case Job.JobStatusIds.AwaitingInsuranceProcessing: - return "Awaiting Insurance Processing"; - default: - return "Unknown"; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; +using Disco.Models.BI.Job; + +namespace Disco.BI.JobBI +{ + public static class Utilities + { + public static Job Create(DiscoDataContext dbContext, Device device, User user, JobType type, List subTypes, User initialTech) + { + Job j = new Job() + { + JobType = type, + OpenedTechUserId = initialTech.Id, + OpenedTechUser = initialTech, + OpenedDate = DateTime.Now + }; + + // Device + if (device != null) + { + j.Device = device; + j.DeviceSerialNumber = device.SerialNumber; + } + + // User + if (user != null) + { + j.User = user; + j.UserId = user.Id; + } + + // Sub Types + List jobSubTypes = subTypes.ToList(); + j.JobSubTypes = jobSubTypes; + + dbContext.Jobs.Add(j); + + switch (type.Id) + { + case JobType.JobTypeIds.HWar: + dbContext.JobMetaWarranties.Add(new JobMetaWarranty() { Job = j }); + break; + case JobType.JobTypeIds.HNWar: + dbContext.JobMetaNonWarranties.Add(new JobMetaNonWarranty() { Job = j }); + if (device != null) + { + // Add Job Components + var components = dbContext.DeviceComponents.Include("JobSubTypes").Where(c => !c.DeviceModelId.HasValue || c.DeviceModelId == j.Device.DeviceModelId); + var addedComponents = new List(); + foreach (var c in components) + { + if (c.JobSubTypes.Count == 0) + { // No Filter + addedComponents.Add(c); + } + else + { + foreach (var st in c.JobSubTypes) + { + foreach (var jst in jobSubTypes) + { + if (st.JobTypeId == jst.JobTypeId && st.Id == jst.Id) + { + addedComponents.Add(c); + break; + } + } + if (addedComponents.Contains(c)) + break; + } + } + } + foreach (var c in addedComponents) + dbContext.JobComponents.Add(new JobComponent() + { + Job = j, + TechUserId = initialTech.Id, + Cost = c.Cost, + Description = c.Description + }); + } + break; + } + + return j; + } + + public static string JobStatusDescription(string StatusId, Job j = null) + { + switch (StatusId) + { + case Job.JobStatusIds.Open: + return "Open"; + case Job.JobStatusIds.Closed: + return "Closed"; + case Job.JobStatusIds.AwaitingWarrantyRepair: + if (j == null) + return "Awaiting Warranty Repair"; + else + if (j.DeviceHeld.HasValue) + return string.Format("Awaiting Warranty Repair ({0})", j.JobMetaWarranty.ExternalName); + else + return string.Format("Awaiting Warranty Repair - Not Held ({0})", j.JobMetaWarranty.ExternalName); + case Job.JobStatusIds.AwaitingRepairs: + if (j == null) + return "Awaiting Repairs"; + else + if (j.DeviceHeld.HasValue) + return string.Format("Awaiting Repairs ({0})", j.JobMetaNonWarranty.RepairerName); + else + return string.Format("Awaiting Repairs - Not Held ({0})", j.JobMetaNonWarranty.RepairerName); + case Job.JobStatusIds.AwaitingDeviceReturn: + return "Awaiting Device Return"; + case Job.JobStatusIds.AwaitingUserAction: + return "Awaiting User Action"; + case Job.JobStatusIds.AwaitingAccountingPayment: + return "Awaiting Accounting Payment"; + case Job.JobStatusIds.AwaitingAccountingCharge: + return "Awaiting Accounting Charge"; + case Job.JobStatusIds.AwaitingInsuranceProcessing: + return "Awaiting Insurance Processing"; + default: + return "Unknown"; + } + } + public static string JobStatusDescription(string StatusId, JobTableModel.JobTableItemModelIncludeStatus j = null) + { + switch (StatusId) + { + case Job.JobStatusIds.Open: + return "Open"; + case Job.JobStatusIds.Closed: + return "Closed"; + case Job.JobStatusIds.AwaitingWarrantyRepair: + if (j == null) + return "Awaiting Warranty Repair"; + else + if (j.DeviceHeld.HasValue) + return string.Format("Awaiting Warranty Repair ({0})", j.JobMetaWarranty_ExternalName); + else + return string.Format("Awaiting Warranty Repair - Not Held ({0})", j.JobMetaWarranty_ExternalName); + case Job.JobStatusIds.AwaitingRepairs: + if (j == null) + return "Awaiting Repairs"; + else + if (j.DeviceHeld.HasValue) + return string.Format("Awaiting Repairs ({0})", j.JobMetaNonWarranty_RepairerName); + else + return string.Format("Awaiting Repairs - Not Held ({0})", j.JobMetaNonWarranty_RepairerName); + case Job.JobStatusIds.AwaitingDeviceReturn: + return "Awaiting Device Return"; + case Job.JobStatusIds.AwaitingUserAction: + return "Awaiting User Action"; + case Job.JobStatusIds.AwaitingAccountingPayment: + return "Awaiting Accounting Payment"; + case Job.JobStatusIds.AwaitingAccountingCharge: + return "Awaiting Accounting Charge"; + case Job.JobStatusIds.AwaitingInsuranceProcessing: + return "Awaiting Insurance Processing"; + default: + return "Unknown"; + } + } + + } +} diff --git a/Disco.BI/BI/UserBI/Searching.cs b/Disco.BI/BI/UserBI/Searching.cs index 9ced0649..096792d5 100644 --- a/Disco.BI/BI/UserBI/Searching.cs +++ b/Disco.BI/BI/UserBI/Searching.cs @@ -1,61 +1,61 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.BI.Search; -using Disco.Models.Repository; -using Disco.Data.Repository; - -namespace Disco.BI.UserBI -{ - public static class Searching - { - - public static List SearchUpstream(string Term) - { - return Interop.ActiveDirectory.ActiveDirectory.SearchUsers(Term).Select(adU => adU.ToRepositoryUser()).ToList(); - } - - private static List Search_SelectUserSearchResultItems(IQueryable Query, int? LimitCount = null) - { - if (LimitCount.HasValue) - Query = Query.Take(LimitCount.Value); - - return Query.Select(u => new UserSearchResultItem() - { - Id = u.Id, - Surname = u.Surname, - GivenName = u.GivenName, - DisplayName = u.DisplayName, - AssignedDevicesCount = u.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).Count(), - JobCount = u.Jobs.Count() - }).ToList(); - } - - public static List Search(DiscoDataContext dbContext, string Term, int? LimitCount = null) - { - if (string.IsNullOrWhiteSpace(Term) || Term.Length < 2) - throw new ArgumentException("Search Term must contain at least two characters", "Term"); - - // Search Active Directory & Import Relevant Users - var adImportedUsers = Interop.ActiveDirectory.ActiveDirectory.SearchUsers(Term).Select(adU => adU.ToRepositoryUser()); - foreach (var adU in adImportedUsers) - { - var existingUser = dbContext.Users.Find(adU.Id); - if (existingUser != null) - existingUser.UpdateSelf(adU); - else - dbContext.Users.Add(adU); - dbContext.SaveChanges(); - UserCache.InvalidateValue(adU.Id); - } - - return Search_SelectUserSearchResultItems(dbContext.Users.Where(u => - u.Id.Contains(Term) || - u.Surname.Contains(Term) || - u.GivenName.Contains(Term) || - u.DisplayName.Contains(Term) - ), LimitCount); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.BI.Search; +using Disco.Models.Repository; +using Disco.Data.Repository; + +namespace Disco.BI.UserBI +{ + public static class Searching + { + + public static List SearchUpstream(string Term) + { + return Interop.ActiveDirectory.ActiveDirectory.SearchUsers(Term).Select(adU => adU.ToRepositoryUser()).ToList(); + } + + private static List Search_SelectUserSearchResultItems(IQueryable Query, int? LimitCount = null) + { + if (LimitCount.HasValue) + Query = Query.Take(LimitCount.Value); + + return Query.Select(u => new UserSearchResultItem() + { + Id = u.Id, + Surname = u.Surname, + GivenName = u.GivenName, + DisplayName = u.DisplayName, + AssignedDevicesCount = u.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).Count(), + JobCount = u.Jobs.Count() + }).ToList(); + } + + public static List Search(DiscoDataContext dbContext, string Term, int? LimitCount = null) + { + if (string.IsNullOrWhiteSpace(Term) || Term.Length < 2) + throw new ArgumentException("Search Term must contain at least two characters", "Term"); + + // Search Active Directory & Import Relevant Users + var adImportedUsers = Interop.ActiveDirectory.ActiveDirectory.SearchUsers(Term).Select(adU => adU.ToRepositoryUser()); + foreach (var adU in adImportedUsers) + { + var existingUser = dbContext.Users.Find(adU.Id); + if (existingUser != null) + existingUser.UpdateSelf(adU); + else + dbContext.Users.Add(adU); + dbContext.SaveChanges(); + UserCache.InvalidateValue(adU.Id); + } + + return Search_SelectUserSearchResultItems(dbContext.Users.Where(u => + u.Id.Contains(Term) || + u.Surname.Contains(Term) || + u.GivenName.Contains(Term) || + u.DisplayName.Contains(Term) + ), LimitCount); + } + } +} diff --git a/Disco.BI/BI/UserBI/UserCache.cs b/Disco.BI/BI/UserBI/UserCache.cs index fe145b43..b7cc24cf 100644 --- a/Disco.BI/BI/UserBI/UserCache.cs +++ b/Disco.BI/BI/UserBI/UserCache.cs @@ -1,193 +1,193 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections.Concurrent; -using Disco.Models.Repository; -using Disco.Data.Repository; -using System.Web; -using Quartz; -using Quartz.Impl; -using Disco.Services.Tasks; - -namespace Disco.BI.UserBI -{ - public class UserCache : ScheduledTask - { - private static ConcurrentDictionary> _Cache = new ConcurrentDictionary>(); - private const long CacheTimeoutTicks = 6000000000; // 10 Minutes - private const string CacheHttpRequestKey = "Disco_CurrentUser"; - - public static User CurrentUser - { - get - { - string username = null; - User user; - - // Check for ASP.NET - if (HttpContext.Current != null) - { - if (HttpContext.Current.Request.IsAuthenticated) - { - user = (User)HttpContext.Current.Items[CacheHttpRequestKey]; - if (user != null) - return user; - - username = HttpContext.Current.User.Identity.Name; - } - else - { - return null; - //throw new PlatformNotSupportedException("ASP.NET Authentication is not correctly configured"); - } - } - - // User default User - if (username == null) - { - username = System.Security.Principal.WindowsIdentity.GetCurrent().Name; - } - - user = GetUser(username); - - if (HttpContext.Current != null && HttpContext.Current.Request.IsAuthenticated) - { - // Cache in current request - HttpContext.Current.Items[CacheHttpRequestKey] = user; - } - - return user; - } - } - - public static User GetUser(string Username) - { - // Check Cache - User u = TryUserCache(Username); - - if (u == null) - { - // Load from Repository - using (DiscoDataContext dbContext = new DiscoDataContext()) - { - u = GetUser(Username, dbContext, true); - } - } - return u; - } - - public static User GetUser(string Username, DiscoDataContext dbContext, bool ForceRefresh = false) - { - User u = null; - - // Check Cache - if (!ForceRefresh) - u = TryUserCache(Username); - - if (u == null) - { - string username = Username.ToLower(); - u = UserBI.Utilities.LoadUser(dbContext, username); - SetValue(username, u); - } - return u; - } - - private static User TryUserCache(string Username) - { - string username = Username.ToLower(); - Tuple userRecord; - if (_Cache.TryGetValue(username, out userRecord)) - { - if (userRecord.Item2 > DateTime.Now) - return userRecord.Item1; - else - _Cache.TryRemove(username, out userRecord); - } - return null; - } - - public static bool InvalidateValue(string Key) - { - Tuple userRecord; - return _Cache.TryRemove(Key.ToLower(), out userRecord); - } - - private static bool SetValue(string Key, User User) - { - string key = Key.ToLower(); - Tuple userRecord = new Tuple(User, DateTime.Now.AddTicks(CacheTimeoutTicks)); - if (_Cache.ContainsKey(key)) - { - Tuple oldUser; - if (_Cache.TryGetValue(key, out oldUser)) - { - return _Cache.TryUpdate(key, userRecord, oldUser); - } - } - return _Cache.TryAdd(key, userRecord); - } - - private static void CleanStaleCache() - { - var usernames = _Cache.Keys.ToArray(); - foreach (string username in usernames) - { - Tuple userRecord; - if (_Cache.TryGetValue(username, out userRecord)) - { - if (userRecord.Item2 <= DateTime.Now) - _Cache.TryRemove(username, out userRecord); - } - } - } - - //public void InitalizeScheduledTask(DiscoDataContext dbContext, IScheduler Scheduler) - //{ - // // Run @ every 15mins - - // // Next 15min interval - // DateTime now = DateTime.Now; - // int mins = (15 - (now.Minute % 15)); - // if (mins < 10) - // mins += 15; - // DateTimeOffset startAt = new DateTimeOffset(now).AddMinutes(mins).AddSeconds(now.Second * -1).AddMilliseconds(now.Millisecond * -1); - - // IJobDetail jobDetail = new JobDetailImpl("UserCache_CleanStaleCache", typeof(UserCache)); - // ITrigger trigger = TriggerBuilder.Create(). - // WithIdentity("UserCache_CleanStaleCacheTrigger").StartAt(startAt). - // WithSchedule(SimpleScheduleBuilder.RepeatMinutelyForever(15)). - // Build(); - // Scheduler.ScheduleJob(jobDetail, trigger); - //} - - public override string TaskName { get { return "User Cache - Clean Stale Cache"; } } - - public override bool SingleInstanceTask { get { return true; } } - public override bool CancelInitiallySupported { get { return false; } } - public override bool LogExceptionsOnly { get { return true; } } - - public override void InitalizeScheduledTask(DiscoDataContext dbContext) - { - // Run @ every 15mins - - // Next 15min interval - DateTime now = DateTime.Now; - int mins = (15 - (now.Minute % 15)); - if (mins < 10) - mins += 15; - DateTimeOffset startAt = new DateTimeOffset(now).AddMinutes(mins).AddSeconds(now.Second * -1).AddMilliseconds(now.Millisecond * -1); - - TriggerBuilder triggerBuilder = TriggerBuilder.Create().StartAt(startAt). - WithSchedule(SimpleScheduleBuilder.RepeatMinutelyForever(15)); - - this.ScheduleTask(triggerBuilder); - } - - protected override void ExecuteTask() - { - CleanStaleCache(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections.Concurrent; +using Disco.Models.Repository; +using Disco.Data.Repository; +using System.Web; +using Quartz; +using Quartz.Impl; +using Disco.Services.Tasks; + +namespace Disco.BI.UserBI +{ + public class UserCache : ScheduledTask + { + private static ConcurrentDictionary> _Cache = new ConcurrentDictionary>(); + private const long CacheTimeoutTicks = 6000000000; // 10 Minutes + private const string CacheHttpRequestKey = "Disco_CurrentUser"; + + public static User CurrentUser + { + get + { + string username = null; + User user; + + // Check for ASP.NET + if (HttpContext.Current != null) + { + if (HttpContext.Current.Request.IsAuthenticated) + { + user = (User)HttpContext.Current.Items[CacheHttpRequestKey]; + if (user != null) + return user; + + username = HttpContext.Current.User.Identity.Name; + } + else + { + return null; + //throw new PlatformNotSupportedException("ASP.NET Authentication is not correctly configured"); + } + } + + // User default User + if (username == null) + { + username = System.Security.Principal.WindowsIdentity.GetCurrent().Name; + } + + user = GetUser(username); + + if (HttpContext.Current != null && HttpContext.Current.Request.IsAuthenticated) + { + // Cache in current request + HttpContext.Current.Items[CacheHttpRequestKey] = user; + } + + return user; + } + } + + public static User GetUser(string Username) + { + // Check Cache + User u = TryUserCache(Username); + + if (u == null) + { + // Load from Repository + using (DiscoDataContext dbContext = new DiscoDataContext()) + { + u = GetUser(Username, dbContext, true); + } + } + return u; + } + + public static User GetUser(string Username, DiscoDataContext dbContext, bool ForceRefresh = false) + { + User u = null; + + // Check Cache + if (!ForceRefresh) + u = TryUserCache(Username); + + if (u == null) + { + string username = Username.ToLower(); + u = UserBI.Utilities.LoadUser(dbContext, username); + SetValue(username, u); + } + return u; + } + + private static User TryUserCache(string Username) + { + string username = Username.ToLower(); + Tuple userRecord; + if (_Cache.TryGetValue(username, out userRecord)) + { + if (userRecord.Item2 > DateTime.Now) + return userRecord.Item1; + else + _Cache.TryRemove(username, out userRecord); + } + return null; + } + + public static bool InvalidateValue(string Key) + { + Tuple userRecord; + return _Cache.TryRemove(Key.ToLower(), out userRecord); + } + + private static bool SetValue(string Key, User User) + { + string key = Key.ToLower(); + Tuple userRecord = new Tuple(User, DateTime.Now.AddTicks(CacheTimeoutTicks)); + if (_Cache.ContainsKey(key)) + { + Tuple oldUser; + if (_Cache.TryGetValue(key, out oldUser)) + { + return _Cache.TryUpdate(key, userRecord, oldUser); + } + } + return _Cache.TryAdd(key, userRecord); + } + + private static void CleanStaleCache() + { + var usernames = _Cache.Keys.ToArray(); + foreach (string username in usernames) + { + Tuple userRecord; + if (_Cache.TryGetValue(username, out userRecord)) + { + if (userRecord.Item2 <= DateTime.Now) + _Cache.TryRemove(username, out userRecord); + } + } + } + + //public void InitalizeScheduledTask(DiscoDataContext dbContext, IScheduler Scheduler) + //{ + // // Run @ every 15mins + + // // Next 15min interval + // DateTime now = DateTime.Now; + // int mins = (15 - (now.Minute % 15)); + // if (mins < 10) + // mins += 15; + // DateTimeOffset startAt = new DateTimeOffset(now).AddMinutes(mins).AddSeconds(now.Second * -1).AddMilliseconds(now.Millisecond * -1); + + // IJobDetail jobDetail = new JobDetailImpl("UserCache_CleanStaleCache", typeof(UserCache)); + // ITrigger trigger = TriggerBuilder.Create(). + // WithIdentity("UserCache_CleanStaleCacheTrigger").StartAt(startAt). + // WithSchedule(SimpleScheduleBuilder.RepeatMinutelyForever(15)). + // Build(); + // Scheduler.ScheduleJob(jobDetail, trigger); + //} + + public override string TaskName { get { return "User Cache - Clean Stale Cache"; } } + + public override bool SingleInstanceTask { get { return true; } } + public override bool CancelInitiallySupported { get { return false; } } + public override bool LogExceptionsOnly { get { return true; } } + + public override void InitalizeScheduledTask(DiscoDataContext dbContext) + { + // Run @ every 15mins + + // Next 15min interval + DateTime now = DateTime.Now; + int mins = (15 - (now.Minute % 15)); + if (mins < 10) + mins += 15; + DateTimeOffset startAt = new DateTimeOffset(now).AddMinutes(mins).AddSeconds(now.Second * -1).AddMilliseconds(now.Millisecond * -1); + + TriggerBuilder triggerBuilder = TriggerBuilder.Create().StartAt(startAt). + WithSchedule(SimpleScheduleBuilder.RepeatMinutelyForever(15)); + + this.ScheduleTask(triggerBuilder); + } + + protected override void ExecuteTask() + { + CleanStaleCache(); + } + } +} diff --git a/Disco.BI/BI/UserBI/Utilities.cs b/Disco.BI/BI/UserBI/Utilities.cs index 7839071f..a5ba7e15 100644 --- a/Disco.BI/BI/UserBI/Utilities.cs +++ b/Disco.BI/BI/UserBI/Utilities.cs @@ -1,76 +1,76 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; -using Disco.Data.Repository; -using Disco.Models.BI.Search; -using System.Runtime.InteropServices; -using System.DirectoryServices.ActiveDirectory; -using Disco.Services.Logging; - -namespace Disco.BI.UserBI -{ - public static class Utilities - { - - public static User LoadUser(DiscoDataContext dbContext, string Username) - { - // Machine Account ? - if (Username.EndsWith("$")) - { - return Interop.ActiveDirectory.ActiveDirectory.GetMachineAccount(Username).ToRepositoryUser(); - } - - // User Account - User user = null; - try - { - var ADUser = Interop.ActiveDirectory.ActiveDirectory.GetUserAccount(Username); - if (ADUser == null) - throw new ArgumentException(string.Format("Invalid Username: '{0}'", Username), "Username"); - user = ADUser.ToRepositoryUser(); - } - catch (COMException ex) - { - // If "Server is not operational" then Try Cache - if (ex.ErrorCode != -2147016646) - { - throw ex; - } - SystemLog.LogException("Primary Domain Controller Down? Disco.BI.UserBI.Utilities.LoadUser", ex); - } - catch (ActiveDirectoryOperationException ex) - { - // Try From Cache... - SystemLog.LogException("Primary Domain Controller Down? Disco.BI.UserBI.Utilities.LoadUser", ex); - } - - // Update Repository - User existingUser; - if (user == null) - { - string username = Username.Contains(@"\") ? Username.Substring(Username.IndexOf(@"\") + 1) : Username; - existingUser = dbContext.Users.Find(username); - if (existingUser == null) - throw new ArgumentException(string.Format("Invalid User - Not In Disco DB: '{0}'", Username), "Username"); - else - return existingUser; - } - existingUser = dbContext.Users.Find(user.Id); - if (existingUser == null) - { - dbContext.Users.Add(user); - } - else - { - existingUser.UpdateSelf(user); - user = existingUser; - } - dbContext.SaveChanges(); - - return user; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; +using Disco.Data.Repository; +using Disco.Models.BI.Search; +using System.Runtime.InteropServices; +using System.DirectoryServices.ActiveDirectory; +using Disco.Services.Logging; + +namespace Disco.BI.UserBI +{ + public static class Utilities + { + + public static User LoadUser(DiscoDataContext dbContext, string Username) + { + // Machine Account ? + if (Username.EndsWith("$")) + { + return Interop.ActiveDirectory.ActiveDirectory.GetMachineAccount(Username).ToRepositoryUser(); + } + + // User Account + User user = null; + try + { + var ADUser = Interop.ActiveDirectory.ActiveDirectory.GetUserAccount(Username); + if (ADUser == null) + throw new ArgumentException(string.Format("Invalid Username: '{0}'", Username), "Username"); + user = ADUser.ToRepositoryUser(); + } + catch (COMException ex) + { + // If "Server is not operational" then Try Cache + if (ex.ErrorCode != -2147016646) + { + throw ex; + } + SystemLog.LogException("Primary Domain Controller Down? Disco.BI.UserBI.Utilities.LoadUser", ex); + } + catch (ActiveDirectoryOperationException ex) + { + // Try From Cache... + SystemLog.LogException("Primary Domain Controller Down? Disco.BI.UserBI.Utilities.LoadUser", ex); + } + + // Update Repository + User existingUser; + if (user == null) + { + string username = Username.Contains(@"\") ? Username.Substring(Username.IndexOf(@"\") + 1) : Username; + existingUser = dbContext.Users.Find(username); + if (existingUser == null) + throw new ArgumentException(string.Format("Invalid User - Not In Disco DB: '{0}'", Username), "Username"); + else + return existingUser; + } + existingUser = dbContext.Users.Find(user.Id); + if (existingUser == null) + { + dbContext.Users.Add(user); + } + else + { + existingUser.UpdateSelf(user); + user = existingUser; + } + dbContext.SaveChanges(); + + return user; + } + + } +} diff --git a/Disco.BI/BI/Wireless/BaseWirelessProvider.cs b/Disco.BI/BI/Wireless/BaseWirelessProvider.cs index dc4efa20..8c7ff795 100644 --- a/Disco.BI/BI/Wireless/BaseWirelessProvider.cs +++ b/Disco.BI/BI/Wireless/BaseWirelessProvider.cs @@ -1,83 +1,83 @@ -using Disco.BI.Wireless.eduSTAR; -using Disco.Data.Configuration; -using Disco.Data.Repository; -using Disco.BI.Extensions; -using Disco.Models.Repository; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Linq.Expressions; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Threading; -namespace Disco.BI.Wireless -{ - public abstract class BaseWirelessProvider - { - protected DiscoDataContext dbContext; - private static object _CertificateAllocateLock = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(new object()); - public static BaseWirelessProvider GetProvider(DiscoDataContext dbContext) - { - string provider = dbContext.DiscoConfiguration.Wireless.Provider; - if (provider == "eduSTAR") - { - return new eduSTARWirelessProvider(dbContext); - } - throw new System.NotSupportedException(string.Format("Wireless Provider Not Supported: '{0}'", dbContext.DiscoConfiguration.Wireless.Provider)); - } - protected BaseWirelessProvider(DiscoDataContext dbContext) - { - this.dbContext = dbContext; - } - private DeviceCertificate CertificateAllocate(ref Device repoDevice) - { - lock (BaseWirelessProvider._CertificateAllocateLock) - { - this.FillCertificateAutoBuffer(); - int timeout = 60; - int freeCertCount = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == null && c.Enabled).Count(); - while (!(freeCertCount > 0 | timeout <= 0)) - { - System.Threading.Thread.Sleep(500); - freeCertCount = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == null && c.Enabled).Count(); - timeout--; - } - DeviceCertificate cert = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == null && c.Enabled).FirstOrDefault(); - if (cert == null) - { - WirelessCertificatesLog.LogAllocationFailed(repoDevice.SerialNumber); - throw new System.InvalidOperationException("Unable to Allocate a Wireless Certificate"); - } - WirelessCertificatesLog.LogAllocated(cert.Name, repoDevice.SerialNumber); - cert.DeviceSerialNumber = repoDevice.SerialNumber; - cert.AllocatedDate = System.DateTime.Now; - this.dbContext.SaveChanges(); - return cert; - } - } - public DeviceCertificate Enrol(Device repoDevice) - { - DeviceCertificate allocatedCert = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == repoDevice.SerialNumber && c.Enabled).FirstOrDefault(); - if (allocatedCert != null) - { - return allocatedCert; - } - - // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. - //if (repoDevice.DeviceProfile.Configuration(this.dbContext).AllocateWirelessCertificate) - if (repoDevice.DeviceProfile.AllocateCertificate) - { - allocatedCert = this.CertificateAllocate(ref repoDevice); - return allocatedCert; - } - else - { - return null; - } - } - protected abstract void FillCertificateAutoBuffer(); - public abstract void FillCertificateBuffer(int Amount); - public abstract System.Collections.Generic.List RemoveExistingCertificateNames(); - } -} +using Disco.BI.Wireless.eduSTAR; +using Disco.Data.Configuration; +using Disco.Data.Repository; +using Disco.BI.Extensions; +using Disco.Models.Repository; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Threading; +namespace Disco.BI.Wireless +{ + public abstract class BaseWirelessProvider + { + protected DiscoDataContext dbContext; + private static object _CertificateAllocateLock = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(new object()); + public static BaseWirelessProvider GetProvider(DiscoDataContext dbContext) + { + string provider = dbContext.DiscoConfiguration.Wireless.Provider; + if (provider == "eduSTAR") + { + return new eduSTARWirelessProvider(dbContext); + } + throw new System.NotSupportedException(string.Format("Wireless Provider Not Supported: '{0}'", dbContext.DiscoConfiguration.Wireless.Provider)); + } + protected BaseWirelessProvider(DiscoDataContext dbContext) + { + this.dbContext = dbContext; + } + private DeviceCertificate CertificateAllocate(ref Device repoDevice) + { + lock (BaseWirelessProvider._CertificateAllocateLock) + { + this.FillCertificateAutoBuffer(); + int timeout = 60; + int freeCertCount = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == null && c.Enabled).Count(); + while (!(freeCertCount > 0 | timeout <= 0)) + { + System.Threading.Thread.Sleep(500); + freeCertCount = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == null && c.Enabled).Count(); + timeout--; + } + DeviceCertificate cert = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == null && c.Enabled).FirstOrDefault(); + if (cert == null) + { + WirelessCertificatesLog.LogAllocationFailed(repoDevice.SerialNumber); + throw new System.InvalidOperationException("Unable to Allocate a Wireless Certificate"); + } + WirelessCertificatesLog.LogAllocated(cert.Name, repoDevice.SerialNumber); + cert.DeviceSerialNumber = repoDevice.SerialNumber; + cert.AllocatedDate = System.DateTime.Now; + this.dbContext.SaveChanges(); + return cert; + } + } + public DeviceCertificate Enrol(Device repoDevice) + { + DeviceCertificate allocatedCert = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == repoDevice.SerialNumber && c.Enabled).FirstOrDefault(); + if (allocatedCert != null) + { + return allocatedCert; + } + + // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. + //if (repoDevice.DeviceProfile.Configuration(this.dbContext).AllocateWirelessCertificate) + if (repoDevice.DeviceProfile.AllocateCertificate) + { + allocatedCert = this.CertificateAllocate(ref repoDevice); + return allocatedCert; + } + else + { + return null; + } + } + protected abstract void FillCertificateAutoBuffer(); + public abstract void FillCertificateBuffer(int Amount); + public abstract System.Collections.Generic.List RemoveExistingCertificateNames(); + } +} diff --git a/Disco.BI/BI/Wireless/WirelessCertificatesLog.cs b/Disco.BI/BI/Wireless/WirelessCertificatesLog.cs index 78ab679e..f39bcb99 100644 --- a/Disco.BI/BI/Wireless/WirelessCertificatesLog.cs +++ b/Disco.BI/BI/Wireless/WirelessCertificatesLog.cs @@ -1,304 +1,304 @@ -using Disco.Logging; -using Disco.Logging.Models; -using System; -using System.Collections.Generic; -using System.Diagnostics; -namespace Disco.BI.Wireless -{ - public class WirelessCertificatesLog : LogBase - { - public enum EventTypeIds - { - RetrievalStarting = 10, - RetrievalProgress, - RetrievalFinished, - RetrievalWarning = 15, - RetrievalError, - RetrievalCertificateStarting = 20, - RetrievalCertificateFinished = 22, - RetrievalCertificateWarning = 25, - RetrievalCertificateError, - Allocated = 40, - AllocationFailed = 50 - } - private const int _ModuleId = 60; - private static bool _IsCertificateRetrievalProcessing; - private static string _CertificateRetrievalStatus; - private static int _CertificateRetrievalProgress; - public static WirelessCertificatesLog Current - { - get - { - return (WirelessCertificatesLog)LogContext.LogModules[60]; - } - } - public static bool IsCertificateRetrievalProcessing - { - get - { - return WirelessCertificatesLog._IsCertificateRetrievalProcessing; - } - } - public override string ModuleDescription - { - get - { - return "Wireless Certificates"; - } - } - public override int ModuleId - { - get - { - return 60; - } - } - public override string ModuleName - { - get - { - return "WirelessCertificates"; - } - } - [System.Diagnostics.DebuggerNonUserCode] - public WirelessCertificatesLog() - { - } - private static void Log(WirelessCertificatesLog.EventTypeIds EventTypeId, params object[] Args) - { - WirelessCertificatesLog.Current.Log((int)EventTypeId, Args); - } - public static void LogRetrievalStarting(int CertificateCount, int CertificateIdFrom, int CertificateIdTo) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalStarting, new object[] - { - CertificateCount, - CertificateIdFrom, - CertificateIdTo - }); - } - public static void LogRetrievalFinished() - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalFinished, new object[0]); - } - public static void LogRetrievalWarning(string Message) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalWarning, new object[] - { - Message - }); - } - public static void LogRetrievalError(string Message) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalError, new object[] - { - Message - }); - } - public static void LogRetrievalCertificateStarting(string CertificateId) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalCertificateStarting, new object[] - { - CertificateId - }); - } - public static void LogRetrievalCertificateFinished(string CertificateId) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalCertificateFinished, new object[] - { - CertificateId - }); - } - public static void LogRetrievalCertificateWarning(string CertificateId, string Message) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalCertificateWarning, new object[] - { - CertificateId, - Message - }); - } - public static void LogRetrievalCertificateError(string CertificateId, string Message) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalCertificateError, new object[] - { - CertificateId, - Message - }); - } - public static void LogAllocated(string CertificateId, string DeviceSerialNumber) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.Allocated, new object[] - { - CertificateId, - DeviceSerialNumber - }); - } - public static void LogAllocationFailed(string DeviceSerialNumber) - { - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.AllocationFailed, new object[] - { - DeviceSerialNumber - }); - } - public static void LogCertificateRetrievalProgress(bool? IsProcessing, int? Progress, string Status) - { - bool flag = IsProcessing.HasValue; - if (flag) - { - WirelessCertificatesLog._IsCertificateRetrievalProcessing = IsProcessing.Value; - } - flag = WirelessCertificatesLog._IsCertificateRetrievalProcessing; - if (flag) - { - bool flag2 = Status != null; - if (flag2) - { - WirelessCertificatesLog._CertificateRetrievalStatus = Status; - } - flag2 = Progress.HasValue; - if (flag2) - { - WirelessCertificatesLog._CertificateRetrievalProgress = Progress.Value; - } - } - else - { - WirelessCertificatesLog._CertificateRetrievalStatus = null; - WirelessCertificatesLog._CertificateRetrievalProgress = 0; - } - WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalProgress, new object[] - { - WirelessCertificatesLog._IsCertificateRetrievalProcessing, - WirelessCertificatesLog._CertificateRetrievalProgress, - WirelessCertificatesLog._CertificateRetrievalStatus - }); - } - protected override System.Collections.Generic.List LoadEventTypes() - { - return new System.Collections.Generic.List - { - new LogEventType - { - Id = 10, - ModuleId = 60, - Name = "Retrieval Starting", - Format = "Starting retrieval of {0} certificate/s ({1} to {2})", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 11, - ModuleId = 60, - Name = "Retrieval Progress", - Format = "Processing: {0}; {1}% Complete; Status: {2}", - Severity = 0, - UseLive = true, - UsePersist = false, - UseDisplay = false - }, - new LogEventType - { - Id = 12, - ModuleId = 60, - Name = "Retrieval Finished", - Format = "Retrieval of Certificates Complete", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 15, - ModuleId = 60, - Name = "Retrieval Warning", - Format = "Retrieval Warning: {0}", - Severity = 1, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 16, - ModuleId = 60, - Name = "Retrieval Error", - Format = "Retrieval Error: {0}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 20, - ModuleId = 60, - Name = "Retrieval Certificate Starting", - Format = "Retrieving Certificate: {0}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 22, - ModuleId = 60, - Name = "Retrieval Certificate Finished", - Format = "Certificate Retrieved: {0}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 25, - ModuleId = 60, - Name = "Retrieval Certificate Warning", - Format = "{0} Certificate Warning: {1}", - Severity = 1, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 26, - ModuleId = 60, - Name = "Retrieval Certificate Error", - Format = "{0} Certificate Error: {1}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 40, - ModuleId = 60, - Name = "Allocated", - Format = "Certificate {0} allocated to {1}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 50, - ModuleId = 60, - Name = "Allocation Failed", - Format = "No certificates available for Device: {0}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - } - }; - } - } -} +using Disco.Logging; +using Disco.Logging.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +namespace Disco.BI.Wireless +{ + public class WirelessCertificatesLog : LogBase + { + public enum EventTypeIds + { + RetrievalStarting = 10, + RetrievalProgress, + RetrievalFinished, + RetrievalWarning = 15, + RetrievalError, + RetrievalCertificateStarting = 20, + RetrievalCertificateFinished = 22, + RetrievalCertificateWarning = 25, + RetrievalCertificateError, + Allocated = 40, + AllocationFailed = 50 + } + private const int _ModuleId = 60; + private static bool _IsCertificateRetrievalProcessing; + private static string _CertificateRetrievalStatus; + private static int _CertificateRetrievalProgress; + public static WirelessCertificatesLog Current + { + get + { + return (WirelessCertificatesLog)LogContext.LogModules[60]; + } + } + public static bool IsCertificateRetrievalProcessing + { + get + { + return WirelessCertificatesLog._IsCertificateRetrievalProcessing; + } + } + public override string ModuleDescription + { + get + { + return "Wireless Certificates"; + } + } + public override int ModuleId + { + get + { + return 60; + } + } + public override string ModuleName + { + get + { + return "WirelessCertificates"; + } + } + [System.Diagnostics.DebuggerNonUserCode] + public WirelessCertificatesLog() + { + } + private static void Log(WirelessCertificatesLog.EventTypeIds EventTypeId, params object[] Args) + { + WirelessCertificatesLog.Current.Log((int)EventTypeId, Args); + } + public static void LogRetrievalStarting(int CertificateCount, int CertificateIdFrom, int CertificateIdTo) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalStarting, new object[] + { + CertificateCount, + CertificateIdFrom, + CertificateIdTo + }); + } + public static void LogRetrievalFinished() + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalFinished, new object[0]); + } + public static void LogRetrievalWarning(string Message) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalWarning, new object[] + { + Message + }); + } + public static void LogRetrievalError(string Message) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalError, new object[] + { + Message + }); + } + public static void LogRetrievalCertificateStarting(string CertificateId) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalCertificateStarting, new object[] + { + CertificateId + }); + } + public static void LogRetrievalCertificateFinished(string CertificateId) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalCertificateFinished, new object[] + { + CertificateId + }); + } + public static void LogRetrievalCertificateWarning(string CertificateId, string Message) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalCertificateWarning, new object[] + { + CertificateId, + Message + }); + } + public static void LogRetrievalCertificateError(string CertificateId, string Message) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalCertificateError, new object[] + { + CertificateId, + Message + }); + } + public static void LogAllocated(string CertificateId, string DeviceSerialNumber) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.Allocated, new object[] + { + CertificateId, + DeviceSerialNumber + }); + } + public static void LogAllocationFailed(string DeviceSerialNumber) + { + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.AllocationFailed, new object[] + { + DeviceSerialNumber + }); + } + public static void LogCertificateRetrievalProgress(bool? IsProcessing, int? Progress, string Status) + { + bool flag = IsProcessing.HasValue; + if (flag) + { + WirelessCertificatesLog._IsCertificateRetrievalProcessing = IsProcessing.Value; + } + flag = WirelessCertificatesLog._IsCertificateRetrievalProcessing; + if (flag) + { + bool flag2 = Status != null; + if (flag2) + { + WirelessCertificatesLog._CertificateRetrievalStatus = Status; + } + flag2 = Progress.HasValue; + if (flag2) + { + WirelessCertificatesLog._CertificateRetrievalProgress = Progress.Value; + } + } + else + { + WirelessCertificatesLog._CertificateRetrievalStatus = null; + WirelessCertificatesLog._CertificateRetrievalProgress = 0; + } + WirelessCertificatesLog.Log(WirelessCertificatesLog.EventTypeIds.RetrievalProgress, new object[] + { + WirelessCertificatesLog._IsCertificateRetrievalProcessing, + WirelessCertificatesLog._CertificateRetrievalProgress, + WirelessCertificatesLog._CertificateRetrievalStatus + }); + } + protected override System.Collections.Generic.List LoadEventTypes() + { + return new System.Collections.Generic.List + { + new LogEventType + { + Id = 10, + ModuleId = 60, + Name = "Retrieval Starting", + Format = "Starting retrieval of {0} certificate/s ({1} to {2})", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 11, + ModuleId = 60, + Name = "Retrieval Progress", + Format = "Processing: {0}; {1}% Complete; Status: {2}", + Severity = 0, + UseLive = true, + UsePersist = false, + UseDisplay = false + }, + new LogEventType + { + Id = 12, + ModuleId = 60, + Name = "Retrieval Finished", + Format = "Retrieval of Certificates Complete", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 15, + ModuleId = 60, + Name = "Retrieval Warning", + Format = "Retrieval Warning: {0}", + Severity = 1, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 16, + ModuleId = 60, + Name = "Retrieval Error", + Format = "Retrieval Error: {0}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 20, + ModuleId = 60, + Name = "Retrieval Certificate Starting", + Format = "Retrieving Certificate: {0}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 22, + ModuleId = 60, + Name = "Retrieval Certificate Finished", + Format = "Certificate Retrieved: {0}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 25, + ModuleId = 60, + Name = "Retrieval Certificate Warning", + Format = "{0} Certificate Warning: {1}", + Severity = 1, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 26, + ModuleId = 60, + Name = "Retrieval Certificate Error", + Format = "{0} Certificate Error: {1}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 40, + ModuleId = 60, + Name = "Allocated", + Format = "Certificate {0} allocated to {1}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 50, + ModuleId = 60, + Name = "Allocation Failed", + Format = "No certificates available for Device: {0}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + } + }; + } + } +} diff --git a/Disco.BI/BI/Wireless/eduSTAR/eduSTARWirelessProvider.cs b/Disco.BI/BI/Wireless/eduSTAR/eduSTARWirelessProvider.cs index fa30817f..e5ccea4a 100644 --- a/Disco.BI/BI/Wireless/eduSTAR/eduSTARWirelessProvider.cs +++ b/Disco.BI/BI/Wireless/eduSTAR/eduSTARWirelessProvider.cs @@ -1,283 +1,283 @@ -using Disco.BI.Wireless.eduSTAR.eduSTARWirelessCertService; -using Disco.Data.Repository; -using Disco.Models.Repository; -using Ionic.Zip; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Linq.Expressions; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Security.Cryptography.X509Certificates; -using System.ServiceModel; -using System.ServiceModel.Channels; -using System.Threading; - -namespace Disco.BI.Wireless.eduSTAR -{ - public class eduSTARWirelessProvider : BaseWirelessProvider - { - private class BulkLoadCertificatesContract - { - public int Start { get; set; } - public int Count { get; set; } - } - private static object _BulkLoadThreadLock = new object(); - private static System.Threading.Thread _BulkLoadThread; - public eduSTARWirelessProvider(DiscoDataContext dbContext) - : base(dbContext) - { - } - protected override void FillCertificateAutoBuffer() - { - int freeCertCount = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == null && c.Enabled).Count(); - if (freeCertCount <= this.dbContext.DiscoConfiguration.Wireless.CertificateAutoBufferLow) - { - this.BulkLoadCertificates(0); - } - } - public override void FillCertificateBuffer(int Amount) - { - this.BulkLoadCertificates(Amount); - } - public override System.Collections.Generic.List RemoveExistingCertificateNames() - { - return new System.Collections.Generic.List - { - "(eduPaSS)", - "(CN=Computers, ?DC=services, ?DC=education, ?DC=vic, ?DC=gov, ?DC=au)" - }; - } - private void BulkLoadCertificates(int Amount = 0) - { - if (eduSTARWirelessProvider._BulkLoadThread == null) - { - lock (eduSTARWirelessProvider._BulkLoadThreadLock) - { - if (eduSTARWirelessProvider._BulkLoadThread == null) - { - int start = 0; - if (this.dbContext.DeviceCertificates.Count() > 0) - { - start = this.dbContext.DeviceCertificates.Max(c => c.ProviderIndex) + 1; - } - int buffer = this.dbContext.DeviceCertificates.Count(c => c.DeviceSerialNumber == null && c.Enabled); - int count = this.dbContext.DiscoConfiguration.Wireless.CertificateAutoBufferMax - buffer; - if (Amount > 0) - { - count = Amount; - } - if (count > 0) - { - eduSTARWirelessProvider.BulkLoadCertificatesContract contract = new eduSTARWirelessProvider.BulkLoadCertificatesContract - { - Start = start, - Count = count - }; - System.Threading.ParameterizedThreadStart threadStart = delegate(object a0) - { - this.BulkLoadCertificatesStart((eduSTARWirelessProvider.BulkLoadCertificatesContract)a0); - } - ; - eduSTARWirelessProvider._BulkLoadThread = new System.Threading.Thread(threadStart); - eduSTARWirelessProvider._BulkLoadThread.Start(contract); - } - } - } - } - } - private void BulkLoadCertificatesStart(eduSTARWirelessProvider.BulkLoadCertificatesContract contract) - { - try - { - WirelessCertificatesLog.LogRetrievalStarting(contract.Count, contract.Start, contract.Start + contract.Count - 1); - WirelessCertificatesLog.LogCertificateRetrievalProgress(true, 0, string.Format("Starting Bulk Retrieval (Loading {0} Certificate/s)", contract.Count)); - DiscoDataContext dbLocalContext = new DiscoDataContext(); - try - { - WirelessCertServiceSoapClient proxy = this.GetProxy(); - try - { - int num = contract.Start + contract.Count - 1; - int index = contract.Start; - while (true) - { - int num2 = num; - if (index > num2) - { - break; - } - WirelessCertificatesLog.LogCertificateRetrievalProgress(true, (int)System.Math.Round(unchecked(((double)checked(index - contract.Start) + 0.5) / (double)contract.Count * 100.0)), string.Format("Retrieving Certificate {0} of {1}", index - contract.Start + 1, contract.Count)); - DeviceCertificate cert = this.LoadCertificate(index, proxy, dbLocalContext); - dbLocalContext.DeviceCertificates.Add(cert); - dbLocalContext.SaveChanges(); - WirelessCertificatesLog.LogRetrievalCertificateFinished(cert.Name); - index++; - } - } - finally - { - bool flag = proxy != null; - if (flag) - { - ((System.IDisposable)proxy).Dispose(); - } - } - } - finally - { - bool flag = dbLocalContext != null; - if (flag) - { - ((System.IDisposable)dbLocalContext).Dispose(); - } - } - } - catch (System.Exception ex) - { - WirelessCertificatesLog.LogRetrievalError(string.Format("[{0}] {1}", ex.GetType().Name, ex.Message)); - throw ex; - } - finally - { - lock (eduSTARWirelessProvider._BulkLoadThreadLock) - { - eduSTARWirelessProvider._BulkLoadThread = null; - } - WirelessCertificatesLog.LogRetrievalFinished(); - WirelessCertificatesLog.LogCertificateRetrievalProgress(false, null, null); - } - } - private DeviceCertificate LoadCertificate(int Index, DiscoDataContext dbContext) - { - DeviceCertificate LoadCertificate; - try - { - WirelessCertServiceSoapClient proxy = this.GetProxy(); - try - { - LoadCertificate = this.LoadCertificate(Index, proxy, dbContext); - } - finally - { - bool flag = proxy != null; - if (flag) - { - ((System.IDisposable)proxy).Dispose(); - } - } - } - catch (System.Exception ex) - { - WirelessCertificatesLog.LogRetrievalCertificateError(Index.ToString(), string.Format("[{0}] {1}", ex.GetType().Name, ex.Message)); - throw ex; - } - return LoadCertificate; - } - private DeviceCertificate LoadCertificate(int Index, WirelessCertServiceSoapClient Proxy, DiscoDataContext dbContext) - { - bool flag = string.IsNullOrWhiteSpace(dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountSchoolId); - if (flag) - { - throw new System.ArgumentException("Wireless Certificates: Invalid ServiceAccount SchoolId"); - } - flag = string.IsNullOrWhiteSpace(dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountUsername); - if (flag) - { - throw new System.ArgumentException("Wireless Certificates: Invalid ServiceAccount Username"); - } - flag = string.IsNullOrWhiteSpace(dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountPassword); - if (flag) - { - throw new System.ArgumentException("Wireless Certificates: Invalid ServiceAccount Password"); - } - DeviceCertificate cert = new DeviceCertificate - { - ProviderIndex = Index, - Name = string.Format("{0}-{1}", dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountSchoolId, Index.ToString("00000")), - Enabled = true - }; - WirelessCertificatesLog.LogRetrievalCertificateStarting(cert.Name); - string response; - try - { - response = Proxy.GetWirelessCert(dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountSchoolId, cert.Name, "password", dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountUsername, dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountPassword); - } - catch (System.Exception ex) - { - WirelessCertificatesLog.LogRetrievalCertificateError(cert.Name, ex.Message); - throw ex; - } - try - { - byte[] responseBytes = System.Convert.FromBase64String(response); - System.IO.MemoryStream responseByteStream = new System.IO.MemoryStream(responseBytes); - try - { - ZipFile responseZip = ZipFile.Read(responseByteStream); - ZipEntry certFile = responseZip.FirstOrDefault((ZipEntry ze) => ze.FileName.EndsWith(".pfx", System.StringComparison.InvariantCultureIgnoreCase)); - System.IO.MemoryStream certByteStream = new System.IO.MemoryStream(); - try - { - certFile.Extract(certByteStream); - cert.Content = certByteStream.ToArray(); - } - finally - { - flag = (certByteStream != null); - if (flag) - { - ((System.IDisposable)certByteStream).Dispose(); - } - } - } - finally - { - flag = (responseByteStream != null); - if (flag) - { - ((System.IDisposable)responseByteStream).Dispose(); - } - } - } - catch (System.Exception ex2) - { - if (response.Contains("Computer with this name already exists")) - { - WirelessCertificatesLog.LogRetrievalCertificateWarning(cert.Name, "Already exists on eduSTAR server, disabling and skipping."); - cert.ExpirationDate = System.DateTime.Now; - cert.Enabled = false; - cert.Content = null; - return cert; - } - throw new System.InvalidOperationException(string.Format("Unable to Uncompress (Server returned: {0})", response), ex2); - } - try - { - X509Certificate2 x509Cert = new X509Certificate2(cert.Content, "password"); - cert.ExpirationDate = x509Cert.NotAfter; - } - catch (System.Exception ex3) - { - throw new System.InvalidOperationException("Invalid Certificate returned by Server", ex3); - } - return cert; - } - private WirelessCertServiceSoapClient GetProxy() - { - BasicHttpBinding binding = new BasicHttpBinding(); - - // Don't Use Proxy - binding.UseDefaultWebProxy = false; - binding.ProxyAddress = null; - - binding.Security.Mode = BasicHttpSecurityMode.Transport; - binding.MaxReceivedMessageSize = 524288L; - binding.ReaderQuotas.MaxStringContentLength = 524288; - EndpointAddress endpointAddress = new EndpointAddress(new Uri("https://www.eduweb.vic.gov.au/edustar/WirelessCertWS/wirelesscertws.asmx"), new AddressHeader[0]); - return new WirelessCertServiceSoapClient(binding, endpointAddress); - } - } -} +using Disco.BI.Wireless.eduSTAR.eduSTARWirelessCertService; +using Disco.Data.Repository; +using Disco.Models.Repository; +using Ionic.Zip; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Security.Cryptography.X509Certificates; +using System.ServiceModel; +using System.ServiceModel.Channels; +using System.Threading; + +namespace Disco.BI.Wireless.eduSTAR +{ + public class eduSTARWirelessProvider : BaseWirelessProvider + { + private class BulkLoadCertificatesContract + { + public int Start { get; set; } + public int Count { get; set; } + } + private static object _BulkLoadThreadLock = new object(); + private static System.Threading.Thread _BulkLoadThread; + public eduSTARWirelessProvider(DiscoDataContext dbContext) + : base(dbContext) + { + } + protected override void FillCertificateAutoBuffer() + { + int freeCertCount = this.dbContext.DeviceCertificates.Where(c => c.DeviceSerialNumber == null && c.Enabled).Count(); + if (freeCertCount <= this.dbContext.DiscoConfiguration.Wireless.CertificateAutoBufferLow) + { + this.BulkLoadCertificates(0); + } + } + public override void FillCertificateBuffer(int Amount) + { + this.BulkLoadCertificates(Amount); + } + public override System.Collections.Generic.List RemoveExistingCertificateNames() + { + return new System.Collections.Generic.List + { + "(eduPaSS)", + "(CN=Computers, ?DC=services, ?DC=education, ?DC=vic, ?DC=gov, ?DC=au)" + }; + } + private void BulkLoadCertificates(int Amount = 0) + { + if (eduSTARWirelessProvider._BulkLoadThread == null) + { + lock (eduSTARWirelessProvider._BulkLoadThreadLock) + { + if (eduSTARWirelessProvider._BulkLoadThread == null) + { + int start = 0; + if (this.dbContext.DeviceCertificates.Count() > 0) + { + start = this.dbContext.DeviceCertificates.Max(c => c.ProviderIndex) + 1; + } + int buffer = this.dbContext.DeviceCertificates.Count(c => c.DeviceSerialNumber == null && c.Enabled); + int count = this.dbContext.DiscoConfiguration.Wireless.CertificateAutoBufferMax - buffer; + if (Amount > 0) + { + count = Amount; + } + if (count > 0) + { + eduSTARWirelessProvider.BulkLoadCertificatesContract contract = new eduSTARWirelessProvider.BulkLoadCertificatesContract + { + Start = start, + Count = count + }; + System.Threading.ParameterizedThreadStart threadStart = delegate(object a0) + { + this.BulkLoadCertificatesStart((eduSTARWirelessProvider.BulkLoadCertificatesContract)a0); + } + ; + eduSTARWirelessProvider._BulkLoadThread = new System.Threading.Thread(threadStart); + eduSTARWirelessProvider._BulkLoadThread.Start(contract); + } + } + } + } + } + private void BulkLoadCertificatesStart(eduSTARWirelessProvider.BulkLoadCertificatesContract contract) + { + try + { + WirelessCertificatesLog.LogRetrievalStarting(contract.Count, contract.Start, contract.Start + contract.Count - 1); + WirelessCertificatesLog.LogCertificateRetrievalProgress(true, 0, string.Format("Starting Bulk Retrieval (Loading {0} Certificate/s)", contract.Count)); + DiscoDataContext dbLocalContext = new DiscoDataContext(); + try + { + WirelessCertServiceSoapClient proxy = this.GetProxy(); + try + { + int num = contract.Start + contract.Count - 1; + int index = contract.Start; + while (true) + { + int num2 = num; + if (index > num2) + { + break; + } + WirelessCertificatesLog.LogCertificateRetrievalProgress(true, (int)System.Math.Round(unchecked(((double)checked(index - contract.Start) + 0.5) / (double)contract.Count * 100.0)), string.Format("Retrieving Certificate {0} of {1}", index - contract.Start + 1, contract.Count)); + DeviceCertificate cert = this.LoadCertificate(index, proxy, dbLocalContext); + dbLocalContext.DeviceCertificates.Add(cert); + dbLocalContext.SaveChanges(); + WirelessCertificatesLog.LogRetrievalCertificateFinished(cert.Name); + index++; + } + } + finally + { + bool flag = proxy != null; + if (flag) + { + ((System.IDisposable)proxy).Dispose(); + } + } + } + finally + { + bool flag = dbLocalContext != null; + if (flag) + { + ((System.IDisposable)dbLocalContext).Dispose(); + } + } + } + catch (System.Exception ex) + { + WirelessCertificatesLog.LogRetrievalError(string.Format("[{0}] {1}", ex.GetType().Name, ex.Message)); + throw ex; + } + finally + { + lock (eduSTARWirelessProvider._BulkLoadThreadLock) + { + eduSTARWirelessProvider._BulkLoadThread = null; + } + WirelessCertificatesLog.LogRetrievalFinished(); + WirelessCertificatesLog.LogCertificateRetrievalProgress(false, null, null); + } + } + private DeviceCertificate LoadCertificate(int Index, DiscoDataContext dbContext) + { + DeviceCertificate LoadCertificate; + try + { + WirelessCertServiceSoapClient proxy = this.GetProxy(); + try + { + LoadCertificate = this.LoadCertificate(Index, proxy, dbContext); + } + finally + { + bool flag = proxy != null; + if (flag) + { + ((System.IDisposable)proxy).Dispose(); + } + } + } + catch (System.Exception ex) + { + WirelessCertificatesLog.LogRetrievalCertificateError(Index.ToString(), string.Format("[{0}] {1}", ex.GetType().Name, ex.Message)); + throw ex; + } + return LoadCertificate; + } + private DeviceCertificate LoadCertificate(int Index, WirelessCertServiceSoapClient Proxy, DiscoDataContext dbContext) + { + bool flag = string.IsNullOrWhiteSpace(dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountSchoolId); + if (flag) + { + throw new System.ArgumentException("Wireless Certificates: Invalid ServiceAccount SchoolId"); + } + flag = string.IsNullOrWhiteSpace(dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountUsername); + if (flag) + { + throw new System.ArgumentException("Wireless Certificates: Invalid ServiceAccount Username"); + } + flag = string.IsNullOrWhiteSpace(dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountPassword); + if (flag) + { + throw new System.ArgumentException("Wireless Certificates: Invalid ServiceAccount Password"); + } + DeviceCertificate cert = new DeviceCertificate + { + ProviderIndex = Index, + Name = string.Format("{0}-{1}", dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountSchoolId, Index.ToString("00000")), + Enabled = true + }; + WirelessCertificatesLog.LogRetrievalCertificateStarting(cert.Name); + string response; + try + { + response = Proxy.GetWirelessCert(dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountSchoolId, cert.Name, "password", dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountUsername, dbContext.DiscoConfiguration.Wireless.eduSTAR_ServiceAccountPassword); + } + catch (System.Exception ex) + { + WirelessCertificatesLog.LogRetrievalCertificateError(cert.Name, ex.Message); + throw ex; + } + try + { + byte[] responseBytes = System.Convert.FromBase64String(response); + System.IO.MemoryStream responseByteStream = new System.IO.MemoryStream(responseBytes); + try + { + ZipFile responseZip = ZipFile.Read(responseByteStream); + ZipEntry certFile = responseZip.FirstOrDefault((ZipEntry ze) => ze.FileName.EndsWith(".pfx", System.StringComparison.InvariantCultureIgnoreCase)); + System.IO.MemoryStream certByteStream = new System.IO.MemoryStream(); + try + { + certFile.Extract(certByteStream); + cert.Content = certByteStream.ToArray(); + } + finally + { + flag = (certByteStream != null); + if (flag) + { + ((System.IDisposable)certByteStream).Dispose(); + } + } + } + finally + { + flag = (responseByteStream != null); + if (flag) + { + ((System.IDisposable)responseByteStream).Dispose(); + } + } + } + catch (System.Exception ex2) + { + if (response.Contains("Computer with this name already exists")) + { + WirelessCertificatesLog.LogRetrievalCertificateWarning(cert.Name, "Already exists on eduSTAR server, disabling and skipping."); + cert.ExpirationDate = System.DateTime.Now; + cert.Enabled = false; + cert.Content = null; + return cert; + } + throw new System.InvalidOperationException(string.Format("Unable to Uncompress (Server returned: {0})", response), ex2); + } + try + { + X509Certificate2 x509Cert = new X509Certificate2(cert.Content, "password"); + cert.ExpirationDate = x509Cert.NotAfter; + } + catch (System.Exception ex3) + { + throw new System.InvalidOperationException("Invalid Certificate returned by Server", ex3); + } + return cert; + } + private WirelessCertServiceSoapClient GetProxy() + { + BasicHttpBinding binding = new BasicHttpBinding(); + + // Don't Use Proxy + binding.UseDefaultWebProxy = false; + binding.ProxyAddress = null; + + binding.Security.Mode = BasicHttpSecurityMode.Transport; + binding.MaxReceivedMessageSize = 524288L; + binding.ReaderQuotas.MaxStringContentLength = 524288; + EndpointAddress endpointAddress = new EndpointAddress(new Uri("https://www.eduweb.vic.gov.au/edustar/WirelessCertWS/wirelesscertws.asmx"), new AddressHeader[0]); + return new WirelessCertServiceSoapClient(binding, endpointAddress); + } + } +} diff --git a/Disco.BI/Properties/Resources.Designer.cs b/Disco.BI/Properties/Resources.Designer.cs index 0f01f133..6878efb3 100644 --- a/Disco.BI/Properties/Resources.Designer.cs +++ b/Disco.BI/Properties/Resources.Designer.cs @@ -1,113 +1,113 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Disco.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap MimeType_doc48 { - get { - object obj = ResourceManager.GetObject("MimeType_doc48", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap MimeType_img16 { - get { - object obj = ResourceManager.GetObject("MimeType_img16", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap MimeType_pdf16 { - get { - object obj = ResourceManager.GetObject("MimeType_pdf16", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap MimeType_pdf48 { - get { - object obj = ResourceManager.GetObject("MimeType_pdf48", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap MimeType_unknown48 { - get { - object obj = ResourceManager.GetObject("MimeType_unknown48", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Disco.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap MimeType_doc48 { + get { + object obj = ResourceManager.GetObject("MimeType_doc48", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap MimeType_img16 { + get { + object obj = ResourceManager.GetObject("MimeType_img16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap MimeType_pdf16 { + get { + object obj = ResourceManager.GetObject("MimeType_pdf16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap MimeType_pdf48 { + get { + object obj = ResourceManager.GetObject("MimeType_pdf48", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap MimeType_unknown48 { + get { + object obj = ResourceManager.GetObject("MimeType_unknown48", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Disco.BI/Properties/Resources.resx b/Disco.BI/Properties/Resources.resx index 7d09641a..0088f8e5 100644 --- a/Disco.BI/Properties/Resources.resx +++ b/Disco.BI/Properties/Resources.resx @@ -1,136 +1,136 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\MimeType-doc48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\MimeType-img16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\MimeType-pdf16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\MimeType-pdf48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\MimeType-unknown48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\MimeType-doc48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\MimeType-img16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\MimeType-pdf16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\MimeType-pdf48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\MimeType-unknown48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Disco.BI/app.config b/Disco.BI/app.config index 8fd131a9..cbdaf7eb 100644 --- a/Disco.BI/app.config +++ b/Disco.BI/app.config @@ -1,21 +1,21 @@ - - - - -
- - - - - - - - - - - - - - - + + + + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Disco.BI/packages.config b/Disco.BI/packages.config index 943dade1..c5ef15ef 100644 --- a/Disco.BI/packages.config +++ b/Disco.BI/packages.config @@ -1,9 +1,9 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/Disco.Client/App.config b/Disco.Client/App.config index 84bc4207..e95ce985 100644 --- a/Disco.Client/App.config +++ b/Disco.Client/App.config @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff --git a/Disco.Client/Disco.Client.csproj b/Disco.Client/Disco.Client.csproj index 1fbf985c..aa3d88d7 100644 --- a/Disco.Client/Disco.Client.csproj +++ b/Disco.Client/Disco.Client.csproj @@ -1,141 +1,141 @@ - - - - - Debug - AnyCPU - {D6B85A86-0FAA-4B04-BC9E-D01A08C03387} - Exe - Properties - Disco.Client - Disco.Client - v4.0 - 512 - Client - ..\ - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - Disco.Client.Program - - - OnOutputUpdated - - - Icon.ico - - - - Properties\app.manifest - - - - False - ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll - - - - - - - - - - - - - - Models\ClientServices\Enrol.cs - - - Models\ClientServices\EnrolResponse.cs - - - Models\ClientServices\MacEnrol.cs - - - Models\ClientServices\MacEnrolResponse.cs - - - Models\ClientServices\MacSecureEnrolResponse.cs - - - Models\ClientServices\ServiceBase.cs - - - Models\ClientServices\WhoAmI.cs - - - Models\ClientServices\WhoAmIResponse.cs - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - PreserveNewest - - - - - - - - - - - - - - - DEL "$(ProjectDir)Package Creation\PreparationClient.zip" -"$(ProjectDir)Package Creation\7z.exe" a -tzip "$(ProjectDir)Package Creation\PreparationClient.zip" "$(TargetDir)*.*" -x!*.tmp -x!*.vshost.* -x!Newtonsoft.Json.xml -x!*.pdb -COPY "$(ProjectDir)Package Creation\PreparationClient.zip" "$(ProjectDir)..\Disco.Web\ClientBin" - - - + + + + + Debug + AnyCPU + {D6B85A86-0FAA-4B04-BC9E-D01A08C03387} + Exe + Properties + Disco.Client + Disco.Client + v4.0 + 512 + Client + ..\ + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + Disco.Client.Program + + + OnOutputUpdated + + + Icon.ico + + + + Properties\app.manifest + + + + False + ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll + + + + + + + + + + + + + + Models\ClientServices\Enrol.cs + + + Models\ClientServices\EnrolResponse.cs + + + Models\ClientServices\MacEnrol.cs + + + Models\ClientServices\MacEnrolResponse.cs + + + Models\ClientServices\MacSecureEnrolResponse.cs + + + Models\ClientServices\ServiceBase.cs + + + Models\ClientServices\WhoAmI.cs + + + Models\ClientServices\WhoAmIResponse.cs + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + + + + + + + DEL "$(ProjectDir)Package Creation\PreparationClient.zip" +"$(ProjectDir)Package Creation\7z.exe" a -tzip "$(ProjectDir)Package Creation\PreparationClient.zip" "$(TargetDir)*.*" -x!*.tmp -x!*.vshost.* -x!Newtonsoft.Json.xml -x!*.pdb +COPY "$(ProjectDir)Package Creation\PreparationClient.zip" "$(ProjectDir)..\Disco.Web\ClientBin" + + + \ No newline at end of file diff --git a/Disco.Client/ErrorReporting.cs b/Disco.Client/ErrorReporting.cs index bb75bc37..44afd2a3 100644 --- a/Disco.Client/ErrorReporting.cs +++ b/Disco.Client/ErrorReporting.cs @@ -1,192 +1,192 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Text; -using Disco.Client.Extensions; -using Newtonsoft.Json; - -namespace Disco.Client -{ - public static class ErrorReporting - { - private const string ServicePathTemplate = "http://DISCO:9292/Services/Client/ClientError"; - public static string DeviceIdentifier { get; set; } - public static string EnrolmentSessionId { get; set; } - - public static void ReportError(Exception Ex, bool ReportToServer) - { - bool isClientServiceException = Ex is ClientServiceException; - - ErrorReport report = new ErrorReport() - { - DeviceIdentifier = DeviceIdentifier, - SessionId = EnrolmentSessionId, - JsonException = Ex.IntenseExceptionSerialization() - }; - - try - { - LogToFile(report); - } - catch (Exception) { } - - try - { - LogToEventLog(report); - } - catch (Exception) { } - - // Don't log server errors back to the server - if (!isClientServiceException && ReportToServer) - { - try - { - LogToServer(report); - } - catch (Exception) { } - } - - try - { - Presentation.WriteFatalError(Ex); - } - catch (Exception) { } - } - - #region Log Actions - - private static void LogToFile(ErrorReport report) - { - var logPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "ErrorLog.csv"); - - using (var streamWriter = File.AppendText(logPath)) - { - streamWriter.Write(DateTime.Now.ToString("s")); - streamWriter.Write(","); - streamWriter.Write(report.DeviceIdentifier); - streamWriter.Write(",\""); - streamWriter.Write(report.JsonException); - streamWriter.Write("\""); - streamWriter.Flush(); - } - } - private static void LogToEventLog(ErrorReport report) - { - string eventSource = "Disco Client"; - - if (!EventLog.SourceExists(eventSource)) - EventLog.CreateEventSource(eventSource, "Application"); - - EventLog.WriteEntry(eventSource, report.JsonException, EventLogEntryType.Error, 400); - } - private static void LogToServer(ErrorReport report) - { - string reportJson = JsonConvert.SerializeObject(report); - string reportResponse; - - HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(ServicePathTemplate); - request.UserAgent = string.Format("Disco-Client/{0}", Assembly.GetExecutingAssembly().GetName().Version.ToString(3)); - request.ContentType = "application/json"; - request.Method = WebRequestMethods.Http.Post; - request.UseDefaultCredentials = true; - request.Timeout = 300000; // 5 Minutes - - using (StreamWriter requestWriter = new StreamWriter(request.GetRequestStream())) - { - requestWriter.Write(reportJson); - } - - using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) - { - using (StreamReader responseReader = new StreamReader(response.GetResponseStream())) - { - reportResponse = responseReader.ReadToEnd(); - } - } - - System.Diagnostics.Debug.WriteLine("Error Report Logged to Server; Response: {0}", reportResponse); - } - - #endregion - - public class ErrorReport - { - public string SessionId { get; set; } - public string DeviceIdentifier { get; set; } - public string JsonException { get; set; } - } - - public static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) - { - try - { - var ex = e.ExceptionObject as Exception; - if (ex != null) - { - ReportError(ex, true); - } - } - catch (Exception) - { - // Igore failure to Log Errors - } - } - - #region Exception Serialization - private static string IntenseExceptionSerialization(this Exception Ex) - { - try - { - return JsonConvert.SerializeObject(Ex); - } - catch (Exception) - { - try - { - var encapsulatedEx = Ex.ToEncapsulatedException(); - return JsonConvert.SerializeObject(encapsulatedEx); - } - catch (Exception) - { - try - { - var encapsulatedEx = Ex.ToEncapsulatedException(0); - return JsonConvert.SerializeObject(encapsulatedEx); - } - catch (Exception) - { - return JsonConvert.SerializeObject(Ex.Message); - } - } - } - } - - private static EncapsulatedException ToEncapsulatedException(this Exception ex, int InnerRecursionDepth = 4) - { - EncapsulatedException inner = null; - if (InnerRecursionDepth > 0 && ex.InnerException != null) - inner = ex.InnerException.ToEncapsulatedException(--InnerRecursionDepth); - - return new EncapsulatedException() - { - EncapsulatedType = ex.GetType().Name, - Message = ex.Message, - StackTrace = ex.StackTrace, - InnerException = inner - }; - } - public class EncapsulatedException - { - public string Message { get; set; } - public string EncapsulatedType { get; set; } - public string StackTrace { get; set; } - public EncapsulatedException InnerException { get; set; } - } - #endregion - - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Text; +using Disco.Client.Extensions; +using Newtonsoft.Json; + +namespace Disco.Client +{ + public static class ErrorReporting + { + private const string ServicePathTemplate = "http://DISCO:9292/Services/Client/ClientError"; + public static string DeviceIdentifier { get; set; } + public static string EnrolmentSessionId { get; set; } + + public static void ReportError(Exception Ex, bool ReportToServer) + { + bool isClientServiceException = Ex is ClientServiceException; + + ErrorReport report = new ErrorReport() + { + DeviceIdentifier = DeviceIdentifier, + SessionId = EnrolmentSessionId, + JsonException = Ex.IntenseExceptionSerialization() + }; + + try + { + LogToFile(report); + } + catch (Exception) { } + + try + { + LogToEventLog(report); + } + catch (Exception) { } + + // Don't log server errors back to the server + if (!isClientServiceException && ReportToServer) + { + try + { + LogToServer(report); + } + catch (Exception) { } + } + + try + { + Presentation.WriteFatalError(Ex); + } + catch (Exception) { } + } + + #region Log Actions + + private static void LogToFile(ErrorReport report) + { + var logPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "ErrorLog.csv"); + + using (var streamWriter = File.AppendText(logPath)) + { + streamWriter.Write(DateTime.Now.ToString("s")); + streamWriter.Write(","); + streamWriter.Write(report.DeviceIdentifier); + streamWriter.Write(",\""); + streamWriter.Write(report.JsonException); + streamWriter.Write("\""); + streamWriter.Flush(); + } + } + private static void LogToEventLog(ErrorReport report) + { + string eventSource = "Disco Client"; + + if (!EventLog.SourceExists(eventSource)) + EventLog.CreateEventSource(eventSource, "Application"); + + EventLog.WriteEntry(eventSource, report.JsonException, EventLogEntryType.Error, 400); + } + private static void LogToServer(ErrorReport report) + { + string reportJson = JsonConvert.SerializeObject(report); + string reportResponse; + + HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(ServicePathTemplate); + request.UserAgent = string.Format("Disco-Client/{0}", Assembly.GetExecutingAssembly().GetName().Version.ToString(3)); + request.ContentType = "application/json"; + request.Method = WebRequestMethods.Http.Post; + request.UseDefaultCredentials = true; + request.Timeout = 300000; // 5 Minutes + + using (StreamWriter requestWriter = new StreamWriter(request.GetRequestStream())) + { + requestWriter.Write(reportJson); + } + + using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) + { + using (StreamReader responseReader = new StreamReader(response.GetResponseStream())) + { + reportResponse = responseReader.ReadToEnd(); + } + } + + System.Diagnostics.Debug.WriteLine("Error Report Logged to Server; Response: {0}", reportResponse); + } + + #endregion + + public class ErrorReport + { + public string SessionId { get; set; } + public string DeviceIdentifier { get; set; } + public string JsonException { get; set; } + } + + public static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + try + { + var ex = e.ExceptionObject as Exception; + if (ex != null) + { + ReportError(ex, true); + } + } + catch (Exception) + { + // Igore failure to Log Errors + } + } + + #region Exception Serialization + private static string IntenseExceptionSerialization(this Exception Ex) + { + try + { + return JsonConvert.SerializeObject(Ex); + } + catch (Exception) + { + try + { + var encapsulatedEx = Ex.ToEncapsulatedException(); + return JsonConvert.SerializeObject(encapsulatedEx); + } + catch (Exception) + { + try + { + var encapsulatedEx = Ex.ToEncapsulatedException(0); + return JsonConvert.SerializeObject(encapsulatedEx); + } + catch (Exception) + { + return JsonConvert.SerializeObject(Ex.Message); + } + } + } + } + + private static EncapsulatedException ToEncapsulatedException(this Exception ex, int InnerRecursionDepth = 4) + { + EncapsulatedException inner = null; + if (InnerRecursionDepth > 0 && ex.InnerException != null) + inner = ex.InnerException.ToEncapsulatedException(--InnerRecursionDepth); + + return new EncapsulatedException() + { + EncapsulatedType = ex.GetType().Name, + Message = ex.Message, + StackTrace = ex.StackTrace, + InnerException = inner + }; + } + public class EncapsulatedException + { + public string Message { get; set; } + public string EncapsulatedType { get; set; } + public string StackTrace { get; set; } + public EncapsulatedException InnerException { get; set; } + } + #endregion + + } +} diff --git a/Disco.Client/Extensions/ClientServiceException.cs b/Disco.Client/Extensions/ClientServiceException.cs index ab7dc4c6..752155de 100644 --- a/Disco.Client/Extensions/ClientServiceException.cs +++ b/Disco.Client/Extensions/ClientServiceException.cs @@ -1,18 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Disco.Client.Extensions -{ - public class ClientServiceException : Exception - { - public string ServiceFeature { get; private set; } - - public ClientServiceException(string ServiceFeature, string ServerMessage) : base(ServerMessage) - { - this.ServiceFeature = ServiceFeature; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Disco.Client.Extensions +{ + public class ClientServiceException : Exception + { + public string ServiceFeature { get; private set; } + + public ClientServiceException(string ServiceFeature, string ServerMessage) : base(ServerMessage) + { + this.ServiceFeature = ServiceFeature; + } + } +} diff --git a/Disco.Client/Extensions/ClientServicesExtensions.cs b/Disco.Client/Extensions/ClientServicesExtensions.cs index a919e7c2..01fe367f 100644 --- a/Disco.Client/Extensions/ClientServicesExtensions.cs +++ b/Disco.Client/Extensions/ClientServicesExtensions.cs @@ -1,56 +1,56 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using Disco.Models.ClientServices; -using Newtonsoft.Json; - -namespace Disco.Client.Extensions -{ - public static class ClientServicesExtensions - { - public const string ServicePathAuthenticatedTemplate = "http://DISCO:9292/Services/Client/Authenticated/{0}"; - public const string ServicePathUnauthenticatedTemplate = "http://DISCO:9292/Services/Client/Unauthenticated/{0}"; - - public static ResponseType Post(this ServiceBase Service, bool Authenticated) - { - string jsonResponse; - string serviceUrl; - if (Authenticated) - serviceUrl = string.Format(ServicePathAuthenticatedTemplate, Service.Feature); - else - serviceUrl = string.Format(ServicePathUnauthenticatedTemplate, Service.Feature); - - HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(serviceUrl); - request.UserAgent = string.Format("Disco-Client/{0}", Assembly.GetExecutingAssembly().GetName().Version.ToString(3)); - request.ContentType = "application/json"; - request.Method = WebRequestMethods.Http.Post; - request.UseDefaultCredentials = true; - request.Timeout = 300000; // 5 Minutes - string jsonRequest = JsonConvert.SerializeObject(Service); - - using (StreamWriter requestWriter = new StreamWriter(request.GetRequestStream())) - { - requestWriter.Write(jsonRequest); - } - - using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) - { - using (StreamReader responseReader = new StreamReader(response.GetResponseStream())) - { - jsonResponse = responseReader.ReadToEnd(); - } - } - - if (string.IsNullOrEmpty(jsonResponse)) - return default(ResponseType); - else - return JsonConvert.DeserializeObject(jsonResponse); - } - - } -} +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using Disco.Models.ClientServices; +using Newtonsoft.Json; + +namespace Disco.Client.Extensions +{ + public static class ClientServicesExtensions + { + public const string ServicePathAuthenticatedTemplate = "http://DISCO:9292/Services/Client/Authenticated/{0}"; + public const string ServicePathUnauthenticatedTemplate = "http://DISCO:9292/Services/Client/Unauthenticated/{0}"; + + public static ResponseType Post(this ServiceBase Service, bool Authenticated) + { + string jsonResponse; + string serviceUrl; + if (Authenticated) + serviceUrl = string.Format(ServicePathAuthenticatedTemplate, Service.Feature); + else + serviceUrl = string.Format(ServicePathUnauthenticatedTemplate, Service.Feature); + + HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(serviceUrl); + request.UserAgent = string.Format("Disco-Client/{0}", Assembly.GetExecutingAssembly().GetName().Version.ToString(3)); + request.ContentType = "application/json"; + request.Method = WebRequestMethods.Http.Post; + request.UseDefaultCredentials = true; + request.Timeout = 300000; // 5 Minutes + string jsonRequest = JsonConvert.SerializeObject(Service); + + using (StreamWriter requestWriter = new StreamWriter(request.GetRequestStream())) + { + requestWriter.Write(jsonRequest); + } + + using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) + { + using (StreamReader responseReader = new StreamReader(response.GetResponseStream())) + { + jsonResponse = responseReader.ReadToEnd(); + } + } + + if (string.IsNullOrEmpty(jsonResponse)) + return default(ResponseType); + else + return JsonConvert.DeserializeObject(jsonResponse); + } + + } +} diff --git a/Disco.Client/Extensions/EnrolExtensions.cs b/Disco.Client/Extensions/EnrolExtensions.cs index 0ebfc369..382cf11c 100644 --- a/Disco.Client/Extensions/EnrolExtensions.cs +++ b/Disco.Client/Extensions/EnrolExtensions.cs @@ -1,188 +1,188 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.ClientServices; -using System.Security.Cryptography.X509Certificates; -using System.IO; -using System.Diagnostics; -using Microsoft.Win32; -using System.Text.RegularExpressions; - -namespace Disco.Client.Extensions -{ - public static class EnrolExtensions - { - - public static void Build(this Enrol enrol) - { - enrol.DeviceUUID = Interop.SystemAudit.DeviceUUID; - enrol.DeviceSerialNumber = Interop.SystemAudit.DeviceSerialNumber; - - enrol.DeviceComputerName = Interop.LocalAuthentication.ComputerName; - - enrol.DeviceManufacturer = Interop.SystemAudit.DeviceManufacturer; - enrol.DeviceModel = Interop.SystemAudit.DeviceModel; - enrol.DeviceModelType = Interop.SystemAudit.DeviceType; - - enrol.DeviceIsPartOfDomain = Interop.SystemAudit.DeviceIsPartOfDomain; - - // LAN - enrol.DeviceLanMacAddress = Interop.Network.PrimaryLanMacAddress; - - // WAN - enrol.DeviceWlanMacAddress = Interop.Network.PrimaryWlanMacAddress; - - // Certificates - enrol.DeviceCertificates = Interop.Certificates.GetCertificateSubjects(StoreName.My, StoreLocation.LocalMachine); - } - - public static void Process(this EnrolResponse enrolResponse) - { - if (enrolResponse == null) - throw new ClientServiceException("Enrolment", "Server denied enrolment (Empty Response)"); - - ErrorReporting.EnrolmentSessionId = enrolResponse.SessionId; - - if (!string.IsNullOrEmpty(enrolResponse.ErrorMessage)) - throw new ClientServiceException("Enrolment", enrolResponse.ErrorMessage); - - // Offline Domain Join - bool requireReboot = enrolResponse.ApplyOfflineDomainJoin(); - - // Certificates - enrolResponse.ApplyDeviceCertificates(); - - // Device Owner - enrolResponse.ApplyDeviceAssignedUser(); - - - Presentation.UpdateStatus("Enrolling Device", "Device Enrolment Successfully Completed", false, 0, 1500); - - Program.RebootRequired = requireReboot; - Program.AllowUninstall = enrolResponse.AllowBootstrapperUninstall; - } - - /// - /// Processes a Client Service Enrol Response for Offline Domain Join Actions - /// - /// - /// Boolean indicating whether a reboot is required. - private static bool ApplyOfflineDomainJoin(this EnrolResponse enrolResponse) - { - if (!string.IsNullOrWhiteSpace(enrolResponse.OfflineDomainJoin)) - { - Presentation.UpdateStatus("Enrolling Device", string.Format("Performing Offline Domain Join:{0}Renaming Computer: {1} -> {2}", Environment.NewLine, Interop.LocalAuthentication.ComputerName, enrolResponse.DeviceComputerName), true, -1, 1500); - - string odjFile = Path.GetTempFileName(); - File.WriteAllBytes(odjFile, Convert.FromBase64String(enrolResponse.OfflineDomainJoin)); - - string odjWindowsPath = Environment.GetEnvironmentVariable("SystemRoot"); - string odjProcessArguments = string.Format("/REQUESTODJ /LOADFILE \"{0}\" /WINDOWSPATH \"{1}\" /LOCALOS", odjFile, odjWindowsPath); - - ProcessStartInfo odjProcessStartInfo = new ProcessStartInfo("DJOIN.EXE", odjProcessArguments) - { - CreateNoWindow = true, - ErrorDialog = false, - LoadUserProfile = true, - RedirectStandardOutput = true, - UseShellExecute = false - }; - string odjResult; - using (Process odjProcess = System.Diagnostics.Process.Start(odjProcessStartInfo)) - { - odjResult = odjProcess.StandardOutput.ReadToEnd(); - odjProcess.WaitForExit(20000); // 20 Seconds - } - Presentation.UpdateStatus("Enrolling Device", string.Format("Offline Domain Join Result:{0}{1}", Environment.NewLine, odjResult), true, -1, 3000); - - if (File.Exists(odjFile)) - File.Delete(odjFile); - - // Flush Logged-On History - if (!string.IsNullOrEmpty(enrolResponse.DeviceDomainName)) - { - using (RegistryKey regWinlogon = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true)){ - regWinlogon.SetValue("DefaultDomainName", enrolResponse.DeviceDomainName, RegistryValueKind.String); - regWinlogon.SetValue("DefaultUserName", String.Empty, RegistryValueKind.String); - } - using (RegistryKey regLogonUI = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI", true)) - { - regLogonUI.DeleteValue("LastLoggedOnUser", false); - } - } - - return true; // Reboot required - } - else - { - // No Domain Join - return false; // Reboot not required - } - } - - /// - /// Processes a Client Service Enrol Response for Device Assigned User Actions - /// - /// - private static void ApplyDeviceAssignedUser(this EnrolResponse enrolResponse) - { - // Only run task if Assigned User was specified - if (!string.IsNullOrWhiteSpace(enrolResponse.DeviceAssignedUserSID)) - { - Presentation.UpdateStatus("Enrolling Device", string.Format(@"Configuring permissions for the device owner:{0}{1} ({2}\{3})", Environment.NewLine, enrolResponse.DeviceAssignedUserName, enrolResponse.DeviceAssignedUserDomain, enrolResponse.DeviceAssignedUserUsername), true, -1, 3000); - - Interop.LocalAuthentication.AddLocalGroupMembership("Administrators", enrolResponse.DeviceAssignedUserSID, enrolResponse.DeviceAssignedUserUsername, enrolResponse.DeviceAssignedUserDomain); - - // Make Windows think this user was the last to logon - using (RegistryKey regWinlogon = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true)) - { - regWinlogon.SetValue("DefaultDomainName", enrolResponse.DeviceAssignedUserDomain, RegistryValueKind.String); - regWinlogon.SetValue("DefaultUserName", enrolResponse.DeviceAssignedUserUsername, RegistryValueKind.String); - } - using (RegistryKey regLogonUI = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI", true)) - { - regLogonUI.SetValue("LastLoggedOnUser", string.Format(@"{0}\{1}", enrolResponse.DeviceAssignedUserDomain, enrolResponse.DeviceAssignedUserUsername), RegistryValueKind.String); - } - } - } - - /// - /// Processes a Client Service Enrol Response for Device Certificate Actions - /// - /// - private static void ApplyDeviceCertificates(this EnrolResponse enrolResponse) - { - // Only run if a Certificate was supplied - if (!string.IsNullOrEmpty(enrolResponse.DeviceCertificate)) - { - Presentation.UpdateStatus("Enrolling Device", "Configuring Wireless Certificates", true, -1, 1000); - - var certPersonalBytes = Convert.FromBase64String(enrolResponse.DeviceCertificate); - var certPersonal = new X509Certificate2(certPersonalBytes, "password", X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet); - if (certPersonal == null) - throw new ClientServiceException("Enrolment > Device Certificate", "Unable to Import Device Certificate Provided, possibly check password."); - - // Certificate Removal - if (enrolResponse.DeviceCertificateRemoveExisting != null && enrolResponse.DeviceCertificateRemoveExisting.Count > 0) - { - List regExMatchesSubject = new List(); - foreach (var subjectRegEx in enrolResponse.DeviceCertificateRemoveExisting) - regExMatchesSubject.Add(new Regex(subjectRegEx, RegexOptions.IgnoreCase)); - - // Remove from 'My' Store - Interop.Certificates.RemoveCertificates(StoreName.My, StoreLocation.LocalMachine, regExMatchesSubject, certPersonal); - // Remove from 'Root' Store - Interop.Certificates.RemoveCertificates(StoreName.Root, StoreLocation.LocalMachine, regExMatchesSubject, certPersonal); - // Remove from 'CertificateAuthority' Store - Interop.Certificates.RemoveCertificates(StoreName.CertificateAuthority, StoreLocation.LocalMachine, regExMatchesSubject, certPersonal); - } - - // Add Certificate - Presentation.UpdateStatus("Enrolling Device", string.Format("Configuring Wireless Certificates{0}Installing Certificate: {1}", Environment.NewLine, Interop.Certificates.GetCertificateFriendlyName(certPersonal)), true, -1); - Interop.Certificates.AddCertificate(StoreName.My, StoreLocation.LocalMachine, certPersonal); - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.ClientServices; +using System.Security.Cryptography.X509Certificates; +using System.IO; +using System.Diagnostics; +using Microsoft.Win32; +using System.Text.RegularExpressions; + +namespace Disco.Client.Extensions +{ + public static class EnrolExtensions + { + + public static void Build(this Enrol enrol) + { + enrol.DeviceUUID = Interop.SystemAudit.DeviceUUID; + enrol.DeviceSerialNumber = Interop.SystemAudit.DeviceSerialNumber; + + enrol.DeviceComputerName = Interop.LocalAuthentication.ComputerName; + + enrol.DeviceManufacturer = Interop.SystemAudit.DeviceManufacturer; + enrol.DeviceModel = Interop.SystemAudit.DeviceModel; + enrol.DeviceModelType = Interop.SystemAudit.DeviceType; + + enrol.DeviceIsPartOfDomain = Interop.SystemAudit.DeviceIsPartOfDomain; + + // LAN + enrol.DeviceLanMacAddress = Interop.Network.PrimaryLanMacAddress; + + // WAN + enrol.DeviceWlanMacAddress = Interop.Network.PrimaryWlanMacAddress; + + // Certificates + enrol.DeviceCertificates = Interop.Certificates.GetCertificateSubjects(StoreName.My, StoreLocation.LocalMachine); + } + + public static void Process(this EnrolResponse enrolResponse) + { + if (enrolResponse == null) + throw new ClientServiceException("Enrolment", "Server denied enrolment (Empty Response)"); + + ErrorReporting.EnrolmentSessionId = enrolResponse.SessionId; + + if (!string.IsNullOrEmpty(enrolResponse.ErrorMessage)) + throw new ClientServiceException("Enrolment", enrolResponse.ErrorMessage); + + // Offline Domain Join + bool requireReboot = enrolResponse.ApplyOfflineDomainJoin(); + + // Certificates + enrolResponse.ApplyDeviceCertificates(); + + // Device Owner + enrolResponse.ApplyDeviceAssignedUser(); + + + Presentation.UpdateStatus("Enrolling Device", "Device Enrolment Successfully Completed", false, 0, 1500); + + Program.RebootRequired = requireReboot; + Program.AllowUninstall = enrolResponse.AllowBootstrapperUninstall; + } + + /// + /// Processes a Client Service Enrol Response for Offline Domain Join Actions + /// + /// + /// Boolean indicating whether a reboot is required. + private static bool ApplyOfflineDomainJoin(this EnrolResponse enrolResponse) + { + if (!string.IsNullOrWhiteSpace(enrolResponse.OfflineDomainJoin)) + { + Presentation.UpdateStatus("Enrolling Device", string.Format("Performing Offline Domain Join:{0}Renaming Computer: {1} -> {2}", Environment.NewLine, Interop.LocalAuthentication.ComputerName, enrolResponse.DeviceComputerName), true, -1, 1500); + + string odjFile = Path.GetTempFileName(); + File.WriteAllBytes(odjFile, Convert.FromBase64String(enrolResponse.OfflineDomainJoin)); + + string odjWindowsPath = Environment.GetEnvironmentVariable("SystemRoot"); + string odjProcessArguments = string.Format("/REQUESTODJ /LOADFILE \"{0}\" /WINDOWSPATH \"{1}\" /LOCALOS", odjFile, odjWindowsPath); + + ProcessStartInfo odjProcessStartInfo = new ProcessStartInfo("DJOIN.EXE", odjProcessArguments) + { + CreateNoWindow = true, + ErrorDialog = false, + LoadUserProfile = true, + RedirectStandardOutput = true, + UseShellExecute = false + }; + string odjResult; + using (Process odjProcess = System.Diagnostics.Process.Start(odjProcessStartInfo)) + { + odjResult = odjProcess.StandardOutput.ReadToEnd(); + odjProcess.WaitForExit(20000); // 20 Seconds + } + Presentation.UpdateStatus("Enrolling Device", string.Format("Offline Domain Join Result:{0}{1}", Environment.NewLine, odjResult), true, -1, 3000); + + if (File.Exists(odjFile)) + File.Delete(odjFile); + + // Flush Logged-On History + if (!string.IsNullOrEmpty(enrolResponse.DeviceDomainName)) + { + using (RegistryKey regWinlogon = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true)){ + regWinlogon.SetValue("DefaultDomainName", enrolResponse.DeviceDomainName, RegistryValueKind.String); + regWinlogon.SetValue("DefaultUserName", String.Empty, RegistryValueKind.String); + } + using (RegistryKey regLogonUI = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI", true)) + { + regLogonUI.DeleteValue("LastLoggedOnUser", false); + } + } + + return true; // Reboot required + } + else + { + // No Domain Join + return false; // Reboot not required + } + } + + /// + /// Processes a Client Service Enrol Response for Device Assigned User Actions + /// + /// + private static void ApplyDeviceAssignedUser(this EnrolResponse enrolResponse) + { + // Only run task if Assigned User was specified + if (!string.IsNullOrWhiteSpace(enrolResponse.DeviceAssignedUserSID)) + { + Presentation.UpdateStatus("Enrolling Device", string.Format(@"Configuring permissions for the device owner:{0}{1} ({2}\{3})", Environment.NewLine, enrolResponse.DeviceAssignedUserName, enrolResponse.DeviceAssignedUserDomain, enrolResponse.DeviceAssignedUserUsername), true, -1, 3000); + + Interop.LocalAuthentication.AddLocalGroupMembership("Administrators", enrolResponse.DeviceAssignedUserSID, enrolResponse.DeviceAssignedUserUsername, enrolResponse.DeviceAssignedUserDomain); + + // Make Windows think this user was the last to logon + using (RegistryKey regWinlogon = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true)) + { + regWinlogon.SetValue("DefaultDomainName", enrolResponse.DeviceAssignedUserDomain, RegistryValueKind.String); + regWinlogon.SetValue("DefaultUserName", enrolResponse.DeviceAssignedUserUsername, RegistryValueKind.String); + } + using (RegistryKey regLogonUI = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI", true)) + { + regLogonUI.SetValue("LastLoggedOnUser", string.Format(@"{0}\{1}", enrolResponse.DeviceAssignedUserDomain, enrolResponse.DeviceAssignedUserUsername), RegistryValueKind.String); + } + } + } + + /// + /// Processes a Client Service Enrol Response for Device Certificate Actions + /// + /// + private static void ApplyDeviceCertificates(this EnrolResponse enrolResponse) + { + // Only run if a Certificate was supplied + if (!string.IsNullOrEmpty(enrolResponse.DeviceCertificate)) + { + Presentation.UpdateStatus("Enrolling Device", "Configuring Wireless Certificates", true, -1, 1000); + + var certPersonalBytes = Convert.FromBase64String(enrolResponse.DeviceCertificate); + var certPersonal = new X509Certificate2(certPersonalBytes, "password", X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet); + if (certPersonal == null) + throw new ClientServiceException("Enrolment > Device Certificate", "Unable to Import Device Certificate Provided, possibly check password."); + + // Certificate Removal + if (enrolResponse.DeviceCertificateRemoveExisting != null && enrolResponse.DeviceCertificateRemoveExisting.Count > 0) + { + List regExMatchesSubject = new List(); + foreach (var subjectRegEx in enrolResponse.DeviceCertificateRemoveExisting) + regExMatchesSubject.Add(new Regex(subjectRegEx, RegexOptions.IgnoreCase)); + + // Remove from 'My' Store + Interop.Certificates.RemoveCertificates(StoreName.My, StoreLocation.LocalMachine, regExMatchesSubject, certPersonal); + // Remove from 'Root' Store + Interop.Certificates.RemoveCertificates(StoreName.Root, StoreLocation.LocalMachine, regExMatchesSubject, certPersonal); + // Remove from 'CertificateAuthority' Store + Interop.Certificates.RemoveCertificates(StoreName.CertificateAuthority, StoreLocation.LocalMachine, regExMatchesSubject, certPersonal); + } + + // Add Certificate + Presentation.UpdateStatus("Enrolling Device", string.Format("Configuring Wireless Certificates{0}Installing Certificate: {1}", Environment.NewLine, Interop.Certificates.GetCertificateFriendlyName(certPersonal)), true, -1); + Interop.Certificates.AddCertificate(StoreName.My, StoreLocation.LocalMachine, certPersonal); + } + } + + } +} diff --git a/Disco.Client/Extensions/WhoAmIExtensions.cs b/Disco.Client/Extensions/WhoAmIExtensions.cs index 6030a5dc..66547623 100644 --- a/Disco.Client/Extensions/WhoAmIExtensions.cs +++ b/Disco.Client/Extensions/WhoAmIExtensions.cs @@ -1,36 +1,36 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Disco.Models.ClientServices; - -namespace Disco.Client.Extensions -{ - public static class WhoAmIExtensions - { - - public static void Process(this WhoAmIResponse whoAmIResponse) - { - Program.IsAuthenticated = true; - whoAmIResponse.PresentResponse(); - } - - private static void PresentResponse(this WhoAmIResponse whoAmIResponse) - { - StringBuilder message = new StringBuilder(); - message.AppendLine("Authenticated Connection:"); - message.Append("Username: ").AppendLine(whoAmIResponse.Username); - message.Append("Name: ").Append(whoAmIResponse.DisplayName); - message.Append(" (").Append(whoAmIResponse.Type).AppendLine(")"); - Presentation.UpdateStatus("Connection Established to Preparation Server", message.ToString(), false, 0, 1500); - } - public static void UnauthenticatedResponse() - { - Program.IsAuthenticated = false; - Presentation.UpdateStatus("Connection Established to Preparation Server", "Unauthenticated connection to the server...", false, 0, 1500); - } - - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Disco.Models.ClientServices; + +namespace Disco.Client.Extensions +{ + public static class WhoAmIExtensions + { + + public static void Process(this WhoAmIResponse whoAmIResponse) + { + Program.IsAuthenticated = true; + whoAmIResponse.PresentResponse(); + } + + private static void PresentResponse(this WhoAmIResponse whoAmIResponse) + { + StringBuilder message = new StringBuilder(); + message.AppendLine("Authenticated Connection:"); + message.Append("Username: ").AppendLine(whoAmIResponse.Username); + message.Append("Name: ").Append(whoAmIResponse.DisplayName); + message.Append(" (").Append(whoAmIResponse.Type).AppendLine(")"); + Presentation.UpdateStatus("Connection Established to Preparation Server", message.ToString(), false, 0, 1500); + } + public static void UnauthenticatedResponse() + { + Program.IsAuthenticated = false; + Presentation.UpdateStatus("Connection Established to Preparation Server", "Unauthenticated connection to the server...", false, 0, 1500); + } + + + } +} diff --git a/Disco.Client/Interop/Certificates.cs b/Disco.Client/Interop/Certificates.cs index f122f21d..e42f0142 100644 --- a/Disco.Client/Interop/Certificates.cs +++ b/Disco.Client/Interop/Certificates.cs @@ -1,103 +1,103 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Text.RegularExpressions; - -namespace Disco.Client.Interop -{ - public static class Certificates - { - - public static string GetCertificateFriendlyName(X509Certificate2 Certificate) - { - string subject = Certificate.Subject; - return subject.Substring(subject.IndexOf("=") + 1, subject.IndexOf(",") - subject.IndexOf("=") - 1); - } - - public static List GetCertificateSubjects(StoreName StoreName, StoreLocation StoreLocation) - { - X509Store certStore = new X509Store(StoreName, StoreLocation); - certStore.Open(OpenFlags.ReadOnly); - var certSubjects = certStore.Certificates.Cast().Select(c => c.Subject).ToList(); - certStore.Close(); - return certSubjects; - } - - public static bool AddCertificate(StoreName StoreName, StoreLocation StoreLocation, X509Certificate2 Certificate) - { - X509Store certStore = new X509Store(StoreName, StoreLocation); - bool certAlreadyAdded = false; - - certStore.Open(OpenFlags.ReadWrite); - - try - { - foreach (X509Certificate2 cert in certStore.Certificates) - { - if (cert.SerialNumber.Equals(Certificate.SerialNumber)) - { - certAlreadyAdded = true; - break; - } - } - - if (!certAlreadyAdded) - { - Presentation.UpdateStatus("Enrolling Device", string.Format("Configuring Wireless Certificates{0}Adding Certificate: '{1}' from {2}@{3}", Environment.NewLine, GetCertificateFriendlyName(Certificate), StoreName.ToString(), StoreLocation.ToString()), true, -1, 3000); - certStore.Add(Certificate); - } - } - catch (Exception) { throw; } - finally - { - certStore.Close(); - } - - return !certAlreadyAdded; - } - - public static List RemoveCertificates(StoreName StoreName, StoreLocation StoreLocation, List RegExMatchesSubject, X509Certificate2 CertificateException) - { - X509Store certStore = new X509Store(StoreName, StoreLocation); - List results = new List(); - List certStoreRemove = new List(); - - certStore.Open(OpenFlags.ReadWrite); - - try - { - foreach (X509Certificate2 cert in certStore.Certificates) - { - if (!cert.SerialNumber.Equals(CertificateException.SerialNumber)) - { - foreach (var subjectRegEx in RegExMatchesSubject) - { - if (subjectRegEx.IsMatch(cert.Subject)) - { - certStoreRemove.Add(cert); - break; - } - } - } - } - - foreach (var cert in certStoreRemove) - { - results.Add(cert.Subject); - - Presentation.UpdateStatus("Enrolling Device", string.Format("Configuring Wireless Certificates{0}Removing Certificate: '{1}' from {2}@{3}", Environment.NewLine, GetCertificateFriendlyName(cert), StoreName.ToString(), StoreLocation.ToString()), true, -1, 1500); - certStore.Remove(cert); - } - } - catch (Exception) { throw; } - finally - { - certStore.Close(); - } - - return results; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Text.RegularExpressions; + +namespace Disco.Client.Interop +{ + public static class Certificates + { + + public static string GetCertificateFriendlyName(X509Certificate2 Certificate) + { + string subject = Certificate.Subject; + return subject.Substring(subject.IndexOf("=") + 1, subject.IndexOf(",") - subject.IndexOf("=") - 1); + } + + public static List GetCertificateSubjects(StoreName StoreName, StoreLocation StoreLocation) + { + X509Store certStore = new X509Store(StoreName, StoreLocation); + certStore.Open(OpenFlags.ReadOnly); + var certSubjects = certStore.Certificates.Cast().Select(c => c.Subject).ToList(); + certStore.Close(); + return certSubjects; + } + + public static bool AddCertificate(StoreName StoreName, StoreLocation StoreLocation, X509Certificate2 Certificate) + { + X509Store certStore = new X509Store(StoreName, StoreLocation); + bool certAlreadyAdded = false; + + certStore.Open(OpenFlags.ReadWrite); + + try + { + foreach (X509Certificate2 cert in certStore.Certificates) + { + if (cert.SerialNumber.Equals(Certificate.SerialNumber)) + { + certAlreadyAdded = true; + break; + } + } + + if (!certAlreadyAdded) + { + Presentation.UpdateStatus("Enrolling Device", string.Format("Configuring Wireless Certificates{0}Adding Certificate: '{1}' from {2}@{3}", Environment.NewLine, GetCertificateFriendlyName(Certificate), StoreName.ToString(), StoreLocation.ToString()), true, -1, 3000); + certStore.Add(Certificate); + } + } + catch (Exception) { throw; } + finally + { + certStore.Close(); + } + + return !certAlreadyAdded; + } + + public static List RemoveCertificates(StoreName StoreName, StoreLocation StoreLocation, List RegExMatchesSubject, X509Certificate2 CertificateException) + { + X509Store certStore = new X509Store(StoreName, StoreLocation); + List results = new List(); + List certStoreRemove = new List(); + + certStore.Open(OpenFlags.ReadWrite); + + try + { + foreach (X509Certificate2 cert in certStore.Certificates) + { + if (!cert.SerialNumber.Equals(CertificateException.SerialNumber)) + { + foreach (var subjectRegEx in RegExMatchesSubject) + { + if (subjectRegEx.IsMatch(cert.Subject)) + { + certStoreRemove.Add(cert); + break; + } + } + } + } + + foreach (var cert in certStoreRemove) + { + results.Add(cert.Subject); + + Presentation.UpdateStatus("Enrolling Device", string.Format("Configuring Wireless Certificates{0}Removing Certificate: '{1}' from {2}@{3}", Environment.NewLine, GetCertificateFriendlyName(cert), StoreName.ToString(), StoreLocation.ToString()), true, -1, 1500); + certStore.Remove(cert); + } + } + catch (Exception) { throw; } + finally + { + certStore.Close(); + } + + return results; + } + } +} diff --git a/Disco.Client/Interop/LocalAuthentication.cs b/Disco.Client/Interop/LocalAuthentication.cs index 4243cdee..9d35969b 100644 --- a/Disco.Client/Interop/LocalAuthentication.cs +++ b/Disco.Client/Interop/LocalAuthentication.cs @@ -1,59 +1,59 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.DirectoryServices; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Disco.Client.Interop -{ - public static class LocalAuthentication - { - - public static bool AddLocalGroupMembership(string GroupName, string UserSID, string Username, string UserDomain) - { - - using (DirectoryEntry group = new DirectoryEntry(string.Format("WinNT://./{0},group", GroupName))) - { - // Check to see if the User is already a member - foreach (object memberRef in (IEnumerable)group.Invoke("Members")) - { - using (DirectoryEntry member = new DirectoryEntry(memberRef)) - { - var memberPath = member.Path; - if (memberPath.Equals(string.Format("WinNT://{0}/{1}", UserDomain, Username), StringComparison.InvariantCultureIgnoreCase) || - memberPath.Equals(string.Format("WinNT://{0}", UserSID), StringComparison.InvariantCultureIgnoreCase)) - return false; - } - } - group.Invoke("Add", string.Format("WinNT://{0}", UserSID)); - } - return true; - } - - public static string CurrentUserDomain - { - get - { - return Environment.UserDomainName; - } - } - public static string CurrentUserName - { - get - { - return Environment.UserName; - } - } - - public static string ComputerName - { - get - { - return Environment.MachineName; - } - } - - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.DirectoryServices; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Disco.Client.Interop +{ + public static class LocalAuthentication + { + + public static bool AddLocalGroupMembership(string GroupName, string UserSID, string Username, string UserDomain) + { + + using (DirectoryEntry group = new DirectoryEntry(string.Format("WinNT://./{0},group", GroupName))) + { + // Check to see if the User is already a member + foreach (object memberRef in (IEnumerable)group.Invoke("Members")) + { + using (DirectoryEntry member = new DirectoryEntry(memberRef)) + { + var memberPath = member.Path; + if (memberPath.Equals(string.Format("WinNT://{0}/{1}", UserDomain, Username), StringComparison.InvariantCultureIgnoreCase) || + memberPath.Equals(string.Format("WinNT://{0}", UserSID), StringComparison.InvariantCultureIgnoreCase)) + return false; + } + } + group.Invoke("Add", string.Format("WinNT://{0}", UserSID)); + } + return true; + } + + public static string CurrentUserDomain + { + get + { + return Environment.UserDomainName; + } + } + public static string CurrentUserName + { + get + { + return Environment.UserName; + } + } + + public static string ComputerName + { + get + { + return Environment.MachineName; + } + } + + } +} diff --git a/Disco.Client/Interop/Network.cs b/Disco.Client/Interop/Network.cs index f01bcde1..ce14f368 100644 --- a/Disco.Client/Interop/Network.cs +++ b/Disco.Client/Interop/Network.cs @@ -1,327 +1,327 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management; -using System.Runtime.InteropServices; -using System.Text; - -namespace Disco.Client.Interop -{ - public static class Network - { - private static List NetworkAdapters { get; set; } - private static NetworkAdapterInfo PrimaryLanNetworkAdapter { get; set; } - private static NetworkAdapterInfo PrimaryWlanNetworkAdapter { get; set; } - - static Network() - { - // Get All Adapters - RetrieveLanAdapters(); - - if (NetworkAdapters.Count > 0) - { - // Only Retrieve Wlan Adapters if at least one adapter was found by WMI - RetrieveWlanAdapters(); - - // Determine Primary Adapters - - // Lan - PrimaryLanNetworkAdapter = NetworkAdapters.Where(n => !n.IsWLanAdapter && n.NetConnectionId.StartsWith("Local Area Connection", StringComparison.InvariantCultureIgnoreCase)).OrderByDescending(n => n.Speed).FirstOrDefault(); - // Might be too restrictive - remove name restriction just in case. - if (PrimaryLanNetworkAdapter == null) - PrimaryLanNetworkAdapter = NetworkAdapters.Where(n => !n.IsWLanAdapter).OrderByDescending(n => n.Speed).FirstOrDefault(); - - // Wan - PrimaryWlanNetworkAdapter = NetworkAdapters.Where(n => n.IsWLanAdapter).OrderByDescending(n => n.Speed).FirstOrDefault(); - } - } - - private static void RetrieveLanAdapters() - { - // Get NetworkAdapter Information - try - { - using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT Index, GUID, MACAddress, Name, NetConnectionID, Speed FROM Win32_NetworkAdapter WHERE PhysicalAdapter=true AND MACAddress IS NOT NULL AND Name IS NOT NULL AND NetConnectionID IS NOT NULL AND Speed IS NOT NULL")) - { - using (ManagementObjectCollection mResults = mSearcher.Get()) - { - NetworkAdapters = new List(); - foreach (var mResult in mResults.Cast()) - { - NetworkAdapterInfo nic = new NetworkAdapterInfo() - { - Index = (UInt32)mResult.GetPropertyValue("Index"), - Guid = Guid.Parse((string)mResult.GetPropertyValue("GUID")), - MacAddress = mResult.GetPropertyValue("MACAddress").ToString(), - Name = mResult.GetPropertyValue("Name").ToString(), - NetConnectionId = mResult.GetPropertyValue("NetConnectionID").ToString(), - Speed = Convert.ToUInt64(mResult.GetPropertyValue("Speed")), - IsWLanAdapter = false - }; - NetworkAdapters.Add(nic); - } - } - } - } - catch (Exception ex) - { - throw new Exception("Disco Client was unable to retrieve NetworkAdapter information from WMI", ex); - } - } - - private static void RetrieveWlanAdapters() - { - WLAN_INTERFACE_INFO_LIST wlanApiInterfaceList; - - IntPtr wlanApiHandle = IntPtr.Zero; - uint wlanApiServiceVersion = 0; - - if (WlanOpenHandle(WLAN_API_VERSION_2_0, IntPtr.Zero, out wlanApiServiceVersion, ref wlanApiHandle) == ERROR_SUCCESS) - { - IntPtr wlanApiInterfaceListPointer = IntPtr.Zero; - - if (WlanEnumInterfaces(wlanApiHandle, IntPtr.Zero, ref wlanApiInterfaceListPointer) == ERROR_SUCCESS) - { - wlanApiInterfaceList = new WLAN_INTERFACE_INFO_LIST(wlanApiInterfaceListPointer); - WlanFreeMemory(wlanApiInterfaceListPointer); - } - else - { - // Error - No Wlan Adapters Reported - WlanCloseHandle(wlanApiHandle, IntPtr.Zero); - return; - } - - WlanCloseHandle(wlanApiHandle, IntPtr.Zero); - } - else - { - // Error - No Wlan Adapters Reported - return; - } - - if (wlanApiInterfaceList.InterfaceInfo != null) - { - foreach (var wlanApiAdapter in wlanApiInterfaceList.InterfaceInfo) - { - var wlanApiAdapterInfo = wlanApiAdapter; - var wmiAdapterInfo = NetworkAdapters.FirstOrDefault(n => n.Guid == wlanApiAdapterInfo.InterfaceGuid); - if (wmiAdapterInfo != null) - { - wmiAdapterInfo.IsWLanAdapter = true; - wmiAdapterInfo.WlanState = wlanApiAdapterInfo.isState; - } - } - } - } - - public static string PrimaryLanMacAddress - { - get - { - // Return null if no Primary LAN Network Adapter found on this Device - - return (PrimaryLanNetworkAdapter == null) ? null : PrimaryLanNetworkAdapter.MacAddress; - } - } - public static string PrimaryWlanMacAddress - { - get - { - // Return null if no Primary WLAN Network Adapter found on this Device - - return (PrimaryWlanNetworkAdapter == null) ? null : PrimaryWlanNetworkAdapter.MacAddress; - } - } - - private class NetworkAdapterInfo - { - public UInt32 Index { get; set; } - public Guid Guid { get; set; } - public string Name { get; set; } - public string NetConnectionId { get; set; } - public string MacAddress { get; set; } - public UInt64 Speed { get; set; } - - public bool IsWLanAdapter { get; set; } - public WLAN_INTERFACE_STATE WlanState { get; set; } - - public string WlanStateDescription - { - get - { - switch (WlanState) - { - case WLAN_INTERFACE_STATE.wlan_interface_state_not_ready: - return "Not Ready"; - case WLAN_INTERFACE_STATE.wlan_interface_state_connected: - return "Connected"; - case WLAN_INTERFACE_STATE.wlan_interface_state_ad_hoc_network_formed: - return "Ad Hoc Network Formed"; - case WLAN_INTERFACE_STATE.wlan_interface_state_disconnecting: - return "Disconnecting"; - case WLAN_INTERFACE_STATE.wlan_interface_state_disconnected: - return "Disconnected"; - case WLAN_INTERFACE_STATE.wlan_interface_state_associating: - return "Associating"; - case WLAN_INTERFACE_STATE.wlan_interface_state_discovering: - return "Discovering"; - case WLAN_INTERFACE_STATE.wlan_interface_state_authenticating: - return "Authenticating"; - default: - return "Unknown"; - } - } - } - } - - #region Wlan Win32 Interop - - private const uint WLAN_API_VERSION_2_0 = 2; // Windows Vista WiFi API Version - private const int ERROR_SUCCESS = 0; - - /// - /// Opens a connection to the server - /// - [DllImport("Wlanapi.dll")] - private static extern int WlanOpenHandle( - uint dwClientVersion, - IntPtr pReserved, //not in MSDN but required - [Out] out uint pdwNegotiatedVersion, - ref IntPtr ClientHandle); - - /// - /// Closes a connection to the server - /// - [DllImport("Wlanapi", EntryPoint = "WlanCloseHandle")] - private static extern uint WlanCloseHandle( - [In] IntPtr hClientHandle, - IntPtr pReserved); - - /// - /// Enumerates all wireless interfaces in the laptop - /// - [DllImport("Wlanapi", EntryPoint = "WlanEnumInterfaces")] - private static extern uint WlanEnumInterfaces( - [In] IntPtr hClientHandle, - IntPtr pReserved, - ref IntPtr ppInterfaceList); - - /// - /// Frees memory returned by native WiFi functions - /// - [DllImport("Wlanapi", EntryPoint = "WlanFreeMemory")] - private static extern void WlanFreeMemory([In] IntPtr pMemory); - - /// - /// Defines the state of the interface. e.g. connected, disconnected. - /// - private enum WLAN_INTERFACE_STATE - { - /// - /// wlan_interface_state_not_ready -> 0 - /// - wlan_interface_state_not_ready = 0, - /// - /// wlan_interface_state_connected -> 1 - /// - wlan_interface_state_connected = 1, - /// - /// wlan_interface_state_ad_hoc_network_formed -> 2 - /// - wlan_interface_state_ad_hoc_network_formed = 2, - /// - /// wlan_interface_state_disconnecting -> 3 - /// - wlan_interface_state_disconnecting = 3, - /// - /// wlan_interface_state_disconnected -> 4 - /// - wlan_interface_state_disconnected = 4, - /// - /// wlan_interface_state_associating -> 5 - /// - wlan_interface_state_associating = 5, - /// - /// wlan_interface_state_discovering -> 6 - /// - wlan_interface_state_discovering = 6, - /// - /// wlan_interface_state_authenticating -> 7 - /// - wlan_interface_state_authenticating = 7, - } - - - /// - /// Stores interface info - /// - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - private struct WLAN_INTERFACE_INFO - { - /// GUID->_GUID - public Guid InterfaceGuid; - - /// WCHAR[256] - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string strInterfaceDescription; - - /// WLAN_INTERFACE_STATE->_WLAN_INTERFACE_STATE - public WLAN_INTERFACE_STATE isState; - } - - /// - /// Contains an array of NIC information - /// - [StructLayout(LayoutKind.Sequential)] - private struct WLAN_INTERFACE_INFO_LIST - { - /// - /// Length of array - /// - public Int32 dwNumberOfItems; - /// - /// This member is not used by the wireless service. Applications can use this member when processing individual interfaces. - /// - public Int32 dwIndex; - /// - /// Array of WLAN interfaces. - /// - public WLAN_INTERFACE_INFO[] InterfaceInfo; - - /// - /// Constructor for WLAN_INTERFACE_INFO_LIST. - /// Constructor is needed because the InterfaceInfo member varies based on how many adapters are in the system. - /// - /// the unmanaged pointer containing the list. - public WLAN_INTERFACE_INFO_LIST(IntPtr pList) - { - // The first 4 bytes are the number of WLAN_INTERFACE_INFO structures. - dwNumberOfItems = Marshal.ReadInt32(pList, 0); - - // The next 4 bytes are the index of the current item in the unmanaged API. - dwIndex = Marshal.ReadInt32(pList, 4); - - // Construct the array of WLAN_INTERFACE_INFO structures. - InterfaceInfo = new WLAN_INTERFACE_INFO[dwNumberOfItems]; - - for (int i = 0; i <= dwNumberOfItems - 1; i++) - { - // The offset of the array of structures is 8 bytes past the beginning. - // Then, take the index and multiply it by the number of bytes in the - // structure. - // The length of the WLAN_INTERFACE_INFO structure is 532 bytes - this - // was determined by doing a Marshall.SizeOf(WLAN_INTERFACE_INFO) - IntPtr pItemList = new IntPtr(pList.ToInt64() + (i * 532) + 8); - - // Construct the WLAN_INTERFACE_INFO structure, marshal the unmanaged - // structure into it, then copy it to the array of structures. - InterfaceInfo[i] = (WLAN_INTERFACE_INFO)Marshal.PtrToStructure(pItemList, typeof(WLAN_INTERFACE_INFO)); - } - } - } - - #endregion - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management; +using System.Runtime.InteropServices; +using System.Text; + +namespace Disco.Client.Interop +{ + public static class Network + { + private static List NetworkAdapters { get; set; } + private static NetworkAdapterInfo PrimaryLanNetworkAdapter { get; set; } + private static NetworkAdapterInfo PrimaryWlanNetworkAdapter { get; set; } + + static Network() + { + // Get All Adapters + RetrieveLanAdapters(); + + if (NetworkAdapters.Count > 0) + { + // Only Retrieve Wlan Adapters if at least one adapter was found by WMI + RetrieveWlanAdapters(); + + // Determine Primary Adapters + + // Lan + PrimaryLanNetworkAdapter = NetworkAdapters.Where(n => !n.IsWLanAdapter && n.NetConnectionId.StartsWith("Local Area Connection", StringComparison.InvariantCultureIgnoreCase)).OrderByDescending(n => n.Speed).FirstOrDefault(); + // Might be too restrictive - remove name restriction just in case. + if (PrimaryLanNetworkAdapter == null) + PrimaryLanNetworkAdapter = NetworkAdapters.Where(n => !n.IsWLanAdapter).OrderByDescending(n => n.Speed).FirstOrDefault(); + + // Wan + PrimaryWlanNetworkAdapter = NetworkAdapters.Where(n => n.IsWLanAdapter).OrderByDescending(n => n.Speed).FirstOrDefault(); + } + } + + private static void RetrieveLanAdapters() + { + // Get NetworkAdapter Information + try + { + using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT Index, GUID, MACAddress, Name, NetConnectionID, Speed FROM Win32_NetworkAdapter WHERE PhysicalAdapter=true AND MACAddress IS NOT NULL AND Name IS NOT NULL AND NetConnectionID IS NOT NULL AND Speed IS NOT NULL")) + { + using (ManagementObjectCollection mResults = mSearcher.Get()) + { + NetworkAdapters = new List(); + foreach (var mResult in mResults.Cast()) + { + NetworkAdapterInfo nic = new NetworkAdapterInfo() + { + Index = (UInt32)mResult.GetPropertyValue("Index"), + Guid = Guid.Parse((string)mResult.GetPropertyValue("GUID")), + MacAddress = mResult.GetPropertyValue("MACAddress").ToString(), + Name = mResult.GetPropertyValue("Name").ToString(), + NetConnectionId = mResult.GetPropertyValue("NetConnectionID").ToString(), + Speed = Convert.ToUInt64(mResult.GetPropertyValue("Speed")), + IsWLanAdapter = false + }; + NetworkAdapters.Add(nic); + } + } + } + } + catch (Exception ex) + { + throw new Exception("Disco Client was unable to retrieve NetworkAdapter information from WMI", ex); + } + } + + private static void RetrieveWlanAdapters() + { + WLAN_INTERFACE_INFO_LIST wlanApiInterfaceList; + + IntPtr wlanApiHandle = IntPtr.Zero; + uint wlanApiServiceVersion = 0; + + if (WlanOpenHandle(WLAN_API_VERSION_2_0, IntPtr.Zero, out wlanApiServiceVersion, ref wlanApiHandle) == ERROR_SUCCESS) + { + IntPtr wlanApiInterfaceListPointer = IntPtr.Zero; + + if (WlanEnumInterfaces(wlanApiHandle, IntPtr.Zero, ref wlanApiInterfaceListPointer) == ERROR_SUCCESS) + { + wlanApiInterfaceList = new WLAN_INTERFACE_INFO_LIST(wlanApiInterfaceListPointer); + WlanFreeMemory(wlanApiInterfaceListPointer); + } + else + { + // Error - No Wlan Adapters Reported + WlanCloseHandle(wlanApiHandle, IntPtr.Zero); + return; + } + + WlanCloseHandle(wlanApiHandle, IntPtr.Zero); + } + else + { + // Error - No Wlan Adapters Reported + return; + } + + if (wlanApiInterfaceList.InterfaceInfo != null) + { + foreach (var wlanApiAdapter in wlanApiInterfaceList.InterfaceInfo) + { + var wlanApiAdapterInfo = wlanApiAdapter; + var wmiAdapterInfo = NetworkAdapters.FirstOrDefault(n => n.Guid == wlanApiAdapterInfo.InterfaceGuid); + if (wmiAdapterInfo != null) + { + wmiAdapterInfo.IsWLanAdapter = true; + wmiAdapterInfo.WlanState = wlanApiAdapterInfo.isState; + } + } + } + } + + public static string PrimaryLanMacAddress + { + get + { + // Return null if no Primary LAN Network Adapter found on this Device + + return (PrimaryLanNetworkAdapter == null) ? null : PrimaryLanNetworkAdapter.MacAddress; + } + } + public static string PrimaryWlanMacAddress + { + get + { + // Return null if no Primary WLAN Network Adapter found on this Device + + return (PrimaryWlanNetworkAdapter == null) ? null : PrimaryWlanNetworkAdapter.MacAddress; + } + } + + private class NetworkAdapterInfo + { + public UInt32 Index { get; set; } + public Guid Guid { get; set; } + public string Name { get; set; } + public string NetConnectionId { get; set; } + public string MacAddress { get; set; } + public UInt64 Speed { get; set; } + + public bool IsWLanAdapter { get; set; } + public WLAN_INTERFACE_STATE WlanState { get; set; } + + public string WlanStateDescription + { + get + { + switch (WlanState) + { + case WLAN_INTERFACE_STATE.wlan_interface_state_not_ready: + return "Not Ready"; + case WLAN_INTERFACE_STATE.wlan_interface_state_connected: + return "Connected"; + case WLAN_INTERFACE_STATE.wlan_interface_state_ad_hoc_network_formed: + return "Ad Hoc Network Formed"; + case WLAN_INTERFACE_STATE.wlan_interface_state_disconnecting: + return "Disconnecting"; + case WLAN_INTERFACE_STATE.wlan_interface_state_disconnected: + return "Disconnected"; + case WLAN_INTERFACE_STATE.wlan_interface_state_associating: + return "Associating"; + case WLAN_INTERFACE_STATE.wlan_interface_state_discovering: + return "Discovering"; + case WLAN_INTERFACE_STATE.wlan_interface_state_authenticating: + return "Authenticating"; + default: + return "Unknown"; + } + } + } + } + + #region Wlan Win32 Interop + + private const uint WLAN_API_VERSION_2_0 = 2; // Windows Vista WiFi API Version + private const int ERROR_SUCCESS = 0; + + /// + /// Opens a connection to the server + /// + [DllImport("Wlanapi.dll")] + private static extern int WlanOpenHandle( + uint dwClientVersion, + IntPtr pReserved, //not in MSDN but required + [Out] out uint pdwNegotiatedVersion, + ref IntPtr ClientHandle); + + /// + /// Closes a connection to the server + /// + [DllImport("Wlanapi", EntryPoint = "WlanCloseHandle")] + private static extern uint WlanCloseHandle( + [In] IntPtr hClientHandle, + IntPtr pReserved); + + /// + /// Enumerates all wireless interfaces in the laptop + /// + [DllImport("Wlanapi", EntryPoint = "WlanEnumInterfaces")] + private static extern uint WlanEnumInterfaces( + [In] IntPtr hClientHandle, + IntPtr pReserved, + ref IntPtr ppInterfaceList); + + /// + /// Frees memory returned by native WiFi functions + /// + [DllImport("Wlanapi", EntryPoint = "WlanFreeMemory")] + private static extern void WlanFreeMemory([In] IntPtr pMemory); + + /// + /// Defines the state of the interface. e.g. connected, disconnected. + /// + private enum WLAN_INTERFACE_STATE + { + /// + /// wlan_interface_state_not_ready -> 0 + /// + wlan_interface_state_not_ready = 0, + /// + /// wlan_interface_state_connected -> 1 + /// + wlan_interface_state_connected = 1, + /// + /// wlan_interface_state_ad_hoc_network_formed -> 2 + /// + wlan_interface_state_ad_hoc_network_formed = 2, + /// + /// wlan_interface_state_disconnecting -> 3 + /// + wlan_interface_state_disconnecting = 3, + /// + /// wlan_interface_state_disconnected -> 4 + /// + wlan_interface_state_disconnected = 4, + /// + /// wlan_interface_state_associating -> 5 + /// + wlan_interface_state_associating = 5, + /// + /// wlan_interface_state_discovering -> 6 + /// + wlan_interface_state_discovering = 6, + /// + /// wlan_interface_state_authenticating -> 7 + /// + wlan_interface_state_authenticating = 7, + } + + + /// + /// Stores interface info + /// + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + private struct WLAN_INTERFACE_INFO + { + /// GUID->_GUID + public Guid InterfaceGuid; + + /// WCHAR[256] + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string strInterfaceDescription; + + /// WLAN_INTERFACE_STATE->_WLAN_INTERFACE_STATE + public WLAN_INTERFACE_STATE isState; + } + + /// + /// Contains an array of NIC information + /// + [StructLayout(LayoutKind.Sequential)] + private struct WLAN_INTERFACE_INFO_LIST + { + /// + /// Length of array + /// + public Int32 dwNumberOfItems; + /// + /// This member is not used by the wireless service. Applications can use this member when processing individual interfaces. + /// + public Int32 dwIndex; + /// + /// Array of WLAN interfaces. + /// + public WLAN_INTERFACE_INFO[] InterfaceInfo; + + /// + /// Constructor for WLAN_INTERFACE_INFO_LIST. + /// Constructor is needed because the InterfaceInfo member varies based on how many adapters are in the system. + /// + /// the unmanaged pointer containing the list. + public WLAN_INTERFACE_INFO_LIST(IntPtr pList) + { + // The first 4 bytes are the number of WLAN_INTERFACE_INFO structures. + dwNumberOfItems = Marshal.ReadInt32(pList, 0); + + // The next 4 bytes are the index of the current item in the unmanaged API. + dwIndex = Marshal.ReadInt32(pList, 4); + + // Construct the array of WLAN_INTERFACE_INFO structures. + InterfaceInfo = new WLAN_INTERFACE_INFO[dwNumberOfItems]; + + for (int i = 0; i <= dwNumberOfItems - 1; i++) + { + // The offset of the array of structures is 8 bytes past the beginning. + // Then, take the index and multiply it by the number of bytes in the + // structure. + // The length of the WLAN_INTERFACE_INFO structure is 532 bytes - this + // was determined by doing a Marshall.SizeOf(WLAN_INTERFACE_INFO) + IntPtr pItemList = new IntPtr(pList.ToInt64() + (i * 532) + 8); + + // Construct the WLAN_INTERFACE_INFO structure, marshal the unmanaged + // structure into it, then copy it to the array of structures. + InterfaceInfo[i] = (WLAN_INTERFACE_INFO)Marshal.PtrToStructure(pItemList, typeof(WLAN_INTERFACE_INFO)); + } + } + } + + #endregion + + } +} diff --git a/Disco.Client/Presentation.cs b/Disco.Client/Presentation.cs index c1c41fd8..791c5241 100644 --- a/Disco.Client/Presentation.cs +++ b/Disco.Client/Presentation.cs @@ -1,104 +1,104 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading; -using Disco.Client.Extensions; - -namespace Disco.Client -{ - public static class Presentation - { - public static bool DelayUI { get; set; } - - private static string EscapeMessage(this string Message) - { - if (!string.IsNullOrEmpty(Message)) - return Message.Replace(",", "{comma}").Replace(Environment.NewLine, "{newline}"); - else - return null; - } - public static void UpdateStatus(string SubHeading, string Message, bool ShowProgress, int Progress, int TryDelay) - { - Presentation.UpdateStatus(SubHeading, Message, ShowProgress, Progress); - if (TryDelay > 0) - Presentation.TryDelay(TryDelay); - } - public static void UpdateStatus(string SubHeading, string Message, bool ShowProgress, int Progress) - { - Console.WriteLine("#{0},{1},{2},{3}", SubHeading.EscapeMessage(), Message.EscapeMessage(), ShowProgress.ToString(), Progress.ToString()); - } - public static void TryDelay(int Milliseconds) - { - if (DelayUI) - Thread.Sleep(Milliseconds); - } - - public static void WriteBanner() - { - StringBuilder message = new StringBuilder(); - message.Append("Version: ").AppendLine(Assembly.GetExecutingAssembly().GetName().Version.ToString(3)); - message.Append("Device: ").Append(Interop.SystemAudit.DeviceSerialNumber).Append(" (").Append(Interop.SystemAudit.DeviceManufacturer).Append(" ").Append(Interop.SystemAudit.DeviceModel).AppendLine(")"); - Console.ForegroundColor = ConsoleColor.Yellow; - UpdateStatus("Preparation Client Started", message.ToString(), false, 0); - Console.ForegroundColor = ConsoleColor.White; - TryDelay(3000); - } - public static void WriteFatalError(Exception ex) - { - - Console.ForegroundColor = ConsoleColor.Magenta; - ClientServiceException clientServiceException = ex as ClientServiceException; - if (clientServiceException != null) - { - UpdateStatus(string.Format("An error occurred during {0}", clientServiceException.ServiceFeature), - clientServiceException.Message, false, 0); - } - else - { - StringBuilder message = new StringBuilder(); - message.Append("Type: ").AppendLine(ex.GetType().Name); - message.Append("Message: ").AppendLine(ex.Message); - message.Append("Source: ").AppendLine(ex.Source); - message.Append("Stack: ").AppendLine(ex.StackTrace); - UpdateStatus("An error occurred", message.ToString(), false, 0); - } - Console.ForegroundColor = ConsoleColor.White; - - TryDelay(30000); - } - public static void WriteFooter(bool RebootRequired, bool AllowUninstall, bool ErrorEncountered) - { - Console.ForegroundColor = ConsoleColor.Yellow; - - if (ErrorEncountered) - { - UpdateStatus("Client Finished due to Error", "An error occurred which caused the Preparation Client to stop running.", false, 0); - TryDelay(5000); - } - else - { - UpdateStatus("Client Finished Successfully", "The Preparation Client finished successfully.", false, 0); - TryDelay(1000); - } - - if (RebootRequired) - RegisterBootstrapperPostActions(ShutdownActions.Reboot, AllowUninstall && !ErrorEncountered); - else - RegisterBootstrapperPostActions(ShutdownActions.None, AllowUninstall && !ErrorEncountered); - } - - public static void RegisterBootstrapperPostActions(ShutdownActions ShutdownAction, bool Uninstall) - { - Console.WriteLine("!{0},{1}", Enum.GetName(typeof(ShutdownActions), ShutdownAction), Uninstall ? "UninstallBootstrapper" : "DontUninstallBootstrapper"); - } - public enum ShutdownActions - { - None, - Shutdown, - Reboot - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading; +using Disco.Client.Extensions; + +namespace Disco.Client +{ + public static class Presentation + { + public static bool DelayUI { get; set; } + + private static string EscapeMessage(this string Message) + { + if (!string.IsNullOrEmpty(Message)) + return Message.Replace(",", "{comma}").Replace(Environment.NewLine, "{newline}"); + else + return null; + } + public static void UpdateStatus(string SubHeading, string Message, bool ShowProgress, int Progress, int TryDelay) + { + Presentation.UpdateStatus(SubHeading, Message, ShowProgress, Progress); + if (TryDelay > 0) + Presentation.TryDelay(TryDelay); + } + public static void UpdateStatus(string SubHeading, string Message, bool ShowProgress, int Progress) + { + Console.WriteLine("#{0},{1},{2},{3}", SubHeading.EscapeMessage(), Message.EscapeMessage(), ShowProgress.ToString(), Progress.ToString()); + } + public static void TryDelay(int Milliseconds) + { + if (DelayUI) + Thread.Sleep(Milliseconds); + } + + public static void WriteBanner() + { + StringBuilder message = new StringBuilder(); + message.Append("Version: ").AppendLine(Assembly.GetExecutingAssembly().GetName().Version.ToString(3)); + message.Append("Device: ").Append(Interop.SystemAudit.DeviceSerialNumber).Append(" (").Append(Interop.SystemAudit.DeviceManufacturer).Append(" ").Append(Interop.SystemAudit.DeviceModel).AppendLine(")"); + Console.ForegroundColor = ConsoleColor.Yellow; + UpdateStatus("Preparation Client Started", message.ToString(), false, 0); + Console.ForegroundColor = ConsoleColor.White; + TryDelay(3000); + } + public static void WriteFatalError(Exception ex) + { + + Console.ForegroundColor = ConsoleColor.Magenta; + ClientServiceException clientServiceException = ex as ClientServiceException; + if (clientServiceException != null) + { + UpdateStatus(string.Format("An error occurred during {0}", clientServiceException.ServiceFeature), + clientServiceException.Message, false, 0); + } + else + { + StringBuilder message = new StringBuilder(); + message.Append("Type: ").AppendLine(ex.GetType().Name); + message.Append("Message: ").AppendLine(ex.Message); + message.Append("Source: ").AppendLine(ex.Source); + message.Append("Stack: ").AppendLine(ex.StackTrace); + UpdateStatus("An error occurred", message.ToString(), false, 0); + } + Console.ForegroundColor = ConsoleColor.White; + + TryDelay(30000); + } + public static void WriteFooter(bool RebootRequired, bool AllowUninstall, bool ErrorEncountered) + { + Console.ForegroundColor = ConsoleColor.Yellow; + + if (ErrorEncountered) + { + UpdateStatus("Client Finished due to Error", "An error occurred which caused the Preparation Client to stop running.", false, 0); + TryDelay(5000); + } + else + { + UpdateStatus("Client Finished Successfully", "The Preparation Client finished successfully.", false, 0); + TryDelay(1000); + } + + if (RebootRequired) + RegisterBootstrapperPostActions(ShutdownActions.Reboot, AllowUninstall && !ErrorEncountered); + else + RegisterBootstrapperPostActions(ShutdownActions.None, AllowUninstall && !ErrorEncountered); + } + + public static void RegisterBootstrapperPostActions(ShutdownActions ShutdownAction, bool Uninstall) + { + Console.WriteLine("!{0},{1}", Enum.GetName(typeof(ShutdownActions), ShutdownAction), Uninstall ? "UninstallBootstrapper" : "DontUninstallBootstrapper"); + } + public enum ShutdownActions + { + None, + Shutdown, + Reboot + } + + } +} diff --git a/Disco.Client/Program.cs b/Disco.Client/Program.cs index 5a320fb4..8bb62bab 100644 --- a/Disco.Client/Program.cs +++ b/Disco.Client/Program.cs @@ -1,137 +1,137 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using Disco.Models.ClientServices; -using Disco.Client.Extensions; - -namespace Disco.Client -{ - public static class Program - { - public static bool IsAuthenticated { get; set; } - public static bool RebootRequired { get; set; } - public static bool AllowUninstall { get; set; } - - [STAThread] - public static void Main(string[] args) - { - bool keepProcessing; - - // Initialize Environment Settings - SetupEnvironment(); - - // Report to Bootstrapper - Presentation.WriteBanner(); - - // WhoAmI Phase - keepProcessing = Program.WhoAmI(); - - // Enrol Phase - if (keepProcessing) - keepProcessing = Program.Enrol(); - - // End conversation with Bootstrapper - Presentation.WriteFooter(Program.RebootRequired, Program.AllowUninstall, !keepProcessing); - } - - public static void SetupEnvironment() - { - // Hookup Unhandled Error Handling - AppDomain.CurrentDomain.UnhandledException += ErrorReporting.CurrentDomain_UnhandledException; - - // Ignore Local Proxies - WebRequest.DefaultWebProxy = new WebProxy(); - // Override Http 100 Continue Behavour - ServicePointManager.Expect100Continue = false; - - // Assume success unless otherwise notified - AllowUninstall = true; - - // Detect Disco.Bootstrapper - Create Enable UI Delay if Running - try - { - Presentation.DelayUI = (System.Diagnostics.Process.GetProcessesByName("Disco.ClientBootstrapper").Length > 0); - } - catch (Exception) - { - Presentation.DelayUI = true; // Add Delays on Error - } - } - - public static bool WhoAmI() - { - try - { - - WhoAmIResponse response; - WhoAmI request; - - // Build Request - request = new WhoAmI(); - - // Send Request - Presentation.UpdateStatus("Connecting to Preparation Server", "Determining connection authentication, please wait...", true, -1); - response = request.Post(true); - - // Process Response - response.Process(); - - // Complete - return true; - } - catch (WebException webEx) - { - // Check for 'Unauthenticated' Connection - if ((webEx.Status == WebExceptionStatus.ProtocolError) && ((HttpWebResponse)webEx.Response).StatusCode == HttpStatusCode.Unauthorized) - { - WhoAmIExtensions.UnauthenticatedResponse(); - return true; - } - else - { - // Some other Web Error - ErrorReporting.ReportError(webEx, false); - } - } - catch (Exception ex) - { - ErrorReporting.ReportError(ex, true); - } - return false; - } - - public static bool Enrol() - { - try - { - Enrol request; - EnrolResponse response = null; - - // Build Request - Presentation.UpdateStatus("Enrolling Device", "Building enrolment request and preparing to send data to the server.", true, -1); - request = new Enrol(); - request.Build(); - - // Send Request - Presentation.UpdateStatus("Enrolling Device", "Sending the enrolment request to the server.", true, -1); - response = request.Post(Program.IsAuthenticated); - - // Process Response - Presentation.UpdateStatus("Enrolling Device", "Processing the enrolment response from the server.", true, -1); - response.Process(); - - // Complete - return true; - } - catch (Exception ex) - { - ErrorReporting.ReportError(ex, true); - return false; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using Disco.Models.ClientServices; +using Disco.Client.Extensions; + +namespace Disco.Client +{ + public static class Program + { + public static bool IsAuthenticated { get; set; } + public static bool RebootRequired { get; set; } + public static bool AllowUninstall { get; set; } + + [STAThread] + public static void Main(string[] args) + { + bool keepProcessing; + + // Initialize Environment Settings + SetupEnvironment(); + + // Report to Bootstrapper + Presentation.WriteBanner(); + + // WhoAmI Phase + keepProcessing = Program.WhoAmI(); + + // Enrol Phase + if (keepProcessing) + keepProcessing = Program.Enrol(); + + // End conversation with Bootstrapper + Presentation.WriteFooter(Program.RebootRequired, Program.AllowUninstall, !keepProcessing); + } + + public static void SetupEnvironment() + { + // Hookup Unhandled Error Handling + AppDomain.CurrentDomain.UnhandledException += ErrorReporting.CurrentDomain_UnhandledException; + + // Ignore Local Proxies + WebRequest.DefaultWebProxy = new WebProxy(); + // Override Http 100 Continue Behavour + ServicePointManager.Expect100Continue = false; + + // Assume success unless otherwise notified + AllowUninstall = true; + + // Detect Disco.Bootstrapper - Create Enable UI Delay if Running + try + { + Presentation.DelayUI = (System.Diagnostics.Process.GetProcessesByName("Disco.ClientBootstrapper").Length > 0); + } + catch (Exception) + { + Presentation.DelayUI = true; // Add Delays on Error + } + } + + public static bool WhoAmI() + { + try + { + + WhoAmIResponse response; + WhoAmI request; + + // Build Request + request = new WhoAmI(); + + // Send Request + Presentation.UpdateStatus("Connecting to Preparation Server", "Determining connection authentication, please wait...", true, -1); + response = request.Post(true); + + // Process Response + response.Process(); + + // Complete + return true; + } + catch (WebException webEx) + { + // Check for 'Unauthenticated' Connection + if ((webEx.Status == WebExceptionStatus.ProtocolError) && ((HttpWebResponse)webEx.Response).StatusCode == HttpStatusCode.Unauthorized) + { + WhoAmIExtensions.UnauthenticatedResponse(); + return true; + } + else + { + // Some other Web Error + ErrorReporting.ReportError(webEx, false); + } + } + catch (Exception ex) + { + ErrorReporting.ReportError(ex, true); + } + return false; + } + + public static bool Enrol() + { + try + { + Enrol request; + EnrolResponse response = null; + + // Build Request + Presentation.UpdateStatus("Enrolling Device", "Building enrolment request and preparing to send data to the server.", true, -1); + request = new Enrol(); + request.Build(); + + // Send Request + Presentation.UpdateStatus("Enrolling Device", "Sending the enrolment request to the server.", true, -1); + response = request.Post(Program.IsAuthenticated); + + // Process Response + Presentation.UpdateStatus("Enrolling Device", "Processing the enrolment response from the server.", true, -1); + response.Process(); + + // Complete + return true; + } + catch (Exception ex) + { + ErrorReporting.ReportError(ex, true); + return false; + } + } + + } +} diff --git a/Disco.Client/Properties/app.manifest b/Disco.Client/Properties/app.manifest index 66b901b5..b0eb1447 100644 --- a/Disco.Client/Properties/app.manifest +++ b/Disco.Client/Properties/app.manifest @@ -1,48 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Disco.Client/Start.bat b/Disco.Client/Start.bat index 51d657a0..a8df9249 100644 --- a/Disco.Client/Start.bat +++ b/Disco.Client/Start.bat @@ -1,9 +1,9 @@ -@ECHO OFF -IF /I "%USERDOMAIN%"=="NT AUTHORITY" GOTO RunAsNetworkService -Disco.Client.exe -EXIT /B 0 - -:RunAsNetworkService -ECHO #Running,Launching Preparation Client, Please wait...{newline}Starting client as 'NT AUTHORITY\Network Service',true,-1 -PsExec -acceptula -i -u "NT AUTHORITY\Network Service" -w "%CD%" "%CD%\Start.bat" +@ECHO OFF +IF /I "%USERDOMAIN%"=="NT AUTHORITY" GOTO RunAsNetworkService +Disco.Client.exe +EXIT /B 0 + +:RunAsNetworkService +ECHO #Running,Launching Preparation Client, Please wait...{newline}Starting client as 'NT AUTHORITY\Network Service',true,-1 +PsExec -acceptula -i -u "NT AUTHORITY\Network Service" -w "%CD%" "%CD%\Start.bat" EXIT /B 0 \ No newline at end of file diff --git a/Disco.Client/packages.config b/Disco.Client/packages.config index d0a33249..da0a611a 100644 --- a/Disco.Client/packages.config +++ b/Disco.Client/packages.config @@ -1,4 +1,4 @@ - - - + + + \ No newline at end of file diff --git a/Disco.ClientBootstrapper/BootstrapperLoop.cs b/Disco.ClientBootstrapper/BootstrapperLoop.cs index ac9a06d1..883a077f 100644 --- a/Disco.ClientBootstrapper/BootstrapperLoop.cs +++ b/Disco.ClientBootstrapper/BootstrapperLoop.cs @@ -1,252 +1,252 @@ -//#define Debug - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Net; -using System.IO; -using System.Diagnostics; - -namespace Disco.ClientBootstrapper -{ - class BootstrapperLoop - { - - public Thread LoopThread; - public delegate void LoopCompleteCallback(); - private LoopCompleteCallback mLoopCompleteCallback; - private IStatus statusUI; - private string tempWorkingDirectory; - private StringBuilder errorMessage; - private Process clientProcess; - - public BootstrapperLoop(IStatus StatusUI, LoopCompleteCallback Callback) - { - this.statusUI = StatusUI; - this.mLoopCompleteCallback = Callback; - this.errorMessage = new StringBuilder(); - } - - public void Start() - { - this.LoopThread = new Thread(new ThreadStart(loopHost)); - this.LoopThread.Start(); - } - - private void loopHost() - { - try - { - loop(); - } - catch (Exception ex) - { - if (ex.GetType() == typeof(ThreadAbortException)) - return; - if (ex.GetType() == typeof(ThreadInterruptedException)) - return; - Program.WriteAppError(ex); - throw; - } - } - - private void loop() - { - -#if Debug - statusUI.UpdateStatus("Waiting for Debugger", "Please wait...", true, -1); - try - { - do - { - System.Threading.Thread.Sleep(10); - } while (!System.Diagnostics.Debugger.IsAttached); - } - catch (Exception ex) - { - statusUI.UpdateStatus("Error", ex.Message, true, -1); - return; - } -#else - statusUI.UpdateStatus("System Preparation (Bootstrapper)", "Starting", "Please wait...", true, -1); -#endif - - tempWorkingDirectory = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Disco\\Temp"); - if (!Directory.Exists(tempWorkingDirectory)) - Directory.CreateDirectory(tempWorkingDirectory); - - // Check for Network Connectivity - statusUI.UpdateStatus(null, "Detecting Network", "Checking network connectivity, Please wait...", true, -1); - if (!Interop.NetworkInterop.PingDisco()) - { - statusUI.UpdateStatus(null, "Detecting Network", "No network connectivity detected, Diagnosing...", true, -1); - statusUI_WriteAdapterInfo(); - - if (!Interop.NetworkInterop.PingDisco()) - { - // Check for Wireless - var hasWireless = (Interop.NetworkInterop.NetworkAdapters.Count(na => na.IsWireless) > 0); - if (hasWireless) - { - // True: Do wireless loop - statusUI.UpdateStatus(null, "Configuring Wireless Network", "Wireless adapter detected, Configuring...", true, -1); - Interop.NetworkInterop.ConfigureWireless(); - statusUI.UpdateStatus(null, "Waiting for Wireless Network", null, true, 0); - for (int i = 0; i < 100; i++) - { - statusUI_WriteAdapterInfo(); - statusUI.UpdateStatus(null, null, null, true, i); - Program.SleepThread(500, false); - if (Interop.NetworkInterop.PingDisco()) - break; - } - if (!Interop.NetworkInterop.PingDisco()) - { - statusUI.UpdateStatus(null, "Wireless Network Failed", "Unable to connect to the wireless network, please connect the network cable...", false); - Program.SleepThread(3000, false); - } - } - - if (!Interop.NetworkInterop.PingDisco()) - { - // Instruct user to connect network cable - statusUI.UpdateStatus(null, "Please connect the network cable", null); - for (int i = 0; i < 100; i++) - { - statusUI_WriteAdapterInfo(); - statusUI.UpdateStatus(null, null, null, true, i); - Program.SleepThread(500, false); - if (Interop.NetworkInterop.PingDisco()) - break; - } - } - } - - if (!Interop.NetworkInterop.PingDisco()) - { - // Client Failed - if (this.mLoopCompleteCallback != null) - { - this.mLoopCompleteCallback.BeginInvoke(null, null); - } - return; - } - } - - // Download Client - statusUI.UpdateStatus(null, "Downloading", "Retrieving Preparation Client, Please wait...", true, -1); - string clientSourceLocation = Path.Combine(tempWorkingDirectory, "PreparationClient.zip"); - using (var webClient = new WebClient()) - { - webClient.DownloadFile("http://disco:9292/Services/Client/PreparationClient", clientSourceLocation); - } - - // Unzip Client - statusUI.UpdateStatus(null, "Extracting", "Retrieving Preparation Client, Please wait...", true, -1); - string clientLocation = Path.Combine(tempWorkingDirectory, "PreparationClient"); - if (!Directory.Exists(clientLocation)) - Directory.CreateDirectory(clientLocation); - using (var clientSource = Ionic.Zip.ZipFile.Read(clientSourceLocation)) - { - clientSource.ExtractAll(clientLocation, Ionic.Zip.ExtractExistingFileAction.OverwriteSilently); - } - - // Launch Client - statusUI.UpdateStatus("System Preparation (Client)", "Running", "Launching Preparation Client, Please wait...", true, -1); - ProcessStartInfo clientProcessStart = new ProcessStartInfo(Path.Combine(clientLocation, "Start.bat")) - { - WorkingDirectory = clientLocation, - CreateNoWindow = true, - RedirectStandardOutput = true, - UseShellExecute = false, - }; - using (clientProcess = Process.Start(clientProcessStart)) - { - // Read StdOutput until End - try - { - clientProcess.OutputDataReceived += new DataReceivedEventHandler(clientProcess_OutputDataReceived); - clientProcess.BeginOutputReadLine(); - clientProcess.WaitForExit(); - } - catch (Exception) { throw; } - finally - { - try { clientProcess.CloseMainWindow(); } - catch (Exception) { } - } - } - clientProcess = null; - - // Cleanup - if (Directory.Exists(tempWorkingDirectory)) - Directory.Delete(tempWorkingDirectory, true); - Interop.CertificateInterop.RemoveTempCerts(); - - // Pause if Error - if (this.errorMessage.Length > 0) - { - Program.SleepThread(10000, true); - } - - // End Of Loop - if (this.mLoopCompleteCallback != null) - { - this.mLoopCompleteCallback.BeginInvoke(null, null); - } - } - - void statusUI_WriteAdapterInfo() - { - - var info = new StringBuilder(); - foreach (var na in Interop.NetworkInterop.NetworkAdapters) - { - if (na.IsWireless) - { - info.AppendLine(string.Format("{0}: {1}", na.NetConnectionID, na.WirelessConnectionStatusMeaning(na.WirelessConnectionStatus))); - } - else - { - info.AppendLine(string.Format("{0}: {1}", na.NetConnectionID, na.ConnectionStatusMeaning(na.ConnectionStatus))); - } - } - statusUI.UpdateStatus(null, null, info.ToString()); - - } - - void clientProcess_OutputDataReceived(object sender, DataReceivedEventArgs e) - { - if (!string.IsNullOrWhiteSpace(e.Data)) - { - System.Diagnostics.Debug.WriteLine(string.Format("OUTPUT: {0}", e.Data)); - var data = e.Data.Substring(1).Split(new char[] { ',' }); - switch (e.Data[0]) - { - case '#': - if (data.Length == 4) - { - statusUI.UpdateStatus(null, data[0].Replace("{comma}", ","), data[1].Replace("{comma}", ",").Replace("{newline}", Environment.NewLine), bool.Parse(data[2]), int.Parse(data[3])); - } - break; - case '!': - Program.PostBootstrapperActions = new List(data); - break; - } - } - } - - //void clientProcess_ErrorDataReceived(object sender, DataReceivedEventArgs e) - //{ - // if (!string.IsNullOrEmpty(e.Data)) - // { - // System.Diagnostics.Debug.WriteLine(string.Format("ERROR: {0}", e.Data)); - // this.errorMessage.AppendLine(e.Data); - // statusUI.UpdateStatus(null, "An Error Occurred", this.errorMessage.ToString(), false); - // } - //} - - } -} +//#define Debug + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Net; +using System.IO; +using System.Diagnostics; + +namespace Disco.ClientBootstrapper +{ + class BootstrapperLoop + { + + public Thread LoopThread; + public delegate void LoopCompleteCallback(); + private LoopCompleteCallback mLoopCompleteCallback; + private IStatus statusUI; + private string tempWorkingDirectory; + private StringBuilder errorMessage; + private Process clientProcess; + + public BootstrapperLoop(IStatus StatusUI, LoopCompleteCallback Callback) + { + this.statusUI = StatusUI; + this.mLoopCompleteCallback = Callback; + this.errorMessage = new StringBuilder(); + } + + public void Start() + { + this.LoopThread = new Thread(new ThreadStart(loopHost)); + this.LoopThread.Start(); + } + + private void loopHost() + { + try + { + loop(); + } + catch (Exception ex) + { + if (ex.GetType() == typeof(ThreadAbortException)) + return; + if (ex.GetType() == typeof(ThreadInterruptedException)) + return; + Program.WriteAppError(ex); + throw; + } + } + + private void loop() + { + +#if Debug + statusUI.UpdateStatus("Waiting for Debugger", "Please wait...", true, -1); + try + { + do + { + System.Threading.Thread.Sleep(10); + } while (!System.Diagnostics.Debugger.IsAttached); + } + catch (Exception ex) + { + statusUI.UpdateStatus("Error", ex.Message, true, -1); + return; + } +#else + statusUI.UpdateStatus("System Preparation (Bootstrapper)", "Starting", "Please wait...", true, -1); +#endif + + tempWorkingDirectory = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Disco\\Temp"); + if (!Directory.Exists(tempWorkingDirectory)) + Directory.CreateDirectory(tempWorkingDirectory); + + // Check for Network Connectivity + statusUI.UpdateStatus(null, "Detecting Network", "Checking network connectivity, Please wait...", true, -1); + if (!Interop.NetworkInterop.PingDisco()) + { + statusUI.UpdateStatus(null, "Detecting Network", "No network connectivity detected, Diagnosing...", true, -1); + statusUI_WriteAdapterInfo(); + + if (!Interop.NetworkInterop.PingDisco()) + { + // Check for Wireless + var hasWireless = (Interop.NetworkInterop.NetworkAdapters.Count(na => na.IsWireless) > 0); + if (hasWireless) + { + // True: Do wireless loop + statusUI.UpdateStatus(null, "Configuring Wireless Network", "Wireless adapter detected, Configuring...", true, -1); + Interop.NetworkInterop.ConfigureWireless(); + statusUI.UpdateStatus(null, "Waiting for Wireless Network", null, true, 0); + for (int i = 0; i < 100; i++) + { + statusUI_WriteAdapterInfo(); + statusUI.UpdateStatus(null, null, null, true, i); + Program.SleepThread(500, false); + if (Interop.NetworkInterop.PingDisco()) + break; + } + if (!Interop.NetworkInterop.PingDisco()) + { + statusUI.UpdateStatus(null, "Wireless Network Failed", "Unable to connect to the wireless network, please connect the network cable...", false); + Program.SleepThread(3000, false); + } + } + + if (!Interop.NetworkInterop.PingDisco()) + { + // Instruct user to connect network cable + statusUI.UpdateStatus(null, "Please connect the network cable", null); + for (int i = 0; i < 100; i++) + { + statusUI_WriteAdapterInfo(); + statusUI.UpdateStatus(null, null, null, true, i); + Program.SleepThread(500, false); + if (Interop.NetworkInterop.PingDisco()) + break; + } + } + } + + if (!Interop.NetworkInterop.PingDisco()) + { + // Client Failed + if (this.mLoopCompleteCallback != null) + { + this.mLoopCompleteCallback.BeginInvoke(null, null); + } + return; + } + } + + // Download Client + statusUI.UpdateStatus(null, "Downloading", "Retrieving Preparation Client, Please wait...", true, -1); + string clientSourceLocation = Path.Combine(tempWorkingDirectory, "PreparationClient.zip"); + using (var webClient = new WebClient()) + { + webClient.DownloadFile("http://disco:9292/Services/Client/PreparationClient", clientSourceLocation); + } + + // Unzip Client + statusUI.UpdateStatus(null, "Extracting", "Retrieving Preparation Client, Please wait...", true, -1); + string clientLocation = Path.Combine(tempWorkingDirectory, "PreparationClient"); + if (!Directory.Exists(clientLocation)) + Directory.CreateDirectory(clientLocation); + using (var clientSource = Ionic.Zip.ZipFile.Read(clientSourceLocation)) + { + clientSource.ExtractAll(clientLocation, Ionic.Zip.ExtractExistingFileAction.OverwriteSilently); + } + + // Launch Client + statusUI.UpdateStatus("System Preparation (Client)", "Running", "Launching Preparation Client, Please wait...", true, -1); + ProcessStartInfo clientProcessStart = new ProcessStartInfo(Path.Combine(clientLocation, "Start.bat")) + { + WorkingDirectory = clientLocation, + CreateNoWindow = true, + RedirectStandardOutput = true, + UseShellExecute = false, + }; + using (clientProcess = Process.Start(clientProcessStart)) + { + // Read StdOutput until End + try + { + clientProcess.OutputDataReceived += new DataReceivedEventHandler(clientProcess_OutputDataReceived); + clientProcess.BeginOutputReadLine(); + clientProcess.WaitForExit(); + } + catch (Exception) { throw; } + finally + { + try { clientProcess.CloseMainWindow(); } + catch (Exception) { } + } + } + clientProcess = null; + + // Cleanup + if (Directory.Exists(tempWorkingDirectory)) + Directory.Delete(tempWorkingDirectory, true); + Interop.CertificateInterop.RemoveTempCerts(); + + // Pause if Error + if (this.errorMessage.Length > 0) + { + Program.SleepThread(10000, true); + } + + // End Of Loop + if (this.mLoopCompleteCallback != null) + { + this.mLoopCompleteCallback.BeginInvoke(null, null); + } + } + + void statusUI_WriteAdapterInfo() + { + + var info = new StringBuilder(); + foreach (var na in Interop.NetworkInterop.NetworkAdapters) + { + if (na.IsWireless) + { + info.AppendLine(string.Format("{0}: {1}", na.NetConnectionID, na.WirelessConnectionStatusMeaning(na.WirelessConnectionStatus))); + } + else + { + info.AppendLine(string.Format("{0}: {1}", na.NetConnectionID, na.ConnectionStatusMeaning(na.ConnectionStatus))); + } + } + statusUI.UpdateStatus(null, null, info.ToString()); + + } + + void clientProcess_OutputDataReceived(object sender, DataReceivedEventArgs e) + { + if (!string.IsNullOrWhiteSpace(e.Data)) + { + System.Diagnostics.Debug.WriteLine(string.Format("OUTPUT: {0}", e.Data)); + var data = e.Data.Substring(1).Split(new char[] { ',' }); + switch (e.Data[0]) + { + case '#': + if (data.Length == 4) + { + statusUI.UpdateStatus(null, data[0].Replace("{comma}", ","), data[1].Replace("{comma}", ",").Replace("{newline}", Environment.NewLine), bool.Parse(data[2]), int.Parse(data[3])); + } + break; + case '!': + Program.PostBootstrapperActions = new List(data); + break; + } + } + } + + //void clientProcess_ErrorDataReceived(object sender, DataReceivedEventArgs e) + //{ + // if (!string.IsNullOrEmpty(e.Data)) + // { + // System.Diagnostics.Debug.WriteLine(string.Format("ERROR: {0}", e.Data)); + // this.errorMessage.AppendLine(e.Data); + // statusUI.UpdateStatus(null, "An Error Occurred", this.errorMessage.ToString(), false); + // } + //} + + } +} diff --git a/Disco.ClientBootstrapper/BootstrapperWorkstationInstall.vbs b/Disco.ClientBootstrapper/BootstrapperWorkstationInstall.vbs index 0b3f6a6b..2f6b883f 100644 --- a/Disco.ClientBootstrapper/BootstrapperWorkstationInstall.vbs +++ b/Disco.ClientBootstrapper/BootstrapperWorkstationInstall.vbs @@ -1,11 +1,11 @@ -Option Explicit - -Dim objShell, BootstrapperLocation - -Set objShell = CreateObject("WScript.Shell") - -BootstrapperLocation = Mid(WScript.ScriptFullName, 1, InStrRev(WScript.ScriptFullName, "\")) & "\Disco.ClientBootstrapper.exe" - -Call objShell.Run("""" & BootstrapperLocation & """ /Install", , True) - +Option Explicit + +Dim objShell, BootstrapperLocation + +Set objShell = CreateObject("WScript.Shell") + +BootstrapperLocation = Mid(WScript.ScriptFullName, 1, InStrRev(WScript.ScriptFullName, "\")) & "\Disco.ClientBootstrapper.exe" + +Call objShell.Run("""" & BootstrapperLocation & """ /Install", , True) + WScript.Echo "Disco Client Bootstrapper Installed" \ No newline at end of file diff --git a/Disco.ClientBootstrapper/Disco.ClientBootstrapper.csproj b/Disco.ClientBootstrapper/Disco.ClientBootstrapper.csproj index 42566031..e796d433 100644 --- a/Disco.ClientBootstrapper/Disco.ClientBootstrapper.csproj +++ b/Disco.ClientBootstrapper/Disco.ClientBootstrapper.csproj @@ -1,335 +1,335 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {15BD9561-A3C7-4608-9F7E-F1A1CFB60055} - WinExe - Properties - Disco.ClientBootstrapper - Disco.ClientBootstrapper - v4.0 - Client - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - Properties\app.manifest - - - true - bin\Debug\ - DEBUG;TRACE - full - AnyCPU - prompt - true - true - - - bin\Release\ - TRACE - true - pdbonly - AnyCPU - prompt - true - true - - - Icon.ico - - - OnOutputUpdated - - - - - - - - - - - - - - - - - DotNetZip\BZip2\BitWriter.cs - - - DotNetZip\BZip2\BZip2Compressor.cs - - - DotNetZip\BZip2\BZip2InputStream.cs - - - DotNetZip\BZip2\BZip2OutputStream.cs - - - DotNetZip\BZip2\ParallelBZip2OutputStream.cs - - - DotNetZip\BZip2\Rand.cs - - - DotNetZip\CRC32.cs - - - DotNetZip\Zip\ComHelper.cs - - - DotNetZip\Zip\EncryptionAlgorithm.cs - - - DotNetZip\Zip\Events.cs - - - DotNetZip\Zip\Exceptions.cs - - - DotNetZip\Zip\ExtractExistingFileAction.cs - - - DotNetZip\Zip\FileSelector.cs - - - DotNetZip\Zip\OffsetStream.cs - - - DotNetZip\Zip\Shared.cs - - - DotNetZip\Zip\WinZipAes.cs - - - DotNetZip\Zip\ZipConstants.cs - - - DotNetZip\Zip\ZipCrypto.cs - - - DotNetZip\Zip\ZipDirEntry.cs - - - DotNetZip\Zip\ZipEntry.cs - - - DotNetZip\Zip\ZipEntry.Extract.cs - - - DotNetZip\Zip\ZipEntry.Read.cs - - - DotNetZip\Zip\ZipEntry.Write.cs - - - DotNetZip\Zip\ZipEntrySource.cs - - - DotNetZip\Zip\ZipErrorAction.cs - - - DotNetZip\Zip\ZipFile.AddUpdate.cs - - - DotNetZip\Zip\ZipFile.Check.cs - - - DotNetZip\Zip\ZipFile.cs - - - DotNetZip\Zip\ZipFile.Events.cs - - - DotNetZip\Zip\ZipFile.Extract.cs - - - DotNetZip\Zip\ZipFile.Read.cs - - - DotNetZip\Zip\ZipFile.Save.cs - - - DotNetZip\Zip\ZipFile.SaveSelfExtractor.cs - - - DotNetZip\Zip\ZipFile.Selector.cs - - - DotNetZip\Zip\ZipFile.x-IEnumerable.cs - - - DotNetZip\Zip\ZipInputStream.cs - - - DotNetZip\Zip\ZipOutputStream.cs - - - DotNetZip\Zip\ZipSegmentedStream.cs - - - DotNetZip\Zlib\Deflate.cs - - - DotNetZip\Zlib\DeflateStream.cs - - - DotNetZip\Zlib\GZipStream.cs - - - DotNetZip\Zlib\Inflate.cs - - - DotNetZip\Zlib\InfTree.cs - - - DotNetZip\Zlib\ParallelDeflateOutputStream.cs - - - DotNetZip\Zlib\Tree.cs - - - DotNetZip\Zlib\Zlib.cs - - - DotNetZip\Zlib\ZlibBaseStream.cs - - - DotNetZip\Zlib\ZlibCodec.cs - - - DotNetZip\Zlib\ZlibConstants.cs - - - DotNetZip\Zlib\ZlibStream.cs - - - - - - Form - - - FormStatus.cs - - - - - - - - - - - - - FormStatus.cs - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - Always - - - - - - - - - - - - - - - COPY "$(TargetPath)" "$(ProjectDir)..\Disco.Web\ClientBin" - - + + + + Debug + x86 + 8.0.30703 + 2.0 + {15BD9561-A3C7-4608-9F7E-F1A1CFB60055} + WinExe + Properties + Disco.ClientBootstrapper + Disco.ClientBootstrapper + v4.0 + Client + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + Properties\app.manifest + + + true + bin\Debug\ + DEBUG;TRACE + full + AnyCPU + prompt + true + true + + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + prompt + true + true + + + Icon.ico + + + OnOutputUpdated + + + + + + + + + + + + + + + + + DotNetZip\BZip2\BitWriter.cs + + + DotNetZip\BZip2\BZip2Compressor.cs + + + DotNetZip\BZip2\BZip2InputStream.cs + + + DotNetZip\BZip2\BZip2OutputStream.cs + + + DotNetZip\BZip2\ParallelBZip2OutputStream.cs + + + DotNetZip\BZip2\Rand.cs + + + DotNetZip\CRC32.cs + + + DotNetZip\Zip\ComHelper.cs + + + DotNetZip\Zip\EncryptionAlgorithm.cs + + + DotNetZip\Zip\Events.cs + + + DotNetZip\Zip\Exceptions.cs + + + DotNetZip\Zip\ExtractExistingFileAction.cs + + + DotNetZip\Zip\FileSelector.cs + + + DotNetZip\Zip\OffsetStream.cs + + + DotNetZip\Zip\Shared.cs + + + DotNetZip\Zip\WinZipAes.cs + + + DotNetZip\Zip\ZipConstants.cs + + + DotNetZip\Zip\ZipCrypto.cs + + + DotNetZip\Zip\ZipDirEntry.cs + + + DotNetZip\Zip\ZipEntry.cs + + + DotNetZip\Zip\ZipEntry.Extract.cs + + + DotNetZip\Zip\ZipEntry.Read.cs + + + DotNetZip\Zip\ZipEntry.Write.cs + + + DotNetZip\Zip\ZipEntrySource.cs + + + DotNetZip\Zip\ZipErrorAction.cs + + + DotNetZip\Zip\ZipFile.AddUpdate.cs + + + DotNetZip\Zip\ZipFile.Check.cs + + + DotNetZip\Zip\ZipFile.cs + + + DotNetZip\Zip\ZipFile.Events.cs + + + DotNetZip\Zip\ZipFile.Extract.cs + + + DotNetZip\Zip\ZipFile.Read.cs + + + DotNetZip\Zip\ZipFile.Save.cs + + + DotNetZip\Zip\ZipFile.SaveSelfExtractor.cs + + + DotNetZip\Zip\ZipFile.Selector.cs + + + DotNetZip\Zip\ZipFile.x-IEnumerable.cs + + + DotNetZip\Zip\ZipInputStream.cs + + + DotNetZip\Zip\ZipOutputStream.cs + + + DotNetZip\Zip\ZipSegmentedStream.cs + + + DotNetZip\Zlib\Deflate.cs + + + DotNetZip\Zlib\DeflateStream.cs + + + DotNetZip\Zlib\GZipStream.cs + + + DotNetZip\Zlib\Inflate.cs + + + DotNetZip\Zlib\InfTree.cs + + + DotNetZip\Zlib\ParallelDeflateOutputStream.cs + + + DotNetZip\Zlib\Tree.cs + + + DotNetZip\Zlib\Zlib.cs + + + DotNetZip\Zlib\ZlibBaseStream.cs + + + DotNetZip\Zlib\ZlibCodec.cs + + + DotNetZip\Zlib\ZlibConstants.cs + + + DotNetZip\Zlib\ZlibStream.cs + + + + + + Form + + + FormStatus.cs + + + + + + + + + + + + + FormStatus.cs + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + False + Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + Always + + + + + + + + + + + + + + + COPY "$(TargetPath)" "$(ProjectDir)..\Disco.Web\ClientBin" + + \ No newline at end of file diff --git a/Disco.ClientBootstrapper/FormStatus.Designer.cs b/Disco.ClientBootstrapper/FormStatus.Designer.cs index 81e7df29..e8043801 100644 --- a/Disco.ClientBootstrapper/FormStatus.Designer.cs +++ b/Disco.ClientBootstrapper/FormStatus.Designer.cs @@ -1,125 +1,125 @@ -namespace Disco.ClientBootstrapper -{ - partial class FormStatus - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.labelHeading = new System.Windows.Forms.Label(); - this.progressBar = new System.Windows.Forms.ProgressBar(); - this.labelSubHeading = new System.Windows.Forms.Label(); - this.labelMessage = new System.Windows.Forms.Label(); - this.labelVersion = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // labelHeading - // - this.labelHeading.BackColor = System.Drawing.Color.Transparent; - this.labelHeading.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelHeading.Location = new System.Drawing.Point(15, 15); - this.labelHeading.Name = "labelHeading"; - this.labelHeading.Size = new System.Drawing.Size(270, 20); - this.labelHeading.TabIndex = 0; - this.labelHeading.Text = "System Preparation"; - // - // progressBar - // - this.progressBar.BackColor = System.Drawing.Color.White; - this.progressBar.Location = new System.Drawing.Point(15, 100); - this.progressBar.Margin = new System.Windows.Forms.Padding(2); - this.progressBar.MarqueeAnimationSpeed = 50; - this.progressBar.Name = "progressBar"; - this.progressBar.Size = new System.Drawing.Size(381, 15); - this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee; - this.progressBar.TabIndex = 1; - this.progressBar.Visible = false; - // - // labelSubHeading - // - this.labelSubHeading.BackColor = System.Drawing.Color.White; - this.labelSubHeading.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelSubHeading.Location = new System.Drawing.Point(15, 35); - this.labelSubHeading.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.labelSubHeading.Name = "labelSubHeading"; - this.labelSubHeading.Size = new System.Drawing.Size(381, 20); - this.labelSubHeading.TabIndex = 2; - // - // labelMessage - // - this.labelMessage.BackColor = System.Drawing.Color.White; - this.labelMessage.Location = new System.Drawing.Point(15, 55); - this.labelMessage.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.labelMessage.Name = "labelMessage"; - this.labelMessage.Size = new System.Drawing.Size(381, 60); - this.labelMessage.TabIndex = 3; - // - // labelVersion - // - this.labelVersion.BackColor = System.Drawing.Color.White; - this.labelVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelVersion.ForeColor = System.Drawing.Color.Gray; - this.labelVersion.Location = new System.Drawing.Point(229, 15); - this.labelVersion.Name = "labelVersion"; - this.labelVersion.Size = new System.Drawing.Size(167, 20); - this.labelVersion.TabIndex = 0; - this.labelVersion.Text = "Disco Bootstrapper v"; - this.labelVersion.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // FormStatus - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackgroundImage = global::Disco.ClientBootstrapper.Properties.Resources.Background_BW; - this.ClientSize = new System.Drawing.Size(411, 130); - this.Controls.Add(this.labelHeading); - this.Controls.Add(this.labelSubHeading); - this.Controls.Add(this.progressBar); - this.Controls.Add(this.labelVersion); - this.Controls.Add(this.labelMessage); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FormStatus"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Disco - Client Bootstrapper"; - this.TopMost = true; - this.TransparencyKey = System.Drawing.Color.Magenta; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Label labelHeading; - private System.Windows.Forms.ProgressBar progressBar; - private System.Windows.Forms.Label labelSubHeading; - private System.Windows.Forms.Label labelMessage; - private System.Windows.Forms.Label labelVersion; - } -} - +namespace Disco.ClientBootstrapper +{ + partial class FormStatus + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.labelHeading = new System.Windows.Forms.Label(); + this.progressBar = new System.Windows.Forms.ProgressBar(); + this.labelSubHeading = new System.Windows.Forms.Label(); + this.labelMessage = new System.Windows.Forms.Label(); + this.labelVersion = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // labelHeading + // + this.labelHeading.BackColor = System.Drawing.Color.Transparent; + this.labelHeading.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelHeading.Location = new System.Drawing.Point(15, 15); + this.labelHeading.Name = "labelHeading"; + this.labelHeading.Size = new System.Drawing.Size(270, 20); + this.labelHeading.TabIndex = 0; + this.labelHeading.Text = "System Preparation"; + // + // progressBar + // + this.progressBar.BackColor = System.Drawing.Color.White; + this.progressBar.Location = new System.Drawing.Point(15, 100); + this.progressBar.Margin = new System.Windows.Forms.Padding(2); + this.progressBar.MarqueeAnimationSpeed = 50; + this.progressBar.Name = "progressBar"; + this.progressBar.Size = new System.Drawing.Size(381, 15); + this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee; + this.progressBar.TabIndex = 1; + this.progressBar.Visible = false; + // + // labelSubHeading + // + this.labelSubHeading.BackColor = System.Drawing.Color.White; + this.labelSubHeading.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelSubHeading.Location = new System.Drawing.Point(15, 35); + this.labelSubHeading.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.labelSubHeading.Name = "labelSubHeading"; + this.labelSubHeading.Size = new System.Drawing.Size(381, 20); + this.labelSubHeading.TabIndex = 2; + // + // labelMessage + // + this.labelMessage.BackColor = System.Drawing.Color.White; + this.labelMessage.Location = new System.Drawing.Point(15, 55); + this.labelMessage.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.labelMessage.Name = "labelMessage"; + this.labelMessage.Size = new System.Drawing.Size(381, 60); + this.labelMessage.TabIndex = 3; + // + // labelVersion + // + this.labelVersion.BackColor = System.Drawing.Color.White; + this.labelVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelVersion.ForeColor = System.Drawing.Color.Gray; + this.labelVersion.Location = new System.Drawing.Point(229, 15); + this.labelVersion.Name = "labelVersion"; + this.labelVersion.Size = new System.Drawing.Size(167, 20); + this.labelVersion.TabIndex = 0; + this.labelVersion.Text = "Disco Bootstrapper v"; + this.labelVersion.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // FormStatus + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackgroundImage = global::Disco.ClientBootstrapper.Properties.Resources.Background_BW; + this.ClientSize = new System.Drawing.Size(411, 130); + this.Controls.Add(this.labelHeading); + this.Controls.Add(this.labelSubHeading); + this.Controls.Add(this.progressBar); + this.Controls.Add(this.labelVersion); + this.Controls.Add(this.labelMessage); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FormStatus"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Disco - Client Bootstrapper"; + this.TopMost = true; + this.TransparencyKey = System.Drawing.Color.Magenta; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labelHeading; + private System.Windows.Forms.ProgressBar progressBar; + private System.Windows.Forms.Label labelSubHeading; + private System.Windows.Forms.Label labelMessage; + private System.Windows.Forms.Label labelVersion; + } +} + diff --git a/Disco.ClientBootstrapper/FormStatus.cs b/Disco.ClientBootstrapper/FormStatus.cs index 77831965..191cbec6 100644 --- a/Disco.ClientBootstrapper/FormStatus.cs +++ b/Disco.ClientBootstrapper/FormStatus.cs @@ -1,82 +1,82 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; - -namespace Disco.ClientBootstrapper -{ - public partial class FormStatus : Form, IStatus - { - - private delegate void dUpdateStatus(string Heading, string SubHeading, string Message, Nullable ShowProgress, Nullable Progress); - private dUpdateStatus mUpdateStatus; - - public FormStatus() - { - InitializeComponent(); - - var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; - this.labelVersion.Text = string.Format("v{0}", version.ToString(3)); - - this.FormClosed += new FormClosedEventHandler(FormStatus_FormClosed); - - mUpdateStatus = new dUpdateStatus(UpdateStatusDo); - Cursor.Hide(); - } - - void FormStatus_FormClosed(object sender, FormClosedEventArgs e) - { - Cursor.Show(); - Program.ExitApplication(); - } - - public void UpdateStatus(string Heading, string SubHeading, string Message, Nullable ShowProgress = null, Nullable Progress = null) - { - try - { - this.Invoke(mUpdateStatus, Heading, SubHeading, Message, ShowProgress, Progress); - } - catch (Exception) { } - } - private void UpdateStatusDo(string Heading, string SubHeading, string Message, Nullable ShowProgress, Nullable Progress) - { - if (Heading != null) - if (this.labelHeading.Text != Heading) - this.labelHeading.Text = Heading; - if (SubHeading != null) - if (this.labelSubHeading.Text != SubHeading) - this.labelSubHeading.Text = SubHeading; - if (Message != null) - if (this.labelMessage.Text != Message) - this.labelMessage.Text = Message; - - if (ShowProgress.HasValue) - { - if (ShowProgress.Value) - { - this.progressBar.Visible = true; - if (Progress.HasValue) - { - if (Progress.Value > 0) - { - this.progressBar.Value = Math.Min(Progress.Value, 100); - this.progressBar.Style = ProgressBarStyle.Continuous; - } - else - { - this.progressBar.Style = ProgressBarStyle.Marquee; - } - } - } - else - { - this.progressBar.Visible = false; - } - } - } - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Disco.ClientBootstrapper +{ + public partial class FormStatus : Form, IStatus + { + + private delegate void dUpdateStatus(string Heading, string SubHeading, string Message, Nullable ShowProgress, Nullable Progress); + private dUpdateStatus mUpdateStatus; + + public FormStatus() + { + InitializeComponent(); + + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + this.labelVersion.Text = string.Format("v{0}", version.ToString(3)); + + this.FormClosed += new FormClosedEventHandler(FormStatus_FormClosed); + + mUpdateStatus = new dUpdateStatus(UpdateStatusDo); + Cursor.Hide(); + } + + void FormStatus_FormClosed(object sender, FormClosedEventArgs e) + { + Cursor.Show(); + Program.ExitApplication(); + } + + public void UpdateStatus(string Heading, string SubHeading, string Message, Nullable ShowProgress = null, Nullable Progress = null) + { + try + { + this.Invoke(mUpdateStatus, Heading, SubHeading, Message, ShowProgress, Progress); + } + catch (Exception) { } + } + private void UpdateStatusDo(string Heading, string SubHeading, string Message, Nullable ShowProgress, Nullable Progress) + { + if (Heading != null) + if (this.labelHeading.Text != Heading) + this.labelHeading.Text = Heading; + if (SubHeading != null) + if (this.labelSubHeading.Text != SubHeading) + this.labelSubHeading.Text = SubHeading; + if (Message != null) + if (this.labelMessage.Text != Message) + this.labelMessage.Text = Message; + + if (ShowProgress.HasValue) + { + if (ShowProgress.Value) + { + this.progressBar.Visible = true; + if (Progress.HasValue) + { + if (Progress.Value > 0) + { + this.progressBar.Value = Math.Min(Progress.Value, 100); + this.progressBar.Style = ProgressBarStyle.Continuous; + } + else + { + this.progressBar.Style = ProgressBarStyle.Marquee; + } + } + } + else + { + this.progressBar.Visible = false; + } + } + } + } +} diff --git a/Disco.ClientBootstrapper/FormStatus.resx b/Disco.ClientBootstrapper/FormStatus.resx index 29dcb1b3..1af7de15 100644 --- a/Disco.ClientBootstrapper/FormStatus.resx +++ b/Disco.ClientBootstrapper/FormStatus.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Disco.ClientBootstrapper/IStatus.cs b/Disco.ClientBootstrapper/IStatus.cs index dff2a4a8..706dc301 100644 --- a/Disco.ClientBootstrapper/IStatus.cs +++ b/Disco.ClientBootstrapper/IStatus.cs @@ -1,12 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.ClientBootstrapper -{ - interface IStatus - { - void UpdateStatus(string Heading, string SubHeading, string Message, Nullable ShowProgress = null, Nullable Progress = null); - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.ClientBootstrapper +{ + interface IStatus + { + void UpdateStatus(string Heading, string SubHeading, string Message, Nullable ShowProgress = null, Nullable Progress = null); + } +} diff --git a/Disco.ClientBootstrapper/InstallBootstrapper.vbs b/Disco.ClientBootstrapper/InstallBootstrapper.vbs index 1f120736..17e9439a 100644 --- a/Disco.ClientBootstrapper/InstallBootstrapper.vbs +++ b/Disco.ClientBootstrapper/InstallBootstrapper.vbs @@ -1,62 +1,62 @@ -Option Explicit - -Dim objFSO, objReg, objShell, objFile -Dim SourceFolder, DestinationFolder, GroupPolicyScriptLocation -Const HKLM = &H80000002 - -DestinationFolder = "C:\Disco" - -Set objFSO = CreateObject("Scripting.FileSystemObject") -Set objReg = GetObject("winmgmts:root\default:StdRegProv") -Set objShell = CreateObject("WScript.Shell") - -If objFSO.FolderExists(DestinationFolder) Then - Call objFSO.DeleteFolder(DestinationFolder) -End If -Call objFSO.CreateFolder(DestinationFolder) -SourceFolder = Mid(WScript.ScriptFullName, 1, InStrRev(WScript.ScriptFullName, "\")) -Call objFSO.CopyFile(SourceFolder & "*.*", DestinationFolder, True) - -GroupPolicyScriptLocation = objShell.ExpandEnvironmentStrings("%WinDir%\System32\GroupPolicy\Machine\Scripts\scripts.ini") -If objFSO.FileExists(GroupPolicyScriptLocation) Then - Call objFSO.DeleteFile(GroupPolicyScriptLocation) -End If -Set objFile = objFSO.CreateTextFile(GroupPolicyScriptLocation, True, True) -Call objFile.WriteLine() -Call objFile.WriteLine("[Startup]") -Call objFile.WriteLine("0CmdLine=C:\Disco\Disco.ClientBootstrapper.exe") -Call objFile.WriteLine("0Parameters=/Uninstall") -Call objFile.Close() -Set objFile = Nothing - -Set objFSO = Nothing - -Call objReg.SetDWORDValue(HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "HideStartupScripts", 0) -Call objReg.SetDWORDValue (HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunStartupScriptSync", 1) - -Call objReg.CreateKey(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Shutdown") -Call objReg.CreateKey(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "GPO-ID", "LocalGPO") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "SOM-ID", "Local") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "FileSysPath", "C:\WINDOWS\System32\GroupPolicy\Machine") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "DisplayName", "Local Group Policy") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "GPOName", "Local Group Policy") -Call objReg.SetDWORDValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "PSScriptOrder", 1) -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0", "Script", DestinationFolder & "\Disco.ClientBootstrapper.exe") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0", "Parameters", "/Uninstall") -Call objReg.SetDWORDValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0", "IsPowershell", 0) -Call objReg.SetBinaryValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0", "ExecTime", array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) - -Call objReg.CreateKey(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown") -Call objReg.CreateKey(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "GPO-ID", "LocalGPO") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "SOM-ID", "Local") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "FileSysPath", "C:\Windows\System32\GroupPolicy\Machine") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "DisplayName", "Local Group Policy") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "GPOName", "Local Group Policy") -Call objReg.SetDWORDValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "PSScriptOrder", 1) -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0", "Script", DestinationFolder & "\Disco.ClientBootstrapper.exe") -Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0", "Parameters", "/Uninstall") -Call objReg.SetBinaryValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0", "ExecTime", array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) - +Option Explicit + +Dim objFSO, objReg, objShell, objFile +Dim SourceFolder, DestinationFolder, GroupPolicyScriptLocation +Const HKLM = &H80000002 + +DestinationFolder = "C:\Disco" + +Set objFSO = CreateObject("Scripting.FileSystemObject") +Set objReg = GetObject("winmgmts:root\default:StdRegProv") +Set objShell = CreateObject("WScript.Shell") + +If objFSO.FolderExists(DestinationFolder) Then + Call objFSO.DeleteFolder(DestinationFolder) +End If +Call objFSO.CreateFolder(DestinationFolder) +SourceFolder = Mid(WScript.ScriptFullName, 1, InStrRev(WScript.ScriptFullName, "\")) +Call objFSO.CopyFile(SourceFolder & "*.*", DestinationFolder, True) + +GroupPolicyScriptLocation = objShell.ExpandEnvironmentStrings("%WinDir%\System32\GroupPolicy\Machine\Scripts\scripts.ini") +If objFSO.FileExists(GroupPolicyScriptLocation) Then + Call objFSO.DeleteFile(GroupPolicyScriptLocation) +End If +Set objFile = objFSO.CreateTextFile(GroupPolicyScriptLocation, True, True) +Call objFile.WriteLine() +Call objFile.WriteLine("[Startup]") +Call objFile.WriteLine("0CmdLine=C:\Disco\Disco.ClientBootstrapper.exe") +Call objFile.WriteLine("0Parameters=/Uninstall") +Call objFile.Close() +Set objFile = Nothing + +Set objFSO = Nothing + +Call objReg.SetDWORDValue(HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "HideStartupScripts", 0) +Call objReg.SetDWORDValue (HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunStartupScriptSync", 1) + +Call objReg.CreateKey(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Shutdown") +Call objReg.CreateKey(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "GPO-ID", "LocalGPO") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "SOM-ID", "Local") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "FileSysPath", "C:\WINDOWS\System32\GroupPolicy\Machine") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "DisplayName", "Local Group Policy") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "GPOName", "Local Group Policy") +Call objReg.SetDWORDValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0", "PSScriptOrder", 1) +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0", "Script", DestinationFolder & "\Disco.ClientBootstrapper.exe") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0", "Parameters", "/Uninstall") +Call objReg.SetDWORDValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0", "IsPowershell", 0) +Call objReg.SetBinaryValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0", "ExecTime", array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) + +Call objReg.CreateKey(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown") +Call objReg.CreateKey(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "GPO-ID", "LocalGPO") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "SOM-ID", "Local") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "FileSysPath", "C:\Windows\System32\GroupPolicy\Machine") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "DisplayName", "Local Group Policy") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "GPOName", "Local Group Policy") +Call objReg.SetDWORDValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0", "PSScriptOrder", 1) +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0", "Script", DestinationFolder & "\Disco.ClientBootstrapper.exe") +Call objReg.SetStringValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0", "Parameters", "/Uninstall") +Call objReg.SetBinaryValue(HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0", "ExecTime", array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) + Set objReg = Nothing \ No newline at end of file diff --git a/Disco.ClientBootstrapper/InstallLoop.cs b/Disco.ClientBootstrapper/InstallLoop.cs index fcddfbdf..e0482724 100644 --- a/Disco.ClientBootstrapper/InstallLoop.cs +++ b/Disco.ClientBootstrapper/InstallLoop.cs @@ -1,55 +1,55 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; - -namespace Disco.ClientBootstrapper -{ - class InstallLoop - { - - public Thread LoopThread; - public delegate void CompleteCallback(); - private CompleteCallback mCompleteCallback; - private string InstallLocation; - private string WimImageId; - - public InstallLoop(string InstallLocation, string WimImageId = null) - { - this.InstallLocation = InstallLocation; - this.WimImageId = WimImageId; - } - - public void Start(CompleteCallback Callback) - { - this.mCompleteCallback = Callback; - this.LoopThread = new Thread(new ThreadStart(loopHost)); - this.LoopThread.Start(); - } - private void loopHost() - { - try - { - - //Program.Status.UpdateStatus(null, null, "Testing UI"); - //Program.SleepThread(5000, false); - Interop.InstallInterop.Install(this.InstallLocation, this.WimImageId); - if (this.mCompleteCallback != null) - { - this.mCompleteCallback.BeginInvoke(null, null); - } - } - catch (Exception ex) - { - if (ex.GetType() == typeof(ThreadAbortException)) - return; - if (ex.GetType() == typeof(ThreadInterruptedException)) - return; - Program.WriteAppError(ex); - throw; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; + +namespace Disco.ClientBootstrapper +{ + class InstallLoop + { + + public Thread LoopThread; + public delegate void CompleteCallback(); + private CompleteCallback mCompleteCallback; + private string InstallLocation; + private string WimImageId; + + public InstallLoop(string InstallLocation, string WimImageId = null) + { + this.InstallLocation = InstallLocation; + this.WimImageId = WimImageId; + } + + public void Start(CompleteCallback Callback) + { + this.mCompleteCallback = Callback; + this.LoopThread = new Thread(new ThreadStart(loopHost)); + this.LoopThread.Start(); + } + private void loopHost() + { + try + { + + //Program.Status.UpdateStatus(null, null, "Testing UI"); + //Program.SleepThread(5000, false); + Interop.InstallInterop.Install(this.InstallLocation, this.WimImageId); + if (this.mCompleteCallback != null) + { + this.mCompleteCallback.BeginInvoke(null, null); + } + } + catch (Exception ex) + { + if (ex.GetType() == typeof(ThreadAbortException)) + return; + if (ex.GetType() == typeof(ThreadInterruptedException)) + return; + Program.WriteAppError(ex); + throw; + } + } + + } +} diff --git a/Disco.ClientBootstrapper/Interop/CertificateInterop.cs b/Disco.ClientBootstrapper/Interop/CertificateInterop.cs index 86711850..89a777be 100644 --- a/Disco.ClientBootstrapper/Interop/CertificateInterop.cs +++ b/Disco.ClientBootstrapper/Interop/CertificateInterop.cs @@ -1,180 +1,180 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Security.Cryptography.X509Certificates; -using System.Text.RegularExpressions; -using System.IO; - -namespace Disco.ClientBootstrapper.Interop -{ - public static class CertificateInterop - { - private static List _tempCerts; - public static void RemoveTempCerts() - { - if (_tempCerts != null && _tempCerts.Count > 0) - { - Remove(StoreName.My, StoreLocation.LocalMachine, _tempCerts); - Remove(StoreName.CertificateAuthority, StoreLocation.LocalMachine, _tempCerts); - Remove(StoreName.Root, StoreLocation.LocalMachine, _tempCerts); - } - } - public static void AddTempCerts() - { - if (_tempCerts == null) - _tempCerts = new List(); - - var inlineCertificateLocation = Program.InlinePath.Value; - - // Root Certificates - try - { - var CertFiles = Directory.EnumerateFiles(inlineCertificateLocation, "WLAN_Cert_Root_*.*").ToList(); - if (CertFiles.Count > 0) - { - foreach (var certFile in CertFiles) - { - var cert = new X509Certificate2(File.ReadAllBytes(certFile), "password"); - var result = Add(StoreName.Root, StoreLocation.LocalMachine, cert); - if (result) - { - if (Path.GetFileNameWithoutExtension(certFile).ToLower().Contains("temp")) - _tempCerts.Add(cert.SerialNumber); - Program.Status.UpdateStatus(null, null, string.Format("Added Root Certificate: {0}", cert.ShortSubjectName())); - Program.SleepThread(500, false); - } - } - } - } - catch (Exception) - { - throw; - } - - // Intermediate Certificates - try - { - var CertFiles = Directory.EnumerateFiles(inlineCertificateLocation, "WLAN_Cert_Intermediate_*.*").ToList(); - if (CertFiles.Count > 0) - { - foreach (var certFile in CertFiles) - { - var cert = new X509Certificate2(File.ReadAllBytes(certFile), "password"); - var result = Add(StoreName.CertificateAuthority, StoreLocation.LocalMachine, cert); - if (result) - { - if (Path.GetFileNameWithoutExtension(certFile).ToLower().Contains("temp")) - _tempCerts.Add(cert.SerialNumber); - Program.Status.UpdateStatus(null, null, string.Format("Added Intermediate Certificate: {0}", cert.ShortSubjectName())); - Program.SleepThread(500, false); - } - } - } - } - catch (Exception) - { - throw; - } - - // Host/Personal Certificates - try - { - var CertFiles = Directory.EnumerateFiles(inlineCertificateLocation, "WLAN_Cert_Personal_*.*").ToList(); - if (CertFiles.Count > 0) - { - foreach (var certFile in CertFiles) - { - var cert = new X509Certificate2(File.ReadAllBytes(certFile), "password", X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet); - var result = Add(StoreName.My, StoreLocation.LocalMachine, cert); - if (result) - { - if (Path.GetFileNameWithoutExtension(certFile).ToLower().Contains("temp")) - _tempCerts.Add(cert.SerialNumber); - Program.Status.UpdateStatus(null, null, string.Format("Added Host Certificate: {0}", cert.ShortSubjectName())); - Program.SleepThread(500, false); - } - } - } - } - catch (Exception) - { - throw; - } - } - - public static string ShortSubjectName(this X509Certificate2 Certificate) - { - string s = Certificate.Subject; - return s.Substring(s.IndexOf("=") + 1, s.IndexOf(",") - s.IndexOf("=") - 1); - } - - public static bool Add(StoreName StoreName, StoreLocation StoreLocation, X509Certificate2 Certificate) - { - var certStore = new X509Store(StoreName, StoreLocation); - bool certAlreadyExists = false; - certStore.Open(OpenFlags.ReadWrite); - foreach (var cert in certStore.Certificates) - { - if (cert.SerialNumber.Equals(Certificate.SerialNumber)) - { - certAlreadyExists = true; - break; - } - } - if (!certAlreadyExists) - { - certStore.Add(Certificate); - } - certStore.Close(); - return !certAlreadyExists; - } - - public static bool Remove(StoreName StoreName, StoreLocation StoreLocation, List RegexMatches, string SerialException) - { - var certStore = new X509Store(StoreName, StoreLocation); - var removeCerts = new List(); - certStore.Open(OpenFlags.ReadWrite); - foreach (var cert in certStore.Certificates) - { - if (!cert.SerialNumber.Equals(SerialException)) - { - foreach (var subjectRegex in RegexMatches) - { - if (subjectRegex.IsMatch(cert.Subject)) - { - removeCerts.Add(cert); - break; - } - } - } - } - foreach (var cert in removeCerts) - { - certStore.Remove(cert); - } - certStore.Close(); - return (removeCerts.Count > 0); - } - public static bool Remove(StoreName StoreName, StoreLocation StoreLocation, List CertificateSerials) - { - var certStore = new X509Store(StoreName, StoreLocation); - var removeCerts = new List(); - certStore.Open(OpenFlags.ReadWrite); - foreach (var cert in certStore.Certificates) - { - if (CertificateSerials.Contains(cert.SerialNumber)) - { - removeCerts.Add(cert); - } - } - foreach (var cert in removeCerts) - { - certStore.Remove(cert); - } - certStore.Close(); - return (removeCerts.Count > 0); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Security.Cryptography.X509Certificates; +using System.Text.RegularExpressions; +using System.IO; + +namespace Disco.ClientBootstrapper.Interop +{ + public static class CertificateInterop + { + private static List _tempCerts; + public static void RemoveTempCerts() + { + if (_tempCerts != null && _tempCerts.Count > 0) + { + Remove(StoreName.My, StoreLocation.LocalMachine, _tempCerts); + Remove(StoreName.CertificateAuthority, StoreLocation.LocalMachine, _tempCerts); + Remove(StoreName.Root, StoreLocation.LocalMachine, _tempCerts); + } + } + public static void AddTempCerts() + { + if (_tempCerts == null) + _tempCerts = new List(); + + var inlineCertificateLocation = Program.InlinePath.Value; + + // Root Certificates + try + { + var CertFiles = Directory.EnumerateFiles(inlineCertificateLocation, "WLAN_Cert_Root_*.*").ToList(); + if (CertFiles.Count > 0) + { + foreach (var certFile in CertFiles) + { + var cert = new X509Certificate2(File.ReadAllBytes(certFile), "password"); + var result = Add(StoreName.Root, StoreLocation.LocalMachine, cert); + if (result) + { + if (Path.GetFileNameWithoutExtension(certFile).ToLower().Contains("temp")) + _tempCerts.Add(cert.SerialNumber); + Program.Status.UpdateStatus(null, null, string.Format("Added Root Certificate: {0}", cert.ShortSubjectName())); + Program.SleepThread(500, false); + } + } + } + } + catch (Exception) + { + throw; + } + + // Intermediate Certificates + try + { + var CertFiles = Directory.EnumerateFiles(inlineCertificateLocation, "WLAN_Cert_Intermediate_*.*").ToList(); + if (CertFiles.Count > 0) + { + foreach (var certFile in CertFiles) + { + var cert = new X509Certificate2(File.ReadAllBytes(certFile), "password"); + var result = Add(StoreName.CertificateAuthority, StoreLocation.LocalMachine, cert); + if (result) + { + if (Path.GetFileNameWithoutExtension(certFile).ToLower().Contains("temp")) + _tempCerts.Add(cert.SerialNumber); + Program.Status.UpdateStatus(null, null, string.Format("Added Intermediate Certificate: {0}", cert.ShortSubjectName())); + Program.SleepThread(500, false); + } + } + } + } + catch (Exception) + { + throw; + } + + // Host/Personal Certificates + try + { + var CertFiles = Directory.EnumerateFiles(inlineCertificateLocation, "WLAN_Cert_Personal_*.*").ToList(); + if (CertFiles.Count > 0) + { + foreach (var certFile in CertFiles) + { + var cert = new X509Certificate2(File.ReadAllBytes(certFile), "password", X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet); + var result = Add(StoreName.My, StoreLocation.LocalMachine, cert); + if (result) + { + if (Path.GetFileNameWithoutExtension(certFile).ToLower().Contains("temp")) + _tempCerts.Add(cert.SerialNumber); + Program.Status.UpdateStatus(null, null, string.Format("Added Host Certificate: {0}", cert.ShortSubjectName())); + Program.SleepThread(500, false); + } + } + } + } + catch (Exception) + { + throw; + } + } + + public static string ShortSubjectName(this X509Certificate2 Certificate) + { + string s = Certificate.Subject; + return s.Substring(s.IndexOf("=") + 1, s.IndexOf(",") - s.IndexOf("=") - 1); + } + + public static bool Add(StoreName StoreName, StoreLocation StoreLocation, X509Certificate2 Certificate) + { + var certStore = new X509Store(StoreName, StoreLocation); + bool certAlreadyExists = false; + certStore.Open(OpenFlags.ReadWrite); + foreach (var cert in certStore.Certificates) + { + if (cert.SerialNumber.Equals(Certificate.SerialNumber)) + { + certAlreadyExists = true; + break; + } + } + if (!certAlreadyExists) + { + certStore.Add(Certificate); + } + certStore.Close(); + return !certAlreadyExists; + } + + public static bool Remove(StoreName StoreName, StoreLocation StoreLocation, List RegexMatches, string SerialException) + { + var certStore = new X509Store(StoreName, StoreLocation); + var removeCerts = new List(); + certStore.Open(OpenFlags.ReadWrite); + foreach (var cert in certStore.Certificates) + { + if (!cert.SerialNumber.Equals(SerialException)) + { + foreach (var subjectRegex in RegexMatches) + { + if (subjectRegex.IsMatch(cert.Subject)) + { + removeCerts.Add(cert); + break; + } + } + } + } + foreach (var cert in removeCerts) + { + certStore.Remove(cert); + } + certStore.Close(); + return (removeCerts.Count > 0); + } + public static bool Remove(StoreName StoreName, StoreLocation StoreLocation, List CertificateSerials) + { + var certStore = new X509Store(StoreName, StoreLocation); + var removeCerts = new List(); + certStore.Open(OpenFlags.ReadWrite); + foreach (var cert in certStore.Certificates) + { + if (CertificateSerials.Contains(cert.SerialNumber)) + { + removeCerts.Add(cert); + } + } + foreach (var cert in removeCerts) + { + certStore.Remove(cert); + } + certStore.Close(); + return (removeCerts.Count > 0); + } + + } +} diff --git a/Disco.ClientBootstrapper/Interop/InstallInterop.cs b/Disco.ClientBootstrapper/Interop/InstallInterop.cs index a615465f..82f34e13 100644 --- a/Disco.ClientBootstrapper/Interop/InstallInterop.cs +++ b/Disco.ClientBootstrapper/Interop/InstallInterop.cs @@ -1,525 +1,525 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.Diagnostics; -using System.Runtime.InteropServices; -using Microsoft.Win32; -using System.IO; -using System.Threading; - -namespace Disco.ClientBootstrapper.Interop -{ - public static class InstallInterop - { - [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - static extern bool MoveFileEx(string lpExistingFileName, string lpNewFileName, MoveFileFlags dwFlags); - [Flags] - enum MoveFileFlags - { - MOVEFILE_REPLACE_EXISTING = 0x00000001, - MOVEFILE_COPY_ALLOWED = 0x00000002, - MOVEFILE_DELAY_UNTIL_REBOOT = 0x00000004, - MOVEFILE_WRITE_THROUGH = 0x00000008, - MOVEFILE_CREATE_HARDLINK = 0x00000010, - MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x00000020 - } - - private static void Install(string RootFilesystemLocation, RegistryKey RootRegistryLocation, string FilesystemInstallLocation, string VirtualRootFilesystemLocation) - { - var SourceLocation = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); - var InstallLocation = Path.Combine(RootFilesystemLocation, FilesystemInstallLocation); - var BootstrapperCmdLinePath = Path.Combine(VirtualRootFilesystemLocation, FilesystemInstallLocation, "Disco.ClientBootstrapper.exe"); - - var GroupPolicyScriptsIniLocation = Path.Combine(RootFilesystemLocation, "Windows\\System32\\GroupPolicy\\Machine\\Scripts\\scripts.ini"); - var GroupPolicyScriptsIniBackupLocation = Path.Combine(RootFilesystemLocation, "Windows\\System32\\GroupPolicy\\Machine\\Scripts\\disco_scripts.ini"); - - // Create file system Location - #region "Create File System Location" - Program.Status.UpdateStatus(null, null, "Creating Installation Location"); - Program.SleepThread(500, false); - if (Directory.Exists(InstallLocation)) - { - // Try and Delete Directory - try - { - Directory.Delete(InstallLocation, true); - } - catch (Exception ex) - { - throw new IOException(string.Format("Unable to delete folder: ", InstallLocation), ex); - } - } - if (!Directory.Exists(InstallLocation)) - { - var installDir = Directory.CreateDirectory(InstallLocation); - installDir.Attributes = installDir.Attributes | FileAttributes.Hidden; - } - #endregion - - // Copy files to file system location - #region "Copy to File System" - Program.Status.UpdateStatus(null, null, "Copying Files"); - Program.SleepThread(500, false); - - // Copy Bootstrapper - // ie: Executing Assembly - File.Copy(System.Reflection.Assembly.GetExecutingAssembly().Location, Path.Combine(InstallLocation, "Disco.ClientBootstrapper.exe")); - - foreach (var file in Directory.EnumerateFiles(SourceLocation)) - { - var fileName = Path.GetFileName(file); - - // Only Copy Certain Files - - // Copy Wireless Certificates - if (fileName.StartsWith("WLAN_Cert_Root_", StringComparison.InvariantCultureIgnoreCase) || - fileName.StartsWith("WLAN_Cert_Intermediate_", StringComparison.InvariantCultureIgnoreCase) || - fileName.StartsWith("WLAN_Cert_Personal_", StringComparison.InvariantCultureIgnoreCase)) - File.Copy(file, Path.Combine(InstallLocation, fileName)); - - // Copy Wireless Profiles - if (fileName.StartsWith("WLAN_Profile_", StringComparison.InvariantCultureIgnoreCase) && - fileName.EndsWith(".xml", StringComparison.InvariantCultureIgnoreCase)) - File.Copy(file, Path.Combine(InstallLocation, fileName)); - - } - #endregion - - // Backup & Create Group Policy Scripts.ini - #region "Group Policy Scripts.ini" - Program.Status.UpdateStatus(null, null, "Creating Group Policy Script Entry"); - Program.SleepThread(500, false); - // Backup - if (!File.Exists(GroupPolicyScriptsIniBackupLocation)) - { - if (File.Exists(GroupPolicyScriptsIniLocation)) - { - File.Move(GroupPolicyScriptsIniLocation, GroupPolicyScriptsIniBackupLocation); - } - } - - // Create - if (File.Exists(GroupPolicyScriptsIniLocation)) - File.Delete(GroupPolicyScriptsIniLocation); - if (!Directory.Exists(Path.GetDirectoryName(GroupPolicyScriptsIniLocation))) - Directory.CreateDirectory(Path.GetDirectoryName(GroupPolicyScriptsIniLocation)); - using (var scriptsIniStream = File.Open(GroupPolicyScriptsIniLocation, FileMode.Create, FileAccess.Write)) - { - using (var scriptsIniStreamWriter = new StreamWriter(scriptsIniStream, Encoding.Unicode)) - { - scriptsIniStreamWriter.Write(string.Format("[Startup]{0}0CmdLine={1}{0}0Parameters=/AllowUninstall", Environment.NewLine, BootstrapperCmdLinePath)); - scriptsIniStreamWriter.Flush(); - } - } - #endregion - - // Backup & Create Group Policy Registry - #region "Group Policy Registry" - Program.Status.UpdateStatus(null, null, "Creating Group Policy Registry Entries"); - Program.SleepThread(500, false); - // Backup Scripts - using (var regGroupPolicy = RootRegistryLocation.OpenSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy", true)) - { - if (regGroupPolicy != null && regGroupPolicy.GetSubKeyNames().Contains("Scripts") && !regGroupPolicy.GetSubKeyNames().Contains("Disco_Scripts")) - { - RegistryUtilities.RenameSubKey(regGroupPolicy, "Scripts", "Disco_Scripts"); - } - } - - // Create Scripts - RootRegistryLocation.CreateSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Shutdown").Dispose(); - using (var regScriptsStartup = RootRegistryLocation.CreateSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Startup\\0")) - { - regScriptsStartup.SetValue("GPO-ID", "LocalGPO", RegistryValueKind.String); - regScriptsStartup.SetValue("SOM-ID", "Local", RegistryValueKind.String); - regScriptsStartup.SetValue("FileSysPath", Path.Combine(Environment.SystemDirectory, "GroupPolicy\\Machine"), RegistryValueKind.String); - regScriptsStartup.SetValue("DisplayName", "Local Group Policy", RegistryValueKind.String); - regScriptsStartup.SetValue("GPOName", "Local Group Policy", RegistryValueKind.String); - regScriptsStartup.SetValue("PSScriptOrder", 1, RegistryValueKind.DWord); - using (var regScriptsStartup0 = regScriptsStartup.CreateSubKey("0")) - { - regScriptsStartup0.SetValue("Script", BootstrapperCmdLinePath, RegistryValueKind.String); - regScriptsStartup0.SetValue("Parameters", "/AllowUninstall", RegistryValueKind.String); - regScriptsStartup0.SetValue("IsPowershell", 0, RegistryValueKind.DWord); - regScriptsStartup0.SetValue("ExecTime", new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, RegistryValueKind.Binary); - } - } - RootRegistryLocation.CreateSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown").Dispose(); - - // Backup Scripts State - using (var regGroupPolicy = RootRegistryLocation.OpenSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine", true)) - { - if (regGroupPolicy != null && regGroupPolicy.GetSubKeyNames().Contains("Scripts") && !regGroupPolicy.GetSubKeyNames().Contains("Disco_Scripts")) - { - RegistryUtilities.RenameSubKey(regGroupPolicy, "Scripts", "Disco_Scripts"); - } - } - - // Create Scripts State - using (var regStateScriptsStartup = RootRegistryLocation.CreateSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Startup\\0")) - { - regStateScriptsStartup.SetValue("GPO-ID", "LocalGPO", RegistryValueKind.String); - regStateScriptsStartup.SetValue("SOM-ID", "Local", RegistryValueKind.String); - regStateScriptsStartup.SetValue("FileSysPath", Path.Combine(Environment.SystemDirectory, "GroupPolicy\\Machine"), RegistryValueKind.String); - regStateScriptsStartup.SetValue("DisplayName", "Local Group Policy", RegistryValueKind.String); - regStateScriptsStartup.SetValue("GPOName", "Local Group Policy", RegistryValueKind.String); - regStateScriptsStartup.SetValue("PSScriptOrder", 1, RegistryValueKind.DWord); - using (var regStateScriptsStartup0 = regStateScriptsStartup.CreateSubKey("0")) - { - regStateScriptsStartup0.SetValue("Script", BootstrapperCmdLinePath, RegistryValueKind.String); - regStateScriptsStartup0.SetValue("Parameters", "/AllowUninstall", RegistryValueKind.String); - regStateScriptsStartup0.SetValue("ExecTime", new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, RegistryValueKind.Binary); - } - } - #endregion - - // Set Registry Startup Environment Policies - #region "Registry Startup Policies" - Program.Status.UpdateStatus(null, null, "Creating Startup Policy Registry Entries"); - Program.SleepThread(500, false); - using (var regWinlogon = RootRegistryLocation.OpenSubKey("Microsoft\\Windows NT\\CurrentVersion\\Winlogon", true)) - { - regWinlogon.SetValue("HideStartupScripts", 0, RegistryValueKind.DWord); - regWinlogon.SetValue("RunStartupScriptSync", 1, RegistryValueKind.DWord); - } - #endregion - } - - public static void Install(string InstallLocation, string WimImageId = null) - { - Program.Status.UpdateStatus("Installing Bootstrapper", "Starting", "Please wait...", false); - - if (string.IsNullOrWhiteSpace(InstallLocation)) - InstallLocation = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Disco"); - - if (InstallLocation.EndsWith(".wim", StringComparison.InvariantCultureIgnoreCase)) - { - // Offline File System (WIM) - Program.Status.UpdateStatus("Installing Bootstrapper (Offline)", "Installing", string.Format("Install Location: {0}", InstallLocation)); - Program.SleepThread(1000, false); - - // Mount WIM - int wimImageIndex = 0; - using (var wim = new Interop.WIMInterop.WindowsImageContainer(InstallLocation, WIMInterop.WindowsImageContainer.CreateFileMode.OpenExisting, WIMInterop.WindowsImageContainer.CreateFileAccess.Write)) - { - if (WimImageId == null) - WimImageId = "1"; - if (!int.TryParse(WimImageId, out wimImageIndex)) - { - Program.Status.UpdateStatus(null, "Analysing WIM", string.Format("Looking for Image Name: {0}", WimImageId)); - Program.SleepThread(500, false); - for (int i = 0; i < wim.ImageCount; i++) - { - var wimImageInfo = new System.Xml.XmlDocument(); - using (var wimImage = wim[i]) - wimImageInfo.LoadXml(wimImage.ImageInformation); - var wimImageInfoName = wimImageInfo.SelectSingleNode("//IMAGE/NAME"); - if (wimImageInfoName != null && wimImageInfoName.InnerText.Equals(WimImageId, StringComparison.InvariantCultureIgnoreCase)) - { - wimImageIndex = i + 1; - Program.Status.UpdateStatus(null, "Analysing WIM", string.Format("Found Image Id '{0}' at Index {1}", WimImageId, wimImageIndex)); - Program.SleepThread(500, false); - break; - } - } - } - } - if (wimImageIndex == 0) - { - Program.Status.UpdateStatus(null, "Error", string.Format("Unable to load WIM Image Id: {0}", WimImageId)); - Program.SleepThread(5000, false); - return; - } - - // Get Temp Path - var wimMountPath = Path.Combine(Path.GetTempPath(), "DiscoClientBootstrapperWimMount"); - if (Directory.Exists(wimMountPath)) - Directory.Delete(wimMountPath, true); - Directory.CreateDirectory(wimMountPath); - - var wimTempMountPath = Path.Combine(Path.GetTempPath(), "DiscoClientBootstrapperWimTempMount"); - if (Directory.Exists(wimTempMountPath)) - Directory.Delete(wimTempMountPath, true); - Directory.CreateDirectory(wimTempMountPath); - - bool wimCommitChanges = true; - Interop.WIMInterop.WindowsImageContainer.NativeMethods.MessageCallback m_MessageCallback = null; - try - { - // Mount WIM - Program.Status.UpdateStatus(null, "Mounting WIM", string.Format("Mounting WIM Image to '{0}'", wimMountPath)); - Program.SleepThread(500, false); - m_MessageCallback = new Interop.WIMInterop.WindowsImageContainer.NativeMethods.MessageCallback(WimImageEventMessagePump); - Interop.WIMInterop.WindowsImageContainer.NativeMethods.RegisterCallback(m_MessageCallback); - - Interop.WIMInterop.WindowsImageContainer.NativeMethods.MountImage(wimMountPath, InstallLocation, wimImageIndex, wimTempMountPath); - - // Load Local Machine Registry - var wimHivePath = Path.Combine(wimMountPath, "Windows\\System32\\config\\SOFTWARE"); - Program.Status.UpdateStatus(null, "Mounting Offline Registry Hive", string.Format("Mounting Offline Registry Hive at '{0}'", wimHivePath)); - Program.SleepThread(500, false); - using (var wimReg = new Interop.RegistryInterop(RegistryInterop.RegistryHives.HKEY_LOCAL_MACHINE, "DiscoClientBootstrapperWimHive", wimHivePath)) - { - using (RegistryKey rootRegistryLocation = Registry.LocalMachine.OpenSubKey("DiscoClientBootstrapperWimHive", true)) - { - string rootFileSystemLocation = wimMountPath; - string fileSystemInstallLocation = "Disco"; - string virtualRootFileSystemLocation = "C:\\"; - - Install(rootFileSystemLocation, rootRegistryLocation, fileSystemInstallLocation, virtualRootFileSystemLocation); - } - - // Unload Local Machine Registry - Program.Status.UpdateStatus(null, "Unmounting Offline Registry Hive", string.Format("Unmounting Offline Registry Hive at '{0}'", wimHivePath)); - Program.SleepThread(500, false); - wimReg.Unload(); - } - } - catch (Exception) - { - wimCommitChanges = false; - throw; - } - finally - { - // Unmount WIM - Program.Status.UpdateStatus(null, "Unmounting WIM", string.Format("Unmounting WIM Image at '{0}'", wimMountPath)); - Program.SleepThread(500, false); - Interop.WIMInterop.WindowsImageContainer.NativeMethods.DismountImage(wimMountPath, InstallLocation, wimImageIndex, wimCommitChanges); - - if (m_MessageCallback != null) - { - Interop.WIMInterop.WindowsImageContainer.NativeMethods.UnregisterMessageCallback(m_MessageCallback); - m_MessageCallback = null; - } - - if (Directory.Exists(wimMountPath)) - Directory.Delete(wimMountPath, true); - if (Directory.Exists(wimTempMountPath)) - Directory.Delete(wimTempMountPath, true); - } - } - else - { - // Online File System - Program.Status.UpdateStatus("Installing Bootstrapper (Online)", "Installing", string.Format("Install Location: {0}", InstallLocation), true, -1); - Program.SleepThread(1000, false); - string rootFileSystemLocation = Path.GetPathRoot(InstallLocation); - RegistryKey rootRegistryLocation = Registry.LocalMachine.OpenSubKey("SOFTWARE", true); - string fileSystemInstallLocation = InstallLocation.Substring(rootFileSystemLocation.Length); - - Install(rootFileSystemLocation, rootRegistryLocation, fileSystemInstallLocation, rootFileSystemLocation); - Program.Status.UpdateStatus(null, "Online File System Installation Complete", string.Empty, true, -1); - Program.SleepThread(1000, false); - } - Program.Status.UpdateStatus(null, "Complete", "Finished Installing Bootstrapper"); - Program.SleepThread(1500, false); - } - - private static uint WimImageEventMessagePump( - uint MessageId, - IntPtr wParam, - IntPtr lParam, - IntPtr UserData - ) - { - uint status = (uint)Interop.WIMInterop.WindowsImageContainer.NativeMethods.WIMMessage.WIM_MSG_SUCCESS; - Interop.WIMInterop.DefaultImageEventArgs eventArgs = new Interop.WIMInterop.DefaultImageEventArgs(wParam, lParam, UserData); - - //System.Diagnostics.Debug.WriteLine(MessageId); - - switch ((Interop.WIMInterop.WindowsImageContainer.ImageEventMessage)MessageId) - { - - case Interop.WIMInterop.WindowsImageContainer.ImageEventMessage.Progress: - case Interop.WIMInterop.WindowsImageContainer.ImageEventMessage.MountCleanupProgress: - var timeRemainingMil = eventArgs.LeftParameter.ToInt32(); - string timeRemainingMessage; - if (timeRemainingMil > 0) - timeRemainingMessage = TimeSpan.FromMilliseconds(timeRemainingMil).ToString(@"hh\:mm\:ss"); - else - timeRemainingMessage = "Calculating, please wait..."; - - var progress = eventArgs.WideParameter.ToInt32(); - Program.Status.UpdateStatus(null, null, string.Format("Time remaining: {0}", timeRemainingMessage), true, progress); - - break; - default: - break; - } - - return status; - } - - public static void Uninstall() - { - // Application Directory - var appDirectory = Program.InlinePath.Value; - if (Program.AllowUninstall && !appDirectory.StartsWith("\\\\")) - { - Program.Status.UpdateStatus("System Preparation (Bootstrapper)", "Uninstalling Bootstrapper...", string.Empty, false, 0); - Program.SleepThread(1000, true); - //var uninstallScriptLocation = System.IO.Path.Combine(appDirectory, "UninstallBootstrapper.vbs"); - //if (System.IO.File.Exists(uninstallScriptLocation)) - //{ - // var bootstrapperPID = System.Diagnostics.Process.GetCurrentProcess().Id; - // var cscriptPath = System.IO.Path.Combine(Environment.SystemDirectory, "cscript.exe"); - // var cscriptArgs = string.Format("\"{0}\" /WaitForProcessID:{1}", uninstallScriptLocation, bootstrapperPID); - - // var startProc = new ProcessStartInfo(cscriptPath, cscriptArgs); - // startProc.WorkingDirectory = Environment.SystemDirectory; - // startProc.WindowStyle = ProcessWindowStyle.Hidden; - - // Process.Start(startProc); - //} - - // Remove Registry Entries - using (var regWinlogon = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", true)) - { - regWinlogon.DeleteValue("HideStartupScripts", false); - regWinlogon.DeleteValue("RunStartupScriptSync", false); - } - Registry.LocalMachine.DeleteSubKeyTree("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Shutdown", false); - Registry.LocalMachine.DeleteSubKeyTree("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Startup", false); - Registry.LocalMachine.DeleteSubKeyTree("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown", false); - Registry.LocalMachine.DeleteSubKeyTree("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Startup", false); - - // Restore Registry Backups - using (var regGroupPolicy = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy", true)) - { - if (regGroupPolicy != null && regGroupPolicy.GetSubKeyNames().Contains("Disco_Scripts")) - { - regGroupPolicy.DeleteSubKeyTree("Scripts"); - RegistryUtilities.RenameSubKey(regGroupPolicy, "Disco_Scripts", "Scripts"); - } - } - using (var regGroupPolicy = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine", true)) - { - if (regGroupPolicy != null && regGroupPolicy.GetSubKeyNames().Contains("Disco_Scripts")) - { - regGroupPolicy.DeleteSubKeyTree("Scripts"); - RegistryUtilities.RenameSubKey(regGroupPolicy, "Disco_Scripts", "Scripts"); - } - } - - // Delete Group Policy Script File - var groupPolicyScriptsPath = Path.Combine(Environment.SystemDirectory, "GroupPolicy\\Machine\\Scripts\\scripts.ini"); - if (File.Exists(groupPolicyScriptsPath)) - File.Delete(groupPolicyScriptsPath); - var groupPolicyScriptsBackupPath = Path.Combine(Environment.SystemDirectory, "GroupPolicy\\Machine\\Scripts\\disco_scripts.ini"); - if (File.Exists(groupPolicyScriptsBackupPath)) - File.Move(groupPolicyScriptsBackupPath, groupPolicyScriptsPath); - - // Queue Folder for Deletion at next startup - ForceDeleteFolder(new DirectoryInfo(appDirectory)); - } - } - - private static void ForceDeleteFolder(DirectoryInfo d) - { - foreach (var sd in d.GetDirectories()) - ForceDeleteFolder(sd); - foreach (var f in d.GetFiles()) - { - try - { - File.Delete(f.FullName); - } - catch (Exception) - { - MoveFileEx(f.FullName, null, MoveFileFlags.MOVEFILE_DELAY_UNTIL_REBOOT); - } - } - - try - { - Directory.Delete(d.FullName); - } - catch (Exception) - { - MoveFileEx(d.FullName, null, MoveFileFlags.MOVEFILE_DELAY_UNTIL_REBOOT); - } - } - } - - public static class RegistryUtilities - { - /// - /// Renames a subkey of the passed in registry key since - /// the Framework totally forgot to include such a handy feature. - /// - /// The RegistryKey that contains the subkey - /// you want to rename (must be writeable) - /// The name of the subkey that you want to rename - /// - /// The new name of the RegistryKey - /// True if succeeds - public static bool RenameSubKey(RegistryKey parentKey, - string subKeyName, string newSubKeyName) - { - CopyKey(parentKey, subKeyName, newSubKeyName); - parentKey.DeleteSubKeyTree(subKeyName); - return true; - } - - /// - /// Copy a registry key. The parentKey must be writeable. - /// - /// - /// - /// - /// - public static bool CopyKey(RegistryKey parentKey, - string keyNameToCopy, string newKeyName) - { - //Create new key - using (RegistryKey destinationKey = parentKey.CreateSubKey(newKeyName)) - { - //Open the sourceKey we are copying from - using (RegistryKey sourceKey = parentKey.OpenSubKey(keyNameToCopy)) - { - RecurseCopyKey(sourceKey, destinationKey); - } - } - - return true; - } - - private static void RecurseCopyKey(RegistryKey sourceKey, RegistryKey destinationKey) - { - //copy all the values - foreach (string valueName in sourceKey.GetValueNames()) - { - object objValue = sourceKey.GetValue(valueName); - RegistryValueKind valKind = sourceKey.GetValueKind(valueName); - - if (valueName == "ExecTime") - { - destinationKey.SetValue(valueName, objValue, RegistryValueKind.Binary); - } - else - { - destinationKey.SetValue(valueName, objValue, valKind); - } - } - - //For Each subKey - //Create a new subKey in destinationKey - //Call myself - foreach (string sourceSubKeyName in sourceKey.GetSubKeyNames()) - { - using (RegistryKey sourceSubKey = sourceKey.OpenSubKey(sourceSubKeyName)) - { - using (RegistryKey destSubKey = destinationKey.CreateSubKey(sourceSubKeyName)) - { - RecurseCopyKey(sourceSubKey, destSubKey); - } - } - } - } - } - - -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.Diagnostics; +using System.Runtime.InteropServices; +using Microsoft.Win32; +using System.IO; +using System.Threading; + +namespace Disco.ClientBootstrapper.Interop +{ + public static class InstallInterop + { + [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] + static extern bool MoveFileEx(string lpExistingFileName, string lpNewFileName, MoveFileFlags dwFlags); + [Flags] + enum MoveFileFlags + { + MOVEFILE_REPLACE_EXISTING = 0x00000001, + MOVEFILE_COPY_ALLOWED = 0x00000002, + MOVEFILE_DELAY_UNTIL_REBOOT = 0x00000004, + MOVEFILE_WRITE_THROUGH = 0x00000008, + MOVEFILE_CREATE_HARDLINK = 0x00000010, + MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x00000020 + } + + private static void Install(string RootFilesystemLocation, RegistryKey RootRegistryLocation, string FilesystemInstallLocation, string VirtualRootFilesystemLocation) + { + var SourceLocation = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); + var InstallLocation = Path.Combine(RootFilesystemLocation, FilesystemInstallLocation); + var BootstrapperCmdLinePath = Path.Combine(VirtualRootFilesystemLocation, FilesystemInstallLocation, "Disco.ClientBootstrapper.exe"); + + var GroupPolicyScriptsIniLocation = Path.Combine(RootFilesystemLocation, "Windows\\System32\\GroupPolicy\\Machine\\Scripts\\scripts.ini"); + var GroupPolicyScriptsIniBackupLocation = Path.Combine(RootFilesystemLocation, "Windows\\System32\\GroupPolicy\\Machine\\Scripts\\disco_scripts.ini"); + + // Create file system Location + #region "Create File System Location" + Program.Status.UpdateStatus(null, null, "Creating Installation Location"); + Program.SleepThread(500, false); + if (Directory.Exists(InstallLocation)) + { + // Try and Delete Directory + try + { + Directory.Delete(InstallLocation, true); + } + catch (Exception ex) + { + throw new IOException(string.Format("Unable to delete folder: ", InstallLocation), ex); + } + } + if (!Directory.Exists(InstallLocation)) + { + var installDir = Directory.CreateDirectory(InstallLocation); + installDir.Attributes = installDir.Attributes | FileAttributes.Hidden; + } + #endregion + + // Copy files to file system location + #region "Copy to File System" + Program.Status.UpdateStatus(null, null, "Copying Files"); + Program.SleepThread(500, false); + + // Copy Bootstrapper + // ie: Executing Assembly + File.Copy(System.Reflection.Assembly.GetExecutingAssembly().Location, Path.Combine(InstallLocation, "Disco.ClientBootstrapper.exe")); + + foreach (var file in Directory.EnumerateFiles(SourceLocation)) + { + var fileName = Path.GetFileName(file); + + // Only Copy Certain Files + + // Copy Wireless Certificates + if (fileName.StartsWith("WLAN_Cert_Root_", StringComparison.InvariantCultureIgnoreCase) || + fileName.StartsWith("WLAN_Cert_Intermediate_", StringComparison.InvariantCultureIgnoreCase) || + fileName.StartsWith("WLAN_Cert_Personal_", StringComparison.InvariantCultureIgnoreCase)) + File.Copy(file, Path.Combine(InstallLocation, fileName)); + + // Copy Wireless Profiles + if (fileName.StartsWith("WLAN_Profile_", StringComparison.InvariantCultureIgnoreCase) && + fileName.EndsWith(".xml", StringComparison.InvariantCultureIgnoreCase)) + File.Copy(file, Path.Combine(InstallLocation, fileName)); + + } + #endregion + + // Backup & Create Group Policy Scripts.ini + #region "Group Policy Scripts.ini" + Program.Status.UpdateStatus(null, null, "Creating Group Policy Script Entry"); + Program.SleepThread(500, false); + // Backup + if (!File.Exists(GroupPolicyScriptsIniBackupLocation)) + { + if (File.Exists(GroupPolicyScriptsIniLocation)) + { + File.Move(GroupPolicyScriptsIniLocation, GroupPolicyScriptsIniBackupLocation); + } + } + + // Create + if (File.Exists(GroupPolicyScriptsIniLocation)) + File.Delete(GroupPolicyScriptsIniLocation); + if (!Directory.Exists(Path.GetDirectoryName(GroupPolicyScriptsIniLocation))) + Directory.CreateDirectory(Path.GetDirectoryName(GroupPolicyScriptsIniLocation)); + using (var scriptsIniStream = File.Open(GroupPolicyScriptsIniLocation, FileMode.Create, FileAccess.Write)) + { + using (var scriptsIniStreamWriter = new StreamWriter(scriptsIniStream, Encoding.Unicode)) + { + scriptsIniStreamWriter.Write(string.Format("[Startup]{0}0CmdLine={1}{0}0Parameters=/AllowUninstall", Environment.NewLine, BootstrapperCmdLinePath)); + scriptsIniStreamWriter.Flush(); + } + } + #endregion + + // Backup & Create Group Policy Registry + #region "Group Policy Registry" + Program.Status.UpdateStatus(null, null, "Creating Group Policy Registry Entries"); + Program.SleepThread(500, false); + // Backup Scripts + using (var regGroupPolicy = RootRegistryLocation.OpenSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy", true)) + { + if (regGroupPolicy != null && regGroupPolicy.GetSubKeyNames().Contains("Scripts") && !regGroupPolicy.GetSubKeyNames().Contains("Disco_Scripts")) + { + RegistryUtilities.RenameSubKey(regGroupPolicy, "Scripts", "Disco_Scripts"); + } + } + + // Create Scripts + RootRegistryLocation.CreateSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Shutdown").Dispose(); + using (var regScriptsStartup = RootRegistryLocation.CreateSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Startup\\0")) + { + regScriptsStartup.SetValue("GPO-ID", "LocalGPO", RegistryValueKind.String); + regScriptsStartup.SetValue("SOM-ID", "Local", RegistryValueKind.String); + regScriptsStartup.SetValue("FileSysPath", Path.Combine(Environment.SystemDirectory, "GroupPolicy\\Machine"), RegistryValueKind.String); + regScriptsStartup.SetValue("DisplayName", "Local Group Policy", RegistryValueKind.String); + regScriptsStartup.SetValue("GPOName", "Local Group Policy", RegistryValueKind.String); + regScriptsStartup.SetValue("PSScriptOrder", 1, RegistryValueKind.DWord); + using (var regScriptsStartup0 = regScriptsStartup.CreateSubKey("0")) + { + regScriptsStartup0.SetValue("Script", BootstrapperCmdLinePath, RegistryValueKind.String); + regScriptsStartup0.SetValue("Parameters", "/AllowUninstall", RegistryValueKind.String); + regScriptsStartup0.SetValue("IsPowershell", 0, RegistryValueKind.DWord); + regScriptsStartup0.SetValue("ExecTime", new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, RegistryValueKind.Binary); + } + } + RootRegistryLocation.CreateSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown").Dispose(); + + // Backup Scripts State + using (var regGroupPolicy = RootRegistryLocation.OpenSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine", true)) + { + if (regGroupPolicy != null && regGroupPolicy.GetSubKeyNames().Contains("Scripts") && !regGroupPolicy.GetSubKeyNames().Contains("Disco_Scripts")) + { + RegistryUtilities.RenameSubKey(regGroupPolicy, "Scripts", "Disco_Scripts"); + } + } + + // Create Scripts State + using (var regStateScriptsStartup = RootRegistryLocation.CreateSubKey("Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Startup\\0")) + { + regStateScriptsStartup.SetValue("GPO-ID", "LocalGPO", RegistryValueKind.String); + regStateScriptsStartup.SetValue("SOM-ID", "Local", RegistryValueKind.String); + regStateScriptsStartup.SetValue("FileSysPath", Path.Combine(Environment.SystemDirectory, "GroupPolicy\\Machine"), RegistryValueKind.String); + regStateScriptsStartup.SetValue("DisplayName", "Local Group Policy", RegistryValueKind.String); + regStateScriptsStartup.SetValue("GPOName", "Local Group Policy", RegistryValueKind.String); + regStateScriptsStartup.SetValue("PSScriptOrder", 1, RegistryValueKind.DWord); + using (var regStateScriptsStartup0 = regStateScriptsStartup.CreateSubKey("0")) + { + regStateScriptsStartup0.SetValue("Script", BootstrapperCmdLinePath, RegistryValueKind.String); + regStateScriptsStartup0.SetValue("Parameters", "/AllowUninstall", RegistryValueKind.String); + regStateScriptsStartup0.SetValue("ExecTime", new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, RegistryValueKind.Binary); + } + } + #endregion + + // Set Registry Startup Environment Policies + #region "Registry Startup Policies" + Program.Status.UpdateStatus(null, null, "Creating Startup Policy Registry Entries"); + Program.SleepThread(500, false); + using (var regWinlogon = RootRegistryLocation.OpenSubKey("Microsoft\\Windows NT\\CurrentVersion\\Winlogon", true)) + { + regWinlogon.SetValue("HideStartupScripts", 0, RegistryValueKind.DWord); + regWinlogon.SetValue("RunStartupScriptSync", 1, RegistryValueKind.DWord); + } + #endregion + } + + public static void Install(string InstallLocation, string WimImageId = null) + { + Program.Status.UpdateStatus("Installing Bootstrapper", "Starting", "Please wait...", false); + + if (string.IsNullOrWhiteSpace(InstallLocation)) + InstallLocation = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Disco"); + + if (InstallLocation.EndsWith(".wim", StringComparison.InvariantCultureIgnoreCase)) + { + // Offline File System (WIM) + Program.Status.UpdateStatus("Installing Bootstrapper (Offline)", "Installing", string.Format("Install Location: {0}", InstallLocation)); + Program.SleepThread(1000, false); + + // Mount WIM + int wimImageIndex = 0; + using (var wim = new Interop.WIMInterop.WindowsImageContainer(InstallLocation, WIMInterop.WindowsImageContainer.CreateFileMode.OpenExisting, WIMInterop.WindowsImageContainer.CreateFileAccess.Write)) + { + if (WimImageId == null) + WimImageId = "1"; + if (!int.TryParse(WimImageId, out wimImageIndex)) + { + Program.Status.UpdateStatus(null, "Analysing WIM", string.Format("Looking for Image Name: {0}", WimImageId)); + Program.SleepThread(500, false); + for (int i = 0; i < wim.ImageCount; i++) + { + var wimImageInfo = new System.Xml.XmlDocument(); + using (var wimImage = wim[i]) + wimImageInfo.LoadXml(wimImage.ImageInformation); + var wimImageInfoName = wimImageInfo.SelectSingleNode("//IMAGE/NAME"); + if (wimImageInfoName != null && wimImageInfoName.InnerText.Equals(WimImageId, StringComparison.InvariantCultureIgnoreCase)) + { + wimImageIndex = i + 1; + Program.Status.UpdateStatus(null, "Analysing WIM", string.Format("Found Image Id '{0}' at Index {1}", WimImageId, wimImageIndex)); + Program.SleepThread(500, false); + break; + } + } + } + } + if (wimImageIndex == 0) + { + Program.Status.UpdateStatus(null, "Error", string.Format("Unable to load WIM Image Id: {0}", WimImageId)); + Program.SleepThread(5000, false); + return; + } + + // Get Temp Path + var wimMountPath = Path.Combine(Path.GetTempPath(), "DiscoClientBootstrapperWimMount"); + if (Directory.Exists(wimMountPath)) + Directory.Delete(wimMountPath, true); + Directory.CreateDirectory(wimMountPath); + + var wimTempMountPath = Path.Combine(Path.GetTempPath(), "DiscoClientBootstrapperWimTempMount"); + if (Directory.Exists(wimTempMountPath)) + Directory.Delete(wimTempMountPath, true); + Directory.CreateDirectory(wimTempMountPath); + + bool wimCommitChanges = true; + Interop.WIMInterop.WindowsImageContainer.NativeMethods.MessageCallback m_MessageCallback = null; + try + { + // Mount WIM + Program.Status.UpdateStatus(null, "Mounting WIM", string.Format("Mounting WIM Image to '{0}'", wimMountPath)); + Program.SleepThread(500, false); + m_MessageCallback = new Interop.WIMInterop.WindowsImageContainer.NativeMethods.MessageCallback(WimImageEventMessagePump); + Interop.WIMInterop.WindowsImageContainer.NativeMethods.RegisterCallback(m_MessageCallback); + + Interop.WIMInterop.WindowsImageContainer.NativeMethods.MountImage(wimMountPath, InstallLocation, wimImageIndex, wimTempMountPath); + + // Load Local Machine Registry + var wimHivePath = Path.Combine(wimMountPath, "Windows\\System32\\config\\SOFTWARE"); + Program.Status.UpdateStatus(null, "Mounting Offline Registry Hive", string.Format("Mounting Offline Registry Hive at '{0}'", wimHivePath)); + Program.SleepThread(500, false); + using (var wimReg = new Interop.RegistryInterop(RegistryInterop.RegistryHives.HKEY_LOCAL_MACHINE, "DiscoClientBootstrapperWimHive", wimHivePath)) + { + using (RegistryKey rootRegistryLocation = Registry.LocalMachine.OpenSubKey("DiscoClientBootstrapperWimHive", true)) + { + string rootFileSystemLocation = wimMountPath; + string fileSystemInstallLocation = "Disco"; + string virtualRootFileSystemLocation = "C:\\"; + + Install(rootFileSystemLocation, rootRegistryLocation, fileSystemInstallLocation, virtualRootFileSystemLocation); + } + + // Unload Local Machine Registry + Program.Status.UpdateStatus(null, "Unmounting Offline Registry Hive", string.Format("Unmounting Offline Registry Hive at '{0}'", wimHivePath)); + Program.SleepThread(500, false); + wimReg.Unload(); + } + } + catch (Exception) + { + wimCommitChanges = false; + throw; + } + finally + { + // Unmount WIM + Program.Status.UpdateStatus(null, "Unmounting WIM", string.Format("Unmounting WIM Image at '{0}'", wimMountPath)); + Program.SleepThread(500, false); + Interop.WIMInterop.WindowsImageContainer.NativeMethods.DismountImage(wimMountPath, InstallLocation, wimImageIndex, wimCommitChanges); + + if (m_MessageCallback != null) + { + Interop.WIMInterop.WindowsImageContainer.NativeMethods.UnregisterMessageCallback(m_MessageCallback); + m_MessageCallback = null; + } + + if (Directory.Exists(wimMountPath)) + Directory.Delete(wimMountPath, true); + if (Directory.Exists(wimTempMountPath)) + Directory.Delete(wimTempMountPath, true); + } + } + else + { + // Online File System + Program.Status.UpdateStatus("Installing Bootstrapper (Online)", "Installing", string.Format("Install Location: {0}", InstallLocation), true, -1); + Program.SleepThread(1000, false); + string rootFileSystemLocation = Path.GetPathRoot(InstallLocation); + RegistryKey rootRegistryLocation = Registry.LocalMachine.OpenSubKey("SOFTWARE", true); + string fileSystemInstallLocation = InstallLocation.Substring(rootFileSystemLocation.Length); + + Install(rootFileSystemLocation, rootRegistryLocation, fileSystemInstallLocation, rootFileSystemLocation); + Program.Status.UpdateStatus(null, "Online File System Installation Complete", string.Empty, true, -1); + Program.SleepThread(1000, false); + } + Program.Status.UpdateStatus(null, "Complete", "Finished Installing Bootstrapper"); + Program.SleepThread(1500, false); + } + + private static uint WimImageEventMessagePump( + uint MessageId, + IntPtr wParam, + IntPtr lParam, + IntPtr UserData + ) + { + uint status = (uint)Interop.WIMInterop.WindowsImageContainer.NativeMethods.WIMMessage.WIM_MSG_SUCCESS; + Interop.WIMInterop.DefaultImageEventArgs eventArgs = new Interop.WIMInterop.DefaultImageEventArgs(wParam, lParam, UserData); + + //System.Diagnostics.Debug.WriteLine(MessageId); + + switch ((Interop.WIMInterop.WindowsImageContainer.ImageEventMessage)MessageId) + { + + case Interop.WIMInterop.WindowsImageContainer.ImageEventMessage.Progress: + case Interop.WIMInterop.WindowsImageContainer.ImageEventMessage.MountCleanupProgress: + var timeRemainingMil = eventArgs.LeftParameter.ToInt32(); + string timeRemainingMessage; + if (timeRemainingMil > 0) + timeRemainingMessage = TimeSpan.FromMilliseconds(timeRemainingMil).ToString(@"hh\:mm\:ss"); + else + timeRemainingMessage = "Calculating, please wait..."; + + var progress = eventArgs.WideParameter.ToInt32(); + Program.Status.UpdateStatus(null, null, string.Format("Time remaining: {0}", timeRemainingMessage), true, progress); + + break; + default: + break; + } + + return status; + } + + public static void Uninstall() + { + // Application Directory + var appDirectory = Program.InlinePath.Value; + if (Program.AllowUninstall && !appDirectory.StartsWith("\\\\")) + { + Program.Status.UpdateStatus("System Preparation (Bootstrapper)", "Uninstalling Bootstrapper...", string.Empty, false, 0); + Program.SleepThread(1000, true); + //var uninstallScriptLocation = System.IO.Path.Combine(appDirectory, "UninstallBootstrapper.vbs"); + //if (System.IO.File.Exists(uninstallScriptLocation)) + //{ + // var bootstrapperPID = System.Diagnostics.Process.GetCurrentProcess().Id; + // var cscriptPath = System.IO.Path.Combine(Environment.SystemDirectory, "cscript.exe"); + // var cscriptArgs = string.Format("\"{0}\" /WaitForProcessID:{1}", uninstallScriptLocation, bootstrapperPID); + + // var startProc = new ProcessStartInfo(cscriptPath, cscriptArgs); + // startProc.WorkingDirectory = Environment.SystemDirectory; + // startProc.WindowStyle = ProcessWindowStyle.Hidden; + + // Process.Start(startProc); + //} + + // Remove Registry Entries + using (var regWinlogon = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", true)) + { + regWinlogon.DeleteValue("HideStartupScripts", false); + regWinlogon.DeleteValue("RunStartupScriptSync", false); + } + Registry.LocalMachine.DeleteSubKeyTree("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Shutdown", false); + Registry.LocalMachine.DeleteSubKeyTree("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\Scripts\\Startup", false); + Registry.LocalMachine.DeleteSubKeyTree("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Shutdown", false); + Registry.LocalMachine.DeleteSubKeyTree("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine\\Scripts\\Startup", false); + + // Restore Registry Backups + using (var regGroupPolicy = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy", true)) + { + if (regGroupPolicy != null && regGroupPolicy.GetSubKeyNames().Contains("Disco_Scripts")) + { + regGroupPolicy.DeleteSubKeyTree("Scripts"); + RegistryUtilities.RenameSubKey(regGroupPolicy, "Disco_Scripts", "Scripts"); + } + } + using (var regGroupPolicy = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\State\\Machine", true)) + { + if (regGroupPolicy != null && regGroupPolicy.GetSubKeyNames().Contains("Disco_Scripts")) + { + regGroupPolicy.DeleteSubKeyTree("Scripts"); + RegistryUtilities.RenameSubKey(regGroupPolicy, "Disco_Scripts", "Scripts"); + } + } + + // Delete Group Policy Script File + var groupPolicyScriptsPath = Path.Combine(Environment.SystemDirectory, "GroupPolicy\\Machine\\Scripts\\scripts.ini"); + if (File.Exists(groupPolicyScriptsPath)) + File.Delete(groupPolicyScriptsPath); + var groupPolicyScriptsBackupPath = Path.Combine(Environment.SystemDirectory, "GroupPolicy\\Machine\\Scripts\\disco_scripts.ini"); + if (File.Exists(groupPolicyScriptsBackupPath)) + File.Move(groupPolicyScriptsBackupPath, groupPolicyScriptsPath); + + // Queue Folder for Deletion at next startup + ForceDeleteFolder(new DirectoryInfo(appDirectory)); + } + } + + private static void ForceDeleteFolder(DirectoryInfo d) + { + foreach (var sd in d.GetDirectories()) + ForceDeleteFolder(sd); + foreach (var f in d.GetFiles()) + { + try + { + File.Delete(f.FullName); + } + catch (Exception) + { + MoveFileEx(f.FullName, null, MoveFileFlags.MOVEFILE_DELAY_UNTIL_REBOOT); + } + } + + try + { + Directory.Delete(d.FullName); + } + catch (Exception) + { + MoveFileEx(d.FullName, null, MoveFileFlags.MOVEFILE_DELAY_UNTIL_REBOOT); + } + } + } + + public static class RegistryUtilities + { + /// + /// Renames a subkey of the passed in registry key since + /// the Framework totally forgot to include such a handy feature. + /// + /// The RegistryKey that contains the subkey + /// you want to rename (must be writeable) + /// The name of the subkey that you want to rename + /// + /// The new name of the RegistryKey + /// True if succeeds + public static bool RenameSubKey(RegistryKey parentKey, + string subKeyName, string newSubKeyName) + { + CopyKey(parentKey, subKeyName, newSubKeyName); + parentKey.DeleteSubKeyTree(subKeyName); + return true; + } + + /// + /// Copy a registry key. The parentKey must be writeable. + /// + /// + /// + /// + /// + public static bool CopyKey(RegistryKey parentKey, + string keyNameToCopy, string newKeyName) + { + //Create new key + using (RegistryKey destinationKey = parentKey.CreateSubKey(newKeyName)) + { + //Open the sourceKey we are copying from + using (RegistryKey sourceKey = parentKey.OpenSubKey(keyNameToCopy)) + { + RecurseCopyKey(sourceKey, destinationKey); + } + } + + return true; + } + + private static void RecurseCopyKey(RegistryKey sourceKey, RegistryKey destinationKey) + { + //copy all the values + foreach (string valueName in sourceKey.GetValueNames()) + { + object objValue = sourceKey.GetValue(valueName); + RegistryValueKind valKind = sourceKey.GetValueKind(valueName); + + if (valueName == "ExecTime") + { + destinationKey.SetValue(valueName, objValue, RegistryValueKind.Binary); + } + else + { + destinationKey.SetValue(valueName, objValue, valKind); + } + } + + //For Each subKey + //Create a new subKey in destinationKey + //Call myself + foreach (string sourceSubKeyName in sourceKey.GetSubKeyNames()) + { + using (RegistryKey sourceSubKey = sourceKey.OpenSubKey(sourceSubKeyName)) + { + using (RegistryKey destSubKey = destinationKey.CreateSubKey(sourceSubKeyName)) + { + RecurseCopyKey(sourceSubKey, destSubKey); + } + } + } + } + } + + +} diff --git a/Disco.ClientBootstrapper/Interop/NetworkAdapter.cs b/Disco.ClientBootstrapper/Interop/NetworkAdapter.cs index f9d24fae..b4cdc187 100644 --- a/Disco.ClientBootstrapper/Interop/NetworkAdapter.cs +++ b/Disco.ClientBootstrapper/Interop/NetworkAdapter.cs @@ -1,164 +1,164 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Management; -using System.Runtime.InteropServices; - -namespace Disco.ClientBootstrapper.Interop -{ - - class NetworkAdapter - { - - public uint Index { get; set; } - public string WmiPath { get; set; } - public Guid Guid { get; set; } - public string Name { get; set; } - public string NetConnectionID { get; set; } - public string MACAddress { get; set; } - public UInt64 Speed { get; set; } - public UInt16 LastConnectionStatus { get; set; } - public bool IsWireless { get; set; } - public string WirelessInterfaceDescription { get; set; } - public int LastWirelessConnectionStatus { get; set; } - - public NetworkAdapter(ManagementObject wmiObject) - { - UpdateFromWmi(wmiObject); - } - - private void UpdateFromWmi(ManagementObject wmiObject) - { - this.WmiPath = (string)wmiObject.GetPropertyValue("__PATH"); - this.Index = (UInt32)wmiObject.GetPropertyValue("Index"); - this.Guid = Guid.Parse((string)wmiObject.GetPropertyValue("GUID")); - this.MACAddress = (string)wmiObject.GetPropertyValue("MACAddress"); - this.Name = (string)wmiObject.GetPropertyValue("Name"); - this.NetConnectionID = (string)wmiObject.GetPropertyValue("NetConnectionID"); - this.Speed = (UInt64)wmiObject.GetPropertyValue("Speed"); - var connectionStatus = ConnectionStatus; - this.IsWireless = true; - try - { - var wirelessConnectionStatus = WirelessConnectionStatus; - } - catch (Exception) { - this.IsWireless = false; - }; - } - - public int WirelessConnectionStatus - { - get { - if (this.IsWireless) - { - IntPtr handle = IntPtr.Zero; - uint negotiatedVersion; - try - { - if (NetworkInterop.WlanOpenHandle(1, IntPtr.Zero, out negotiatedVersion, ref handle) != 0) - throw new NotSupportedException("This network adapter does not support Wireless"); - - IntPtr ptr = new IntPtr(); - - uint dataSize; - - var interfaceGuid = this.Guid; - - if (NetworkInterop.WlanQueryInterface(handle, ref interfaceGuid, NetworkInterop.WLAN_INTF_OPCODE.wlan_intf_opcode_interface_state, IntPtr.Zero, out dataSize, ref ptr, IntPtr.Zero) != 0) - throw new NotSupportedException("This network adapter does not support Wireless"); - - this.LastWirelessConnectionStatus = Marshal.ReadInt32(ptr); - - - NetworkInterop.WlanFreeMemory(ptr); - - return this.LastWirelessConnectionStatus; - } - finally - { - if (handle != IntPtr.Zero) - NetworkInterop.WlanCloseHandle(handle, IntPtr.Zero); - } - - } - else - { - throw new NotSupportedException("This network adapter does not support Wireless"); - } - } - } - public string WirelessConnectionStatusMeaning(int status) - { - switch ((NetworkInterop.WLAN_INTERFACE_STATE)status) - { - case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_ad_hoc_network_formed: - return "Ad Hoc Network Formed"; - case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_associating: - return "Associating"; - case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_authenticating: - return "Authenticating"; - case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_connected: - return "Connected"; - case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_disconnected: - return "Disconnected"; - case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_disconnecting: - return "Disconnecting"; - case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_discovering: - return "Discovering"; - case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_not_ready: - return "Not Ready"; - default: - return "Unknown"; - } - } - - public UInt16 ConnectionStatus - { - get - { - using (var wmiObject = new ManagementObject(this.WmiPath)) - { - this.LastConnectionStatus = (UInt16)wmiObject.GetPropertyValue("NetConnectionStatus"); - } - return this.LastConnectionStatus; - } - } - public string ConnectionStatusMeaning(UInt16 status) - { - switch (status) - { - case (UInt16)0: - return "Disconnected"; - case (UInt16)1: - return "Connecting"; - case (UInt16)2: - return "Connected"; - case (UInt16)3: - return "Disconnecting"; - case (UInt16)4: - return "Hardware not present"; - case (UInt16)5: - return "Hardware disabled"; - case (UInt16)6: - return "Hardware malfunction"; - case (UInt16)7: - return "Media disconnected"; - case (UInt16)8: - return "Authenticating"; - case (UInt16)9: - return "Authentication succeeded"; - case (UInt16)10: - return "Authentication failed"; - case (UInt16)11: - return "Invalid address"; - case (UInt16)12: - return "Credentials required"; - default: - return "Unknown"; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Management; +using System.Runtime.InteropServices; + +namespace Disco.ClientBootstrapper.Interop +{ + + class NetworkAdapter + { + + public uint Index { get; set; } + public string WmiPath { get; set; } + public Guid Guid { get; set; } + public string Name { get; set; } + public string NetConnectionID { get; set; } + public string MACAddress { get; set; } + public UInt64 Speed { get; set; } + public UInt16 LastConnectionStatus { get; set; } + public bool IsWireless { get; set; } + public string WirelessInterfaceDescription { get; set; } + public int LastWirelessConnectionStatus { get; set; } + + public NetworkAdapter(ManagementObject wmiObject) + { + UpdateFromWmi(wmiObject); + } + + private void UpdateFromWmi(ManagementObject wmiObject) + { + this.WmiPath = (string)wmiObject.GetPropertyValue("__PATH"); + this.Index = (UInt32)wmiObject.GetPropertyValue("Index"); + this.Guid = Guid.Parse((string)wmiObject.GetPropertyValue("GUID")); + this.MACAddress = (string)wmiObject.GetPropertyValue("MACAddress"); + this.Name = (string)wmiObject.GetPropertyValue("Name"); + this.NetConnectionID = (string)wmiObject.GetPropertyValue("NetConnectionID"); + this.Speed = (UInt64)wmiObject.GetPropertyValue("Speed"); + var connectionStatus = ConnectionStatus; + this.IsWireless = true; + try + { + var wirelessConnectionStatus = WirelessConnectionStatus; + } + catch (Exception) { + this.IsWireless = false; + }; + } + + public int WirelessConnectionStatus + { + get { + if (this.IsWireless) + { + IntPtr handle = IntPtr.Zero; + uint negotiatedVersion; + try + { + if (NetworkInterop.WlanOpenHandle(1, IntPtr.Zero, out negotiatedVersion, ref handle) != 0) + throw new NotSupportedException("This network adapter does not support Wireless"); + + IntPtr ptr = new IntPtr(); + + uint dataSize; + + var interfaceGuid = this.Guid; + + if (NetworkInterop.WlanQueryInterface(handle, ref interfaceGuid, NetworkInterop.WLAN_INTF_OPCODE.wlan_intf_opcode_interface_state, IntPtr.Zero, out dataSize, ref ptr, IntPtr.Zero) != 0) + throw new NotSupportedException("This network adapter does not support Wireless"); + + this.LastWirelessConnectionStatus = Marshal.ReadInt32(ptr); + + + NetworkInterop.WlanFreeMemory(ptr); + + return this.LastWirelessConnectionStatus; + } + finally + { + if (handle != IntPtr.Zero) + NetworkInterop.WlanCloseHandle(handle, IntPtr.Zero); + } + + } + else + { + throw new NotSupportedException("This network adapter does not support Wireless"); + } + } + } + public string WirelessConnectionStatusMeaning(int status) + { + switch ((NetworkInterop.WLAN_INTERFACE_STATE)status) + { + case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_ad_hoc_network_formed: + return "Ad Hoc Network Formed"; + case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_associating: + return "Associating"; + case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_authenticating: + return "Authenticating"; + case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_connected: + return "Connected"; + case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_disconnected: + return "Disconnected"; + case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_disconnecting: + return "Disconnecting"; + case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_discovering: + return "Discovering"; + case NetworkInterop.WLAN_INTERFACE_STATE.wlan_interface_state_not_ready: + return "Not Ready"; + default: + return "Unknown"; + } + } + + public UInt16 ConnectionStatus + { + get + { + using (var wmiObject = new ManagementObject(this.WmiPath)) + { + this.LastConnectionStatus = (UInt16)wmiObject.GetPropertyValue("NetConnectionStatus"); + } + return this.LastConnectionStatus; + } + } + public string ConnectionStatusMeaning(UInt16 status) + { + switch (status) + { + case (UInt16)0: + return "Disconnected"; + case (UInt16)1: + return "Connecting"; + case (UInt16)2: + return "Connected"; + case (UInt16)3: + return "Disconnecting"; + case (UInt16)4: + return "Hardware not present"; + case (UInt16)5: + return "Hardware disabled"; + case (UInt16)6: + return "Hardware malfunction"; + case (UInt16)7: + return "Media disconnected"; + case (UInt16)8: + return "Authenticating"; + case (UInt16)9: + return "Authentication succeeded"; + case (UInt16)10: + return "Authentication failed"; + case (UInt16)11: + return "Invalid address"; + case (UInt16)12: + return "Credentials required"; + default: + return "Unknown"; + } + } + + } +} diff --git a/Disco.ClientBootstrapper/Interop/NetworkInterop.cs b/Disco.ClientBootstrapper/Interop/NetworkInterop.cs index 7980490e..ad95b258 100644 --- a/Disco.ClientBootstrapper/Interop/NetworkInterop.cs +++ b/Disco.ClientBootstrapper/Interop/NetworkInterop.cs @@ -1,289 +1,289 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Net.NetworkInformation; -using System.Management; -using System.Runtime.InteropServices; -using System.Xml; - -namespace Disco.ClientBootstrapper.Interop -{ - static class NetworkInterop - { - - #region PInvoke - - [DllImport("Wlanapi", EntryPoint = "WlanOpenHandle")] - public static extern uint WlanOpenHandle(uint dwClientVersion, IntPtr pReserved, [Out] out uint pdwNegotiatedVersion, ref IntPtr ClientHandle); - [DllImport("Wlanapi", EntryPoint = "WlanCloseHandle")] - public static extern uint WlanCloseHandle([In] IntPtr hClientHandle, IntPtr pReserved); - [DllImport("Wlanapi", EntryPoint = "WlanFreeMemory")] - public static extern void WlanFreeMemory([In] IntPtr pMemory); - - [DllImport("Wlanapi.dll", SetLastError = true)] - public static extern uint WlanGetProfileList(IntPtr hClientHandle, ref Guid pInterfaceGuid, IntPtr pReserved, ref IntPtr ppProfileList); - [DllImport("Wlanapi.dll", SetLastError = true, CharSet = CharSet.Unicode)] - public static extern uint WlanSetProfile(IntPtr hClientHandle, [In] ref Guid pInterfaceGuid, uint dwFlags, string strProfileXml, string strAllUserProfileSecurity, bool bOverwrite, IntPtr pReserved, out uint pdwReasonCode); - - - [DllImport("Wlanapi", EntryPoint = "WlanQueryInterface")] - public static extern uint WlanQueryInterface([In] IntPtr hClientHandle, - [In] ref Guid pInterfaceGuid, - WLAN_INTF_OPCODE OpCode, - IntPtr pReserved, - [Out] out uint pdwDataSize, - ref IntPtr ppData, - IntPtr pWlanOpcodeValueType); - - public enum WLAN_INTF_OPCODE - { - /// wlan_intf_opcode_autoconf_start -> 0x000000000 - wlan_intf_opcode_autoconf_start = 0, - wlan_intf_opcode_autoconf_enabled, - wlan_intf_opcode_background_scan_enabled, - wlan_intf_opcode_media_streaming_mode, - wlan_intf_opcode_radio_state, - wlan_intf_opcode_bss_type, - wlan_intf_opcode_interface_state, - wlan_intf_opcode_current_connection, - wlan_intf_opcode_channel_number, - wlan_intf_opcode_supported_infrastructure_auth_cipher_pairs, - wlan_intf_opcode_supported_adhoc_auth_cipher_pairs, - wlan_intf_opcode_supported_country_or_region_string_list, - wlan_intf_opcode_current_operation_mode, - wlan_intf_opcode_supported_safe_mode, - wlan_intf_opcode_certified_safe_mode, - /// wlan_intf_opcode_autoconf_end -> 0x0fffffff - wlan_intf_opcode_autoconf_end = 268435455, - /// wlan_intf_opcode_msm_start -> 0x10000100 - wlan_intf_opcode_msm_start = 268435712, - wlan_intf_opcode_statistics, - wlan_intf_opcode_rssi, - /// wlan_intf_opcode_msm_end -> 0x1fffffff - wlan_intf_opcode_msm_end = 536870911, - /// wlan_intf_opcode_security_start -> 0x20010000 - wlan_intf_opcode_security_start = 536936448, - /// wlan_intf_opcode_security_end -> 0x2fffffff - wlan_intf_opcode_security_end = 805306367, - /// wlan_intf_opcode_ihv_start -> 0x30000000 - wlan_intf_opcode_ihv_start = 805306368, - /// wlan_intf_opcode_ihv_end -> 0x3fffffff - wlan_intf_opcode_ihv_end = 1073741823, - } - - /// - /// Defines the state of the interface. e.g. connected, disconnected. - /// - public enum WLAN_INTERFACE_STATE - { - /// - /// wlan_interface_state_not_ready -> 0 - /// - wlan_interface_state_not_ready = 0, - /// - /// wlan_interface_state_connected -> 1 - /// - wlan_interface_state_connected = 1, - /// - /// wlan_interface_state_ad_hoc_network_formed -> 2 - /// - wlan_interface_state_ad_hoc_network_formed = 2, - /// - /// wlan_interface_state_disconnecting -> 3 - /// - wlan_interface_state_disconnecting = 3, - /// - /// wlan_interface_state_disconnected -> 4 - /// - wlan_interface_state_disconnected = 4, - /// - /// wlan_interface_state_associating -> 5 - /// - wlan_interface_state_associating = 5, - /// - /// wlan_interface_state_discovering -> 6 - /// - wlan_interface_state_discovering = 6, - /// - /// wlan_interface_state_authenticating -> 7 - /// - wlan_interface_state_authenticating = 7, - } - - public struct WLAN_PROFILE_INFO_LIST - { - public uint dwNumberOfItems; - public uint dwIndex; - public WLAN_PROFILE_INFO[] ProfileInfo; - - public WLAN_PROFILE_INFO_LIST(IntPtr ppProfileList) - { - dwNumberOfItems = (uint)Marshal.ReadInt32(ppProfileList); - dwIndex = (uint)Marshal.ReadInt32(ppProfileList, 4); - ProfileInfo = new WLAN_PROFILE_INFO[dwNumberOfItems]; - IntPtr ppProfileListTemp = new IntPtr(ppProfileList.ToInt32() + 8); - - for (int i = 0; i < dwNumberOfItems; i++) - { - ppProfileList = new IntPtr(ppProfileListTemp.ToInt32() + i * Marshal.SizeOf(typeof(WLAN_PROFILE_INFO))); - ProfileInfo[i] = (WLAN_PROFILE_INFO)Marshal.PtrToStructure(ppProfileList, typeof(WLAN_PROFILE_INFO)); - } - } - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct WLAN_PROFILE_INFO - { - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string strProfileName; - public uint dwFlags; - } - - #endregion - - private static List _networkAdapters; - public static List NetworkAdapters - { - get - { - if (_networkAdapters == null) - { - using (var mSearcher = new ManagementObjectSearcher("SELECT __PATH, Index, GUID, MACAddress, Name, NetConnectionID, Speed FROM Win32_NetworkAdapter WHERE PhysicalAdapter=true AND MACAddress IS NOT NULL AND Name IS NOT NULL AND NetConnectionID IS NOT NULL AND Speed IS NOT NULL")) - { - - var mResults = mSearcher.Get(); - _networkAdapters = new List(mResults.Count); - - foreach (ManagementObject mResult in mResults) - { - _networkAdapters.Add(new NetworkAdapter(mResult)); - } - } - } - return _networkAdapters; - } - } - - public static bool PingDisco() - { - using (Ping p = new Ping()) - { - try - { - PingReply pr = p.Send("disco", 2000); - if (pr.Status == IPStatus.Success) - return true; - else - return false; - } - catch (Exception) - { - return false; - } - } - } - - public static void ConfigureWireless() - { - // Add Certificates - Program.Status.UpdateStatus(null, null, "Configuring Wireless Certificates"); - CertificateInterop.AddTempCerts(); - - // Add Wireless Profiles - Program.Status.UpdateStatus(null, null, "Configuring Wireless Profiles"); - var wirelessInlineProfiles = GetInlineWirelessProfiles(); - if (wirelessInlineProfiles.Count > 0) - { - - IntPtr wlanHandle = IntPtr.Zero; - uint negotiatedVersion; - - try - { - if (WlanOpenHandle(1, IntPtr.Zero, out negotiatedVersion, ref wlanHandle) != 0) - throw new NotSupportedException("This device does not support Wireless"); - - // Add Profile to Each Wireless Adapter - var wirelessAdapters = NetworkAdapters.Where(na => na.IsWireless).ToList(); - foreach (var na in wirelessAdapters) - { - foreach (var inlineWirelessProfile in wirelessInlineProfiles) - { - if (inlineWirelessProfile.AddProfile(wlanHandle, na.Guid)) - { - Program.Status.UpdateStatus(null, null, string.Format("Added Wireless Profile: {0}", inlineWirelessProfile.ProfileName)); - Program.SleepThread(500, false); - } - else - { - Program.Status.UpdateStatus(null, null, string.Format("Unable to add Wireless Profile: {0}", inlineWirelessProfile.ProfileName)); - Program.SleepThread(5000, false); - } - } - } - } - finally - { - if (wlanHandle != IntPtr.Zero) - NetworkInterop.WlanCloseHandle(wlanHandle, IntPtr.Zero); - } - } - - } - private class WirelessProfile - { - public string Filename { get; set; } - public string ProfileXml { get; set; } - public string ProfileName { get; set; } - - public bool AddProfile(IntPtr WlanHandle, Guid interfaceGuid) - { - var pInterfaceGuid = interfaceGuid; - var pProfileXml = this.ProfileXml; - uint pFlag = 0; - uint failReason; - return (WlanSetProfile(WlanHandle, ref pInterfaceGuid, pFlag, pProfileXml, null, true, IntPtr.Zero, out failReason) == 0); - } - } - - private static List GetInlineWirelessProfiles() - { - var inlineProfileFiles = System.IO.Directory.EnumerateFiles(Program.InlinePath.Value, "WLAN_Profile_*.xml").ToList(); - var inlineProfiles = new List(inlineProfileFiles.Count); - foreach (var filename in inlineProfileFiles) - { - var profile = new WirelessProfile() - { - Filename = filename, - ProfileXml = System.IO.File.ReadAllText(filename) - }; - var profileXml = new XmlDocument(); - profileXml.LoadXml(profile.ProfileXml); - var profileXmlNS = new XmlNamespaceManager(profileXml.NameTable); - profileXmlNS.AddNamespace("p", "http://www.microsoft.com/networking/WLAN/profile/v1"); - var profileXmlNameNode = profileXml.SelectSingleNode("/p:WLANProfile/p:name", profileXmlNS); - if (profileXmlNameNode != null) - { - profile.ProfileName = profileXmlNameNode.InnerText; - inlineProfiles.Add(profile); - } - } - return inlineProfiles; - } - - private static WLAN_PROFILE_INFO_LIST GetWirelessProfiles(IntPtr WlanHandle, Guid interfaceGuid) - { - Guid pInterfaceGuid = interfaceGuid; - - IntPtr ppProfileList = new IntPtr(); - WlanGetProfileList(WlanHandle, ref pInterfaceGuid, new IntPtr(), ref ppProfileList); - WLAN_PROFILE_INFO_LIST wlanProfileInfoList = new WLAN_PROFILE_INFO_LIST(ppProfileList); - - NetworkInterop.WlanFreeMemory(ppProfileList); - - return wlanProfileInfoList; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Net.NetworkInformation; +using System.Management; +using System.Runtime.InteropServices; +using System.Xml; + +namespace Disco.ClientBootstrapper.Interop +{ + static class NetworkInterop + { + + #region PInvoke + + [DllImport("Wlanapi", EntryPoint = "WlanOpenHandle")] + public static extern uint WlanOpenHandle(uint dwClientVersion, IntPtr pReserved, [Out] out uint pdwNegotiatedVersion, ref IntPtr ClientHandle); + [DllImport("Wlanapi", EntryPoint = "WlanCloseHandle")] + public static extern uint WlanCloseHandle([In] IntPtr hClientHandle, IntPtr pReserved); + [DllImport("Wlanapi", EntryPoint = "WlanFreeMemory")] + public static extern void WlanFreeMemory([In] IntPtr pMemory); + + [DllImport("Wlanapi.dll", SetLastError = true)] + public static extern uint WlanGetProfileList(IntPtr hClientHandle, ref Guid pInterfaceGuid, IntPtr pReserved, ref IntPtr ppProfileList); + [DllImport("Wlanapi.dll", SetLastError = true, CharSet = CharSet.Unicode)] + public static extern uint WlanSetProfile(IntPtr hClientHandle, [In] ref Guid pInterfaceGuid, uint dwFlags, string strProfileXml, string strAllUserProfileSecurity, bool bOverwrite, IntPtr pReserved, out uint pdwReasonCode); + + + [DllImport("Wlanapi", EntryPoint = "WlanQueryInterface")] + public static extern uint WlanQueryInterface([In] IntPtr hClientHandle, + [In] ref Guid pInterfaceGuid, + WLAN_INTF_OPCODE OpCode, + IntPtr pReserved, + [Out] out uint pdwDataSize, + ref IntPtr ppData, + IntPtr pWlanOpcodeValueType); + + public enum WLAN_INTF_OPCODE + { + /// wlan_intf_opcode_autoconf_start -> 0x000000000 + wlan_intf_opcode_autoconf_start = 0, + wlan_intf_opcode_autoconf_enabled, + wlan_intf_opcode_background_scan_enabled, + wlan_intf_opcode_media_streaming_mode, + wlan_intf_opcode_radio_state, + wlan_intf_opcode_bss_type, + wlan_intf_opcode_interface_state, + wlan_intf_opcode_current_connection, + wlan_intf_opcode_channel_number, + wlan_intf_opcode_supported_infrastructure_auth_cipher_pairs, + wlan_intf_opcode_supported_adhoc_auth_cipher_pairs, + wlan_intf_opcode_supported_country_or_region_string_list, + wlan_intf_opcode_current_operation_mode, + wlan_intf_opcode_supported_safe_mode, + wlan_intf_opcode_certified_safe_mode, + /// wlan_intf_opcode_autoconf_end -> 0x0fffffff + wlan_intf_opcode_autoconf_end = 268435455, + /// wlan_intf_opcode_msm_start -> 0x10000100 + wlan_intf_opcode_msm_start = 268435712, + wlan_intf_opcode_statistics, + wlan_intf_opcode_rssi, + /// wlan_intf_opcode_msm_end -> 0x1fffffff + wlan_intf_opcode_msm_end = 536870911, + /// wlan_intf_opcode_security_start -> 0x20010000 + wlan_intf_opcode_security_start = 536936448, + /// wlan_intf_opcode_security_end -> 0x2fffffff + wlan_intf_opcode_security_end = 805306367, + /// wlan_intf_opcode_ihv_start -> 0x30000000 + wlan_intf_opcode_ihv_start = 805306368, + /// wlan_intf_opcode_ihv_end -> 0x3fffffff + wlan_intf_opcode_ihv_end = 1073741823, + } + + /// + /// Defines the state of the interface. e.g. connected, disconnected. + /// + public enum WLAN_INTERFACE_STATE + { + /// + /// wlan_interface_state_not_ready -> 0 + /// + wlan_interface_state_not_ready = 0, + /// + /// wlan_interface_state_connected -> 1 + /// + wlan_interface_state_connected = 1, + /// + /// wlan_interface_state_ad_hoc_network_formed -> 2 + /// + wlan_interface_state_ad_hoc_network_formed = 2, + /// + /// wlan_interface_state_disconnecting -> 3 + /// + wlan_interface_state_disconnecting = 3, + /// + /// wlan_interface_state_disconnected -> 4 + /// + wlan_interface_state_disconnected = 4, + /// + /// wlan_interface_state_associating -> 5 + /// + wlan_interface_state_associating = 5, + /// + /// wlan_interface_state_discovering -> 6 + /// + wlan_interface_state_discovering = 6, + /// + /// wlan_interface_state_authenticating -> 7 + /// + wlan_interface_state_authenticating = 7, + } + + public struct WLAN_PROFILE_INFO_LIST + { + public uint dwNumberOfItems; + public uint dwIndex; + public WLAN_PROFILE_INFO[] ProfileInfo; + + public WLAN_PROFILE_INFO_LIST(IntPtr ppProfileList) + { + dwNumberOfItems = (uint)Marshal.ReadInt32(ppProfileList); + dwIndex = (uint)Marshal.ReadInt32(ppProfileList, 4); + ProfileInfo = new WLAN_PROFILE_INFO[dwNumberOfItems]; + IntPtr ppProfileListTemp = new IntPtr(ppProfileList.ToInt32() + 8); + + for (int i = 0; i < dwNumberOfItems; i++) + { + ppProfileList = new IntPtr(ppProfileListTemp.ToInt32() + i * Marshal.SizeOf(typeof(WLAN_PROFILE_INFO))); + ProfileInfo[i] = (WLAN_PROFILE_INFO)Marshal.PtrToStructure(ppProfileList, typeof(WLAN_PROFILE_INFO)); + } + } + } + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + public struct WLAN_PROFILE_INFO + { + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string strProfileName; + public uint dwFlags; + } + + #endregion + + private static List _networkAdapters; + public static List NetworkAdapters + { + get + { + if (_networkAdapters == null) + { + using (var mSearcher = new ManagementObjectSearcher("SELECT __PATH, Index, GUID, MACAddress, Name, NetConnectionID, Speed FROM Win32_NetworkAdapter WHERE PhysicalAdapter=true AND MACAddress IS NOT NULL AND Name IS NOT NULL AND NetConnectionID IS NOT NULL AND Speed IS NOT NULL")) + { + + var mResults = mSearcher.Get(); + _networkAdapters = new List(mResults.Count); + + foreach (ManagementObject mResult in mResults) + { + _networkAdapters.Add(new NetworkAdapter(mResult)); + } + } + } + return _networkAdapters; + } + } + + public static bool PingDisco() + { + using (Ping p = new Ping()) + { + try + { + PingReply pr = p.Send("disco", 2000); + if (pr.Status == IPStatus.Success) + return true; + else + return false; + } + catch (Exception) + { + return false; + } + } + } + + public static void ConfigureWireless() + { + // Add Certificates + Program.Status.UpdateStatus(null, null, "Configuring Wireless Certificates"); + CertificateInterop.AddTempCerts(); + + // Add Wireless Profiles + Program.Status.UpdateStatus(null, null, "Configuring Wireless Profiles"); + var wirelessInlineProfiles = GetInlineWirelessProfiles(); + if (wirelessInlineProfiles.Count > 0) + { + + IntPtr wlanHandle = IntPtr.Zero; + uint negotiatedVersion; + + try + { + if (WlanOpenHandle(1, IntPtr.Zero, out negotiatedVersion, ref wlanHandle) != 0) + throw new NotSupportedException("This device does not support Wireless"); + + // Add Profile to Each Wireless Adapter + var wirelessAdapters = NetworkAdapters.Where(na => na.IsWireless).ToList(); + foreach (var na in wirelessAdapters) + { + foreach (var inlineWirelessProfile in wirelessInlineProfiles) + { + if (inlineWirelessProfile.AddProfile(wlanHandle, na.Guid)) + { + Program.Status.UpdateStatus(null, null, string.Format("Added Wireless Profile: {0}", inlineWirelessProfile.ProfileName)); + Program.SleepThread(500, false); + } + else + { + Program.Status.UpdateStatus(null, null, string.Format("Unable to add Wireless Profile: {0}", inlineWirelessProfile.ProfileName)); + Program.SleepThread(5000, false); + } + } + } + } + finally + { + if (wlanHandle != IntPtr.Zero) + NetworkInterop.WlanCloseHandle(wlanHandle, IntPtr.Zero); + } + } + + } + private class WirelessProfile + { + public string Filename { get; set; } + public string ProfileXml { get; set; } + public string ProfileName { get; set; } + + public bool AddProfile(IntPtr WlanHandle, Guid interfaceGuid) + { + var pInterfaceGuid = interfaceGuid; + var pProfileXml = this.ProfileXml; + uint pFlag = 0; + uint failReason; + return (WlanSetProfile(WlanHandle, ref pInterfaceGuid, pFlag, pProfileXml, null, true, IntPtr.Zero, out failReason) == 0); + } + } + + private static List GetInlineWirelessProfiles() + { + var inlineProfileFiles = System.IO.Directory.EnumerateFiles(Program.InlinePath.Value, "WLAN_Profile_*.xml").ToList(); + var inlineProfiles = new List(inlineProfileFiles.Count); + foreach (var filename in inlineProfileFiles) + { + var profile = new WirelessProfile() + { + Filename = filename, + ProfileXml = System.IO.File.ReadAllText(filename) + }; + var profileXml = new XmlDocument(); + profileXml.LoadXml(profile.ProfileXml); + var profileXmlNS = new XmlNamespaceManager(profileXml.NameTable); + profileXmlNS.AddNamespace("p", "http://www.microsoft.com/networking/WLAN/profile/v1"); + var profileXmlNameNode = profileXml.SelectSingleNode("/p:WLANProfile/p:name", profileXmlNS); + if (profileXmlNameNode != null) + { + profile.ProfileName = profileXmlNameNode.InnerText; + inlineProfiles.Add(profile); + } + } + return inlineProfiles; + } + + private static WLAN_PROFILE_INFO_LIST GetWirelessProfiles(IntPtr WlanHandle, Guid interfaceGuid) + { + Guid pInterfaceGuid = interfaceGuid; + + IntPtr ppProfileList = new IntPtr(); + WlanGetProfileList(WlanHandle, ref pInterfaceGuid, new IntPtr(), ref ppProfileList); + WLAN_PROFILE_INFO_LIST wlanProfileInfoList = new WLAN_PROFILE_INFO_LIST(ppProfileList); + + NetworkInterop.WlanFreeMemory(ppProfileList); + + return wlanProfileInfoList; + } + + } +} diff --git a/Disco.ClientBootstrapper/Interop/RegistryInterop.cs b/Disco.ClientBootstrapper/Interop/RegistryInterop.cs index 07f0aaa9..32cf0348 100644 --- a/Disco.ClientBootstrapper/Interop/RegistryInterop.cs +++ b/Disco.ClientBootstrapper/Interop/RegistryInterop.cs @@ -1,108 +1,108 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Runtime.InteropServices; - -namespace Disco.ClientBootstrapper.Interop -{ - class RegistryInterop : IDisposable - { - - [StructLayout(LayoutKind.Sequential)] - private struct LUID - { - public int LowPart; - public int HighPart; - } - [StructLayout(LayoutKind.Sequential)] - private struct TOKEN_PRIVILEGES - { - public LUID Luid; - public int Attributes; - public int PrivilegeCount; - } - - [DllImport("advapi32.dll", CharSet = CharSet.Auto)] - private static extern int OpenProcessToken(int ProcessHandle, int DesiredAccess, ref int tokenhandle); - - [DllImport("kernel32.dll", CharSet = CharSet.Auto)] - private static extern int GetCurrentProcess(); - - [DllImport("advapi32.dll", CharSet = CharSet.Auto)] - private static extern int LookupPrivilegeValue(string lpsystemname, string lpname, [MarshalAs(UnmanagedType.Struct)] ref LUID lpLuid); - - [DllImport("advapi32.dll", CharSet = CharSet.Auto)] - private static extern int AdjustTokenPrivileges(int tokenhandle, int disableprivs, [MarshalAs(UnmanagedType.Struct)]ref TOKEN_PRIVILEGES Newstate, int bufferlength, int PreivousState, int Returnlength); - - [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] - private static extern int RegLoadKey(uint hKey, string lpSubKey, string lpFile); - - [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] - private static extern int RegUnLoadKey(uint hKey, string lpSubKey); - - private const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - private const int TOKEN_QUERY = 0x00000008; - private const int SE_PRIVILEGE_ENABLED = 0x00000002; - private const string SE_RESTORE_NAME = "SeRestorePrivilege"; - private const string SE_BACKUP_NAME = "SeBackupPrivilege"; - private const uint HKEY_USERS = 0x80000003; - - private RegistryHives Hive { get; set; } - private string SubKey { get; set; } - private bool IsUnloaded { get; set; } - - public enum RegistryHives : uint - { - HKEY_USERS = 0x80000003, - HKEY_LOCAL_MACHINE = 0x80000002 - } - - public RegistryInterop(RegistryHives hive, string subKey, string filePath) - { - int token = 0; - int retval = 0; - - TOKEN_PRIVILEGES TP = new TOKEN_PRIVILEGES(); - TOKEN_PRIVILEGES TP2 = new TOKEN_PRIVILEGES(); - LUID RestoreLuid = new LUID(); - LUID BackupLuid = new LUID(); - - retval = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref token); - retval = LookupPrivilegeValue(null, SE_RESTORE_NAME, ref RestoreLuid); - retval = LookupPrivilegeValue(null, SE_BACKUP_NAME, ref BackupLuid); - TP.PrivilegeCount = 1; - TP.Attributes = SE_PRIVILEGE_ENABLED; - TP.Luid = RestoreLuid; - TP2.PrivilegeCount = 1; - TP2.Attributes = SE_PRIVILEGE_ENABLED; - TP2.Luid = BackupLuid; - - retval = AdjustTokenPrivileges(token, 0, ref TP, 1024, 0, 0); - retval = AdjustTokenPrivileges(token, 0, ref TP2, 1024, 0, 0); - - uint regHive = (uint)hive; - - this.Hive = hive; - this.SubKey = subKey; - RegLoadKey(regHive, subKey, filePath); - this.IsUnloaded = false; - } - - public void Unload() - { - if (!IsUnloaded) - { - uint regHive = (uint)this.Hive; - string subKey = this.SubKey; - RegUnLoadKey(regHive, subKey); - this.IsUnloaded = true; - } - } - - public void Dispose() - { - Unload(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Runtime.InteropServices; + +namespace Disco.ClientBootstrapper.Interop +{ + class RegistryInterop : IDisposable + { + + [StructLayout(LayoutKind.Sequential)] + private struct LUID + { + public int LowPart; + public int HighPart; + } + [StructLayout(LayoutKind.Sequential)] + private struct TOKEN_PRIVILEGES + { + public LUID Luid; + public int Attributes; + public int PrivilegeCount; + } + + [DllImport("advapi32.dll", CharSet = CharSet.Auto)] + private static extern int OpenProcessToken(int ProcessHandle, int DesiredAccess, ref int tokenhandle); + + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + private static extern int GetCurrentProcess(); + + [DllImport("advapi32.dll", CharSet = CharSet.Auto)] + private static extern int LookupPrivilegeValue(string lpsystemname, string lpname, [MarshalAs(UnmanagedType.Struct)] ref LUID lpLuid); + + [DllImport("advapi32.dll", CharSet = CharSet.Auto)] + private static extern int AdjustTokenPrivileges(int tokenhandle, int disableprivs, [MarshalAs(UnmanagedType.Struct)]ref TOKEN_PRIVILEGES Newstate, int bufferlength, int PreivousState, int Returnlength); + + [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] + private static extern int RegLoadKey(uint hKey, string lpSubKey, string lpFile); + + [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] + private static extern int RegUnLoadKey(uint hKey, string lpSubKey); + + private const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; + private const int TOKEN_QUERY = 0x00000008; + private const int SE_PRIVILEGE_ENABLED = 0x00000002; + private const string SE_RESTORE_NAME = "SeRestorePrivilege"; + private const string SE_BACKUP_NAME = "SeBackupPrivilege"; + private const uint HKEY_USERS = 0x80000003; + + private RegistryHives Hive { get; set; } + private string SubKey { get; set; } + private bool IsUnloaded { get; set; } + + public enum RegistryHives : uint + { + HKEY_USERS = 0x80000003, + HKEY_LOCAL_MACHINE = 0x80000002 + } + + public RegistryInterop(RegistryHives hive, string subKey, string filePath) + { + int token = 0; + int retval = 0; + + TOKEN_PRIVILEGES TP = new TOKEN_PRIVILEGES(); + TOKEN_PRIVILEGES TP2 = new TOKEN_PRIVILEGES(); + LUID RestoreLuid = new LUID(); + LUID BackupLuid = new LUID(); + + retval = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref token); + retval = LookupPrivilegeValue(null, SE_RESTORE_NAME, ref RestoreLuid); + retval = LookupPrivilegeValue(null, SE_BACKUP_NAME, ref BackupLuid); + TP.PrivilegeCount = 1; + TP.Attributes = SE_PRIVILEGE_ENABLED; + TP.Luid = RestoreLuid; + TP2.PrivilegeCount = 1; + TP2.Attributes = SE_PRIVILEGE_ENABLED; + TP2.Luid = BackupLuid; + + retval = AdjustTokenPrivileges(token, 0, ref TP, 1024, 0, 0); + retval = AdjustTokenPrivileges(token, 0, ref TP2, 1024, 0, 0); + + uint regHive = (uint)hive; + + this.Hive = hive; + this.SubKey = subKey; + RegLoadKey(regHive, subKey, filePath); + this.IsUnloaded = false; + } + + public void Unload() + { + if (!IsUnloaded) + { + uint regHive = (uint)this.Hive; + string subKey = this.SubKey; + RegUnLoadKey(regHive, subKey); + this.IsUnloaded = true; + } + } + + public void Dispose() + { + Unload(); + } + } +} diff --git a/Disco.ClientBootstrapper/Interop/ShutdownInterop.cs b/Disco.ClientBootstrapper/Interop/ShutdownInterop.cs index 67a8ffe3..80db7c25 100644 --- a/Disco.ClientBootstrapper/Interop/ShutdownInterop.cs +++ b/Disco.ClientBootstrapper/Interop/ShutdownInterop.cs @@ -1,103 +1,103 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Management; -using System.Runtime.InteropServices; - -namespace Disco.ClientBootstrapper.Interop -{ - public static class ShutdownInterop - { - public static void Shutdown() - { - // 8 = Power Off - Shutdown(EWX_POWEROFF); - } - public static void Reboot() - { - // 2 = Reboot - Shutdown(EWX_REBOOT); - } - - private static void Shutdown(int flag) - { - // Removed 2012-11-23 G# - Migrate to Win32 PInvoke Shutdown for better Privilege Handling - //ManagementBaseObject mboShutdown = null; - //ManagementClass mcWin32 = new ManagementClass("Win32_OperatingSystem"); - //mcWin32.Get(); - - //// You can't shutdown without security privileges - //mcWin32.Scope.Options.EnablePrivileges = true; - //ManagementBaseObject mboShutdownParams = - // mcWin32.GetMethodParameters("Win32Shutdown"); - - //// Flag 1 means we want to shut down the system. Use "2" to reboot. - //mboShutdownParams["Flags"] = flag; - //mboShutdownParams["Reserved"] = "0"; - //foreach (ManagementObject manObj in mcWin32.GetInstances()) - //{ - // mboShutdown = manObj.InvokeMethod("Win32Shutdown", - // mboShutdownParams, null); - //} - // End Removed 2012-11-23 G# - - // Added 2012-11-23 G# - Migrate to Win32 PInvoke Shutdown - bool result; - TokPriv1Luid tp; - - IntPtr hproc = GetCurrentProcess(); - IntPtr htok = IntPtr.Zero; - - result = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); - - tp.Count = 1; - tp.Luid = 0; - tp.Attr = SE_PRIVILEGE_ENABLED; - - result = LookupPrivilegeValue(null, SE_SHUTDOWN_NAME, ref tp.Luid); - result = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); - result = ExitWindowsEx(flag, 0); - // End Added 2012-11-23 G# - } - - #region Win32 PInvoke Interop - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - private struct TokPriv1Luid - { - public int Count; - public long Luid; - public int Attr; - } - - [DllImport("kernel32.dll", ExactSpelling = true)] - private static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - private static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); - - [DllImport("advapi32.dll", SetLastError = true)] - private static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); - - [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] - private static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen); - - [DllImport("user32.dll", ExactSpelling = true, SetLastError = true)] - private static extern bool ExitWindowsEx(int flg, int rea); - - private const int SE_PRIVILEGE_ENABLED = 0x00000002; - private const int TOKEN_QUERY = 0x00000008; - private const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; - private const string SE_SHUTDOWN_NAME = "SeShutdownPrivilege"; - private const int EWX_LOGOFF = 0x00000000; - private const int EWX_SHUTDOWN = 0x00000001; - private const int EWX_REBOOT = 0x00000002; - private const int EWX_FORCE = 0x00000004; - private const int EWX_POWEROFF = 0x00000008; - private const int EWX_FORCEIFHUNG = 0x00000010; - - #endregion - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Management; +using System.Runtime.InteropServices; + +namespace Disco.ClientBootstrapper.Interop +{ + public static class ShutdownInterop + { + public static void Shutdown() + { + // 8 = Power Off + Shutdown(EWX_POWEROFF); + } + public static void Reboot() + { + // 2 = Reboot + Shutdown(EWX_REBOOT); + } + + private static void Shutdown(int flag) + { + // Removed 2012-11-23 G# - Migrate to Win32 PInvoke Shutdown for better Privilege Handling + //ManagementBaseObject mboShutdown = null; + //ManagementClass mcWin32 = new ManagementClass("Win32_OperatingSystem"); + //mcWin32.Get(); + + //// You can't shutdown without security privileges + //mcWin32.Scope.Options.EnablePrivileges = true; + //ManagementBaseObject mboShutdownParams = + // mcWin32.GetMethodParameters("Win32Shutdown"); + + //// Flag 1 means we want to shut down the system. Use "2" to reboot. + //mboShutdownParams["Flags"] = flag; + //mboShutdownParams["Reserved"] = "0"; + //foreach (ManagementObject manObj in mcWin32.GetInstances()) + //{ + // mboShutdown = manObj.InvokeMethod("Win32Shutdown", + // mboShutdownParams, null); + //} + // End Removed 2012-11-23 G# + + // Added 2012-11-23 G# - Migrate to Win32 PInvoke Shutdown + bool result; + TokPriv1Luid tp; + + IntPtr hproc = GetCurrentProcess(); + IntPtr htok = IntPtr.Zero; + + result = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok); + + tp.Count = 1; + tp.Luid = 0; + tp.Attr = SE_PRIVILEGE_ENABLED; + + result = LookupPrivilegeValue(null, SE_SHUTDOWN_NAME, ref tp.Luid); + result = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); + result = ExitWindowsEx(flag, 0); + // End Added 2012-11-23 G# + } + + #region Win32 PInvoke Interop + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + private struct TokPriv1Luid + { + public int Count; + public long Luid; + public int Attr; + } + + [DllImport("kernel32.dll", ExactSpelling = true)] + private static extern IntPtr GetCurrentProcess(); + + [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] + private static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok); + + [DllImport("advapi32.dll", SetLastError = true)] + private static extern bool LookupPrivilegeValue(string host, string name, ref long pluid); + + [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)] + private static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen); + + [DllImport("user32.dll", ExactSpelling = true, SetLastError = true)] + private static extern bool ExitWindowsEx(int flg, int rea); + + private const int SE_PRIVILEGE_ENABLED = 0x00000002; + private const int TOKEN_QUERY = 0x00000008; + private const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; + private const string SE_SHUTDOWN_NAME = "SeShutdownPrivilege"; + private const int EWX_LOGOFF = 0x00000000; + private const int EWX_SHUTDOWN = 0x00000001; + private const int EWX_REBOOT = 0x00000002; + private const int EWX_FORCE = 0x00000004; + private const int EWX_POWEROFF = 0x00000008; + private const int EWX_FORCEIFHUNG = 0x00000010; + + #endregion + + } +} diff --git a/Disco.ClientBootstrapper/Interop/WIMInterop.cs b/Disco.ClientBootstrapper/Interop/WIMInterop.cs index 00eefdda..f39fa3fd 100644 --- a/Disco.ClientBootstrapper/Interop/WIMInterop.cs +++ b/Disco.ClientBootstrapper/Interop/WIMInterop.cs @@ -1,1585 +1,1585 @@ -using System; -using System.Collections; -using System.Globalization; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using System.Xml; - -namespace Disco.ClientBootstrapper.Interop.WIMInterop -{ - /// - ///Pulic interface to a WindowsImage object. - /// - public - interface IImage : IDisposable - { - /// - ///Gets image information from within a .wim file. - /// - string ImageInformation - { - get; - } - - /// - ///Sets image information about an image within a .wim file. - /// - ///The string being passed in should be in the form of a unicode XML file. - ///Calling this function replaces any customized image data. To preserve existing XML information, call ImageInformation - ///and append/edit desired data. - /// - void SetImageInformation( - string imageInformation - ); - - /// - ///Mounts an image in a .wim file to the specified directory. - /// - void Mount( - string pathToMountTo - ); - - /// - ///Retrieves the path to which an image has been mounted. - /// - string MountedPath - { - get; - } - - /// - ///Unmounts a mounted image in a .wim file from the specified directory. - /// - ///Indicates whether changes (if any) to the .wim file should be committed - ///before unmounting the .wim file. This flag will have no effect if the .wim file was mounted not to allow edits. - /// - void DismountImage( - bool commitChanges - ); - - /// - ///Applies an image to a drive root or to a directory path from a .wim file. - /// - void Apply( - string pathToApplyTo - ); - } - - /// - ///Class representing a .wim file. - /// - public - sealed - class - WindowsImageContainer : IDisposable - { - /// - ///Specifies the type of access to the .wim file. - /// - public - enum - CreateFileAccess - { - /// - ///Specifies read-only access to the .wim file. - /// - Read, - - /// - ///Specifies write access to the .wim file. - ///Includes WIM_GENERIC_READ access to enable apply and append operations with existing images. - /// - Write - } - - /// - ///Specifies which action to take on files that exist and - ///which action to take when files do not exist. - /// - public - enum - CreateFileMode - { - /// - ///RESERVED, DO NOT USE! - /// - None = 0, - - /// - ///Creates a new .wim file. The function fails if the specified file already exists. - /// - CreateNew = 1, - - /// - ///Creates a new .wim file. If the file exists, the function overwrites the file. - /// - CreateAlways = 2, - - /// - ///Opens the .wim file. The function fails if the file does not exist. - /// - OpenExisting = 3, - - /// - ///Opens the .wim file if it exists. If the file does not exist and the caller requests WIM_GENERIC_WRITE access, the - ///function creates the file. - /// - OpenAlways = 4 - } - - /// - ///Public constructor to create a WIM object - /// - ///Path of WIM to create or to open. - ///Specifies Open, Create, Create/Open disposition of the .wim file. - ///Specifies access level of Read Only or Write. - //[CLSCompliant(false)] - public WindowsImageContainer(string imageFilePath, CreateFileMode mode, CreateFileAccess access) - { - CreateFileAccessPrivate fileAccess = GetMappedFileAccess(access); - if (fileAccess == CreateFileAccessPrivate.Read && (!File.Exists(imageFilePath) || (CreateFileMode.OpenExisting != mode))) - { - throw new System.UnauthorizedAccessException(string.Format(CultureInfo.CurrentCulture, - "Read access can be specified only with OpenExisting mode or OpenAlways mode when the .wim file does not exist.")); - } - - // - //Imaging DLLs must be in the same directory. - // - try - { - m_ImageContainerHandle = NativeMethods.CreateFile(imageFilePath, (uint)fileAccess, (uint)mode); - m_WindowsImageFilePath = imageFilePath; - } - catch (System.DllNotFoundException ex) - { - throw new System.DllNotFoundException(string.Format(CultureInfo.CurrentCulture, - "Unable to load WIM libraries. Make sure the correct DLLs are present (Wimgapi.dll and Xmlrw.dll)."), ex.InnerException); - } - - if (!m_ImageContainerHandle.Equals(IntPtr.Zero)) - { - // - //Set the temporary path so that we can write to an image. This - //cannot be %TEMP% as it does not exist on Windows PE - // - string tempDirectory = System.Environment.GetEnvironmentVariable("systemdrive"); - NativeMethods.SetTemporaryPath(m_ImageContainerHandle, tempDirectory); - - } - else - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to open the .wim file {0}.", imageFilePath)); - } - - // - //Finally, we must hook into the events. - // - m_MessageCallback = new NativeMethods.MessageCallback(ImageEventMessagePump); - NativeMethods.RegisterCallback(m_MessageCallback); - } - - /// Destructor to close open handles. - ~WindowsImageContainer() - { - DisposeInner(); - } - - /// - ///Dispose all unmanaged resources - /// - public - void - Dispose() - { - DisposeInner(); - GC.SuppressFinalize(this); - } - - private - void - DisposeInner() - { - if (m_ImageContainerHandle != IntPtr.Zero) - { - NativeMethods.CloseHandle(m_ImageContainerHandle); - m_ImageContainerHandle = IntPtr.Zero; - } - - if (m_MessageCallback != null) - { - NativeMethods.UnregisterMessageCallback(m_MessageCallback); - m_MessageCallback = null; - } - GC.KeepAlive(this); - } - - /// - ///Used to enumerate the WindowsImage array - /// - public - IEnumerator - GetEnumerator( - ) - { - return m_Images.GetEnumerator(); - } - - /// - ///[] overload, used to enumerate the WindowsImage array - /// - public - IImage - this[int imageIndex] - { - get - { - // - //Delay load images - // - if (m_Images == null || m_Images[imageIndex] == null) - { - - ArrayList tempImages = new ArrayList(); - tempImages.Add(new WindowsImage(m_ImageContainerHandle, m_WindowsImageFilePath, imageIndex + 1)); - m_Images = (WindowsImage[])tempImages.ToArray(typeof(WindowsImage)); - } - GC.KeepAlive(this); - return m_Images[imageIndex]; - } - } - - /// - ///Retrieve the number of images in the .wim file. - /// - public int ImageCount - { - get - { - // - //Verify if there is an image count; if not, get it. - // - if (m_ImageCount == 0) - { - m_ImageCount = NativeMethods.GetImageCount(m_ImageContainerHandle); - } - - GC.KeepAlive(this); - return m_ImageCount; - } - } - - /// - ///Capture an image from the root of a drive or from an individual directory. - /// - public void CaptureImage(string pathToCapture) - { - // - //Capture the image. - // - IntPtr windowsImageHandle = NativeMethods.CaptureImage(m_ImageContainerHandle, pathToCapture); - NativeMethods.CloseHandle(windowsImageHandle); - GC.KeepAlive(this); - } - - /// - ///Default event handler - /// - //[CLSCompliant(false)] - public delegate void DefaultImageEventHandler(object sender, DefaultImageEventArgs e); - //public delegate void DefaultImageEventHandler(IntPtr wParam, IntPtr lParam, IntPtr UserData); - /// - ///ProcessFileEvent handler - /// - //[CLSCompliant(false)] - public delegate void ProcessFileEventHandler(object sender, ProcessFileEventArgs e); - //public delegate void ProcessFileEventHandler(ProcessFile fileToProcess); - - - /// - ///Indicate an update in the progress of an image application. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler ProgressEvent; - /// - ///Enable the caller to prevent a file or a directory from being captured or applied. - /// - //[CLSCompliant(false)] - public event ProcessFileEventHandler ProcessFileEvent; - /// - ///Enable the caller to prevent a file resource from being compressed during a capture. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler CompressEvent; - /// - ///Alert the caller that an error has occurred while capturing or applying an image. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler ErrorEvent; - /// - ///Enable the caller to align a file resource on a particular alignment boundary. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler AlignmentEvent; - /// - ///Enable the caller to align a file resource on a particular alignment boundary. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler SplitEvent; - /// - ///Indicate that volume information is being gathered during an image capture. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler ScanningEvent; - /// - ///Indicate the number of files that will be captured or applied. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler SetRangeEvent; - /// - ///Indicate the number of files that have been captured or applied. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler SetPosEvent; - /// - ///Indicate that a file has been either captured or applied. - /// - //[CLSCompliant(false)] - public event DefaultImageEventHandler StepItEvent; - - - /// - ///Event callback to the Wimgapi events - /// - private - uint - ImageEventMessagePump( - uint MessageId, - IntPtr wParam, - IntPtr lParam, - IntPtr UserData - ) - { - uint status = (uint)NativeMethods.WIMMessage.WIM_MSG_SUCCESS; - DefaultImageEventArgs eventArgs = new DefaultImageEventArgs(wParam, lParam, UserData); - - switch ((ImageEventMessage)MessageId) - { - - case ImageEventMessage.Progress: - ProgressEvent(this, eventArgs); - break; - - case ImageEventMessage.Process: - string fileToImage = Marshal.PtrToStringUni(wParam); - ProcessFileEventArgs fileToProcess = new ProcessFileEventArgs(fileToImage, lParam); - ProcessFileEvent(this, fileToProcess); - if (fileToProcess.Abort == true) - { - status = (uint)ImageEventMessage.Abort; - } - break; - - case ImageEventMessage.Compress: - CompressEvent(this, eventArgs); - break; - - case ImageEventMessage.Error: - ErrorEvent(this, eventArgs); - break; - - case ImageEventMessage.Alignment: - AlignmentEvent(this, eventArgs); - break; - - case ImageEventMessage.Split: - SplitEvent(this, eventArgs); - break; - - case ImageEventMessage.Scanning: - ScanningEvent(this, eventArgs); - break; - - case ImageEventMessage.SetRange: - SetRangeEvent(this, eventArgs); - break; - - case ImageEventMessage.SetPos: - SetPosEvent(this, eventArgs); - break; - - case ImageEventMessage.StepIt: - StepItEvent(this, eventArgs); - break; - - default: - break; - } - - return status; - } - - /// - ///Image inside of a .wim file - /// - private - class - WindowsImage : IImage - { - /// - ///Public constructor to create an image object from inside a .wim file - /// - public WindowsImage(IntPtr imageContainerHandle, string imageContainerFilePath, int imageIndex) - { - m_ParentWindowsImageHandle = imageContainerHandle; - m_ParentWindowsImageFilePath = imageContainerFilePath; - m_Index = imageIndex; - - // - //Load the image and stash away the handle. - // - m_ImageHandle = NativeMethods.LoadImage(imageContainerHandle, imageIndex); - } - - /// Destructor to close open handles. - ~WindowsImage() - { - DisposeInner(); - } - - /// - ///Dispose all unmanaged resources. - /// - public - void - Dispose() - { - DisposeInner(); - GC.SuppressFinalize(this); - } - - private - void - DisposeInner() - { - // - //Do not leave any open handles or mounted images. - // - if (m_ImageHandle != IntPtr.Zero) - { - NativeMethods.CloseHandle(m_ImageHandle); - m_ImageHandle = IntPtr.Zero; - } - - if (m_Mounted == true) - { - // - //Never commit changes when destroying this object. - // - this.DismountImage(false); - } - GC.KeepAlive(this); - } - - /// - ///Gets an image information header. - /// - /// - public string ImageInformation - { - get - { - // - //Always get the image header (even if we have it already), removing the unicode file marker. - // - string str = NativeMethods.GetImageInformation(m_ImageHandle).Remove(0, 1); - GC.KeepAlive(this); - - return str; - } - } - - // /// - // ///Returns an XmlTextReader for a given node name. - // /// - // private XmlTextReader ImageInformationHelper(string raw) { - - // XmlTextReader xmlTextReader = null; - - // if (raw != null) { - // XmlDocument xmlDocument = new XmlDocument(); - // try { - // xmlDocument.LoadXml(raw); - - // // - // //Look at all nodes. - // // - // foreach(XmlNode node in xmlDocument.ChildNodes) { - - // // - // //Now, find the specified node - // // - // foreach(XmlNode childNode in node) { - // if - //(String.Equals(childNode.Name, node.ToString(), StringComparison.InvariantCultureIgnoreCase)) { - - // StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture); - // XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter); - - // xmlTextWriter.WriteStartElement(childNode.Name); - // // - // //We are in the specified node. Now, get all the attributes - // // - // foreach(XmlAttribute attribute in childNode.Attributes) { - // xmlTextWriter.WriteAttributeString(attribute.Name, attribute.InnerXml); - // } - // xmlTextWriter.WriteEndElement(); - - // xmlTextReader = new XmlTextReader(null, new StringReader(stringWriter.ToString())); - // } - // } - // } - // } - // catch (System.Xml.XmlException) { - // throw new System.Xml.XmlException(string.Format(CultureInfo.CurrentCulture, - // "Unable to read XML header information from {0}", - // this.m_ParentWindowsImageFilePath)); - // } - // } - // return xmlTextReader; - // } - - /// - ///Retrieves the path to which an image has been mounted. - /// - public string MountedPath - { - get - { - return (m_MountedPath != null) ? m_MountedPath : null; - } - } - - /// - ///Sets the image information header - /// - /// - public void SetImageInformation(string imageInformation) - { - // - //Format the incoming XML so that we can set the header. The XML must have: - //1. Leading 0xFEFF - //2. Be in - // - string formattedXml = String.Format(CultureInfo.InvariantCulture, - "{0}{1}{2}{3}", - UNICODE_FILE_MARKER, - "", - imageInformation, - ""); - - NativeMethods.SetImageInformation(m_ImageHandle, formattedXml); - GC.KeepAlive(this); - } - - /// - ///Mounts an image to a directory. - /// - /// - public void Mount(string pathToMountTo) - { - // - //Mount the image - // - m_MountedPath = pathToMountTo; - NativeMethods.MountImage(pathToMountTo, m_ParentWindowsImageFilePath, m_Index, System.IO.Path.GetTempPath()); - m_Mounted = true; - } - - /// - ///Unmounts an image from a directory. - /// - /// - public void DismountImage(bool commitChanges) - { - if (m_Mounted == true) - { - NativeMethods.DismountImage(m_MountedPath, m_ParentWindowsImageFilePath, m_Index, commitChanges); - } - } - - /// - ///Applies an image to a drive root or to a directory path. - /// - /// - public void Apply(string pathToApplyTo) - { - NativeMethods.ApplyImage(m_ImageHandle, pathToApplyTo); - GC.KeepAlive(this); - } - - private IntPtr m_ParentWindowsImageHandle = IntPtr.Zero; //.wim file handle - private string m_ParentWindowsImageFilePath; //path to .wim file - - private IntPtr m_ImageHandle = IntPtr.Zero; //image handle - private int m_Index; //index of image - - private string m_MountedPath; //where the image has been mounted - private bool m_Mounted; //true if image has been mounted - - // - //DO NOT CHANGE! This controls the format of the image header - //and it must be present. - // - private const string UNICODE_FILE_MARKER = "\uFEFF"; - } - - /// - ///Interop to Wimgapi.dll - /// - public - class - NativeMethods - { - /// - ///Private null constructor - /// - private - NativeMethods() { } - - [DllImport("Wimgapi.dll", ExactSpelling = true, - EntryPoint = "WIMCreateFile", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - IntPtr - WimCreateFile( - [MarshalAs(UnmanagedType.LPWStr)] string WimPath, - uint DesiredAccess, - uint CreationDisposition, - uint FlagsAndAttributes, - uint CompressionType, - out IntPtr CreationResult - ); - - /// - ///Creates a new .wim file or opens an existing .wim file. - /// - ///Path to the .wim file to open or to create. - ///Specifies the file access to grant the file. - ///Specifies the mode in which the file should be opened or created. - ///If the function succeeds, the return value is an open handle to the specified image file. - ///If the function fails, the return value is NULL. - public - static - IntPtr - CreateFile(string imageFile, uint access, uint mode) - { - IntPtr creationResult = IntPtr.Zero; - IntPtr windowsImageHandle = IntPtr.Zero; - int rc = -1; - - windowsImageHandle = NativeMethods.WimCreateFile(imageFile, access, mode, 0, 0, out creationResult); - rc = Marshal.GetLastWin32Error(); - if (windowsImageHandle == IntPtr.Zero) - { - // - //Everything failed; throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to open/create .wim file {0}. Error = {1}", - imageFile, rc)); - } - - return windowsImageHandle; - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMCloseHandle", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - bool - WimCloseHandle( - IntPtr Handle - ); - - /// - ///Closes an open .wim file or an image handle. - /// - ///Handle to an open imaging-based object. - ///If the function succeeds, the return value is nonzero. - ///If the function fails, the return value is zero. - public - static - void - CloseHandle(IntPtr handle) - { - bool status = NativeMethods.WimCloseHandle(handle); - int rc = Marshal.GetLastWin32Error(); - if (status == false) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to close image handle. Error = {0}", rc)); - } - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMSetTemporaryPath", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - bool - WimSetTemporaryPath( - IntPtr Handle, - [MarshalAs(UnmanagedType.LPWStr)] string TemporaryPath - ); - - /// - ///Sets the location where temporary imaging files are to be stored. - /// - ///Handle to a WIM file returned by CreateFile - ///String value of path to set as a temporary location. - ///If the function succeeds, the return value is nonzero. - ///If the function fails, the return value is NULL. - public - static - void - SetTemporaryPath(IntPtr handle, string temporaryPath) - { - bool status = NativeMethods.WimSetTemporaryPath(handle, temporaryPath); - int rc = Marshal.GetLastWin32Error(); - if (status == false) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to set temporary path. Error = {0}", rc)); - } - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMLoadImage", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - IntPtr - WimLoadImage( - IntPtr Handle, - uint ImageIndex - ); - - /// - ///Loads a volume image or from within a .wim file. - /// - ///Wim handle. - ///Index of the image to load. - ///If the function succeeds, the return value is a handle to an object representing the volume image. - ///If the function fails, the return value is NULL. - public - static - IntPtr - LoadImage(IntPtr handle, int imageIndex) - { - //Load the image data based on the .wim handle - // - IntPtr hWim = NativeMethods.WimLoadImage(handle, (uint)imageIndex); - int rc = Marshal.GetLastWin32Error(); - if (hWim == IntPtr.Zero) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to load image. Error = {0}", rc)); - } - - return hWim; - - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMCaptureImage", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - IntPtr - WimCaptureImage( - IntPtr Handle, - [MarshalAs(UnmanagedType.LPWStr)] string Path, - uint CaptureFlags - ); - - /// - ///Captures an image from a drive root or from a directory path and stores it in an image file. - /// - ///Handle to a .wim file returned by CreateFile. - ///Drive root or directory path from where the image data will be captured. - ///Handle to an object representing the volume image. If the function fails, the return value is NULL. - public - static - IntPtr - CaptureImage(IntPtr handle, string path) - { - IntPtr hImage = NativeMethods.WimCaptureImage(handle, path, 0); - int rc = Marshal.GetLastWin32Error(); - if (hImage == IntPtr.Zero) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Failed to capture image from {0}. Error = {1}", path, rc)); - } - return hImage; - } - - /// - ///Gets the number of volume images stored in a .wim file. - /// - ///Handle to a .wim file returned by CreateFile. - ///The number of images within the .wim file. - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMGetImageCount", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - int - WimGetImageCount( - IntPtr Handle - ); - - /// - ///Returns the number of volume images stored in a .wim file. - /// - ///Handle to a .wim file returned by WIMCreateFile. - ///The return value is the number of images within the .wim file. - ///If this value is zero, then the .wim file is invalid or does not contain any images that can be applied. - /// - public - static - int - GetImageCount(IntPtr windowsImageHandle) - { - int count = NativeMethods.WimGetImageCount(windowsImageHandle); - int rc = Marshal.GetLastWin32Error(); - if (count == -1) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to get image count. Error = {0}", rc)); - } - - return count; - } - - //[DllImport("Wimgapi.dll", - // ExactSpelling = true, - // EntryPoint = "WIMMountImageHandle", - // CallingConvention = CallingConvention.StdCall, - // SetLastError = true)] - //private static extern - //bool - //WIMMountImageHandle( - // IntPtr hImage, - // [MarshalAs(UnmanagedType.LPWStr)] string pszMountPath, - // uint dwMountFlags - // ); - ///// - /////Mounts an image in a .wim file to the specified directory. - ///// - /////Returns TRUE and sets the LastError to ERROR_SUCCESS. - /////Returns FALSE in case of a failure and the LastError is set to the appropriate Win32 error value. - ///// - //public - //static - //void - //MountImageHandle(string mountPath, ) - //{ - // bool status = false; - // int rc; - - // try - // { - // status = NativeMethods.WimMountImage(mountPath, - // windowsImageFileName, - // (uint)imageIndex, - // System.Environment.GetEnvironmentVariable("temp")); - // rc = Marshal.GetLastWin32Error(); - // } - // catch (System.StackOverflowException) - // { - // // - // //Throw an exception - // // - // throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - // "Unable to mount image {0} to {1}.", windowsImageFileName, mountPath)); - // } - // if (status == false) - // { - // // - // //Throw an exception - // // - // throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - // "Unable to mount image {0} to {1}. Error = {2}", - // windowsImageFileName, mountPath, rc)); - // } - //} - - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMMountImage", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - bool - WimMountImage( - [MarshalAs(UnmanagedType.LPWStr)] string MountPath, - [MarshalAs(UnmanagedType.LPWStr)] string WimFileName, - uint ImageIndex, - [MarshalAs(UnmanagedType.LPWStr)] string TemporaryPath - - ); - - /// - ///Mounts an image in a .wim file to the specified directory. - /// - ///Returns TRUE and sets the LastError to ERROR_SUCCESS. - ///Returns FALSE in case of a failure and the LastError is set to the appropriate Win32 error value. - /// - public - static - void - MountImage(string mountPath, string windowsImageFileName, int imageIndex, string temporaryPath) - { - bool status = false; - int rc; - - try - { - status = NativeMethods.WimMountImage(mountPath, - windowsImageFileName, - (uint)imageIndex, - temporaryPath); - rc = Marshal.GetLastWin32Error(); - } - catch (System.StackOverflowException) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to mount image {0} to {1}.", windowsImageFileName, mountPath)); - } - if (status == false) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to mount image {0} to {1}. Error = {2}", - windowsImageFileName, mountPath, rc)); - } - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMApplyImage", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - bool - WimApplyImage( - IntPtr Handle, - [MarshalAs(UnmanagedType.LPWStr)] string Path, - uint Flags - ); - - /// - ///Applies an image to a drive root or to a directory path from a .wim file. - /// - ///If the function succeeds, the return value is nonzero. - ///If the function fails, the return value is zero - public - static - void - ApplyImage(IntPtr imageHandle, string applicationPath) - { - // - //Call WimApplyImage always with the Index flag for performance reasons. - // - bool status = NativeMethods.WimApplyImage(imageHandle, applicationPath, NativeMethods.WIM_FLAG_INDEX); - int rc = Marshal.GetLastWin32Error(); - if (status == false) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to apply image to {0}. Error = {1}", applicationPath, rc)); - } - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMGetImageInformation", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - bool - WimGetImageInformation( - IntPtr Handle, - out IntPtr ImageInfo, - out IntPtr SizeOfImageInfo - ); - - /// - ///Returns information about an image within the .wim file. - /// - ///Handle returned by CreateImage, LoadImage - ///If the function succeeds, the return value is nonzero. - ///If the function fails, the return value is zero. - /// - public - static - string - GetImageInformation(IntPtr handle) - { - IntPtr info = IntPtr.Zero, sizeOfInfo = IntPtr.Zero; - bool status; - - status = NativeMethods.WimGetImageInformation(handle, out info, out sizeOfInfo); - int rc = Marshal.GetLastWin32Error(); - - if (status == false) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to get image information. Error = {0}", rc)); - } - string s = Marshal.PtrToStringUni(info); - - //If the function succeeds, return the pointer to the string. Otherwise, return NULL. - // - return s; - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMSetImageInformation", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - bool - WimSetImageInformation( - IntPtr Handle, - IntPtr ImageInfo, - uint SizeOfImageInfo - ); - - /// - ///Stores information about an image within the .wim file. - /// - ///Handle returned by CreateImage, LoadImage - ///String containing the unicode XML data to set. - ///If the function succeeds, the return value is nonzero. - ///If the function fails, the return value is zero. - public - static - void - SetImageInformation(IntPtr handle, string imageInfo) - { - //Create a byte array for the stream, allocate some unmanaged memory, and then copy the bytes to the unmanaged memory. - // - byte[] byteBuffer = Encoding.Unicode.GetBytes(imageInfo); - int byteBufferSize = byteBuffer.Length; - IntPtr xmlBuffer = Marshal.AllocHGlobal(byteBufferSize); - Marshal.Copy(byteBuffer, 0, xmlBuffer, byteBufferSize); - - bool status = NativeMethods.WimSetImageInformation(handle, xmlBuffer, (uint)byteBufferSize); - int rc = Marshal.GetLastWin32Error(); - if (status == false) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to set image information. Error = {0}", rc)); - } - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMUnmountImage", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - bool - WimUnmountImage( - [MarshalAs(UnmanagedType.LPWStr)] string MountPath, - [MarshalAs(UnmanagedType.LPWStr)] string WimFileName, - uint ImageIndex, - bool CommitChanges - ); - - /// - ///Unmounts a mounted image in a .wim file from the specified directory. - /// - ///Returns TRUE and sets the LastError to ERROR_SUCCESS. Returns FALSE in case of a failure and the LastError is set - ///to the appropriate Win32 error value. - public - static - void - DismountImage(string mountPath, string wimdowsImageFileName, int imageIndex, bool commitChanges) - { - bool status = false; - int rc; - - try - { - status = NativeMethods.WimUnmountImage(mountPath, wimdowsImageFileName, (uint)imageIndex, commitChanges); - rc = Marshal.GetLastWin32Error(); - } - catch (System.StackOverflowException ex) - { - // - //Throw an exception - // - throw new System.StackOverflowException(string.Format(CultureInfo.CurrentCulture, - "Unable to unmount image {0} from {1}.", wimdowsImageFileName, mountPath), - ex.InnerException); - } - if (status == false) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, - "Unable to unmount image {0} from {1}. Error = {2}", - wimdowsImageFileName, mountPath, rc)); - } - } - - /// - ///User-defined function used with the RegisterMessageCallback or UnregisterMessageCallback function. - /// - ///Specifies the message being sent. - ///Specifies additional message information. The contents of this parameter depend on the value of the - ///MessageId parameter. - ///Specifies additional message information. The contents of this parameter depend on the value of the - ///MessageId parameter. - ///Specifies the user-defined value passed to RegisterCallback. - /// - ///To indicate success and to enable other subscribers to process the message return WIM_MSG_SUCCESS. - ///To prevent other subscribers from receiving the message, return WIM_MSG_DONE. - ///To cancel an image apply or capture, return WIM_MSG_ABORT_IMAGE when handling the WIM_MSG_PROCESS message. - /// - public - delegate - uint - MessageCallback( - uint MessageId, - IntPtr wParam, - IntPtr lParam, - IntPtr UserData - ); - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMRegisterMessageCallback", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - uint - WimRegisterMessageCallback( - IntPtr hWim, - MessageCallback MessageProc, - IntPtr ImageInfo - ); - - /// - ///Registers a function to be called with imaging-specific data. - /// - public - static - void - RegisterCallback(MessageCallback callback) - { - uint callbackZeroBasedIndex = NativeMethods.WimRegisterMessageCallback(IntPtr.Zero, callback, IntPtr.Zero); - int rc = Marshal.GetLastWin32Error(); - if (rc != 0) - { - // - //Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to register message callback.")); - } - } - - [DllImport("Wimgapi.dll", - ExactSpelling = true, - EntryPoint = "WIMUnregisterMessageCallback", - CallingConvention = CallingConvention.StdCall, - SetLastError = true)] - private static extern - bool - WimUnregisterMessageCallback( - IntPtr hWim, - MessageCallback MessageProc - ); - - /// - ///Unregisters a function from being called with imaging-specific data. - /// - ///Callback to be unregistered. - public - static - void - UnregisterMessageCallback(MessageCallback registeredCallback) - { - bool status = NativeMethods.WimUnregisterMessageCallback(IntPtr.Zero, registeredCallback); - int rc = Marshal.GetLastWin32Error(); - if (status != true) - { - // - // Throw an exception - // - throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to unregister message callback.")); - } - } - - private const uint WM_APP = 0x8000; - - /// - ///Imaging Messages - /// - public enum WIMMessage : uint - { - WIM_MSG = WM_APP + 0x1476, - WIM_MSG_TEXT, - /// - ///Indicates an update in the progress of an image application. - /// - WIM_MSG_PROGRESS, - /// - ///Enables the caller to prevent a file or a directory from being captured or applied. - /// - WIM_MSG_PROCESS, - /// - ///Indicates that volume information is being gathered during an image capture. - /// - WIM_MSG_SCANNING, - /// - ///Indicates the number of files that will be captured or applied. - /// - WIM_MSG_SETRANGE, - /// - ///Indicates the number of files that have been captured or applied. - /// - WIM_MSG_SETPOS, - /// - ///Indicates that a file has been either captured or applied. - /// - WIM_MSG_STEPIT, - /// - ///Enables the caller to prevent a file resource from being compressed during a capture. - /// - WIM_MSG_COMPRESS, - /// - ///Alerts the caller that an error has occurred while capturing or applying an image. - /// - WIM_MSG_ERROR, - /// - ///Enables the caller to align a file resource on a particular alignment boundary. - /// - WIM_MSG_ALIGNMENT, - WIM_MSG_RETRY, - /// - ///Enables the caller to align a file resource on a particular alignment boundary. - /// - WIM_MSG_SPLIT, - WIM_MSG_FILEINFO, - WIM_MSG_INFO, - WIM_MSG_WARNING, - WIM_MSG_CHK_PROCESS, - WIM_MSG_WARNING_OBJECTID, - WIM_MSG_STALE_MOUNT_DIR, - WIM_MSG_STALE_MOUNT_FILE, - WIM_MSG_MOUNT_CLEANUP_PROGRESS, - WIM_MSG_SUCCESS = 0x00000000, - WIM_MSG_ABORT_IMAGE = 0xFFFFFFFF - }; - - /// - ///Capture will do byte-by-byte verification of single instance files. - /// - public const uint WIM_FLAG_VERIFY = 0x00000002; - /// - ///Specifies that the image is to be sequentially read for caching/performance purposes. - /// - public const uint WIM_FLAG_INDEX = 0x00000004; - - } - - /// - ///Maps CreateFileAccess to CreateFileAccessPrivate - /// - /// - private - CreateFileAccessPrivate - GetMappedFileAccess(CreateFileAccess access) - { - // - //Map the file access specified from an int to uint. - // - CreateFileAccessPrivate fileAccess; - switch (access) - { - case CreateFileAccess.Read: - fileAccess = CreateFileAccessPrivate.Read; - break; - case CreateFileAccess.Write: - fileAccess = CreateFileAccessPrivate.Write; - break; - default: - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "No file access level specified.")); - } - return fileAccess; - } - - //[CLSCompliant(false)] - [FlagsAttribute] - private - enum - CreateFileAccessPrivate : uint - { - /// - ///Mapping from CreateFileAccess.Read - /// - Read = 0x80000000, - /// - ///Mapping from CreateFileAccess.Write - /// - Write = 0x40000000 - } - - /// - ///Image event messages. - /// - //[CLSCompliant(false)] - public - enum - ImageEventMessage : uint - { - /// - ///Enables the caller to prevent a file or a directory from being captured or applied. - /// - Progress = NativeMethods.WIMMessage.WIM_MSG_PROGRESS, - /// - ///Notification sent to enable the caller to prevent a file or a directory from being captured or applied. - ///To prevent a file or a directory from being captured or applied, call WindowsImageContainer.SkipFile(). - /// - Process = NativeMethods.WIMMessage.WIM_MSG_PROCESS, - /// - ///Enables the caller to prevent a file resource from being compressed during a capture. - /// - Compress = NativeMethods.WIMMessage.WIM_MSG_COMPRESS, - /// - ///Alerts the caller that an error has occurred while capturing or applying an image. - /// - Error = NativeMethods.WIMMessage.WIM_MSG_ERROR, - /// - ///Enables the caller to align a file resource on a particular alignment boundary. - /// - Alignment = NativeMethods.WIMMessage.WIM_MSG_ALIGNMENT, - /// - ///Enables the caller to align a file resource on a particular alignment boundary. - /// - Split = NativeMethods.WIMMessage.WIM_MSG_SPLIT, - /// - ///Indicates that volume information is being gathered during an image capture. - /// - Scanning = NativeMethods.WIMMessage.WIM_MSG_SCANNING, - /// - ///Indicates the number of files that will be captured or applied. - /// - SetRange = NativeMethods.WIMMessage.WIM_MSG_SETRANGE, - /// - ///Indicates the number of files that have been captured or applied. - /// - SetPos = NativeMethods.WIMMessage.WIM_MSG_SETPOS, - /// - ///Indicates that a file has been either captured or applied. - /// - StepIt = NativeMethods.WIMMessage.WIM_MSG_STEPIT, - /// - ///Success. - /// - Success = NativeMethods.WIMMessage.WIM_MSG_SUCCESS, - /// - ///Abort. - /// - Abort = NativeMethods.WIMMessage.WIM_MSG_ABORT_IMAGE, - - MountCleanupProgress = NativeMethods.WIMMessage.WIM_MSG_MOUNT_CLEANUP_PROGRESS - } - - // - //WindowsImageContainer Member Data - // - private IntPtr m_ImageContainerHandle; //Handle to the .wim file - private string m_WindowsImageFilePath; //Path to the .wim file - - private WindowsImage[] m_Images; //Array of image objects inside a .wim file - private int m_ImageCount; //Number of images inside a .wim file - - // - //DO NOT CHANGE! - // - private static NativeMethods.MessageCallback m_MessageCallback; - } - - /// - ///Describes the file that is being processed for the ProcessFileEvent. - /// - public - class - DefaultImageEventArgs : EventArgs - { - /// - ///Default constructor. - /// - public - DefaultImageEventArgs(IntPtr wideParameter, IntPtr leftParameter, IntPtr userData) - { - m_wParam = wideParameter; - m_lParam = leftParameter; - m_UserData = userData; - - - } - /// - ///wParam - /// - public IntPtr WideParameter - { - get - { - return m_wParam; - } - } - /// - ///lParam - /// - public IntPtr LeftParameter - { - get - { - return m_lParam; - } - } - /// - ///UserData - /// - public IntPtr UserData - { - get - { - return m_UserData; - } - } - - private IntPtr m_wParam; - private IntPtr m_lParam; - private IntPtr m_UserData; - } - - /// - ///Describes the file that is being processed for the ProcessFileEvent. - /// - public - class - ProcessFileEventArgs : EventArgs - { - /// - ///Default constructor. - /// - ///Fully qualified path and file name. For example: c:\file.sys. - ///Default is false - skip file and continue. - ///Set to true to abort the entire image capture. - public - ProcessFileEventArgs(string file, IntPtr skipFileFlag) - { - m_FilePath = file; - m_SkipFileFlag = skipFileFlag; - } - - /// - ///Skip file from being imaged. - /// - public - void - SkipFile() - { - byte[] byteBuffer = { - 0 - }; - int byteBufferSize = byteBuffer.Length; - Marshal.Copy(byteBuffer, 0, m_SkipFileFlag, byteBufferSize); - } - - /// - ///Fully qualified path and file name. - /// - public string FilePath - { - get - { - string stringToReturn = ""; - if (m_FilePath != null) - { - stringToReturn = m_FilePath; - } - return stringToReturn; - } - } - - /// - ///Flag to indicate if the entire image capture should be aborted. - ///Default is false - skip file and continue. Setting to true will - ///abort the entire image capture. - /// - public bool Abort - { - set - { - m_Abort = value; - } - - get - { - return m_Abort; - } - } - private string m_FilePath; - private bool m_Abort; - private IntPtr m_SkipFileFlag; - - } -} +using System; +using System.Collections; +using System.Globalization; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; +using System.Xml; + +namespace Disco.ClientBootstrapper.Interop.WIMInterop +{ + /// + ///Pulic interface to a WindowsImage object. + /// + public + interface IImage : IDisposable + { + /// + ///Gets image information from within a .wim file. + /// + string ImageInformation + { + get; + } + + /// + ///Sets image information about an image within a .wim file. + /// + ///The string being passed in should be in the form of a unicode XML file. + ///Calling this function replaces any customized image data. To preserve existing XML information, call ImageInformation + ///and append/edit desired data. + /// + void SetImageInformation( + string imageInformation + ); + + /// + ///Mounts an image in a .wim file to the specified directory. + /// + void Mount( + string pathToMountTo + ); + + /// + ///Retrieves the path to which an image has been mounted. + /// + string MountedPath + { + get; + } + + /// + ///Unmounts a mounted image in a .wim file from the specified directory. + /// + ///Indicates whether changes (if any) to the .wim file should be committed + ///before unmounting the .wim file. This flag will have no effect if the .wim file was mounted not to allow edits. + /// + void DismountImage( + bool commitChanges + ); + + /// + ///Applies an image to a drive root or to a directory path from a .wim file. + /// + void Apply( + string pathToApplyTo + ); + } + + /// + ///Class representing a .wim file. + /// + public + sealed + class + WindowsImageContainer : IDisposable + { + /// + ///Specifies the type of access to the .wim file. + /// + public + enum + CreateFileAccess + { + /// + ///Specifies read-only access to the .wim file. + /// + Read, + + /// + ///Specifies write access to the .wim file. + ///Includes WIM_GENERIC_READ access to enable apply and append operations with existing images. + /// + Write + } + + /// + ///Specifies which action to take on files that exist and + ///which action to take when files do not exist. + /// + public + enum + CreateFileMode + { + /// + ///RESERVED, DO NOT USE! + /// + None = 0, + + /// + ///Creates a new .wim file. The function fails if the specified file already exists. + /// + CreateNew = 1, + + /// + ///Creates a new .wim file. If the file exists, the function overwrites the file. + /// + CreateAlways = 2, + + /// + ///Opens the .wim file. The function fails if the file does not exist. + /// + OpenExisting = 3, + + /// + ///Opens the .wim file if it exists. If the file does not exist and the caller requests WIM_GENERIC_WRITE access, the + ///function creates the file. + /// + OpenAlways = 4 + } + + /// + ///Public constructor to create a WIM object + /// + ///Path of WIM to create or to open. + ///Specifies Open, Create, Create/Open disposition of the .wim file. + ///Specifies access level of Read Only or Write. + //[CLSCompliant(false)] + public WindowsImageContainer(string imageFilePath, CreateFileMode mode, CreateFileAccess access) + { + CreateFileAccessPrivate fileAccess = GetMappedFileAccess(access); + if (fileAccess == CreateFileAccessPrivate.Read && (!File.Exists(imageFilePath) || (CreateFileMode.OpenExisting != mode))) + { + throw new System.UnauthorizedAccessException(string.Format(CultureInfo.CurrentCulture, + "Read access can be specified only with OpenExisting mode or OpenAlways mode when the .wim file does not exist.")); + } + + // + //Imaging DLLs must be in the same directory. + // + try + { + m_ImageContainerHandle = NativeMethods.CreateFile(imageFilePath, (uint)fileAccess, (uint)mode); + m_WindowsImageFilePath = imageFilePath; + } + catch (System.DllNotFoundException ex) + { + throw new System.DllNotFoundException(string.Format(CultureInfo.CurrentCulture, + "Unable to load WIM libraries. Make sure the correct DLLs are present (Wimgapi.dll and Xmlrw.dll)."), ex.InnerException); + } + + if (!m_ImageContainerHandle.Equals(IntPtr.Zero)) + { + // + //Set the temporary path so that we can write to an image. This + //cannot be %TEMP% as it does not exist on Windows PE + // + string tempDirectory = System.Environment.GetEnvironmentVariable("systemdrive"); + NativeMethods.SetTemporaryPath(m_ImageContainerHandle, tempDirectory); + + } + else + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to open the .wim file {0}.", imageFilePath)); + } + + // + //Finally, we must hook into the events. + // + m_MessageCallback = new NativeMethods.MessageCallback(ImageEventMessagePump); + NativeMethods.RegisterCallback(m_MessageCallback); + } + + /// Destructor to close open handles. + ~WindowsImageContainer() + { + DisposeInner(); + } + + /// + ///Dispose all unmanaged resources + /// + public + void + Dispose() + { + DisposeInner(); + GC.SuppressFinalize(this); + } + + private + void + DisposeInner() + { + if (m_ImageContainerHandle != IntPtr.Zero) + { + NativeMethods.CloseHandle(m_ImageContainerHandle); + m_ImageContainerHandle = IntPtr.Zero; + } + + if (m_MessageCallback != null) + { + NativeMethods.UnregisterMessageCallback(m_MessageCallback); + m_MessageCallback = null; + } + GC.KeepAlive(this); + } + + /// + ///Used to enumerate the WindowsImage array + /// + public + IEnumerator + GetEnumerator( + ) + { + return m_Images.GetEnumerator(); + } + + /// + ///[] overload, used to enumerate the WindowsImage array + /// + public + IImage + this[int imageIndex] + { + get + { + // + //Delay load images + // + if (m_Images == null || m_Images[imageIndex] == null) + { + + ArrayList tempImages = new ArrayList(); + tempImages.Add(new WindowsImage(m_ImageContainerHandle, m_WindowsImageFilePath, imageIndex + 1)); + m_Images = (WindowsImage[])tempImages.ToArray(typeof(WindowsImage)); + } + GC.KeepAlive(this); + return m_Images[imageIndex]; + } + } + + /// + ///Retrieve the number of images in the .wim file. + /// + public int ImageCount + { + get + { + // + //Verify if there is an image count; if not, get it. + // + if (m_ImageCount == 0) + { + m_ImageCount = NativeMethods.GetImageCount(m_ImageContainerHandle); + } + + GC.KeepAlive(this); + return m_ImageCount; + } + } + + /// + ///Capture an image from the root of a drive or from an individual directory. + /// + public void CaptureImage(string pathToCapture) + { + // + //Capture the image. + // + IntPtr windowsImageHandle = NativeMethods.CaptureImage(m_ImageContainerHandle, pathToCapture); + NativeMethods.CloseHandle(windowsImageHandle); + GC.KeepAlive(this); + } + + /// + ///Default event handler + /// + //[CLSCompliant(false)] + public delegate void DefaultImageEventHandler(object sender, DefaultImageEventArgs e); + //public delegate void DefaultImageEventHandler(IntPtr wParam, IntPtr lParam, IntPtr UserData); + /// + ///ProcessFileEvent handler + /// + //[CLSCompliant(false)] + public delegate void ProcessFileEventHandler(object sender, ProcessFileEventArgs e); + //public delegate void ProcessFileEventHandler(ProcessFile fileToProcess); + + + /// + ///Indicate an update in the progress of an image application. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler ProgressEvent; + /// + ///Enable the caller to prevent a file or a directory from being captured or applied. + /// + //[CLSCompliant(false)] + public event ProcessFileEventHandler ProcessFileEvent; + /// + ///Enable the caller to prevent a file resource from being compressed during a capture. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler CompressEvent; + /// + ///Alert the caller that an error has occurred while capturing or applying an image. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler ErrorEvent; + /// + ///Enable the caller to align a file resource on a particular alignment boundary. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler AlignmentEvent; + /// + ///Enable the caller to align a file resource on a particular alignment boundary. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler SplitEvent; + /// + ///Indicate that volume information is being gathered during an image capture. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler ScanningEvent; + /// + ///Indicate the number of files that will be captured or applied. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler SetRangeEvent; + /// + ///Indicate the number of files that have been captured or applied. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler SetPosEvent; + /// + ///Indicate that a file has been either captured or applied. + /// + //[CLSCompliant(false)] + public event DefaultImageEventHandler StepItEvent; + + + /// + ///Event callback to the Wimgapi events + /// + private + uint + ImageEventMessagePump( + uint MessageId, + IntPtr wParam, + IntPtr lParam, + IntPtr UserData + ) + { + uint status = (uint)NativeMethods.WIMMessage.WIM_MSG_SUCCESS; + DefaultImageEventArgs eventArgs = new DefaultImageEventArgs(wParam, lParam, UserData); + + switch ((ImageEventMessage)MessageId) + { + + case ImageEventMessage.Progress: + ProgressEvent(this, eventArgs); + break; + + case ImageEventMessage.Process: + string fileToImage = Marshal.PtrToStringUni(wParam); + ProcessFileEventArgs fileToProcess = new ProcessFileEventArgs(fileToImage, lParam); + ProcessFileEvent(this, fileToProcess); + if (fileToProcess.Abort == true) + { + status = (uint)ImageEventMessage.Abort; + } + break; + + case ImageEventMessage.Compress: + CompressEvent(this, eventArgs); + break; + + case ImageEventMessage.Error: + ErrorEvent(this, eventArgs); + break; + + case ImageEventMessage.Alignment: + AlignmentEvent(this, eventArgs); + break; + + case ImageEventMessage.Split: + SplitEvent(this, eventArgs); + break; + + case ImageEventMessage.Scanning: + ScanningEvent(this, eventArgs); + break; + + case ImageEventMessage.SetRange: + SetRangeEvent(this, eventArgs); + break; + + case ImageEventMessage.SetPos: + SetPosEvent(this, eventArgs); + break; + + case ImageEventMessage.StepIt: + StepItEvent(this, eventArgs); + break; + + default: + break; + } + + return status; + } + + /// + ///Image inside of a .wim file + /// + private + class + WindowsImage : IImage + { + /// + ///Public constructor to create an image object from inside a .wim file + /// + public WindowsImage(IntPtr imageContainerHandle, string imageContainerFilePath, int imageIndex) + { + m_ParentWindowsImageHandle = imageContainerHandle; + m_ParentWindowsImageFilePath = imageContainerFilePath; + m_Index = imageIndex; + + // + //Load the image and stash away the handle. + // + m_ImageHandle = NativeMethods.LoadImage(imageContainerHandle, imageIndex); + } + + /// Destructor to close open handles. + ~WindowsImage() + { + DisposeInner(); + } + + /// + ///Dispose all unmanaged resources. + /// + public + void + Dispose() + { + DisposeInner(); + GC.SuppressFinalize(this); + } + + private + void + DisposeInner() + { + // + //Do not leave any open handles or mounted images. + // + if (m_ImageHandle != IntPtr.Zero) + { + NativeMethods.CloseHandle(m_ImageHandle); + m_ImageHandle = IntPtr.Zero; + } + + if (m_Mounted == true) + { + // + //Never commit changes when destroying this object. + // + this.DismountImage(false); + } + GC.KeepAlive(this); + } + + /// + ///Gets an image information header. + /// + /// + public string ImageInformation + { + get + { + // + //Always get the image header (even if we have it already), removing the unicode file marker. + // + string str = NativeMethods.GetImageInformation(m_ImageHandle).Remove(0, 1); + GC.KeepAlive(this); + + return str; + } + } + + // /// + // ///Returns an XmlTextReader for a given node name. + // /// + // private XmlTextReader ImageInformationHelper(string raw) { + + // XmlTextReader xmlTextReader = null; + + // if (raw != null) { + // XmlDocument xmlDocument = new XmlDocument(); + // try { + // xmlDocument.LoadXml(raw); + + // // + // //Look at all nodes. + // // + // foreach(XmlNode node in xmlDocument.ChildNodes) { + + // // + // //Now, find the specified node + // // + // foreach(XmlNode childNode in node) { + // if + //(String.Equals(childNode.Name, node.ToString(), StringComparison.InvariantCultureIgnoreCase)) { + + // StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture); + // XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter); + + // xmlTextWriter.WriteStartElement(childNode.Name); + // // + // //We are in the specified node. Now, get all the attributes + // // + // foreach(XmlAttribute attribute in childNode.Attributes) { + // xmlTextWriter.WriteAttributeString(attribute.Name, attribute.InnerXml); + // } + // xmlTextWriter.WriteEndElement(); + + // xmlTextReader = new XmlTextReader(null, new StringReader(stringWriter.ToString())); + // } + // } + // } + // } + // catch (System.Xml.XmlException) { + // throw new System.Xml.XmlException(string.Format(CultureInfo.CurrentCulture, + // "Unable to read XML header information from {0}", + // this.m_ParentWindowsImageFilePath)); + // } + // } + // return xmlTextReader; + // } + + /// + ///Retrieves the path to which an image has been mounted. + /// + public string MountedPath + { + get + { + return (m_MountedPath != null) ? m_MountedPath : null; + } + } + + /// + ///Sets the image information header + /// + /// + public void SetImageInformation(string imageInformation) + { + // + //Format the incoming XML so that we can set the header. The XML must have: + //1. Leading 0xFEFF + //2. Be in + // + string formattedXml = String.Format(CultureInfo.InvariantCulture, + "{0}{1}{2}{3}", + UNICODE_FILE_MARKER, + "", + imageInformation, + ""); + + NativeMethods.SetImageInformation(m_ImageHandle, formattedXml); + GC.KeepAlive(this); + } + + /// + ///Mounts an image to a directory. + /// + /// + public void Mount(string pathToMountTo) + { + // + //Mount the image + // + m_MountedPath = pathToMountTo; + NativeMethods.MountImage(pathToMountTo, m_ParentWindowsImageFilePath, m_Index, System.IO.Path.GetTempPath()); + m_Mounted = true; + } + + /// + ///Unmounts an image from a directory. + /// + /// + public void DismountImage(bool commitChanges) + { + if (m_Mounted == true) + { + NativeMethods.DismountImage(m_MountedPath, m_ParentWindowsImageFilePath, m_Index, commitChanges); + } + } + + /// + ///Applies an image to a drive root or to a directory path. + /// + /// + public void Apply(string pathToApplyTo) + { + NativeMethods.ApplyImage(m_ImageHandle, pathToApplyTo); + GC.KeepAlive(this); + } + + private IntPtr m_ParentWindowsImageHandle = IntPtr.Zero; //.wim file handle + private string m_ParentWindowsImageFilePath; //path to .wim file + + private IntPtr m_ImageHandle = IntPtr.Zero; //image handle + private int m_Index; //index of image + + private string m_MountedPath; //where the image has been mounted + private bool m_Mounted; //true if image has been mounted + + // + //DO NOT CHANGE! This controls the format of the image header + //and it must be present. + // + private const string UNICODE_FILE_MARKER = "\uFEFF"; + } + + /// + ///Interop to Wimgapi.dll + /// + public + class + NativeMethods + { + /// + ///Private null constructor + /// + private + NativeMethods() { } + + [DllImport("Wimgapi.dll", ExactSpelling = true, + EntryPoint = "WIMCreateFile", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + IntPtr + WimCreateFile( + [MarshalAs(UnmanagedType.LPWStr)] string WimPath, + uint DesiredAccess, + uint CreationDisposition, + uint FlagsAndAttributes, + uint CompressionType, + out IntPtr CreationResult + ); + + /// + ///Creates a new .wim file or opens an existing .wim file. + /// + ///Path to the .wim file to open or to create. + ///Specifies the file access to grant the file. + ///Specifies the mode in which the file should be opened or created. + ///If the function succeeds, the return value is an open handle to the specified image file. + ///If the function fails, the return value is NULL. + public + static + IntPtr + CreateFile(string imageFile, uint access, uint mode) + { + IntPtr creationResult = IntPtr.Zero; + IntPtr windowsImageHandle = IntPtr.Zero; + int rc = -1; + + windowsImageHandle = NativeMethods.WimCreateFile(imageFile, access, mode, 0, 0, out creationResult); + rc = Marshal.GetLastWin32Error(); + if (windowsImageHandle == IntPtr.Zero) + { + // + //Everything failed; throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to open/create .wim file {0}. Error = {1}", + imageFile, rc)); + } + + return windowsImageHandle; + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMCloseHandle", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + bool + WimCloseHandle( + IntPtr Handle + ); + + /// + ///Closes an open .wim file or an image handle. + /// + ///Handle to an open imaging-based object. + ///If the function succeeds, the return value is nonzero. + ///If the function fails, the return value is zero. + public + static + void + CloseHandle(IntPtr handle) + { + bool status = NativeMethods.WimCloseHandle(handle); + int rc = Marshal.GetLastWin32Error(); + if (status == false) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to close image handle. Error = {0}", rc)); + } + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMSetTemporaryPath", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + bool + WimSetTemporaryPath( + IntPtr Handle, + [MarshalAs(UnmanagedType.LPWStr)] string TemporaryPath + ); + + /// + ///Sets the location where temporary imaging files are to be stored. + /// + ///Handle to a WIM file returned by CreateFile + ///String value of path to set as a temporary location. + ///If the function succeeds, the return value is nonzero. + ///If the function fails, the return value is NULL. + public + static + void + SetTemporaryPath(IntPtr handle, string temporaryPath) + { + bool status = NativeMethods.WimSetTemporaryPath(handle, temporaryPath); + int rc = Marshal.GetLastWin32Error(); + if (status == false) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to set temporary path. Error = {0}", rc)); + } + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMLoadImage", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + IntPtr + WimLoadImage( + IntPtr Handle, + uint ImageIndex + ); + + /// + ///Loads a volume image or from within a .wim file. + /// + ///Wim handle. + ///Index of the image to load. + ///If the function succeeds, the return value is a handle to an object representing the volume image. + ///If the function fails, the return value is NULL. + public + static + IntPtr + LoadImage(IntPtr handle, int imageIndex) + { + //Load the image data based on the .wim handle + // + IntPtr hWim = NativeMethods.WimLoadImage(handle, (uint)imageIndex); + int rc = Marshal.GetLastWin32Error(); + if (hWim == IntPtr.Zero) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to load image. Error = {0}", rc)); + } + + return hWim; + + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMCaptureImage", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + IntPtr + WimCaptureImage( + IntPtr Handle, + [MarshalAs(UnmanagedType.LPWStr)] string Path, + uint CaptureFlags + ); + + /// + ///Captures an image from a drive root or from a directory path and stores it in an image file. + /// + ///Handle to a .wim file returned by CreateFile. + ///Drive root or directory path from where the image data will be captured. + ///Handle to an object representing the volume image. If the function fails, the return value is NULL. + public + static + IntPtr + CaptureImage(IntPtr handle, string path) + { + IntPtr hImage = NativeMethods.WimCaptureImage(handle, path, 0); + int rc = Marshal.GetLastWin32Error(); + if (hImage == IntPtr.Zero) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Failed to capture image from {0}. Error = {1}", path, rc)); + } + return hImage; + } + + /// + ///Gets the number of volume images stored in a .wim file. + /// + ///Handle to a .wim file returned by CreateFile. + ///The number of images within the .wim file. + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMGetImageCount", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + int + WimGetImageCount( + IntPtr Handle + ); + + /// + ///Returns the number of volume images stored in a .wim file. + /// + ///Handle to a .wim file returned by WIMCreateFile. + ///The return value is the number of images within the .wim file. + ///If this value is zero, then the .wim file is invalid or does not contain any images that can be applied. + /// + public + static + int + GetImageCount(IntPtr windowsImageHandle) + { + int count = NativeMethods.WimGetImageCount(windowsImageHandle); + int rc = Marshal.GetLastWin32Error(); + if (count == -1) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to get image count. Error = {0}", rc)); + } + + return count; + } + + //[DllImport("Wimgapi.dll", + // ExactSpelling = true, + // EntryPoint = "WIMMountImageHandle", + // CallingConvention = CallingConvention.StdCall, + // SetLastError = true)] + //private static extern + //bool + //WIMMountImageHandle( + // IntPtr hImage, + // [MarshalAs(UnmanagedType.LPWStr)] string pszMountPath, + // uint dwMountFlags + // ); + ///// + /////Mounts an image in a .wim file to the specified directory. + ///// + /////Returns TRUE and sets the LastError to ERROR_SUCCESS. + /////Returns FALSE in case of a failure and the LastError is set to the appropriate Win32 error value. + ///// + //public + //static + //void + //MountImageHandle(string mountPath, ) + //{ + // bool status = false; + // int rc; + + // try + // { + // status = NativeMethods.WimMountImage(mountPath, + // windowsImageFileName, + // (uint)imageIndex, + // System.Environment.GetEnvironmentVariable("temp")); + // rc = Marshal.GetLastWin32Error(); + // } + // catch (System.StackOverflowException) + // { + // // + // //Throw an exception + // // + // throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + // "Unable to mount image {0} to {1}.", windowsImageFileName, mountPath)); + // } + // if (status == false) + // { + // // + // //Throw an exception + // // + // throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + // "Unable to mount image {0} to {1}. Error = {2}", + // windowsImageFileName, mountPath, rc)); + // } + //} + + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMMountImage", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + bool + WimMountImage( + [MarshalAs(UnmanagedType.LPWStr)] string MountPath, + [MarshalAs(UnmanagedType.LPWStr)] string WimFileName, + uint ImageIndex, + [MarshalAs(UnmanagedType.LPWStr)] string TemporaryPath + + ); + + /// + ///Mounts an image in a .wim file to the specified directory. + /// + ///Returns TRUE and sets the LastError to ERROR_SUCCESS. + ///Returns FALSE in case of a failure and the LastError is set to the appropriate Win32 error value. + /// + public + static + void + MountImage(string mountPath, string windowsImageFileName, int imageIndex, string temporaryPath) + { + bool status = false; + int rc; + + try + { + status = NativeMethods.WimMountImage(mountPath, + windowsImageFileName, + (uint)imageIndex, + temporaryPath); + rc = Marshal.GetLastWin32Error(); + } + catch (System.StackOverflowException) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to mount image {0} to {1}.", windowsImageFileName, mountPath)); + } + if (status == false) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to mount image {0} to {1}. Error = {2}", + windowsImageFileName, mountPath, rc)); + } + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMApplyImage", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + bool + WimApplyImage( + IntPtr Handle, + [MarshalAs(UnmanagedType.LPWStr)] string Path, + uint Flags + ); + + /// + ///Applies an image to a drive root or to a directory path from a .wim file. + /// + ///If the function succeeds, the return value is nonzero. + ///If the function fails, the return value is zero + public + static + void + ApplyImage(IntPtr imageHandle, string applicationPath) + { + // + //Call WimApplyImage always with the Index flag for performance reasons. + // + bool status = NativeMethods.WimApplyImage(imageHandle, applicationPath, NativeMethods.WIM_FLAG_INDEX); + int rc = Marshal.GetLastWin32Error(); + if (status == false) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to apply image to {0}. Error = {1}", applicationPath, rc)); + } + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMGetImageInformation", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + bool + WimGetImageInformation( + IntPtr Handle, + out IntPtr ImageInfo, + out IntPtr SizeOfImageInfo + ); + + /// + ///Returns information about an image within the .wim file. + /// + ///Handle returned by CreateImage, LoadImage + ///If the function succeeds, the return value is nonzero. + ///If the function fails, the return value is zero. + /// + public + static + string + GetImageInformation(IntPtr handle) + { + IntPtr info = IntPtr.Zero, sizeOfInfo = IntPtr.Zero; + bool status; + + status = NativeMethods.WimGetImageInformation(handle, out info, out sizeOfInfo); + int rc = Marshal.GetLastWin32Error(); + + if (status == false) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to get image information. Error = {0}", rc)); + } + string s = Marshal.PtrToStringUni(info); + + //If the function succeeds, return the pointer to the string. Otherwise, return NULL. + // + return s; + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMSetImageInformation", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + bool + WimSetImageInformation( + IntPtr Handle, + IntPtr ImageInfo, + uint SizeOfImageInfo + ); + + /// + ///Stores information about an image within the .wim file. + /// + ///Handle returned by CreateImage, LoadImage + ///String containing the unicode XML data to set. + ///If the function succeeds, the return value is nonzero. + ///If the function fails, the return value is zero. + public + static + void + SetImageInformation(IntPtr handle, string imageInfo) + { + //Create a byte array for the stream, allocate some unmanaged memory, and then copy the bytes to the unmanaged memory. + // + byte[] byteBuffer = Encoding.Unicode.GetBytes(imageInfo); + int byteBufferSize = byteBuffer.Length; + IntPtr xmlBuffer = Marshal.AllocHGlobal(byteBufferSize); + Marshal.Copy(byteBuffer, 0, xmlBuffer, byteBufferSize); + + bool status = NativeMethods.WimSetImageInformation(handle, xmlBuffer, (uint)byteBufferSize); + int rc = Marshal.GetLastWin32Error(); + if (status == false) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to set image information. Error = {0}", rc)); + } + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMUnmountImage", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + bool + WimUnmountImage( + [MarshalAs(UnmanagedType.LPWStr)] string MountPath, + [MarshalAs(UnmanagedType.LPWStr)] string WimFileName, + uint ImageIndex, + bool CommitChanges + ); + + /// + ///Unmounts a mounted image in a .wim file from the specified directory. + /// + ///Returns TRUE and sets the LastError to ERROR_SUCCESS. Returns FALSE in case of a failure and the LastError is set + ///to the appropriate Win32 error value. + public + static + void + DismountImage(string mountPath, string wimdowsImageFileName, int imageIndex, bool commitChanges) + { + bool status = false; + int rc; + + try + { + status = NativeMethods.WimUnmountImage(mountPath, wimdowsImageFileName, (uint)imageIndex, commitChanges); + rc = Marshal.GetLastWin32Error(); + } + catch (System.StackOverflowException ex) + { + // + //Throw an exception + // + throw new System.StackOverflowException(string.Format(CultureInfo.CurrentCulture, + "Unable to unmount image {0} from {1}.", wimdowsImageFileName, mountPath), + ex.InnerException); + } + if (status == false) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, + "Unable to unmount image {0} from {1}. Error = {2}", + wimdowsImageFileName, mountPath, rc)); + } + } + + /// + ///User-defined function used with the RegisterMessageCallback or UnregisterMessageCallback function. + /// + ///Specifies the message being sent. + ///Specifies additional message information. The contents of this parameter depend on the value of the + ///MessageId parameter. + ///Specifies additional message information. The contents of this parameter depend on the value of the + ///MessageId parameter. + ///Specifies the user-defined value passed to RegisterCallback. + /// + ///To indicate success and to enable other subscribers to process the message return WIM_MSG_SUCCESS. + ///To prevent other subscribers from receiving the message, return WIM_MSG_DONE. + ///To cancel an image apply or capture, return WIM_MSG_ABORT_IMAGE when handling the WIM_MSG_PROCESS message. + /// + public + delegate + uint + MessageCallback( + uint MessageId, + IntPtr wParam, + IntPtr lParam, + IntPtr UserData + ); + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMRegisterMessageCallback", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + uint + WimRegisterMessageCallback( + IntPtr hWim, + MessageCallback MessageProc, + IntPtr ImageInfo + ); + + /// + ///Registers a function to be called with imaging-specific data. + /// + public + static + void + RegisterCallback(MessageCallback callback) + { + uint callbackZeroBasedIndex = NativeMethods.WimRegisterMessageCallback(IntPtr.Zero, callback, IntPtr.Zero); + int rc = Marshal.GetLastWin32Error(); + if (rc != 0) + { + // + //Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to register message callback.")); + } + } + + [DllImport("Wimgapi.dll", + ExactSpelling = true, + EntryPoint = "WIMUnregisterMessageCallback", + CallingConvention = CallingConvention.StdCall, + SetLastError = true)] + private static extern + bool + WimUnregisterMessageCallback( + IntPtr hWim, + MessageCallback MessageProc + ); + + /// + ///Unregisters a function from being called with imaging-specific data. + /// + ///Callback to be unregistered. + public + static + void + UnregisterMessageCallback(MessageCallback registeredCallback) + { + bool status = NativeMethods.WimUnregisterMessageCallback(IntPtr.Zero, registeredCallback); + int rc = Marshal.GetLastWin32Error(); + if (status != true) + { + // + // Throw an exception + // + throw new System.InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unable to unregister message callback.")); + } + } + + private const uint WM_APP = 0x8000; + + /// + ///Imaging Messages + /// + public enum WIMMessage : uint + { + WIM_MSG = WM_APP + 0x1476, + WIM_MSG_TEXT, + /// + ///Indicates an update in the progress of an image application. + /// + WIM_MSG_PROGRESS, + /// + ///Enables the caller to prevent a file or a directory from being captured or applied. + /// + WIM_MSG_PROCESS, + /// + ///Indicates that volume information is being gathered during an image capture. + /// + WIM_MSG_SCANNING, + /// + ///Indicates the number of files that will be captured or applied. + /// + WIM_MSG_SETRANGE, + /// + ///Indicates the number of files that have been captured or applied. + /// + WIM_MSG_SETPOS, + /// + ///Indicates that a file has been either captured or applied. + /// + WIM_MSG_STEPIT, + /// + ///Enables the caller to prevent a file resource from being compressed during a capture. + /// + WIM_MSG_COMPRESS, + /// + ///Alerts the caller that an error has occurred while capturing or applying an image. + /// + WIM_MSG_ERROR, + /// + ///Enables the caller to align a file resource on a particular alignment boundary. + /// + WIM_MSG_ALIGNMENT, + WIM_MSG_RETRY, + /// + ///Enables the caller to align a file resource on a particular alignment boundary. + /// + WIM_MSG_SPLIT, + WIM_MSG_FILEINFO, + WIM_MSG_INFO, + WIM_MSG_WARNING, + WIM_MSG_CHK_PROCESS, + WIM_MSG_WARNING_OBJECTID, + WIM_MSG_STALE_MOUNT_DIR, + WIM_MSG_STALE_MOUNT_FILE, + WIM_MSG_MOUNT_CLEANUP_PROGRESS, + WIM_MSG_SUCCESS = 0x00000000, + WIM_MSG_ABORT_IMAGE = 0xFFFFFFFF + }; + + /// + ///Capture will do byte-by-byte verification of single instance files. + /// + public const uint WIM_FLAG_VERIFY = 0x00000002; + /// + ///Specifies that the image is to be sequentially read for caching/performance purposes. + /// + public const uint WIM_FLAG_INDEX = 0x00000004; + + } + + /// + ///Maps CreateFileAccess to CreateFileAccessPrivate + /// + /// + private + CreateFileAccessPrivate + GetMappedFileAccess(CreateFileAccess access) + { + // + //Map the file access specified from an int to uint. + // + CreateFileAccessPrivate fileAccess; + switch (access) + { + case CreateFileAccess.Read: + fileAccess = CreateFileAccessPrivate.Read; + break; + case CreateFileAccess.Write: + fileAccess = CreateFileAccessPrivate.Write; + break; + default: + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "No file access level specified.")); + } + return fileAccess; + } + + //[CLSCompliant(false)] + [FlagsAttribute] + private + enum + CreateFileAccessPrivate : uint + { + /// + ///Mapping from CreateFileAccess.Read + /// + Read = 0x80000000, + /// + ///Mapping from CreateFileAccess.Write + /// + Write = 0x40000000 + } + + /// + ///Image event messages. + /// + //[CLSCompliant(false)] + public + enum + ImageEventMessage : uint + { + /// + ///Enables the caller to prevent a file or a directory from being captured or applied. + /// + Progress = NativeMethods.WIMMessage.WIM_MSG_PROGRESS, + /// + ///Notification sent to enable the caller to prevent a file or a directory from being captured or applied. + ///To prevent a file or a directory from being captured or applied, call WindowsImageContainer.SkipFile(). + /// + Process = NativeMethods.WIMMessage.WIM_MSG_PROCESS, + /// + ///Enables the caller to prevent a file resource from being compressed during a capture. + /// + Compress = NativeMethods.WIMMessage.WIM_MSG_COMPRESS, + /// + ///Alerts the caller that an error has occurred while capturing or applying an image. + /// + Error = NativeMethods.WIMMessage.WIM_MSG_ERROR, + /// + ///Enables the caller to align a file resource on a particular alignment boundary. + /// + Alignment = NativeMethods.WIMMessage.WIM_MSG_ALIGNMENT, + /// + ///Enables the caller to align a file resource on a particular alignment boundary. + /// + Split = NativeMethods.WIMMessage.WIM_MSG_SPLIT, + /// + ///Indicates that volume information is being gathered during an image capture. + /// + Scanning = NativeMethods.WIMMessage.WIM_MSG_SCANNING, + /// + ///Indicates the number of files that will be captured or applied. + /// + SetRange = NativeMethods.WIMMessage.WIM_MSG_SETRANGE, + /// + ///Indicates the number of files that have been captured or applied. + /// + SetPos = NativeMethods.WIMMessage.WIM_MSG_SETPOS, + /// + ///Indicates that a file has been either captured or applied. + /// + StepIt = NativeMethods.WIMMessage.WIM_MSG_STEPIT, + /// + ///Success. + /// + Success = NativeMethods.WIMMessage.WIM_MSG_SUCCESS, + /// + ///Abort. + /// + Abort = NativeMethods.WIMMessage.WIM_MSG_ABORT_IMAGE, + + MountCleanupProgress = NativeMethods.WIMMessage.WIM_MSG_MOUNT_CLEANUP_PROGRESS + } + + // + //WindowsImageContainer Member Data + // + private IntPtr m_ImageContainerHandle; //Handle to the .wim file + private string m_WindowsImageFilePath; //Path to the .wim file + + private WindowsImage[] m_Images; //Array of image objects inside a .wim file + private int m_ImageCount; //Number of images inside a .wim file + + // + //DO NOT CHANGE! + // + private static NativeMethods.MessageCallback m_MessageCallback; + } + + /// + ///Describes the file that is being processed for the ProcessFileEvent. + /// + public + class + DefaultImageEventArgs : EventArgs + { + /// + ///Default constructor. + /// + public + DefaultImageEventArgs(IntPtr wideParameter, IntPtr leftParameter, IntPtr userData) + { + m_wParam = wideParameter; + m_lParam = leftParameter; + m_UserData = userData; + + + } + /// + ///wParam + /// + public IntPtr WideParameter + { + get + { + return m_wParam; + } + } + /// + ///lParam + /// + public IntPtr LeftParameter + { + get + { + return m_lParam; + } + } + /// + ///UserData + /// + public IntPtr UserData + { + get + { + return m_UserData; + } + } + + private IntPtr m_wParam; + private IntPtr m_lParam; + private IntPtr m_UserData; + } + + /// + ///Describes the file that is being processed for the ProcessFileEvent. + /// + public + class + ProcessFileEventArgs : EventArgs + { + /// + ///Default constructor. + /// + ///Fully qualified path and file name. For example: c:\file.sys. + ///Default is false - skip file and continue. + ///Set to true to abort the entire image capture. + public + ProcessFileEventArgs(string file, IntPtr skipFileFlag) + { + m_FilePath = file; + m_SkipFileFlag = skipFileFlag; + } + + /// + ///Skip file from being imaged. + /// + public + void + SkipFile() + { + byte[] byteBuffer = { + 0 + }; + int byteBufferSize = byteBuffer.Length; + Marshal.Copy(byteBuffer, 0, m_SkipFileFlag, byteBufferSize); + } + + /// + ///Fully qualified path and file name. + /// + public string FilePath + { + get + { + string stringToReturn = ""; + if (m_FilePath != null) + { + stringToReturn = m_FilePath; + } + return stringToReturn; + } + } + + /// + ///Flag to indicate if the entire image capture should be aborted. + ///Default is false - skip file and continue. Setting to true will + ///abort the entire image capture. + /// + public bool Abort + { + set + { + m_Abort = value; + } + + get + { + return m_Abort; + } + } + private string m_FilePath; + private bool m_Abort; + private IntPtr m_SkipFileFlag; + + } +} diff --git a/Disco.ClientBootstrapper/NullStatus.cs b/Disco.ClientBootstrapper/NullStatus.cs index 998f48fc..d31ffc19 100644 --- a/Disco.ClientBootstrapper/NullStatus.cs +++ b/Disco.ClientBootstrapper/NullStatus.cs @@ -1,15 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.ClientBootstrapper -{ - class NullStatus : IStatus - { - public void UpdateStatus(string Heading, string SubHeading, string Message, bool? ShowProgress = null, int? Progress = null) - { - // Do Nothing - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.ClientBootstrapper +{ + class NullStatus : IStatus + { + public void UpdateStatus(string Heading, string SubHeading, string Message, bool? ShowProgress = null, int? Progress = null) + { + // Do Nothing + } + } +} diff --git a/Disco.ClientBootstrapper/Program.cs b/Disco.ClientBootstrapper/Program.cs index 847c1a2c..34930959 100644 --- a/Disco.ClientBootstrapper/Program.cs +++ b/Disco.ClientBootstrapper/Program.cs @@ -1,191 +1,191 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; -using System.Threading; - -namespace Disco.ClientBootstrapper -{ - static class Program - { - public static IStatus Status { get; set; } - public static BootstrapperLoop BootstrapperLoop { get; set; } - public static InstallLoop InstallLoop { get; set; } - - public static List PostBootstrapperActions { get; set; } - public static bool AllowUninstall { get; set; } - public static bool ApplicationExiting { get; set; } - public static Lazy InlinePath = new Lazy(() => - { - return System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); - }); - - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main(string[] args) - { - Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - if (args.Length > 0) - { - switch (args[0].ToLower()) - { - case "/install": - var statusForm = new FormStatus(); - Status = statusForm; - statusForm.Show(); - string installLocation = null; - string wimImage = null; - if (args.Length > 1) - installLocation = args[1]; - if (args.Length > 2) - wimImage = args[2]; - InstallLoop = new InstallLoop(installLocation, wimImage); - InstallLoop.Start(new InstallLoop.CompleteCallback(InstallComplete)); - Application.Run(); - return; - case "/uninstall": - AllowUninstall = true; - Status = new NullStatus(); - Interop.InstallInterop.Uninstall(); - return; - case "/allowuninstall": - AllowUninstall = true; - break; - default: - AllowUninstall = false; - break; - } - } - - if (Status == null) - { - var statusForm = new FormStatus(); - Status = statusForm; - statusForm.Show(); - } - - BootstrapperLoop = new BootstrapperLoop(Status, new BootstrapperLoop.LoopCompleteCallback(LoopComplete)); - BootstrapperLoop.Start(); - - Application.Run(); - } - - static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) - { - WriteAppError(e.Exception); - } - - public static void WriteAppError(Exception ex) - { - try - { - string AppErrorPath = string.Format("{0}{1}", System.Reflection.Assembly.GetExecutingAssembly().Location, ".errors.txt"); - System.Text.StringBuilder ErrorMessage = new System.Text.StringBuilder(); - ErrorMessage.AppendLine(); - ErrorMessage.AppendLine(DateTime.Now.ToLongDateString()); - ErrorMessage.AppendLine(DateTime.Now.ToLongTimeString()); - ErrorMessage.AppendLine(string.Format("Type: {0}", ex.GetType().FullName)); - ErrorMessage.AppendLine(string.Format("Message: {0}", ex.Message)); - ErrorMessage.AppendLine(string.Format("Source: {0}", ex.Source)); - ErrorMessage.AppendLine(string.Format("Stack: {0}", ex.StackTrace)); - System.IO.File.AppendAllText(AppErrorPath, ErrorMessage.ToString()); - } - catch (Exception) { } - } - - public static void LoopComplete() - { - // Run Post Actions - if (PostBootstrapperActions != null) - { - // Check Uninstall - if (AllowUninstall && PostBootstrapperActions.Contains("UninstallBootstrapper")) - { - Interop.InstallInterop.Uninstall(); - } - - // Check ShutdownActions - if (PostBootstrapperActions.Contains("Shutdown")) - { - Status.UpdateStatus("System Preparation (Bootstrapper)", "Shutting Down; Finished...", string.Empty, false, 0); - SleepThread(4000, true); - Interop.ShutdownInterop.Shutdown(); - } - else - if (PostBootstrapperActions.Contains("Reboot")) - { - Status.UpdateStatus("System Preparation (Bootstrapper)", "Rebooting; Finished...", string.Empty, false, 0); - SleepThread(4000, true); - Interop.ShutdownInterop.Reboot(); - } - else - { - Status.UpdateStatus("System Preparation (Bootstrapper)", "Starting System; Finished...", string.Empty, false, 0); - SleepThread(2000, true); - } - } - else - { - Status.UpdateStatus("System Preparation (Bootstrapper)", "Starting System; Finished...", string.Empty, false, 0); - SleepThread(2000, true); - } - - ExitApplication(); - } - - public static void InstallComplete() - { - ExitApplication(); - } - - public static void ExitApplication() - { - if (!ApplicationExiting) - { - ApplicationExiting = true; - if (BootstrapperLoop != null) - { - if (BootstrapperLoop.LoopThread != null) - { - if (BootstrapperLoop.LoopThread.ThreadState == System.Threading.ThreadState.WaitSleepJoin) - { - BootstrapperLoop.LoopThread.Interrupt(); - } - if (BootstrapperLoop.LoopThread.ThreadState == System.Threading.ThreadState.Running) - { - BootstrapperLoop.LoopThread.Abort(); - } - } - } - Application.Exit(); - } - } - - public static void Trace(string Format, params string[] args) - { - System.Diagnostics.Debug.WriteLine(Format, args); - } - - public static void SleepThread(int millisecondsTimeout, bool updateUI) - { - if (updateUI) - { - for (int i = 0; i < millisecondsTimeout; i += 500) - { - int progress = Convert.ToInt32(((Convert.ToDouble(i) / Convert.ToDouble(millisecondsTimeout)) * 100)); - Status.UpdateStatus(null, null, null, true, progress); - Thread.Sleep(500); - } - } - else - { - Thread.Sleep(millisecondsTimeout); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using System.Threading; + +namespace Disco.ClientBootstrapper +{ + static class Program + { + public static IStatus Status { get; set; } + public static BootstrapperLoop BootstrapperLoop { get; set; } + public static InstallLoop InstallLoop { get; set; } + + public static List PostBootstrapperActions { get; set; } + public static bool AllowUninstall { get; set; } + public static bool ApplicationExiting { get; set; } + public static Lazy InlinePath = new Lazy(() => + { + return System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); + }); + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main(string[] args) + { + Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + if (args.Length > 0) + { + switch (args[0].ToLower()) + { + case "/install": + var statusForm = new FormStatus(); + Status = statusForm; + statusForm.Show(); + string installLocation = null; + string wimImage = null; + if (args.Length > 1) + installLocation = args[1]; + if (args.Length > 2) + wimImage = args[2]; + InstallLoop = new InstallLoop(installLocation, wimImage); + InstallLoop.Start(new InstallLoop.CompleteCallback(InstallComplete)); + Application.Run(); + return; + case "/uninstall": + AllowUninstall = true; + Status = new NullStatus(); + Interop.InstallInterop.Uninstall(); + return; + case "/allowuninstall": + AllowUninstall = true; + break; + default: + AllowUninstall = false; + break; + } + } + + if (Status == null) + { + var statusForm = new FormStatus(); + Status = statusForm; + statusForm.Show(); + } + + BootstrapperLoop = new BootstrapperLoop(Status, new BootstrapperLoop.LoopCompleteCallback(LoopComplete)); + BootstrapperLoop.Start(); + + Application.Run(); + } + + static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) + { + WriteAppError(e.Exception); + } + + public static void WriteAppError(Exception ex) + { + try + { + string AppErrorPath = string.Format("{0}{1}", System.Reflection.Assembly.GetExecutingAssembly().Location, ".errors.txt"); + System.Text.StringBuilder ErrorMessage = new System.Text.StringBuilder(); + ErrorMessage.AppendLine(); + ErrorMessage.AppendLine(DateTime.Now.ToLongDateString()); + ErrorMessage.AppendLine(DateTime.Now.ToLongTimeString()); + ErrorMessage.AppendLine(string.Format("Type: {0}", ex.GetType().FullName)); + ErrorMessage.AppendLine(string.Format("Message: {0}", ex.Message)); + ErrorMessage.AppendLine(string.Format("Source: {0}", ex.Source)); + ErrorMessage.AppendLine(string.Format("Stack: {0}", ex.StackTrace)); + System.IO.File.AppendAllText(AppErrorPath, ErrorMessage.ToString()); + } + catch (Exception) { } + } + + public static void LoopComplete() + { + // Run Post Actions + if (PostBootstrapperActions != null) + { + // Check Uninstall + if (AllowUninstall && PostBootstrapperActions.Contains("UninstallBootstrapper")) + { + Interop.InstallInterop.Uninstall(); + } + + // Check ShutdownActions + if (PostBootstrapperActions.Contains("Shutdown")) + { + Status.UpdateStatus("System Preparation (Bootstrapper)", "Shutting Down; Finished...", string.Empty, false, 0); + SleepThread(4000, true); + Interop.ShutdownInterop.Shutdown(); + } + else + if (PostBootstrapperActions.Contains("Reboot")) + { + Status.UpdateStatus("System Preparation (Bootstrapper)", "Rebooting; Finished...", string.Empty, false, 0); + SleepThread(4000, true); + Interop.ShutdownInterop.Reboot(); + } + else + { + Status.UpdateStatus("System Preparation (Bootstrapper)", "Starting System; Finished...", string.Empty, false, 0); + SleepThread(2000, true); + } + } + else + { + Status.UpdateStatus("System Preparation (Bootstrapper)", "Starting System; Finished...", string.Empty, false, 0); + SleepThread(2000, true); + } + + ExitApplication(); + } + + public static void InstallComplete() + { + ExitApplication(); + } + + public static void ExitApplication() + { + if (!ApplicationExiting) + { + ApplicationExiting = true; + if (BootstrapperLoop != null) + { + if (BootstrapperLoop.LoopThread != null) + { + if (BootstrapperLoop.LoopThread.ThreadState == System.Threading.ThreadState.WaitSleepJoin) + { + BootstrapperLoop.LoopThread.Interrupt(); + } + if (BootstrapperLoop.LoopThread.ThreadState == System.Threading.ThreadState.Running) + { + BootstrapperLoop.LoopThread.Abort(); + } + } + } + Application.Exit(); + } + } + + public static void Trace(string Format, params string[] args) + { + System.Diagnostics.Debug.WriteLine(Format, args); + } + + public static void SleepThread(int millisecondsTimeout, bool updateUI) + { + if (updateUI) + { + for (int i = 0; i < millisecondsTimeout; i += 500) + { + int progress = Convert.ToInt32(((Convert.ToDouble(i) / Convert.ToDouble(millisecondsTimeout)) * 100)); + Status.UpdateStatus(null, null, null, true, progress); + Thread.Sleep(500); + } + } + else + { + Thread.Sleep(millisecondsTimeout); + } + } + } +} diff --git a/Disco.ClientBootstrapper/Properties/Resources.Designer.cs b/Disco.ClientBootstrapper/Properties/Resources.Designer.cs index d3a32f4e..ac4bca56 100644 --- a/Disco.ClientBootstrapper/Properties/Resources.Designer.cs +++ b/Disco.ClientBootstrapper/Properties/Resources.Designer.cs @@ -1,73 +1,73 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.ClientBootstrapper.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Disco.ClientBootstrapper.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Background_BW { - get { - object obj = ResourceManager.GetObject("Background_BW", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.ClientBootstrapper.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Disco.ClientBootstrapper.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Background_BW { + get { + object obj = ResourceManager.GetObject("Background_BW", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Disco.ClientBootstrapper/Properties/Resources.resx b/Disco.ClientBootstrapper/Properties/Resources.resx index 729a7a7a..adbf9da8 100644 --- a/Disco.ClientBootstrapper/Properties/Resources.resx +++ b/Disco.ClientBootstrapper/Properties/Resources.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\Background-BW.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Background-BW.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Disco.ClientBootstrapper/Properties/Settings.Designer.cs b/Disco.ClientBootstrapper/Properties/Settings.Designer.cs index fbfd459f..dbef2686 100644 --- a/Disco.ClientBootstrapper/Properties/Settings.Designer.cs +++ b/Disco.ClientBootstrapper/Properties/Settings.Designer.cs @@ -1,30 +1,30 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.225 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.ClientBootstrapper.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.225 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.ClientBootstrapper.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Disco.ClientBootstrapper/Properties/Settings.settings b/Disco.ClientBootstrapper/Properties/Settings.settings index abf36c5d..39645652 100644 --- a/Disco.ClientBootstrapper/Properties/Settings.settings +++ b/Disco.ClientBootstrapper/Properties/Settings.settings @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/Disco.ClientBootstrapper/Properties/app.manifest b/Disco.ClientBootstrapper/Properties/app.manifest index 66b901b5..b0eb1447 100644 --- a/Disco.ClientBootstrapper/Properties/app.manifest +++ b/Disco.ClientBootstrapper/Properties/app.manifest @@ -1,48 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Disco.ClientBootstrapper/UninstallBootstrapper.vbs b/Disco.ClientBootstrapper/UninstallBootstrapper.vbs index 4a9ce48c..b6a33bbc 100644 --- a/Disco.ClientBootstrapper/UninstallBootstrapper.vbs +++ b/Disco.ClientBootstrapper/UninstallBootstrapper.vbs @@ -1,54 +1,54 @@ -Option Explicit - -On Error Resume Next - -Dim objWMIService, objWMIProcesses, objFSO, objShell -Dim WaitForProcessID, DeleteDirectory, GroupPolicyScriptLocation - -'WaitForProcessID = CInt(WScript.Arguments.Named.Item("WaitForProcessID")) -DeleteDirectory = Mid(WScript.ScriptFullName, 1, InStrRev(WScript.ScriptFullName, "\") - 1) - -'If WaitForProcessID > 0 Then -' Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") -' Do -' Set objWMIProcesses = objWMIService.ExecQuery("SELECT ProcessId FROM Win32_Process WHERE ProcessId=" & WaitForProcessID) -' If objWMIProcesses.Count = 0 Then -' Exit Do -' End If -' WScript.Sleep 500 -' Loop -' Err.Clear -'End If -'Set objWMIService = Nothing -'Set objWMIProcesses = Nothing - -Set objShell = CreateObject("WScript.Shell") -Set objFSO = CreateObject("Scripting.FileSystemObject") - -Do - Call Err.Clear() - If objFSO.FolderExists(DeleteDirectory) Then - objFSO.DeleteFolder DeleteDirectory, True - End If - WScript.Sleep 1000 -Loop Until Err.Number = 0 - -GroupPolicyScriptLocation = objShell.ExpandEnvironmentStrings("%WinDir%\System32\GroupPolicy\Machine\Scripts\scripts.ini") -If objFSO.FileExists(GroupPolicyScriptLocation) Then - Call objFSO.DeleteFile(GroupPolicyScriptLocation) -End If - -Set objFSO = Nothing - -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\HideStartupScripts") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\RunStartupScriptSync") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Shutdown\") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0\") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0\") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\") -objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\") - +Option Explicit + +On Error Resume Next + +Dim objWMIService, objWMIProcesses, objFSO, objShell +Dim WaitForProcessID, DeleteDirectory, GroupPolicyScriptLocation + +'WaitForProcessID = CInt(WScript.Arguments.Named.Item("WaitForProcessID")) +DeleteDirectory = Mid(WScript.ScriptFullName, 1, InStrRev(WScript.ScriptFullName, "\") - 1) + +'If WaitForProcessID > 0 Then +' Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") +' Do +' Set objWMIProcesses = objWMIService.ExecQuery("SELECT ProcessId FROM Win32_Process WHERE ProcessId=" & WaitForProcessID) +' If objWMIProcesses.Count = 0 Then +' Exit Do +' End If +' WScript.Sleep 500 +' Loop +' Err.Clear +'End If +'Set objWMIService = Nothing +'Set objWMIProcesses = Nothing + +Set objShell = CreateObject("WScript.Shell") +Set objFSO = CreateObject("Scripting.FileSystemObject") + +Do + Call Err.Clear() + If objFSO.FolderExists(DeleteDirectory) Then + objFSO.DeleteFolder DeleteDirectory, True + End If + WScript.Sleep 1000 +Loop Until Err.Number = 0 + +GroupPolicyScriptLocation = objShell.ExpandEnvironmentStrings("%WinDir%\System32\GroupPolicy\Machine\Scripts\scripts.ini") +If objFSO.FileExists(GroupPolicyScriptLocation) Then + Call objFSO.DeleteFile(GroupPolicyScriptLocation) +End If + +Set objFSO = Nothing + +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\HideStartupScripts") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\RunStartupScriptSync") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Shutdown\") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\0\") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0\") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0\") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\") +objShell.RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\") + Set objShell = Nothing \ No newline at end of file diff --git a/Disco.Configuration/Disco.Configuration.vbproj b/Disco.Configuration/Disco.Configuration.vbproj index c1df6e66..c0e685e6 100644 --- a/Disco.Configuration/Disco.Configuration.vbproj +++ b/Disco.Configuration/Disco.Configuration.vbproj @@ -1,116 +1,116 @@ - - - - Debug - AnyCPU - - - - - {CD7BB28C-B74D-4880-8B7E-4487AB5E6AFC} - Library - Disco.Configuration - Disco.Configuration - 512 - Windows - v4.0 - - - true - full - true - true - bin\Debug\ - Disco.Configuration.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - Disco.Configuration.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - {40F222A9-CC05-4035-AFF4-15A78250EF2B} - Disco.Models - - - - + + + + Debug + AnyCPU + + + + + {CD7BB28C-B74D-4880-8B7E-4487AB5E6AFC} + Library + Disco.Configuration + Disco.Configuration + 512 + Windows + v4.0 + + + true + full + true + true + bin\Debug\ + Disco.Configuration.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + pdbonly + false + true + true + bin\Release\ + Disco.Configuration.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + {40F222A9-CC05-4035-AFF4-15A78250EF2B} + Disco.Models + + + + \ No newline at end of file diff --git a/Disco.Configuration/My Project/Application.Designer.vb b/Disco.Configuration/My Project/Application.Designer.vb index 6015516a..6b885653 100644 --- a/Disco.Configuration/My Project/Application.Designer.vb +++ b/Disco.Configuration/My Project/Application.Designer.vb @@ -1,13 +1,13 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.235 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.235 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/Disco.Configuration/My Project/Application.myapp b/Disco.Configuration/My Project/Application.myapp index 0167050e..758895de 100644 --- a/Disco.Configuration/My Project/Application.myapp +++ b/Disco.Configuration/My Project/Application.myapp @@ -1,10 +1,10 @@ - - - false - false - 0 - true - 0 - 1 - true - + + + false + false + 0 + true + 0 + 1 + true + diff --git a/Disco.Configuration/My Project/AssemblyInfo.vb b/Disco.Configuration/My Project/AssemblyInfo.vb index 0070d33c..2b667b73 100644 --- a/Disco.Configuration/My Project/AssemblyInfo.vb +++ b/Disco.Configuration/My Project/AssemblyInfo.vb @@ -1,35 +1,35 @@ -Imports System -Imports System.Reflection -Imports System.Runtime.InteropServices - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - -' Review the values of the assembly attributes - - - - - - - - - - -'The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' - - - +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' + + + diff --git a/Disco.Configuration/My Project/Resources.Designer.vb b/Disco.Configuration/My Project/Resources.Designer.vb index 72cffc23..d6f10bb4 100644 --- a/Disco.Configuration/My Project/Resources.Designer.vb +++ b/Disco.Configuration/My Project/Resources.Designer.vb @@ -1,62 +1,62 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.235 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - -Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Disco.Configuration.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set(ByVal value As Global.System.Globalization.CultureInfo) - resourceCulture = value - End Set - End Property - End Module -End Namespace +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.235 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Disco.Configuration.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/Disco.Configuration/My Project/Resources.resx b/Disco.Configuration/My Project/Resources.resx index ffecec85..af7dbebb 100644 --- a/Disco.Configuration/My Project/Resources.resx +++ b/Disco.Configuration/My Project/Resources.resx @@ -1,117 +1,117 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Disco.Configuration/My Project/Settings.Designer.vb b/Disco.Configuration/My Project/Settings.Designer.vb index 4cd7656c..7cf5ba83 100644 --- a/Disco.Configuration/My Project/Settings.Designer.vb +++ b/Disco.Configuration/My Project/Settings.Designer.vb @@ -1,73 +1,73 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.235 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - -Namespace My - - _ - Partial Friend NotInheritable Class MySettings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) - -#Region "My.Settings Auto-Save Functionality" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub -#End If -#End Region - - Public Shared ReadOnly Property [Default]() As MySettings - Get - -#If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If -#End If - Return defaultInstance - End Get - End Property - End Class -End Namespace - -Namespace My - - _ - Friend Module MySettingsProperty - - _ - Friend ReadOnly Property Settings() As Global.Disco.Configuration.My.MySettings - Get - Return Global.Disco.Configuration.My.MySettings.Default - End Get - End Property - End Module -End Namespace +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.235 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.Disco.Configuration.My.MySettings + Get + Return Global.Disco.Configuration.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/Disco.Configuration/My Project/Settings.settings b/Disco.Configuration/My Project/Settings.settings index 377f56d6..85b890b3 100644 --- a/Disco.Configuration/My Project/Settings.settings +++ b/Disco.Configuration/My Project/Settings.settings @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/Disco.Data/App.config b/Disco.Data/App.config index 56b8a360..24c7f4a8 100644 --- a/Disco.Data/App.config +++ b/Disco.Data/App.config @@ -1,20 +1,20 @@ - - - - -
- - - - - - - - - - - - - - + + + + +
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Disco.Data/Configuration/ConfigurationBase.cs b/Disco.Data/Configuration/ConfigurationBase.cs index 529a6555..68e18196 100644 --- a/Disco.Data/Configuration/ConfigurationBase.cs +++ b/Disco.Data/Configuration/ConfigurationBase.cs @@ -1,36 +1,36 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Data.Configuration -{ - public abstract class ConfigurationBase - { - private ConfigurationContext _context; - - public ConfigurationContext Context - { - get - { - return _context; - } - } - public abstract string Scope { get; } - - public ConfigurationBase(ConfigurationContext Context) - { - this._context = Context; - } - - protected void SetValue(string Key, ValueType Value) - { - this.Context.SetConfigurationValue(this.Scope, Key, Value); - } - protected ValueType GetValue(string Key, ValueType Default) - { - return this.Context.GetConfigurationValue(this.Scope, Key, Default); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Data.Configuration +{ + public abstract class ConfigurationBase + { + private ConfigurationContext _context; + + public ConfigurationContext Context + { + get + { + return _context; + } + } + public abstract string Scope { get; } + + public ConfigurationBase(ConfigurationContext Context) + { + this._context = Context; + } + + protected void SetValue(string Key, ValueType Value) + { + this.Context.SetConfigurationValue(this.Scope, Key, Value); + } + protected ValueType GetValue(string Key, ValueType Default) + { + return this.Context.GetConfigurationValue(this.Scope, Key, Default); + } + + } +} diff --git a/Disco.Data/Configuration/Modules/BootstrapperConfiguration.cs b/Disco.Data/Configuration/Modules/BootstrapperConfiguration.cs index 310d88fb..636fc1fa 100644 --- a/Disco.Data/Configuration/Modules/BootstrapperConfiguration.cs +++ b/Disco.Data/Configuration/Modules/BootstrapperConfiguration.cs @@ -1,41 +1,41 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Data.Configuration.Modules -{ - public class BootstrapperConfiguration : ConfigurationBase - { - public BootstrapperConfiguration(ConfigurationContext Context) : base(Context) { } - - public override string Scope - { - get { return "Bootstrapper"; } - } - - public string MacSshUsername - { - get - { - return this.GetValue("MacSshUsername", "root"); - } - set - { - this.SetValue("MacSshUsername", value); - } - } - - public string MacSshPassword - { - get - { - return ConfigurationContext.DeobsfucateValue(this.GetValue("MacSshPassword", string.Empty)); - } - set - { - this.SetValue("MacSshPassword", ConfigurationContext.ObsfucateValue(value)); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Data.Configuration.Modules +{ + public class BootstrapperConfiguration : ConfigurationBase + { + public BootstrapperConfiguration(ConfigurationContext Context) : base(Context) { } + + public override string Scope + { + get { return "Bootstrapper"; } + } + + public string MacSshUsername + { + get + { + return this.GetValue("MacSshUsername", "root"); + } + set + { + this.SetValue("MacSshUsername", value); + } + } + + public string MacSshPassword + { + get + { + return ConfigurationContext.DeobsfucateValue(this.GetValue("MacSshPassword", string.Empty)); + } + set + { + this.SetValue("MacSshPassword", ConfigurationContext.ObsfucateValue(value)); + } + } + } +} diff --git a/Disco.Data/Configuration/Modules/DeviceProfileConfiguration.cs b/Disco.Data/Configuration/Modules/DeviceProfileConfiguration.cs index f2fa5eea..d7418014 100644 --- a/Disco.Data/Configuration/Modules/DeviceProfileConfiguration.cs +++ b/Disco.Data/Configuration/Modules/DeviceProfileConfiguration.cs @@ -1,86 +1,86 @@ -// Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. -// -// -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Disco.Models.Repository; - -//namespace Disco.Data.Configuration.Modules -//{ -// public class DeviceProfileConfiguration : ConfigurationBase -// { -// private DeviceProfilesConfiguration deviceProfilesConfig; -// private DeviceProfile deviceProfile; - -// public DeviceProfileConfiguration(ConfigurationContext Context, DeviceProfile DeviceProfile) -// : base(Context) -// { -// this.deviceProfilesConfig = Context.DeviceProfiles; -// this.deviceProfile = DeviceProfile; -// } - -// public override string Scope -// { -// get -// { -// return string.Format("DeviceProfile:{0}", this.deviceProfile.Id); -// } -// } - -// public string ComputerNameTemplate -// { -// get -// { -// return this.GetValue("ComputerNameTemplate", "DeviceProfile.ShortName + '-' + SerialNumber"); -// } -// set -// { -// this.SetValue("ComputerNameTemplate", value); -// } -// } - -// public enum DeviceProfileDistributionTypes : int -// { -// OneToMany = 0, -// OneToOne = 1 -// } -// public DeviceProfileDistributionTypes DistributionType -// { -// get -// { -// return (DeviceProfileDistributionTypes)this.GetValue("DistributionType", (int)DeviceProfileDistributionTypes.OneToMany); -// } -// set -// { -// this.SetValue("DistributionType", (int)value); -// } -// } -// public string OrganisationalUnit -// { -// get -// { -// return this.GetValue("OrganisationalUnit", null); -// } -// set -// { -// this.SetValue("OrganisationalUnit", value); -// } -// } -// public bool AllocateWirelessCertificate -// { -// get -// { -// return this.GetValue("AllocateWirelessCertificate", false); -// } -// set -// { -// this.SetValue("AllocateWirelessCertificate", value); -// } -// } - - - -// } -//} +// Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. +// +// +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using Disco.Models.Repository; + +//namespace Disco.Data.Configuration.Modules +//{ +// public class DeviceProfileConfiguration : ConfigurationBase +// { +// private DeviceProfilesConfiguration deviceProfilesConfig; +// private DeviceProfile deviceProfile; + +// public DeviceProfileConfiguration(ConfigurationContext Context, DeviceProfile DeviceProfile) +// : base(Context) +// { +// this.deviceProfilesConfig = Context.DeviceProfiles; +// this.deviceProfile = DeviceProfile; +// } + +// public override string Scope +// { +// get +// { +// return string.Format("DeviceProfile:{0}", this.deviceProfile.Id); +// } +// } + +// public string ComputerNameTemplate +// { +// get +// { +// return this.GetValue("ComputerNameTemplate", "DeviceProfile.ShortName + '-' + SerialNumber"); +// } +// set +// { +// this.SetValue("ComputerNameTemplate", value); +// } +// } + +// public enum DeviceProfileDistributionTypes : int +// { +// OneToMany = 0, +// OneToOne = 1 +// } +// public DeviceProfileDistributionTypes DistributionType +// { +// get +// { +// return (DeviceProfileDistributionTypes)this.GetValue("DistributionType", (int)DeviceProfileDistributionTypes.OneToMany); +// } +// set +// { +// this.SetValue("DistributionType", (int)value); +// } +// } +// public string OrganisationalUnit +// { +// get +// { +// return this.GetValue("OrganisationalUnit", null); +// } +// set +// { +// this.SetValue("OrganisationalUnit", value); +// } +// } +// public bool AllocateWirelessCertificate +// { +// get +// { +// return this.GetValue("AllocateWirelessCertificate", false); +// } +// set +// { +// this.SetValue("AllocateWirelessCertificate", value); +// } +// } + + + +// } +//} diff --git a/Disco.Data/Configuration/Modules/DeviceProfilesConfiguration.cs b/Disco.Data/Configuration/Modules/DeviceProfilesConfiguration.cs index 4307da85..1a778dc3 100644 --- a/Disco.Data/Configuration/Modules/DeviceProfilesConfiguration.cs +++ b/Disco.Data/Configuration/Modules/DeviceProfilesConfiguration.cs @@ -1,70 +1,70 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; - -namespace Disco.Data.Configuration.Modules -{ - public class DeviceProfilesConfiguration : ConfigurationBase - { - // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. - //private Dictionary deviceProfileConfigurations; - - public DeviceProfilesConfiguration(ConfigurationContext Context) - : base(Context) - { - // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. - //this.deviceProfileConfigurations = new Dictionary(); - } - - public override string Scope - { - get { return "DeviceProfiles"; } - } - - // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. - //public DeviceProfileConfiguration DeviceProfile(DeviceProfile Profile) - //{ - // DeviceProfileConfiguration dpc = default(DeviceProfileConfiguration); - // if (!this.deviceProfileConfigurations.TryGetValue(Profile.Id, out dpc)) - // { - // dpc = new DeviceProfileConfiguration(this.Context, Profile); - // this.deviceProfileConfigurations[Profile.Id] = dpc; - // } - // return dpc; - //} - - public int DefaultDeviceProfileId - { - get - { - var v = this.GetValue("DefaultDeviceProfileId", 1); - if (v > 0) - return v; - else - return 1; - } - set - { - if (value < 1) - throw new ArgumentOutOfRangeException("value", "Expected >= 1"); - this.SetValue("DefaultDeviceProfileId", value); - } - } - public int DefaultAddDeviceOfflineDeviceProfileId - { - get - { - return this.GetValue("DefaultAddDeviceOfflineDeviceProfileId", 0); - } - set - { - if (value < 0) - throw new ArgumentOutOfRangeException("value", "Expected >= 0"); - this.SetValue("DefaultAddDeviceOfflineDeviceProfileId", value); - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; + +namespace Disco.Data.Configuration.Modules +{ + public class DeviceProfilesConfiguration : ConfigurationBase + { + // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. + //private Dictionary deviceProfileConfigurations; + + public DeviceProfilesConfiguration(ConfigurationContext Context) + : base(Context) + { + // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. + //this.deviceProfileConfigurations = new Dictionary(); + } + + public override string Scope + { + get { return "DeviceProfiles"; } + } + + // Removed 2012-06-14 G# - Properties moved to DeviceProfile model & DB Migrated in DBv3. + //public DeviceProfileConfiguration DeviceProfile(DeviceProfile Profile) + //{ + // DeviceProfileConfiguration dpc = default(DeviceProfileConfiguration); + // if (!this.deviceProfileConfigurations.TryGetValue(Profile.Id, out dpc)) + // { + // dpc = new DeviceProfileConfiguration(this.Context, Profile); + // this.deviceProfileConfigurations[Profile.Id] = dpc; + // } + // return dpc; + //} + + public int DefaultDeviceProfileId + { + get + { + var v = this.GetValue("DefaultDeviceProfileId", 1); + if (v > 0) + return v; + else + return 1; + } + set + { + if (value < 1) + throw new ArgumentOutOfRangeException("value", "Expected >= 1"); + this.SetValue("DefaultDeviceProfileId", value); + } + } + public int DefaultAddDeviceOfflineDeviceProfileId + { + get + { + return this.GetValue("DefaultAddDeviceOfflineDeviceProfileId", 0); + } + set + { + if (value < 0) + throw new ArgumentOutOfRangeException("value", "Expected >= 0"); + this.SetValue("DefaultAddDeviceOfflineDeviceProfileId", value); + } + } + + } +} diff --git a/Disco.Data/Configuration/Modules/OrganisationAddressesConfiguration.cs b/Disco.Data/Configuration/Modules/OrganisationAddressesConfiguration.cs index c507b1c0..1c38ccf9 100644 --- a/Disco.Data/Configuration/Modules/OrganisationAddressesConfiguration.cs +++ b/Disco.Data/Configuration/Modules/OrganisationAddressesConfiguration.cs @@ -1,89 +1,89 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.BI.Config; -using Disco.Models.Repository; -using Newtonsoft.Json; - -namespace Disco.Data.Configuration.Modules -{ - public class OrganisationAddressesConfiguration : ConfigurationBase - { - public OrganisationAddressesConfiguration(ConfigurationContext Context) : base(Context) { } - - public override string Scope - { - get { return "OrganisationAddresses"; } - } - - public OrganisationAddress GetAddress(int Id) - { - var address = default(OrganisationAddress); - var addressString = this.GetValue(Id.ToString(), null); - if (addressString != null) - { - if (addressString.StartsWith("{")) - { - // Assume Json - address = JsonConvert.DeserializeObject(addressString); - } - else - { - // Assume Old Storage Method - address = OrganisationAddress.FromConfigurationEntry(Id, addressString); - } - } - return address; - } - public OrganisationAddress SetAddress(OrganisationAddress Address) - { - if (!Address.Id.HasValue) - { - Address.Id = NextOrganisationAddressId; - } - - string addressString = JsonConvert.SerializeObject(Address); - - this.SetValue(Address.Id.ToString(), addressString); //Address.ToConfigurationEntry()); - return Address; - } - public void RemoveAddress(int Id) - { - // Set Config Item to null = Remove Configuration Item - this.SetValue(Id.ToString(), null); - } - - public List Addresses - { - get - { - Dictionary configAddress = default(Dictionary); - if (this.Context.ConfigurationDictionary(this.Scope).TryGetValue(this.Scope, out configAddress)) - return configAddress.Select( - ca => ca.Value.Value.StartsWith("{") ? - JsonConvert.DeserializeObject(ca.Value.Value) : - OrganisationAddress.FromConfigurationEntry(int.Parse(ca.Key), ca.Value.Value) - ).ToList(); - else - return new List(); // Empty List - No Addresses - } - } - - private int NextOrganisationAddressId - { - get - { - int nextId = 0; - while (true) - { - if (this.Context.ConfigurationItem(this.Scope, nextId.ToString()) == null) - break; - nextId++; - } - return nextId; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.BI.Config; +using Disco.Models.Repository; +using Newtonsoft.Json; + +namespace Disco.Data.Configuration.Modules +{ + public class OrganisationAddressesConfiguration : ConfigurationBase + { + public OrganisationAddressesConfiguration(ConfigurationContext Context) : base(Context) { } + + public override string Scope + { + get { return "OrganisationAddresses"; } + } + + public OrganisationAddress GetAddress(int Id) + { + var address = default(OrganisationAddress); + var addressString = this.GetValue(Id.ToString(), null); + if (addressString != null) + { + if (addressString.StartsWith("{")) + { + // Assume Json + address = JsonConvert.DeserializeObject(addressString); + } + else + { + // Assume Old Storage Method + address = OrganisationAddress.FromConfigurationEntry(Id, addressString); + } + } + return address; + } + public OrganisationAddress SetAddress(OrganisationAddress Address) + { + if (!Address.Id.HasValue) + { + Address.Id = NextOrganisationAddressId; + } + + string addressString = JsonConvert.SerializeObject(Address); + + this.SetValue(Address.Id.ToString(), addressString); //Address.ToConfigurationEntry()); + return Address; + } + public void RemoveAddress(int Id) + { + // Set Config Item to null = Remove Configuration Item + this.SetValue(Id.ToString(), null); + } + + public List Addresses + { + get + { + Dictionary configAddress = default(Dictionary); + if (this.Context.ConfigurationDictionary(this.Scope).TryGetValue(this.Scope, out configAddress)) + return configAddress.Select( + ca => ca.Value.Value.StartsWith("{") ? + JsonConvert.DeserializeObject(ca.Value.Value) : + OrganisationAddress.FromConfigurationEntry(int.Parse(ca.Key), ca.Value.Value) + ).ToList(); + else + return new List(); // Empty List - No Addresses + } + } + + private int NextOrganisationAddressId + { + get + { + int nextId = 0; + while (true) + { + if (this.Context.ConfigurationItem(this.Scope, nextId.ToString()) == null) + break; + nextId++; + } + return nextId; + } + } + + } +} diff --git a/Disco.Data/Configuration/Modules/WirelessConfiguration.cs b/Disco.Data/Configuration/Modules/WirelessConfiguration.cs index 75b1d682..ba011755 100644 --- a/Disco.Data/Configuration/Modules/WirelessConfiguration.cs +++ b/Disco.Data/Configuration/Modules/WirelessConfiguration.cs @@ -1,109 +1,109 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Data.Configuration.Modules -{ - public class WirelessConfiguration : ConfigurationBase - { - public const string Provider_eduSTAR = "eduSTAR"; - public const string Provider_eduPaSS = "eduPaSS"; - - public WirelessConfiguration(ConfigurationContext Context) : base(Context) { } - - public override string Scope - { - get { return "Wireless"; } - } - - public int CertificateAutoBufferMax - { - get - { - return this.GetValue("CertificateAutoBufferMax", 50); - } - set - { - this.SetValue("CertificateAutoBufferMax", value); - } - } - public int CertificateAutoBufferLow - { - get - { - return this.GetValue("CertificateAutoBufferLow", 10); - } - set - { - this.SetValue("CertificateAutoBufferLow", value); - } - } - public string Provider - { - get - { - return this.GetValue("Provider", Provider_eduSTAR); - } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value"); - if (value.Equals(Provider_eduSTAR, StringComparison.InvariantCultureIgnoreCase)) - this.SetValue("Provider", Provider_eduSTAR); - else - throw new NotSupportedException(string.Format("Unsupported Wireless Provider: ", value)); - } - } - - #region eduSTAR Configuration - - public string eduSTAR_Scope - { - get { return "Wireless_eduSTAR"; } - } - - public string eduSTAR_ServiceAccountSchoolId - { - get - { - return this.Context.GetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountSchoolId", null); - } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value"); - this.Context.SetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountSchoolId", value); - } - } - public string eduSTAR_ServiceAccountUsername - { - get - { - return this.Context.GetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountUsername", null); - } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value"); - this.Context.SetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountUsername", value); - } - } - public string eduSTAR_ServiceAccountPassword - { - get - { - return ConfigurationContext.DeobsfucateValue(this.Context.GetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountPassword", null)); - } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value"); - this.Context.SetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountPassword", ConfigurationContext.ObsfucateValue(value)); - } - } - - #endregion - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Data.Configuration.Modules +{ + public class WirelessConfiguration : ConfigurationBase + { + public const string Provider_eduSTAR = "eduSTAR"; + public const string Provider_eduPaSS = "eduPaSS"; + + public WirelessConfiguration(ConfigurationContext Context) : base(Context) { } + + public override string Scope + { + get { return "Wireless"; } + } + + public int CertificateAutoBufferMax + { + get + { + return this.GetValue("CertificateAutoBufferMax", 50); + } + set + { + this.SetValue("CertificateAutoBufferMax", value); + } + } + public int CertificateAutoBufferLow + { + get + { + return this.GetValue("CertificateAutoBufferLow", 10); + } + set + { + this.SetValue("CertificateAutoBufferLow", value); + } + } + public string Provider + { + get + { + return this.GetValue("Provider", Provider_eduSTAR); + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentNullException("value"); + if (value.Equals(Provider_eduSTAR, StringComparison.InvariantCultureIgnoreCase)) + this.SetValue("Provider", Provider_eduSTAR); + else + throw new NotSupportedException(string.Format("Unsupported Wireless Provider: ", value)); + } + } + + #region eduSTAR Configuration + + public string eduSTAR_Scope + { + get { return "Wireless_eduSTAR"; } + } + + public string eduSTAR_ServiceAccountSchoolId + { + get + { + return this.Context.GetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountSchoolId", null); + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentNullException("value"); + this.Context.SetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountSchoolId", value); + } + } + public string eduSTAR_ServiceAccountUsername + { + get + { + return this.Context.GetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountUsername", null); + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentNullException("value"); + this.Context.SetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountUsername", value); + } + } + public string eduSTAR_ServiceAccountPassword + { + get + { + return ConfigurationContext.DeobsfucateValue(this.Context.GetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountPassword", null)); + } + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentNullException("value"); + this.Context.SetConfigurationValue(this.eduSTAR_Scope, "ServiceAccountPassword", ConfigurationContext.ObsfucateValue(value)); + } + } + + #endregion + + } +} diff --git a/Disco.Data/Disco.Data.sln b/Disco.Data/Disco.Data.sln index 852c6c41..9647885d 100644 --- a/Disco.Data/Disco.Data.sln +++ b/Disco.Data/Disco.Data.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Disco.Data", "Disco.Data.csproj", "{85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Disco.Data", "Disco.Data.csproj", "{85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Disco.Data/Migrations/201204250418485_DBv0.Designer.cs b/Disco.Data/Migrations/201204250418485_DBv0.Designer.cs index 3b11514a..7b59860a 100644 --- a/Disco.Data/Migrations/201204250418485_DBv0.Designer.cs +++ b/Disco.Data/Migrations/201204250418485_DBv0.Designer.cs @@ -1,24 +1,24 @@ -// -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - - public sealed partial class DBv0 : IMigrationMetadata - { - string IMigrationMetadata.Id - { - get { return "201204250418485_DBv0"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsLxv9nL55zVDTF9kib1bZNP/so6dFM63GT7M2G7/KV1VTtFV9/VF6XBYZIfM6L8/fE7Odh8DsI9sn9XpK2LXXb65XOff82UeE4Hlxsa6zloZ/1uZBc3rh98qvgw/oo5d1tcrr9vpVfq5AXk/pk4/Suze3JHDddo/vdvuw74XggTX90dY0gx+lz4p3+ex5vrxo5599dJ6VDbX4IntnPjmgafxqWdB80zttvaZvX6zLMpuUuW3ewaPTK6P6Q+7zJ7Ny/b4jpV83dCt/+70+vuuYYCNrPK2m60W+bN/ki1WZtfnX4Yyz2ftPN955Lwrc+2C6P82baV2sIAPv2ffe/Q/u/Ouw96cf2umzomzz+vTdqs6b5psedp/pCIEX2WVxwWqmg8p3qsnr9QTdNx+lr/KS2zTzYiVKb9zlw98/eOFZXS1eVeh1U7vf/3W1rqegcnWLxm+y+iJvv6bYOEDfjMBEm1En6OGHIl57H8zhHrbv1fP9D+3468v17s77j3qQw4/bNpvOmd1+drncMO6tuNyIxG1H8TS/LKb5SbVYVUuCOTCMsNHgKIab9Qexoe37jkE5MYq6fjeEcuTrHqqxNl8DxThp6YsNuN2E14043VrBdebjm9Fy76O3zpbtvb2IOK4+ffSafOb883yZk0Obz15mLRm5Jd7NeRTqQD9afXo7H/rh3Z09+NB3s+WyanlCblY5oA57+xswjlrIH5Lyuk3fJ1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u8dZNYxPNuve9u1Bi27QDBNrR6X+K9F/GGeekWb/1s8dX/C0jWsQm3ZbhbvPZDsVKdxkMU3NDsZ5eEG9juFq/9rPHdD5Fsj+8KxJNqSb71Mq/td4/vvp7O80WmH9CfbVVnF/kX1SwvG/708d1Xa3p7kctfT/OmuHAgHhPMZT5Fnw6oaXO2PK9e1tWKzPJ1ByPTxHytE4nAZ5a12TEMeTZt6espGXbK/nyU/mRWrqnJ6WKSz86WX67b1bqlIeeLSRlESI/vbu7/8d0ezo+/XOGv5psYAqFZ0BDyL5dP1kU5s3g/y8qmM2lDIE6I+p/n9LnMZUs/84trC4kiw1sCUvI9zVf5cuZxUfPl8nV2mQ/jdjMNQ4o9flpkF3W28CkonygmrzPq2euCOvDfcP3Rn8Sus8W7o/8nAAD//379LC1chgIA"; } - } - } -} +// +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + + public sealed partial class DBv0 : IMigrationMetadata + { + string IMigrationMetadata.Id + { + get { return "201204250418485_DBv0"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsLxv9nL55zVDTF9kib1bZNP/so6dFM63GT7M2G7/KV1VTtFV9/VF6XBYZIfM6L8/fE7Odh8DsI9sn9XpK2LXXb65XOff82UeE4Hlxsa6zloZ/1uZBc3rh98qvgw/oo5d1tcrr9vpVfq5AXk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0.cs index 3422696b..2385b416 100644 --- a/Disco.Data/Migrations/201204250418485_DBv0.cs +++ b/Disco.Data/Migrations/201204250418485_DBv0.cs @@ -1,604 +1,604 @@ -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - - public partial class DBv0 : DbMigration - { - public override void Up() - { - CreateTable( - "Configuration", - c => new - { - Scope = c.String(nullable: false, maxLength: 80), - Key = c.String(nullable: false, maxLength: 80), - Value = c.String(), - }) - .PrimaryKey(t => new { t.Scope, t.Key }); - - CreateTable( - "DocumentTemplates", - c => new - { - Id = c.String(nullable: false, maxLength: 30), - Description = c.String(nullable: false, maxLength: 250), - Scope = c.String(nullable: false, maxLength: 6), - FilterExpression = c.String(maxLength: 250), - }) - .PrimaryKey(t => t.Id); - - CreateTable( - "JobSubTypes", - c => new - { - Id = c.String(nullable: false, maxLength: 20), - JobTypeId = c.String(nullable: false, maxLength: 5), - Description = c.String(nullable: false, maxLength: 100), - }) - .PrimaryKey(t => new { t.Id, t.JobTypeId }) - .ForeignKey("JobTypes", t => t.JobTypeId) - .Index(t => t.JobTypeId); - - CreateTable( - "DeviceComponents", - c => new - { - Id = c.Int(nullable: false, identity: true), - DeviceModelId = c.Int(), - Description = c.String(maxLength: 100), - Cost = c.Decimal(nullable: false, precision: 18, scale: 2), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("DeviceModels", t => t.DeviceModelId) - .Index(t => t.DeviceModelId); - - CreateTable( - "DeviceModels", - c => new - { - Id = c.Int(nullable: false, identity: true), - Description = c.String(maxLength: 500), - Manufacturer = c.String(maxLength: 200), - Model = c.String(maxLength: 200), - ModelType = c.String(maxLength: 40), - Image = c.Binary(), - DefaultPurchaseDate = c.DateTime(), - DeviceCost = c.Decimal(precision: 18, scale: 2), - DefaultWarrantyProvider = c.String(maxLength: 40), - }) - .PrimaryKey(t => t.Id); - - CreateTable( - "Devices", - c => new - { - SerialNumber = c.String(nullable: false, maxLength: 40), - AssetNumber = c.String(maxLength: 40), - Location = c.String(maxLength: 250), - DeviceModelId = c.Int(), - DeviceProfileId = c.Int(nullable: false), - DeviceBatchId = c.Int(), - ComputerName = c.String(maxLength: 24), - AssignedUserId = c.String(maxLength: 50), - LastNetworkLogonDate = c.DateTime(), - CertificateStoreReference = c.String(maxLength: 24), - AllowUnauthenticatedEnrol = c.Boolean(nullable: false), - Active = c.Boolean(nullable: false), - CreatedDate = c.DateTime(nullable: false), - EnrolledDate = c.DateTime(), - LastEnrolDate = c.DateTime(), - DecommissionedDate = c.DateTime(), - }) - .PrimaryKey(t => t.SerialNumber) - .ForeignKey("DeviceModels", t => t.DeviceModelId) - .ForeignKey("DeviceProfiles", t => t.DeviceProfileId) - .ForeignKey("DeviceBatches", t => t.DeviceBatchId) - .ForeignKey("Users", t => t.AssignedUserId) - .Index(t => t.DeviceModelId) - .Index(t => t.DeviceProfileId) - .Index(t => t.DeviceBatchId) - .Index(t => t.AssignedUserId); - - CreateTable( - "DeviceProfiles", - c => new - { - Id = c.Int(nullable: false, identity: true), - Name = c.String(nullable: false, maxLength: 100), - ShortName = c.String(nullable: false, maxLength: 10), - Description = c.String(maxLength: 500), - DefaultOrganisationAddress = c.Int(), - }) - .PrimaryKey(t => t.Id); - - CreateTable( - "DeviceBatches", - c => new - { - Id = c.Int(nullable: false, identity: true), - Name = c.String(maxLength: 500), - PurchaseDate = c.DateTime(nullable: false), - Supplier = c.String(maxLength: 200), - PurchaseDetails = c.String(maxLength: 500), - UnitCost = c.Decimal(precision: 18, scale: 2), - UnitQuantity = c.Int(), - DefaultDeviceModelId = c.Int(), - WarrantyValidUntil = c.DateTime(), - WarrantyDetails = c.String(), - InsuredDate = c.DateTime(), - InsuranceSupplier = c.String(maxLength: 200), - InsuredUntil = c.DateTime(), - InsuranceDetails = c.String(), - Comments = c.String(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("DeviceModels", t => t.DefaultDeviceModelId) - .Index(t => t.DefaultDeviceModelId); - - CreateTable( - "Users", - c => new - { - Id = c.String(nullable: false, maxLength: 50), - DisplayName = c.String(maxLength: 200), - Surname = c.String(maxLength: 200), - GivenName = c.String(maxLength: 200), - Type = c.String(maxLength: 8), - PhoneNumber = c.String(maxLength: 100), - EmailAddress = c.String(maxLength: 150), - }) - .PrimaryKey(t => t.Id); - - CreateTable( - "UserDetails", - c => new - { - UserId = c.String(nullable: false, maxLength: 50), - Scope = c.String(nullable: false, maxLength: 100), - Key = c.String(nullable: false, maxLength: 100), - Value = c.String(), - }) - .PrimaryKey(t => new { t.UserId, t.Scope, t.Key }) - .ForeignKey("Users", t => t.UserId) - .Index(t => t.UserId); - - CreateTable( - "UserAttachments", - c => new - { - Id = c.Int(nullable: false, identity: true), - UserId = c.String(maxLength: 50), - TechUserId = c.String(nullable: false, maxLength: 50), - Filename = c.String(nullable: false, maxLength: 500), - MimeType = c.String(nullable: false, maxLength: 500), - Timestamp = c.DateTime(nullable: false), - Comments = c.String(nullable: false, maxLength: 500), - DocumentTemplateId = c.String(maxLength: 30), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("Users", t => t.UserId) - .ForeignKey("Users", t => t.TechUserId) - .ForeignKey("DocumentTemplates", t => t.DocumentTemplateId) - .Index(t => t.UserId) - .Index(t => t.TechUserId) - .Index(t => t.DocumentTemplateId); - - CreateTable( - "DeviceUserAssignments", - c => new - { - DeviceSerialNumber = c.String(nullable: false, maxLength: 40), - AssignedDate = c.DateTime(nullable: false), - AssignedUserId = c.String(maxLength: 50), - UnassignedDate = c.DateTime(), - }) - .PrimaryKey(t => new { t.DeviceSerialNumber, t.AssignedDate }) - .ForeignKey("Users", t => t.AssignedUserId) - .ForeignKey("Devices", t => t.DeviceSerialNumber) - .Index(t => t.AssignedUserId) - .Index(t => t.DeviceSerialNumber); - - CreateTable( - "Jobs", - c => new - { - Id = c.Int(nullable: false, identity: true), - JobTypeId = c.String(nullable: false, maxLength: 5), - DeviceSerialNumber = c.String(maxLength: 40), - UserId = c.String(maxLength: 50), - OpenedTechUserId = c.String(nullable: false, maxLength: 50), - OpenedDate = c.DateTime(nullable: false), - ExpectedClosedDate = c.DateTime(), - ClosedTechUserId = c.String(maxLength: 50), - ClosedDate = c.DateTime(), - DeviceHeld = c.DateTime(), - DeviceHeldTechUserId = c.String(maxLength: 50), - DeviceHeldLocation = c.String(maxLength: 100), - DeviceReadyForReturn = c.DateTime(), - DeviceReadyForReturnTechUserId = c.String(maxLength: 50), - DeviceReturnedDate = c.DateTime(), - DeviceReturnedTechUserId = c.String(maxLength: 50), - WaitingForUserAction = c.DateTime(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("JobTypes", t => t.JobTypeId) - .ForeignKey("Users", t => t.OpenedTechUserId) - .ForeignKey("Users", t => t.ClosedTechUserId) - .ForeignKey("Users", t => t.DeviceHeldTechUserId) - .ForeignKey("Users", t => t.DeviceReadyForReturnTechUserId) - .ForeignKey("Users", t => t.DeviceReturnedTechUserId) - .ForeignKey("Users", t => t.UserId) - .ForeignKey("Devices", t => t.DeviceSerialNumber) - .Index(t => t.JobTypeId) - .Index(t => t.OpenedTechUserId) - .Index(t => t.ClosedTechUserId) - .Index(t => t.DeviceHeldTechUserId) - .Index(t => t.DeviceReadyForReturnTechUserId) - .Index(t => t.DeviceReturnedTechUserId) - .Index(t => t.UserId) - .Index(t => t.DeviceSerialNumber); - - CreateTable( - "JobTypes", - c => new - { - Id = c.String(nullable: false, maxLength: 5), - Description = c.String(maxLength: 100), - }) - .PrimaryKey(t => t.Id); - - CreateTable( - "JobAttachments", - c => new - { - Id = c.Int(nullable: false, identity: true), - JobId = c.Int(nullable: false), - TechUserId = c.String(nullable: false, maxLength: 50), - Filename = c.String(nullable: false, maxLength: 500), - MimeType = c.String(nullable: false, maxLength: 500), - Timestamp = c.DateTime(nullable: false), - Comments = c.String(nullable: false, maxLength: 500), - DocumentTemplateId = c.String(maxLength: 30), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("Jobs", t => t.JobId) - .ForeignKey("Users", t => t.TechUserId) - .ForeignKey("DocumentTemplates", t => t.DocumentTemplateId) - .Index(t => t.JobId) - .Index(t => t.TechUserId) - .Index(t => t.DocumentTemplateId); - - CreateTable( - "JobComponents", - c => new - { - Id = c.Int(nullable: false, identity: true), - JobId = c.Int(nullable: false), - TechUserId = c.String(nullable: false, maxLength: 50), - Description = c.String(maxLength: 500), - Cost = c.Decimal(nullable: false, precision: 18, scale: 2), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("Jobs", t => t.JobId) - .ForeignKey("Users", t => t.TechUserId) - .Index(t => t.JobId) - .Index(t => t.TechUserId); - - CreateTable( - "JobLogs", - c => new - { - Id = c.Int(nullable: false, identity: true), - JobId = c.Int(nullable: false), - TechUserId = c.String(nullable: false, maxLength: 50), - Timestamp = c.DateTime(nullable: false), - Comments = c.String(nullable: false), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("Jobs", t => t.JobId) - .ForeignKey("Users", t => t.TechUserId) - .Index(t => t.JobId) - .Index(t => t.TechUserId); - - CreateTable( - "JobMetaInsurances", - c => new - { - JobId = c.Int(nullable: false), - LossOrDamageDate = c.DateTime(), - EventLocation = c.String(maxLength: 200), - Description = c.String(), - ThirdPartyCaused = c.Boolean(nullable: false), - ThirdPartyCausedName = c.String(maxLength: 200), - ThirdPartyCausedWhy = c.String(maxLength: 600), - WitnessesNamesAddresses = c.String(maxLength: 1200), - BurglaryTheftMethodOfEntry = c.String(maxLength: 200), - PropertyLastSeenDate = c.DateTime(), - PoliceNotified = c.Boolean(nullable: false), - PoliceNotifiedStation = c.String(maxLength: 200), - PoliceNotifiedDate = c.DateTime(), - PoliceNotifiedCrimeReportNo = c.String(maxLength: 400), - RecoverReduceAction = c.String(maxLength: 800), - OtherInterestedParties = c.String(maxLength: 500), - DateOfPurchase = c.DateTime(), - ClaimFormSentDate = c.DateTime(), - ClaimFormSentUserId = c.String(maxLength: 50), - }) - .PrimaryKey(t => t.JobId) - .ForeignKey("Jobs", t => t.JobId) - .ForeignKey("Users", t => t.ClaimFormSentUserId) - .Index(t => t.JobId) - .Index(t => t.ClaimFormSentUserId); - - CreateTable( - "JobMetaWarranties", - c => new - { - JobId = c.Int(nullable: false), - ExternalName = c.String(maxLength: 100), - ExternalLoggedDate = c.DateTime(), - ExternalReference = c.String(maxLength: 100), - ExternalCompletedDate = c.DateTime(), - }) - .PrimaryKey(t => t.JobId) - .ForeignKey("Jobs", t => t.JobId) - .Index(t => t.JobId); - - CreateTable( - "JobMetaNonWarranties", - c => new - { - JobId = c.Int(nullable: false), - IsInsuranceClaim = c.Boolean(nullable: false), - AccountingChargeAddedDate = c.DateTime(), - AccountingChargeAddedUserId = c.String(maxLength: 50), - AccountingChargePaidDate = c.DateTime(), - AccountingChargePaidUserId = c.String(maxLength: 50), - PurchaseOrderRaisedDate = c.DateTime(), - PurchaseOrderRaisedUserId = c.String(maxLength: 50), - PurchaseOrderReference = c.String(maxLength: 20), - PurchaseOrderSentDate = c.DateTime(), - PurchaseOrderSentUserId = c.String(maxLength: 50), - InvoiceReceivedDate = c.DateTime(), - InvoiceReceivedUserId = c.String(maxLength: 50), - RepairerName = c.String(maxLength: 100), - RepairerLoggedDate = c.DateTime(), - RepairerReference = c.String(maxLength: 100), - RepairerCompletedDate = c.DateTime(), - }) - .PrimaryKey(t => t.JobId) - .ForeignKey("Users", t => t.AccountingChargeAddedUserId) - .ForeignKey("Users", t => t.AccountingChargePaidUserId) - .ForeignKey("Users", t => t.PurchaseOrderRaisedUserId) - .ForeignKey("Users", t => t.PurchaseOrderSentUserId) - .ForeignKey("Users", t => t.InvoiceReceivedUserId) - .ForeignKey("Jobs", t => t.JobId) - .Index(t => t.AccountingChargeAddedUserId) - .Index(t => t.AccountingChargePaidUserId) - .Index(t => t.PurchaseOrderRaisedUserId) - .Index(t => t.PurchaseOrderSentUserId) - .Index(t => t.InvoiceReceivedUserId) - .Index(t => t.JobId); - - CreateTable( - "DeviceDetails", - c => new - { - DeviceSerialNumber = c.String(nullable: false, maxLength: 40), - Scope = c.String(nullable: false, maxLength: 100), - Key = c.String(nullable: false, maxLength: 100), - Value = c.String(), - }) - .PrimaryKey(t => new { t.DeviceSerialNumber, t.Scope, t.Key }) - .ForeignKey("Devices", t => t.DeviceSerialNumber) - .Index(t => t.DeviceSerialNumber); - - CreateTable( - "DeviceAttachments", - c => new - { - Id = c.Int(nullable: false, identity: true), - DeviceSerialNumber = c.String(maxLength: 40), - TechUserId = c.String(nullable: false, maxLength: 50), - Filename = c.String(nullable: false, maxLength: 500), - MimeType = c.String(nullable: false, maxLength: 500), - Timestamp = c.DateTime(nullable: false), - Comments = c.String(nullable: false, maxLength: 500), - DocumentTemplateId = c.String(maxLength: 30), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("Devices", t => t.DeviceSerialNumber) - .ForeignKey("Users", t => t.TechUserId) - .ForeignKey("DocumentTemplates", t => t.DocumentTemplateId) - .Index(t => t.DeviceSerialNumber) - .Index(t => t.TechUserId) - .Index(t => t.DocumentTemplateId); - - CreateTable( - "WirelessCertificates", - c => new - { - Id = c.Int(nullable: false, identity: true), - Index = c.Int(nullable: false), - Name = c.String(maxLength: 28), - Content = c.Binary(), - Enabled = c.Boolean(nullable: false), - ExpirationDate = c.DateTime(), - AllocatedDate = c.DateTime(), - DeviceSerialNumber = c.String(maxLength: 40), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("Devices", t => t.DeviceSerialNumber) - .Index(t => t.DeviceSerialNumber); - - CreateTable( - "Jobs_JobSubTypes", - c => new - { - Job_Id = c.Int(nullable: false), - JobSubType_Id = c.String(nullable: false, maxLength: 20), - JobSubType_JobTypeId = c.String(nullable: false, maxLength: 5), - }) - .PrimaryKey(t => new { t.Job_Id, t.JobSubType_Id, t.JobSubType_JobTypeId }) - .ForeignKey("Jobs", t => t.Job_Id, cascadeDelete: true) - .ForeignKey("JobSubTypes", t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }, cascadeDelete: true) - .Index(t => t.Job_Id) - .Index(t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }); - - CreateTable( - "DeviceComponents_JobSubTypes", - c => new - { - DeviceComponent_Id = c.Int(nullable: false), - JobSubType_Id = c.String(nullable: false, maxLength: 20), - JobSubType_JobTypeId = c.String(nullable: false, maxLength: 5), - }) - .PrimaryKey(t => new { t.DeviceComponent_Id, t.JobSubType_Id, t.JobSubType_JobTypeId }) - .ForeignKey("DeviceComponents", t => t.DeviceComponent_Id, cascadeDelete: true) - .ForeignKey("JobSubTypes", t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }, cascadeDelete: true) - .Index(t => t.DeviceComponent_Id) - .Index(t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }); - - CreateTable( - "DocumentTemplates_JobSubTypes", - c => new - { - DocumentTemplate_Id = c.String(nullable: false, maxLength: 30), - JobSubType_Id = c.String(nullable: false, maxLength: 20), - JobSubType_JobTypeId = c.String(nullable: false, maxLength: 5), - }) - .PrimaryKey(t => new { t.DocumentTemplate_Id, t.JobSubType_Id, t.JobSubType_JobTypeId }) - .ForeignKey("DocumentTemplates", t => t.DocumentTemplate_Id, cascadeDelete: true) - .ForeignKey("JobSubTypes", t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }, cascadeDelete: true) - .Index(t => t.DocumentTemplate_Id) - .Index(t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }); - - } - - public override void Down() - { - DropIndex("DocumentTemplates_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }); - DropIndex("DocumentTemplates_JobSubTypes", new[] { "DocumentTemplate_Id" }); - DropIndex("DeviceComponents_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }); - DropIndex("DeviceComponents_JobSubTypes", new[] { "DeviceComponent_Id" }); - DropIndex("Jobs_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }); - DropIndex("Jobs_JobSubTypes", new[] { "Job_Id" }); - DropIndex("WirelessCertificates", new[] { "DeviceSerialNumber" }); - DropIndex("DeviceAttachments", new[] { "DocumentTemplateId" }); - DropIndex("DeviceAttachments", new[] { "TechUserId" }); - DropIndex("DeviceAttachments", new[] { "DeviceSerialNumber" }); - DropIndex("DeviceDetails", new[] { "DeviceSerialNumber" }); - DropIndex("JobMetaNonWarranties", new[] { "JobId" }); - DropIndex("JobMetaNonWarranties", new[] { "InvoiceReceivedUserId" }); - DropIndex("JobMetaNonWarranties", new[] { "PurchaseOrderSentUserId" }); - DropIndex("JobMetaNonWarranties", new[] { "PurchaseOrderRaisedUserId" }); - DropIndex("JobMetaNonWarranties", new[] { "AccountingChargePaidUserId" }); - DropIndex("JobMetaNonWarranties", new[] { "AccountingChargeAddedUserId" }); - DropIndex("JobMetaWarranties", new[] { "JobId" }); - DropIndex("JobMetaInsurances", new[] { "ClaimFormSentUserId" }); - DropIndex("JobMetaInsurances", new[] { "JobId" }); - DropIndex("JobLogs", new[] { "TechUserId" }); - DropIndex("JobLogs", new[] { "JobId" }); - DropIndex("JobComponents", new[] { "TechUserId" }); - DropIndex("JobComponents", new[] { "JobId" }); - DropIndex("JobAttachments", new[] { "DocumentTemplateId" }); - DropIndex("JobAttachments", new[] { "TechUserId" }); - DropIndex("JobAttachments", new[] { "JobId" }); - DropIndex("Jobs", new[] { "DeviceSerialNumber" }); - DropIndex("Jobs", new[] { "UserId" }); - DropIndex("Jobs", new[] { "DeviceReturnedTechUserId" }); - DropIndex("Jobs", new[] { "DeviceReadyForReturnTechUserId" }); - DropIndex("Jobs", new[] { "DeviceHeldTechUserId" }); - DropIndex("Jobs", new[] { "ClosedTechUserId" }); - DropIndex("Jobs", new[] { "OpenedTechUserId" }); - DropIndex("Jobs", new[] { "JobTypeId" }); - DropIndex("DeviceUserAssignments", new[] { "DeviceSerialNumber" }); - DropIndex("DeviceUserAssignments", new[] { "AssignedUserId" }); - DropIndex("UserAttachments", new[] { "DocumentTemplateId" }); - DropIndex("UserAttachments", new[] { "TechUserId" }); - DropIndex("UserAttachments", new[] { "UserId" }); - DropIndex("UserDetails", new[] { "UserId" }); - DropIndex("DeviceBatches", new[] { "DefaultDeviceModelId" }); - DropIndex("Devices", new[] { "AssignedUserId" }); - DropIndex("Devices", new[] { "DeviceBatchId" }); - DropIndex("Devices", new[] { "DeviceProfileId" }); - DropIndex("Devices", new[] { "DeviceModelId" }); - DropIndex("DeviceComponents", new[] { "DeviceModelId" }); - DropIndex("JobSubTypes", new[] { "JobTypeId" }); - DropForeignKey("DocumentTemplates_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }, "JobSubTypes"); - DropForeignKey("DocumentTemplates_JobSubTypes", "DocumentTemplate_Id", "DocumentTemplates"); - DropForeignKey("DeviceComponents_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }, "JobSubTypes"); - DropForeignKey("DeviceComponents_JobSubTypes", "DeviceComponent_Id", "DeviceComponents"); - DropForeignKey("Jobs_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }, "JobSubTypes"); - DropForeignKey("Jobs_JobSubTypes", "Job_Id", "Jobs"); - DropForeignKey("WirelessCertificates", "DeviceSerialNumber", "Devices"); - DropForeignKey("DeviceAttachments", "DocumentTemplateId", "DocumentTemplates"); - DropForeignKey("DeviceAttachments", "TechUserId", "Users"); - DropForeignKey("DeviceAttachments", "DeviceSerialNumber", "Devices"); - DropForeignKey("DeviceDetails", "DeviceSerialNumber", "Devices"); - DropForeignKey("JobMetaNonWarranties", "JobId", "Jobs"); - DropForeignKey("JobMetaNonWarranties", "InvoiceReceivedUserId", "Users"); - DropForeignKey("JobMetaNonWarranties", "PurchaseOrderSentUserId", "Users"); - DropForeignKey("JobMetaNonWarranties", "PurchaseOrderRaisedUserId", "Users"); - DropForeignKey("JobMetaNonWarranties", "AccountingChargePaidUserId", "Users"); - DropForeignKey("JobMetaNonWarranties", "AccountingChargeAddedUserId", "Users"); - DropForeignKey("JobMetaWarranties", "JobId", "Jobs"); - DropForeignKey("JobMetaInsurances", "ClaimFormSentUserId", "Users"); - DropForeignKey("JobMetaInsurances", "JobId", "Jobs"); - DropForeignKey("JobLogs", "TechUserId", "Users"); - DropForeignKey("JobLogs", "JobId", "Jobs"); - DropForeignKey("JobComponents", "TechUserId", "Users"); - DropForeignKey("JobComponents", "JobId", "Jobs"); - DropForeignKey("JobAttachments", "DocumentTemplateId", "DocumentTemplates"); - DropForeignKey("JobAttachments", "TechUserId", "Users"); - DropForeignKey("JobAttachments", "JobId", "Jobs"); - DropForeignKey("Jobs", "DeviceSerialNumber", "Devices"); - DropForeignKey("Jobs", "UserId", "Users"); - DropForeignKey("Jobs", "DeviceReturnedTechUserId", "Users"); - DropForeignKey("Jobs", "DeviceReadyForReturnTechUserId", "Users"); - DropForeignKey("Jobs", "DeviceHeldTechUserId", "Users"); - DropForeignKey("Jobs", "ClosedTechUserId", "Users"); - DropForeignKey("Jobs", "OpenedTechUserId", "Users"); - DropForeignKey("Jobs", "JobTypeId", "JobTypes"); - DropForeignKey("DeviceUserAssignments", "DeviceSerialNumber", "Devices"); - DropForeignKey("DeviceUserAssignments", "AssignedUserId", "Users"); - DropForeignKey("UserAttachments", "DocumentTemplateId", "DocumentTemplates"); - DropForeignKey("UserAttachments", "TechUserId", "Users"); - DropForeignKey("UserAttachments", "UserId", "Users"); - DropForeignKey("UserDetails", "UserId", "Users"); - DropForeignKey("DeviceBatches", "DefaultDeviceModelId", "DeviceModels"); - DropForeignKey("Devices", "AssignedUserId", "Users"); - DropForeignKey("Devices", "DeviceBatchId", "DeviceBatches"); - DropForeignKey("Devices", "DeviceProfileId", "DeviceProfiles"); - DropForeignKey("Devices", "DeviceModelId", "DeviceModels"); - DropForeignKey("DeviceComponents", "DeviceModelId", "DeviceModels"); - DropForeignKey("JobSubTypes", "JobTypeId", "JobTypes"); - DropTable("DocumentTemplates_JobSubTypes"); - DropTable("DeviceComponents_JobSubTypes"); - DropTable("Jobs_JobSubTypes"); - DropTable("WirelessCertificates"); - DropTable("DeviceAttachments"); - DropTable("DeviceDetails"); - DropTable("JobMetaNonWarranties"); - DropTable("JobMetaWarranties"); - DropTable("JobMetaInsurances"); - DropTable("JobLogs"); - DropTable("JobComponents"); - DropTable("JobAttachments"); - DropTable("JobTypes"); - DropTable("Jobs"); - DropTable("DeviceUserAssignments"); - DropTable("UserAttachments"); - DropTable("UserDetails"); - DropTable("Users"); - DropTable("DeviceBatches"); - DropTable("DeviceProfiles"); - DropTable("Devices"); - DropTable("DeviceModels"); - DropTable("DeviceComponents"); - DropTable("JobSubTypes"); - DropTable("DocumentTemplates"); - DropTable("Configuration"); - } - } -} +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + + public partial class DBv0 : DbMigration + { + public override void Up() + { + CreateTable( + "Configuration", + c => new + { + Scope = c.String(nullable: false, maxLength: 80), + Key = c.String(nullable: false, maxLength: 80), + Value = c.String(), + }) + .PrimaryKey(t => new { t.Scope, t.Key }); + + CreateTable( + "DocumentTemplates", + c => new + { + Id = c.String(nullable: false, maxLength: 30), + Description = c.String(nullable: false, maxLength: 250), + Scope = c.String(nullable: false, maxLength: 6), + FilterExpression = c.String(maxLength: 250), + }) + .PrimaryKey(t => t.Id); + + CreateTable( + "JobSubTypes", + c => new + { + Id = c.String(nullable: false, maxLength: 20), + JobTypeId = c.String(nullable: false, maxLength: 5), + Description = c.String(nullable: false, maxLength: 100), + }) + .PrimaryKey(t => new { t.Id, t.JobTypeId }) + .ForeignKey("JobTypes", t => t.JobTypeId) + .Index(t => t.JobTypeId); + + CreateTable( + "DeviceComponents", + c => new + { + Id = c.Int(nullable: false, identity: true), + DeviceModelId = c.Int(), + Description = c.String(maxLength: 100), + Cost = c.Decimal(nullable: false, precision: 18, scale: 2), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("DeviceModels", t => t.DeviceModelId) + .Index(t => t.DeviceModelId); + + CreateTable( + "DeviceModels", + c => new + { + Id = c.Int(nullable: false, identity: true), + Description = c.String(maxLength: 500), + Manufacturer = c.String(maxLength: 200), + Model = c.String(maxLength: 200), + ModelType = c.String(maxLength: 40), + Image = c.Binary(), + DefaultPurchaseDate = c.DateTime(), + DeviceCost = c.Decimal(precision: 18, scale: 2), + DefaultWarrantyProvider = c.String(maxLength: 40), + }) + .PrimaryKey(t => t.Id); + + CreateTable( + "Devices", + c => new + { + SerialNumber = c.String(nullable: false, maxLength: 40), + AssetNumber = c.String(maxLength: 40), + Location = c.String(maxLength: 250), + DeviceModelId = c.Int(), + DeviceProfileId = c.Int(nullable: false), + DeviceBatchId = c.Int(), + ComputerName = c.String(maxLength: 24), + AssignedUserId = c.String(maxLength: 50), + LastNetworkLogonDate = c.DateTime(), + CertificateStoreReference = c.String(maxLength: 24), + AllowUnauthenticatedEnrol = c.Boolean(nullable: false), + Active = c.Boolean(nullable: false), + CreatedDate = c.DateTime(nullable: false), + EnrolledDate = c.DateTime(), + LastEnrolDate = c.DateTime(), + DecommissionedDate = c.DateTime(), + }) + .PrimaryKey(t => t.SerialNumber) + .ForeignKey("DeviceModels", t => t.DeviceModelId) + .ForeignKey("DeviceProfiles", t => t.DeviceProfileId) + .ForeignKey("DeviceBatches", t => t.DeviceBatchId) + .ForeignKey("Users", t => t.AssignedUserId) + .Index(t => t.DeviceModelId) + .Index(t => t.DeviceProfileId) + .Index(t => t.DeviceBatchId) + .Index(t => t.AssignedUserId); + + CreateTable( + "DeviceProfiles", + c => new + { + Id = c.Int(nullable: false, identity: true), + Name = c.String(nullable: false, maxLength: 100), + ShortName = c.String(nullable: false, maxLength: 10), + Description = c.String(maxLength: 500), + DefaultOrganisationAddress = c.Int(), + }) + .PrimaryKey(t => t.Id); + + CreateTable( + "DeviceBatches", + c => new + { + Id = c.Int(nullable: false, identity: true), + Name = c.String(maxLength: 500), + PurchaseDate = c.DateTime(nullable: false), + Supplier = c.String(maxLength: 200), + PurchaseDetails = c.String(maxLength: 500), + UnitCost = c.Decimal(precision: 18, scale: 2), + UnitQuantity = c.Int(), + DefaultDeviceModelId = c.Int(), + WarrantyValidUntil = c.DateTime(), + WarrantyDetails = c.String(), + InsuredDate = c.DateTime(), + InsuranceSupplier = c.String(maxLength: 200), + InsuredUntil = c.DateTime(), + InsuranceDetails = c.String(), + Comments = c.String(), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("DeviceModels", t => t.DefaultDeviceModelId) + .Index(t => t.DefaultDeviceModelId); + + CreateTable( + "Users", + c => new + { + Id = c.String(nullable: false, maxLength: 50), + DisplayName = c.String(maxLength: 200), + Surname = c.String(maxLength: 200), + GivenName = c.String(maxLength: 200), + Type = c.String(maxLength: 8), + PhoneNumber = c.String(maxLength: 100), + EmailAddress = c.String(maxLength: 150), + }) + .PrimaryKey(t => t.Id); + + CreateTable( + "UserDetails", + c => new + { + UserId = c.String(nullable: false, maxLength: 50), + Scope = c.String(nullable: false, maxLength: 100), + Key = c.String(nullable: false, maxLength: 100), + Value = c.String(), + }) + .PrimaryKey(t => new { t.UserId, t.Scope, t.Key }) + .ForeignKey("Users", t => t.UserId) + .Index(t => t.UserId); + + CreateTable( + "UserAttachments", + c => new + { + Id = c.Int(nullable: false, identity: true), + UserId = c.String(maxLength: 50), + TechUserId = c.String(nullable: false, maxLength: 50), + Filename = c.String(nullable: false, maxLength: 500), + MimeType = c.String(nullable: false, maxLength: 500), + Timestamp = c.DateTime(nullable: false), + Comments = c.String(nullable: false, maxLength: 500), + DocumentTemplateId = c.String(maxLength: 30), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("Users", t => t.UserId) + .ForeignKey("Users", t => t.TechUserId) + .ForeignKey("DocumentTemplates", t => t.DocumentTemplateId) + .Index(t => t.UserId) + .Index(t => t.TechUserId) + .Index(t => t.DocumentTemplateId); + + CreateTable( + "DeviceUserAssignments", + c => new + { + DeviceSerialNumber = c.String(nullable: false, maxLength: 40), + AssignedDate = c.DateTime(nullable: false), + AssignedUserId = c.String(maxLength: 50), + UnassignedDate = c.DateTime(), + }) + .PrimaryKey(t => new { t.DeviceSerialNumber, t.AssignedDate }) + .ForeignKey("Users", t => t.AssignedUserId) + .ForeignKey("Devices", t => t.DeviceSerialNumber) + .Index(t => t.AssignedUserId) + .Index(t => t.DeviceSerialNumber); + + CreateTable( + "Jobs", + c => new + { + Id = c.Int(nullable: false, identity: true), + JobTypeId = c.String(nullable: false, maxLength: 5), + DeviceSerialNumber = c.String(maxLength: 40), + UserId = c.String(maxLength: 50), + OpenedTechUserId = c.String(nullable: false, maxLength: 50), + OpenedDate = c.DateTime(nullable: false), + ExpectedClosedDate = c.DateTime(), + ClosedTechUserId = c.String(maxLength: 50), + ClosedDate = c.DateTime(), + DeviceHeld = c.DateTime(), + DeviceHeldTechUserId = c.String(maxLength: 50), + DeviceHeldLocation = c.String(maxLength: 100), + DeviceReadyForReturn = c.DateTime(), + DeviceReadyForReturnTechUserId = c.String(maxLength: 50), + DeviceReturnedDate = c.DateTime(), + DeviceReturnedTechUserId = c.String(maxLength: 50), + WaitingForUserAction = c.DateTime(), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("JobTypes", t => t.JobTypeId) + .ForeignKey("Users", t => t.OpenedTechUserId) + .ForeignKey("Users", t => t.ClosedTechUserId) + .ForeignKey("Users", t => t.DeviceHeldTechUserId) + .ForeignKey("Users", t => t.DeviceReadyForReturnTechUserId) + .ForeignKey("Users", t => t.DeviceReturnedTechUserId) + .ForeignKey("Users", t => t.UserId) + .ForeignKey("Devices", t => t.DeviceSerialNumber) + .Index(t => t.JobTypeId) + .Index(t => t.OpenedTechUserId) + .Index(t => t.ClosedTechUserId) + .Index(t => t.DeviceHeldTechUserId) + .Index(t => t.DeviceReadyForReturnTechUserId) + .Index(t => t.DeviceReturnedTechUserId) + .Index(t => t.UserId) + .Index(t => t.DeviceSerialNumber); + + CreateTable( + "JobTypes", + c => new + { + Id = c.String(nullable: false, maxLength: 5), + Description = c.String(maxLength: 100), + }) + .PrimaryKey(t => t.Id); + + CreateTable( + "JobAttachments", + c => new + { + Id = c.Int(nullable: false, identity: true), + JobId = c.Int(nullable: false), + TechUserId = c.String(nullable: false, maxLength: 50), + Filename = c.String(nullable: false, maxLength: 500), + MimeType = c.String(nullable: false, maxLength: 500), + Timestamp = c.DateTime(nullable: false), + Comments = c.String(nullable: false, maxLength: 500), + DocumentTemplateId = c.String(maxLength: 30), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("Jobs", t => t.JobId) + .ForeignKey("Users", t => t.TechUserId) + .ForeignKey("DocumentTemplates", t => t.DocumentTemplateId) + .Index(t => t.JobId) + .Index(t => t.TechUserId) + .Index(t => t.DocumentTemplateId); + + CreateTable( + "JobComponents", + c => new + { + Id = c.Int(nullable: false, identity: true), + JobId = c.Int(nullable: false), + TechUserId = c.String(nullable: false, maxLength: 50), + Description = c.String(maxLength: 500), + Cost = c.Decimal(nullable: false, precision: 18, scale: 2), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("Jobs", t => t.JobId) + .ForeignKey("Users", t => t.TechUserId) + .Index(t => t.JobId) + .Index(t => t.TechUserId); + + CreateTable( + "JobLogs", + c => new + { + Id = c.Int(nullable: false, identity: true), + JobId = c.Int(nullable: false), + TechUserId = c.String(nullable: false, maxLength: 50), + Timestamp = c.DateTime(nullable: false), + Comments = c.String(nullable: false), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("Jobs", t => t.JobId) + .ForeignKey("Users", t => t.TechUserId) + .Index(t => t.JobId) + .Index(t => t.TechUserId); + + CreateTable( + "JobMetaInsurances", + c => new + { + JobId = c.Int(nullable: false), + LossOrDamageDate = c.DateTime(), + EventLocation = c.String(maxLength: 200), + Description = c.String(), + ThirdPartyCaused = c.Boolean(nullable: false), + ThirdPartyCausedName = c.String(maxLength: 200), + ThirdPartyCausedWhy = c.String(maxLength: 600), + WitnessesNamesAddresses = c.String(maxLength: 1200), + BurglaryTheftMethodOfEntry = c.String(maxLength: 200), + PropertyLastSeenDate = c.DateTime(), + PoliceNotified = c.Boolean(nullable: false), + PoliceNotifiedStation = c.String(maxLength: 200), + PoliceNotifiedDate = c.DateTime(), + PoliceNotifiedCrimeReportNo = c.String(maxLength: 400), + RecoverReduceAction = c.String(maxLength: 800), + OtherInterestedParties = c.String(maxLength: 500), + DateOfPurchase = c.DateTime(), + ClaimFormSentDate = c.DateTime(), + ClaimFormSentUserId = c.String(maxLength: 50), + }) + .PrimaryKey(t => t.JobId) + .ForeignKey("Jobs", t => t.JobId) + .ForeignKey("Users", t => t.ClaimFormSentUserId) + .Index(t => t.JobId) + .Index(t => t.ClaimFormSentUserId); + + CreateTable( + "JobMetaWarranties", + c => new + { + JobId = c.Int(nullable: false), + ExternalName = c.String(maxLength: 100), + ExternalLoggedDate = c.DateTime(), + ExternalReference = c.String(maxLength: 100), + ExternalCompletedDate = c.DateTime(), + }) + .PrimaryKey(t => t.JobId) + .ForeignKey("Jobs", t => t.JobId) + .Index(t => t.JobId); + + CreateTable( + "JobMetaNonWarranties", + c => new + { + JobId = c.Int(nullable: false), + IsInsuranceClaim = c.Boolean(nullable: false), + AccountingChargeAddedDate = c.DateTime(), + AccountingChargeAddedUserId = c.String(maxLength: 50), + AccountingChargePaidDate = c.DateTime(), + AccountingChargePaidUserId = c.String(maxLength: 50), + PurchaseOrderRaisedDate = c.DateTime(), + PurchaseOrderRaisedUserId = c.String(maxLength: 50), + PurchaseOrderReference = c.String(maxLength: 20), + PurchaseOrderSentDate = c.DateTime(), + PurchaseOrderSentUserId = c.String(maxLength: 50), + InvoiceReceivedDate = c.DateTime(), + InvoiceReceivedUserId = c.String(maxLength: 50), + RepairerName = c.String(maxLength: 100), + RepairerLoggedDate = c.DateTime(), + RepairerReference = c.String(maxLength: 100), + RepairerCompletedDate = c.DateTime(), + }) + .PrimaryKey(t => t.JobId) + .ForeignKey("Users", t => t.AccountingChargeAddedUserId) + .ForeignKey("Users", t => t.AccountingChargePaidUserId) + .ForeignKey("Users", t => t.PurchaseOrderRaisedUserId) + .ForeignKey("Users", t => t.PurchaseOrderSentUserId) + .ForeignKey("Users", t => t.InvoiceReceivedUserId) + .ForeignKey("Jobs", t => t.JobId) + .Index(t => t.AccountingChargeAddedUserId) + .Index(t => t.AccountingChargePaidUserId) + .Index(t => t.PurchaseOrderRaisedUserId) + .Index(t => t.PurchaseOrderSentUserId) + .Index(t => t.InvoiceReceivedUserId) + .Index(t => t.JobId); + + CreateTable( + "DeviceDetails", + c => new + { + DeviceSerialNumber = c.String(nullable: false, maxLength: 40), + Scope = c.String(nullable: false, maxLength: 100), + Key = c.String(nullable: false, maxLength: 100), + Value = c.String(), + }) + .PrimaryKey(t => new { t.DeviceSerialNumber, t.Scope, t.Key }) + .ForeignKey("Devices", t => t.DeviceSerialNumber) + .Index(t => t.DeviceSerialNumber); + + CreateTable( + "DeviceAttachments", + c => new + { + Id = c.Int(nullable: false, identity: true), + DeviceSerialNumber = c.String(maxLength: 40), + TechUserId = c.String(nullable: false, maxLength: 50), + Filename = c.String(nullable: false, maxLength: 500), + MimeType = c.String(nullable: false, maxLength: 500), + Timestamp = c.DateTime(nullable: false), + Comments = c.String(nullable: false, maxLength: 500), + DocumentTemplateId = c.String(maxLength: 30), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("Devices", t => t.DeviceSerialNumber) + .ForeignKey("Users", t => t.TechUserId) + .ForeignKey("DocumentTemplates", t => t.DocumentTemplateId) + .Index(t => t.DeviceSerialNumber) + .Index(t => t.TechUserId) + .Index(t => t.DocumentTemplateId); + + CreateTable( + "WirelessCertificates", + c => new + { + Id = c.Int(nullable: false, identity: true), + Index = c.Int(nullable: false), + Name = c.String(maxLength: 28), + Content = c.Binary(), + Enabled = c.Boolean(nullable: false), + ExpirationDate = c.DateTime(), + AllocatedDate = c.DateTime(), + DeviceSerialNumber = c.String(maxLength: 40), + }) + .PrimaryKey(t => t.Id) + .ForeignKey("Devices", t => t.DeviceSerialNumber) + .Index(t => t.DeviceSerialNumber); + + CreateTable( + "Jobs_JobSubTypes", + c => new + { + Job_Id = c.Int(nullable: false), + JobSubType_Id = c.String(nullable: false, maxLength: 20), + JobSubType_JobTypeId = c.String(nullable: false, maxLength: 5), + }) + .PrimaryKey(t => new { t.Job_Id, t.JobSubType_Id, t.JobSubType_JobTypeId }) + .ForeignKey("Jobs", t => t.Job_Id, cascadeDelete: true) + .ForeignKey("JobSubTypes", t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }, cascadeDelete: true) + .Index(t => t.Job_Id) + .Index(t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }); + + CreateTable( + "DeviceComponents_JobSubTypes", + c => new + { + DeviceComponent_Id = c.Int(nullable: false), + JobSubType_Id = c.String(nullable: false, maxLength: 20), + JobSubType_JobTypeId = c.String(nullable: false, maxLength: 5), + }) + .PrimaryKey(t => new { t.DeviceComponent_Id, t.JobSubType_Id, t.JobSubType_JobTypeId }) + .ForeignKey("DeviceComponents", t => t.DeviceComponent_Id, cascadeDelete: true) + .ForeignKey("JobSubTypes", t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }, cascadeDelete: true) + .Index(t => t.DeviceComponent_Id) + .Index(t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }); + + CreateTable( + "DocumentTemplates_JobSubTypes", + c => new + { + DocumentTemplate_Id = c.String(nullable: false, maxLength: 30), + JobSubType_Id = c.String(nullable: false, maxLength: 20), + JobSubType_JobTypeId = c.String(nullable: false, maxLength: 5), + }) + .PrimaryKey(t => new { t.DocumentTemplate_Id, t.JobSubType_Id, t.JobSubType_JobTypeId }) + .ForeignKey("DocumentTemplates", t => t.DocumentTemplate_Id, cascadeDelete: true) + .ForeignKey("JobSubTypes", t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }, cascadeDelete: true) + .Index(t => t.DocumentTemplate_Id) + .Index(t => new { t.JobSubType_Id, t.JobSubType_JobTypeId }); + + } + + public override void Down() + { + DropIndex("DocumentTemplates_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }); + DropIndex("DocumentTemplates_JobSubTypes", new[] { "DocumentTemplate_Id" }); + DropIndex("DeviceComponents_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }); + DropIndex("DeviceComponents_JobSubTypes", new[] { "DeviceComponent_Id" }); + DropIndex("Jobs_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }); + DropIndex("Jobs_JobSubTypes", new[] { "Job_Id" }); + DropIndex("WirelessCertificates", new[] { "DeviceSerialNumber" }); + DropIndex("DeviceAttachments", new[] { "DocumentTemplateId" }); + DropIndex("DeviceAttachments", new[] { "TechUserId" }); + DropIndex("DeviceAttachments", new[] { "DeviceSerialNumber" }); + DropIndex("DeviceDetails", new[] { "DeviceSerialNumber" }); + DropIndex("JobMetaNonWarranties", new[] { "JobId" }); + DropIndex("JobMetaNonWarranties", new[] { "InvoiceReceivedUserId" }); + DropIndex("JobMetaNonWarranties", new[] { "PurchaseOrderSentUserId" }); + DropIndex("JobMetaNonWarranties", new[] { "PurchaseOrderRaisedUserId" }); + DropIndex("JobMetaNonWarranties", new[] { "AccountingChargePaidUserId" }); + DropIndex("JobMetaNonWarranties", new[] { "AccountingChargeAddedUserId" }); + DropIndex("JobMetaWarranties", new[] { "JobId" }); + DropIndex("JobMetaInsurances", new[] { "ClaimFormSentUserId" }); + DropIndex("JobMetaInsurances", new[] { "JobId" }); + DropIndex("JobLogs", new[] { "TechUserId" }); + DropIndex("JobLogs", new[] { "JobId" }); + DropIndex("JobComponents", new[] { "TechUserId" }); + DropIndex("JobComponents", new[] { "JobId" }); + DropIndex("JobAttachments", new[] { "DocumentTemplateId" }); + DropIndex("JobAttachments", new[] { "TechUserId" }); + DropIndex("JobAttachments", new[] { "JobId" }); + DropIndex("Jobs", new[] { "DeviceSerialNumber" }); + DropIndex("Jobs", new[] { "UserId" }); + DropIndex("Jobs", new[] { "DeviceReturnedTechUserId" }); + DropIndex("Jobs", new[] { "DeviceReadyForReturnTechUserId" }); + DropIndex("Jobs", new[] { "DeviceHeldTechUserId" }); + DropIndex("Jobs", new[] { "ClosedTechUserId" }); + DropIndex("Jobs", new[] { "OpenedTechUserId" }); + DropIndex("Jobs", new[] { "JobTypeId" }); + DropIndex("DeviceUserAssignments", new[] { "DeviceSerialNumber" }); + DropIndex("DeviceUserAssignments", new[] { "AssignedUserId" }); + DropIndex("UserAttachments", new[] { "DocumentTemplateId" }); + DropIndex("UserAttachments", new[] { "TechUserId" }); + DropIndex("UserAttachments", new[] { "UserId" }); + DropIndex("UserDetails", new[] { "UserId" }); + DropIndex("DeviceBatches", new[] { "DefaultDeviceModelId" }); + DropIndex("Devices", new[] { "AssignedUserId" }); + DropIndex("Devices", new[] { "DeviceBatchId" }); + DropIndex("Devices", new[] { "DeviceProfileId" }); + DropIndex("Devices", new[] { "DeviceModelId" }); + DropIndex("DeviceComponents", new[] { "DeviceModelId" }); + DropIndex("JobSubTypes", new[] { "JobTypeId" }); + DropForeignKey("DocumentTemplates_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }, "JobSubTypes"); + DropForeignKey("DocumentTemplates_JobSubTypes", "DocumentTemplate_Id", "DocumentTemplates"); + DropForeignKey("DeviceComponents_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }, "JobSubTypes"); + DropForeignKey("DeviceComponents_JobSubTypes", "DeviceComponent_Id", "DeviceComponents"); + DropForeignKey("Jobs_JobSubTypes", new[] { "JobSubType_Id", "JobSubType_JobTypeId" }, "JobSubTypes"); + DropForeignKey("Jobs_JobSubTypes", "Job_Id", "Jobs"); + DropForeignKey("WirelessCertificates", "DeviceSerialNumber", "Devices"); + DropForeignKey("DeviceAttachments", "DocumentTemplateId", "DocumentTemplates"); + DropForeignKey("DeviceAttachments", "TechUserId", "Users"); + DropForeignKey("DeviceAttachments", "DeviceSerialNumber", "Devices"); + DropForeignKey("DeviceDetails", "DeviceSerialNumber", "Devices"); + DropForeignKey("JobMetaNonWarranties", "JobId", "Jobs"); + DropForeignKey("JobMetaNonWarranties", "InvoiceReceivedUserId", "Users"); + DropForeignKey("JobMetaNonWarranties", "PurchaseOrderSentUserId", "Users"); + DropForeignKey("JobMetaNonWarranties", "PurchaseOrderRaisedUserId", "Users"); + DropForeignKey("JobMetaNonWarranties", "AccountingChargePaidUserId", "Users"); + DropForeignKey("JobMetaNonWarranties", "AccountingChargeAddedUserId", "Users"); + DropForeignKey("JobMetaWarranties", "JobId", "Jobs"); + DropForeignKey("JobMetaInsurances", "ClaimFormSentUserId", "Users"); + DropForeignKey("JobMetaInsurances", "JobId", "Jobs"); + DropForeignKey("JobLogs", "TechUserId", "Users"); + DropForeignKey("JobLogs", "JobId", "Jobs"); + DropForeignKey("JobComponents", "TechUserId", "Users"); + DropForeignKey("JobComponents", "JobId", "Jobs"); + DropForeignKey("JobAttachments", "DocumentTemplateId", "DocumentTemplates"); + DropForeignKey("JobAttachments", "TechUserId", "Users"); + DropForeignKey("JobAttachments", "JobId", "Jobs"); + DropForeignKey("Jobs", "DeviceSerialNumber", "Devices"); + DropForeignKey("Jobs", "UserId", "Users"); + DropForeignKey("Jobs", "DeviceReturnedTechUserId", "Users"); + DropForeignKey("Jobs", "DeviceReadyForReturnTechUserId", "Users"); + DropForeignKey("Jobs", "DeviceHeldTechUserId", "Users"); + DropForeignKey("Jobs", "ClosedTechUserId", "Users"); + DropForeignKey("Jobs", "OpenedTechUserId", "Users"); + DropForeignKey("Jobs", "JobTypeId", "JobTypes"); + DropForeignKey("DeviceUserAssignments", "DeviceSerialNumber", "Devices"); + DropForeignKey("DeviceUserAssignments", "AssignedUserId", "Users"); + DropForeignKey("UserAttachments", "DocumentTemplateId", "DocumentTemplates"); + DropForeignKey("UserAttachments", "TechUserId", "Users"); + DropForeignKey("UserAttachments", "UserId", "Users"); + DropForeignKey("UserDetails", "UserId", "Users"); + DropForeignKey("DeviceBatches", "DefaultDeviceModelId", "DeviceModels"); + DropForeignKey("Devices", "AssignedUserId", "Users"); + DropForeignKey("Devices", "DeviceBatchId", "DeviceBatches"); + DropForeignKey("Devices", "DeviceProfileId", "DeviceProfiles"); + DropForeignKey("Devices", "DeviceModelId", "DeviceModels"); + DropForeignKey("DeviceComponents", "DeviceModelId", "DeviceModels"); + DropForeignKey("JobSubTypes", "JobTypeId", "JobTypes"); + DropTable("DocumentTemplates_JobSubTypes"); + DropTable("DeviceComponents_JobSubTypes"); + DropTable("Jobs_JobSubTypes"); + DropTable("WirelessCertificates"); + DropTable("DeviceAttachments"); + DropTable("DeviceDetails"); + DropTable("JobMetaNonWarranties"); + DropTable("JobMetaWarranties"); + DropTable("JobMetaInsurances"); + DropTable("JobLogs"); + DropTable("JobComponents"); + DropTable("JobAttachments"); + DropTable("JobTypes"); + DropTable("Jobs"); + DropTable("DeviceUserAssignments"); + DropTable("UserAttachments"); + DropTable("UserDetails"); + DropTable("Users"); + DropTable("DeviceBatches"); + DropTable("DeviceProfiles"); + DropTable("Devices"); + DropTable("DeviceModels"); + DropTable("DeviceComponents"); + DropTable("JobSubTypes"); + DropTable("DocumentTemplates"); + DropTable("Configuration"); + } + } +} diff --git a/Disco.Data/Migrations/201205100307196_DBv1.Designer.cs b/Disco.Data/Migrations/201205100307196_DBv1.Designer.cs index cf7f06df..5bf5f62b 100644 --- a/Disco.Data/Migrations/201205100307196_DBv1.Designer.cs +++ b/Disco.Data/Migrations/201205100307196_DBv1.Designer.cs @@ -1,24 +1,24 @@ -// -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - - public sealed partial class DBv1 : IMigrationMetadata - { - string IMigrationMetadata.Id - { - get { return "201205100307196_DBv1"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsL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tGe4Wr/1QrFSn8RAFNzT72SXhBra7xWs/a3z3QyTb47sC8aRakm+9zGv73eO7r6fzfJHpB/RnW9XZRf5FNcvLhj99fPfVmt5e5PLX07wpLhyIxwRzmU/RpwNq2pwtz6uXdbUis3zdwcg0MV/rRCLwmWVtdgxDnk1b+npKhp2yPx+lP5mVa2pyupjks7Pll+t2tW5pyPliUgYR0uO7m/t/fLeH8+MvV/ir+SaGQGgWNIT8y+WTdVHOLN7PsrLpTNoQiBOi/uc5fS5z2dLP/OLaQqLI8JaAlHxP81W+nHlc1Hy5fJ1d5sO43UzDkGKPnxbZRZ0tfArKJ4rJ64x69rqgDvw3XH/0J7HrbPHu6P8JAAD//5Th5J7gkgIA"; } - } - } -} +// +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + + public sealed partial class DBv1 : IMigrationMetadata + { + string IMigrationMetadata.Id + { + get { return "201205100307196_DBv1"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsLxv9nL55zVDTF9kib1bZNP/so6dFM63GT7M2G7/KV1VTtFV9/VF6XBYZIfM6L8/fE7Odh8DsI9sn9XpK2LXXb65XOff82UeE4Hlxsa6zloZ/1uZBc3rh98qvgw/oo5d1tcrr9vpVfq5AXk/pk4/Suze3JHDddo/vdvuw74XggTX90dY0gx+lz4p3+ex5vrxo5599dJ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W5pyPliUgYR0uO7m/t/fLeH8+MvV/ir+SaGQGgWNIT8y+WTdVHOLN7PsrLpTNoQiBOi/uc5fS5z2dLP/OLaQqLI8JaAlHxP81W+nHlc1Hy5fJ1d5sO43UzDkGKPnxbZRZ0tfArKJ4rJ64x69rqgDvw3XH/0J7HrbPHu6P8JAAD//5Th5J7gkgIA"; } + } + } +} diff --git a/Disco.Data/Migrations/201205100307196_DBv1.cs b/Disco.Data/Migrations/201205100307196_DBv1.cs index d25c4a23..325505bb 100644 --- a/Disco.Data/Migrations/201205100307196_DBv1.cs +++ b/Disco.Data/Migrations/201205100307196_DBv1.cs @@ -1,25 +1,25 @@ -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - - public partial class DBv1 : DbMigration - { - public override void Up() - { - AddColumn("DocumentTemplates", "FlattenForm", c => c.Boolean(nullable: false, defaultValue: false)); - AddColumn("JobMetaNonWarranties", "AccountingChargeRequiredDate", c => c.DateTime()); - AddColumn("JobMetaNonWarranties", "AccountingChargeRequiredUserId", c => c.String(maxLength: 50)); - AddForeignKey("JobMetaNonWarranties", "AccountingChargeRequiredUserId", "Users", "Id"); - CreateIndex("JobMetaNonWarranties", "AccountingChargeRequiredUserId"); - } - - public override void Down() - { - DropIndex("JobMetaNonWarranties", new[] { "AccountingChargeRequiredUserId" }); - DropForeignKey("JobMetaNonWarranties", "AccountingChargeRequiredUserId", "Users"); - DropColumn("JobMetaNonWarranties", "AccountingChargeRequiredUserId"); - DropColumn("JobMetaNonWarranties", "AccountingChargeRequiredDate"); - DropColumn("DocumentTemplates", "FlattenForm"); - } - } -} +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + + public partial class DBv1 : DbMigration + { + public override void Up() + { + AddColumn("DocumentTemplates", "FlattenForm", c => c.Boolean(nullable: false, defaultValue: false)); + AddColumn("JobMetaNonWarranties", "AccountingChargeRequiredDate", c => c.DateTime()); + AddColumn("JobMetaNonWarranties", "AccountingChargeRequiredUserId", c => c.String(maxLength: 50)); + AddForeignKey("JobMetaNonWarranties", "AccountingChargeRequiredUserId", "Users", "Id"); + CreateIndex("JobMetaNonWarranties", "AccountingChargeRequiredUserId"); + } + + public override void Down() + { + DropIndex("JobMetaNonWarranties", new[] { "AccountingChargeRequiredUserId" }); + DropForeignKey("JobMetaNonWarranties", "AccountingChargeRequiredUserId", "Users"); + DropColumn("JobMetaNonWarranties", "AccountingChargeRequiredUserId"); + DropColumn("JobMetaNonWarranties", "AccountingChargeRequiredDate"); + DropColumn("DocumentTemplates", "FlattenForm"); + } + } +} diff --git a/Disco.Data/Migrations/201205290205162_DBv2.Designer.cs b/Disco.Data/Migrations/201205290205162_DBv2.Designer.cs index d56876d9..b0b8b709 100644 --- a/Disco.Data/Migrations/201205290205162_DBv2.Designer.cs +++ b/Disco.Data/Migrations/201205290205162_DBv2.Designer.cs @@ -1,24 +1,24 @@ -// -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - - public sealed partial class DBv2 : IMigrationMetadata - { - string IMigrationMetadata.Id - { - get { return "201205290205162_DBv2"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsLxv9nL55zVDTF9kib1bZNP/so6dFM63GT7M2G7/KV1VTtFV9/VF6XBYZIfM6L8/fE7Odh8DsI9sn9XpK2LXXb65XOff82UeE4Hlxsa6zloZ/1uZBc3rh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IJ9WSfOtlXtvvHt99PZ3ni0w/oD/bqs4u8i+qWV42/Onju6/W9PYil7+e5k1x4UA8JpjLfIo+HVDT5mx5Xr2sqxWZ5esORqaJ+VonEoHPLGuzYxjybNrS11My7JT9+Sj9yaxcU5PTxSSfnS2/XLerdUtDzheTMoiQHt/d3P/juz2cH3+5wl/NNzEEQrOgIeRfLp+si3Jm8X6WlU1n0oZAnBD1P8/pc5nLln7mF9cWEkWGtwSk5Huar/LlzOOi5svl6+wyH8btZhqGFHv8tMgu6mzhU1A+UUxeZ9Sz1wV14L/h+qM/iV1ni3dH/08AAAD//zlaiXqpkwIA"; } - } - } -} +// +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + + public sealed partial class DBv2 : IMigrationMetadata + { + string IMigrationMetadata.Id + { + get { return "201205290205162_DBv2"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsLxv9nL55zVDTF9kib1bZNP/so6dFM63GT7M2G7/KV1VTtFV9/VF6XBYZIfM6L8/fE7Odh8DsI9sn9XpK2LXXb65XOff82UeE4Hlxsa6zloZ/1uZBc3rh98qvgw/oo5d1tcrr9vpVfq5AXk/pk4/Suze3JHDddo/vdvuw74XggTX90dY0gx+lz4p3+ex5vrxo5599dJ6VDbX4IntnPjmgafxqWdB80zttvaZvX6zLMpuUuW3ewaPTK6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9+Sj9yaxcU5PTxSSfnS2/XLerdUtDzheTMoiQHt/d3P/juz2cH3+5wl/NNzEEQrOgIeRfLp+si3Jm8X6WlU1n0oZAnBD1P8/pc5nLln7mF9cWEkWGtwSk5Huar/LlzOOi5svl6+wyH8btZhqGFHv8tMgu6mzhU1A+UUxeZ9Sz1wV14L/h+qM/iV1ni3dH/08AAAD//zlaiXqpkwIA"; } + } + } +} diff --git a/Disco.Data/Migrations/201205290205162_DBv2.cs b/Disco.Data/Migrations/201205290205162_DBv2.cs index eda6b55c..22ef62c9 100644 --- a/Disco.Data/Migrations/201205290205162_DBv2.cs +++ b/Disco.Data/Migrations/201205290205162_DBv2.cs @@ -1,17 +1,17 @@ -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - - public partial class DBv2 : DbMigration - { - public override void Up() - { - AddColumn("Jobs", "Flags", c => c.Long()); - } - - public override void Down() - { - DropColumn("Jobs", "Flags"); - } - } -} +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + + public partial class DBv2 : DbMigration + { + public override void Up() + { + AddColumn("Jobs", "Flags", c => c.Long()); + } + + public override void Down() + { + DropColumn("Jobs", "Flags"); + } + } +} diff --git a/Disco.Data/Migrations/201206140712161_DBv3.Designer.cs b/Disco.Data/Migrations/201206140712161_DBv3.Designer.cs index 48691b6a..f099b349 100644 --- a/Disco.Data/Migrations/201206140712161_DBv3.Designer.cs +++ b/Disco.Data/Migrations/201206140712161_DBv3.Designer.cs @@ -1,24 +1,24 @@ -// -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - - public sealed partial class DBv3 : IMigrationMetadata - { - string IMigrationMetadata.Id - { - get { return "201206140712161_DBv3"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAz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g9ryLTeumFOzbff6Gx668LmFf7omxnOxU1zhzH9bM3az+bQgoXqDXPWb/eNzl504d283Pnymx/2SZkVC3JlF69JAjZM8k1vfcPz/nNBFLPCfwMrBM2+cU4w0GNjdt99U0N+US3tcI6n02pNfS4vTuZZfUE+/y9a0zr7YJ7qfUH8LHCI13eMXsHXPwySHc9mH0Qv9/7PA2K9zIoPoZV9/f+HpHq5rqfzrMm/rGd5/SormvfiqqG3b0Wo/w8T6hYW7OZ3/39IpLPlZcU5nGleXL4XJ8Xe/P8hgTbb+27Lb9zk/1CHL1kfXWW+ab0lbDY8kK+XXfL7iLz7jS1LCzg/vXDDsPtNf3aGPpBu6H/5zZNgU0g33PiblP2fcxLcJi1180sbBviNZaZ+2KT6LvnsZd40J3ndFufFlPDbIDMbWn/TYhPpKgAR/f6DyfEdWXh9veZV1Ob3f12R57Bpibbb8hu1GA5+903/m2980G/gc7e3GbS23DiIgREMoP9zRAJhyCALewseuMVbN4lFPFXZ++5GjWHbDhBsQ6ufVeIN89It3vrZ4qv/F5CsYxNuy3C3eO2HYqU6jYcouKHZzy4JN7DdLV77WeO7HyLZHt8ViCfVknzrZV7b7x7ffT2d54tMP6A/26rOLvIvqlleNvzp47uv1vT2Ipe/nuZNceFAPCaYy3yKPh1Q0+ZseV69rKsVmeXrDkamiflaJxKBzyxrs2MY8mza0tdTMuyU/fko/cmsXFOT08Ukn50tv1y3q3VLQ84XkzKIkB7f3dz/47s9nB9/ucJfzTcxBEKzoCHkXy6frItyZvF+lpVNZ9KGQJwQ9T/P6XOZy5Z+5hfXFhJFhrcEpOR7mq/y5czjoubL5evsMh/G7WYahhR7/LTILups4VNQPlFMXmfUs9cFdeC/4fqjP4ldZ4t3R/9PAAAA///LuI+zgZoCAA=="; } - } - } -} +// +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + + public sealed partial class DBv3 : IMigrationMetadata + { + string IMigrationMetadata.Id + { + get { return "201206140712161_DBv3"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsLxv9nL55zVDTF9kib1bZNP/so6dFM63GT7M2G7/KV1VTtFV9/VF6XBYZIfM6L8/fE7Odh8DsI9sn9XpK2LXXb65XOff82UeE4Hlxsa6zloZ/1uZBc3rh98qvgw/oo5d1tcrr9vpVfq5AXk/pk4/Suze3JHDddo/vdvuw74XggTX90dY0gx+lz4p3+ex5vrxo5599dJ6VDbX4IntnPjmgafxqWdB80zttvaZvX6zLMpuUuW3ewaPTK6P6Q+7zJ7Ny/b4jpV83dCt/+70+vuuYYCNrPK2m60W+bN/ki1WZtfnX4Yyz2ftPN955Lwrc+2C6P82baV2sIAPv2ffe/Q/u/Ouw96cf2umzomzz+vTdqs6b5psedp/pIggQS7X58llVL0zfT6qqzLPlzWN5kV0WF6yxOkC/U01eryeA1nyUvspLbtPMi5Xoz3GXpX//4IVndbV4VaHbTe1+/9fVup5iwqpbNH6T1Rd5+zUl0AH6ZmQv2ow6QQ8/FEnd+2Bh8bB9r57vf2jHX19F7O68/6gHOfy4bbPpnNntZ5fLDePeisuNSNx2FE/zy2Kan1SLVbUkmAPDCBsNjmK4WX8QG9q+7xiUE6Oo63dDKEe+7qEaa/M1UIyTlr7YgNtNeN2I060VXGc+vhkt9z5662zZ3tuLiOPq00evyf3OP8+XOfnG+ewlrFW9xLs5j0J98UerT2/njj+8u7MHd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LuI+zgZoCAA=="; } + } + } +} diff --git a/Disco.Data/Migrations/201206140712161_DBv3.cs b/Disco.Data/Migrations/201206140712161_DBv3.cs index 2944d7bb..e1620d5e 100644 --- a/Disco.Data/Migrations/201206140712161_DBv3.cs +++ b/Disco.Data/Migrations/201206140712161_DBv3.cs @@ -1,30 +1,30 @@ -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - - public partial class DBv3 : DbMigration - { - public override void Up() - { - AddColumn("DeviceProfiles", "ComputerNameTemplate", c => c.String(nullable: true)); - Sql(@"UPDATE DeviceProfiles SET ComputerNameTemplate='DeviceProfile.ShortName + ''-'' + SerialNumber'"); - AlterColumn("DeviceProfiles", "ComputerNameTemplate", c => c.String(nullable: false)); - - AddColumn("DeviceProfiles", "DistributionType", c => c.Int(nullable: false)); - AddColumn("DeviceProfiles", "OrganisationalUnit", c => c.String()); - AddColumn("DeviceProfiles", "AllocateWirelessCertificate", c => c.Boolean(nullable: false)); - AddColumn("DeviceProfiles", "EnforceComputerNameConvention", c => c.Boolean(nullable: false)); - AddColumn("DeviceProfiles", "EnforceOrganisationalUnit", c => c.Boolean(nullable: false)); - } - - public override void Down() - { - DropColumn("DeviceProfiles", "EnforceOrganisationalUnit"); - DropColumn("DeviceProfiles", "EnforceComputerNameConvention"); - DropColumn("DeviceProfiles", "AllocateWirelessCertificate"); - DropColumn("DeviceProfiles", "OrganisationalUnit"); - DropColumn("DeviceProfiles", "DistributionType"); - DropColumn("DeviceProfiles", "ComputerNameTemplate"); - } - } -} +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + + public partial class DBv3 : DbMigration + { + public override void Up() + { + AddColumn("DeviceProfiles", "ComputerNameTemplate", c => c.String(nullable: true)); + Sql(@"UPDATE DeviceProfiles SET ComputerNameTemplate='DeviceProfile.ShortName + ''-'' + SerialNumber'"); + AlterColumn("DeviceProfiles", "ComputerNameTemplate", c => c.String(nullable: false)); + + AddColumn("DeviceProfiles", "DistributionType", c => c.Int(nullable: false)); + AddColumn("DeviceProfiles", "OrganisationalUnit", c => c.String()); + AddColumn("DeviceProfiles", "AllocateWirelessCertificate", c => c.Boolean(nullable: false)); + AddColumn("DeviceProfiles", "EnforceComputerNameConvention", c => c.Boolean(nullable: false)); + AddColumn("DeviceProfiles", "EnforceOrganisationalUnit", c => c.Boolean(nullable: false)); + } + + public override void Down() + { + DropColumn("DeviceProfiles", "EnforceOrganisationalUnit"); + DropColumn("DeviceProfiles", "EnforceComputerNameConvention"); + DropColumn("DeviceProfiles", "AllocateWirelessCertificate"); + DropColumn("DeviceProfiles", "OrganisationalUnit"); + DropColumn("DeviceProfiles", "DistributionType"); + DropColumn("DeviceProfiles", "ComputerNameTemplate"); + } + } +} diff --git a/Disco.Data/Migrations/201206280337277_DBv4.Designer.cs b/Disco.Data/Migrations/201206280337277_DBv4.Designer.cs index 84b8410f..56aa6ce1 100644 --- a/Disco.Data/Migrations/201206280337277_DBv4.Designer.cs +++ b/Disco.Data/Migrations/201206280337277_DBv4.Designer.cs @@ -1,24 +1,24 @@ -// -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - - public sealed partial class DBv4 : IMigrationMetadata - { - string IMigrationMetadata.Id - { - get { return "201206280337277_DBv4"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPx7vFuU6WVeN0W1/Oyj3fHOR2m+nFazYnnx2Ufr9nz74KPf4+g3Th6fzhbv0p807fbQjt5cNp99NG/b1aO7d5vpPF9kzXhRTOuqqc7b8bRa3M1m1d29nZ2Du7s7d3MC8RHBStPHr9bLtljk/Af9eVItp/mqXWflF9UsLxv9nL55zVDTF9kib1bZNP/so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Dc/7zwVRzNr+DawQNPvGOcFAj43ZffdNDflFtbTDOZ5OqzX1ubw4mWf1Bfn8v2hd1MN5qvcF8bPAIV7fMXoFX/8wSHY8m30Qvdz7Pw+I9TIrPoRW9vWfA1L9bJPq5bqezrMm/7Ke5fWrrGjei6uG3v7/O6FuYcFufvf/h0Q6W15WnMOZ5sXle3FS7M3/HxJos73vtvzGTf4PdfiS9dFV5pvWW8JmwwP5etklv4/Iu9/YsrSA89MLNwy73/RnZ+gD6Yb+l988CTaFdMONv0nZ/zknwW3SUje/tGGA31hm6ueGVCd53RbnxZSwu1FiIm1/dkTG6ygCIPj2g8nwHVlwfb3m1dPm939dkcewaWm22/IbtRQOfvdN/5tvfNBv4Gu3txm0ttw4iIERDKD/c0QC5SU/+3oLHrjFWzcydzQr2/vuZiExbQcItqHVzyrxhnnpFm/9bPHV/wtI1rEFt2W4W7z2Q7FOncZDFNzQ7GeXhBvY7hav/azx3Q+RbI/vCsSTakk+9TKv7XeP776ezvNFph/Qn21VZxf5F9UsLxv+9PHdV2t6e5HLX0/zprhwIB4TzGU+RZ8OqGlztjyvXtbViszydQcj08R8rROJgGeWtdkxDHk2benrad40lPX5KP3JrFxTk9PFJJ+dLb9ct6t1S0POF5MyiIwe393c/+O7PZwff7nCX803MQRCs6Ah5F8un6yLcmbxfpaVTWfShkCcEPU/z+lzmcuWfuYX1xYSRYS3BKTke5qv8uXM46Lmy+Xr7DIfxu1mGoYUe/y0yC7qbOFTUD5RTF5n1LPXBXXgv+H6oz+JXWeLd0f/TwAAAP//+dWKNFCbAgA="; } - } - } -} +// +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + + public sealed partial class DBv4 : IMigrationMetadata + { + string IMigrationMetadata.Id + { + get { return "201206280337277_DBv4"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return "H4sIAAAAAAAEAOy9B2AcSZYlJi9tynt/SvVK1+B0oQi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7qbOFTUD5RTF5n1LPXBXXgv+H6oz+JXWeLd0f/TwAAAP//+dWKNFCbAgA="; } + } + } +} diff --git a/Disco.Data/Migrations/201206280337277_DBv4.cs b/Disco.Data/Migrations/201206280337277_DBv4.cs index cba14a45..54ecb21e 100644 --- a/Disco.Data/Migrations/201206280337277_DBv4.cs +++ b/Disco.Data/Migrations/201206280337277_DBv4.cs @@ -1,52 +1,52 @@ -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - - public partial class DBv4 : DbMigration - { - public override void Up() - { - AddColumn("DeviceProfiles", "ProvisionADAccount", c => c.Boolean(nullable: false)); - Sql(@"UPDATE [DeviceProfiles] SET [ProvisionADAccount]=1;"); - - DropColumn("Devices", "CertificateStoreReference"); - - RenameTable(name: "WirelessCertificates", newName: "DeviceCertificates"); - AddColumn("DeviceCertificates", "ProviderId", c => c.String(maxLength: 64)); - RenameColumn("DeviceCertificates", "Index", "ProviderIndex"); - Sql("UPDATE DeviceCertificates SET ProviderId='EduSTARnetCertificateProvider'"); - AlterColumn("DeviceCertificates", "ProviderId", c => c.String(nullable: false, maxLength: 64)); - - //RenameColumn("DeviceProfiles", "AllocateWirelessCertificate", "AllocateCertificate"); - AddColumn("DeviceProfiles", "CertificateProviderId", c => c.String(maxLength: 64)); - Sql(@"UPDATE [DeviceProfiles] SET [CertificateProviderId]='EduSTARnetCertificateProvider' WHERE [AllocateWirelessCertificate]=1;"); - - // Migrate eduSTAR.net Configuration - Sql(@"UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='AutoBufferMin' WHERE [Scope]='Wireless' AND [Key]='CertificateAutoBufferLow'; -UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='AutoBufferMax' WHERE [Scope]='Wireless' AND [Key]='CertificateAutoBufferMax'; -UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='ServicePassword' WHERE [Scope]='Wireless_eduSTAR' AND [Key]='ServiceAccountPassword'; -UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='SchoolId' WHERE [Scope]='Wireless_eduSTAR' AND [Key]='ServiceAccountSchoolId'; -UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='ServiceUsername' WHERE [Scope]='Wireless_eduSTAR' AND [Key]='ServiceAccountUsername';" - ); - - Sql(@"UPDATE [DeviceModels] SET [DefaultWarrantyProvider]='LWTWarrantyProvider' WHERE [DefaultWarrantyProvider]='LWT';"); - - DropColumn("DeviceProfiles", "AllocateWirelessCertificate"); - } - - public override void Down() - { - AddColumn("DeviceProfiles", "AllocateWirelessCertificate", c => c.Boolean(nullable: false)); - - RenameColumn("DeviceCertificates", "ProviderIndex", "Index"); - DropColumn("DeviceCertificates", "ProviderId"); - RenameTable(name: "DeviceCertificates", newName: "WirelessCertificates"); - - DropColumn("DeviceProfiles", "CertificateProviderId"); - - AddColumn("Devices", "CertificateStoreReference", c => c.String(maxLength: 24)); - - DropColumn("DeviceProfiles", "ProvisionADAccount"); - } - } -} +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + + public partial class DBv4 : DbMigration + { + public override void Up() + { + AddColumn("DeviceProfiles", "ProvisionADAccount", c => c.Boolean(nullable: false)); + Sql(@"UPDATE [DeviceProfiles] SET [ProvisionADAccount]=1;"); + + DropColumn("Devices", "CertificateStoreReference"); + + RenameTable(name: "WirelessCertificates", newName: "DeviceCertificates"); + AddColumn("DeviceCertificates", "ProviderId", c => c.String(maxLength: 64)); + RenameColumn("DeviceCertificates", "Index", "ProviderIndex"); + Sql("UPDATE DeviceCertificates SET ProviderId='EduSTARnetCertificateProvider'"); + AlterColumn("DeviceCertificates", "ProviderId", c => c.String(nullable: false, maxLength: 64)); + + //RenameColumn("DeviceProfiles", "AllocateWirelessCertificate", "AllocateCertificate"); + AddColumn("DeviceProfiles", "CertificateProviderId", c => c.String(maxLength: 64)); + Sql(@"UPDATE [DeviceProfiles] SET [CertificateProviderId]='EduSTARnetCertificateProvider' WHERE [AllocateWirelessCertificate]=1;"); + + // Migrate eduSTAR.net Configuration + Sql(@"UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='AutoBufferMin' WHERE [Scope]='Wireless' AND [Key]='CertificateAutoBufferLow'; +UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='AutoBufferMax' WHERE [Scope]='Wireless' AND [Key]='CertificateAutoBufferMax'; +UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='ServicePassword' WHERE [Scope]='Wireless_eduSTAR' AND [Key]='ServiceAccountPassword'; +UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='SchoolId' WHERE [Scope]='Wireless_eduSTAR' AND [Key]='ServiceAccountSchoolId'; +UPDATE [Configuration] SET [Scope]='CertificateProvider_eduSTAR.net', [Key]='ServiceUsername' WHERE [Scope]='Wireless_eduSTAR' AND [Key]='ServiceAccountUsername';" + ); + + Sql(@"UPDATE [DeviceModels] SET [DefaultWarrantyProvider]='LWTWarrantyProvider' WHERE [DefaultWarrantyProvider]='LWT';"); + + DropColumn("DeviceProfiles", "AllocateWirelessCertificate"); + } + + public override void Down() + { + AddColumn("DeviceProfiles", "AllocateWirelessCertificate", c => c.Boolean(nullable: false)); + + RenameColumn("DeviceCertificates", "ProviderIndex", "Index"); + DropColumn("DeviceCertificates", "ProviderId"); + RenameTable(name: "DeviceCertificates", newName: "WirelessCertificates"); + + DropColumn("DeviceProfiles", "CertificateProviderId"); + + AddColumn("Devices", "CertificateStoreReference", c => c.String(maxLength: 24)); + + DropColumn("DeviceProfiles", "ProvisionADAccount"); + } + } +} diff --git a/Disco.Data/Migrations/201211090325116_DBv5.Designer.cs b/Disco.Data/Migrations/201211090325116_DBv5.Designer.cs index 3111a16b..4ca85082 100644 --- a/Disco.Data/Migrations/201211090325116_DBv5.Designer.cs +++ b/Disco.Data/Migrations/201211090325116_DBv5.Designer.cs @@ -1,27 +1,27 @@ -// -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - using System.Resources; - - public sealed partial class DBv5 : IMigrationMetadata - { - private readonly ResourceManager Resources = new ResourceManager(typeof(DBv5)); - - string IMigrationMetadata.Id - { - get { return "201211090325116_DBv5"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return Resources.GetString("Target"); } - } - } -} +// +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + using System.Resources; + + public sealed partial class DBv5 : IMigrationMetadata + { + private readonly ResourceManager Resources = new ResourceManager(typeof(DBv5)); + + string IMigrationMetadata.Id + { + get { return "201211090325116_DBv5"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return Resources.GetString("Target"); } + } + } +} diff --git a/Disco.Data/Migrations/201211090325116_DBv5.cs b/Disco.Data/Migrations/201211090325116_DBv5.cs index 6fb5bfa8..c143f273 100644 --- a/Disco.Data/Migrations/201211090325116_DBv5.cs +++ b/Disco.Data/Migrations/201211090325116_DBv5.cs @@ -1,96 +1,96 @@ -namespace Disco.Data.Migrations -{ - using System; - using System.Data.Entity.Migrations; - - public partial class DBv5 : DbMigration - { - public override void Up() - { - // Drop Foreign Keys - - // 2012-11-09 - G# - // ForeignKey Names are not consistant among databases - Especially version 4.3.1 -> 5.0.0.net45 - #region "Support inconsistant foreign key names" - // DeviceCertificates was renamed from WirelessCertificates - Sql(@" - BEGIN TRY - ALTER TABLE [dbo].[DeviceCertificates] DROP CONSTRAINT [FK_dbo.DeviceCertificates_dbo.Devices_DeviceSerialNumber]; - END TRY - BEGIN CATCH - ALTER TABLE [dbo].[DeviceCertificates] DROP CONSTRAINT [FK_WirelessCertificates_Devices_DeviceSerialNumber]; - END CATCH;", true); - // DeviceAttachments - Sql(@" - BEGIN TRY - ALTER TABLE [dbo].[DeviceAttachments] DROP CONSTRAINT [FK_dbo.DeviceAttachments_dbo.Devices_DeviceSerialNumber]; - END TRY - BEGIN CATCH - ALTER TABLE [dbo].[DeviceAttachments] DROP CONSTRAINT [FK_DeviceAttachments_Devices_DeviceSerialNumber]; - END CATCH;", true); - // DeviceDetails - Sql(@" - BEGIN TRY - ALTER TABLE [dbo].[DeviceDetails] DROP CONSTRAINT [FK_dbo.DeviceDetails_dbo.Devices_DeviceSerialNumber]; - END TRY - BEGIN CATCH - ALTER TABLE [dbo].[DeviceDetails] DROP CONSTRAINT [FK_DeviceDetails_Devices_DeviceSerialNumber]; - END CATCH;", true); - // Jobs - Sql(@" - BEGIN TRY - ALTER TABLE [dbo].[Jobs] DROP CONSTRAINT [FK_dbo.Jobs_dbo.Devices_DeviceSerialNumber]; - END TRY - BEGIN CATCH - ALTER TABLE [dbo].[Jobs] DROP CONSTRAINT [FK_Jobs_Devices_DeviceSerialNumber]; - END CATCH;", true); - // DeviceUserAssignments - Sql(@" - BEGIN TRY - ALTER TABLE [dbo].[DeviceUserAssignments] DROP CONSTRAINT [FK_dbo.DeviceUserAssignments_dbo.Devices_DeviceSerialNumber]; - END TRY - BEGIN CATCH - ALTER TABLE [dbo].[DeviceUserAssignments] DROP CONSTRAINT [FK_DeviceUserAssignments_Devices_DeviceSerialNumber]; - END CATCH;", true); - #endregion - - AlterColumn("dbo.Devices", "SerialNumber", c => c.String(nullable: false, maxLength: 60)); - AlterColumn("dbo.DeviceUserAssignments", "DeviceSerialNumber", c => c.String(nullable: false, maxLength: 60)); - AlterColumn("dbo.Jobs", "DeviceSerialNumber", c => c.String(maxLength: 60)); - AlterColumn("dbo.DeviceDetails", "DeviceSerialNumber", c => c.String(nullable: false, maxLength: 60)); - AlterColumn("dbo.DeviceAttachments", "DeviceSerialNumber", c => c.String(maxLength: 60)); - AlterColumn("dbo.DeviceCertificates", "DeviceSerialNumber", c => c.String(maxLength: 60)); - - // Re-create Foreign Keys - AddForeignKey("dbo.DeviceCertificates", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - AddForeignKey("dbo.DeviceAttachments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - AddForeignKey("dbo.DeviceDetails", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - AddForeignKey("dbo.Jobs", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - AddForeignKey("dbo.DeviceUserAssignments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - } - - public override void Down() - { - // Drop Foreign Keys - DropForeignKey("dbo.DeviceCertificates", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - DropForeignKey("dbo.DeviceAttachments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - DropForeignKey("dbo.DeviceDetails", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - DropForeignKey("dbo.Jobs", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - DropForeignKey("dbo.DeviceUserAssignments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - - AlterColumn("dbo.DeviceCertificates", "DeviceSerialNumber", c => c.String(maxLength: 40)); - AlterColumn("dbo.DeviceAttachments", "DeviceSerialNumber", c => c.String(maxLength: 40)); - AlterColumn("dbo.DeviceDetails", "DeviceSerialNumber", c => c.String(nullable: false, maxLength: 40)); - AlterColumn("dbo.Jobs", "DeviceSerialNumber", c => c.String(maxLength: 40)); - AlterColumn("dbo.DeviceUserAssignments", "DeviceSerialNumber", c => c.String(nullable: false, maxLength: 40)); - AlterColumn("dbo.Devices", "SerialNumber", c => c.String(nullable: false, maxLength: 40)); - - // Re-create Foreign Keys - AddForeignKey("dbo.DeviceCertificates", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - AddForeignKey("dbo.DeviceAttachments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - AddForeignKey("dbo.DeviceDetails", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - AddForeignKey("dbo.Jobs", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - AddForeignKey("dbo.DeviceUserAssignments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); - } - } -} +namespace Disco.Data.Migrations +{ + using System; + using System.Data.Entity.Migrations; + + public partial class DBv5 : DbMigration + { + public override void Up() + { + // Drop Foreign Keys + + // 2012-11-09 - G# + // ForeignKey Names are not consistant among databases - Especially version 4.3.1 -> 5.0.0.net45 + #region "Support inconsistant foreign key names" + // DeviceCertificates was renamed from WirelessCertificates + Sql(@" + BEGIN TRY + ALTER TABLE [dbo].[DeviceCertificates] DROP CONSTRAINT [FK_dbo.DeviceCertificates_dbo.Devices_DeviceSerialNumber]; + END TRY + BEGIN CATCH + ALTER TABLE [dbo].[DeviceCertificates] DROP CONSTRAINT [FK_WirelessCertificates_Devices_DeviceSerialNumber]; + END CATCH;", true); + // DeviceAttachments + Sql(@" + BEGIN TRY + ALTER TABLE [dbo].[DeviceAttachments] DROP CONSTRAINT [FK_dbo.DeviceAttachments_dbo.Devices_DeviceSerialNumber]; + END TRY + BEGIN CATCH + ALTER TABLE [dbo].[DeviceAttachments] DROP CONSTRAINT [FK_DeviceAttachments_Devices_DeviceSerialNumber]; + END CATCH;", true); + // DeviceDetails + Sql(@" + BEGIN TRY + ALTER TABLE [dbo].[DeviceDetails] DROP CONSTRAINT [FK_dbo.DeviceDetails_dbo.Devices_DeviceSerialNumber]; + END TRY + BEGIN CATCH + ALTER TABLE [dbo].[DeviceDetails] DROP CONSTRAINT [FK_DeviceDetails_Devices_DeviceSerialNumber]; + END CATCH;", true); + // Jobs + Sql(@" + BEGIN TRY + ALTER TABLE [dbo].[Jobs] DROP CONSTRAINT [FK_dbo.Jobs_dbo.Devices_DeviceSerialNumber]; + END TRY + BEGIN CATCH + ALTER TABLE [dbo].[Jobs] DROP CONSTRAINT [FK_Jobs_Devices_DeviceSerialNumber]; + END CATCH;", true); + // DeviceUserAssignments + Sql(@" + BEGIN TRY + ALTER TABLE [dbo].[DeviceUserAssignments] DROP CONSTRAINT [FK_dbo.DeviceUserAssignments_dbo.Devices_DeviceSerialNumber]; + END TRY + BEGIN CATCH + ALTER TABLE [dbo].[DeviceUserAssignments] DROP CONSTRAINT [FK_DeviceUserAssignments_Devices_DeviceSerialNumber]; + END CATCH;", true); + #endregion + + AlterColumn("dbo.Devices", "SerialNumber", c => c.String(nullable: false, maxLength: 60)); + AlterColumn("dbo.DeviceUserAssignments", "DeviceSerialNumber", c => c.String(nullable: false, maxLength: 60)); + AlterColumn("dbo.Jobs", "DeviceSerialNumber", c => c.String(maxLength: 60)); + AlterColumn("dbo.DeviceDetails", "DeviceSerialNumber", c => c.String(nullable: false, maxLength: 60)); + AlterColumn("dbo.DeviceAttachments", "DeviceSerialNumber", c => c.String(maxLength: 60)); + AlterColumn("dbo.DeviceCertificates", "DeviceSerialNumber", c => c.String(maxLength: 60)); + + // Re-create Foreign Keys + AddForeignKey("dbo.DeviceCertificates", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + AddForeignKey("dbo.DeviceAttachments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + AddForeignKey("dbo.DeviceDetails", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + AddForeignKey("dbo.Jobs", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + AddForeignKey("dbo.DeviceUserAssignments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + } + + public override void Down() + { + // Drop Foreign Keys + DropForeignKey("dbo.DeviceCertificates", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + DropForeignKey("dbo.DeviceAttachments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + DropForeignKey("dbo.DeviceDetails", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + DropForeignKey("dbo.Jobs", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + DropForeignKey("dbo.DeviceUserAssignments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + + AlterColumn("dbo.DeviceCertificates", "DeviceSerialNumber", c => c.String(maxLength: 40)); + AlterColumn("dbo.DeviceAttachments", "DeviceSerialNumber", c => c.String(maxLength: 40)); + AlterColumn("dbo.DeviceDetails", "DeviceSerialNumber", c => c.String(nullable: false, maxLength: 40)); + AlterColumn("dbo.Jobs", "DeviceSerialNumber", c => c.String(maxLength: 40)); + AlterColumn("dbo.DeviceUserAssignments", "DeviceSerialNumber", c => c.String(nullable: false, maxLength: 40)); + AlterColumn("dbo.Devices", "SerialNumber", c => c.String(nullable: false, maxLength: 40)); + + // Re-create Foreign Keys + AddForeignKey("dbo.DeviceCertificates", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + AddForeignKey("dbo.DeviceAttachments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + AddForeignKey("dbo.DeviceDetails", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + AddForeignKey("dbo.Jobs", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + AddForeignKey("dbo.DeviceUserAssignments", "DeviceSerialNumber", "dbo.Devices", "SerialNumber"); + } + } +} diff --git a/Disco.Data/Migrations/201211090325116_DBv5.resx b/Disco.Data/Migrations/201211090325116_DBv5.resx index b1b4ea98..90f7e2f2 100644 --- a/Disco.Data/Migrations/201211090325116_DBv5.resx +++ b/Disco.Data/Migrations/201211090325116_DBv5.resx @@ -1,123 +1,123 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - H4sIAAAAAAAEAO1dW3PcuHJ+T1X+g0pPSapi2d5LbU7JSXkleWMd21Ise/fRRc9AEutwyAnJ8ZF/Wx7yk/IXAl4Hl26gAYKX0erJ1gBsdDcajcbt6//7n/89/Y+HTXL0jeVFnKWvjl88e358xNJVto7Tu1fHu/L2X385/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CiUzG98TV4QcRGsZCgFsbor6k4ilUtoey9NMXAoX5OJXVozb66QoGfXwcqsIACmmaIsEbPkJFEWYwRxy/x6EkCHaOpiIrYN3jUJB5vjdisYWY8icVX7wsaD1vMYCOBTtnAQ6l5YJAIusoWajYFkCtYKIj2w16YXgVmJZ0eOXwB48zqoCyLWX/aIqdqXlUBeD4oBqyYf4EGzLA5WGBgFQa6jxWff2LH80a3wkPnSku0VuolyEvoqqitK9JCUJD705VIdzu0c6kAuUiK9EGCF9ZjdvnXq2JDqIwQ61RlYfbEuGrsexqASojQA5AOnNFKhhrdrK+JQBpTqdCg9m5vqMPaXcTqq16iF9R7N9S92WnJ80LjvYH/meZ5dFd+za2/vX05GO177JhzV/nrL6J1pE45TRTVuMA7Il2dd6mt1n3oFzhqKvSFbcdWS141lEZva4m8mhV8uIVK4o4vTs++j1KdrzKxeYrW79Nr3bldldykdnmayKtjKqn6Kb2T080nk+vttVfRQgROJsxF4Fdpb/u4mTd8/0mSgql0zAS1Rv33xj/venLkv/L7r73lPiKkEioVV//NL9/knOV3kTfGM6bXYeyxk7P4+gujzZFS2P/Pf+Tm9968/Dv/w/1lZV7o5gCAA== - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + H4sIAAAAAAAEAO1dW3PcuHJ+T1X+g0pPSapi2d5LbU7JSXkleWMd21Ise/fRRc9AEutwyAnJ8ZF/Wx7yk/IXAl4Hl26gAYKX0erJ1gBsdDcajcbt6//7n/89/Y+HTXL0jeVFnKWvjl88e358xNJVto7Tu1fHu/L2X385/o9//8d/OL1Ybx6Ofu/q/VDV41+mxavj+7Lc/uXkpFjds01UPNvEqzwrstvy2Srb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sEbPkJFEWYwRxy/x6EkCHaOpiIrYN3jUJB5vjdisYWY8icVX7wsaD1vMYCOBTtnAQ6l5YJAIusoWajYFkCtYKIj2w16YXgVmJZ0eOXwB48zqoCyLWX/aIqdqXlUBeD4oBqyYf4EGzLA5WGBgFQa6jxWff2LH80a3wkPnSku0VuolyEvoqqitK9JCUJD705VIdzu0c6kAuUiK9EGCF9ZjdvnXq2JDqIwQ61RlYfbEuGrsexqASojQA5AOnNFKhhrdrK+JQBpTqdCg9m5vqMPaXcTqq16iF9R7N9S92WnJ80LjvYH/meZ5dFd+za2/vX05GO177JhzV/nrL6J1pE45TRTVuMA7Il2dd6mt1n3oFzhqKvSFbcdWS141lEZva4m8mhV8uIVK4o4vTs++j1KdrzKxeYrW79Nr3bldldykdnmayKtjKqn6Kb2T080nk+vttVfRQgROJsxF4Fdpb/u4mTd8/0mSgql0zAS1Rv33xj/venLkv/L7r73lPiKkEioVV//NL9/knOV3kTfGM6bXYeyxk7P4+gujzZFS2P/Pf+Tm9968/Dv/w/1lZV7o5gCAA== + \ No newline at end of file diff --git a/Disco.Data/Migrations/201301150107063_DBv6.Designer.cs b/Disco.Data/Migrations/201301150107063_DBv6.Designer.cs index 2a4d4f83..2fe704ee 100644 --- a/Disco.Data/Migrations/201301150107063_DBv6.Designer.cs +++ b/Disco.Data/Migrations/201301150107063_DBv6.Designer.cs @@ -1,27 +1,27 @@ -// -namespace Disco.Data.Migrations -{ - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - using System.Resources; - - public sealed partial class DBv6 : IMigrationMetadata - { - private readonly ResourceManager Resources = new ResourceManager(typeof(DBv6)); - - string IMigrationMetadata.Id - { - get { return "201301150107063_DBv6"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return Resources.GetString("Target"); } - } - } -} +// +namespace Disco.Data.Migrations +{ + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + using System.Resources; + + public sealed partial class DBv6 : IMigrationMetadata + { + private readonly ResourceManager Resources = new ResourceManager(typeof(DBv6)); + + string IMigrationMetadata.Id + { + get { return "201301150107063_DBv6"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return Resources.GetString("Target"); } + } + } +} diff --git a/Disco.Data/Migrations/201301150107063_DBv6.cs b/Disco.Data/Migrations/201301150107063_DBv6.cs index 69354537..fe2374a7 100644 --- a/Disco.Data/Migrations/201301150107063_DBv6.cs +++ b/Disco.Data/Migrations/201301150107063_DBv6.cs @@ -1,18 +1,18 @@ -namespace Disco.Data.Migrations -{ - using System; - using System.Data.Entity.Migrations; - - public partial class DBv6 : DbMigration - { - public override void Up() - { - DropColumn("dbo.DeviceModels", "Image"); - } - - public override void Down() - { - AddColumn("dbo.DeviceModels", "Image", c => c.Binary()); - } - } -} +namespace Disco.Data.Migrations +{ + using System; + using System.Data.Entity.Migrations; + + public partial class DBv6 : DbMigration + { + public override void Up() + { + DropColumn("dbo.DeviceModels", "Image"); + } + + public override void Down() + { + AddColumn("dbo.DeviceModels", "Image", c => c.Binary()); + } + } +} diff --git a/Disco.Data/Migrations/201301150107063_DBv6.resx b/Disco.Data/Migrations/201301150107063_DBv6.resx index 6b2efbde..9774abb9 100644 --- a/Disco.Data/Migrations/201301150107063_DBv6.resx +++ b/Disco.Data/Migrations/201301150107063_DBv6.resx @@ -1,123 +1,123 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - H4sIAAAAAAAEAO1dW3PcuHJ+T1X+g0pPSapi2d5LbU7JSXkleWMd21Ise/fRRc9AEutwyAnJ8ZF/Wx7yk/IXAl4Hl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VyB1+MiwniK48tDeFE+Huk/qnUOJY+g5HFB7ea2OKpoPjwvJZQHSH9h545N59rBSGF1sHgqUowQIfO7zf51CKhLiCawEHZglhCeotBFHmfVkokcn4nrg6/CBCw1gIcGtD1JdUPIXK9lCWfvpCoDAfp7J61EY/XcGgj49DVRhAIU1TJHjDR6gowgzmiOP3OJQEwc7RVGQFrHscCjLP90YsthBT/qTii5cFrectBtCxYOcswKG0XBBIZB0lCxXbAqgVTHRku0EvDK8C05IOrxz+4HFGFVC2pewfTbEzNY+qABwfVEM2zJ9gQwa4PCwQkEpDnceqr3/xo1njO+GhM8Ulegv1MuRFVFWU9jUpQWjo3akqhNs92plUoFxkJdoA4SurcfvcqzXRQRRmqDWq8nBbInw1ll0tQGUEyAFIZ65IBWPNTta3BCDN6VRoMDvXd/Qh7W5CtVUP8SuK/Vvqvuz0pHnB0f7A/yyzPLpr38bWv56efKz2XTas+euc1TfROhKnnGbKahyAPdGuztv0NuselCscdVW64rYjqwXPOiqj19VEHq1KXrxiRRGnd8dHv0fJjle52Hxl67fp1a7c7kouMtt8TaSVUfUU3dT+6YnG8+nVtvqrCCECZzPmIrCr9NddnKx7vt9ESaF0GkaieuP+G+O/N31Z8n/Z3feeEl8REgm16uuf5vdPcq7Sm+gbw3mz61DW2Ol5HN3l0aZoaey/539y81tvHv79/wGk7UgCrZcCAA== - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + H4sIAAAAAAAEAO1dW3PcuHJ+T1X+g0pPSapi2d5LbU7JSXkleWMd21Ise/fRRc9AEutwyAnJ8ZF/Wx7yk/IXAl4Hl26gAYKX0erJ1gBsdDcajcbt6//7n/89/Y+H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B7ea2OKpoPjwvJZQHSH9h545N59rBSGF1sHgqUowQIfO7zf51CKhLiCawEHZglhCeotBFHmfVkokcn4nrg6/CBCw1gIcGtD1JdUPIXK9lCWfvpCoDAfp7J61EY/XcGgj49DVRhAIU1TJHjDR6gowgzmiOP3OJQEwc7RVGQFrHscCjLP90YsthBT/qTii5cFrectBtCxYOcswKG0XBBIZB0lCxXbAqgVTHRku0EvDK8C05IOrxz+4HFGFVC2pewfTbEzNY+qABwfVEM2zJ9gQwa4PCwQkEpDnceqr3/xo1njO+GhM8Ulegv1MuRFVFWU9jUpQWjo3akqhNs92plUoFxkJdoA4SurcfvcqzXRQRRmqDWq8nBbInw1ll0tQGUEyAFIZ65IBWPNTta3BCDN6VRoMDvXd/Qh7W5CtVUP8SuK/Vvqvuz0pHnB0f7A/yyzPLpr38bWv56efKz2XTas+euc1TfROhKnnGbKahyAPdGuztv0NuselCscdVW64rYjqwXPOiqj19VEHq1KXrxiRRGnd8dHv0fJjle52Hxl67fp1a7c7kouMtt8TaSVUfUU3dT+6YnG8+nVtvqrCCECZzPmIrCr9NddnKx7vt9ESaF0GkaieuP+G+O/N31Z8n/Z3feeEl8REgm16uuf5vdPcq7Sm+gbw3mz61DW2Ol5HN3l0aZoaey/539y81tvHv79/wGk7UgCrZcCAA== + \ No newline at end of file diff --git a/Disco.Data/Migrations/Configuration.cs b/Disco.Data/Migrations/Configuration.cs index 55509047..6cdabeb6 100644 --- a/Disco.Data/Migrations/Configuration.cs +++ b/Disco.Data/Migrations/Configuration.cs @@ -1,21 +1,21 @@ -namespace Disco.Data.Migrations -{ - using System; - using System.Data.Entity; - using System.Data.Entity.Migrations; - using System.Linq; - using Disco.Data.Repository; - - internal sealed class Configuration : DbMigrationsConfiguration - { - public Configuration() - { - AutomaticMigrationsEnabled = false; - } - - protected override void Seed(DiscoDataContext context) - { - context.SeedDatabase(); - } - } -} +namespace Disco.Data.Migrations +{ + using System; + using System.Data.Entity; + using System.Data.Entity.Migrations; + using System.Linq; + using Disco.Data.Repository; + + internal sealed class Configuration : DbMigrationsConfiguration + { + public Configuration() + { + AutomaticMigrationsEnabled = false; + } + + protected override void Seed(DiscoDataContext context) + { + context.SeedDatabase(); + } + } +} diff --git a/Disco.Data/Migrations/DiscoDataMigrator.cs b/Disco.Data/Migrations/DiscoDataMigrator.cs index ce8dc00e..0148b6d4 100644 --- a/Disco.Data/Migrations/DiscoDataMigrator.cs +++ b/Disco.Data/Migrations/DiscoDataMigrator.cs @@ -1,97 +1,97 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data.Entity.Migrations; -using System.Data.Entity.Migrations.Infrastructure; -using Disco.Data.Repository; - -namespace Disco.Data.Migrations -{ - public static class DiscoDataMigrator - { - - private static DbMigrator GetMigrator() - { - var migContext = new DbMigrationsConfiguration(); - migContext.MigrationsAssembly = typeof(DiscoDataMigrator).Assembly; - migContext.MigrationsNamespace = "Disco.Data.Migrations"; - - return new DbMigrator(migContext); - } - - public static void MigrateLatest(bool Seed) - { - var migrator = GetMigrator(); - - migrator.Update(); - - if (Seed) - SeedDatabase(); - } - public static void ForceMigration(string TargetMigration, bool Seed) - { - var migrator = GetMigrator(); - - migrator.Update(TargetMigration); - - if (Seed) - SeedDatabase(); - } - - public static string MigrationScript(string CurrentMigration, string TargetMigration) - { - var migrator = GetMigrator(); - var scriptor = new MigratorScriptingDecorator(migrator); - return scriptor.ScriptUpdate(CurrentMigration, TargetMigration); - } - - public static void SeedDatabase() - { - // Seed/Update Database - using (DiscoDataContext dbContext = new DiscoDataContext()) - { - dbContext.SeedDatabase(); - try - { - dbContext.SaveChanges(); - } - catch (Exception ex) - { - System.Diagnostics.Debug.WriteLine(ex.Message); - throw; - } - } - } - - public static MigrationStatus Status() - { - var migrator = GetMigrator(); - - var appliedMigrations = migrator.GetDatabaseMigrations().ToList(); - var pendingMigrations = migrator.GetPendingMigrations().ToList(); - var currentMigration = appliedMigrations.LastOrDefault(); - - return new MigrationStatus() - { - CurrentMigration = currentMigration, - AppliedMigrations = appliedMigrations, - PendingMigrations = pendingMigrations, - AllMigrations = appliedMigrations.Union(pendingMigrations) - }; - } - - public class MigrationStatus - { - public string CurrentMigration { get; internal set; } - public IEnumerable AppliedMigrations { get; internal set; } - public IEnumerable PendingMigrations { get; internal set; } - public IEnumerable AllMigrations { get; internal set; } - - internal MigrationStatus() - { - // Private Constructor - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data.Entity.Migrations; +using System.Data.Entity.Migrations.Infrastructure; +using Disco.Data.Repository; + +namespace Disco.Data.Migrations +{ + public static class DiscoDataMigrator + { + + private static DbMigrator GetMigrator() + { + var migContext = new DbMigrationsConfiguration(); + migContext.MigrationsAssembly = typeof(DiscoDataMigrator).Assembly; + migContext.MigrationsNamespace = "Disco.Data.Migrations"; + + return new DbMigrator(migContext); + } + + public static void MigrateLatest(bool Seed) + { + var migrator = GetMigrator(); + + migrator.Update(); + + if (Seed) + SeedDatabase(); + } + public static void ForceMigration(string TargetMigration, bool Seed) + { + var migrator = GetMigrator(); + + migrator.Update(TargetMigration); + + if (Seed) + SeedDatabase(); + } + + public static string MigrationScript(string CurrentMigration, string TargetMigration) + { + var migrator = GetMigrator(); + var scriptor = new MigratorScriptingDecorator(migrator); + return scriptor.ScriptUpdate(CurrentMigration, TargetMigration); + } + + public static void SeedDatabase() + { + // Seed/Update Database + using (DiscoDataContext dbContext = new DiscoDataContext()) + { + dbContext.SeedDatabase(); + try + { + dbContext.SaveChanges(); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine(ex.Message); + throw; + } + } + } + + public static MigrationStatus Status() + { + var migrator = GetMigrator(); + + var appliedMigrations = migrator.GetDatabaseMigrations().ToList(); + var pendingMigrations = migrator.GetPendingMigrations().ToList(); + var currentMigration = appliedMigrations.LastOrDefault(); + + return new MigrationStatus() + { + CurrentMigration = currentMigration, + AppliedMigrations = appliedMigrations, + PendingMigrations = pendingMigrations, + AllMigrations = appliedMigrations.Union(pendingMigrations) + }; + } + + public class MigrationStatus + { + public string CurrentMigration { get; internal set; } + public IEnumerable AppliedMigrations { get; internal set; } + public IEnumerable PendingMigrations { get; internal set; } + public IEnumerable AllMigrations { get; internal set; } + + internal MigrationStatus() + { + // Private Constructor + } + } + } +} diff --git a/Disco.Data/Properties/Resources.Designer.cs b/Disco.Data/Properties/Resources.Designer.cs index 2070c0c5..de46338e 100644 --- a/Disco.Data/Properties/Resources.Designer.cs +++ b/Disco.Data/Properties/Resources.Designer.cs @@ -1,73 +1,73 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Data.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Disco.Data.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Byte[]. - /// - internal static byte[] EmptyLogo { - get { - object obj = ResourceManager.GetObject("EmptyLogo", resourceCulture); - return ((byte[])(obj)); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Data.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Disco.Data.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] EmptyLogo { + get { + object obj = ResourceManager.GetObject("EmptyLogo", resourceCulture); + return ((byte[])(obj)); + } + } + } +} diff --git a/Disco.Data/Properties/Resources.resx b/Disco.Data/Properties/Resources.resx index e701f043..3682e859 100644 --- a/Disco.Data/Properties/Resources.resx +++ b/Disco.Data/Properties/Resources.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\EmptyLogo.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\EmptyLogo.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Disco.Data/Repository/DiscoDataContext.cs b/Disco.Data/Repository/DiscoDataContext.cs index 59e3d321..85280eda 100644 --- a/Disco.Data/Repository/DiscoDataContext.cs +++ b/Disco.Data/Repository/DiscoDataContext.cs @@ -1,72 +1,72 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data.Entity; -using Disco.Models.Repository; -using System.Data.Entity.ModelConfiguration.Conventions; - -namespace Disco.Data.Repository -{ - public class DiscoDataContext : DbContext - { - private Lazy _Configuration; - - public DiscoDataContext() - { - this._Configuration = new Lazy(() => new Configuration.ConfigurationContext(this)); - } - - public virtual DbSet ConfigurationItems { get; set; } - - public virtual DbSet DocumentTemplates { get; set; } - - public virtual DbSet Users { get; set; } - public virtual DbSet UserAttachments { get; set; } - - public virtual DbSet DeviceUserAssignments { get; set; } - - public virtual DbSet Devices { get; set; } - public virtual DbSet DeviceDetails { get; set; } - public virtual DbSet DeviceModels { get; set; } - public virtual DbSet DeviceProfiles { get; set; } - public virtual DbSet DeviceBatches { get; set; } - public virtual DbSet DeviceComponents { get; set; } - public virtual DbSet DeviceAttachments { get; set; } - - public virtual DbSet DeviceCertificates { get; set; } - - public virtual DbSet Jobs { get; set; } - public virtual DbSet JobTypes { get; set; } - public virtual DbSet JobSubTypes { get; set; } - public virtual DbSet JobLogs { get; set; } - public virtual DbSet JobAttachments { get; set; } - public virtual DbSet JobComponents { get; set; } - - public virtual DbSet JobMetaWarranties { get; set; } - public virtual DbSet JobMetaNonWarranties { get; set; } - public virtual DbSet JobMetaInsurances { get; set; } - - public Configuration.ConfigurationContext DiscoConfiguration - { - get - { - return this._Configuration.Value; - } - } - - protected override void OnModelCreating(DbModelBuilder modelBuilder) - { - modelBuilder.Conventions.Remove(); - - modelBuilder.Entity().HasMany(m => m.JobSubTypes).WithMany(m => m.DeviceComponents).Map(m => m.ToTable("DeviceComponents_JobSubTypes")); - modelBuilder.Entity().HasMany(m => m.JobSubTypes).WithMany(m => m.AttachmentTypes).Map(m => m.ToTable("DocumentTemplates_JobSubTypes")); - - modelBuilder.Entity().HasMany(m => m.JobSubTypes).WithMany(m => m.Jobs).Map(m => m.ToTable("Jobs_JobSubTypes")); - modelBuilder.Entity().HasMany(m => m.Jobs).WithOptional(m => m.User); - modelBuilder.Entity().HasMany(m => m.Jobs).WithOptional(m => m.Device); - modelBuilder.Entity().Property(DeviceProfile.PropertyAccessExpressions.DistributionTypeDb); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data.Entity; +using Disco.Models.Repository; +using System.Data.Entity.ModelConfiguration.Conventions; + +namespace Disco.Data.Repository +{ + public class DiscoDataContext : DbContext + { + private Lazy _Configuration; + + public DiscoDataContext() + { + this._Configuration = new Lazy(() => new Configuration.ConfigurationContext(this)); + } + + public virtual DbSet ConfigurationItems { get; set; } + + public virtual DbSet DocumentTemplates { get; set; } + + public virtual DbSet Users { get; set; } + public virtual DbSet UserAttachments { get; set; } + + public virtual DbSet DeviceUserAssignments { get; set; } + + public virtual DbSet Devices { get; set; } + public virtual DbSet DeviceDetails { get; set; } + public virtual DbSet DeviceModels { get; set; } + public virtual DbSet DeviceProfiles { get; set; } + public virtual DbSet DeviceBatches { get; set; } + public virtual DbSet DeviceComponents { get; set; } + public virtual DbSet DeviceAttachments { get; set; } + + public virtual DbSet DeviceCertificates { get; set; } + + public virtual DbSet Jobs { get; set; } + public virtual DbSet JobTypes { get; set; } + public virtual DbSet JobSubTypes { get; set; } + public virtual DbSet JobLogs { get; set; } + public virtual DbSet JobAttachments { get; set; } + public virtual DbSet JobComponents { get; set; } + + public virtual DbSet JobMetaWarranties { get; set; } + public virtual DbSet JobMetaNonWarranties { get; set; } + public virtual DbSet JobMetaInsurances { get; set; } + + public Configuration.ConfigurationContext DiscoConfiguration + { + get + { + return this._Configuration.Value; + } + } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + modelBuilder.Conventions.Remove(); + + modelBuilder.Entity().HasMany(m => m.JobSubTypes).WithMany(m => m.DeviceComponents).Map(m => m.ToTable("DeviceComponents_JobSubTypes")); + modelBuilder.Entity().HasMany(m => m.JobSubTypes).WithMany(m => m.AttachmentTypes).Map(m => m.ToTable("DocumentTemplates_JobSubTypes")); + + modelBuilder.Entity().HasMany(m => m.JobSubTypes).WithMany(m => m.Jobs).Map(m => m.ToTable("Jobs_JobSubTypes")); + modelBuilder.Entity().HasMany(m => m.Jobs).WithOptional(m => m.User); + modelBuilder.Entity().HasMany(m => m.Jobs).WithOptional(m => m.Device); + modelBuilder.Entity().Property(DeviceProfile.PropertyAccessExpressions.DistributionTypeDb); + } + + } +} diff --git a/Disco.Data/Repository/DiscoDataContextInitializer.cs b/Disco.Data/Repository/DiscoDataContextInitializer.cs index 869a5b74..aabb3b52 100644 --- a/Disco.Data/Repository/DiscoDataContextInitializer.cs +++ b/Disco.Data/Repository/DiscoDataContextInitializer.cs @@ -1,19 +1,19 @@ -// Shouldn't Need this => Moved to Entity Migrations... - -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using System.Data.Entity; - -//namespace Disco.Data.Repository -//{ -// class DiscoDataContextInitializer : CreateDatabaseIfNotExists -// { -// protected override void Seed(DiscoDataContext context) -// { -// context.SeedDatabase(); -// context.SaveChanges(); -// } -// } -//} +// Shouldn't Need this => Moved to Entity Migrations... + +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using System.Data.Entity; + +//namespace Disco.Data.Repository +//{ +// class DiscoDataContextInitializer : CreateDatabaseIfNotExists +// { +// protected override void Seed(DiscoDataContext context) +// { +// context.SeedDatabase(); +// context.SaveChanges(); +// } +// } +//} diff --git a/Disco.Data/Repository/DiscoDatabaseConnectionFactory.cs b/Disco.Data/Repository/DiscoDatabaseConnectionFactory.cs index 6f8ea8a0..14743084 100644 --- a/Disco.Data/Repository/DiscoDatabaseConnectionFactory.cs +++ b/Disco.Data/Repository/DiscoDatabaseConnectionFactory.cs @@ -1,88 +1,88 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data.Entity.Infrastructure; -using Microsoft.Win32; -using System.Data.Common; -using System.Security; -using System.Security.Permissions; - -namespace Disco.Data.Repository -{ - public class DiscoDatabaseConnectionFactory : IDbConnectionFactory - { - private const string DiscoRegistryKey = @"SOFTWARE\Disco"; - - private IDbConnectionFactory DefaultConnectionFactory; - private IDbConnectionFactory SqlCeConnectionFactory; - private static string _DiscoDataContextConnectionString; - - public static string DiscoDataContextConnectionString - { - get - { - if (_DiscoDataContextConnectionString == null) - { - // Retrieve from Registry - using (var key = Registry.LocalMachine.OpenSubKey(DiscoRegistryKey)) - { - if (key != null) - _DiscoDataContextConnectionString = (string)key.GetValue("DatabaseConnectionString", null); - } - } - return _DiscoDataContextConnectionString; - } - } - - public static void SetDiscoDataContextConnectionString(string ConnectionString, bool Persist) - { - // Set to Local Cache - _DiscoDataContextConnectionString = ConnectionString; - - if (Persist) - { - // Set to Registry - try - { - using (var key = Registry.LocalMachine.CreateSubKey(DiscoRegistryKey)) - { - key.SetValue("DatabaseConnectionString", ConnectionString, RegistryValueKind.String); - } - } - catch (UnauthorizedAccessException ex) - { - throw new SecurityException(string.Format("Unable to write to the Registry Location: HKML\\{0}[DatabaseConnectionString]", DiscoRegistryKey), ex); - } - } - } - - public DiscoDatabaseConnectionFactory(IDbConnectionFactory Default) - { - this.DefaultConnectionFactory = Default; - this.SqlCeConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0"); - } - - public System.Data.Common.DbConnection CreateConnection(string nameOrConnectionString) - { - if (nameOrConnectionString == "Disco.Data.Repository.DiscoDataContext") - { - - var connectionString = DiscoDataContextConnectionString; - if (connectionString == null) - { - throw new InvalidOperationException("The Disco DataContext Connection String has not been configured"); - } - - // Build DiscoDataContext - Use Default Connection Factory (SQLClient) - - //return this.DefaultConnectionFactory.CreateConnection(connectionString); - var connection = DbProviderFactories.GetFactory("System.Data.SqlClient").CreateConnection(); - connection.ConnectionString = connectionString; - return connection; - } - - return SqlCeConnectionFactory.CreateConnection(nameOrConnectionString); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data.Entity.Infrastructure; +using Microsoft.Win32; +using System.Data.Common; +using System.Security; +using System.Security.Permissions; + +namespace Disco.Data.Repository +{ + public class DiscoDatabaseConnectionFactory : IDbConnectionFactory + { + private const string DiscoRegistryKey = @"SOFTWARE\Disco"; + + private IDbConnectionFactory DefaultConnectionFactory; + private IDbConnectionFactory SqlCeConnectionFactory; + private static string _DiscoDataContextConnectionString; + + public static string DiscoDataContextConnectionString + { + get + { + if (_DiscoDataContextConnectionString == null) + { + // Retrieve from Registry + using (var key = Registry.LocalMachine.OpenSubKey(DiscoRegistryKey)) + { + if (key != null) + _DiscoDataContextConnectionString = (string)key.GetValue("DatabaseConnectionString", null); + } + } + return _DiscoDataContextConnectionString; + } + } + + public static void SetDiscoDataContextConnectionString(string ConnectionString, bool Persist) + { + // Set to Local Cache + _DiscoDataContextConnectionString = ConnectionString; + + if (Persist) + { + // Set to Registry + try + { + using (var key = Registry.LocalMachine.CreateSubKey(DiscoRegistryKey)) + { + key.SetValue("DatabaseConnectionString", ConnectionString, RegistryValueKind.String); + } + } + catch (UnauthorizedAccessException ex) + { + throw new SecurityException(string.Format("Unable to write to the Registry Location: HKML\\{0}[DatabaseConnectionString]", DiscoRegistryKey), ex); + } + } + } + + public DiscoDatabaseConnectionFactory(IDbConnectionFactory Default) + { + this.DefaultConnectionFactory = Default; + this.SqlCeConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0"); + } + + public System.Data.Common.DbConnection CreateConnection(string nameOrConnectionString) + { + if (nameOrConnectionString == "Disco.Data.Repository.DiscoDataContext") + { + + var connectionString = DiscoDataContextConnectionString; + if (connectionString == null) + { + throw new InvalidOperationException("The Disco DataContext Connection String has not been configured"); + } + + // Build DiscoDataContext - Use Default Connection Factory (SQLClient) + + //return this.DefaultConnectionFactory.CreateConnection(connectionString); + var connection = DbProviderFactories.GetFactory("System.Data.SqlClient").CreateConnection(); + connection.ConnectionString = connectionString; + return connection; + } + + return SqlCeConnectionFactory.CreateConnection(nameOrConnectionString); + } + } +} diff --git a/Disco.Data/packages.config b/Disco.Data/packages.config index bdb15dfe..027ca130 100644 --- a/Disco.Data/packages.config +++ b/Disco.Data/packages.config @@ -1,5 +1,5 @@ - - - - + + + + \ No newline at end of file diff --git a/Disco.Logging/App.config b/Disco.Logging/App.config index d87ec9c4..c4747432 100644 --- a/Disco.Logging/App.config +++ b/Disco.Logging/App.config @@ -1,14 +1,14 @@ - - - - -
- - - - - - - - + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/Disco.Logging/Disco.Logging.csproj b/Disco.Logging/Disco.Logging.csproj index a70bd2f7..8ac908b5 100644 --- a/Disco.Logging/Disco.Logging.csproj +++ b/Disco.Logging/Disco.Logging.csproj @@ -1,125 +1,125 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {BD16C575-70C2-4DDE-A572-FC79EF028CB2} - Library - Properties - Disco.Logging - Disco.Logging - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\packages\EntityFramework.4.3.1\lib\net40\EntityFramework.dll - - - ..\..\Resources\Libraries\fastJSON\fastJSON.dll - - - True - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - False - ..\packages\Newtonsoft.Json.4.5.1\lib\net40\Newtonsoft.Json.dll - - - ..\..\Resources\Libraries\Quartz\Quartz.dll - - - False - ..\packages\SignalR.Server.0.4.0.0\lib\net40\SignalR.dll - - - ..\packages\SignalR.Hosting.AspNet.0.4.0.0\lib\net40\SignalR.Hosting.AspNet.dll - - - - - - - True - ..\packages\SqlServerCompact.4.0.8482.1\lib\System.Data.SqlServerCe.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7} - Disco.Data - - - {FBC05512-FCCA-4B16-9E76-8C413C5DE6C9} - Disco.Models - - - - - - - - - - - - - - -REM if not exist "$(TargetDir)x86" md "$(TargetDir)x86" -REM xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86" -REM if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64" -REM xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64" - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {BD16C575-70C2-4DDE-A572-FC79EF028CB2} + Library + Properties + Disco.Logging + Disco.Logging + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\packages\EntityFramework.4.3.1\lib\net40\EntityFramework.dll + + + ..\..\Resources\Libraries\fastJSON\fastJSON.dll + + + True + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + False + ..\packages\Newtonsoft.Json.4.5.1\lib\net40\Newtonsoft.Json.dll + + + ..\..\Resources\Libraries\Quartz\Quartz.dll + + + False + ..\packages\SignalR.Server.0.4.0.0\lib\net40\SignalR.dll + + + ..\packages\SignalR.Hosting.AspNet.0.4.0.0\lib\net40\SignalR.Hosting.AspNet.dll + + + + + + + True + ..\packages\SqlServerCompact.4.0.8482.1\lib\System.Data.SqlServerCe.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + {85A6BD19-2C64-4746-8F2C-A68A86E8C2D7} + Disco.Data + + + {FBC05512-FCCA-4B16-9E76-8C413C5DE6C9} + Disco.Models + + + + + + + + + + + + + + +REM if not exist "$(TargetDir)x86" md "$(TargetDir)x86" +REM xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86" +REM if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64" +REM xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64" + + \ No newline at end of file diff --git a/Disco.Logging/LogBase.cs b/Disco.Logging/LogBase.cs index b7eefbca..fa382519 100644 --- a/Disco.Logging/LogBase.cs +++ b/Disco.Logging/LogBase.cs @@ -1,43 +1,43 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Logging -{ - public abstract class LogBase - { - private Dictionary _EventTypes; - - public LogBase() - { - // Cache Event Types - _EventTypes = this.LoadEventTypes().ToDictionary(et => et.Id); - } - - public abstract int ModuleId { get; } - public abstract string ModuleName { get; } - public abstract string ModuleDescription { get; } - protected abstract List LoadEventTypes(); - - public Dictionary EventTypes - { - get - { - return _EventTypes; - } - } - protected void Log(int EventTypeId, params object[] Args) - { - LogContext.Current.Log(this.ModuleId, EventTypeId, Args); - } - public string LiveLogGroupName - { - get - { - return this.ModuleName; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Logging +{ + public abstract class LogBase + { + private Dictionary _EventTypes; + + public LogBase() + { + // Cache Event Types + _EventTypes = this.LoadEventTypes().ToDictionary(et => et.Id); + } + + public abstract int ModuleId { get; } + public abstract string ModuleName { get; } + public abstract string ModuleDescription { get; } + protected abstract List LoadEventTypes(); + + public Dictionary EventTypes + { + get + { + return _EventTypes; + } + } + protected void Log(int EventTypeId, params object[] Args) + { + LogContext.Current.Log(this.ModuleId, EventTypeId, Args); + } + public string LiveLogGroupName + { + get + { + return this.ModuleName; + } + } + + } +} diff --git a/Disco.Logging/LogContext.cs b/Disco.Logging/LogContext.cs index 98213619..b0eb82aa 100644 --- a/Disco.Logging/LogContext.cs +++ b/Disco.Logging/LogContext.cs @@ -1,311 +1,311 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Data.Repository; -using System.IO; -using System.Management; -using System.Diagnostics; -using System.Data.SqlServerCe; -using System.Data.EntityClient; -using System.Data.Entity; -using Quartz; -using Quartz.Impl; -using Quartz.Impl.Triggers; - -namespace Disco.Logging -{ - public class LogContext - { - public static Dictionary LogModules { get; private set; } - private static object _LogModulesLock = new object(); - - private static LogContext _Current; - private static object _CurrentLock = new Object(); - public static LogContext Current - { - get - { - lock (_CurrentLock) - { - if (_Current == null) - throw new InvalidOperationException("Logging Context has not been Initialized"); - return _Current; - } - } - private set - { - lock (_CurrentLock) - { - _Current = value; - } - } - } - - private static void InitalizeModules() - { - if (LogModules == null) - { - lock (_LogModulesLock) - { - if (LogModules == null) - { - LogModules = new Dictionary(); - // Load all LogModules (Only from Disco Assemblies) - var appDomain = AppDomain.CurrentDomain; - - var logModuleTypes = (from a in appDomain.GetAssemblies() - where !a.GlobalAssemblyCache && !a.IsDynamic && a.FullName.StartsWith("Disco.", StringComparison.InvariantCultureIgnoreCase) - from type in a.GetTypes() - where typeof(LogBase).IsAssignableFrom(type) && !type.IsAbstract - select type); - foreach (var logModuleType in logModuleTypes) - { - var instance = (LogBase)Activator.CreateInstance(logModuleType); - LogModules[instance.ModuleId] = instance; - } - } - } - } - } - - private static void InitalizeDatabase(Targets.LogPersistContext logDbContext) - { - // Add Modules - var existingModules = logDbContext.Modules.Include("EventTypes").ToDictionary(m => m.Id); - foreach (var module in LogModules) - { - // Update/Insert Module - Models.LogModule dbModule; - if (existingModules.TryGetValue(module.Key, out dbModule)) - { - // Update - if (dbModule.Name != module.Value.ModuleName) - dbModule.Name = module.Value.ModuleName; - if (dbModule.Description != module.Value.ModuleDescription) - dbModule.Description = module.Value.ModuleDescription; - } - else - { - // Insert - dbModule = new Models.LogModule() - { - Id = module.Key, - Name = module.Value.ModuleName, - Description = module.Value.ModuleDescription - }; - logDbContext.Modules.Add(dbModule); - } - // Update/Insert Event Types - Dictionary existingEventTypes = (dbModule.EventTypes == null) ? new Dictionary() : dbModule.EventTypes.ToDictionary(et => et.Id); - foreach (var eventType in module.Value.EventTypes) - { - Models.LogEventType dbEventType; - if (existingEventTypes.TryGetValue(eventType.Key, out dbEventType)) - { - // Update - if (dbEventType.Name != eventType.Value.Name) - dbEventType.Name = eventType.Value.Name; - if (dbEventType.Severity != eventType.Value.Severity) - dbEventType.Severity = eventType.Value.Severity; - if (dbEventType.Format != eventType.Value.Format) - dbEventType.Format = eventType.Value.Format; - } - else - { - // Insert - dbEventType = new Models.LogEventType() - { - Id = eventType.Key, - ModuleId = module.Key, - Name = eventType.Value.Name, - Severity = eventType.Value.Severity, - Format = eventType.Value.Format - }; - logDbContext.EventTypes.Add(dbEventType); - } - } - } - - logDbContext.SaveChanges(); - } - - public static string LogFileBasePath(DiscoDataContext DiscoContext) - { - var logDirectoryBase = Path.Combine(DiscoContext.DiscoConfiguration.DataStoreLocation, "Logs"); - // Create Directory Structure - if (!Directory.Exists(logDirectoryBase)) - { - Directory.CreateDirectory(logDirectoryBase); - } - // Ensure Logs are NTFS Compressed - TODO... - //Utilities.CompressDirectory(logDirectory); - // WMI - Doesn't Work for Network Folders... - //var logDirectoryBaseInfo = new DirectoryInfo(logDirectoryBase); - //if ((logDirectoryBaseInfo.Attributes & FileAttributes.Compressed) != FileAttributes.Compressed) - //{ - // var logDirectoryWmiPath = string.Format("Win32_Directory.Name=\"{0}\"", logDirectoryBase); - // using (ManagementObject logDirectoryBaseMO = new ManagementObject(logDirectoryWmiPath)) - // { - // ManagementBaseObject outParams = logDirectoryBaseMO.InvokeMethod("Compress", null, null); - // Debug.WriteLine("LoggingContext.InitalizeCurrent: Compressing Log Folder; Result: " + outParams.Properties["ReturnValue"].Value.ToString()); - // } - //} - return logDirectoryBase; - } - - public static string LogFilePath(DiscoDataContext DiscoContext, DateTime Date, bool CreateDirectory = true) - { - var logDirectoryBase = LogFileBasePath(DiscoContext); - var logDirectory = Path.Combine(logDirectoryBase, Date.Year.ToString()); - if (CreateDirectory && !Directory.Exists(logDirectory)) - { - Directory.CreateDirectory(logDirectory); - } - var logFileName = string.Format("DiscoLog_{0:yyy-MM-dd}.sdf", Date); - return Path.Combine(logDirectory, logFileName); - } - - internal static void ReInitalize(DiscoDataContext DiscoContext) - { - lock (_CurrentLock) - { - var logPath = LogFilePath(DiscoContext, DateTime.Today); - - //var connectionString = string.Format("Data Source=\"{0}\"", logPath); - - SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); - sqlCeCSB.DataSource = logPath; - var connectionString = sqlCeCSB.ToString(); - - // Ensure Database Exists - if (!File.Exists(logPath)) - { - // Create Database - using (var context = new Targets.LogPersistContext(connectionString)) - { - context.Database.CreateIfNotExists(); - } - } - - // Add Modules/Event Types - InitalizeModules(); - using (var context = new Targets.LogPersistContext(connectionString)) - { - InitalizeDatabase(context); - } - - // Create Current LogContext - var currentLogContext = new LogContext(logPath, connectionString); - _Current = currentLogContext; - } - SystemLog.LogLogInitialized(_Current.PersistantStorePath); - try - { - // Get Yesterdays Log - var yesterdaysLogPath = LogFilePath(DiscoContext, DateTime.Today.AddDays(-1), false); - if (File.Exists(yesterdaysLogPath)) - { - SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); - sqlCeCSB.DataSource = yesterdaysLogPath; - var connectionString = sqlCeCSB.ToString(); - int logCount; - using (var context = new Targets.LogPersistContext(connectionString)) - { - logCount = context.Events.Where(e => !(e.ModuleId == 0 && e.EventTypeId == 100)).Count(); - if (logCount == 0) - { - // Delete (empty) Database - context.Database.Delete(); - } - } - } - } - catch (Exception ex) - { - SystemLog.LogError("Error occurred while investigating yesterdays log for deletion", ex.GetType().Name, ex.Message, ex.StackTrace); - } - } - - private static IScheduler _ReInitializeScheduler; - public static void Initalize(DiscoDataContext DiscoContext, ISchedulerFactory SchedulerFactory) - { - ReInitalize(DiscoContext); - - _ReInitializeScheduler = SchedulerFactory.GetScheduler(); - - var reInitalizeJobDetail = new JobDetailImpl("DiscoLogContextReinialize", typeof(LogReInitalizeJob)); - - // Simple Trigger - Issue with Day light savings - //var reInitalizeTrigger = TriggerBuilder.Create() - // .WithIdentity("DiscoLogContextReinializeTrigger") - // .StartAt(DateBuilder.TomorrowAt(0,0,0)) - // .WithSchedule(SimpleScheduleBuilder.Create().WithIntervalInHours(24).RepeatForever()) - // .Build(); - // Use Cron Schedule instead - var reInitalizeTrigger = TriggerBuilder.Create() - .WithIdentity("DiscoLogContextReinializeTrigger") - .StartNow() - .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 0)) // Midnight - .Build(); - - _ReInitializeScheduler.ScheduleJob(reInitalizeJobDetail, reInitalizeTrigger); - } - public static string LiveLogAllEventsGroupName - { - get - { - return Targets.LogLiveContext.LiveLogNameAll; - } - } - - private LogContext(string PersistantStorePath, string PersistantStoreConnectionString) - { - this.PersistantStorePath = PersistantStorePath; - this.PersistantStoreConnectionString = PersistantStoreConnectionString; - } - - public string PersistantStorePath { get; private set; } - public string PersistantStoreConnectionString { get; private set; } - - public void Log(int ModuleId, int EventTypeId, params object[] Args) - { - LogBase logModule; - if (LogModules.TryGetValue(ModuleId, out logModule)) - { - Models.LogEventType eventType; - if (logModule.EventTypes.TryGetValue(EventTypeId, out eventType)) - { - var eventTimestamp = DateTime.Now; - if (eventType.UseLive) - { - Targets.LogLiveContext.Broadcast(logModule, eventType, eventTimestamp, Args); - } - if (eventType.UsePersist) - { - string args = null; - if (Args != null && Args.Length > 0) - args = fastJSON.JSON.Instance.ToJSON(Args, false); - using (var context = new Targets.LogPersistContext(PersistantStoreConnectionString)) - { - var e = new Models.LogEvent() - { - Timestamp = eventTimestamp, - ModuleId = logModule.ModuleId, - EventTypeId = eventType.Id, - Arguments = args - }; - context.Events.Add(e); - context.SaveChanges(); - } - } - } - else - throw new InvalidOperationException(string.Format("Unknown Log Event Type Called: {0} (for Module: {1})", EventTypeId, ModuleId)); - } - else - throw new InvalidOperationException(string.Format("Unknown Log Module Called: {0}", ModuleId)); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Data.Repository; +using System.IO; +using System.Management; +using System.Diagnostics; +using System.Data.SqlServerCe; +using System.Data.EntityClient; +using System.Data.Entity; +using Quartz; +using Quartz.Impl; +using Quartz.Impl.Triggers; + +namespace Disco.Logging +{ + public class LogContext + { + public static Dictionary LogModules { get; private set; } + private static object _LogModulesLock = new object(); + + private static LogContext _Current; + private static object _CurrentLock = new Object(); + public static LogContext Current + { + get + { + lock (_CurrentLock) + { + if (_Current == null) + throw new InvalidOperationException("Logging Context has not been Initialized"); + return _Current; + } + } + private set + { + lock (_CurrentLock) + { + _Current = value; + } + } + } + + private static void InitalizeModules() + { + if (LogModules == null) + { + lock (_LogModulesLock) + { + if (LogModules == null) + { + LogModules = new Dictionary(); + // Load all LogModules (Only from Disco Assemblies) + var appDomain = AppDomain.CurrentDomain; + + var logModuleTypes = (from a in appDomain.GetAssemblies() + where !a.GlobalAssemblyCache && !a.IsDynamic && a.FullName.StartsWith("Disco.", StringComparison.InvariantCultureIgnoreCase) + from type in a.GetTypes() + where typeof(LogBase).IsAssignableFrom(type) && !type.IsAbstract + select type); + foreach (var logModuleType in logModuleTypes) + { + var instance = (LogBase)Activator.CreateInstance(logModuleType); + LogModules[instance.ModuleId] = instance; + } + } + } + } + } + + private static void InitalizeDatabase(Targets.LogPersistContext logDbContext) + { + // Add Modules + var existingModules = logDbContext.Modules.Include("EventTypes").ToDictionary(m => m.Id); + foreach (var module in LogModules) + { + // Update/Insert Module + Models.LogModule dbModule; + if (existingModules.TryGetValue(module.Key, out dbModule)) + { + // Update + if (dbModule.Name != module.Value.ModuleName) + dbModule.Name = module.Value.ModuleName; + if (dbModule.Description != module.Value.ModuleDescription) + dbModule.Description = module.Value.ModuleDescription; + } + else + { + // Insert + dbModule = new Models.LogModule() + { + Id = module.Key, + Name = module.Value.ModuleName, + Description = module.Value.ModuleDescription + }; + logDbContext.Modules.Add(dbModule); + } + // Update/Insert Event Types + Dictionary existingEventTypes = (dbModule.EventTypes == null) ? new Dictionary() : dbModule.EventTypes.ToDictionary(et => et.Id); + foreach (var eventType in module.Value.EventTypes) + { + Models.LogEventType dbEventType; + if (existingEventTypes.TryGetValue(eventType.Key, out dbEventType)) + { + // Update + if (dbEventType.Name != eventType.Value.Name) + dbEventType.Name = eventType.Value.Name; + if (dbEventType.Severity != eventType.Value.Severity) + dbEventType.Severity = eventType.Value.Severity; + if (dbEventType.Format != eventType.Value.Format) + dbEventType.Format = eventType.Value.Format; + } + else + { + // Insert + dbEventType = new Models.LogEventType() + { + Id = eventType.Key, + ModuleId = module.Key, + Name = eventType.Value.Name, + Severity = eventType.Value.Severity, + Format = eventType.Value.Format + }; + logDbContext.EventTypes.Add(dbEventType); + } + } + } + + logDbContext.SaveChanges(); + } + + public static string LogFileBasePath(DiscoDataContext DiscoContext) + { + var logDirectoryBase = Path.Combine(DiscoContext.DiscoConfiguration.DataStoreLocation, "Logs"); + // Create Directory Structure + if (!Directory.Exists(logDirectoryBase)) + { + Directory.CreateDirectory(logDirectoryBase); + } + // Ensure Logs are NTFS Compressed - TODO... + //Utilities.CompressDirectory(logDirectory); + // WMI - Doesn't Work for Network Folders... + //var logDirectoryBaseInfo = new DirectoryInfo(logDirectoryBase); + //if ((logDirectoryBaseInfo.Attributes & FileAttributes.Compressed) != FileAttributes.Compressed) + //{ + // var logDirectoryWmiPath = string.Format("Win32_Directory.Name=\"{0}\"", logDirectoryBase); + // using (ManagementObject logDirectoryBaseMO = new ManagementObject(logDirectoryWmiPath)) + // { + // ManagementBaseObject outParams = logDirectoryBaseMO.InvokeMethod("Compress", null, null); + // Debug.WriteLine("LoggingContext.InitalizeCurrent: Compressing Log Folder; Result: " + outParams.Properties["ReturnValue"].Value.ToString()); + // } + //} + return logDirectoryBase; + } + + public static string LogFilePath(DiscoDataContext DiscoContext, DateTime Date, bool CreateDirectory = true) + { + var logDirectoryBase = LogFileBasePath(DiscoContext); + var logDirectory = Path.Combine(logDirectoryBase, Date.Year.ToString()); + if (CreateDirectory && !Directory.Exists(logDirectory)) + { + Directory.CreateDirectory(logDirectory); + } + var logFileName = string.Format("DiscoLog_{0:yyy-MM-dd}.sdf", Date); + return Path.Combine(logDirectory, logFileName); + } + + internal static void ReInitalize(DiscoDataContext DiscoContext) + { + lock (_CurrentLock) + { + var logPath = LogFilePath(DiscoContext, DateTime.Today); + + //var connectionString = string.Format("Data Source=\"{0}\"", logPath); + + SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); + sqlCeCSB.DataSource = logPath; + var connectionString = sqlCeCSB.ToString(); + + // Ensure Database Exists + if (!File.Exists(logPath)) + { + // Create Database + using (var context = new Targets.LogPersistContext(connectionString)) + { + context.Database.CreateIfNotExists(); + } + } + + // Add Modules/Event Types + InitalizeModules(); + using (var context = new Targets.LogPersistContext(connectionString)) + { + InitalizeDatabase(context); + } + + // Create Current LogContext + var currentLogContext = new LogContext(logPath, connectionString); + _Current = currentLogContext; + } + SystemLog.LogLogInitialized(_Current.PersistantStorePath); + try + { + // Get Yesterdays Log + var yesterdaysLogPath = LogFilePath(DiscoContext, DateTime.Today.AddDays(-1), false); + if (File.Exists(yesterdaysLogPath)) + { + SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); + sqlCeCSB.DataSource = yesterdaysLogPath; + var connectionString = sqlCeCSB.ToString(); + int logCount; + using (var context = new Targets.LogPersistContext(connectionString)) + { + logCount = context.Events.Where(e => !(e.ModuleId == 0 && e.EventTypeId == 100)).Count(); + if (logCount == 0) + { + // Delete (empty) Database + context.Database.Delete(); + } + } + } + } + catch (Exception ex) + { + SystemLog.LogError("Error occurred while investigating yesterdays log for deletion", ex.GetType().Name, ex.Message, ex.StackTrace); + } + } + + private static IScheduler _ReInitializeScheduler; + public static void Initalize(DiscoDataContext DiscoContext, ISchedulerFactory SchedulerFactory) + { + ReInitalize(DiscoContext); + + _ReInitializeScheduler = SchedulerFactory.GetScheduler(); + + var reInitalizeJobDetail = new JobDetailImpl("DiscoLogContextReinialize", typeof(LogReInitalizeJob)); + + // Simple Trigger - Issue with Day light savings + //var reInitalizeTrigger = TriggerBuilder.Create() + // .WithIdentity("DiscoLogContextReinializeTrigger") + // .StartAt(DateBuilder.TomorrowAt(0,0,0)) + // .WithSchedule(SimpleScheduleBuilder.Create().WithIntervalInHours(24).RepeatForever()) + // .Build(); + // Use Cron Schedule instead + var reInitalizeTrigger = TriggerBuilder.Create() + .WithIdentity("DiscoLogContextReinializeTrigger") + .StartNow() + .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 0)) // Midnight + .Build(); + + _ReInitializeScheduler.ScheduleJob(reInitalizeJobDetail, reInitalizeTrigger); + } + public static string LiveLogAllEventsGroupName + { + get + { + return Targets.LogLiveContext.LiveLogNameAll; + } + } + + private LogContext(string PersistantStorePath, string PersistantStoreConnectionString) + { + this.PersistantStorePath = PersistantStorePath; + this.PersistantStoreConnectionString = PersistantStoreConnectionString; + } + + public string PersistantStorePath { get; private set; } + public string PersistantStoreConnectionString { get; private set; } + + public void Log(int ModuleId, int EventTypeId, params object[] Args) + { + LogBase logModule; + if (LogModules.TryGetValue(ModuleId, out logModule)) + { + Models.LogEventType eventType; + if (logModule.EventTypes.TryGetValue(EventTypeId, out eventType)) + { + var eventTimestamp = DateTime.Now; + if (eventType.UseLive) + { + Targets.LogLiveContext.Broadcast(logModule, eventType, eventTimestamp, Args); + } + if (eventType.UsePersist) + { + string args = null; + if (Args != null && Args.Length > 0) + args = fastJSON.JSON.Instance.ToJSON(Args, false); + using (var context = new Targets.LogPersistContext(PersistantStoreConnectionString)) + { + var e = new Models.LogEvent() + { + Timestamp = eventTimestamp, + ModuleId = logModule.ModuleId, + EventTypeId = eventType.Id, + Arguments = args + }; + context.Events.Add(e); + context.SaveChanges(); + } + } + } + else + throw new InvalidOperationException(string.Format("Unknown Log Event Type Called: {0} (for Module: {1})", EventTypeId, ModuleId)); + } + else + throw new InvalidOperationException(string.Format("Unknown Log Module Called: {0}", ModuleId)); + } + + } +} diff --git a/Disco.Logging/LogReInitalizeJob.cs b/Disco.Logging/LogReInitalizeJob.cs index bf2b1d54..04767a95 100644 --- a/Disco.Logging/LogReInitalizeJob.cs +++ b/Disco.Logging/LogReInitalizeJob.cs @@ -1,20 +1,20 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Quartz; -using Disco.Data.Repository; - -namespace Disco.Logging -{ - class LogReInitalizeJob : IJob - { - public void Execute(IJobExecutionContext context) - { - using (DiscoDataContext DiscoContext = new DiscoDataContext()) - { - LogContext.ReInitalize(DiscoContext); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Quartz; +using Disco.Data.Repository; + +namespace Disco.Logging +{ + class LogReInitalizeJob : IJob + { + public void Execute(IJobExecutionContext context) + { + using (DiscoDataContext DiscoContext = new DiscoDataContext()) + { + LogContext.ReInitalize(DiscoContext); + } + } + } +} diff --git a/Disco.Logging/Models/LogEvent.cs b/Disco.Logging/Models/LogEvent.cs index ef15417c..bad62688 100644 --- a/Disco.Logging/Models/LogEvent.cs +++ b/Disco.Logging/Models/LogEvent.cs @@ -1,22 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; - -namespace Disco.Logging.Models -{ - [Table("Events")] - public class LogEvent - { - [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int Id { get; set; } - [Required] - public int ModuleId { get; set; } - [Required] - public int EventTypeId { get; set; } - [Required] - public DateTime Timestamp { get; set; } - public string Arguments { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; + +namespace Disco.Logging.Models +{ + [Table("Events")] + public class LogEvent + { + [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + [Required] + public int ModuleId { get; set; } + [Required] + public int EventTypeId { get; set; } + [Required] + public DateTime Timestamp { get; set; } + public string Arguments { get; set; } + } +} diff --git a/Disco.Logging/Models/LogEventType.cs b/Disco.Logging/Models/LogEventType.cs index 56c55327..89ac5bdf 100644 --- a/Disco.Logging/Models/LogEventType.cs +++ b/Disco.Logging/Models/LogEventType.cs @@ -1,66 +1,66 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; - -namespace Disco.Logging.Models -{ - [Table("EventTypes")] - public class LogEventType - { - [Required, Key, Column(Order=0), DatabaseGenerated(DatabaseGeneratedOption.None)] - public int ModuleId { get; set; } - [Required, Key, Column(Order = 1), DatabaseGenerated(DatabaseGeneratedOption.None)] - public int Id { get; set; } - [Required, MaxLength(200)] - public string Name { get; set; } - [Required] - public int Severity { get; set; } - [MaxLength(1024)] - public string Format { get; set; } - - [NotMapped] - public bool UsePersist { get; set; } - [NotMapped] - public bool UseLive { get; set; } - [NotMapped] - public bool UseDisplay { get; set; } - - [ForeignKey("ModuleId")] - public LogModule Module { get; set; } - - public enum Severities - { - Information = 0, - Warning = 1, - Error = 2 - } - - public string FormatMessage(object[] Arguments) - { - - if (Arguments != null && Arguments.Length > 0) - { - if (!string.IsNullOrEmpty(Format)) - { - return string.Format(Format, Arguments); - } - else - { - return Arguments - .Select(v => v == null ? string.Empty : v.ToString()) - .Aggregate((a, b) => a + ", " + (b == null ? string.Empty : b)); - } - } - else - { - if (!string.IsNullOrEmpty(Format)) - { - return Format; - } - } - return string.Empty; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; + +namespace Disco.Logging.Models +{ + [Table("EventTypes")] + public class LogEventType + { + [Required, Key, Column(Order=0), DatabaseGenerated(DatabaseGeneratedOption.None)] + public int ModuleId { get; set; } + [Required, Key, Column(Order = 1), DatabaseGenerated(DatabaseGeneratedOption.None)] + public int Id { get; set; } + [Required, MaxLength(200)] + public string Name { get; set; } + [Required] + public int Severity { get; set; } + [MaxLength(1024)] + public string Format { get; set; } + + [NotMapped] + public bool UsePersist { get; set; } + [NotMapped] + public bool UseLive { get; set; } + [NotMapped] + public bool UseDisplay { get; set; } + + [ForeignKey("ModuleId")] + public LogModule Module { get; set; } + + public enum Severities + { + Information = 0, + Warning = 1, + Error = 2 + } + + public string FormatMessage(object[] Arguments) + { + + if (Arguments != null && Arguments.Length > 0) + { + if (!string.IsNullOrEmpty(Format)) + { + return string.Format(Format, Arguments); + } + else + { + return Arguments + .Select(v => v == null ? string.Empty : v.ToString()) + .Aggregate((a, b) => a + ", " + (b == null ? string.Empty : b)); + } + } + else + { + if (!string.IsNullOrEmpty(Format)) + { + return Format; + } + } + return string.Empty; + } + } +} diff --git a/Disco.Logging/Models/LogLiveEvent.cs b/Disco.Logging/Models/LogLiveEvent.cs index bb558014..22bdcbf0 100644 --- a/Disco.Logging/Models/LogLiveEvent.cs +++ b/Disco.Logging/Models/LogLiveEvent.cs @@ -1,57 +1,57 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections; - -namespace Disco.Logging.Models -{ - public class LogLiveEvent - { - public int ModuleId { get; set; } - public string ModuleName { get; set; } - public string ModuleDescription { get; set; } - public int EventTypeId { get; set; } - public string EventTypeName { get; set; } - public int EventTypeSeverity { get; set; } - - public DateTime Timestamp { get; set; } - public object[] Arguments { get; set; } - public string FormattedMessage { get; set; } - public string FormattedTimestamp { get; set; } - public bool UseDisplay { get; set; } - - public static LogLiveEvent Create(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, string jsonArguments) - { - object[] Arguments = null; - if (jsonArguments != null) - { - var alArguments = fastJSON.JSON.Instance.Parse(jsonArguments) as ArrayList; - if (alArguments != null) - { - Arguments = alArguments.ToArray(); - } - } - return Create(logModule, eventType, Timestamp, Arguments); - } - - public static LogLiveEvent Create(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, params object[] Arguments) - { - return new Models.LogLiveEvent() - { - ModuleId = logModule.ModuleId, - ModuleName = logModule.ModuleName, - ModuleDescription = logModule.ModuleDescription, - EventTypeId = eventType.Id, - EventTypeName = eventType.Name, - EventTypeSeverity = eventType.Severity, - Timestamp = Timestamp, - Arguments = Arguments, - FormattedMessage = eventType.FormatMessage(Arguments), - FormattedTimestamp = Timestamp.ToString("dd/MM/yyy hh:mm:ss tt"), - UseDisplay = eventType.UseDisplay - }; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections; + +namespace Disco.Logging.Models +{ + public class LogLiveEvent + { + public int ModuleId { get; set; } + public string ModuleName { get; set; } + public string ModuleDescription { get; set; } + public int EventTypeId { get; set; } + public string EventTypeName { get; set; } + public int EventTypeSeverity { get; set; } + + public DateTime Timestamp { get; set; } + public object[] Arguments { get; set; } + public string FormattedMessage { get; set; } + public string FormattedTimestamp { get; set; } + public bool UseDisplay { get; set; } + + public static LogLiveEvent Create(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, string jsonArguments) + { + object[] Arguments = null; + if (jsonArguments != null) + { + var alArguments = fastJSON.JSON.Instance.Parse(jsonArguments) as ArrayList; + if (alArguments != null) + { + Arguments = alArguments.ToArray(); + } + } + return Create(logModule, eventType, Timestamp, Arguments); + } + + public static LogLiveEvent Create(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, params object[] Arguments) + { + return new Models.LogLiveEvent() + { + ModuleId = logModule.ModuleId, + ModuleName = logModule.ModuleName, + ModuleDescription = logModule.ModuleDescription, + EventTypeId = eventType.Id, + EventTypeName = eventType.Name, + EventTypeSeverity = eventType.Severity, + Timestamp = Timestamp, + Arguments = Arguments, + FormattedMessage = eventType.FormatMessage(Arguments), + FormattedTimestamp = Timestamp.ToString("dd/MM/yyy hh:mm:ss tt"), + UseDisplay = eventType.UseDisplay + }; + } + + } +} diff --git a/Disco.Logging/Models/LogModule.cs b/Disco.Logging/Models/LogModule.cs index 88488575..ffc8dd41 100644 --- a/Disco.Logging/Models/LogModule.cs +++ b/Disco.Logging/Models/LogModule.cs @@ -1,21 +1,21 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; - -namespace Disco.Logging.Models -{ - [Table("Modules")] - public class LogModule - { - [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)] - public int Id { get; set; } - [Required, MaxLength(200)] - public string Name { get; set; } - [Required, MaxLength(500)] - public string Description { get; set; } - - public virtual IList EventTypes { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; + +namespace Disco.Logging.Models +{ + [Table("Modules")] + public class LogModule + { + [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)] + public int Id { get; set; } + [Required, MaxLength(200)] + public string Name { get; set; } + [Required, MaxLength(500)] + public string Description { get; set; } + + public virtual IList EventTypes { get; set; } + } +} diff --git a/Disco.Logging/Properties/AssemblyInfo.cs b/Disco.Logging/Properties/AssemblyInfo.cs index 4e064f91..21404bbc 100644 --- a/Disco.Logging/Properties/AssemblyInfo.cs +++ b/Disco.Logging/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Disco - Logging")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Disco")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("03a4a5bf-60c6-4dff-b623-387043b8be86")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2012.0627.1427")] -[assembly: AssemblyFileVersion("1.2012.0627.1427")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Disco - Logging")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Disco")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("03a4a5bf-60c6-4dff-b623-387043b8be86")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.2012.0627.1427")] +[assembly: AssemblyFileVersion("1.2012.0627.1427")] diff --git a/Disco.Logging/ReadLogContext.cs b/Disco.Logging/ReadLogContext.cs index cf13976d..81f0a306 100644 --- a/Disco.Logging/ReadLogContext.cs +++ b/Disco.Logging/ReadLogContext.cs @@ -1,179 +1,179 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Logging.Targets; -using Disco.Data.Repository; -using System.IO; -using System.Text.RegularExpressions; -using System.Data.SqlServerCe; -using Disco.Logging.Models; - -namespace Disco.Logging -{ - public class ReadLogContext - { - public DateTime? Start { get; set; } - public DateTime? End { get; set; } - public int? Take { get; set; } - public int? Module { get; set; } - public List EventTypes { get; set; } - - public bool Validate() - { - if (this.Start.HasValue && this.End.HasValue && this.End.Value < this.Start.Value) - throw new ArgumentOutOfRangeException("End", "End must be greater than Start"); - if (this.Start.HasValue && !this.End.HasValue && this.Start > DateTime.Now) - throw new ArgumentOutOfRangeException("Start", "Start must be less than current time"); - - return true; - } - - public List Query(DiscoDataContext DiscoContext) - { - List results = new List(); - - // Validate Options - this.Validate(); - - var relevantLogFiles = RelevantLogFiles(DiscoContext); - relevantLogFiles.Reverse(); - foreach (var logFile in relevantLogFiles) - { - SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); - sqlCeCSB.DataSource = logFile.Item1; - - var logModules = LogContext.LogModules; - - using (var context = new Targets.LogPersistContext(sqlCeCSB.ToString())) - { - var query = this.BuildQuery(context, logFile.Item2, results.Count); - IEnumerable queryResults = query; // Run the Query - results.AddRange(queryResults.Select(le => Models.LogLiveEvent.Create(logModules[le.ModuleId], logModules[le.ModuleId].EventTypes[le.EventTypeId], le.Timestamp, le.Arguments))); - } - if (this.Take.HasValue && this.Take.Value < results.Count) - break; - } - return results; - } - - private static Regex LogFileDateRegex = new Regex("DiscoLog_([0-9]{4})-([0-9]{2})-([0-9]{2}).sdf", RegexOptions.IgnoreCase); - private static DateTime? LogFileDate(string LogFilePath) - { - var fileNameMatch = LogFileDateRegex.Match(LogFilePath); - if (fileNameMatch.Success) - { - return new DateTime(int.Parse(fileNameMatch.Groups[1].Value), - int.Parse(fileNameMatch.Groups[2].Value), - int.Parse(fileNameMatch.Groups[3].Value)); - } - else - { - return null; - } - } - - private List> RelevantLogFiles(DiscoDataContext DiscoContext) - { - List> relevantFiles = new List>(); - var logDirectoryBase = LogContext.LogFileBasePath(DiscoContext); - var logDirectoryBaseInfo = new DirectoryInfo(logDirectoryBase); - var endDate = this.End.HasValue ? this.End.Value : DateTime.Now; - var endDateYear = endDate.Year.ToString(); - - // Try Shortcut ( < 31 Days in Query) - if (this.Start.HasValue) - { - if ((this.End.HasValue && this.End.Value.Subtract(this.Start.Value).Days < 31) || - (!this.End.HasValue && DateTime.Now.Subtract(this.Start.Value).Days < 31)) - { - // Less than 31 Days in Query - Just evaluate each Path - var queryDate = this.Start.Value.Date; - while (queryDate <= endDate) - { - var fileName = LogContext.LogFilePath(DiscoContext, queryDate, false); - if (File.Exists(fileName)) - relevantFiles.Add(new Tuple(fileName, LogFileDate(fileName).Value)); - - queryDate = queryDate.AddDays(1); - } - return relevantFiles; - } - } - - List logYears = new List(); - foreach (var directoryName in logDirectoryBaseInfo.GetDirectories()) - { - int directoryYear; - if (int.TryParse(directoryName.Name, out directoryYear)) - { - logYears.Add(directoryName.Name); - } - } - logYears.Sort(); - - foreach (var logYear in logYears) - { - List logFiles = Directory.EnumerateFiles(Path.Combine(logDirectoryBase, logYear), "DiscoLog_*.sdf").ToList(); - logFiles.Sort(); - if (logYear != endDateYear) - { - foreach (var logFile in logFiles) - { - relevantFiles.Add(new Tuple(logFile, LogFileDate(logFile).Value)); - } - } - else - { - foreach (var logFile in logFiles) - { - var fileNameDate = LogFileDate(logFile); - if (fileNameDate != null) - { - if (fileNameDate.Value < endDate) - { - relevantFiles.Add(new Tuple(logFile, fileNameDate.Value)); - } - else - { - break; // Files are sorted, must be no more... - } - } - } - break; // Years are sorted, must be no more... - } - } - return relevantFiles; - } - - private IQueryable BuildQuery(LogPersistContext LogContext, DateTime LogDate, int Taken) - { - IQueryable query = LogContext.Events.OrderByDescending(le => le.Timestamp); - if (this.Module.HasValue) - { - query = query.Where(le => le.ModuleId == this.Module.Value); - } - if (this.EventTypes != null && this.EventTypes.Count > 0) - { - query = query.Where(le => this.EventTypes.Contains(le.EventTypeId)); - } - if (this.Start.HasValue && this.Start.Value > LogDate) - { - var startValue = DateTime.SpecifyKind(this.Start.Value, DateTimeKind.Local); - query = query.Where(le => le.Timestamp > startValue); - } - if (this.End.HasValue && this.End.Value <= LogDate.AddDays(1)) - { - var endValue = DateTime.SpecifyKind(this.End.Value, DateTimeKind.Local); - query = query.Where(le => le.Timestamp < endValue); - } - if (this.Take.HasValue && this.Take.Value > 0) - { - var take = this.Take.Value - Taken; - query = query.Take(take); - } - return query; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Logging.Targets; +using Disco.Data.Repository; +using System.IO; +using System.Text.RegularExpressions; +using System.Data.SqlServerCe; +using Disco.Logging.Models; + +namespace Disco.Logging +{ + public class ReadLogContext + { + public DateTime? Start { get; set; } + public DateTime? End { get; set; } + public int? Take { get; set; } + public int? Module { get; set; } + public List EventTypes { get; set; } + + public bool Validate() + { + if (this.Start.HasValue && this.End.HasValue && this.End.Value < this.Start.Value) + throw new ArgumentOutOfRangeException("End", "End must be greater than Start"); + if (this.Start.HasValue && !this.End.HasValue && this.Start > DateTime.Now) + throw new ArgumentOutOfRangeException("Start", "Start must be less than current time"); + + return true; + } + + public List Query(DiscoDataContext DiscoContext) + { + List results = new List(); + + // Validate Options + this.Validate(); + + var relevantLogFiles = RelevantLogFiles(DiscoContext); + relevantLogFiles.Reverse(); + foreach (var logFile in relevantLogFiles) + { + SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); + sqlCeCSB.DataSource = logFile.Item1; + + var logModules = LogContext.LogModules; + + using (var context = new Targets.LogPersistContext(sqlCeCSB.ToString())) + { + var query = this.BuildQuery(context, logFile.Item2, results.Count); + IEnumerable queryResults = query; // Run the Query + results.AddRange(queryResults.Select(le => Models.LogLiveEvent.Create(logModules[le.ModuleId], logModules[le.ModuleId].EventTypes[le.EventTypeId], le.Timestamp, le.Arguments))); + } + if (this.Take.HasValue && this.Take.Value < results.Count) + break; + } + return results; + } + + private static Regex LogFileDateRegex = new Regex("DiscoLog_([0-9]{4})-([0-9]{2})-([0-9]{2}).sdf", RegexOptions.IgnoreCase); + private static DateTime? LogFileDate(string LogFilePath) + { + var fileNameMatch = LogFileDateRegex.Match(LogFilePath); + if (fileNameMatch.Success) + { + return new DateTime(int.Parse(fileNameMatch.Groups[1].Value), + int.Parse(fileNameMatch.Groups[2].Value), + int.Parse(fileNameMatch.Groups[3].Value)); + } + else + { + return null; + } + } + + private List> RelevantLogFiles(DiscoDataContext DiscoContext) + { + List> relevantFiles = new List>(); + var logDirectoryBase = LogContext.LogFileBasePath(DiscoContext); + var logDirectoryBaseInfo = new DirectoryInfo(logDirectoryBase); + var endDate = this.End.HasValue ? this.End.Value : DateTime.Now; + var endDateYear = endDate.Year.ToString(); + + // Try Shortcut ( < 31 Days in Query) + if (this.Start.HasValue) + { + if ((this.End.HasValue && this.End.Value.Subtract(this.Start.Value).Days < 31) || + (!this.End.HasValue && DateTime.Now.Subtract(this.Start.Value).Days < 31)) + { + // Less than 31 Days in Query - Just evaluate each Path + var queryDate = this.Start.Value.Date; + while (queryDate <= endDate) + { + var fileName = LogContext.LogFilePath(DiscoContext, queryDate, false); + if (File.Exists(fileName)) + relevantFiles.Add(new Tuple(fileName, LogFileDate(fileName).Value)); + + queryDate = queryDate.AddDays(1); + } + return relevantFiles; + } + } + + List logYears = new List(); + foreach (var directoryName in logDirectoryBaseInfo.GetDirectories()) + { + int directoryYear; + if (int.TryParse(directoryName.Name, out directoryYear)) + { + logYears.Add(directoryName.Name); + } + } + logYears.Sort(); + + foreach (var logYear in logYears) + { + List logFiles = Directory.EnumerateFiles(Path.Combine(logDirectoryBase, logYear), "DiscoLog_*.sdf").ToList(); + logFiles.Sort(); + if (logYear != endDateYear) + { + foreach (var logFile in logFiles) + { + relevantFiles.Add(new Tuple(logFile, LogFileDate(logFile).Value)); + } + } + else + { + foreach (var logFile in logFiles) + { + var fileNameDate = LogFileDate(logFile); + if (fileNameDate != null) + { + if (fileNameDate.Value < endDate) + { + relevantFiles.Add(new Tuple(logFile, fileNameDate.Value)); + } + else + { + break; // Files are sorted, must be no more... + } + } + } + break; // Years are sorted, must be no more... + } + } + return relevantFiles; + } + + private IQueryable BuildQuery(LogPersistContext LogContext, DateTime LogDate, int Taken) + { + IQueryable query = LogContext.Events.OrderByDescending(le => le.Timestamp); + if (this.Module.HasValue) + { + query = query.Where(le => le.ModuleId == this.Module.Value); + } + if (this.EventTypes != null && this.EventTypes.Count > 0) + { + query = query.Where(le => this.EventTypes.Contains(le.EventTypeId)); + } + if (this.Start.HasValue && this.Start.Value > LogDate) + { + var startValue = DateTime.SpecifyKind(this.Start.Value, DateTimeKind.Local); + query = query.Where(le => le.Timestamp > startValue); + } + if (this.End.HasValue && this.End.Value <= LogDate.AddDays(1)) + { + var endValue = DateTime.SpecifyKind(this.End.Value, DateTimeKind.Local); + query = query.Where(le => le.Timestamp < endValue); + } + if (this.Take.HasValue && this.Take.Value > 0) + { + var take = this.Take.Value - Taken; + query = query.Take(take); + } + return query; + } + + } +} diff --git a/Disco.Logging/SystemLog.cs b/Disco.Logging/SystemLog.cs index aac8683b..5b8ddff8 100644 --- a/Disco.Logging/SystemLog.cs +++ b/Disco.Logging/SystemLog.cs @@ -1,126 +1,126 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Logging.Models; - -namespace Disco.Logging -{ - public class SystemLog : LogBase - { - private const int _ModuleId = 0; - public enum EventTypeIds : int - { - Information = 0, - Warning = 1, - Error = 2, - Exception = 10, - ExceptionWithInner = 11, - LogInitialized = 100 - } - public static SystemLog Current - { - get - { - return (SystemLog)LogContext.LogModules[_ModuleId]; - } - } - private static void Log(EventTypeIds EventTypeId, params object[] Args) - { - Current.Log((int)EventTypeId, Args); - } - public static void LogInformation(params object[] Messages) - { - Log(EventTypeIds.Information, Messages); - } - public static void LogWarning(params object[] Messages) - { - Log(EventTypeIds.Warning, Messages); - } - public static void LogError(params object[] Messages) - { - Log(EventTypeIds.Error, Messages); - } - public static void LogException(string Component, Exception ex) - { - if (ex.InnerException != null) - { - Log(EventTypeIds.ExceptionWithInner, Component, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); - } - else - { - Log(EventTypeIds.Exception, Component, ex.GetType().Name, ex.Message, ex.StackTrace); - } - } - - public static void LogLogInitialized(string PersistantStorePath) - { - Log(EventTypeIds.LogInitialized, PersistantStorePath); - } - - public override int ModuleId - { - get { return _ModuleId; } - } - - public override string ModuleName - { - get { return "System"; } - } - - public override string ModuleDescription - { - get { return "Core System Log"; } - } - - protected override List LoadEventTypes() - { - List eventTypes = new List() { - new LogEventType() { - Id = (int)EventTypeIds.Information, - ModuleId = _ModuleId, - Name = "Information", - Format = null, - Severity = (int)LogEventType.Severities.Information, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.Warning, - ModuleId = _ModuleId, - Name = "Warning", - Format = null, - Severity = (int)LogEventType.Severities.Warning, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.Error, - ModuleId = _ModuleId, - Name = "Error", - Format = null, - Severity = (int)LogEventType.Severities.Error, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.Exception, - ModuleId = _ModuleId, - Name = "Exception", - Format = "{0}; {1}: {2}; {3}", - Severity = (int)LogEventType.Severities.Error, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.ExceptionWithInner, - ModuleId = _ModuleId, - Name = "Exception with Inner Exception", - Format = "{0}; {1}: {2}; {3}; {4}: {5}; {6}", - Severity = (int)LogEventType.Severities.Error, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.LogInitialized, - ModuleId = _ModuleId, - Name = "Log Initialized", - Format = "Log Initialized to '{0}'", - Severity = (int)LogEventType.Severities.Information, - UseLive = false, UsePersist = true, UseDisplay = true } - }; - - return eventTypes; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Logging.Models; + +namespace Disco.Logging +{ + public class SystemLog : LogBase + { + private const int _ModuleId = 0; + public enum EventTypeIds : int + { + Information = 0, + Warning = 1, + Error = 2, + Exception = 10, + ExceptionWithInner = 11, + LogInitialized = 100 + } + public static SystemLog Current + { + get + { + return (SystemLog)LogContext.LogModules[_ModuleId]; + } + } + private static void Log(EventTypeIds EventTypeId, params object[] Args) + { + Current.Log((int)EventTypeId, Args); + } + public static void LogInformation(params object[] Messages) + { + Log(EventTypeIds.Information, Messages); + } + public static void LogWarning(params object[] Messages) + { + Log(EventTypeIds.Warning, Messages); + } + public static void LogError(params object[] Messages) + { + Log(EventTypeIds.Error, Messages); + } + public static void LogException(string Component, Exception ex) + { + if (ex.InnerException != null) + { + Log(EventTypeIds.ExceptionWithInner, Component, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); + } + else + { + Log(EventTypeIds.Exception, Component, ex.GetType().Name, ex.Message, ex.StackTrace); + } + } + + public static void LogLogInitialized(string PersistantStorePath) + { + Log(EventTypeIds.LogInitialized, PersistantStorePath); + } + + public override int ModuleId + { + get { return _ModuleId; } + } + + public override string ModuleName + { + get { return "System"; } + } + + public override string ModuleDescription + { + get { return "Core System Log"; } + } + + protected override List LoadEventTypes() + { + List eventTypes = new List() { + new LogEventType() { + Id = (int)EventTypeIds.Information, + ModuleId = _ModuleId, + Name = "Information", + Format = null, + Severity = (int)LogEventType.Severities.Information, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.Warning, + ModuleId = _ModuleId, + Name = "Warning", + Format = null, + Severity = (int)LogEventType.Severities.Warning, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.Error, + ModuleId = _ModuleId, + Name = "Error", + Format = null, + Severity = (int)LogEventType.Severities.Error, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.Exception, + ModuleId = _ModuleId, + Name = "Exception", + Format = "{0}; {1}: {2}; {3}", + Severity = (int)LogEventType.Severities.Error, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.ExceptionWithInner, + ModuleId = _ModuleId, + Name = "Exception with Inner Exception", + Format = "{0}; {1}: {2}; {3}; {4}: {5}; {6}", + Severity = (int)LogEventType.Severities.Error, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.LogInitialized, + ModuleId = _ModuleId, + Name = "Log Initialized", + Format = "Log Initialized to '{0}'", + Severity = (int)LogEventType.Severities.Information, + UseLive = false, UsePersist = true, UseDisplay = true } + }; + + return eventTypes; + } + } +} diff --git a/Disco.Logging/Targets/LogLiveContext.cs b/Disco.Logging/Targets/LogLiveContext.cs index 1b0d8d98..3e04983c 100644 --- a/Disco.Logging/Targets/LogLiveContext.cs +++ b/Disco.Logging/Targets/LogLiveContext.cs @@ -1,55 +1,55 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using SignalR; -using SignalR.Hosting.AspNet; -using SignalR.Infrastructure; - -namespace Disco.Logging.Targets -{ - public class LogLiveContext : PersistentConnection - { - protected override System.Threading.Tasks.Task OnReceivedAsync(string connectionId, string data) - { - // Add to Group - if (!string.IsNullOrWhiteSpace(data) && data.StartsWith("/addToGroups:") && data.Length > 13) - { - var groups = data.Substring(13).Split(','); - foreach (var g in groups) - { - this.AddToGroup(connectionId, g); - } - } - - return base.OnReceivedAsync(connectionId, data); - } - - internal static void Broadcast(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, params object[] Arguments) - { - var message = Models.LogLiveEvent.Create(logModule, eventType, Timestamp, Arguments); - - var connectionManager = AspNetHost.DependencyResolver.Resolve(); - var connection = connectionManager.GetConnection(); - connection.Broadcast(_QualifiedTypeNameAll, message); - connection.Broadcast(LiveLogNameGroup(logModule.ModuleName), message); - } - - private const string _GroupNameAll = "__All"; - private static string _QualifiedTypeName = typeof(LogLiveContext).FullName + "."; - private static string _QualifiedTypeNameAll = _QualifiedTypeName + "__All"; - private static string LiveLogNameGroup(string LogName) - { - return string.Concat(_QualifiedTypeName, LogName); - } - public static string LiveLogNameAll - { - get - { - //return _QualifiedTypeNameAll; - return _GroupNameAll; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SignalR; +using SignalR.Hosting.AspNet; +using SignalR.Infrastructure; + +namespace Disco.Logging.Targets +{ + public class LogLiveContext : PersistentConnection + { + protected override System.Threading.Tasks.Task OnReceivedAsync(string connectionId, string data) + { + // Add to Group + if (!string.IsNullOrWhiteSpace(data) && data.StartsWith("/addToGroups:") && data.Length > 13) + { + var groups = data.Substring(13).Split(','); + foreach (var g in groups) + { + this.AddToGroup(connectionId, g); + } + } + + return base.OnReceivedAsync(connectionId, data); + } + + internal static void Broadcast(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, params object[] Arguments) + { + var message = Models.LogLiveEvent.Create(logModule, eventType, Timestamp, Arguments); + + var connectionManager = AspNetHost.DependencyResolver.Resolve(); + var connection = connectionManager.GetConnection(); + connection.Broadcast(_QualifiedTypeNameAll, message); + connection.Broadcast(LiveLogNameGroup(logModule.ModuleName), message); + } + + private const string _GroupNameAll = "__All"; + private static string _QualifiedTypeName = typeof(LogLiveContext).FullName + "."; + private static string _QualifiedTypeNameAll = _QualifiedTypeName + "__All"; + private static string LiveLogNameGroup(string LogName) + { + return string.Concat(_QualifiedTypeName, LogName); + } + public static string LiveLogNameAll + { + get + { + //return _QualifiedTypeNameAll; + return _GroupNameAll; + } + } + + } +} diff --git a/Disco.Logging/Targets/LogPersistContext.cs b/Disco.Logging/Targets/LogPersistContext.cs index ac335469..f2a31f8a 100644 --- a/Disco.Logging/Targets/LogPersistContext.cs +++ b/Disco.Logging/Targets/LogPersistContext.cs @@ -1,23 +1,23 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data.Entity; -using System.Data.Entity.Infrastructure; - -namespace Disco.Logging.Targets -{ - public class LogPersistContext : DbContext - { - public LogPersistContext(string ConnectionString) : base(ConnectionString) { } - - public DbSet Modules { get; set; } - public DbSet EventTypes { get; set; } - public DbSet Events { get; set; } - - protected override void OnModelCreating(DbModelBuilder modelBuilder) - { - //modelBuilder.Conventions.Remove(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data.Entity; +using System.Data.Entity.Infrastructure; + +namespace Disco.Logging.Targets +{ + public class LogPersistContext : DbContext + { + public LogPersistContext(string ConnectionString) : base(ConnectionString) { } + + public DbSet Modules { get; set; } + public DbSet EventTypes { get; set; } + public DbSet Events { get; set; } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + //modelBuilder.Conventions.Remove(); + } + } +} diff --git a/Disco.Logging/Utilities.cs b/Disco.Logging/Utilities.cs index 249fbc03..9600ecec 100644 --- a/Disco.Logging/Utilities.cs +++ b/Disco.Logging/Utilities.cs @@ -1,263 +1,263 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Win32.SafeHandles; -using System.Runtime.InteropServices; -using System.IO; -using System.Web.Mvc; - -namespace Disco.Logging -{ - public static class Utilities - { - - public const string LogEventCSVHeader = "Timestamp,ModuleId,ModuleName,ModuleDescription,EventTypeId,EventTypeName,Severity,Message"; - public static void ToCsvLine(this Models.LogLiveEvent e, TextWriter writer) - { - writer.Write(e.Timestamp.ToString("yyy-MM-dd HH:mm:ss")); - writer.Write(","); - writer.Write(e.ModuleId); - writer.Write(",\""); - writer.Write(e.ModuleName); - writer.Write("\",\""); - writer.Write(e.ModuleDescription); - writer.Write("\","); - writer.Write(e.EventTypeId); - writer.Write(",\""); - writer.Write(e.EventTypeName); - writer.Write("\","); - writer.Write(e.EventTypeSeverity); - writer.Write(",\""); - writer.Write(e.FormattedMessage.Replace("\"", "'")); - writer.Write("\""); - if (e.Arguments != null) - { - foreach (var arg in e.Arguments) - { - writer.Write(",\""); - writer.Write(arg.ToString().Replace("\"", "'")); - writer.Write("\""); - } - } - writer.WriteLine(); - } - public static MemoryStream ToCsv(this List e) - { - var ms = new MemoryStream(); - StreamWriter sw = new StreamWriter(ms); - sw.WriteLine(LogEventCSVHeader); - if (e != null) - { - foreach (var le in e) - { - le.ToCsvLine(sw); - } - } - sw.Flush(); - ms.Position = 0; - return ms; - } - - public static List ToSelectListItems(this List items) - { - return items.Select(et => new SelectListItem() { Value = et.Id.ToString(), Text = et.Name }).ToList(); - } - - #region Win32 APIs - /// - /// The CreateFile function creates or opens a file, file stream, directory, physical disk, volume, console buffer, tape drive, - /// communications resource, mailslot, or named pipe. The function returns a handle that can be used to access an object. - /// - /// - /// access to the object, which can be read, write, or both - /// The sharing mode of an object, which can be read, write, both, or none - /// A pointer to a SECURITY_ATTRIBUTES structure that determines whether or not the returned handle can - /// be inherited by child processes. Can be null - /// An action to take on files that exist and do not exist - /// The file attributes and flags. - /// A handle to a template file with the GENERIC_READ access right. The template file supplies file attributes - /// and extended attributes for the file that is being created. This parameter can be null - /// If the function succeeds, the return value is an open handle to a specified file. If a specified file exists before the function - /// all and dwCreationDisposition is CREATE_ALWAYS or OPEN_ALWAYS, a call to GetLastError returns ERROR_ALREADY_EXISTS, even when the function - /// succeeds. If a file does not exist before the call, GetLastError returns 0 (zero). - /// If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError. - /// - [DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)] - private static extern SafeFileHandle CreateFile( - string lpFileName, - EFileAccess dwDesiredAccess, - EFileShare dwShareMode, - IntPtr SecurityAttributes, - ECreationDisposition dwCreationDisposition, - EFileAttributes dwFlagsAndAttributes, - IntPtr hTemplateFile - ); - [Flags] - private enum EFileAccess : uint - { - Delete = 0x10000, - ReadControl = 0x20000, - WriteDAC = 0x40000, - WriteOwner = 0x80000, - Synchronize = 0x100000, - - StandardRightsRequired = 0xF0000, - StandardRightsRead = ReadControl, - StandardRightsWrite = ReadControl, - StandardRightsExecute = ReadControl, - StandardRightsAll = 0x1F0000, - SpecificRightsAll = 0xFFFF, - - AccessSystemSecurity = 0x1000000, // AccessSystemAcl access type - - MaximumAllowed = 0x2000000, // MaximumAllowed access type - - GenericRead = 0x80000000, - GenericWrite = 0x40000000, - GenericExecute = 0x20000000, - GenericAll = 0x10000000 - } - [Flags] - private enum EFileShare : uint - { - /// - /// - /// - None = 0x00000000, - /// - /// Enables subsequent open operations on an object to request read access. - /// Otherwise, other processes cannot open the object if they request read access. - /// If this flag is not specified, but the object has been opened for read access, the function fails. - /// - Read = 0x00000001, - /// - /// Enables subsequent open operations on an object to request write access. - /// Otherwise, other processes cannot open the object if they request write access. - /// If this flag is not specified, but the object has been opened for write access, the function fails. - /// - Write = 0x00000002, - /// - /// Enables subsequent open operations on an object to request delete access. - /// Otherwise, other processes cannot open the object if they request delete access. - /// If this flag is not specified, but the object has been opened for delete access, the function fails. - /// - Delete = 0x00000004 - } - private enum ECreationDisposition : uint - { - /// - /// Creates a new file. The function fails if a specified file exists. - /// - New = 1, - /// - /// Creates a new file, always. - /// If a file exists, the function overwrites the file, clears the existing attributes, combines the specified file attributes, - /// and flags with FILE_ATTRIBUTE_ARCHIVE, but does not set the security descriptor that the SECURITY_ATTRIBUTES structure specifies. - /// - CreateAlways = 2, - /// - /// Opens a file. The function fails if the file does not exist. - /// - OpenExisting = 3, - /// - /// Opens a file, always. - /// If a file does not exist, the function creates a file as if dwCreationDisposition is CREATE_NEW. - /// - OpenAlways = 4, - /// - /// Opens a file and truncates it so that its size is 0 (zero) bytes. The function fails if the file does not exist. - /// The calling process must open the file with the GENERIC_WRITE access right. - /// - TruncateExisting = 5 - } - [Flags] - private enum EFileAttributes : uint - { - None = 0x0000000, - Readonly = 0x00000001, - Hidden = 0x00000002, - System = 0x00000004, - Directory = 0x00000010, - Archive = 0x00000020, - Device = 0x00000040, - Normal = 0x00000080, - Temporary = 0x00000100, - SparseFile = 0x00000200, - ReparsePoint = 0x00000400, - Compressed = 0x00000800, - Offline = 0x00001000, - NotContentIndexed = 0x00002000, - Encrypted = 0x00004000, - Write_Through = 0x80000000, - Overlapped = 0x40000000, - NoBuffering = 0x20000000, - RandomAccess = 0x10000000, - SequentialScan = 0x08000000, - DeleteOnClose = 0x04000000, - BackupSemantics = 0x02000000, - PosixSemantics = 0x01000000, - OpenReparsePoint = 0x00200000, - OpenNoRecall = 0x00100000, - FirstPipeInstance = 0x00080000 - } - - private const int FSCTL_SET_COMPRESSION = 0x9C040; - private const short COMPRESSION_FORMAT_DEFAULT = 1; - [DllImport("kernel32.dll", SetLastError = true)] - private static extern int DeviceIoControl( - SafeFileHandle hDevice, - int dwIoControlCode, - ref short lpInBuffer, - int nInBufferSize, - IntPtr lpOutBuffer, - int nOutBufferSize, - ref int lpBytesReturned, - IntPtr lpOverlapped); - #endregion - - public static void CompressDirectory(string DirectoryPath) - { - if (DirectoryPath.Length > 250) - throw new InvalidOperationException(string.Format("Directory Path to Long (>250) to Compress: {0}", DirectoryPath)); - - DirectoryInfo dirInfo = new DirectoryInfo(DirectoryPath); - if (dirInfo.Exists) - { - if ((dirInfo.Attributes & FileAttributes.Compressed) != FileAttributes.Compressed) - { - var dirHandle = CreateFile(DirectoryPath, EFileAccess.GenericWrite, EFileShare.Read, IntPtr.Zero, ECreationDisposition.OpenExisting, EFileAttributes.None, IntPtr.Zero); - if (dirHandle.IsInvalid) - { - Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); - } - else - { - EnableCompression(dirHandle); - dirHandle.Close(); - } - } - } - else - { - throw new InvalidOperationException(string.Format("Directory doesn't exist: {0}", DirectoryPath)); - } - } - - private static void EnableCompression(SafeFileHandle handle) - { - int lpBytesReturned = 0; - short lpInBuffer = COMPRESSION_FORMAT_DEFAULT; - - int result = DeviceIoControl(handle, FSCTL_SET_COMPRESSION, - ref lpInBuffer, sizeof(short), IntPtr.Zero, 0, - ref lpBytesReturned, IntPtr.Zero); - - if (result != 0) - { - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Win32.SafeHandles; +using System.Runtime.InteropServices; +using System.IO; +using System.Web.Mvc; + +namespace Disco.Logging +{ + public static class Utilities + { + + public const string LogEventCSVHeader = "Timestamp,ModuleId,ModuleName,ModuleDescription,EventTypeId,EventTypeName,Severity,Message"; + public static void ToCsvLine(this Models.LogLiveEvent e, TextWriter writer) + { + writer.Write(e.Timestamp.ToString("yyy-MM-dd HH:mm:ss")); + writer.Write(","); + writer.Write(e.ModuleId); + writer.Write(",\""); + writer.Write(e.ModuleName); + writer.Write("\",\""); + writer.Write(e.ModuleDescription); + writer.Write("\","); + writer.Write(e.EventTypeId); + writer.Write(",\""); + writer.Write(e.EventTypeName); + writer.Write("\","); + writer.Write(e.EventTypeSeverity); + writer.Write(",\""); + writer.Write(e.FormattedMessage.Replace("\"", "'")); + writer.Write("\""); + if (e.Arguments != null) + { + foreach (var arg in e.Arguments) + { + writer.Write(",\""); + writer.Write(arg.ToString().Replace("\"", "'")); + writer.Write("\""); + } + } + writer.WriteLine(); + } + public static MemoryStream ToCsv(this List e) + { + var ms = new MemoryStream(); + StreamWriter sw = new StreamWriter(ms); + sw.WriteLine(LogEventCSVHeader); + if (e != null) + { + foreach (var le in e) + { + le.ToCsvLine(sw); + } + } + sw.Flush(); + ms.Position = 0; + return ms; + } + + public static List ToSelectListItems(this List items) + { + return items.Select(et => new SelectListItem() { Value = et.Id.ToString(), Text = et.Name }).ToList(); + } + + #region Win32 APIs + /// + /// The CreateFile function creates or opens a file, file stream, directory, physical disk, volume, console buffer, tape drive, + /// communications resource, mailslot, or named pipe. The function returns a handle that can be used to access an object. + /// + /// + /// access to the object, which can be read, write, or both + /// The sharing mode of an object, which can be read, write, both, or none + /// A pointer to a SECURITY_ATTRIBUTES structure that determines whether or not the returned handle can + /// be inherited by child processes. Can be null + /// An action to take on files that exist and do not exist + /// The file attributes and flags. + /// A handle to a template file with the GENERIC_READ access right. The template file supplies file attributes + /// and extended attributes for the file that is being created. This parameter can be null + /// If the function succeeds, the return value is an open handle to a specified file. If a specified file exists before the function + /// all and dwCreationDisposition is CREATE_ALWAYS or OPEN_ALWAYS, a call to GetLastError returns ERROR_ALREADY_EXISTS, even when the function + /// succeeds. If a file does not exist before the call, GetLastError returns 0 (zero). + /// If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError. + /// + [DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)] + private static extern SafeFileHandle CreateFile( + string lpFileName, + EFileAccess dwDesiredAccess, + EFileShare dwShareMode, + IntPtr SecurityAttributes, + ECreationDisposition dwCreationDisposition, + EFileAttributes dwFlagsAndAttributes, + IntPtr hTemplateFile + ); + [Flags] + private enum EFileAccess : uint + { + Delete = 0x10000, + ReadControl = 0x20000, + WriteDAC = 0x40000, + WriteOwner = 0x80000, + Synchronize = 0x100000, + + StandardRightsRequired = 0xF0000, + StandardRightsRead = ReadControl, + StandardRightsWrite = ReadControl, + StandardRightsExecute = ReadControl, + StandardRightsAll = 0x1F0000, + SpecificRightsAll = 0xFFFF, + + AccessSystemSecurity = 0x1000000, // AccessSystemAcl access type + + MaximumAllowed = 0x2000000, // MaximumAllowed access type + + GenericRead = 0x80000000, + GenericWrite = 0x40000000, + GenericExecute = 0x20000000, + GenericAll = 0x10000000 + } + [Flags] + private enum EFileShare : uint + { + /// + /// + /// + None = 0x00000000, + /// + /// Enables subsequent open operations on an object to request read access. + /// Otherwise, other processes cannot open the object if they request read access. + /// If this flag is not specified, but the object has been opened for read access, the function fails. + /// + Read = 0x00000001, + /// + /// Enables subsequent open operations on an object to request write access. + /// Otherwise, other processes cannot open the object if they request write access. + /// If this flag is not specified, but the object has been opened for write access, the function fails. + /// + Write = 0x00000002, + /// + /// Enables subsequent open operations on an object to request delete access. + /// Otherwise, other processes cannot open the object if they request delete access. + /// If this flag is not specified, but the object has been opened for delete access, the function fails. + /// + Delete = 0x00000004 + } + private enum ECreationDisposition : uint + { + /// + /// Creates a new file. The function fails if a specified file exists. + /// + New = 1, + /// + /// Creates a new file, always. + /// If a file exists, the function overwrites the file, clears the existing attributes, combines the specified file attributes, + /// and flags with FILE_ATTRIBUTE_ARCHIVE, but does not set the security descriptor that the SECURITY_ATTRIBUTES structure specifies. + /// + CreateAlways = 2, + /// + /// Opens a file. The function fails if the file does not exist. + /// + OpenExisting = 3, + /// + /// Opens a file, always. + /// If a file does not exist, the function creates a file as if dwCreationDisposition is CREATE_NEW. + /// + OpenAlways = 4, + /// + /// Opens a file and truncates it so that its size is 0 (zero) bytes. The function fails if the file does not exist. + /// The calling process must open the file with the GENERIC_WRITE access right. + /// + TruncateExisting = 5 + } + [Flags] + private enum EFileAttributes : uint + { + None = 0x0000000, + Readonly = 0x00000001, + Hidden = 0x00000002, + System = 0x00000004, + Directory = 0x00000010, + Archive = 0x00000020, + Device = 0x00000040, + Normal = 0x00000080, + Temporary = 0x00000100, + SparseFile = 0x00000200, + ReparsePoint = 0x00000400, + Compressed = 0x00000800, + Offline = 0x00001000, + NotContentIndexed = 0x00002000, + Encrypted = 0x00004000, + Write_Through = 0x80000000, + Overlapped = 0x40000000, + NoBuffering = 0x20000000, + RandomAccess = 0x10000000, + SequentialScan = 0x08000000, + DeleteOnClose = 0x04000000, + BackupSemantics = 0x02000000, + PosixSemantics = 0x01000000, + OpenReparsePoint = 0x00200000, + OpenNoRecall = 0x00100000, + FirstPipeInstance = 0x00080000 + } + + private const int FSCTL_SET_COMPRESSION = 0x9C040; + private const short COMPRESSION_FORMAT_DEFAULT = 1; + [DllImport("kernel32.dll", SetLastError = true)] + private static extern int DeviceIoControl( + SafeFileHandle hDevice, + int dwIoControlCode, + ref short lpInBuffer, + int nInBufferSize, + IntPtr lpOutBuffer, + int nOutBufferSize, + ref int lpBytesReturned, + IntPtr lpOverlapped); + #endregion + + public static void CompressDirectory(string DirectoryPath) + { + if (DirectoryPath.Length > 250) + throw new InvalidOperationException(string.Format("Directory Path to Long (>250) to Compress: {0}", DirectoryPath)); + + DirectoryInfo dirInfo = new DirectoryInfo(DirectoryPath); + if (dirInfo.Exists) + { + if ((dirInfo.Attributes & FileAttributes.Compressed) != FileAttributes.Compressed) + { + var dirHandle = CreateFile(DirectoryPath, EFileAccess.GenericWrite, EFileShare.Read, IntPtr.Zero, ECreationDisposition.OpenExisting, EFileAttributes.None, IntPtr.Zero); + if (dirHandle.IsInvalid) + { + Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); + } + else + { + EnableCompression(dirHandle); + dirHandle.Close(); + } + } + } + else + { + throw new InvalidOperationException(string.Format("Directory doesn't exist: {0}", DirectoryPath)); + } + } + + private static void EnableCompression(SafeFileHandle handle) + { + int lpBytesReturned = 0; + short lpInBuffer = COMPRESSION_FORMAT_DEFAULT; + + int result = DeviceIoControl(handle, FSCTL_SET_COMPRESSION, + ref lpInBuffer, sizeof(short), IntPtr.Zero, 0, + ref lpBytesReturned, IntPtr.Zero); + + if (result != 0) + { + Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); + } + } + + } +} diff --git a/Disco.Logging/packages.config b/Disco.Logging/packages.config index 2ba417d6..065b8424 100644 --- a/Disco.Logging/packages.config +++ b/Disco.Logging/packages.config @@ -1,9 +1,9 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/Disco.Models/App.config b/Disco.Models/App.config index cbfc1faf..c68f3757 100644 --- a/Disco.Models/App.config +++ b/Disco.Models/App.config @@ -1,17 +1,17 @@ - - - - -
- - - - - - - - - - - + + + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Disco.Models/BI/Config/OrganisationAddress.cs b/Disco.Models/BI/Config/OrganisationAddress.cs index ab83ba5f..391f2ec3 100644 --- a/Disco.Models/BI/Config/OrganisationAddress.cs +++ b/Disco.Models/BI/Config/OrganisationAddress.cs @@ -1,74 +1,74 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; - -namespace Disco.Models.BI.Config -{ - public class OrganisationAddress - { - - public int? Id { get; set; } - [Required] - public string Name { get; set; } - [Required] - public string Address { get; set; } - [Required] - public string Suburb { get; set; } - [Required] - public string Postcode { get; set; } - [Required] - public string State { get; set; } - [Required] - public string Country { get; set; } - [Required] - public string ShortName { get; set; } - - // Added 2012-12-11 G# - // http://discoict.com.au/forum/support/2012/12/address-details.aspx - public string PhoneNumber { get; set; } - public string FaxNumber { get; set; } - // End Added 2012-12-11 G# - - public string ToConfigurationEntry() - { - StringBuilder entryBuilder = new StringBuilder(); - - entryBuilder.AppendLine(Name.Trim()); - entryBuilder.AppendLine(Address.Trim()); - entryBuilder.AppendLine(Suburb.Trim()); - entryBuilder.AppendLine(Postcode.Trim()); - entryBuilder.AppendLine(State.Trim()); - entryBuilder.AppendLine(Country.Trim()); - - if (!string.IsNullOrEmpty(ShortName)) - { - entryBuilder.AppendLine(ShortName.Trim()); - } - - return entryBuilder.ToString(); - } - - public static OrganisationAddress FromConfigurationEntry(int Id, string Entry) - { - string[] entryLines = Entry.Split(new string[] { Environment.NewLine }, StringSplitOptions.None); - if (entryLines.Length >= 6) - { - return new OrganisationAddress() - { - Id = Id, - Name = entryLines[0].Trim(), - Address = entryLines[1].Trim(), - Suburb = entryLines[2].Trim(), - Postcode = entryLines[3].Trim(), - State = entryLines[4].Trim(), - Country = entryLines[5].Trim(), - ShortName = (entryLines.Length > 6 ? entryLines[6].Trim() : string.Empty) - }; - } - throw new ArgumentException("Invalid Configuration Address Entry", "entry"); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; + +namespace Disco.Models.BI.Config +{ + public class OrganisationAddress + { + + public int? Id { get; set; } + [Required] + public string Name { get; set; } + [Required] + public string Address { get; set; } + [Required] + public string Suburb { get; set; } + [Required] + public string Postcode { get; set; } + [Required] + public string State { get; set; } + [Required] + public string Country { get; set; } + [Required] + public string ShortName { get; set; } + + // Added 2012-12-11 G# + // http://discoict.com.au/forum/support/2012/12/address-details.aspx + public string PhoneNumber { get; set; } + public string FaxNumber { get; set; } + // End Added 2012-12-11 G# + + public string ToConfigurationEntry() + { + StringBuilder entryBuilder = new StringBuilder(); + + entryBuilder.AppendLine(Name.Trim()); + entryBuilder.AppendLine(Address.Trim()); + entryBuilder.AppendLine(Suburb.Trim()); + entryBuilder.AppendLine(Postcode.Trim()); + entryBuilder.AppendLine(State.Trim()); + entryBuilder.AppendLine(Country.Trim()); + + if (!string.IsNullOrEmpty(ShortName)) + { + entryBuilder.AppendLine(ShortName.Trim()); + } + + return entryBuilder.ToString(); + } + + public static OrganisationAddress FromConfigurationEntry(int Id, string Entry) + { + string[] entryLines = Entry.Split(new string[] { Environment.NewLine }, StringSplitOptions.None); + if (entryLines.Length >= 6) + { + return new OrganisationAddress() + { + Id = Id, + Name = entryLines[0].Trim(), + Address = entryLines[1].Trim(), + Suburb = entryLines[2].Trim(), + Postcode = entryLines[3].Trim(), + State = entryLines[4].Trim(), + Country = entryLines[5].Trim(), + ShortName = (entryLines.Length > 6 ? entryLines[6].Trim() : string.Empty) + }; + } + throw new ArgumentException("Invalid Configuration Address Entry", "entry"); + } + + } +} diff --git a/Disco.Models/BI/DocumentTemplate/DocumentState.cs b/Disco.Models/BI/DocumentTemplate/DocumentState.cs index c1554925..6ba1f3b5 100644 --- a/Disco.Models/BI/DocumentTemplate/DocumentState.cs +++ b/Disco.Models/BI/DocumentTemplate/DocumentState.cs @@ -1,59 +1,59 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections; - -namespace Disco.Models.BI.DocumentTemplates -{ - public class DocumentState : IDisposable - { - public int SequenceNumber { get; set; } - public Hashtable FieldCache { get; set; } - public Hashtable ScopeCache { get; set; } - public Hashtable DocumentCache { get; set; } - - public DocumentState(int SequenceNumber) - { - this.SequenceNumber = SequenceNumber; - this.FieldCache = new Hashtable(); - this.ScopeCache = new Hashtable(); - this.DocumentCache = new Hashtable(); - } - - public void FlushFieldCache() - { - FlushDictionary(this.FieldCache); - } - public void FlushScopeCache() - { - FlushFieldCache(); - FlushDictionary(this.ScopeCache); - } - public void FlushDocumentCache() - { - FlushScopeCache(); - FlushDictionary(this.DocumentCache); - } - private static void FlushDictionary(Hashtable d) - { - foreach (var key in d.Keys) - { - var disposeItem = d[key] as IDisposable; - if (disposeItem != null) - disposeItem.Dispose(); - } - d.Clear(); - } - - public static DocumentState DefaultState() - { - return new DocumentState(1); - } - - public void Dispose() - { - FlushDocumentCache(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections; + +namespace Disco.Models.BI.DocumentTemplates +{ + public class DocumentState : IDisposable + { + public int SequenceNumber { get; set; } + public Hashtable FieldCache { get; set; } + public Hashtable ScopeCache { get; set; } + public Hashtable DocumentCache { get; set; } + + public DocumentState(int SequenceNumber) + { + this.SequenceNumber = SequenceNumber; + this.FieldCache = new Hashtable(); + this.ScopeCache = new Hashtable(); + this.DocumentCache = new Hashtable(); + } + + public void FlushFieldCache() + { + FlushDictionary(this.FieldCache); + } + public void FlushScopeCache() + { + FlushFieldCache(); + FlushDictionary(this.ScopeCache); + } + public void FlushDocumentCache() + { + FlushScopeCache(); + FlushDictionary(this.DocumentCache); + } + private static void FlushDictionary(Hashtable d) + { + foreach (var key in d.Keys) + { + var disposeItem = d[key] as IDisposable; + if (disposeItem != null) + disposeItem.Dispose(); + } + d.Clear(); + } + + public static DocumentState DefaultState() + { + return new DocumentState(1); + } + + public void Dispose() + { + FlushDocumentCache(); + } + } +} diff --git a/Disco.Models/BI/Expressions/IImageExpressionResult.cs b/Disco.Models/BI/Expressions/IImageExpressionResult.cs index d5ae6970..ac2f94d8 100644 --- a/Disco.Models/BI/Expressions/IImageExpressionResult.cs +++ b/Disco.Models/BI/Expressions/IImageExpressionResult.cs @@ -1,18 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -namespace Disco.Models.BI.Expressions -{ - public interface IImageExpressionResult - { - Stream GetImage(int Width, int Height); - byte Quality { get; set; } - bool LosslessFormat { get; set; } - bool ShowField { get; set; } - string BackgroundColour { get; set; } - bool BackgroundPreferTransparent { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; + +namespace Disco.Models.BI.Expressions +{ + public interface IImageExpressionResult + { + Stream GetImage(int Width, int Height); + byte Quality { get; set; } + bool LosslessFormat { get; set; } + bool ShowField { get; set; } + string BackgroundColour { get; set; } + bool BackgroundPreferTransparent { get; set; } + } +} diff --git a/Disco.Models/BI/Interop/Community/UpdateRequestBase.cs b/Disco.Models/BI/Interop/Community/UpdateRequestBase.cs index 33bcba22..70b22e7f 100644 --- a/Disco.Models/BI/Interop/Community/UpdateRequestBase.cs +++ b/Disco.Models/BI/Interop/Community/UpdateRequestBase.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Linq; - -namespace Disco.Models.BI.Interop.Community -{ - public class UpdateRequestBase - { - public virtual int RequestVersion { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; + +namespace Disco.Models.BI.Interop.Community +{ + public class UpdateRequestBase + { + public virtual int RequestVersion { get; set; } + } +} diff --git a/Disco.Models/BI/Interop/Community/UpdateResponse.cs b/Disco.Models/BI/Interop/Community/UpdateResponse.cs index 15693040..1ebefc41 100644 --- a/Disco.Models/BI/Interop/Community/UpdateResponse.cs +++ b/Disco.Models/BI/Interop/Community/UpdateResponse.cs @@ -1,24 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Disco.Models.BI.Interop.Community -{ - public class UpdateResponse - { - public string Version { get; set; } - public DateTime VersionReleasedTimestamp { get; set; } - public string Blurb { get; set; } - public string UrlLink { get; set; } - public DateTime ResponseTimestamp { get; set; } - public bool BetaRelease { get; set; } - - public bool IsUpdatable(Version TestVersion) - { - var updateVersion = System.Version.Parse(this.Version); - return (updateVersion > TestVersion); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Disco.Models.BI.Interop.Community +{ + public class UpdateResponse + { + public string Version { get; set; } + public DateTime VersionReleasedTimestamp { get; set; } + public string Blurb { get; set; } + public string UrlLink { get; set; } + public DateTime ResponseTimestamp { get; set; } + public bool BetaRelease { get; set; } + + public bool IsUpdatable(Version TestVersion) + { + var updateVersion = System.Version.Parse(this.Version); + return (updateVersion > TestVersion); + } + } +} diff --git a/Disco.Models/BI/Job/JobTableModel.cs b/Disco.Models/BI/Job/JobTableModel.cs index e0bb8bbe..d5dd35a9 100644 --- a/Disco.Models/BI/Job/JobTableModel.cs +++ b/Disco.Models/BI/Job/JobTableModel.cs @@ -1,74 +1,74 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.BI.Job -{ - public class JobTableModel - { - public bool ShowId { get; set; } - public bool? ShowDeviceAddress { get; set; } - public bool ShowDates { get; set; } - public bool ShowType { get; set; } - public bool ShowDevice { get; set; } - public bool ShowUser { get; set; } - public bool ShowTechnician { get; set; } - public bool ShowLocation { get; set; } - public bool ShowStatus { get; set; } - public bool IsSmallTable { get; set; } - public bool HideClosedJobs { get; set; } - public List Items { get; set; } - - public JobTableModel() - { - ShowId = true; - ShowDates = true; - ShowType = true; - ShowDevice = true; - ShowUser = true; - ShowTechnician = true; - } - - public class JobTableItemModel - { - public int Id { get; set; } - public int? DeviceAddressId { get; set; } - public string DeviceAddress { get; set; } - public DateTime OpenedDate { get; set; } - public DateTime? ClosedDate { get; set; } - public string TypeId { get; set; } - public string TypeDescription { get; set; } - public string DeviceSerialNumber { get; set; } - public string DeviceModelDescription { get; set; } - public string UserId { get; set; } - public string UserDisplayName { get; set; } - public string OpenedTechUserId { get; set; } - public string OpenedTechUserDisplayName { get; set; } - public string StatusDescription { get; set; } - public string StatusId { get; set; } - public string Location { get; set; } - } - - public class JobTableItemModelIncludeStatus : JobTableItemModel - { - public string JobMetaWarranty_ExternalReference { get; set; } - public DateTime? JobMetaWarranty_ExternalCompletedDate { get; set; } - - public DateTime? JobMetaNonWarranty_RepairerLoggedDate { get; set; } - public DateTime? JobMetaNonWarranty_RepairerCompletedDate { get; set; } - public DateTime? JobMetaNonWarranty_AccountingChargeAddedDate { get; set; } - public DateTime? JobMetaNonWarranty_AccountingChargePaidDate { get; set; } - public DateTime? JobMetaNonWarranty_AccountingChargeRequiredDate { get; set; } - public bool? JobMetaNonWarranty_IsInsuranceClaim { get; set; } - public DateTime? JobMetaInsurance_ClaimFormSentDate { get; set; } - - public DateTime? WaitingForUserAction { get; set; } - public DateTime? DeviceReadyForReturn { get; set; } - public DateTime? DeviceHeld { get; set; } - public DateTime? DeviceReturnedDate { get; set; } - public string JobMetaWarranty_ExternalName { get; set; } - public string JobMetaNonWarranty_RepairerName { get; set; } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.BI.Job +{ + public class JobTableModel + { + public bool ShowId { get; set; } + public bool? ShowDeviceAddress { get; set; } + public bool ShowDates { get; set; } + public bool ShowType { get; set; } + public bool ShowDevice { get; set; } + public bool ShowUser { get; set; } + public bool ShowTechnician { get; set; } + public bool ShowLocation { get; set; } + public bool ShowStatus { get; set; } + public bool IsSmallTable { get; set; } + public bool HideClosedJobs { get; set; } + public List Items { get; set; } + + public JobTableModel() + { + ShowId = true; + ShowDates = true; + ShowType = true; + ShowDevice = true; + ShowUser = true; + ShowTechnician = true; + } + + public class JobTableItemModel + { + public int Id { get; set; } + public int? DeviceAddressId { get; set; } + public string DeviceAddress { get; set; } + public DateTime OpenedDate { get; set; } + public DateTime? ClosedDate { get; set; } + public string TypeId { get; set; } + public string TypeDescription { get; set; } + public string DeviceSerialNumber { get; set; } + public string DeviceModelDescription { get; set; } + public string UserId { get; set; } + public string UserDisplayName { get; set; } + public string OpenedTechUserId { get; set; } + public string OpenedTechUserDisplayName { get; set; } + public string StatusDescription { get; set; } + public string StatusId { get; set; } + public string Location { get; set; } + } + + public class JobTableItemModelIncludeStatus : JobTableItemModel + { + public string JobMetaWarranty_ExternalReference { get; set; } + public DateTime? JobMetaWarranty_ExternalCompletedDate { get; set; } + + public DateTime? JobMetaNonWarranty_RepairerLoggedDate { get; set; } + public DateTime? JobMetaNonWarranty_RepairerCompletedDate { get; set; } + public DateTime? JobMetaNonWarranty_AccountingChargeAddedDate { get; set; } + public DateTime? JobMetaNonWarranty_AccountingChargePaidDate { get; set; } + public DateTime? JobMetaNonWarranty_AccountingChargeRequiredDate { get; set; } + public bool? JobMetaNonWarranty_IsInsuranceClaim { get; set; } + public DateTime? JobMetaInsurance_ClaimFormSentDate { get; set; } + + public DateTime? WaitingForUserAction { get; set; } + public DateTime? DeviceReadyForReturn { get; set; } + public DateTime? DeviceHeld { get; set; } + public DateTime? DeviceReturnedDate { get; set; } + public string JobMetaWarranty_ExternalName { get; set; } + public string JobMetaNonWarranty_RepairerName { get; set; } + } + } +} diff --git a/Disco.Models/BI/Job/Statistics/DailyOpenedClosedItem.cs b/Disco.Models/BI/Job/Statistics/DailyOpenedClosedItem.cs index cdc561a4..38769700 100644 --- a/Disco.Models/BI/Job/Statistics/DailyOpenedClosedItem.cs +++ b/Disco.Models/BI/Job/Statistics/DailyOpenedClosedItem.cs @@ -1,15 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.BI.Job.Statistics -{ - public class DailyOpenedClosedItem - { - public DateTime Timestamp { get; set; } - public int TotalJobs { get; set; } - public int OpenedJobs { get; set; } - public int ClosedJobs { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.BI.Job.Statistics +{ + public class DailyOpenedClosedItem + { + public DateTime Timestamp { get; set; } + public int TotalJobs { get; set; } + public int OpenedJobs { get; set; } + public int ClosedJobs { get; set; } + } +} diff --git a/Disco.Models/BI/Search/DeviceSearchResultItem.cs b/Disco.Models/BI/Search/DeviceSearchResultItem.cs index 283b6a1d..7149ca92 100644 --- a/Disco.Models/BI/Search/DeviceSearchResultItem.cs +++ b/Disco.Models/BI/Search/DeviceSearchResultItem.cs @@ -1,34 +1,34 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.BI.Search -{ - public class DeviceSearchResultItem - { - public string AssetNumber { get; set; } - public string AssignedUserDescription - { - get - { - if (AssignedUserId != null) - { - if (AssignedUserDisplayName != null) - return string.Format("{0} ({1})", AssignedUserDisplayName, AssignedUserId); - else - return AssignedUserId; - } - return string.Empty; - } - } - public string AssignedUserDisplayName { get; set; } - public string AssignedUserId { get; set; } - public string ComputerName { get; set; } - public string DeviceModelDescription { get; set; } - public string DeviceProfileDescription { get; set; } - public int JobCount { get; set; } - public DateTime? DecommissionedDate { get; set; } - public string SerialNumber { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.BI.Search +{ + public class DeviceSearchResultItem + { + public string AssetNumber { get; set; } + public string AssignedUserDescription + { + get + { + if (AssignedUserId != null) + { + if (AssignedUserDisplayName != null) + return string.Format("{0} ({1})", AssignedUserDisplayName, AssignedUserId); + else + return AssignedUserId; + } + return string.Empty; + } + } + public string AssignedUserDisplayName { get; set; } + public string AssignedUserId { get; set; } + public string ComputerName { get; set; } + public string DeviceModelDescription { get; set; } + public string DeviceProfileDescription { get; set; } + public int JobCount { get; set; } + public DateTime? DecommissionedDate { get; set; } + public string SerialNumber { get; set; } + } +} diff --git a/Disco.Models/BI/Search/UserSearchResultItem.cs b/Disco.Models/BI/Search/UserSearchResultItem.cs index 40b8c9a8..c829330b 100644 --- a/Disco.Models/BI/Search/UserSearchResultItem.cs +++ b/Disco.Models/BI/Search/UserSearchResultItem.cs @@ -1,17 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.BI.Search -{ - public class UserSearchResultItem - { - public int AssignedDevicesCount { get; set; } - public string DisplayName { get; set; } - public string GivenName { get; set; } - public string Id { get; set; } - public int JobCount { get; set; } - public string Surname { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.BI.Search +{ + public class UserSearchResultItem + { + public int AssignedDevicesCount { get; set; } + public string DisplayName { get; set; } + public string GivenName { get; set; } + public string Id { get; set; } + public int JobCount { get; set; } + public string Surname { get; set; } + } +} diff --git a/Disco.Models/ClientServices/Enrol.cs b/Disco.Models/ClientServices/Enrol.cs index 471ada30..69c7893a 100644 --- a/Disco.Models/ClientServices/Enrol.cs +++ b/Disco.Models/ClientServices/Enrol.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.ClientServices -{ - public class Enrol : ServiceBase - { - public override string Feature - { - get { return "Enrol"; } - } - - public string DeviceSerialNumber { get; set; } - public string DeviceUUID { get; set; } - - public string DeviceComputerName { get; set; } - public bool DeviceIsPartOfDomain { get; set; } - - public string DeviceManufacturer { get; set; } - public string DeviceModel { get; set; } - public string DeviceModelType { get; set; } - - public string DeviceLanMacAddress { get; set; } - - public string DeviceWlanMacAddress { get; set; } - - public List DeviceCertificates { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.ClientServices +{ + public class Enrol : ServiceBase + { + public override string Feature + { + get { return "Enrol"; } + } + + public string DeviceSerialNumber { get; set; } + public string DeviceUUID { get; set; } + + public string DeviceComputerName { get; set; } + public bool DeviceIsPartOfDomain { get; set; } + + public string DeviceManufacturer { get; set; } + public string DeviceModel { get; set; } + public string DeviceModelType { get; set; } + + public string DeviceLanMacAddress { get; set; } + + public string DeviceWlanMacAddress { get; set; } + + public List DeviceCertificates { get; set; } + } +} diff --git a/Disco.Models/ClientServices/EnrolResponse.cs b/Disco.Models/ClientServices/EnrolResponse.cs index 3741ce82..0acdd038 100644 --- a/Disco.Models/ClientServices/EnrolResponse.cs +++ b/Disco.Models/ClientServices/EnrolResponse.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.ClientServices -{ - public class EnrolResponse - { - public string SessionId { get; set; } - - public string DeviceDomainName { get; set; } - public string DeviceComputerName { get; set; } - - public string DeviceAssignedUserDomain { get; set; } - public string DeviceAssignedUserName { get; set; } - public string DeviceAssignedUserSID { get; set; } - public string DeviceAssignedUserUsername { get; set; } - - public string OfflineDomainJoin { get; set; } - - public string DeviceCertificate { get; set; } - public List DeviceCertificateRemoveExisting { get; set; } - - // Actions - public bool AllowBootstrapperUninstall { get; set; } - public bool RequireReboot { get; set; } - - public string ErrorMessage { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.ClientServices +{ + public class EnrolResponse + { + public string SessionId { get; set; } + + public string DeviceDomainName { get; set; } + public string DeviceComputerName { get; set; } + + public string DeviceAssignedUserDomain { get; set; } + public string DeviceAssignedUserName { get; set; } + public string DeviceAssignedUserSID { get; set; } + public string DeviceAssignedUserUsername { get; set; } + + public string OfflineDomainJoin { get; set; } + + public string DeviceCertificate { get; set; } + public List DeviceCertificateRemoveExisting { get; set; } + + // Actions + public bool AllowBootstrapperUninstall { get; set; } + public bool RequireReboot { get; set; } + + public string ErrorMessage { get; set; } + } +} diff --git a/Disco.Models/ClientServices/MacEnrol.cs b/Disco.Models/ClientServices/MacEnrol.cs index ea63f53f..8c3cd05f 100644 --- a/Disco.Models/ClientServices/MacEnrol.cs +++ b/Disco.Models/ClientServices/MacEnrol.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.ClientServices -{ - public class MacEnrol : ServiceBase - { - public override string Feature - { - get { return "MacEnrol"; } - } - - public string DeviceSerialNumber { get; set; } - public string DeviceUUID { get; set; } - - public string DeviceComputerName { get; set; } - - public string DeviceManufacturer { get; set; } - public string DeviceModel { get; set; } - public string DeviceModelType { get; set; } - - public string DeviceLanMacAddress { get; set; } - - public string DeviceWlanMacAddress { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.ClientServices +{ + public class MacEnrol : ServiceBase + { + public override string Feature + { + get { return "MacEnrol"; } + } + + public string DeviceSerialNumber { get; set; } + public string DeviceUUID { get; set; } + + public string DeviceComputerName { get; set; } + + public string DeviceManufacturer { get; set; } + public string DeviceModel { get; set; } + public string DeviceModelType { get; set; } + + public string DeviceLanMacAddress { get; set; } + + public string DeviceWlanMacAddress { get; set; } + } +} diff --git a/Disco.Models/ClientServices/MacEnrolResponse.cs b/Disco.Models/ClientServices/MacEnrolResponse.cs index 3dd63e0a..3aaf8bed 100644 --- a/Disco.Models/ClientServices/MacEnrolResponse.cs +++ b/Disco.Models/ClientServices/MacEnrolResponse.cs @@ -1,19 +1,19 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.ClientServices -{ - public class MacEnrolResponse - { - public string DeviceComputerName { get; set; } - - public string DeviceAssignedUserDomain { get; set; } - public string DeviceAssignedUserName { get; set; } - public string DeviceAssignedUserSID { get; set; } - public string DeviceAssignedUserUsername { get; set; } - - public string ErrorMessage { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.ClientServices +{ + public class MacEnrolResponse + { + public string DeviceComputerName { get; set; } + + public string DeviceAssignedUserDomain { get; set; } + public string DeviceAssignedUserName { get; set; } + public string DeviceAssignedUserSID { get; set; } + public string DeviceAssignedUserUsername { get; set; } + + public string ErrorMessage { get; set; } + } +} diff --git a/Disco.Models/ClientServices/MacSecureEnrolResponse.cs b/Disco.Models/ClientServices/MacSecureEnrolResponse.cs index c7c1cf0a..5c7bf649 100644 --- a/Disco.Models/ClientServices/MacSecureEnrolResponse.cs +++ b/Disco.Models/ClientServices/MacSecureEnrolResponse.cs @@ -1,32 +1,32 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.ClientServices -{ - public class MacSecureEnrolResponse - { - public string DeviceComputerName { get; set; } - - public string DeviceAssignedUserDomain { get; set; } - public string DeviceAssignedUserName { get; set; } - public string DeviceAssignedUserSID { get; set; } - public string DeviceAssignedUserUsername { get; set; } - - public string ErrorMessage { get; set; } - - public static MacSecureEnrolResponse FromMacEnrolResponse(MacEnrolResponse mer) - { - return new MacSecureEnrolResponse - { - DeviceComputerName = mer.DeviceComputerName, - DeviceAssignedUserDomain = mer.DeviceAssignedUserDomain, - DeviceAssignedUserName = mer.DeviceAssignedUserName, - DeviceAssignedUserSID = mer.DeviceAssignedUserSID, - DeviceAssignedUserUsername = mer.DeviceAssignedUserUsername - }; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.ClientServices +{ + public class MacSecureEnrolResponse + { + public string DeviceComputerName { get; set; } + + public string DeviceAssignedUserDomain { get; set; } + public string DeviceAssignedUserName { get; set; } + public string DeviceAssignedUserSID { get; set; } + public string DeviceAssignedUserUsername { get; set; } + + public string ErrorMessage { get; set; } + + public static MacSecureEnrolResponse FromMacEnrolResponse(MacEnrolResponse mer) + { + return new MacSecureEnrolResponse + { + DeviceComputerName = mer.DeviceComputerName, + DeviceAssignedUserDomain = mer.DeviceAssignedUserDomain, + DeviceAssignedUserName = mer.DeviceAssignedUserName, + DeviceAssignedUserSID = mer.DeviceAssignedUserSID, + DeviceAssignedUserUsername = mer.DeviceAssignedUserUsername + }; + } + + } +} diff --git a/Disco.Models/ClientServices/ServiceBase.cs b/Disco.Models/ClientServices/ServiceBase.cs index 428e4ad3..875ff63a 100644 --- a/Disco.Models/ClientServices/ServiceBase.cs +++ b/Disco.Models/ClientServices/ServiceBase.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.ClientServices -{ - public abstract class ServiceBase - { - internal ServiceBase() - { - } - - public abstract string Feature { get; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.ClientServices +{ + public abstract class ServiceBase + { + internal ServiceBase() + { + } + + public abstract string Feature { get; } + } +} diff --git a/Disco.Models/ClientServices/WhoAmI.cs b/Disco.Models/ClientServices/WhoAmI.cs index 403e30e8..e563c322 100644 --- a/Disco.Models/ClientServices/WhoAmI.cs +++ b/Disco.Models/ClientServices/WhoAmI.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.ClientServices -{ - public class WhoAmI : ServiceBase - { - - public override string Feature - { - get { return "WhoAmI"; } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.ClientServices +{ + public class WhoAmI : ServiceBase + { + + public override string Feature + { + get { return "WhoAmI"; } + } + } +} diff --git a/Disco.Models/ClientServices/WhoAmIResponse.cs b/Disco.Models/ClientServices/WhoAmIResponse.cs index 0fb18b85..d008a83d 100644 --- a/Disco.Models/ClientServices/WhoAmIResponse.cs +++ b/Disco.Models/ClientServices/WhoAmIResponse.cs @@ -1,19 +1,19 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Models.ClientServices -{ - public class WhoAmIResponse - { - public string DisplayName { get; set; } - public string Type { get; set; } - public string Username { get; set; } - - public override string ToString() - { - return string.Format("{0} ({1})", DisplayName, Username); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Models.ClientServices +{ + public class WhoAmIResponse + { + public string DisplayName { get; set; } + public string Type { get; set; } + public string Username { get; set; } + + public override string ToString() + { + return string.Format("{0} ({1})", DisplayName, Username); + } + } +} diff --git a/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryMachineAccount.cs b/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryMachineAccount.cs index 00eb8169..5654fe6c 100644 --- a/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryMachineAccount.cs +++ b/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryMachineAccount.cs @@ -1,45 +1,45 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; - -namespace Disco.Models.Interop.ActiveDirectory -{ - public class ActiveDirectoryMachineAccount - { - public string DistinguishedName { get; set; } - public string DnsName { get; set; } - public string Domain { get; set; } - public string Name { get; set; } - public Guid NetbootGUID { get; set; } - public string ObjectSid { get; set; } - public string Path { get; set; } - public string sAMAccountName { get; set; } - public bool IsCriticalSystemObject { get; set; } - public Dictionary LoadedProperties { get; set; } - - public string ParentDistinguishedName - { - get - { - // Determine Parent - if (!string.IsNullOrWhiteSpace(DistinguishedName)) - return DistinguishedName.Substring(0, DistinguishedName.IndexOf(",DC=")).Substring(DistinguishedName.IndexOf(",") + 1); - else - return null; - } - } - - public User ToRepositoryUser() - { - return new User - { - Id = this.sAMAccountName, - Type = "Computer", - DisplayName = this.Name - }; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; + +namespace Disco.Models.Interop.ActiveDirectory +{ + public class ActiveDirectoryMachineAccount + { + public string DistinguishedName { get; set; } + public string DnsName { get; set; } + public string Domain { get; set; } + public string Name { get; set; } + public Guid NetbootGUID { get; set; } + public string ObjectSid { get; set; } + public string Path { get; set; } + public string sAMAccountName { get; set; } + public bool IsCriticalSystemObject { get; set; } + public Dictionary LoadedProperties { get; set; } + + public string ParentDistinguishedName + { + get + { + // Determine Parent + if (!string.IsNullOrWhiteSpace(DistinguishedName)) + return DistinguishedName.Substring(0, DistinguishedName.IndexOf(",DC=")).Substring(DistinguishedName.IndexOf(",") + 1); + else + return null; + } + } + + public User ToRepositoryUser() + { + return new User + { + Id = this.sAMAccountName, + Type = "Computer", + DisplayName = this.Name + }; + } + + } +} diff --git a/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryUserAccount.cs b/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryUserAccount.cs index 6cfb1822..d0db5827 100644 --- a/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryUserAccount.cs +++ b/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryUserAccount.cs @@ -1,41 +1,41 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Models.Repository; - -namespace Disco.Models.Interop.ActiveDirectory -{ - public class ActiveDirectoryUserAccount - { - public string DisplayName { get; set; } - public string DistinguishedName { get; set; } - public string Domain { get; set; } - public string Email { get; set; } - public string GivenName { get; set; } - public List Groups { get; set; } - public string Name { get; set; } - public string ObjectSid { get; set; } - public string Path { get; set; } - public string Phone { get; set; } - public string sAMAccountName { get; set; } - public string Surname { get; set; } - public string Type { get; set; } - public Dictionary LoadedProperties { get; set; } - - public User ToRepositoryUser() - { - return new User - { - Id = this.sAMAccountName, - DisplayName = this.DisplayName, - Surname = this.Surname, - GivenName = this.GivenName, - EmailAddress = this.Email, - PhoneNumber = this.Phone, - Type = this.Type - }; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Models.Repository; + +namespace Disco.Models.Interop.ActiveDirectory +{ + public class ActiveDirectoryUserAccount + { + public string DisplayName { get; set; } + public string DistinguishedName { get; set; } + public string Domain { get; set; } + public string Email { get; set; } + public string GivenName { get; set; } + public List Groups { get; set; } + public string Name { get; set; } + public string ObjectSid { get; set; } + public string Path { get; set; } + public string Phone { get; set; } + public string sAMAccountName { get; set; } + public string Surname { get; set; } + public string Type { get; set; } + public Dictionary LoadedProperties { get; set; } + + public User ToRepositoryUser() + { + return new User + { + Id = this.sAMAccountName, + DisplayName = this.DisplayName, + Surname = this.Surname, + GivenName = this.GivenName, + EmailAddress = this.Email, + PhoneNumber = this.Phone, + Type = this.Type + }; + } + + } +} diff --git a/Disco.Models/Repository/ConfigurationItem.cs b/Disco.Models/Repository/ConfigurationItem.cs index 4e6dc9a7..2c29ef26 100644 --- a/Disco.Models/Repository/ConfigurationItem.cs +++ b/Disco.Models/Repository/ConfigurationItem.cs @@ -1,19 +1,19 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - [Table("Configuration")] - public class ConfigurationItem - { - [StringLength(80), Column(Order = 1), Key] - public string Key { get; set; } - [Column(Order = 0), StringLength(80), Key] - public string Scope { get; set; } - public string Value { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + [Table("Configuration")] + public class ConfigurationItem + { + [StringLength(80), Column(Order = 1), Key] + public string Key { get; set; } + [Column(Order = 0), StringLength(80), Key] + public string Scope { get; set; } + public string Value { get; set; } + } +} diff --git a/Disco.Models/Repository/Device/DeviceAttachment.cs b/Disco.Models/Repository/Device/DeviceAttachment.cs index 595e81b2..e54168ac 100644 --- a/Disco.Models/Repository/Device/DeviceAttachment.cs +++ b/Disco.Models/Repository/Device/DeviceAttachment.cs @@ -1,37 +1,37 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class DeviceAttachment - { - [Key] - public int Id { get; set; } - public string DeviceSerialNumber { get; set; } - [Required] - public string TechUserId { get; set; } - [StringLength(500), Required] - public string Filename { get; set; } - [Required, StringLength(500)] - public string MimeType { get; set; } - public DateTime Timestamp { get; set; } - [Required, StringLength(500)] - public string Comments { get; set; } - - public string DocumentTemplateId { get; set; } - - [InverseProperty("DeviceAttachments"), ForeignKey("DeviceSerialNumber")] - public virtual Device Device { get; set; } - - [ForeignKey("TechUserId")] - public virtual User TechUser { get; set; } - - [ForeignKey("DocumentTemplateId")] - public virtual DocumentTemplate DocumentTemplate { get; set; } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class DeviceAttachment + { + [Key] + public int Id { get; set; } + public string DeviceSerialNumber { get; set; } + [Required] + public string TechUserId { get; set; } + [StringLength(500), Required] + public string Filename { get; set; } + [Required, StringLength(500)] + public string MimeType { get; set; } + public DateTime Timestamp { get; set; } + [Required, StringLength(500)] + public string Comments { get; set; } + + public string DocumentTemplateId { get; set; } + + [InverseProperty("DeviceAttachments"), ForeignKey("DeviceSerialNumber")] + public virtual Device Device { get; set; } + + [ForeignKey("TechUserId")] + public virtual User TechUser { get; set; } + + [ForeignKey("DocumentTemplateId")] + public virtual DocumentTemplate DocumentTemplate { get; set; } + + } +} diff --git a/Disco.Models/Repository/Device/DeviceBatch.cs b/Disco.Models/Repository/Device/DeviceBatch.cs index 72c40cc1..f5b16bc2 100644 --- a/Disco.Models/Repository/Device/DeviceBatch.cs +++ b/Disco.Models/Repository/Device/DeviceBatch.cs @@ -1,61 +1,61 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class DeviceBatch - { - [Key] - public int Id { get; set; } - [StringLength(500)] - public string Name { get; set; } - - [Required, DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] - public DateTime PurchaseDate { get; set; } - [StringLength(200)] - public string Supplier { get; set; } - [DataType(DataType.MultilineText), StringLength(500)] - public string PurchaseDetails { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:c}")] - public decimal? UnitCost { get; set; } - public int? UnitQuantity { get; set; } - - public int? DefaultDeviceModelId { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] - public DateTime? WarrantyValidUntil { get; set; } - [DataType(DataType.MultilineText)] - public string WarrantyDetails { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] - public DateTime? InsuredDate { get; set; } - [StringLength(200)] - public string InsuranceSupplier { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] - public DateTime? InsuredUntil { get; set; } - [DataType(DataType.MultilineText)] - public string InsuranceDetails { get; set; } - - [DataType(DataType.MultilineText)] - public string Comments { get; set; } - - [ForeignKey("DefaultDeviceModelId")] - public virtual DeviceModel DefaultDeviceModel { get; set; } - - public virtual IList Devices { get; set; } - - public override string ToString() - { - if (string.IsNullOrWhiteSpace(this.Name)) - { - return string.Format("{0}: {1}", this.Id, this.PurchaseDate.ToLongDateString()); - } - return this.Name; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class DeviceBatch + { + [Key] + public int Id { get; set; } + [StringLength(500)] + public string Name { get; set; } + + [Required, DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] + public DateTime PurchaseDate { get; set; } + [StringLength(200)] + public string Supplier { get; set; } + [DataType(DataType.MultilineText), StringLength(500)] + public string PurchaseDetails { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:c}")] + public decimal? UnitCost { get; set; } + public int? UnitQuantity { get; set; } + + public int? DefaultDeviceModelId { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] + public DateTime? WarrantyValidUntil { get; set; } + [DataType(DataType.MultilineText)] + public string WarrantyDetails { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] + public DateTime? InsuredDate { get; set; } + [StringLength(200)] + public string InsuranceSupplier { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] + public DateTime? InsuredUntil { get; set; } + [DataType(DataType.MultilineText)] + public string InsuranceDetails { get; set; } + + [DataType(DataType.MultilineText)] + public string Comments { get; set; } + + [ForeignKey("DefaultDeviceModelId")] + public virtual DeviceModel DefaultDeviceModel { get; set; } + + public virtual IList Devices { get; set; } + + public override string ToString() + { + if (string.IsNullOrWhiteSpace(this.Name)) + { + return string.Format("{0}: {1}", this.Id, this.PurchaseDate.ToLongDateString()); + } + return this.Name; + } + } +} diff --git a/Disco.Models/Repository/Device/DeviceCertificate.cs b/Disco.Models/Repository/Device/DeviceCertificate.cs index 1b8cfd3e..92c1b034 100644 --- a/Disco.Models/Repository/Device/DeviceCertificate.cs +++ b/Disco.Models/Repository/Device/DeviceCertificate.cs @@ -1,35 +1,35 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class DeviceCertificate - { - [Key] - public int Id { get; set; } - - [Required, StringLength(64)] - public string ProviderId { get; set; } - public int ProviderIndex { get; set; } - - [StringLength(28)] - public string Name { get; set; } - [MaxLength(16384)] - public byte[] Content { get; set; } - public bool Enabled { get; set; } - - // Added 2011-10-24 G# - public DateTime? ExpirationDate { get; set; } - // Added 2011-10-24 G# - public DateTime? AllocatedDate { get; set; } - - public string DeviceSerialNumber { get; set; } - - [ForeignKey("DeviceSerialNumber")] - public virtual Device Device { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class DeviceCertificate + { + [Key] + public int Id { get; set; } + + [Required, StringLength(64)] + public string ProviderId { get; set; } + public int ProviderIndex { get; set; } + + [StringLength(28)] + public string Name { get; set; } + [MaxLength(16384)] + public byte[] Content { get; set; } + public bool Enabled { get; set; } + + // Added 2011-10-24 G# + public DateTime? ExpirationDate { get; set; } + // Added 2011-10-24 G# + public DateTime? AllocatedDate { get; set; } + + public string DeviceSerialNumber { get; set; } + + [ForeignKey("DeviceSerialNumber")] + public virtual Device Device { get; set; } + } +} diff --git a/Disco.Models/Repository/Device/DeviceComponent.cs b/Disco.Models/Repository/Device/DeviceComponent.cs index 6fe2e617..c2f3df92 100644 --- a/Disco.Models/Repository/Device/DeviceComponent.cs +++ b/Disco.Models/Repository/Device/DeviceComponent.cs @@ -1,24 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class DeviceComponent - { - [Key] - public int Id { get; set; } - public int? DeviceModelId { get; set; } - [StringLength(100)] - public string Description { get; set; } - public decimal Cost { get; set; } - - [ForeignKey("DeviceModelId")] - public virtual DeviceModel DeviceModel { get; set; } - - public virtual IList JobSubTypes { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class DeviceComponent + { + [Key] + public int Id { get; set; } + public int? DeviceModelId { get; set; } + [StringLength(100)] + public string Description { get; set; } + public decimal Cost { get; set; } + + [ForeignKey("DeviceModelId")] + public virtual DeviceModel DeviceModel { get; set; } + + public virtual IList JobSubTypes { get; set; } + } +} diff --git a/Disco.Models/Repository/Device/DeviceDetail.cs b/Disco.Models/Repository/Device/DeviceDetail.cs index 696a2168..589ae16e 100644 --- a/Disco.Models/Repository/Device/DeviceDetail.cs +++ b/Disco.Models/Repository/Device/DeviceDetail.cs @@ -1,26 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class DeviceDetail - { - [Column(Order = 0), Key] - public string DeviceSerialNumber { get; set; } - - [Key, StringLength(100), Column(Order = 2)] - public string Key { get; set; } - - [Column(Order = 1), StringLength(100), Key] - public string Scope { get; set; } - - public string Value { get; set; } - - [ForeignKey("DeviceSerialNumber")] - public virtual Device Device { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class DeviceDetail + { + [Column(Order = 0), Key] + public string DeviceSerialNumber { get; set; } + + [Key, StringLength(100), Column(Order = 2)] + public string Key { get; set; } + + [Column(Order = 1), StringLength(100), Key] + public string Scope { get; set; } + + public string Value { get; set; } + + [ForeignKey("DeviceSerialNumber")] + public virtual Device Device { get; set; } + } +} diff --git a/Disco.Models/Repository/Device/DeviceModel.cs b/Disco.Models/Repository/Device/DeviceModel.cs index 30021a59..46cf2511 100644 --- a/Disco.Models/Repository/Device/DeviceModel.cs +++ b/Disco.Models/Repository/Device/DeviceModel.cs @@ -1,49 +1,49 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; - -namespace Disco.Models.Repository -{ - public class DeviceModel - { - [Key] - public int Id { get; set; } - [StringLength(500)] - public string Description { get; set; } - - [StringLength(200)] - public string Manufacturer { get; set; } - [StringLength(200)] - public string Model { get; set; } - [StringLength(40)] - public string ModelType { get; set; } - - // Remove Reliance On! - // Removed: 2013-01-14 G# - //[Obsolete("Image to be removed from the Database")] - //public byte[] Image { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] - public DateTime? DefaultPurchaseDate { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:c}")] - public decimal? DeviceCost { get; set; } - - [StringLength(40)] - public string DefaultWarrantyProvider { get; set; } - - public virtual IList DeviceComponents { get; set; } - - public virtual IList Devices { get; set; } - - public override string ToString() - { - if (string.IsNullOrWhiteSpace(this.Description)) - { - return string.Format("{0} {1}", this.Manufacturer, this.Model); - } - return this.Description; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; + +namespace Disco.Models.Repository +{ + public class DeviceModel + { + [Key] + public int Id { get; set; } + [StringLength(500)] + public string Description { get; set; } + + [StringLength(200)] + public string Manufacturer { get; set; } + [StringLength(200)] + public string Model { get; set; } + [StringLength(40)] + public string ModelType { get; set; } + + // Remove Reliance On! + // Removed: 2013-01-14 G# + //[Obsolete("Image to be removed from the Database")] + //public byte[] Image { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] + public DateTime? DefaultPurchaseDate { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:c}")] + public decimal? DeviceCost { get; set; } + + [StringLength(40)] + public string DefaultWarrantyProvider { get; set; } + + public virtual IList DeviceComponents { get; set; } + + public virtual IList Devices { get; set; } + + public override string ToString() + { + if (string.IsNullOrWhiteSpace(this.Description)) + { + return string.Format("{0} {1}", this.Manufacturer, this.Model); + } + return this.Description; + } + } +} diff --git a/Disco.Models/Repository/Device/DeviceProfile.cs b/Disco.Models/Repository/Device/DeviceProfile.cs index b57f6e98..628e98d7 100644 --- a/Disco.Models/Repository/Device/DeviceProfile.cs +++ b/Disco.Models/Repository/Device/DeviceProfile.cs @@ -1,83 +1,83 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using System.ComponentModel; -using System.Linq.Expressions; - -namespace Disco.Models.Repository -{ - public partial class DeviceProfile - { - [Key] - public int Id { get; set; } - - [Required, StringLength(100)] - public string Name { get; set; } - - [Required, StringLength(10)] - public string ShortName { get; set; } - - [StringLength(500)] - public string Description { get; set; } - - public int? DefaultOrganisationAddress { get; set; } - - // Migration from DeviceProfile Configuration - // 2012-06-14 G# - [Required()] - public string ComputerNameTemplate { get; set; } - public enum DistributionTypes : int - { - OneToMany = 0, - OneToOne = 1 - } - [Column("DistributionType"), EditorBrowsable(EditorBrowsableState.Never)] - public int DistributionTypeDb { get; set; } - [NotMapped] - public DistributionTypes DistributionType - { - get - { - return (DistributionTypes)this.DistributionTypeDb; - } - set - { - this.DistributionTypeDb = (int)value; - } - } - public string OrganisationalUnit { get; set; } - // End Migration - - // 2012-06-14 G# - public bool EnforceComputerNameConvention { get; set; } - public bool EnforceOrganisationalUnit { get; set; } - - // 2012-06-28 G# - public bool ProvisionADAccount { get; set; } - - public virtual IList Devices { get; set; } - - public override string ToString() - { - if (string.IsNullOrEmpty(this.ShortName)) - { - return this.Name; - } - return string.Format("{0} ({1})", this.Name, this.ShortName); - } - - // 2012-06-21 - // public bool AllocateCertificate { get; set; } // Renamed from 'AllocateWirelessCertificate' - [StringLength(64)] - public string CertificateProviderId { get; set; } - } - public partial class DeviceProfile - { - public class PropertyAccessExpressions { - public static readonly Expression> DistributionTypeDb = x => x.DistributionTypeDb; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.ComponentModel; +using System.Linq.Expressions; + +namespace Disco.Models.Repository +{ + public partial class DeviceProfile + { + [Key] + public int Id { get; set; } + + [Required, StringLength(100)] + public string Name { get; set; } + + [Required, StringLength(10)] + public string ShortName { get; set; } + + [StringLength(500)] + public string Description { get; set; } + + public int? DefaultOrganisationAddress { get; set; } + + // Migration from DeviceProfile Configuration + // 2012-06-14 G# + [Required()] + public string ComputerNameTemplate { get; set; } + public enum DistributionTypes : int + { + OneToMany = 0, + OneToOne = 1 + } + [Column("DistributionType"), EditorBrowsable(EditorBrowsableState.Never)] + public int DistributionTypeDb { get; set; } + [NotMapped] + public DistributionTypes DistributionType + { + get + { + return (DistributionTypes)this.DistributionTypeDb; + } + set + { + this.DistributionTypeDb = (int)value; + } + } + public string OrganisationalUnit { get; set; } + // End Migration + + // 2012-06-14 G# + public bool EnforceComputerNameConvention { get; set; } + public bool EnforceOrganisationalUnit { get; set; } + + // 2012-06-28 G# + public bool ProvisionADAccount { get; set; } + + public virtual IList Devices { get; set; } + + public override string ToString() + { + if (string.IsNullOrEmpty(this.ShortName)) + { + return this.Name; + } + return string.Format("{0} ({1})", this.Name, this.ShortName); + } + + // 2012-06-21 + // public bool AllocateCertificate { get; set; } // Renamed from 'AllocateWirelessCertificate' + [StringLength(64)] + public string CertificateProviderId { get; set; } + } + public partial class DeviceProfile + { + public class PropertyAccessExpressions { + public static readonly Expression> DistributionTypeDb = x => x.DistributionTypeDb; + } + } +} diff --git a/Disco.Models/Repository/Device/DeviceUserAssignment.cs b/Disco.Models/Repository/Device/DeviceUserAssignment.cs index c0bca3d1..ee19e0bd 100644 --- a/Disco.Models/Repository/Device/DeviceUserAssignment.cs +++ b/Disco.Models/Repository/Device/DeviceUserAssignment.cs @@ -1,26 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class DeviceUserAssignment - { - [Key, Column(Order = 0)] - public string DeviceSerialNumber { get; set; } - public string AssignedUserId { get; set; } - - [Column(Order = 1), Key] - public DateTime AssignedDate { get; set; } - public DateTime? UnassignedDate { get; set; } - - [ForeignKey("AssignedUserId")] - public virtual User AssignedUser { get; set; } - - [ForeignKey("DeviceSerialNumber")] - public virtual Device Device { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class DeviceUserAssignment + { + [Key, Column(Order = 0)] + public string DeviceSerialNumber { get; set; } + public string AssignedUserId { get; set; } + + [Column(Order = 1), Key] + public DateTime AssignedDate { get; set; } + public DateTime? UnassignedDate { get; set; } + + [ForeignKey("AssignedUserId")] + public virtual User AssignedUser { get; set; } + + [ForeignKey("DeviceSerialNumber")] + public virtual Device Device { get; set; } + } +} diff --git a/Disco.Models/Repository/DocumentTemplate/DocumentTemplate.cs b/Disco.Models/Repository/DocumentTemplate/DocumentTemplate.cs index 3cda79e2..b34336b0 100644 --- a/Disco.Models/Repository/DocumentTemplate/DocumentTemplate.cs +++ b/Disco.Models/Repository/DocumentTemplate/DocumentTemplate.cs @@ -1,44 +1,44 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class DocumentTemplate - { - public const string PdfMimeType = "application/pdf"; - - [StringLength(30), Required, Key] - public string Id { get; set; } - - [StringLength(250), Required] - public string Description { get; set; } - [Required, StringLength(6)] - public string Scope { get; set; } - [StringLength(250)] - public string FilterExpression { get; set; } - - // Feature Request 2012-05-10 by G#: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate - public bool FlattenForm { get; set; } - // End Feature Request - - [InverseProperty("DocumentTemplates")] - public virtual IList JobSubTypes { get; set; } - - public static class DocumentTemplateScopes - { - public const string Device = "Device"; - public const string Job = "Job"; - public const string User = "User"; - - public static List ToList() - { - return new List { Device, Job, User }; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class DocumentTemplate + { + public const string PdfMimeType = "application/pdf"; + + [StringLength(30), Required, Key] + public string Id { get; set; } + + [StringLength(250), Required] + public string Description { get; set; } + [Required, StringLength(6)] + public string Scope { get; set; } + [StringLength(250)] + public string FilterExpression { get; set; } + + // Feature Request 2012-05-10 by G#: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate + public bool FlattenForm { get; set; } + // End Feature Request + + [InverseProperty("DocumentTemplates")] + public virtual IList JobSubTypes { get; set; } + + public static class DocumentTemplateScopes + { + public const string Device = "Device"; + public const string Job = "Job"; + public const string User = "User"; + + public static List ToList() + { + return new List { Device, Job, User }; + } + } + + } +} diff --git a/Disco.Models/Repository/Job/Job.cs b/Disco.Models/Repository/Job/Job.cs index ba121484..d90320e1 100644 --- a/Disco.Models/Repository/Job/Job.cs +++ b/Disco.Models/Repository/Job/Job.cs @@ -1,132 +1,132 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class Job - { - [Key] - public int Id { get; set; } - [Required] - public string JobTypeId { get; set; } - - public string DeviceSerialNumber { get; set; } - public string UserId { get; set; } - - [Required] - public string OpenedTechUserId { get; set; } - - public DateTime OpenedDate { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? ExpectedClosedDate { get; set; } - public string ClosedTechUserId { get; set; } - public DateTime? ClosedDate { get; set; } - - public long? Flags { get; set; } - - [Display(Name = "Technician Held Device")] - public DateTime? DeviceHeld { get; set; } - public string DeviceHeldTechUserId { get; set; } - [StringLength(100)] - public string DeviceHeldLocation { get; set; } - - public DateTime? DeviceReadyForReturn { get; set; } - public string DeviceReadyForReturnTechUserId { get; set; } - public DateTime? DeviceReturnedDate { get; set; } - public string DeviceReturnedTechUserId { get; set; } - - public DateTime? WaitingForUserAction { get; set; } - - [ForeignKey("JobTypeId")] - public virtual JobType JobType { get; set; } - public virtual IList JobSubTypes { get; set; } - - [ForeignKey("DeviceSerialNumber")] - public virtual Device Device { get; set; } - [ForeignKey("UserId")] - public virtual User User { get; set; } - - [ForeignKey("OpenedTechUserId")] - public virtual User OpenedTechUser { get; set; } - [ForeignKey("ClosedTechUserId")] - public virtual User ClosedTechUser { get; set; } - - [ForeignKey("DeviceHeldTechUserId")] - public virtual User DeviceHeldTechUser { get; set; } - [ForeignKey("DeviceReadyForReturnTechUserId")] - public virtual User DeviceReadyForReturnTechUser { get; set; } - [ForeignKey("DeviceReturnedTechUserId")] - public virtual User DeviceReturnedTechUser { get; set; } - - //// Added 2012-10-23 G# - DBv5 Migration - //public virtual IList JobAssignments { get; set; } - //// End Added 2012-10-23 G# - DBv5 Migration - - public virtual IList JobAttachments { get; set; } - public virtual IList JobComponents { get; set; } - public virtual IList JobLogs { get; set; } - - public virtual JobMetaInsurance JobMetaInsurance { get; set; } - public virtual JobMetaWarranty JobMetaWarranty { get; set; } - public virtual JobMetaNonWarranty JobMetaNonWarranty { get; set; } - - #region Helper Members - public decimal JobComponentsTotalCost() - { - if (this.JobComponents != null) - { - return this.JobComponents.Sum(jc => jc.Cost); - } - return decimal.Zero; - } - #endregion - - public static class JobStatusIds - { - public const string AwaitingAccountingPayment = "AwaitingAccountingPayment"; - public const string AwaitingAccountingCharge = "AwaitingAccountingCharge"; - public const string AwaitingDeviceReturn = "AwaitingDeviceReturn"; - public const string AwaitingInsuranceProcessing = "AwaitingInsuranceProcessing"; - public const string AwaitingRepairs = "AwaitingRepairs"; - public const string AwaitingUserAction = "AwaitingUserAction"; - public const string AwaitingWarrantyRepair = "AwaitingWarrantyRepair"; - public const string Closed = "Closed"; - public const string Open = "Open"; - } - - [Flags] - public enum UserManagementFlags : long - { - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Games")] - Infringement_ContentGames = 1, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Illegal")] - Infringement_ContentIllegal = 2, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Violence")] - Infringement_ContentViolence = 4, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Pornography")] - Infringement_ContentPornography = 8, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Hacking")] - Infringement_Hacking = 16, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Proxy Bypass")] - Infringement_ProxyBypass = 32, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Breach Usage Agreement")] - Infringement_BreachUsageAgreement = 64, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Breach Financial Agreement")] - Infringement_BreachFinancialAgreement = 128, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Phone")] - Contact_Phone = 4294967296, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Email")] - Contact_Email = 8589934592, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "In Person")] - Contact_InPerson = 17179869184, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "SMS")] - Contact_SMS = 34359738368, - [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Mail")] - Contact_Mail = 68719476736, - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class Job + { + [Key] + public int Id { get; set; } + [Required] + public string JobTypeId { get; set; } + + public string DeviceSerialNumber { get; set; } + public string UserId { get; set; } + + [Required] + public string OpenedTechUserId { get; set; } + + public DateTime OpenedDate { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? ExpectedClosedDate { get; set; } + public string ClosedTechUserId { get; set; } + public DateTime? ClosedDate { get; set; } + + public long? Flags { get; set; } + + [Display(Name = "Technician Held Device")] + public DateTime? DeviceHeld { get; set; } + public string DeviceHeldTechUserId { get; set; } + [StringLength(100)] + public string DeviceHeldLocation { get; set; } + + public DateTime? DeviceReadyForReturn { get; set; } + public string DeviceReadyForReturnTechUserId { get; set; } + public DateTime? DeviceReturnedDate { get; set; } + public string DeviceReturnedTechUserId { get; set; } + + public DateTime? WaitingForUserAction { get; set; } + + [ForeignKey("JobTypeId")] + public virtual JobType JobType { get; set; } + public virtual IList JobSubTypes { get; set; } + + [ForeignKey("DeviceSerialNumber")] + public virtual Device Device { get; set; } + [ForeignKey("UserId")] + public virtual User User { get; set; } + + [ForeignKey("OpenedTechUserId")] + public virtual User OpenedTechUser { get; set; } + [ForeignKey("ClosedTechUserId")] + public virtual User ClosedTechUser { get; set; } + + [ForeignKey("DeviceHeldTechUserId")] + public virtual User DeviceHeldTechUser { get; set; } + [ForeignKey("DeviceReadyForReturnTechUserId")] + public virtual User DeviceReadyForReturnTechUser { get; set; } + [ForeignKey("DeviceReturnedTechUserId")] + public virtual User DeviceReturnedTechUser { get; set; } + + //// Added 2012-10-23 G# - DBv5 Migration + //public virtual IList JobAssignments { get; set; } + //// End Added 2012-10-23 G# - DBv5 Migration + + public virtual IList JobAttachments { get; set; } + public virtual IList JobComponents { get; set; } + public virtual IList JobLogs { get; set; } + + public virtual JobMetaInsurance JobMetaInsurance { get; set; } + public virtual JobMetaWarranty JobMetaWarranty { get; set; } + public virtual JobMetaNonWarranty JobMetaNonWarranty { get; set; } + + #region Helper Members + public decimal JobComponentsTotalCost() + { + if (this.JobComponents != null) + { + return this.JobComponents.Sum(jc => jc.Cost); + } + return decimal.Zero; + } + #endregion + + public static class JobStatusIds + { + public const string AwaitingAccountingPayment = "AwaitingAccountingPayment"; + public const string AwaitingAccountingCharge = "AwaitingAccountingCharge"; + public const string AwaitingDeviceReturn = "AwaitingDeviceReturn"; + public const string AwaitingInsuranceProcessing = "AwaitingInsuranceProcessing"; + public const string AwaitingRepairs = "AwaitingRepairs"; + public const string AwaitingUserAction = "AwaitingUserAction"; + public const string AwaitingWarrantyRepair = "AwaitingWarrantyRepair"; + public const string Closed = "Closed"; + public const string Open = "Open"; + } + + [Flags] + public enum UserManagementFlags : long + { + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Games")] + Infringement_ContentGames = 1, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Illegal")] + Infringement_ContentIllegal = 2, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Violence")] + Infringement_ContentViolence = 4, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Content - Pornography")] + Infringement_ContentPornography = 8, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Hacking")] + Infringement_Hacking = 16, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Proxy Bypass")] + Infringement_ProxyBypass = 32, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Breach Usage Agreement")] + Infringement_BreachUsageAgreement = 64, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Infringement, Name = "Breach Financial Agreement")] + Infringement_BreachFinancialAgreement = 128, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Phone")] + Contact_Phone = 4294967296, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Email")] + Contact_Email = 8589934592, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "In Person")] + Contact_InPerson = 17179869184, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "SMS")] + Contact_SMS = 34359738368, + [Display(GroupName = JobSubType.UserManagementJobSubTypes.Contact, Name = "Mail")] + Contact_Mail = 68719476736, + } + } +} diff --git a/Disco.Models/Repository/Job/JobAssignment.cs b/Disco.Models/Repository/Job/JobAssignment.cs index 6de71101..d6c2b529 100644 --- a/Disco.Models/Repository/Job/JobAssignment.cs +++ b/Disco.Models/Repository/Job/JobAssignment.cs @@ -1,30 +1,30 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using System.ComponentModel.DataAnnotations; -//using System.ComponentModel.DataAnnotations.Schema; - -//namespace Disco.Models.Repository -//{ -// // Added 2012-10-23 G# - DBv5 Migration -// public class JobAssignment -// { -// [Key, Required, ColumnAttribute(Order = 0)] -// public int JobId { get; set; } -// [Key, Required, ColumnAttribute(Order = 1)] -// public string TechUserId { get; set; } -// [Key, Required, ColumnAttribute(Order = 2)] -// public DateTime AssignedDate { get; set; } - -// public DateTime? UnassignedDate { get; set; } - -// public DateTime? TargetCompletionDate { get; set; } - -// [ForeignKey("JobId"), InverseProperty("JobAssignments")] -// public virtual Job Job { get; set; } - -// [ForeignKey("TechUserId")] -// public User TechUser { get; set; } -// } -//} +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using System.ComponentModel.DataAnnotations; +//using System.ComponentModel.DataAnnotations.Schema; + +//namespace Disco.Models.Repository +//{ +// // Added 2012-10-23 G# - DBv5 Migration +// public class JobAssignment +// { +// [Key, Required, ColumnAttribute(Order = 0)] +// public int JobId { get; set; } +// [Key, Required, ColumnAttribute(Order = 1)] +// public string TechUserId { get; set; } +// [Key, Required, ColumnAttribute(Order = 2)] +// public DateTime AssignedDate { get; set; } + +// public DateTime? UnassignedDate { get; set; } + +// public DateTime? TargetCompletionDate { get; set; } + +// [ForeignKey("JobId"), InverseProperty("JobAssignments")] +// public virtual Job Job { get; set; } + +// [ForeignKey("TechUserId")] +// public User TechUser { get; set; } +// } +//} diff --git a/Disco.Models/Repository/Job/JobAttachment.cs b/Disco.Models/Repository/Job/JobAttachment.cs index 2f046560..1e081e25 100644 --- a/Disco.Models/Repository/Job/JobAttachment.cs +++ b/Disco.Models/Repository/Job/JobAttachment.cs @@ -1,37 +1,37 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class JobAttachment - { - [Key] - public int Id { get; set; } - public int JobId { get; set; } - - [Required] - public string TechUserId { get; set; } - [Required, StringLength(500)] - public string Filename { get; set; } - [Required, StringLength(500)] - public string MimeType { get; set; } - public DateTime Timestamp { get; set; } - [StringLength(500), Required] - public string Comments { get; set; } - - public string DocumentTemplateId { get; set; } - - [ForeignKey("JobId"), InverseProperty("JobAttachments")] - public virtual Job Job { get; set; } - - [ForeignKey("TechUserId")] - public virtual User TechUser { get; set; } - - [ForeignKey("DocumentTemplateId")] - public virtual DocumentTemplate DocumentTemplate { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class JobAttachment + { + [Key] + public int Id { get; set; } + public int JobId { get; set; } + + [Required] + public string TechUserId { get; set; } + [Required, StringLength(500)] + public string Filename { get; set; } + [Required, StringLength(500)] + public string MimeType { get; set; } + public DateTime Timestamp { get; set; } + [StringLength(500), Required] + public string Comments { get; set; } + + public string DocumentTemplateId { get; set; } + + [ForeignKey("JobId"), InverseProperty("JobAttachments")] + public virtual Job Job { get; set; } + + [ForeignKey("TechUserId")] + public virtual User TechUser { get; set; } + + [ForeignKey("DocumentTemplateId")] + public virtual DocumentTemplate DocumentTemplate { get; set; } + } +} diff --git a/Disco.Models/Repository/Job/JobComponent.cs b/Disco.Models/Repository/Job/JobComponent.cs index 683c45c2..57977376 100644 --- a/Disco.Models/Repository/Job/JobComponent.cs +++ b/Disco.Models/Repository/Job/JobComponent.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class JobComponent - { - [Key] - public int Id { get; set; } - public int JobId { get; set; } - - [Required] - public string TechUserId { get; set; } - [StringLength(500)] - public string Description { get; set; } - public decimal Cost { get; set; } - - [ForeignKey("JobId")] - public virtual Job Job { get; set; } - - [ForeignKey("TechUserId")] - public virtual User TechUser { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class JobComponent + { + [Key] + public int Id { get; set; } + public int JobId { get; set; } + + [Required] + public string TechUserId { get; set; } + [StringLength(500)] + public string Description { get; set; } + public decimal Cost { get; set; } + + [ForeignKey("JobId")] + public virtual Job Job { get; set; } + + [ForeignKey("TechUserId")] + public virtual User TechUser { get; set; } + } +} diff --git a/Disco.Models/Repository/Job/JobLog.cs b/Disco.Models/Repository/Job/JobLog.cs index 0610ffc2..6ebe4778 100644 --- a/Disco.Models/Repository/Job/JobLog.cs +++ b/Disco.Models/Repository/Job/JobLog.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class JobLog - { - [Key] - public int Id { get; set; } - public int JobId { get; set; } - - [Required] - public string TechUserId { get; set; } - public DateTime Timestamp { get; set; } - [Required] - public string Comments { get; set; } - - [ForeignKey("JobId")] - public Job Job { get; set; } - - [ForeignKey("TechUserId")] - public User TechUser { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class JobLog + { + [Key] + public int Id { get; set; } + public int JobId { get; set; } + + [Required] + public string TechUserId { get; set; } + public DateTime Timestamp { get; set; } + [Required] + public string Comments { get; set; } + + [ForeignKey("JobId")] + public Job Job { get; set; } + + [ForeignKey("TechUserId")] + public User TechUser { get; set; } + } +} diff --git a/Disco.Models/Repository/Job/JobMeta/JobMetaInsurance.cs b/Disco.Models/Repository/Job/JobMeta/JobMetaInsurance.cs index e7b595f0..b7ad45f8 100644 --- a/Disco.Models/Repository/Job/JobMeta/JobMetaInsurance.cs +++ b/Disco.Models/Repository/Job/JobMeta/JobMetaInsurance.cs @@ -1,68 +1,68 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class JobMetaInsurance - { - [Required, Key] - public int JobId { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? LossOrDamageDate { get; set; } - - [StringLength(200)] - public string EventLocation { get; set; } - - [DataType(DataType.MultilineText)] - public string Description { get; set; } - - [Display(Name = "Caused by Third Party")] - public bool ThirdPartyCaused { get; set; } - [StringLength(200)] - public string ThirdPartyCausedName { get; set; } - [DataType(DataType.MultilineText), StringLength(600)] - public string ThirdPartyCausedWhy { get; set; } - - [StringLength(1200), DataType(DataType.MultilineText)] - public string WitnessesNamesAddresses { get; set; } - - [StringLength(200)] - public string BurglaryTheftMethodOfEntry { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? PropertyLastSeenDate { get; set; } - - [Display(Name = "Police Notified")] - public bool PoliceNotified { get; set; } - [StringLength(200)] - public string PoliceNotifiedStation { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] - public DateTime? PoliceNotifiedDate { get; set; } - [StringLength(400)] - public string PoliceNotifiedCrimeReportNo { get; set; } - - [DataType(DataType.MultilineText), StringLength(800)] - public string RecoverReduceAction { get; set; } - - [StringLength(500)] - public string OtherInterestedParties { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] - public DateTime? DateOfPurchase { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? ClaimFormSentDate { get; set; } - public string ClaimFormSentUserId { get; set; } - - [Required, ForeignKey("JobId")] - public virtual Job Job { get; set; } - - [ForeignKey("ClaimFormSentUserId")] - public virtual User ClaimFormSentUser { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class JobMetaInsurance + { + [Required, Key] + public int JobId { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? LossOrDamageDate { get; set; } + + [StringLength(200)] + public string EventLocation { get; set; } + + [DataType(DataType.MultilineText)] + public string Description { get; set; } + + [Display(Name = "Caused by Third Party")] + public bool ThirdPartyCaused { get; set; } + [StringLength(200)] + public string ThirdPartyCausedName { get; set; } + [DataType(DataType.MultilineText), StringLength(600)] + public string ThirdPartyCausedWhy { get; set; } + + [StringLength(1200), DataType(DataType.MultilineText)] + public string WitnessesNamesAddresses { get; set; } + + [StringLength(200)] + public string BurglaryTheftMethodOfEntry { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? PropertyLastSeenDate { get; set; } + + [Display(Name = "Police Notified")] + public bool PoliceNotified { get; set; } + [StringLength(200)] + public string PoliceNotifiedStation { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] + public DateTime? PoliceNotifiedDate { get; set; } + [StringLength(400)] + public string PoliceNotifiedCrimeReportNo { get; set; } + + [DataType(DataType.MultilineText), StringLength(800)] + public string RecoverReduceAction { get; set; } + + [StringLength(500)] + public string OtherInterestedParties { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd}", HtmlEncode = false)] + public DateTime? DateOfPurchase { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? ClaimFormSentDate { get; set; } + public string ClaimFormSentUserId { get; set; } + + [Required, ForeignKey("JobId")] + public virtual Job Job { get; set; } + + [ForeignKey("ClaimFormSentUserId")] + public virtual User ClaimFormSentUser { get; set; } + } +} diff --git a/Disco.Models/Repository/Job/JobMeta/JobMetaNonWarranty.cs b/Disco.Models/Repository/Job/JobMeta/JobMetaNonWarranty.cs index 95f68fdc..ad78c922 100644 --- a/Disco.Models/Repository/Job/JobMeta/JobMetaNonWarranty.cs +++ b/Disco.Models/Repository/Job/JobMeta/JobMetaNonWarranty.cs @@ -1,67 +1,67 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class JobMetaNonWarranty - { - [Key, Required] - public int JobId { get; set; } - - public bool IsInsuranceClaim { get; set; } - - // Feature Request 2012-05-10 by Michael E: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? AccountingChargeRequiredDate { get; set; } - [ForeignKey("AccountingChargeRequiredUserId")] - public virtual User AccountingChargeRequiredUser { get; set; } - public string AccountingChargeRequiredUserId { get; set; } - // End Feature Request - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? AccountingChargeAddedDate { get; set; } - [ForeignKey("AccountingChargeAddedUserId")] - public virtual User AccountingChargeAddedUser { get; set; } - public string AccountingChargeAddedUserId { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? AccountingChargePaidDate { get; set; } - [ForeignKey("AccountingChargePaidUserId")] - public virtual User AccountingChargePaidUser { get; set; } - public string AccountingChargePaidUserId { get; set; } - - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? PurchaseOrderRaisedDate { get; set; } - [ForeignKey("PurchaseOrderRaisedUserId")] - public virtual User PurchaseOrderRaisedUser { get; set; } - public string PurchaseOrderRaisedUserId { get; set; } - [StringLength(20)] - public string PurchaseOrderReference { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? PurchaseOrderSentDate { get; set; } - [ForeignKey("PurchaseOrderSentUserId")] - public virtual User PurchaseOrderSentUser { get; set; } - public string PurchaseOrderSentUserId { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? InvoiceReceivedDate { get; set; } - [ForeignKey("InvoiceReceivedUserId")] - public virtual User InvoiceReceivedUser { get; set; } - public string InvoiceReceivedUserId { get; set; } - - [StringLength(100)] - public string RepairerName { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? RepairerLoggedDate { get; set; } - [StringLength(100)] - public string RepairerReference { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? RepairerCompletedDate { get; set; } - - [ForeignKey("JobId"), Required] - public virtual Job Job { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class JobMetaNonWarranty + { + [Key, Required] + public int JobId { get; set; } + + public bool IsInsuranceClaim { get; set; } + + // Feature Request 2012-05-10 by Michael E: https://disco.uservoice.com/forums/159707-feedback/suggestions/2811092-document-template-option-flatten-form-on-generate + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? AccountingChargeRequiredDate { get; set; } + [ForeignKey("AccountingChargeRequiredUserId")] + public virtual User AccountingChargeRequiredUser { get; set; } + public string AccountingChargeRequiredUserId { get; set; } + // End Feature Request + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? AccountingChargeAddedDate { get; set; } + [ForeignKey("AccountingChargeAddedUserId")] + public virtual User AccountingChargeAddedUser { get; set; } + public string AccountingChargeAddedUserId { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? AccountingChargePaidDate { get; set; } + [ForeignKey("AccountingChargePaidUserId")] + public virtual User AccountingChargePaidUser { get; set; } + public string AccountingChargePaidUserId { get; set; } + + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? PurchaseOrderRaisedDate { get; set; } + [ForeignKey("PurchaseOrderRaisedUserId")] + public virtual User PurchaseOrderRaisedUser { get; set; } + public string PurchaseOrderRaisedUserId { get; set; } + [StringLength(20)] + public string PurchaseOrderReference { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? PurchaseOrderSentDate { get; set; } + [ForeignKey("PurchaseOrderSentUserId")] + public virtual User PurchaseOrderSentUser { get; set; } + public string PurchaseOrderSentUserId { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? InvoiceReceivedDate { get; set; } + [ForeignKey("InvoiceReceivedUserId")] + public virtual User InvoiceReceivedUser { get; set; } + public string InvoiceReceivedUserId { get; set; } + + [StringLength(100)] + public string RepairerName { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? RepairerLoggedDate { get; set; } + [StringLength(100)] + public string RepairerReference { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? RepairerCompletedDate { get; set; } + + [ForeignKey("JobId"), Required] + public virtual Job Job { get; set; } + } +} diff --git a/Disco.Models/Repository/Job/JobMeta/JobMetaWarranty.cs b/Disco.Models/Repository/Job/JobMeta/JobMetaWarranty.cs index a78a3686..267e8308 100644 --- a/Disco.Models/Repository/Job/JobMeta/JobMetaWarranty.cs +++ b/Disco.Models/Repository/Job/JobMeta/JobMetaWarranty.cs @@ -1,27 +1,27 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class JobMetaWarranty - { - [Required, Key] - public int JobId { get; set; } - - [StringLength(100)] - public string ExternalName { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? ExternalLoggedDate { get; set; } - [StringLength(100)] - public string ExternalReference { get; set; } - [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] - public DateTime? ExternalCompletedDate { get; set; } - - [ForeignKey("JobId"), Required] - public virtual Job Job { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class JobMetaWarranty + { + [Required, Key] + public int JobId { get; set; } + + [StringLength(100)] + public string ExternalName { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? ExternalLoggedDate { get; set; } + [StringLength(100)] + public string ExternalReference { get; set; } + [DisplayFormat(ApplyFormatInEditMode = true, ConvertEmptyStringToNull = true, DataFormatString = "{0:yyyy/MM/dd hh:mm tt}", HtmlEncode = false)] + public DateTime? ExternalCompletedDate { get; set; } + + [ForeignKey("JobId"), Required] + public virtual Job Job { get; set; } + } +} diff --git a/Disco.Models/Repository/Job/JobSubType.cs b/Disco.Models/Repository/Job/JobSubType.cs index 48157aea..1027693d 100644 --- a/Disco.Models/Repository/Job/JobSubType.cs +++ b/Disco.Models/Repository/Job/JobSubType.cs @@ -1,37 +1,37 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class JobSubType - { - [Key, StringLength(20), Column(Order = 0)] - public string Id { get; set; } - [Key, Required, Column(Order = 1)] - public string JobTypeId { get; set; } - [Required, StringLength(100)] - public string Description { get; set; } - - public virtual IList AttachmentTypes { get; set; } - public virtual IList DeviceComponents { get; set; } - - [ForeignKey("JobTypeId")] - public virtual JobType JobType { get; set; } - public virtual IList Jobs { get; set; } - - public static class UserManagementJobSubTypes - { - public const string Infringement = "Infringement"; - public const string Contact = "Contact"; - } - - public override string ToString() - { - return this.Description; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class JobSubType + { + [Key, StringLength(20), Column(Order = 0)] + public string Id { get; set; } + [Key, Required, Column(Order = 1)] + public string JobTypeId { get; set; } + [Required, StringLength(100)] + public string Description { get; set; } + + public virtual IList AttachmentTypes { get; set; } + public virtual IList DeviceComponents { get; set; } + + [ForeignKey("JobTypeId")] + public virtual JobType JobType { get; set; } + public virtual IList Jobs { get; set; } + + public static class UserManagementJobSubTypes + { + public const string Infringement = "Infringement"; + public const string Contact = "Contact"; + } + + public override string ToString() + { + return this.Description; + } + } +} diff --git a/Disco.Models/Repository/Job/JobType.cs b/Disco.Models/Repository/Job/JobType.cs index 03663f9d..febef3af 100644 --- a/Disco.Models/Repository/Job/JobType.cs +++ b/Disco.Models/Repository/Job/JobType.cs @@ -1,34 +1,34 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; - -namespace Disco.Models.Repository -{ - public class JobType - { - [StringLength(5), Key] - public string Id { get; set; } - [StringLength(100)] - public string Description { get; set; } - - public virtual IList JobSubTypes { get; set; } - - public override string ToString() - { - return this.Description; - } - - public static class JobTypeIds - { - public const string HMisc = "HMisc"; - public const string HNWar = "HNWar"; - public const string HWar = "HWar"; - public const string SApp = "SApp"; - public const string SImg = "SImg"; - public const string SOS = "SOS"; - public const string UMgmt = "UMgmt"; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; + +namespace Disco.Models.Repository +{ + public class JobType + { + [StringLength(5), Key] + public string Id { get; set; } + [StringLength(100)] + public string Description { get; set; } + + public virtual IList JobSubTypes { get; set; } + + public override string ToString() + { + return this.Description; + } + + public static class JobTypeIds + { + public const string HMisc = "HMisc"; + public const string HNWar = "HNWar"; + public const string HWar = "HWar"; + public const string SApp = "SApp"; + public const string SImg = "SImg"; + public const string SOS = "SOS"; + public const string UMgmt = "UMgmt"; + } + } +} diff --git a/Disco.Models/Repository/User/User.cs b/Disco.Models/Repository/User/User.cs index 076cc0c4..a6f338c7 100644 --- a/Disco.Models/Repository/User/User.cs +++ b/Disco.Models/Repository/User/User.cs @@ -1,79 +1,79 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class User - { - [StringLength(50), Key] - public string Id { get; set; } - - [StringLength(200)] - public string DisplayName { get; set; } - [StringLength(200)] - public string Surname { get; set; } - [StringLength(200)] - public string GivenName { get; set; } - - [StringLength(8)] - public string Type { get; set; } - [StringLength(100)] - public string PhoneNumber { get; set; } - [StringLength(150)] - public string EmailAddress { get; set; } - - public virtual IList UserDetails { get; set; } - public virtual IList UserAttachments { get; set; } - public virtual IList DeviceUserAssignments { get; set; } - [InverseProperty("UserId")] - public virtual IList Jobs { get; set; } - - //#region Helper Members - //[NotMapped, XmlIgnore, ScriptIgnore] - //public List CurrentDeviceUserAssignments - //{ - // get - // { - // return this.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).ToList(); - // } - //} - //#endregion - - public override string ToString() - { - return string.Format("{0} ({1})", this.DisplayName, this.Id); - } - - public void UpdateSelf(User u) - { - if (!this.Id.Equals(u.Id, StringComparison.InvariantCultureIgnoreCase)) - throw new ArgumentException("User Id's do not match", "u"); - - if (this.Surname != u.Surname) - this.Surname = u.Surname; - if (this.GivenName != u.GivenName) - this.GivenName = u.GivenName; - if (this.DisplayName != u.DisplayName) - this.DisplayName = u.DisplayName; - if (this.EmailAddress != u.EmailAddress) - this.EmailAddress = u.EmailAddress; - if (this.PhoneNumber != u.PhoneNumber) - this.PhoneNumber = u.PhoneNumber; - if (this.Type != u.Type) - this.Type = u.Type; - } - - public static class Types - { - public const string Admin = "Admin"; - public const string Computer = "Computer"; - public const string Staff = "Staff"; - public const string Student = "Student"; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class User + { + [StringLength(50), Key] + public string Id { get; set; } + + [StringLength(200)] + public string DisplayName { get; set; } + [StringLength(200)] + public string Surname { get; set; } + [StringLength(200)] + public string GivenName { get; set; } + + [StringLength(8)] + public string Type { get; set; } + [StringLength(100)] + public string PhoneNumber { get; set; } + [StringLength(150)] + public string EmailAddress { get; set; } + + public virtual IList UserDetails { get; set; } + public virtual IList UserAttachments { get; set; } + public virtual IList DeviceUserAssignments { get; set; } + [InverseProperty("UserId")] + public virtual IList Jobs { get; set; } + + //#region Helper Members + //[NotMapped, XmlIgnore, ScriptIgnore] + //public List CurrentDeviceUserAssignments + //{ + // get + // { + // return this.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).ToList(); + // } + //} + //#endregion + + public override string ToString() + { + return string.Format("{0} ({1})", this.DisplayName, this.Id); + } + + public void UpdateSelf(User u) + { + if (!this.Id.Equals(u.Id, StringComparison.InvariantCultureIgnoreCase)) + throw new ArgumentException("User Id's do not match", "u"); + + if (this.Surname != u.Surname) + this.Surname = u.Surname; + if (this.GivenName != u.GivenName) + this.GivenName = u.GivenName; + if (this.DisplayName != u.DisplayName) + this.DisplayName = u.DisplayName; + if (this.EmailAddress != u.EmailAddress) + this.EmailAddress = u.EmailAddress; + if (this.PhoneNumber != u.PhoneNumber) + this.PhoneNumber = u.PhoneNumber; + if (this.Type != u.Type) + this.Type = u.Type; + } + + public static class Types + { + public const string Admin = "Admin"; + public const string Computer = "Computer"; + public const string Staff = "Staff"; + public const string Student = "Student"; + } + + } +} diff --git a/Disco.Models/Repository/User/UserAttachment.cs b/Disco.Models/Repository/User/UserAttachment.cs index 51e22a6d..25b45a50 100644 --- a/Disco.Models/Repository/User/UserAttachment.cs +++ b/Disco.Models/Repository/User/UserAttachment.cs @@ -1,36 +1,36 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class UserAttachment - { - [Key] - public int Id { get; set; } - public string UserId { get; set; } - [Required] - public string TechUserId { get; set; } - [Required, StringLength(500)] - public string Filename { get; set; } - [StringLength(500), Required] - public string MimeType { get; set; } - public DateTime Timestamp { get; set; } - [Required, StringLength(500)] - public string Comments { get; set; } - - public string DocumentTemplateId { get; set; } - - [ForeignKey("UserId"), InverseProperty("UserAttachments")] - public virtual User User { get; set; } - - [ForeignKey("TechUserId")] - public virtual User TechUser { get; set; } - - [ForeignKey("DocumentTemplateId")] - public virtual DocumentTemplate DocumentTemplate { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class UserAttachment + { + [Key] + public int Id { get; set; } + public string UserId { get; set; } + [Required] + public string TechUserId { get; set; } + [Required, StringLength(500)] + public string Filename { get; set; } + [StringLength(500), Required] + public string MimeType { get; set; } + public DateTime Timestamp { get; set; } + [Required, StringLength(500)] + public string Comments { get; set; } + + public string DocumentTemplateId { get; set; } + + [ForeignKey("UserId"), InverseProperty("UserAttachments")] + public virtual User User { get; set; } + + [ForeignKey("TechUserId")] + public virtual User TechUser { get; set; } + + [ForeignKey("DocumentTemplateId")] + public virtual DocumentTemplate DocumentTemplate { get; set; } + } +} diff --git a/Disco.Models/Repository/User/UserDetail.cs b/Disco.Models/Repository/User/UserDetail.cs index ea429a11..0768c212 100644 --- a/Disco.Models/Repository/User/UserDetail.cs +++ b/Disco.Models/Repository/User/UserDetail.cs @@ -1,26 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Models.Repository -{ - public class UserDetail - { - [Key, Column(Order = 0)] - public string UserId { get; set; } - - [Column(Order = 1), Key, StringLength(100)] - public string Scope { get; set; } - - [Key, Column(Order = 2), StringLength(100)] - public string Key { get; set; } - - public string Value { get; set; } - - [ForeignKey("UserId")] - public virtual User User { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Models.Repository +{ + public class UserDetail + { + [Key, Column(Order = 0)] + public string UserId { get; set; } + + [Column(Order = 1), Key, StringLength(100)] + public string Scope { get; set; } + + [Key, Column(Order = 2), StringLength(100)] + public string Key { get; set; } + + public string Value { get; set; } + + [ForeignKey("UserId")] + public virtual User User { get; set; } + } +} diff --git a/Disco.Services/App.config b/Disco.Services/App.config index f1f62828..5ced0be2 100644 --- a/Disco.Services/App.config +++ b/Disco.Services/App.config @@ -1,17 +1,17 @@ - - - - -
- - - - - - - - - - - + + + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Disco.Services/Logging/LogBase.cs b/Disco.Services/Logging/LogBase.cs index 14060559..6c5fa36a 100644 --- a/Disco.Services/Logging/LogBase.cs +++ b/Disco.Services/Logging/LogBase.cs @@ -1,43 +1,43 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Services.Logging -{ - public abstract class LogBase - { - private Dictionary _EventTypes; - - public LogBase() - { - // Cache Event Types - _EventTypes = this.LoadEventTypes().ToDictionary(et => et.Id); - } - - public abstract int ModuleId { get; } - public abstract string ModuleName { get; } - public abstract string ModuleDescription { get; } - protected abstract List LoadEventTypes(); - - public Dictionary EventTypes - { - get - { - return _EventTypes; - } - } - protected void Log(int EventTypeId, params object[] Args) - { - LogContext.Current.Log(this.ModuleId, EventTypeId, Args); - } - public string LiveLogGroupName - { - get - { - return this.ModuleName; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Services.Logging +{ + public abstract class LogBase + { + private Dictionary _EventTypes; + + public LogBase() + { + // Cache Event Types + _EventTypes = this.LoadEventTypes().ToDictionary(et => et.Id); + } + + public abstract int ModuleId { get; } + public abstract string ModuleName { get; } + public abstract string ModuleDescription { get; } + protected abstract List LoadEventTypes(); + + public Dictionary EventTypes + { + get + { + return _EventTypes; + } + } + protected void Log(int EventTypeId, params object[] Args) + { + LogContext.Current.Log(this.ModuleId, EventTypeId, Args); + } + public string LiveLogGroupName + { + get + { + return this.ModuleName; + } + } + + } +} diff --git a/Disco.Services/Logging/LogContext.cs b/Disco.Services/Logging/LogContext.cs index ac5c856b..09fe63bd 100644 --- a/Disco.Services/Logging/LogContext.cs +++ b/Disco.Services/Logging/LogContext.cs @@ -1,314 +1,314 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Data.Repository; -using System.IO; -using System.Management; -using System.Diagnostics; -using System.Data.SqlServerCe; -using System.Data.EntityClient; -using System.Data.Entity; -using Quartz; -using Quartz.Impl; -using Quartz.Impl.Triggers; -using Newtonsoft.Json; - -namespace Disco.Services.Logging -{ - public class LogContext - { - public static Dictionary LogModules { get; private set; } - private static object _LogModulesLock = new object(); - - private static LogContext _Current; - private static object _CurrentLock = new Object(); - public static LogContext Current - { - get - { - lock (_CurrentLock) - { - if (_Current == null) - throw new InvalidOperationException("Logging Context has not been Initialized"); - return _Current; - } - } - private set - { - lock (_CurrentLock) - { - _Current = value; - } - } - } - - private static void InitalizeModules() - { - if (LogModules == null) - { - lock (_LogModulesLock) - { - if (LogModules == null) - { - LogModules = new Dictionary(); - // Load all LogModules (Only from Disco Assemblies) - var appDomain = AppDomain.CurrentDomain; - - var logModuleTypes = (from a in appDomain.GetAssemblies() - where !a.GlobalAssemblyCache && !a.IsDynamic && a.FullName.StartsWith("Disco.", StringComparison.InvariantCultureIgnoreCase) - from type in a.GetTypes() - where typeof(LogBase).IsAssignableFrom(type) && !type.IsAbstract - select type); - foreach (var logModuleType in logModuleTypes) - { - var instance = (LogBase)Activator.CreateInstance(logModuleType); - LogModules[instance.ModuleId] = instance; - } - } - } - } - } - - private static void InitalizeDatabase(Targets.LogPersistContext logDbContext) - { - // Add Modules - var existingModules = logDbContext.Modules.Include("EventTypes").ToDictionary(m => m.Id); - foreach (var module in LogModules) - { - // Update/Insert Module - Models.LogModule dbModule; - if (existingModules.TryGetValue(module.Key, out dbModule)) - { - // Update - if (dbModule.Name != module.Value.ModuleName) - dbModule.Name = module.Value.ModuleName; - if (dbModule.Description != module.Value.ModuleDescription) - dbModule.Description = module.Value.ModuleDescription; - } - else - { - // Insert - dbModule = new Models.LogModule() - { - Id = module.Key, - Name = module.Value.ModuleName, - Description = module.Value.ModuleDescription - }; - logDbContext.Modules.Add(dbModule); - } - // Update/Insert Event Types - Dictionary existingEventTypes = (dbModule.EventTypes == null) ? new Dictionary() : dbModule.EventTypes.ToDictionary(et => et.Id); - foreach (var eventType in module.Value.EventTypes) - { - Models.LogEventType dbEventType; - if (existingEventTypes.TryGetValue(eventType.Key, out dbEventType)) - { - // Update - if (dbEventType.Name != eventType.Value.Name) - dbEventType.Name = eventType.Value.Name; - if (dbEventType.Severity != eventType.Value.Severity) - dbEventType.Severity = eventType.Value.Severity; - if (dbEventType.Format != eventType.Value.Format) - dbEventType.Format = eventType.Value.Format; - } - else - { - // Insert - dbEventType = new Models.LogEventType() - { - Id = eventType.Key, - ModuleId = module.Key, - Name = eventType.Value.Name, - Severity = eventType.Value.Severity, - Format = eventType.Value.Format - }; - logDbContext.EventTypes.Add(dbEventType); - } - } - } - - logDbContext.SaveChanges(); - } - - public static string LogFileBasePath(DiscoDataContext DiscoContext) - { - var logDirectoryBase = Path.Combine(DiscoContext.DiscoConfiguration.DataStoreLocation, "Logs"); - // Create Directory Structure - if (!Directory.Exists(logDirectoryBase)) - { - Directory.CreateDirectory(logDirectoryBase); - } - // Ensure Logs are NTFS Compressed - TODO... - //Utilities.CompressDirectory(logDirectory); - // WMI - Doesn't Work for Network Folders... - //var logDirectoryBaseInfo = new DirectoryInfo(logDirectoryBase); - //if ((logDirectoryBaseInfo.Attributes & FileAttributes.Compressed) != FileAttributes.Compressed) - //{ - // var logDirectoryWmiPath = string.Format("Win32_Directory.Name=\"{0}\"", logDirectoryBase); - // using (ManagementObject logDirectoryBaseMO = new ManagementObject(logDirectoryWmiPath)) - // { - // ManagementBaseObject outParams = logDirectoryBaseMO.InvokeMethod("Compress", null, null); - // Debug.WriteLine("LoggingContext.InitalizeCurrent: Compressing Log Folder; Result: " + outParams.Properties["ReturnValue"].Value.ToString()); - // } - //} - return logDirectoryBase; - } - - public static string LogFilePath(DiscoDataContext DiscoContext, DateTime Date, bool CreateDirectory = true) - { - var logDirectoryBase = LogFileBasePath(DiscoContext); - var logDirectory = Path.Combine(logDirectoryBase, Date.Year.ToString()); - if (CreateDirectory && !Directory.Exists(logDirectory)) - { - Directory.CreateDirectory(logDirectory); - } - var logFileName = string.Format("DiscoLog_{0:yyy-MM-dd}.sdf", Date); - return Path.Combine(logDirectory, logFileName); - } - - internal static void ReInitalize(DiscoDataContext DiscoContext) - { - lock (_CurrentLock) - { - var logPath = LogFilePath(DiscoContext, DateTime.Today); - - //var connectionString = string.Format("Data Source=\"{0}\"", logPath); - - SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); - sqlCeCSB.DataSource = logPath; - var connectionString = sqlCeCSB.ToString(); - - // Ensure Database Exists - if (!File.Exists(logPath)) - { - // Create Database - using (var context = new Targets.LogPersistContext(connectionString)) - { - context.Database.CreateIfNotExists(); - } - } - - // Add Modules/Event Types - InitalizeModules(); - using (var context = new Targets.LogPersistContext(connectionString)) - { - InitalizeDatabase(context); - } - - // Create Current LogContext - var currentLogContext = new LogContext(logPath, connectionString); - _Current = currentLogContext; - } - SystemLog.LogLogInitialized(_Current.PersistantStorePath); - try - { - // Get Yesterdays Log - var yesterdaysLogPath = LogFilePath(DiscoContext, DateTime.Today.AddDays(-1), false); - if (File.Exists(yesterdaysLogPath)) - { - SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); - sqlCeCSB.DataSource = yesterdaysLogPath; - var connectionString = sqlCeCSB.ToString(); - int logCount; - using (var context = new Targets.LogPersistContext(connectionString)) - { - logCount = context.Events.Where(e => !(e.ModuleId == 0 && e.EventTypeId == 100)).Count(); - if (logCount == 0) - { - // Delete (empty) Database - context.Database.Delete(); - } - } - } - } - catch (Exception ex) - { - SystemLog.LogError("Error occurred while investigating yesterdays log for deletion", ex.GetType().Name, ex.Message, ex.StackTrace); - } - } - - private static IScheduler _ReInitializeScheduler; - public static void Initalize(DiscoDataContext DiscoContext, ISchedulerFactory SchedulerFactory) - { - ReInitalize(DiscoContext); - - _ReInitializeScheduler = SchedulerFactory.GetScheduler(); - - var reInitalizeJobDetail = new JobDetailImpl("DiscoLogContextReinialize", typeof(LogReInitalizeJob)); - - // Simple Trigger - Issue with Day light savings - //var reInitalizeTrigger = TriggerBuilder.Create() - // .WithIdentity("DiscoLogContextReinializeTrigger") - // .StartAt(DateBuilder.TomorrowAt(0,0,0)) - // .WithSchedule(SimpleScheduleBuilder.Create().WithIntervalInHours(24).RepeatForever()) - // .Build(); - // Use Cron Schedule instead - var reInitalizeTrigger = TriggerBuilder.Create() - .WithIdentity("DiscoLogContextReinializeTrigger") - .StartNow() - .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 0)) // Midnight - .Build(); - - _ReInitializeScheduler.ScheduleJob(reInitalizeJobDetail, reInitalizeTrigger); - } - public static string LiveLogAllEventsGroupName - { - get - { - return Targets.LogLiveContext.LiveLogNameAll; - } - } - - private LogContext(string PersistantStorePath, string PersistantStoreConnectionString) - { - this.PersistantStorePath = PersistantStorePath; - this.PersistantStoreConnectionString = PersistantStoreConnectionString; - } - - public string PersistantStorePath { get; private set; } - public string PersistantStoreConnectionString { get; private set; } - - public void Log(int ModuleId, int EventTypeId, params object[] Args) - { - LogBase logModule; - if (LogModules.TryGetValue(ModuleId, out logModule)) - { - Models.LogEventType eventType; - if (logModule.EventTypes.TryGetValue(EventTypeId, out eventType)) - { - var eventTimestamp = DateTime.Now; - if (eventType.UseLive) - { - Targets.LogLiveContext.Broadcast(logModule, eventType, eventTimestamp, Args); - } - if (eventType.UsePersist) - { - string args = null; - if (Args != null && Args.Length > 0) - { //args = fastJSON.JSON.Instance.ToJSON(Args, false); // Old fastJSON Implementation - args = JsonConvert.SerializeObject(Args); - } - using (var context = new Targets.LogPersistContext(PersistantStoreConnectionString)) - { - var e = new Models.LogEvent() - { - Timestamp = eventTimestamp, - ModuleId = logModule.ModuleId, - EventTypeId = eventType.Id, - Arguments = args - }; - context.Events.Add(e); - context.SaveChanges(); - } - } - } - else - throw new InvalidOperationException(string.Format("Unknown Log Event Type Called: {0} (for Module: {1})", EventTypeId, ModuleId)); - } - else - throw new InvalidOperationException(string.Format("Unknown Log Module Called: {0}", ModuleId)); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Data.Repository; +using System.IO; +using System.Management; +using System.Diagnostics; +using System.Data.SqlServerCe; +using System.Data.EntityClient; +using System.Data.Entity; +using Quartz; +using Quartz.Impl; +using Quartz.Impl.Triggers; +using Newtonsoft.Json; + +namespace Disco.Services.Logging +{ + public class LogContext + { + public static Dictionary LogModules { get; private set; } + private static object _LogModulesLock = new object(); + + private static LogContext _Current; + private static object _CurrentLock = new Object(); + public static LogContext Current + { + get + { + lock (_CurrentLock) + { + if (_Current == null) + throw new InvalidOperationException("Logging Context has not been Initialized"); + return _Current; + } + } + private set + { + lock (_CurrentLock) + { + _Current = value; + } + } + } + + private static void InitalizeModules() + { + if (LogModules == null) + { + lock (_LogModulesLock) + { + if (LogModules == null) + { + LogModules = new Dictionary(); + // Load all LogModules (Only from Disco Assemblies) + var appDomain = AppDomain.CurrentDomain; + + var logModuleTypes = (from a in appDomain.GetAssemblies() + where !a.GlobalAssemblyCache && !a.IsDynamic && a.FullName.StartsWith("Disco.", StringComparison.InvariantCultureIgnoreCase) + from type in a.GetTypes() + where typeof(LogBase).IsAssignableFrom(type) && !type.IsAbstract + select type); + foreach (var logModuleType in logModuleTypes) + { + var instance = (LogBase)Activator.CreateInstance(logModuleType); + LogModules[instance.ModuleId] = instance; + } + } + } + } + } + + private static void InitalizeDatabase(Targets.LogPersistContext logDbContext) + { + // Add Modules + var existingModules = logDbContext.Modules.Include("EventTypes").ToDictionary(m => m.Id); + foreach (var module in LogModules) + { + // Update/Insert Module + Models.LogModule dbModule; + if (existingModules.TryGetValue(module.Key, out dbModule)) + { + // Update + if (dbModule.Name != module.Value.ModuleName) + dbModule.Name = module.Value.ModuleName; + if (dbModule.Description != module.Value.ModuleDescription) + dbModule.Description = module.Value.ModuleDescription; + } + else + { + // Insert + dbModule = new Models.LogModule() + { + Id = module.Key, + Name = module.Value.ModuleName, + Description = module.Value.ModuleDescription + }; + logDbContext.Modules.Add(dbModule); + } + // Update/Insert Event Types + Dictionary existingEventTypes = (dbModule.EventTypes == null) ? new Dictionary() : dbModule.EventTypes.ToDictionary(et => et.Id); + foreach (var eventType in module.Value.EventTypes) + { + Models.LogEventType dbEventType; + if (existingEventTypes.TryGetValue(eventType.Key, out dbEventType)) + { + // Update + if (dbEventType.Name != eventType.Value.Name) + dbEventType.Name = eventType.Value.Name; + if (dbEventType.Severity != eventType.Value.Severity) + dbEventType.Severity = eventType.Value.Severity; + if (dbEventType.Format != eventType.Value.Format) + dbEventType.Format = eventType.Value.Format; + } + else + { + // Insert + dbEventType = new Models.LogEventType() + { + Id = eventType.Key, + ModuleId = module.Key, + Name = eventType.Value.Name, + Severity = eventType.Value.Severity, + Format = eventType.Value.Format + }; + logDbContext.EventTypes.Add(dbEventType); + } + } + } + + logDbContext.SaveChanges(); + } + + public static string LogFileBasePath(DiscoDataContext DiscoContext) + { + var logDirectoryBase = Path.Combine(DiscoContext.DiscoConfiguration.DataStoreLocation, "Logs"); + // Create Directory Structure + if (!Directory.Exists(logDirectoryBase)) + { + Directory.CreateDirectory(logDirectoryBase); + } + // Ensure Logs are NTFS Compressed - TODO... + //Utilities.CompressDirectory(logDirectory); + // WMI - Doesn't Work for Network Folders... + //var logDirectoryBaseInfo = new DirectoryInfo(logDirectoryBase); + //if ((logDirectoryBaseInfo.Attributes & FileAttributes.Compressed) != FileAttributes.Compressed) + //{ + // var logDirectoryWmiPath = string.Format("Win32_Directory.Name=\"{0}\"", logDirectoryBase); + // using (ManagementObject logDirectoryBaseMO = new ManagementObject(logDirectoryWmiPath)) + // { + // ManagementBaseObject outParams = logDirectoryBaseMO.InvokeMethod("Compress", null, null); + // Debug.WriteLine("LoggingContext.InitalizeCurrent: Compressing Log Folder; Result: " + outParams.Properties["ReturnValue"].Value.ToString()); + // } + //} + return logDirectoryBase; + } + + public static string LogFilePath(DiscoDataContext DiscoContext, DateTime Date, bool CreateDirectory = true) + { + var logDirectoryBase = LogFileBasePath(DiscoContext); + var logDirectory = Path.Combine(logDirectoryBase, Date.Year.ToString()); + if (CreateDirectory && !Directory.Exists(logDirectory)) + { + Directory.CreateDirectory(logDirectory); + } + var logFileName = string.Format("DiscoLog_{0:yyy-MM-dd}.sdf", Date); + return Path.Combine(logDirectory, logFileName); + } + + internal static void ReInitalize(DiscoDataContext DiscoContext) + { + lock (_CurrentLock) + { + var logPath = LogFilePath(DiscoContext, DateTime.Today); + + //var connectionString = string.Format("Data Source=\"{0}\"", logPath); + + SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); + sqlCeCSB.DataSource = logPath; + var connectionString = sqlCeCSB.ToString(); + + // Ensure Database Exists + if (!File.Exists(logPath)) + { + // Create Database + using (var context = new Targets.LogPersistContext(connectionString)) + { + context.Database.CreateIfNotExists(); + } + } + + // Add Modules/Event Types + InitalizeModules(); + using (var context = new Targets.LogPersistContext(connectionString)) + { + InitalizeDatabase(context); + } + + // Create Current LogContext + var currentLogContext = new LogContext(logPath, connectionString); + _Current = currentLogContext; + } + SystemLog.LogLogInitialized(_Current.PersistantStorePath); + try + { + // Get Yesterdays Log + var yesterdaysLogPath = LogFilePath(DiscoContext, DateTime.Today.AddDays(-1), false); + if (File.Exists(yesterdaysLogPath)) + { + SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); + sqlCeCSB.DataSource = yesterdaysLogPath; + var connectionString = sqlCeCSB.ToString(); + int logCount; + using (var context = new Targets.LogPersistContext(connectionString)) + { + logCount = context.Events.Where(e => !(e.ModuleId == 0 && e.EventTypeId == 100)).Count(); + if (logCount == 0) + { + // Delete (empty) Database + context.Database.Delete(); + } + } + } + } + catch (Exception ex) + { + SystemLog.LogError("Error occurred while investigating yesterdays log for deletion", ex.GetType().Name, ex.Message, ex.StackTrace); + } + } + + private static IScheduler _ReInitializeScheduler; + public static void Initalize(DiscoDataContext DiscoContext, ISchedulerFactory SchedulerFactory) + { + ReInitalize(DiscoContext); + + _ReInitializeScheduler = SchedulerFactory.GetScheduler(); + + var reInitalizeJobDetail = new JobDetailImpl("DiscoLogContextReinialize", typeof(LogReInitalizeJob)); + + // Simple Trigger - Issue with Day light savings + //var reInitalizeTrigger = TriggerBuilder.Create() + // .WithIdentity("DiscoLogContextReinializeTrigger") + // .StartAt(DateBuilder.TomorrowAt(0,0,0)) + // .WithSchedule(SimpleScheduleBuilder.Create().WithIntervalInHours(24).RepeatForever()) + // .Build(); + // Use Cron Schedule instead + var reInitalizeTrigger = TriggerBuilder.Create() + .WithIdentity("DiscoLogContextReinializeTrigger") + .StartNow() + .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 0)) // Midnight + .Build(); + + _ReInitializeScheduler.ScheduleJob(reInitalizeJobDetail, reInitalizeTrigger); + } + public static string LiveLogAllEventsGroupName + { + get + { + return Targets.LogLiveContext.LiveLogNameAll; + } + } + + private LogContext(string PersistantStorePath, string PersistantStoreConnectionString) + { + this.PersistantStorePath = PersistantStorePath; + this.PersistantStoreConnectionString = PersistantStoreConnectionString; + } + + public string PersistantStorePath { get; private set; } + public string PersistantStoreConnectionString { get; private set; } + + public void Log(int ModuleId, int EventTypeId, params object[] Args) + { + LogBase logModule; + if (LogModules.TryGetValue(ModuleId, out logModule)) + { + Models.LogEventType eventType; + if (logModule.EventTypes.TryGetValue(EventTypeId, out eventType)) + { + var eventTimestamp = DateTime.Now; + if (eventType.UseLive) + { + Targets.LogLiveContext.Broadcast(logModule, eventType, eventTimestamp, Args); + } + if (eventType.UsePersist) + { + string args = null; + if (Args != null && Args.Length > 0) + { //args = fastJSON.JSON.Instance.ToJSON(Args, false); // Old fastJSON Implementation + args = JsonConvert.SerializeObject(Args); + } + using (var context = new Targets.LogPersistContext(PersistantStoreConnectionString)) + { + var e = new Models.LogEvent() + { + Timestamp = eventTimestamp, + ModuleId = logModule.ModuleId, + EventTypeId = eventType.Id, + Arguments = args + }; + context.Events.Add(e); + context.SaveChanges(); + } + } + } + else + throw new InvalidOperationException(string.Format("Unknown Log Event Type Called: {0} (for Module: {1})", EventTypeId, ModuleId)); + } + else + throw new InvalidOperationException(string.Format("Unknown Log Module Called: {0}", ModuleId)); + } + + } +} diff --git a/Disco.Services/Logging/LogReInitalizeJob.cs b/Disco.Services/Logging/LogReInitalizeJob.cs index ad268da4..064c1120 100644 --- a/Disco.Services/Logging/LogReInitalizeJob.cs +++ b/Disco.Services/Logging/LogReInitalizeJob.cs @@ -1,20 +1,20 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Quartz; -using Disco.Data.Repository; - -namespace Disco.Services.Logging -{ - class LogReInitalizeJob : IJob - { - public void Execute(IJobExecutionContext context) - { - using (DiscoDataContext DiscoContext = new DiscoDataContext()) - { - LogContext.ReInitalize(DiscoContext); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Quartz; +using Disco.Data.Repository; + +namespace Disco.Services.Logging +{ + class LogReInitalizeJob : IJob + { + public void Execute(IJobExecutionContext context) + { + using (DiscoDataContext DiscoContext = new DiscoDataContext()) + { + LogContext.ReInitalize(DiscoContext); + } + } + } +} diff --git a/Disco.Services/Logging/Models/LogEvent.cs b/Disco.Services/Logging/Models/LogEvent.cs index 1bd764cd..fe279a0e 100644 --- a/Disco.Services/Logging/Models/LogEvent.cs +++ b/Disco.Services/Logging/Models/LogEvent.cs @@ -1,23 +1,23 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Services.Logging.Models -{ - [Table("Events")] - public class LogEvent - { - [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int Id { get; set; } - [Required] - public int ModuleId { get; set; } - [Required] - public int EventTypeId { get; set; } - [Required] - public DateTime Timestamp { get; set; } - public string Arguments { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Services.Logging.Models +{ + [Table("Events")] + public class LogEvent + { + [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + [Required] + public int ModuleId { get; set; } + [Required] + public int EventTypeId { get; set; } + [Required] + public DateTime Timestamp { get; set; } + public string Arguments { get; set; } + } +} diff --git a/Disco.Services/Logging/Models/LogEventType.cs b/Disco.Services/Logging/Models/LogEventType.cs index 2dcc07b3..58f8df23 100644 --- a/Disco.Services/Logging/Models/LogEventType.cs +++ b/Disco.Services/Logging/Models/LogEventType.cs @@ -1,67 +1,67 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Services.Logging.Models -{ - [Table("EventTypes")] - public class LogEventType - { - [Required, Key, Column(Order=0), DatabaseGenerated(DatabaseGeneratedOption.None)] - public int ModuleId { get; set; } - [Required, Key, Column(Order = 1), DatabaseGenerated(DatabaseGeneratedOption.None)] - public int Id { get; set; } - [Required, MaxLength(200)] - public string Name { get; set; } - [Required] - public int Severity { get; set; } - [MaxLength(1024)] - public string Format { get; set; } - - [NotMapped] - public bool UsePersist { get; set; } - [NotMapped] - public bool UseLive { get; set; } - [NotMapped] - public bool UseDisplay { get; set; } - - [ForeignKey("ModuleId")] - public LogModule Module { get; set; } - - public enum Severities - { - Information = 0, - Warning = 1, - Error = 2 - } - - public string FormatMessage(object[] Arguments) - { - - if (Arguments != null && Arguments.Length > 0) - { - if (!string.IsNullOrEmpty(Format)) - { - return string.Format(Format, Arguments); - } - else - { - return Arguments - .Select(v => v == null ? string.Empty : v.ToString()) - .Aggregate((a, b) => a + ", " + (b == null ? string.Empty : b)); - } - } - else - { - if (!string.IsNullOrEmpty(Format)) - { - return Format; - } - } - return string.Empty; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Services.Logging.Models +{ + [Table("EventTypes")] + public class LogEventType + { + [Required, Key, Column(Order=0), DatabaseGenerated(DatabaseGeneratedOption.None)] + public int ModuleId { get; set; } + [Required, Key, Column(Order = 1), DatabaseGenerated(DatabaseGeneratedOption.None)] + public int Id { get; set; } + [Required, MaxLength(200)] + public string Name { get; set; } + [Required] + public int Severity { get; set; } + [MaxLength(1024)] + public string Format { get; set; } + + [NotMapped] + public bool UsePersist { get; set; } + [NotMapped] + public bool UseLive { get; set; } + [NotMapped] + public bool UseDisplay { get; set; } + + [ForeignKey("ModuleId")] + public LogModule Module { get; set; } + + public enum Severities + { + Information = 0, + Warning = 1, + Error = 2 + } + + public string FormatMessage(object[] Arguments) + { + + if (Arguments != null && Arguments.Length > 0) + { + if (!string.IsNullOrEmpty(Format)) + { + return string.Format(Format, Arguments); + } + else + { + return Arguments + .Select(v => v == null ? string.Empty : v.ToString()) + .Aggregate((a, b) => a + ", " + (b == null ? string.Empty : b)); + } + } + else + { + if (!string.IsNullOrEmpty(Format)) + { + return Format; + } + } + return string.Empty; + } + } +} diff --git a/Disco.Services/Logging/Models/LogLiveEvent.cs b/Disco.Services/Logging/Models/LogLiveEvent.cs index db2bcc7b..017f216a 100644 --- a/Disco.Services/Logging/Models/LogLiveEvent.cs +++ b/Disco.Services/Logging/Models/LogLiveEvent.cs @@ -1,59 +1,59 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Collections; -using Newtonsoft.Json; - -namespace Disco.Services.Logging.Models -{ - public class LogLiveEvent - { - public int ModuleId { get; set; } - public string ModuleName { get; set; } - public string ModuleDescription { get; set; } - public int EventTypeId { get; set; } - public string EventTypeName { get; set; } - public int EventTypeSeverity { get; set; } - - public DateTime Timestamp { get; set; } - public object[] Arguments { get; set; } - public string FormattedMessage { get; set; } - public string FormattedTimestamp { get; set; } - public bool UseDisplay { get; set; } - - public static LogLiveEvent Create(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, string jsonArguments) - { - object[] Arguments = null; - if (jsonArguments != null) - { - //var alArguments = fastJSON.JSON.Instance.Parse(jsonArguments) as ArrayList; // Old fastJSON Implementation - Arguments = JsonConvert.DeserializeObject(jsonArguments); - //if (alArguments != null) - //{ - // Arguments = alArguments.ToArray(); - //} - } - return Create(logModule, eventType, Timestamp, Arguments); - } - - public static LogLiveEvent Create(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, params object[] Arguments) - { - return new Models.LogLiveEvent() - { - ModuleId = logModule.ModuleId, - ModuleName = logModule.ModuleName, - ModuleDescription = logModule.ModuleDescription, - EventTypeId = eventType.Id, - EventTypeName = eventType.Name, - EventTypeSeverity = eventType.Severity, - Timestamp = Timestamp, - Arguments = Arguments, - FormattedMessage = eventType.FormatMessage(Arguments), - FormattedTimestamp = Timestamp.ToString("dd/MM/yyy hh:mm:ss tt"), - UseDisplay = eventType.UseDisplay - }; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections; +using Newtonsoft.Json; + +namespace Disco.Services.Logging.Models +{ + public class LogLiveEvent + { + public int ModuleId { get; set; } + public string ModuleName { get; set; } + public string ModuleDescription { get; set; } + public int EventTypeId { get; set; } + public string EventTypeName { get; set; } + public int EventTypeSeverity { get; set; } + + public DateTime Timestamp { get; set; } + public object[] Arguments { get; set; } + public string FormattedMessage { get; set; } + public string FormattedTimestamp { get; set; } + public bool UseDisplay { get; set; } + + public static LogLiveEvent Create(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, string jsonArguments) + { + object[] Arguments = null; + if (jsonArguments != null) + { + //var alArguments = fastJSON.JSON.Instance.Parse(jsonArguments) as ArrayList; // Old fastJSON Implementation + Arguments = JsonConvert.DeserializeObject(jsonArguments); + //if (alArguments != null) + //{ + // Arguments = alArguments.ToArray(); + //} + } + return Create(logModule, eventType, Timestamp, Arguments); + } + + public static LogLiveEvent Create(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, params object[] Arguments) + { + return new Models.LogLiveEvent() + { + ModuleId = logModule.ModuleId, + ModuleName = logModule.ModuleName, + ModuleDescription = logModule.ModuleDescription, + EventTypeId = eventType.Id, + EventTypeName = eventType.Name, + EventTypeSeverity = eventType.Severity, + Timestamp = Timestamp, + Arguments = Arguments, + FormattedMessage = eventType.FormatMessage(Arguments), + FormattedTimestamp = Timestamp.ToString("dd/MM/yyy hh:mm:ss tt"), + UseDisplay = eventType.UseDisplay + }; + } + + } +} diff --git a/Disco.Services/Logging/Models/LogModule.cs b/Disco.Services/Logging/Models/LogModule.cs index 1115ec16..c2110410 100644 --- a/Disco.Services/Logging/Models/LogModule.cs +++ b/Disco.Services/Logging/Models/LogModule.cs @@ -1,22 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace Disco.Services.Logging.Models -{ - [Table("Modules")] - public class LogModule - { - [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)] - public int Id { get; set; } - [Required, MaxLength(200)] - public string Name { get; set; } - [Required, MaxLength(500)] - public string Description { get; set; } - - public virtual IList EventTypes { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Disco.Services.Logging.Models +{ + [Table("Modules")] + public class LogModule + { + [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)] + public int Id { get; set; } + [Required, MaxLength(200)] + public string Name { get; set; } + [Required, MaxLength(500)] + public string Description { get; set; } + + public virtual IList EventTypes { get; set; } + } +} diff --git a/Disco.Services/Logging/ReadLogContext.cs b/Disco.Services/Logging/ReadLogContext.cs index adf3209f..e46a9108 100644 --- a/Disco.Services/Logging/ReadLogContext.cs +++ b/Disco.Services/Logging/ReadLogContext.cs @@ -1,179 +1,179 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Services.Logging.Targets; -using Disco.Data.Repository; -using System.IO; -using System.Text.RegularExpressions; -using System.Data.SqlServerCe; -using Disco.Services.Logging.Models; - -namespace Disco.Services.Logging -{ - public class ReadLogContext - { - public DateTime? Start { get; set; } - public DateTime? End { get; set; } - public int? Take { get; set; } - public int? Module { get; set; } - public List EventTypes { get; set; } - - public bool Validate() - { - if (this.Start.HasValue && this.End.HasValue && this.End.Value < this.Start.Value) - throw new ArgumentOutOfRangeException("End", "End must be greater than Start"); - if (this.Start.HasValue && !this.End.HasValue && this.Start > DateTime.Now) - throw new ArgumentOutOfRangeException("Start", "Start must be less than current time"); - - return true; - } - - public List Query(DiscoDataContext DiscoContext) - { - List results = new List(); - - // Validate Options - this.Validate(); - - var relevantLogFiles = RelevantLogFiles(DiscoContext); - relevantLogFiles.Reverse(); - foreach (var logFile in relevantLogFiles) - { - SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); - sqlCeCSB.DataSource = logFile.Item1; - - var logModules = LogContext.LogModules; - - using (var context = new Targets.LogPersistContext(sqlCeCSB.ToString())) - { - var query = this.BuildQuery(context, logFile.Item2, results.Count); - IEnumerable queryResults = query; // Run the Query - results.AddRange(queryResults.Select(le => Models.LogLiveEvent.Create(logModules[le.ModuleId], logModules[le.ModuleId].EventTypes[le.EventTypeId], le.Timestamp, le.Arguments))); - } - if (this.Take.HasValue && this.Take.Value < results.Count) - break; - } - return results; - } - - private static Regex LogFileDateRegex = new Regex("DiscoLog_([0-9]{4})-([0-9]{2})-([0-9]{2}).sdf", RegexOptions.IgnoreCase); - private static DateTime? LogFileDate(string LogFilePath) - { - var fileNameMatch = LogFileDateRegex.Match(LogFilePath); - if (fileNameMatch.Success) - { - return new DateTime(int.Parse(fileNameMatch.Groups[1].Value), - int.Parse(fileNameMatch.Groups[2].Value), - int.Parse(fileNameMatch.Groups[3].Value)); - } - else - { - return null; - } - } - - private List> RelevantLogFiles(DiscoDataContext DiscoContext) - { - List> relevantFiles = new List>(); - var logDirectoryBase = LogContext.LogFileBasePath(DiscoContext); - var logDirectoryBaseInfo = new DirectoryInfo(logDirectoryBase); - var endDate = this.End.HasValue ? this.End.Value : DateTime.Now; - var endDateYear = endDate.Year.ToString(); - - // Try Shortcut ( < 31 Days in Query) - if (this.Start.HasValue) - { - if ((this.End.HasValue && this.End.Value.Subtract(this.Start.Value).Days < 31) || - (!this.End.HasValue && DateTime.Now.Subtract(this.Start.Value).Days < 31)) - { - // Less than 31 Days in Query - Just evaluate each Path - var queryDate = this.Start.Value.Date; - while (queryDate <= endDate) - { - var fileName = LogContext.LogFilePath(DiscoContext, queryDate, false); - if (File.Exists(fileName)) - relevantFiles.Add(new Tuple(fileName, LogFileDate(fileName).Value)); - - queryDate = queryDate.AddDays(1); - } - return relevantFiles; - } - } - - List logYears = new List(); - foreach (var directoryName in logDirectoryBaseInfo.GetDirectories()) - { - int directoryYear; - if (int.TryParse(directoryName.Name, out directoryYear)) - { - logYears.Add(directoryName.Name); - } - } - logYears.Sort(); - - foreach (var logYear in logYears) - { - List logFiles = Directory.EnumerateFiles(Path.Combine(logDirectoryBase, logYear), "DiscoLog_*.sdf").ToList(); - logFiles.Sort(); - if (logYear != endDateYear) - { - foreach (var logFile in logFiles) - { - relevantFiles.Add(new Tuple(logFile, LogFileDate(logFile).Value)); - } - } - else - { - foreach (var logFile in logFiles) - { - var fileNameDate = LogFileDate(logFile); - if (fileNameDate != null) - { - if (fileNameDate.Value < endDate) - { - relevantFiles.Add(new Tuple(logFile, fileNameDate.Value)); - } - else - { - break; // Files are sorted, must be no more... - } - } - } - break; // Years are sorted, must be no more... - } - } - return relevantFiles; - } - - private IQueryable BuildQuery(LogPersistContext LogContext, DateTime LogDate, int Taken) - { - IQueryable query = LogContext.Events.OrderByDescending(le => le.Timestamp); - if (this.Module.HasValue) - { - query = query.Where(le => le.ModuleId == this.Module.Value); - } - if (this.EventTypes != null && this.EventTypes.Count > 0) - { - query = query.Where(le => this.EventTypes.Contains(le.EventTypeId)); - } - if (this.Start.HasValue && this.Start.Value > LogDate) - { - var startValue = DateTime.SpecifyKind(this.Start.Value, DateTimeKind.Local); - query = query.Where(le => le.Timestamp > startValue); - } - if (this.End.HasValue && this.End.Value <= LogDate.AddDays(1)) - { - var endValue = DateTime.SpecifyKind(this.End.Value, DateTimeKind.Local); - query = query.Where(le => le.Timestamp < endValue); - } - if (this.Take.HasValue && this.Take.Value > 0) - { - var take = this.Take.Value - Taken; - query = query.Take(take); - } - return query; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Services.Logging.Targets; +using Disco.Data.Repository; +using System.IO; +using System.Text.RegularExpressions; +using System.Data.SqlServerCe; +using Disco.Services.Logging.Models; + +namespace Disco.Services.Logging +{ + public class ReadLogContext + { + public DateTime? Start { get; set; } + public DateTime? End { get; set; } + public int? Take { get; set; } + public int? Module { get; set; } + public List EventTypes { get; set; } + + public bool Validate() + { + if (this.Start.HasValue && this.End.HasValue && this.End.Value < this.Start.Value) + throw new ArgumentOutOfRangeException("End", "End must be greater than Start"); + if (this.Start.HasValue && !this.End.HasValue && this.Start > DateTime.Now) + throw new ArgumentOutOfRangeException("Start", "Start must be less than current time"); + + return true; + } + + public List Query(DiscoDataContext DiscoContext) + { + List results = new List(); + + // Validate Options + this.Validate(); + + var relevantLogFiles = RelevantLogFiles(DiscoContext); + relevantLogFiles.Reverse(); + foreach (var logFile in relevantLogFiles) + { + SqlCeConnectionStringBuilder sqlCeCSB = new SqlCeConnectionStringBuilder(); + sqlCeCSB.DataSource = logFile.Item1; + + var logModules = LogContext.LogModules; + + using (var context = new Targets.LogPersistContext(sqlCeCSB.ToString())) + { + var query = this.BuildQuery(context, logFile.Item2, results.Count); + IEnumerable queryResults = query; // Run the Query + results.AddRange(queryResults.Select(le => Models.LogLiveEvent.Create(logModules[le.ModuleId], logModules[le.ModuleId].EventTypes[le.EventTypeId], le.Timestamp, le.Arguments))); + } + if (this.Take.HasValue && this.Take.Value < results.Count) + break; + } + return results; + } + + private static Regex LogFileDateRegex = new Regex("DiscoLog_([0-9]{4})-([0-9]{2})-([0-9]{2}).sdf", RegexOptions.IgnoreCase); + private static DateTime? LogFileDate(string LogFilePath) + { + var fileNameMatch = LogFileDateRegex.Match(LogFilePath); + if (fileNameMatch.Success) + { + return new DateTime(int.Parse(fileNameMatch.Groups[1].Value), + int.Parse(fileNameMatch.Groups[2].Value), + int.Parse(fileNameMatch.Groups[3].Value)); + } + else + { + return null; + } + } + + private List> RelevantLogFiles(DiscoDataContext DiscoContext) + { + List> relevantFiles = new List>(); + var logDirectoryBase = LogContext.LogFileBasePath(DiscoContext); + var logDirectoryBaseInfo = new DirectoryInfo(logDirectoryBase); + var endDate = this.End.HasValue ? this.End.Value : DateTime.Now; + var endDateYear = endDate.Year.ToString(); + + // Try Shortcut ( < 31 Days in Query) + if (this.Start.HasValue) + { + if ((this.End.HasValue && this.End.Value.Subtract(this.Start.Value).Days < 31) || + (!this.End.HasValue && DateTime.Now.Subtract(this.Start.Value).Days < 31)) + { + // Less than 31 Days in Query - Just evaluate each Path + var queryDate = this.Start.Value.Date; + while (queryDate <= endDate) + { + var fileName = LogContext.LogFilePath(DiscoContext, queryDate, false); + if (File.Exists(fileName)) + relevantFiles.Add(new Tuple(fileName, LogFileDate(fileName).Value)); + + queryDate = queryDate.AddDays(1); + } + return relevantFiles; + } + } + + List logYears = new List(); + foreach (var directoryName in logDirectoryBaseInfo.GetDirectories()) + { + int directoryYear; + if (int.TryParse(directoryName.Name, out directoryYear)) + { + logYears.Add(directoryName.Name); + } + } + logYears.Sort(); + + foreach (var logYear in logYears) + { + List logFiles = Directory.EnumerateFiles(Path.Combine(logDirectoryBase, logYear), "DiscoLog_*.sdf").ToList(); + logFiles.Sort(); + if (logYear != endDateYear) + { + foreach (var logFile in logFiles) + { + relevantFiles.Add(new Tuple(logFile, LogFileDate(logFile).Value)); + } + } + else + { + foreach (var logFile in logFiles) + { + var fileNameDate = LogFileDate(logFile); + if (fileNameDate != null) + { + if (fileNameDate.Value < endDate) + { + relevantFiles.Add(new Tuple(logFile, fileNameDate.Value)); + } + else + { + break; // Files are sorted, must be no more... + } + } + } + break; // Years are sorted, must be no more... + } + } + return relevantFiles; + } + + private IQueryable BuildQuery(LogPersistContext LogContext, DateTime LogDate, int Taken) + { + IQueryable query = LogContext.Events.OrderByDescending(le => le.Timestamp); + if (this.Module.HasValue) + { + query = query.Where(le => le.ModuleId == this.Module.Value); + } + if (this.EventTypes != null && this.EventTypes.Count > 0) + { + query = query.Where(le => this.EventTypes.Contains(le.EventTypeId)); + } + if (this.Start.HasValue && this.Start.Value > LogDate) + { + var startValue = DateTime.SpecifyKind(this.Start.Value, DateTimeKind.Local); + query = query.Where(le => le.Timestamp > startValue); + } + if (this.End.HasValue && this.End.Value <= LogDate.AddDays(1)) + { + var endValue = DateTime.SpecifyKind(this.End.Value, DateTimeKind.Local); + query = query.Where(le => le.Timestamp < endValue); + } + if (this.Take.HasValue && this.Take.Value > 0) + { + var take = this.Take.Value - Taken; + query = query.Take(take); + } + return query; + } + + } +} diff --git a/Disco.Services/Logging/SystemLog.cs b/Disco.Services/Logging/SystemLog.cs index f3efb7d0..aa52e75a 100644 --- a/Disco.Services/Logging/SystemLog.cs +++ b/Disco.Services/Logging/SystemLog.cs @@ -1,140 +1,140 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Services.Logging.Models; - -namespace Disco.Services.Logging -{ - public class SystemLog : LogBase - { - private const int _ModuleId = 0; - public enum EventTypeIds : int - { - Information = 0, - Warning = 1, - Error = 2, - Exception = 10, - ExceptionWithInner = 11, - LogInitialized = 100, - Uninitialized = 200 - } - public static SystemLog Current - { - get - { - return (SystemLog)LogContext.LogModules[_ModuleId]; - } - } - private static void Log(EventTypeIds EventTypeId, params object[] Args) - { - Current.Log((int)EventTypeId, Args); - } - public static void LogInformation(params object[] Messages) - { - Log(EventTypeIds.Information, Messages); - } - public static void LogWarning(params object[] Messages) - { - Log(EventTypeIds.Warning, Messages); - } - public static void LogError(params object[] Messages) - { - Log(EventTypeIds.Error, Messages); - } - public static void LogException(string Component, Exception ex) - { - if (ex.InnerException != null) - { - Log(EventTypeIds.ExceptionWithInner, Component, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); - } - else - { - Log(EventTypeIds.Exception, Component, ex.GetType().Name, ex.Message, ex.StackTrace); - } - } - - public static void LogLogInitialized(string PersistantStorePath) - { - Log(EventTypeIds.LogInitialized, PersistantStorePath); - } - - public static void LogUninitialized() - { - if (Current != null) - Log(EventTypeIds.Uninitialized); - } - - public override int ModuleId - { - get { return _ModuleId; } - } - - public override string ModuleName - { - get { return "System"; } - } - - public override string ModuleDescription - { - get { return "Core System Log"; } - } - - protected override List LoadEventTypes() - { - List eventTypes = new List() { - new LogEventType() { - Id = (int)EventTypeIds.Information, - ModuleId = _ModuleId, - Name = "Information", - Format = null, - Severity = (int)LogEventType.Severities.Information, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.Warning, - ModuleId = _ModuleId, - Name = "Warning", - Format = null, - Severity = (int)LogEventType.Severities.Warning, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.Error, - ModuleId = _ModuleId, - Name = "Error", - Format = null, - Severity = (int)LogEventType.Severities.Error, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.Exception, - ModuleId = _ModuleId, - Name = "Exception", - Format = "{0}; {1}: {2}; {3}", - Severity = (int)LogEventType.Severities.Error, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.ExceptionWithInner, - ModuleId = _ModuleId, - Name = "Exception with Inner Exception", - Format = "{0}; {1}: {2}; {3}; {4}: {5}; {6}", - Severity = (int)LogEventType.Severities.Error, - UseLive = true, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.LogInitialized, - ModuleId = _ModuleId, - Name = "Log Initialized", - Format = "Log Initialized to '{0}'", - Severity = (int)LogEventType.Severities.Information, - UseLive = false, UsePersist = true, UseDisplay = true }, - new LogEventType() { - Id = (int)EventTypeIds.Uninitialized, - ModuleId = _ModuleId, - Name = "Disco Uninitialized", - Format = "Disco Uninitialized", - Severity = (int)LogEventType.Severities.Information, - UseLive = false, UsePersist = true, UseDisplay = false } - }; - - return eventTypes; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Services.Logging.Models; + +namespace Disco.Services.Logging +{ + public class SystemLog : LogBase + { + private const int _ModuleId = 0; + public enum EventTypeIds : int + { + Information = 0, + Warning = 1, + Error = 2, + Exception = 10, + ExceptionWithInner = 11, + LogInitialized = 100, + Uninitialized = 200 + } + public static SystemLog Current + { + get + { + return (SystemLog)LogContext.LogModules[_ModuleId]; + } + } + private static void Log(EventTypeIds EventTypeId, params object[] Args) + { + Current.Log((int)EventTypeId, Args); + } + public static void LogInformation(params object[] Messages) + { + Log(EventTypeIds.Information, Messages); + } + public static void LogWarning(params object[] Messages) + { + Log(EventTypeIds.Warning, Messages); + } + public static void LogError(params object[] Messages) + { + Log(EventTypeIds.Error, Messages); + } + public static void LogException(string Component, Exception ex) + { + if (ex.InnerException != null) + { + Log(EventTypeIds.ExceptionWithInner, Component, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); + } + else + { + Log(EventTypeIds.Exception, Component, ex.GetType().Name, ex.Message, ex.StackTrace); + } + } + + public static void LogLogInitialized(string PersistantStorePath) + { + Log(EventTypeIds.LogInitialized, PersistantStorePath); + } + + public static void LogUninitialized() + { + if (Current != null) + Log(EventTypeIds.Uninitialized); + } + + public override int ModuleId + { + get { return _ModuleId; } + } + + public override string ModuleName + { + get { return "System"; } + } + + public override string ModuleDescription + { + get { return "Core System Log"; } + } + + protected override List LoadEventTypes() + { + List eventTypes = new List() { + new LogEventType() { + Id = (int)EventTypeIds.Information, + ModuleId = _ModuleId, + Name = "Information", + Format = null, + Severity = (int)LogEventType.Severities.Information, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.Warning, + ModuleId = _ModuleId, + Name = "Warning", + Format = null, + Severity = (int)LogEventType.Severities.Warning, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.Error, + ModuleId = _ModuleId, + Name = "Error", + Format = null, + Severity = (int)LogEventType.Severities.Error, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.Exception, + ModuleId = _ModuleId, + Name = "Exception", + Format = "{0}; {1}: {2}; {3}", + Severity = (int)LogEventType.Severities.Error, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.ExceptionWithInner, + ModuleId = _ModuleId, + Name = "Exception with Inner Exception", + Format = "{0}; {1}: {2}; {3}; {4}: {5}; {6}", + Severity = (int)LogEventType.Severities.Error, + UseLive = true, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.LogInitialized, + ModuleId = _ModuleId, + Name = "Log Initialized", + Format = "Log Initialized to '{0}'", + Severity = (int)LogEventType.Severities.Information, + UseLive = false, UsePersist = true, UseDisplay = true }, + new LogEventType() { + Id = (int)EventTypeIds.Uninitialized, + ModuleId = _ModuleId, + Name = "Disco Uninitialized", + Format = "Disco Uninitialized", + Severity = (int)LogEventType.Severities.Information, + UseLive = false, UsePersist = true, UseDisplay = false } + }; + + return eventTypes; + } + } +} diff --git a/Disco.Services/Logging/Targets/LogLiveContext.cs b/Disco.Services/Logging/Targets/LogLiveContext.cs index 82476da4..0d80cf74 100644 --- a/Disco.Services/Logging/Targets/LogLiveContext.cs +++ b/Disco.Services/Logging/Targets/LogLiveContext.cs @@ -1,56 +1,56 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using SignalR; -using SignalR.Hosting.AspNet; -using SignalR.Infrastructure; - -namespace Disco.Services.Logging.Targets -{ - public class LogLiveContext : PersistentConnection - { - - protected override System.Threading.Tasks.Task OnReceivedAsync(IRequest request, string connectionId, string data) - { - // Add to Group - if (!string.IsNullOrWhiteSpace(data) && data.StartsWith("/addToGroups:") && data.Length > 13) - { - var groups = data.Substring(13).Split(','); - foreach (var g in groups) - { - this.Groups.Add(connectionId, g); - } - } - - return base.OnReceivedAsync(request, connectionId, data); - } - - internal static void Broadcast(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, params object[] Arguments) - { - var message = Models.LogLiveEvent.Create(logModule, eventType, Timestamp, Arguments); - - var connectionManager = GlobalHost.ConnectionManager; - var connectionContext = connectionManager.GetConnectionContext(); - connectionContext.Groups.Send(_GroupNameAll, message); - connectionContext.Groups.Send(logModule.ModuleName, message); - } - - private const string _GroupNameAll = "__All"; - //private static string _QualifiedTypeName = typeof(LogLiveContext).FullName + "."; - //private static string _QualifiedTypeNameAll = _QualifiedTypeName + "__All"; - //private static string LiveLogNameGroup(string LogName) - //{ - // return string.Concat(_QualifiedTypeName, LogName); - //} - public static string LiveLogNameAll - { - get - { - //return _QualifiedTypeNameAll; - return _GroupNameAll; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SignalR; +using SignalR.Hosting.AspNet; +using SignalR.Infrastructure; + +namespace Disco.Services.Logging.Targets +{ + public class LogLiveContext : PersistentConnection + { + + protected override System.Threading.Tasks.Task OnReceivedAsync(IRequest request, string connectionId, string data) + { + // Add to Group + if (!string.IsNullOrWhiteSpace(data) && data.StartsWith("/addToGroups:") && data.Length > 13) + { + var groups = data.Substring(13).Split(','); + foreach (var g in groups) + { + this.Groups.Add(connectionId, g); + } + } + + return base.OnReceivedAsync(request, connectionId, data); + } + + internal static void Broadcast(LogBase logModule, Models.LogEventType eventType, DateTime Timestamp, params object[] Arguments) + { + var message = Models.LogLiveEvent.Create(logModule, eventType, Timestamp, Arguments); + + var connectionManager = GlobalHost.ConnectionManager; + var connectionContext = connectionManager.GetConnectionContext(); + connectionContext.Groups.Send(_GroupNameAll, message); + connectionContext.Groups.Send(logModule.ModuleName, message); + } + + private const string _GroupNameAll = "__All"; + //private static string _QualifiedTypeName = typeof(LogLiveContext).FullName + "."; + //private static string _QualifiedTypeNameAll = _QualifiedTypeName + "__All"; + //private static string LiveLogNameGroup(string LogName) + //{ + // return string.Concat(_QualifiedTypeName, LogName); + //} + public static string LiveLogNameAll + { + get + { + //return _QualifiedTypeNameAll; + return _GroupNameAll; + } + } + + } +} diff --git a/Disco.Services/Logging/Targets/LogPersistContext.cs b/Disco.Services/Logging/Targets/LogPersistContext.cs index df6c3067..ac99b87b 100644 --- a/Disco.Services/Logging/Targets/LogPersistContext.cs +++ b/Disco.Services/Logging/Targets/LogPersistContext.cs @@ -1,23 +1,23 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data.Entity; -using System.Data.Entity.Infrastructure; - -namespace Disco.Services.Logging.Targets -{ - public class LogPersistContext : DbContext - { - public LogPersistContext(string ConnectionString) : base(ConnectionString) { } - - public DbSet Modules { get; set; } - public DbSet EventTypes { get; set; } - public DbSet Events { get; set; } - - protected override void OnModelCreating(DbModelBuilder modelBuilder) - { - //modelBuilder.Conventions.Remove(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data.Entity; +using System.Data.Entity.Infrastructure; + +namespace Disco.Services.Logging.Targets +{ + public class LogPersistContext : DbContext + { + public LogPersistContext(string ConnectionString) : base(ConnectionString) { } + + public DbSet Modules { get; set; } + public DbSet EventTypes { get; set; } + public DbSet Events { get; set; } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + //modelBuilder.Conventions.Remove(); + } + } +} diff --git a/Disco.Services/Logging/Utilities.cs b/Disco.Services/Logging/Utilities.cs index a0ebd40d..4f51ae2f 100644 --- a/Disco.Services/Logging/Utilities.cs +++ b/Disco.Services/Logging/Utilities.cs @@ -1,266 +1,266 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Win32.SafeHandles; -using System.Runtime.InteropServices; -using System.IO; -using System.Web.Mvc; - -namespace Disco.Services.Logging -{ - public static class Utilities - { - - public const string LogEventCSVHeader = "Timestamp,ModuleId,ModuleName,ModuleDescription,EventTypeId,EventTypeName,Severity,Message"; - public static void ToCsvLine(this Models.LogLiveEvent e, TextWriter writer) - { - writer.Write(e.Timestamp.ToString("yyy-MM-dd HH:mm:ss")); - writer.Write(","); - writer.Write(e.ModuleId); - writer.Write(",\""); - writer.Write(e.ModuleName); - writer.Write("\",\""); - writer.Write(e.ModuleDescription); - writer.Write("\","); - writer.Write(e.EventTypeId); - writer.Write(",\""); - writer.Write(e.EventTypeName); - writer.Write("\","); - writer.Write(e.EventTypeSeverity); - writer.Write(",\""); - writer.Write(e.FormattedMessage.Replace("\"", "'")); - writer.Write("\""); - if (e.Arguments != null) - { - foreach (var arg in e.Arguments) - { - writer.Write(",\""); - if (arg == null) - writer.Write("null"); - else - writer.Write(arg.ToString().Replace("\"", "'")); - writer.Write("\""); - } - } - writer.WriteLine(); - } - public static MemoryStream ToCsv(this List e) - { - var ms = new MemoryStream(); - StreamWriter sw = new StreamWriter(ms); - sw.WriteLine(LogEventCSVHeader); - if (e != null) - { - foreach (var le in e) - { - le.ToCsvLine(sw); - } - } - sw.Flush(); - ms.Position = 0; - return ms; - } - - public static List ToSelectListItems(this List items) - { - return items.Select(et => new SelectListItem() { Value = et.Id.ToString(), Text = et.Name }).ToList(); - } - - #region Win32 APIs - /// - /// The CreateFile function creates or opens a file, file stream, directory, physical disk, volume, console buffer, tape drive, - /// communications resource, mailslot, or named pipe. The function returns a handle that can be used to access an object. - /// - /// - /// access to the object, which can be read, write, or both - /// The sharing mode of an object, which can be read, write, both, or none - /// A pointer to a SECURITY_ATTRIBUTES structure that determines whether or not the returned handle can - /// be inherited by child processes. Can be null - /// An action to take on files that exist and do not exist - /// The file attributes and flags. - /// A handle to a template file with the GENERIC_READ access right. The template file supplies file attributes - /// and extended attributes for the file that is being created. This parameter can be null - /// If the function succeeds, the return value is an open handle to a specified file. If a specified file exists before the function - /// all and dwCreationDisposition is CREATE_ALWAYS or OPEN_ALWAYS, a call to GetLastError returns ERROR_ALREADY_EXISTS, even when the function - /// succeeds. If a file does not exist before the call, GetLastError returns 0 (zero). - /// If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError. - /// - [DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)] - private static extern SafeFileHandle CreateFile( - string lpFileName, - EFileAccess dwDesiredAccess, - EFileShare dwShareMode, - IntPtr SecurityAttributes, - ECreationDisposition dwCreationDisposition, - EFileAttributes dwFlagsAndAttributes, - IntPtr hTemplateFile - ); - [Flags] - private enum EFileAccess : uint - { - Delete = 0x10000, - ReadControl = 0x20000, - WriteDAC = 0x40000, - WriteOwner = 0x80000, - Synchronize = 0x100000, - - StandardRightsRequired = 0xF0000, - StandardRightsRead = ReadControl, - StandardRightsWrite = ReadControl, - StandardRightsExecute = ReadControl, - StandardRightsAll = 0x1F0000, - SpecificRightsAll = 0xFFFF, - - AccessSystemSecurity = 0x1000000, // AccessSystemAcl access type - - MaximumAllowed = 0x2000000, // MaximumAllowed access type - - GenericRead = 0x80000000, - GenericWrite = 0x40000000, - GenericExecute = 0x20000000, - GenericAll = 0x10000000 - } - [Flags] - private enum EFileShare : uint - { - /// - /// - /// - None = 0x00000000, - /// - /// Enables subsequent open operations on an object to request read access. - /// Otherwise, other processes cannot open the object if they request read access. - /// If this flag is not specified, but the object has been opened for read access, the function fails. - /// - Read = 0x00000001, - /// - /// Enables subsequent open operations on an object to request write access. - /// Otherwise, other processes cannot open the object if they request write access. - /// If this flag is not specified, but the object has been opened for write access, the function fails. - /// - Write = 0x00000002, - /// - /// Enables subsequent open operations on an object to request delete access. - /// Otherwise, other processes cannot open the object if they request delete access. - /// If this flag is not specified, but the object has been opened for delete access, the function fails. - /// - Delete = 0x00000004 - } - private enum ECreationDisposition : uint - { - /// - /// Creates a new file. The function fails if a specified file exists. - /// - New = 1, - /// - /// Creates a new file, always. - /// If a file exists, the function overwrites the file, clears the existing attributes, combines the specified file attributes, - /// and flags with FILE_ATTRIBUTE_ARCHIVE, but does not set the security descriptor that the SECURITY_ATTRIBUTES structure specifies. - /// - CreateAlways = 2, - /// - /// Opens a file. The function fails if the file does not exist. - /// - OpenExisting = 3, - /// - /// Opens a file, always. - /// If a file does not exist, the function creates a file as if dwCreationDisposition is CREATE_NEW. - /// - OpenAlways = 4, - /// - /// Opens a file and truncates it so that its size is 0 (zero) bytes. The function fails if the file does not exist. - /// The calling process must open the file with the GENERIC_WRITE access right. - /// - TruncateExisting = 5 - } - [Flags] - private enum EFileAttributes : uint - { - None = 0x0000000, - Readonly = 0x00000001, - Hidden = 0x00000002, - System = 0x00000004, - Directory = 0x00000010, - Archive = 0x00000020, - Device = 0x00000040, - Normal = 0x00000080, - Temporary = 0x00000100, - SparseFile = 0x00000200, - ReparsePoint = 0x00000400, - Compressed = 0x00000800, - Offline = 0x00001000, - NotContentIndexed = 0x00002000, - Encrypted = 0x00004000, - Write_Through = 0x80000000, - Overlapped = 0x40000000, - NoBuffering = 0x20000000, - RandomAccess = 0x10000000, - SequentialScan = 0x08000000, - DeleteOnClose = 0x04000000, - BackupSemantics = 0x02000000, - PosixSemantics = 0x01000000, - OpenReparsePoint = 0x00200000, - OpenNoRecall = 0x00100000, - FirstPipeInstance = 0x00080000 - } - - private const int FSCTL_SET_COMPRESSION = 0x9C040; - private const short COMPRESSION_FORMAT_DEFAULT = 1; - [DllImport("kernel32.dll", SetLastError = true)] - private static extern int DeviceIoControl( - SafeFileHandle hDevice, - int dwIoControlCode, - ref short lpInBuffer, - int nInBufferSize, - IntPtr lpOutBuffer, - int nOutBufferSize, - ref int lpBytesReturned, - IntPtr lpOverlapped); - #endregion - - public static void CompressDirectory(string DirectoryPath) - { - if (DirectoryPath.Length > 250) - throw new InvalidOperationException(string.Format("Directory Path to Long (>250) to Compress: {0}", DirectoryPath)); - - DirectoryInfo dirInfo = new DirectoryInfo(DirectoryPath); - if (dirInfo.Exists) - { - if ((dirInfo.Attributes & FileAttributes.Compressed) != FileAttributes.Compressed) - { - var dirHandle = CreateFile(DirectoryPath, EFileAccess.GenericWrite, EFileShare.Read, IntPtr.Zero, ECreationDisposition.OpenExisting, EFileAttributes.None, IntPtr.Zero); - if (dirHandle.IsInvalid) - { - Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); - } - else - { - EnableCompression(dirHandle); - dirHandle.Close(); - } - } - } - else - { - throw new InvalidOperationException(string.Format("Directory doesn't exist: {0}", DirectoryPath)); - } - } - - private static void EnableCompression(SafeFileHandle handle) - { - int lpBytesReturned = 0; - short lpInBuffer = COMPRESSION_FORMAT_DEFAULT; - - int result = DeviceIoControl(handle, FSCTL_SET_COMPRESSION, - ref lpInBuffer, sizeof(short), IntPtr.Zero, 0, - ref lpBytesReturned, IntPtr.Zero); - - if (result != 0) - { - Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Win32.SafeHandles; +using System.Runtime.InteropServices; +using System.IO; +using System.Web.Mvc; + +namespace Disco.Services.Logging +{ + public static class Utilities + { + + public const string LogEventCSVHeader = "Timestamp,ModuleId,ModuleName,ModuleDescription,EventTypeId,EventTypeName,Severity,Message"; + public static void ToCsvLine(this Models.LogLiveEvent e, TextWriter writer) + { + writer.Write(e.Timestamp.ToString("yyy-MM-dd HH:mm:ss")); + writer.Write(","); + writer.Write(e.ModuleId); + writer.Write(",\""); + writer.Write(e.ModuleName); + writer.Write("\",\""); + writer.Write(e.ModuleDescription); + writer.Write("\","); + writer.Write(e.EventTypeId); + writer.Write(",\""); + writer.Write(e.EventTypeName); + writer.Write("\","); + writer.Write(e.EventTypeSeverity); + writer.Write(",\""); + writer.Write(e.FormattedMessage.Replace("\"", "'")); + writer.Write("\""); + if (e.Arguments != null) + { + foreach (var arg in e.Arguments) + { + writer.Write(",\""); + if (arg == null) + writer.Write("null"); + else + writer.Write(arg.ToString().Replace("\"", "'")); + writer.Write("\""); + } + } + writer.WriteLine(); + } + public static MemoryStream ToCsv(this List e) + { + var ms = new MemoryStream(); + StreamWriter sw = new StreamWriter(ms); + sw.WriteLine(LogEventCSVHeader); + if (e != null) + { + foreach (var le in e) + { + le.ToCsvLine(sw); + } + } + sw.Flush(); + ms.Position = 0; + return ms; + } + + public static List ToSelectListItems(this List items) + { + return items.Select(et => new SelectListItem() { Value = et.Id.ToString(), Text = et.Name }).ToList(); + } + + #region Win32 APIs + /// + /// The CreateFile function creates or opens a file, file stream, directory, physical disk, volume, console buffer, tape drive, + /// communications resource, mailslot, or named pipe. The function returns a handle that can be used to access an object. + /// + /// + /// access to the object, which can be read, write, or both + /// The sharing mode of an object, which can be read, write, both, or none + /// A pointer to a SECURITY_ATTRIBUTES structure that determines whether or not the returned handle can + /// be inherited by child processes. Can be null + /// An action to take on files that exist and do not exist + /// The file attributes and flags. + /// A handle to a template file with the GENERIC_READ access right. The template file supplies file attributes + /// and extended attributes for the file that is being created. This parameter can be null + /// If the function succeeds, the return value is an open handle to a specified file. If a specified file exists before the function + /// all and dwCreationDisposition is CREATE_ALWAYS or OPEN_ALWAYS, a call to GetLastError returns ERROR_ALREADY_EXISTS, even when the function + /// succeeds. If a file does not exist before the call, GetLastError returns 0 (zero). + /// If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError. + /// + [DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)] + private static extern SafeFileHandle CreateFile( + string lpFileName, + EFileAccess dwDesiredAccess, + EFileShare dwShareMode, + IntPtr SecurityAttributes, + ECreationDisposition dwCreationDisposition, + EFileAttributes dwFlagsAndAttributes, + IntPtr hTemplateFile + ); + [Flags] + private enum EFileAccess : uint + { + Delete = 0x10000, + ReadControl = 0x20000, + WriteDAC = 0x40000, + WriteOwner = 0x80000, + Synchronize = 0x100000, + + StandardRightsRequired = 0xF0000, + StandardRightsRead = ReadControl, + StandardRightsWrite = ReadControl, + StandardRightsExecute = ReadControl, + StandardRightsAll = 0x1F0000, + SpecificRightsAll = 0xFFFF, + + AccessSystemSecurity = 0x1000000, // AccessSystemAcl access type + + MaximumAllowed = 0x2000000, // MaximumAllowed access type + + GenericRead = 0x80000000, + GenericWrite = 0x40000000, + GenericExecute = 0x20000000, + GenericAll = 0x10000000 + } + [Flags] + private enum EFileShare : uint + { + /// + /// + /// + None = 0x00000000, + /// + /// Enables subsequent open operations on an object to request read access. + /// Otherwise, other processes cannot open the object if they request read access. + /// If this flag is not specified, but the object has been opened for read access, the function fails. + /// + Read = 0x00000001, + /// + /// Enables subsequent open operations on an object to request write access. + /// Otherwise, other processes cannot open the object if they request write access. + /// If this flag is not specified, but the object has been opened for write access, the function fails. + /// + Write = 0x00000002, + /// + /// Enables subsequent open operations on an object to request delete access. + /// Otherwise, other processes cannot open the object if they request delete access. + /// If this flag is not specified, but the object has been opened for delete access, the function fails. + /// + Delete = 0x00000004 + } + private enum ECreationDisposition : uint + { + /// + /// Creates a new file. The function fails if a specified file exists. + /// + New = 1, + /// + /// Creates a new file, always. + /// If a file exists, the function overwrites the file, clears the existing attributes, combines the specified file attributes, + /// and flags with FILE_ATTRIBUTE_ARCHIVE, but does not set the security descriptor that the SECURITY_ATTRIBUTES structure specifies. + /// + CreateAlways = 2, + /// + /// Opens a file. The function fails if the file does not exist. + /// + OpenExisting = 3, + /// + /// Opens a file, always. + /// If a file does not exist, the function creates a file as if dwCreationDisposition is CREATE_NEW. + /// + OpenAlways = 4, + /// + /// Opens a file and truncates it so that its size is 0 (zero) bytes. The function fails if the file does not exist. + /// The calling process must open the file with the GENERIC_WRITE access right. + /// + TruncateExisting = 5 + } + [Flags] + private enum EFileAttributes : uint + { + None = 0x0000000, + Readonly = 0x00000001, + Hidden = 0x00000002, + System = 0x00000004, + Directory = 0x00000010, + Archive = 0x00000020, + Device = 0x00000040, + Normal = 0x00000080, + Temporary = 0x00000100, + SparseFile = 0x00000200, + ReparsePoint = 0x00000400, + Compressed = 0x00000800, + Offline = 0x00001000, + NotContentIndexed = 0x00002000, + Encrypted = 0x00004000, + Write_Through = 0x80000000, + Overlapped = 0x40000000, + NoBuffering = 0x20000000, + RandomAccess = 0x10000000, + SequentialScan = 0x08000000, + DeleteOnClose = 0x04000000, + BackupSemantics = 0x02000000, + PosixSemantics = 0x01000000, + OpenReparsePoint = 0x00200000, + OpenNoRecall = 0x00100000, + FirstPipeInstance = 0x00080000 + } + + private const int FSCTL_SET_COMPRESSION = 0x9C040; + private const short COMPRESSION_FORMAT_DEFAULT = 1; + [DllImport("kernel32.dll", SetLastError = true)] + private static extern int DeviceIoControl( + SafeFileHandle hDevice, + int dwIoControlCode, + ref short lpInBuffer, + int nInBufferSize, + IntPtr lpOutBuffer, + int nOutBufferSize, + ref int lpBytesReturned, + IntPtr lpOverlapped); + #endregion + + public static void CompressDirectory(string DirectoryPath) + { + if (DirectoryPath.Length > 250) + throw new InvalidOperationException(string.Format("Directory Path to Long (>250) to Compress: {0}", DirectoryPath)); + + DirectoryInfo dirInfo = new DirectoryInfo(DirectoryPath); + if (dirInfo.Exists) + { + if ((dirInfo.Attributes & FileAttributes.Compressed) != FileAttributes.Compressed) + { + var dirHandle = CreateFile(DirectoryPath, EFileAccess.GenericWrite, EFileShare.Read, IntPtr.Zero, ECreationDisposition.OpenExisting, EFileAttributes.None, IntPtr.Zero); + if (dirHandle.IsInvalid) + { + Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); + } + else + { + EnableCompression(dirHandle); + dirHandle.Close(); + } + } + } + else + { + throw new InvalidOperationException(string.Format("Directory doesn't exist: {0}", DirectoryPath)); + } + } + + private static void EnableCompression(SafeFileHandle handle) + { + int lpBytesReturned = 0; + short lpInBuffer = COMPRESSION_FORMAT_DEFAULT; + + int result = DeviceIoControl(handle, FSCTL_SET_COMPRESSION, + ref lpInBuffer, sizeof(short), IntPtr.Zero, 0, + ref lpBytesReturned, IntPtr.Zero); + + if (result != 0) + { + Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error()); + } + } + + } +} diff --git a/Disco.Services/Plugins/Features/CertificateProvider/CertificateProviderFeature.cs b/Disco.Services/Plugins/Features/CertificateProvider/CertificateProviderFeature.cs index 34ba14d5..2a5d58df 100644 --- a/Disco.Services/Plugins/Features/CertificateProvider/CertificateProviderFeature.cs +++ b/Disco.Services/Plugins/Features/CertificateProvider/CertificateProviderFeature.cs @@ -1,18 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Disco.Data.Repository; -using Disco.Models.Repository; - -namespace Disco.Services.Plugins.Features.CertificateProvider -{ - [PluginFeatureCategory(DisplayName = "Certificate Providers")] - public abstract class CertificateProviderFeature : PluginFeature - { - // Certificate Plugin Requirements - public abstract string CertificateProviderId { get; } - public abstract Tuple> AllocateCertificate(DiscoDataContext dbContext, Device Device); - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Disco.Data.Repository; +using Disco.Models.Repository; + +namespace Disco.Services.Plugins.Features.CertificateProvider +{ + [PluginFeatureCategory(DisplayName = "Certificate Providers")] + public abstract class CertificateProviderFeature : PluginFeature + { + // Certificate Plugin Requirements + public abstract string CertificateProviderId { get; } + public abstract Tuple> AllocateCertificate(DiscoDataContext dbContext, Device Device); + } +} diff --git a/Disco.Services/Plugins/Features/CertificateProvider/CertificateProviderLog.cs b/Disco.Services/Plugins/Features/CertificateProvider/CertificateProviderLog.cs index 81921cad..2c837c61 100644 --- a/Disco.Services/Plugins/Features/CertificateProvider/CertificateProviderLog.cs +++ b/Disco.Services/Plugins/Features/CertificateProvider/CertificateProviderLog.cs @@ -1,304 +1,304 @@ -using Disco.Services.Logging; -using Disco.Services.Logging.Models; -using System; -using System.Collections.Generic; -using System.Diagnostics; -namespace Disco.Services.Plugins.Features.CertificateProvider -{ - public class CertificateProvidersLog : LogBase - { - public enum EventTypeIds - { - RetrievalStarting = 10, - RetrievalProgress, - RetrievalFinished, - RetrievalWarning = 15, - RetrievalError, - RetrievalCertificateStarting = 20, - RetrievalCertificateFinished = 22, - RetrievalCertificateWarning = 25, - RetrievalCertificateError, - Allocated = 40, - AllocationFailed = 50 - } - private const int _ModuleId = 60; - private static bool _IsCertificateRetrievalProcessing; - private static string _CertificateRetrievalStatus; - private static int _CertificateRetrievalProgress; - public static CertificateProvidersLog Current - { - get - { - return (CertificateProvidersLog)LogContext.LogModules[60]; - } - } - public static bool IsCertificateRetrievalProcessing - { - get - { - return CertificateProvidersLog._IsCertificateRetrievalProcessing; - } - } - public override string ModuleDescription - { - get - { - return "Certificate Providers"; - } - } - public override int ModuleId - { - get - { - return 60; - } - } - public override string ModuleName - { - get - { - return "CertificateProviders"; - } - } - [System.Diagnostics.DebuggerNonUserCode] - public CertificateProvidersLog() - { - } - private static void Log(CertificateProvidersLog.EventTypeIds EventTypeId, params object[] Args) - { - CertificateProvidersLog.Current.Log((int)EventTypeId, Args); - } - public static void LogRetrievalStarting(int CertificateCount, int CertificateIdFrom, int CertificateIdTo) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalStarting, new object[] - { - CertificateCount, - CertificateIdFrom, - CertificateIdTo - }); - } - public static void LogRetrievalFinished() - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalFinished, new object[0]); - } - public static void LogRetrievalWarning(string Message) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalWarning, new object[] - { - Message - }); - } - public static void LogRetrievalError(string Message) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalError, new object[] - { - Message - }); - } - public static void LogRetrievalCertificateStarting(string CertificateId) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalCertificateStarting, new object[] - { - CertificateId - }); - } - public static void LogRetrievalCertificateFinished(string CertificateId) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalCertificateFinished, new object[] - { - CertificateId - }); - } - public static void LogRetrievalCertificateWarning(string CertificateId, string Message) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalCertificateWarning, new object[] - { - CertificateId, - Message - }); - } - public static void LogRetrievalCertificateError(string CertificateId, string Message) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalCertificateError, new object[] - { - CertificateId, - Message - }); - } - public static void LogAllocated(string CertificateId, string DeviceSerialNumber) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.Allocated, new object[] - { - CertificateId, - DeviceSerialNumber - }); - } - public static void LogAllocationFailed(string DeviceSerialNumber) - { - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.AllocationFailed, new object[] - { - DeviceSerialNumber - }); - } - public static void LogCertificateRetrievalProgress(bool? IsProcessing, int? Progress, string Status) - { - bool flag = IsProcessing.HasValue; - if (flag) - { - CertificateProvidersLog._IsCertificateRetrievalProcessing = IsProcessing.Value; - } - flag = CertificateProvidersLog._IsCertificateRetrievalProcessing; - if (flag) - { - bool flag2 = Status != null; - if (flag2) - { - CertificateProvidersLog._CertificateRetrievalStatus = Status; - } - flag2 = Progress.HasValue; - if (flag2) - { - CertificateProvidersLog._CertificateRetrievalProgress = Progress.Value; - } - } - else - { - CertificateProvidersLog._CertificateRetrievalStatus = null; - CertificateProvidersLog._CertificateRetrievalProgress = 0; - } - CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalProgress, new object[] - { - CertificateProvidersLog._IsCertificateRetrievalProcessing, - CertificateProvidersLog._CertificateRetrievalProgress, - CertificateProvidersLog._CertificateRetrievalStatus - }); - } - protected override System.Collections.Generic.List LoadEventTypes() - { - return new System.Collections.Generic.List - { - new LogEventType - { - Id = 10, - ModuleId = 60, - Name = "Retrieval Starting", - Format = "Starting retrieval of {0} certificate/s ({1} to {2})", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 11, - ModuleId = 60, - Name = "Retrieval Progress", - Format = "Processing: {0}; {1}% Complete; Status: {2}", - Severity = 0, - UseLive = true, - UsePersist = false, - UseDisplay = false - }, - new LogEventType - { - Id = 12, - ModuleId = 60, - Name = "Retrieval Finished", - Format = "Retrieval of Certificates Complete", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 15, - ModuleId = 60, - Name = "Retrieval Warning", - Format = "Retrieval Warning: {0}", - Severity = 1, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 16, - ModuleId = 60, - Name = "Retrieval Error", - Format = "Retrieval Error: {0}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 20, - ModuleId = 60, - Name = "Retrieval Certificate Starting", - Format = "Retrieving Certificate: {0}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 22, - ModuleId = 60, - Name = "Retrieval Certificate Finished", - Format = "Certificate Retrieved: {0}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 25, - ModuleId = 60, - Name = "Retrieval Certificate Warning", - Format = "{0} Certificate Warning: {1}", - Severity = 1, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 26, - ModuleId = 60, - Name = "Retrieval Certificate Error", - Format = "{0} Certificate Error: {1}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 40, - ModuleId = 60, - Name = "Allocated", - Format = "Certificate {0} allocated to {1}", - Severity = 0, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = 50, - ModuleId = 60, - Name = "Allocation Failed", - Format = "No certificates available for Device: {0}", - Severity = 2, - UseLive = true, - UsePersist = true, - UseDisplay = true - } - }; - } - } -} +using Disco.Services.Logging; +using Disco.Services.Logging.Models; +using System; +using System.Collections.Generic; +using System.Diagnostics; +namespace Disco.Services.Plugins.Features.CertificateProvider +{ + public class CertificateProvidersLog : LogBase + { + public enum EventTypeIds + { + RetrievalStarting = 10, + RetrievalProgress, + RetrievalFinished, + RetrievalWarning = 15, + RetrievalError, + RetrievalCertificateStarting = 20, + RetrievalCertificateFinished = 22, + RetrievalCertificateWarning = 25, + RetrievalCertificateError, + Allocated = 40, + AllocationFailed = 50 + } + private const int _ModuleId = 60; + private static bool _IsCertificateRetrievalProcessing; + private static string _CertificateRetrievalStatus; + private static int _CertificateRetrievalProgress; + public static CertificateProvidersLog Current + { + get + { + return (CertificateProvidersLog)LogContext.LogModules[60]; + } + } + public static bool IsCertificateRetrievalProcessing + { + get + { + return CertificateProvidersLog._IsCertificateRetrievalProcessing; + } + } + public override string ModuleDescription + { + get + { + return "Certificate Providers"; + } + } + public override int ModuleId + { + get + { + return 60; + } + } + public override string ModuleName + { + get + { + return "CertificateProviders"; + } + } + [System.Diagnostics.DebuggerNonUserCode] + public CertificateProvidersLog() + { + } + private static void Log(CertificateProvidersLog.EventTypeIds EventTypeId, params object[] Args) + { + CertificateProvidersLog.Current.Log((int)EventTypeId, Args); + } + public static void LogRetrievalStarting(int CertificateCount, int CertificateIdFrom, int CertificateIdTo) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalStarting, new object[] + { + CertificateCount, + CertificateIdFrom, + CertificateIdTo + }); + } + public static void LogRetrievalFinished() + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalFinished, new object[0]); + } + public static void LogRetrievalWarning(string Message) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalWarning, new object[] + { + Message + }); + } + public static void LogRetrievalError(string Message) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalError, new object[] + { + Message + }); + } + public static void LogRetrievalCertificateStarting(string CertificateId) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalCertificateStarting, new object[] + { + CertificateId + }); + } + public static void LogRetrievalCertificateFinished(string CertificateId) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalCertificateFinished, new object[] + { + CertificateId + }); + } + public static void LogRetrievalCertificateWarning(string CertificateId, string Message) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalCertificateWarning, new object[] + { + CertificateId, + Message + }); + } + public static void LogRetrievalCertificateError(string CertificateId, string Message) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalCertificateError, new object[] + { + CertificateId, + Message + }); + } + public static void LogAllocated(string CertificateId, string DeviceSerialNumber) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.Allocated, new object[] + { + CertificateId, + DeviceSerialNumber + }); + } + public static void LogAllocationFailed(string DeviceSerialNumber) + { + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.AllocationFailed, new object[] + { + DeviceSerialNumber + }); + } + public static void LogCertificateRetrievalProgress(bool? IsProcessing, int? Progress, string Status) + { + bool flag = IsProcessing.HasValue; + if (flag) + { + CertificateProvidersLog._IsCertificateRetrievalProcessing = IsProcessing.Value; + } + flag = CertificateProvidersLog._IsCertificateRetrievalProcessing; + if (flag) + { + bool flag2 = Status != null; + if (flag2) + { + CertificateProvidersLog._CertificateRetrievalStatus = Status; + } + flag2 = Progress.HasValue; + if (flag2) + { + CertificateProvidersLog._CertificateRetrievalProgress = Progress.Value; + } + } + else + { + CertificateProvidersLog._CertificateRetrievalStatus = null; + CertificateProvidersLog._CertificateRetrievalProgress = 0; + } + CertificateProvidersLog.Log(CertificateProvidersLog.EventTypeIds.RetrievalProgress, new object[] + { + CertificateProvidersLog._IsCertificateRetrievalProcessing, + CertificateProvidersLog._CertificateRetrievalProgress, + CertificateProvidersLog._CertificateRetrievalStatus + }); + } + protected override System.Collections.Generic.List LoadEventTypes() + { + return new System.Collections.Generic.List + { + new LogEventType + { + Id = 10, + ModuleId = 60, + Name = "Retrieval Starting", + Format = "Starting retrieval of {0} certificate/s ({1} to {2})", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 11, + ModuleId = 60, + Name = "Retrieval Progress", + Format = "Processing: {0}; {1}% Complete; Status: {2}", + Severity = 0, + UseLive = true, + UsePersist = false, + UseDisplay = false + }, + new LogEventType + { + Id = 12, + ModuleId = 60, + Name = "Retrieval Finished", + Format = "Retrieval of Certificates Complete", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 15, + ModuleId = 60, + Name = "Retrieval Warning", + Format = "Retrieval Warning: {0}", + Severity = 1, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 16, + ModuleId = 60, + Name = "Retrieval Error", + Format = "Retrieval Error: {0}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 20, + ModuleId = 60, + Name = "Retrieval Certificate Starting", + Format = "Retrieving Certificate: {0}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 22, + ModuleId = 60, + Name = "Retrieval Certificate Finished", + Format = "Certificate Retrieved: {0}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 25, + ModuleId = 60, + Name = "Retrieval Certificate Warning", + Format = "{0} Certificate Warning: {1}", + Severity = 1, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 26, + ModuleId = 60, + Name = "Retrieval Certificate Error", + Format = "{0} Certificate Error: {1}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 40, + ModuleId = 60, + Name = "Allocated", + Format = "Certificate {0} allocated to {1}", + Severity = 0, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = 50, + ModuleId = 60, + Name = "Allocation Failed", + Format = "No certificates available for Device: {0}", + Severity = 2, + UseLive = true, + UsePersist = true, + UseDisplay = true + } + }; + } + } +} diff --git a/Disco.Services/Plugins/Features/InteroperabilityProvider/InteroperabilityProviderFeature.cs b/Disco.Services/Plugins/Features/InteroperabilityProvider/InteroperabilityProviderFeature.cs index 71357485..e6d978da 100644 --- a/Disco.Services/Plugins/Features/InteroperabilityProvider/InteroperabilityProviderFeature.cs +++ b/Disco.Services/Plugins/Features/InteroperabilityProvider/InteroperabilityProviderFeature.cs @@ -1,13 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Disco.Services.Plugins.Features.InteroperabilityProvider -{ - [PluginFeatureCategory(DisplayName = "Interoperability Providers")] - public abstract class InteroperabilityProviderFeature : PluginFeature - { - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Disco.Services.Plugins.Features.InteroperabilityProvider +{ + [PluginFeatureCategory(DisplayName = "Interoperability Providers")] + public abstract class InteroperabilityProviderFeature : PluginFeature + { + } +} diff --git a/Disco.Services/Plugins/Features/Other/OtherFeature.cs b/Disco.Services/Plugins/Features/Other/OtherFeature.cs index fbbb18ca..2f6ad6a0 100644 --- a/Disco.Services/Plugins/Features/Other/OtherFeature.cs +++ b/Disco.Services/Plugins/Features/Other/OtherFeature.cs @@ -1,13 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Disco.Services.Plugins.Features.Other -{ - [PluginFeatureCategory(DisplayName = "Other")] - public abstract class OtherFeature : PluginFeature - { - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Disco.Services.Plugins.Features.Other +{ + [PluginFeatureCategory(DisplayName = "Other")] + public abstract class OtherFeature : PluginFeature + { + } +} diff --git a/Disco.Services/Plugins/Features/WarrantyProvider/WarrantyProviderFeature.cs b/Disco.Services/Plugins/Features/WarrantyProvider/WarrantyProviderFeature.cs index f5998282..1ec10e17 100644 --- a/Disco.Services/Plugins/Features/WarrantyProvider/WarrantyProviderFeature.cs +++ b/Disco.Services/Plugins/Features/WarrantyProvider/WarrantyProviderFeature.cs @@ -1,49 +1,49 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Web.Mvc; -using Disco.Data.Repository; -using Disco.Models.BI.Config; -using Disco.Models.Repository; - -namespace Disco.Services.Plugins.Features.WarrantyProvider -{ - [PluginFeatureCategory(DisplayName = "Warranty Providers")] - public abstract class WarrantyProviderFeature : PluginFeature - { - // Warranty Plugin Requirements - public abstract string WarrantyProviderId { get; } - public abstract Type SubmitJobViewType { get; } - public abstract dynamic SubmitJobViewModel(DiscoDataContext dbContext, Controller controller, Job Job, OrganisationAddress Address, User TechUser); - public abstract Dictionary SubmitJobParseProperties(DiscoDataContext dbContext, FormCollection form, Controller controller, Job Job, OrganisationAddress Address, User TechUser, string FaultDescription); - public abstract Dictionary SubmitJobDiscloseInfo(DiscoDataContext dbContext, Job Job, OrganisationAddress Address, User TechUser, string FaultDescription, Dictionary WarrantyProviderProperties); - public abstract string SubmitJob(DiscoDataContext dbContext, Job Job, OrganisationAddress Address, User TechUser, string FaultDescription, Dictionary WarrantyProviderProperties); - - public abstract Type JobDetailsViewType { get; } - public bool JobDetailsSupported { get { return this.JobDetailsViewType != null; } } - public abstract dynamic JobDetailsViewModel(DiscoDataContext dbContext, Controller controller, Job Job); - - public static PluginFeatureManifest FindPluginFeature(string PluginIdOrWarrantyProviderId) - { - var defs = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature)); - var def = defs.FirstOrDefault(d => d.PluginManifest.Id.Equals(PluginIdOrWarrantyProviderId, StringComparison.InvariantCultureIgnoreCase)); - if (def != null) - return def; - else - foreach (var d in defs) - { - using (var providerInstance = d.CreateInstance()) - { - if (providerInstance.WarrantyProviderId != null && providerInstance.WarrantyProviderId.Equals(PluginIdOrWarrantyProviderId, StringComparison.InvariantCultureIgnoreCase)) - { - return d; - } - } - } - - return null; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.Mvc; +using Disco.Data.Repository; +using Disco.Models.BI.Config; +using Disco.Models.Repository; + +namespace Disco.Services.Plugins.Features.WarrantyProvider +{ + [PluginFeatureCategory(DisplayName = "Warranty Providers")] + public abstract class WarrantyProviderFeature : PluginFeature + { + // Warranty Plugin Requirements + public abstract string WarrantyProviderId { get; } + public abstract Type SubmitJobViewType { get; } + public abstract dynamic SubmitJobViewModel(DiscoDataContext dbContext, Controller controller, Job Job, OrganisationAddress Address, User TechUser); + public abstract Dictionary SubmitJobParseProperties(DiscoDataContext dbContext, FormCollection form, Controller controller, Job Job, OrganisationAddress Address, User TechUser, string FaultDescription); + public abstract Dictionary SubmitJobDiscloseInfo(DiscoDataContext dbContext, Job Job, OrganisationAddress Address, User TechUser, string FaultDescription, Dictionary WarrantyProviderProperties); + public abstract string SubmitJob(DiscoDataContext dbContext, Job Job, OrganisationAddress Address, User TechUser, string FaultDescription, Dictionary WarrantyProviderProperties); + + public abstract Type JobDetailsViewType { get; } + public bool JobDetailsSupported { get { return this.JobDetailsViewType != null; } } + public abstract dynamic JobDetailsViewModel(DiscoDataContext dbContext, Controller controller, Job Job); + + public static PluginFeatureManifest FindPluginFeature(string PluginIdOrWarrantyProviderId) + { + var defs = Plugins.GetPluginFeatures(typeof(WarrantyProviderFeature)); + var def = defs.FirstOrDefault(d => d.PluginManifest.Id.Equals(PluginIdOrWarrantyProviderId, StringComparison.InvariantCultureIgnoreCase)); + if (def != null) + return def; + else + foreach (var d in defs) + { + using (var providerInstance = d.CreateInstance()) + { + if (providerInstance.WarrantyProviderId != null && providerInstance.WarrantyProviderId.Equals(PluginIdOrWarrantyProviderId, StringComparison.InvariantCultureIgnoreCase)) + { + return d; + } + } + } + + return null; + } + } +} diff --git a/Disco.Services/Plugins/Features/WarrantyProvider/WarrantyProviderSubmitJobException.cs b/Disco.Services/Plugins/Features/WarrantyProvider/WarrantyProviderSubmitJobException.cs index 46c55206..add40f64 100644 --- a/Disco.Services/Plugins/Features/WarrantyProvider/WarrantyProviderSubmitJobException.cs +++ b/Disco.Services/Plugins/Features/WarrantyProvider/WarrantyProviderSubmitJobException.cs @@ -1,12 +1,12 @@ -using System; - -namespace Disco.Services.Plugins.Features.WarrantyProvider -{ - public class WarrantyProviderSubmitJobException : Exception - { - public WarrantyProviderSubmitJobException(string Message) - : base(Message) - { - } - } -} +using System; + +namespace Disco.Services.Plugins.Features.WarrantyProvider +{ + public class WarrantyProviderSubmitJobException : Exception + { + public WarrantyProviderSubmitJobException(string Message) + : base(Message) + { + } + } +} diff --git a/Disco.Services/Plugins/InvalidFeatureCategoryTypeException.cs b/Disco.Services/Plugins/InvalidFeatureCategoryTypeException.cs index e5b8efe7..8860a20d 100644 --- a/Disco.Services/Plugins/InvalidFeatureCategoryTypeException.cs +++ b/Disco.Services/Plugins/InvalidFeatureCategoryTypeException.cs @@ -1,50 +1,50 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Services.Plugins -{ - public class InvalidFeatureCategoryTypeException : Exception - { - private string _pluginRequested; - private Type _categoryType; - - public string PluginRequested - { - get - { - return _pluginRequested; - } - } - public Type CategoryType - { - get - { - return _categoryType; - } - } - - public InvalidFeatureCategoryTypeException(Type CategoryType) - : this(CategoryType, null) - { - } - public InvalidFeatureCategoryTypeException(Type CategoryType, string PluginRequested) - { - this._categoryType = CategoryType; - this._pluginRequested = PluginRequested; - } - - public override string Message - { - get - { - if (string.IsNullOrEmpty(_pluginRequested)) - return string.Format("Invalid Category Type [{0}]", _categoryType.Name); - else - return string.Format("Plugin [{1}] is not of the correct Category Type [{0}]", _categoryType.Name, _pluginRequested); - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Services.Plugins +{ + public class InvalidFeatureCategoryTypeException : Exception + { + private string _pluginRequested; + private Type _categoryType; + + public string PluginRequested + { + get + { + return _pluginRequested; + } + } + public Type CategoryType + { + get + { + return _categoryType; + } + } + + public InvalidFeatureCategoryTypeException(Type CategoryType) + : this(CategoryType, null) + { + } + public InvalidFeatureCategoryTypeException(Type CategoryType, string PluginRequested) + { + this._categoryType = CategoryType; + this._pluginRequested = PluginRequested; + } + + public override string Message + { + get + { + if (string.IsNullOrEmpty(_pluginRequested)) + return string.Format("Invalid Category Type [{0}]", _categoryType.Name); + else + return string.Format("Plugin [{1}] is not of the correct Category Type [{0}]", _categoryType.Name, _pluginRequested); + } + } + + } +} diff --git a/Disco.Services/Plugins/PluginConfigurationHandler.cs b/Disco.Services/Plugins/PluginConfigurationHandler.cs index 3341c4db..25964f7a 100644 --- a/Disco.Services/Plugins/PluginConfigurationHandler.cs +++ b/Disco.Services/Plugins/PluginConfigurationHandler.cs @@ -1,47 +1,47 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Web.Mvc; -using Disco.Data.Repository; - -namespace Disco.Services.Plugins -{ - public abstract class PluginConfigurationHandler : IDisposable - { - public PluginManifest Manifest { get; set; } - - public abstract PluginConfigurationHandlerGetResponse Get(DiscoDataContext dbContext, Controller controller); - public abstract bool Post(DiscoDataContext dbContext, FormCollection form, Controller controller); - - public virtual void Dispose() - { - // Nothing in Base Class - } - - protected PluginConfigurationHandlerGetResponse GetResponse(Type ViewType, dynamic ViewModel = null) - { - return new PluginConfigurationHandlerGetResponse(this.Manifest, ViewType, ViewModel); - } - public class PluginConfigurationHandlerGetResponse - { - public PluginManifest Manifest { get; set; } - public Type ViewType { get; set; } - public dynamic ViewModel { get; set; } - - public PluginConfigurationHandlerGetResponse(PluginManifest Manifest, Type ViewType, dynamic ViewModel = null) - { - if (ViewType == null) - throw new ArgumentNullException("ViewType"); - if (!typeof(WebViewPage).IsAssignableFrom(ViewType)) - throw new ArgumentException("The PluginConfigurationHandler ViewType must inherit System.Web.Mvc.WebViewPage", "ViewType"); - - this.Manifest = Manifest; - - this.ViewType = ViewType; - this.ViewModel = ViewModel; - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.Mvc; +using Disco.Data.Repository; + +namespace Disco.Services.Plugins +{ + public abstract class PluginConfigurationHandler : IDisposable + { + public PluginManifest Manifest { get; set; } + + public abstract PluginConfigurationHandlerGetResponse Get(DiscoDataContext dbContext, Controller controller); + public abstract bool Post(DiscoDataContext dbContext, FormCollection form, Controller controller); + + public virtual void Dispose() + { + // Nothing in Base Class + } + + protected PluginConfigurationHandlerGetResponse GetResponse(Type ViewType, dynamic ViewModel = null) + { + return new PluginConfigurationHandlerGetResponse(this.Manifest, ViewType, ViewModel); + } + public class PluginConfigurationHandlerGetResponse + { + public PluginManifest Manifest { get; set; } + public Type ViewType { get; set; } + public dynamic ViewModel { get; set; } + + public PluginConfigurationHandlerGetResponse(PluginManifest Manifest, Type ViewType, dynamic ViewModel = null) + { + if (ViewType == null) + throw new ArgumentNullException("ViewType"); + if (!typeof(WebViewPage).IsAssignableFrom(ViewType)) + throw new ArgumentException("The PluginConfigurationHandler ViewType must inherit System.Web.Mvc.WebViewPage", "ViewType"); + + this.Manifest = Manifest; + + this.ViewType = ViewType; + this.ViewModel = ViewModel; + } + } + } +} diff --git a/Disco.Services/Plugins/PluginFeatureAttribute.cs b/Disco.Services/Plugins/PluginFeatureAttribute.cs index f41d0c95..15947e5c 100644 --- a/Disco.Services/Plugins/PluginFeatureAttribute.cs +++ b/Disco.Services/Plugins/PluginFeatureAttribute.cs @@ -1,15 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Disco.Services.Plugins -{ - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] - public class PluginFeatureAttribute : Attribute - { - public string Id { get; set; } - public string Name { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Disco.Services.Plugins +{ + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public class PluginFeatureAttribute : Attribute + { + public string Id { get; set; } + public string Name { get; set; } + } +} diff --git a/Disco.Services/Plugins/PluginFeatureCategoryAttribute.cs b/Disco.Services/Plugins/PluginFeatureCategoryAttribute.cs index 6358bfb4..fce13b0d 100644 --- a/Disco.Services/Plugins/PluginFeatureCategoryAttribute.cs +++ b/Disco.Services/Plugins/PluginFeatureCategoryAttribute.cs @@ -1,14 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Disco.Services.Plugins -{ - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] - public class PluginFeatureCategoryAttribute : Attribute - { - public string DisplayName { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Disco.Services.Plugins +{ + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public class PluginFeatureCategoryAttribute : Attribute + { + public string DisplayName { get; set; } + } +} diff --git a/Disco.Services/Plugins/PluginWebHandler.cs b/Disco.Services/Plugins/PluginWebHandler.cs index 903c6755..72f61578 100644 --- a/Disco.Services/Plugins/PluginWebHandler.cs +++ b/Disco.Services/Plugins/PluginWebHandler.cs @@ -1,229 +1,229 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Web.Mvc; -using System.Web.Routing; -using RazorGenerator.Mvc; - -namespace Disco.Services.Plugins -{ - public abstract class PluginWebHandler : IDisposable - { - public PluginManifest Manifest { get; set; } - public Controller HostController { get; set; } - - public abstract ActionResult ExecuteAction(string ActionName); - - public virtual void Dispose() - { - // Nothing in Base Class - } - - - #region Action Results - - #region Compiled View - private static string[] _viewFileNames = new string[] { "cshtml" }; - public ActionResult CompiledView(Type CompiledViewType, object Model, bool UseDiscoLayout) - { - string layoutPath = UseDiscoLayout ? "~/Views/Shared/_Layout.cshtml" : null; - - IView v = new PrecompiledMvcView(this.HostController.Request.Path, layoutPath, CompiledViewType, false, _viewFileNames); - - if (Model != null) - this.HostController.ViewData.Model = Model; - - return new ViewResult { View = v, ViewData = this.HostController.ViewData, TempData = this.HostController.TempData }; - } - public ActionResult CompiledView(Type CompiledViewType, bool UseDiscoLayout) - { - return this.CompiledView(CompiledViewType, null, UseDiscoLayout); - } - public ActionResult CompiledView(Type CompiledViewType, object Model) - { - return this.CompiledView(CompiledViewType, Model, true); - } - public ActionResult CompiledView(Type CompiledViewType) - { - return this.CompiledView(CompiledViewType, false, true); - } - public ActionResult CompiledPartialView(Type PartialCompiledViewType, object Model) - { - IView v = new PrecompiledMvcView(this.HostController.Request.Path, PartialCompiledViewType, false, _viewFileNames); - - if (Model != null) - this.HostController.ViewData.Model = Model; - - return new PartialViewResult { View = v, ViewData = this.HostController.ViewData, TempData = this.HostController.TempData }; - } - public ActionResult CompiledPartialView(Type PartialCompiledViewType) - { - return this.CompiledView(PartialCompiledViewType, null); - } - #endregion - - #region Content - public ActionResult Content(string content, string contentType, Encoding contentEncoding) - { - return new ContentResult { Content = content, ContentType = contentType, ContentEncoding = contentEncoding }; - } - public ActionResult Content(string content, string contentType) - { - return this.Content(content, null, null); - } - public ActionResult Content(string content) - { - return this.Content(content, null); - } - #endregion - - #region Json - public ActionResult Json(object data, JsonRequestBehavior behavior) - { - return new JsonResult { Data = data, ContentType = null, ContentEncoding = null, JsonRequestBehavior = behavior }; - } - #endregion - - #region File - public ActionResult File(Stream fileStream, string contentType) - { - return this.File(fileStream, contentType, null); - } - public ActionResult File(Stream fileStream, string contentType, string fileDownloadName) - { - return new FileStreamResult(fileStream, contentType) { FileDownloadName = fileDownloadName }; - } - public ActionResult File(byte[] fileContents, string contentType) - { - return this.File(fileContents, contentType, null); - } - public ActionResult File(byte[] fileContents, string contentType, string fileDownloadName) - { - return new FileContentResult(fileContents, contentType) { FileDownloadName = fileDownloadName }; - } - #endregion - - #region HttpNotFound - public ActionResult HttpNotFound(string statusDescription) - { - return new HttpNotFoundResult(statusDescription); - } - public ActionResult HttpNotFound() - { - return this.HttpNotFound(null); - } - #endregion - - #region Redirect - public ActionResult RedirectToScheduledTaskStatus(string SessionId) - { - if (string.IsNullOrEmpty(SessionId)) - throw new ArgumentNullException(SessionId); - - return this.RedirectToAction("TaskStatus", "Logging", "Config", new { id = SessionId }); - } - public ActionResult Redirect(string url) - { - if (string.IsNullOrEmpty(url)) - throw new ArgumentNullException("url"); - - return new RedirectResult(url); - } - public ActionResult RedirectPermanent(string url) - { - if (string.IsNullOrEmpty(url)) - throw new ArgumentNullException("url"); - - return new RedirectResult(url, true); - } - public ActionResult RedirectToPluginAction(string PluginAction) - { - if (string.IsNullOrEmpty(PluginAction)) - throw new ArgumentNullException("PluginAction"); - - var routeValues = new RouteValueDictionary(new { PluginId = this.Manifest.Id, PluginAction = PluginAction }); - string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, this.HostController.Request.RequestContext, false); - - return new RedirectResult(pluginActionUrl, false); - } - public ActionResult RedirectToPluginResource(string Resource, bool? Download) - { - var resourcePath = this.Manifest.WebResourcePath(Resource); - - var routeValues = new RouteValueDictionary(new { PluginId = this.Manifest.Id, res = Resource }); - string pluginActionUrl = UrlHelper.GenerateUrl("Plugin_Resources", null, null, routeValues, RouteTable.Routes, this.HostController.Request.RequestContext, false); - - pluginActionUrl += string.Format("?v={0}", resourcePath.Item2); - - if (Download.HasValue && Download.Value) - { - pluginActionUrl += "&Download=true"; - } - - return new RedirectResult(pluginActionUrl, false); - } - public ActionResult RedirectToPluginResource(string Resource) - { - return this.RedirectToPluginResource(Resource, null); - } - public ActionResult RedirectToRoute(string routeName, object routeValues) - { - RouteValueDictionary routeValueDictionary; - if (routeValues != null) - routeValueDictionary = new RouteValueDictionary(routeValues); - else - routeValueDictionary = new RouteValueDictionary(); - - return new RedirectToRouteResult(routeName, routeValueDictionary); - } - public ActionResult RedirectToRoute(string routeName) - { - return this.RedirectToRoute(routeName, null); - } - public ActionResult RedirectToAction(string actionName, string controller, string areaName, object routeValues) - { - RouteValueDictionary routeValueDictionary; - if (routeValues != null) - routeValueDictionary = new RouteValueDictionary(routeValues); - else - routeValueDictionary = new RouteValueDictionary(); - - routeValueDictionary["action"] = actionName; - routeValueDictionary["controller"] = controller; - if (areaName != null) - routeValueDictionary["area"] = areaName; - - return new RedirectToRouteResult(routeValueDictionary); - } - public ActionResult RedirectToAction(string actionName, string controller, string areaName) - { - return this.RedirectToAction(actionName, controller, areaName, null); - } - public ActionResult RedirectToAction(string actionName, string controller, object routeValues) - { - return this.RedirectToAction(actionName, controller, null, routeValues); - } - public ActionResult RedirectToAction(string actionName, string controller) - { - return this.RedirectToAction(actionName, controller, null, null); - } - public ActionResult RedirectToDiscoJob(int jobId) - { - return this.RedirectToAction("Show", "Job", null, new { id = jobId.ToString() }); - } - public ActionResult RedirectToDiscoDevice(string DeviceSerialNumber) - { - return this.RedirectToAction("Show", "Device", null, new { id = DeviceSerialNumber }); - } - public ActionResult RedirectToDiscoUser(string UserId) - { - return this.RedirectToAction("Show", "User", null, new { id = UserId }); - } - #endregion - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.Mvc; +using System.Web.Routing; +using RazorGenerator.Mvc; + +namespace Disco.Services.Plugins +{ + public abstract class PluginWebHandler : IDisposable + { + public PluginManifest Manifest { get; set; } + public Controller HostController { get; set; } + + public abstract ActionResult ExecuteAction(string ActionName); + + public virtual void Dispose() + { + // Nothing in Base Class + } + + + #region Action Results + + #region Compiled View + private static string[] _viewFileNames = new string[] { "cshtml" }; + public ActionResult CompiledView(Type CompiledViewType, object Model, bool UseDiscoLayout) + { + string layoutPath = UseDiscoLayout ? "~/Views/Shared/_Layout.cshtml" : null; + + IView v = new PrecompiledMvcView(this.HostController.Request.Path, layoutPath, CompiledViewType, false, _viewFileNames); + + if (Model != null) + this.HostController.ViewData.Model = Model; + + return new ViewResult { View = v, ViewData = this.HostController.ViewData, TempData = this.HostController.TempData }; + } + public ActionResult CompiledView(Type CompiledViewType, bool UseDiscoLayout) + { + return this.CompiledView(CompiledViewType, null, UseDiscoLayout); + } + public ActionResult CompiledView(Type CompiledViewType, object Model) + { + return this.CompiledView(CompiledViewType, Model, true); + } + public ActionResult CompiledView(Type CompiledViewType) + { + return this.CompiledView(CompiledViewType, false, true); + } + public ActionResult CompiledPartialView(Type PartialCompiledViewType, object Model) + { + IView v = new PrecompiledMvcView(this.HostController.Request.Path, PartialCompiledViewType, false, _viewFileNames); + + if (Model != null) + this.HostController.ViewData.Model = Model; + + return new PartialViewResult { View = v, ViewData = this.HostController.ViewData, TempData = this.HostController.TempData }; + } + public ActionResult CompiledPartialView(Type PartialCompiledViewType) + { + return this.CompiledView(PartialCompiledViewType, null); + } + #endregion + + #region Content + public ActionResult Content(string content, string contentType, Encoding contentEncoding) + { + return new ContentResult { Content = content, ContentType = contentType, ContentEncoding = contentEncoding }; + } + public ActionResult Content(string content, string contentType) + { + return this.Content(content, null, null); + } + public ActionResult Content(string content) + { + return this.Content(content, null); + } + #endregion + + #region Json + public ActionResult Json(object data, JsonRequestBehavior behavior) + { + return new JsonResult { Data = data, ContentType = null, ContentEncoding = null, JsonRequestBehavior = behavior }; + } + #endregion + + #region File + public ActionResult File(Stream fileStream, string contentType) + { + return this.File(fileStream, contentType, null); + } + public ActionResult File(Stream fileStream, string contentType, string fileDownloadName) + { + return new FileStreamResult(fileStream, contentType) { FileDownloadName = fileDownloadName }; + } + public ActionResult File(byte[] fileContents, string contentType) + { + return this.File(fileContents, contentType, null); + } + public ActionResult File(byte[] fileContents, string contentType, string fileDownloadName) + { + return new FileContentResult(fileContents, contentType) { FileDownloadName = fileDownloadName }; + } + #endregion + + #region HttpNotFound + public ActionResult HttpNotFound(string statusDescription) + { + return new HttpNotFoundResult(statusDescription); + } + public ActionResult HttpNotFound() + { + return this.HttpNotFound(null); + } + #endregion + + #region Redirect + public ActionResult RedirectToScheduledTaskStatus(string SessionId) + { + if (string.IsNullOrEmpty(SessionId)) + throw new ArgumentNullException(SessionId); + + return this.RedirectToAction("TaskStatus", "Logging", "Config", new { id = SessionId }); + } + public ActionResult Redirect(string url) + { + if (string.IsNullOrEmpty(url)) + throw new ArgumentNullException("url"); + + return new RedirectResult(url); + } + public ActionResult RedirectPermanent(string url) + { + if (string.IsNullOrEmpty(url)) + throw new ArgumentNullException("url"); + + return new RedirectResult(url, true); + } + public ActionResult RedirectToPluginAction(string PluginAction) + { + if (string.IsNullOrEmpty(PluginAction)) + throw new ArgumentNullException("PluginAction"); + + var routeValues = new RouteValueDictionary(new { PluginId = this.Manifest.Id, PluginAction = PluginAction }); + string pluginActionUrl = UrlHelper.GenerateUrl("Plugin", null, null, routeValues, RouteTable.Routes, this.HostController.Request.RequestContext, false); + + return new RedirectResult(pluginActionUrl, false); + } + public ActionResult RedirectToPluginResource(string Resource, bool? Download) + { + var resourcePath = this.Manifest.WebResourcePath(Resource); + + var routeValues = new RouteValueDictionary(new { PluginId = this.Manifest.Id, res = Resource }); + string pluginActionUrl = UrlHelper.GenerateUrl("Plugin_Resources", null, null, routeValues, RouteTable.Routes, this.HostController.Request.RequestContext, false); + + pluginActionUrl += string.Format("?v={0}", resourcePath.Item2); + + if (Download.HasValue && Download.Value) + { + pluginActionUrl += "&Download=true"; + } + + return new RedirectResult(pluginActionUrl, false); + } + public ActionResult RedirectToPluginResource(string Resource) + { + return this.RedirectToPluginResource(Resource, null); + } + public ActionResult RedirectToRoute(string routeName, object routeValues) + { + RouteValueDictionary routeValueDictionary; + if (routeValues != null) + routeValueDictionary = new RouteValueDictionary(routeValues); + else + routeValueDictionary = new RouteValueDictionary(); + + return new RedirectToRouteResult(routeName, routeValueDictionary); + } + public ActionResult RedirectToRoute(string routeName) + { + return this.RedirectToRoute(routeName, null); + } + public ActionResult RedirectToAction(string actionName, string controller, string areaName, object routeValues) + { + RouteValueDictionary routeValueDictionary; + if (routeValues != null) + routeValueDictionary = new RouteValueDictionary(routeValues); + else + routeValueDictionary = new RouteValueDictionary(); + + routeValueDictionary["action"] = actionName; + routeValueDictionary["controller"] = controller; + if (areaName != null) + routeValueDictionary["area"] = areaName; + + return new RedirectToRouteResult(routeValueDictionary); + } + public ActionResult RedirectToAction(string actionName, string controller, string areaName) + { + return this.RedirectToAction(actionName, controller, areaName, null); + } + public ActionResult RedirectToAction(string actionName, string controller, object routeValues) + { + return this.RedirectToAction(actionName, controller, null, routeValues); + } + public ActionResult RedirectToAction(string actionName, string controller) + { + return this.RedirectToAction(actionName, controller, null, null); + } + public ActionResult RedirectToDiscoJob(int jobId) + { + return this.RedirectToAction("Show", "Job", null, new { id = jobId.ToString() }); + } + public ActionResult RedirectToDiscoDevice(string DeviceSerialNumber) + { + return this.RedirectToAction("Show", "Device", null, new { id = DeviceSerialNumber }); + } + public ActionResult RedirectToDiscoUser(string UserId) + { + return this.RedirectToAction("Show", "User", null, new { id = UserId }); + } + #endregion + + #endregion + } +} diff --git a/Disco.Services/Plugins/PluginWebHandlerController.cs b/Disco.Services/Plugins/PluginWebHandlerController.cs index b2be9fe4..3e822c57 100644 --- a/Disco.Services/Plugins/PluginWebHandlerController.cs +++ b/Disco.Services/Plugins/PluginWebHandlerController.cs @@ -1,121 +1,121 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using System.Web.Mvc; - -namespace Disco.Services.Plugins -{ - public abstract class PluginWebHandlerController : PluginWebHandler - { - - public override ActionResult ExecuteAction(string ActionName) - { - var handlerType = this.GetType(); - var methodDescriptor = FindControllerMethod(handlerType, ActionName); - - if (methodDescriptor == null) - return this.HttpNotFound("Unknown Plugin Method"); - - var methodParams = BuildMethodParameters(handlerType, methodDescriptor.MethodInfo, ActionName, this.HostController); - - return (ActionResult)methodDescriptor.MethodInfo.Invoke(this, methodParams); - } - - private static WebHandlerCachedItem FindControllerMethod(Type Handler, string ActionName) - { - var descriptors = CacheWebHandler(Handler); - WebHandlerCachedItem method; - if (descriptors.TryGetValue(ActionName.ToLower(), out method)) - return method; // Not Found - else - return null; // Not Found - } - private static object[] BuildMethodParameters(Type Handler, MethodInfo methodInfo, string ActionName, Controller HostController) - { - var methodParams = methodInfo.GetParameters(); - var result = new object[methodParams.Length]; - - for (int i = 0; i < methodParams.Length; i++) - { - var methodParam = methodParams[i]; - - Type parameterType = methodParam.ParameterType; - IModelBinder modelBinder = ModelBinders.Binders.GetBinder(parameterType); - IValueProvider valueProvider = HostController.ValueProvider; - string parameterName = methodParam.Name; - - ModelBindingContext bindingContext = new ModelBindingContext() - { - FallbackToEmptyPrefix = true, - ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(null, parameterType), - ModelName = parameterName, - ModelState = HostController.ViewData.ModelState, - PropertyFilter = (p) => true, - ValueProvider = valueProvider - }; - - var parameterValue = modelBinder.BindModel(HostController.ControllerContext, bindingContext); - - if (parameterValue == null && methodParam.HasDefaultValue) - parameterValue = methodParam.DefaultValue; - - result[i] = parameterValue; - - //var paramInstance = Activator.CreateInstance(methodParam.ParameterType); - - //IModelBinder binder = ModelBinders.Binders.GetBinder(methodParam.ParameterType); - //ModelBindingContext bindingContext = new ModelBindingContext - //{ - // ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(() => paramInstance, methodParam.ParameterType), - // ModelName = methodParam.Name, - // ModelState = HostController.ModelState, - // PropertyFilter = (p) => true, - // ValueProvider = HostController.ValueProvider - //}; - //binder.BindModel(HostController.ControllerContext, bindingContext); - - //if (methodParam.HasDefaultValue && paramInstance == null) - // paramInstance = methodParam.DefaultValue; - - //result[i] = paramInstance; - } - - return result; - } - - #region Method Cache - private static Dictionary> WebHandlerCachedItems = new Dictionary>(); - private static Dictionary CacheWebHandler(Type Handler) - { - Dictionary result; - - if (!WebHandlerCachedItems.TryGetValue(Handler, out result)) - { - // Cache Miss - result = new Dictionary(); - var methods = Array.FindAll(Handler.GetMethods(BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), mi => { return !mi.IsSpecialName && typeof(ActionResult).IsAssignableFrom(mi.ReturnType); }); - foreach (var method in methods) - { - var item = new WebHandlerCachedItem() - { - Method = method.Name, - MethodInfo = method - }; - result.Add(item.Method.ToLower(), item); - } - WebHandlerCachedItems[Handler] = result; - } - - return result; - } - private class WebHandlerCachedItem - { - public string Method { get; set; } - public MethodInfo MethodInfo { get; set; } - } - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Web.Mvc; + +namespace Disco.Services.Plugins +{ + public abstract class PluginWebHandlerController : PluginWebHandler + { + + public override ActionResult ExecuteAction(string ActionName) + { + var handlerType = this.GetType(); + var methodDescriptor = FindControllerMethod(handlerType, ActionName); + + if (methodDescriptor == null) + return this.HttpNotFound("Unknown Plugin Method"); + + var methodParams = BuildMethodParameters(handlerType, methodDescriptor.MethodInfo, ActionName, this.HostController); + + return (ActionResult)methodDescriptor.MethodInfo.Invoke(this, methodParams); + } + + private static WebHandlerCachedItem FindControllerMethod(Type Handler, string ActionName) + { + var descriptors = CacheWebHandler(Handler); + WebHandlerCachedItem method; + if (descriptors.TryGetValue(ActionName.ToLower(), out method)) + return method; // Not Found + else + return null; // Not Found + } + private static object[] BuildMethodParameters(Type Handler, MethodInfo methodInfo, string ActionName, Controller HostController) + { + var methodParams = methodInfo.GetParameters(); + var result = new object[methodParams.Length]; + + for (int i = 0; i < methodParams.Length; i++) + { + var methodParam = methodParams[i]; + + Type parameterType = methodParam.ParameterType; + IModelBinder modelBinder = ModelBinders.Binders.GetBinder(parameterType); + IValueProvider valueProvider = HostController.ValueProvider; + string parameterName = methodParam.Name; + + ModelBindingContext bindingContext = new ModelBindingContext() + { + FallbackToEmptyPrefix = true, + ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(null, parameterType), + ModelName = parameterName, + ModelState = HostController.ViewData.ModelState, + PropertyFilter = (p) => true, + ValueProvider = valueProvider + }; + + var parameterValue = modelBinder.BindModel(HostController.ControllerContext, bindingContext); + + if (parameterValue == null && methodParam.HasDefaultValue) + parameterValue = methodParam.DefaultValue; + + result[i] = parameterValue; + + //var paramInstance = Activator.CreateInstance(methodParam.ParameterType); + + //IModelBinder binder = ModelBinders.Binders.GetBinder(methodParam.ParameterType); + //ModelBindingContext bindingContext = new ModelBindingContext + //{ + // ModelMetadata = ModelMetadataProviders.Current.GetMetadataForType(() => paramInstance, methodParam.ParameterType), + // ModelName = methodParam.Name, + // ModelState = HostController.ModelState, + // PropertyFilter = (p) => true, + // ValueProvider = HostController.ValueProvider + //}; + //binder.BindModel(HostController.ControllerContext, bindingContext); + + //if (methodParam.HasDefaultValue && paramInstance == null) + // paramInstance = methodParam.DefaultValue; + + //result[i] = paramInstance; + } + + return result; + } + + #region Method Cache + private static Dictionary> WebHandlerCachedItems = new Dictionary>(); + private static Dictionary CacheWebHandler(Type Handler) + { + Dictionary result; + + if (!WebHandlerCachedItems.TryGetValue(Handler, out result)) + { + // Cache Miss + result = new Dictionary(); + var methods = Array.FindAll(Handler.GetMethods(BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), mi => { return !mi.IsSpecialName && typeof(ActionResult).IsAssignableFrom(mi.ReturnType); }); + foreach (var method in methods) + { + var item = new WebHandlerCachedItem() + { + Method = method.Name, + MethodInfo = method + }; + result.Add(item.Method.ToLower(), item); + } + WebHandlerCachedItems[Handler] = result; + } + + return result; + } + private class WebHandlerCachedItem + { + public string Method { get; set; } + public MethodInfo MethodInfo { get; set; } + } + #endregion + } +} diff --git a/Disco.Services/Plugins/UnknownPluginException.cs b/Disco.Services/Plugins/UnknownPluginException.cs index 1b1da494..746cf9f3 100644 --- a/Disco.Services/Plugins/UnknownPluginException.cs +++ b/Disco.Services/Plugins/UnknownPluginException.cs @@ -1,37 +1,37 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Services.Plugins -{ - public class UnknownPluginException : Exception - { - private string _pluginRequested; - - public string PluginRequested - { - get - { - return _pluginRequested; - } - } - - public UnknownPluginException(string PluginRequested) - { - this._pluginRequested = PluginRequested; - } - public UnknownPluginException(string PluginRequested, string Message) : base(Message) - { - this._pluginRequested = PluginRequested; - } - - public override string Message - { - get - { - return string.Format("Unknown Plugin Id: [{0}]", _pluginRequested); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Services.Plugins +{ + public class UnknownPluginException : Exception + { + private string _pluginRequested; + + public string PluginRequested + { + get + { + return _pluginRequested; + } + } + + public UnknownPluginException(string PluginRequested) + { + this._pluginRequested = PluginRequested; + } + public UnknownPluginException(string PluginRequested, string Message) : base(Message) + { + this._pluginRequested = PluginRequested; + } + + public override string Message + { + get + { + return string.Format("Unknown Plugin Id: [{0}]", _pluginRequested); + } + } + } +} diff --git a/Disco.Services/Tasks/ScheduledTaskStatus.cs b/Disco.Services/Tasks/ScheduledTaskStatus.cs index 7d4ba841..edf75990 100644 --- a/Disco.Services/Tasks/ScheduledTaskStatus.cs +++ b/Disco.Services/Tasks/ScheduledTaskStatus.cs @@ -1,351 +1,351 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Quartz; -using System.Web.Script.Serialization; - -namespace Disco.Services.Tasks -{ - public class ScheduledTaskStatus - { - #region Backing Fields - - private string _sessionId; - private string _triggerKey; - private string _taskName; - private Type _taskType; - private bool _isSilent; - - private byte _progress; - private string _currentProcess; - private string _currentDescription; - - private Exception _taskException; - private bool _cancelInitiallySupported; - private bool _cancelSupported; - private bool _isCanceling; - - private DateTime? _startedTimestamp; - private DateTime? _nextScheduledTimestamp; - private DateTime? _finishedTimestamp; - - private string _finishedMessage; - private string _finishedUrl; - - private int _statusVersion = 0; - - #endregion - - #region Properties - - public string SessionId { get { return this._sessionId; } } - public string TriggerKey { get { return this._triggerKey; } } - public string TaskName { get { return this._taskName; } } - public Type TaskType { get { return this._taskType; } } - public bool IsSilent { get { return this._isSilent; } } - - public byte Progress { get { return this._progress; } } - public string CurrentProcess { get { return this._currentProcess; } } - public string CurrentDescription { get { return this._currentDescription; } } - - public Exception TaskException { get { return this._taskException; } } - public bool CancelSupported { get { return this._cancelSupported; } } - public bool IsCanceling { get { return this._isCanceling; } } - - public DateTime? StartedTimestamp { get { return this._startedTimestamp; } } - public DateTime? FinishedTimestamp { get { return this._finishedTimestamp; } } - public DateTime? NextScheduledTimestamp { get { return this._nextScheduledTimestamp; } } - - public string FinishedMessage { get { return this._finishedMessage; } } - public string FinishedUrl { get { return this._finishedUrl; } } - - public int StatusVersion { get { return this._statusVersion; } } - - public bool IsRunning - { - get - { - return _startedTimestamp.HasValue && !_finishedTimestamp.HasValue; - } - } - - #endregion - - #region Events - public delegate void UpdatedEvent(ScheduledTaskStatus sender, string[] ChangedProperties); - public delegate void CancelingEvent(ScheduledTaskStatus sender); - public event UpdatedEvent Updated; - public event CancelingEvent Canceling; - #endregion - - public ScheduledTaskStatus(ScheduledTask Task, string SessionId, string TriggerKey, string FinishedUrl = null) - { - this._taskName = Task.TaskName; - this._taskType = Task.GetType(); - - this._sessionId = SessionId; - this._triggerKey = TriggerKey; - this._cancelInitiallySupported = Task.CancelInitiallySupported; - this._cancelSupported = this._cancelInitiallySupported; - - this._finishedUrl = FinishedUrl; - - this._currentProcess = "Scheduled"; - this._currentDescription = "Scheduled Task for Execution"; - - this._progress = 0; - } - - #region Progress Actions - public void UpdateStatus(byte Progress) - { - this._progress = Progress; - UpdateTriggered(new string[] { "Progress" }); - } - public void UpdateStatus(double Progress) - { - UpdateStatus((byte)Progress); - } - public void UpdateStatus(string CurrentDescription) - { - this._currentDescription = CurrentDescription; - UpdateTriggered(new string[] { "CurrentDescription" }); - } - public void UpdateStatus(byte Progress, string CurrentDescription) - { - this._progress = Progress; - this._currentDescription = CurrentDescription; - UpdateTriggered(new string[] { "Progress", "CurrentDescription" }); - } - public void UpdateStatus(double Progress, string CurrentDescription) - { - UpdateStatus((byte)Progress, CurrentDescription); - } - public void UpdateStatus(byte Progress, string CurrentProcess, string CurrentDescription) - { - this._progress = Progress; - this._currentProcess = CurrentProcess; - this._currentDescription = CurrentDescription; - UpdateTriggered(new string[] { "Progress", "CurrentProcess", "CurrentDescription" }); - } - public void UpdateStatus(double Progress, string CurrentProcess, string CurrentDescription) - { - UpdateStatus((byte)Progress, CurrentProcess, CurrentDescription); - } - #endregion - - #region State Actions - public bool Canceled() - { - if (!this._isCanceling) - { - if (_cancelSupported) - { // Cancelling - this._isCanceling = true; - UpdateTriggered(new string[] { "IsCancelling" }); - if (this.Canceling != null) - Canceling(this); - return true; - } - else - { // Cancelling not supported - return false; - } - } - else - { // Already Cancelling - return true; - } - } - public void SetCancelSupported(bool CancelSupported) - { - if (this._cancelSupported != CancelSupported) - { - this._cancelSupported = CancelSupported; - UpdateTriggered(new string[] { "CancelSupported" }); - } - } - public void SetTaskException(Exception TaskException) - { - if (this._taskException != TaskException) - { - this._taskException = TaskException; - UpdateTriggered(new string[] { "TaskException" }); - } - } - public void SetIsSilent(bool IsSilent) - { - if (this._isSilent != IsSilent) - this._isSilent = IsSilent; - } - public void SetFinishedUrl(string FinishedUrl) - { - if (this._finishedUrl != FinishedUrl) - { - this._finishedUrl = FinishedUrl; - UpdateTriggered(new string[] { "FinishedUrl" }); - } - } - public void SetFinishedMessage(string FinishedMessage) - { - if (this._finishedMessage != FinishedMessage) - { - this._finishedMessage = FinishedMessage; - UpdateTriggered(new string[] { "FinishedMessage" }); - } - } - public void SetNextScheduledTimestamp(DateTime? NextScheduledTimestamp) - { - if (this._nextScheduledTimestamp != NextScheduledTimestamp) - { - this._nextScheduledTimestamp = NextScheduledTimestamp; - UpdateTriggered(new string[] { "NextScheduledTimestamp" }); - } - } - public void Started() - { - List changedProperties = new List() { "IsRunning", "StartedTimestamp" }; - - this._startedTimestamp = DateTime.Now; - - if (this._nextScheduledTimestamp != null) - { - this._nextScheduledTimestamp = null; - changedProperties.Add("NextScheduledTimestamp"); - } - if (this._finishedTimestamp != null) - { - this._finishedTimestamp = null; - changedProperties.Add("FinishedTimestamp"); - } - if (this._progress != 0) - { - this._progress = 0; - changedProperties.Add("Progress"); - } - if (this._currentProcess != "Starting") - { - this._currentProcess = "Starting"; - changedProperties.Add("CurrentProcess"); - } - if (this._currentDescription != "Initializing Task for Execution") - { - this._currentDescription = "Initializing Task for Execution"; - changedProperties.Add("CurrentDescription"); - } - if (this._taskException != null) - { - this._taskException = null; - changedProperties.Add("TaskException"); - } - if (this._cancelSupported != this._cancelInitiallySupported) - { - this._cancelSupported = this._cancelInitiallySupported; - changedProperties.Add("CancelSupported"); - } - { - this._isCanceling = false; - changedProperties.Add("IsCanceling"); - } - if (this._isCanceling) - { - this._isCanceling = false; - changedProperties.Add("IsCanceling"); - } - UpdateTriggered(changedProperties.ToArray()); - } - public void Finished() - { - Finished(this._finishedMessage, this._finishedUrl); - } - public void Finished(string FinishedMessage, string FinishedUrl) - { - List changedProperties = new List() { "IsRunning", "FinishedTimestamp" }; - - this._finishedTimestamp = DateTime.Now; - - if (FinishedMessage != this._finishedMessage) - { - this._finishedMessage = FinishedMessage; - changedProperties.Add("FinishedMessage"); - } - if (FinishedUrl != this._finishedUrl) - { - this._finishedUrl = FinishedUrl; - changedProperties.Add("FinishedUrl"); - } - - if (this._isCanceling) - { - this._isCanceling = false; - changedProperties.Add("IsCanceling"); - } - UpdateTriggered(changedProperties.ToArray()); - } - public void Reset(DateTime? NextScheduledTimestamp) - { - List changedProperties = new List(); - - if (this._nextScheduledTimestamp != NextScheduledTimestamp) - { - this._nextScheduledTimestamp = NextScheduledTimestamp; - changedProperties.Add("NextScheduledTimestamp"); - } - - if (this._startedTimestamp != null) - { - this._startedTimestamp = null; - changedProperties.Add("StartedTimestamp"); - } - if (this._finishedTimestamp != null) - { - this._finishedTimestamp = null; - changedProperties.Add("FinishedTimestamp"); - } - if (this._finishedMessage != null) - { - this._finishedMessage = null; - changedProperties.Add("FinishedMessage"); - } - if (this._finishedUrl != null) - { - this._finishedUrl = null; - changedProperties.Add("FinishedUrl"); - } - if (this._progress != 0) - { - this._progress = 0; - changedProperties.Add("Progress"); - } - if (this._currentProcess != "Scheduled") - { - this._currentProcess = "Scheduled"; - changedProperties.Add("CurrentProcess"); - } - if (this._currentDescription != "Scheduled Task for Execution") - { - this._currentDescription = "Scheduled Task for Execution"; - changedProperties.Add("CurrentDescription"); - } - if (this._isCanceling) - { - this._isCanceling = false; - changedProperties.Add("IsCanceling"); - } - UpdateTriggered(changedProperties.ToArray()); - } - #endregion - - private void UpdateTriggered(string[] ChangedProperties) - { - this._statusVersion++; - - if (Updated != null) - Updated(this, ChangedProperties); - - if (!_isSilent) - ScheduledTasksLiveStatusService.Broadcast(ScheduledTaskStatusLive.FromScheduledTaskStatus(this, ChangedProperties)); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Quartz; +using System.Web.Script.Serialization; + +namespace Disco.Services.Tasks +{ + public class ScheduledTaskStatus + { + #region Backing Fields + + private string _sessionId; + private string _triggerKey; + private string _taskName; + private Type _taskType; + private bool _isSilent; + + private byte _progress; + private string _currentProcess; + private string _currentDescription; + + private Exception _taskException; + private bool _cancelInitiallySupported; + private bool _cancelSupported; + private bool _isCanceling; + + private DateTime? _startedTimestamp; + private DateTime? _nextScheduledTimestamp; + private DateTime? _finishedTimestamp; + + private string _finishedMessage; + private string _finishedUrl; + + private int _statusVersion = 0; + + #endregion + + #region Properties + + public string SessionId { get { return this._sessionId; } } + public string TriggerKey { get { return this._triggerKey; } } + public string TaskName { get { return this._taskName; } } + public Type TaskType { get { return this._taskType; } } + public bool IsSilent { get { return this._isSilent; } } + + public byte Progress { get { return this._progress; } } + public string CurrentProcess { get { return this._currentProcess; } } + public string CurrentDescription { get { return this._currentDescription; } } + + public Exception TaskException { get { return this._taskException; } } + public bool CancelSupported { get { return this._cancelSupported; } } + public bool IsCanceling { get { return this._isCanceling; } } + + public DateTime? StartedTimestamp { get { return this._startedTimestamp; } } + public DateTime? FinishedTimestamp { get { return this._finishedTimestamp; } } + public DateTime? NextScheduledTimestamp { get { return this._nextScheduledTimestamp; } } + + public string FinishedMessage { get { return this._finishedMessage; } } + public string FinishedUrl { get { return this._finishedUrl; } } + + public int StatusVersion { get { return this._statusVersion; } } + + public bool IsRunning + { + get + { + return _startedTimestamp.HasValue && !_finishedTimestamp.HasValue; + } + } + + #endregion + + #region Events + public delegate void UpdatedEvent(ScheduledTaskStatus sender, string[] ChangedProperties); + public delegate void CancelingEvent(ScheduledTaskStatus sender); + public event UpdatedEvent Updated; + public event CancelingEvent Canceling; + #endregion + + public ScheduledTaskStatus(ScheduledTask Task, string SessionId, string TriggerKey, string FinishedUrl = null) + { + this._taskName = Task.TaskName; + this._taskType = Task.GetType(); + + this._sessionId = SessionId; + this._triggerKey = TriggerKey; + this._cancelInitiallySupported = Task.CancelInitiallySupported; + this._cancelSupported = this._cancelInitiallySupported; + + this._finishedUrl = FinishedUrl; + + this._currentProcess = "Scheduled"; + this._currentDescription = "Scheduled Task for Execution"; + + this._progress = 0; + } + + #region Progress Actions + public void UpdateStatus(byte Progress) + { + this._progress = Progress; + UpdateTriggered(new string[] { "Progress" }); + } + public void UpdateStatus(double Progress) + { + UpdateStatus((byte)Progress); + } + public void UpdateStatus(string CurrentDescription) + { + this._currentDescription = CurrentDescription; + UpdateTriggered(new string[] { "CurrentDescription" }); + } + public void UpdateStatus(byte Progress, string CurrentDescription) + { + this._progress = Progress; + this._currentDescription = CurrentDescription; + UpdateTriggered(new string[] { "Progress", "CurrentDescription" }); + } + public void UpdateStatus(double Progress, string CurrentDescription) + { + UpdateStatus((byte)Progress, CurrentDescription); + } + public void UpdateStatus(byte Progress, string CurrentProcess, string CurrentDescription) + { + this._progress = Progress; + this._currentProcess = CurrentProcess; + this._currentDescription = CurrentDescription; + UpdateTriggered(new string[] { "Progress", "CurrentProcess", "CurrentDescription" }); + } + public void UpdateStatus(double Progress, string CurrentProcess, string CurrentDescription) + { + UpdateStatus((byte)Progress, CurrentProcess, CurrentDescription); + } + #endregion + + #region State Actions + public bool Canceled() + { + if (!this._isCanceling) + { + if (_cancelSupported) + { // Cancelling + this._isCanceling = true; + UpdateTriggered(new string[] { "IsCancelling" }); + if (this.Canceling != null) + Canceling(this); + return true; + } + else + { // Cancelling not supported + return false; + } + } + else + { // Already Cancelling + return true; + } + } + public void SetCancelSupported(bool CancelSupported) + { + if (this._cancelSupported != CancelSupported) + { + this._cancelSupported = CancelSupported; + UpdateTriggered(new string[] { "CancelSupported" }); + } + } + public void SetTaskException(Exception TaskException) + { + if (this._taskException != TaskException) + { + this._taskException = TaskException; + UpdateTriggered(new string[] { "TaskException" }); + } + } + public void SetIsSilent(bool IsSilent) + { + if (this._isSilent != IsSilent) + this._isSilent = IsSilent; + } + public void SetFinishedUrl(string FinishedUrl) + { + if (this._finishedUrl != FinishedUrl) + { + this._finishedUrl = FinishedUrl; + UpdateTriggered(new string[] { "FinishedUrl" }); + } + } + public void SetFinishedMessage(string FinishedMessage) + { + if (this._finishedMessage != FinishedMessage) + { + this._finishedMessage = FinishedMessage; + UpdateTriggered(new string[] { "FinishedMessage" }); + } + } + public void SetNextScheduledTimestamp(DateTime? NextScheduledTimestamp) + { + if (this._nextScheduledTimestamp != NextScheduledTimestamp) + { + this._nextScheduledTimestamp = NextScheduledTimestamp; + UpdateTriggered(new string[] { "NextScheduledTimestamp" }); + } + } + public void Started() + { + List changedProperties = new List() { "IsRunning", "StartedTimestamp" }; + + this._startedTimestamp = DateTime.Now; + + if (this._nextScheduledTimestamp != null) + { + this._nextScheduledTimestamp = null; + changedProperties.Add("NextScheduledTimestamp"); + } + if (this._finishedTimestamp != null) + { + this._finishedTimestamp = null; + changedProperties.Add("FinishedTimestamp"); + } + if (this._progress != 0) + { + this._progress = 0; + changedProperties.Add("Progress"); + } + if (this._currentProcess != "Starting") + { + this._currentProcess = "Starting"; + changedProperties.Add("CurrentProcess"); + } + if (this._currentDescription != "Initializing Task for Execution") + { + this._currentDescription = "Initializing Task for Execution"; + changedProperties.Add("CurrentDescription"); + } + if (this._taskException != null) + { + this._taskException = null; + changedProperties.Add("TaskException"); + } + if (this._cancelSupported != this._cancelInitiallySupported) + { + this._cancelSupported = this._cancelInitiallySupported; + changedProperties.Add("CancelSupported"); + } + { + this._isCanceling = false; + changedProperties.Add("IsCanceling"); + } + if (this._isCanceling) + { + this._isCanceling = false; + changedProperties.Add("IsCanceling"); + } + UpdateTriggered(changedProperties.ToArray()); + } + public void Finished() + { + Finished(this._finishedMessage, this._finishedUrl); + } + public void Finished(string FinishedMessage, string FinishedUrl) + { + List changedProperties = new List() { "IsRunning", "FinishedTimestamp" }; + + this._finishedTimestamp = DateTime.Now; + + if (FinishedMessage != this._finishedMessage) + { + this._finishedMessage = FinishedMessage; + changedProperties.Add("FinishedMessage"); + } + if (FinishedUrl != this._finishedUrl) + { + this._finishedUrl = FinishedUrl; + changedProperties.Add("FinishedUrl"); + } + + if (this._isCanceling) + { + this._isCanceling = false; + changedProperties.Add("IsCanceling"); + } + UpdateTriggered(changedProperties.ToArray()); + } + public void Reset(DateTime? NextScheduledTimestamp) + { + List changedProperties = new List(); + + if (this._nextScheduledTimestamp != NextScheduledTimestamp) + { + this._nextScheduledTimestamp = NextScheduledTimestamp; + changedProperties.Add("NextScheduledTimestamp"); + } + + if (this._startedTimestamp != null) + { + this._startedTimestamp = null; + changedProperties.Add("StartedTimestamp"); + } + if (this._finishedTimestamp != null) + { + this._finishedTimestamp = null; + changedProperties.Add("FinishedTimestamp"); + } + if (this._finishedMessage != null) + { + this._finishedMessage = null; + changedProperties.Add("FinishedMessage"); + } + if (this._finishedUrl != null) + { + this._finishedUrl = null; + changedProperties.Add("FinishedUrl"); + } + if (this._progress != 0) + { + this._progress = 0; + changedProperties.Add("Progress"); + } + if (this._currentProcess != "Scheduled") + { + this._currentProcess = "Scheduled"; + changedProperties.Add("CurrentProcess"); + } + if (this._currentDescription != "Scheduled Task for Execution") + { + this._currentDescription = "Scheduled Task for Execution"; + changedProperties.Add("CurrentDescription"); + } + if (this._isCanceling) + { + this._isCanceling = false; + changedProperties.Add("IsCanceling"); + } + UpdateTriggered(changedProperties.ToArray()); + } + #endregion + + private void UpdateTriggered(string[] ChangedProperties) + { + this._statusVersion++; + + if (Updated != null) + Updated(this, ChangedProperties); + + if (!_isSilent) + ScheduledTasksLiveStatusService.Broadcast(ScheduledTaskStatusLive.FromScheduledTaskStatus(this, ChangedProperties)); + } + } +} diff --git a/Disco.Services/Tasks/ScheduledTaskStatusLive.cs b/Disco.Services/Tasks/ScheduledTaskStatusLive.cs index ed8ea7d3..41d826da 100644 --- a/Disco.Services/Tasks/ScheduledTaskStatusLive.cs +++ b/Disco.Services/Tasks/ScheduledTaskStatusLive.cs @@ -1,56 +1,56 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Disco.Services.Tasks -{ - public class ScheduledTaskStatusLive - { - public string TaskName { get; set; } - public string SessionId { get; set; } - - public byte Progress { get; set; } - public string CurrentProcess { get; set; } - public string CurrentDescription { get; set; } - - public string TaskExceptionMessage { get; set; } - public bool CancelSupported { get; set; } - public bool IsCancelling { get; set; } - - public bool IsRunning { get; set; } - public DateTime? StartedTimestamp { get; set; } - public DateTime? FinishedTimestamp { get; set; } - public DateTime? NextScheduledTimestamp { get; set; } - - public string FinishedMessage { get; set; } - public string FinishedUrl { get; set; } - - public int StatusVersion { get; set; } - - public string[] ChangedProperties { get; set; } - - public static ScheduledTaskStatusLive FromScheduledTaskStatus(ScheduledTaskStatus Status, string[] ChangedProperties) - { - return new ScheduledTaskStatusLive() - { - TaskName = Status.TaskName, - SessionId = Status.SessionId, - Progress = Status.Progress, - CurrentProcess = Status.CurrentProcess, - CurrentDescription = Status.CurrentDescription, - CancelSupported = Status.CancelSupported, - TaskExceptionMessage = (Status.TaskException == null ? null : Status.TaskException.Message), - IsCancelling = Status.IsCanceling, - IsRunning = Status.IsRunning, - StartedTimestamp = Status.StartedTimestamp, - FinishedTimestamp = Status.FinishedTimestamp, - NextScheduledTimestamp = Status.NextScheduledTimestamp, - FinishedMessage = Status.FinishedMessage, - FinishedUrl = Status.FinishedUrl, - StatusVersion = Status.StatusVersion, - ChangedProperties = ChangedProperties - }; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Disco.Services.Tasks +{ + public class ScheduledTaskStatusLive + { + public string TaskName { get; set; } + public string SessionId { get; set; } + + public byte Progress { get; set; } + public string CurrentProcess { get; set; } + public string CurrentDescription { get; set; } + + public string TaskExceptionMessage { get; set; } + public bool CancelSupported { get; set; } + public bool IsCancelling { get; set; } + + public bool IsRunning { get; set; } + public DateTime? StartedTimestamp { get; set; } + public DateTime? FinishedTimestamp { get; set; } + public DateTime? NextScheduledTimestamp { get; set; } + + public string FinishedMessage { get; set; } + public string FinishedUrl { get; set; } + + public int StatusVersion { get; set; } + + public string[] ChangedProperties { get; set; } + + public static ScheduledTaskStatusLive FromScheduledTaskStatus(ScheduledTaskStatus Status, string[] ChangedProperties) + { + return new ScheduledTaskStatusLive() + { + TaskName = Status.TaskName, + SessionId = Status.SessionId, + Progress = Status.Progress, + CurrentProcess = Status.CurrentProcess, + CurrentDescription = Status.CurrentDescription, + CancelSupported = Status.CancelSupported, + TaskExceptionMessage = (Status.TaskException == null ? null : Status.TaskException.Message), + IsCancelling = Status.IsCanceling, + IsRunning = Status.IsRunning, + StartedTimestamp = Status.StartedTimestamp, + FinishedTimestamp = Status.FinishedTimestamp, + NextScheduledTimestamp = Status.NextScheduledTimestamp, + FinishedMessage = Status.FinishedMessage, + FinishedUrl = Status.FinishedUrl, + StatusVersion = Status.StatusVersion, + ChangedProperties = ChangedProperties + }; + } + } +} diff --git a/Disco.Services/Tasks/ScheduledTasksLiveStatusService.cs b/Disco.Services/Tasks/ScheduledTasksLiveStatusService.cs index 1fb7d7f8..c2950cd1 100644 --- a/Disco.Services/Tasks/ScheduledTasksLiveStatusService.cs +++ b/Disco.Services/Tasks/ScheduledTasksLiveStatusService.cs @@ -1,56 +1,56 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using SignalR; -using SignalR.Hosting.AspNet; -using SignalR.Infrastructure; - -namespace Disco.Services.Tasks -{ - public class ScheduledTasksLiveStatusService : PersistentConnection - { - - protected override System.Threading.Tasks.Task OnReceivedAsync(IRequest request, string connectionId, string data) - { - // Add to Group - if (!string.IsNullOrWhiteSpace(data) && data.StartsWith("/addToGroups:") && data.Length > 13) - { - var groups = data.Substring(13).Split(','); - foreach (var g in groups) - { - this.Groups.Add(connectionId, g); - } - } - - return base.OnReceivedAsync(request, connectionId, data); - } - - internal static void Broadcast(ScheduledTaskStatusLive SessionStatus) - { - //var message = Models.LogLiveEvent.Create(logModule, eventType, Timestamp, Arguments); - - var connectionManager = GlobalHost.ConnectionManager; //AspNetHost.DependencyResolver.Resolve(); - var connectionContext = connectionManager.GetConnectionContext(); - connectionContext.Groups.Send(_GroupNameAll, SessionStatus); - connectionContext.Groups.Send(SessionStatus.SessionId, SessionStatus); - } - - private const string _GroupNameAll = "__All"; - //private static string _QualifiedSessionName = typeof(ScheduledTasksLiveStatusService).FullName + "."; - //private static string _QualifiedSessionNameAll = _QualifiedSessionName + "__All"; - //private static string LiveStatusGroup(string SessionId) - //{ - // return string.Concat(_QualifiedSessionName, SessionId); - //} - public static string LiveStatusAll - { - get - { - //return _QualifiedTypeNameAll; - return _GroupNameAll; - } - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SignalR; +using SignalR.Hosting.AspNet; +using SignalR.Infrastructure; + +namespace Disco.Services.Tasks +{ + public class ScheduledTasksLiveStatusService : PersistentConnection + { + + protected override System.Threading.Tasks.Task OnReceivedAsync(IRequest request, string connectionId, string data) + { + // Add to Group + if (!string.IsNullOrWhiteSpace(data) && data.StartsWith("/addToGroups:") && data.Length > 13) + { + var groups = data.Substring(13).Split(','); + foreach (var g in groups) + { + this.Groups.Add(connectionId, g); + } + } + + return base.OnReceivedAsync(request, connectionId, data); + } + + internal static void Broadcast(ScheduledTaskStatusLive SessionStatus) + { + //var message = Models.LogLiveEvent.Create(logModule, eventType, Timestamp, Arguments); + + var connectionManager = GlobalHost.ConnectionManager; //AspNetHost.DependencyResolver.Resolve(); + var connectionContext = connectionManager.GetConnectionContext(); + connectionContext.Groups.Send(_GroupNameAll, SessionStatus); + connectionContext.Groups.Send(SessionStatus.SessionId, SessionStatus); + } + + private const string _GroupNameAll = "__All"; + //private static string _QualifiedSessionName = typeof(ScheduledTasksLiveStatusService).FullName + "."; + //private static string _QualifiedSessionNameAll = _QualifiedSessionName + "__All"; + //private static string LiveStatusGroup(string SessionId) + //{ + // return string.Concat(_QualifiedSessionName, SessionId); + //} + public static string LiveStatusAll + { + get + { + //return _QualifiedTypeNameAll; + return _GroupNameAll; + } + } + + } +} diff --git a/Disco.Services/Tasks/ScheduledTasksLog.cs b/Disco.Services/Tasks/ScheduledTasksLog.cs index 91133787..007897e6 100644 --- a/Disco.Services/Tasks/ScheduledTasksLog.cs +++ b/Disco.Services/Tasks/ScheduledTasksLog.cs @@ -1,196 +1,196 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Disco.Services.Logging; -using Disco.Services.Logging.Models; - -namespace Disco.Services.Tasks -{ - public class ScheduledTasksLog : LogBase - { - private const int _ModuleId = 20; - - public override string ModuleDescription { get { return "Scheduled Tasks"; } } - public override int ModuleId { get { return _ModuleId; } } - public override string ModuleName { get { return "ScheduledTasks"; } } - - public enum EventTypeIds - { - InitializingScheduledTasks = 10, - InitializeException = 15, - InitializeExceptionWithInner, - InitializeScheduledTasksException, - InitializeScheduledTasksExceptionWithInner, - ScheduledTasksException = 30, - ScheduledTasksExceptionWithInner, - ScheduledTaskExecuted = 50, - ScheduledTaskFinished = 80, - } - public static ScheduledTasksLog Current - { - get - { - return (ScheduledTasksLog)LogContext.LogModules[_ModuleId]; - } - } - private static void Log(EventTypeIds EventTypeId, params object[] Args) - { - Current.Log((int)EventTypeId, Args); - } - - public static void LogInitializingScheduledTasks() - { - Current.Log((int)EventTypeIds.InitializingScheduledTasks); - } - public static void LogScheduledTaskExecuted(string TaskName, string SessionId) - { - Current.Log((int)EventTypeIds.ScheduledTaskExecuted, TaskName, SessionId); - } - public static void LogScheduledTaskFinished(string TaskName, string SessionId) - { - Current.Log((int)EventTypeIds.ScheduledTaskFinished, TaskName, SessionId); - } - - public static void LogInitializeException(Exception ex) - { - if (ex.InnerException != null) - { - Log(EventTypeIds.InitializeExceptionWithInner, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); - } - else - { - Log(EventTypeIds.InitializeException, ex.GetType().Name, ex.Message, ex.StackTrace); - } - } - public static void LogInitializeException(Exception ex, Type ScheduledTaskType) - { - if (ex.InnerException != null) - { - Log(EventTypeIds.InitializeScheduledTasksExceptionWithInner, ScheduledTaskType.Name, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); - } - else - { - Log(EventTypeIds.InitializeScheduledTasksException, ScheduledTaskType.Name, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace); - } - } - - public static void LogScheduledTaskException(string ScheduledTaskName, string SessionId, Type ScheduledTaskType, Exception ex) - { - if (ex.InnerException != null) - { - Log(EventTypeIds.ScheduledTasksExceptionWithInner, ScheduledTaskName, SessionId, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); - } - else - { - Log(EventTypeIds.ScheduledTasksException, ScheduledTaskName, SessionId, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace); - } - } - - protected override List LoadEventTypes() - { - return new System.Collections.Generic.List - { - new LogEventType - { - Id = (int)EventTypeIds.InitializingScheduledTasks, - ModuleId = _ModuleId, - Name = "Initializing Scheduled Tasks", - Format = "Starting Scheduled Task discovery and initialization", - Severity = (int)LogEventType.Severities.Information, - UseLive = false, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.InitializeException, - ModuleId = _ModuleId, - Name = "Initialize Exception", - Format = "Exception: {0}: {1}; {2}", - Severity = (int)LogEventType.Severities.Error, - UseLive = false, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.InitializeExceptionWithInner, - ModuleId = _ModuleId, - Name = "Initialize Exception with Inner Exception", - Format = "Exception: {0}: {1}; {2}; Inner: {3}: {4}; {5}", - Severity = (int)LogEventType.Severities.Error, - UseLive = false, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.InitializeScheduledTasksException, - ModuleId = _ModuleId, - Name = "Initialize Task Exception", - Format = "[{0}] At '{1}'; Exception: {2}: {3}; {4}", - Severity = (int)LogEventType.Severities.Error, - UseLive = false, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.InitializeScheduledTasksExceptionWithInner, - ModuleId = _ModuleId, - Name = "Initialize Task Exception with Inner Exception", - Format = "[{0}] At '{1}'; Exception: {2}: {3}; {4}; Inner: {5}: {6}; {7}", - Severity = (int)LogEventType.Severities.Error, - UseLive = false, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.ScheduledTasksException, - ModuleId = _ModuleId, - Name = "Scheduled Task Exception", - Format = "Task Name: {0}; SessionId: {1}; At: '{2}'; Exception: {3}: {4}; {5}", - Severity = (int)LogEventType.Severities.Error, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.ScheduledTasksExceptionWithInner, - ModuleId = _ModuleId, - Name = "Scheduled Task Exception with Inner Exception", - Format = "Task Name: {0}; SessionId: {1}; At: '{2}'; Exception: {3}: {4}; {5}; Inner: {6}: {7}; {8}", - Severity = (int)LogEventType.Severities.Error, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.ScheduledTaskExecuted, - ModuleId = _ModuleId, - Name = "Scheduled Task Started", - Format = "Scheduled Task Started: {0}; Session Id: {1}", - Severity = (int)LogEventType.Severities.Information, - UseLive = true, - UsePersist = true, - UseDisplay = true - }, - new LogEventType - { - Id = (int)EventTypeIds.ScheduledTaskFinished, - ModuleId = _ModuleId, - Name = "Scheduled Task Finished", - Format = "Scheduled Task Finished: {0}; Session Id: {1}", - Severity = (int)LogEventType.Severities.Information, - UseLive = true, - UsePersist = true, - UseDisplay = true - } - }; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Disco.Services.Logging; +using Disco.Services.Logging.Models; + +namespace Disco.Services.Tasks +{ + public class ScheduledTasksLog : LogBase + { + private const int _ModuleId = 20; + + public override string ModuleDescription { get { return "Scheduled Tasks"; } } + public override int ModuleId { get { return _ModuleId; } } + public override string ModuleName { get { return "ScheduledTasks"; } } + + public enum EventTypeIds + { + InitializingScheduledTasks = 10, + InitializeException = 15, + InitializeExceptionWithInner, + InitializeScheduledTasksException, + InitializeScheduledTasksExceptionWithInner, + ScheduledTasksException = 30, + ScheduledTasksExceptionWithInner, + ScheduledTaskExecuted = 50, + ScheduledTaskFinished = 80, + } + public static ScheduledTasksLog Current + { + get + { + return (ScheduledTasksLog)LogContext.LogModules[_ModuleId]; + } + } + private static void Log(EventTypeIds EventTypeId, params object[] Args) + { + Current.Log((int)EventTypeId, Args); + } + + public static void LogInitializingScheduledTasks() + { + Current.Log((int)EventTypeIds.InitializingScheduledTasks); + } + public static void LogScheduledTaskExecuted(string TaskName, string SessionId) + { + Current.Log((int)EventTypeIds.ScheduledTaskExecuted, TaskName, SessionId); + } + public static void LogScheduledTaskFinished(string TaskName, string SessionId) + { + Current.Log((int)EventTypeIds.ScheduledTaskFinished, TaskName, SessionId); + } + + public static void LogInitializeException(Exception ex) + { + if (ex.InnerException != null) + { + Log(EventTypeIds.InitializeExceptionWithInner, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); + } + else + { + Log(EventTypeIds.InitializeException, ex.GetType().Name, ex.Message, ex.StackTrace); + } + } + public static void LogInitializeException(Exception ex, Type ScheduledTaskType) + { + if (ex.InnerException != null) + { + Log(EventTypeIds.InitializeScheduledTasksExceptionWithInner, ScheduledTaskType.Name, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); + } + else + { + Log(EventTypeIds.InitializeScheduledTasksException, ScheduledTaskType.Name, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace); + } + } + + public static void LogScheduledTaskException(string ScheduledTaskName, string SessionId, Type ScheduledTaskType, Exception ex) + { + if (ex.InnerException != null) + { + Log(EventTypeIds.ScheduledTasksExceptionWithInner, ScheduledTaskName, SessionId, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace, ex.InnerException.GetType().Name, ex.InnerException.Message, ex.InnerException.StackTrace); + } + else + { + Log(EventTypeIds.ScheduledTasksException, ScheduledTaskName, SessionId, ScheduledTaskType.Assembly.Location, ex.GetType().Name, ex.Message, ex.StackTrace); + } + } + + protected override List LoadEventTypes() + { + return new System.Collections.Generic.List + { + new LogEventType + { + Id = (int)EventTypeIds.InitializingScheduledTasks, + ModuleId = _ModuleId, + Name = "Initializing Scheduled Tasks", + Format = "Starting Scheduled Task discovery and initialization", + Severity = (int)LogEventType.Severities.Information, + UseLive = false, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.InitializeException, + ModuleId = _ModuleId, + Name = "Initialize Exception", + Format = "Exception: {0}: {1}; {2}", + Severity = (int)LogEventType.Severities.Error, + UseLive = false, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.InitializeExceptionWithInner, + ModuleId = _ModuleId, + Name = "Initialize Exception with Inner Exception", + Format = "Exception: {0}: {1}; {2}; Inner: {3}: {4}; {5}", + Severity = (int)LogEventType.Severities.Error, + UseLive = false, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.InitializeScheduledTasksException, + ModuleId = _ModuleId, + Name = "Initialize Task Exception", + Format = "[{0}] At '{1}'; Exception: {2}: {3}; {4}", + Severity = (int)LogEventType.Severities.Error, + UseLive = false, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.InitializeScheduledTasksExceptionWithInner, + ModuleId = _ModuleId, + Name = "Initialize Task Exception with Inner Exception", + Format = "[{0}] At '{1}'; Exception: {2}: {3}; {4}; Inner: {5}: {6}; {7}", + Severity = (int)LogEventType.Severities.Error, + UseLive = false, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.ScheduledTasksException, + ModuleId = _ModuleId, + Name = "Scheduled Task Exception", + Format = "Task Name: {0}; SessionId: {1}; At: '{2}'; Exception: {3}: {4}; {5}", + Severity = (int)LogEventType.Severities.Error, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.ScheduledTasksExceptionWithInner, + ModuleId = _ModuleId, + Name = "Scheduled Task Exception with Inner Exception", + Format = "Task Name: {0}; SessionId: {1}; At: '{2}'; Exception: {3}: {4}; {5}; Inner: {6}: {7}; {8}", + Severity = (int)LogEventType.Severities.Error, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.ScheduledTaskExecuted, + ModuleId = _ModuleId, + Name = "Scheduled Task Started", + Format = "Scheduled Task Started: {0}; Session Id: {1}", + Severity = (int)LogEventType.Severities.Information, + UseLive = true, + UsePersist = true, + UseDisplay = true + }, + new LogEventType + { + Id = (int)EventTypeIds.ScheduledTaskFinished, + ModuleId = _ModuleId, + Name = "Scheduled Task Finished", + Format = "Scheduled Task Finished: {0}; Session Id: {1}", + Severity = (int)LogEventType.Severities.Information, + UseLive = true, + UsePersist = true, + UseDisplay = true + } + }; + } + } +} diff --git a/Disco.Silverlight.AttachmentUpload/App.xaml b/Disco.Silverlight.AttachmentUpload/App.xaml index ffcbba45..9ba4bcda 100644 --- a/Disco.Silverlight.AttachmentUpload/App.xaml +++ b/Disco.Silverlight.AttachmentUpload/App.xaml @@ -1,14 +1,14 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/Disco.Silverlight.AttachmentUpload/App.xaml.vb b/Disco.Silverlight.AttachmentUpload/App.xaml.vb index f6914a55..40bc5adb 100644 --- a/Disco.Silverlight.AttachmentUpload/App.xaml.vb +++ b/Disco.Silverlight.AttachmentUpload/App.xaml.vb @@ -1,37 +1,37 @@ -Partial Public Class App - Inherits Application - - Public Shared Property UploadUrl As Uri - Public Shared Property MainPage As MainPage - - Public Sub New() - InitializeComponent() - End Sub - - Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup - MainPage = New MainPage - - Me.RootVisual = MainPage - - UploadUrl = New Uri(Application.Current.Host.Source.AbsoluteUri.Substring(0, Application.Current.Host.Source.AbsoluteUri.IndexOf("/", 8)) & e.InitParams.Item("UploadUrl")) - - End Sub - - Private Sub Application_UnhandledException(ByVal sender As Object, ByVal e As ApplicationUnhandledExceptionEventArgs) Handles Me.UnhandledException - - ' If the app is running outside of the debugger then report the exception using - ' the browser's exception mechanism. On IE this will display it a yellow alert - ' icon in the status bar and Firefox will display a script error. - If Not System.Diagnostics.Debugger.IsAttached Then - - ' NOTE: This will allow the application to continue running after an exception has been thrown - ' but not handled. - ' For production applications this error handling should be replaced with something that will - ' report the error to the website and stop the application. - e.Handled = True - Dim errorWindow As ChildWindow = New ErrorWindow(e.ExceptionObject) - errorWindow.Show() - End If - End Sub - -End Class +Partial Public Class App + Inherits Application + + Public Shared Property UploadUrl As Uri + Public Shared Property MainPage As MainPage + + Public Sub New() + InitializeComponent() + End Sub + + Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup + MainPage = New MainPage + + Me.RootVisual = MainPage + + UploadUrl = New Uri(Application.Current.Host.Source.AbsoluteUri.Substring(0, Application.Current.Host.Source.AbsoluteUri.IndexOf("/", 8)) & e.InitParams.Item("UploadUrl")) + + End Sub + + Private Sub Application_UnhandledException(ByVal sender As Object, ByVal e As ApplicationUnhandledExceptionEventArgs) Handles Me.UnhandledException + + ' If the app is running outside of the debugger then report the exception using + ' the browser's exception mechanism. On IE this will display it a yellow alert + ' icon in the status bar and Firefox will display a script error. + If Not System.Diagnostics.Debugger.IsAttached Then + + ' NOTE: This will allow the application to continue running after an exception has been thrown + ' but not handled. + ' For production applications this error handling should be replaced with something that will + ' report the error to the website and stop the application. + e.Handled = True + Dim errorWindow As ChildWindow = New ErrorWindow(e.ExceptionObject) + errorWindow.Show() + End If + End Sub + +End Class diff --git a/Disco.Silverlight.AttachmentUpload/Assets/Styles.xaml b/Disco.Silverlight.AttachmentUpload/Assets/Styles.xaml index 4487c8f6..20490b71 100644 --- a/Disco.Silverlight.AttachmentUpload/Assets/Styles.xaml +++ b/Disco.Silverlight.AttachmentUpload/Assets/Styles.xaml @@ -1,350 +1,350 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Disco.Silverlight.AttachmentUpload/Disco.Silverlight.AttachmentUpload.vbproj b/Disco.Silverlight.AttachmentUpload/Disco.Silverlight.AttachmentUpload.vbproj index cc36ec39..abf9d7c6 100644 --- a/Disco.Silverlight.AttachmentUpload/Disco.Silverlight.AttachmentUpload.vbproj +++ b/Disco.Silverlight.AttachmentUpload/Disco.Silverlight.AttachmentUpload.vbproj @@ -1,196 +1,196 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {85747DDC-1389-4A40-9AFC-F57E0992294E} - {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - Library - Disco.Silverlight.AttachmentUpload - Disco.Silverlight.AttachmentUpload - Silverlight - v4.0 - $(TargetFrameworkVersion) - true - - - true - true - Disco.Silverlight.AttachmentUpload.xap - My Project\AppManifest.xml - Disco.Silverlight.AttachmentUpload.App - Disco.Silverlight.AttachmentUploadTestPage.html - true - true - false - My Project\OutOfBrowserSettings.xml - true - false - - - - - - v3.5 - - - true - full - true - true - true - true - Empty - Bin\Debug - Disco.Silverlight.AttachmentUpload.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - SILVERLIGHT=1 - - - pdbonly - false - true - true - true - true - Bin\Release - Disco.Silverlight.AttachmentUpload.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - SILVERLIGHT=1 - - - On - - - Binary - - - Off - - - On - - - - ..\..\Resources\Libraries\fastJSON\fastJSON-SL.dll - - - ..\..\Resources\Libraries\FJ.Core\FJ.Core.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Utilities.vb - - - App.xaml - - - - - MainPage.xaml - - - - FileWindow.xaml - - - ErrorWindow.xaml - - - File.xaml - - - Hidden.xaml - - - WebCam.xaml - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {85747DDC-1389-4A40-9AFC-F57E0992294E} + {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} + Library + Disco.Silverlight.AttachmentUpload + Disco.Silverlight.AttachmentUpload + Silverlight + v4.0 + $(TargetFrameworkVersion) + true + + + true + true + Disco.Silverlight.AttachmentUpload.xap + My Project\AppManifest.xml + Disco.Silverlight.AttachmentUpload.App + Disco.Silverlight.AttachmentUploadTestPage.html + true + true + false + My Project\OutOfBrowserSettings.xml + true + false + + + + + + v3.5 + + + true + full + true + true + true + true + Empty + Bin\Debug + Disco.Silverlight.AttachmentUpload.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + SILVERLIGHT=1 + + + pdbonly + false + true + true + true + true + Bin\Release + Disco.Silverlight.AttachmentUpload.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + SILVERLIGHT=1 + + + On + + + Binary + + + Off + + + On + + + + ..\..\Resources\Libraries\fastJSON\fastJSON-SL.dll + + + ..\..\Resources\Libraries\FJ.Core\FJ.Core.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Utilities.vb + + + App.xaml + + + + + MainPage.xaml + + + + FileWindow.xaml + + + ErrorWindow.xaml + + + File.xaml + + + Hidden.xaml + + + WebCam.xaml + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Disco.Silverlight.AttachmentUpload/FileUploader.vb b/Disco.Silverlight.AttachmentUpload/FileUploader.vb index 091bd17e..3693e52f 100644 --- a/Disco.Silverlight.AttachmentUpload/FileUploader.vb +++ b/Disco.Silverlight.AttachmentUpload/FileUploader.vb @@ -1,77 +1,77 @@ -Imports System.Text -Imports Disco.Silverlight.AttachmentUpload.BI - -Public Class FileUploader - - Public Property Url As Uri - Public Property Stream As IO.Stream - Public Property StreamFilename As String - Public Property StreamMimeType As String - Public Property Form As Dictionary(Of String, String) - - Private _HttpSend As HttpWebRequest - Private _UploadBoundaryValue As String - - Private _Complete As UploadComplete - - Public Delegate Sub UploadComplete(Sender As FileUploader, Success As Boolean, Id As Integer) - - Public Sub New(Url As Uri, Stream As IO.Stream, StreamFilename As String, StreamMimeType As String, Form As Dictionary(Of String, String), Optional Complete As UploadComplete = Nothing) - Me.Url = Url - Me.Stream = Stream - Me.StreamFilename = StreamFilename - Me.StreamMimeType = StreamMimeType - Me.Form = Form - Me._Complete = Complete - - Start() - End Sub - - Public Sub Start() - Stream.Position = 0 - Me._HttpSend = WebRequest.Create(App.UploadUrl) - Me._UploadBoundaryValue = ("----------------------------" & DateTime.Now.Ticks.ToString("x")) - Me._HttpSend.ContentType = "multipart/form-data; boundary=" & Me._UploadBoundaryValue - Me._HttpSend.Method = "POST" - Me._HttpSend.BeginGetRequestStream(New AsyncCallback(AddressOf Me.BeginSendRequest), Nothing) - End Sub - - Private Sub BeginSendRequest(ByVal result As IAsyncResult) - Using requestStream As IO.Stream = _HttpSend.EndGetRequestStream(result) - Dim format As String = ("{0}--" & _UploadBoundaryValue & "{0}Content-Disposition: form-data; name=""{1}"";{0}{0}{2}") - Dim pair As KeyValuePair(Of String, String) - For Each pair In Form - Dim str4 As String = String.Format(format, Environment.NewLine, pair.Key, pair.Value) - Dim buffer3 As Byte() = Encoding.UTF8.GetBytes(str4) - requestStream.Write(buffer3, 0, buffer3.Length) - Next - Dim s As String = String.Format(("{0}--" & _UploadBoundaryValue & "{0}Content-Disposition: form-data; name=""{1}""; filename=""{2}""{0}Content-Type: {3}{0}{0}"), Environment.NewLine, "File", Me.StreamFilename, Me.StreamMimeType) - Dim bytes As Byte() = Encoding.UTF8.GetBytes(s) - requestStream.Write(bytes, 0, bytes.Length) - Me.Stream.CopyTo(requestStream) - Me.Stream.Close() - Me.Stream.Dispose() - Dim buffer As Byte() = Encoding.UTF8.GetBytes(String.Format("{0}--{1}{0}", Environment.NewLine, Me._UploadBoundaryValue)) - requestStream.Write(buffer, 0, buffer.Length) - requestStream.Flush() - requestStream.Close() - End Using - _HttpSend.BeginGetResponse(New AsyncCallback(AddressOf Me.BeginGetResponse), Nothing) - End Sub - - Private Sub BeginGetResponse(ByVal result As IAsyncResult) - Dim response As HttpWebResponse = _HttpSend.EndGetResponse(result) - - Dim responseId As Integer = -1 - - If response.StatusCode = 200 Then - Dim responseString = response.GetResponseStream.StreamToString() - Integer.TryParse(responseString, responseId) - End If - - If _Complete IsNot Nothing Then - _Complete.Invoke(Me, (response.StatusCode = 200), responseId) - End If - End Sub - -End Class +Imports System.Text +Imports Disco.Silverlight.AttachmentUpload.BI + +Public Class FileUploader + + Public Property Url As Uri + Public Property Stream As IO.Stream + Public Property StreamFilename As String + Public Property StreamMimeType As String + Public Property Form As Dictionary(Of String, String) + + Private _HttpSend As HttpWebRequest + Private _UploadBoundaryValue As String + + Private _Complete As UploadComplete + + Public Delegate Sub UploadComplete(Sender As FileUploader, Success As Boolean, Id As Integer) + + Public Sub New(Url As Uri, Stream As IO.Stream, StreamFilename As String, StreamMimeType As String, Form As Dictionary(Of String, String), Optional Complete As UploadComplete = Nothing) + Me.Url = Url + Me.Stream = Stream + Me.StreamFilename = StreamFilename + Me.StreamMimeType = StreamMimeType + Me.Form = Form + Me._Complete = Complete + + Start() + End Sub + + Public Sub Start() + Stream.Position = 0 + Me._HttpSend = WebRequest.Create(App.UploadUrl) + Me._UploadBoundaryValue = ("----------------------------" & DateTime.Now.Ticks.ToString("x")) + Me._HttpSend.ContentType = "multipart/form-data; boundary=" & Me._UploadBoundaryValue + Me._HttpSend.Method = "POST" + Me._HttpSend.BeginGetRequestStream(New AsyncCallback(AddressOf Me.BeginSendRequest), Nothing) + End Sub + + Private Sub BeginSendRequest(ByVal result As IAsyncResult) + Using requestStream As IO.Stream = _HttpSend.EndGetRequestStream(result) + Dim format As String = ("{0}--" & _UploadBoundaryValue & "{0}Content-Disposition: form-data; name=""{1}"";{0}{0}{2}") + Dim pair As KeyValuePair(Of String, String) + For Each pair In Form + Dim str4 As String = String.Format(format, Environment.NewLine, pair.Key, pair.Value) + Dim buffer3 As Byte() = Encoding.UTF8.GetBytes(str4) + requestStream.Write(buffer3, 0, buffer3.Length) + Next + Dim s As String = String.Format(("{0}--" & _UploadBoundaryValue & "{0}Content-Disposition: form-data; name=""{1}""; filename=""{2}""{0}Content-Type: {3}{0}{0}"), Environment.NewLine, "File", Me.StreamFilename, Me.StreamMimeType) + Dim bytes As Byte() = Encoding.UTF8.GetBytes(s) + requestStream.Write(bytes, 0, bytes.Length) + Me.Stream.CopyTo(requestStream) + Me.Stream.Close() + Me.Stream.Dispose() + Dim buffer As Byte() = Encoding.UTF8.GetBytes(String.Format("{0}--{1}{0}", Environment.NewLine, Me._UploadBoundaryValue)) + requestStream.Write(buffer, 0, buffer.Length) + requestStream.Flush() + requestStream.Close() + End Using + _HttpSend.BeginGetResponse(New AsyncCallback(AddressOf Me.BeginGetResponse), Nothing) + End Sub + + Private Sub BeginGetResponse(ByVal result As IAsyncResult) + Dim response As HttpWebResponse = _HttpSend.EndGetResponse(result) + + Dim responseId As Integer = -1 + + If response.StatusCode = 200 Then + Dim responseString = response.GetResponseStream.StreamToString() + Integer.TryParse(responseString, responseId) + End If + + If _Complete IsNot Nothing Then + _Complete.Invoke(Me, (response.StatusCode = 200), responseId) + End If + End Sub + +End Class diff --git a/Disco.Silverlight.AttachmentUpload/JavascriptNavigator.vb b/Disco.Silverlight.AttachmentUpload/JavascriptNavigator.vb index ca61333d..82767946 100644 --- a/Disco.Silverlight.AttachmentUpload/JavascriptNavigator.vb +++ b/Disco.Silverlight.AttachmentUpload/JavascriptNavigator.vb @@ -1,24 +1,24 @@ -Imports System.Windows.Browser - - -Public Class JavascriptNavigator - - Private _contentFrame As Controls.Frame - - Public Sub New(contentFrame As Controls.Frame) - _contentFrame = contentFrame - End Sub - - - Public Sub Navigate(uri As String) - _contentFrame.Navigate(New Uri(uri, UriKind.Relative)) - End Sub - - - Public ReadOnly Property Location As String - Get - Return _contentFrame.Source.ToString - End Get - End Property - -End Class +Imports System.Windows.Browser + + +Public Class JavascriptNavigator + + Private _contentFrame As Controls.Frame + + Public Sub New(contentFrame As Controls.Frame) + _contentFrame = contentFrame + End Sub + + + Public Sub Navigate(uri As String) + _contentFrame.Navigate(New Uri(uri, UriKind.Relative)) + End Sub + + + Public ReadOnly Property Location As String + Get + Return _contentFrame.Source.ToString + End Get + End Property + +End Class diff --git a/Disco.Silverlight.AttachmentUpload/MainPage.xaml b/Disco.Silverlight.AttachmentUpload/MainPage.xaml index d7a0ff47..416b0e84 100644 --- a/Disco.Silverlight.AttachmentUpload/MainPage.xaml +++ b/Disco.Silverlight.AttachmentUpload/MainPage.xaml @@ -1,37 +1,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Disco.Silverlight.AttachmentUpload/MainPage.xaml.vb b/Disco.Silverlight.AttachmentUpload/MainPage.xaml.vb index e6900a89..a54a03a3 100644 --- a/Disco.Silverlight.AttachmentUpload/MainPage.xaml.vb +++ b/Disco.Silverlight.AttachmentUpload/MainPage.xaml.vb @@ -1,60 +1,60 @@ -Imports System.Windows.Navigation -Imports System.Windows.Browser - -Partial Public Class MainPage - Inherits UserControl - - Private _Navigator As JavascriptNavigator - - Private _UploadingAttachments As New List(Of FileUploader) - - Public Sub New() - InitializeComponent() - - _Navigator = New JavascriptNavigator(Me.ContentFrame) - HtmlPage.RegisterScriptableObject("Navigator", _Navigator) - End Sub - - Private Sub ContentFrame_NavigationFailed(ByVal sender As Object, ByVal e As NavigationFailedEventArgs) Handles ContentFrame.NavigationFailed - e.Handled = True - Dim errorWindow As ChildWindow = New ErrorWindow(e.Uri) - errorWindow.Show() - End Sub - - Public Sub UploadAttachment(stream As IO.Stream, fileName As String, mimeType As String, comments As String) - - Dim form As New Dictionary(Of String, String) - form.Add("comments", comments) - - Dim ua As New FileUploader(App.UploadUrl, stream, fileName, mimeType, form, New FileUploader.UploadComplete(AddressOf UploadComplete)) - - _UploadingAttachments.Add(ua) - - 'Me.NavigationGrid.Visibility = Windows.Visibility.Visible - - End Sub - - Private Sub UploadComplete(Sender As FileUploader, Success As Boolean, Id As Integer) - If _UploadingAttachments.Contains(Sender) Then - _UploadingAttachments.Remove(Sender) - End If - - 'If _UploadingAttachments.Count = 0 Then - ' Me.Dispatcher.BeginInvoke(Function() - ' Me.NavigationGrid.Visibility = Windows.Visibility.Collapsed - ' Return Nothing - ' End Function) - 'End If - - If Id >= 0 Then - Me.Dispatcher.BeginInvoke(Function() - Dim discoFunctions = System.Windows.Browser.HtmlPage.Document.GetProperty("DiscoFunctions") - If discoFunctions IsNot Nothing Then - discoFunctions.addAttachment(Id) - End If - Return (Nothing) - End Function) - End If - End Sub - +Imports System.Windows.Navigation +Imports System.Windows.Browser + +Partial Public Class MainPage + Inherits UserControl + + Private _Navigator As JavascriptNavigator + + Private _UploadingAttachments As New List(Of FileUploader) + + Public Sub New() + InitializeComponent() + + _Navigator = New JavascriptNavigator(Me.ContentFrame) + HtmlPage.RegisterScriptableObject("Navigator", _Navigator) + End Sub + + Private Sub ContentFrame_NavigationFailed(ByVal sender As Object, ByVal e As NavigationFailedEventArgs) Handles ContentFrame.NavigationFailed + e.Handled = True + Dim errorWindow As ChildWindow = New ErrorWindow(e.Uri) + errorWindow.Show() + End Sub + + Public Sub UploadAttachment(stream As IO.Stream, fileName As String, mimeType As String, comments As String) + + Dim form As New Dictionary(Of String, String) + form.Add("comments", comments) + + Dim ua As New FileUploader(App.UploadUrl, stream, fileName, mimeType, form, New FileUploader.UploadComplete(AddressOf UploadComplete)) + + _UploadingAttachments.Add(ua) + + 'Me.NavigationGrid.Visibility = Windows.Visibility.Visible + + End Sub + + Private Sub UploadComplete(Sender As FileUploader, Success As Boolean, Id As Integer) + If _UploadingAttachments.Contains(Sender) Then + _UploadingAttachments.Remove(Sender) + End If + + 'If _UploadingAttachments.Count = 0 Then + ' Me.Dispatcher.BeginInvoke(Function() + ' Me.NavigationGrid.Visibility = Windows.Visibility.Collapsed + ' Return Nothing + ' End Function) + 'End If + + If Id >= 0 Then + Me.Dispatcher.BeginInvoke(Function() + Dim discoFunctions = System.Windows.Browser.HtmlPage.Document.GetProperty("DiscoFunctions") + If discoFunctions IsNot Nothing Then + discoFunctions.addAttachment(Id) + End If + Return (Nothing) + End Function) + End If + End Sub + End Class \ No newline at end of file diff --git a/Disco.Silverlight.AttachmentUpload/My Project/AppManifest.xml b/Disco.Silverlight.AttachmentUpload/My Project/AppManifest.xml index 41e2af64..1370dcae 100644 --- a/Disco.Silverlight.AttachmentUpload/My Project/AppManifest.xml +++ b/Disco.Silverlight.AttachmentUpload/My Project/AppManifest.xml @@ -1,7 +1,7 @@ - - - - - + + + + + diff --git a/Disco.Silverlight.AttachmentUpload/My Project/AssemblyInfo.vb b/Disco.Silverlight.AttachmentUpload/My Project/AssemblyInfo.vb index 86ccdb53..70e2dc4e 100644 --- a/Disco.Silverlight.AttachmentUpload/My Project/AssemblyInfo.vb +++ b/Disco.Silverlight.AttachmentUpload/My Project/AssemblyInfo.vb @@ -1,34 +1,34 @@ -Imports System -Imports System.Reflection -Imports System.Runtime.InteropServices - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - -' Review the values of the assembly attributes - - - - - - - - - -'The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' - - - +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' + + + diff --git a/Disco.Silverlight.AttachmentUpload/Views/ErrorWindow.xaml b/Disco.Silverlight.AttachmentUpload/Views/ErrorWindow.xaml index 26321cf2..96f06c46 100644 --- a/Disco.Silverlight.AttachmentUpload/Views/ErrorWindow.xaml +++ b/Disco.Silverlight.AttachmentUpload/Views/ErrorWindow.xaml @@ -1,34 +1,34 @@ - - - - - - - - - - - - - - - - - - - -
");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="Get Microsoft Silverlight";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+" \n";a+="Message: "+b.ErrorMessage+" \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+" \n";a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}a+="MethodName: "+b.methodName+" \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c} +///#source 1 1 /ClientSource/Scripts/Modules/Silverlight/Silverlight.js +//v2.0.30511.0 +if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(b){if(b==undefined)b=null;var a=false,m=null;try{var i=null,j=false;if(window.ActiveXObject)try{i=new ActiveXObject("AgControl.AgControl");if(b===null)a=true;else if(i.IsVersionSupported(b))a=true;i=null}catch(l){j=true}else j=true;if(j){var k=navigator.plugins["Silverlight Plug-In"];if(k)if(b===null)a=true;else{var h=k.description;if(h==="1.0.30226.2")h="2.0.30226.2";var c=h.split(".");while(c.length>3)c.pop();while(c.length<4)c.push(0);var e=b.split(".");while(e.length>4)e.pop();var d,g,f=0;do{d=parseInt(e[f]);g=parseInt(c[f]);f++}while(f");delete a.id;delete a.width;delete a.height;for(var c in a)if(a[c])b.push('');b.push("
");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="Get Microsoft Silverlight";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+" \n";a+="Message: "+b.ErrorMessage+" \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+" \n";a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}a+="MethodName: "+b.methodName+" \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c} diff --git a/Disco.Web/ClientSource/Scripts/Modules/Silverlight.js.bundle b/Disco.Web/ClientSource/Scripts/Modules/Silverlight.js.bundle index 116256c9..7118be36 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Silverlight.js.bundle +++ b/Disco.Web/ClientSource/Scripts/Modules/Silverlight.js.bundle @@ -1,4 +1,4 @@ - - - /ClientSource/Scripts/Modules/Silverlight/Silverlight.js + + + /ClientSource/Scripts/Modules/Silverlight/Silverlight.js \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Silverlight.min.js b/Disco.Web/ClientSource/Scripts/Modules/Silverlight.min.js index 21df4fb0..aa609886 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Silverlight.min.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Silverlight.min.js @@ -1,2 +1,2 @@ -window.Silverlight||(window.Silverlight={}),Silverlight._silverlightCount=0,Silverlight.__onSilverlightInstalledCalled=!1,Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=",Silverlight.__installationEventFired=!1,Silverlight.onGetSilverlight=null,Silverlight.onSilverlightInstalled=function(){window.location.reload(!1)},Silverlight.isInstalled=function(n){var t,l,f,e,h,o,i,r,s,c,u;n==undefined&&(n=null),t=!1,l=null;try{if(f=null,e=!1,window.ActiveXObject)try{f=new ActiveXObject("AgControl.AgControl"),n===null?t=!0:f.IsVersionSupported(n)&&(t=!0),f=null}catch(a){e=!0}else e=!0;if(e&&(h=navigator.plugins["Silverlight Plug-In"],h))if(n===null)t=!0;else{for(o=h.description,o==="1.0.30226.2"&&(o="2.0.30226.2"),i=o.split(".");i.length>3;)i.pop();while(i.length<4)i.push(0);for(r=n.split(".");r.length>4;)r.pop();u=0;do s=parseInt(r[u]),c=parseInt(i[u]),u++;while(u"),delete n.id,delete n.width,delete n.height;for(i in n)n[i]&&t.push('');return t.push("<\/object>"),t.join("")},Silverlight.createObjectEx=function(n){var t=n,i=Silverlight.createObject(t.source,t.parentElement,t.id,t.properties,t.events,t.initParams,t.context);if(t.parentElement==null)return i},Silverlight.buildPromptHTML=function(n){var t="",r=Silverlight.fwlinkRoot,i=n.version;return n.alt?t=n.alt:(i||(i=""),t="Get Microsoft Silverlight<\/a>",t=t.replace("{1}",i),t=t.replace("{2}",r+"108181")),t},Silverlight.getSilverlight=function(n){var i,t,r,u;Silverlight.onGetSilverlight&&Silverlight.onGetSilverlight(),i="",t=String(n).split("."),t.length>1&&(r=parseInt(t[0]),i=isNaN(r)||r<2?"1.0":t[0]+"."+t[1]),u="",i.match(/^\d+\056\d+$/)&&(u="&v="+i),Silverlight.followFWLink("149156"+u)},Silverlight.followFWLink=function(n){top.location=Silverlight.fwlinkRoot+String(n)},Silverlight.HtmlAttributeEncode=function(n){var t,i="",r;if(n==null)return null;for(r=0;r96&&t<123||t>64&&t<91||t>43&&t<58&&t!=47||t==95?i+String.fromCharCode(t):i+"&#"+t+";";return i},Silverlight.default_error_handler=function(n,t){var u,r=t.ErrorType,i;u=t.ErrorCode,i="\nSilverlight error message \n",i+="ErrorCode: "+u+"\n",i+="ErrorType: "+r+" \n",i+="Message: "+t.ErrorMessage+" \n",r=="ParserError"?(i+="XamlFile: "+t.xamlFile+" \n",i+="Line: "+t.lineNumber+" \n",i+="Position: "+t.charPosition+" \n"):r=="RuntimeError"&&(t.lineNumber!=0&&(i+="Line: "+t.lineNumber+" \n",i+="Position: "+t.charPosition+" \n"),i+="MethodName: "+t.methodName+" \n"),alert(i)},Silverlight.__cleanup=function(){for(var n=Silverlight._silverlightCount-1;n>=0;n--)window["__slEvent"+n]=null;Silverlight._silverlightCount=0,window.removeEventListener?window.removeEventListener("unload",Silverlight.__cleanup,!1):window.detachEvent("onunload",Silverlight.__cleanup)},Silverlight.__getHandlerName=function(n){var t="",i;return typeof n=="string"?t=n:typeof n=="function"?(Silverlight._silverlightCount==0&&(window.addEventListener?window.addEventListener("onunload",Silverlight.__cleanup,!1):window.attachEvent("onunload",Silverlight.__cleanup)),i=Silverlight._silverlightCount++,t="__slEvent"+i,window[t]=n):t=null,t},Silverlight.onRequiredVersionAvailable=function(){},Silverlight.onRestartRequired=function(){},Silverlight.onUpgradeRequired=function(){},Silverlight.onInstallRequired=function(){},Silverlight.IsVersionAvailableOnError=function(n,t){var i=!1;try{t.ErrorCode!=8001||Silverlight.__installationEventFired?t.ErrorCode!=8002||Silverlight.__installationEventFired?t.ErrorCode==5014||t.ErrorCode==2106?Silverlight.__verifySilverlight2UpgradeSuccess(t.getHost())&&(i=!0):i=!0:(Silverlight.onRestartRequired(),Silverlight.__installationEventFired=!0):(Silverlight.onUpgradeRequired(),Silverlight.__installationEventFired=!0)}catch(r){}return i},Silverlight.IsVersionAvailableOnLoad=function(n){var t=!1;try{Silverlight.__verifySilverlight2UpgradeSuccess(n.getHost())&&(t=!0)}catch(i){}return t},Silverlight.__verifySilverlight2UpgradeSuccess=function(n){var i=!1,r="2.0.31005",t=null;try{n.IsVersionSupported(r+".99")?(t=Silverlight.onRequiredVersionAvailable,i=!0):t=n.IsVersionSupported(r+".0")?Silverlight.onRestartRequired:Silverlight.onUpgradeRequired,t&&!Silverlight.__installationEventFired&&(t(),Silverlight.__installationEventFired=!0)}catch(u){}return i}; +window.Silverlight||(window.Silverlight={}),Silverlight._silverlightCount=0,Silverlight.__onSilverlightInstalledCalled=!1,Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=",Silverlight.__installationEventFired=!1,Silverlight.onGetSilverlight=null,Silverlight.onSilverlightInstalled=function(){window.location.reload(!1)},Silverlight.isInstalled=function(n){var t,l,f,e,h,o,i,r,s,c,u;n==undefined&&(n=null),t=!1,l=null;try{if(f=null,e=!1,window.ActiveXObject)try{f=new ActiveXObject("AgControl.AgControl"),n===null?t=!0:f.IsVersionSupported(n)&&(t=!0),f=null}catch(a){e=!0}else e=!0;if(e&&(h=navigator.plugins["Silverlight Plug-In"],h))if(n===null)t=!0;else{for(o=h.description,o==="1.0.30226.2"&&(o="2.0.30226.2"),i=o.split(".");i.length>3;)i.pop();while(i.length<4)i.push(0);for(r=n.split(".");r.length>4;)r.pop();u=0;do s=parseInt(r[u]),c=parseInt(i[u]),u++;while(u"),delete n.id,delete n.width,delete n.height;for(i in n)n[i]&&t.push('');return t.push("<\/object>"),t.join("")},Silverlight.createObjectEx=function(n){var t=n,i=Silverlight.createObject(t.source,t.parentElement,t.id,t.properties,t.events,t.initParams,t.context);if(t.parentElement==null)return i},Silverlight.buildPromptHTML=function(n){var t="",r=Silverlight.fwlinkRoot,i=n.version;return n.alt?t=n.alt:(i||(i=""),t="Get Microsoft Silverlight<\/a>",t=t.replace("{1}",i),t=t.replace("{2}",r+"108181")),t},Silverlight.getSilverlight=function(n){var i,t,r,u;Silverlight.onGetSilverlight&&Silverlight.onGetSilverlight(),i="",t=String(n).split("."),t.length>1&&(r=parseInt(t[0]),i=isNaN(r)||r<2?"1.0":t[0]+"."+t[1]),u="",i.match(/^\d+\056\d+$/)&&(u="&v="+i),Silverlight.followFWLink("149156"+u)},Silverlight.followFWLink=function(n){top.location=Silverlight.fwlinkRoot+String(n)},Silverlight.HtmlAttributeEncode=function(n){var t,i="",r;if(n==null)return null;for(r=0;r96&&t<123||t>64&&t<91||t>43&&t<58&&t!=47||t==95?i+String.fromCharCode(t):i+"&#"+t+";";return i},Silverlight.default_error_handler=function(n,t){var u,r=t.ErrorType,i;u=t.ErrorCode,i="\nSilverlight error message \n",i+="ErrorCode: "+u+"\n",i+="ErrorType: "+r+" \n",i+="Message: "+t.ErrorMessage+" \n",r=="ParserError"?(i+="XamlFile: "+t.xamlFile+" \n",i+="Line: "+t.lineNumber+" \n",i+="Position: "+t.charPosition+" \n"):r=="RuntimeError"&&(t.lineNumber!=0&&(i+="Line: "+t.lineNumber+" \n",i+="Position: "+t.charPosition+" \n"),i+="MethodName: "+t.methodName+" \n"),alert(i)},Silverlight.__cleanup=function(){for(var n=Silverlight._silverlightCount-1;n>=0;n--)window["__slEvent"+n]=null;Silverlight._silverlightCount=0,window.removeEventListener?window.removeEventListener("unload",Silverlight.__cleanup,!1):window.detachEvent("onunload",Silverlight.__cleanup)},Silverlight.__getHandlerName=function(n){var t="",i;return typeof n=="string"?t=n:typeof n=="function"?(Silverlight._silverlightCount==0&&(window.addEventListener?window.addEventListener("onunload",Silverlight.__cleanup,!1):window.attachEvent("onunload",Silverlight.__cleanup)),i=Silverlight._silverlightCount++,t="__slEvent"+i,window[t]=n):t=null,t},Silverlight.onRequiredVersionAvailable=function(){},Silverlight.onRestartRequired=function(){},Silverlight.onUpgradeRequired=function(){},Silverlight.onInstallRequired=function(){},Silverlight.IsVersionAvailableOnError=function(n,t){var i=!1;try{t.ErrorCode!=8001||Silverlight.__installationEventFired?t.ErrorCode!=8002||Silverlight.__installationEventFired?t.ErrorCode==5014||t.ErrorCode==2106?Silverlight.__verifySilverlight2UpgradeSuccess(t.getHost())&&(i=!0):i=!0:(Silverlight.onRestartRequired(),Silverlight.__installationEventFired=!0):(Silverlight.onUpgradeRequired(),Silverlight.__installationEventFired=!0)}catch(r){}return i},Silverlight.IsVersionAvailableOnLoad=function(n){var t=!1;try{Silverlight.__verifySilverlight2UpgradeSuccess(n.getHost())&&(t=!0)}catch(i){}return t},Silverlight.__verifySilverlight2UpgradeSuccess=function(n){var i=!1,r="2.0.31005",t=null;try{n.IsVersionSupported(r+".99")?(t=Silverlight.onRequiredVersionAvailable,i=!0):t=n.IsVersionSupported(r+".0")?Silverlight.onRestartRequired:Silverlight.onUpgradeRequired,t&&!Silverlight.__installationEventFired&&(t(),Silverlight.__installationEventFired=!0)}catch(u){}return i}; //@ sourceMappingURL=Silverlight.min.js.map \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Silverlight.min.js.map b/Disco.Web/ClientSource/Scripts/Modules/Silverlight.min.js.map index ca247695..3cdef4fa 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Silverlight.min.js.map +++ b/Disco.Web/ClientSource/Scripts/Modules/Silverlight.min.js.map @@ -1,8 +1,8 @@ -{ -"version":3, -"file":"Silverlight.min.js", -"lineCount":1, -"mappings":"AACIA,MAAMC,Y,GAAaD,MAAMC,YAAY,CAAC,CAAA,EAAE,CAACA,WAAWC,kBAAkB,CAAC,CAAC,CAACD,WAAWE,+BAA+B,CAAC,CAAA,CAAK,CAACF,WAAWG,WAAW,CAAC,0CAA0C,CAACH,WAAWI,yBAAyB,CAAC,CAAA,CAAK,CAACJ,WAAWK,iBAAiB,CAAC,IAAI,CAACL,WAAWM,uBAAuB,CAACC,QAAQ,CAAA,CAAE,CAACR,MAAMS,SAASC,OAAO,CAAC,CAAA,CAAD,CAAvB,CAA+B,CAACT,WAAWU,YAAY,CAACC,QAAQ,CAACC,CAAD,CAAG,CAAwB,IAAIC,EAAQC,EAAeC,EAAOC,EAAsLC,EAA4EC,EAAyDC,EAAuEC,EAA4CC,EAAEC,EAAEC,CAAlc,CAAtCX,CAAC,EAAEY,S,GAAUZ,CAAC,CAAC,KAAI,CAAKC,CAAC,CAAC,CAAA,C,CAAMC,CAAC,CAAC,I,CAAK,GAAG,CAAoB,GAAfC,CAAC,CAAC,I,CAAKC,CAAC,CAAC,CAAA,C,CAASjB,MAAM0B,eAAe,GAAG,CAACV,CAAC,CAAC,IAAIU,aAAa,CAAC,qBAAD,CAAuB,CAAIb,CAAC,GAAG,IAAP,CAAYC,CAAC,CAAC,CAAA,CAAd,CAA2BE,CAACW,mBAAmB,CAACd,CAAD,C,GAAIC,CAAC,CAAC,CAAA,E,CAAKE,CAAC,CAAC,IAAxG,CAAmH,MAAAY,EAAE,CAACX,CAAC,CAAC,CAAA,CAAH,CAAQ,KAAKA,CAAC,CAAC,CAAA,CAAI,CAAC,GAAGA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,CAAA,CAAV,C,GAAc5G,CAAC,CAAC,CAAA,EAA1G,CAAoHA,CAAC,CAAC,CAAA,CAAlQ,EAA6DZ,WAAW+C,kBAAkB,CAAA,CAAE,CAAC/C,WAAWI,yBAAyB,CAAC,CAAA,EAA9Q,EAA6DJ,WAAW6C,kBAAkB,CAAA,CAAE,CAAC7C,WAAWI,yBAAyB,CAAC,CAAA,EAAnI,CAA0Z,MAAAe,IAAI,OAAOP,CAArb,CAAub,CAACZ,WAAWyH,yBAAyB,CAACC,QAAQ,CAAC9G,CAAD,CAAG,CAAC,IAAIC,EAAE,CAAA,CAAK,CAAC,GAAG,CAAIb,WAAWuH,mCAAmC,CAAC3G,CAAC4G,QAAQ,CAAA,CAAV,C,GAAc3G,CAAC,CAAC,CAAA,EAAlE,CAA6E,MAAAM,IAAI,OAAON,CAAxG,CAA0G,CAACb,WAAWuH,mCAAmC,CAACI,QAAQ,CAACtG,CAAD,CAAG,CAAC,IAAIF,EAAE,CAAA,EAAMP,EAAE,YAAYC,EAAE,IAAI,CAAC,GAAG,CAAIQ,CAACK,mBAAmB,CAACd,CAAC,CAAC,KAAH,CAAvB,EAAkCC,CAAC,CAACb,WAAWgH,2BAA2B,CAAC7F,CAAC,CAAC,CAAA,EAA7E,CAAuHN,CAAC,CAA9BQ,CAACK,mBAAmB,CAACd,CAAC,CAAC,IAAH,CAAvB,CAAkCZ,WAAW+C,kBAA7C,CAAuE/C,WAAW6C,kB,CAAsBhC,CAAC,EAAE,CAACb,WAAWI,yB,GAA2BS,CAAC,CAAA,CAAE,CAACb,WAAWI,yBAAyB,CAAC,CAAA,EAAnR,CAA+R,MAAAgB,IAAI,OAAOD,CAA/U,C", -"sources":["/ClientSource/Scripts/Modules/Silverlight/Silverlight.js"], -"names":["window","Silverlight","_silverlightCount","__onSilverlightInstalledCalled","fwlinkRoot","__installationEventFired","onGetSilverlight","onSilverlightInstalled","Silverlight.onSilverlightInstalled","location","reload","isInstalled","Silverlight.isInstalled","b","a","m","i","j","k","h","c","e","d","g","f","undefined","ActiveXObject","IsVersionSupported","l","navigator","plugins","description","split","length","pop","push","parseInt","isNaN","WaitForInstallCompletion","Silverlight.WaitForInstallCompletion","isBrowserRestartRequired","refresh","setTimeout","__startup","Silverlight.__startup","mimeTypes","onUpgradeRequired","enabledPlugin","onRestartRequired","onInstallRequired","disableAutoStartup","removeEventListener","detachEvent","addEventListener","attachEvent","createObject","Silverlight.createObject","version","source","alt","initParams","isWindowless","windowless","framerate","maxFramerate","id","ignoreBrowserVer","inplaceInstallPrompt","data","src","document","getElementById","__getHandlerName","slPluginHTML","buildHTML","buildPromptHTML","innerHTML","Silverlight.buildHTML","HtmlAttributeEncode","width","height","join","createObjectEx","Silverlight.createObjectEx","parentElement","properties","events","context","Silverlight.buildPromptHTML","replace","getSilverlight","Silverlight.getSilverlight","String","match","followFWLink","Silverlight.followFWLink","top","Silverlight.HtmlAttributeEncode","charCodeAt","fromCharCode","default_error_handler","Silverlight.default_error_handler","ErrorType","ErrorCode","ErrorMessage","xamlFile","lineNumber","charPosition","methodName","alert","__cleanup","Silverlight.__cleanup","Silverlight.__getHandlerName","onRequiredVersionAvailable","Silverlight.onRequiredVersionAvailable","Silverlight.onRestartRequired","Silverlight.onUpgradeRequired","Silverlight.onInstallRequired","IsVersionAvailableOnError","Silverlight.IsVersionAvailableOnError","__verifySilverlight2UpgradeSuccess","getHost","IsVersionAvailableOnLoad","Silverlight.IsVersionAvailableOnLoad","Silverlight.__verifySilverlight2UpgradeSuccess"] -} +{ +"version":3, +"file":"Silverlight.min.js", +"lineCount":1, +"mappings":"AACIA,MAAMC,Y,GAAaD,MAAMC,YAAY,CAAC,CAAA,EAAE,CAACA,WAAWC,kBAAkB,CAAC,CAAC,CAACD,WAAWE,+BAA+B,CAAC,CAAA,CAAK,CAACF,WAAWG,WAAW,CAAC,0CAA0C,CAACH,WAAWI,yBAAyB,CAAC,CAAA,CAAK,CAACJ,WAAWK,iBAAiB,CAAC,IAAI,CAACL,WAAWM,u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MAAAM,IAAI,OAAON,CAAxG,CAA0G,CAACb,WAAWuH,mCAAmC,CAACI,QAAQ,CAACtG,CAAD,CAAG,CAAC,IAAIF,EAAE,CAAA,EAAMP,EAAE,YAAYC,EAAE,IAAI,CAAC,GAAG,CAAIQ,CAACK,mBAAmB,CAACd,CAAC,CAAC,KAAH,CAAvB,EAAkCC,CAAC,CAACb,WAAWgH,2BAA2B,CAAC7F,CAAC,CAAC,CAAA,EAA7E,CAAuHN,CAAC,CAA9BQ,CAACK,mBAAmB,CAACd,CAAC,CAAC,IAAH,CAAvB,CAAkCZ,WAAW+C,kBAA7C,CAAuE/C,WAAW6C,kB,CAAsBhC,CAAC,EAAE,CAACb,WAAWI,yB,GAA2BS,CAAC,CAAA,CAAE,CAACb,WAAWI,yBAAyB,CAAC,CAAA,EAAnR,CAA+R,MAAAgB,IAAI,OAAOD,CAA/U,C", +"sources":["/ClientSource/Scripts/Modules/Silverlight/Silverlight.js"], +"names":["window","Silverlight","_silverlightCount","__onSilverlightInstalledCalled","fwlinkRoot","__installationEventFired","onGetSilverlight","onSilverlightInstalled","Silverlight.onSilverlightInstalled","location","reload","isInstalled","Silverlight.isInstalled","b","a","m","i","j","k","h","c","e","d","g","f","undefined","ActiveXObject","IsVersionSupported","l","navigator","plugins","description","split","length","pop","push","parseInt","isNaN","WaitForInstallCompletion","Silverlight.WaitForInstallCompletion","isBrowserRestartRequired","refresh","setTimeout","__startup","Silverlight.__startup","mimeTypes","onUpgradeRequired","enabledPlugin","onRestartRequired","onInstallRequired","disableAutoStartup","removeEventListener","detachEvent","addEventListener","attachEvent","createObject","Silverlight.createObject","version","source","alt","initParams","isWindowless","windowless","framerate","maxFramerate","id","ignoreBrowserVer","inplaceInstallPrompt","data","src","document","getElementById","__getHandlerName","slPluginHTML","buildHTML","buildPromptHTML","innerHTML","Silverlight.buildHTML","HtmlAttributeEncode","width","height","join","createObjectEx","Silverlight.createObjectEx","parentElement","properties","events","context","Silverlight.buildPromptHTML","replace","getSilverlight","Silverlight.getSilverlight","String","match","followFWLink","Silverlight.followFWLink","top","Silverlight.HtmlAttributeEncode","charCodeAt","fromCharCode","default_error_handler","Silverlight.default_error_handler","ErrorType","ErrorCode","ErrorMessage","xamlFile","lineNumber","charPosition","methodName","alert","__cleanup","Silverlight.__cleanup","Silverlight.__getHandlerName","onRequiredVersionAvailable","Silverlight.onRequiredVersionAvailable","Silverlight.onRestartRequired","Silverlight.onUpgradeRequired","Silverlight.onInstallRequired","IsVersionAvailableOnError","Silverlight.IsVersionAvailableOnError","__verifySilverlight2UpgradeSuccess","getHost","IsVersionAvailableOnLoad","Silverlight.IsVersionAvailableOnLoad","Silverlight.__verifySilverlight2UpgradeSuccess"] +} diff --git a/Disco.Web/ClientSource/Scripts/Modules/Silverlight/Silverlight.js b/Disco.Web/ClientSource/Scripts/Modules/Silverlight/Silverlight.js index 15e04097..80ff3970 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Silverlight/Silverlight.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Silverlight/Silverlight.js @@ -1,2 +1,2 @@ -//v2.0.30511.0 +//v2.0.30511.0 if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(b){if(b==undefined)b=null;var a=false,m=null;try{var i=null,j=false;if(window.ActiveXObject)try{i=new ActiveXObject("AgControl.AgControl");if(b===null)a=true;else if(i.IsVersionSupported(b))a=true;i=null}catch(l){j=true}else j=true;if(j){var k=navigator.plugins["Silverlight Plug-In"];if(k)if(b===null)a=true;else{var h=k.description;if(h==="1.0.30226.2")h="2.0.30226.2";var c=h.split(".");while(c.length>3)c.pop();while(c.length<4)c.push(0);var e=b.split(".");while(e.length>4)e.pop();var d,g,f=0;do{d=parseInt(e[f]);g=parseInt(c[f]);f++}while(f");delete a.id;delete a.width;delete a.height;for(var c in a)if(a[c])b.push('');b.push("
");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="Get Microsoft Silverlight";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+" \n";a+="Message: "+b.ErrorMessage+" \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+" \n";a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}a+="MethodName: "+b.methodName+" \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c} \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Timeline.js.bundle b/Disco.Web/ClientSource/Scripts/Modules/Timeline.js.bundle index 6b2d35e7..efa20092 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Timeline.js.bundle +++ b/Disco.Web/ClientSource/Scripts/Modules/Timeline.js.bundle @@ -1,9 +1,9 @@ - - - /ClientSource/Scripts/Modules/Timeline/disco.simileajaxextensions.js - /ClientSource/Scripts/Modules/Timeline/simile-ajax-bundle-DiscoMod.js - /ClientSource/Scripts/Modules/Timeline/disco.timelineextensions.js - /ClientSource/Scripts/Modules/Timeline/timeline-bundle.js - /ClientSource/Scripts/Modules/Timeline/timeline.js - /ClientSource/Scripts/Modules/Timeline/labellers.js + + + /ClientSource/Scripts/Modules/Timeline/disco.simileajaxextensions.js + /ClientSource/Scripts/Modules/Timeline/simile-ajax-bundle-DiscoMod.js + /ClientSource/Scripts/Modules/Timeline/disco.timelineextensions.js + /ClientSource/Scripts/Modules/Timeline/timeline-bundle.js + /ClientSource/Scripts/Modules/Timeline/timeline.js + /ClientSource/Scripts/Modules/Timeline/labellers.js \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Timeline.min.js b/Disco.Web/ClientSource/Scripts/Modules/Timeline.min.js index c8914ecf..b2d4ec56 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Timeline.min.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Timeline.min.js @@ -1,2 +1,2 @@ -window.SimileAjax={loaded:!0,loadingScriptsCount:0,error:null,params:{bundle:"true"},Platform:{}},SimileAjax.version="pre 2.3.0",SimileAjax.jQuery=jQuery.noConflict(!0),typeof window.$=="undefined"&&(window.$=SimileAjax.jQuery),SimileAjax.Platform.os={isMac:!1,isWin:!1,isWin32:!1,isUnix:!1},SimileAjax.Platform.browser={isIE:!1,isNetscape:!1,isMozilla:!1,isFirefox:!1,isOpera:!1,isSafari:!1,majorVersion:0,minorVersion:0},function(){var u=navigator.appName.toLowerCase(),n=navigator.userAgent.toLowerCase(),i,r,t;SimileAjax.Platform.os.isMac=n.indexOf("mac")!=-1,SimileAjax.Platform.os.isWin=n.indexOf("win")!=-1,SimileAjax.Platform.os.isWin32=SimileAjax.Platform.isWin&&(n.indexOf("95")!=-1||n.indexOf("98")!=-1||n.indexOf("nt")!=-1||n.indexOf("win32")!=-1||n.indexOf("32bit")!=-1),SimileAjax.Platform.os.isUnix=n.indexOf("x11")!=-1,SimileAjax.Platform.browser.isIE=u.indexOf("microsoft")!=-1,SimileAjax.Platform.browser.isNetscape=u.indexOf("netscape")!=-1,SimileAjax.Platform.browser.isMozilla=n.indexOf("mozilla")!=-1,SimileAjax.Platform.browser.isFirefox=n.indexOf("firefox")!=-1,SimileAjax.Platform.browser.isOpera=u.indexOf("opera")!=-1,SimileAjax.Platform.browser.isSafari=u.indexOf("safari")!=-1,i=function(n){var t=n.split(".");SimileAjax.Platform.browser.majorVersion=parseInt(t[0]),SimileAjax.Platform.browser.minorVersion=parseInt(t[1])},r=function(n,t,i){var r=n.indexOf(t,i);return r>=0?r:n.length},SimileAjax.Platform.browser.isMozilla&&(t=n.indexOf("mozilla/"),t>=0&&i(n.substring(t+8,r(n," ",t)))),SimileAjax.Platform.browser.isIE&&(t=n.indexOf("msie "),t>=0&&i(n.substring(t+5,r(n,";",t)))),SimileAjax.Platform.browser.isNetscape&&(t=n.indexOf("rv:"),t>=0&&i(n.substring(t+3,r(n,")",t)))),SimileAjax.Platform.browser.isFirefox&&(t=n.indexOf("firefox/"),t>=0&&i(n.substring(t+8,r(n," ",t)))),"localeCompare"in String.prototype||(String.prototype.localeCompare=function(n){return thisn?1:0})}(),SimileAjax.Platform.getDefaultLocale=function(){return SimileAjax.Platform.clientLocale},SimileAjax.ListenerQueue=function(n){this._listeners=[],this._wildcardHandlerName=n},SimileAjax.ListenerQueue.prototype.add=function(n){this._listeners.push(n)},SimileAjax.ListenerQueue.prototype.remove=function(n){for(var i=this._listeners,t=0;t0?this._a[0]:null},SimileAjax.SortedArray.prototype.getLast=function(){return this._a.length>0?this._a[this._a.length-1]:null},SimileAjax.EventIndex=function(n){var t=this;this._unit=n!=null?n:SimileAjax.NativeDateUnit,this._events=new SimileAjax.SortedArray(function(n,i){return t._unit.compare(n.getStart(),i.getStart())}),this._idToEvent={},this._indexed=!0},SimileAjax.EventIndex.prototype.getUnit=function(){return this._unit},SimileAjax.EventIndex.prototype.getEvent=function(n){return this._idToEvent[n]},SimileAjax.EventIndex.prototype.add=function(n){this._events.add(n),this._idToEvent[n.getID()]=n,this._indexed=!1},SimileAjax.EventIndex.prototype.removeAll=function(){this._events.removeAll(),this._idToEvent={},this._indexed=!1},SimileAjax.EventIndex.prototype.getCount=function(){return this._events.length()},SimileAjax.EventIndex.prototype.getIterator=function(n,t){return this._indexed||this._index(),new SimileAjax.EventIndex._Iterator(this._events,n,t,this._unit)},SimileAjax.EventIndex.prototype.getReverseIterator=function(n,t){return this._indexed||this._index(),new SimileAjax.EventIndex._ReverseIterator(this._events,n,t,this._unit)},SimileAjax.EventIndex.prototype.getAllIterator=function(){return new SimileAjax.EventIndex._AllIterator(this._events)},SimileAjax.EventIndex.prototype.getEarliestDate=function(){var n=this._events.getFirst();return n==null?null:n.getStart()},SimileAjax.EventIndex.prototype.getLatestDate=function(){var r=this._events.getLast(),i,n,t;if(r==null)return null;for(this._indexed||this._index(),i=r._earliestOverlapIndex,n=this._events.elementAt(i).getEnd(),t=i+1;t=0&&(this._currentIndex=this._events.elementAt(this._currentIndex-1)._earliestOverlapIndex),this._currentIndex--,this._maxIndex=n.find(function(n){return r.compare(n.getStart(),i)}),this._hasNext=!1,this._next=null,this._findNext()},SimileAjax.EventIndex._Iterator.prototype={hasNext:function(){return this._hasNext},next:function(){if(this._hasNext){var n=this._next;return this._findNext(),n}return null},_findNext:function(){for(var t=this._unit,n;++this._currentIndex0){this._next=n,this._hasNext=!0;return}this._next=null,this._hasNext=!1}},SimileAjax.EventIndex._ReverseIterator=function(n,t,i,r){this._events=n,this._startDate=t,this._endDate=i,this._unit=r,this._minIndex=n.find(function(n){return r.compare(n.getStart(),t)}),this._minIndex-1>=0&&(this._minIndex=this._events.elementAt(this._minIndex-1)._earliestOverlapIndex),this._maxIndex=n.find(function(n){return r.compare(n.getStart(),i)}),this._currentIndex=this._maxIndex,this._hasNext=!1,this._next=null,this._findNext()},SimileAjax.EventIndex._ReverseIterator.prototype={hasNext:function(){return this._hasNext},next:function(){if(this._hasNext){var n=this._next;return this._findNext(),n}return null},_findNext:function(){for(var t=this._unit,n;--this._currentIndex>=this._minIndex;)if(n=this._events.elementAt(this._currentIndex),t.compare(n.getStart(),this._endDate)<0&&t.compare(n.getEnd(),this._startDate)>0){this._next=n,this._hasNext=!0;return}this._next=null,this._hasNext=!1}},SimileAjax.EventIndex._AllIterator=function(n){this._events=n,this._index=0},SimileAjax.EventIndex._AllIterator.prototype={hasNext:function(){return this._index0&&t.length<8)return r=t.indexOf(" "),r>0?(i=parseInt(t.substr(0,r)),f=t.substr(r+1),f.toLowerCase()=="bc"&&(i=1-i)):i=parseInt(t),u=new Date(0),u.setUTCFullYear(i),u;try{return new Date(Date.parse(t))}catch(e){return null}},SimileAjax.DateTime.roundDownToInterval=function(n,t,i,r,u){var h=i*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR],f=new Date(n.getTime()+h),o=function(n){n.setUTCMilliseconds(0),n.setUTCSeconds(0),n.setUTCMinutes(0),n.setUTCHours(0)},s=function(n){o(n),n.setUTCDate(1),n.setUTCMonth(0)},c,e;switch(t){case SimileAjax.DateTime.MILLISECOND:e=f.getUTCMilliseconds(),f.setUTCMilliseconds(e-e%r);break;case SimileAjax.DateTime.SECOND:f.setUTCMilliseconds(0),e=f.getUTCSeconds(),f.setUTCSeconds(e-e%r);break;case SimileAjax.DateTime.MINUTE:f.setUTCMilliseconds(0),f.setUTCSeconds(0),e=f.getUTCMinutes(),f.setTime(f.getTime()-e%r*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.MINUTE]);break;case SimileAjax.DateTime.HOUR:f.setUTCMilliseconds(0),f.setUTCSeconds(0),f.setUTCMinutes(0),e=f.getUTCHours(),f.setUTCHours(e-e%r);break;case SimileAjax.DateTime.DAY:o(f);break;case SimileAjax.DateTime.WEEK:o(f),c=(f.getUTCDay()+7-u)%7,f.setTime(f.getTime()-c*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.DAY]);break;case SimileAjax.DateTime.MONTH:o(f),f.setUTCDate(1),e=f.getUTCMonth(),f.setUTCMonth(e-e%r);break;case SimileAjax.DateTime.YEAR:s(f),e=f.getUTCFullYear(),f.setUTCFullYear(e-e%r);break;case SimileAjax.DateTime.DECADE:s(f),f.setUTCFullYear(Math.floor(f.getUTCFullYear()/10)*10);break;case SimileAjax.DateTime.CENTURY:s(f),f.setUTCFullYear(Math.floor(f.getUTCFullYear()/100)*100);break;case SimileAjax.DateTime.MILLENNIUM:s(f),f.setUTCFullYear(Math.floor(f.getUTCFullYear()/1e3)*1e3)}n.setTime(f.getTime()-h)},SimileAjax.DateTime.roundUpToInterval=function(n,t,i,r,u){var f=n.getTime();SimileAjax.DateTime.roundDownToInterval(n,t,i,r,u),n.getTime()-1&&(t=t.replace("px","")),i.indexOf("px")>-1&&(i=i.replace("px","")),{w:t,h:i}},SimileAjax.DOM.getStyle=function(n,t){var i;return n.currentStyle?n.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(n,null).getPropertyValue(t):""},SimileAjax.DOM.getEventRelativeCoordinates=function(n,t){var i;return SimileAjax.Platform.browser.isIE?n.type=="mousewheel"?(i=SimileAjax.DOM.getPageCoordinates(t),{x:n.clientX-i.left,y:n.clientY-i.top}):{x:n.offsetX,y:n.offsetY}:(i=SimileAjax.DOM.getPageCoordinates(t),n.type=="DOMMouseScroll"&&SimileAjax.Platform.browser.isFirefox&&SimileAjax.Platform.browser.majorVersion==2?{x:n.screenX-i.left,y:n.screenY-i.top}:{x:n.pageX-i.left,y:n.pageY-i.top})},SimileAjax.DOM.getEventPageCoordinates=function(n){return SimileAjax.Platform.browser.isIE?{x:n.clientX+document.body.scrollLeft,y:n.clientY+document.body.scrollTop}:{x:n.pageX,y:n.pageY}},SimileAjax.DOM.hittest=function(n,t,i){return SimileAjax.DOM._hittest(document.body,n,t,i)},SimileAjax.DOM._hittest=function(n,t,i,r){var a=n.childNodes,e,u,o,s,l;n:for(e=0;e",t.firstChild},SimileAjax.DOM.createDOMFromTemplate=function(n){var t={};return t.elmt=SimileAjax.DOM._createDOMFromTemplate(n,t,null),t},SimileAjax.DOM._createDOMFromTemplate=function(t,i,r){var h,u,o,f,e,c,s;if(t==null)return null;if(typeof t!="object")return h=document.createTextNode(t),r!=null&&r.appendChild(h),h;u=null,"tag"in t?(o=t.tag,r!=null&&(o=="tr"?u=r.insertRow(r.rows.length):o=="td"&&(u=r.insertCell(r.cells.length))),u==null&&(u=o=="input"?SimileAjax.DOM.createInputElement(t.type):document.createElement(o),r!=null&&r.appendChild(u))):(u=t.elmt,r!=null&&r.appendChild(u));for(f in t)if(e=t[f],f=="field")i[e]=u;else if(f=="className")u.className=e;else if(f=="id")u.id=e;else if(f=="title")u.title=e;else if(f!="type"||u.tagName!="input")if(f=="style")for(n in e)c=e[n],n=="float"&&(n=SimileAjax.Platform.browser.isIE?"styleFloat":"cssFloat"),u.style[n]=c;else if(f=="children")for(s=0;s0){if(t.removeAttribute("id"),r in i){u=t.parentNode,u.insertBefore(i[r],t),u.removeChild(t),n[r]=i[r];return}n[r]=t}t.hasChildNodes()&&SimileAjax.DOM._processDOMChildrenConstructedFromString(n,t,i)},SimileAjax.DOM._processDOMChildrenConstructedFromString=function(n,t,i){for(var r=t.firstChild,u;r!=null;)u=r.nextSibling,r.nodeType==1&&SimileAjax.DOM._processDOMConstructedFromString(n,r,i),r=u},SimileAjax.Graphics={},SimileAjax.Graphics.pngIsTranslucent=!SimileAjax.Platform.browser.isIE||SimileAjax.Platform.browser.majorVersion>6,SimileAjax.Graphics.pngIsTranslucent||SimileAjax.includeCssFile(document,SimileAjax.urlPrefix+"styles/graphics-ie6.css"),SimileAjax.Graphics._createTranslucentImage1=function(n,t){var i=document.createElement("img");return i.setAttribute("src",n),t!=null&&(i.style.verticalAlign=t),i},SimileAjax.Graphics._createTranslucentImage2=function(n,t){var i=document.createElement("img");return i.style.width="1px",i.style.height="1px",i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+n+"', sizingMethod='image')",i.style.verticalAlign=t!=null?t:"middle",i},SimileAjax.Graphics.createTranslucentImage=SimileAjax.Graphics.pngIsTranslucent?SimileAjax.Graphics._createTranslucentImage1:SimileAjax.Graphics._createTranslucentImage2,SimileAjax.Graphics._createTranslucentImageHTML1=function(n,t){return'"},SimileAjax.Graphics._createTranslucentImageHTML2=function(n,t){var i="width: 1px; height: 1px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+n+"', sizingMethod='image');"+(t!=null?" vertical-align: "+t+";":"");return"'},SimileAjax.Graphics.createTranslucentImageHTML=SimileAjax.Graphics.pngIsTranslucent?SimileAjax.Graphics._createTranslucentImageHTML1:SimileAjax.Graphics._createTranslucentImageHTML2,SimileAjax.Graphics.setOpacity=function(n,t){if(SimileAjax.Platform.browser.isIE)n.style.filter="progid:DXImageTransform.Microsoft.Alpha(Style=0,Opacity="+t+")";else{var i=(t/100).toString();n.style.opacity=i,n.style.MozOpacity=i}},SimileAjax.Graphics.bubbleConfig={containerCSSClass:"simileAjax-bubble-container",innerContainerCSSClass:"simileAjax-bubble-innerContainer",contentContainerCSSClass:"simileAjax-bubble-contentContainer",borderGraphicSize:50,borderGraphicCSSClassPrefix:"simileAjax-bubble-border-",arrowGraphicTargetOffset:33,arrowGraphicLength:100,arrowGraphicWidth:49,arrowGraphicCSSClassPrefix:"simileAjax-bubble-arrow-",closeGraphicCSSClass:"simileAjax-bubble-close",extraPadding:20},SimileAjax.Graphics.createBubbleForContentAndPoint=function(n,t,i,r,u,f){typeof r!="number"&&(r=300),typeof f!="number"&&(f=0),n.style.position="absolute",n.style.left="-5000px",n.style.top="0px",n.style.width=r+"px",document.body.appendChild(n),window.setTimeout(function(){var e=n.scrollWidth+10,o=n.scrollHeight+10,s=0,h,r;f>0&&o>f&&(o=f,s=e-25),h=SimileAjax.Graphics.createBubbleForPoint(t,i,e,o,u),document.body.removeChild(n),n.style.position="static",n.style.left="",n.style.top="",s>0?(r=document.createElement("div"),n.style.width="",r.style.width=s+"px",r.appendChild(n),h.content.appendChild(r)):(n.style.width=e+"px",h.content.appendChild(n))},200)},SimileAjax.Graphics.createBubbleForPoint=function(n,t,i,r,u){var h,s,l,a;i=parseInt(i,10),r=parseInt(r,10);var f=SimileAjax.Graphics.bubbleConfig,v=SimileAjax.Graphics.pngIsTranslucent?"pngTranslucent":"pngNotTranslucent",w=i+2*f.borderGraphicSize,b=r+2*f.borderGraphicSize,c=function(n){return n+" "+n+"-"+v},e=document.createElement("div");e.className=c(f.containerCSSClass),e.style.width=i+"px",e.style.height=r+"px",h=document.createElement("div"),h.className=c(f.innerContainerCSSClass),e.appendChild(h);var y=function(){o._closed||(document.body.removeChild(o._div),o._doc=null,o._div=null,o._content=null,o._closed=!0)},o={_closed:!1},p=SimileAjax.WindowManager.pushLayer(y,!0,e);return o._div=e,o.close=function(){SimileAjax.WindowManager.popLayer(p)},s=function(n){var t=document.createElement("div");t.className=c(f.borderGraphicCSSClassPrefix+n),h.appendChild(t)},s("top-left"),s("top-right"),s("bottom-left"),s("bottom-right"),s("left"),s("right"),s("top"),s("bottom"),l=document.createElement("div"),l.className=c(f.contentContainerCSSClass),h.appendChild(l),o.content=l,a=document.createElement("div"),a.className=c(f.closeGraphicCSSClass),h.appendChild(a),SimileAjax.WindowManager.registerEventWithObject(a,"click",o,"close"),function(){var w=SimileAjax.Graphics.getWindowDimensions(),y=w.w,p=w.h,a=Math.ceil(f.arrowGraphicWidth/2),v=function(n){var t=document.createElement("div");return t.className=c(f.arrowGraphicCSSClassPrefix+"point-"+n),h.appendChild(t),t},s,l,o;if(n-a-f.borderGraphicSize-f.extraPadding>0&&n+a+f.borderGraphicSize+f.extraPadding0){o=v("down"),o.style.left=n-a-s+"px",e.style.left=s+"px",e.style.top=t-f.arrowGraphicTargetOffset-r+"px";return}if(u&&u=="bottom"||!u&&t+f.arrowGraphicTargetOffset+r+f.borderGraphicSize+f.extraPadding0?(o=v("right"),o.style.top=t-a-l+"px",e.style.top=l+"px",e.style.left=n-f.arrowGraphicTargetOffset-i+"px"):(o=v("left"),o.style.top=t-a-l+"px",e.style.top=l+"px",e.style.left=n+f.arrowGraphicTargetOffset+"px")}(),document.body.appendChild(e),o},SimileAjax.Graphics.getWindowDimensions=function(){return typeof window.innerHeight=="number"?{w:window.innerWidth,h:window.innerHeight}:document.documentElement&&document.documentElement.clientHeight?{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}:document.body&&document.body.clientHeight?{w:document.body.clientWidth,h:document.body.clientHeight}:void 0},SimileAjax.Graphics.createMessageBubble=function(n){var t=n.createElement("div"),i,o,f,e,u,s,r;return SimileAjax.Graphics.pngIsTranslucent?(i=n.createElement("div"),i.style.height="33px",i.style.background="url("+SimileAjax.urlPrefix+"images/message-top-left.png) top left no-repeat",i.style.paddingLeft="44px",t.appendChild(i),o=n.createElement("div"),o.style.height="33px",o.style.background="url("+SimileAjax.urlPrefix+"images/message-top-right.png) top right no-repeat",i.appendChild(o),f=n.createElement("div"),f.style.background="url("+SimileAjax.urlPrefix+"images/message-left.png) top left repeat-y",f.style.paddingLeft="44px",t.appendChild(f),e=n.createElement("div"),e.style.background="url("+SimileAjax.urlPrefix+"images/message-right.png) top right repeat-y",e.style.paddingRight="44px",f.appendChild(e),r=n.createElement("div"),e.appendChild(r),u=n.createElement("div"),u.style.height="55px",u.style.background="url("+SimileAjax.urlPrefix+"images/message-bottom-left.png) bottom left no-repeat",u.style.paddingLeft="44px",t.appendChild(u),s=n.createElement("div"),s.style.height="55px",s.style.background="url("+SimileAjax.urlPrefix+"images/message-bottom-right.png) bottom right no-repeat",u.appendChild(s)):(t.style.border="2px solid #7777AA",t.style.padding="20px",t.style.background="white",SimileAjax.Graphics.setOpacity(t,90),r=n.createElement("div"),t.appendChild(r)),{containerDiv:t,contentDiv:r}},SimileAjax.Graphics.createAnimation=function(n,t,i,r,u){return new SimileAjax.Graphics._Animation(n,t,i,r,u)},SimileAjax.Graphics._Animation=function(n,t,i,r,u){this.f=n,this.cont=typeof u=="function"?u:function(){},this.from=t,this.to=i,this.current=t,this.duration=r,this.start=(new Date).getTime(),this.timePassed=0},SimileAjax.Graphics._Animation.prototype.run=function(){var n=this;window.setTimeout(function(){n.step()},50)},SimileAjax.Graphics._Animation.prototype.step=function(){this.timePassed+=50;var t=this.timePassed/this.duration,i=-Math.cos(t*Math.PI)/2+.5,n=i*(this.to-this.from)+this.from;try{this.f(n,n-this.current)}catch(r){}this.current=n,this.timePassed",f=u.firstChild,f.style.width=t+"px",f.style.height=i+"px",f.onmousedown=function(n){n=n?n:event?event:null,n.button==2&&(f.value=r(),f.select())},u},SimileAjax.Graphics.getWidthHeight=function(n){var i,r,t;return n.getBoundingClientRect==null?(i=n.offsetWidth,r=n.offsetHeight):(t=n.getBoundingClientRect(),i=Math.ceil(t.right-t.left),r=Math.ceil(t.bottom-t.top)),{width:i,height:r}},SimileAjax.Graphics.getFontRenderingContext=function(n,t){return new SimileAjax.Graphics._FontRenderingContext(n,t)},SimileAjax.Graphics._FontRenderingContext=function(n,t){this._elmt=n,this._elmt.style.visibility="hidden",typeof t=="string"?this._elmt.style.width=t:typeof t=="number"&&(this._elmt.style.width=t+"px")},SimileAjax.Graphics._FontRenderingContext.prototype.dispose=function(){this._elmt=null},SimileAjax.Graphics._FontRenderingContext.prototype.update=function(){this._elmt.innerHTML="A",this._lineHeight=this._elmt.offsetHeight},SimileAjax.Graphics._FontRenderingContext.prototype.computeSize=function(n,t){var i=this._elmt,r;return i.innerHTML=n,i.className=t===undefined?"":t,r=SimileAjax.Graphics.getWidthHeight(i),i.className="",r},SimileAjax.Graphics._FontRenderingContext.prototype.getLineHeight=function(){return this._lineHeight},SimileAjax.History={maxHistoryLength:10,historyFile:"__history__.html",enabled:!0,_initialized:!1,_listeners:new SimileAjax.ListenerQueue,_actions:[],_baseIndex:0,_currentIndex:0,_plainDocumentTitle:document.title},SimileAjax.History.formatHistoryEntryTitle=function(n){return SimileAjax.History._plainDocumentTitle+" {"+n+"}"},SimileAjax.History.initialize=function(){if(!SimileAjax.History._initialized){if(SimileAjax.History.enabled){var n=document.createElement("iframe");n.id="simile-ajax-history",n.style.position="absolute",n.style.width="10px",n.style.height="10px",n.style.top="0px",n.style.left="0px",n.style.visibility="hidden",n.src=SimileAjax.History.historyFile+"?0",document.body.appendChild(n),SimileAjax.DOM.registerEvent(n,"load",SimileAjax.History._handleIFrameOnLoad),SimileAjax.History._iframe=n}SimileAjax.History._initialized=!0}},SimileAjax.History.addListener=function(n){SimileAjax.History.initialize(),SimileAjax.History._listeners.add(n)},SimileAjax.History.removeListener=function(n){SimileAjax.History.initialize(),SimileAjax.History._listeners.remove(n)},SimileAjax.History.addAction=function(n){SimileAjax.History.initialize(),SimileAjax.History._listeners.fire("onBeforePerform",[n]),window.setTimeout(function(){var t,i;try{if(n.perform(),SimileAjax.History._listeners.fire("onAfterPerform",[n]),SimileAjax.History.enabled){SimileAjax.History._actions=SimileAjax.History._actions.slice(0,SimileAjax.History._currentIndex-SimileAjax.History._baseIndex),SimileAjax.History._actions.push(n),SimileAjax.History._currentIndex++,t=SimileAjax.History._actions.length-SimileAjax.History.maxHistoryLength,t>0&&(SimileAjax.History._actions=SimileAjax.History._actions.slice(t),SimileAjax.History._baseIndex+=t);try{SimileAjax.History._iframe.contentWindow.location.search="?"+SimileAjax.History._currentIndex}catch(r){i=SimileAjax.History.formatHistoryEntryTitle(n.label),document.title=i}}}catch(r){SimileAjax.Debug.exception(r,"Error adding action {"+n.label+"} to history")}},0)},SimileAjax.History.addLengthyAction=function(n,t,i){SimileAjax.History.addAction({perform:n,undo:t,label:i,uiLayer:SimileAjax.WindowManager.getBaseLayer(),lengthy:!0})},SimileAjax.History._handleIFrameOnLoad=function(){var t,i;try{var r=SimileAjax.History._iframe.contentWindow.location.search,n=r.length==0?0:Math.max(0,parseInt(r.substr(1))),u=function(){var t=n-SimileAjax.History._currentIndex;SimileAjax.History._currentIndex+=t,SimileAjax.History._baseIndex+=t,SimileAjax.History._iframe.contentWindow.location.search="?"+n};nn&&SimileAjax.History._currentIndex>SimileAjax.History._baseIndex){SimileAjax.History._currentIndex--;var t=SimileAjax.History._actions[SimileAjax.History._currentIndex-SimileAjax.History._baseIndex];try{t.undo()}catch(i){SimileAjax.Debug.exception(i,"History: Failed to undo action {"+t.label+"}")}}SimileAjax.History._listeners.fire("onAfterUndoSeveral",[]),u()},0)):n>SimileAjax.History._currentIndex?(SimileAjax.History._listeners.fire("onBeforeRedoSeveral",[]),window.setTimeout(function(){while(SimileAjax.History._currentIndex=0&&t",n.OElig="",n.oelig="œ",n.Scaron="Š",n.scaron="š",n.Yuml="Ÿ",n.circ="ˆ",n.tilde="˜",n.ensp=" ",n.emsp=" ",n.thinsp=" ",n.zwnj="‌",n.zwj="‍",n.lrm="‎",n.rlm="‏",n.ndash="–",n.mdash="—",n.lsquo="‘",n.rsquo="’",n.sbquo="‚",n.ldquo="“",n.rdquo="”",n.bdquo="„",n.dagger="†",n.Dagger="‡",n.permil="‰",n.lsaquo="‹",n.rsaquo="›",n.euro="€",n.fnof="ƒ",n.Alpha="Α",n.Beta="Β",n.Gamma="Γ",n.Delta="Δ",n.Epsilon="Ε",n.Zeta="Ζ",n.Eta="Η",n.Theta="Θ",n.Iota="Ι",n.Kappa="Κ",n.Lambda="Λ",n.Mu="Μ",n.Nu="Ν",n.Xi="Ξ",n.Omicron="Ο",n.Pi="Π",n.Rho="Ρ",n.Sigma="Σ",n.Tau="Τ",n.Upsilon="Υ",n.Phi="Φ",n.Chi="Χ",n.Psi="Ψ",n.Omega="Ω",n.alpha="α",n.beta="β",n.gamma="γ",n.delta="δ",n.epsilon="ε",n.zeta="ζ",n.eta="η",n.theta="θ",n.iota="ι",n.kappa="κ",n.lambda="λ",n.mu="μ",n.nu="ν",n.xi="ξ",n.omicron="ο",n.pi="π",n.rho="ρ",n.sigmaf="ς",n.sigma="σ",n.tau="τ",n.upsilon="υ",n.phi="φ",n.chi="χ",n.psi="ψ",n.omega="ω",n.thetasym="ϑ",n.upsih="ϒ",n.piv="ϖ",n.bull="•",n.hellip="…",n.prime="′",n.Prime="″",n.oline="‾",n.frasl="⁄",n.weierp="℘",n.image="ℑ",n.real="ℜ",n.trade="™",n.alefsym="ℵ",n.larr="←",n.uarr="↑",n.rarr="→",n.darr="↓",n.harr="↔",n.crarr="↵",n.lArr="⇐",n.uArr="⇑",n.rArr="⇒",n.dArr="⇓",n.hArr="⇔",n.forall="∀",n.part="∂",n.exist="∃",n.empty="∅",n.nabla="∇",n.isin="∈",n.notin="∉",n.ni="∋",n.prod="∏",n.sum="∑",n.minus="−",n.lowast="∗",n.radic="√",n.prop="∝",n.infin="∞",n.ang="∠",n.and="∧",n.or="∨",n.cap="∩",n.cup="∪",n.int="∫",n.there4="∴",n.sim="∼",n.cong="≅",n.asymp="≈",n.ne="≠",n.equiv="≡",n.le="≤",n.ge="≥",n.sub="⊂",n.sup="⊃",n.nsub="⊄",n.sube="⊆",n.supe="⊇",n.oplus="⊕",n.otimes="⊗",n.perp="⊥",n.sdot="⋅",n.lceil="⌈",n.rceil="⌉",n.lfloor="⌊",n.rfloor="⌋",n.lang="〈",n.rang="〉",n.loz="◊",n.spades="♠",n.clubs="♣",n.hearts="♥",n.diams="♦"}(),SimileAjax.HTML.deEntify=function(n){for(var r=SimileAjax.HTML._e2uHash,t=/&(\w+?);/,i;t.test(n);)i=n.match(t),n=n.replace(t,r[i[1]]);return n},SimileAjax.JSON={},function(){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},n={array:function(t){for(var i=["["],e,f,o=t.length,r,u=0;u=n.length&&this.substr(0,n.length)==n},String.prototype.endsWith=function(n){return this.length>=n.length&&this.substr(this.length-n.length)==n},String.substitute=function(n,t){for(var u="",r=0,i,f;rr&&n.charAt(i-1)=="\\"?(u+=n.substring(r,i-1)+"%",r=i+1):(f=parseInt(n.charAt(i+1)),u+=isNaN(f)||f>=t.length?n.substring(r,i+2):n.substring(r,i)+t[f].toString(),r=i+2);return r0?n:t},SimileAjax.NativeDateUnit.change=function(n,t){return new Date(n.getTime()+t)},SimileAjax.WindowManager={_initialized:!1,_listeners:[],_draggedElement:null,_draggedElementCallback:null,_dropTargetHighlightElement:null,_lastCoords:null,_ghostCoords:null,_draggingMode:"",_dragging:!1,_layers:[]},SimileAjax.WindowManager.initialize=function(){SimileAjax.WindowManager._initialized||(SimileAjax.DOM.registerEvent(document.body,"mousedown",SimileAjax.WindowManager._onBodyMouseDown),SimileAjax.DOM.registerEvent(document.body,"mousemove",SimileAjax.WindowManager._onBodyMouseMove),SimileAjax.DOM.registerEvent(document.body,"mouseup",SimileAjax.WindowManager._onBodyMouseUp),SimileAjax.DOM.registerEvent(document,"keydown",SimileAjax.WindowManager._onBodyKeyDown),SimileAjax.DOM.registerEvent(document,"keyup",SimileAjax.WindowManager._onBodyKeyUp),SimileAjax.WindowManager._layers.push({index:0}),SimileAjax.WindowManager._historyListener={onBeforeUndoSeveral:function(){},onAfterUndoSeveral:function(){},onBeforeUndo:function(){},onAfterUndo:function(){},onBeforeRedoSeveral:function(){},onAfterRedoSeveral:function(){},onBeforeRedo:function(){},onAfterRedo:function(){}},SimileAjax.History.addListener(SimileAjax.WindowManager._historyListener),SimileAjax.WindowManager._initialized=!0)},SimileAjax.WindowManager.getBaseLayer=function(){return SimileAjax.WindowManager.initialize(),SimileAjax.WindowManager._layers[0]},SimileAjax.WindowManager.getHighestLayer=function(){return SimileAjax.WindowManager.initialize(),SimileAjax.WindowManager._layers[SimileAjax.WindowManager._layers.length-1]},SimileAjax.WindowManager.registerEventWithObject=function(n,t,i,r,u){SimileAjax.WindowManager.registerEvent(n,t,function(n,t,u){return i[r].call(i,n,t,u)},u)},SimileAjax.WindowManager.registerEvent=function(n,t,i,r){r==null&&(r=SimileAjax.WindowManager.getHighestLayer());var u=function(n,t,u){if(SimileAjax.WindowManager._canProcessEventAtLayer(r)){SimileAjax.WindowManager._popToLayer(r.index);try{i(n,t,u)}catch(f){SimileAjax.Debug.exception(f)}}return SimileAjax.DOM.cancelEvent(t),!1};SimileAjax.DOM.registerEvent(n,t,u)},SimileAjax.WindowManager.pushLayer=function(n,t,i){var r={onPop:n,index:SimileAjax.WindowManager._layers.length,ephemeral:t,elmt:i};return SimileAjax.WindowManager._layers.push(r),r},SimileAjax.WindowManager.popLayer=function(n){for(var t=1;t0&&SimileAjax.WindowManager._layers[t].ephemeral;){if(f=SimileAjax.WindowManager._layers[t],f.elmt!=null&&(u=f.elmt,i=SimileAjax.DOM.getPageCoordinates(u),r.x>=i.left&&r.x=i.top&&r.y5||Math.abs(o)>5)try{"onDragStart"in r&&r.onDragStart(),"ghost"in r&&r.ghost&&(s=SimileAjax.WindowManager._draggedElement,SimileAjax.WindowManager._ghostCoords=SimileAjax.DOM.getPageCoordinates(s),SimileAjax.WindowManager._ghostCoords.left+=e,SimileAjax.WindowManager._ghostCoords.top+=o,u=s.cloneNode(!0),u.style.position="absolute",u.style.left=SimileAjax.WindowManager._ghostCoords.left+"px",u.style.top=SimileAjax.WindowManager._ghostCoords.top+"px",u.style.zIndex=1e3,SimileAjax.Graphics.setOpacity(u,50),document.body.appendChild(u),r._ghostElmt=u),SimileAjax.WindowManager._dragging=!0,SimileAjax.WindowManager._lastCoords={x:t.clientX,y:t.clientY},document.body.focus()}catch(y){SimileAjax.Debug.exception("WindowManager: Error handling mouse down",y),SimileAjax.WindowManager._cancelDragging()}return SimileAjax.DOM.cancelEvent(t),!1}},SimileAjax.WindowManager._onBodyMouseUp=function(n,t,i){var r,u,i;if(SimileAjax.WindowManager._draggedElement!=null){try{if(SimileAjax.WindowManager._dragging&&(r=SimileAjax.WindowManager._draggedElementCallback,"onDragEnd"in r&&r.onDragEnd(),"droppable"in r&&r.droppable)){if(u=!1,i=SimileAjax.WindowManager._potentialDropTarget,i!=null&&(!("canDropOn"in r)||r.canDropOn(i))&&(!("canDrop"in i)||i.canDrop(SimileAjax.WindowManager._draggedElement))){if("onDropOn"in r)r.onDropOn(i);i.ondrop(SimileAjax.WindowManager._draggedElement,SimileAjax.WindowManager._draggingMode);u=!0}!u}}finally{SimileAjax.WindowManager._cancelDragging()}return SimileAjax.DOM.cancelEvent(t),!1}},SimileAjax.WindowManager._cancelDragging=function(){var n=SimileAjax.WindowManager._draggedElementCallback,t;"_ghostElmt"in n&&(t=n._ghostElmt,document.body.removeChild(t),delete n._ghostElmt),SimileAjax.WindowManager._dropTargetHighlightElement!=null&&(document.body.removeChild(SimileAjax.WindowManager._dropTargetHighlightElement),SimileAjax.WindowManager._dropTargetHighlightElement=null),SimileAjax.WindowManager._draggingModeIndicatorElmt!=null&&(document.body.removeChild(SimileAjax.WindowManager._draggingModeIndicatorElmt),SimileAjax.WindowManager._draggingModeIndicatorElmt=null),SimileAjax.WindowManager._draggedElement=null,SimileAjax.WindowManager._draggedElementCallback=null,SimileAjax.WindowManager._potentialDropTarget=null,SimileAjax.WindowManager._dropTargetHighlightElement=null,SimileAjax.WindowManager._lastCoords=null,SimileAjax.WindowManager._ghostCoords=null,SimileAjax.WindowManager._draggingMode="",SimileAjax.WindowManager._dragging=!1},SimileAjax.WindowManager._findDropTarget=function(n){while(n!=null){if("ondrop"in n&&typeof n.ondrop=="function")break;n=n.parentNode}return n},SimileAjax.XmlHttp={},SimileAjax.XmlHttp._onReadyStateChange=function(n,t,i){switch(n.readyState){case 4:try{n.status==0||n.status==200?i&&i(n):t&&t(n.statusText,n.status,n)}catch(r){SimileAjax.Debug.exception("XmlHttp: Error handling onReadyStateChange",r)}}},SimileAjax.XmlHttp._createRequest=function(){var r,t,n,i;if(SimileAjax.Platform.browser.isIE)for(r=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],t=0;t-1?0:parseInt(t.width)),this._timeline=n,this._bandInfo=t,this._index=i,this._locale=("locale"in t)?t.locale:Timeline.getDefaultLocale(),this._timeZone=("timeZone"in t)?t.timeZone:0,this._labeller=("labeller"in t)?t.labeller:("createLabeller"in n.getUnit())?n.getUnit().createLabeller(this._locale,this._timeZone):new Timeline.GregorianDateLabeller(this._locale,this._timeZone),this._theme=t.theme,this._zoomIndex=("zoomIndex"in t)?t.zoomIndex:0,this._zoomSteps=("zoomSteps"in t)?t.zoomSteps:null,this._dragging=!1,this._changing=!1,this._originalScrollSpeed=5,this._scrollSpeed=this._originalScrollSpeed,this._onScrollListeners=[],r=this,this._syncWithBand=null,this._syncWithBandHandler=function(){r._onHighlightBandScroll()},this._selectorListener=function(){r._onHighlightBandScroll()},u=this._timeline.getDocument().createElement("div"),u.className="timeline-band-input",this._timeline.addDiv(u),this._keyboardInput=document.createElement("input"),this._keyboardInput.type="text",u.appendChild(this._keyboardInput),SimileAjax.DOM.registerEventWithObject(this._keyboardInput,"keydown",this,"_onKeyDown"),SimileAjax.DOM.registerEventWithObject(this._keyboardInput,"keyup",this,"_onKeyUp"),this._div=this._timeline.getDocument().createElement("div"),this._div.id="timeline-band-"+i,this._div.className="timeline-band timeline-band-"+i,this._timeline.addDiv(this._div),SimileAjax.DOM.registerEventWithObject(this._div,"mousedown",this,"_onMouseDown"),SimileAjax.DOM.registerEventWithObject(this._div,"mousemove",this,"_onMouseMove"),SimileAjax.DOM.registerEventWithObject(this._div,"mouseup",this,"_onMouseUp"),SimileAjax.DOM.registerEventWithObject(this._div,"mouseout",this,"_onMouseOut"),SimileAjax.DOM.registerEventWithObject(this._div,"dblclick",this,"_onDblClick"),e=this._theme!=null?this._theme.mouseWheel:"scroll",(e==="zoom"||e==="scroll"||this._zoomSteps)&&(SimileAjax.Platform.browser.isFirefox?SimileAjax.DOM.registerEventWithObject(this._div,"DOMMouseScroll",this,"_onMouseScroll"):SimileAjax.DOM.registerEventWithObject(this._div,"mousewheel",this,"_onMouseScroll")),this._innerDiv=this._timeline.getDocument().createElement("div"),this._innerDiv.className="timeline-band-inner",this._div.appendChild(this._innerDiv),this._ether=t.ether,t.ether.initialize(this,n),this._etherPainter=t.etherPainter,t.etherPainter.initialize(this,n),this._eventSource=t.eventSource,this._eventSource&&(this._eventListener={onAddMany:function(){r._onAddMany()},onClear:function(){r._onClear()}},this._eventSource.addListener(this._eventListener)),this._eventPainter=t.eventPainter,this._eventTracksNeeded=0,this._eventTrackIncrement=0,t.eventPainter.initialize(this,n),this._decorators=("decorators"in t)?t.decorators:[],f=0;fthis._eventTracksNeeded&&(this._eventTracksNeeded=n)},Timeline._Band.prototype.checkAutoWidth=function(){var t;if(this._timeline.autoWidth){var i=this._eventPainter.getType()=="overview",r=i?this._theme.event.overviewTrack.autoWidthMargin:this._theme.event.track.autoWidthMargin,n=Math.ceil((this._eventTracksNeeded+r)*this._eventTrackIncrement);n+=i?this._theme.event.overviewTrack.offset:this._theme.event.track.offset,t=this._bandInfo,n!=t.width&&(t.width=n)}},Timeline._Band.prototype.layout=function(){this.paint()},Timeline._Band.prototype.paint=function(){this._etherPainter.paint(),this._paintDecorators(),this._paintEvents()},Timeline._Band.prototype.softLayout=function(){this.softPaint()},Timeline._Band.prototype.softPaint=function(){this._etherPainter.softPaint(),this._softPaintDecorators(),this._softPaintEvents()},Timeline._Band.prototype.setBandShiftAndWidth=function(n,t){var i=this._keyboardInput.parentNode,r=n+Math.floor(t/2);this._timeline.isHorizontal()?(this._div.style.top=n+"px",this._div.style.height=t+"px",i.style.top=r+"px",i.style.left="-1em"):(this._div.style.left=n+"px",this._div.style.width=t+"px",i.style.left=r+"px",i.style.top="-1em")},Timeline._Band.prototype.getViewWidth=function(){return this._timeline.isHorizontal()?this._div.offsetHeight:this._div.offsetWidth},Timeline._Band.prototype.setViewLength=function(n){this._viewLength=n,this._recenterDiv(),this._onChanging()},Timeline._Band.prototype.getViewLength=function(){return this._viewLength},Timeline._Band.prototype.getTotalViewLength=function(){return Timeline._Band.SCROLL_MULTIPLES*this._viewLength},Timeline._Band.prototype.getViewOffset=function(){return this._viewOffset},Timeline._Band.prototype.getMinDate=function(){return this._ether.pixelOffsetToDate(this._viewOffset)},Timeline._Band.prototype.getMaxDate=function(){return this._ether.pixelOffsetToDate(this._viewOffset+Timeline._Band.SCROLL_MULTIPLES*this._viewLength)},Timeline._Band.prototype.getMinVisibleDate=function(){return this._ether.pixelOffsetToDate(0)},Timeline._Band.prototype.getMinVisibleDateAfterDelta=function(n){return this._ether.pixelOffsetToDate(n)},Timeline._Band.prototype.getMaxVisibleDate=function(){return this._ether.pixelOffsetToDate(this._viewLength)},Timeline._Band.prototype.getMaxVisibleDateAfterDelta=function(n){return this._ether.pixelOffsetToDate(this._viewLength+n)},Timeline._Band.prototype.getCenterVisibleDate=function(){return this._ether.pixelOffsetToDate(this._viewLength/2)},Timeline._Band.prototype.setMinVisibleDate=function(n){this._changing||this._moveEther(Math.round(-this._ether.dateToPixelOffset(n)))},Timeline._Band.prototype.setMaxVisibleDate=function(n){this._changing||this._moveEther(Math.round(this._viewLength-this._ether.dateToPixelOffset(n)))},Timeline._Band.prototype.setCenterVisibleDate=function(n){this._changing||this._moveEther(Math.round(this._viewLength/2-this._ether.dateToPixelOffset(n)))},Timeline._Band.prototype.dateToPixelOffset=function(n){return this._ether.dateToPixelOffset(n)-this._viewOffset},Timeline._Band.prototype.pixelOffsetToDate=function(n){return this._ether.pixelOffsetToDate(n+this._viewOffset)},Timeline._Band.prototype.createLayerDiv=function(n,t){var r=this._timeline.getDocument().createElement("div"),i;return r.className="timeline-band-layer"+(typeof t=="string"?" "+t:""),r.style.zIndex=n,this._innerDiv.appendChild(r),i=this._timeline.getDocument().createElement("div"),i.className="timeline-band-layer-inner",i.style.cursor=SimileAjax.Platform.browser.isIE?"move":"-moz-grab",r.appendChild(i),i},Timeline._Band.prototype.removeLayerDiv=function(n){this._innerDiv.removeChild(n.parentNode)},Timeline._Band.prototype.scrollToCenter=function(n,t){var i=this._ether.dateToPixelOffset(n);i<-this._viewLength/2?this.setCenterVisibleDate(this.pixelOffsetToDate(i+this._viewLength)):i>3*this._viewLength/2&&this.setCenterVisibleDate(this.pixelOffsetToDate(i-this._viewLength)),this._autoScroll(Math.round(this._viewLength/2-this._ether.dateToPixelOffset(n)),t)},Timeline._Band.prototype.showBubbleForEvent=function(n){var t=this.getEventSource().getEvent(n),i;t&&(i=this,this.scrollToCenter(t.getStart(),function(){i._eventPainter.showBubble(t)}))},Timeline._Band.prototype.zoom=function(n,t){if(this._zoomSteps){t+=this._viewOffset;var i=this._ether.pixelOffsetToDate(t),r=this._ether.zoom(n);this._etherPainter.zoom(r),this._moveEther(Math.round(-this._ether.dateToPixelOffset(i))),this._moveEther(t)}},Timeline._Band.prototype._onMouseDown=function(n,t){this.closeBubble(),this._dragging=!0,this._dragX=t.clientX,this._dragY=t.clientY},Timeline._Band.prototype._onMouseMove=function(n,t){if(this._dragging){var i=t.clientX-this._dragX,r=t.clientY-this._dragY;this._dragX=t.clientX,this._dragY=t.clientY,this._moveEther(this._timeline.isHorizontal()?i:r),this._positionHighlight()}},Timeline._Band.prototype._onMouseUp=function(){this._dragging=!1,this._keyboardInput.focus()},Timeline._Band.prototype._onMouseOut=function(n,t){var i=SimileAjax.DOM.getEventRelativeCoordinates(t,n);i.x+=this._viewOffset,(i.x<0||i.x>n.offsetWidth||i.y<0||i.y>n.offsetHeight)&&(this._dragging=!1)},Timeline._Band.prototype._onMouseScroll=function(n,t){var r=new Date,i,u,f,e,o;r=r.getTime(),(!this._lastScrollTime||r-this._lastScrollTime>50)&&(this._lastScrollTime=r,i=0,t.wheelDelta?i=t.wheelDelta/120:t.detail&&(i=-t.detail/3),u=this._theme.mouseWheel,this._zoomSteps||u==="zoom"?(f=SimileAjax.DOM.getEventRelativeCoordinates(t,n),i!=0&&(i>0&&(e=!0),i<0&&(e=!1),this._timeline.zoom(e,f.x,f.y,n))):u==="scroll"&&(o=50*(i<0?-1:1),this._moveEther(o))),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0,t.preventDefault&&t.preventDefault(),t.returnValue=!1},Timeline._Band.prototype._onDblClick=function(n,t){var i=SimileAjax.DOM.getEventRelativeCoordinates(t,n),r=i.x-(this._viewLength/2-this._viewOffset);this._autoScroll(-r)},Timeline._Band.prototype._onKeyDown=function(n,t){if(!this._dragging){switch(t.keyCode){case 27:break;case 37:case 38:this._scrollSpeed=Math.min(50,Math.abs(this._scrollSpeed*1.05)),this._moveEther(this._scrollSpeed);break;case 39:case 40:this._scrollSpeed=-Math.min(50,Math.abs(this._scrollSpeed*1.05)),this._moveEther(this._scrollSpeed);break;default:return!0}return this.closeBubble(),SimileAjax.DOM.cancelEvent(t),!1}return!0},Timeline._Band.prototype._onKeyUp=function(n,t){if(!this._dragging){this._scrollSpeed=this._originalScrollSpeed;switch(t.keyCode){case 35:this.setCenterVisibleDate(this._eventSource.getLatestDate());break;case 36:this.setCenterVisibleDate(this._eventSource.getEarliestDate());break;case 33:this._autoScroll(this._timeline.getPixelLength());break;case 34:this._autoScroll(-this._timeline.getPixelLength());break;default:return!0}return this.closeBubble(),SimileAjax.DOM.cancelEvent(t),!1}return!0},Timeline._Band.prototype._autoScroll=function(n,t){var i=this,r=SimileAjax.Graphics.createAnimation(function(n,t){i._moveEther(t)},0,n,1e3,t);r.run()},Timeline._Band.prototype._moveEther=function(n){(this.closeBubble(),this._timeline.shiftOK(this._index,n))&&(this._viewOffset+=n,this._ether.shiftPixels(-n),this._timeline.isHorizontal()?this._div.style.left=this._viewOffset+"px":this._div.style.top=this._viewOffset+"px",this._viewOffset>-this._viewLength*.5||this._viewOffset<-this._viewLength*(Timeline._Band.SCROLL_MULTIPLES-1.5)?this._recenterDiv():this.softLayout(),this._onChanging())},Timeline._Band.prototype._onChanging=function(){this._changing=!0,this._fireOnScroll(),this._setSyncWithBandDate(),this._changing=!1},Timeline._Band.prototype.busy=function(){return this._changing},Timeline._Band.prototype._fireOnScroll=function(){for(var n=0;n<\/div>",this._eventLayer.appendChild(u);var c=this,lt=function(){var i,t,n,r;try{for(i=parseInt(this.getAttribute("index")),t=u.firstChild.childNodes,n=0;n0&&(o[s-1].end=Math.max(o[s-1].end,l)),g=r.height+f.iconBottomMargin+k;g>0;)o.push({start:a,end:l}),g-=f.trackHeight;var et=u.text,p=this._frc.computeSize(et),rt=p.height+f.labelBottomMargin+k,nt=l+p.width+f.labelRightMargin;for(s>0&&(o[s-1].end=Math.max(o[s-1].end,nt)),w=0;rt>0;w++)s+w=0){var f=this._timeline.getDocument(),u=i.event,e=u.highlightColors[Math.min(n,u.highlightColors.length-1)],r=f.createElement("div");r.style.position="absolute",r.style.overflow="hidden",r.style.left=t.left-2+"px",r.style.width=t.width+4+"px",r.style.top=t.top-2+"px",r.style.height=t.height+4+"px",this._highlightLayer.appendChild(r)}},Timeline.CompactEventPainter.prototype._onClickMultiplePreciseInstantEvent=function(n,t,i){var f=SimileAjax.DOM.getPageCoordinates(n),u,r;for(this._showBubble(f.left+Math.ceil(n.offsetWidth/2),f.top+Math.ceil(n.offsetHeight/2),i),u=[],r=0;r0){u=this._unit.later(u,this._startDate),f=this._unit.earlier(f,this._endDate);var r=this._band.dateToPixelOffset(u),e=this._band.dateToPixelOffset(f),h=this._timeline.getDocument(),c=function(){var n=h.createElement("table");return n.insertRow(0).insertCell(0),n},n=h.createElement("div");n.className="timeline-highlight-decorator",this._cssClass&&(n.className+=" "+this._cssClass),this._color!=null&&(n.style.backgroundColor=this._color),this._opacity<100&&SimileAjax.Graphics.setOpacity(n,this._opacity),this._layerDiv.appendChild(n),t=c(),t.className="timeline-highlight-label timeline-highlight-label-start",o=t.rows[0].cells[0],o.innerHTML=this._startLabel,this._cssClass&&(o.className="label_"+this._cssClass),this._layerDiv.appendChild(t),i=c(),i.className="timeline-highlight-label timeline-highlight-label-end",s=i.rows[0].cells[0],s.innerHTML=this._endLabel,this._cssClass&&(s.className="label_"+this._cssClass),this._layerDiv.appendChild(i),this._timeline.isHorizontal()?(n.style.left=r+"px",n.style.width=e-r+"px",t.style.right=this._band.getTotalViewLength()-r+"px",t.style.width=this._startLabel.length+"em",i.style.left=e+"px",i.style.width=this._endLabel.length+"em"):(n.style.top=r+"px",n.style.height=e-r+"px",t.style.bottom=r+"px",t.style.height="1.5px",i.style.top=e+"px",i.style.height="1.5px")}this._layerDiv.style.display="block"},Timeline.SpanHighlightDecorator.prototype.softPaint=function(){},Timeline.PointHighlightDecorator=function(n){this._unit=n.unit!=null?n.unit:SimileAjax.NativeDateUnit,this._date=typeof n.date=="string"?this._unit.parseFromObject(n.date):n.date,this._width=n.width!=null?n.width:10,this._color=n.color,this._cssClass=n.cssClass!=null?n.cssClass:"",this._opacity=n.opacity!=null?n.opacity:100},Timeline.PointHighlightDecorator.prototype.initialize=function(n,t){this._band=n,this._timeline=t,this._layerDiv=null},Timeline.PointHighlightDecorator.prototype.paint=function(){var t,i;if(this._layerDiv!=null&&this._band.removeLayerDiv(this._layerDiv),this._layerDiv=this._band.createLayerDiv(10),this._layerDiv.setAttribute("name","span-highlight-decorator"),this._layerDiv.style.display="none",t=this._band.getMinDate(),i=this._band.getMaxDate(),this._unit.compare(this._date,i)<0&&this._unit.compare(this._date,t)>0){var u=this._band.dateToPixelOffset(this._date),r=u-Math.round(this._width/2),f=this._timeline.getDocument(),n=f.createElement("div");n.className="timeline-highlight-point-decorator",n.className+=" "+this._cssClass,this._color!=null&&(n.style.backgroundColor=this._color),this._opacity<100&&SimileAjax.Graphics.setOpacity(n,this._opacity),this._layerDiv.appendChild(n),this._timeline.isHorizontal()?(n.style.left=r+"px",n.style.width=this._width):(n.style.top=r+"px",n.style.height=this._width)}this._layerDiv.style.display="block"},Timeline.PointHighlightDecorator.prototype.softPaint=function(){},Timeline.DetailedEventPainter=function(n){this._params=n,this._onSelectListeners=[],this._filterMatcher=null,this._highlightMatcher=null,this._frc=null,this._eventIdToElmt={}},Timeline.DetailedEventPainter.prototype.initialize=function(n,t){this._band=n,this._timeline=t,this._backLayer=null,this._eventLayer=null,this._lineLayer=null,this._highlightLayer=null,this._eventIdToElmt=null},Timeline.DetailedEventPainter.prototype.getType=function(){return"detailed"},Timeline.DetailedEventPainter.prototype.addOnSelectListener=function(n){this._onSelectListeners.push(n)},Timeline.DetailedEventPainter.prototype.removeOnSelectListener=function(n){for(var t=0;t=o+f.width?(s.solid=h,s.text=o):(s.solid=h,o=u+i.event.label.offsetFromLine,l=this._findFreeTrackForText(e,o+f.width,function(n){n.line=u-2}),this._getTrackData(l).text=h,this._paintEventLine(n,u,e,l,t,i));var w=Math.round(t.trackOffset+l*t.trackIncrement+t.trackHeight/2-f.height/2),b=this._paintEventLabel(n,a,o,w,f.width,f.height,i),k=this,y=function(t,i){return k._onClickInstantEvent(c.elmt,i,n)};SimileAjax.DOM.registerEvent(c.elmt,"mousedown",y),SimileAjax.DOM.registerEvent(b.elmt,"mousedown",y),this._createHighlightDiv(r,c,i),this._eventIdToElmt[n.getID()]=c.elmt},Timeline.DetailedEventPainter.prototype.paintImpreciseInstantEvent=function(n,t,i,r){var it=this._timeline.getDocument(),y=n.getText(),p=n.getStart(),w=n.getEnd(),u=Math.round(this._band.dateToPixelOffset(p)),l=Math.round(this._band.dateToPixelOffset(w)),b=Math.round(u+t.iconWidth/2),a=Math.round(u-t.iconWidth/2),e=this._frc.computeSize(y),f=this._findFreeTrackForSolid(l,u),k=this._paintEventTape(n,f,u,l,i.event.instant.impreciseColor,i.event.instant.impreciseOpacity,t,i),h=this._paintEventIcon(n,f,a,t,i),d=this._getTrackData(f),o,c,s;d.solid=a,o=b+i.event.label.offsetFromLine,c=o+e.width,cn&&(!t||r.line>t))return i}else return this._lowerTracks.push({solid:Number.POSITIVE_INFINITY,text:Number.POSITIVE_INFINITY,line:Number.POSITIVE_INFINITY}),i;if(in&&(!t||r.line>t))return-1-i}else return this._upperTracks.push({solid:Number.POSITIVE_INFINITY,text:Number.POSITIVE_INFINITY,line:Number.POSITIVE_INFINITY}),-1-i}},Timeline.DetailedEventPainter.prototype._findFreeTrackForText=function(n,t,i){var e,r,f,o,s,h,u;if(n<0?(e=!0,f=-n,r=this._findFreeUpperTrackForText(f,t),o=-1-r):n>0?(e=!1,f=n+1,r=this._findFreeLowerTrackForText(f,t),o=r):(s=this._findFreeUpperTrackForText(0,t),h=this._findFreeLowerTrackForText(1,t),h-1<=s?(e=!1,f=1,r=h,o=r):(e=!0,f=0,r=s,o=-1-r)),e)for(r==this._upperTracks.length&&this._upperTracks.push({solid:Number.POSITIVE_INFINITY,text:Number.POSITIVE_INFINITY,line:Number.POSITIVE_INFINITY}),u=f;u=t)break}return n},Timeline.DetailedEventPainter.prototype._findFreeUpperTrackForText=function(n,t){for(;n=t)break}return n},Timeline.DetailedEventPainter.prototype._getTrackData=function(n){return n<0?this._upperTracks[-n-1]:this._lowerTracks[n]},Timeline.DetailedEventPainter.prototype._paintEventLine=function(n,t,i,r,u,f){var s=Math.round(u.trackOffset+i*u.trackIncrement+u.trackHeight/2),h=Math.round(Math.abs(r-i)*u.trackIncrement),o="1px solid "+f.event.label.lineColor,e=this._timeline.getDocument().createElement("div");e.style.position="absolute",e.style.left=t+"px",e.style.width=f.event.label.offsetFromLine+"px",e.style.height=h+"px",i>r?(e.style.top=s-h+"px",e.style.borderTop=o):(e.style.top=s+"px",e.style.borderBottom=o),e.style.borderLeft=o,this._lineLayer.appendChild(e)},Timeline.DetailedEventPainter.prototype._paintEventIcon=function(n,t,i,r){var f=n.getIcon();f=f!=null?f:r.icon;var o=r.trackOffset+t*r.trackIncrement+r.trackHeight/2,e=Math.round(o-r.iconHeight/2),s=SimileAjax.Graphics.createTranslucentImage(f),u=this._timeline.getDocument().createElement("div");return u.style.position="absolute",u.style.left=i+"px",u.style.top=e+"px",u.appendChild(s),u.style.cursor="pointer",n._title!=null&&(u.title=n._title),this._eventLayer.appendChild(u),{left:i,top:e,width:r.iconWidth,height:r.iconHeight,elmt:u}},Timeline.DetailedEventPainter.prototype._paintEventLabel=function(n,t,i,r,u,f,e){var c=this._timeline.getDocument(),s=c.createElement("div"),o,h;return s.style.position="absolute",s.style.left=i+"px",s.style.width=u+"px",s.style.top=r+"px",s.style.height=f+"px",s.style.backgroundColor=e.event.label.backgroundColor,SimileAjax.Graphics.setOpacity(s,e.event.label.backgroundOpacity),this._eventLayer.appendChild(s),o=c.createElement("div"),o.style.position="absolute",o.style.left=i+"px",o.style.width=u+"px",o.style.top=r+"px",o.innerHTML=t,o.style.cursor="pointer",n._title!=null&&(o.title=n._title),h=n.getTextColor(),h==null&&(h=n.getColor()),h!=null&&(o.style.color=h),this._eventLayer.appendChild(o),{left:i,top:r,width:u,height:f,elmt:o}},Timeline.DetailedEventPainter.prototype._paintEventTape=function(n,t,i,r,u,f,e,o){var c=r-i,h=o.event.tape.height,a=e.trackOffset+t*e.trackIncrement+e.trackHeight/2,l=Math.round(a-h/2),s=this._timeline.getDocument().createElement("div");return s.style.position="absolute",s.style.left=i+"px",s.style.width=c+"px",s.style.top=l+"px",s.style.height=h+"px",s.style.backgroundColor=u,s.style.overflow="hidden",s.style.cursor="pointer",n._title!=null&&(s.title=n._title),SimileAjax.Graphics.setOpacity(s,f),this._eventLayer.appendChild(s),{left:i,top:l,width:c,height:h,elmt:s}},Timeline.DetailedEventPainter.prototype._createHighlightDiv=function(n,t,i){if(n>=0){var f=this._timeline.getDocument(),u=i.event,e=u.highlightColors[Math.min(n,u.highlightColors.length-1)],r=f.createElement("div");r.style.position="absolute",r.style.overflow="hidden",r.style.left=t.left-2+"px",r.style.width=t.width+4+"px",r.style.top=t.top-2+"px",r.style.height=t.height+4+"px",r.style.background=e,this._highlightLayer.appendChild(r)}},Timeline.DetailedEventPainter.prototype._onClickInstantEvent=function(n,t,i){var r=SimileAjax.DOM.getPageCoordinates(n);return this._showBubble(r.left+Math.ceil(n.offsetWidth/2),r.top+Math.ceil(n.offsetHeight/2),i),this._fireOnSelect(i.getID()),t.cancelBubble=!0,SimileAjax.DOM.cancelEvent(t),!1},Timeline.DetailedEventPainter.prototype._onClickDurationEvent=function(n,t,i){var r,u;if("pageX"in t)r=t.pageX,u=t.pageY;else var f=SimileAjax.DOM.getPageCoordinates(n),r=t.offsetX+f.left,u=t.offsetY+f.top;return this._showBubble(r,u,i),this._fireOnSelect(i.getID()),t.cancelBubble=!0,SimileAjax.DOM.cancelEvent(t),!1},Timeline.DetailedEventPainter.prototype.showBubble=function(n){var t=this._eventIdToElmt[n.getID()],i;t&&(i=SimileAjax.DOM.getPageCoordinates(t),this._showBubble(i.left+t.offsetWidth/2,i.top+t.offsetHeight/2,n))},Timeline.DetailedEventPainter.prototype._showBubble=function(n,t,i){var r=document.createElement("div"),u=this._params.theme.event.bubble;i.fillInfoBubble(r,this._params.theme,this._band.getLabeller()),SimileAjax.WindowManager.cancelPopups(),SimileAjax.Graphics.createBubbleForContentAndPoint(r,n,t,u.width,null,u.maxHeight)},Timeline.DetailedEventPainter.prototype._fireOnSelect=function(n){for(var t=0;ti;r++)t=this._zones[r],it.startTime&&(this._zones.splice(r,0,{startTime:t.startTime,endTime:i,unit:t.unit,multiple:t.multiple}),r++,t.startTime=i),f=0;){if(e.getTime()>this._zones[t].startTime)break;t--}for(r=i;r<=t;r++){var n=this._zones[r],u=new Date(Math.max(f.getTime(),n.startTime)),s=new Date(Math.min(e.getTime(),n.endTime));for(SimileAjax.DateTime.roundDownToInterval(u,n.unit,o,n.multiple,this._theme.firstDayOfWeek),SimileAjax.DateTime.roundUpToInterval(s,n.unit,o,n.multiple,this._theme.firstDayOfWeek);u.getTime()0&&(i=t-1),!n&&t0;u++)i=this._zones[u],this._unit.compare(r,i.endTime)<0&&(this._unit.compare(r,i.startTime)>0&&(this._zones.splice(u,0,{startTime:i.startTime,endTime:r,magnify:i.magnify}),u++,i.startTime=r),this._unit.compare(f,i.endTime)<0?(this._zones.splice(u,0,{startTime:r,endTime:f,magnify:o.magnify*i.magnify}),u++,i.startTime=f,r=f):(i.magnify*=o.magnify,r=i.endTime))}"startsOn"in this._params?this._start=this._unit.parseFromObject(this._params.startsOn):"endsOn"in this._params?(this._start=this._unit.parseFromObject(this._params.endsOn),this.shiftPixels(-this._timeline.getPixelLength())):"centersOn"in this._params?(this._start=this._unit.parseFromObject(this._params.centersOn),this.shiftPixels(-this._timeline.getPixelLength()/2)):(this._start=this._unit.makeDefaultValue(),this.shiftPixels(-this._timeline.getPixelLength()/2))},Timeline.HotZoneEther.prototype.setDate=function(n){this._start=this._unit.cloneValue(n)},Timeline.HotZoneEther.prototype.shiftPixels=function(n){this._start=this.pixelOffsetToDate(n)},Timeline.HotZoneEther.prototype.dateToPixelOffset=function(n){return this._dateDiffToPixelOffset(this._start,n)},Timeline.HotZoneEther.prototype.pixelOffsetToDate=function(n){return this._pixelOffsetToDate(n,this._start)},Timeline.HotZoneEther.prototype.zoom=function(n){var t=this._band._zoomIndex,i=t;return n&&t>0&&(i=t-1),!n&&t=0;){if(this._unit.compare(r,this._zones[i].startTime)>0)break;i--}while(this._unit.compare(r,e)>0)u=this._zones[i],f=this._unit.later(e,u.startTime),o+=this._unit.compare(f,r)/(s/u.magnify),r=f,i--}return o},Timeline.HotZoneEther.prototype._pixelOffsetToDate=function(n,t){var o=this._getScale(),i=t,r,u,f,e;if(n>0){for(r=0;r0)u=this._zones[r],f=o/u.magnify,u.endTime==Number.POSITIVE_INFINITY?(i=this._unit.change(i,n*f),n=0):(e=this._unit.compare(u.endTime,i)/f,e>n?(i=this._unit.change(i,n*f),n=0):(i=u.endTime,n-=e)),r++}else{for(r=this._zones.length-1;r>=0;){if(this._unit.compare(i,this._zones[r].startTime)>0)break;r--}for(n=-n;n>0;)u=this._zones[r],f=o/u.magnify,u.startTime==Number.NEGATIVE_INFINITY?(i=this._unit.change(i,-n*f),n=0):(e=this._unit.compare(i,u.startTime)/f,e>n?(i=this._unit.change(i,-n*f),n=0):(i=u.startTime,n-=e)),r--}return i},Timeline.HotZoneEther.prototype._getScale=function(){return this._interval/this._pixelsPerInterval},Timeline.EventUtils={},Timeline.EventUtils.getNewEventID=function(){return this._lastEventID==null&&(this._lastEventID=0),this._lastEventID+=1,"e"+this._lastEventID},Timeline.EventUtils.decodeEventElID=function(n){var t=n.split("-");if(t[1]!="tl")return alert("Internal Timeline problem 101, please consult support"),{band:null,evt:null};var r=Timeline.getTimelineFromID(t[2]),i=r.getBand(t[3]),u=i.getEventSource.getEvent(t[4]);return{band:i,evt:u}},Timeline.EventUtils.encodeEventElID=function(n,t,i,r){return i+"-tl-"+n.timelineID+"-"+t.getIndex()+"-"+r.getID()},Timeline.GregorianDateLabeller=function(n,t){this._locale=n,this._timeZone=t},Timeline.GregorianDateLabeller.monthNames=[],Timeline.GregorianDateLabeller.dayNames=[],Timeline.GregorianDateLabeller.labelIntervalFunctions=[],Timeline.GregorianDateLabeller.getMonthName=function(n,t){return Timeline.GregorianDateLabeller.monthNames[t][n]},Timeline.GregorianDateLabeller.prototype.labelInterval=function(n,t){var i=Timeline.GregorianDateLabeller.labelIntervalFunctions[this._locale];return i==null&&(i=Timeline.GregorianDateLabeller.prototype.defaultLabelInterval),i.call(this,n,t)},Timeline.GregorianDateLabeller.prototype.labelPrecise=function(n){return SimileAjax.DateTime.removeTimeZoneOffset(n,this._timeZone).toUTCString()},Timeline.GregorianDateLabeller.prototype.defaultLabelInterval=function(n,t){var i,f=!1,r,u;n=SimileAjax.DateTime.removeTimeZoneOffset(n,this._timeZone);switch(t){case SimileAjax.DateTime.MILLISECOND:i=n.getUTCMilliseconds();break;case SimileAjax.DateTime.SECOND:i=n.getUTCSeconds();break;case SimileAjax.DateTime.MINUTE:r=n.getUTCMinutes(),r==0?(i=n.getUTCHours()+":00",f=!0):i=r;break;case SimileAjax.DateTime.HOUR:i=n.getUTCHours()+"hr";break;case SimileAjax.DateTime.DAY:i=Timeline.GregorianDateLabeller.getMonthName(n.getUTCMonth(),this._locale)+" "+n.getUTCDate();break;case SimileAjax.DateTime.WEEK:i=Timeline.GregorianDateLabeller.getMonthName(n.getUTCMonth(),this._locale)+" "+n.getUTCDate();break;case SimileAjax.DateTime.MONTH:if(r=n.getUTCMonth(),r!=0){i=Timeline.GregorianDateLabeller.getMonthName(r,this._locale);break}case SimileAjax.DateTime.YEAR:case SimileAjax.DateTime.DECADE:case SimileAjax.DateTime.CENTURY:case SimileAjax.DateTime.MILLENNIUM:u=n.getUTCFullYear(),i=u>0?n.getUTCFullYear():1-u+"BC",f=t==SimileAjax.DateTime.MONTH||t==SimileAjax.DateTime.DECADE&&u%100==0||t==SimileAjax.DateTime.CENTURY&&u%1e3==0;break;default:i=n.toUTCString()}return{text:i,emphasized:f}},Timeline.OriginalEventPainter=function(n){this._params=n,this._onSelectListeners=[],this._eventPaintListeners=[],this._filterMatcher=null,this._highlightMatcher=null,this._frc=null,this._eventIdToElmt={}},Timeline.OriginalEventPainter.prototype.initialize=function(n,t){this._band=n,this._timeline=t,this._backLayer=null,this._eventLayer=null,this._lineLayer=null,this._highlightLayer=null,this._eventIdToElmt=null},Timeline.OriginalEventPainter.prototype.getType=function(){return"original"},Timeline.OriginalEventPainter.prototype.addOnSelectListener=function(n){this._onSelectListeners.push(n)},Timeline.OriginalEventPainter.prototype.removeOnSelectListener=function(n){for(var t=0;tt)break;return i},Timeline.OriginalEventPainter.prototype._paintEventIcon=function(n,t,i,r,u,f){var o=n.getIcon(),s,h,c,e;return o=o!=null?o:r.icon,f>0?s=r.trackOffset+t*r.trackIncrement+f+r.impreciseIconMargin:(h=r.trackOffset+t*r.trackIncrement+r.trackHeight/2,s=Math.round(h-r.iconHeight/2)),c=SimileAjax.Graphics.createTranslucentImage(o),e=this._timeline.getDocument().createElement("div"),e.className=this._getElClassName("timeline-event-icon",n,"icon"),e.id=this._encodeEventElID("icon",n),e.style.left=i+"px",e.style.top=s+"px",e.appendChild(c),n._title!=null&&(e.title=n._title),this._eventLayer.appendChild(e),{left:i,top:s,width:r.iconWidth,height:r.iconHeight,elmt:e}},Timeline.OriginalEventPainter.prototype._paintEventLabel=function(n,t,i,r,u,f,e,o,s){var l=this._timeline.getDocument(),h=l.createElement("div"),c;return h.className=o,h.id=this._encodeEventElID("label",n),h.style.left=i+"px",h.style.width=u+"px",h.style.top=r+"px",h.innerHTML=t,n._title!=null&&(h.title=n._title),c=n.getTextColor(),c==null&&(c=n.getColor()),c!=null&&(h.style.color=c),e.event.highlightLabelBackground&&s>=0&&(h.style.background=this._getHighlightColor(s,e)),this._eventLayer.appendChild(h),{left:i,top:r,width:u,height:f,elmt:h}},Timeline.OriginalEventPainter.prototype._paintEventTape=function(n,t,i,r,u,f,e,o,s){var a=r-i,v=o.event.tape.height,y=e.trackOffset+t*e.trackIncrement,h=this._timeline.getDocument().createElement("div"),l,c;return h.className=this._getElClassName("timeline-event-tape",n,"tape"),h.id=this._encodeEventElID("tape"+s,n),h.style.left=i+"px",h.style.width=a+"px",h.style.height=v+"px",h.style.top=y+"px",n._title!=null&&(h.title=n._title),u!=null&&(h.style.backgroundColor=u),l=n.getTapeImage(),c=n.getTapeRepeat(),c=c!=null?c:"repeat",l!=null&&(h.style.backgroundImage="url("+l+")",h.style.backgroundRepeat=c),SimileAjax.Graphics.setOpacity(h,f),this._eventLayer.appendChild(h),{left:i,top:y,width:a,height:v,elmt:h}},Timeline.OriginalEventPainter.prototype._getLabelDivClassName=function(n){return this._getElClassName("timeline-event-label",n,"label")},Timeline.OriginalEventPainter.prototype._getElClassName=function(n,t,i){var u=t.getClassName(),r=[];return u&&(i&&r.push(i+"-"+u+" "),r.push(u+" ")),r.push(n),r.join("")},Timeline.OriginalEventPainter.prototype._getHighlightColor=function(n,t){var i=t.event.highlightColors;return i[Math.min(n,i.length-1)]},Timeline.OriginalEventPainter.prototype._createHighlightDiv=function(n,t,i,r){var u=null,f,e;return n>=0&&(f=this._timeline.getDocument(),e=this._getHighlightColor(n,i),u=f.createElement("div"),u.className=this._getElClassName("timeline-event-highlight",r,"highlight"),u.id=this._encodeEventElID("highlight0",r),u.style.position="absolute",u.style.overflow="hidden",u.style.left=t.left-2+"px",u.style.width=t.width+4+"px",u.style.top=t.top-2+"px",u.style.height=t.height+4+"px",u.style.background=e,this._highlightLayer.appendChild(u)),u},Timeline.OriginalEventPainter.prototype._onClickInstantEvent=function(n,t,i){var r=SimileAjax.DOM.getPageCoordinates(n);return this._showBubble(r.left+Math.ceil(n.offsetWidth/2),r.top+Math.ceil(n.offsetHeight/2),i),this._fireOnSelect(i.getID()),t.cancelBubble=!0,SimileAjax.DOM.cancelEvent(t),!1},Timeline.OriginalEventPainter.prototype._onClickDurationEvent=function(n,t,i){var r,u;if("pageX"in t)r=t.pageX,u=t.pageY;else var f=SimileAjax.DOM.getPageCoordinates(n),r=t.offsetX+f.left,u=t.offsetY+f.top;return this._showBubble(r,u,i),this._fireOnSelect(i.getID()),t.cancelBubble=!0,SimileAjax.DOM.cancelEvent(t),!1},Timeline.OriginalEventPainter.prototype.showBubble=function(n){var t=this._eventIdToElmt[n.getID()],i;t&&(i=SimileAjax.DOM.getPageCoordinates(t),this._showBubble(i.left+t.offsetWidth/2,i.top+t.offsetHeight/2,n))},Timeline.OriginalEventPainter.prototype._showBubble=function(n,t,i){var r=document.createElement("div"),u=this._params.theme.event.bubble;i.fillInfoBubble(r,this._params.theme,this._band.getLabeller()),SimileAjax.WindowManager.cancelPopups(),SimileAjax.Graphics.createBubbleForContentAndPoint(r,n,t,u.width,null,u.maxHeight)},Timeline.OriginalEventPainter.prototype._fireOnSelect=function(n){for(var t=0;t=0){var f=this._timeline.getDocument(),u=i.event,e=u.highlightColors[Math.min(n,u.highlightColors.length-1)],r=f.createElement("div");r.style.position="absolute",r.style.overflow="hidden",r.style.left=t.left-1+"px",r.style.width=t.width+2+"px",r.style.top=t.top-1+"px",r.style.height=t.height+2+"px",r.style.background=e,this._highlightLayer.appendChild(r)}},Timeline.OverviewEventPainter.prototype.showBubble=function(){},Timeline.DefaultEventSource=function(n){this._events=n instanceof Object?n:new SimileAjax.EventIndex,this._listeners=[]},Timeline.DefaultEventSource.prototype.addListener=function(n){this._listeners.push(n)},Timeline.DefaultEventSource.prototype.removeListener=function(n){for(var t=0;t0?n:n.substr(0,1)=="/"?t.substr(0,t.indexOf("/",t.indexOf("://")+3))+n:t+n},Timeline.DefaultEventSource.Event=function(n){function t(t){return n[t]!=null&&n[t]!=""?n[t]:null}var r=n.id?n.id.trim():"",i;this._id=r.length>0?r:Timeline.EventUtils.getNewEventID(),this._instant=n.instant||n.end==null,this._start=n.start,this._end=n.end!=null?n.end:n.start,this._latestStart=n.latestStart!=null?n.latestStart:n.instant?this._end:this._start,this._earliestEnd=n.earliestEnd!=null?n.earliestEnd:this._end,i=[],this._start>this._latestStart&&(this._latestStart=this._start,i.push("start is > latestStart")),this._start>this._earliestEnd&&(this._earliestEnd=this._latestStart,i.push("start is > earliestEnd")),this._start>this._end&&(this._end=this._earliestEnd,i.push("start is > end")),this._latestStart>this._earliestEnd&&(this._earliestEnd=this._latestStart,i.push("latestStart is > earliestEnd")),this._latestStart>this._end&&(this._end=this._earliestEnd,i.push("latestStart is > end")),this._earliestEnd>this._end&&(this._end=this._earliestEnd,i.push("earliestEnd is > end")),this._eventID=t("eventID"),this._text=n.text!=null?SimileAjax.HTML.deEntify(n.text):"",i.length>0&&(this._text+=" PROBLEM: "+i.join(", ")),this._description=SimileAjax.HTML.deEntify(n.description),this._image=t("image"),this._link=t("link"),this._title=t("hoverText"),this._title=t("caption"),this._icon=t("icon"),this._color=t("color"),this._textColor=t("textColor"),this._classname=t("classname"),this._tapeImage=t("tapeImage"),this._tapeRepeat=t("tapeRepeat"),this._trackNum=t("trackNum"),this._trackNum!=null&&(this._trackNum=parseInt(this._trackNum)),this._wikiURL=null,this._wikiSection=null},Timeline.DefaultEventSource.Event.prototype={getID:function(){return this._id},isInstant:function(){return this._instant},isImprecise:function(){return this._start!=this._latestStart||this._end!=this._earliestEnd},getStart:function(){return this._start},getEnd:function(){return this._end},getLatestStart:function(){return this._latestStart},getEarliestEnd:function(){return this._earliestEnd},getEventID:function(){return this._eventID},getText:function(){return this._text},getDescription:function(){return this._description},getImage:function(){return this._image},getLink:function(){return this._link},getIcon:function(){return this._icon},getColor:function(){return this._color},getTextColor:function(){return this._textColor},getClassName:function(){return this._classname},getTapeImage:function(){return this._tapeImage},getTapeRepeat:function(){return this._tapeRepeat},getTrackNum:function(){return this._trackNum},getProperty:function(){return null},getWikiURL:function(){return this._wikiURL},getWikiSection:function(){return this._wikiSection},setWikiInfo:function(n,t){this._wikiURL=n,this._wikiSection=t},fillDescription:function(n){n.innerHTML=this._description},fillWikiInfo:function(n){var t,r,i;(n.style.display="none",this._wikiURL!=null&&this._wikiSection!=null)&&(t=this.getProperty("wikiID"),(t==null||t.length==0)&&(t=this.getText()),t!=null&&t.length!=0)&&(n.style.display="inline",t=t.replace(/\s/g,"_"),r=this._wikiURL+this._wikiSection.replace(/\s/g,"_")+"/"+t,i=document.createElement("a"),i.href=r,i.target="new",i.innerHTML=Timeline.strings[Timeline.clientLocale].wikiLinkLabel,n.appendChild(document.createTextNode("[")),n.appendChild(i),n.appendChild(document.createTextNode("]")))},fillTime:function(n,t){this._instant?this.isImprecise()?(n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._start))),n.appendChild(n.ownerDocument.createElement("br")),n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._end)))):n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._start))):this.isImprecise()?(n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._start)+" ~ "+t.labelPrecise(this._latestStart))),n.appendChild(n.ownerDocument.createElement("br")),n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._earliestEnd)+" ~ "+t.labelPrecise(this._end)))):(n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._start))),n.appendChild(n.ownerDocument.createElement("br")),n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._end))))},fillInfoBubble:function(n,t,i){var r=n.ownerDocument,v=this.getText(),l=this.getLink(),a=this.getImage(),f,u,c,e,o,s,h;a!=null&&(f=r.createElement("img"),f.src=a,t.event.bubble.imageStyler(f),n.appendChild(f)),u=r.createElement("div"),c=r.createTextNode(v),l!=null?(e=r.createElement("a"),e.href=l,e.appendChild(c),u.appendChild(e)):u.appendChild(c),t.event.bubble.titleStyler(u),n.appendChild(u),o=r.createElement("div"),this.fillDescription(o),t.event.bubble.bodyStyler(o),n.appendChild(o),s=r.createElement("div"),this.fillTime(s,i),t.event.bubble.timeStyler(s),n.appendChild(s),h=r.createElement("div"),this.fillWikiInfo(h),t.event.bubble.wikiStyler(h),n.appendChild(h)}},Timeline.ClassicTheme={},Timeline.ClassicTheme.implementations=[],Timeline.ClassicTheme.create=function(n){n==null&&(n=Timeline.getDefaultLocale());var t=Timeline.ClassicTheme.implementations[n];return t==null&&(t=Timeline.ClassicTheme._Impl),new t},Timeline.ClassicTheme._Impl=function(){this.firstDayOfWeek=0,this.autoWidth=!1,this.autoWidthAnimationTime=500,this.timeline_start=null,this.timeline_stop=null,this.ether={backgroundColors:[],highlightOpacity:50,interval:{line:{show:!0,opacity:25},weekend:{opacity:30},marker:{hAlign:"Bottom",vAlign:"Right"}}},this.event={track:{height:10,gap:2,offset:2,autoWidthMargin:1.5},overviewTrack:{offset:20,tickHeight:6,height:2,gap:1,autoWidthMargin:5},tape:{height:4},instant:{icon:Timeline.urlPrefix+"images/dull-blue-circle.png",iconWidth:10,iconHeight:10,impreciseOpacity:20,impreciseIconMargin:3},duration:{impreciseOpacity:20},label:{backgroundOpacity:50,offsetFromLine:3},highlightColors:["#FFFF00","#FFC000","#FF0000","#0000FF"],highlightLabelBackground:!1,bubble:{width:250,maxHeight:0,titleStyler:function(n){n.className="timeline-event-bubble-title"},bodyStyler:function(n){n.className="timeline-event-bubble-body"},imageStyler:function(n){n.className="timeline-event-bubble-image"},wikiStyler:function(n){n.className="timeline-event-bubble-wiki"},timeStyler:function(n){n.className="timeline-event-bubble-time"}}},this.mouseWheel="scroll"},Timeline.version="2.3.0",Timeline.ajax_lib_version=SimileAjax.version,Timeline.display_version=Timeline.version+" (with Ajax lib "+Timeline.ajax_lib_version+")",Timeline.strings={},Timeline.HORIZONTAL=0,Timeline.VERTICAL=1,Timeline._defaultTheme=null,Timeline.getDefaultLocale=function(){return Timeline.clientLocale},Timeline.create=function(n,t,i,r){var u,f;return Timeline.timelines==null&&(Timeline.timelines=[]),u=Timeline.timelines.length,Timeline.timelines[u]=null,f=new Timeline._Impl(n,t,i,r,u),Timeline.timelines[u]=f,f},Timeline.createBandInfo=function(n){var r="theme"in n?n.theme:Timeline.getDefaultTheme(),e="eventSource"in n?n.eventSource:null,o=new Timeline.LinearEther({centersOn:"date"in n?n.date:new Date,interval:SimileAjax.DateTime.gregorianUnitLengths[n.intervalUnit],pixelsPerInterval:n.intervalPixels,theme:r}),s=new Timeline.GregorianEtherPainter({unit:n.intervalUnit,multiple:"multiple"in n?n.multiple:1,theme:r,align:"align"in n?n.align:undefined}),t={showText:"showEventText"in n?n.showEventText:!0,theme:r},u,f,i;if("eventPainterParams"in n)for(u in n.eventPainterParams)t[u]=n.eventPainterParams[u];if("trackHeight"in n&&(t.trackHeight=n.trackHeight),"trackGap"in n&&(t.trackGap=n.trackGap),f="overview"in n&&n.overview?"overview":"layout"in n?n.layout:"original","eventPainter"in n)i=new n.eventPainter(t);else switch(f){case"overview":i=new Timeline.OverviewEventPainter(t);break;case"detailed":i=new Timeline.DetailedEventPainter(t);break;default:i=new Timeline.OriginalEventPainter(t)}return{width:n.width,eventSource:e,timeZone:"timeZone"in n?n.timeZone:0,ether:o,etherPainter:s,eventPainter:i,theme:r,zoomIndex:"zoomIndex"in n?n.zoomIndex:0,zoomSteps:"zoomSteps"in n?n.zoomSteps:null}},Timeline.createHotZoneBandInfo=function(n){var r="theme"in n?n.theme:Timeline.getDefaultTheme(),e="eventSource"in n?n.eventSource:null,o=new Timeline.HotZoneEther({centersOn:"date"in n?n.date:new Date,interval:SimileAjax.DateTime.gregorianUnitLengths[n.intervalUnit],pixelsPerInterval:n.intervalPixels,zones:n.zones,theme:r}),s=new Timeline.HotZoneGregorianEtherPainter({unit:n.intervalUnit,zones:n.zones,theme:r,align:"align"in n?n.align:undefined}),t={showText:"showEventText"in n?n.showEventText:!0,theme:r},u,f,i;if("eventPainterParams"in n)for(u in n.eventPainterParams)t[u]=n.eventPainterParams[u];if("trackHeight"in n&&(t.trackHeight=n.trackHeight),"trackGap"in n&&(t.trackGap=n.trackGap),f="overview"in n&&n.overview?"overview":"layout"in n?n.layout:"original","eventPainter"in n)i=new n.eventPainter(t);else switch(f){case"overview":i=new Timeline.OverviewEventPainter(t);break;case"detailed":i=new Timeline.DetailedEventPainter(t);break;default:i=new Timeline.OriginalEventPainter(t)}return{width:n.width,eventSource:e,timeZone:"timeZone"in n?n.timeZone:0,ether:o,etherPainter:s,eventPainter:i,theme:r,zoomIndex:"zoomIndex"in n?n.zoomIndex:0,zoomSteps:"zoomSteps"in n?n.zoomSteps:null}},Timeline.getDefaultTheme=function(){return Timeline._defaultTheme==null&&(Timeline._defaultTheme=Timeline.ClassicTheme.create(Timeline.getDefaultLocale())),Timeline._defaultTheme},Timeline.setDefaultTheme=function(n){Timeline._defaultTheme=n},Timeline.loadXML=function(n,t){var i=function(t){alert("Failed to load data xml from "+n+"\n"+t)},r=function(i){var r=i.responseXML;!r.documentElement&&i.responseStream&&r.load(i.responseStream),t(r,n)};SimileAjax.XmlHttp.get(n,i,r)},Timeline.loadJSON=function(n,t){var i=function(t){alert("Failed to load json data from "+n+"\n"+t)},r=function(xmlhttp){t(eval("("+xmlhttp.responseText+")"),n)};SimileAjax.XmlHttp.get(n,i,r)},Timeline.getTimelineFromID=function(n){return Timeline.timelines[n]},Timeline.writeVersion=function(n){document.getElementById(n).innerHTML=this.display_version},Timeline._Impl=function(n,t,i,r,u){SimileAjax.WindowManager.initialize(),this._containerDiv=n,this._bandInfos=t,this._orientation=i==null?Timeline.HORIZONTAL:i,this._unit=r!=null?r:SimileAjax.NativeDateUnit,this._starting=!0,this._autoResizing=!1,this.autoWidth=t&&t[0]&&t[0].theme&&t[0].theme.autoWidth,this.autoWidthAnimationTime=t&&t[0]&&t[0].theme&&t[0].theme.autoWidthAnimationTime,this.timelineID=u,this.timeline_start=t&&t[0]&&t[0].theme&&t[0].theme.timeline_start,this.timeline_stop=t&&t[0]&&t[0].theme&&t[0].theme.timeline_stop,this.timeline_at_start=!1,this.timeline_at_stop=!1,this._initialize()},Timeline._Impl.prototype.dispose=function(){for(var n=0;ne||n)&&(i=f,u(),t._distributeWidths())}}var t=this,r=t._starting,i=0;t.autoWidth&&f()},Timeline._Impl.prototype._initialize=function(){var t=this._containerDiv,o=t.ownerDocument,f,r,e,u,n,i;for(t.className=t.className.split(" ").concat("timeline-container").join(" "),f=this.isHorizontal()?"horizontal":"vertical",t.className+=" timeline-"+f;t.firstChild;)t.removeChild(t.firstChild);for(r=SimileAjax.Graphics.createTranslucentImage(Timeline.urlPrefix+(this.isHorizontal()?"images/copyright-vertical.png":"images/copyright.png")),r.className="timeline-copyright",r.title="Timeline copyright SIMILE - www.code.google.com/p/simile-widgets/",SimileAjax.DOM.registerEvent(r,"click",function(){window.location="http://code.google.com/p/simile-widgets/"}),t.appendChild(r),this._bands=[],n=0;n Loading...",this.showLoadingMessage=function(){i.containerDiv.style.display="block"},this.hideLoadingMessage=function(){i.containerDiv.style.display="none"}},Timeline._Impl.prototype._distributeWidths=function(){for(var o=this.getPixelLength(),s=this.getPixelWidth(),u=0,r,e,n=0;n0?(e=parseInt(t.substr(0,r)),i=Math.round(e*s/100)):i=parseInt(t)):i=t,f.setBandShiftAndWidth(u,i),f.setViewLength(o),u+=i}},Timeline._Impl.prototype.shiftOK=function(n,t){var f=t>0,o=t<0,e,r,i,u;if(f&&this.timeline_start==null||o&&this.timeline_stop==null||t==0)return!0;for(e=!1,i=0;i=this.timeline_start:(i==n?u.getMaxVisibleDateAfterDelta(t):u.getMaxVisibleDate())<=this.timeline_stop;return f?(this.timeline_at_start=!r,this.timeline_at_stop=!1):(this.timeline_at_stop=!r,this.timeline_at_start=!1),r},Timeline._Impl.prototype.zoom=function(n,t,i,r){var e=new RegExp("^timeline-band-([0-9]+)$"),u=null,f=e.exec(r.id);f&&(u=parseInt(f[1])),u!=null&&this._bands[u].zoom(n,t,i,r),this.paint()},Timeline.NativeDateUnit={},Timeline.NativeDateUnit.createLabeller=function(n,t){return new Timeline.GregorianDateLabeller(n,t)},Timeline.NativeDateUnit.makeDefaultValue=function(){return new Date},Timeline.NativeDateUnit.cloneValue=function(n){return new Date(n.getTime())},Timeline.NativeDateUnit.getParser=function(n){return typeof n=="string"&&(n=n.toLowerCase()),n=="iso8601"||n=="iso 8601"?Timeline.DateTime.parseIso8601DateTime:Timeline.DateTime.parseGregorianDateTime},Timeline.NativeDateUnit.parseFromObject=function(n){return Timeline.DateTime.parseGregorianDateTime(n)},Timeline.NativeDateUnit.toNumber=function(n){return n.getTime()},Timeline.NativeDateUnit.fromNumber=function(n){return new Date(n)},Timeline.NativeDateUnit.compare=function(n,t){var i,r;return i=typeof n=="object"?n.getTime():Number(n),r=typeof t=="object"?t.getTime():Number(t),i-r},Timeline.NativeDateUnit.earlier=function(n,t){return Timeline.NativeDateUnit.compare(n,t)<0?n:t},Timeline.NativeDateUnit.later=function(n,t){return Timeline.NativeDateUnit.compare(n,t)>0?n:t},Timeline.NativeDateUnit.change=function(n,t){return new Date(n.getTime()+t)},Timeline.strings.en={wikiLinkLabel:"Discuss"},Timeline.GregorianDateLabeller.monthNames.en=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Timeline.GregorianDateLabeller.dayNames.en=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; +window.SimileAjax={loaded:!0,loadingScriptsCount:0,error:null,params:{bundle:"true"},Platform:{}},SimileAjax.version="pre 2.3.0",SimileAjax.jQuery=jQuery.noConflict(!0),typeof window.$=="undefined"&&(window.$=SimileAjax.jQuery),SimileAjax.Platform.os={isMac:!1,isWin:!1,isWin32:!1,isUnix:!1},SimileAjax.Platform.browser={isIE:!1,isNetscape:!1,isMozilla:!1,isFirefox:!1,isOpera:!1,isSafari:!1,majorVersion:0,minorVersion:0},function(){var u=navigator.appName.toLowerCase(),n=navigator.userAgent.toLowerCase(),i,r,t;SimileAjax.Platform.os.isMac=n.indexOf("mac")!=-1,SimileAjax.Platform.os.isWin=n.indexOf("win")!=-1,SimileAjax.Platform.os.isWin32=SimileAjax.Platform.isWin&&(n.indexOf("95")!=-1||n.indexOf("98")!=-1||n.indexOf("nt")!=-1||n.indexOf("win32")!=-1||n.indexOf("32bit")!=-1),SimileAjax.Platform.os.isUnix=n.indexOf("x11")!=-1,SimileAjax.Platform.browser.isIE=u.indexOf("microsoft")!=-1,SimileAjax.Platform.browser.isNetscape=u.indexOf("netscape")!=-1,SimileAjax.Platform.browser.isMozilla=n.indexOf("mozilla")!=-1,SimileAjax.Platform.browser.isFirefox=n.indexOf("firefox")!=-1,SimileAjax.Platform.browser.isOpera=u.indexOf("opera")!=-1,SimileAjax.Platform.browser.isSafari=u.indexOf("safari")!=-1,i=function(n){var t=n.split(".");SimileAjax.Platform.browser.majorVersion=parseInt(t[0]),SimileAjax.Platform.browser.minorVersion=parseInt(t[1])},r=function(n,t,i){var r=n.indexOf(t,i);return r>=0?r:n.length},SimileAjax.Platform.browser.isMozilla&&(t=n.indexOf("mozilla/"),t>=0&&i(n.substring(t+8,r(n," ",t)))),SimileAjax.Platform.browser.isIE&&(t=n.indexOf("msie "),t>=0&&i(n.substring(t+5,r(n,";",t)))),SimileAjax.Platform.browser.isNetscape&&(t=n.indexOf("rv:"),t>=0&&i(n.substring(t+3,r(n,")",t)))),SimileAjax.Platform.browser.isFirefox&&(t=n.indexOf("firefox/"),t>=0&&i(n.substring(t+8,r(n," ",t)))),"localeCompare"in String.prototype||(String.prototype.localeCompare=function(n){return thisn?1:0})}(),SimileAjax.Platform.getDefaultLocale=function(){return SimileAjax.Platform.clientLocale},SimileAjax.ListenerQueue=function(n){this._listeners=[],this._wildcardHandlerName=n},SimileAjax.ListenerQueue.prototype.add=function(n){this._listeners.push(n)},SimileAjax.ListenerQueue.prototype.remove=function(n){for(var i=this._listeners,t=0;t0?this._a[0]:null},SimileAjax.SortedArray.prototype.getLast=function(){return this._a.length>0?this._a[this._a.length-1]:null},SimileAjax.EventIndex=function(n){var t=this;this._unit=n!=null?n:SimileAjax.NativeDateUnit,this._events=new SimileAjax.SortedArray(function(n,i){return t._unit.compare(n.getStart(),i.getStart())}),this._idToEvent={},this._indexed=!0},SimileAjax.EventIndex.prototype.getUnit=function(){return this._unit},SimileAjax.EventIndex.prototype.getEvent=function(n){return this._idToEvent[n]},SimileAjax.EventIndex.prototype.add=function(n){this._events.add(n),this._idToEvent[n.getID()]=n,this._indexed=!1},SimileAjax.EventIndex.prototype.removeAll=function(){this._events.removeAll(),this._idToEvent={},this._indexed=!1},SimileAjax.EventIndex.prototype.getCount=function(){return this._events.length()},SimileAjax.EventIndex.prototype.getIterator=function(n,t){return this._indexed||this._index(),new SimileAjax.EventIndex._Iterator(this._events,n,t,this._unit)},SimileAjax.EventIndex.prototype.getReverseIterator=function(n,t){return this._indexed||this._index(),new SimileAjax.EventIndex._ReverseIterator(this._events,n,t,this._unit)},SimileAjax.EventIndex.prototype.getAllIterator=function(){return new SimileAjax.EventIndex._AllIterator(this._events)},SimileAjax.EventIndex.prototype.getEarliestDate=function(){var n=this._events.getFirst();return n==null?null:n.getStart()},SimileAjax.EventIndex.prototype.getLatestDate=function(){var r=this._events.getLast(),i,n,t;if(r==null)return null;for(this._indexed||this._index(),i=r._earliestOverlapIndex,n=this._events.elementAt(i).getEnd(),t=i+1;t=0&&(this._currentIndex=this._events.elementAt(this._currentIndex-1)._earliestOverlapIndex),this._currentIndex--,this._maxIndex=n.find(function(n){return r.compare(n.getStart(),i)}),this._hasNext=!1,this._next=null,this._findNext()},SimileAjax.EventIndex._Iterator.prototype={hasNext:function(){return this._hasNext},next:function(){if(this._hasNext){var n=this._next;return this._findNext(),n}return null},_findNext:function(){for(var t=this._unit,n;++this._currentIndex0){this._next=n,this._hasNext=!0;return}this._next=null,this._hasNext=!1}},SimileAjax.EventIndex._ReverseIterator=function(n,t,i,r){this._events=n,this._startDate=t,this._endDate=i,this._unit=r,this._minIndex=n.find(function(n){return r.compare(n.getStart(),t)}),this._minIndex-1>=0&&(this._minIndex=this._events.elementAt(this._minIndex-1)._earliestOverlapIndex),this._maxIndex=n.find(function(n){return r.compare(n.getStart(),i)}),this._currentIndex=this._maxIndex,this._hasNext=!1,this._next=null,this._findNext()},SimileAjax.EventIndex._ReverseIterator.prototype={hasNext:function(){return this._hasNext},next:function(){if(this._hasNext){var n=this._next;return this._findNext(),n}return null},_findNext:function(){for(var t=this._unit,n;--this._currentIndex>=this._minIndex;)if(n=this._events.elementAt(this._currentIndex),t.compare(n.getStart(),this._endDate)<0&&t.compare(n.getEnd(),this._startDate)>0){this._next=n,this._hasNext=!0;return}this._next=null,this._hasNext=!1}},SimileAjax.EventIndex._AllIterator=function(n){this._events=n,this._index=0},SimileAjax.EventIndex._AllIterator.prototype={hasNext:function(){return this._index0&&t.length<8)return r=t.indexOf(" "),r>0?(i=parseInt(t.substr(0,r)),f=t.substr(r+1),f.toLowerCase()=="bc"&&(i=1-i)):i=parseInt(t),u=new Date(0),u.setUTCFullYear(i),u;try{return new Date(Date.parse(t))}catch(e){return null}},SimileAjax.DateTime.roundDownToInterval=function(n,t,i,r,u){var h=i*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.HOUR],f=new Date(n.getTime()+h),o=function(n){n.setUTCMilliseconds(0),n.setUTCSeconds(0),n.setUTCMinutes(0),n.setUTCHours(0)},s=function(n){o(n),n.setUTCDate(1),n.setUTCMonth(0)},c,e;switch(t){case SimileAjax.DateTime.MILLISECOND:e=f.getUTCMilliseconds(),f.setUTCMilliseconds(e-e%r);break;case SimileAjax.DateTime.SECOND:f.setUTCMilliseconds(0),e=f.getUTCSeconds(),f.setUTCSeconds(e-e%r);break;case SimileAjax.DateTime.MINUTE:f.setUTCMilliseconds(0),f.setUTCSeconds(0),e=f.getUTCMinutes(),f.setTime(f.getTime()-e%r*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.MINUTE]);break;case SimileAjax.DateTime.HOUR:f.setUTCMilliseconds(0),f.setUTCSeconds(0),f.setUTCMinutes(0),e=f.getUTCHours(),f.setUTCHours(e-e%r);break;case SimileAjax.DateTime.DAY:o(f);break;case SimileAjax.DateTime.WEEK:o(f),c=(f.getUTCDay()+7-u)%7,f.setTime(f.getTime()-c*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.DAY]);break;case SimileAjax.DateTime.MONTH:o(f),f.setUTCDate(1),e=f.getUTCMonth(),f.setUTCMonth(e-e%r);break;case SimileAjax.DateTime.YEAR:s(f),e=f.getUTCFullYear(),f.setUTCFullYear(e-e%r);break;case SimileAjax.DateTime.DECADE:s(f),f.setUTCFullYear(Math.floor(f.getUTCFullYear()/10)*10);break;case SimileAjax.DateTime.CENTURY:s(f),f.setUTCFullYear(Math.floor(f.getUTCFullYear()/100)*100);break;case SimileAjax.DateTime.MILLENNIUM:s(f),f.setUTCFullYear(Math.floor(f.getUTCFullYear()/1e3)*1e3)}n.setTime(f.getTime()-h)},SimileAjax.DateTime.roundUpToInterval=function(n,t,i,r,u){var f=n.getTime();SimileAjax.DateTime.roundDownToInterval(n,t,i,r,u),n.getTime()-1&&(t=t.replace("px","")),i.indexOf("px")>-1&&(i=i.replace("px","")),{w:t,h:i}},SimileAjax.DOM.getStyle=function(n,t){var i;return n.currentStyle?n.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(n,null).getPropertyValue(t):""},SimileAjax.DOM.getEventRelativeCoordinates=function(n,t){var i;return SimileAjax.Platform.browser.isIE?n.type=="mousewheel"?(i=SimileAjax.DOM.getPageCoordinates(t),{x:n.clientX-i.left,y:n.clientY-i.top}):{x:n.offsetX,y:n.offsetY}:(i=SimileAjax.DOM.getPageCoordinates(t),n.type=="DOMMouseScroll"&&SimileAjax.Platform.browser.isFirefox&&SimileAjax.Platform.browser.majorVersion==2?{x:n.screenX-i.left,y:n.screenY-i.top}:{x:n.pageX-i.left,y:n.pageY-i.top})},SimileAjax.DOM.getEventPageCoordinates=function(n){return SimileAjax.Platform.browser.isIE?{x:n.clientX+document.body.scrollLeft,y:n.clientY+document.body.scrollTop}:{x:n.pageX,y:n.pageY}},SimileAjax.DOM.hittest=function(n,t,i){return SimileAjax.DOM._hittest(document.body,n,t,i)},SimileAjax.DOM._hittest=function(n,t,i,r){var a=n.childNodes,e,u,o,s,l;n:for(e=0;e",t.firstChild},SimileAjax.DOM.createDOMFromTemplate=function(n){var t={};return t.elmt=SimileAjax.DOM._createDOMFromTemplate(n,t,null),t},SimileAjax.DOM._createDOMFromTemplate=function(t,i,r){var h,u,o,f,e,c,s;if(t==null)return null;if(typeof t!="object")return h=document.createTextNode(t),r!=null&&r.appendChild(h),h;u=null,"tag"in t?(o=t.tag,r!=null&&(o=="tr"?u=r.insertRow(r.rows.length):o=="td"&&(u=r.insertCell(r.cells.length))),u==null&&(u=o=="input"?SimileAjax.DOM.createInputElement(t.type):document.createElement(o),r!=null&&r.appendChild(u))):(u=t.elmt,r!=null&&r.appendChild(u));for(f in t)if(e=t[f],f=="field")i[e]=u;else if(f=="className")u.className=e;else if(f=="id")u.id=e;else if(f=="title")u.title=e;else if(f!="type"||u.tagName!="input")if(f=="style")for(n in e)c=e[n],n=="float"&&(n=SimileAjax.Platform.browser.isIE?"styleFloat":"cssFloat"),u.style[n]=c;else if(f=="children")for(s=0;s0){if(t.removeAttribute("id"),r in i){u=t.parentNode,u.insertBefore(i[r],t),u.removeChild(t),n[r]=i[r];return}n[r]=t}t.hasChildNodes()&&SimileAjax.DOM._processDOMChildrenConstructedFromString(n,t,i)},SimileAjax.DOM._processDOMChildrenConstructedFromString=function(n,t,i){for(var r=t.firstChild,u;r!=null;)u=r.nextSibling,r.nodeType==1&&SimileAjax.DOM._processDOMConstructedFromString(n,r,i),r=u},SimileAjax.Graphics={},SimileAjax.Graphics.pngIsTranslucent=!SimileAjax.Platform.browser.isIE||SimileAjax.Platform.browser.majorVersion>6,SimileAjax.Graphics.pngIsTranslucent||SimileAjax.includeCssFile(document,SimileAjax.urlPrefix+"styles/graphics-ie6.css"),SimileAjax.Graphics._createTranslucentImage1=function(n,t){var i=document.createElement("img");return i.setAttribute("src",n),t!=null&&(i.style.verticalAlign=t),i},SimileAjax.Graphics._createTranslucentImage2=function(n,t){var i=document.createElement("img");return i.style.width="1px",i.style.height="1px",i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+n+"', sizingMethod='image')",i.style.verticalAlign=t!=null?t:"middle",i},SimileAjax.Graphics.createTranslucentImage=SimileAjax.Graphics.pngIsTranslucent?SimileAjax.Graphics._createTranslucentImage1:SimileAjax.Graphics._createTranslucentImage2,SimileAjax.Graphics._createTranslucentImageHTML1=function(n,t){return'"},SimileAjax.Graphics._createTranslucentImageHTML2=function(n,t){var i="width: 1px; height: 1px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+n+"', sizingMethod='image');"+(t!=null?" vertical-align: "+t+";":"");return"'},SimileAjax.Graphics.createTranslucentImageHTML=SimileAjax.Graphics.pngIsTranslucent?SimileAjax.Graphics._createTranslucentImageHTML1:SimileAjax.Graphics._createTranslucentImageHTML2,SimileAjax.Graphics.setOpacity=function(n,t){if(SimileAjax.Platform.browser.isIE)n.style.filter="progid:DXImageTransform.Microsoft.Alpha(Style=0,Opacity="+t+")";else{var i=(t/100).toString();n.style.opacity=i,n.style.MozOpacity=i}},SimileAjax.Graphics.bubbleConfig={containerCSSClass:"simileAjax-bubble-container",innerContainerCSSClass:"simileAjax-bubble-innerContainer",contentContainerCSSClass:"simileAjax-bubble-contentContainer",borderGraphicSize:50,borderGraphicCSSClassPrefix:"simileAjax-bubble-border-",arrowGraphicTargetOffset:33,arrowGraphicLength:100,arrowGraphicWidth:49,arrowGraphicCSSClassPrefix:"simileAjax-bubble-arrow-",closeGraphicCSSClass:"simileAjax-bubble-close",extraPadding:20},SimileAjax.Graphics.createBubbleForContentAndPoint=function(n,t,i,r,u,f){typeof r!="number"&&(r=300),typeof f!="number"&&(f=0),n.style.position="absolute",n.style.left="-5000px",n.style.top="0px",n.style.width=r+"px",document.body.appendChild(n),window.setTimeout(function(){var e=n.scrollWidth+10,o=n.scrollHeight+10,s=0,h,r;f>0&&o>f&&(o=f,s=e-25),h=SimileAjax.Graphics.createBubbleForPoint(t,i,e,o,u),document.body.removeChild(n),n.style.position="static",n.style.left="",n.style.top="",s>0?(r=document.createElement("div"),n.style.width="",r.style.width=s+"px",r.appendChild(n),h.content.appendChild(r)):(n.style.width=e+"px",h.content.appendChild(n))},200)},SimileAjax.Graphics.createBubbleForPoint=function(n,t,i,r,u){var h,s,l,a;i=parseInt(i,10),r=parseInt(r,10);var f=SimileAjax.Graphics.bubbleConfig,v=SimileAjax.Graphics.pngIsTranslucent?"pngTranslucent":"pngNotTranslucent",w=i+2*f.borderGraphicSize,b=r+2*f.borderGraphicSize,c=function(n){return n+" "+n+"-"+v},e=document.createElement("div");e.className=c(f.containerCSSClass),e.style.width=i+"px",e.style.height=r+"px",h=document.createElement("div"),h.className=c(f.innerContainerCSSClass),e.appendChild(h);var y=function(){o._closed||(document.body.removeChild(o._div),o._doc=null,o._div=null,o._content=null,o._closed=!0)},o={_closed:!1},p=SimileAjax.WindowManager.pushLayer(y,!0,e);return o._div=e,o.close=function(){SimileAjax.WindowManager.popLayer(p)},s=function(n){var t=document.createElement("div");t.className=c(f.borderGraphicCSSClassPrefix+n),h.appendChild(t)},s("top-left"),s("top-right"),s("bottom-left"),s("bottom-right"),s("left"),s("right"),s("top"),s("bottom"),l=document.createElement("div"),l.className=c(f.contentContainerCSSClass),h.appendChild(l),o.content=l,a=document.createElement("div"),a.className=c(f.closeGraphicCSSClass),h.appendChild(a),SimileAjax.WindowManager.registerEventWithObject(a,"click",o,"close"),function(){var w=SimileAjax.Graphics.getWindowDimensions(),y=w.w,p=w.h,a=Math.ceil(f.arrowGraphicWidth/2),v=function(n){var t=document.createElement("div");return t.className=c(f.arrowGraphicCSSClassPrefix+"point-"+n),h.appendChild(t),t},s,l,o;if(n-a-f.borderGraphicSize-f.extraPadding>0&&n+a+f.borderGraphicSize+f.extraPadding0){o=v("down"),o.style.left=n-a-s+"px",e.style.left=s+"px",e.style.top=t-f.arrowGraphicTargetOffset-r+"px";return}if(u&&u=="bottom"||!u&&t+f.arrowGraphicTargetOffset+r+f.borderGraphicSize+f.extraPadding0?(o=v("right"),o.style.top=t-a-l+"px",e.style.top=l+"px",e.style.left=n-f.arrowGraphicTargetOffset-i+"px"):(o=v("left"),o.style.top=t-a-l+"px",e.style.top=l+"px",e.style.left=n+f.arrowGraphicTargetOffset+"px")}(),document.body.appendChild(e),o},SimileAjax.Graphics.getWindowDimensions=function(){return typeof window.innerHeight=="number"?{w:window.innerWidth,h:window.innerHeight}:document.documentElement&&document.documentElement.clientHeight?{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}:document.body&&document.body.clientHeight?{w:document.body.clientWidth,h:document.body.clientHeight}:void 0},SimileAjax.Graphics.createMessageBubble=function(n){var t=n.createElement("div"),i,o,f,e,u,s,r;return SimileAjax.Graphics.pngIsTranslucent?(i=n.createElement("div"),i.style.height="33px",i.style.background="url("+SimileAjax.urlPrefix+"images/message-top-left.png) top left no-repeat",i.style.paddingLeft="44px",t.appendChild(i),o=n.createElement("div"),o.style.height="33px",o.style.background="url("+SimileAjax.urlPrefix+"images/message-top-right.png) top right no-repeat",i.appendChild(o),f=n.createElement("div"),f.style.background="url("+SimileAjax.urlPrefix+"images/message-left.png) top left repeat-y",f.style.paddingLeft="44px",t.appendChild(f),e=n.createElement("div"),e.style.background="url("+SimileAjax.urlPrefix+"images/message-right.png) top right repeat-y",e.style.paddingRight="44px",f.appendChild(e),r=n.createElement("div"),e.appendChild(r),u=n.createElement("div"),u.style.height="55px",u.style.background="url("+SimileAjax.urlPrefix+"images/message-bottom-left.png) bottom left no-repeat",u.style.paddingLeft="44px",t.appendChild(u),s=n.createElement("div"),s.style.height="55px",s.style.background="url("+SimileAjax.urlPrefix+"images/message-bottom-right.png) bottom right no-repeat",u.appendChild(s)):(t.style.border="2px solid #7777AA",t.style.padding="20px",t.style.background="white",SimileAjax.Graphics.setOpacity(t,90),r=n.createElement("div"),t.appendChild(r)),{containerDiv:t,contentDiv:r}},SimileAjax.Graphics.createAnimation=function(n,t,i,r,u){return new SimileAjax.Graphics._Animation(n,t,i,r,u)},SimileAjax.Graphics._Animation=function(n,t,i,r,u){this.f=n,this.cont=typeof u=="function"?u:function(){},this.from=t,this.to=i,this.current=t,this.duration=r,this.start=(new Date).getTime(),this.timePassed=0},SimileAjax.Graphics._Animation.prototype.run=function(){var n=this;window.setTimeout(function(){n.step()},50)},SimileAjax.Graphics._Animation.prototype.step=function(){this.timePassed+=50;var t=this.timePassed/this.duration,i=-Math.cos(t*Math.PI)/2+.5,n=i*(this.to-this.from)+this.from;try{this.f(n,n-this.current)}catch(r){}this.current=n,this.timePassed",f=u.firstChild,f.style.width=t+"px",f.style.height=i+"px",f.onmousedown=function(n){n=n?n:event?event:null,n.button==2&&(f.value=r(),f.select())},u},SimileAjax.Graphics.getWidthHeight=function(n){var i,r,t;return n.getBoundingClientRect==null?(i=n.offsetWidth,r=n.offsetHeight):(t=n.getBoundingClientRect(),i=Math.ceil(t.right-t.left),r=Math.ceil(t.bottom-t.top)),{width:i,height:r}},SimileAjax.Graphics.getFontRenderingContext=function(n,t){return new SimileAjax.Graphics._FontRenderingContext(n,t)},SimileAjax.Graphics._FontRenderingContext=function(n,t){this._elmt=n,this._elmt.style.visibility="hidden",typeof t=="string"?this._elmt.style.width=t:typeof t=="number"&&(this._elmt.style.width=t+"px")},SimileAjax.Graphics._FontRenderingContext.prototype.dispose=function(){this._elmt=null},SimileAjax.Graphics._FontRenderingContext.prototype.update=function(){this._elmt.innerHTML="A",this._lineHeight=this._elmt.offsetHeight},SimileAjax.Graphics._FontRenderingContext.prototype.computeSize=function(n,t){var i=this._elmt,r;return i.innerHTML=n,i.className=t===undefined?"":t,r=SimileAjax.Graphics.getWidthHeight(i),i.className="",r},SimileAjax.Graphics._FontRenderingContext.prototype.getLineHeight=function(){return this._lineHeight},SimileAjax.History={maxHistoryLength:10,historyFile:"__history__.html",enabled:!0,_initialized:!1,_listeners:new SimileAjax.ListenerQueue,_actions:[],_baseIndex:0,_currentIndex:0,_plainDocumentTitle:document.title},SimileAjax.History.formatHistoryEntryTitle=function(n){return SimileAjax.History._plainDocumentTitle+" {"+n+"}"},SimileAjax.History.initialize=function(){if(!SimileAjax.History._initialized){if(SimileAjax.History.enabled){var n=document.createElement("iframe");n.id="simile-ajax-history",n.style.position="absolute",n.style.width="10px",n.style.height="10px",n.style.top="0px",n.style.left="0px",n.style.visibility="hidden",n.src=SimileAjax.History.historyFile+"?0",document.body.appendChild(n),SimileAjax.DOM.registerEvent(n,"load",SimileAjax.History._handleIFrameOnLoad),SimileAjax.History._iframe=n}SimileAjax.History._initialized=!0}},SimileAjax.History.addListener=function(n){SimileAjax.History.initialize(),SimileAjax.History._listeners.add(n)},SimileAjax.History.removeListener=function(n){SimileAjax.History.initialize(),SimileAjax.History._listeners.remove(n)},SimileAjax.History.addAction=function(n){SimileAjax.History.initialize(),SimileAjax.History._listeners.fire("onBeforePerform",[n]),window.setTimeout(function(){var t,i;try{if(n.perform(),SimileAjax.History._listeners.fire("onAfterPerform",[n]),SimileAjax.History.enabled){SimileAjax.History._actions=SimileAjax.History._actions.slice(0,SimileAjax.History._currentIndex-SimileAjax.History._baseIndex),SimileAjax.History._actions.push(n),SimileAjax.History._currentIndex++,t=SimileAjax.History._actions.length-SimileAjax.History.maxHistoryLength,t>0&&(SimileAjax.History._actions=SimileAjax.History._actions.slice(t),SimileAjax.History._baseIndex+=t);try{SimileAjax.History._iframe.contentWindow.location.search="?"+SimileAjax.History._currentIndex}catch(r){i=SimileAjax.History.formatHistoryEntryTitle(n.label),document.title=i}}}catch(r){SimileAjax.Debug.exception(r,"Error adding action {"+n.label+"} to history")}},0)},SimileAjax.History.addLengthyAction=function(n,t,i){SimileAjax.History.addAction({perform:n,undo:t,label:i,uiLayer:SimileAjax.WindowManager.getBaseLayer(),lengthy:!0})},SimileAjax.History._handleIFrameOnLoad=function(){var t,i;try{var r=SimileAjax.History._iframe.contentWindow.location.search,n=r.length==0?0:Math.max(0,parseInt(r.substr(1))),u=function(){var t=n-SimileAjax.History._currentIndex;SimileAjax.History._currentIndex+=t,SimileAjax.History._baseIndex+=t,SimileAjax.History._iframe.contentWindow.location.search="?"+n};nn&&SimileAjax.History._currentIndex>SimileAjax.History._baseIndex){SimileAjax.History._currentIndex--;var t=SimileAjax.History._actions[SimileAjax.History._currentIndex-SimileAjax.History._baseIndex];try{t.undo()}catch(i){SimileAjax.Debug.exception(i,"History: Failed to undo action {"+t.label+"}")}}SimileAjax.History._listeners.fire("onAfterUndoSeveral",[]),u()},0)):n>SimileAjax.History._currentIndex?(SimileAjax.History._listeners.fire("onBeforeRedoSeveral",[]),window.setTimeout(function(){while(SimileAjax.History._currentIndex=0&&t",n.OElig="",n.oelig="œ",n.Scaron="Š",n.scaron="š",n.Yuml="Ÿ",n.circ="ˆ",n.tilde="˜",n.ensp=" ",n.emsp=" ",n.thinsp=" ",n.zwnj="‌",n.zwj="‍",n.lrm="‎",n.rlm="‏",n.ndash="–",n.mdash="—",n.lsquo="‘",n.rsquo="’",n.sbquo="‚",n.ldquo="“",n.rdquo="”",n.bdquo="„",n.dagger="†",n.Dagger="‡",n.permil="‰",n.lsaquo="‹",n.rsaquo="›",n.euro="€",n.fnof="ƒ",n.Alpha="Α",n.Beta="Β",n.Gamma="Γ",n.Delta="Δ",n.Epsilon="Ε",n.Zeta="Ζ",n.Eta="Η",n.Theta="Θ",n.Iota="Ι",n.Kappa="Κ",n.Lambda="Λ",n.Mu="Μ",n.Nu="Ν",n.Xi="Ξ",n.Omicron="Ο",n.Pi="Π",n.Rho="Ρ",n.Sigma="Σ",n.Tau="Τ",n.Upsilon="Υ",n.Phi="Φ",n.Chi="Χ",n.Psi="Ψ",n.Omega="Ω",n.alpha="α",n.beta="β",n.gamma="γ",n.delta="δ",n.epsilon="ε",n.zeta="ζ",n.eta="η",n.theta="θ",n.iota="ι",n.kappa="κ",n.lambda="λ",n.mu="μ",n.nu="ν",n.xi="ξ",n.omicron="ο",n.pi="π",n.rho="ρ",n.sigmaf="ς",n.sigma="σ",n.tau="τ",n.upsilon="υ",n.phi="φ",n.chi="χ",n.psi="ψ",n.omega="ω",n.thetasym="ϑ",n.upsih="ϒ",n.piv="ϖ",n.bull="•",n.hellip="…",n.prime="′",n.Prime="″",n.oline="‾",n.frasl="⁄",n.weierp="℘",n.image="ℑ",n.real="ℜ",n.trade="™",n.alefsym="ℵ",n.larr="←",n.uarr="↑",n.rarr="→",n.darr="↓",n.harr="↔",n.crarr="↵",n.lArr="⇐",n.uArr="⇑",n.rArr="⇒",n.dArr="⇓",n.hArr="⇔",n.forall="∀",n.part="∂",n.exist="∃",n.empty="∅",n.nabla="∇",n.isin="∈",n.notin="∉",n.ni="∋",n.prod="∏",n.sum="∑",n.minus="−",n.lowast="∗",n.radic="√",n.prop="∝",n.infin="∞",n.ang="∠",n.and="∧",n.or="∨",n.cap="∩",n.cup="∪",n.int="∫",n.there4="∴",n.sim="∼",n.cong="≅",n.asymp="≈",n.ne="≠",n.equiv="≡",n.le="≤",n.ge="≥",n.sub="⊂",n.sup="⊃",n.nsub="⊄",n.sube="⊆",n.supe="⊇",n.oplus="⊕",n.otimes="⊗",n.perp="⊥",n.sdot="⋅",n.lceil="⌈",n.rceil="⌉",n.lfloor="⌊",n.rfloor="⌋",n.lang="〈",n.rang="〉",n.loz="◊",n.spades="♠",n.clubs="♣",n.hearts="♥",n.diams="♦"}(),SimileAjax.HTML.deEntify=function(n){for(var r=SimileAjax.HTML._e2uHash,t=/&(\w+?);/,i;t.test(n);)i=n.match(t),n=n.replace(t,r[i[1]]);return n},SimileAjax.JSON={},function(){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},n={array:function(t){for(var i=["["],e,f,o=t.length,r,u=0;u=n.length&&this.substr(0,n.length)==n},String.prototype.endsWith=function(n){return this.length>=n.length&&this.substr(this.length-n.length)==n},String.substitute=function(n,t){for(var u="",r=0,i,f;rr&&n.charAt(i-1)=="\\"?(u+=n.substring(r,i-1)+"%",r=i+1):(f=parseInt(n.charAt(i+1)),u+=isNaN(f)||f>=t.length?n.substring(r,i+2):n.substring(r,i)+t[f].toString(),r=i+2);return r0?n:t},SimileAjax.NativeDateUnit.change=function(n,t){return new Date(n.getTime()+t)},SimileAjax.WindowManager={_initialized:!1,_listeners:[],_draggedElement:null,_draggedElementCallback:null,_dropTargetHighlightElement:null,_lastCoords:null,_ghostCoords:null,_draggingMode:"",_dragging:!1,_layers:[]},SimileAjax.WindowManager.initialize=function(){SimileAjax.WindowManager._initialized||(SimileAjax.DOM.registerEvent(document.body,"mousedown",SimileAjax.WindowManager._onBodyMouseDown),SimileAjax.DOM.registerEvent(document.body,"mousemove",SimileAjax.WindowManager._onBodyMouseMove),SimileAjax.DOM.registerEvent(document.body,"mouseup",SimileAjax.WindowManager._onBodyMouseUp),SimileAjax.DOM.registerEvent(document,"keydown",SimileAjax.WindowManager._onBodyKeyDown),SimileAjax.DOM.registerEvent(document,"keyup",SimileAjax.WindowManager._onBodyKeyUp),SimileAjax.WindowManager._layers.push({index:0}),SimileAjax.WindowManager._historyListener={onBeforeUndoSeveral:function(){},onAfterUndoSeveral:function(){},onBeforeUndo:function(){},onAfterUndo:function(){},onBeforeRedoSeveral:function(){},onAfterRedoSeveral:function(){},onBeforeRedo:function(){},onAfterRedo:function(){}},SimileAjax.History.addListener(SimileAjax.WindowManager._historyListener),SimileAjax.WindowManager._initialized=!0)},SimileAjax.WindowManager.getBaseLayer=function(){return SimileAjax.WindowManager.initialize(),SimileAjax.WindowManager._layers[0]},SimileAjax.WindowManager.getHighestLayer=function(){return SimileAjax.WindowManager.initialize(),SimileAjax.WindowManager._layers[SimileAjax.WindowManager._layers.length-1]},SimileAjax.WindowManager.registerEventWithObject=function(n,t,i,r,u){SimileAjax.WindowManager.registerEvent(n,t,function(n,t,u){return i[r].call(i,n,t,u)},u)},SimileAjax.WindowManager.registerEvent=function(n,t,i,r){r==null&&(r=SimileAjax.WindowManager.getHighestLayer());var u=function(n,t,u){if(SimileAjax.WindowManager._canProcessEventAtLayer(r)){SimileAjax.WindowManager._popToLayer(r.index);try{i(n,t,u)}catch(f){SimileAjax.Debug.exception(f)}}return SimileAjax.DOM.cancelEvent(t),!1};SimileAjax.DOM.registerEvent(n,t,u)},SimileAjax.WindowManager.pushLayer=function(n,t,i){var r={onPop:n,index:SimileAjax.WindowManager._layers.length,ephemeral:t,elmt:i};return SimileAjax.WindowManager._layers.push(r),r},SimileAjax.WindowManager.popLayer=function(n){for(var t=1;t0&&SimileAjax.WindowManager._layers[t].ephemeral;){if(f=SimileAjax.WindowManager._layers[t],f.elmt!=null&&(u=f.elmt,i=SimileAjax.DOM.getPageCoordinates(u),r.x>=i.left&&r.x=i.top&&r.y5||Math.abs(o)>5)try{"onDragStart"in r&&r.onDragStart(),"ghost"in r&&r.ghost&&(s=SimileAjax.WindowManager._draggedElement,SimileAjax.WindowManager._ghostCoords=SimileAjax.DOM.getPageCoordinates(s),SimileAjax.WindowManager._ghostCoords.left+=e,SimileAjax.WindowManager._ghostCoords.top+=o,u=s.cloneNode(!0),u.style.position="absolute",u.style.left=SimileAjax.WindowManager._ghostCoords.left+"px",u.style.top=SimileAjax.WindowManager._ghostCoords.top+"px",u.style.zIndex=1e3,SimileAjax.Graphics.setOpacity(u,50),document.body.appendChild(u),r._ghostElmt=u),SimileAjax.WindowManager._dragging=!0,SimileAjax.WindowManager._lastCoords={x:t.clientX,y:t.clientY},document.body.focus()}catch(y){SimileAjax.Debug.exception("WindowManager: Error handling mouse down",y),SimileAjax.WindowManager._cancelDragging()}return SimileAjax.DOM.cancelEvent(t),!1}},SimileAjax.WindowManager._onBodyMouseUp=function(n,t,i){var r,u,i;if(SimileAjax.WindowManager._draggedElement!=null){try{if(SimileAjax.WindowManager._dragging&&(r=SimileAjax.WindowManager._draggedElementCallback,"onDragEnd"in r&&r.onDragEnd(),"droppable"in r&&r.droppable)){if(u=!1,i=SimileAjax.WindowManager._potentialDropTarget,i!=null&&(!("canDropOn"in r)||r.canDropOn(i))&&(!("canDrop"in i)||i.canDrop(SimileAjax.WindowManager._draggedElement))){if("onDropOn"in r)r.onDropOn(i);i.ondrop(SimileAjax.WindowManager._draggedElement,SimileAjax.WindowManager._draggingMode);u=!0}!u}}finally{SimileAjax.WindowManager._cancelDragging()}return SimileAjax.DOM.cancelEvent(t),!1}},SimileAjax.WindowManager._cancelDragging=function(){var n=SimileAjax.WindowManager._draggedElementCallback,t;"_ghostElmt"in n&&(t=n._ghostElmt,document.body.removeChild(t),delete n._ghostElmt),SimileAjax.WindowManager._dropTargetHighlightElement!=null&&(document.body.removeChild(SimileAjax.WindowManager._dropTargetHighlightElement),SimileAjax.WindowManager._dropTargetHighlightElement=null),SimileAjax.WindowManager._draggingModeIndicatorElmt!=null&&(document.body.removeChild(SimileAjax.WindowManager._draggingModeIndicatorElmt),SimileAjax.WindowManager._draggingModeIndicatorElmt=null),SimileAjax.WindowManager._draggedElement=null,SimileAjax.WindowManager._draggedElementCallback=null,SimileAjax.WindowManager._potentialDropTarget=null,SimileAjax.WindowManager._dropTargetHighlightElement=null,SimileAjax.WindowManager._lastCoords=null,SimileAjax.WindowManager._ghostCoords=null,SimileAjax.WindowManager._draggingMode="",SimileAjax.WindowManager._dragging=!1},SimileAjax.WindowManager._findDropTarget=function(n){while(n!=null){if("ondrop"in n&&typeof n.ondrop=="function")break;n=n.parentNode}return n},SimileAjax.XmlHttp={},SimileAjax.XmlHttp._onReadyStateChange=function(n,t,i){switch(n.readyState){case 4:try{n.status==0||n.status==200?i&&i(n):t&&t(n.statusText,n.status,n)}catch(r){SimileAjax.Debug.exception("XmlHttp: Error handling onReadyStateChange",r)}}},SimileAjax.XmlHttp._createRequest=function(){var r,t,n,i;if(SimileAjax.Platform.browser.isIE)for(r=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],t=0;t-1?0:parseInt(t.width)),this._timeline=n,this._bandInfo=t,this._index=i,this._locale=("locale"in t)?t.locale:Timeline.getDefaultLocale(),this._timeZone=("timeZone"in t)?t.timeZone:0,this._labeller=("labeller"in t)?t.labeller:("createLabeller"in n.getUnit())?n.getUnit().createLabeller(this._locale,this._timeZone):new Timeline.GregorianDateLabeller(this._locale,this._timeZone),this._theme=t.theme,this._zoomIndex=("zoomIndex"in t)?t.zoomIndex:0,this._zoomSteps=("zoomSteps"in t)?t.zoomSteps:null,this._dragging=!1,this._changing=!1,this._originalScrollSpeed=5,this._scrollSpeed=this._originalScrollSpeed,this._onScrollListeners=[],r=this,this._syncWithBand=null,this._syncWithBandHandler=function(){r._onHighlightBandScroll()},this._selectorListener=function(){r._onHighlightBandScroll()},u=this._timeline.getDocument().createElement("div"),u.className="timeline-band-input",this._timeline.addDiv(u),this._keyboardInput=document.createElement("input"),this._keyboardInput.type="text",u.appendChild(this._keyboardInput),SimileAjax.DOM.registerEventWithObject(this._keyboardInput,"keydown",this,"_onKeyDown"),SimileAjax.DOM.registerEventWithObject(this._keyboardInput,"keyup",this,"_onKeyUp"),this._div=this._timeline.getDocument().createElement("div"),this._div.id="timeline-band-"+i,this._div.className="timeline-band timeline-band-"+i,this._timeline.addDiv(this._div),SimileAjax.DOM.registerEventWithObject(this._div,"mousedown",this,"_onMouseDown"),SimileAjax.DOM.registerEventWithObject(this._div,"mousemove",this,"_onMouseMove"),SimileAjax.DOM.registerEventWithObject(this._div,"mouseup",this,"_onMouseUp"),SimileAjax.DOM.registerEventWithObject(this._div,"mouseout",this,"_onMouseOut"),SimileAjax.DOM.registerEventWithObject(this._div,"dblclick",this,"_onDblClick"),e=this._theme!=null?this._theme.mouseWheel:"scroll",(e==="zoom"||e==="scroll"||this._zoomSteps)&&(SimileAjax.Platform.browser.isFirefox?SimileAjax.DOM.registerEventWithObject(this._div,"DOMMouseScroll",this,"_onMouseScroll"):SimileAjax.DOM.registerEventWithObject(this._div,"mousewheel",this,"_onMouseScroll")),this._innerDiv=this._timeline.getDocument().createElement("div"),this._innerDiv.className="timeline-band-inner",this._div.appendChild(this._innerDiv),this._ether=t.ether,t.ether.initialize(this,n),this._etherPainter=t.etherPainter,t.etherPainter.initialize(this,n),this._eventSource=t.eventSource,this._eventSource&&(this._eventListener={onAddMany:function(){r._onAddMany()},onClear:function(){r._onClear()}},this._eventSource.addListener(this._eventListener)),this._eventPainter=t.eventPainter,this._eventTracksNeeded=0,this._eventTrackIncrement=0,t.eventPainter.initialize(this,n),this._decorators=("decorators"in t)?t.decorators:[],f=0;fthis._eventTracksNeeded&&(this._eventTracksNeeded=n)},Timeline._Band.prototype.checkAutoWidth=function(){var t;if(this._timeline.autoWidth){var i=this._eventPainter.getType()=="overview",r=i?this._theme.event.overviewTrack.autoWidthMargin:this._theme.event.track.autoWidthMargin,n=Math.ceil((this._eventTracksNeeded+r)*this._eventTrackIncrement);n+=i?this._theme.event.overviewTrack.offset:this._theme.event.track.offset,t=this._bandInfo,n!=t.width&&(t.width=n)}},Timeline._Band.prototype.layout=function(){this.paint()},Timeline._Band.prototype.paint=function(){this._etherPainter.paint(),this._paintDecorators(),this._paintEvents()},Timeline._Band.prototype.softLayout=function(){this.softPaint()},Timeline._Band.prototype.softPaint=function(){this._etherPainter.softPaint(),this._softPaintDecorators(),this._softPaintEvents()},Timeline._Band.prototype.setBandShiftAndWidth=function(n,t){var i=this._keyboardInput.parentNode,r=n+Math.floor(t/2);this._timeline.isHorizontal()?(this._div.style.top=n+"px",this._div.style.height=t+"px",i.style.top=r+"px",i.style.left="-1em"):(this._div.style.left=n+"px",this._div.style.width=t+"px",i.style.left=r+"px",i.style.top="-1em")},Timeline._Band.prototype.getViewWidth=function(){return this._timeline.isHorizontal()?this._div.offsetHeight:this._div.offsetWidth},Timeline._Band.prototype.setViewLength=function(n){this._viewLength=n,this._recenterDiv(),this._onChanging()},Timeline._Band.prototype.getViewLength=function(){return this._viewLength},Timeline._Band.prototype.getTotalViewLength=function(){return Timeline._Band.SCROLL_MULTIPLES*this._viewLength},Timeline._Band.prototype.getViewOffset=function(){return this._viewOffset},Timeline._Band.prototype.getMinDate=function(){return this._ether.pixelOffsetToDate(this._viewOffset)},Timeline._Band.prototype.getMaxDate=function(){return this._ether.pixelOffsetToDate(this._viewOffset+Timeline._Band.SCROLL_MULTIPLES*this._viewLength)},Timeline._Band.prototype.getMinVisibleDate=function(){return this._ether.pixelOffsetToDate(0)},Timeline._Band.prototype.getMinVisibleDateAfterDelta=function(n){return this._ether.pixelOffsetToDate(n)},Timeline._Band.prototype.getMaxVisibleDate=function(){return this._ether.pixelOffsetToDate(this._viewLength)},Timeline._Band.prototype.getMaxVisibleDateAfterDelta=function(n){return this._ether.pixelOffsetToDate(this._viewLength+n)},Timeline._Band.prototype.getCenterVisibleDate=function(){return this._ether.pixelOffsetToDate(this._viewLength/2)},Timeline._Band.prototype.setMinVisibleDate=function(n){this._changing||this._moveEther(Math.round(-this._ether.dateToPixelOffset(n)))},Timeline._Band.prototype.setMaxVisibleDate=function(n){this._changing||this._moveEther(Math.round(this._viewLength-this._ether.dateToPixelOffset(n)))},Timeline._Band.prototype.setCenterVisibleDate=function(n){this._changing||this._moveEther(Math.round(this._viewLength/2-this._ether.dateToPixelOffset(n)))},Timeline._Band.prototype.dateToPixelOffset=function(n){return this._ether.dateToPixelOffset(n)-this._viewOffset},Timeline._Band.prototype.pixelOffsetToDate=function(n){return this._ether.pixelOffsetToDate(n+this._viewOffset)},Timeline._Band.prototype.createLayerDiv=function(n,t){var r=this._timeline.getDocument().createElement("div"),i;return r.className="timeline-band-layer"+(typeof t=="string"?" "+t:""),r.style.zIndex=n,this._innerDiv.appendChild(r),i=this._timeline.getDocument().createElement("div"),i.className="timeline-band-layer-inner",i.style.cursor=SimileAjax.Platform.browser.isIE?"move":"-moz-grab",r.appendChild(i),i},Timeline._Band.prototype.removeLayerDiv=function(n){this._innerDiv.removeChild(n.parentNode)},Timeline._Band.prototype.scrollToCenter=function(n,t){var i=this._ether.dateToPixelOffset(n);i<-this._viewLength/2?this.setCenterVisibleDate(this.pixelOffsetToDate(i+this._viewLength)):i>3*this._viewLength/2&&this.setCenterVisibleDate(this.pixelOffsetToDate(i-this._viewLength)),this._autoScroll(Math.round(this._viewLength/2-this._ether.dateToPixelOffset(n)),t)},Timeline._Band.prototype.showBubbleForEvent=function(n){var t=this.getEventSource().getEvent(n),i;t&&(i=this,this.scrollToCenter(t.getStart(),function(){i._eventPainter.showBubble(t)}))},Timeline._Band.prototype.zoom=function(n,t){if(this._zoomSteps){t+=this._viewOffset;var i=this._ether.pixelOffsetToDate(t),r=this._ether.zoom(n);this._etherPainter.zoom(r),this._moveEther(Math.round(-this._ether.dateToPixelOffset(i))),this._moveEther(t)}},Timeline._Band.prototype._onMouseDown=function(n,t){this.closeBubble(),this._dragging=!0,this._dragX=t.clientX,this._dragY=t.clientY},Timeline._Band.prototype._onMouseMove=function(n,t){if(this._dragging){var i=t.clientX-this._dragX,r=t.clientY-this._dragY;this._dragX=t.clientX,this._dragY=t.clientY,this._moveEther(this._timeline.isHorizontal()?i:r),this._positionHighlight()}},Timeline._Band.prototype._onMouseUp=function(){this._dragging=!1,this._keyboardInput.focus()},Timeline._Band.prototype._onMouseOut=function(n,t){var i=SimileAjax.DOM.getEventRelativeCoordinates(t,n);i.x+=this._viewOffset,(i.x<0||i.x>n.offsetWidth||i.y<0||i.y>n.offsetHeight)&&(this._dragging=!1)},Timeline._Band.prototype._onMouseScroll=function(n,t){var r=new Date,i,u,f,e,o;r=r.getTime(),(!this._lastScrollTime||r-this._lastScrollTime>50)&&(this._lastScrollTime=r,i=0,t.wheelDelta?i=t.wheelDelta/120:t.detail&&(i=-t.detail/3),u=this._theme.mouseWheel,this._zoomSteps||u==="zoom"?(f=SimileAjax.DOM.getEventRelativeCoordinates(t,n),i!=0&&(i>0&&(e=!0),i<0&&(e=!1),this._timeline.zoom(e,f.x,f.y,n))):u==="scroll"&&(o=50*(i<0?-1:1),this._moveEther(o))),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0,t.preventDefault&&t.preventDefault(),t.returnValue=!1},Timeline._Band.prototype._onDblClick=function(n,t){var i=SimileAjax.DOM.getEventRelativeCoordinates(t,n),r=i.x-(this._viewLength/2-this._viewOffset);this._autoScroll(-r)},Timeline._Band.prototype._onKeyDown=function(n,t){if(!this._dragging){switch(t.keyCode){case 27:break;case 37:case 38:this._scrollSpeed=Math.min(50,Math.abs(this._scrollSpeed*1.05)),this._moveEther(this._scrollSpeed);break;case 39:case 40:this._scrollSpeed=-Math.min(50,Math.abs(this._scrollSpeed*1.05)),this._moveEther(this._scrollSpeed);break;default:return!0}return this.closeBubble(),SimileAjax.DOM.cancelEvent(t),!1}return!0},Timeline._Band.prototype._onKeyUp=function(n,t){if(!this._dragging){this._scrollSpeed=this._originalScrollSpeed;switch(t.keyCode){case 35:this.setCenterVisibleDate(this._eventSource.getLatestDate());break;case 36:this.setCenterVisibleDate(this._eventSource.getEarliestDate());break;case 33:this._autoScroll(this._timeline.getPixelLength());break;case 34:this._autoScroll(-this._timeline.getPixelLength());break;default:return!0}return this.closeBubble(),SimileAjax.DOM.cancelEvent(t),!1}return!0},Timeline._Band.prototype._autoScroll=function(n,t){var i=this,r=SimileAjax.Graphics.createAnimation(function(n,t){i._moveEther(t)},0,n,1e3,t);r.run()},Timeline._Band.prototype._moveEther=function(n){(this.closeBubble(),this._timeline.shiftOK(this._index,n))&&(this._viewOffset+=n,this._ether.shiftPixels(-n),this._timeline.isHorizontal()?this._div.style.left=this._viewOffset+"px":this._div.style.top=this._viewOffset+"px",this._viewOffset>-this._viewLength*.5||this._viewOffset<-this._viewLength*(Timeline._Band.SCROLL_MULTIPLES-1.5)?this._recenterDiv():this.softLayout(),this._onChanging())},Timeline._Band.prototype._onChanging=function(){this._changing=!0,this._fireOnScroll(),this._setSyncWithBandDate(),this._changing=!1},Timeline._Band.prototype.busy=function(){return this._changing},Timeline._Band.prototype._fireOnScroll=function(){for(var n=0;n<\/div>",this._eventLayer.appendChild(u);var c=this,lt=function(){var i,t,n,r;try{for(i=parseInt(this.getAttribute("index")),t=u.firstChild.childNodes,n=0;n0&&(o[s-1].end=Math.max(o[s-1].end,l)),g=r.height+f.iconBottomMargin+k;g>0;)o.push({start:a,end:l}),g-=f.trackHeight;var et=u.text,p=this._frc.computeSize(et),rt=p.height+f.labelBottomMargin+k,nt=l+p.width+f.labelRightMargin;for(s>0&&(o[s-1].end=Math.max(o[s-1].end,nt)),w=0;rt>0;w++)s+w=0){var f=this._timeline.getDocument(),u=i.event,e=u.highlightColors[Math.min(n,u.highlightColors.length-1)],r=f.createElement("div");r.style.position="absolute",r.style.overflow="hidden",r.style.left=t.left-2+"px",r.style.width=t.width+4+"px",r.style.top=t.top-2+"px",r.style.height=t.height+4+"px",this._highlightLayer.appendChild(r)}},Timeline.CompactEventPainter.prototype._onClickMultiplePreciseInstantEvent=function(n,t,i){var f=SimileAjax.DOM.getPageCoordinates(n),u,r;for(this._showBubble(f.left+Math.ceil(n.offsetWidth/2),f.top+Math.ceil(n.offsetHeight/2),i),u=[],r=0;r0){u=this._unit.later(u,this._startDate),f=this._unit.earlier(f,this._endDate);var r=this._band.dateToPixelOffset(u),e=this._band.dateToPixelOffset(f),h=this._timeline.getDocument(),c=function(){var n=h.createElement("table");return n.insertRow(0).insertCell(0),n},n=h.createElement("div");n.className="timeline-highlight-decorator",this._cssClass&&(n.className+=" "+this._cssClass),this._color!=null&&(n.style.backgroundColor=this._color),this._opacity<100&&SimileAjax.Graphics.setOpacity(n,this._opacity),this._layerDiv.appendChild(n),t=c(),t.className="timeline-highlight-label timeline-highlight-label-start",o=t.rows[0].cells[0],o.innerHTML=this._startLabel,this._cssClass&&(o.className="label_"+this._cssClass),this._layerDiv.appendChild(t),i=c(),i.className="timeline-highlight-label timeline-highlight-label-end",s=i.rows[0].cells[0],s.innerHTML=this._endLabel,this._cssClass&&(s.className="label_"+this._cssClass),this._layerDiv.appendChild(i),this._timeline.isHorizontal()?(n.style.left=r+"px",n.style.width=e-r+"px",t.style.right=this._band.getTotalViewLength()-r+"px",t.style.width=this._startLabel.length+"em",i.style.left=e+"px",i.style.width=this._endLabel.length+"em"):(n.style.top=r+"px",n.style.height=e-r+"px",t.style.bottom=r+"px",t.style.height="1.5px",i.style.top=e+"px",i.style.height="1.5px")}this._layerDiv.style.display="block"},Timeline.SpanHighlightDecorator.prototype.softPaint=function(){},Timeline.PointHighlightDecorator=function(n){this._unit=n.unit!=null?n.unit:SimileAjax.NativeDateUnit,this._date=typeof n.date=="string"?this._unit.parseFromObject(n.date):n.date,this._width=n.width!=null?n.width:10,this._color=n.color,this._cssClass=n.cssClass!=null?n.cssClass:"",this._opacity=n.opacity!=null?n.opacity:100},Timeline.PointHighlightDecorator.prototype.initialize=function(n,t){this._band=n,this._timeline=t,this._layerDiv=null},Timeline.PointHighlightDecorator.prototype.paint=function(){var t,i;if(this._layerDiv!=null&&this._band.removeLayerDiv(this._layerDiv),this._layerDiv=this._band.createLayerDiv(10),this._layerDiv.setAttribute("name","span-highlight-decorator"),this._layerDiv.style.display="none",t=this._band.getMinDate(),i=this._band.getMaxDate(),this._unit.compare(this._date,i)<0&&this._unit.compare(this._date,t)>0){var u=this._band.dateToPixelOffset(this._date),r=u-Math.round(this._width/2),f=this._timeline.getDocument(),n=f.createElement("div");n.className="timeline-highlight-point-decorator",n.className+=" "+this._cssClass,this._color!=null&&(n.style.backgroundColor=this._color),this._opacity<100&&SimileAjax.Graphics.setOpacity(n,this._opacity),this._layerDiv.appendChild(n),this._timeline.isHorizontal()?(n.style.left=r+"px",n.style.width=this._width):(n.style.top=r+"px",n.style.height=this._width)}this._layerDiv.style.display="block"},Timeline.PointHighlightDecorator.prototype.softPaint=function(){},Timeline.DetailedEventPainter=function(n){this._params=n,this._onSelectListeners=[],this._filterMatcher=null,this._highlightMatcher=null,this._frc=null,this._eventIdToElmt={}},Timeline.DetailedEventPainter.prototype.initialize=function(n,t){this._band=n,this._timeline=t,this._backLayer=null,this._eventLayer=null,this._lineLayer=null,this._highlightLayer=null,this._eventIdToElmt=null},Timeline.DetailedEventPainter.prototype.getType=function(){return"detailed"},Timeline.DetailedEventPainter.prototype.addOnSelectListener=function(n){this._onSelectListeners.push(n)},Timeline.DetailedEventPainter.prototype.removeOnSelectListener=function(n){for(var t=0;t=o+f.width?(s.solid=h,s.text=o):(s.solid=h,o=u+i.event.label.offsetFromLine,l=this._findFreeTrackForText(e,o+f.width,function(n){n.line=u-2}),this._getTrackData(l).text=h,this._paintEventLine(n,u,e,l,t,i));var w=Math.round(t.trackOffset+l*t.trackIncrement+t.trackHeight/2-f.height/2),b=this._paintEventLabel(n,a,o,w,f.width,f.height,i),k=this,y=function(t,i){return k._onClickInstantEvent(c.elmt,i,n)};SimileAjax.DOM.registerEvent(c.elmt,"mousedown",y),SimileAjax.DOM.registerEvent(b.elmt,"mousedown",y),this._createHighlightDiv(r,c,i),this._eventIdToElmt[n.getID()]=c.elmt},Timeline.DetailedEventPainter.prototype.paintImpreciseInstantEvent=function(n,t,i,r){var it=this._timeline.getDocument(),y=n.getText(),p=n.getStart(),w=n.getEnd(),u=Math.round(this._band.dateToPixelOffset(p)),l=Math.round(this._band.dateToPixelOffset(w)),b=Math.round(u+t.iconWidth/2),a=Math.round(u-t.iconWidth/2),e=this._frc.computeSize(y),f=this._findFreeTrackForSolid(l,u),k=this._paintEventTape(n,f,u,l,i.event.instant.impreciseColor,i.event.instant.impreciseOpacity,t,i),h=this._paintEventIcon(n,f,a,t,i),d=this._getTrackData(f),o,c,s;d.solid=a,o=b+i.event.label.offsetFromLine,c=o+e.width,cn&&(!t||r.line>t))return i}else return this._lowerTracks.push({solid:Number.POSITIVE_INFINITY,text:Number.POSITIVE_INFINITY,line:Number.POSITIVE_INFINITY}),i;if(in&&(!t||r.line>t))return-1-i}else return this._upperTracks.push({solid:Number.POSITIVE_INFINITY,text:Number.POSITIVE_INFINITY,line:Number.POSITIVE_INFINITY}),-1-i}},Timeline.DetailedEventPainter.prototype._findFreeTrackForText=function(n,t,i){var e,r,f,o,s,h,u;if(n<0?(e=!0,f=-n,r=this._findFreeUpperTrackForText(f,t),o=-1-r):n>0?(e=!1,f=n+1,r=this._findFreeLowerTrackForText(f,t),o=r):(s=this._findFreeUpperTrackForText(0,t),h=this._findFreeLowerTrackForText(1,t),h-1<=s?(e=!1,f=1,r=h,o=r):(e=!0,f=0,r=s,o=-1-r)),e)for(r==this._upperTracks.length&&this._upperTracks.push({solid:Number.POSITIVE_INFINITY,text:Number.POSITIVE_INFINITY,line:Number.POSITIVE_INFINITY}),u=f;u=t)break}return n},Timeline.DetailedEventPainter.prototype._findFreeUpperTrackForText=function(n,t){for(;n=t)break}return n},Timeline.DetailedEventPainter.prototype._getTrackData=function(n){return n<0?this._upperTracks[-n-1]:this._lowerTracks[n]},Timeline.DetailedEventPainter.prototype._paintEventLine=function(n,t,i,r,u,f){var s=Math.round(u.trackOffset+i*u.trackIncrement+u.trackHeight/2),h=Math.round(Math.abs(r-i)*u.trackIncrement),o="1px solid "+f.event.label.lineColor,e=this._timeline.getDocument().createElement("div");e.style.position="absolute",e.style.left=t+"px",e.style.width=f.event.label.offsetFromLine+"px",e.style.height=h+"px",i>r?(e.style.top=s-h+"px",e.style.borderTop=o):(e.style.top=s+"px",e.style.borderBottom=o),e.style.borderLeft=o,this._lineLayer.appendChild(e)},Timeline.DetailedEventPainter.prototype._paintEventIcon=function(n,t,i,r){var f=n.getIcon();f=f!=null?f:r.icon;var o=r.trackOffset+t*r.trackIncrement+r.trackHeight/2,e=Math.round(o-r.iconHeight/2),s=SimileAjax.Graphics.createTranslucentImage(f),u=this._timeline.getDocument().createElement("div");return u.style.position="absolute",u.style.left=i+"px",u.style.top=e+"px",u.appendChild(s),u.style.cursor="pointer",n._title!=null&&(u.title=n._title),this._eventLayer.appendChild(u),{left:i,top:e,width:r.iconWidth,height:r.iconHeight,elmt:u}},Timeline.DetailedEventPainter.prototype._paintEventLabel=function(n,t,i,r,u,f,e){var c=this._timeline.getDocument(),s=c.createElement("div"),o,h;return s.style.position="absolute",s.style.left=i+"px",s.style.width=u+"px",s.style.top=r+"px",s.style.height=f+"px",s.style.backgroundColor=e.event.label.backgroundColor,SimileAjax.Graphics.setOpacity(s,e.event.label.backgroundOpacity),this._eventLayer.appendChild(s),o=c.createElement("div"),o.style.position="absolute",o.style.left=i+"px",o.style.width=u+"px",o.style.top=r+"px",o.innerHTML=t,o.style.cursor="pointer",n._title!=null&&(o.title=n._title),h=n.getTextColor(),h==null&&(h=n.getColor()),h!=null&&(o.style.color=h),this._eventLayer.appendChild(o),{left:i,top:r,width:u,height:f,elmt:o}},Timeline.DetailedEventPainter.prototype._paintEventTape=function(n,t,i,r,u,f,e,o){var c=r-i,h=o.event.tape.height,a=e.trackOffset+t*e.trackIncrement+e.trackHeight/2,l=Math.round(a-h/2),s=this._timeline.getDocument().createElement("div");return s.style.position="absolute",s.style.left=i+"px",s.style.width=c+"px",s.style.top=l+"px",s.style.height=h+"px",s.style.backgroundColor=u,s.style.overflow="hidden",s.style.cursor="pointer",n._title!=null&&(s.title=n._title),SimileAjax.Graphics.setOpacity(s,f),this._eventLayer.appendChild(s),{left:i,top:l,width:c,height:h,elmt:s}},Timeline.DetailedEventPainter.prototype._createHighlightDiv=function(n,t,i){if(n>=0){var f=this._timeline.getDocument(),u=i.event,e=u.highlightColors[Math.min(n,u.highlightColors.length-1)],r=f.createElement("div");r.style.position="absolute",r.style.overflow="hidden",r.style.left=t.left-2+"px",r.style.width=t.width+4+"px",r.style.top=t.top-2+"px",r.style.height=t.height+4+"px",r.style.background=e,this._highlightLayer.appendChild(r)}},Timeline.DetailedEventPainter.prototype._onClickInstantEvent=function(n,t,i){var r=SimileAjax.DOM.getPageCoordinates(n);return this._showBubble(r.left+Math.ceil(n.offsetWidth/2),r.top+Math.ceil(n.offsetHeight/2),i),this._fireOnSelect(i.getID()),t.cancelBubble=!0,SimileAjax.DOM.cancelEvent(t),!1},Timeline.DetailedEventPainter.prototype._onClickDurationEvent=function(n,t,i){var r,u;if("pageX"in t)r=t.pageX,u=t.pageY;else var f=SimileAjax.DOM.getPageCoordinates(n),r=t.offsetX+f.left,u=t.offsetY+f.top;return this._showBubble(r,u,i),this._fireOnSelect(i.getID()),t.cancelBubble=!0,SimileAjax.DOM.cancelEvent(t),!1},Timeline.DetailedEventPainter.prototype.showBubble=function(n){var t=this._eventIdToElmt[n.getID()],i;t&&(i=SimileAjax.DOM.getPageCoordinates(t),this._showBubble(i.left+t.offsetWidth/2,i.top+t.offsetHeight/2,n))},Timeline.DetailedEventPainter.prototype._showBubble=function(n,t,i){var r=document.createElement("div"),u=this._params.theme.event.bubble;i.fillInfoBubble(r,this._params.theme,this._band.getLabeller()),SimileAjax.WindowManager.cancelPopups(),SimileAjax.Graphics.createBubbleForContentAndPoint(r,n,t,u.width,null,u.maxHeight)},Timeline.DetailedEventPainter.prototype._fireOnSelect=function(n){for(var t=0;ti;r++)t=this._zones[r],it.startTime&&(this._zones.splice(r,0,{startTime:t.startTime,endTime:i,unit:t.unit,multiple:t.multiple}),r++,t.startTime=i),f=0;){if(e.getTime()>this._zones[t].startTime)break;t--}for(r=i;r<=t;r++){var n=this._zones[r],u=new Date(Math.max(f.getTime(),n.startTime)),s=new Date(Math.min(e.getTime(),n.endTime));for(SimileAjax.DateTime.roundDownToInterval(u,n.unit,o,n.multiple,this._theme.firstDayOfWeek),SimileAjax.DateTime.roundUpToInterval(s,n.unit,o,n.multiple,this._theme.firstDayOfWeek);u.getTime()0&&(i=t-1),!n&&t0;u++)i=this._zones[u],this._unit.compare(r,i.endTime)<0&&(this._unit.compare(r,i.startTime)>0&&(this._zones.splice(u,0,{startTime:i.startTime,endTime:r,magnify:i.magnify}),u++,i.startTime=r),this._unit.compare(f,i.endTime)<0?(this._zones.splice(u,0,{startTime:r,endTime:f,magnify:o.magnify*i.magnify}),u++,i.startTime=f,r=f):(i.magnify*=o.magnify,r=i.endTime))}"startsOn"in this._params?this._start=this._unit.parseFromObject(this._params.startsOn):"endsOn"in this._params?(this._start=this._unit.parseFromObject(this._params.endsOn),this.shiftPixels(-this._timeline.getPixelLength())):"centersOn"in this._params?(this._start=this._unit.parseFromObject(this._params.centersOn),this.shiftPixels(-this._timeline.getPixelLength()/2)):(this._start=this._unit.makeDefaultValue(),this.shiftPixels(-this._timeline.getPixelLength()/2))},Timeline.HotZoneEther.prototype.setDate=function(n){this._start=this._unit.cloneValue(n)},Timeline.HotZoneEther.prototype.shiftPixels=function(n){this._start=this.pixelOffsetToDate(n)},Timeline.HotZoneEther.prototype.dateToPixelOffset=function(n){return this._dateDiffToPixelOffset(this._start,n)},Timeline.HotZoneEther.prototype.pixelOffsetToDate=function(n){return this._pixelOffsetToDate(n,this._start)},Timeline.HotZoneEther.prototype.zoom=function(n){var t=this._band._zoomIndex,i=t;return n&&t>0&&(i=t-1),!n&&t=0;){if(this._unit.compare(r,this._zones[i].startTime)>0)break;i--}while(this._unit.compare(r,e)>0)u=this._zones[i],f=this._unit.later(e,u.startTime),o+=this._unit.compare(f,r)/(s/u.magnify),r=f,i--}return o},Timeline.HotZoneEther.prototype._pixelOffsetToDate=function(n,t){var o=this._getScale(),i=t,r,u,f,e;if(n>0){for(r=0;r0)u=this._zones[r],f=o/u.magnify,u.endTime==Number.POSITIVE_INFINITY?(i=this._unit.change(i,n*f),n=0):(e=this._unit.compare(u.endTime,i)/f,e>n?(i=this._unit.change(i,n*f),n=0):(i=u.endTime,n-=e)),r++}else{for(r=this._zones.length-1;r>=0;){if(this._unit.compare(i,this._zones[r].startTime)>0)break;r--}for(n=-n;n>0;)u=this._zones[r],f=o/u.magnify,u.startTime==Number.NEGATIVE_INFINITY?(i=this._unit.change(i,-n*f),n=0):(e=this._unit.compare(i,u.startTime)/f,e>n?(i=this._unit.change(i,-n*f),n=0):(i=u.startTime,n-=e)),r--}return i},Timeline.HotZoneEther.prototype._getScale=function(){return this._interval/this._pixelsPerInterval},Timeline.EventUtils={},Timeline.EventUtils.getNewEventID=function(){return this._lastEventID==null&&(this._lastEventID=0),this._lastEventID+=1,"e"+this._lastEventID},Timeline.EventUtils.decodeEventElID=function(n){var t=n.split("-");if(t[1]!="tl")return alert("Internal Timeline problem 101, please consult support"),{band:null,evt:null};var r=Timeline.getTimelineFromID(t[2]),i=r.getBand(t[3]),u=i.getEventSource.getEvent(t[4]);return{band:i,evt:u}},Timeline.EventUtils.encodeEventElID=function(n,t,i,r){return i+"-tl-"+n.timelineID+"-"+t.getIndex()+"-"+r.getID()},Timeline.GregorianDateLabeller=function(n,t){this._locale=n,this._timeZone=t},Timeline.GregorianDateLabeller.monthNames=[],Timeline.GregorianDateLabeller.dayNames=[],Timeline.GregorianDateLabeller.labelIntervalFunctions=[],Timeline.GregorianDateLabeller.getMonthName=function(n,t){return Timeline.GregorianDateLabeller.monthNames[t][n]},Timeline.GregorianDateLabeller.prototype.labelInterval=function(n,t){var i=Timeline.GregorianDateLabeller.labelIntervalFunctions[this._locale];return i==null&&(i=Timeline.GregorianDateLabeller.prototype.defaultLabelInterval),i.call(this,n,t)},Timeline.GregorianDateLabeller.prototype.labelPrecise=function(n){return SimileAjax.DateTime.removeTimeZoneOffset(n,this._timeZone).toUTCString()},Timeline.GregorianDateLabeller.prototype.defaultLabelInterval=function(n,t){var i,f=!1,r,u;n=SimileAjax.DateTime.removeTimeZoneOffset(n,this._timeZone);switch(t){case SimileAjax.DateTime.MILLISECOND:i=n.getUTCMilliseconds();break;case SimileAjax.DateTime.SECOND:i=n.getUTCSeconds();break;case SimileAjax.DateTime.MINUTE:r=n.getUTCMinutes(),r==0?(i=n.getUTCHours()+":00",f=!0):i=r;break;case SimileAjax.DateTime.HOUR:i=n.getUTCHours()+"hr";break;case SimileAjax.DateTime.DAY:i=Timeline.GregorianDateLabeller.getMonthName(n.getUTCMonth(),this._locale)+" "+n.getUTCDate();break;case SimileAjax.DateTime.WEEK:i=Timeline.GregorianDateLabeller.getMonthName(n.getUTCMonth(),this._locale)+" "+n.getUTCDate();break;case SimileAjax.DateTime.MONTH:if(r=n.getUTCMonth(),r!=0){i=Timeline.GregorianDateLabeller.getMonthName(r,this._locale);break}case SimileAjax.DateTime.YEAR:case SimileAjax.DateTime.DECADE:case SimileAjax.DateTime.CENTURY:case SimileAjax.DateTime.MILLENNIUM:u=n.getUTCFullYear(),i=u>0?n.getUTCFullYear():1-u+"BC",f=t==SimileAjax.DateTime.MONTH||t==SimileAjax.DateTime.DECADE&&u%100==0||t==SimileAjax.DateTime.CENTURY&&u%1e3==0;break;default:i=n.toUTCString()}return{text:i,emphasized:f}},Timeline.OriginalEventPainter=function(n){this._params=n,this._onSelectListeners=[],this._eventPaintListeners=[],this._filterMatcher=null,this._highlightMatcher=null,this._frc=null,this._eventIdToElmt={}},Timeline.OriginalEventPainter.prototype.initialize=function(n,t){this._band=n,this._timeline=t,this._backLayer=null,this._eventLayer=null,this._lineLayer=null,this._highlightLayer=null,this._eventIdToElmt=null},Timeline.OriginalEventPainter.prototype.getType=function(){return"original"},Timeline.OriginalEventPainter.prototype.addOnSelectListener=function(n){this._onSelectListeners.push(n)},Timeline.OriginalEventPainter.prototype.removeOnSelectListener=function(n){for(var t=0;tt)break;return i},Timeline.OriginalEventPainter.prototype._paintEventIcon=function(n,t,i,r,u,f){var o=n.getIcon(),s,h,c,e;return o=o!=null?o:r.icon,f>0?s=r.trackOffset+t*r.trackIncrement+f+r.impreciseIconMargin:(h=r.trackOffset+t*r.trackIncrement+r.trackHeight/2,s=Math.round(h-r.iconHeight/2)),c=SimileAjax.Graphics.createTranslucentImage(o),e=this._timeline.getDocument().createElement("div"),e.className=this._getElClassName("timeline-event-icon",n,"icon"),e.id=this._encodeEventElID("icon",n),e.style.left=i+"px",e.style.top=s+"px",e.appendChild(c),n._title!=null&&(e.title=n._title),this._eventLayer.appendChild(e),{left:i,top:s,width:r.iconWidth,height:r.iconHeight,elmt:e}},Timeline.OriginalEventPainter.prototype._paintEventLabel=function(n,t,i,r,u,f,e,o,s){var l=this._timeline.getDocument(),h=l.createElement("div"),c;return h.className=o,h.id=this._encodeEventElID("label",n),h.style.left=i+"px",h.style.width=u+"px",h.style.top=r+"px",h.innerHTML=t,n._title!=null&&(h.title=n._title),c=n.getTextColor(),c==null&&(c=n.getColor()),c!=null&&(h.style.color=c),e.event.highlightLabelBackground&&s>=0&&(h.style.background=this._getHighlightColor(s,e)),this._eventLayer.appendChild(h),{left:i,top:r,width:u,height:f,elmt:h}},Timeline.OriginalEventPainter.prototype._paintEventTape=function(n,t,i,r,u,f,e,o,s){var a=r-i,v=o.event.tape.height,y=e.trackOffset+t*e.trackIncrement,h=this._timeline.getDocument().createElement("div"),l,c;return h.className=this._getElClassName("timeline-event-tape",n,"tape"),h.id=this._encodeEventElID("tape"+s,n),h.style.left=i+"px",h.style.width=a+"px",h.style.height=v+"px",h.style.top=y+"px",n._title!=null&&(h.title=n._title),u!=null&&(h.style.backgroundColor=u),l=n.getTapeImage(),c=n.getTapeRepeat(),c=c!=null?c:"repeat",l!=null&&(h.style.backgroundImage="url("+l+")",h.style.backgroundRepeat=c),SimileAjax.Graphics.setOpacity(h,f),this._eventLayer.appendChild(h),{left:i,top:y,width:a,height:v,elmt:h}},Timeline.OriginalEventPainter.prototype._getLabelDivClassName=function(n){return this._getElClassName("timeline-event-label",n,"label")},Timeline.OriginalEventPainter.prototype._getElClassName=function(n,t,i){var u=t.getClassName(),r=[];return u&&(i&&r.push(i+"-"+u+" "),r.push(u+" ")),r.push(n),r.join("")},Timeline.OriginalEventPainter.prototype._getHighlightColor=function(n,t){var i=t.event.highlightColors;return i[Math.min(n,i.length-1)]},Timeline.OriginalEventPainter.prototype._createHighlightDiv=function(n,t,i,r){var u=null,f,e;return n>=0&&(f=this._timeline.getDocument(),e=this._getHighlightColor(n,i),u=f.createElement("div"),u.className=this._getElClassName("timeline-event-highlight",r,"highlight"),u.id=this._encodeEventElID("highlight0",r),u.style.position="absolute",u.style.overflow="hidden",u.style.left=t.left-2+"px",u.style.width=t.width+4+"px",u.style.top=t.top-2+"px",u.style.height=t.height+4+"px",u.style.background=e,this._highlightLayer.appendChild(u)),u},Timeline.OriginalEventPainter.prototype._onClickInstantEvent=function(n,t,i){var r=SimileAjax.DOM.getPageCoordinates(n);return this._showBubble(r.left+Math.ceil(n.offsetWidth/2),r.top+Math.ceil(n.offsetHeight/2),i),this._fireOnSelect(i.getID()),t.cancelBubble=!0,SimileAjax.DOM.cancelEvent(t),!1},Timeline.OriginalEventPainter.prototype._onClickDurationEvent=function(n,t,i){var r,u;if("pageX"in t)r=t.pageX,u=t.pageY;else var f=SimileAjax.DOM.getPageCoordinates(n),r=t.offsetX+f.left,u=t.offsetY+f.top;return this._showBubble(r,u,i),this._fireOnSelect(i.getID()),t.cancelBubble=!0,SimileAjax.DOM.cancelEvent(t),!1},Timeline.OriginalEventPainter.prototype.showBubble=function(n){var t=this._eventIdToElmt[n.getID()],i;t&&(i=SimileAjax.DOM.getPageCoordinates(t),this._showBubble(i.left+t.offsetWidth/2,i.top+t.offsetHeight/2,n))},Timeline.OriginalEventPainter.prototype._showBubble=function(n,t,i){var r=document.createElement("div"),u=this._params.theme.event.bubble;i.fillInfoBubble(r,this._params.theme,this._band.getLabeller()),SimileAjax.WindowManager.cancelPopups(),SimileAjax.Graphics.createBubbleForContentAndPoint(r,n,t,u.width,null,u.maxHeight)},Timeline.OriginalEventPainter.prototype._fireOnSelect=function(n){for(var t=0;t=0){var f=this._timeline.getDocument(),u=i.event,e=u.highlightColors[Math.min(n,u.highlightColors.length-1)],r=f.createElement("div");r.style.position="absolute",r.style.overflow="hidden",r.style.left=t.left-1+"px",r.style.width=t.width+2+"px",r.style.top=t.top-1+"px",r.style.height=t.height+2+"px",r.style.background=e,this._highlightLayer.appendChild(r)}},Timeline.OverviewEventPainter.prototype.showBubble=function(){},Timeline.DefaultEventSource=function(n){this._events=n instanceof Object?n:new SimileAjax.EventIndex,this._listeners=[]},Timeline.DefaultEventSource.prototype.addListener=function(n){this._listeners.push(n)},Timeline.DefaultEventSource.prototype.removeListener=function(n){for(var t=0;t0?n:n.substr(0,1)=="/"?t.substr(0,t.indexOf("/",t.indexOf("://")+3))+n:t+n},Timeline.DefaultEventSource.Event=function(n){function t(t){return n[t]!=null&&n[t]!=""?n[t]:null}var r=n.id?n.id.trim():"",i;this._id=r.length>0?r:Timeline.EventUtils.getNewEventID(),this._instant=n.instant||n.end==null,this._start=n.start,this._end=n.end!=null?n.end:n.start,this._latestStart=n.latestStart!=null?n.latestStart:n.instant?this._end:this._start,this._earliestEnd=n.earliestEnd!=null?n.earliestEnd:this._end,i=[],this._start>this._latestStart&&(this._latestStart=this._start,i.push("start is > latestStart")),this._start>this._earliestEnd&&(this._earliestEnd=this._latestStart,i.push("start is > earliestEnd")),this._start>this._end&&(this._end=this._earliestEnd,i.push("start is > end")),this._latestStart>this._earliestEnd&&(this._earliestEnd=this._latestStart,i.push("latestStart is > earliestEnd")),this._latestStart>this._end&&(this._end=this._earliestEnd,i.push("latestStart is > end")),this._earliestEnd>this._end&&(this._end=this._earliestEnd,i.push("earliestEnd is > end")),this._eventID=t("eventID"),this._text=n.text!=null?SimileAjax.HTML.deEntify(n.text):"",i.length>0&&(this._text+=" PROBLEM: "+i.join(", ")),this._description=SimileAjax.HTML.deEntify(n.description),this._image=t("image"),this._link=t("link"),this._title=t("hoverText"),this._title=t("caption"),this._icon=t("icon"),this._color=t("color"),this._textColor=t("textColor"),this._classname=t("classname"),this._tapeImage=t("tapeImage"),this._tapeRepeat=t("tapeRepeat"),this._trackNum=t("trackNum"),this._trackNum!=null&&(this._trackNum=parseInt(this._trackNum)),this._wikiURL=null,this._wikiSection=null},Timeline.DefaultEventSource.Event.prototype={getID:function(){return this._id},isInstant:function(){return this._instant},isImprecise:function(){return this._start!=this._latestStart||this._end!=this._earliestEnd},getStart:function(){return this._start},getEnd:function(){return this._end},getLatestStart:function(){return this._latestStart},getEarliestEnd:function(){return this._earliestEnd},getEventID:function(){return this._eventID},getText:function(){return this._text},getDescription:function(){return this._description},getImage:function(){return this._image},getLink:function(){return this._link},getIcon:function(){return this._icon},getColor:function(){return this._color},getTextColor:function(){return this._textColor},getClassName:function(){return this._classname},getTapeImage:function(){return this._tapeImage},getTapeRepeat:function(){return this._tapeRepeat},getTrackNum:function(){return this._trackNum},getProperty:function(){return null},getWikiURL:function(){return this._wikiURL},getWikiSection:function(){return this._wikiSection},setWikiInfo:function(n,t){this._wikiURL=n,this._wikiSection=t},fillDescription:function(n){n.innerHTML=this._description},fillWikiInfo:function(n){var t,r,i;(n.style.display="none",this._wikiURL!=null&&this._wikiSection!=null)&&(t=this.getProperty("wikiID"),(t==null||t.length==0)&&(t=this.getText()),t!=null&&t.length!=0)&&(n.style.display="inline",t=t.replace(/\s/g,"_"),r=this._wikiURL+this._wikiSection.replace(/\s/g,"_")+"/"+t,i=document.createElement("a"),i.href=r,i.target="new",i.innerHTML=Timeline.strings[Timeline.clientLocale].wikiLinkLabel,n.appendChild(document.createTextNode("[")),n.appendChild(i),n.appendChild(document.createTextNode("]")))},fillTime:function(n,t){this._instant?this.isImprecise()?(n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._start))),n.appendChild(n.ownerDocument.createElement("br")),n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._end)))):n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._start))):this.isImprecise()?(n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._start)+" ~ "+t.labelPrecise(this._latestStart))),n.appendChild(n.ownerDocument.createElement("br")),n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._earliestEnd)+" ~ "+t.labelPrecise(this._end)))):(n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._start))),n.appendChild(n.ownerDocument.createElement("br")),n.appendChild(n.ownerDocument.createTextNode(t.labelPrecise(this._end))))},fillInfoBubble:function(n,t,i){var r=n.ownerDocument,v=this.getText(),l=this.getLink(),a=this.getImage(),f,u,c,e,o,s,h;a!=null&&(f=r.createElement("img"),f.src=a,t.event.bubble.imageStyler(f),n.appendChild(f)),u=r.createElement("div"),c=r.createTextNode(v),l!=null?(e=r.createElement("a"),e.href=l,e.appendChild(c),u.appendChild(e)):u.appendChild(c),t.event.bubble.titleStyler(u),n.appendChild(u),o=r.createElement("div"),this.fillDescription(o),t.event.bubble.bodyStyler(o),n.appendChild(o),s=r.createElement("div"),this.fillTime(s,i),t.event.bubble.timeStyler(s),n.appendChild(s),h=r.createElement("div"),this.fillWikiInfo(h),t.event.bubble.wikiStyler(h),n.appendChild(h)}},Timeline.ClassicTheme={},Timeline.ClassicTheme.implementations=[],Timeline.ClassicTheme.create=function(n){n==null&&(n=Timeline.getDefaultLocale());var t=Timeline.ClassicTheme.implementations[n];return t==null&&(t=Timeline.ClassicTheme._Impl),new t},Timeline.ClassicTheme._Impl=function(){this.firstDayOfWeek=0,this.autoWidth=!1,this.autoWidthAnimationTime=500,this.timeline_start=null,this.timeline_stop=null,this.ether={backgroundColors:[],highlightOpacity:50,interval:{line:{show:!0,opacity:25},weekend:{opacity:30},marker:{hAlign:"Bottom",vAlign:"Right"}}},this.event={track:{height:10,gap:2,offset:2,autoWidthMargin:1.5},overviewTrack:{offset:20,tickHeight:6,height:2,gap:1,autoWidthMargin:5},tape:{height:4},instant:{icon:Timeline.urlPrefix+"images/dull-blue-circle.png",iconWidth:10,iconHeight:10,impreciseOpacity:20,impreciseIconMargin:3},duration:{impreciseOpacity:20},label:{backgroundOpacity:50,offsetFromLine:3},highlightColors:["#FFFF00","#FFC000","#FF0000","#0000FF"],highlightLabelBackground:!1,bubble:{width:250,maxHeight:0,titleStyler:function(n){n.className="timeline-event-bubble-title"},bodyStyler:function(n){n.className="timeline-event-bubble-body"},imageStyler:function(n){n.className="timeline-event-bubble-image"},wikiStyler:function(n){n.className="timeline-event-bubble-wiki"},timeStyler:function(n){n.className="timeline-event-bubble-time"}}},this.mouseWheel="scroll"},Timeline.version="2.3.0",Timeline.ajax_lib_version=SimileAjax.version,Timeline.display_version=Timeline.version+" (with Ajax lib "+Timeline.ajax_lib_version+")",Timeline.strings={},Timeline.HORIZONTAL=0,Timeline.VERTICAL=1,Timeline._defaultTheme=null,Timeline.getDefaultLocale=function(){return Timeline.clientLocale},Timeline.create=function(n,t,i,r){var u,f;return Timeline.timelines==null&&(Timeline.timelines=[]),u=Timeline.timelines.length,Timeline.timelines[u]=null,f=new Timeline._Impl(n,t,i,r,u),Timeline.timelines[u]=f,f},Timeline.createBandInfo=function(n){var r="theme"in n?n.theme:Timeline.getDefaultTheme(),e="eventSource"in n?n.eventSource:null,o=new Timeline.LinearEther({centersOn:"date"in n?n.date:new Date,interval:SimileAjax.DateTime.gregorianUnitLengths[n.intervalUnit],pixelsPerInterval:n.intervalPixels,theme:r}),s=new Timeline.GregorianEtherPainter({unit:n.intervalUnit,multiple:"multiple"in n?n.multiple:1,theme:r,align:"align"in n?n.align:undefined}),t={showText:"showEventText"in n?n.showEventText:!0,theme:r},u,f,i;if("eventPainterParams"in n)for(u in n.eventPainterParams)t[u]=n.eventPainterParams[u];if("trackHeight"in n&&(t.trackHeight=n.trackHeight),"trackGap"in n&&(t.trackGap=n.trackGap),f="overview"in n&&n.overview?"overview":"layout"in n?n.layout:"original","eventPainter"in n)i=new n.eventPainter(t);else switch(f){case"overview":i=new Timeline.OverviewEventPainter(t);break;case"detailed":i=new Timeline.DetailedEventPainter(t);break;default:i=new Timeline.OriginalEventPainter(t)}return{width:n.width,eventSource:e,timeZone:"timeZone"in n?n.timeZone:0,ether:o,etherPainter:s,eventPainter:i,theme:r,zoomIndex:"zoomIndex"in n?n.zoomIndex:0,zoomSteps:"zoomSteps"in n?n.zoomSteps:null}},Timeline.createHotZoneBandInfo=function(n){var r="theme"in n?n.theme:Timeline.getDefaultTheme(),e="eventSource"in n?n.eventSource:null,o=new Timeline.HotZoneEther({centersOn:"date"in n?n.date:new Date,interval:SimileAjax.DateTime.gregorianUnitLengths[n.intervalUnit],pixelsPerInterval:n.intervalPixels,zones:n.zones,theme:r}),s=new Timeline.HotZoneGregorianEtherPainter({unit:n.intervalUnit,zones:n.zones,theme:r,align:"align"in n?n.align:undefined}),t={showText:"showEventText"in n?n.showEventText:!0,theme:r},u,f,i;if("eventPainterParams"in n)for(u in n.eventPainterParams)t[u]=n.eventPainterParams[u];if("trackHeight"in n&&(t.trackHeight=n.trackHeight),"trackGap"in n&&(t.trackGap=n.trackGap),f="overview"in n&&n.overview?"overview":"layout"in n?n.layout:"original","eventPainter"in n)i=new n.eventPainter(t);else switch(f){case"overview":i=new Timeline.OverviewEventPainter(t);break;case"detailed":i=new Timeline.DetailedEventPainter(t);break;default:i=new Timeline.OriginalEventPainter(t)}return{width:n.width,eventSource:e,timeZone:"timeZone"in n?n.timeZone:0,ether:o,etherPainter:s,eventPainter:i,theme:r,zoomIndex:"zoomIndex"in n?n.zoomIndex:0,zoomSteps:"zoomSteps"in n?n.zoomSteps:null}},Timeline.getDefaultTheme=function(){return Timeline._defaultTheme==null&&(Timeline._defaultTheme=Timeline.ClassicTheme.create(Timeline.getDefaultLocale())),Timeline._defaultTheme},Timeline.setDefaultTheme=function(n){Timeline._defaultTheme=n},Timeline.loadXML=function(n,t){var i=function(t){alert("Failed to load data xml from "+n+"\n"+t)},r=function(i){var r=i.responseXML;!r.documentElement&&i.responseStream&&r.load(i.responseStream),t(r,n)};SimileAjax.XmlHttp.get(n,i,r)},Timeline.loadJSON=function(n,t){var i=function(t){alert("Failed to load json data from "+n+"\n"+t)},r=function(xmlhttp){t(eval("("+xmlhttp.responseText+")"),n)};SimileAjax.XmlHttp.get(n,i,r)},Timeline.getTimelineFromID=function(n){return Timeline.timelines[n]},Timeline.writeVersion=function(n){document.getElementById(n).innerHTML=this.display_version},Timeline._Impl=function(n,t,i,r,u){SimileAjax.WindowManager.initialize(),this._containerDiv=n,this._bandInfos=t,this._orientation=i==null?Timeline.HORIZONTAL:i,this._unit=r!=null?r:SimileAjax.NativeDateUnit,this._starting=!0,this._autoResizing=!1,this.autoWidth=t&&t[0]&&t[0].theme&&t[0].theme.autoWidth,this.autoWidthAnimationTime=t&&t[0]&&t[0].theme&&t[0].theme.autoWidthAnimationTime,this.timelineID=u,this.timeline_start=t&&t[0]&&t[0].theme&&t[0].theme.timeline_start,this.timeline_stop=t&&t[0]&&t[0].theme&&t[0].theme.timeline_stop,this.timeline_at_start=!1,this.timeline_at_stop=!1,this._initialize()},Timeline._Impl.prototype.dispose=function(){for(var n=0;ne||n)&&(i=f,u(),t._distributeWidths())}}var t=this,r=t._starting,i=0;t.autoWidth&&f()},Timeline._Impl.prototype._initialize=function(){var t=this._containerDiv,o=t.ownerDocument,f,r,e,u,n,i;for(t.className=t.className.split(" ").concat("timeline-container").join(" "),f=this.isHorizontal()?"horizontal":"vertical",t.className+=" timeline-"+f;t.firstChild;)t.removeChild(t.firstChild);for(r=SimileAjax.Graphics.createTranslucentImage(Timeline.urlPrefix+(this.isHorizontal()?"images/copyright-vertical.png":"images/copyright.png")),r.className="timeline-copyright",r.title="Timeline copyright SIMILE - www.code.google.com/p/simile-widgets/",SimileAjax.DOM.registerEvent(r,"click",function(){window.location="http://code.google.com/p/simile-widgets/"}),t.appendChild(r),this._bands=[],n=0;n Loading...",this.showLoadingMessage=function(){i.containerDiv.style.display="block"},this.hideLoadingMessage=function(){i.containerDiv.style.display="none"}},Timeline._Impl.prototype._distributeWidths=function(){for(var o=this.getPixelLength(),s=this.getPixelWidth(),u=0,r,e,n=0;n0?(e=parseInt(t.substr(0,r)),i=Math.round(e*s/100)):i=parseInt(t)):i=t,f.setBandShiftAndWidth(u,i),f.setViewLength(o),u+=i}},Timeline._Impl.prototype.shiftOK=function(n,t){var f=t>0,o=t<0,e,r,i,u;if(f&&this.timeline_start==null||o&&this.timeline_stop==null||t==0)return!0;for(e=!1,i=0;i=this.timeline_start:(i==n?u.getMaxVisibleDateAfterDelta(t):u.getMaxVisibleDate())<=this.timeline_stop;return f?(this.timeline_at_start=!r,this.timeline_at_stop=!1):(this.timeline_at_stop=!r,this.timeline_at_start=!1),r},Timeline._Impl.prototype.zoom=function(n,t,i,r){var e=new RegExp("^timeline-band-([0-9]+)$"),u=null,f=e.exec(r.id);f&&(u=parseInt(f[1])),u!=null&&this._bands[u].zoom(n,t,i,r),this.paint()},Timeline.NativeDateUnit={},Timeline.NativeDateUnit.createLabeller=function(n,t){return new Timeline.GregorianDateLabeller(n,t)},Timeline.NativeDateUnit.makeDefaultValue=function(){return new Date},Timeline.NativeDateUnit.cloneValue=function(n){return new Date(n.getTime())},Timeline.NativeDateUnit.getParser=function(n){return typeof n=="string"&&(n=n.toLowerCase()),n=="iso8601"||n=="iso 8601"?Timeline.DateTime.parseIso8601DateTime:Timeline.DateTime.parseGregorianDateTime},Timeline.NativeDateUnit.parseFromObject=function(n){return Timeline.DateTime.parseGregorianDateTime(n)},Timeline.NativeDateUnit.toNumber=function(n){return n.getTime()},Timeline.NativeDateUnit.fromNumber=function(n){return new Date(n)},Timeline.NativeDateUnit.compare=function(n,t){var i,r;return i=typeof n=="object"?n.getTime():Number(n),r=typeof t=="object"?t.getTime():Number(t),i-r},Timeline.NativeDateUnit.earlier=function(n,t){return Timeline.NativeDateUnit.compare(n,t)<0?n:t},Timeline.NativeDateUnit.later=function(n,t){return Timeline.NativeDateUnit.compare(n,t)>0?n:t},Timeline.NativeDateUnit.change=function(n,t){return new Date(n.getTime()+t)},Timeline.strings.en={wikiLinkLabel:"Discuss"},Timeline.GregorianDateLabeller.monthNames.en=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Timeline.GregorianDateLabeller.dayNames.en=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; //@ sourceMappingURL=Timeline.min.js.map \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Timeline.min.js.map b/Disco.Web/ClientSource/Scripts/Modules/Timeline.min.js.map index f16929b6..b3dfc257 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Timeline.min.js.map +++ b/Disco.Web/ClientSource/Scripts/Modules/Timeline.min.js.map @@ -1,8 +1,8 @@ -{ -"version":3, -"file":"Timeline.min.js", -"lineCount":1, -"mappings":"AAqS8D,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,6BAAlD,CAAgFA,KAAK,C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AC,CAACH,CAAH,CAAK,CAAC,OAAOq4B,QAAQzyB,eAAeE,QAAQ,CAAC3F,CAAC,CAACH,CAAH,CAAK,CAAC,CAAC,CAACG,CAAC,CAACH,CAAjD,CAC1C,CACDq4B,QAAQzyB,eAAeosB,OAAO,CAACu5B,QAAQ,CAACvrD,CAAC,CAACG,CAAH,CAAK,CAAC,OAAO,IAAIgL,IAAI,CAACnL,CAACyL,QAAQ,CAAA,CAAE,CAACtL,CAAb,CAAhB,CAC3C,CC7wFDk4B,QAAQ8rB,QAASqH,GAAM,CAAE,CACrB,aAAa,CAAG,SADK,CAExB,CCFDnzB,QAAQc,sBAAsBugB,WAAY8R,GAAM,CAAE,CAC9C,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAD/B,CAEjD,CAEDnzB,QAAQc,sBAAsBwgB,SAAU6R,GAAM,CAAE,CAC5C,QAAQ,CAAE,QAAQ,CAAE,SAAS,CAAE,WAAW,CAAE,UAAU,CAAE,QAAQ,CAAE,UADtB,CAE/C", -"sources":["/ClientSource/Scripts/Modules/Timeline/simile-ajax-bundle-DiscoMod.js","/ClientSource/Scripts/Modules/Timeline/disco.simileajaxextensions.js","/ClientSource/Scripts/Modules/Timeline/disco.timelineextensions.js","/ClientSource/Scripts/Modules/Timeline/timeline-bundle.js","/ClientSource/Scripts/Modules/Timeline/timeline.js","/ClientSource/Scripts/Modules/Timeline/labellers.js"], -"names":["join","window","SimileAjax","version","jQuery","noConflict","$","Platform","os","browser","C","navigator","appName","toLowerCase","A","userAgent","E","B","D","isMac","indexOf","isWin","isWin32","isUnix","isIE","isNetscape","isMozilla","isFirefox","isOpera","isSafari","G","F","split","majorVersion","parseInt","minorVersion","H","I","length","substring","String","prototype","localeCompare","String.prototype.localeCompare","getDefaultLocale","SimileAjax.Platform.getDefaultLocale","clientLocale","ListenerQueue","SimileAjax.ListenerQueue","_listeners","_wildcardHandlerName","add","SimileAjax.ListenerQueue.prototype.add","push","remove","SimileAjax.ListenerQueue.prototype.remove","splice","fire","SimileAjax.ListenerQueue.prototype.fire","concat","apply","Debug","exception","Set","SimileAjax.Set","_hash","_count","Array","addSet","SimileAjax.Set.prototype.add","SimileAjax.Set.prototype.addSet","SimileAjax.Set.prototype.remove","removeSet","SimileAjax.Set.prototype.removeSet","retainSet","SimileAjax.Set.prototype.retainSet","contains","SimileAjax.Set.prototype.contains","size","SimileAjax.Set.prototype.size","toArray","SimileAjax.Set.prototype.toArray","visit","SimileAjax.Set.prototype.visit","SortedArray","SimileAjax.SortedArray","_a","_compare","SimileAjax.SortedArray.prototype.add","find","SimileAjax.SortedArray.prototype.remove","removeAll","SimileAjax.SortedArray.prototype.removeAll","elementAt","SimileAjax.SortedArray.prototype.elementAt","SimileAjax.SortedArray.prototype.length","SimileAjax.SortedArray.prototype.find","Math","floor","getFirst","SimileAjax.SortedArray.prototype.getFirst","getLast","SimileAjax.SortedArray.prototype.getLast","EventIndex","SimileAjax.EventIndex","_unit","NativeDateUnit","_events","compare","getStart","_idToEvent","_indexed","getUnit","SimileAjax.EventIndex.prototype.getUnit","getEvent","SimileAjax.EventIndex.prototype.getEvent","SimileAjax.EventIndex.prototype.add","getID","SimileAjax.EventIndex.prototype.removeAll","getCount","SimileAjax.EventIndex.prototype.getCount","getIterator","SimileAjax.EventIndex.prototype.getIterator","_index","_Iterator","getReverseIterator","SimileAjax.EventIndex.prototype.getReverseIterator","_ReverseIterator","getAllIterator","SimileAjax.EventIndex.prototype.getAllIterator","_AllIterator","getEarliestDate","SimileAjax.EventIndex.prototype.getEarliestDate","getLatestDate","SimileAjax.EventIndex.prototype.getLatestDate","_earliestOverlapIndex","getEnd","later","SimileAjax.EventIndex.prototype._index","max","SimileAjax.EventIndex._Iterator","_startDate","_endDate","_currentIndex","_maxIndex","_hasNext","_next","_findNext","hasNext","next","SimileAjax.EventIndex._ReverseIterator","_minIndex","SimileAjax.EventIndex._AllIterator","DateTime","MILLISECOND","SECOND","MINUTE","HOUR","DAY","WEEK","MONTH","YEAR","DECADE","CENTURY","MILLENNIUM","EPOCH","ERA","gregorianUnitLengths","_dateRegexp","RegExp","_timezoneRegexp","_timeRegexp","setIso8601Date","SimileAjax.DateTime.setIso8601Date","match","Error","J","M","setUTCFullYear","setUTCMonth","setUTCDate","Number","L","getUTCDay","K","setIso8601Time","SimileAjax.DateTime.setIso8601Time","warn","setUTCHours","setUTCMinutes","setUTCSeconds","setUTCMilliseconds","timezoneOffset","Date","getTimezoneOffset","setIso8601","SimileAjax.DateTime.setIso8601","substr","setTime","getTime","parseIso8601DateTime","SimileAjax.DateTime.parseIso8601DateTime","parseGregorianDateTime","SimileAjax.DateTime.parseGregorianDateTime","toString","parse","roundDownToInterval","SimileAjax.DateTime.roundDownToInterval","getUTCMilliseconds","getUTCSeconds","getUTCMinutes","getUTCHours","getUTCMonth","getUTCFullYear","roundUpToInterval","SimileAjax.DateTime.roundUpToInterval","incrementByInterval","SimileAjax.DateTime.incrementByInterval","getUTCDate","removeTimeZoneOffset","SimileAjax.DateTime.removeTimeZoneOffset","getTimezone","SimileAjax.DateTime.getTimezone","log","SimileAjax.Debug.log","console","silent","alert","SimileAjax.Debug.warn","SimileAjax.Debug.exception","parseURLParameters","errors","params","error","description","objectToString","SimileAjax.Debug.objectToString","_objectToString","SimileAjax.Debug._objectToString","DOM","registerEventWithObject","SimileAjax.DOM.registerEventWithObject","registerEvent","call","SimileAjax.DOM.registerEvent","event","target","srcElement","nodeType","parentNode","attachEvent","addEventListener","getPageCoordinates","SimileAjax.DOM.getPageCoordinates","offsetLeft","offsetTop","offsetParent","document","body","scrollLeft","scrollTop","getSize","SimileAjax.DOM.getSize","getStyle","replace","SimileAjax.DOM.getStyle","currentStyle","getComputedStyle","defaultView","getPropertyValue","getEventRelativeCoordinates","SimileAjax.DOM.getEventRelativeCoordinates","type","clientX","left","clientY","top","offsetX","offsetY","screenX","screenY","pageX","pageY","getEventPageCoordinates","SimileAjax.DOM.getEventPageCoordinates","hittest","SimileAjax.DOM.hittest","_hittest","SimileAjax.DOM._hittest","childNodes","offsetWidth","offsetHeight","tagName","cancelEvent","SimileAjax.DOM.cancelEvent","returnValue","cancelBubble","preventDefault","appendClassName","SimileAjax.DOM.appendClassName","className","createInputElement","SimileAjax.DOM.createInputElement","createElement","innerHTML","firstChild","createDOMFromTemplate","SimileAjax.DOM.createDOMFromTemplate","elmt","_createDOMFromTemplate","SimileAjax.DOM._createDOMFromTemplate","createTextNode","appendChild","tag","insertRow","rows","insertCell","cells","id","title","n","style","setAttribute","_cachedParent","createElementFromString","SimileAjax.DOM.createElementFromString","createDOMFromString","SimileAjax.DOM.createDOMFromString","_processDOMChildrenConstructedFromString","_processDOMConstructedFromString","SimileAjax.DOM._processDOMConstructedFromString","removeAttribute","insertBefore","removeChild","hasChildNodes","SimileAjax.DOM._processDOMChildrenConstructedFromString","nextSibling","Graphics","pngIsTranslucent","includeCssFile","urlPrefix","_createTranslucentImage1","SimileAjax.Graphics._createTranslucentImage1","verticalAlign","_createTranslucentImage2","SimileAjax.Graphics._createTranslucentImage2","width","height","filter","createTranslucentImage","_createTranslucentImageHTML1","SimileAjax.Graphics._createTranslucentImageHTML1","_createTranslucentImageHTML2","SimileAjax.Graphics._createTranslucentImageHTML2","createTranslucentImageHTML","setOpacity","SimileAjax.Graphics.setOpacity","opacity","MozOpacity","bubbleConfig","createBubbleForContentAndPoint","SimileAjax.Graphics.createBubbleForContentAndPoint","position","setTimeout","scrollWidth","scrollHeight","createBubbleForPoint","content","SimileAjax.Graphics.createBubbleForPoint","N","P","borderGraphicSize","O","S","containerCSSClass","innerContainerCSSClass","Q","_closed","_div","_doc","_content","R","WindowManager","pushLayer","close","Q.close","popLayer","T","borderGraphicCSSClassPrefix","contentContainerCSSClass","closeGraphicCSSClass","Y","getWindowDimensions","w","U","h","V","ceil","arrowGraphicWidth","Z","b","a","arrowGraphicCSSClassPrefix","X","W","extraPadding","round","min","arrowGraphicTargetOffset","SimileAjax.Graphics.getWindowDimensions","innerHeight","innerWidth","documentElement","clientHeight","clientWidth","createMessageBubble","SimileAjax.Graphics.createMessageBubble","background","paddingLeft","paddingRight","border","padding","createAnimation","SimileAjax.Graphics.createAnimation","_Animation","SimileAjax.Graphics._Animation","f","cont","from","to","current","duration","start","timePassed","run","SimileAjax.Graphics._Animation.prototype.run","step","SimileAjax.Graphics._Animation.prototype.step","cos","PI","createStructuredDataCopyButton","SimileAjax.Graphics.createStructuredDataCopyButton","display","overflow","margin","onmousedown","C.onmousedown","button","value","select","getWidthHeight","SimileAjax.Graphics.getWidthHeight","getBoundingClientRect","right","bottom","getFontRenderingContext","SimileAjax.Graphics.getFontRenderingContext","_FontRenderingContext","SimileAjax.Graphics._FontRenderingContext","_elmt","visibility","dispose","SimileAjax.Graphics._FontRenderingContext.prototype.dispose","update","SimileAjax.Graphics._FontRenderingContext.prototype.update","_lineHeight","computeSize","SimileAjax.Graphics._FontRenderingContext.prototype.computeSize","undefined","getLineHeight","SimileAjax.Graphics._FontRenderingContext.prototype.getLineHeight","History","formatHistoryEntryTitle","SimileAjax.History.formatHistoryEntryTitle","_plainDocumentTitle","initialize","SimileAjax.History.initialize","_initialized","enabled","src","historyFile","_handleIFrameOnLoad","_iframe","addListener","SimileAjax.History.addListener","removeListener","SimileAjax.History.removeListener","addAction","SimileAjax.History.addAction","perform","_actions","slice","_baseIndex","maxHistoryLength","contentWindow","location","search","label","addLengthyAction","SimileAjax.History.addLengthyAction","getBaseLayer","SimileAjax.History._handleIFrameOnLoad","undo","getNextUndoAction","SimileAjax.History.getNextUndoAction","getNextRedoAction","SimileAjax.History.getNextRedoAction","HTML","_e2uHash","nbsp","iexcl","cent","pound","curren","yen","brvbar","sect","uml","copy","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1","ordm","raquo","frac14","frac12","frac34","iquest","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","times","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","szlig","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute","ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","divide","oslash","ugrave","uacute","ucirc","uuml","yacute","thorn","yuml","quot","amp","lt","gt","OElig","oelig","Scaron","scaron","Yuml","circ","tilde","ensp","emsp","thinsp","zwnj","zwj","lrm","rlm","ndash","mdash","lsquo","rsquo","sbquo","ldquo","rdquo","bdquo","dagger","Dagger","permil","lsaquo","rsaquo","euro","fnof","Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigmaf","sigma","tau","upsilon","phi","chi","psi","omega","thetasym","upsih","piv","bull","hellip","prime","Prime","oline","frasl","weierp","image","real","trade","alefsym","larr","uarr","rarr","darr","harr","crarr","lArr","uArr","rArr","dArr","hArr","forall","part","exist","empty","nabla","isin","notin","ni","prod","sum","minus","lowast","radic","prop","infin","ang","and","or","cap","cup","int","there4","sim","cong","asymp","ne","equiv","le","ge","sub","sup","nsub","sube","supe","oplus","otimes","perp","sdot","lceil","rceil","lfloor","rfloor","lang","rang","loz","spades","clubs","hearts","diams","deEntify","SimileAjax.HTML.deEntify","test","JSON","m","s","array","x","l","v","i","boolean","null","number","isFinite","object","string","c","charCodeAt","toJSONString","SimileAjax.JSON.toJSONString","o","Object","parseJSON","SimileAjax.JSON.parseJSON","eval","e","trim","String.prototype.trim","startsWith","String.prototype.startsWith","endsWith","String.prototype.endsWith","substitute","String.substitute","charAt","isNaN","makeDefaultValue","SimileAjax.NativeDateUnit.makeDefaultValue","cloneValue","SimileAjax.NativeDateUnit.cloneValue","getParser","SimileAjax.NativeDateUnit.getParser","parseFromObject","SimileAjax.NativeDateUnit.parseFromObject","toNumber","SimileAjax.NativeDateUnit.toNumber","fromNumber","SimileAjax.NativeDateUnit.fromNumber","SimileAjax.NativeDateUnit.compare","earlier","SimileAjax.NativeDateUnit.earlier","SimileAjax.NativeDateUnit.later","change","SimileAjax.NativeDateUnit.change","SimileAjax.WindowManager.initialize","_onBodyMouseDown","_onBodyMouseMove","_onBodyMouseUp","_onBodyKeyDown","_onBodyKeyUp","_layers","_historyListener","onBeforeUndoSeveral","onAfterUndoSeveral","onBeforeUndo","onAfterUndo","onBeforeRedoSeveral","onAfterRedoSeveral","onBeforeRedo","onAfterRedo","SimileAjax.WindowManager.getBaseLayer","getHighestLayer","SimileAjax.WindowManager.getHighestLayer","SimileAjax.WindowManager.registerEventWithObject","SimileAjax.WindowManager.registerEvent","_canProcessEventAtLayer","_popToLayer","index","SimileAjax.WindowManager.pushLayer","SimileAjax.WindowManager.popLayer","popAllLayers","SimileAjax.WindowManager.popAllLayers","registerForDragging","SimileAjax.WindowManager.registerForDragging","_handleMouseDown","SimileAjax.WindowManager._popToLayer","pop","onPop","SimileAjax.WindowManager._canProcessEventAtLayer","ephemeral","cancelPopups","SimileAjax.WindowManager.cancelPopups","y","SimileAjax.WindowManager._onBodyMouseDown","eventPhase","BUBBLING_PHASE","SimileAjax.WindowManager._handleMouseDown","_draggedElement","_draggedElementCallback","_lastCoords","SimileAjax.WindowManager._onBodyKeyDown","_dragging","keyCode","_cancelDragging","_draggingMode","_ghostCoords","_draggingModeIndicatorElmt","SimileAjax.WindowManager._onBodyKeyUp","SimileAjax.WindowManager._onBodyMouseMove","onDragBy","_ghostElmt","droppable","_dropTargetHighlightElement","_findDropTarget","_potentialDropTarget","canDropOn","canDrop","backgroundColor","abs","onDragStart","ghost","cloneNode","zIndex","focus","SimileAjax.WindowManager._onBodyMouseUp","onDragEnd","onDropOn","ondrop","SimileAjax.WindowManager._cancelDragging","SimileAjax.WindowManager._findDropTarget","XmlHttp","_onReadyStateChange","SimileAjax.XmlHttp._onReadyStateChange","readyState","status","statusText","_createRequest","SimileAjax.XmlHttp._createRequest","ActiveXObject","XMLHttpRequest","get","SimileAjax.XmlHttp.get","open","onreadystatechange","A.onreadystatechange","send","post","SimileAjax.XmlHttp.post","B.onreadystatechange","_forceXML","SimileAjax.XmlHttp._forceXML","overrideMimeType","setrequestheader","Timeline","serverLocale","timeZone","_Band","Timeline._Band","autoWidth","_timeline","_bandInfo","_locale","locale","_timeZone","_labeller","labeller","createLabeller","GregorianDateLabeller","_theme","theme","_zoomIndex","zoomIndex","_zoomSteps","zoomSteps","_changing","_originalScrollSpeed","_scrollSpeed","_onScrollListeners","_syncWithBand","_syncWithBandHandler","._syncWithBandHandler","_onHighlightBandScroll","_selectorListener","._selectorListener","getDocument","addDiv","_keyboardInput","mouseWheel","_innerDiv","_ether","ether","_etherPainter","etherPainter","_eventSource","eventSource","_eventListener","onAddMany","_onAddMany","onClear","_onClear","_eventPainter","eventPainter","_eventTracksNeeded","_eventTrackIncrement","_decorators","decorators","SCROLL_MULTIPLES","Timeline._Band.prototype.dispose","closeBubble","addOnScrollListener","Timeline._Band.prototype.addOnScrollListener","removeOnScrollListener","Timeline._Band.prototype.removeOnScrollListener","setSyncWithBand","Timeline._Band.prototype.setSyncWithBand","_highlight","_positionHighlight","getLocale","Timeline._Band.prototype.getLocale","getTimeZone","Timeline._Band.prototype.getTimeZone","getLabeller","Timeline._Band.prototype.getLabeller","getIndex","Timeline._Band.prototype.getIndex","getEther","Timeline._Band.prototype.getEther","getEtherPainter","Timeline._Band.prototype.getEtherPainter","getEventSource","Timeline._Band.prototype.getEventSource","getEventPainter","Timeline._Band.prototype.getEventPainter","getTimeline","Timeline._Band.prototype.getTimeline","updateEventTrackInfo","Timeline._Band.prototype.updateEventTrackInfo","checkAutoWidth","Timeline._Band.prototype.checkAutoWidth","getType","overviewTrack","autoWidthMargin","track","offset","layout","Timeline._Band.prototype.layout","paint","Timeline._Band.prototype.paint","_paintDecorators","_paintEvents","softLayout","Timeline._Band.prototype.softLayout","softPaint","Timeline._Band.prototype.softPaint","_softPaintDecorators","_softPaintEvents","setBandShiftAndWidth","Timeline._Band.prototype.setBandShiftAndWidth","isHorizontal","getViewWidth","Timeline._Band.prototype.getViewWidth","setViewLength","Timeline._Band.prototype.setViewLength","_viewLength","_recenterDiv","_onChanging","getViewLength","Timeline._Band.prototype.getViewLength","getTotalViewLength","Timeline._Band.prototype.getTotalViewLength","getViewOffset","Timeline._Band.prototype.getViewOffset","_viewOffset","getMinDate","Timeline._Band.prototype.getMinDate","pixelOffsetToDate","getMaxDate","Timeline._Band.prototype.getMaxDate","getMinVisibleDate","Timeline._Band.prototype.getMinVisibleDate","getMinVisibleDateAfterDelta","Timeline._Band.prototype.getMinVisibleDateAfterDelta","getMaxVisibleDate","Timeline._Band.prototype.getMaxVisibleDate","getMaxVisibleDateAfterDelta","Timeline._Band.prototype.getMaxVisibleDateAfterDelta","getCenterVisibleDate","Timeline._Band.prototype.getCenterVisibleDate","setMinVisibleDate","Timeline._Band.prototype.setMinVisibleDate","_moveEther","dateToPixelOffset","setMaxVisibleDate","Timeline._Band.prototype.setMaxVisibleDate","setCenterVisibleDate","Timeline._Band.prototype.setCenterVisibleDate","Timeline._Band.prototype.dateToPixelOffset","Timeline._Band.prototype.pixelOffsetToDate","createLayerDiv","Timeline._Band.prototype.createLayerDiv","cursor","removeLayerDiv","Timeline._Band.prototype.removeLayerDiv","scrollToCenter","Timeline._Band.prototype.scrollToCenter","_autoScroll","showBubbleForEvent","Timeline._Band.prototype.showBubbleForEvent","showBubble","zoom","Timeline._Band.prototype.zoom","_onMouseDown","Timeline._Band.prototype._onMouseDown","_dragX","_dragY","_onMouseMove","Timeline._Band.prototype._onMouseMove","_onMouseUp","Timeline._Band.prototype._onMouseUp","_onMouseOut","Timeline._Band.prototype._onMouseOut","_onMouseScroll","Timeline._Band.prototype._onMouseScroll","_lastScrollTime","wheelDelta","detail","stopPropagation","_onDblClick","Timeline._Band.prototype._onDblClick","_onKeyDown","Timeline._Band.prototype._onKeyDown","_onKeyUp","Timeline._Band.prototype._onKeyUp","getPixelLength","Timeline._Band.prototype._autoScroll","Timeline._Band.prototype._moveEther","shiftOK","shiftPixels","Timeline._Band.prototype._onChanging","_fireOnScroll","_setSyncWithBandDate","busy","Timeline._Band.prototype.busy","Timeline._Band.prototype._fireOnScroll","Timeline._Band.prototype._setSyncWithBandDate","Timeline._Band.prototype._onHighlightBandScroll","setHighlight","Timeline._Band.prototype._onAddMany","Timeline._Band.prototype._onClear","Timeline._Band.prototype._positionHighlight","Timeline._Band.prototype._recenterDiv","Timeline._Band.prototype._paintEvents","Timeline._Band.prototype._softPaintEvents","Timeline._Band.prototype._paintDecorators","Timeline._Band.prototype._softPaintDecorators","Timeline._Band.prototype.closeBubble","CompactEventPainter","Timeline.CompactEventPainter","_params","_onSelectListeners","_filterMatcher","_highlightMatcher","_frc","_eventIdToElmt","Timeline.CompactEventPainter.prototype.initialize","_band","_backLayer","_eventLayer","_lineLayer","_highlightLayer","addOnSelectListener","Timeline.CompactEventPainter.prototype.addOnSelectListener","removeOnSelectListener","Timeline.CompactEventPainter.prototype.removeOnSelectListener","getFilterMatcher","Timeline.CompactEventPainter.prototype.getFilterMatcher","setFilterMatcher","Timeline.CompactEventPainter.prototype.setFilterMatcher","getHighlightMatcher","Timeline.CompactEventPainter.prototype.getHighlightMatcher","setHighlightMatcher","Timeline.CompactEventPainter.prototype.setHighlightMatcher","Timeline.CompactEventPainter.prototype.paint","_prepareForPainting","trackOffset","trackHeight","tape","tapeBottomMargin","labelBottomMargin","labelRightMargin","instant","icon","iconWidth","iconHeight","iconLabelGap","iconBottomMargin","compositeIcon","compositeIconWidth","customIconWidth","compositeIconHeight","customIconHeight","defaultIcon","defaultIconWidth","defaultIconHeight","defaultStackIcon","stackConcurrentPreciseInstantEvents","defaultStackIconWidth","defaultStackIconHeight","getEventIterator","collapseConcurrentPreciseInstantEvents","isInstant","isImprecise","paintEvent","paintStackedPreciseInstantEvents","paintCompositePreciseInstantEvents","Timeline.CompactEventPainter.prototype.softPaint","Timeline.CompactEventPainter.prototype._prepareForPainting","_tracks","Timeline.CompactEventPainter.prototype.paintEvent","paintInstantEvent","paintDurationEvent","Timeline.CompactEventPainter.prototype.paintInstantEvent","paintImpreciseInstantEvent","paintPreciseInstantEvent","Timeline.CompactEventPainter.prototype.paintDurationEvent","paintImpreciseDurationEvent","paintPreciseDurationEvent","Timeline.CompactEventPainter.prototype.paintPreciseInstantEvent","getProperty","getText","getIcon","url","getTextColor","getColor","getClassName","paintTapeIconLabel","_onClickInstantEvent","iconElmtData","labelElmtData","Timeline.CompactEventPainter.prototype.paintCompositePreciseInstantEvents","compositeEventLabelTemplate","_onClickMultiplePreciseInstantEvent","Timeline.CompactEventPainter.prototype.paintStackedPreciseInstantEvents","j","limit","moreMessageTemplate","r","g","p","labelLeft","iconLeft","end","k","_fitTracks","q","u","getAttribute","t","d","_paintEventLabel","text","labelSize","onmouseover","iconData","z","Timeline.CompactEventPainter.prototype.paintImpreciseInstantEvent","getLatestStart","getEarliestEnd","impreciseTapeElmtData","Timeline.CompactEventPainter.prototype.paintPreciseDurationEvent","tapeElmtData","Timeline.CompactEventPainter.prototype.paintImpreciseDurationEvent","Timeline.CompactEventPainter.prototype.paintTapeIconLabel","tapeHeight","iconAlign","_paintEventTape","impreciseColor","impreciseOpacity","earliestEnd","color","_paintEventIcon","Timeline.CompactEventPainter.prototype._fitTracks","Timeline.CompactEventPainter.prototype._paintEventIcon","tooltip","Timeline.CompactEventPainter.prototype._paintEventLabel","Timeline.CompactEventPainter.prototype._paintEventTape","backgroundImage","backgroundRepeat","_createHighlightDiv","Timeline.CompactEventPainter.prototype._createHighlightDiv","highlightColors","Timeline.CompactEventPainter.prototype._onClickMultiplePreciseInstantEvent","_showBubble","_fireOnSelect","Timeline.CompactEventPainter.prototype._onClickInstantEvent","_onClickDurationEvent","Timeline.CompactEventPainter.prototype._onClickDurationEvent","Timeline.CompactEventPainter.prototype.showBubble","Timeline.CompactEventPainter.prototype._showBubble","fillInfoBubble","bubble","Timeline.CompactEventPainter.prototype._fireOnSelect","SpanHighlightDecorator","Timeline.SpanHighlightDecorator","unit","startDate","endDate","_startLabel","startLabel","_endLabel","endLabel","_color","_cssClass","cssClass","_opacity","_zIndex","inFront","Timeline.SpanHighlightDecorator.prototype.initialize","_layerDiv","Timeline.SpanHighlightDecorator.prototype.paint","Timeline.SpanHighlightDecorator.prototype.softPaint","PointHighlightDecorator","Timeline.PointHighlightDecorator","_date","date","_width","Timeline.PointHighlightDecorator.prototype.initialize","Timeline.PointHighlightDecorator.prototype.paint","Timeline.PointHighlightDecorator.prototype.softPaint","DetailedEventPainter","Timeline.DetailedEventPainter","Timeline.DetailedEventPainter.prototype.initialize","Timeline.DetailedEventPainter.prototype.getType","Timeline.DetailedEventPainter.prototype.addOnSelectListener","Timeline.DetailedEventPainter.prototype.removeOnSelectListener","Timeline.DetailedEventPainter.prototype.getFilterMatcher","Timeline.DetailedEventPainter.prototype.setFilterMatcher","Timeline.DetailedEventPainter.prototype.getHighlightMatcher","Timeline.DetailedEventPainter.prototype.setHighlightMatcher","Timeline.DetailedEventPainter.prototype.paint","gap","getEventReverseIterator","_lowerTracks","_upperTracks","trackIncrement","Timeline.DetailedEventPainter.prototype.softPaint","Timeline.DetailedEventPainter.prototype._prepareForPainting","Timeline.DetailedEventPainter.prototype.paintEvent","Timeline.DetailedEventPainter.prototype.paintInstantEvent","Timeline.DetailedEventPainter.prototype.paintDurationEvent","Timeline.DetailedEventPainter.prototype.paintPreciseInstantEvent","_findFreeTrackForSolid","offsetFromLine","_getTrackData","solid","_findFreeTrackForText","line","_paintEventLine","Timeline.DetailedEventPainter.prototype.paintImpreciseInstantEvent","Timeline.DetailedEventPainter.prototype.paintPreciseDurationEvent","Timeline.DetailedEventPainter.prototype.paintImpreciseDurationEvent","Timeline.DetailedEventPainter.prototype._findFreeTrackForSolid","POSITIVE_INFINITY","Timeline.DetailedEventPainter.prototype._findFreeTrackForText","_findFreeUpperTrackForText","_findFreeLowerTrackForText","Timeline.DetailedEventPainter.prototype._findFreeLowerTrackForText","Timeline.DetailedEventPainter.prototype._findFreeUpperTrackForText","Timeline.DetailedEventPainter.prototype._getTrackData","Timeline.DetailedEventPainter.prototype._paintEventLine","lineColor","borderTop","borderBottom","borderLeft","Timeline.DetailedEventPainter.prototype._paintEventIcon","_title","Timeline.DetailedEventPainter.prototype._paintEventLabel","backgroundOpacity","Timeline.DetailedEventPainter.prototype._paintEventTape","Timeline.DetailedEventPainter.prototype._createHighlightDiv","Timeline.DetailedEventPainter.prototype._onClickInstantEvent","Timeline.DetailedEventPainter.prototype._onClickDurationEvent","Timeline.DetailedEventPainter.prototype.showBubble","Timeline.DetailedEventPainter.prototype._showBubble","maxHeight","Timeline.DetailedEventPainter.prototype._fireOnSelect","GregorianEtherPainter","Timeline.GregorianEtherPainter","_multiple","multiple","Timeline.GregorianEtherPainter.prototype.initialize","_backgroundLayer","_markerLayer","align","interval","marker","showLine","show","_intervalMarkerLayout","EtherIntervalMarkerLayout","EtherHighlight","Timeline.GregorianEtherPainter.prototype.setHighlight","Timeline.GregorianEtherPainter.prototype.paint","firstDayOfWeek","createIntervalMarker","Timeline.GregorianEtherPainter.prototype.softPaint","Timeline.GregorianEtherPainter.prototype.zoom","HotZoneGregorianEtherPainter","Timeline.HotZoneGregorianEtherPainter","_zones","NEGATIVE_INFINITY","zones","endTime","startTime","Timeline.HotZoneGregorianEtherPainter.prototype.initialize","Timeline.HotZoneGregorianEtherPainter.prototype.setHighlight","Timeline.HotZoneGregorianEtherPainter.prototype.paint","Timeline.HotZoneGregorianEtherPainter.prototype.softPaint","Timeline.HotZoneGregorianEtherPainter.prototype.zoom","YearCountEtherPainter","Timeline.YearCountEtherPainter","Timeline.YearCountEtherPainter.prototype.initialize","Timeline.YearCountEtherPainter.prototype.setHighlight","Timeline.YearCountEtherPainter.prototype.paint","labelInterval","Timeline.YearCountEtherPainter.prototype.softPaint","QuarterlyEtherPainter","Timeline.QuarterlyEtherPainter","Timeline.QuarterlyEtherPainter.prototype.initialize","Timeline.QuarterlyEtherPainter.prototype.setHighlight","Timeline.QuarterlyEtherPainter.prototype.paint","Timeline.QuarterlyEtherPainter.prototype.softPaint","Timeline.EtherIntervalMarkerLayout","positionDiv",".positionDiv","weekend",".createIntervalMarker","emphasized","Timeline.EtherHighlight","_highlightDiv","._createHighlightDiv","highlightOpacity",".position","LinearEther","Timeline.LinearEther","_interval","_pixelsPerInterval","pixelsPerInterval","Timeline.LinearEther.prototype.initialize","_start","startsOn","endsOn","centersOn","setDate","Timeline.LinearEther.prototype.setDate","Timeline.LinearEther.prototype.shiftPixels","Timeline.LinearEther.prototype.dateToPixelOffset","Timeline.LinearEther.prototype.pixelOffsetToDate","Timeline.LinearEther.prototype.zoom","HotZoneEther","Timeline.HotZoneEther","Timeline.HotZoneEther.prototype.initialize","magnify","Timeline.HotZoneEther.prototype.setDate","Timeline.HotZoneEther.prototype.shiftPixels","Timeline.HotZoneEther.prototype.dateToPixelOffset","_dateDiffToPixelOffset","Timeline.HotZoneEther.prototype.pixelOffsetToDate","_pixelOffsetToDate","Timeline.HotZoneEther.prototype.zoom","Timeline.HotZoneEther.prototype._dateDiffToPixelOffset","_getScale","Timeline.HotZoneEther.prototype._pixelOffsetToDate","Timeline.HotZoneEther.prototype._getScale","EventUtils","getNewEventID","Timeline.EventUtils.getNewEventID","_lastEventID","decodeEventElID","Timeline.EventUtils.decodeEventElID","getTimelineFromID","getBand","encodeEventElID","Timeline.EventUtils.encodeEventElID","timelineID","Timeline.GregorianDateLabeller","monthNames","dayNames","labelIntervalFunctions","getMonthName","Timeline.GregorianDateLabeller.getMonthName","Timeline.GregorianDateLabeller.prototype.labelInterval","defaultLabelInterval","labelPrecise","Timeline.GregorianDateLabeller.prototype.labelPrecise","toUTCString","Timeline.GregorianDateLabeller.prototype.defaultLabelInterval","OriginalEventPainter","Timeline.OriginalEventPainter","_eventPaintListeners","Timeline.OriginalEventPainter.prototype.initialize","Timeline.OriginalEventPainter.prototype.getType","Timeline.OriginalEventPainter.prototype.addOnSelectListener","Timeline.OriginalEventPainter.prototype.removeOnSelectListener","addEventPaintListener","Timeline.OriginalEventPainter.prototype.addEventPaintListener","removeEventPaintListener","Timeline.OriginalEventPainter.prototype.removeEventPaintListener","Timeline.OriginalEventPainter.prototype.getFilterMatcher","Timeline.OriginalEventPainter.prototype.setFilterMatcher","Timeline.OriginalEventPainter.prototype.getHighlightMatcher","Timeline.OriginalEventPainter.prototype.setHighlightMatcher","Timeline.OriginalEventPainter.prototype.paint","_fireEventPaintListeners","maxLabelChar","impreciseIconMargin","Timeline.OriginalEventPainter.prototype.softPaint","Timeline.OriginalEventPainter.prototype._prepareForPainting","Timeline.OriginalEventPainter.prototype.paintEvent","Timeline.OriginalEventPainter.prototype.paintInstantEvent","Timeline.OriginalEventPainter.prototype.paintDurationEvent","Timeline.OriginalEventPainter.prototype.paintPreciseInstantEvent","_getLabelDivClassName","_findFreeTrack","Timeline.OriginalEventPainter.prototype.paintImpreciseInstantEvent","Timeline.OriginalEventPainter.prototype.paintPreciseDurationEvent","Timeline.OriginalEventPainter.prototype.paintImpreciseDurationEvent","_encodeEventElID","Timeline.OriginalEventPainter.prototype._encodeEventElID","Timeline.OriginalEventPainter.prototype._findFreeTrack","getTrackNum","Timeline.OriginalEventPainter.prototype._paintEventIcon","_getElClassName","Timeline.OriginalEventPainter.prototype._paintEventLabel","highlightLabelBackground","_getHighlightColor","Timeline.OriginalEventPainter.prototype._paintEventTape","getTapeImage","getTapeRepeat","Timeline.OriginalEventPainter.prototype._getLabelDivClassName","Timeline.OriginalEventPainter.prototype._getElClassName","Timeline.OriginalEventPainter.prototype._getHighlightColor","Timeline.OriginalEventPainter.prototype._createHighlightDiv","Timeline.OriginalEventPainter.prototype._onClickInstantEvent","Timeline.OriginalEventPainter.prototype._onClickDurationEvent","Timeline.OriginalEventPainter.prototype.showBubble","Timeline.OriginalEventPainter.prototype._showBubble","Timeline.OriginalEventPainter.prototype._fireOnSelect","Timeline.OriginalEventPainter.prototype._fireEventPaintListeners","OverviewEventPainter","Timeline.OverviewEventPainter","Timeline.OverviewEventPainter.prototype.initialize","Timeline.OverviewEventPainter.prototype.getType","Timeline.OverviewEventPainter.prototype.addOnSelectListener","Timeline.OverviewEventPainter.prototype.removeOnSelectListener","Timeline.OverviewEventPainter.prototype.getFilterMatcher","Timeline.OverviewEventPainter.prototype.setFilterMatcher","Timeline.OverviewEventPainter.prototype.getHighlightMatcher","Timeline.OverviewEventPainter.prototype.setHighlightMatcher","Timeline.OverviewEventPainter.prototype.paint","Timeline.OverviewEventPainter.prototype.softPaint","Timeline.OverviewEventPainter.prototype._prepareForPainting","Timeline.OverviewEventPainter.prototype.paintEvent","Timeline.OverviewEventPainter.prototype.paintInstantEvent","_paintEventTick","Timeline.OverviewEventPainter.prototype.paintDurationEvent","Timeline.OverviewEventPainter.prototype._paintEventTape","Timeline.OverviewEventPainter.prototype._paintEventTick","tickHeight","Timeline.OverviewEventPainter.prototype._createHighlightDiv","Timeline.OverviewEventPainter.prototype.showBubble","DefaultEventSource","Timeline.DefaultEventSource","Timeline.DefaultEventSource.prototype.addListener","Timeline.DefaultEventSource.prototype.removeListener","loadXML","Timeline.DefaultEventSource.prototype.loadXML","_getBaseURL","nodeValue","Event","_resolveRelativeURL","_node","K.getProperty","setWikiInfo","_fire","loadJSON","Timeline.DefaultEventSource.prototype.loadJSON","events","wikiURL","wikiSection","dateTimeFormat","isDuration","durationEvent","latestStart","link","textColor","hoverText","classname","tapeImage","tapeRepeat","caption","eventID","trackNum","_obj","L.getProperty","loadSPARQL","Timeline.DefaultEventSource.prototype.loadSPARQL","nodeName","_bindings","M.getProperty","Timeline.DefaultEventSource.prototype.add","addMany","Timeline.DefaultEventSource.prototype.addMany","clear","Timeline.DefaultEventSource.prototype.clear","Timeline.DefaultEventSource.prototype.getEvent","Timeline.DefaultEventSource.prototype.getEventIterator","Timeline.DefaultEventSource.prototype.getEventReverseIterator","getAllEventIterator","Timeline.DefaultEventSource.prototype.getAllEventIterator","Timeline.DefaultEventSource.prototype.getCount","Timeline.DefaultEventSource.prototype.getEarliestDate","Timeline.DefaultEventSource.prototype.getLatestDate","Timeline.DefaultEventSource.prototype._fire","Timeline.DefaultEventSource.prototype._getBaseURL","href","lastIndexOf","Timeline.DefaultEventSource.prototype._resolveRelativeURL","Timeline.DefaultEventSource.Event","_id","_instant","_end","_latestStart","_earliestEnd","_eventID","_text","_description","_image","_link","_icon","_textColor","_classname","_tapeImage","_tapeRepeat","_trackNum","_wikiURL","_wikiSection","getEventID","getDescription","getImage","getLink","getWikiURL","getWikiSection","fillDescription","fillWikiInfo","strings","wikiLinkLabel","fillTime","ownerDocument","imageStyler","titleStyler","bodyStyler","timeStyler","wikiStyler","ClassicTheme","implementations","create","Timeline.ClassicTheme.create","_Impl","Timeline.ClassicTheme._Impl","autoWidthAnimationTime","timeline_start","timeline_stop","ajax_lib_version","display_version","HORIZONTAL","VERTICAL","_defaultTheme","Timeline.getDefaultLocale","Timeline.create","timelines","createBandInfo","Timeline.createBandInfo","getDefaultTheme","intervalUnit","intervalPixels","showEventText","eventPainterParams","trackGap","overview","createHotZoneBandInfo","Timeline.createHotZoneBandInfo","Timeline.getDefaultTheme","setDefaultTheme","Timeline.setDefaultTheme","Timeline.loadXML","responseXML","responseStream","load","Timeline.loadJSON","fError","fDone","xmlhttp","responseText","Timeline.getTimelineFromID","writeVersion","Timeline.writeVersion","getElementById","Timeline._Impl","_containerDiv","_bandInfos","_orientation","_starting","_autoResizing","timeline_at_start","timeline_at_stop","_initialize","Timeline._Impl.prototype.dispose","_bands","getBandCount","Timeline._Impl.prototype.getBandCount","Timeline._Impl.prototype.getBand","finishedEventLoading","Timeline._Impl.prototype.finishedEventLoading","_autoWidthCheck","Timeline._Impl.prototype.layout","_distributeWidths","Timeline._Impl.prototype.paint","Timeline._Impl.prototype.getDocument","Timeline._Impl.prototype.addDiv","removeDiv","Timeline._Impl.prototype.removeDiv","Timeline._Impl.prototype.isHorizontal","isVertical","Timeline._Impl.prototype.isVertical","Timeline._Impl.prototype.getPixelLength","getPixelWidth","Timeline._Impl.prototype.getPixelWidth","Timeline._Impl.prototype.getUnit","getWidthStyle","Timeline._Impl.prototype.getWidthStyle","Timeline._Impl.prototype.loadXML","hideLoadingMessage","showLoadingMessage","Timeline._Impl.prototype.loadJSON","tl","_autoWidthScrollListener","Timeline._Impl.prototype._autoWidthScrollListener","Timeline._Impl.prototype._autoWidthCheck","animate","Timeline._Impl.prototype._initialize","syncWith","highlight","containerDiv","contentDiv",".showLoadingMessage",".hideLoadingMessage","Timeline._Impl.prototype._distributeWidths","Timeline._Impl.prototype.shiftOK","Timeline._Impl.prototype.zoom","exec","Timeline.NativeDateUnit.createLabeller","Timeline.NativeDateUnit.makeDefaultValue","Timeline.NativeDateUnit.cloneValue","Timeline.NativeDateUnit.getParser","Timeline.NativeDateUnit.parseFromObject","Timeline.NativeDateUnit.toNumber","Timeline.NativeDateUnit.fromNumber","Timeline.NativeDateUnit.compare","Timeline.NativeDateUnit.earlier","Timeline.NativeDateUnit.later","Timeline.NativeDateUnit.change","en"] -} +{ +"version":3, +"file":"Timeline.min.js", +"lineCount":1, +"mappings":"AAqS8D,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,6BAAlD,CAAgFA,KAAK,CAAC,GAAD,zFCrSnJC,MAAMC,WAAY,CAAE,CAChB,MAAM,CAAE,CAAA,CAAI,CACZ,mBAAmB,CAAE,CAAC,CACtB,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,CAAE,MAAM,CAAE,MAAV,CAAkB,CAC1B,QAAQ,CAAE,CAAA,CALM,CAMnB,CDADA,UAAUC,QAAQ,CAAC,WAAW,CAC9BD,UAAUE,OAAO,CAACA,MAAMC,W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E,CAACtL,CAAb,CAAhB,CAC3C,CC7wFDk4B,QAAQ8rB,QAASqH,GAAM,CAAE,CACrB,aAAa,CAAG,SADK,CAExB,CCFDnzB,QAAQc,sBAAsBugB,WAAY8R,GAAM,CAAE,CAC9C,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAAK,CAAE,KAD/B,CAEjD,CAEDnzB,QAAQc,sBAAsBwgB,SAAU6R,GAAM,CAAE,CAC5C,QAAQ,CAAE,QAAQ,CAAE,SAAS,CAAE,WAAW,CAAE,UAAU,CAAE,QAAQ,CAAE,UADtB,CAE/C", +"sources":["/ClientSource/Scripts/Modules/Timeline/simile-ajax-bundle-DiscoMod.js","/ClientSource/Scripts/Modules/Timeline/disco.simileajaxextensions.js","/ClientSource/Scripts/Modules/Timeline/disco.timelineextensions.js","/ClientSource/Scripts/Modules/Timeline/timeline-bundle.js","/ClientSource/Scripts/Modules/Timeline/timeline.js","/ClientSource/Scripts/Modules/Timeline/labellers.js"], +"names":["join","window","SimileAjax","version","jQuery","noConflict","$","Platform","os","browser","C","navigator","appName","toLowerCase","A","userAgent","E","B","D","isMac","indexOf","isWin","isWin32","isUnix","isIE","isNetscape","isMozilla","isFirefox","isOpera","isSafari","G","F","split","majorVersion","parseInt","minorVersion","H","I","length","substring","String","prototype","localeCompare","String.prototype.localeCompare","getDefaultLocale","SimileAjax.Platform.getDefaultLocale","clientLocale","ListenerQueue","SimileAjax.ListenerQueue","_listeners","_wildcardHandlerName","add","SimileAjax.ListenerQueue.prototype.add","push","remove","SimileAjax.ListenerQueue.prototype.remove","splice","fire","SimileAjax.ListenerQueue.prototype.fire","concat","apply","Debug","exception","Set","SimileAjax.Set","_hash","_count","Array","addSet","SimileAjax.Set.prototype.add","SimileAjax.Set.prototype.addSet","SimileAjax.Set.prototype.remove","removeSet","SimileAjax.Set.prototype.removeSet","retainSet","SimileAjax.Set.prototype.retainSet","contains","SimileAjax.Set.prototype.contains","size","SimileAjax.Set.prototype.size","toArray","SimileAjax.Set.prototype.toArray","visit","SimileAjax.Set.prototype.visit","SortedArray","SimileAjax.SortedArray","_a","_compare","SimileAjax.SortedArray.prototype.add","find","SimileAjax.SortedArray.prototype.remove","removeAll","SimileAjax.SortedArray.prototype.removeAll","elementAt","SimileAjax.SortedArray.prototype.elementAt","SimileAjax.SortedArray.prototype.length","SimileAjax.SortedArray.prototype.find","Math","floor","getFirst","SimileAjax.SortedArray.prototype.getFirst","getLast","SimileAjax.SortedArray.prototype.getLast","EventIndex","SimileAjax.EventIndex","_unit","NativeDateUnit","_events","compare","getStart","_idToEvent","_indexed","getUnit","SimileAjax.EventIndex.prototype.getUnit","getEvent","SimileAjax.EventIndex.prototype.getEvent","SimileAjax.EventIndex.prototype.add","getID","SimileAjax.EventIndex.prototype.removeAll","getCount","SimileAjax.EventIndex.prototype.getCount","getIterator","SimileAjax.EventIndex.prototype.getIterator","_index","_Iterator","getReverseIterator","SimileAjax.EventIndex.prototype.getReverseIterator","_ReverseIterator","getAllIterator","SimileAjax.EventIndex.prototype.getAllIterator","_AllIterator","getEarliestDate","SimileAjax.EventIndex.prototype.getEarliestDate","getLatestDate","SimileAjax.EventIndex.prototype.getLatestDate","_earliestOverlapIndex","getEnd","later","SimileAjax.EventIndex.prototype._index","max","SimileAjax.EventIndex._Iterator","_startDate","_endDate","_currentIndex","_maxIndex","_hasNext","_next","_findNext","hasNext","next","SimileAjax.EventIndex._ReverseIterator","_minIndex","SimileAjax.EventIndex._AllIterator","DateTime","MILLISECOND","SECOND","MINUTE","HOUR","DAY","WEEK","MONTH","YEAR","DECADE","CENTURY","MILLENNIUM","EPOCH","ERA","gregorianUnitLengths","_dateRegexp","RegExp","_timezoneRegexp","_timeRegexp","setIso8601Date","SimileAjax.DateTime.setIso8601Date","match","Error","J","M","setUTCFullYear","setUTCMonth","setUTCDate","Number","L","getUTCDay","K","setIso8601Time","SimileAjax.DateTime.setIso8601Time","warn","setUTCHours","setUTCMinutes","setUTCSeconds","setUTCMilliseconds","timezoneOffset","Date","getTimezoneOffset","setIso8601","SimileAjax.DateTime.setIso8601","substr","setTime","getTime","parseIso8601DateTime","SimileAjax.DateTime.parseIso8601DateTime","parseGregorianDateTime","SimileAjax.DateTime.parseGregorianDateTime","toString","parse","roundDownToInterval","SimileAjax.DateTime.roundDownToInterval","getUTCMilliseconds","getUTCSeconds","getUTCMinutes","getUTCHours","getUTCMonth","getUTCFullYear","roundUpToInterval","SimileAjax.DateTime.roundUpToInterval","incrementByInterval","SimileAjax.DateTime.incrementByInterval","getUTCDate","removeTimeZoneOffset","SimileAjax.DateTime.removeTimeZoneOffset","getTimezone","SimileAjax.DateTime.getTimezone","log","SimileAjax.Debug.log","console","silent","alert","SimileAjax.Debug.warn","SimileAjax.Debug.exception","parseURLParameters","errors","params","error","description","objectToString","SimileAjax.Debug.objectToString","_objectToString","SimileAjax.Debug._objectToString","DOM","registerEventWithObject","SimileAjax.DOM.registerEventWithObject","registerEvent","call","SimileAjax.DOM.registerEvent","event","target","srcElement","nodeType","parentNode","attachEvent","addEventListener","getPageCoordinates","SimileAjax.DOM.getPageCoordinates","offsetLeft","offsetTop","offsetParent","document","body","scrollLeft","scrollTop","getSize","SimileAjax.DOM.getSize","getStyle","replace","SimileAjax.DOM.getStyle","currentStyle","getComputedStyle","defaultView","getPropertyValue","getEventRelativeCoordinates","SimileAjax.DOM.getEventRelativeCoordinates","type","clientX","left","clientY","top","offsetX","offsetY","screenX","screenY","pageX","pageY","getEventPageCoordinates","SimileAjax.DOM.getEventPageCoordinates","hittest","SimileAjax.DOM.hittest","_hittest","SimileAjax.DOM._hittest","childNodes","offsetWidth","offsetHeight","tagName","cancelEvent","SimileAjax.DOM.cancelEvent","returnValue","cancelBubble","preventDefault","appendClassName","SimileAjax.DOM.appendClassName","className","createInputElement","SimileAjax.DOM.createInputElement","createElement","innerHTML","firstChild","createDOMFromTemplate","SimileAjax.DOM.createDOMFromTemplate","elmt","_createDOMFromTemplate","SimileAjax.DOM._createDOMFromTemplate","createTextNode","appendChild","tag","insertRow","rows","insertCell","cells","id","title","n","style","setAttribute","_cachedParent","createElementFromString","SimileAjax.DOM.createElementFromString","createDOMFromString","SimileAjax.DOM.createDOMFromString","_processDOMChildrenConstructedFromString","_processDOMConstructedFromString","SimileAjax.DOM._processDOMConstructedFromString","removeAttribute","insertBefore","removeChild","hasChildNodes","SimileAjax.DOM._processDOMChildrenConstructedFromString","nextSibling","Graphics","pngIsTranslucent","includeCssFile","urlPrefix","_createTranslucentImage1","SimileAjax.Graphics._createTranslucentImage1","verticalAlign","_createTranslucentImage2","SimileAjax.Graphics._createTranslucentImage2","width","height","filter","createTranslucentImage","_createTranslucentImageHTML1","SimileAjax.Graphics._createTranslucentImageHTML1","_createTranslucentImageHTML2","SimileAjax.Graphics._createTranslucentImageHTML2","createTranslucentImageHTML","setOpacity","SimileAjax.Graphics.setOpacity","opacity","MozOpacity","bubbleConfig","createBubbleForContentAndPoint","SimileAjax.Graphics.createBubbleForContentAndPoint","position","setTimeout","scrollWidth","scrollHeight","createBubbleForPoint","content","SimileAjax.Graphics.createBubbleForPoint","N","P","borderGraphicSize","O","S","containerCSSClass","innerContainerCSSClass","Q","_closed","_div","_doc","_content","R","WindowManager","pushLayer","close","Q.close","popLayer","T","borderGraphicCSSClassPrefix","contentContainerCSSClass","closeGraphicCSSClass","Y","getWindowDimensions","w","U","h","V","ceil","arrowGraphicWidth","Z","b","a","arrowGraphicCSSClassPrefix","X","W","extraPadding","round","min","arrowGraphicTargetOffset","SimileAjax.Graphics.getWindowDimensions","innerHeight","innerWidth","documentElement","clientHeight","clientWidth","createMessageBubble","SimileAjax.Graphics.createMessageBubble","background","paddingLeft","paddingRight","border","padding","createAnimation","SimileAjax.Graphics.createAnimation","_Animation","SimileAjax.Graphics._Animation","f","cont","from","to","current","duration","start","timePassed","run","SimileAjax.Graphics._Animation.prototype.run","step","SimileAjax.Graphics._Animation.prototype.step","cos","PI","createStructuredDataCopyButton","SimileAjax.Graphics.createStructuredDataCopyButton","display","overflow","margin","onmousedown","C.onmousedown","button","value","select","getWidthHeight","SimileAjax.Graphics.getWidthHeight","getBoundingClientRect","right","bottom","getFontRenderingContext","SimileAjax.Graphics.getFontRenderingContext","_FontRenderingContext","SimileAjax.Graphics._FontRenderingContext","_elmt","visibility","dispose","SimileAjax.Graphics._FontRenderingContext.prototype.dispose","update","SimileAjax.Graphics._FontRenderingContext.prototype.update","_lineHeight","computeSize","SimileAjax.Graphics._FontRenderingContext.prototype.computeSize","undefined","getLineHeight","SimileAjax.Graphics._FontRenderingContext.prototype.getLineHeight","History","formatHistoryEntryTitle","SimileAjax.History.formatHistoryEntryTitle","_plainDocumentTitle","initialize","SimileAjax.History.initialize","_initialized","enabled","src","historyFile","_handleIFrameOnLoad","_iframe","addListener","SimileAjax.History.addListener","removeListener","SimileAjax.History.removeListener","addAction","SimileAjax.History.addAction","perform","_actions","slice","_baseIndex","maxHistoryLength","contentWindow","location","search","label","addLengthyAction","SimileAjax.History.addLengthyAction","getBaseLayer","SimileAjax.History._handleIFrameOnLoad","undo","getNextUndoAction","SimileAjax.History.getNextUndoAction","getNextRedoAction","SimileAjax.History.getNextRedoAction","HTML","_e2uHash","nbsp","iexcl","cent","pound","curren","yen","brvbar","sect","uml","copy","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1","ordm","raquo","frac14","frac12","frac34","iquest","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","times","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","szlig","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute","ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","divide","oslash","ugrave","uacute","ucirc","uuml","yacute","thorn","yuml","quot","amp","lt","gt","OElig","oelig","Scaron","scaron","Yuml","circ","tilde","ensp","emsp","thinsp","zwnj","zwj","lrm","rlm","ndash","mdash","lsquo","rsquo","sbquo","ldquo","rdquo","bdquo","dagger","Dagger","permil","lsaquo","rsaquo","euro","fnof","Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigmaf","sigma","tau","upsilon","phi","chi","psi","omega","thetasym","upsih","piv","bull","hellip","prime","Prime","oline","frasl","weierp","image","real","trade","alefsym","larr","uarr","rarr","darr","harr","crarr","lArr","uArr","rArr","dArr","hArr","forall","part","exist","empty","nabla","isin","notin","ni","prod","sum","minus","lowast","radic","prop","infin","ang","and","or","cap","cup","int","there4","sim","cong","asymp","ne","equiv","le","ge","sub","sup","nsub","sube","supe","oplus","otimes","perp","sdot","lceil","rceil","lfloor","rfloor","lang","rang","loz","spades","clubs","hearts","diams","deEntify","SimileAjax.HTML.deEntify","test","JSON","m","s","array","x","l","v","i","boolean","null","number","isFinite","object","string","c","charCodeAt","toJSONString","SimileAjax.JSON.toJSONString","o","Object","parseJSON","SimileAjax.JSON.parseJSON","eval","e","trim","String.prototype.trim","startsWith","String.prototype.startsWith","endsWith","String.prototype.endsWith","substitute","String.substitute","charAt","isNaN","makeDefaultValue","SimileAjax.NativeDateUnit.makeDefaultValue","cloneValue","SimileAjax.NativeDateUnit.cloneValue","getParser","SimileAjax.NativeDateUnit.getParser","parseFromObject","SimileAjax.NativeDateUnit.parseFromObject","toNumber","SimileAjax.NativeDateUnit.toNumber","fromNumber","SimileAjax.NativeDateUnit.fromNumber","SimileAjax.NativeDateUnit.compare","earlier","SimileAjax.NativeDateUnit.earlier","SimileAjax.NativeDateUnit.later","change","SimileAjax.NativeDateUnit.change","SimileAjax.WindowManager.initialize","_onBodyMouseDown","_onBodyMouseMove","_onBodyMouseUp","_onBodyKeyDown","_onBodyKeyUp","_layers","_historyListener","onBeforeUndoSeveral","onAfterUndoSeveral","onBeforeUndo","onAfterUndo","onBeforeRedoSeveral","onAfterRedoSeveral","onBeforeRedo","onAfterRedo","SimileAjax.WindowManager.getBaseLayer","getHighestLayer","SimileAjax.WindowManager.getHighestLayer","SimileAjax.WindowManager.registerEventWithObject","SimileAjax.WindowManager.registerEvent","_canProcessEventAtLayer","_popToLayer","index","SimileAjax.WindowManager.pushLayer","SimileAjax.WindowManager.popLayer","popAllLayers","SimileAjax.WindowManager.popAllLayers","registerForDragging","SimileAjax.WindowManager.registerForDragging","_handleMouseDown","SimileAjax.WindowManager._popToLayer","pop","onPop","SimileAjax.WindowManager._canProcessEventAtLayer","ephemeral","cancelPopups","SimileAjax.WindowManager.cancelPopups","y","SimileAjax.WindowManager._onBodyMouseDown","eventPhase","BUBBLING_PHASE","SimileAjax.WindowManager._handleMouseDown","_draggedElement","_draggedElementCallback","_lastCoords","SimileAjax.WindowManager._onBodyKeyDown","_dragging","keyCode","_cancelDragging","_draggingMode","_ghostCoords","_draggingModeIndicatorElmt","SimileAjax.WindowManager._onBodyKeyUp","SimileAjax.WindowManager._onBodyMouseMove","onDragBy","_ghostElmt","droppable","_dropTargetHighlightElement","_findDropTarget","_potentialDropTarget","canDropOn","canDrop","backgroundColor","abs","onDragStart","ghost","cloneNode","zIndex","focus","SimileAjax.WindowManager._onBodyMouseUp","onDragEnd","onDropOn","ondrop","SimileAjax.WindowManager._cancelDragging","SimileAjax.WindowManager._findDropTarget","XmlHttp","_onReadyStateChange","SimileAjax.XmlHttp._onReadyStateChange","readyState","status","statusText","_createRequest","SimileAjax.XmlHttp._createRequest","ActiveXObject","XMLHttpRequest","get","SimileAjax.XmlHttp.get","open","onreadystatechange","A.onreadystatechange","send","post","SimileAjax.XmlHttp.post","B.onreadystatechange","_forceXML","SimileAjax.XmlHttp._forceXML","overrideMimeType","setrequestheader","Timeline","serverLocale","timeZone","_Band","Timeline._Band","autoWidth","_timeline","_bandInfo","_locale","locale","_timeZone","_labeller","labeller","createLabeller","GregorianDateLabeller","_theme","theme","_zoomIndex","zoomIndex","_zoomSteps","zoomSteps","_changing","_originalScrollSpeed","_scrollSpeed","_onScrollListeners","_syncWithBand","_syncWithBandHandler","._syncWithBandHandler","_onHighlightBandScroll","_selectorListener","._selectorListener","getDocument","addDiv","_keyboardInput","mouseWheel","_innerDiv","_ether","ether","_etherPainter","etherPainter","_eventSource","eventSource","_eventListener","onAddMany","_onAddMany","onClear","_onClear","_eventPainter","eventPainter","_eventTracksNeeded","_eventTrackIncrement","_decorators","decorators","SCROLL_MULTIPLES","Timeline._Band.prototype.dispose","closeBubble","addOnScrollListener","Timeline._Band.prototype.addOnScrollListener","removeOnScrollListener","Timeline._Band.prototype.removeOnScrollListener","setSyncWithBand","Timeline._Band.prototype.setSyncWithBand","_highlight","_positionHighlight","getLocale","Timeline._Band.prototype.getLocale","getTimeZone","Timeline._Band.prototype.getTimeZone","getLabeller","Timeline._Band.prototype.getLabeller","getIndex","Timeline._Band.prototype.getIndex","getEther","Timeline._Band.prototype.getEther","getEtherPainter","Timeline._Band.prototype.getEtherPainter","getEventSource","Timeline._Band.prototype.getEventSource","getEventPainter","Timeline._Band.prototype.getEventPainter","getTimeline","Timeline._Band.prototype.getTimeline","updateEventTrackInfo","Timeline._Band.prototype.updateEventTrackInfo","checkAutoWidth","Timeline._Band.prototype.checkAutoWidth","getType","overviewTrack","autoWidthMargin","track","offset","layout","Timeline._Band.prototype.layout","paint","Timeline._Band.prototype.paint","_paintDecorators","_paintEvents","softLayout","Timeline._Band.prototype.softLayout","softPaint","Timeline._Band.prototype.softPaint","_softPaintDecorators","_softPaintEvents","setBandShiftAndWidth","Timeline._Band.prototype.setBandShiftAndWidth","isHorizontal","getViewWidth","Timeline._Band.prototype.getViewWidth","setViewLength","Timeline._Band.prototype.setViewLength","_viewLength","_recenterDiv","_onChanging","getViewLength","Timeline._Band.prototype.getViewLength","getTotalViewLength","Timeline._Band.prototype.getTotalViewLength","getViewOffset","Timeline._Band.prototype.getViewOffset","_viewOffset","getMinDate","Timeline._Band.prototype.getMinDate","pixelOffsetToDate","getMaxDate","Timeline._Band.prototype.getMaxDate","getMinVisibleDate","Timeline._Band.prototype.getMinVisibleDate","getMinVisibleDateAfterDelta","Timeline._Band.prototype.getMinVisibleDateAfterDelta","getMaxVisibleDate","Timeline._Band.prototype.getMaxVisibleDate","getMaxVisibleDateAfterDelta","Timeline._Band.prototype.getMaxVisibleDateAfterDelta","getCenterVisibleDate","Timeline._Band.prototype.getCenterVisibleDate","setMinVisibleDate","Timeline._Band.prototype.setMinVisibleDate","_moveEther","dateToPixelOffset","setMaxVisibleDate","Timeline._Band.prototype.setMaxVisibleDate","setCenterVisibleDate","Timeline._Band.prototype.setCenterVisibleDate","Timeline._Band.prototype.dateToPixelOffset","Timeline._Band.prototype.pixelOffsetToDate","createLayerDiv","Timeline._Band.prototype.createLayerDiv","cursor","removeLayerDiv","Timeline._Band.prototype.removeLayerDiv","scrollToCenter","Timeline._Band.prototype.scrollToCenter","_autoScroll","showBubbleForEvent","Timeline._Band.prototype.showBubbleForEvent","showBubble","zoom","Timeline._Band.prototype.zoom","_onMouseDown","Timeline._Band.prototype._onMouseDown","_dragX","_dragY","_onMouseMove","Timeline._Band.prototype._onMouseMove","_onMouseUp","Timeline._Band.prototype._onMouseUp","_onMouseOut","Timeline._Band.prototype._onMouseOut","_onMouseScroll","Timeline._Band.prototype._onMouseScroll","_lastScrollTime","wheelDelta","detail","stopPropagation","_onDblClick","Timeline._Band.prototype._onDblClick","_onKeyDown","Timeline._Band.prototype._onKeyDown","_onKeyUp","Timeline._Band.prototype._onKeyUp","getPixelLength","Timeline._Band.prototype._autoScroll","Timeline._Band.prototype._moveEther","shiftOK","shiftPixels","Timeline._Band.prototype._onChanging","_fireOnScroll","_setSyncWithBandDate","busy","Timeline._Band.prototype.busy","Timeline._Band.prototype._fireOnScroll","Timeline._Band.prototype._setSyncWithBandDate","Timeline._Band.prototype._onHighlightBandScroll","setHighlight","Timeline._Band.prototype._onAddMany","Timeline._Band.prototype._onClear","Timeline._Band.prototype._positionHighlight","Timeline._Band.prototype._recenterDiv","Timeline._Band.prototype._paintEvents","Timeline._Band.prototype._softPaintEvents","Timeline._Band.prototype._paintDecorators","Timeline._Band.prototype._softPaintDecorators","Timeline._Band.prototype.closeBubble","CompactEventPainter","Timeline.CompactEventPainter","_params","_onSelectListeners","_filterMatcher","_highlightMatcher","_frc","_eventIdToElmt","Timeline.CompactEventPainter.prototype.initialize","_band","_backLayer","_eventLayer","_lineLayer","_highlightLayer","addOnSelectListener","Timeline.CompactEventPainter.prototype.addOnSelectListener","removeOnSelectListener","Timeline.CompactEventPainter.prototype.removeOnSelectListener","getFilterMatcher","Timeline.CompactEventPainter.prototype.getFilterMatcher","setFilterMatcher","Timeline.CompactEventPainter.prototype.setFilterMatcher","getHighlightMatcher","Timeline.CompactEventPainter.prototype.getHighlightMatcher","setHighlightMatcher","Timeline.CompactEventPainter.prototype.setHighlightMatcher","Timeline.CompactEventPainter.prototype.paint","_prepareForPainting","trackOffset","trackHeight","tape","tapeBottomMargin","labelBottomMargin","labelRightMargin","instant","icon","iconWidth","iconHeight","iconLabelGap","iconBottomMargin","compositeIcon","compositeIconWidth","customIconWidth","compositeIconHeight","customIconHeight","defaultIcon","defaultIconWidth","defaultIconHeight","defaultStackIcon","stackConcurrentPreciseInstantEvents","defaultStackIconWidth","defaultStackIconHeight","getEventIterator","collapseConcurrentPreciseInstantEvents","isInstant","isImprecise","paintEvent","paintStackedPreciseInstantEvents","paintCompositePreciseInstantEvents","Timeline.CompactEventPainter.prototype.softPaint","Timeline.CompactEventPainter.prototype._prepareForPainting","_tracks","Timeline.CompactEventPainter.prototype.paintEvent","paintInstantEvent","paintDurationEvent","Timeline.CompactEventPainter.prototype.paintInstantEvent","paintImpreciseInstantEvent","paintPreciseInstantEvent","Timeline.CompactEventPainter.prototype.paintDurationEvent","paintImpreciseDurationEvent","paintPreciseDurationEvent","Timeline.CompactEventPainter.prototype.paintPreciseInstantEvent","getProperty","getText","getIcon","url","getTextColor","getColor","getClassName","paintTapeIconLabel","_onClickInstantEvent","iconElmtData","labelElmtData","Timeline.CompactEventPainter.prototype.paintCompositePreciseInstantEvents","compositeEventLabelTemplate","_onClickMultiplePreciseInstantEvent","Timeline.CompactEventPainter.prototype.paintStackedPreciseInstantEvents","j","limit","moreMessageTemplate","r","g","p","labelLeft","iconLeft","end","k","_fitTracks","q","u","getAttribute","t","d","_paintEventLabel","text","labelSize","onmouseover","iconData","z","Timeline.CompactEventPainter.prototype.paintImpreciseInstantEvent","getLatestStart","getEarliestEnd","impreciseTapeElmtData","Timeline.CompactEventPainter.prototype.paintPreciseDurationEvent","tapeElmtData","Timeline.CompactEventPainter.prototype.paintImpreciseDurationEvent","Timeline.CompactEventPainter.prototype.paintTapeIconLabel","tapeHeight","iconAlign","_paintEventTape","impreciseColor","impreciseOpacity","earliestEnd","color","_paintEventIcon","Timeline.CompactEventPainter.prototype._fitTracks","Timeline.CompactEventPainter.prototype._paintEventIcon","tooltip","Timeline.CompactEventPainter.prototype._paintEventLabel","Timeline.CompactEventPainter.prototype._paintEventTape","backgroundImage","backgroundRepeat","_createHighlightDiv","Timeline.CompactEventPainter.prototype._createHighlightDiv","highlightColors","Timeline.CompactEventPainter.prototype._onClickMultiplePreciseInstantEvent","_showBubble","_fireOnSelect","Timeline.CompactEventPainter.prototype._onClickInstantEvent","_onClickDurationEvent","Timeline.CompactEventPainter.prototype._onClickDurationEvent","Timeline.CompactEventPainter.prototype.showBubble","Timeline.CompactEventPainter.prototype._showBubble","fillInfoBubble","bubble","Timeline.CompactEventPainter.prototype._fireOnSelect","SpanHighlightDecorator","Timeline.SpanHighlightDecorator","unit","startDate","endDate","_startLabel","startLabel","_endLabel","endLabel","_color","_cssClass","cssClass","_opacity","_zIndex","inFront","Timeline.SpanHighlightDecorator.prototype.initialize","_layerDiv","Timeline.SpanHighlightDecorator.prototype.paint","Timeline.SpanHighlightDecorator.prototype.softPaint","PointHighlightDecorator","Timeline.PointHighlightDecorator","_date","date","_width","Timeline.PointHighlightDecorator.prototype.initialize","Timeline.PointHighlightDecorator.prototype.paint","Timeline.PointHighlightDecorator.prototype.softPaint","DetailedEventPainter","Timeline.DetailedEventPainter","Timeline.DetailedEventPainter.prototype.initialize","Timeline.DetailedEventPainter.prototype.getType","Timeline.DetailedEventPainter.prototype.addOnSelectListener","Timeline.DetailedEventPainter.prototype.removeOnSelectListener","Timeline.DetailedEventPainter.prototype.getFilterMatcher","Timeline.DetailedEventPainter.prototype.setFilterMatcher","Timeline.DetailedEventPainter.prototype.getHighlightMatcher","Timeline.DetailedEventPainter.prototype.setHighlightMatcher","Timeline.DetailedEventPainter.prototype.paint","gap","getEventReverseIterator","_lowerTracks","_upperTracks","trackIncrement","Timeline.DetailedEventPainter.prototype.softPaint","Timeline.DetailedEventPainter.prototype._prepareForPainting","Timeline.DetailedEventPainter.prototype.paintEvent","Timeline.DetailedEventPainter.prototype.paintInstantEvent","Timeline.DetailedEventPainter.prototype.paintDurationEvent","Timeline.DetailedEventPainter.prototype.paintPreciseInstantEvent","_findFreeTrackForSolid","offsetFromLine","_getTrackData","solid","_findFreeTrackForText","line","_paintEventLine","Timeline.DetailedEventPainter.prototype.paintImpreciseInstantEvent","Timeline.DetailedEventPainter.prototype.paintPreciseDurationEvent","Timeline.DetailedEventPainter.prototype.paintImpreciseDurationEvent","Timeline.DetailedEventPainter.prototype._findFreeTrackForSolid","POSITIVE_INFINITY","Timeline.DetailedEventPainter.prototype._findFreeTrackForText","_findFreeUpperTrackForText","_findFreeLowerTrackForText","Timeline.DetailedEventPainter.prototype._findFreeLowerTrackForText","Timeline.DetailedEventPainter.prototype._findFreeUpperTrackForText","Timeline.DetailedEventPainter.prototype._getTrackData","Timeline.DetailedEventPainter.prototype._paintEventLine","lineColor","borderTop","borderBottom","borderLeft","Timeline.DetailedEventPainter.prototype._paintEventIcon","_title","Timeline.DetailedEventPainter.prototype._paintEventLabel","backgroundOpacity","Timeline.DetailedEventPainter.prototype._paintEventTape","Timeline.DetailedEventPainter.prototype._createHighlightDiv","Timeline.DetailedEventPainter.prototype._onClickInstantEvent","Timeline.DetailedEventPainter.prototype._onClickDurationEvent","Timeline.DetailedEventPainter.prototype.showBubble","Timeline.DetailedEventPainter.prototype._showBubble","maxHeight","Timeline.DetailedEventPainter.prototype._fireOnSelect","GregorianEtherPainter","Timeline.GregorianEtherPainter","_multiple","multiple","Timeline.GregorianEtherPainter.prototype.initialize","_backgroundLayer","_markerLayer","align","interval","marker","showLine","show","_intervalMarkerLayout","EtherIntervalMarkerLayout","EtherHighlight","Timeline.GregorianEtherPainter.prototype.setHighlight","Timeline.GregorianEtherPainter.prototype.paint","firstDayOfWeek","createIntervalMarker","Timeline.GregorianEtherPainter.prototype.softPaint","Timeline.GregorianEtherPainter.prototype.zoom","HotZoneGregorianEtherPainter","Timeline.HotZoneGregorianEtherPainter","_zones","NEGATIVE_INFINITY","zones","endTime","startTime","Timeline.HotZoneGregorianEtherPainter.prototype.initialize","Timeline.HotZoneGregorianEtherPainter.prototype.setHighlight","Timeline.HotZoneGregorianEtherPainter.prototype.paint","Timeline.HotZoneGregorianEtherPainter.prototype.softPaint","Timeline.HotZoneGregorianEtherPainter.prototype.zoom","YearCountEtherPainter","Timeline.YearCountEtherPainter","Timeline.YearCountEtherPainter.prototype.initialize","Timeline.YearCountEtherPainter.prototype.setHighlight","Timeline.YearCountEtherPainter.prototype.paint","labelInterval","Timeline.YearCountEtherPainter.prototype.softPaint","QuarterlyEtherPainter","Timeline.QuarterlyEtherPainter","Timeline.QuarterlyEtherPainter.prototype.initialize","Timeline.QuarterlyEtherPainter.prototype.setHighlight","Timeline.QuarterlyEtherPainter.prototype.paint","Timeline.QuarterlyEtherPainter.prototype.softPaint","Timeline.EtherIntervalMarkerLayout","positionDiv",".positionDiv","weekend",".createIntervalMarker","emphasized","Timeline.EtherHighlight","_highlightDiv","._createHighlightDiv","highlightOpacity",".position","LinearEther","Timeline.LinearEther","_interval","_pixelsPerInterval","pixelsPerInterval","Timeline.LinearEther.prototype.initialize","_start","startsOn","endsOn","centersOn","setDate","Timeline.LinearEther.prototype.setDate","Timeline.LinearEther.prototype.shiftPixels","Timeline.LinearEther.prototype.dateToPixelOffset","Timeline.LinearEther.prototype.pixelOffsetToDate","Timeline.LinearEther.prototype.zoom","HotZoneEther","Timeline.HotZoneEther","Timeline.HotZoneEther.prototype.initialize","magnify","Timeline.HotZoneEther.prototype.setDate","Timeline.HotZoneEther.prototype.shiftPixels","Timeline.HotZoneEther.prototype.dateToPixelOffset","_dateDiffToPixelOffset","Timeline.HotZoneEther.prototype.pixelOffsetToDate","_pixelOffsetToDate","Timeline.HotZoneEther.prototype.zoom","Timeline.HotZoneEther.prototype._dateDiffToPixelOffset","_getScale","Timeline.HotZoneEther.prototype._pixelOffsetToDate","Timeline.HotZoneEther.prototype._getScale","EventUtils","getNewEventID","Timeline.EventUtils.getNewEventID","_lastEventID","decodeEventElID","Timeline.EventUtils.decodeEventElID","getTimelineFromID","getBand","encodeEventElID","Timeline.EventUtils.encodeEventElID","timelineID","Timeline.GregorianDateLabeller","monthNames","dayNames","labelIntervalFunctions","getMonthName","Timeline.GregorianDateLabeller.getMonthName","Timeline.GregorianDateLabeller.prototype.labelInterval","defaultLabelInterval","labelPrecise","Timeline.GregorianDateLabeller.prototype.labelPrecise","toUTCString","Timeline.GregorianDateLabeller.prototype.defaultLabelInterval","OriginalEventPainter","Timeline.OriginalEventPainter","_eventPaintListeners","Timeline.OriginalEventPainter.prototype.initialize","Timeline.OriginalEventPainter.prototype.getType","Timeline.OriginalEventPainter.prototype.addOnSelectListener","Timeline.OriginalEventPainter.prototype.removeOnSelectListener","addEventPaintListener","Timeline.OriginalEventPainter.prototype.addEventPaintListener","removeEventPaintListener","Timeline.OriginalEventPainter.prototype.removeEventPaintListener","Timeline.OriginalEventPainter.prototype.getFilterMatcher","Timeline.OriginalEventPainter.prototype.setFilterMatcher","Timeline.OriginalEventPainter.prototype.getHighlightMatcher","Timeline.OriginalEventPainter.prototype.setHighlightMatcher","Timeline.OriginalEventPainter.prototype.paint","_fireEventPaintListeners","maxLabelChar","impreciseIconMargin","Timeline.OriginalEventPainter.prototype.softPaint","Timeline.OriginalEventPainter.prototype._prepareForPainting","Timeline.OriginalEventPainter.prototype.paintEvent","Timeline.OriginalEventPainter.prototype.paintInstantEvent","Timeline.OriginalEventPainter.prototype.paintDurationEvent","Timeline.OriginalEventPainter.prototype.paintPreciseInstantEvent","_getLabelDivClassName","_findFreeTrack","Timeline.OriginalEventPainter.prototype.paintImpreciseInstantEvent","Timeline.OriginalEventPainter.prototype.paintPreciseDurationEvent","Timeline.OriginalEventPainter.prototype.paintImpreciseDurationEvent","_encodeEventElID","Timeline.OriginalEventPainter.prototype._encodeEventElID","Timeline.OriginalEventPainter.prototype._findFreeTrack","getTrackNum","Timeline.OriginalEventPainter.prototype._paintEventIcon","_getElClassName","Timeline.OriginalEventPainter.prototype._paintEventLabel","highlightLabelBackground","_getHighlightColor","Timeline.OriginalEventPainter.prototype._paintEventTape","getTapeImage","getTapeRepeat","Timeline.OriginalEventPainter.prototype._getLabelDivClassName","Timeline.OriginalEventPainter.prototype._getElClassName","Timeline.OriginalEventPainter.prototype._getHighlightColor","Timeline.OriginalEventPainter.prototype._createHighlightDiv","Timeline.OriginalEventPainter.prototype._onClickInstantEvent","Timeline.OriginalEventPainter.prototype._onClickDurationEvent","Timeline.OriginalEventPainter.prototype.showBubble","Timeline.OriginalEventPainter.prototype._showBubble","Timeline.OriginalEventPainter.prototype._fireOnSelect","Timeline.OriginalEventPainter.prototype._fireEventPaintListeners","OverviewEventPainter","Timeline.OverviewEventPainter","Timeline.OverviewEventPainter.prototype.initialize","Timeline.OverviewEventPainter.prototype.getType","Timeline.OverviewEventPainter.prototype.addOnSelectListener","Timeline.OverviewEventPainter.prototype.removeOnSelectListener","Timeline.OverviewEventPainter.prototype.getFilterMatcher","Timeline.OverviewEventPainter.prototype.setFilterMatcher","Timeline.OverviewEventPainter.prototype.getHighlightMatcher","Timeline.OverviewEventPainter.prototype.setHighlightMatcher","Timeline.OverviewEventPainter.prototype.paint","Timeline.OverviewEventPainter.prototype.softPaint","Timeline.OverviewEventPainter.prototype._prepareForPainting","Timeline.OverviewEventPainter.prototype.paintEvent","Timeline.OverviewEventPainter.prototype.paintInstantEvent","_paintEventTick","Timeline.OverviewEventPainter.prototype.paintDurationEvent","Timeline.OverviewEventPainter.prototype._paintEventTape","Timeline.OverviewEventPainter.prototype._paintEventTick","tickHeight","Timeline.OverviewEventPainter.prototype._createHighlightDiv","Timeline.OverviewEventPainter.prototype.showBubble","DefaultEventSource","Timeline.DefaultEventSource","Timeline.DefaultEventSource.prototype.addListener","Timeline.DefaultEventSource.prototype.removeListener","loadXML","Timeline.DefaultEventSource.prototype.loadXML","_getBaseURL","nodeValue","Event","_resolveRelativeURL","_node","K.getProperty","setWikiInfo","_fire","loadJSON","Timeline.DefaultEventSource.prototype.loadJSON","events","wikiURL","wikiSection","dateTimeFormat","isDuration","durationEvent","latestStart","link","textColor","hoverText","classname","tapeImage","tapeRepeat","caption","eventID","trackNum","_obj","L.getProperty","loadSPARQL","Timeline.DefaultEventSource.prototype.loadSPARQL","nodeName","_bindings","M.getProperty","Timeline.DefaultEventSource.prototype.add","addMany","Timeline.DefaultEventSource.prototype.addMany","clear","Timeline.DefaultEventSource.prototype.clear","Timeline.DefaultEventSource.prototype.getEvent","Timeline.DefaultEventSource.prototype.getEventIterator","Timeline.DefaultEventSource.prototype.getEventReverseIterator","getAllEventIterator","Timeline.DefaultEventSource.prototype.getAllEventIterator","Timeline.DefaultEventSource.prototype.getCount","Timeline.DefaultEventSource.prototype.getEarliestDate","Timeline.DefaultEventSource.prototype.getLatestDate","Timeline.DefaultEventSource.prototype._fire","Timeline.DefaultEventSource.prototype._getBaseURL","href","lastIndexOf","Timeline.DefaultEventSource.prototype._resolveRelativeURL","Timeline.DefaultEventSource.Event","_id","_instant","_end","_latestStart","_earliestEnd","_eventID","_text","_description","_image","_link","_icon","_textColor","_classname","_tapeImage","_tapeRepeat","_trackNum","_wikiURL","_wikiSection","getEventID","getDescription","getImage","getLink","getWikiURL","getWikiSection","fillDescription","fillWikiInfo","strings","wikiLinkLabel","fillTime","ownerDocument","imageStyler","titleStyler","bodyStyler","timeStyler","wikiStyler","ClassicTheme","implementations","create","Timeline.ClassicTheme.create","_Impl","Timeline.ClassicTheme._Impl","autoWidthAnimationTime","timeline_start","timeline_stop","ajax_lib_version","display_version","HORIZONTAL","VERTICAL","_defaultTheme","Timeline.getDefaultLocale","Timeline.create","timelines","createBandInfo","Timeline.createBandInfo","getDefaultTheme","intervalUnit","intervalPixels","showEventText","eventPainterParams","trackGap","overview","createHotZoneBandInfo","Timeline.createHotZoneBandInfo","Timeline.getDefaultTheme","setDefaultTheme","Timeline.setDefaultTheme","Timeline.loadXML","responseXML","responseStream","load","Timeline.loadJSON","fError","fDone","xmlhttp","responseText","Timeline.getTimelineFromID","writeVersion","Timeline.writeVersion","getElementById","Timeline._Impl","_containerDiv","_bandInfos","_orientation","_starting","_autoResizing","timeline_at_start","timeline_at_stop","_initialize","Timeline._Impl.prototype.dispose","_bands","getBandCount","Timeline._Impl.prototype.getBandCount","Timeline._Impl.prototype.getBand","finishedEventLoading","Timeline._Impl.prototype.finishedEventLoading","_autoWidthCheck","Timeline._Impl.prototype.layout","_distributeWidths","Timeline._Impl.prototype.paint","Timeline._Impl.prototype.getDocument","Timeline._Impl.prototype.addDiv","removeDiv","Timeline._Impl.prototype.removeDiv","Timeline._Impl.prototype.isHorizontal","isVertical","Timeline._Impl.prototype.isVertical","Timeline._Impl.prototype.getPixelLength","getPixelWidth","Timeline._Impl.prototype.getPixelWidth","Timeline._Impl.prototype.getUnit","getWidthStyle","Timeline._Impl.prototype.getWidthStyle","Timeline._Impl.prototype.loadXML","hideLoadingMessage","showLoadingMessage","Timeline._Impl.prototype.loadJSON","tl","_autoWidthScrollListener","Timeline._Impl.prototype._autoWidthScrollListener","Timeline._Impl.prototype._autoWidthCheck","animate","Timeline._Impl.prototype._initialize","syncWith","highlight","containerDiv","contentDiv",".showLoadingMessage",".hideLoadingMessage","Timeline._Impl.prototype._distributeWidths","Timeline._Impl.prototype.shiftOK","Timeline._Impl.prototype.zoom","exec","Timeline.NativeDateUnit.createLabeller","Timeline.NativeDateUnit.makeDefaultValue","Timeline.NativeDateUnit.cloneValue","Timeline.NativeDateUnit.getParser","Timeline.NativeDateUnit.parseFromObject","Timeline.NativeDateUnit.toNumber","Timeline.NativeDateUnit.fromNumber","Timeline.NativeDateUnit.compare","Timeline.NativeDateUnit.earlier","Timeline.NativeDateUnit.later","Timeline.NativeDateUnit.change","en"] +} diff --git a/Disco.Web/ClientSource/Scripts/Modules/Timeline/disco.simileajaxextensions.js b/Disco.Web/ClientSource/Scripts/Modules/Timeline/disco.simileajaxextensions.js index aad774ab..03a77a5f 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Timeline/disco.simileajaxextensions.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Timeline/disco.simileajaxextensions.js @@ -1,7 +1,7 @@ -window.SimileAjax = { - loaded: true, - loadingScriptsCount: 0, - error: null, - params: { bundle: "true" }, - Platform: new Object() +window.SimileAjax = { + loaded: true, + loadingScriptsCount: 0, + error: null, + params: { bundle: "true" }, + Platform: new Object() }; \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Timeline/disco.timelineextensions.js b/Disco.Web/ClientSource/Scripts/Modules/Timeline/disco.timelineextensions.js index 6a68f001..6a3b342a 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Timeline/disco.timelineextensions.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Timeline/disco.timelineextensions.js @@ -1,6 +1,6 @@ -window.Timeline = new Object(); -window.Timeline.DateTime = window.SimileAjax.DateTime; // for backward compatibility -window.Timeline.urlPrefix = '/ClientSource/Style/Timeline/'; -window.Timeline.serverLocale = 'en'; -window.Timeline.clientLocale = 'en'; +window.Timeline = new Object(); +window.Timeline.DateTime = window.SimileAjax.DateTime; // for backward compatibility +window.Timeline.urlPrefix = '/ClientSource/Style/Timeline/'; +window.Timeline.serverLocale = 'en'; +window.Timeline.clientLocale = 'en'; window.Timeline.timeZone = 10; \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/Timeline/simile-ajax-bundle-DiscoMod.js b/Disco.Web/ClientSource/Scripts/Modules/Timeline/simile-ajax-bundle-DiscoMod.js index 8c36a3f6..f9ea6937 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/Timeline/simile-ajax-bundle-DiscoMod.js +++ b/Disco.Web/ClientSource/Scripts/Modules/Timeline/simile-ajax-bundle-DiscoMod.js @@ -1,6 +1,6 @@  -/* jquery-1.2.6.min.js */ +/* jquery-1.2.6.min.js */ /* Disco Modified - 2012-07-04 G# - Bundled jQuery Removed */ /* platform.js */ diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQuery-Isotope.js.bundle b/Disco.Web/ClientSource/Scripts/Modules/jQuery-Isotope.js.bundle index 8567064e..103373db 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQuery-Isotope.js.bundle +++ b/Disco.Web/ClientSource/Scripts/Modules/jQuery-Isotope.js.bundle @@ -1,4 +1,4 @@ - - - /ClientSource/Scripts/Modules/jQuery-Isotope/jquery.isotope.js + + + /ClientSource/Scripts/Modules/jQuery-Isotope/jquery.isotope.js \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.js b/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.js index 6ee3ed23..d2a010db 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.js +++ b/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.js @@ -1,528 +1,528 @@ -///#source 1 1 /ClientSource/Scripts/Modules/jQuery-NumberFormatter/jshashtable-2.1.js -/** - * Copyright 2010 Tim Down. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var Hashtable=(function(){var p="function";var n=(typeof Array.prototype.splice==p)?function(s,r){s.splice(r,1)}:function(u,t){var s,v,r;if(t===u.length-1){u.length=t}else{s=u.slice(t+1);u.length=t;for(v=0,r=s.length;v "ae" - * Australia -> "au" - * Austria -> "at" - * Brazil -> "br" - * Canada -> "ca" - * China -> "cn" - * Czech -> "cz" - * Denmark -> "dk" - * Egypt -> "eg" - * Finland -> "fi" - * France -> "fr" - * Germany -> "de" - * Greece -> "gr" - * Great Britain -> "gb" - * Hong Kong -> "hk" - * India -> "in" - * Israel -> "il" - * Japan -> "jp" - * Russia -> "ru" - * South Korea -> "kr" - * Spain -> "es" - * Sweden -> "se" - * Switzerland -> "ch" - * Taiwan -> "tw" - * Thailand -> "th" - * United States -> "us" - * Vietnam -> "vn" - **/ - -(function(jQuery) { - - var nfLocales = new Hashtable(); - - var nfLocalesLikeUS = [ 'ae','au','ca','cn','eg','gb','hk','il','in','jp','sk','th','tw','us' ]; - var nfLocalesLikeDE = [ 'at','br','de','dk','es','gr','it','nl','pt','tr','vn' ]; - var nfLocalesLikeFR = [ 'cz','fi','fr','ru','se','pl' ]; - var nfLocalesLikeCH = [ 'ch' ]; - - var nfLocaleFormatting = [ [".", ","], [",", "."], [",", " "], [".", "'"] ]; - var nfAllLocales = [ nfLocalesLikeUS, nfLocalesLikeDE, nfLocalesLikeFR, nfLocalesLikeCH ] - - function FormatData(dec, group, neg) { - this.dec = dec; - this.group = group; - this.neg = neg; - }; - - function init() { - // write the arrays into the hashtable - for (var localeGroupIdx = 0; localeGroupIdx < nfAllLocales.length; localeGroupIdx++) { - localeGroup = nfAllLocales[localeGroupIdx]; - for (var i = 0; i < localeGroup.length; i++) { - nfLocales.put(localeGroup[i], localeGroupIdx); - } - } - }; - - function formatCodes(locale, isFullLocale) { - if (nfLocales.size() == 0) - init(); - - // default values - var dec = "."; - var group = ","; - var neg = "-"; - - if (isFullLocale == false) { - // Extract and convert to lower-case any language code from a real 'locale' formatted string, if not use as-is - // (To prevent locale format like : "fr_FR", "en_US", "de_DE", "fr_FR", "en-US", "de-DE") - if (locale.indexOf('_') != -1) - locale = locale.split('_')[1].toLowerCase(); - else if (locale.indexOf('-') != -1) - locale = locale.split('-')[1].toLowerCase(); - } - - // hashtable lookup to match locale with codes - var codesIndex = nfLocales.get(locale); - if (codesIndex) { - var codes = nfLocaleFormatting[codesIndex]; - if (codes) { - dec = codes[0]; - group = codes[1]; - } - } - return new FormatData(dec, group, neg); - }; - - - /* Formatting Methods */ - - - /** - * Formats anything containing a number in standard js number notation. - * - * @param {Object} options The formatting options to use - * @param {Boolean} writeBack (true) If the output value should be written back to the subject - * @param {Boolean} giveReturnValue (true) If the function should return the output string - */ - jQuery.fn.formatNumber = function(options, writeBack, giveReturnValue) { - - return this.each(function() { - // enforce defaults - if (writeBack == null) - writeBack = true; - if (giveReturnValue == null) - giveReturnValue = true; - - // get text - var text; - if (jQuery(this).is(":input")) - text = new String(jQuery(this).val()); - else - text = new String(jQuery(this).text()); - - // format - var returnString = jQuery.formatNumber(text, options); - - // set formatted string back, only if a success -// if (returnString) { - if (writeBack) { - if (jQuery(this).is(":input")) - jQuery(this).val(returnString); - else - jQuery(this).text(returnString); - } - if (giveReturnValue) - return returnString; -// } -// return ''; - }); - }; - - /** - * First parses a string and reformats it with the given options. - * - * @param {Object} numberString - * @param {Object} options - */ - jQuery.formatNumber = function(numberString, options){ - var options = jQuery.extend({}, jQuery.fn.formatNumber.defaults, options); - var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); - - var dec = formatData.dec; - var group = formatData.group; - var neg = formatData.neg; - - var validFormat = "0#-,."; - - // strip all the invalid characters at the beginning and the end - // of the format, and we'll stick them back on at the end - // make a special case for the negative sign "-" though, so - // we can have formats like -$23.32 - var prefix = ""; - var negativeInFront = false; - for (var i = 0; i < options.format.length; i++) { - if (validFormat.indexOf(options.format.charAt(i)) == -1) - prefix = prefix + options.format.charAt(i); - else - if (i == 0 && options.format.charAt(i) == '-') { - negativeInFront = true; - continue; - } - else - break; - } - var suffix = ""; - for (var i = options.format.length - 1; i >= 0; i--) { - if (validFormat.indexOf(options.format.charAt(i)) == -1) - suffix = options.format.charAt(i) + suffix; - else - break; - } - - options.format = options.format.substring(prefix.length); - options.format = options.format.substring(0, options.format.length - suffix.length); - - // now we need to convert it into a number - //while (numberString.indexOf(group) > -1) - // numberString = numberString.replace(group, ''); - //var number = new Number(numberString.replace(dec, ".").replace(neg, "-")); - var number = new Number(numberString); - - return jQuery._formatNumber(number, options, suffix, prefix, negativeInFront); - }; - - /** - * Formats a Number object into a string, using the given formatting options - * - * @param {Object} numberString - * @param {Object} options - */ - jQuery._formatNumber = function(number, options, suffix, prefix, negativeInFront) { - var options = jQuery.extend({}, jQuery.fn.formatNumber.defaults, options); - var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); - - var dec = formatData.dec; - var group = formatData.group; - var neg = formatData.neg; - - var forcedToZero = false; - if (isNaN(number)) { - if (options.nanForceZero == true) { - number = 0; - forcedToZero = true; - } else - return null; - } - - // special case for percentages - if (suffix == "%") - number = number * 100; - - var returnString = ""; - if (options.format.indexOf(".") > -1) { - var decimalPortion = dec; - var decimalFormat = options.format.substring(options.format.lastIndexOf(".") + 1); - - // round or truncate number as needed - if (options.round == true) - number = new Number(number.toFixed(decimalFormat.length)); - else { - var numStr = number.toString(); - numStr = numStr.substring(0, numStr.lastIndexOf('.') + decimalFormat.length + 1); - number = new Number(numStr); - } - - var decimalValue = number % 1; - var decimalString = new String(decimalValue.toFixed(decimalFormat.length)); - decimalString = decimalString.substring(decimalString.lastIndexOf(".") + 1); - - for (var i = 0; i < decimalFormat.length; i++) { - if (decimalFormat.charAt(i) == '#' && decimalString.charAt(i) != '0') { - decimalPortion += decimalString.charAt(i); - continue; - } else if (decimalFormat.charAt(i) == '#' && decimalString.charAt(i) == '0') { - var notParsed = decimalString.substring(i); - if (notParsed.match('[1-9]')) { - decimalPortion += decimalString.charAt(i); - continue; - } else - break; - } else if (decimalFormat.charAt(i) == "0") - decimalPortion += decimalString.charAt(i); - } - returnString += decimalPortion - } else - number = Math.round(number); - - var ones = Math.floor(number); - if (number < 0) - ones = Math.ceil(number); - - var onesFormat = ""; - if (options.format.indexOf(".") == -1) - onesFormat = options.format; - else - onesFormat = options.format.substring(0, options.format.indexOf(".")); - - var onePortion = ""; - if (!(ones == 0 && onesFormat.substr(onesFormat.length - 1) == '#') || forcedToZero) { - // find how many digits are in the group - var oneText = new String(Math.abs(ones)); - var groupLength = 9999; - if (onesFormat.lastIndexOf(",") != -1) - groupLength = onesFormat.length - onesFormat.lastIndexOf(",") - 1; - var groupCount = 0; - for (var i = oneText.length - 1; i > -1; i--) { - onePortion = oneText.charAt(i) + onePortion; - groupCount++; - if (groupCount == groupLength && i != 0) { - onePortion = group + onePortion; - groupCount = 0; - } - } - - // account for any pre-data padding - if (onesFormat.length > onePortion.length) { - var padStart = onesFormat.indexOf('0'); - if (padStart != -1) { - var padLen = onesFormat.length - padStart; - - // pad to left with 0's or group char - var pos = onesFormat.length - onePortion.length - 1; - while (onePortion.length < padLen) { - var padChar = onesFormat.charAt(pos); - // replace with real group char if needed - if (padChar == ',') - padChar = group; - onePortion = padChar + onePortion; - pos--; - } - } - } - } - - if (!onePortion && onesFormat.indexOf('0', onesFormat.length - 1) !== -1) - onePortion = '0'; - - returnString = onePortion + returnString; - - // handle special case where negative is in front of the invalid characters - if (number < 0 && negativeInFront && prefix.length > 0) - prefix = neg + prefix; - else if (number < 0) - returnString = neg + returnString; - - if (!options.decimalSeparatorAlwaysShown) { - if (returnString.lastIndexOf(dec) == returnString.length - 1) { - returnString = returnString.substring(0, returnString.length - 1); - } - } - returnString = prefix + returnString + suffix; - return returnString; - }; - - - /* Parsing Methods */ - - - /** - * Parses a number of given format from the element and returns a Number object. - * @param {Object} options - */ - jQuery.fn.parseNumber = function(options, writeBack, giveReturnValue) { - // enforce defaults - if (writeBack == null) - writeBack = true; - if (giveReturnValue == null) - giveReturnValue = true; - - // get text - var text; - if (jQuery(this).is(":input")) - text = new String(jQuery(this).val()); - else - text = new String(jQuery(this).text()); - - // parse text - var number = jQuery.parseNumber(text, options); - - if (number) { - if (writeBack) { - if (jQuery(this).is(":input")) - jQuery(this).val(number.toString()); - else - jQuery(this).text(number.toString()); - } - if (giveReturnValue) - return number; - } - }; - - /** - * Parses a string of given format into a Number object. - * - * @param {Object} string - * @param {Object} options - */ - jQuery.parseNumber = function(numberString, options) { - var options = jQuery.extend({}, jQuery.fn.parseNumber.defaults, options); - var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); - - var dec = formatData.dec; - var group = formatData.group; - var neg = formatData.neg; - - var valid = "1234567890.-"; - - // now we need to convert it into a number - while (numberString.indexOf(group)>-1) - numberString = numberString.replace(group,''); - numberString = numberString.replace(dec,".").replace(neg,"-"); - var validText = ""; - var hasPercent = false; - if (numberString.charAt(numberString.length - 1) == "%" || options.isPercentage == true) - hasPercent = true; - for (var i=0; i-1) - validText = validText + numberString.charAt(i); - } - var number = new Number(validText); - if (hasPercent) { - number = number / 100; - var decimalPos = validText.indexOf('.'); - if (decimalPos != -1) { - var decimalPoints = validText.length - decimalPos - 1; - number = number.toFixed(decimalPoints + 2); - } else { - number = number.toFixed(validText.length - 1); - } - } - - return number; - }; - - jQuery.fn.parseNumber.defaults = { - locale: "us", - decimalSeparatorAlwaysShown: false, - isPercentage: false, - isFullLocale: false - }; - - jQuery.fn.formatNumber.defaults = { - format: "#,###.00", - locale: "us", - decimalSeparatorAlwaysShown: false, - nanForceZero: true, - round: true, - isFullLocale: false - }; - - Number.prototype.toFixed = function(precision) { - return jQuery._roundNumber(this, precision); - }; - - jQuery._roundNumber = function(number, decimalPlaces) { - var power = Math.pow(10, decimalPlaces || 0); - var value = String(Math.round(number * power) / power); - - // ensure the decimal places are there - if (decimalPlaces > 0) { - var dp = value.indexOf("."); - if (dp == -1) { - value += '.'; - dp = 0; - } else { - dp = value.length - (dp + 1); - } - - while (dp < decimalPlaces) { - value += '0'; - dp++; - } - } - return value; - }; - - })(jQuery); +///#source 1 1 /ClientSource/Scripts/Modules/jQuery-NumberFormatter/jshashtable-2.1.js +/** + * Copyright 2010 Tim Down. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var Hashtable=(function(){var p="function";var n=(typeof Array.prototype.splice==p)?function(s,r){s.splice(r,1)}:function(u,t){var s,v,r;if(t===u.length-1){u.length=t}else{s=u.slice(t+1);u.length=t;for(v=0,r=s.length;v "ae" + * Australia -> "au" + * Austria -> "at" + * Brazil -> "br" + * Canada -> "ca" + * China -> "cn" + * Czech -> "cz" + * Denmark -> "dk" + * Egypt -> "eg" + * Finland -> "fi" + * France -> "fr" + * Germany -> "de" + * Greece -> "gr" + * Great Britain -> "gb" + * Hong Kong -> "hk" + * India -> "in" + * Israel -> "il" + * Japan -> "jp" + * Russia -> "ru" + * South Korea -> "kr" + * Spain -> "es" + * Sweden -> "se" + * Switzerland -> "ch" + * Taiwan -> "tw" + * Thailand -> "th" + * United States -> "us" + * Vietnam -> "vn" + **/ + +(function(jQuery) { + + var nfLocales = new Hashtable(); + + var nfLocalesLikeUS = [ 'ae','au','ca','cn','eg','gb','hk','il','in','jp','sk','th','tw','us' ]; + var nfLocalesLikeDE = [ 'at','br','de','dk','es','gr','it','nl','pt','tr','vn' ]; + var nfLocalesLikeFR = [ 'cz','fi','fr','ru','se','pl' ]; + var nfLocalesLikeCH = [ 'ch' ]; + + var nfLocaleFormatting = [ [".", ","], [",", "."], [",", " "], [".", "'"] ]; + var nfAllLocales = [ nfLocalesLikeUS, nfLocalesLikeDE, nfLocalesLikeFR, nfLocalesLikeCH ] + + function FormatData(dec, group, neg) { + this.dec = dec; + this.group = group; + this.neg = neg; + }; + + function init() { + // write the arrays into the hashtable + for (var localeGroupIdx = 0; localeGroupIdx < nfAllLocales.length; localeGroupIdx++) { + localeGroup = nfAllLocales[localeGroupIdx]; + for (var i = 0; i < localeGroup.length; i++) { + nfLocales.put(localeGroup[i], localeGroupIdx); + } + } + }; + + function formatCodes(locale, isFullLocale) { + if (nfLocales.size() == 0) + init(); + + // default values + var dec = "."; + var group = ","; + var neg = "-"; + + if (isFullLocale == false) { + // Extract and convert to lower-case any language code from a real 'locale' formatted string, if not use as-is + // (To prevent locale format like : "fr_FR", "en_US", "de_DE", "fr_FR", "en-US", "de-DE") + if (locale.indexOf('_') != -1) + locale = locale.split('_')[1].toLowerCase(); + else if (locale.indexOf('-') != -1) + locale = locale.split('-')[1].toLowerCase(); + } + + // hashtable lookup to match locale with codes + var codesIndex = nfLocales.get(locale); + if (codesIndex) { + var codes = nfLocaleFormatting[codesIndex]; + if (codes) { + dec = codes[0]; + group = codes[1]; + } + } + return new FormatData(dec, group, neg); + }; + + + /* Formatting Methods */ + + + /** + * Formats anything containing a number in standard js number notation. + * + * @param {Object} options The formatting options to use + * @param {Boolean} writeBack (true) If the output value should be written back to the subject + * @param {Boolean} giveReturnValue (true) If the function should return the output string + */ + jQuery.fn.formatNumber = function(options, writeBack, giveReturnValue) { + + return this.each(function() { + // enforce defaults + if (writeBack == null) + writeBack = true; + if (giveReturnValue == null) + giveReturnValue = true; + + // get text + var text; + if (jQuery(this).is(":input")) + text = new String(jQuery(this).val()); + else + text = new String(jQuery(this).text()); + + // format + var returnString = jQuery.formatNumber(text, options); + + // set formatted string back, only if a success +// if (returnString) { + if (writeBack) { + if (jQuery(this).is(":input")) + jQuery(this).val(returnString); + else + jQuery(this).text(returnString); + } + if (giveReturnValue) + return returnString; +// } +// return ''; + }); + }; + + /** + * First parses a string and reformats it with the given options. + * + * @param {Object} numberString + * @param {Object} options + */ + jQuery.formatNumber = function(numberString, options){ + var options = jQuery.extend({}, jQuery.fn.formatNumber.defaults, options); + var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); + + var dec = formatData.dec; + var group = formatData.group; + var neg = formatData.neg; + + var validFormat = "0#-,."; + + // strip all the invalid characters at the beginning and the end + // of the format, and we'll stick them back on at the end + // make a special case for the negative sign "-" though, so + // we can have formats like -$23.32 + var prefix = ""; + var negativeInFront = false; + for (var i = 0; i < options.format.length; i++) { + if (validFormat.indexOf(options.format.charAt(i)) == -1) + prefix = prefix + options.format.charAt(i); + else + if (i == 0 && options.format.charAt(i) == '-') { + negativeInFront = true; + continue; + } + else + break; + } + var suffix = ""; + for (var i = options.format.length - 1; i >= 0; i--) { + if (validFormat.indexOf(options.format.charAt(i)) == -1) + suffix = options.format.charAt(i) + suffix; + else + break; + } + + options.format = options.format.substring(prefix.length); + options.format = options.format.substring(0, options.format.length - suffix.length); + + // now we need to convert it into a number + //while (numberString.indexOf(group) > -1) + // numberString = numberString.replace(group, ''); + //var number = new Number(numberString.replace(dec, ".").replace(neg, "-")); + var number = new Number(numberString); + + return jQuery._formatNumber(number, options, suffix, prefix, negativeInFront); + }; + + /** + * Formats a Number object into a string, using the given formatting options + * + * @param {Object} numberString + * @param {Object} options + */ + jQuery._formatNumber = function(number, options, suffix, prefix, negativeInFront) { + var options = jQuery.extend({}, jQuery.fn.formatNumber.defaults, options); + var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); + + var dec = formatData.dec; + var group = formatData.group; + var neg = formatData.neg; + + var forcedToZero = false; + if (isNaN(number)) { + if (options.nanForceZero == true) { + number = 0; + forcedToZero = true; + } else + return null; + } + + // special case for percentages + if (suffix == "%") + number = number * 100; + + var returnString = ""; + if (options.format.indexOf(".") > -1) { + var decimalPortion = dec; + var decimalFormat = options.format.substring(options.format.lastIndexOf(".") + 1); + + // round or truncate number as needed + if (options.round == true) + number = new Number(number.toFixed(decimalFormat.length)); + else { + var numStr = number.toString(); + numStr = numStr.substring(0, numStr.lastIndexOf('.') + decimalFormat.length + 1); + number = new Number(numStr); + } + + var decimalValue = number % 1; + var decimalString = new String(decimalValue.toFixed(decimalFormat.length)); + decimalString = decimalString.substring(decimalString.lastIndexOf(".") + 1); + + for (var i = 0; i < decimalFormat.length; i++) { + if (decimalFormat.charAt(i) == '#' && decimalString.charAt(i) != '0') { + decimalPortion += decimalString.charAt(i); + continue; + } else if (decimalFormat.charAt(i) == '#' && decimalString.charAt(i) == '0') { + var notParsed = decimalString.substring(i); + if (notParsed.match('[1-9]')) { + decimalPortion += decimalString.charAt(i); + continue; + } else + break; + } else if (decimalFormat.charAt(i) == "0") + decimalPortion += decimalString.charAt(i); + } + returnString += decimalPortion + } else + number = Math.round(number); + + var ones = Math.floor(number); + if (number < 0) + ones = Math.ceil(number); + + var onesFormat = ""; + if (options.format.indexOf(".") == -1) + onesFormat = options.format; + else + onesFormat = options.format.substring(0, options.format.indexOf(".")); + + var onePortion = ""; + if (!(ones == 0 && onesFormat.substr(onesFormat.length - 1) == '#') || forcedToZero) { + // find how many digits are in the group + var oneText = new String(Math.abs(ones)); + var groupLength = 9999; + if (onesFormat.lastIndexOf(",") != -1) + groupLength = onesFormat.length - onesFormat.lastIndexOf(",") - 1; + var groupCount = 0; + for (var i = oneText.length - 1; i > -1; i--) { + onePortion = oneText.charAt(i) + onePortion; + groupCount++; + if (groupCount == groupLength && i != 0) { + onePortion = group + onePortion; + groupCount = 0; + } + } + + // account for any pre-data padding + if (onesFormat.length > onePortion.length) { + var padStart = onesFormat.indexOf('0'); + if (padStart != -1) { + var padLen = onesFormat.length - padStart; + + // pad to left with 0's or group char + var pos = onesFormat.length - onePortion.length - 1; + while (onePortion.length < padLen) { + var padChar = onesFormat.charAt(pos); + // replace with real group char if needed + if (padChar == ',') + padChar = group; + onePortion = padChar + onePortion; + pos--; + } + } + } + } + + if (!onePortion && onesFormat.indexOf('0', onesFormat.length - 1) !== -1) + onePortion = '0'; + + returnString = onePortion + returnString; + + // handle special case where negative is in front of the invalid characters + if (number < 0 && negativeInFront && prefix.length > 0) + prefix = neg + prefix; + else if (number < 0) + returnString = neg + returnString; + + if (!options.decimalSeparatorAlwaysShown) { + if (returnString.lastIndexOf(dec) == returnString.length - 1) { + returnString = returnString.substring(0, returnString.length - 1); + } + } + returnString = prefix + returnString + suffix; + return returnString; + }; + + + /* Parsing Methods */ + + + /** + * Parses a number of given format from the element and returns a Number object. + * @param {Object} options + */ + jQuery.fn.parseNumber = function(options, writeBack, giveReturnValue) { + // enforce defaults + if (writeBack == null) + writeBack = true; + if (giveReturnValue == null) + giveReturnValue = true; + + // get text + var text; + if (jQuery(this).is(":input")) + text = new String(jQuery(this).val()); + else + text = new String(jQuery(this).text()); + + // parse text + var number = jQuery.parseNumber(text, options); + + if (number) { + if (writeBack) { + if (jQuery(this).is(":input")) + jQuery(this).val(number.toString()); + else + jQuery(this).text(number.toString()); + } + if (giveReturnValue) + return number; + } + }; + + /** + * Parses a string of given format into a Number object. + * + * @param {Object} string + * @param {Object} options + */ + jQuery.parseNumber = function(numberString, options) { + var options = jQuery.extend({}, jQuery.fn.parseNumber.defaults, options); + var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); + + var dec = formatData.dec; + var group = formatData.group; + var neg = formatData.neg; + + var valid = "1234567890.-"; + + // now we need to convert it into a number + while (numberString.indexOf(group)>-1) + numberString = numberString.replace(group,''); + numberString = numberString.replace(dec,".").replace(neg,"-"); + var validText = ""; + var hasPercent = false; + if (numberString.charAt(numberString.length - 1) == "%" || options.isPercentage == true) + hasPercent = true; + for (var i=0; i-1) + validText = validText + numberString.charAt(i); + } + var number = new Number(validText); + if (hasPercent) { + number = number / 100; + var decimalPos = validText.indexOf('.'); + if (decimalPos != -1) { + var decimalPoints = validText.length - decimalPos - 1; + number = number.toFixed(decimalPoints + 2); + } else { + number = number.toFixed(validText.length - 1); + } + } + + return number; + }; + + jQuery.fn.parseNumber.defaults = { + locale: "us", + decimalSeparatorAlwaysShown: false, + isPercentage: false, + isFullLocale: false + }; + + jQuery.fn.formatNumber.defaults = { + format: "#,###.00", + locale: "us", + decimalSeparatorAlwaysShown: false, + nanForceZero: true, + round: true, + isFullLocale: false + }; + + Number.prototype.toFixed = function(precision) { + return jQuery._roundNumber(this, precision); + }; + + jQuery._roundNumber = function(number, decimalPlaces) { + var power = Math.pow(10, decimalPlaces || 0); + var value = String(Math.round(number * power) / power); + + // ensure the decimal places are there + if (decimalPlaces > 0) { + var dp = value.indexOf("."); + if (dp == -1) { + value += '.'; + dp = 0; + } else { + dp = value.length - (dp + 1); + } + + while (dp < decimalPlaces) { + value += '0'; + dp++; + } + } + return value; + }; + + })(jQuery); diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.js.bundle b/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.js.bundle index ded072ff..be88c2b3 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.js.bundle +++ b/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.js.bundle @@ -1,5 +1,5 @@ - - - /ClientSource/Scripts/Modules/jQuery-NumberFormatter/jshashtable-2.1.js - /ClientSource/Scripts/Modules/jQuery-NumberFormatter/jquery.numberformatter.js + + + /ClientSource/Scripts/Modules/jQuery-NumberFormatter/jshashtable-2.1.js + /ClientSource/Scripts/Modules/jQuery-NumberFormatter/jquery.numberformatter.js \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.min.js b/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.min.js index a55b1985..f390cdf1 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.min.js +++ b/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter.min.js @@ -1,2 +1,2 @@ -var Hashtable=function(){function e(t){var i;if(typeof t=="string")return t;if(typeof t.hashCode==n)return i=t.hashCode(),typeof i=="string"?i:e(i);if(typeof t.toString==n)return t.toString();try{return String(t)}catch(r){return Object.prototype.toString.call(t)}}function y(n,t){return n.equals(t)}function p(t,i){return typeof i.equals==n?i.equals(t):t===i}function o(n){return function(t){if(t===null)throw new Error("null is not a valid "+n);else if(typeof t=="undefined")throw new Error(n+" must not be undefined");}}function r(n,t,i,r){this[0]=n,this.entries=[],this.addEntry(t,i),r!==null&&(this.getEqualityFunction=function(){return r})}function u(n){return function(t){for(var r=this.entries.length,i,u=this.getEqualityFunction(t);r--;)if(i=this.entries[r],u(t,i[0]))switch(n){case h:return!0;case c:return i;case l:return[r,i[1]]}return!1}}function a(n){return function(t){for(var u=t.length,i=0,r=this.entries.length;i=0;u--)if(s.indexOf(r.format.charAt(u))==-1)f=r.format.charAt(u)+f;else break;return r.format=r.format.substring(e.length),r.format=r.format.substring(0,r.format.length-f.length),c=new Number(t),n._formatNumber(c,r,f,e,h)},n._formatNumber=function(t,r,u,f,e){var r=n.extend({},n.fn.formatNumber.defaults,r),k=i(r.locale.toLowerCase(),r.isFullLocale),it=k.dec,rt=k.group,ut=k.neg,ft=!1,c,v,a,y,et,l,ot,p,s,h,d,g,w,o,nt,st,tt,b;if(isNaN(t))if(r.nanForceZero==!0)t=0,ft=!0;else return null;if(u=="%"&&(t=t*100),c="",r.format.indexOf(".")>-1){for(v=it,a=r.format.substring(r.format.lastIndexOf(".")+1),r.round==!0?t=new Number(t.toFixed(a.length)):(y=t.toString(),y=y.substring(0,y.lastIndexOf(".")+a.length+1),t=new Number(y)),et=t%1,l=new String(et.toFixed(a.length)),l=l.substring(l.lastIndexOf(".")+1),o=0;o-1;o--)h=d.charAt(o)+h,w++,w==g&&o!=0&&(h=rt+h,w=0);if(s.length>h.length&&(nt=s.indexOf("0"),nt!=-1))for(st=s.length-nt,tt=s.length-h.length-1;h.length0?f=ut+f:t<0&&(c=ut+c),r.decimalSeparatorAlwaysShown||c.lastIndexOf(it)==c.length-1&&(c=c.substring(0,c.length-1)),f+c+u},n.fn.parseNumber=function(t,i,r){var f,u;return i==null&&(i=!0),r==null&&(r=!0),f=n(this).is(":input")?new String(n(this).val()):new String(n(this).text()),u=n.parseNumber(f,t),u&&(i&&(n(this).is(":input")?n(this).val(u.toString()):n(this).text(u.toString())),r)?u:void 0},n.parseNumber=function(t,r){for(var r=n.extend({},n.fn.parseNumber.defaults,r),o=i(r.locale.toLowerCase(),r.isFullLocale),a=o.dec,c=o.group,v=o.neg,f,s,e,u,h,l;t.indexOf(c)>-1;)t=t.replace(c,"");for(t=t.replace(a,".").replace(v,"-"),f="",s=!1,(t.charAt(t.length-1)=="%"||r.isPercentage==!0)&&(s=!0),e=0;e-1&&(f=f+t.charAt(e));return u=new Number(f),s&&(u=u/100,h=f.indexOf("."),h!=-1?(l=f.length-h-1,u=u.toFixed(l+2)):u=u.toFixed(f.length-1)),u},n.fn.parseNumber.defaults={locale:"us",decimalSeparatorAlwaysShown:!1,isPercentage:!1,isFullLocale:!1},n.fn.formatNumber.defaults={format:"#,###.00",locale:"us",decimalSeparatorAlwaysShown:!1,nanForceZero:!0,round:!0,isFullLocale:!1},Number.prototype.toFixed=function(t){return n._roundNumber(this,t)},n._roundNumber=function(n,t){var u=Math.pow(10,t||0),r=String(Math.round(n*u)/u),i;if(t>0)for(i=r.indexOf("."),i==-1?(r+=".",i=0):i=r.length-(i+1);i=0;u--)if(s.indexOf(r.format.charAt(u))==-1)f=r.format.charAt(u)+f;else break;return r.format=r.format.substring(e.length),r.format=r.format.substring(0,r.format.length-f.length),c=new Number(t),n._formatNumber(c,r,f,e,h)},n._formatNumber=function(t,r,u,f,e){var r=n.extend({},n.fn.formatNumber.defaults,r),k=i(r.locale.toLowerCase(),r.isFullLocale),it=k.dec,rt=k.group,ut=k.neg,ft=!1,c,v,a,y,et,l,ot,p,s,h,d,g,w,o,nt,st,tt,b;if(isNaN(t))if(r.nanForceZero==!0)t=0,ft=!0;else return null;if(u=="%"&&(t=t*100),c="",r.format.indexOf(".")>-1){for(v=it,a=r.format.substring(r.format.lastIndexOf(".")+1),r.round==!0?t=new Number(t.toFixed(a.length)):(y=t.toString(),y=y.substring(0,y.lastIndexOf(".")+a.length+1),t=new Number(y)),et=t%1,l=new String(et.toFixed(a.length)),l=l.substring(l.lastIndexOf(".")+1),o=0;o-1;o--)h=d.charAt(o)+h,w++,w==g&&o!=0&&(h=rt+h,w=0);if(s.length>h.length&&(nt=s.indexOf("0"),nt!=-1))for(st=s.length-nt,tt=s.length-h.length-1;h.length0?f=ut+f:t<0&&(c=ut+c),r.decimalSeparatorAlwaysShown||c.lastIndexOf(it)==c.length-1&&(c=c.substring(0,c.length-1)),f+c+u},n.fn.parseNumber=function(t,i,r){var f,u;return i==null&&(i=!0),r==null&&(r=!0),f=n(this).is(":input")?new String(n(this).val()):new String(n(this).text()),u=n.parseNumber(f,t),u&&(i&&(n(this).is(":input")?n(this).val(u.toString()):n(this).text(u.toString())),r)?u:void 0},n.parseNumber=function(t,r){for(var r=n.extend({},n.fn.parseNumber.defaults,r),o=i(r.locale.toLowerCase(),r.isFullLocale),a=o.dec,c=o.group,v=o.neg,f,s,e,u,h,l;t.indexOf(c)>-1;)t=t.replace(c,"");for(t=t.replace(a,".").replace(v,"-"),f="",s=!1,(t.charAt(t.length-1)=="%"||r.isPercentage==!0)&&(s=!0),e=0;e-1&&(f=f+t.charAt(e));return u=new Number(f),s&&(u=u/100,h=f.indexOf("."),h!=-1?(l=f.length-h-1,u=u.toFixed(l+2)):u=u.toFixed(f.length-1)),u},n.fn.parseNumber.defaults={locale:"us",decimalSeparatorAlwaysShown:!1,isPercentage:!1,isFullLocale:!1},n.fn.formatNumber.defaults={format:"#,###.00",locale:"us",decimalSeparatorAlwaysShown:!1,nanForceZero:!0,round:!0,isFullLocale:!1},Number.prototype.toFixed=function(t){return n._roundNumber(this,t)},n._roundNumber=function(n,t){var u=Math.pow(10,t||0),r=String(Math.round(n*u)/u),i;if(t>0)for(i=r.indexOf("."),i==-1?(r+=".",i=0):i=r.length-(i+1);i "ae" - * Australia -> "au" - * Austria -> "at" - * Brazil -> "br" - * Canada -> "ca" - * China -> "cn" - * Czech -> "cz" - * Denmark -> "dk" - * Egypt -> "eg" - * Finland -> "fi" - * France -> "fr" - * Germany -> "de" - * Greece -> "gr" - * Great Britain -> "gb" - * Hong Kong -> "hk" - * India -> "in" - * Israel -> "il" - * Japan -> "jp" - * Russia -> "ru" - * South Korea -> "kr" - * Spain -> "es" - * Sweden -> "se" - * Switzerland -> "ch" - * Taiwan -> "tw" - * Thailand -> "th" - * United States -> "us" - * Vietnam -> "vn" - **/ - -(function(jQuery) { - - var nfLocales = new Hashtable(); - - var nfLocalesLikeUS = [ 'ae','au','ca','cn','eg','gb','hk','il','in','jp','sk','th','tw','us' ]; - var nfLocalesLikeDE = [ 'at','br','de','dk','es','gr','it','nl','pt','tr','vn' ]; - var nfLocalesLikeFR = [ 'cz','fi','fr','ru','se','pl' ]; - var nfLocalesLikeCH = [ 'ch' ]; - - var nfLocaleFormatting = [ [".", ","], [",", "."], [",", " "], [".", "'"] ]; - var nfAllLocales = [ nfLocalesLikeUS, nfLocalesLikeDE, nfLocalesLikeFR, nfLocalesLikeCH ] - - function FormatData(dec, group, neg) { - this.dec = dec; - this.group = group; - this.neg = neg; - }; - - function init() { - // write the arrays into the hashtable - for (var localeGroupIdx = 0; localeGroupIdx < nfAllLocales.length; localeGroupIdx++) { - localeGroup = nfAllLocales[localeGroupIdx]; - for (var i = 0; i < localeGroup.length; i++) { - nfLocales.put(localeGroup[i], localeGroupIdx); - } - } - }; - - function formatCodes(locale, isFullLocale) { - if (nfLocales.size() == 0) - init(); - - // default values - var dec = "."; - var group = ","; - var neg = "-"; - - if (isFullLocale == false) { - // Extract and convert to lower-case any language code from a real 'locale' formatted string, if not use as-is - // (To prevent locale format like : "fr_FR", "en_US", "de_DE", "fr_FR", "en-US", "de-DE") - if (locale.indexOf('_') != -1) - locale = locale.split('_')[1].toLowerCase(); - else if (locale.indexOf('-') != -1) - locale = locale.split('-')[1].toLowerCase(); - } - - // hashtable lookup to match locale with codes - var codesIndex = nfLocales.get(locale); - if (codesIndex) { - var codes = nfLocaleFormatting[codesIndex]; - if (codes) { - dec = codes[0]; - group = codes[1]; - } - } - return new FormatData(dec, group, neg); - }; - - - /* Formatting Methods */ - - - /** - * Formats anything containing a number in standard js number notation. - * - * @param {Object} options The formatting options to use - * @param {Boolean} writeBack (true) If the output value should be written back to the subject - * @param {Boolean} giveReturnValue (true) If the function should return the output string - */ - jQuery.fn.formatNumber = function(options, writeBack, giveReturnValue) { - - return this.each(function() { - // enforce defaults - if (writeBack == null) - writeBack = true; - if (giveReturnValue == null) - giveReturnValue = true; - - // get text - var text; - if (jQuery(this).is(":input")) - text = new String(jQuery(this).val()); - else - text = new String(jQuery(this).text()); - - // format - var returnString = jQuery.formatNumber(text, options); - - // set formatted string back, only if a success -// if (returnString) { - if (writeBack) { - if (jQuery(this).is(":input")) - jQuery(this).val(returnString); - else - jQuery(this).text(returnString); - } - if (giveReturnValue) - return returnString; -// } -// return ''; - }); - }; - - /** - * First parses a string and reformats it with the given options. - * - * @param {Object} numberString - * @param {Object} options - */ - jQuery.formatNumber = function(numberString, options){ - var options = jQuery.extend({}, jQuery.fn.formatNumber.defaults, options); - var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); - - var dec = formatData.dec; - var group = formatData.group; - var neg = formatData.neg; - - var validFormat = "0#-,."; - - // strip all the invalid characters at the beginning and the end - // of the format, and we'll stick them back on at the end - // make a special case for the negative sign "-" though, so - // we can have formats like -$23.32 - var prefix = ""; - var negativeInFront = false; - for (var i = 0; i < options.format.length; i++) { - if (validFormat.indexOf(options.format.charAt(i)) == -1) - prefix = prefix + options.format.charAt(i); - else - if (i == 0 && options.format.charAt(i) == '-') { - negativeInFront = true; - continue; - } - else - break; - } - var suffix = ""; - for (var i = options.format.length - 1; i >= 0; i--) { - if (validFormat.indexOf(options.format.charAt(i)) == -1) - suffix = options.format.charAt(i) + suffix; - else - break; - } - - options.format = options.format.substring(prefix.length); - options.format = options.format.substring(0, options.format.length - suffix.length); - - // now we need to convert it into a number - //while (numberString.indexOf(group) > -1) - // numberString = numberString.replace(group, ''); - //var number = new Number(numberString.replace(dec, ".").replace(neg, "-")); - var number = new Number(numberString); - - return jQuery._formatNumber(number, options, suffix, prefix, negativeInFront); - }; - - /** - * Formats a Number object into a string, using the given formatting options - * - * @param {Object} numberString - * @param {Object} options - */ - jQuery._formatNumber = function(number, options, suffix, prefix, negativeInFront) { - var options = jQuery.extend({}, jQuery.fn.formatNumber.defaults, options); - var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); - - var dec = formatData.dec; - var group = formatData.group; - var neg = formatData.neg; - - var forcedToZero = false; - if (isNaN(number)) { - if (options.nanForceZero == true) { - number = 0; - forcedToZero = true; - } else - return null; - } - - // special case for percentages - if (suffix == "%") - number = number * 100; - - var returnString = ""; - if (options.format.indexOf(".") > -1) { - var decimalPortion = dec; - var decimalFormat = options.format.substring(options.format.lastIndexOf(".") + 1); - - // round or truncate number as needed - if (options.round == true) - number = new Number(number.toFixed(decimalFormat.length)); - else { - var numStr = number.toString(); - numStr = numStr.substring(0, numStr.lastIndexOf('.') + decimalFormat.length + 1); - number = new Number(numStr); - } - - var decimalValue = number % 1; - var decimalString = new String(decimalValue.toFixed(decimalFormat.length)); - decimalString = decimalString.substring(decimalString.lastIndexOf(".") + 1); - - for (var i = 0; i < decimalFormat.length; i++) { - if (decimalFormat.charAt(i) == '#' && decimalString.charAt(i) != '0') { - decimalPortion += decimalString.charAt(i); - continue; - } else if (decimalFormat.charAt(i) == '#' && decimalString.charAt(i) == '0') { - var notParsed = decimalString.substring(i); - if (notParsed.match('[1-9]')) { - decimalPortion += decimalString.charAt(i); - continue; - } else - break; - } else if (decimalFormat.charAt(i) == "0") - decimalPortion += decimalString.charAt(i); - } - returnString += decimalPortion - } else - number = Math.round(number); - - var ones = Math.floor(number); - if (number < 0) - ones = Math.ceil(number); - - var onesFormat = ""; - if (options.format.indexOf(".") == -1) - onesFormat = options.format; - else - onesFormat = options.format.substring(0, options.format.indexOf(".")); - - var onePortion = ""; - if (!(ones == 0 && onesFormat.substr(onesFormat.length - 1) == '#') || forcedToZero) { - // find how many digits are in the group - var oneText = new String(Math.abs(ones)); - var groupLength = 9999; - if (onesFormat.lastIndexOf(",") != -1) - groupLength = onesFormat.length - onesFormat.lastIndexOf(",") - 1; - var groupCount = 0; - for (var i = oneText.length - 1; i > -1; i--) { - onePortion = oneText.charAt(i) + onePortion; - groupCount++; - if (groupCount == groupLength && i != 0) { - onePortion = group + onePortion; - groupCount = 0; - } - } - - // account for any pre-data padding - if (onesFormat.length > onePortion.length) { - var padStart = onesFormat.indexOf('0'); - if (padStart != -1) { - var padLen = onesFormat.length - padStart; - - // pad to left with 0's or group char - var pos = onesFormat.length - onePortion.length - 1; - while (onePortion.length < padLen) { - var padChar = onesFormat.charAt(pos); - // replace with real group char if needed - if (padChar == ',') - padChar = group; - onePortion = padChar + onePortion; - pos--; - } - } - } - } - - if (!onePortion && onesFormat.indexOf('0', onesFormat.length - 1) !== -1) - onePortion = '0'; - - returnString = onePortion + returnString; - - // handle special case where negative is in front of the invalid characters - if (number < 0 && negativeInFront && prefix.length > 0) - prefix = neg + prefix; - else if (number < 0) - returnString = neg + returnString; - - if (!options.decimalSeparatorAlwaysShown) { - if (returnString.lastIndexOf(dec) == returnString.length - 1) { - returnString = returnString.substring(0, returnString.length - 1); - } - } - returnString = prefix + returnString + suffix; - return returnString; - }; - - - /* Parsing Methods */ - - - /** - * Parses a number of given format from the element and returns a Number object. - * @param {Object} options - */ - jQuery.fn.parseNumber = function(options, writeBack, giveReturnValue) { - // enforce defaults - if (writeBack == null) - writeBack = true; - if (giveReturnValue == null) - giveReturnValue = true; - - // get text - var text; - if (jQuery(this).is(":input")) - text = new String(jQuery(this).val()); - else - text = new String(jQuery(this).text()); - - // parse text - var number = jQuery.parseNumber(text, options); - - if (number) { - if (writeBack) { - if (jQuery(this).is(":input")) - jQuery(this).val(number.toString()); - else - jQuery(this).text(number.toString()); - } - if (giveReturnValue) - return number; - } - }; - - /** - * Parses a string of given format into a Number object. - * - * @param {Object} string - * @param {Object} options - */ - jQuery.parseNumber = function(numberString, options) { - var options = jQuery.extend({}, jQuery.fn.parseNumber.defaults, options); - var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); - - var dec = formatData.dec; - var group = formatData.group; - var neg = formatData.neg; - - var valid = "1234567890.-"; - - // now we need to convert it into a number - while (numberString.indexOf(group)>-1) - numberString = numberString.replace(group,''); - numberString = numberString.replace(dec,".").replace(neg,"-"); - var validText = ""; - var hasPercent = false; - if (numberString.charAt(numberString.length - 1) == "%" || options.isPercentage == true) - hasPercent = true; - for (var i=0; i-1) - validText = validText + numberString.charAt(i); - } - var number = new Number(validText); - if (hasPercent) { - number = number / 100; - var decimalPos = validText.indexOf('.'); - if (decimalPos != -1) { - var decimalPoints = validText.length - decimalPos - 1; - number = number.toFixed(decimalPoints + 2); - } else { - number = number.toFixed(validText.length - 1); - } - } - - return number; - }; - - jQuery.fn.parseNumber.defaults = { - locale: "us", - decimalSeparatorAlwaysShown: false, - isPercentage: false, - isFullLocale: false - }; - - jQuery.fn.formatNumber.defaults = { - format: "#,###.00", - locale: "us", - decimalSeparatorAlwaysShown: false, - nanForceZero: true, - round: true, - isFullLocale: false - }; - - Number.prototype.toFixed = function(precision) { - return jQuery._roundNumber(this, precision); - }; - - jQuery._roundNumber = function(number, decimalPlaces) { - var power = Math.pow(10, decimalPlaces || 0); - var value = String(Math.round(number * power) / power); - - // ensure the decimal places are there - if (decimalPlaces > 0) { - var dp = value.indexOf("."); - if (dp == -1) { - value += '.'; - dp = 0; - } else { - dp = value.length - (dp + 1); - } - - while (dp < decimalPlaces) { - value += '0'; - dp++; - } - } - return value; - }; - +/** + * jquery.numberformatter - Formatting/Parsing Numbers in jQuery + * + * Written by + * Michael Abernethy (mike@abernethysoft.com), + * Andrew Parry (aparry0@gmail.com) + * + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * @author Michael Abernethy, Andrew Parry + * @version 1.2.3-SNAPSHOT ($Id$) + * + * Dependencies + * + * jQuery (http://jquery.com) + * jshashtable (http://www.timdown.co.uk/jshashtable) + * + * Notes & Thanks + * + * many thanks to advweb.nanasi.jp for his bug fixes + * jsHashtable is now used also, so thanks to the author for that excellent little class. + * + * This plugin can be used to format numbers as text and parse text as Numbers + * Because we live in an international world, we cannot assume that everyone + * uses "," to divide thousands, and "." as a decimal point. + * + * As of 1.2 the way this plugin works has changed slightly, parsing text to a number + * has 1 set of functions, formatting a number to text has it's own. Before things + * were a little confusing, so I wanted to separate the 2 out more. + * + * + * jQuery extension functions: + * + * formatNumber(options, writeBack, giveReturnValue) - Reads the value from the subject, parses to + * a Javascript Number object, then formats back to text using the passed options and write back to + * the subject. + * + * parseNumber(options) - Parses the value in the subject to a Number object using the passed options + * to decipher the actual number from the text, then writes the value as text back to the subject. + * + * + * Generic functions: + * + * formatNumber(numberString, options) - Takes a plain number as a string (e.g. '1002.0123') and returns + * a string of the given format options. + * + * parseNumber(numberString, options) - Takes a number as text that is formatted the same as the given + * options then and returns it as a plain Number object. + * + * To achieve the old way of combining parsing and formatting to keep say a input field always formatted + * to a given format after it has lost focus you'd simply use a combination of the functions. + * + * e.g. + * $("#salary").blur(function(){ + * $(this).parseNumber({format:"#,###.00", locale:"us"}); + * $(this).formatNumber({format:"#,###.00", locale:"us"}); + * }); + * + * The syntax for the formatting is: + * 0 = Digit + * # = Digit, zero shows as absent + * . = Decimal separator + * - = Negative sign + * , = Grouping Separator + * % = Percent (multiplies the number by 100) + * + * For example, a format of "#,###.00" and text of 4500.20 will + * display as "4.500,20" with a locale of "de", and "4,500.20" with a locale of "us" + * + * + * As of now, the only acceptable locales are + * Arab Emirates -> "ae" + * Australia -> "au" + * Austria -> "at" + * Brazil -> "br" + * Canada -> "ca" + * China -> "cn" + * Czech -> "cz" + * Denmark -> "dk" + * Egypt -> "eg" + * Finland -> "fi" + * France -> "fr" + * Germany -> "de" + * Greece -> "gr" + * Great Britain -> "gb" + * Hong Kong -> "hk" + * India -> "in" + * Israel -> "il" + * Japan -> "jp" + * Russia -> "ru" + * South Korea -> "kr" + * Spain -> "es" + * Sweden -> "se" + * Switzerland -> "ch" + * Taiwan -> "tw" + * Thailand -> "th" + * United States -> "us" + * Vietnam -> "vn" + **/ + +(function(jQuery) { + + var nfLocales = new Hashtable(); + + var nfLocalesLikeUS = [ 'ae','au','ca','cn','eg','gb','hk','il','in','jp','sk','th','tw','us' ]; + var nfLocalesLikeDE = [ 'at','br','de','dk','es','gr','it','nl','pt','tr','vn' ]; + var nfLocalesLikeFR = [ 'cz','fi','fr','ru','se','pl' ]; + var nfLocalesLikeCH = [ 'ch' ]; + + var nfLocaleFormatting = [ [".", ","], [",", "."], [",", " "], [".", "'"] ]; + var nfAllLocales = [ nfLocalesLikeUS, nfLocalesLikeDE, nfLocalesLikeFR, nfLocalesLikeCH ] + + function FormatData(dec, group, neg) { + this.dec = dec; + this.group = group; + this.neg = neg; + }; + + function init() { + // write the arrays into the hashtable + for (var localeGroupIdx = 0; localeGroupIdx < nfAllLocales.length; localeGroupIdx++) { + localeGroup = nfAllLocales[localeGroupIdx]; + for (var i = 0; i < localeGroup.length; i++) { + nfLocales.put(localeGroup[i], localeGroupIdx); + } + } + }; + + function formatCodes(locale, isFullLocale) { + if (nfLocales.size() == 0) + init(); + + // default values + var dec = "."; + var group = ","; + var neg = "-"; + + if (isFullLocale == false) { + // Extract and convert to lower-case any language code from a real 'locale' formatted string, if not use as-is + // (To prevent locale format like : "fr_FR", "en_US", "de_DE", "fr_FR", "en-US", "de-DE") + if (locale.indexOf('_') != -1) + locale = locale.split('_')[1].toLowerCase(); + else if (locale.indexOf('-') != -1) + locale = locale.split('-')[1].toLowerCase(); + } + + // hashtable lookup to match locale with codes + var codesIndex = nfLocales.get(locale); + if (codesIndex) { + var codes = nfLocaleFormatting[codesIndex]; + if (codes) { + dec = codes[0]; + group = codes[1]; + } + } + return new FormatData(dec, group, neg); + }; + + + /* Formatting Methods */ + + + /** + * Formats anything containing a number in standard js number notation. + * + * @param {Object} options The formatting options to use + * @param {Boolean} writeBack (true) If the output value should be written back to the subject + * @param {Boolean} giveReturnValue (true) If the function should return the output string + */ + jQuery.fn.formatNumber = function(options, writeBack, giveReturnValue) { + + return this.each(function() { + // enforce defaults + if (writeBack == null) + writeBack = true; + if (giveReturnValue == null) + giveReturnValue = true; + + // get text + var text; + if (jQuery(this).is(":input")) + text = new String(jQuery(this).val()); + else + text = new String(jQuery(this).text()); + + // format + var returnString = jQuery.formatNumber(text, options); + + // set formatted string back, only if a success +// if (returnString) { + if (writeBack) { + if (jQuery(this).is(":input")) + jQuery(this).val(returnString); + else + jQuery(this).text(returnString); + } + if (giveReturnValue) + return returnString; +// } +// return ''; + }); + }; + + /** + * First parses a string and reformats it with the given options. + * + * @param {Object} numberString + * @param {Object} options + */ + jQuery.formatNumber = function(numberString, options){ + var options = jQuery.extend({}, jQuery.fn.formatNumber.defaults, options); + var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); + + var dec = formatData.dec; + var group = formatData.group; + var neg = formatData.neg; + + var validFormat = "0#-,."; + + // strip all the invalid characters at the beginning and the end + // of the format, and we'll stick them back on at the end + // make a special case for the negative sign "-" though, so + // we can have formats like -$23.32 + var prefix = ""; + var negativeInFront = false; + for (var i = 0; i < options.format.length; i++) { + if (validFormat.indexOf(options.format.charAt(i)) == -1) + prefix = prefix + options.format.charAt(i); + else + if (i == 0 && options.format.charAt(i) == '-') { + negativeInFront = true; + continue; + } + else + break; + } + var suffix = ""; + for (var i = options.format.length - 1; i >= 0; i--) { + if (validFormat.indexOf(options.format.charAt(i)) == -1) + suffix = options.format.charAt(i) + suffix; + else + break; + } + + options.format = options.format.substring(prefix.length); + options.format = options.format.substring(0, options.format.length - suffix.length); + + // now we need to convert it into a number + //while (numberString.indexOf(group) > -1) + // numberString = numberString.replace(group, ''); + //var number = new Number(numberString.replace(dec, ".").replace(neg, "-")); + var number = new Number(numberString); + + return jQuery._formatNumber(number, options, suffix, prefix, negativeInFront); + }; + + /** + * Formats a Number object into a string, using the given formatting options + * + * @param {Object} numberString + * @param {Object} options + */ + jQuery._formatNumber = function(number, options, suffix, prefix, negativeInFront) { + var options = jQuery.extend({}, jQuery.fn.formatNumber.defaults, options); + var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); + + var dec = formatData.dec; + var group = formatData.group; + var neg = formatData.neg; + + var forcedToZero = false; + if (isNaN(number)) { + if (options.nanForceZero == true) { + number = 0; + forcedToZero = true; + } else + return null; + } + + // special case for percentages + if (suffix == "%") + number = number * 100; + + var returnString = ""; + if (options.format.indexOf(".") > -1) { + var decimalPortion = dec; + var decimalFormat = options.format.substring(options.format.lastIndexOf(".") + 1); + + // round or truncate number as needed + if (options.round == true) + number = new Number(number.toFixed(decimalFormat.length)); + else { + var numStr = number.toString(); + numStr = numStr.substring(0, numStr.lastIndexOf('.') + decimalFormat.length + 1); + number = new Number(numStr); + } + + var decimalValue = number % 1; + var decimalString = new String(decimalValue.toFixed(decimalFormat.length)); + decimalString = decimalString.substring(decimalString.lastIndexOf(".") + 1); + + for (var i = 0; i < decimalFormat.length; i++) { + if (decimalFormat.charAt(i) == '#' && decimalString.charAt(i) != '0') { + decimalPortion += decimalString.charAt(i); + continue; + } else if (decimalFormat.charAt(i) == '#' && decimalString.charAt(i) == '0') { + var notParsed = decimalString.substring(i); + if (notParsed.match('[1-9]')) { + decimalPortion += decimalString.charAt(i); + continue; + } else + break; + } else if (decimalFormat.charAt(i) == "0") + decimalPortion += decimalString.charAt(i); + } + returnString += decimalPortion + } else + number = Math.round(number); + + var ones = Math.floor(number); + if (number < 0) + ones = Math.ceil(number); + + var onesFormat = ""; + if (options.format.indexOf(".") == -1) + onesFormat = options.format; + else + onesFormat = options.format.substring(0, options.format.indexOf(".")); + + var onePortion = ""; + if (!(ones == 0 && onesFormat.substr(onesFormat.length - 1) == '#') || forcedToZero) { + // find how many digits are in the group + var oneText = new String(Math.abs(ones)); + var groupLength = 9999; + if (onesFormat.lastIndexOf(",") != -1) + groupLength = onesFormat.length - onesFormat.lastIndexOf(",") - 1; + var groupCount = 0; + for (var i = oneText.length - 1; i > -1; i--) { + onePortion = oneText.charAt(i) + onePortion; + groupCount++; + if (groupCount == groupLength && i != 0) { + onePortion = group + onePortion; + groupCount = 0; + } + } + + // account for any pre-data padding + if (onesFormat.length > onePortion.length) { + var padStart = onesFormat.indexOf('0'); + if (padStart != -1) { + var padLen = onesFormat.length - padStart; + + // pad to left with 0's or group char + var pos = onesFormat.length - onePortion.length - 1; + while (onePortion.length < padLen) { + var padChar = onesFormat.charAt(pos); + // replace with real group char if needed + if (padChar == ',') + padChar = group; + onePortion = padChar + onePortion; + pos--; + } + } + } + } + + if (!onePortion && onesFormat.indexOf('0', onesFormat.length - 1) !== -1) + onePortion = '0'; + + returnString = onePortion + returnString; + + // handle special case where negative is in front of the invalid characters + if (number < 0 && negativeInFront && prefix.length > 0) + prefix = neg + prefix; + else if (number < 0) + returnString = neg + returnString; + + if (!options.decimalSeparatorAlwaysShown) { + if (returnString.lastIndexOf(dec) == returnString.length - 1) { + returnString = returnString.substring(0, returnString.length - 1); + } + } + returnString = prefix + returnString + suffix; + return returnString; + }; + + + /* Parsing Methods */ + + + /** + * Parses a number of given format from the element and returns a Number object. + * @param {Object} options + */ + jQuery.fn.parseNumber = function(options, writeBack, giveReturnValue) { + // enforce defaults + if (writeBack == null) + writeBack = true; + if (giveReturnValue == null) + giveReturnValue = true; + + // get text + var text; + if (jQuery(this).is(":input")) + text = new String(jQuery(this).val()); + else + text = new String(jQuery(this).text()); + + // parse text + var number = jQuery.parseNumber(text, options); + + if (number) { + if (writeBack) { + if (jQuery(this).is(":input")) + jQuery(this).val(number.toString()); + else + jQuery(this).text(number.toString()); + } + if (giveReturnValue) + return number; + } + }; + + /** + * Parses a string of given format into a Number object. + * + * @param {Object} string + * @param {Object} options + */ + jQuery.parseNumber = function(numberString, options) { + var options = jQuery.extend({}, jQuery.fn.parseNumber.defaults, options); + var formatData = formatCodes(options.locale.toLowerCase(), options.isFullLocale); + + var dec = formatData.dec; + var group = formatData.group; + var neg = formatData.neg; + + var valid = "1234567890.-"; + + // now we need to convert it into a number + while (numberString.indexOf(group)>-1) + numberString = numberString.replace(group,''); + numberString = numberString.replace(dec,".").replace(neg,"-"); + var validText = ""; + var hasPercent = false; + if (numberString.charAt(numberString.length - 1) == "%" || options.isPercentage == true) + hasPercent = true; + for (var i=0; i-1) + validText = validText + numberString.charAt(i); + } + var number = new Number(validText); + if (hasPercent) { + number = number / 100; + var decimalPos = validText.indexOf('.'); + if (decimalPos != -1) { + var decimalPoints = validText.length - decimalPos - 1; + number = number.toFixed(decimalPoints + 2); + } else { + number = number.toFixed(validText.length - 1); + } + } + + return number; + }; + + jQuery.fn.parseNumber.defaults = { + locale: "us", + decimalSeparatorAlwaysShown: false, + isPercentage: false, + isFullLocale: false + }; + + jQuery.fn.formatNumber.defaults = { + format: "#,###.00", + locale: "us", + decimalSeparatorAlwaysShown: false, + nanForceZero: true, + round: true, + isFullLocale: false + }; + + Number.prototype.toFixed = function(precision) { + return jQuery._roundNumber(this, precision); + }; + + jQuery._roundNumber = function(number, decimalPlaces) { + var power = Math.pow(10, decimalPlaces || 0); + var value = String(Math.round(number * power) / power); + + // ensure the decimal places are there + if (decimalPlaces > 0) { + var dp = value.indexOf("."); + if (dp == -1) { + value += '.'; + dp = 0; + } else { + dp = value.length - (dp + 1); + } + + while (dp < decimalPlaces) { + value += '0'; + dp++; + } + } + return value; + }; + })(jQuery); \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter/jshashtable-2.1.js b/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter/jshashtable-2.1.js index 3b93622b..e19c0be7 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter/jshashtable-2.1.js +++ b/Disco.Web/ClientSource/Scripts/Modules/jQuery-NumberFormatter/jshashtable-2.1.js @@ -1,16 +1,16 @@ -/** - * Copyright 2010 Tim Down. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/** + * Copyright 2010 Tim Down. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ var Hashtable=(function(){var p="function";var n=(typeof Array.prototype.splice==p)?function(s,r){s.splice(r,1)}:function(u,t){var s,v,r;if(t===u.length-1){u.length=t}else{s=u.slice(t+1);u.length=t;for(v=0,r=s.length;v -(function ($, window) { - "use strict"; - - if (typeof ($) !== "function") { - // no jQuery! - throw "SignalR: jQuery not found. Please ensure jQuery is referenced before the SignalR.js file."; - } - - if (!window.JSON) { - // no JSON! - throw "SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8."; - } - - var signalR, - _connection, - _pageLoaded = false, - _pageWindow = $(window), - - events = { - onStart: "onStart", - onStarting: "onStarting", - onSending: "onSending", - onReceived: "onReceived", - onError: "onError", - onReconnect: "onReconnect", - onStateChanged: "onStateChanged", - onDisconnect: "onDisconnect" - }, - - log = function (msg, logging) { - if (logging === false) { - return; - } - var m; - if (typeof (window.console) === "undefined") { - return; - } - m = "[" + new Date().toTimeString() + "] SignalR: " + msg; - if (window.console.debug) { - window.console.debug(m); - } else if (window.console.log) { - window.console.log(m); - } - }, - - isCrossDomain = function (url) { - var link; - - url = $.trim(url); - if (url.indexOf("http") !== 0) { - return false; - } - - // Create an anchor tag. - link = window.document.createElement("a"); - link.href = url; - - return link.protocol + link.host !== window.location.protocol + window.location.host; - }, - - changeState = function (connection, expectedState, newState) { - if (expectedState === connection.state) { - // REVIEW: Should event fire before or after the state change actually occurs? - $(connection).trigger(events.onStateChanged, [{ oldState: connection.state, newState: newState }]); - connection.state = newState; - return true; - } - - return false; - }, - - isDisconnecting = function (connection) { - return connection.state === signalR.connectionState.disconnected; - }; - - signalR = function (url, qs, logging) { - /// Creates a new SignalR connection for the given url - /// The URL of the long polling endpoint - /// - /// [Optional] Custom querystring parameters to add to the connection URL. - /// If an object, every non-function member will be added to the querystring. - /// If a string, it's added to the QS as specified. - /// - /// - /// [Optional] A flag indicating whether connection logging is enabled to the browser - /// console/log. Defaults to false. - /// - - return new signalR.fn.init(url, qs, logging); - }; - - signalR.events = events; - - signalR.changeState = changeState; - - signalR.isDisconnecting = isDisconnecting; - - signalR.connectionState = { - connecting: 0, - connected: 1, - reconnecting: 2, - disconnected: 4 - }; - - signalR.hub = { - start: function () { - // This will get replaced with the real hub connection start method when hubs is referenced correctly - throw "SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. ."; - } - }; - - _pageWindow.load(function () { _pageLoaded = true; }); - - signalR.fn = signalR.prototype = { - init: function (url, qs, logging) { - this.url = url; - this.qs = qs; - if (typeof (logging) === "boolean") { - this.logging = logging; - } - }, - - ajaxDataType: "json", - - logging: false, - - state: signalR.connectionState.disconnected, - - reconnectDelay: 2000, - - start: function (options, callback) { - /// Starts the connection - /// Options map - /// A callback function to execute when the connection has started - var connection = this, - config = { - waitForPageLoad: true, - transport: "auto", - jsonp: false - }, - initialize, - deferred = connection.deferral || $.Deferred(),// Check to see if there is a pre-existing deferral that's being built on, if so we want to keep using it - parser = window.document.createElement("a"); - - if ($.type(options) === "function") { - // Support calling with single callback parameter - callback = options; - } else if ($.type(options) === "object") { - $.extend(config, options); - if ($.type(config.callback) === "function") { - callback = config.callback; - } - } - - // Check to see if start is being called prior to page load - // If waitForPageLoad is true we then want to re-direct function call to the window load event - if (!_pageLoaded && config.waitForPageLoad === true) { - _pageWindow.load(function () { - connection.deferral = deferred; - connection.start(options, callback); - }); - return deferred.promise(); - } - - if (changeState(connection, - signalR.connectionState.disconnected, - signalR.connectionState.connecting) === false) { - // Already started, just return - deferred.resolve(connection); - return deferred.promise(); - } - - // Resolve the full url - parser.href = connection.url; - if (!parser.protocol || parser.protocol === ":") { - connection.protocol = window.document.location.protocol; - connection.host = window.document.location.host; - connection.baseUrl = connection.protocol + "//" + connection.host; - } - else { - connection.protocol = parser.protocol; - connection.host = parser.host; - connection.baseUrl = parser.protocol + "//" + parser.host; - } - - // Set the websocket protocol - connection.wsProtocol = connection.protocol === "https:" ? "wss://" : "ws://"; - - if (isCrossDomain(connection.url)) { - connection.log("Auto detected cross domain url."); - - if (config.transport === "auto") { - // If you didn't say you wanted to use jsonp, determine if it's your only choice - // i.e. if your browser doesn't supports CORS - if (!config.jsonp) { - config.jsonp = !$.support.cors; - - if (config.jsonp) { - connection.log("Using jsonp because this browser doesn't support CORS"); - } - } - - // If we're using jsonp thn just change to longpolling - if (config.jsonp === true) { - config.transport = "longPolling"; - } - else { - // Otherwise try webSockets and longPolling since SSE doesn't support CORS - // TODO: Support XDM with foreverFrame - config.transport = ["webSockets", "longPolling"]; - } - } - } - - connection.ajaxDataType = config.jsonp ? "jsonp" : "json"; - - $(connection).bind(events.onStart, function (e, data) { - if ($.type(callback) === "function") { - callback.call(connection); - } - deferred.resolve(connection); - }); - - initialize = function (transports, index) { - index = index || 0; - if (index >= transports.length) { - if (!connection.transport) { - // No transport initialized successfully - $(connection).trigger(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); - deferred.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); - // Stop the connection if it has connected and move it into the disconnected state - connection.stop(); - } - return; - } - - var transportName = transports[index], - transport = $.type(transportName) === "object" ? transportName : signalR.transports[transportName]; - - if (transportName.indexOf("_") === 0) { - // Private member - initialize(transports, index + 1); - return; - } - - transport.start(connection, function () { // success - connection.transport = transport; - - changeState(connection, - signalR.connectionState.connecting, - signalR.connectionState.connected); - - $(connection).trigger(events.onStart); - - _pageWindow.unload(function () { // failure - connection.stop(false /* async */); - }); - - }, function () { - initialize(transports, index + 1); - }); - }; - - var url = connection.url + "/negotiate"; - connection.log("Negotiating with '" + url + "'."); - $.ajax({ - url: url, - global: false, - cache: false, - type: "GET", - data: {}, - dataType: connection.ajaxDataType, - error: function (error) { - $(connection).trigger(events.onError, [error.responseText]); - deferred.reject("SignalR: Error during negotiation request: " + error.responseText); - // Stop the connection if negotiate failed - connection.stop(); - }, - success: function (res) { - connection.appRelativeUrl = res.Url; - connection.id = res.ConnectionId; - connection.webSocketServerUrl = res.WebSocketServerUrl; - - if (!res.ProtocolVersion || res.ProtocolVersion !== "1.0") { - $(connection).trigger(events.onError, "SignalR: Incompatible protocol version."); - deferred.reject("SignalR: Incompatible protocol version."); - return; - } - - $(connection).trigger(events.onStarting); - - var transports = [], - supportedTransports = []; - - $.each(signalR.transports, function (key) { - if (key === "webSockets" && !res.TryWebSockets) { - // Server said don't even try WebSockets, but keep processing the loop - return true; - } - supportedTransports.push(key); - }); - - if ($.isArray(config.transport)) { - // ordered list provided - $.each(config.transport, function () { - var transport = this; - if ($.type(transport) === "object" || ($.type(transport) === "string" && $.inArray("" + transport, supportedTransports) >= 0)) { - transports.push($.type(transport) === "string" ? "" + transport : transport); - } - }); - } else if ($.type(config.transport) === "object" || - $.inArray(config.transport, supportedTransports) >= 0) { - // specific transport provided, as object or a named transport, e.g. "longPolling" - transports.push(config.transport); - } else { // default "auto" - transports = supportedTransports; - } - initialize(transports); - } - }); - - return deferred.promise(); - }, - - starting: function (callback) { - /// Adds a callback that will be invoked before the connection is started - /// A callback function to execute when the connection is starting - /// - var connection = this, - $connection = $(connection); - - $connection.bind(events.onStarting, function (e, data) { - callback.call(connection); - // Unbind immediately, we don't want to call this callback again - $connection.unbind(events.onStarting); - }); - - return connection; - }, - - send: function (data) { - /// Sends data over the connection - /// The data to send over the connection - /// - var connection = this; - - if (connection.state === signalR.connectionState.disconnected) { - // Connection hasn't been started yet - throw "SignalR: Connection must be started before data can be sent. Call .start() before .send()"; - } - - if (connection.state === signalR.connectionState.connecting) { - // Connection hasn't been started yet - throw "SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started."; - } - - connection.transport.send(connection, data); - // REVIEW: Should we return deferred here? - return connection; - }, - - sending: function (callback) { - /// Adds a callback that will be invoked before anything is sent over the connection - /// A callback function to execute before each time data is sent on the connection - /// - var connection = this; - $(connection).bind(events.onSending, function (e, data) { - callback.call(connection); - }); - return connection; - }, - - received: function (callback) { - /// Adds a callback that will be invoked after anything is received over the connection - /// A callback function to execute when any data is received on the connection - /// - var connection = this; - $(connection).bind(events.onReceived, function (e, data) { - callback.call(connection, data); - }); - return connection; - }, - - stateChanged: function (callback) { - /// Adds a callback that will be invoked when the connection state changes - /// A callback function to execute when the connection state changes - /// - var connection = this; - $(connection).bind(events.onStateChanged, function (e, data) { - callback.call(connection, data); - }); - return connection; - }, - - error: function (callback) { - /// Adds a callback that will be invoked after an error occurs with the connection - /// A callback function to execute when an error occurs on the connection - /// - var connection = this; - $(connection).bind(events.onError, function (e, data) { - callback.call(connection, data); - }); - return connection; - }, - - disconnected: function (callback) { - /// Adds a callback that will be invoked when the client disconnects - /// A callback function to execute when the connection is broken - /// - var connection = this; - $(connection).bind(events.onDisconnect, function (e, data) { - callback.call(connection); - }); - return connection; - }, - - reconnected: function (callback) { - /// Adds a callback that will be invoked when the underlying transport reconnects - /// A callback function to execute when the connection is restored - /// - var connection = this; - $(connection).bind(events.onReconnect, function (e, data) { - callback.call(connection); - }); - return connection; - }, - - stop: function (async) { - /// Stops listening - /// - var connection = this; - - if (connection.state === signalR.connectionState.disconnected) { - return; - } - - try { - if (connection.transport) { - connection.transport.abort(connection, async); - connection.transport.stop(connection); - connection.transport = null; - } - - // Trigger the disconnect event - $(connection).trigger(events.onDisconnect); - - delete connection.messageId; - delete connection.groups; - } - finally { - changeState(connection, connection.state, signalR.connectionState.disconnected); - } - - return connection; - }, - - log: function (msg) { - log(msg, this.logging); - } - }; - - signalR.fn.init.prototype = signalR.fn; - - signalR.noConflict = function () { - /// Reinstates the original value of $.connection and returns the signalR object for manual assignment - /// - if ($.connection === signalR) { - $.connection = _connection; - } - return signalR; - }; - - if ($.connection) { - _connection = $.connection; - } - - $.connection = $.signalR = signalR; - -}(window.jQuery, window)); -/* jquery.signalR.transports.common.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events; - - signalR.transports = {}; - - signalR.transports._logic = { - addQs: function (url, connection) { - if (!connection.qs) { - return url; - } - - if (typeof (connection.qs) === "object") { - return url + "&" + $.param(connection.qs); - } - - if (typeof (connection.qs) === "string") { - return url + "&" + connection.qs; - } - - return url + "&" + window.escape(connection.qs.toString()); - }, - - getUrl: function (connection, transport, reconnecting, appendReconnectUrl) { - /// Gets the url for making a GET based connect request - var baseUrl = transport === "webSockets" ? "" : connection.baseUrl, - url = baseUrl + connection.appRelativeUrl, - qs = "transport=" + transport + "&connectionId=" + window.escape(connection.id); - - if (connection.data) { - qs += "&connectionData=" + window.escape(connection.data); - } - - if (!reconnecting) { - url = url + "/connect"; - } else { - if (appendReconnectUrl) { - url = url + "/reconnect"; - } - if (connection.messageId) { - qs += "&messageId=" + connection.messageId; - } - if (connection.groups) { - qs += "&groups=" + window.escape(JSON.stringify(connection.groups)); - } - } - url += "?" + qs; - url = this.addQs(url, connection); - url += "&tid=" + Math.floor(Math.random() * 11); - return url; - }, - - ajaxSend: function (connection, data) { - var url = connection.url + "/send" + "?transport=" + connection.transport.name + "&connectionId=" + window.escape(connection.id); - url = this.addQs(url, connection); - return $.ajax({ - url: url, - global: false, - type: "POST", - dataType: connection.ajaxDataType, - data: { - data: data - }, - success: function (result) { - if (result) { - $(connection).trigger(events.onReceived, [result]); - } - }, - error: function (errData, textStatus) { - if (textStatus === "abort" || - (textStatus === "parsererror" && connection.ajaxDataType === "jsonp")) { - // The parsererror happens for sends that don't return any data, and hence - // don't write the jsonp callback to the response. This is harder to fix on the server - // so just hack around it on the client for now. - return; - } - $(connection).trigger(events.onError, [errData]); - } - }); - }, - - ajaxAbort: function (connection, async) { - if (typeof (connection.transport) === "undefined") { - return; - } - - // Async by default unless explicitly overidden - async = typeof async === "undefined" ? true : async; - - var url = connection.url + "/abort" + "?transport=" + connection.transport.name + "&connectionId=" + window.escape(connection.id); - url = this.addQs(url, connection); - $.ajax({ - url: url, - async: async, - timeout: 1000, - global: false, - type: "POST", - dataType: connection.ajaxDataType, - data: {} - }); - - connection.log("Fired ajax abort async = " + async); - }, - - processMessages: function (connection, data) { - var $connection = $(connection); - - if (!data) { - return; - } - - if (data.Disconnect) { - connection.log("Disconnect command received from server"); - - // Disconnected by the server - connection.stop(); - return; - } - - if (data.Messages) { - $.each(data.Messages, function () { - try { - $connection.trigger(events.onReceived, [this]); - } - catch (e) { - connection.log("Error raising received " + e); - $(connection).trigger(events.onError, [e]); - } - }); - } - - if (data.MessageId) { - connection.messageId = data.MessageId; - } - - if (data.TransportData) { - connection.groups = data.TransportData.Groups; - } - }, - - foreverFrame: { - count: 0, - connections: {} - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.transports.webSockets.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - transportLogic = signalR.transports._logic; - - signalR.transports.webSockets = { - name: "webSockets", - - send: function (connection, data) { - connection.socket.send(data); - }, - - start: function (connection, onSuccess, onFailed) { - var url, - opened = false, - that = this, - reconnecting = !onSuccess, - $connection = $(connection); - - if (window.MozWebSocket) { - window.WebSocket = window.MozWebSocket; - } - - if (!window.WebSocket) { - onFailed(); - return; - } - - if (!connection.socket) { - if (connection.webSocketServerUrl) { - url = connection.webSocketServerUrl; - } - else { - url = connection.wsProtocol + connection.host; - } - - // Build the url - $(connection).trigger(events.onSending); - - url += transportLogic.getUrl(connection, this.name, reconnecting); - - connection.log("Connecting to websocket endpoint '" + url + "'"); - connection.socket = new window.WebSocket(url); - connection.socket.onopen = function () { - opened = true; - connection.log("Websocket opened"); - if (onSuccess) { - onSuccess(); - } - else { - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - $connection.trigger(events.onReconnect); - } - } - }; - - connection.socket.onclose = function (event) { - if (!opened) { - if (onFailed) { - onFailed(); - } - else if (reconnecting) { - that.reconnect(connection); - } - return; - } - else if (typeof event.wasClean !== "undefined" && event.wasClean === false) { - // Ideally this would use the websocket.onerror handler (rather than checking wasClean in onclose) but - // I found in some circumstances Chrome won't call onerror. This implementation seems to work on all browsers. - $(connection).trigger(events.onError, [event.reason]); - connection.log("Unclean disconnect from websocket." + event.reason); - } - else { - connection.log("Websocket closed"); - } - - that.reconnect(connection); - }; - - connection.socket.onmessage = function (event) { - var data = window.JSON.parse(event.data), - $connection; - if (data) { - $connection = $(connection); - - if (data.Messages) { - transportLogic.processMessages(connection, data); - } else { - $connection.trigger(events.onReceived, [data]); - } - } - }; - } - }, - - reconnect: function (connection) { - var that = this; - window.setTimeout(function () { - that.stop(connection); - - if (connection.state === signalR.connectionState.reconnecting || - changeState(connection, - signalR.connectionState.connected, - signalR.connectionState.reconnecting) === true) { - - connection.log("Websocket reconnecting"); - that.start(connection); - } - }, - connection.reconnectDelay); - }, - - stop: function (connection) { - if (connection.socket !== null) { - connection.log("Closing the Websocket"); - connection.socket.close(); - connection.socket = null; - } - }, - - abort: function (connection) { - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.transports.serverSentEvents.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - transportLogic = signalR.transports._logic; - - signalR.transports.serverSentEvents = { - name: "serverSentEvents", - - timeOut: 3000, - - start: function (connection, onSuccess, onFailed) { - var that = this, - opened = false, - $connection = $(connection), - reconnecting = !onSuccess, - url, - connectTimeOut; - - if (connection.eventSource) { - connection.log("The connection already has an event source. Stopping it."); - connection.stop(); - } - - if (!window.EventSource) { - if (onFailed) { - connection.log("This browser doesn't support SSE."); - onFailed(); - } - return; - } - - $connection.trigger(events.onSending); - - url = transportLogic.getUrl(connection, this.name, reconnecting); - - try { - connection.log("Attempting to connect to SSE endpoint '" + url + "'"); - connection.eventSource = new window.EventSource(url); - } - catch (e) { - connection.log("EventSource failed trying to connect with error " + e.Message); - if (onFailed) { - // The connection failed, call the failed callback - onFailed(); - } - else { - $connection.trigger(events.onError, [e]); - if (reconnecting) { - // If we were reconnecting, rather than doing initial connect, then try reconnect again - that.reconnect(connection); - } - } - return; - } - - // After connecting, if after the specified timeout there's no response stop the connection - // and raise on failed - connectTimeOut = window.setTimeout(function () { - if (opened === false) { - connection.log("EventSource timed out trying to connect"); - connection.log("EventSource readyState: " + connection.eventSource.readyState); - - if (!reconnecting) { - that.stop(connection); - } - - if (reconnecting) { - // If we're reconnecting and the event source is attempting to connect, - // don't keep retrying. This causes duplicate connections to spawn. - if (connection.eventSource.readyState !== window.EventSource.CONNECTING && - connection.eventSource.readyState !== window.EventSource.OPEN) { - // If we were reconnecting, rather than doing initial connect, then try reconnect again - that.reconnect(connection); - } - } else if (onFailed) { - onFailed(); - } - } - }, - that.timeOut); - - connection.eventSource.addEventListener("open", function (e) { - connection.log("EventSource connected"); - - if (connectTimeOut) { - window.clearTimeout(connectTimeOut); - } - - if (opened === false) { - opened = true; - - if (onSuccess) { - onSuccess(); - } - - if (reconnecting) { - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - $connection.trigger(events.onReconnect); - } - } - } - }, false); - - connection.eventSource.addEventListener("message", function (e) { - // process messages - if (e.data === "initialized") { - return; - } - transportLogic.processMessages(connection, window.JSON.parse(e.data)); - }, false); - - connection.eventSource.addEventListener("error", function (e) { - if (!opened) { - if (onFailed) { - onFailed(); - } - return; - } - - connection.log("EventSource readyState: " + connection.eventSource.readyState); - - if (e.eventPhase === window.EventSource.CLOSED) { - // We don't use the EventSource's native reconnect function as it - // doesn't allow us to change the URL when reconnecting. We need - // to change the URL to not include the /connect suffix, and pass - // the last message id we received. - connection.log("EventSource reconnecting due to the server connection ending"); - that.reconnect(connection); - } else { - // connection error - connection.log("EventSource error"); - $connection.trigger(events.onError); - } - }, false); - }, - - reconnect: function (connection) { - var that = this; - window.setTimeout(function () { - that.stop(connection); - - if (connection.state === signalR.connectionState.reconnecting || - changeState(connection, - signalR.connectionState.connected, - signalR.connectionState.reconnecting) === true) { - connection.log("EventSource reconnecting"); - that.start(connection); - } - - }, connection.reconnectDelay); - }, - - send: function (connection, data) { - transportLogic.ajaxSend(connection, data); - }, - - stop: function (connection) { - if (connection && connection.eventSource) { - connection.log("EventSource calling close()"); - connection.eventSource.close(); - connection.eventSource = null; - delete connection.eventSource; - } - }, - abort: function (connection, async) { - transportLogic.ajaxAbort(connection, async); - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.transports.foreverFrame.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - transportLogic = signalR.transports._logic; - - signalR.transports.foreverFrame = { - name: "foreverFrame", - - timeOut: 3000, - - start: function (connection, onSuccess, onFailed) { - var that = this, - frameId = (transportLogic.foreverFrame.count += 1), - url, - connectTimeOut, - frame = $(""); - - if (window.EventSource) { - // If the browser supports SSE, don't use Forever Frame - if (onFailed) { - connection.log("This brower supports SSE, skipping Forever Frame."); - onFailed(); - } - return; - } - - $(connection).trigger(events.onSending); - - // Build the url - url = transportLogic.getUrl(connection, this.name); - url += "&frameId=" + frameId; - - frame.prop("src", url); - transportLogic.foreverFrame.connections[frameId] = connection; - - connection.log("Binding to iframe's readystatechange event."); - frame.bind("readystatechange", function () { - if ($.inArray(this.readyState, ["loaded", "complete"]) >= 0) { - connection.log("Forever frame iframe readyState changed to " + this.readyState + ", reconnecting"); - - that.reconnect(connection); - } - }); - - connection.frame = frame[0]; - connection.frameId = frameId; - - if (onSuccess) { - connection.onSuccess = onSuccess; - } - - $("body").append(frame); - - // After connecting, if after the specified timeout there's no response stop the connection - // and raise on failed - // REVIEW: Why is connectTimeOut set here and never used again? - connectTimeOut = window.setTimeout(function () { - if (connection.onSuccess) { - connection.log("Failed to connect using forever frame source, it timed out after " + that.timeOut + "ms."); - that.stop(connection); - - if (onFailed) { - onFailed(); - } - } - }, that.timeOut); - }, - - reconnect: function (connection) { - var that = this; - window.setTimeout(function () { - if (!connection.frame) { - return; - } - - if (connection.state === signalR.connectionState.reconnecting || - changeState(connection, - signalR.connectionState.connected, - signalR.connectionState.reconnecting) === true) { - - var frame = connection.frame, - src = transportLogic.getUrl(connection, that.name, true) + "&frameId=" + connection.frameId; - connection.log("Upating iframe src to '" + src + "'."); - frame.src = src; - } - - }, connection.reconnectDelay); - }, - - send: function (connection, data) { - transportLogic.ajaxSend(connection, data); - }, - - receive: function (connection, data) { - var cw; - transportLogic.processMessages(connection, data); - // Delete the script & div elements - connection.frameMessageCount = (connection.frameMessageCount || 0) + 1; - if (connection.frameMessageCount > 50) { - connection.frameMessageCount = 0; - cw = connection.frame.contentWindow || connection.frame.contentDocument; - if (cw && cw.document) { - $("body", cw.document).empty(); - } - } - }, - - stop: function (connection) { - var cw = null; - if (connection.frame) { - if (connection.frame.stop) { - connection.frame.stop(); - } else { - cw = connection.frame.contentWindow || connection.frame.contentDocument; - if (cw.document && cw.document.execCommand) { - cw.document.execCommand("Stop"); - } - } - $(connection.frame).remove(); - delete transportLogic.foreverFrame.connections[connection.frameId]; - connection.frame = null; - connection.frameId = null; - delete connection.frame; - delete connection.frameId; - connection.log("Stopping forever frame"); - } - }, - - abort: function (connection, async) { - transportLogic.ajaxAbort(connection, async); - }, - - getConnection: function (id) { - return transportLogic.foreverFrame.connections[id]; - }, - - started: function (connection) { - if (connection.onSuccess) { - connection.onSuccess(); - connection.onSuccess = null; - delete connection.onSuccess; - } - else { - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - // If there's no onSuccess handler we assume this is a reconnect - $(connection).trigger(events.onReconnect); - } - } - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.transports.longPolling.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - isDisconnecting = $.signalR.isDisconnecting, - transportLogic = signalR.transports._logic; - - signalR.transports.longPolling = { - name: "longPolling", - - reconnectDelay: 3000, - - start: function (connection, onSuccess, onFailed) { - /// Starts the long polling connection - /// The SignalR connection to start - var that = this, - initialConnectFired = false; - - if (connection.pollXhr) { - connection.log("Polling xhr requests already exists, aborting."); - connection.stop(); - } - - connection.messageId = null; - - window.setTimeout(function () { - (function poll(instance, raiseReconnect) { - $(instance).trigger(events.onSending); - - var messageId = instance.messageId, - connect = (messageId === null), - reconnecting = !connect, - url = transportLogic.getUrl(instance, that.name, reconnecting, raiseReconnect), - reconnectTimeOut = null, - reconnectFired = false; - - if (reconnecting === true && raiseReconnect === true) { - if (connection.state !== signalR.connectionState.reconnecting && - changeState(connection, - signalR.connectionState.connected, - signalR.connectionState.reconnecting) === false) { - return; - } - } - - connection.log("Attempting to connect to '" + url + "' using longPolling."); - instance.pollXhr = $.ajax({ - url: url, - global: false, - cache: false, - type: "GET", - dataType: connection.ajaxDataType, - success: function (data) { - var delay = 0, - timedOutReceived = false; - - if (initialConnectFired === false) { - onSuccess(); - initialConnectFired = true; - } - - if (raiseReconnect === true) { - // Fire the reconnect event if it hasn't been fired as yet - if (reconnectFired === false) { - connection.log("Raising the reconnect event"); - - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - - $(instance).trigger(events.onReconnect); - reconnectFired = true; - } - } - } - - transportLogic.processMessages(instance, data); - if (data && - data.TransportData && - $.type(data.TransportData.LongPollDelay) === "number") { - delay = data.TransportData.LongPollDelay; - } - - if (data && data.TimedOut) { - timedOutReceived = data.TimedOut; - } - - if (data && data.Disconnect) { - return; - } - - if (isDisconnecting(instance) === true) { - return; - } - - if (delay > 0) { - window.setTimeout(function () { - poll(instance, timedOutReceived); - }, delay); - } else { - poll(instance, timedOutReceived); - } - }, - - error: function (data, textStatus) { - if (textStatus === "abort") { - connection.log("Aborted xhr requst."); - return; - } - - connection.log("An error occurred using longPolling. Status = " + textStatus + ". " + data.responseText); - - if (reconnectTimeOut) { - // If the request failed then we clear the timeout so that the - // reconnect event doesn't get fired - window.clearTimeout(reconnectTimeOut); - } - - $(instance).trigger(events.onError, [data.responseText]); - - window.setTimeout(function () { - if (isDisconnecting(instance) === false) { - poll(instance, true); - } - }, connection.reconnectDelay); - } - }); - - if (raiseReconnect === true) { - reconnectTimeOut = window.setTimeout(function () { - if (reconnectFired === false) { - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - - $(instance).trigger(events.onReconnect); - reconnectFired = true; - } - } - }, - that.reconnectDelay); - } - - }(connection)); - - // Now connected - // There's no good way know when the long poll has actually started so - // we assume it only takes around 150ms (max) to start the connection - window.setTimeout(function () { - if (initialConnectFired === false) { - onSuccess(); - initialConnectFired = true; - } - }, 150); - - }, 250); // Have to delay initial poll so Chrome doesn't show loader spinner in tab - }, - - send: function (connection, data) { - transportLogic.ajaxSend(connection, data); - }, - - stop: function (connection) { - /// Stops the long polling connection - /// The SignalR connection to stop - if (connection.pollXhr) { - connection.pollXhr.abort(); - connection.pollXhr = null; - delete connection.pollXhr; - } - }, - - abort: function (connection, async) { - transportLogic.ajaxAbort(connection, async); - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.hubs.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - // we use a global id for tracking callbacks so the server doesn't have to send extra info like hub name - var callbackId = 0, - callbacks = {}, - eventNamespace = "proxy."; - - // Array.prototype.map - if (!Array.prototype.hasOwnProperty("map")) { - Array.prototype.map = function (fun, thisp) { - var arr = this, - i, - length = arr.length, - result = []; - for (i = 0; i < length; i += 1) { - if (arr.hasOwnProperty(i)) { - result[i] = fun.call(thisp, arr[i], i, arr); - } - } - return result; - }; - } - - function getArgValue(a) { - return $.isFunction(a) ? null : ($.type(a) === "undefined" ? null : a); - } - - // hubProxy - function hubProxy(hubConnection, hubName) { - /// - /// Creates a new proxy object for the given hub connection that can be used to invoke - /// methods on server hubs and handle client method invocation requests from the server. - /// - return new hubProxy.fn.init(hubConnection, hubName); - } - - hubProxy.fn = hubProxy.prototype = { - init: function (connection, hubName) { - this.state = {}; - this.connection = connection; - this.hubName = hubName; - this.subscribed = false; - }, - - on: function (eventName, callback) { - /// Wires up a callback to be invoked when a invocation request is received from the server hub. - /// The name of the hub event to register the callback for. - /// The callback to be invoked. - var self = this; - - // Normalize the event name to lowercase - eventName = eventName.toLowerCase(); - - $(self).bind(eventNamespace + eventName, function (e, data) { - callback.apply(self, data); - }); - self.subscribed = true; - return self; - }, - - invoke: function (methodName) { - /// Invokes a server hub method with the given arguments. - /// The name of the server hub method. - - var self = this, - args = $.makeArray(arguments).slice(1), - userCallback = args[args.length - 1], // last argument - methodArgs = $.type(userCallback) === "function" ? args.slice(0, args.length - 1) /* all but last */ : args, - argValues = methodArgs.map(getArgValue), - data = { hub: self.hubName, method: methodName, args: argValues, state: self.state, id: callbackId }, - d = $.Deferred(), - callback = function (result) { - // Update the hub state - $.extend(this.state, result.State); - - if (result.Error) { - // Server hub method threw an exception, log it & reject the deferred - if (result.StackTrace) { - self.connection.log(result.Error + "\n" + result.StackTrace); - } - d.rejectWith(self, [result.Error]); - } else { - // Server invocation succeeded, invoke any user callback & resolve the deferred - if ($.type(userCallback) === "function") { - userCallback.call(self, result.Result); - } - d.resolveWith(self, [result.Result]); - } - }; - - callbacks[callbackId.toString()] = { scope: self, method: callback }; - callbackId += 1; - self.connection.send(window.JSON.stringify(data)); - - return d.promise(); - } - }; - - hubProxy.fn.init.prototype = hubProxy.fn; - - - // hubConnection - function hubConnection(url, options) { - /// Creates a new hub connection. - /// [Optional] The hub route url, defaults to "/signalr". - /// [Optional] Settings to use when creating the hubConnection. - var settings = { - qs: null, - logging: false, - useDefaultPath : true - }; - - $.extend(settings, options); - - if (!url || settings.useDefaultPath) { - url = (url || "") + "/signalr"; - } - return new hubConnection.fn.init(url, settings); - } - - hubConnection.fn = hubConnection.prototype = $.connection(); - - hubConnection.fn.init = function (url, options) { - var settings = { - qs: null, - logging: false, - useDefaultPath: true - }, - connection = this; - - $.extend(settings, options); - - // Call the base constructor - $.signalR.fn.init.call(connection, url, settings.qs, settings.logging); - - // Object to store hub proxies for this connection - connection.proxies = {}; - - // Wire up the sending handler - connection.sending(function () { - // Set the connection's data object with all the hub proxies with active subscriptions. - // These proxies will receive notifications from the server. - var subscribedHubs = []; - - $.each(this.proxies, function (key) { - if (this.subscribed) { - subscribedHubs.push({ name: key }); - } - }); - - this.data = window.JSON.stringify(subscribedHubs); - }); - - // Wire up the received handler - connection.received(function (data) { - var proxy, dataCallbackId, callback, hubName, eventName; - if (!data) { - return; - } - - if (typeof (data.Id) !== "undefined") { - // We received the return value from a server method invocation, look up callback by id and call it - dataCallbackId = data.Id.toString(); - callback = callbacks[dataCallbackId]; - if (callback) { - // Delete the callback from the proxy - callbacks[dataCallbackId] = null; - delete callbacks[dataCallbackId]; - - // Invoke the callback - callback.method.call(callback.scope, data); - } - } else { - // We received a client invocation request, i.e. broadcast from server hub - connection.log("Triggering client hub event '" + data.Method + "' on hub '" + data.Hub + "'."); - - // Normalize the names to lowercase - hubName = data.Hub.toLowerCase(); - eventName = data.Method.toLowerCase(); - - // Trigger the local invocation event - proxy = this.proxies[hubName]; - - // Update the hub state - $.extend(proxy.state, data.State); - $(proxy).trigger(eventNamespace + eventName, [data.Args]); - } - }); - }; - - hubConnection.fn.createProxy = function (hubName) { - /// - /// Creates a new proxy object for the given hub connection that can be used to invoke - /// methods on server hubs and handle client method invocation requests from the server. - /// - /// - /// The name of the hub on the server to create the proxy for. - /// - - // Normalize the name to lowercase - hubName = hubName.toLowerCase(); - - var proxy = this.proxies[hubName]; - if (!proxy) { - proxy = hubProxy(this, hubName); - this.proxies[hubName] = proxy; - } - return proxy; - }; - - hubConnection.fn.init.prototype = hubConnection.fn; - - $.hubConnection = hubConnection; - -} (window.jQuery, window)); - +///#source 1 1 /ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-0.5.3.js +/* jquery.signalR.core.js */ +/*global window:false */ +/*! + * SignalR JavaScript Library v0.5.3 + * http://signalr.net/ + * + * Copyright David Fowler and Damian Edwards 2012 + * Licensed under the MIT. + * https://github.com/SignalR/SignalR/blob/master/LICENSE.md + */ + +/// +(function ($, window) { + "use strict"; + + if (typeof ($) !== "function") { + // no jQuery! + throw "SignalR: jQuery not found. Please ensure jQuery is referenced before the SignalR.js file."; + } + + if (!window.JSON) { + // no JSON! + throw "SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8."; + } + + var signalR, + _connection, + _pageLoaded = false, + _pageWindow = $(window), + + events = { + onStart: "onStart", + onStarting: "onStarting", + onSending: "onSending", + onReceived: "onReceived", + onError: "onError", + onReconnect: "onReconnect", + onStateChanged: "onStateChanged", + onDisconnect: "onDisconnect" + }, + + log = function (msg, logging) { + if (logging === false) { + return; + } + var m; + if (typeof (window.console) === "undefined") { + return; + } + m = "[" + new Date().toTimeString() + "] SignalR: " + msg; + if (window.console.debug) { + window.console.debug(m); + } else if (window.console.log) { + window.console.log(m); + } + }, + + isCrossDomain = function (url) { + var link; + + url = $.trim(url); + if (url.indexOf("http") !== 0) { + return false; + } + + // Create an anchor tag. + link = window.document.createElement("a"); + link.href = url; + + return link.protocol + link.host !== window.location.protocol + window.location.host; + }, + + changeState = function (connection, expectedState, newState) { + if (expectedState === connection.state) { + // REVIEW: Should event fire before or after the state change actually occurs? + $(connection).trigger(events.onStateChanged, [{ oldState: connection.state, newState: newState }]); + connection.state = newState; + return true; + } + + return false; + }, + + isDisconnecting = function (connection) { + return connection.state === signalR.connectionState.disconnected; + }; + + signalR = function (url, qs, logging) { + /// Creates a new SignalR connection for the given url + /// The URL of the long polling endpoint + /// + /// [Optional] Custom querystring parameters to add to the connection URL. + /// If an object, every non-function member will be added to the querystring. + /// If a string, it's added to the QS as specified. + /// + /// + /// [Optional] A flag indicating whether connection logging is enabled to the browser + /// console/log. Defaults to false. + /// + + return new signalR.fn.init(url, qs, logging); + }; + + signalR.events = events; + + signalR.changeState = changeState; + + signalR.isDisconnecting = isDisconnecting; + + signalR.connectionState = { + connecting: 0, + connected: 1, + reconnecting: 2, + disconnected: 4 + }; + + signalR.hub = { + start: function () { + // This will get replaced with the real hub connection start method when hubs is referenced correctly + throw "SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. ."; + } + }; + + _pageWindow.load(function () { _pageLoaded = true; }); + + signalR.fn = signalR.prototype = { + init: function (url, qs, logging) { + this.url = url; + this.qs = qs; + if (typeof (logging) === "boolean") { + this.logging = logging; + } + }, + + ajaxDataType: "json", + + logging: false, + + state: signalR.connectionState.disconnected, + + reconnectDelay: 2000, + + start: function (options, callback) { + /// Starts the connection + /// Options map + /// A callback function to execute when the connection has started + var connection = this, + config = { + waitForPageLoad: true, + transport: "auto", + jsonp: false + }, + initialize, + deferred = connection.deferral || $.Deferred(),// Check to see if there is a pre-existing deferral that's being built on, if so we want to keep using it + parser = window.document.createElement("a"); + + if ($.type(options) === "function") { + // Support calling with single callback parameter + callback = options; + } else if ($.type(options) === "object") { + $.extend(config, options); + if ($.type(config.callback) === "function") { + callback = config.callback; + } + } + + // Check to see if start is being called prior to page load + // If waitForPageLoad is true we then want to re-direct function call to the window load event + if (!_pageLoaded && config.waitForPageLoad === true) { + _pageWindow.load(function () { + connection.deferral = deferred; + connection.start(options, callback); + }); + return deferred.promise(); + } + + if (changeState(connection, + signalR.connectionState.disconnected, + signalR.connectionState.connecting) === false) { + // Already started, just return + deferred.resolve(connection); + return deferred.promise(); + } + + // Resolve the full url + parser.href = connection.url; + if (!parser.protocol || parser.protocol === ":") { + connection.protocol = window.document.location.protocol; + connection.host = window.document.location.host; + connection.baseUrl = connection.protocol + "//" + connection.host; + } + else { + connection.protocol = parser.protocol; + connection.host = parser.host; + connection.baseUrl = parser.protocol + "//" + parser.host; + } + + // Set the websocket protocol + connection.wsProtocol = connection.protocol === "https:" ? "wss://" : "ws://"; + + if (isCrossDomain(connection.url)) { + connection.log("Auto detected cross domain url."); + + if (config.transport === "auto") { + // If you didn't say you wanted to use jsonp, determine if it's your only choice + // i.e. if your browser doesn't supports CORS + if (!config.jsonp) { + config.jsonp = !$.support.cors; + + if (config.jsonp) { + connection.log("Using jsonp because this browser doesn't support CORS"); + } + } + + // If we're using jsonp thn just change to longpolling + if (config.jsonp === true) { + config.transport = "longPolling"; + } + else { + // Otherwise try webSockets and longPolling since SSE doesn't support CORS + // TODO: Support XDM with foreverFrame + config.transport = ["webSockets", "longPolling"]; + } + } + } + + connection.ajaxDataType = config.jsonp ? "jsonp" : "json"; + + $(connection).bind(events.onStart, function (e, data) { + if ($.type(callback) === "function") { + callback.call(connection); + } + deferred.resolve(connection); + }); + + initialize = function (transports, index) { + index = index || 0; + if (index >= transports.length) { + if (!connection.transport) { + // No transport initialized successfully + $(connection).trigger(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); + deferred.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); + // Stop the connection if it has connected and move it into the disconnected state + connection.stop(); + } + return; + } + + var transportName = transports[index], + transport = $.type(transportName) === "object" ? transportName : signalR.transports[transportName]; + + if (transportName.indexOf("_") === 0) { + // Private member + initialize(transports, index + 1); + return; + } + + transport.start(connection, function () { // success + connection.transport = transport; + + changeState(connection, + signalR.connectionState.connecting, + signalR.connectionState.connected); + + $(connection).trigger(events.onStart); + + _pageWindow.unload(function () { // failure + connection.stop(false /* async */); + }); + + }, function () { + initialize(transports, index + 1); + }); + }; + + var url = connection.url + "/negotiate"; + connection.log("Negotiating with '" + url + "'."); + $.ajax({ + url: url, + global: false, + cache: false, + type: "GET", + data: {}, + dataType: connection.ajaxDataType, + error: function (error) { + $(connection).trigger(events.onError, [error.responseText]); + deferred.reject("SignalR: Error during negotiation request: " + error.responseText); + // Stop the connection if negotiate failed + connection.stop(); + }, + success: function (res) { + connection.appRelativeUrl = res.Url; + connection.id = res.ConnectionId; + connection.webSocketServerUrl = res.WebSocketServerUrl; + + if (!res.ProtocolVersion || res.ProtocolVersion !== "1.0") { + $(connection).trigger(events.onError, "SignalR: Incompatible protocol version."); + deferred.reject("SignalR: Incompatible protocol version."); + return; + } + + $(connection).trigger(events.onStarting); + + var transports = [], + supportedTransports = []; + + $.each(signalR.transports, function (key) { + if (key === "webSockets" && !res.TryWebSockets) { + // Server said don't even try WebSockets, but keep processing the loop + return true; + } + supportedTransports.push(key); + }); + + if ($.isArray(config.transport)) { + // ordered list provided + $.each(config.transport, function () { + var transport = this; + if ($.type(transport) === "object" || ($.type(transport) === "string" && $.inArray("" + transport, supportedTransports) >= 0)) { + transports.push($.type(transport) === "string" ? "" + transport : transport); + } + }); + } else if ($.type(config.transport) === "object" || + $.inArray(config.transport, supportedTransports) >= 0) { + // specific transport provided, as object or a named transport, e.g. "longPolling" + transports.push(config.transport); + } else { // default "auto" + transports = supportedTransports; + } + initialize(transports); + } + }); + + return deferred.promise(); + }, + + starting: function (callback) { + /// Adds a callback that will be invoked before the connection is started + /// A callback function to execute when the connection is starting + /// + var connection = this, + $connection = $(connection); + + $connection.bind(events.onStarting, function (e, data) { + callback.call(connection); + // Unbind immediately, we don't want to call this callback again + $connection.unbind(events.onStarting); + }); + + return connection; + }, + + send: function (data) { + /// Sends data over the connection + /// The data to send over the connection + /// + var connection = this; + + if (connection.state === signalR.connectionState.disconnected) { + // Connection hasn't been started yet + throw "SignalR: Connection must be started before data can be sent. Call .start() before .send()"; + } + + if (connection.state === signalR.connectionState.connecting) { + // Connection hasn't been started yet + throw "SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started."; + } + + connection.transport.send(connection, data); + // REVIEW: Should we return deferred here? + return connection; + }, + + sending: function (callback) { + /// Adds a callback that will be invoked before anything is sent over the connection + /// A callback function to execute before each time data is sent on the connection + /// + var connection = this; + $(connection).bind(events.onSending, function (e, data) { + callback.call(connection); + }); + return connection; + }, + + received: function (callback) { + /// Adds a callback that will be invoked after anything is received over the connection + /// A callback function to execute when any data is received on the connection + /// + var connection = this; + $(connection).bind(events.onReceived, function (e, data) { + callback.call(connection, data); + }); + return connection; + }, + + stateChanged: function (callback) { + /// Adds a callback that will be invoked when the connection state changes + /// A callback function to execute when the connection state changes + /// + var connection = this; + $(connection).bind(events.onStateChanged, function (e, data) { + callback.call(connection, data); + }); + return connection; + }, + + error: function (callback) { + /// Adds a callback that will be invoked after an error occurs with the connection + /// A callback function to execute when an error occurs on the connection + /// + var connection = this; + $(connection).bind(events.onError, function (e, data) { + callback.call(connection, data); + }); + return connection; + }, + + disconnected: function (callback) { + /// Adds a callback that will be invoked when the client disconnects + /// A callback function to execute when the connection is broken + /// + var connection = this; + $(connection).bind(events.onDisconnect, function (e, data) { + callback.call(connection); + }); + return connection; + }, + + reconnected: function (callback) { + /// Adds a callback that will be invoked when the underlying transport reconnects + /// A callback function to execute when the connection is restored + /// + var connection = this; + $(connection).bind(events.onReconnect, function (e, data) { + callback.call(connection); + }); + return connection; + }, + + stop: function (async) { + /// Stops listening + /// + var connection = this; + + if (connection.state === signalR.connectionState.disconnected) { + return; + } + + try { + if (connection.transport) { + connection.transport.abort(connection, async); + connection.transport.stop(connection); + connection.transport = null; + } + + // Trigger the disconnect event + $(connection).trigger(events.onDisconnect); + + delete connection.messageId; + delete connection.groups; + } + finally { + changeState(connection, connection.state, signalR.connectionState.disconnected); + } + + return connection; + }, + + log: function (msg) { + log(msg, this.logging); + } + }; + + signalR.fn.init.prototype = signalR.fn; + + signalR.noConflict = function () { + /// Reinstates the original value of $.connection and returns the signalR object for manual assignment + /// + if ($.connection === signalR) { + $.connection = _connection; + } + return signalR; + }; + + if ($.connection) { + _connection = $.connection; + } + + $.connection = $.signalR = signalR; + +}(window.jQuery, window)); +/* jquery.signalR.transports.common.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events; + + signalR.transports = {}; + + signalR.transports._logic = { + addQs: function (url, connection) { + if (!connection.qs) { + return url; + } + + if (typeof (connection.qs) === "object") { + return url + "&" + $.param(connection.qs); + } + + if (typeof (connection.qs) === "string") { + return url + "&" + connection.qs; + } + + return url + "&" + window.escape(connection.qs.toString()); + }, + + getUrl: function (connection, transport, reconnecting, appendReconnectUrl) { + /// Gets the url for making a GET based connect request + var baseUrl = transport === "webSockets" ? "" : connection.baseUrl, + url = baseUrl + connection.appRelativeUrl, + qs = "transport=" + transport + "&connectionId=" + window.escape(connection.id); + + if (connection.data) { + qs += "&connectionData=" + window.escape(connection.data); + } + + if (!reconnecting) { + url = url + "/connect"; + } else { + if (appendReconnectUrl) { + url = url + "/reconnect"; + } + if (connection.messageId) { + qs += "&messageId=" + connection.messageId; + } + if (connection.groups) { + qs += "&groups=" + window.escape(JSON.stringify(connection.groups)); + } + } + url += "?" + qs; + url = this.addQs(url, connection); + url += "&tid=" + Math.floor(Math.random() * 11); + return url; + }, + + ajaxSend: function (connection, data) { + var url = connection.url + "/send" + "?transport=" + connection.transport.name + "&connectionId=" + window.escape(connection.id); + url = this.addQs(url, connection); + return $.ajax({ + url: url, + global: false, + type: "POST", + dataType: connection.ajaxDataType, + data: { + data: data + }, + success: function (result) { + if (result) { + $(connection).trigger(events.onReceived, [result]); + } + }, + error: function (errData, textStatus) { + if (textStatus === "abort" || + (textStatus === "parsererror" && connection.ajaxDataType === "jsonp")) { + // The parsererror happens for sends that don't return any data, and hence + // don't write the jsonp callback to the response. This is harder to fix on the server + // so just hack around it on the client for now. + return; + } + $(connection).trigger(events.onError, [errData]); + } + }); + }, + + ajaxAbort: function (connection, async) { + if (typeof (connection.transport) === "undefined") { + return; + } + + // Async by default unless explicitly overidden + async = typeof async === "undefined" ? true : async; + + var url = connection.url + "/abort" + "?transport=" + connection.transport.name + "&connectionId=" + window.escape(connection.id); + url = this.addQs(url, connection); + $.ajax({ + url: url, + async: async, + timeout: 1000, + global: false, + type: "POST", + dataType: connection.ajaxDataType, + data: {} + }); + + connection.log("Fired ajax abort async = " + async); + }, + + processMessages: function (connection, data) { + var $connection = $(connection); + + if (!data) { + return; + } + + if (data.Disconnect) { + connection.log("Disconnect command received from server"); + + // Disconnected by the server + connection.stop(); + return; + } + + if (data.Messages) { + $.each(data.Messages, function () { + try { + $connection.trigger(events.onReceived, [this]); + } + catch (e) { + connection.log("Error raising received " + e); + $(connection).trigger(events.onError, [e]); + } + }); + } + + if (data.MessageId) { + connection.messageId = data.MessageId; + } + + if (data.TransportData) { + connection.groups = data.TransportData.Groups; + } + }, + + foreverFrame: { + count: 0, + connections: {} + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.transports.webSockets.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events, + changeState = $.signalR.changeState, + transportLogic = signalR.transports._logic; + + signalR.transports.webSockets = { + name: "webSockets", + + send: function (connection, data) { + connection.socket.send(data); + }, + + start: function (connection, onSuccess, onFailed) { + var url, + opened = false, + that = this, + reconnecting = !onSuccess, + $connection = $(connection); + + if (window.MozWebSocket) { + window.WebSocket = window.MozWebSocket; + } + + if (!window.WebSocket) { + onFailed(); + return; + } + + if (!connection.socket) { + if (connection.webSocketServerUrl) { + url = connection.webSocketServerUrl; + } + else { + url = connection.wsProtocol + connection.host; + } + + // Build the url + $(connection).trigger(events.onSending); + + url += transportLogic.getUrl(connection, this.name, reconnecting); + + connection.log("Connecting to websocket endpoint '" + url + "'"); + connection.socket = new window.WebSocket(url); + connection.socket.onopen = function () { + opened = true; + connection.log("Websocket opened"); + if (onSuccess) { + onSuccess(); + } + else { + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + $connection.trigger(events.onReconnect); + } + } + }; + + connection.socket.onclose = function (event) { + if (!opened) { + if (onFailed) { + onFailed(); + } + else if (reconnecting) { + that.reconnect(connection); + } + return; + } + else if (typeof event.wasClean !== "undefined" && event.wasClean === false) { + // Ideally this would use the websocket.onerror handler (rather than checking wasClean in onclose) but + // I found in some circumstances Chrome won't call onerror. This implementation seems to work on all browsers. + $(connection).trigger(events.onError, [event.reason]); + connection.log("Unclean disconnect from websocket." + event.reason); + } + else { + connection.log("Websocket closed"); + } + + that.reconnect(connection); + }; + + connection.socket.onmessage = function (event) { + var data = window.JSON.parse(event.data), + $connection; + if (data) { + $connection = $(connection); + + if (data.Messages) { + transportLogic.processMessages(connection, data); + } else { + $connection.trigger(events.onReceived, [data]); + } + } + }; + } + }, + + reconnect: function (connection) { + var that = this; + window.setTimeout(function () { + that.stop(connection); + + if (connection.state === signalR.connectionState.reconnecting || + changeState(connection, + signalR.connectionState.connected, + signalR.connectionState.reconnecting) === true) { + + connection.log("Websocket reconnecting"); + that.start(connection); + } + }, + connection.reconnectDelay); + }, + + stop: function (connection) { + if (connection.socket !== null) { + connection.log("Closing the Websocket"); + connection.socket.close(); + connection.socket = null; + } + }, + + abort: function (connection) { + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.transports.serverSentEvents.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events, + changeState = $.signalR.changeState, + transportLogic = signalR.transports._logic; + + signalR.transports.serverSentEvents = { + name: "serverSentEvents", + + timeOut: 3000, + + start: function (connection, onSuccess, onFailed) { + var that = this, + opened = false, + $connection = $(connection), + reconnecting = !onSuccess, + url, + connectTimeOut; + + if (connection.eventSource) { + connection.log("The connection already has an event source. Stopping it."); + connection.stop(); + } + + if (!window.EventSource) { + if (onFailed) { + connection.log("This browser doesn't support SSE."); + onFailed(); + } + return; + } + + $connection.trigger(events.onSending); + + url = transportLogic.getUrl(connection, this.name, reconnecting); + + try { + connection.log("Attempting to connect to SSE endpoint '" + url + "'"); + connection.eventSource = new window.EventSource(url); + } + catch (e) { + connection.log("EventSource failed trying to connect with error " + e.Message); + if (onFailed) { + // The connection failed, call the failed callback + onFailed(); + } + else { + $connection.trigger(events.onError, [e]); + if (reconnecting) { + // If we were reconnecting, rather than doing initial connect, then try reconnect again + that.reconnect(connection); + } + } + return; + } + + // After connecting, if after the specified timeout there's no response stop the connection + // and raise on failed + connectTimeOut = window.setTimeout(function () { + if (opened === false) { + connection.log("EventSource timed out trying to connect"); + connection.log("EventSource readyState: " + connection.eventSource.readyState); + + if (!reconnecting) { + that.stop(connection); + } + + if (reconnecting) { + // If we're reconnecting and the event source is attempting to connect, + // don't keep retrying. This causes duplicate connections to spawn. + if (connection.eventSource.readyState !== window.EventSource.CONNECTING && + connection.eventSource.readyState !== window.EventSource.OPEN) { + // If we were reconnecting, rather than doing initial connect, then try reconnect again + that.reconnect(connection); + } + } else if (onFailed) { + onFailed(); + } + } + }, + that.timeOut); + + connection.eventSource.addEventListener("open", function (e) { + connection.log("EventSource connected"); + + if (connectTimeOut) { + window.clearTimeout(connectTimeOut); + } + + if (opened === false) { + opened = true; + + if (onSuccess) { + onSuccess(); + } + + if (reconnecting) { + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + $connection.trigger(events.onReconnect); + } + } + } + }, false); + + connection.eventSource.addEventListener("message", function (e) { + // process messages + if (e.data === "initialized") { + return; + } + transportLogic.processMessages(connection, window.JSON.parse(e.data)); + }, false); + + connection.eventSource.addEventListener("error", function (e) { + if (!opened) { + if (onFailed) { + onFailed(); + } + return; + } + + connection.log("EventSource readyState: " + connection.eventSource.readyState); + + if (e.eventPhase === window.EventSource.CLOSED) { + // We don't use the EventSource's native reconnect function as it + // doesn't allow us to change the URL when reconnecting. We need + // to change the URL to not include the /connect suffix, and pass + // the last message id we received. + connection.log("EventSource reconnecting due to the server connection ending"); + that.reconnect(connection); + } else { + // connection error + connection.log("EventSource error"); + $connection.trigger(events.onError); + } + }, false); + }, + + reconnect: function (connection) { + var that = this; + window.setTimeout(function () { + that.stop(connection); + + if (connection.state === signalR.connectionState.reconnecting || + changeState(connection, + signalR.connectionState.connected, + signalR.connectionState.reconnecting) === true) { + connection.log("EventSource reconnecting"); + that.start(connection); + } + + }, connection.reconnectDelay); + }, + + send: function (connection, data) { + transportLogic.ajaxSend(connection, data); + }, + + stop: function (connection) { + if (connection && connection.eventSource) { + connection.log("EventSource calling close()"); + connection.eventSource.close(); + connection.eventSource = null; + delete connection.eventSource; + } + }, + abort: function (connection, async) { + transportLogic.ajaxAbort(connection, async); + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.transports.foreverFrame.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events, + changeState = $.signalR.changeState, + transportLogic = signalR.transports._logic; + + signalR.transports.foreverFrame = { + name: "foreverFrame", + + timeOut: 3000, + + start: function (connection, onSuccess, onFailed) { + var that = this, + frameId = (transportLogic.foreverFrame.count += 1), + url, + connectTimeOut, + frame = $(""); + + if (window.EventSource) { + // If the browser supports SSE, don't use Forever Frame + if (onFailed) { + connection.log("This brower supports SSE, skipping Forever Frame."); + onFailed(); + } + return; + } + + $(connection).trigger(events.onSending); + + // Build the url + url = transportLogic.getUrl(connection, this.name); + url += "&frameId=" + frameId; + + frame.prop("src", url); + transportLogic.foreverFrame.connections[frameId] = connection; + + connection.log("Binding to iframe's readystatechange event."); + frame.bind("readystatechange", function () { + if ($.inArray(this.readyState, ["loaded", "complete"]) >= 0) { + connection.log("Forever frame iframe readyState changed to " + this.readyState + ", reconnecting"); + + that.reconnect(connection); + } + }); + + connection.frame = frame[0]; + connection.frameId = frameId; + + if (onSuccess) { + connection.onSuccess = onSuccess; + } + + $("body").append(frame); + + // After connecting, if after the specified timeout there's no response stop the connection + // and raise on failed + // REVIEW: Why is connectTimeOut set here and never used again? + connectTimeOut = window.setTimeout(function () { + if (connection.onSuccess) { + connection.log("Failed to connect using forever frame source, it timed out after " + that.timeOut + "ms."); + that.stop(connection); + + if (onFailed) { + onFailed(); + } + } + }, that.timeOut); + }, + + reconnect: function (connection) { + var that = this; + window.setTimeout(function () { + if (!connection.frame) { + return; + } + + if (connection.state === signalR.connectionState.reconnecting || + changeState(connection, + signalR.connectionState.connected, + signalR.connectionState.reconnecting) === true) { + + var frame = connection.frame, + src = transportLogic.getUrl(connection, that.name, true) + "&frameId=" + connection.frameId; + connection.log("Upating iframe src to '" + src + "'."); + frame.src = src; + } + + }, connection.reconnectDelay); + }, + + send: function (connection, data) { + transportLogic.ajaxSend(connection, data); + }, + + receive: function (connection, data) { + var cw; + transportLogic.processMessages(connection, data); + // Delete the script & div elements + connection.frameMessageCount = (connection.frameMessageCount || 0) + 1; + if (connection.frameMessageCount > 50) { + connection.frameMessageCount = 0; + cw = connection.frame.contentWindow || connection.frame.contentDocument; + if (cw && cw.document) { + $("body", cw.document).empty(); + } + } + }, + + stop: function (connection) { + var cw = null; + if (connection.frame) { + if (connection.frame.stop) { + connection.frame.stop(); + } else { + cw = connection.frame.contentWindow || connection.frame.contentDocument; + if (cw.document && cw.document.execCommand) { + cw.document.execCommand("Stop"); + } + } + $(connection.frame).remove(); + delete transportLogic.foreverFrame.connections[connection.frameId]; + connection.frame = null; + connection.frameId = null; + delete connection.frame; + delete connection.frameId; + connection.log("Stopping forever frame"); + } + }, + + abort: function (connection, async) { + transportLogic.ajaxAbort(connection, async); + }, + + getConnection: function (id) { + return transportLogic.foreverFrame.connections[id]; + }, + + started: function (connection) { + if (connection.onSuccess) { + connection.onSuccess(); + connection.onSuccess = null; + delete connection.onSuccess; + } + else { + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + // If there's no onSuccess handler we assume this is a reconnect + $(connection).trigger(events.onReconnect); + } + } + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.transports.longPolling.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events, + changeState = $.signalR.changeState, + isDisconnecting = $.signalR.isDisconnecting, + transportLogic = signalR.transports._logic; + + signalR.transports.longPolling = { + name: "longPolling", + + reconnectDelay: 3000, + + start: function (connection, onSuccess, onFailed) { + /// Starts the long polling connection + /// The SignalR connection to start + var that = this, + initialConnectFired = false; + + if (connection.pollXhr) { + connection.log("Polling xhr requests already exists, aborting."); + connection.stop(); + } + + connection.messageId = null; + + window.setTimeout(function () { + (function poll(instance, raiseReconnect) { + $(instance).trigger(events.onSending); + + var messageId = instance.messageId, + connect = (messageId === null), + reconnecting = !connect, + url = transportLogic.getUrl(instance, that.name, reconnecting, raiseReconnect), + reconnectTimeOut = null, + reconnectFired = false; + + if (reconnecting === true && raiseReconnect === true) { + if (connection.state !== signalR.connectionState.reconnecting && + changeState(connection, + signalR.connectionState.connected, + signalR.connectionState.reconnecting) === false) { + return; + } + } + + connection.log("Attempting to connect to '" + url + "' using longPolling."); + instance.pollXhr = $.ajax({ + url: url, + global: false, + cache: false, + type: "GET", + dataType: connection.ajaxDataType, + success: function (data) { + var delay = 0, + timedOutReceived = false; + + if (initialConnectFired === false) { + onSuccess(); + initialConnectFired = true; + } + + if (raiseReconnect === true) { + // Fire the reconnect event if it hasn't been fired as yet + if (reconnectFired === false) { + connection.log("Raising the reconnect event"); + + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + + $(instance).trigger(events.onReconnect); + reconnectFired = true; + } + } + } + + transportLogic.processMessages(instance, data); + if (data && + data.TransportData && + $.type(data.TransportData.LongPollDelay) === "number") { + delay = data.TransportData.LongPollDelay; + } + + if (data && data.TimedOut) { + timedOutReceived = data.TimedOut; + } + + if (data && data.Disconnect) { + return; + } + + if (isDisconnecting(instance) === true) { + return; + } + + if (delay > 0) { + window.setTimeout(function () { + poll(instance, timedOutReceived); + }, delay); + } else { + poll(instance, timedOutReceived); + } + }, + + error: function (data, textStatus) { + if (textStatus === "abort") { + connection.log("Aborted xhr requst."); + return; + } + + connection.log("An error occurred using longPolling. Status = " + textStatus + ". " + data.responseText); + + if (reconnectTimeOut) { + // If the request failed then we clear the timeout so that the + // reconnect event doesn't get fired + window.clearTimeout(reconnectTimeOut); + } + + $(instance).trigger(events.onError, [data.responseText]); + + window.setTimeout(function () { + if (isDisconnecting(instance) === false) { + poll(instance, true); + } + }, connection.reconnectDelay); + } + }); + + if (raiseReconnect === true) { + reconnectTimeOut = window.setTimeout(function () { + if (reconnectFired === false) { + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + + $(instance).trigger(events.onReconnect); + reconnectFired = true; + } + } + }, + that.reconnectDelay); + } + + }(connection)); + + // Now connected + // There's no good way know when the long poll has actually started so + // we assume it only takes around 150ms (max) to start the connection + window.setTimeout(function () { + if (initialConnectFired === false) { + onSuccess(); + initialConnectFired = true; + } + }, 150); + + }, 250); // Have to delay initial poll so Chrome doesn't show loader spinner in tab + }, + + send: function (connection, data) { + transportLogic.ajaxSend(connection, data); + }, + + stop: function (connection) { + /// Stops the long polling connection + /// The SignalR connection to stop + if (connection.pollXhr) { + connection.pollXhr.abort(); + connection.pollXhr = null; + delete connection.pollXhr; + } + }, + + abort: function (connection, async) { + transportLogic.ajaxAbort(connection, async); + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.hubs.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + // we use a global id for tracking callbacks so the server doesn't have to send extra info like hub name + var callbackId = 0, + callbacks = {}, + eventNamespace = "proxy."; + + // Array.prototype.map + if (!Array.prototype.hasOwnProperty("map")) { + Array.prototype.map = function (fun, thisp) { + var arr = this, + i, + length = arr.length, + result = []; + for (i = 0; i < length; i += 1) { + if (arr.hasOwnProperty(i)) { + result[i] = fun.call(thisp, arr[i], i, arr); + } + } + return result; + }; + } + + function getArgValue(a) { + return $.isFunction(a) ? null : ($.type(a) === "undefined" ? null : a); + } + + // hubProxy + function hubProxy(hubConnection, hubName) { + /// + /// Creates a new proxy object for the given hub connection that can be used to invoke + /// methods on server hubs and handle client method invocation requests from the server. + /// + return new hubProxy.fn.init(hubConnection, hubName); + } + + hubProxy.fn = hubProxy.prototype = { + init: function (connection, hubName) { + this.state = {}; + this.connection = connection; + this.hubName = hubName; + this.subscribed = false; + }, + + on: function (eventName, callback) { + /// Wires up a callback to be invoked when a invocation request is received from the server hub. + /// The name of the hub event to register the callback for. + /// The callback to be invoked. + var self = this; + + // Normalize the event name to lowercase + eventName = eventName.toLowerCase(); + + $(self).bind(eventNamespace + eventName, function (e, data) { + callback.apply(self, data); + }); + self.subscribed = true; + return self; + }, + + invoke: function (methodName) { + /// Invokes a server hub method with the given arguments. + /// The name of the server hub method. + + var self = this, + args = $.makeArray(arguments).slice(1), + userCallback = args[args.length - 1], // last argument + methodArgs = $.type(userCallback) === "function" ? args.slice(0, args.length - 1) /* all but last */ : args, + argValues = methodArgs.map(getArgValue), + data = { hub: self.hubName, method: methodName, args: argValues, state: self.state, id: callbackId }, + d = $.Deferred(), + callback = function (result) { + // Update the hub state + $.extend(this.state, result.State); + + if (result.Error) { + // Server hub method threw an exception, log it & reject the deferred + if (result.StackTrace) { + self.connection.log(result.Error + "\n" + result.StackTrace); + } + d.rejectWith(self, [result.Error]); + } else { + // Server invocation succeeded, invoke any user callback & resolve the deferred + if ($.type(userCallback) === "function") { + userCallback.call(self, result.Result); + } + d.resolveWith(self, [result.Result]); + } + }; + + callbacks[callbackId.toString()] = { scope: self, method: callback }; + callbackId += 1; + self.connection.send(window.JSON.stringify(data)); + + return d.promise(); + } + }; + + hubProxy.fn.init.prototype = hubProxy.fn; + + + // hubConnection + function hubConnection(url, options) { + /// Creates a new hub connection. + /// [Optional] The hub route url, defaults to "/signalr". + /// [Optional] Settings to use when creating the hubConnection. + var settings = { + qs: null, + logging: false, + useDefaultPath : true + }; + + $.extend(settings, options); + + if (!url || settings.useDefaultPath) { + url = (url || "") + "/signalr"; + } + return new hubConnection.fn.init(url, settings); + } + + hubConnection.fn = hubConnection.prototype = $.connection(); + + hubConnection.fn.init = function (url, options) { + var settings = { + qs: null, + logging: false, + useDefaultPath: true + }, + connection = this; + + $.extend(settings, options); + + // Call the base constructor + $.signalR.fn.init.call(connection, url, settings.qs, settings.logging); + + // Object to store hub proxies for this connection + connection.proxies = {}; + + // Wire up the sending handler + connection.sending(function () { + // Set the connection's data object with all the hub proxies with active subscriptions. + // These proxies will receive notifications from the server. + var subscribedHubs = []; + + $.each(this.proxies, function (key) { + if (this.subscribed) { + subscribedHubs.push({ name: key }); + } + }); + + this.data = window.JSON.stringify(subscribedHubs); + }); + + // Wire up the received handler + connection.received(function (data) { + var proxy, dataCallbackId, callback, hubName, eventName; + if (!data) { + return; + } + + if (typeof (data.Id) !== "undefined") { + // We received the return value from a server method invocation, look up callback by id and call it + dataCallbackId = data.Id.toString(); + callback = callbacks[dataCallbackId]; + if (callback) { + // Delete the callback from the proxy + callbacks[dataCallbackId] = null; + delete callbacks[dataCallbackId]; + + // Invoke the callback + callback.method.call(callback.scope, data); + } + } else { + // We received a client invocation request, i.e. broadcast from server hub + connection.log("Triggering client hub event '" + data.Method + "' on hub '" + data.Hub + "'."); + + // Normalize the names to lowercase + hubName = data.Hub.toLowerCase(); + eventName = data.Method.toLowerCase(); + + // Trigger the local invocation event + proxy = this.proxies[hubName]; + + // Update the hub state + $.extend(proxy.state, data.State); + $(proxy).trigger(eventNamespace + eventName, [data.Args]); + } + }); + }; + + hubConnection.fn.createProxy = function (hubName) { + /// + /// Creates a new proxy object for the given hub connection that can be used to invoke + /// methods on server hubs and handle client method invocation requests from the server. + /// + /// + /// The name of the hub on the server to create the proxy for. + /// + + // Normalize the name to lowercase + hubName = hubName.toLowerCase(); + + var proxy = this.proxies[hubName]; + if (!proxy) { + proxy = hubProxy(this, hubName); + this.proxies[hubName] = proxy; + } + return proxy; + }; + + hubConnection.fn.init.prototype = hubConnection.fn; + + $.hubConnection = hubConnection; + +} (window.jQuery, window)); + diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQuery-SignalR.js.bundle b/Disco.Web/ClientSource/Scripts/Modules/jQuery-SignalR.js.bundle index 9665d72c..71a7e2cb 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQuery-SignalR.js.bundle +++ b/Disco.Web/ClientSource/Scripts/Modules/jQuery-SignalR.js.bundle @@ -1,4 +1,4 @@ - - - /ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-0.5.3.js + + + /ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-0.5.3.js \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQuery-SignalR.min.js b/Disco.Web/ClientSource/Scripts/Modules/jQuery-SignalR.min.js index a5608b23..528b3939 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQuery-SignalR.min.js +++ b/Disco.Web/ClientSource/Scripts/Modules/jQuery-SignalR.min.js @@ -1,2 +1,2 @@ -(function(n,t){"use strict";if(typeof n!="function")throw"SignalR: jQuery not found. Please ensure jQuery is referenced before the SignalR.js file.";if(!t.JSON)throw"SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.";var i,e,o=!1,f=n(t),r={onStart:"onStart",onStarting:"onStarting",onSending:"onSending",onReceived:"onReceived",onError:"onError",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},s=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},h=function(i){var r;return(i=n.trim(i),i.indexOf("http")!==0)?!1:(r=t.document.createElement("a"),r.href=i,r.protocol+r.host!==t.location.protocol+t.location.host)},u=function(t,i,u){return i===t.state?(n(t).trigger(r.onStateChanged,[{oldState:t.state,newState:u}]),t.state=u,!0):!1},c=function(n){return n.state===i.connectionState.disconnected};i=function(n,t,r){return new i.fn.init(n,t,r)},i.events=r,i.changeState=u,i.isDisconnecting=c,i.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4},i.hub={start:function(){throw"SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. ."; - } - }; - - _pageWindow.load(function () { _pageLoaded = true; }); - - signalR.fn = signalR.prototype = { - init: function (url, qs, logging) { - this.url = url; - this.qs = qs; - if (typeof (logging) === "boolean") { - this.logging = logging; - } - }, - - ajaxDataType: "json", - - logging: false, - - state: signalR.connectionState.disconnected, - - reconnectDelay: 2000, - - start: function (options, callback) { - /// Starts the connection - /// Options map - /// A callback function to execute when the connection has started - var connection = this, - config = { - waitForPageLoad: true, - transport: "auto", - jsonp: false - }, - initialize, - deferred = connection.deferral || $.Deferred(),// Check to see if there is a pre-existing deferral that's being built on, if so we want to keep using it - parser = window.document.createElement("a"); - - if ($.type(options) === "function") { - // Support calling with single callback parameter - callback = options; - } else if ($.type(options) === "object") { - $.extend(config, options); - if ($.type(config.callback) === "function") { - callback = config.callback; - } - } - - // Check to see if start is being called prior to page load - // If waitForPageLoad is true we then want to re-direct function call to the window load event - if (!_pageLoaded && config.waitForPageLoad === true) { - _pageWindow.load(function () { - connection.deferral = deferred; - connection.start(options, callback); - }); - return deferred.promise(); - } - - if (changeState(connection, - signalR.connectionState.disconnected, - signalR.connectionState.connecting) === false) { - // Already started, just return - deferred.resolve(connection); - return deferred.promise(); - } - - // Resolve the full url - parser.href = connection.url; - if (!parser.protocol || parser.protocol === ":") { - connection.protocol = window.document.location.protocol; - connection.host = window.document.location.host; - connection.baseUrl = connection.protocol + "//" + connection.host; - } - else { - connection.protocol = parser.protocol; - connection.host = parser.host; - connection.baseUrl = parser.protocol + "//" + parser.host; - } - - // Set the websocket protocol - connection.wsProtocol = connection.protocol === "https:" ? "wss://" : "ws://"; - - if (isCrossDomain(connection.url)) { - connection.log("Auto detected cross domain url."); - - if (config.transport === "auto") { - // If you didn't say you wanted to use jsonp, determine if it's your only choice - // i.e. if your browser doesn't supports CORS - if (!config.jsonp) { - config.jsonp = !$.support.cors; - - if (config.jsonp) { - connection.log("Using jsonp because this browser doesn't support CORS"); - } - } - - // If we're using jsonp thn just change to longpolling - if (config.jsonp === true) { - config.transport = "longPolling"; - } - else { - // Otherwise try webSockets and longPolling since SSE doesn't support CORS - // TODO: Support XDM with foreverFrame - config.transport = ["webSockets", "longPolling"]; - } - } - } - - connection.ajaxDataType = config.jsonp ? "jsonp" : "json"; - - $(connection).bind(events.onStart, function (e, data) { - if ($.type(callback) === "function") { - callback.call(connection); - } - deferred.resolve(connection); - }); - - initialize = function (transports, index) { - index = index || 0; - if (index >= transports.length) { - if (!connection.transport) { - // No transport initialized successfully - $(connection).trigger(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); - deferred.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); - // Stop the connection if it has connected and move it into the disconnected state - connection.stop(); - } - return; - } - - var transportName = transports[index], - transport = $.type(transportName) === "object" ? transportName : signalR.transports[transportName]; - - if (transportName.indexOf("_") === 0) { - // Private member - initialize(transports, index + 1); - return; - } - - transport.start(connection, function () { // success - connection.transport = transport; - - changeState(connection, - signalR.connectionState.connecting, - signalR.connectionState.connected); - - $(connection).trigger(events.onStart); - - _pageWindow.unload(function () { // failure - connection.stop(false /* async */); - }); - - }, function () { - initialize(transports, index + 1); - }); - }; - - var url = connection.url + "/negotiate"; - connection.log("Negotiating with '" + url + "'."); - $.ajax({ - url: url, - global: false, - cache: false, - type: "GET", - data: {}, - dataType: connection.ajaxDataType, - error: function (error) { - $(connection).trigger(events.onError, [error.responseText]); - deferred.reject("SignalR: Error during negotiation request: " + error.responseText); - // Stop the connection if negotiate failed - connection.stop(); - }, - success: function (res) { - connection.appRelativeUrl = res.Url; - connection.id = res.ConnectionId; - connection.webSocketServerUrl = res.WebSocketServerUrl; - - if (!res.ProtocolVersion || res.ProtocolVersion !== "1.0") { - $(connection).trigger(events.onError, "SignalR: Incompatible protocol version."); - deferred.reject("SignalR: Incompatible protocol version."); - return; - } - - $(connection).trigger(events.onStarting); - - var transports = [], - supportedTransports = []; - - $.each(signalR.transports, function (key) { - if (key === "webSockets" && !res.TryWebSockets) { - // Server said don't even try WebSockets, but keep processing the loop - return true; - } - supportedTransports.push(key); - }); - - if ($.isArray(config.transport)) { - // ordered list provided - $.each(config.transport, function () { - var transport = this; - if ($.type(transport) === "object" || ($.type(transport) === "string" && $.inArray("" + transport, supportedTransports) >= 0)) { - transports.push($.type(transport) === "string" ? "" + transport : transport); - } - }); - } else if ($.type(config.transport) === "object" || - $.inArray(config.transport, supportedTransports) >= 0) { - // specific transport provided, as object or a named transport, e.g. "longPolling" - transports.push(config.transport); - } else { // default "auto" - transports = supportedTransports; - } - initialize(transports); - } - }); - - return deferred.promise(); - }, - - starting: function (callback) { - /// Adds a callback that will be invoked before the connection is started - /// A callback function to execute when the connection is starting - /// - var connection = this, - $connection = $(connection); - - $connection.bind(events.onStarting, function (e, data) { - callback.call(connection); - // Unbind immediately, we don't want to call this callback again - $connection.unbind(events.onStarting); - }); - - return connection; - }, - - send: function (data) { - /// Sends data over the connection - /// The data to send over the connection - /// - var connection = this; - - if (connection.state === signalR.connectionState.disconnected) { - // Connection hasn't been started yet - throw "SignalR: Connection must be started before data can be sent. Call .start() before .send()"; - } - - if (connection.state === signalR.connectionState.connecting) { - // Connection hasn't been started yet - throw "SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started."; - } - - connection.transport.send(connection, data); - // REVIEW: Should we return deferred here? - return connection; - }, - - sending: function (callback) { - /// Adds a callback that will be invoked before anything is sent over the connection - /// A callback function to execute before each time data is sent on the connection - /// - var connection = this; - $(connection).bind(events.onSending, function (e, data) { - callback.call(connection); - }); - return connection; - }, - - received: function (callback) { - /// Adds a callback that will be invoked after anything is received over the connection - /// A callback function to execute when any data is received on the connection - /// - var connection = this; - $(connection).bind(events.onReceived, function (e, data) { - callback.call(connection, data); - }); - return connection; - }, - - stateChanged: function (callback) { - /// Adds a callback that will be invoked when the connection state changes - /// A callback function to execute when the connection state changes - /// - var connection = this; - $(connection).bind(events.onStateChanged, function (e, data) { - callback.call(connection, data); - }); - return connection; - }, - - error: function (callback) { - /// Adds a callback that will be invoked after an error occurs with the connection - /// A callback function to execute when an error occurs on the connection - /// - var connection = this; - $(connection).bind(events.onError, function (e, data) { - callback.call(connection, data); - }); - return connection; - }, - - disconnected: function (callback) { - /// Adds a callback that will be invoked when the client disconnects - /// A callback function to execute when the connection is broken - /// - var connection = this; - $(connection).bind(events.onDisconnect, function (e, data) { - callback.call(connection); - }); - return connection; - }, - - reconnected: function (callback) { - /// Adds a callback that will be invoked when the underlying transport reconnects - /// A callback function to execute when the connection is restored - /// - var connection = this; - $(connection).bind(events.onReconnect, function (e, data) { - callback.call(connection); - }); - return connection; - }, - - stop: function (async) { - /// Stops listening - /// - var connection = this; - - if (connection.state === signalR.connectionState.disconnected) { - return; - } - - try { - if (connection.transport) { - connection.transport.abort(connection, async); - connection.transport.stop(connection); - connection.transport = null; - } - - // Trigger the disconnect event - $(connection).trigger(events.onDisconnect); - - delete connection.messageId; - delete connection.groups; - } - finally { - changeState(connection, connection.state, signalR.connectionState.disconnected); - } - - return connection; - }, - - log: function (msg) { - log(msg, this.logging); - } - }; - - signalR.fn.init.prototype = signalR.fn; - - signalR.noConflict = function () { - /// Reinstates the original value of $.connection and returns the signalR object for manual assignment - /// - if ($.connection === signalR) { - $.connection = _connection; - } - return signalR; - }; - - if ($.connection) { - _connection = $.connection; - } - - $.connection = $.signalR = signalR; - -}(window.jQuery, window)); -/* jquery.signalR.transports.common.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events; - - signalR.transports = {}; - - signalR.transports._logic = { - addQs: function (url, connection) { - if (!connection.qs) { - return url; - } - - if (typeof (connection.qs) === "object") { - return url + "&" + $.param(connection.qs); - } - - if (typeof (connection.qs) === "string") { - return url + "&" + connection.qs; - } - - return url + "&" + window.escape(connection.qs.toString()); - }, - - getUrl: function (connection, transport, reconnecting, appendReconnectUrl) { - /// Gets the url for making a GET based connect request - var baseUrl = transport === "webSockets" ? "" : connection.baseUrl, - url = baseUrl + connection.appRelativeUrl, - qs = "transport=" + transport + "&connectionId=" + window.escape(connection.id); - - if (connection.data) { - qs += "&connectionData=" + window.escape(connection.data); - } - - if (!reconnecting) { - url = url + "/connect"; - } else { - if (appendReconnectUrl) { - url = url + "/reconnect"; - } - if (connection.messageId) { - qs += "&messageId=" + connection.messageId; - } - if (connection.groups) { - qs += "&groups=" + window.escape(JSON.stringify(connection.groups)); - } - } - url += "?" + qs; - url = this.addQs(url, connection); - url += "&tid=" + Math.floor(Math.random() * 11); - return url; - }, - - ajaxSend: function (connection, data) { - var url = connection.url + "/send" + "?transport=" + connection.transport.name + "&connectionId=" + window.escape(connection.id); - url = this.addQs(url, connection); - return $.ajax({ - url: url, - global: false, - type: "POST", - dataType: connection.ajaxDataType, - data: { - data: data - }, - success: function (result) { - if (result) { - $(connection).trigger(events.onReceived, [result]); - } - }, - error: function (errData, textStatus) { - if (textStatus === "abort" || - (textStatus === "parsererror" && connection.ajaxDataType === "jsonp")) { - // The parsererror happens for sends that don't return any data, and hence - // don't write the jsonp callback to the response. This is harder to fix on the server - // so just hack around it on the client for now. - return; - } - $(connection).trigger(events.onError, [errData]); - } - }); - }, - - ajaxAbort: function (connection, async) { - if (typeof (connection.transport) === "undefined") { - return; - } - - // Async by default unless explicitly overidden - async = typeof async === "undefined" ? true : async; - - var url = connection.url + "/abort" + "?transport=" + connection.transport.name + "&connectionId=" + window.escape(connection.id); - url = this.addQs(url, connection); - $.ajax({ - url: url, - async: async, - timeout: 1000, - global: false, - type: "POST", - dataType: connection.ajaxDataType, - data: {} - }); - - connection.log("Fired ajax abort async = " + async); - }, - - processMessages: function (connection, data) { - var $connection = $(connection); - - if (!data) { - return; - } - - if (data.Disconnect) { - connection.log("Disconnect command received from server"); - - // Disconnected by the server - connection.stop(); - return; - } - - if (data.Messages) { - $.each(data.Messages, function () { - try { - $connection.trigger(events.onReceived, [this]); - } - catch (e) { - connection.log("Error raising received " + e); - $(connection).trigger(events.onError, [e]); - } - }); - } - - if (data.MessageId) { - connection.messageId = data.MessageId; - } - - if (data.TransportData) { - connection.groups = data.TransportData.Groups; - } - }, - - foreverFrame: { - count: 0, - connections: {} - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.transports.webSockets.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - transportLogic = signalR.transports._logic; - - signalR.transports.webSockets = { - name: "webSockets", - - send: function (connection, data) { - connection.socket.send(data); - }, - - start: function (connection, onSuccess, onFailed) { - var url, - opened = false, - that = this, - reconnecting = !onSuccess, - $connection = $(connection); - - if (window.MozWebSocket) { - window.WebSocket = window.MozWebSocket; - } - - if (!window.WebSocket) { - onFailed(); - return; - } - - if (!connection.socket) { - if (connection.webSocketServerUrl) { - url = connection.webSocketServerUrl; - } - else { - url = connection.wsProtocol + connection.host; - } - - // Build the url - $(connection).trigger(events.onSending); - - url += transportLogic.getUrl(connection, this.name, reconnecting); - - connection.log("Connecting to websocket endpoint '" + url + "'"); - connection.socket = new window.WebSocket(url); - connection.socket.onopen = function () { - opened = true; - connection.log("Websocket opened"); - if (onSuccess) { - onSuccess(); - } - else { - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - $connection.trigger(events.onReconnect); - } - } - }; - - connection.socket.onclose = function (event) { - if (!opened) { - if (onFailed) { - onFailed(); - } - else if (reconnecting) { - that.reconnect(connection); - } - return; - } - else if (typeof event.wasClean !== "undefined" && event.wasClean === false) { - // Ideally this would use the websocket.onerror handler (rather than checking wasClean in onclose) but - // I found in some circumstances Chrome won't call onerror. This implementation seems to work on all browsers. - $(connection).trigger(events.onError, [event.reason]); - connection.log("Unclean disconnect from websocket." + event.reason); - } - else { - connection.log("Websocket closed"); - } - - that.reconnect(connection); - }; - - connection.socket.onmessage = function (event) { - var data = window.JSON.parse(event.data), - $connection; - if (data) { - $connection = $(connection); - - if (data.Messages) { - transportLogic.processMessages(connection, data); - } else { - $connection.trigger(events.onReceived, [data]); - } - } - }; - } - }, - - reconnect: function (connection) { - var that = this; - window.setTimeout(function () { - that.stop(connection); - - if (connection.state === signalR.connectionState.reconnecting || - changeState(connection, - signalR.connectionState.connected, - signalR.connectionState.reconnecting) === true) { - - connection.log("Websocket reconnecting"); - that.start(connection); - } - }, - connection.reconnectDelay); - }, - - stop: function (connection) { - if (connection.socket !== null) { - connection.log("Closing the Websocket"); - connection.socket.close(); - connection.socket = null; - } - }, - - abort: function (connection) { - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.transports.serverSentEvents.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - transportLogic = signalR.transports._logic; - - signalR.transports.serverSentEvents = { - name: "serverSentEvents", - - timeOut: 3000, - - start: function (connection, onSuccess, onFailed) { - var that = this, - opened = false, - $connection = $(connection), - reconnecting = !onSuccess, - url, - connectTimeOut; - - if (connection.eventSource) { - connection.log("The connection already has an event source. Stopping it."); - connection.stop(); - } - - if (!window.EventSource) { - if (onFailed) { - connection.log("This browser doesn't support SSE."); - onFailed(); - } - return; - } - - $connection.trigger(events.onSending); - - url = transportLogic.getUrl(connection, this.name, reconnecting); - - try { - connection.log("Attempting to connect to SSE endpoint '" + url + "'"); - connection.eventSource = new window.EventSource(url); - } - catch (e) { - connection.log("EventSource failed trying to connect with error " + e.Message); - if (onFailed) { - // The connection failed, call the failed callback - onFailed(); - } - else { - $connection.trigger(events.onError, [e]); - if (reconnecting) { - // If we were reconnecting, rather than doing initial connect, then try reconnect again - that.reconnect(connection); - } - } - return; - } - - // After connecting, if after the specified timeout there's no response stop the connection - // and raise on failed - connectTimeOut = window.setTimeout(function () { - if (opened === false) { - connection.log("EventSource timed out trying to connect"); - connection.log("EventSource readyState: " + connection.eventSource.readyState); - - if (!reconnecting) { - that.stop(connection); - } - - if (reconnecting) { - // If we're reconnecting and the event source is attempting to connect, - // don't keep retrying. This causes duplicate connections to spawn. - if (connection.eventSource.readyState !== window.EventSource.CONNECTING && - connection.eventSource.readyState !== window.EventSource.OPEN) { - // If we were reconnecting, rather than doing initial connect, then try reconnect again - that.reconnect(connection); - } - } else if (onFailed) { - onFailed(); - } - } - }, - that.timeOut); - - connection.eventSource.addEventListener("open", function (e) { - connection.log("EventSource connected"); - - if (connectTimeOut) { - window.clearTimeout(connectTimeOut); - } - - if (opened === false) { - opened = true; - - if (onSuccess) { - onSuccess(); - } - - if (reconnecting) { - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - $connection.trigger(events.onReconnect); - } - } - } - }, false); - - connection.eventSource.addEventListener("message", function (e) { - // process messages - if (e.data === "initialized") { - return; - } - transportLogic.processMessages(connection, window.JSON.parse(e.data)); - }, false); - - connection.eventSource.addEventListener("error", function (e) { - if (!opened) { - if (onFailed) { - onFailed(); - } - return; - } - - connection.log("EventSource readyState: " + connection.eventSource.readyState); - - if (e.eventPhase === window.EventSource.CLOSED) { - // We don't use the EventSource's native reconnect function as it - // doesn't allow us to change the URL when reconnecting. We need - // to change the URL to not include the /connect suffix, and pass - // the last message id we received. - connection.log("EventSource reconnecting due to the server connection ending"); - that.reconnect(connection); - } else { - // connection error - connection.log("EventSource error"); - $connection.trigger(events.onError); - } - }, false); - }, - - reconnect: function (connection) { - var that = this; - window.setTimeout(function () { - that.stop(connection); - - if (connection.state === signalR.connectionState.reconnecting || - changeState(connection, - signalR.connectionState.connected, - signalR.connectionState.reconnecting) === true) { - connection.log("EventSource reconnecting"); - that.start(connection); - } - - }, connection.reconnectDelay); - }, - - send: function (connection, data) { - transportLogic.ajaxSend(connection, data); - }, - - stop: function (connection) { - if (connection && connection.eventSource) { - connection.log("EventSource calling close()"); - connection.eventSource.close(); - connection.eventSource = null; - delete connection.eventSource; - } - }, - abort: function (connection, async) { - transportLogic.ajaxAbort(connection, async); - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.transports.foreverFrame.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - transportLogic = signalR.transports._logic; - - signalR.transports.foreverFrame = { - name: "foreverFrame", - - timeOut: 3000, - - start: function (connection, onSuccess, onFailed) { - var that = this, - frameId = (transportLogic.foreverFrame.count += 1), - url, - connectTimeOut, - frame = $(""); - - if (window.EventSource) { - // If the browser supports SSE, don't use Forever Frame - if (onFailed) { - connection.log("This brower supports SSE, skipping Forever Frame."); - onFailed(); - } - return; - } - - $(connection).trigger(events.onSending); - - // Build the url - url = transportLogic.getUrl(connection, this.name); - url += "&frameId=" + frameId; - - frame.prop("src", url); - transportLogic.foreverFrame.connections[frameId] = connection; - - connection.log("Binding to iframe's readystatechange event."); - frame.bind("readystatechange", function () { - if ($.inArray(this.readyState, ["loaded", "complete"]) >= 0) { - connection.log("Forever frame iframe readyState changed to " + this.readyState + ", reconnecting"); - - that.reconnect(connection); - } - }); - - connection.frame = frame[0]; - connection.frameId = frameId; - - if (onSuccess) { - connection.onSuccess = onSuccess; - } - - $("body").append(frame); - - // After connecting, if after the specified timeout there's no response stop the connection - // and raise on failed - // REVIEW: Why is connectTimeOut set here and never used again? - connectTimeOut = window.setTimeout(function () { - if (connection.onSuccess) { - connection.log("Failed to connect using forever frame source, it timed out after " + that.timeOut + "ms."); - that.stop(connection); - - if (onFailed) { - onFailed(); - } - } - }, that.timeOut); - }, - - reconnect: function (connection) { - var that = this; - window.setTimeout(function () { - if (!connection.frame) { - return; - } - - if (connection.state === signalR.connectionState.reconnecting || - changeState(connection, - signalR.connectionState.connected, - signalR.connectionState.reconnecting) === true) { - - var frame = connection.frame, - src = transportLogic.getUrl(connection, that.name, true) + "&frameId=" + connection.frameId; - connection.log("Upating iframe src to '" + src + "'."); - frame.src = src; - } - - }, connection.reconnectDelay); - }, - - send: function (connection, data) { - transportLogic.ajaxSend(connection, data); - }, - - receive: function (connection, data) { - var cw; - transportLogic.processMessages(connection, data); - // Delete the script & div elements - connection.frameMessageCount = (connection.frameMessageCount || 0) + 1; - if (connection.frameMessageCount > 50) { - connection.frameMessageCount = 0; - cw = connection.frame.contentWindow || connection.frame.contentDocument; - if (cw && cw.document) { - $("body", cw.document).empty(); - } - } - }, - - stop: function (connection) { - var cw = null; - if (connection.frame) { - if (connection.frame.stop) { - connection.frame.stop(); - } else { - cw = connection.frame.contentWindow || connection.frame.contentDocument; - if (cw.document && cw.document.execCommand) { - cw.document.execCommand("Stop"); - } - } - $(connection.frame).remove(); - delete transportLogic.foreverFrame.connections[connection.frameId]; - connection.frame = null; - connection.frameId = null; - delete connection.frame; - delete connection.frameId; - connection.log("Stopping forever frame"); - } - }, - - abort: function (connection, async) { - transportLogic.ajaxAbort(connection, async); - }, - - getConnection: function (id) { - return transportLogic.foreverFrame.connections[id]; - }, - - started: function (connection) { - if (connection.onSuccess) { - connection.onSuccess(); - connection.onSuccess = null; - delete connection.onSuccess; - } - else { - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - // If there's no onSuccess handler we assume this is a reconnect - $(connection).trigger(events.onReconnect); - } - } - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.transports.longPolling.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - isDisconnecting = $.signalR.isDisconnecting, - transportLogic = signalR.transports._logic; - - signalR.transports.longPolling = { - name: "longPolling", - - reconnectDelay: 3000, - - start: function (connection, onSuccess, onFailed) { - /// Starts the long polling connection - /// The SignalR connection to start - var that = this, - initialConnectFired = false; - - if (connection.pollXhr) { - connection.log("Polling xhr requests already exists, aborting."); - connection.stop(); - } - - connection.messageId = null; - - window.setTimeout(function () { - (function poll(instance, raiseReconnect) { - $(instance).trigger(events.onSending); - - var messageId = instance.messageId, - connect = (messageId === null), - reconnecting = !connect, - url = transportLogic.getUrl(instance, that.name, reconnecting, raiseReconnect), - reconnectTimeOut = null, - reconnectFired = false; - - if (reconnecting === true && raiseReconnect === true) { - if (connection.state !== signalR.connectionState.reconnecting && - changeState(connection, - signalR.connectionState.connected, - signalR.connectionState.reconnecting) === false) { - return; - } - } - - connection.log("Attempting to connect to '" + url + "' using longPolling."); - instance.pollXhr = $.ajax({ - url: url, - global: false, - cache: false, - type: "GET", - dataType: connection.ajaxDataType, - success: function (data) { - var delay = 0, - timedOutReceived = false; - - if (initialConnectFired === false) { - onSuccess(); - initialConnectFired = true; - } - - if (raiseReconnect === true) { - // Fire the reconnect event if it hasn't been fired as yet - if (reconnectFired === false) { - connection.log("Raising the reconnect event"); - - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - - $(instance).trigger(events.onReconnect); - reconnectFired = true; - } - } - } - - transportLogic.processMessages(instance, data); - if (data && - data.TransportData && - $.type(data.TransportData.LongPollDelay) === "number") { - delay = data.TransportData.LongPollDelay; - } - - if (data && data.TimedOut) { - timedOutReceived = data.TimedOut; - } - - if (data && data.Disconnect) { - return; - } - - if (isDisconnecting(instance) === true) { - return; - } - - if (delay > 0) { - window.setTimeout(function () { - poll(instance, timedOutReceived); - }, delay); - } else { - poll(instance, timedOutReceived); - } - }, - - error: function (data, textStatus) { - if (textStatus === "abort") { - connection.log("Aborted xhr requst."); - return; - } - - connection.log("An error occurred using longPolling. Status = " + textStatus + ". " + data.responseText); - - if (reconnectTimeOut) { - // If the request failed then we clear the timeout so that the - // reconnect event doesn't get fired - window.clearTimeout(reconnectTimeOut); - } - - $(instance).trigger(events.onError, [data.responseText]); - - window.setTimeout(function () { - if (isDisconnecting(instance) === false) { - poll(instance, true); - } - }, connection.reconnectDelay); - } - }); - - if (raiseReconnect === true) { - reconnectTimeOut = window.setTimeout(function () { - if (reconnectFired === false) { - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - - $(instance).trigger(events.onReconnect); - reconnectFired = true; - } - } - }, - that.reconnectDelay); - } - - }(connection)); - - // Now connected - // There's no good way know when the long poll has actually started so - // we assume it only takes around 150ms (max) to start the connection - window.setTimeout(function () { - if (initialConnectFired === false) { - onSuccess(); - initialConnectFired = true; - } - }, 150); - - }, 250); // Have to delay initial poll so Chrome doesn't show loader spinner in tab - }, - - send: function (connection, data) { - transportLogic.ajaxSend(connection, data); - }, - - stop: function (connection) { - /// Stops the long polling connection - /// The SignalR connection to stop - if (connection.pollXhr) { - connection.pollXhr.abort(); - connection.pollXhr = null; - delete connection.pollXhr; - } - }, - - abort: function (connection, async) { - transportLogic.ajaxAbort(connection, async); - } - }; - -}(window.jQuery, window)); -/* jquery.signalR.hubs.js */ -/*global window:false */ -/// - -(function ($, window) { - "use strict"; - - // we use a global id for tracking callbacks so the server doesn't have to send extra info like hub name - var callbackId = 0, - callbacks = {}, - eventNamespace = "proxy."; - - // Array.prototype.map - if (!Array.prototype.hasOwnProperty("map")) { - Array.prototype.map = function (fun, thisp) { - var arr = this, - i, - length = arr.length, - result = []; - for (i = 0; i < length; i += 1) { - if (arr.hasOwnProperty(i)) { - result[i] = fun.call(thisp, arr[i], i, arr); - } - } - return result; - }; - } - - function getArgValue(a) { - return $.isFunction(a) ? null : ($.type(a) === "undefined" ? null : a); - } - - // hubProxy - function hubProxy(hubConnection, hubName) { - /// - /// Creates a new proxy object for the given hub connection that can be used to invoke - /// methods on server hubs and handle client method invocation requests from the server. - /// - return new hubProxy.fn.init(hubConnection, hubName); - } - - hubProxy.fn = hubProxy.prototype = { - init: function (connection, hubName) { - this.state = {}; - this.connection = connection; - this.hubName = hubName; - this.subscribed = false; - }, - - on: function (eventName, callback) { - /// Wires up a callback to be invoked when a invocation request is received from the server hub. - /// The name of the hub event to register the callback for. - /// The callback to be invoked. - var self = this; - - // Normalize the event name to lowercase - eventName = eventName.toLowerCase(); - - $(self).bind(eventNamespace + eventName, function (e, data) { - callback.apply(self, data); - }); - self.subscribed = true; - return self; - }, - - invoke: function (methodName) { - /// Invokes a server hub method with the given arguments. - /// The name of the server hub method. - - var self = this, - args = $.makeArray(arguments).slice(1), - userCallback = args[args.length - 1], // last argument - methodArgs = $.type(userCallback) === "function" ? args.slice(0, args.length - 1) /* all but last */ : args, - argValues = methodArgs.map(getArgValue), - data = { hub: self.hubName, method: methodName, args: argValues, state: self.state, id: callbackId }, - d = $.Deferred(), - callback = function (result) { - // Update the hub state - $.extend(this.state, result.State); - - if (result.Error) { - // Server hub method threw an exception, log it & reject the deferred - if (result.StackTrace) { - self.connection.log(result.Error + "\n" + result.StackTrace); - } - d.rejectWith(self, [result.Error]); - } else { - // Server invocation succeeded, invoke any user callback & resolve the deferred - if ($.type(userCallback) === "function") { - userCallback.call(self, result.Result); - } - d.resolveWith(self, [result.Result]); - } - }; - - callbacks[callbackId.toString()] = { scope: self, method: callback }; - callbackId += 1; - self.connection.send(window.JSON.stringify(data)); - - return d.promise(); - } - }; - - hubProxy.fn.init.prototype = hubProxy.fn; - - - // hubConnection - function hubConnection(url, options) { - /// Creates a new hub connection. - /// [Optional] The hub route url, defaults to "/signalr". - /// [Optional] Settings to use when creating the hubConnection. - var settings = { - qs: null, - logging: false, - useDefaultPath : true - }; - - $.extend(settings, options); - - if (!url || settings.useDefaultPath) { - url = (url || "") + "/signalr"; - } - return new hubConnection.fn.init(url, settings); - } - - hubConnection.fn = hubConnection.prototype = $.connection(); - - hubConnection.fn.init = function (url, options) { - var settings = { - qs: null, - logging: false, - useDefaultPath: true - }, - connection = this; - - $.extend(settings, options); - - // Call the base constructor - $.signalR.fn.init.call(connection, url, settings.qs, settings.logging); - - // Object to store hub proxies for this connection - connection.proxies = {}; - - // Wire up the sending handler - connection.sending(function () { - // Set the connection's data object with all the hub proxies with active subscriptions. - // These proxies will receive notifications from the server. - var subscribedHubs = []; - - $.each(this.proxies, function (key) { - if (this.subscribed) { - subscribedHubs.push({ name: key }); - } - }); - - this.data = window.JSON.stringify(subscribedHubs); - }); - - // Wire up the received handler - connection.received(function (data) { - var proxy, dataCallbackId, callback, hubName, eventName; - if (!data) { - return; - } - - if (typeof (data.Id) !== "undefined") { - // We received the return value from a server method invocation, look up callback by id and call it - dataCallbackId = data.Id.toString(); - callback = callbacks[dataCallbackId]; - if (callback) { - // Delete the callback from the proxy - callbacks[dataCallbackId] = null; - delete callbacks[dataCallbackId]; - - // Invoke the callback - callback.method.call(callback.scope, data); - } - } else { - // We received a client invocation request, i.e. broadcast from server hub - connection.log("Triggering client hub event '" + data.Method + "' on hub '" + data.Hub + "'."); - - // Normalize the names to lowercase - hubName = data.Hub.toLowerCase(); - eventName = data.Method.toLowerCase(); - - // Trigger the local invocation event - proxy = this.proxies[hubName]; - - // Update the hub state - $.extend(proxy.state, data.State); - $(proxy).trigger(eventNamespace + eventName, [data.Args]); - } - }); - }; - - hubConnection.fn.createProxy = function (hubName) { - /// - /// Creates a new proxy object for the given hub connection that can be used to invoke - /// methods on server hubs and handle client method invocation requests from the server. - /// - /// - /// The name of the hub on the server to create the proxy for. - /// - - // Normalize the name to lowercase - hubName = hubName.toLowerCase(); - - var proxy = this.proxies[hubName]; - if (!proxy) { - proxy = hubProxy(this, hubName); - this.proxies[hubName] = proxy; - } - return proxy; - }; - - hubConnection.fn.init.prototype = hubConnection.fn; - - $.hubConnection = hubConnection; - -} (window.jQuery, window)); +/* jquery.signalR.core.js */ +/*global window:false */ +/*! + * SignalR JavaScript Library v0.5.3 + * http://signalr.net/ + * + * Copyright David Fowler and Damian Edwards 2012 + * Licensed under the MIT. + * https://github.com/SignalR/SignalR/blob/master/LICENSE.md + */ + +/// +(function ($, window) { + "use strict"; + + if (typeof ($) !== "function") { + // no jQuery! + throw "SignalR: jQuery not found. Please ensure jQuery is referenced before the SignalR.js file."; + } + + if (!window.JSON) { + // no JSON! + throw "SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8."; + } + + var signalR, + _connection, + _pageLoaded = false, + _pageWindow = $(window), + + events = { + onStart: "onStart", + onStarting: "onStarting", + onSending: "onSending", + onReceived: "onReceived", + onError: "onError", + onReconnect: "onReconnect", + onStateChanged: "onStateChanged", + onDisconnect: "onDisconnect" + }, + + log = function (msg, logging) { + if (logging === false) { + return; + } + var m; + if (typeof (window.console) === "undefined") { + return; + } + m = "[" + new Date().toTimeString() + "] SignalR: " + msg; + if (window.console.debug) { + window.console.debug(m); + } else if (window.console.log) { + window.console.log(m); + } + }, + + isCrossDomain = function (url) { + var link; + + url = $.trim(url); + if (url.indexOf("http") !== 0) { + return false; + } + + // Create an anchor tag. + link = window.document.createElement("a"); + link.href = url; + + return link.protocol + link.host !== window.location.protocol + window.location.host; + }, + + changeState = function (connection, expectedState, newState) { + if (expectedState === connection.state) { + // REVIEW: Should event fire before or after the state change actually occurs? + $(connection).trigger(events.onStateChanged, [{ oldState: connection.state, newState: newState }]); + connection.state = newState; + return true; + } + + return false; + }, + + isDisconnecting = function (connection) { + return connection.state === signalR.connectionState.disconnected; + }; + + signalR = function (url, qs, logging) { + /// Creates a new SignalR connection for the given url + /// The URL of the long polling endpoint + /// + /// [Optional] Custom querystring parameters to add to the connection URL. + /// If an object, every non-function member will be added to the querystring. + /// If a string, it's added to the QS as specified. + /// + /// + /// [Optional] A flag indicating whether connection logging is enabled to the browser + /// console/log. Defaults to false. + /// + + return new signalR.fn.init(url, qs, logging); + }; + + signalR.events = events; + + signalR.changeState = changeState; + + signalR.isDisconnecting = isDisconnecting; + + signalR.connectionState = { + connecting: 0, + connected: 1, + reconnecting: 2, + disconnected: 4 + }; + + signalR.hub = { + start: function () { + // This will get replaced with the real hub connection start method when hubs is referenced correctly + throw "SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. ."; + } + }; + + _pageWindow.load(function () { _pageLoaded = true; }); + + signalR.fn = signalR.prototype = { + init: function (url, qs, logging) { + this.url = url; + this.qs = qs; + if (typeof (logging) === "boolean") { + this.logging = logging; + } + }, + + ajaxDataType: "json", + + logging: false, + + state: signalR.connectionState.disconnected, + + reconnectDelay: 2000, + + start: function (options, callback) { + /// Starts the connection + /// Options map + /// A callback function to execute when the connection has started + var connection = this, + config = { + waitForPageLoad: true, + transport: "auto", + jsonp: false + }, + initialize, + deferred = connection.deferral || $.Deferred(),// Check to see if there is a pre-existing deferral that's being built on, if so we want to keep using it + parser = window.document.createElement("a"); + + if ($.type(options) === "function") { + // Support calling with single callback parameter + callback = options; + } else if ($.type(options) === "object") { + $.extend(config, options); + if ($.type(config.callback) === "function") { + callback = config.callback; + } + } + + // Check to see if start is being called prior to page load + // If waitForPageLoad is true we then want to re-direct function call to the window load event + if (!_pageLoaded && config.waitForPageLoad === true) { + _pageWindow.load(function () { + connection.deferral = deferred; + connection.start(options, callback); + }); + return deferred.promise(); + } + + if (changeState(connection, + signalR.connectionState.disconnected, + signalR.connectionState.connecting) === false) { + // Already started, just return + deferred.resolve(connection); + return deferred.promise(); + } + + // Resolve the full url + parser.href = connection.url; + if (!parser.protocol || parser.protocol === ":") { + connection.protocol = window.document.location.protocol; + connection.host = window.document.location.host; + connection.baseUrl = connection.protocol + "//" + connection.host; + } + else { + connection.protocol = parser.protocol; + connection.host = parser.host; + connection.baseUrl = parser.protocol + "//" + parser.host; + } + + // Set the websocket protocol + connection.wsProtocol = connection.protocol === "https:" ? "wss://" : "ws://"; + + if (isCrossDomain(connection.url)) { + connection.log("Auto detected cross domain url."); + + if (config.transport === "auto") { + // If you didn't say you wanted to use jsonp, determine if it's your only choice + // i.e. if your browser doesn't supports CORS + if (!config.jsonp) { + config.jsonp = !$.support.cors; + + if (config.jsonp) { + connection.log("Using jsonp because this browser doesn't support CORS"); + } + } + + // If we're using jsonp thn just change to longpolling + if (config.jsonp === true) { + config.transport = "longPolling"; + } + else { + // Otherwise try webSockets and longPolling since SSE doesn't support CORS + // TODO: Support XDM with foreverFrame + config.transport = ["webSockets", "longPolling"]; + } + } + } + + connection.ajaxDataType = config.jsonp ? "jsonp" : "json"; + + $(connection).bind(events.onStart, function (e, data) { + if ($.type(callback) === "function") { + callback.call(connection); + } + deferred.resolve(connection); + }); + + initialize = function (transports, index) { + index = index || 0; + if (index >= transports.length) { + if (!connection.transport) { + // No transport initialized successfully + $(connection).trigger(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); + deferred.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); + // Stop the connection if it has connected and move it into the disconnected state + connection.stop(); + } + return; + } + + var transportName = transports[index], + transport = $.type(transportName) === "object" ? transportName : signalR.transports[transportName]; + + if (transportName.indexOf("_") === 0) { + // Private member + initialize(transports, index + 1); + return; + } + + transport.start(connection, function () { // success + connection.transport = transport; + + changeState(connection, + signalR.connectionState.connecting, + signalR.connectionState.connected); + + $(connection).trigger(events.onStart); + + _pageWindow.unload(function () { // failure + connection.stop(false /* async */); + }); + + }, function () { + initialize(transports, index + 1); + }); + }; + + var url = connection.url + "/negotiate"; + connection.log("Negotiating with '" + url + "'."); + $.ajax({ + url: url, + global: false, + cache: false, + type: "GET", + data: {}, + dataType: connection.ajaxDataType, + error: function (error) { + $(connection).trigger(events.onError, [error.responseText]); + deferred.reject("SignalR: Error during negotiation request: " + error.responseText); + // Stop the connection if negotiate failed + connection.stop(); + }, + success: function (res) { + connection.appRelativeUrl = res.Url; + connection.id = res.ConnectionId; + connection.webSocketServerUrl = res.WebSocketServerUrl; + + if (!res.ProtocolVersion || res.ProtocolVersion !== "1.0") { + $(connection).trigger(events.onError, "SignalR: Incompatible protocol version."); + deferred.reject("SignalR: Incompatible protocol version."); + return; + } + + $(connection).trigger(events.onStarting); + + var transports = [], + supportedTransports = []; + + $.each(signalR.transports, function (key) { + if (key === "webSockets" && !res.TryWebSockets) { + // Server said don't even try WebSockets, but keep processing the loop + return true; + } + supportedTransports.push(key); + }); + + if ($.isArray(config.transport)) { + // ordered list provided + $.each(config.transport, function () { + var transport = this; + if ($.type(transport) === "object" || ($.type(transport) === "string" && $.inArray("" + transport, supportedTransports) >= 0)) { + transports.push($.type(transport) === "string" ? "" + transport : transport); + } + }); + } else if ($.type(config.transport) === "object" || + $.inArray(config.transport, supportedTransports) >= 0) { + // specific transport provided, as object or a named transport, e.g. "longPolling" + transports.push(config.transport); + } else { // default "auto" + transports = supportedTransports; + } + initialize(transports); + } + }); + + return deferred.promise(); + }, + + starting: function (callback) { + /// Adds a callback that will be invoked before the connection is started + /// A callback function to execute when the connection is starting + /// + var connection = this, + $connection = $(connection); + + $connection.bind(events.onStarting, function (e, data) { + callback.call(connection); + // Unbind immediately, we don't want to call this callback again + $connection.unbind(events.onStarting); + }); + + return connection; + }, + + send: function (data) { + /// Sends data over the connection + /// The data to send over the connection + /// + var connection = this; + + if (connection.state === signalR.connectionState.disconnected) { + // Connection hasn't been started yet + throw "SignalR: Connection must be started before data can be sent. Call .start() before .send()"; + } + + if (connection.state === signalR.connectionState.connecting) { + // Connection hasn't been started yet + throw "SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started."; + } + + connection.transport.send(connection, data); + // REVIEW: Should we return deferred here? + return connection; + }, + + sending: function (callback) { + /// Adds a callback that will be invoked before anything is sent over the connection + /// A callback function to execute before each time data is sent on the connection + /// + var connection = this; + $(connection).bind(events.onSending, function (e, data) { + callback.call(connection); + }); + return connection; + }, + + received: function (callback) { + /// Adds a callback that will be invoked after anything is received over the connection + /// A callback function to execute when any data is received on the connection + /// + var connection = this; + $(connection).bind(events.onReceived, function (e, data) { + callback.call(connection, data); + }); + return connection; + }, + + stateChanged: function (callback) { + /// Adds a callback that will be invoked when the connection state changes + /// A callback function to execute when the connection state changes + /// + var connection = this; + $(connection).bind(events.onStateChanged, function (e, data) { + callback.call(connection, data); + }); + return connection; + }, + + error: function (callback) { + /// Adds a callback that will be invoked after an error occurs with the connection + /// A callback function to execute when an error occurs on the connection + /// + var connection = this; + $(connection).bind(events.onError, function (e, data) { + callback.call(connection, data); + }); + return connection; + }, + + disconnected: function (callback) { + /// Adds a callback that will be invoked when the client disconnects + /// A callback function to execute when the connection is broken + /// + var connection = this; + $(connection).bind(events.onDisconnect, function (e, data) { + callback.call(connection); + }); + return connection; + }, + + reconnected: function (callback) { + /// Adds a callback that will be invoked when the underlying transport reconnects + /// A callback function to execute when the connection is restored + /// + var connection = this; + $(connection).bind(events.onReconnect, function (e, data) { + callback.call(connection); + }); + return connection; + }, + + stop: function (async) { + /// Stops listening + /// + var connection = this; + + if (connection.state === signalR.connectionState.disconnected) { + return; + } + + try { + if (connection.transport) { + connection.transport.abort(connection, async); + connection.transport.stop(connection); + connection.transport = null; + } + + // Trigger the disconnect event + $(connection).trigger(events.onDisconnect); + + delete connection.messageId; + delete connection.groups; + } + finally { + changeState(connection, connection.state, signalR.connectionState.disconnected); + } + + return connection; + }, + + log: function (msg) { + log(msg, this.logging); + } + }; + + signalR.fn.init.prototype = signalR.fn; + + signalR.noConflict = function () { + /// Reinstates the original value of $.connection and returns the signalR object for manual assignment + /// + if ($.connection === signalR) { + $.connection = _connection; + } + return signalR; + }; + + if ($.connection) { + _connection = $.connection; + } + + $.connection = $.signalR = signalR; + +}(window.jQuery, window)); +/* jquery.signalR.transports.common.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events; + + signalR.transports = {}; + + signalR.transports._logic = { + addQs: function (url, connection) { + if (!connection.qs) { + return url; + } + + if (typeof (connection.qs) === "object") { + return url + "&" + $.param(connection.qs); + } + + if (typeof (connection.qs) === "string") { + return url + "&" + connection.qs; + } + + return url + "&" + window.escape(connection.qs.toString()); + }, + + getUrl: function (connection, transport, reconnecting, appendReconnectUrl) { + /// Gets the url for making a GET based connect request + var baseUrl = transport === "webSockets" ? "" : connection.baseUrl, + url = baseUrl + connection.appRelativeUrl, + qs = "transport=" + transport + "&connectionId=" + window.escape(connection.id); + + if (connection.data) { + qs += "&connectionData=" + window.escape(connection.data); + } + + if (!reconnecting) { + url = url + "/connect"; + } else { + if (appendReconnectUrl) { + url = url + "/reconnect"; + } + if (connection.messageId) { + qs += "&messageId=" + connection.messageId; + } + if (connection.groups) { + qs += "&groups=" + window.escape(JSON.stringify(connection.groups)); + } + } + url += "?" + qs; + url = this.addQs(url, connection); + url += "&tid=" + Math.floor(Math.random() * 11); + return url; + }, + + ajaxSend: function (connection, data) { + var url = connection.url + "/send" + "?transport=" + connection.transport.name + "&connectionId=" + window.escape(connection.id); + url = this.addQs(url, connection); + return $.ajax({ + url: url, + global: false, + type: "POST", + dataType: connection.ajaxDataType, + data: { + data: data + }, + success: function (result) { + if (result) { + $(connection).trigger(events.onReceived, [result]); + } + }, + error: function (errData, textStatus) { + if (textStatus === "abort" || + (textStatus === "parsererror" && connection.ajaxDataType === "jsonp")) { + // The parsererror happens for sends that don't return any data, and hence + // don't write the jsonp callback to the response. This is harder to fix on the server + // so just hack around it on the client for now. + return; + } + $(connection).trigger(events.onError, [errData]); + } + }); + }, + + ajaxAbort: function (connection, async) { + if (typeof (connection.transport) === "undefined") { + return; + } + + // Async by default unless explicitly overidden + async = typeof async === "undefined" ? true : async; + + var url = connection.url + "/abort" + "?transport=" + connection.transport.name + "&connectionId=" + window.escape(connection.id); + url = this.addQs(url, connection); + $.ajax({ + url: url, + async: async, + timeout: 1000, + global: false, + type: "POST", + dataType: connection.ajaxDataType, + data: {} + }); + + connection.log("Fired ajax abort async = " + async); + }, + + processMessages: function (connection, data) { + var $connection = $(connection); + + if (!data) { + return; + } + + if (data.Disconnect) { + connection.log("Disconnect command received from server"); + + // Disconnected by the server + connection.stop(); + return; + } + + if (data.Messages) { + $.each(data.Messages, function () { + try { + $connection.trigger(events.onReceived, [this]); + } + catch (e) { + connection.log("Error raising received " + e); + $(connection).trigger(events.onError, [e]); + } + }); + } + + if (data.MessageId) { + connection.messageId = data.MessageId; + } + + if (data.TransportData) { + connection.groups = data.TransportData.Groups; + } + }, + + foreverFrame: { + count: 0, + connections: {} + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.transports.webSockets.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events, + changeState = $.signalR.changeState, + transportLogic = signalR.transports._logic; + + signalR.transports.webSockets = { + name: "webSockets", + + send: function (connection, data) { + connection.socket.send(data); + }, + + start: function (connection, onSuccess, onFailed) { + var url, + opened = false, + that = this, + reconnecting = !onSuccess, + $connection = $(connection); + + if (window.MozWebSocket) { + window.WebSocket = window.MozWebSocket; + } + + if (!window.WebSocket) { + onFailed(); + return; + } + + if (!connection.socket) { + if (connection.webSocketServerUrl) { + url = connection.webSocketServerUrl; + } + else { + url = connection.wsProtocol + connection.host; + } + + // Build the url + $(connection).trigger(events.onSending); + + url += transportLogic.getUrl(connection, this.name, reconnecting); + + connection.log("Connecting to websocket endpoint '" + url + "'"); + connection.socket = new window.WebSocket(url); + connection.socket.onopen = function () { + opened = true; + connection.log("Websocket opened"); + if (onSuccess) { + onSuccess(); + } + else { + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + $connection.trigger(events.onReconnect); + } + } + }; + + connection.socket.onclose = function (event) { + if (!opened) { + if (onFailed) { + onFailed(); + } + else if (reconnecting) { + that.reconnect(connection); + } + return; + } + else if (typeof event.wasClean !== "undefined" && event.wasClean === false) { + // Ideally this would use the websocket.onerror handler (rather than checking wasClean in onclose) but + // I found in some circumstances Chrome won't call onerror. This implementation seems to work on all browsers. + $(connection).trigger(events.onError, [event.reason]); + connection.log("Unclean disconnect from websocket." + event.reason); + } + else { + connection.log("Websocket closed"); + } + + that.reconnect(connection); + }; + + connection.socket.onmessage = function (event) { + var data = window.JSON.parse(event.data), + $connection; + if (data) { + $connection = $(connection); + + if (data.Messages) { + transportLogic.processMessages(connection, data); + } else { + $connection.trigger(events.onReceived, [data]); + } + } + }; + } + }, + + reconnect: function (connection) { + var that = this; + window.setTimeout(function () { + that.stop(connection); + + if (connection.state === signalR.connectionState.reconnecting || + changeState(connection, + signalR.connectionState.connected, + signalR.connectionState.reconnecting) === true) { + + connection.log("Websocket reconnecting"); + that.start(connection); + } + }, + connection.reconnectDelay); + }, + + stop: function (connection) { + if (connection.socket !== null) { + connection.log("Closing the Websocket"); + connection.socket.close(); + connection.socket = null; + } + }, + + abort: function (connection) { + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.transports.serverSentEvents.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events, + changeState = $.signalR.changeState, + transportLogic = signalR.transports._logic; + + signalR.transports.serverSentEvents = { + name: "serverSentEvents", + + timeOut: 3000, + + start: function (connection, onSuccess, onFailed) { + var that = this, + opened = false, + $connection = $(connection), + reconnecting = !onSuccess, + url, + connectTimeOut; + + if (connection.eventSource) { + connection.log("The connection already has an event source. Stopping it."); + connection.stop(); + } + + if (!window.EventSource) { + if (onFailed) { + connection.log("This browser doesn't support SSE."); + onFailed(); + } + return; + } + + $connection.trigger(events.onSending); + + url = transportLogic.getUrl(connection, this.name, reconnecting); + + try { + connection.log("Attempting to connect to SSE endpoint '" + url + "'"); + connection.eventSource = new window.EventSource(url); + } + catch (e) { + connection.log("EventSource failed trying to connect with error " + e.Message); + if (onFailed) { + // The connection failed, call the failed callback + onFailed(); + } + else { + $connection.trigger(events.onError, [e]); + if (reconnecting) { + // If we were reconnecting, rather than doing initial connect, then try reconnect again + that.reconnect(connection); + } + } + return; + } + + // After connecting, if after the specified timeout there's no response stop the connection + // and raise on failed + connectTimeOut = window.setTimeout(function () { + if (opened === false) { + connection.log("EventSource timed out trying to connect"); + connection.log("EventSource readyState: " + connection.eventSource.readyState); + + if (!reconnecting) { + that.stop(connection); + } + + if (reconnecting) { + // If we're reconnecting and the event source is attempting to connect, + // don't keep retrying. This causes duplicate connections to spawn. + if (connection.eventSource.readyState !== window.EventSource.CONNECTING && + connection.eventSource.readyState !== window.EventSource.OPEN) { + // If we were reconnecting, rather than doing initial connect, then try reconnect again + that.reconnect(connection); + } + } else if (onFailed) { + onFailed(); + } + } + }, + that.timeOut); + + connection.eventSource.addEventListener("open", function (e) { + connection.log("EventSource connected"); + + if (connectTimeOut) { + window.clearTimeout(connectTimeOut); + } + + if (opened === false) { + opened = true; + + if (onSuccess) { + onSuccess(); + } + + if (reconnecting) { + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + $connection.trigger(events.onReconnect); + } + } + } + }, false); + + connection.eventSource.addEventListener("message", function (e) { + // process messages + if (e.data === "initialized") { + return; + } + transportLogic.processMessages(connection, window.JSON.parse(e.data)); + }, false); + + connection.eventSource.addEventListener("error", function (e) { + if (!opened) { + if (onFailed) { + onFailed(); + } + return; + } + + connection.log("EventSource readyState: " + connection.eventSource.readyState); + + if (e.eventPhase === window.EventSource.CLOSED) { + // We don't use the EventSource's native reconnect function as it + // doesn't allow us to change the URL when reconnecting. We need + // to change the URL to not include the /connect suffix, and pass + // the last message id we received. + connection.log("EventSource reconnecting due to the server connection ending"); + that.reconnect(connection); + } else { + // connection error + connection.log("EventSource error"); + $connection.trigger(events.onError); + } + }, false); + }, + + reconnect: function (connection) { + var that = this; + window.setTimeout(function () { + that.stop(connection); + + if (connection.state === signalR.connectionState.reconnecting || + changeState(connection, + signalR.connectionState.connected, + signalR.connectionState.reconnecting) === true) { + connection.log("EventSource reconnecting"); + that.start(connection); + } + + }, connection.reconnectDelay); + }, + + send: function (connection, data) { + transportLogic.ajaxSend(connection, data); + }, + + stop: function (connection) { + if (connection && connection.eventSource) { + connection.log("EventSource calling close()"); + connection.eventSource.close(); + connection.eventSource = null; + delete connection.eventSource; + } + }, + abort: function (connection, async) { + transportLogic.ajaxAbort(connection, async); + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.transports.foreverFrame.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events, + changeState = $.signalR.changeState, + transportLogic = signalR.transports._logic; + + signalR.transports.foreverFrame = { + name: "foreverFrame", + + timeOut: 3000, + + start: function (connection, onSuccess, onFailed) { + var that = this, + frameId = (transportLogic.foreverFrame.count += 1), + url, + connectTimeOut, + frame = $(""); + + if (window.EventSource) { + // If the browser supports SSE, don't use Forever Frame + if (onFailed) { + connection.log("This brower supports SSE, skipping Forever Frame."); + onFailed(); + } + return; + } + + $(connection).trigger(events.onSending); + + // Build the url + url = transportLogic.getUrl(connection, this.name); + url += "&frameId=" + frameId; + + frame.prop("src", url); + transportLogic.foreverFrame.connections[frameId] = connection; + + connection.log("Binding to iframe's readystatechange event."); + frame.bind("readystatechange", function () { + if ($.inArray(this.readyState, ["loaded", "complete"]) >= 0) { + connection.log("Forever frame iframe readyState changed to " + this.readyState + ", reconnecting"); + + that.reconnect(connection); + } + }); + + connection.frame = frame[0]; + connection.frameId = frameId; + + if (onSuccess) { + connection.onSuccess = onSuccess; + } + + $("body").append(frame); + + // After connecting, if after the specified timeout there's no response stop the connection + // and raise on failed + // REVIEW: Why is connectTimeOut set here and never used again? + connectTimeOut = window.setTimeout(function () { + if (connection.onSuccess) { + connection.log("Failed to connect using forever frame source, it timed out after " + that.timeOut + "ms."); + that.stop(connection); + + if (onFailed) { + onFailed(); + } + } + }, that.timeOut); + }, + + reconnect: function (connection) { + var that = this; + window.setTimeout(function () { + if (!connection.frame) { + return; + } + + if (connection.state === signalR.connectionState.reconnecting || + changeState(connection, + signalR.connectionState.connected, + signalR.connectionState.reconnecting) === true) { + + var frame = connection.frame, + src = transportLogic.getUrl(connection, that.name, true) + "&frameId=" + connection.frameId; + connection.log("Upating iframe src to '" + src + "'."); + frame.src = src; + } + + }, connection.reconnectDelay); + }, + + send: function (connection, data) { + transportLogic.ajaxSend(connection, data); + }, + + receive: function (connection, data) { + var cw; + transportLogic.processMessages(connection, data); + // Delete the script & div elements + connection.frameMessageCount = (connection.frameMessageCount || 0) + 1; + if (connection.frameMessageCount > 50) { + connection.frameMessageCount = 0; + cw = connection.frame.contentWindow || connection.frame.contentDocument; + if (cw && cw.document) { + $("body", cw.document).empty(); + } + } + }, + + stop: function (connection) { + var cw = null; + if (connection.frame) { + if (connection.frame.stop) { + connection.frame.stop(); + } else { + cw = connection.frame.contentWindow || connection.frame.contentDocument; + if (cw.document && cw.document.execCommand) { + cw.document.execCommand("Stop"); + } + } + $(connection.frame).remove(); + delete transportLogic.foreverFrame.connections[connection.frameId]; + connection.frame = null; + connection.frameId = null; + delete connection.frame; + delete connection.frameId; + connection.log("Stopping forever frame"); + } + }, + + abort: function (connection, async) { + transportLogic.ajaxAbort(connection, async); + }, + + getConnection: function (id) { + return transportLogic.foreverFrame.connections[id]; + }, + + started: function (connection) { + if (connection.onSuccess) { + connection.onSuccess(); + connection.onSuccess = null; + delete connection.onSuccess; + } + else { + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + // If there's no onSuccess handler we assume this is a reconnect + $(connection).trigger(events.onReconnect); + } + } + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.transports.longPolling.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + var signalR = $.signalR, + events = $.signalR.events, + changeState = $.signalR.changeState, + isDisconnecting = $.signalR.isDisconnecting, + transportLogic = signalR.transports._logic; + + signalR.transports.longPolling = { + name: "longPolling", + + reconnectDelay: 3000, + + start: function (connection, onSuccess, onFailed) { + /// Starts the long polling connection + /// The SignalR connection to start + var that = this, + initialConnectFired = false; + + if (connection.pollXhr) { + connection.log("Polling xhr requests already exists, aborting."); + connection.stop(); + } + + connection.messageId = null; + + window.setTimeout(function () { + (function poll(instance, raiseReconnect) { + $(instance).trigger(events.onSending); + + var messageId = instance.messageId, + connect = (messageId === null), + reconnecting = !connect, + url = transportLogic.getUrl(instance, that.name, reconnecting, raiseReconnect), + reconnectTimeOut = null, + reconnectFired = false; + + if (reconnecting === true && raiseReconnect === true) { + if (connection.state !== signalR.connectionState.reconnecting && + changeState(connection, + signalR.connectionState.connected, + signalR.connectionState.reconnecting) === false) { + return; + } + } + + connection.log("Attempting to connect to '" + url + "' using longPolling."); + instance.pollXhr = $.ajax({ + url: url, + global: false, + cache: false, + type: "GET", + dataType: connection.ajaxDataType, + success: function (data) { + var delay = 0, + timedOutReceived = false; + + if (initialConnectFired === false) { + onSuccess(); + initialConnectFired = true; + } + + if (raiseReconnect === true) { + // Fire the reconnect event if it hasn't been fired as yet + if (reconnectFired === false) { + connection.log("Raising the reconnect event"); + + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + + $(instance).trigger(events.onReconnect); + reconnectFired = true; + } + } + } + + transportLogic.processMessages(instance, data); + if (data && + data.TransportData && + $.type(data.TransportData.LongPollDelay) === "number") { + delay = data.TransportData.LongPollDelay; + } + + if (data && data.TimedOut) { + timedOutReceived = data.TimedOut; + } + + if (data && data.Disconnect) { + return; + } + + if (isDisconnecting(instance) === true) { + return; + } + + if (delay > 0) { + window.setTimeout(function () { + poll(instance, timedOutReceived); + }, delay); + } else { + poll(instance, timedOutReceived); + } + }, + + error: function (data, textStatus) { + if (textStatus === "abort") { + connection.log("Aborted xhr requst."); + return; + } + + connection.log("An error occurred using longPolling. Status = " + textStatus + ". " + data.responseText); + + if (reconnectTimeOut) { + // If the request failed then we clear the timeout so that the + // reconnect event doesn't get fired + window.clearTimeout(reconnectTimeOut); + } + + $(instance).trigger(events.onError, [data.responseText]); + + window.setTimeout(function () { + if (isDisconnecting(instance) === false) { + poll(instance, true); + } + }, connection.reconnectDelay); + } + }); + + if (raiseReconnect === true) { + reconnectTimeOut = window.setTimeout(function () { + if (reconnectFired === false) { + if (changeState(connection, + signalR.connectionState.reconnecting, + signalR.connectionState.connected) === true) { + + $(instance).trigger(events.onReconnect); + reconnectFired = true; + } + } + }, + that.reconnectDelay); + } + + }(connection)); + + // Now connected + // There's no good way know when the long poll has actually started so + // we assume it only takes around 150ms (max) to start the connection + window.setTimeout(function () { + if (initialConnectFired === false) { + onSuccess(); + initialConnectFired = true; + } + }, 150); + + }, 250); // Have to delay initial poll so Chrome doesn't show loader spinner in tab + }, + + send: function (connection, data) { + transportLogic.ajaxSend(connection, data); + }, + + stop: function (connection) { + /// Stops the long polling connection + /// The SignalR connection to stop + if (connection.pollXhr) { + connection.pollXhr.abort(); + connection.pollXhr = null; + delete connection.pollXhr; + } + }, + + abort: function (connection, async) { + transportLogic.ajaxAbort(connection, async); + } + }; + +}(window.jQuery, window)); +/* jquery.signalR.hubs.js */ +/*global window:false */ +/// + +(function ($, window) { + "use strict"; + + // we use a global id for tracking callbacks so the server doesn't have to send extra info like hub name + var callbackId = 0, + callbacks = {}, + eventNamespace = "proxy."; + + // Array.prototype.map + if (!Array.prototype.hasOwnProperty("map")) { + Array.prototype.map = function (fun, thisp) { + var arr = this, + i, + length = arr.length, + result = []; + for (i = 0; i < length; i += 1) { + if (arr.hasOwnProperty(i)) { + result[i] = fun.call(thisp, arr[i], i, arr); + } + } + return result; + }; + } + + function getArgValue(a) { + return $.isFunction(a) ? null : ($.type(a) === "undefined" ? null : a); + } + + // hubProxy + function hubProxy(hubConnection, hubName) { + /// + /// Creates a new proxy object for the given hub connection that can be used to invoke + /// methods on server hubs and handle client method invocation requests from the server. + /// + return new hubProxy.fn.init(hubConnection, hubName); + } + + hubProxy.fn = hubProxy.prototype = { + init: function (connection, hubName) { + this.state = {}; + this.connection = connection; + this.hubName = hubName; + this.subscribed = false; + }, + + on: function (eventName, callback) { + /// Wires up a callback to be invoked when a invocation request is received from the server hub. + /// The name of the hub event to register the callback for. + /// The callback to be invoked. + var self = this; + + // Normalize the event name to lowercase + eventName = eventName.toLowerCase(); + + $(self).bind(eventNamespace + eventName, function (e, data) { + callback.apply(self, data); + }); + self.subscribed = true; + return self; + }, + + invoke: function (methodName) { + /// Invokes a server hub method with the given arguments. + /// The name of the server hub method. + + var self = this, + args = $.makeArray(arguments).slice(1), + userCallback = args[args.length - 1], // last argument + methodArgs = $.type(userCallback) === "function" ? args.slice(0, args.length - 1) /* all but last */ : args, + argValues = methodArgs.map(getArgValue), + data = { hub: self.hubName, method: methodName, args: argValues, state: self.state, id: callbackId }, + d = $.Deferred(), + callback = function (result) { + // Update the hub state + $.extend(this.state, result.State); + + if (result.Error) { + // Server hub method threw an exception, log it & reject the deferred + if (result.StackTrace) { + self.connection.log(result.Error + "\n" + result.StackTrace); + } + d.rejectWith(self, [result.Error]); + } else { + // Server invocation succeeded, invoke any user callback & resolve the deferred + if ($.type(userCallback) === "function") { + userCallback.call(self, result.Result); + } + d.resolveWith(self, [result.Result]); + } + }; + + callbacks[callbackId.toString()] = { scope: self, method: callback }; + callbackId += 1; + self.connection.send(window.JSON.stringify(data)); + + return d.promise(); + } + }; + + hubProxy.fn.init.prototype = hubProxy.fn; + + + // hubConnection + function hubConnection(url, options) { + /// Creates a new hub connection. + /// [Optional] The hub route url, defaults to "/signalr". + /// [Optional] Settings to use when creating the hubConnection. + var settings = { + qs: null, + logging: false, + useDefaultPath : true + }; + + $.extend(settings, options); + + if (!url || settings.useDefaultPath) { + url = (url || "") + "/signalr"; + } + return new hubConnection.fn.init(url, settings); + } + + hubConnection.fn = hubConnection.prototype = $.connection(); + + hubConnection.fn.init = function (url, options) { + var settings = { + qs: null, + logging: false, + useDefaultPath: true + }, + connection = this; + + $.extend(settings, options); + + // Call the base constructor + $.signalR.fn.init.call(connection, url, settings.qs, settings.logging); + + // Object to store hub proxies for this connection + connection.proxies = {}; + + // Wire up the sending handler + connection.sending(function () { + // Set the connection's data object with all the hub proxies with active subscriptions. + // These proxies will receive notifications from the server. + var subscribedHubs = []; + + $.each(this.proxies, function (key) { + if (this.subscribed) { + subscribedHubs.push({ name: key }); + } + }); + + this.data = window.JSON.stringify(subscribedHubs); + }); + + // Wire up the received handler + connection.received(function (data) { + var proxy, dataCallbackId, callback, hubName, eventName; + if (!data) { + return; + } + + if (typeof (data.Id) !== "undefined") { + // We received the return value from a server method invocation, look up callback by id and call it + dataCallbackId = data.Id.toString(); + callback = callbacks[dataCallbackId]; + if (callback) { + // Delete the callback from the proxy + callbacks[dataCallbackId] = null; + delete callbacks[dataCallbackId]; + + // Invoke the callback + callback.method.call(callback.scope, data); + } + } else { + // We received a client invocation request, i.e. broadcast from server hub + connection.log("Triggering client hub event '" + data.Method + "' on hub '" + data.Hub + "'."); + + // Normalize the names to lowercase + hubName = data.Hub.toLowerCase(); + eventName = data.Method.toLowerCase(); + + // Trigger the local invocation event + proxy = this.proxies[hubName]; + + // Update the hub state + $.extend(proxy.state, data.State); + $(proxy).trigger(eventNamespace + eventName, [data.Args]); + } + }); + }; + + hubConnection.fn.createProxy = function (hubName) { + /// + /// Creates a new proxy object for the given hub connection that can be used to invoke + /// methods on server hubs and handle client method invocation requests from the server. + /// + /// + /// The name of the hub on the server to create the proxy for. + /// + + // Normalize the name to lowercase + hubName = hubName.toLowerCase(); + + var proxy = this.proxies[hubName]; + if (!proxy) { + proxy = hubProxy(this, hubName); + this.proxies[hubName] = proxy; + } + return proxy; + }; + + hubConnection.fn.init.prototype = hubConnection.fn; + + $.hubConnection = hubConnection; + +} (window.jQuery, window)); diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.js b/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.js index 969c97f8..3eb968d0 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.js +++ b/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.js @@ -1,4 +1,4 @@ -///#source 1 1 /ClientSource/Scripts/Modules/jQueryUI-DynaTree/jquery.dynatree.js +///#source 1 1 /ClientSource/Scripts/Modules/jQueryUI-DynaTree/jquery.dynatree.js /************************************************************************* jquery.dynatree.js Dynamic tree view control, with support for lazy loading of branches. @@ -3336,4 +3336,4 @@ var _registerDnd = function() { // --------------------------------------------------------------------------- }(jQuery)); - + diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.js.bundle b/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.js.bundle index b30ff078..922f1d6e 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.js.bundle +++ b/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.js.bundle @@ -1,4 +1,4 @@ - - - /ClientSource/Scripts/Modules/jQueryUI-DynaTree/jquery.dynatree.js + + + /ClientSource/Scripts/Modules/jQueryUI-DynaTree/jquery.dynatree.js \ No newline at end of file diff --git a/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.min.js b/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.min.js index df9e1320..de02eab6 100644 --- a/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.min.js +++ b/Disco.Web/ClientSource/Scripts/Modules/jQueryUI-DynaTree.min.js @@ -1,2 +1,2 @@ -function _log(n){if(_canLog){var t=Array.prototype.slice.apply(arguments,[1]),i=new Date,r=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+"."+i.getMilliseconds();t[0]=r+" - "+t[0];try{switch(n){case"info":window.console.info.apply(window.console,t);break;case"warn":window.console.warn.apply(window.console,t);break;default:window.console.log.apply(window.console,t)}}catch(u){window.console||(_canLog=!1)}}}function logMsg(){Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments)}var _canLog=!0,getDynaTreePersistData=null,DTNodeStatus_Error=-1,DTNodeStatus_Loading=1,DTNodeStatus_Ok=0;(function(n){function e(){}function s(t){var i=t.options.dnd||null;i&&(i.onDragStart||i.onDrop)&&o(),i&&i.onDragStart&&t.$tree.draggable({addClasses:!1,appendTo:"body",containment:!1,delay:0,distance:4,revert:!1,scroll:!0,scrollSpeed:7,scrollSensitivity:10,connectToDynatree:!0,helper:function(t){var i=n.ui.dynatree.getNode(t.target);return i?i.tree._onDragEvent("helper",i,null,t,null,null):"
<\/div>"},start:function(n,t){var i=t.helper.data("dtSourceNode");return!!i},_last:null}),i&&i.onDrop&&t.$tree.droppable({addClasses:!1,tolerance:"intersect",greedy:!1,_last:null})}var u={create:function(){return function(){this.initialize.apply(this,arguments)}}},i=u.create(),t,r,f,o;i.prototype={initialize:function(t,i,r){this.parent=t,this.tree=i,typeof r=="string"&&(r={title:r}),r.key===undefined&&(r.key="_"+i._nodeCount++),this.data=n.extend({},n.ui.dynatree.nodedatadefaults,r),this.li=null,this.span=null,this.ul=null,this.childList=null,this._isLoading=!1,this.hasSubSel=!1,this.bExpanded=!1,this.bSelected=!1},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(t,i){var r=n.extend({},this.data),u,f;if(r.activate=this.tree.activeNode===this,r.focus=this.tree.focusNode===this,r.expand=this.bExpanded,r.select=this.bSelected,i&&i(r),t&&this.childList)for(r.children=[],u=0,f=this.childList.length;u1&&(i+=r.tagConnector):i+=this.hasChildren()!==!1?r.tagExpander:r.tagConnector,t.checkbox&&n.hideCheckbox!==!0&&!n.isStatusNode&&(i+=r.tagCheckbox),n.icon?i+="":n.icon===!1?e():i+=r.tagNodeIcon,u="",t.onCustomRender&&(u=t.onCustomRender.call(f,this)||""),u||(o=n.tooltip?' title="'+n.tooltip.replace(/\"/g,""")+'"':"",h=n.href||"#",u=t.noLink||n.noLink?'"+n.title+"<\/span>":'"+n.title+"<\/a>"),i+u},_fixOrder:function(){var u=this.childList,t,n,f,i,r;if(u&&this.ul)for(t=this.ul.firstChild,n=0,f=u.length-1;n1?r.container+" "+r.noConnector:r.container),(this.bExpanded||i===!0)&&this.childList){for(h=0,a=this.childList.length;hr?1:-1},i.sort(n),t)for(r=0,u=i.length;r0?this.childList[0].focus():this.focus());break;case DTNodeStatus_Loading:this._isLoading=!0,n(this.span).addClass(this.tree.options.classNames.nodeLoading),this.parent||this._setStatusNode({title:this.tree.options.strings.loading+u,tooltip:r,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this._isLoading=!1,this._setStatusNode({title:this.tree.options.strings.loadError+u,tooltip:r,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+t+"'.";}},_parentList:function(n,t){for(var r=[],i=t?this:this.parent;i;)(n||i.parent)&&r.unshift(i),i=i.parent;return r},getLevel:function(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t},_getTypeForOuterNodeEvent:function(n){var r=this.tree.options.classNames,i=n.target,f,e,u,o;if(i.className.indexOf(r.node)<0)return null;for(f=n.pageX-i.offsetLeft,e=n.pageY-i.offsetTop,u=0,o=i.childNodes.length;u=s&&f<=s+c&&e>=h&&e<=h+l){if(t.className==r.title)return"title";if(t.className==r.expander)return"expander";if(t.className==r.checkbox)return"checkbox";if(t.className==r.nodeIcon)return"icon"}}return"prefix"},getEventTargetType:function(n){var t=n&&n.target?n.target.className:"",i=this.tree.options.classNames;return t===i.title?"title":t===i.expander?"expander":t===i.checkbox?"checkbox":t===i.nodeIcon?"icon":t===i.empty||t===i.vline||t===i.connector?"prefix":t.indexOf(i.node)>=0?this._getTypeForOuterNodeEvent(n):null},isVisible:function(){for(var t=this._parentList(!0,!1),n=0,i=t.length;na").focus()}catch(t){}},isFocused:function(){return this.tree.tnFocused===this},_activate:function(t,i){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",t,i,this);var r=this.tree.options;if(!this.data.isStatusNode&&(!i||!r.onQueryActivate||r.onQueryActivate.call(this.tree,t,this)!==!1))if(t){if(this.tree.activeNode){if(this.tree.activeNode===this)return;this.tree.activeNode.deactivate()}r.activeVisible&&this.makeVisible(),this.tree.activeNode=this,r.persist&&n.cookie(r.cookieId+"-active",this.data.key,r.cookie),this.tree.persistence.activeKey=this.data.key,n(this.span).addClass(r.classNames.active),i&&r.onActivate&&r.onActivate.call(this.tree,this)}else if(this.tree.activeNode===this){if(r.onQueryActivate&&r.onQueryActivate.call(this.tree,!1,this)===!1)return;n(this.span).removeClass(r.classNames.active),r.persist&&n.cookie(r.cookieId+"-active","",r.cookie),this.tree.persistence.activeKey=null,this.tree.activeNode=null,i&&r.onDeactivate&&r.onDeactivate.call(this.tree,this)}},activate:function(){this._activate(!0,!0)},activateSilently:function(){this._activate(!0,!1)},deactivate:function(){this._activate(!1,!0)},isActive:function(){return this.tree.activeNode===this},_userActivate:function(){var t=!0,n=!1;if(this.data.isFolder)switch(this.tree.options.clickFolderMode){case 2:t=!1,n=!0;break;case 3:t=n=!0}this.parent===null&&(n=!1),n&&(this.toggleExpand(),this.focus()),t&&this.activate()},_setSubSel:function(t){t?(this.hasSubSel=!0,n(this.span).addClass(this.tree.options.classNames.partsel)):(this.hasSubSel=!1,n(this.span).removeClass(this.tree.options.classNames.partsel))},_updatePartSelectionState:function(){var n,o,i;if(!this.hasChildren())return n=this.bSelected&&!this.data.unselectable&&!this.data.isStatusNode,this._setSubSel(!1),n;for(var u=this.childList,f=!0,e=!0,t=0,r=u.length;t=0;i--)if(t=r[i].getNextSibling(),t)break;t&&t.focus();break;default:u=!1}u&&n.preventDefault()},_onKeypress:function(){},_onFocus:function(t){var i=this.tree.options;t.type=="blur"||t.type=="focusout"?(i.onBlur&&i.onBlur.call(this.tree,this),this.tree.tnFocused&&n(this.tree.tnFocused.span).removeClass(i.classNames.focused),this.tree.tnFocused=null,i.persist&&n.cookie(i.cookieId+"-focus","",i.cookie)):(t.type=="focus"||t.type=="focusin")&&(this.tree.tnFocused&&this.tree.tnFocused!==this&&(this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused),n(this.tree.tnFocused.span).removeClass(i.classNames.focused)),this.tree.tnFocused=this,i.onFocus&&i.onFocus.call(this.tree,this),n(this.tree.tnFocused.span).addClass(i.classNames.focused),i.persist&&n.cookie(i.cookieId+"-focus",this.data.key,i.cookie))},visit:function(n,t){var i=!0,r,u;if(t===!0&&(i=n(this),i===!1||i=="skip"))return i;if(this.childList)for(r=0,u=this.childList.length;r reloading %s...",this,n,r),s=this,r.reloadChildren(function(f,e){e?(i.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",f,n,f),t.call(i,r,"loaded"),f._loadKeyPath(u.join(i.options.keyPathSeparator),t)):(i.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",s,n),t.call(i,r,"error"))})):(t.call(i,r,"loaded"),r._loadKeyPath(u.join(i.options.keyPathSeparator),t));return}t.call(i,undefined,"notfound",f,u.length===0),i.logWarning("Node not found: "+f);return},resetLazy:function(){if(this.parent===null)throw"Use tree.reload() instead";else if(!this.data.isLazy)throw"node.resetLazy() requires lazy nodes.";this.expand(!1),this.removeChildren()},_addChildNode:function(t,i){var u=this.tree,f=u.options,r=u.persistence,o,s,e;if(t.parent=this,this.childList===null?this.childList=[]:i||this.childList.length>0&&n(this.childList[this.childList.length-1].span).removeClass(f.classNames.lastsib),i){if(o=n.inArray(i,this.childList),o<0)throw" must be a child of ";this.childList.splice(o,0,t)}else this.childList.push(t);if(s=u.isInitializing(),f.persist&&r.cookiesFound&&s?(r.activeKey===t.data.key&&(u.activeNode=t),r.focusedKey===t.data.key&&(u.focusNode=t),t.bExpanded=n.inArray(t.data.key,r.expandedKeyList)>=0,t.bSelected=n.inArray(t.data.key,r.selectedKeyList)>=0):(t.data.activate&&(u.activeNode=t,f.persist&&(r.activeKey=t.data.key)),t.data.focus&&(u.focusNode=t,f.persist&&(r.focusedKey=t.data.key)),t.bExpanded=t.data.expand===!0,t.bExpanded&&f.persist&&r.addExpand(t.data.key),t.bSelected=t.data.select===!0,t.bSelected&&f.persist&&r.addSelect(t.data.key)),f.minExpandLevel>=t.getLevel()&&(this.bExpanded=!0),t.bSelected&&f.selectMode==3)for(e=this;e;)e.hasSubSel||e._setSubSel(!0),e=e.parent;return u.bEnableUpdate&&this.render(),t},addChild:function(n,t){var o,r,u,s,f,e;if(typeof n=="string")throw"Invalid data type for "+n;else if(n&&n.length!==0){if(n instanceof i)return this._addChildNode(n,t)}else return;for(n.length||(n=[n]),o=this.tree.enableUpdate(!1),r=null,u=0,s=n.length;u=0&&(this.expandedKeyList.splice(i,1),n.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},addSelect:function(t){n.inArray(t,this.selectedKeyList)<0&&(this.selectedKeyList.push(t),n.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},clearSelect:function(t){var i=n.inArray(t,this.selectedKeyList);i>=0&&(this.selectedKeyList.splice(i,1),n.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},isReloading:function(){return this.cookiesFound===!0},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:undefined},r=u.create(),r.version="$Version: 1.2.1$",r.prototype={initialize:function(n){this.phase="init",this.$widget=n,this.options=n.options,this.$tree=n.element,this.timer=null,this.divTree=this.$tree.get(0),s(this)},_load:function(r){var l=this.$widget,u=this.options,s=this,e;this.bEnableUpdate=!0,this._nodeCount=1,this.activeNode=null,this.focusNode=null,u.rootVisible!==undefined&&this.logWarning("Option 'rootVisible' is no longer supported."),u.minExpandLevel<1&&(this.logWarning("Option 'minExpandLevel' must be >= 1."),u.minExpandLevel=1),u.classNames!==n.ui.dynatree.prototype.options.classNames&&(u.classNames=n.extend({},n.ui.dynatree.prototype.options.classNames,u.classNames)),u.ajaxDefaults!==n.ui.dynatree.prototype.options.ajaxDefaults&&(u.ajaxDefaults=n.extend({},n.ui.dynatree.prototype.options.ajaxDefaults,u.ajaxDefaults)),u.dnd!==n.ui.dynatree.prototype.options.dnd&&(u.dnd=n.extend({},n.ui.dynatree.prototype.options.dnd,u.dnd)),u.imagePath||n("script").each(function(){if(this.src.search(/.*dynatree[^\/]*\.js$/i)>=0)return u.imagePath=this.src.indexOf("/")>=0?this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":"skin/",s.logDebug("Guessing imagePath from '%s': '%s'",this.src,u.imagePath),!1}),this.persistence=new t(u.cookieId,u.cookie),u.persist&&(n.cookie||_log("warn","Please include jquery.cookie.js to use persistence."),this.persistence.read()),this.logDebug("DynaTree.persistence: %o",this.persistence.toDict()),this.cache={tagEmpty:"<\/span>",tagVline:"<\/span>",tagExpander:"<\/span>",tagConnector:"<\/span>",tagNodeIcon:"<\/span>",tagCheckbox:"<\/span>",lastentry:undefined},(u.children||u.initAjax&&u.initAjax.url||u.initId)&&n(this.divTree).empty(),e=this.$tree.find(">ul:first").hide(),this.tnRoot=new i(null,this,{}),this.tnRoot.bExpanded=!0,this.tnRoot.render(),this.divTree.appendChild(this.tnRoot.ul);var f=this.tnRoot,h=u.persist&&this.persistence.isReloading(),o=!1,c=this.enableUpdate(!1);this.logDebug("Dynatree._load(): read tree structure..."),u.children?f.addChild(u.children):u.initAjax&&u.initAjax.url?(o=!0,f.data.isLazy=!0,this._reloadAjax(r)):u.initId?this._createFromTag(f,n("#"+u.initId)):(this._createFromTag(f,e),e.remove()),this._checkConsistency(),o||u.selectMode!=3||f._updatePartSelectionState(),this.logDebug("Dynatree._load(): render nodes..."),this.enableUpdate(c),this.logDebug("Dynatree._load(): bind events..."),this.$widget.bind(),this.logDebug("Dynatree._load(): postInit..."),this.phase="postInit",u.persist&&this.persistence.write(),this.focusNode&&this.focusNode.isVisible()&&(this.logDebug("Focus on init: %o",this.focusNode),this.focusNode.focus()),o||(u.onPostInit&&u.onPostInit.call(this,h,!1),r&&r.call(this,"ok")),this.phase="idle"},_reloadAjax:function(t){var r=this.options,u,i,f;if(!r.initAjax||!r.initAjax.url)throw"tree.reload() requires 'initAjax' mode.";u=this.persistence,i=n.extend({},r.initAjax),i.addActiveKey&&(i.data.activeKey=u.activeKey),i.addFocusedKey&&(i.data.focusedKey=u.focusedKey),i.addExpandedKeyList&&(i.data.expandedKeyList=u.expandedKeyList.join(",")),i.addSelectedKeyList&&(i.data.selectedKeyList=u.selectedKeyList.join(",")),i.success&&this.logWarning("initAjax: success callback is ignored; use onPostInit instead."),i.error&&this.logWarning("initAjax: error callback is ignored; use onPostInit instead."),f=u.isReloading(),i.success=function(n){r.selectMode==3&&n.tree.tnRoot._updatePartSelectionState(),r.onPostInit&&r.onPostInit.call(n.tree,f,!1),t&&t.call(n.tree,"ok")},i.error=function(n,i,u,e){r.onPostInit&&r.onPostInit.call(n.tree,f,!0,i,u,e),t&&t.call(n.tree,"error",i,u,e)},this.logDebug("Dynatree._init(): send Ajax request..."),this.tnRoot.appendAjax(i)},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},toDict:function(){return this.tnRoot.toDict(!0)},serializeArray:function(n){for(var i=this.getSelectedNodes(n),f=this.$tree.attr("name")||this.$tree.attr("id"),r=[],t=0,u=i.length;t=2&&(Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments))},logInfo:function(){this.options.debugLevel>=1&&(Array.prototype.unshift.apply(arguments,["info"]),_log.apply(this,arguments))},logWarning:function(){Array.prototype.unshift.apply(arguments,["warn"]),_log.apply(this,arguments)},isInitializing:function(){return this.phase=="init"||this.phase=="postInit"},isReloading:function(){return(this.phase=="init"||this.phase=="postInit")&&this.options.persist&&this.persistence.cookiesFound},isUserEvent:function(){return this.phase=="userEvent"},redraw:function(){this.tnRoot.render(!1,!1)},renderInvisibleNodes:function(){this.tnRoot.render(!1,!0)},reload:function(n){this._load(n)},getRoot:function(){return this.tnRoot},enable:function(){this.$widget.enable()},disable:function(){this.$widget.disable()},getNodeByKey:function(n){var t=document.getElementById(this.options.idPrefix+n),i;return t?t.dtnode?t.dtnode:null:(i=null,this.visit(function(t){if(t.data.key==n)return i=t,!1},!0),i)},getActiveNode:function(){return this.activeNode},reactivate:function(n){var t=this.activeNode;t&&(this.activeNode=null,t.activate(),n&&t.focus())},getSelectedNodes:function(n){var t=[];return this.tnRoot.visit(function(i){if(i.bSelected&&(t.push(i),n===!0))return"skip"}),t},activateKey:function(n){var t=n===null?null:this.getNodeByKey(n);return t?(t.focus(),t.activate(),t):(this.activeNode&&this.activeNode.deactivate(),this.activeNode=null,null)},loadKeyPath:function(n,t){var i=n.split(this.options.keyPathSeparator);return i[0]===""&&i.shift(),i[0]==this.tnRoot.data.key&&(this.logDebug("Removed leading root key."),i.shift()),n=i.join(this.options.keyPathSeparator),this.tnRoot._loadKeyPath(n,t)},selectKey:function(n,t){var i=this.getNodeByKey(n);return i?(i.select(t),i):null},enableUpdate:function(n){return this.bEnableUpdate==n?n:(this.bEnableUpdate=n,n&&this.redraw(),!n)},count:function(){return this.tnRoot.countChildren()},visit:function(n,t){return this.tnRoot.visit(n,t)},_createFromTag:function(t,i){var r=this;i.find(">li").each(function(){var $li=n(this),$liSpan=$li.find(">span:first"),$liA=$li.find(">a:first"),title,href=null,target=null,tooltip,iPos,data,dataAttr,childNode,$ul;if($liSpan.length?title=$liSpan.html():$liA.length?(title=$liA.html(),href=$liA.attr("href"),target=$liA.attr("target"),tooltip=$liA.attr("title")):(title=$li.html(),iPos=title.search(/
\r\n\r\n"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.InitialConfig +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/FileStore.cshtml")] + public class FileStore : System.Web.Mvc.WebViewPage + { + public FileStore() + { + } + public override void Execute() + { + + #line 2 "..\..\Views\InitialConfig\FileStore.cshtml" + + ViewBag.Title = null; + Html.BundleDeferred("~/Style/jQueryUI/dynatree"); + Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-DynaTree"); + + + #line default + #line hidden +WriteLiteral("\r\n

"); + + + #line 7 "..\..\Views\InitialConfig\FileStore.cshtml" +Write(CommonHelpers.Breadcrumbs(Html.ToBreadcrumb("Initial Configuration", MVC.InitialConfig.Index(), "File Store"))); + + + #line default + #line hidden +WriteLiteral("

\r\n\r\n"); + +WriteLiteral(" "); + + + #line 9 "..\..\Views\InitialConfig\FileStore.cshtml" +Write(Html.ValidationSummary(false)); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n \r\n

File Store Location

\r\n \r\n \r\n " + +" \r\n " + +" \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n Create Directory\r\n \r\n
\r\n
\r\n " + +" Selected Location: <None> (Invalid DataStore Location)\r\n
\r\n " + +"
\r\n \r\n"); + + + #line 32 "..\..\Views\InitialConfig\FileStore.cshtml" + + + #line default + #line hidden + + #line 32 "..\..\Views\InitialConfig\FileStore.cshtml" + using (Html.BeginForm()) + { + + + #line default + #line hidden + + #line 34 "..\..\Views\InitialConfig\FileStore.cshtml" + Write(Html.HiddenFor(m => m.FileStoreLocation)); + + + #line default + #line hidden + + #line 34 "..\..\Views\InitialConfig\FileStore.cshtml" + + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n \r\n"); + + + #line 38 "..\..\Views\InitialConfig\FileStore.cshtml" + } + + + #line default + #line hidden +WriteLiteral("\r\n\r\n

Building and Validating File Store

\r\n
Please wait while the D" + +"isco File Store is created and/or validated
\r\n\r\n\r\n

Create Directory

\r\n \r\n
Parent:
\r\n\r\n\r\n"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/InitialConfig/RestartWebApp.cshtml b/Disco.Web/Views/InitialConfig/RestartWebApp.cshtml index 305f92e2..b73f01cc 100644 --- a/Disco.Web/Views/InitialConfig/RestartWebApp.cshtml +++ b/Disco.Web/Views/InitialConfig/RestartWebApp.cshtml @@ -1,34 +1,34 @@ -@{ - ViewBag.Title = null; -} -

@CommonHelpers.Breadcrumbs("Initial Configuration > Starting Disco")

-
-

Starting Disco

-
Please wait while the Disco environment is initialized
-
- +@{ + ViewBag.Title = null; +} +

@CommonHelpers.Breadcrumbs("Initial Configuration > Starting Disco")

+
+

Starting Disco

+
Please wait while the Disco environment is initialized
+
+ diff --git a/Disco.Web/Views/InitialConfig/RestartWebApp.generated.cs b/Disco.Web/Views/InitialConfig/RestartWebApp.generated.cs index f07ce553..a683c417 100644 --- a/Disco.Web/Views/InitialConfig/RestartWebApp.generated.cs +++ b/Disco.Web/Views/InitialConfig/RestartWebApp.generated.cs @@ -1,111 +1,111 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.InitialConfig -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/RestartWebApp.cshtml")] - public class RestartWebApp : System.Web.Mvc.WebViewPage - { - public RestartWebApp() - { - } - public override void Execute() - { - - #line 1 "..\..\Views\InitialConfig\RestartWebApp.cshtml" - - ViewBag.Title = null; - - - #line default - #line hidden -WriteLiteral("\r\n

"); - - - #line 4 "..\..\Views\InitialConfig\RestartWebApp.cshtml" -Write(CommonHelpers.Breadcrumbs("Initial Configuration > Starting Disco")); - - - #line default - #line hidden -WriteLiteral("

\r\n\r\n

Starting Disco

\r\n Please wait while the Disco environment is initialized - - -"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.InitialConfig +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/RestartWebApp.cshtml")] + public class RestartWebApp : System.Web.Mvc.WebViewPage + { + public RestartWebApp() + { + } + public override void Execute() + { + + #line 1 "..\..\Views\InitialConfig\RestartWebApp.cshtml" + + ViewBag.Title = null; + + + #line default + #line hidden +WriteLiteral("\r\n

"); + + + #line 4 "..\..\Views\InitialConfig\RestartWebApp.cshtml" +Write(CommonHelpers.Breadcrumbs("Initial Configuration > Starting Disco")); + + + #line default + #line hidden +WriteLiteral("

\r\n\r\n

Starting Disco

\r\n Please wait while the Disco environment is initialized + + +"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/InitialConfig/Welcome.cshtml b/Disco.Web/Views/InitialConfig/Welcome.cshtml index c22cbc06..72678f00 100644 --- a/Disco.Web/Views/InitialConfig/Welcome.cshtml +++ b/Disco.Web/Views/InitialConfig/Welcome.cshtml @@ -1,34 +1,34 @@ -@model Disco.Web.Models.InitialConfig.WelcomeModel -@{ - ViewBag.Title = null; -} -

Welcome to Disco ICT Management!

-
-

The installation is complete, but a few things need to be configured before Disco can be started.

- @using (Html.BeginForm()) - { -
-

Organisation Name

- - - - -
-
- @Html.EditorFor(m => m.OrganisationName)
- @Html.ValidationMessageFor(m => m.OrganisationName) -
-
-
-
- -
- } -
- +@model Disco.Web.Models.InitialConfig.WelcomeModel +@{ + ViewBag.Title = null; +} +

Welcome to Disco ICT Management!

+
+

The installation is complete, but a few things need to be configured before Disco can be started.

+ @using (Html.BeginForm()) + { +
+

Organisation Name

+ + + + +
+
+ @Html.EditorFor(m => m.OrganisationName)
+ @Html.ValidationMessageFor(m => m.OrganisationName) +
+
+
+
+ +
+ } +
+ diff --git a/Disco.Web/Views/InitialConfig/Welcome.generated.cs b/Disco.Web/Views/InitialConfig/Welcome.generated.cs index b0503f19..9bcefb16 100644 --- a/Disco.Web/Views/InitialConfig/Welcome.generated.cs +++ b/Disco.Web/Views/InitialConfig/Welcome.generated.cs @@ -1,133 +1,133 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.InitialConfig -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/Welcome.cshtml")] - public class Welcome : System.Web.Mvc.WebViewPage - { - public Welcome() - { - } - public override void Execute() - { - - #line 2 "..\..\Views\InitialConfig\Welcome.cshtml" - - ViewBag.Title = null; - - - #line default - #line hidden -WriteLiteral("\r\n

Welcome to Disco ICT Management!

\r\n\r\n

The installation is complete, but a few things need to be configured be" + -"fore Disco can be started.

\r\n"); - - - #line 8 "..\..\Views\InitialConfig\Welcome.cshtml" - - - #line default - #line hidden - - #line 8 "..\..\Views\InitialConfig\Welcome.cshtml" - using (Html.BeginForm()) - { - - - #line default - #line hidden -WriteLiteral(" \r\n

Organisation Name

\r\n \r\n <" + -"tr>\r\n \r\n \r\n
\r\n
\r\n"); - -WriteLiteral(" "); - - - #line 16 "..\..\Views\InitialConfig\Welcome.cshtml" - Write(Html.EditorFor(m => m.OrganisationName)); - - - #line default - #line hidden -WriteLiteral("
\r\n"); - -WriteLiteral(" "); - - - #line 17 "..\..\Views\InitialConfig\Welcome.cshtml" - Write(Html.ValidationMessageFor(m => m.OrganisationName)); - - - #line default - #line hidden -WriteLiteral("\r\n
\r\n
\r\n \r\n"); - -WriteLiteral(" \r\n \r\n \r\n"); - - - #line 26 "..\..\Views\InitialConfig\Welcome.cshtml" - } - - - #line default - #line hidden -WriteLiteral("\r\n\r\n"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.InitialConfig +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/Welcome.cshtml")] + public class Welcome : System.Web.Mvc.WebViewPage + { + public Welcome() + { + } + public override void Execute() + { + + #line 2 "..\..\Views\InitialConfig\Welcome.cshtml" + + ViewBag.Title = null; + + + #line default + #line hidden +WriteLiteral("\r\n

Welcome to Disco ICT Management!

\r\n\r\n

The installation is complete, but a few things need to be configured be" + +"fore Disco can be started.

\r\n"); + + + #line 8 "..\..\Views\InitialConfig\Welcome.cshtml" + + + #line default + #line hidden + + #line 8 "..\..\Views\InitialConfig\Welcome.cshtml" + using (Html.BeginForm()) + { + + + #line default + #line hidden +WriteLiteral(" \r\n

Organisation Name

\r\n \r\n <" + +"tr>\r\n \r\n \r\n
\r\n
\r\n"); + +WriteLiteral(" "); + + + #line 16 "..\..\Views\InitialConfig\Welcome.cshtml" + Write(Html.EditorFor(m => m.OrganisationName)); + + + #line default + #line hidden +WriteLiteral("
\r\n"); + +WriteLiteral(" "); + + + #line 17 "..\..\Views\InitialConfig\Welcome.cshtml" + Write(Html.ValidationMessageFor(m => m.OrganisationName)); + + + #line default + #line hidden +WriteLiteral("\r\n
\r\n
\r\n \r\n"); + +WriteLiteral(" \r\n \r\n \r\n"); + + + #line 26 "..\..\Views\InitialConfig\Welcome.cshtml" + } + + + #line default + #line hidden +WriteLiteral("\r\n\r\n"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/InitialConfig/_Layout.cshtml b/Disco.Web/Views/InitialConfig/_Layout.cshtml index c0c3594b..7a7cb8fa 100644 --- a/Disco.Web/Views/InitialConfig/_Layout.cshtml +++ b/Disco.Web/Views/InitialConfig/_Layout.cshtml @@ -1,35 +1,35 @@ -@{ - Html.BundleDeferred("~/Style/Site"); - Html.BundleDeferred("~/ClientScripts/Core"); -} - - - - - - Disco@{if(ViewBag.Title != null){<text> - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</text>}} - @Html.BundleRenderDeferred() - @RenderSection("head", false) - - -
-
-
- -
-
-
-
- @if(ViewBag.Title != null){
@CommonHelpers.Breadcrumbs(ViewBag.Title)
} -
- @RenderBody() -
-
- Disco v@(Disco.Web.DiscoApplication.Version) -
-
- +@{ + Html.BundleDeferred("~/Style/Site"); + Html.BundleDeferred("~/ClientScripts/Core"); +} + + + + + + Disco@{if(ViewBag.Title != null){<text> - @CommonHelpers.BreadcrumbsTitle(ViewBag.Title)</text>}} + @Html.BundleRenderDeferred() + @RenderSection("head", false) + + +
+
+
+
+ + DISCO - ICT Asset Management +
+
+
+
+
+ @if(ViewBag.Title != null){
@CommonHelpers.Breadcrumbs(ViewBag.Title)
} +
+ @RenderBody() +
+
+ Disco v@(Disco.Web.DiscoApplication.Version) +
+
+ \ No newline at end of file diff --git a/Disco.Web/Views/InitialConfig/_Layout.generated.cs b/Disco.Web/Views/InitialConfig/_Layout.generated.cs index b06793de..96a8888c 100644 --- a/Disco.Web/Views/InitialConfig/_Layout.generated.cs +++ b/Disco.Web/Views/InitialConfig/_Layout.generated.cs @@ -1,218 +1,218 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.InitialConfig -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/_Layout.cshtml")] - public class Layout : System.Web.Mvc.WebViewPage - { - public Layout() - { - } - public override void Execute() - { - - #line 1 "..\..\Views\InitialConfig\_Layout.cshtml" - - Html.BundleDeferred("~/Style/Site"); - Html.BundleDeferred("~/ClientScripts/Core"); - - - #line default - #line hidden -WriteLiteral("\r\n\r\n\r\n\r\n \r\n \r\n Disco"); - - - #line 10 "..\..\Views\InitialConfig\_Layout.cshtml" - if(ViewBag.Title != null){ - - #line default - #line hidden -WriteLiteral(" - "); - - - #line 10 "..\..\Views\InitialConfig\_Layout.cshtml" - Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title)); - - - #line default - #line hidden - - #line 10 "..\..\Views\InitialConfig\_Layout.cshtml" - } - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 11 "..\..\Views\InitialConfig\_Layout.cshtml" -Write(Html.BundleRenderDeferred()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 12 "..\..\Views\InitialConfig\_Layout.cshtml" -Write(RenderSection("head", false)); - - - #line default - #line hidden -WriteLiteral("\r\n\r\n\r\n \r\n
\r\n \r\n \r\n (Url.Action(MVC.Public.Public.Index()) - - #line default - #line hidden -, 585), false) -); - -WriteLiteral(">\r\n (Links.ClientSource.Style.Images.Heading_png - - #line default - #line hidden -, 661), false) -); - -WriteLiteral(" alt=\"DISCO - ICT Asset Management\""); - -WriteLiteral(" />\r\n \r\n \r\n \r\n \r\n
\r\n"); - - - #line 26 "..\..\Views\InitialConfig\_Layout.cshtml" - - - #line default - #line hidden - - #line 26 "..\..\Views\InitialConfig\_Layout.cshtml" - if(ViewBag.Title != null){ - - #line default - #line hidden -WriteLiteral(""); - - - #line 26 "..\..\Views\InitialConfig\_Layout.cshtml" - Write(CommonHelpers.Breadcrumbs(ViewBag.Title)); - - - #line default - #line hidden -WriteLiteral(""); - - - #line 26 "..\..\Views\InitialConfig\_Layout.cshtml" - } - - - #line default - #line hidden -WriteLiteral(" \r\n"); - -WriteLiteral(" "); - - - #line 28 "..\..\Views\InitialConfig\_Layout.cshtml" - Write(RenderBody()); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n
\r\n Disco v"); - - - #line 31 "..\..\Views\InitialConfig\_Layout.cshtml" - Write(Disco.Web.DiscoApplication.Version); - - - #line default - #line hidden -WriteLiteral("\r\n
\r\n \r\n\r\n"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.InitialConfig +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/_Layout.cshtml")] + public class Layout : System.Web.Mvc.WebViewPage + { + public Layout() + { + } + public override void Execute() + { + + #line 1 "..\..\Views\InitialConfig\_Layout.cshtml" + + Html.BundleDeferred("~/Style/Site"); + Html.BundleDeferred("~/ClientScripts/Core"); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n\r\n\r\n \r\n \r\n Disco"); + + + #line 10 "..\..\Views\InitialConfig\_Layout.cshtml" + if(ViewBag.Title != null){ + + #line default + #line hidden +WriteLiteral(" - "); + + + #line 10 "..\..\Views\InitialConfig\_Layout.cshtml" + Write(CommonHelpers.BreadcrumbsTitle(ViewBag.Title)); + + + #line default + #line hidden + + #line 10 "..\..\Views\InitialConfig\_Layout.cshtml" + } + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 11 "..\..\Views\InitialConfig\_Layout.cshtml" +Write(Html.BundleRenderDeferred()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 12 "..\..\Views\InitialConfig\_Layout.cshtml" +Write(RenderSection("head", false)); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n\r\n \r\n
\r\n \r\n \r\n (Url.Action(MVC.Public.Public.Index()) + + #line default + #line hidden +, 585), false) +); + +WriteLiteral(">\r\n (Links.ClientSource.Style.Images.Heading_png + + #line default + #line hidden +, 661), false) +); + +WriteLiteral(" alt=\"DISCO - ICT Asset Management\""); + +WriteLiteral(" />\r\n \r\n \r\n \r\n \r\n
\r\n"); + + + #line 26 "..\..\Views\InitialConfig\_Layout.cshtml" + + + #line default + #line hidden + + #line 26 "..\..\Views\InitialConfig\_Layout.cshtml" + if(ViewBag.Title != null){ + + #line default + #line hidden +WriteLiteral(""); + + + #line 26 "..\..\Views\InitialConfig\_Layout.cshtml" + Write(CommonHelpers.Breadcrumbs(ViewBag.Title)); + + + #line default + #line hidden +WriteLiteral(""); + + + #line 26 "..\..\Views\InitialConfig\_Layout.cshtml" + } + + + #line default + #line hidden +WriteLiteral(" \r\n"); + +WriteLiteral(" "); + + + #line 28 "..\..\Views\InitialConfig\_Layout.cshtml" + Write(RenderBody()); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n
\r\n Disco v"); + + + #line 31 "..\..\Views\InitialConfig\_Layout.cshtml" + Write(Disco.Web.DiscoApplication.Version); + + + #line default + #line hidden +WriteLiteral("\r\n
\r\n \r\n\r\n"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/InitialConfig/_ViewStart.cshtml b/Disco.Web/Views/InitialConfig/_ViewStart.cshtml index 4cca93cc..56b0cd8d 100644 --- a/Disco.Web/Views/InitialConfig/_ViewStart.cshtml +++ b/Disco.Web/Views/InitialConfig/_ViewStart.cshtml @@ -1,4 +1,4 @@ -@{ - Layout = "~/Views/InitialConfig/_Layout.cshtml"; - Html.BundleDeferred("~/Style/InitialConfig"); +@{ + Layout = "~/Views/InitialConfig/_Layout.cshtml"; + Html.BundleDeferred("~/Style/InitialConfig"); } \ No newline at end of file diff --git a/Disco.Web/Views/InitialConfig/_ViewStart.generated.cs b/Disco.Web/Views/InitialConfig/_ViewStart.generated.cs index 1414f176..81a9d66e 100644 --- a/Disco.Web/Views/InitialConfig/_ViewStart.generated.cs +++ b/Disco.Web/Views/InitialConfig/_ViewStart.generated.cs @@ -1,55 +1,55 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.InitialConfig -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/_ViewStart.cshtml")] - public class ViewStart : System.Web.Mvc.ViewStartPage - { - public ViewStart() - { - } - public override void Execute() - { - - #line 1 "..\..\Views\InitialConfig\_ViewStart.cshtml" - - Layout = "~/Views/InitialConfig/_Layout.cshtml"; - Html.BundleDeferred("~/Style/InitialConfig"); - - - #line default - #line hidden - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.InitialConfig +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/InitialConfig/_ViewStart.cshtml")] + public class ViewStart : System.Web.Mvc.ViewStartPage + { + public ViewStart() + { + } + public override void Execute() + { + + #line 1 "..\..\Views\InitialConfig\_ViewStart.cshtml" + + Layout = "~/Views/InitialConfig/_Layout.cshtml"; + Html.BundleDeferred("~/Style/InitialConfig"); + + + #line default + #line hidden + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/Job/Create_Redirect.cshtml b/Disco.Web/Views/Job/Create_Redirect.cshtml index 0603bbbb..1d2db0ce 100644 --- a/Disco.Web/Views/Job/Create_Redirect.cshtml +++ b/Disco.Web/Views/Job/Create_Redirect.cshtml @@ -1,21 +1,21 @@ -@model Disco.Web.Models.Job.CreateRedirectModel -@{ - Layout = null; - ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting..."); -} -Redirecting... - +@model Disco.Web.Models.Job.CreateRedirectModel +@{ + Layout = null; + ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting..."); +} +Redirecting... + diff --git a/Disco.Web/Views/Job/Create_Redirect.generated.cs b/Disco.Web/Views/Job/Create_Redirect.generated.cs index 6b7a7188..7d2e4156 100644 --- a/Disco.Web/Views/Job/Create_Redirect.generated.cs +++ b/Disco.Web/Views/Job/Create_Redirect.generated.cs @@ -1,87 +1,87 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.Job -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Create_Redirect.cshtml")] - public class Create_Redirect : System.Web.Mvc.WebViewPage - { - public Create_Redirect() - { - } - public override void Execute() - { - - #line 2 "..\..\Views\Job\Create_Redirect.cshtml" - - Layout = null; - ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting..."); - - - #line default - #line hidden -WriteLiteral("\r\n(Model.RedirectLink - - #line default - #line hidden -, 195), false) -); - -WriteLiteral(@">Redirecting... - -"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.Job +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Create_Redirect.cshtml")] + public class Create_Redirect : System.Web.Mvc.WebViewPage + { + public Create_Redirect() + { + } + public override void Execute() + { + + #line 2 "..\..\Views\Job\Create_Redirect.cshtml" + + Layout = null; + ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting..."); + + + #line default + #line hidden +WriteLiteral("\r\n(Model.RedirectLink + + #line default + #line hidden +, 195), false) +); + +WriteLiteral(@">Redirecting... + +"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/Job/Index.cshtml b/Disco.Web/Views/Job/Index.cshtml index 0d3fc80c..b9d937de 100644 --- a/Disco.Web/Views/Job/Index.cshtml +++ b/Disco.Web/Views/Job/Index.cshtml @@ -1,131 +1,131 @@ -@model Disco.Web.Models.Job.IndexModel -@{ - ViewBag.Title = "Jobs"; - Html.BundleDeferred("~/ClientScripts/Modules/Highcharts"); -} -
-
-

Search Jobs

- @Html.Partial(MVC.Shared.Views._SearchDialog, "jobs") -
-
-

Daily Opened & Closed Jobs

-
-
- -
-
-

Open Jobs Awaiting Technician Action (@Model.OpenJobs.Items.Count)

-@Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary()) -

Long Running Jobs (@Model.LongRunningJobs.Items.Count)

-@Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary()) -@*

- Jobs with Devices Ready for Return (@Model.ReadyForReturnJobs.Items.Count)

-@Html.Partial(MVC.Shared.Views._JobTable, Model.ReadyForReturnJobs, new ViewDataDictionary()) -

- Jobs Waiting for User Action (@Model.WaitingForUserActionJobs.Items.Count)

-@Html.Partial(MVC.Shared.Views._JobTable, Model.WaitingForUserActionJobs, new ViewDataDictionary()) -

- Recently Closed Jobs (@Model.RecentlyClosedJobs.Items.Count)

-@Html.Partial(MVC.Shared.Views._JobTable, Model.RecentlyClosedJobs, new ViewDataDictionary())*@ +@model Disco.Web.Models.Job.IndexModel +@{ + ViewBag.Title = "Jobs"; + Html.BundleDeferred("~/ClientScripts/Modules/Highcharts"); +} +
+
+

Search Jobs

+ @Html.Partial(MVC.Shared.Views._SearchDialog, "jobs") +
+
+

Daily Opened & Closed Jobs

+
+
+ +
+
+

Open Jobs Awaiting Technician Action (@Model.OpenJobs.Items.Count)

+@Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary()) +

Long Running Jobs (@Model.LongRunningJobs.Items.Count)

+@Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary()) +@*

+ Jobs with Devices Ready for Return (@Model.ReadyForReturnJobs.Items.Count)

+@Html.Partial(MVC.Shared.Views._JobTable, Model.ReadyForReturnJobs, new ViewDataDictionary()) +

+ Jobs Waiting for User Action (@Model.WaitingForUserActionJobs.Items.Count)

+@Html.Partial(MVC.Shared.Views._JobTable, Model.WaitingForUserActionJobs, new ViewDataDictionary()) +

+ Recently Closed Jobs (@Model.RecentlyClosedJobs.Items.Count)

+@Html.Partial(MVC.Shared.Views._JobTable, Model.RecentlyClosedJobs, new ViewDataDictionary())*@ diff --git a/Disco.Web/Views/Job/Index.generated.cs b/Disco.Web/Views/Job/Index.generated.cs index 8b9d4728..14d7e76d 100644 --- a/Disco.Web/Views/Job/Index.generated.cs +++ b/Disco.Web/Views/Job/Index.generated.cs @@ -1,191 +1,191 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.Job -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Index.cshtml")] - public class Index : System.Web.Mvc.WebViewPage - { - public Index() - { - } - public override void Execute() - { - - #line 2 "..\..\Views\Job\Index.cshtml" - - ViewBag.Title = "Jobs"; - Html.BundleDeferred("~/ClientScripts/Modules/Highcharts"); - - - #line default - #line hidden -WriteLiteral("\r\n\r\n \r\n

Search Jobs

\r\n"); - -WriteLiteral(" "); - - - #line 9 "..\..\Views\Job\Index.cshtml" - Write(Html.Partial(MVC.Shared.Views._SearchDialog, "jobs")); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n \r\n

Daily Opened & Closed Jobs

\r\n \r\n \r\n \r\n (function () {\r\n\r\n var chartData;\r\n\r\n " + -" function buildChart() {\r\n $(function () {\r\n\r\n " + -" var data = chartData;\r\n\r\n var dataTotalOpenJobs" + -" = [];\r\n var dataOpenedJobs = [];\r\n " + -" var dataClosedJobs = [];\r\n for (var i = 0; i < data.len" + -"gth; i++) {\r\n var dataItem = data[i];\r\n " + -" var dataItemDate = new Date(parseInt(dataItem.Timestamp.substr(6, " + -"dataItem.Timestamp.length - 8))).getTime(); // $.datepicker.parseDate(\'yy-mm-dd\'" + -", dataItem.Timestamp.substr(0, 10)).getTime();\r\n data" + -"TotalOpenJobs.push([dataItemDate, dataItem.TotalJobs]);\r\n " + -" dataOpenedJobs.push([dataItemDate, dataItem.OpenedJobs]);\r\n " + -" dataClosedJobs.push([dataItemDate, dataItem.ClosedJobs]);\r\n " + -" }\r\n Highcharts.setOptions({\r\n " + -" global: {\r\n useUTC: false\r\n " + -" }\r\n });\r\n new" + -" Highcharts.Chart({\r\n chart: {\r\n " + -" renderTo: \'chartHostJobDailyOpenedClosed\',\r\n " + -" height: 175,\r\n animation: false\r\n " + -" },\r\n colors: [\'#BBBBBB\', \'#005fab\'" + -", \'#DB761D\'],\r\n title: {\r\n " + -" text: null\r\n },\r\n plo" + -"tOptions: {\r\n series: {\r\n " + -" marker: {\r\n radius: 3\r\n " + -" },\r\n animation:" + -" false\r\n }\r\n },\r\n " + -" legend: {\r\n align: \'left\'," + -"\r\n verticalAlign: \'top\',\r\n " + -" y: 0,\r\n floating: true,\r\n " + -" borderWidth: 0\r\n },\r\n " + -" xAxis: {\r\n type: \'datetime\',\r\n " + -" tickInterval: 7 * 24 * 3600 * 1000, // week\r\n " + -" tickWidth: 1,\r\n gridLineWi" + -"dth: 1,\r\n dateTimeLabelFormats: {\r\n " + -" week: \'%e %b\'\r\n }\r\n " + -" },\r\n yAxis: [{\r\n " + -" title: {\r\n text: null\r\n " + -" },\r\n labels: {\r\n " + -" enabled: false\r\n },\r\n" + -" min: 0\r\n }, {\r\n " + -" title: {\r\n text: nu" + -"ll\r\n },\r\n labels: " + -"{\r\n enabled: false\r\n " + -" },\r\n min: 0\r\n }" + -"],\r\n series: [{\r\n name" + -": \'Total Open Jobs\',\r\n data: dataTotalOpenJobs,\r\n" + -" yAxis: 1\r\n }, {\r\n " + -" name: \'Closed Jobs\',\r\n " + -" data: dataClosedJobs\r\n }, {\r\n " + -" name: \'Opened Jobs\',\r\n data: dataOpened" + -"Jobs\r\n }],\r\n credits: {\r\n " + -" enabled: false\r\n }\r\n " + -" });\r\n });\r\n }\r\n\r\n\r\n " + -" $.getJSON(\'"); - - - #line 110 "..\..\Views\Job\Index.cshtml" - Write(Url.Action(MVC.API.Job.StatisticsDailyOpenedClosed())); - - - #line default - #line hidden -WriteLiteral("\', function (data) {\r\n chartData = data;\r\n " + -"buildChart();\r\n });\r\n }());\r\n\r\n \r\n " + -"\r\n\r\n

Open Jobs Awaiting Technician Action ("); - - - #line 119 "..\..\Views\Job\Index.cshtml" - Write(Model.OpenJobs.Items.Count); - - - #line default - #line hidden -WriteLiteral(")

\r\n"); - - - #line 120 "..\..\Views\Job\Index.cshtml" -Write(Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary())); - - - #line default - #line hidden -WriteLiteral("\r\n

Long Running Jobs ("); - - - #line 121 "..\..\Views\Job\Index.cshtml" - Write(Model.LongRunningJobs.Items.Count); - - - #line default - #line hidden -WriteLiteral(")

\r\n"); - - - #line 122 "..\..\Views\Job\Index.cshtml" -Write(Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary())); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral("\r\n"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.Job +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/Index.cshtml")] + public class Index : System.Web.Mvc.WebViewPage + { + public Index() + { + } + public override void Execute() + { + + #line 2 "..\..\Views\Job\Index.cshtml" + + ViewBag.Title = "Jobs"; + Html.BundleDeferred("~/ClientScripts/Modules/Highcharts"); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n \r\n

Search Jobs

\r\n"); + +WriteLiteral(" "); + + + #line 9 "..\..\Views\Job\Index.cshtml" + Write(Html.Partial(MVC.Shared.Views._SearchDialog, "jobs")); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n \r\n

Daily Opened & Closed Jobs

\r\n \r\n \r\n \r\n (function () {\r\n\r\n var chartData;\r\n\r\n " + +" function buildChart() {\r\n $(function () {\r\n\r\n " + +" var data = chartData;\r\n\r\n var dataTotalOpenJobs" + +" = [];\r\n var dataOpenedJobs = [];\r\n " + +" var dataClosedJobs = [];\r\n for (var i = 0; i < data.len" + +"gth; i++) {\r\n var dataItem = data[i];\r\n " + +" var dataItemDate = new Date(parseInt(dataItem.Timestamp.substr(6, " + +"dataItem.Timestamp.length - 8))).getTime(); // $.datepicker.parseDate(\'yy-mm-dd\'" + +", dataItem.Timestamp.substr(0, 10)).getTime();\r\n data" + +"TotalOpenJobs.push([dataItemDate, dataItem.TotalJobs]);\r\n " + +" dataOpenedJobs.push([dataItemDate, dataItem.OpenedJobs]);\r\n " + +" dataClosedJobs.push([dataItemDate, dataItem.ClosedJobs]);\r\n " + +" }\r\n Highcharts.setOptions({\r\n " + +" global: {\r\n useUTC: false\r\n " + +" }\r\n });\r\n new" + +" Highcharts.Chart({\r\n chart: {\r\n " + +" renderTo: \'chartHostJobDailyOpenedClosed\',\r\n " + +" height: 175,\r\n animation: false\r\n " + +" },\r\n colors: [\'#BBBBBB\', \'#005fab\'" + +", \'#DB761D\'],\r\n title: {\r\n " + +" text: null\r\n },\r\n plo" + +"tOptions: {\r\n series: {\r\n " + +" marker: {\r\n radius: 3\r\n " + +" },\r\n animation:" + +" false\r\n }\r\n },\r\n " + +" legend: {\r\n align: \'left\'," + +"\r\n verticalAlign: \'top\',\r\n " + +" y: 0,\r\n floating: true,\r\n " + +" borderWidth: 0\r\n },\r\n " + +" xAxis: {\r\n type: \'datetime\',\r\n " + +" tickInterval: 7 * 24 * 3600 * 1000, // week\r\n " + +" tickWidth: 1,\r\n gridLineWi" + +"dth: 1,\r\n dateTimeLabelFormats: {\r\n " + +" week: \'%e %b\'\r\n }\r\n " + +" },\r\n yAxis: [{\r\n " + +" title: {\r\n text: null\r\n " + +" },\r\n labels: {\r\n " + +" enabled: false\r\n },\r\n" + +" min: 0\r\n }, {\r\n " + +" title: {\r\n text: nu" + +"ll\r\n },\r\n labels: " + +"{\r\n enabled: false\r\n " + +" },\r\n min: 0\r\n }" + +"],\r\n series: [{\r\n name" + +": \'Total Open Jobs\',\r\n data: dataTotalOpenJobs,\r\n" + +" yAxis: 1\r\n }, {\r\n " + +" name: \'Closed Jobs\',\r\n " + +" data: dataClosedJobs\r\n }, {\r\n " + +" name: \'Opened Jobs\',\r\n data: dataOpened" + +"Jobs\r\n }],\r\n credits: {\r\n " + +" enabled: false\r\n }\r\n " + +" });\r\n });\r\n }\r\n\r\n\r\n " + +" $.getJSON(\'"); + + + #line 110 "..\..\Views\Job\Index.cshtml" + Write(Url.Action(MVC.API.Job.StatisticsDailyOpenedClosed())); + + + #line default + #line hidden +WriteLiteral("\', function (data) {\r\n chartData = data;\r\n " + +"buildChart();\r\n });\r\n }());\r\n\r\n \r\n " + +"\r\n\r\n

Open Jobs Awaiting Technician Action ("); + + + #line 119 "..\..\Views\Job\Index.cshtml" + Write(Model.OpenJobs.Items.Count); + + + #line default + #line hidden +WriteLiteral(")

\r\n"); + + + #line 120 "..\..\Views\Job\Index.cshtml" +Write(Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary())); + + + #line default + #line hidden +WriteLiteral("\r\n

Long Running Jobs ("); + + + #line 121 "..\..\Views\Job\Index.cshtml" + Write(Model.LongRunningJobs.Items.Count); + + + #line default + #line hidden +WriteLiteral(")

\r\n"); + + + #line 122 "..\..\Views\Job\Index.cshtml" +Write(Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary())); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral("\r\n"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/Job/JobParts/Insurance.cshtml b/Disco.Web/Views/Job/JobParts/Insurance.cshtml index da705e43..41bdd234 100644 --- a/Disco.Web/Views/Job/JobParts/Insurance.cshtml +++ b/Disco.Web/Views/Job/JobParts/Insurance.cshtml @@ -1,380 +1,380 @@ -@model Disco.Web.Models.Job.ShowModel - - @if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) - { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - - - - -
- Date of Loss or Damage - - @Html.EditorFor(m => m.Job.JobMetaInsurance.LossOrDamageDate) - @AjaxHelpers.AjaxLoader() - -
- Event Location - - @Html.EditorFor(m => m.Job.JobMetaInsurance.EventLocation) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
- Description - - @Html.EditorFor(m => m.Job.JobMetaInsurance.Description) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
-   - - @Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)@Html.LabelFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() -
-
-
- Third Party Name
- @Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedName) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() -
-
-
- Why Third Parties Fault
- @Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedWhy) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() -
-
- -
- Witnessed by (Name/Address) - - @Html.EditorFor(m => m.Job.JobMetaInsurance.WitnessesNamesAddresses) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
- Burglary/Theft - Method of Entry - - @Html.EditorFor(m => m.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
- Property Last Seen - - @Html.EditorFor(m => m.Job.JobMetaInsurance.PropertyLastSeenDate) - @AjaxHelpers.AjaxLoader() - -
-   - - @Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotified)@Html.LabelFor(m => m.Job.JobMetaInsurance.PoliceNotified) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() -
-
-
- Station
- @Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedStation) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() -
-
-
- Date
- @Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedDate) - @AjaxHelpers.AjaxLoader() -
-
-
- Crime Report #
- @Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() -
-
- -
- Action to Recover/Reduce Loss - - @Html.EditorFor(m => m.Job.JobMetaInsurance.RecoverReduceAction) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
- Other Interested Parties - - @Html.EditorFor(m => m.Job.JobMetaInsurance.OtherInterestedParties) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
- Date of Purchase - - @Html.EditorFor(m => m.Job.JobMetaInsurance.DateOfPurchase) - @AjaxHelpers.AjaxLoader() - -
- Claim Form Sent Date - - @Html.EditorFor(m => m.Job.JobMetaInsurance.ClaimFormSentDate) - @(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString())) - @AjaxHelpers.AjaxLoader() - -
- Insurance Claim - -
- @if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) - { - @Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true)) - } - else - { - @Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true)) - } -
-
+@model Disco.Web.Models.Job.ShowModel + + @if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) + { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + + + + +
+ Date of Loss or Damage + + @Html.EditorFor(m => m.Job.JobMetaInsurance.LossOrDamageDate) + @AjaxHelpers.AjaxLoader() + +
+ Event Location + + @Html.EditorFor(m => m.Job.JobMetaInsurance.EventLocation) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
+ Description + + @Html.EditorFor(m => m.Job.JobMetaInsurance.Description) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
+   + + @Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)@Html.LabelFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() +
+
+
+ Third Party Name
+ @Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedName) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() +
+
+
+ Why Third Parties Fault
+ @Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedWhy) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() +
+
+ +
+ Witnessed by (Name/Address) + + @Html.EditorFor(m => m.Job.JobMetaInsurance.WitnessesNamesAddresses) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
+ Burglary/Theft - Method of Entry + + @Html.EditorFor(m => m.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
+ Property Last Seen + + @Html.EditorFor(m => m.Job.JobMetaInsurance.PropertyLastSeenDate) + @AjaxHelpers.AjaxLoader() + +
+   + + @Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotified)@Html.LabelFor(m => m.Job.JobMetaInsurance.PoliceNotified) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() +
+
+
+ Station
+ @Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedStation) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() +
+
+
+ Date
+ @Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedDate) + @AjaxHelpers.AjaxLoader() +
+
+
+ Crime Report #
+ @Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() +
+
+ +
+ Action to Recover/Reduce Loss + + @Html.EditorFor(m => m.Job.JobMetaInsurance.RecoverReduceAction) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
+ Other Interested Parties + + @Html.EditorFor(m => m.Job.JobMetaInsurance.OtherInterestedParties) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
+ Date of Purchase + + @Html.EditorFor(m => m.Job.JobMetaInsurance.DateOfPurchase) + @AjaxHelpers.AjaxLoader() + +
+ Claim Form Sent Date + + @Html.EditorFor(m => m.Job.JobMetaInsurance.ClaimFormSentDate) + @(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString())) + @AjaxHelpers.AjaxLoader() + +
+ Insurance Claim + +
+ @if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) + { + @Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true)) + } + else + { + @Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true)) + } +
+
diff --git a/Disco.Web/Views/Job/JobParts/Insurance.generated.cs b/Disco.Web/Views/Job/JobParts/Insurance.generated.cs index a8307bf5..d049feba 100644 --- a/Disco.Web/Views/Job/JobParts/Insurance.generated.cs +++ b/Disco.Web/Views/Job/JobParts/Insurance.generated.cs @@ -1,1095 +1,1095 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.Job.JobParts -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Insurance.cshtml")] - public class Insurance : System.Web.Mvc.WebViewPage - { - public Insurance() - { - } - public override void Execute() - { -WriteLiteral("\r\n"); - - - #line 3 "..\..\Views\Job\JobParts\Insurance.cshtml" - - - #line default - #line hidden - - #line 3 "..\..\Views\Job\JobParts\Insurance.cshtml" - if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) - { - - - #line default - #line hidden -WriteLiteral(" \r\n \r\n Date of Loss or Damage\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 10 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.LossOrDamageDate)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 11 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - var dateField = $('#Job_JobMetaInsurance_LossOrDamageDate'); - document.DiscoFunctions.DateChangeHelper( - dateField, - 'Unknown', - '"); - - - #line 18 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceLossOrDamageDate(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'LossOrDamageDate\',\r\n null\r\n " + -" );\r\n });\r\n \r\n " + -" \r\n \r\n"); - -WriteLiteral(" \r\n \r\n Event Location\r\n " + -"\r\n \r\n"); - -WriteLiteral(" "); - - - #line 31 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.EventLocation)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 32 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 33 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFun" + -"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaInsuran" + -"ce_EventLocation\'),\r\n \'Unknown\',\r\n " + -" \'"); - - - #line 39 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceEventLocation(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'EventLocation\'\r\n );\r\n " + -" });\r\n \r\n \r\n " + -"\r\n"); - -WriteLiteral(" \r\n \r\n Description\r\n \r\n " + -" \r\n"); - -WriteLiteral(" "); - - - #line 51 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.Description)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 52 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 53 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFun" + -"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaInsuran" + -"ce_Description\'),\r\n \'None\',\r\n " + -" \'"); - - - #line 59 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceDescription(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'Description\'\r\n );\r\n " + -" });\r\n \r\n \r\n \r\n" + -""); - -WriteLiteral(" \r\n \r\n  \r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 71 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)); - - - #line default - #line hidden - - #line 71 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.LabelFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 72 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 73 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n
\r\n
\r\n " + -" Third Party Name
\r\n"); - -WriteLiteral(" "); - - - #line 78 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedName)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 79 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 80 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n
\r\n
\r\n " + -"
\r\n Why Third Parties Fault
\r\n"); - -WriteLiteral(" "); - - - #line 85 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedWhy)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 86 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 87 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n
\r\n \r\n - $(function () { - var thirdPartyField = $('#Job_JobMetaInsurance_ThirdPartyCaused'); - var thirdPartyDetails = $('#Job_JobMetaInsurance_ThirdPartyCaused_Details'); - var thirdPartyDetails_Changed = function (e, dontAnimate) { - if (thirdPartyField.is(':checked')) { - if (dontAnimate) { - thirdPartyDetails.show(); - } else { - thirdPartyDetails.slideDown(); - } - } else { - if (dontAnimate) { - thirdPartyDetails.hide(); - } else { - thirdPartyDetails.slideUp(); - } - } - }; - thirdPartyDetails_Changed(null, true); - thirdPartyField.change(thirdPartyDetails_Changed); - - document.DiscoFunctions.PropertyChangeHelper( - thirdPartyField, - null, - '"); - - - #line 115 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCaused(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral(@"', - 'ThirdPartyCaused' - ); - document.DiscoFunctions.PropertyChangeHelper( - $('#Job_JobMetaInsurance_ThirdPartyCausedName'), - 'None', - '"); - - - #line 121 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCausedName(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral(@"', - 'ThirdPartyCausedName' - ); - document.DiscoFunctions.PropertyChangeHelper( - $('#Job_JobMetaInsurance_ThirdPartyCausedWhy'), - 'Unknown', - '"); - - - #line 127 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCausedWhy(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'ThirdPartyCausedWhy\'\r\n );" + -"\r\n });\r\n \r\n \r\n " + -" \r\n"); - -WriteLiteral(" \r\n \r\n Witnessed by (Name/Address)\r\n " + -" \r\n \r\n"); - -WriteLiteral(" "); - - - #line 139 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.WitnessesNamesAddresses)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 140 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 141 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.PropertyChangeHelper( - $('#Job_JobMetaInsurance_WitnessesNamesAddresses'), - 'None', - '"); - - - #line 147 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceWitnessesNamesAddresses(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'WitnessesNamesAddresses\'\r\n " + -" );\r\n });\r\n \r\n \r\n " + -" \r\n"); - -WriteLiteral(" \r\n \r\n Burglary/Theft - Method of Entry\r" + -"\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 159 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 160 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 161 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.PropertyChangeHelper( - $('#Job_JobMetaInsurance_BurglaryTheftMethodOfEntry'), - 'None', - '"); - - - #line 167 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceBurglaryTheftMethodOfEntry(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'BurglaryTheftMethodOfEntry\'\r\n " + -" );\r\n });\r\n \r\n \r\n" + -" \r\n"); - -WriteLiteral(" \r\n \r\n Property Last Seen\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 179 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PropertyLastSeenDate)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 180 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - var dateField = $('#Job_JobMetaInsurance_PropertyLastSeenDate'); - document.DiscoFunctions.DateChangeHelper( - dateField, - 'Unknown/NA', - '"); - - - #line 187 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsurancePropertyLastSeenDate(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'PropertyLastSeenDate\',\r\n null" + -"\r\n );\r\n });\r\n " + -"\r\n \r\n \r\n"); - -WriteLiteral(" \r\n \r\n  \r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 200 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotified)); - - - #line default - #line hidden - - #line 200 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.LabelFor(m => m.Job.JobMetaInsurance.PoliceNotified)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 201 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 202 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n
\r\n
\r\n " + -" Station
\r\n"); - -WriteLiteral(" "); - - - #line 207 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedStation)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 208 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 209 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n
\r\n
\r\n " + -"
\r\n Date
\r\n"); - -WriteLiteral(" "); - - - #line 214 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedDate)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 215 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n
\r\n
\r\n " + -"
\r\n Crime Report #
\r\n"); - -WriteLiteral(" "); - - - #line 220 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 221 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 222 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n
\r\n \r\n - $(function () { - var policeNotifiedField = $('#Job_JobMetaInsurance_PoliceNotified'); - var policeNotifiedDetails = $('#Job_JobMetaInsurance_PoliceNotified_Details'); - var policeNotifiedDetails_Changed = function (e, dontAnimate) { - if (policeNotifiedField.is(':checked')) { - if (dontAnimate) { - policeNotifiedDetails.show(); - } else { - policeNotifiedDetails.slideDown(); - } - } else { - if (dontAnimate) { - policeNotifiedDetails.hide(); - } else { - policeNotifiedDetails.slideUp(); - } - } - }; - policeNotifiedDetails_Changed(null, true); - policeNotifiedField.change(policeNotifiedDetails_Changed); - - document.DiscoFunctions.PropertyChangeHelper( - policeNotifiedField, - null, - '"); - - - #line 250 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotified(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral(@"', - 'PoliceNotified' - ); - document.DiscoFunctions.PropertyChangeHelper( - $('#Job_JobMetaInsurance_PoliceNotifiedStation'), - 'Unknown', - '"); - - - #line 256 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedStation(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral(@"', - 'PoliceNotifiedStation' - ); - var dateField = $('#Job_JobMetaInsurance_PoliceNotifiedDate'); - document.DiscoFunctions.DateChangeHelper( - dateField, - 'Unknown', - '"); - - - #line 263 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedDate(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral(@"', - 'PoliceNotifiedDate', - null, - true - ); - document.DiscoFunctions.PropertyChangeHelper( - $('#Job_JobMetaInsurance_PoliceNotifiedCrimeReportNo'), - 'Unknown', - '"); - - - #line 271 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedCrimeReportNo(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'PoliceNotifiedCrimeReportNo\'\r\n " + -" );\r\n });\r\n \r\n \r" + -"\n \r\n"); - -WriteLiteral(" \r\n \r\n Action to Recover/Reduce Loss\r\n " + -" \r\n \r\n"); - -WriteLiteral(" "); - - - #line 283 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.RecoverReduceAction)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 284 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 285 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFun" + -"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaInsuran" + -"ce_RecoverReduceAction\'),\r\n \'None\',\r\n " + -" \'"); - - - #line 291 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceRecoverReduceAction(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'RecoverReduceAction\'\r\n );" + -"\r\n });\r\n \r\n \r\n " + -" \r\n"); - -WriteLiteral(" \r\n \r\n Other Interested Parties\r\n " + -" \r\n \r\n"); - -WriteLiteral(" "); - - - #line 303 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.OtherInterestedParties)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 304 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 305 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.PropertyChangeHelper( - $('#Job_JobMetaInsurance_OtherInterestedParties'), - 'None', - '"); - - - #line 311 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceOtherInterestedParties(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'OtherInterestedParties\'\r\n " + -" );\r\n });\r\n \r\n \r\n " + -" \r\n"); - -WriteLiteral(" \r\n \r\n Date of Purchase\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 323 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.DateOfPurchase)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 324 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - var dateField = $('#Job_JobMetaInsurance_DateOfPurchase'); - document.DiscoFunctions.DateChangeHelper( - dateField, - 'Unknown', - '"); - - - #line 331 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceDateOfPurchase(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'DateOfPurchase\',\r\n null,\r\n " + -" true\r\n );\r\n });\r\n" + -" \r\n \r\n \r\n"); - -WriteLiteral(" \r\n \r\n Claim Form Sent Date\r\n " + -" \r\n \r\n"); - -WriteLiteral(" "); - - - #line 345 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ClaimFormSentDate)); - - - #line default - #line hidden -WriteLiteral("\r\n "); - - - #line 346 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString())); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 347 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.DateChangeUserHelper( - $('#Job_JobMetaInsurance_ClaimFormSentDate'), - $('#Job_JobMetaInsurance_ClaimFormSentUserId'), - 'Unknown', - '"); - - - #line 354 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateInsuranceClaimFormSentDate(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'ClaimFormSentDate\',\r\n"); - -WriteLiteral(" "); - - - #line 356 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); - - - #line default - #line hidden -WriteLiteral("\r\n );\r\n });\r\n \r" + -"\n \r\n \r\n"); - - - #line 362 "..\..\Views\Job\JobParts\Insurance.cshtml" - } - - - #line default - #line hidden -WriteLiteral(" \r\n \r\n Insurance Claim\r\n \r\n \r" + -"\n \r\n"); - - - #line 369 "..\..\Views\Job\JobParts\Insurance.cshtml" - - - #line default - #line hidden - - #line 369 "..\..\Views\Job\JobParts\Insurance.cshtml" - if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) - { - - - #line default - #line hidden - - #line 371 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true))); - - - #line default - #line hidden - - #line 371 "..\..\Views\Job\JobParts\Insurance.cshtml" - - } - else - { - - - #line default - #line hidden - - #line 375 "..\..\Views\Job\JobParts\Insurance.cshtml" - Write(Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true))); - - - #line default - #line hidden - - #line 375 "..\..\Views\Job\JobParts\Insurance.cshtml" - - } - - - #line default - #line hidden -WriteLiteral(" \r\n \r\n \r\n\r\n"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.Job.JobParts +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Insurance.cshtml")] + public class Insurance : System.Web.Mvc.WebViewPage + { + public Insurance() + { + } + public override void Execute() + { +WriteLiteral("\r\n"); + + + #line 3 "..\..\Views\Job\JobParts\Insurance.cshtml" + + + #line default + #line hidden + + #line 3 "..\..\Views\Job\JobParts\Insurance.cshtml" + if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) + { + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n Date of Loss or Damage\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 10 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.LossOrDamageDate)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 11 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + var dateField = $('#Job_JobMetaInsurance_LossOrDamageDate'); + document.DiscoFunctions.DateChangeHelper( + dateField, + 'Unknown', + '"); + + + #line 18 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceLossOrDamageDate(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'LossOrDamageDate\',\r\n null\r\n " + +" );\r\n });\r\n \r\n " + +" \r\n \r\n"); + +WriteLiteral(" \r\n \r\n Event Location\r\n " + +"\r\n \r\n"); + +WriteLiteral(" "); + + + #line 31 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.EventLocation)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 32 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 33 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFun" + +"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaInsuran" + +"ce_EventLocation\'),\r\n \'Unknown\',\r\n " + +" \'"); + + + #line 39 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceEventLocation(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'EventLocation\'\r\n );\r\n " + +" });\r\n \r\n \r\n " + +"\r\n"); + +WriteLiteral(" \r\n \r\n Description\r\n \r\n " + +" \r\n"); + +WriteLiteral(" "); + + + #line 51 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.Description)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 52 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 53 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFun" + +"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaInsuran" + +"ce_Description\'),\r\n \'None\',\r\n " + +" \'"); + + + #line 59 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceDescription(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'Description\'\r\n );\r\n " + +" });\r\n \r\n \r\n \r\n" + +""); + +WriteLiteral(" \r\n \r\n  \r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 71 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)); + + + #line default + #line hidden + + #line 71 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.LabelFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 72 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 73 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n
\r\n
\r\n " + +" Third Party Name
\r\n"); + +WriteLiteral(" "); + + + #line 78 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedName)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 79 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 80 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n
\r\n
\r\n " + +"
\r\n Why Third Parties Fault
\r\n"); + +WriteLiteral(" "); + + + #line 85 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedWhy)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 86 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 87 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n
\r\n \r\n + $(function () { + var thirdPartyField = $('#Job_JobMetaInsurance_ThirdPartyCaused'); + var thirdPartyDetails = $('#Job_JobMetaInsurance_ThirdPartyCaused_Details'); + var thirdPartyDetails_Changed = function (e, dontAnimate) { + if (thirdPartyField.is(':checked')) { + if (dontAnimate) { + thirdPartyDetails.show(); + } else { + thirdPartyDetails.slideDown(); + } + } else { + if (dontAnimate) { + thirdPartyDetails.hide(); + } else { + thirdPartyDetails.slideUp(); + } + } + }; + thirdPartyDetails_Changed(null, true); + thirdPartyField.change(thirdPartyDetails_Changed); + + document.DiscoFunctions.PropertyChangeHelper( + thirdPartyField, + null, + '"); + + + #line 115 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCaused(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral(@"', + 'ThirdPartyCaused' + ); + document.DiscoFunctions.PropertyChangeHelper( + $('#Job_JobMetaInsurance_ThirdPartyCausedName'), + 'None', + '"); + + + #line 121 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCausedName(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral(@"', + 'ThirdPartyCausedName' + ); + document.DiscoFunctions.PropertyChangeHelper( + $('#Job_JobMetaInsurance_ThirdPartyCausedWhy'), + 'Unknown', + '"); + + + #line 127 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceThirdPartyCausedWhy(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'ThirdPartyCausedWhy\'\r\n );" + +"\r\n });\r\n \r\n \r\n " + +" \r\n"); + +WriteLiteral(" \r\n \r\n Witnessed by (Name/Address)\r\n " + +" \r\n \r\n"); + +WriteLiteral(" "); + + + #line 139 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.WitnessesNamesAddresses)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 140 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 141 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.PropertyChangeHelper( + $('#Job_JobMetaInsurance_WitnessesNamesAddresses'), + 'None', + '"); + + + #line 147 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceWitnessesNamesAddresses(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'WitnessesNamesAddresses\'\r\n " + +" );\r\n });\r\n \r\n \r\n " + +" \r\n"); + +WriteLiteral(" \r\n \r\n Burglary/Theft - Method of Entry\r" + +"\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 159 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 160 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 161 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.PropertyChangeHelper( + $('#Job_JobMetaInsurance_BurglaryTheftMethodOfEntry'), + 'None', + '"); + + + #line 167 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceBurglaryTheftMethodOfEntry(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'BurglaryTheftMethodOfEntry\'\r\n " + +" );\r\n });\r\n \r\n \r\n" + +" \r\n"); + +WriteLiteral(" \r\n \r\n Property Last Seen\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 179 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PropertyLastSeenDate)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 180 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + var dateField = $('#Job_JobMetaInsurance_PropertyLastSeenDate'); + document.DiscoFunctions.DateChangeHelper( + dateField, + 'Unknown/NA', + '"); + + + #line 187 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsurancePropertyLastSeenDate(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'PropertyLastSeenDate\',\r\n null" + +"\r\n );\r\n });\r\n " + +"\r\n \r\n \r\n"); + +WriteLiteral(" \r\n \r\n  \r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 200 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotified)); + + + #line default + #line hidden + + #line 200 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.LabelFor(m => m.Job.JobMetaInsurance.PoliceNotified)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 201 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 202 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n
\r\n
\r\n " + +" Station
\r\n"); + +WriteLiteral(" "); + + + #line 207 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedStation)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 208 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 209 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n
\r\n
\r\n " + +"
\r\n Date
\r\n"); + +WriteLiteral(" "); + + + #line 214 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedDate)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 215 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n
\r\n
\r\n " + +"
\r\n Crime Report #
\r\n"); + +WriteLiteral(" "); + + + #line 220 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 221 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 222 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n
\r\n \r\n + $(function () { + var policeNotifiedField = $('#Job_JobMetaInsurance_PoliceNotified'); + var policeNotifiedDetails = $('#Job_JobMetaInsurance_PoliceNotified_Details'); + var policeNotifiedDetails_Changed = function (e, dontAnimate) { + if (policeNotifiedField.is(':checked')) { + if (dontAnimate) { + policeNotifiedDetails.show(); + } else { + policeNotifiedDetails.slideDown(); + } + } else { + if (dontAnimate) { + policeNotifiedDetails.hide(); + } else { + policeNotifiedDetails.slideUp(); + } + } + }; + policeNotifiedDetails_Changed(null, true); + policeNotifiedField.change(policeNotifiedDetails_Changed); + + document.DiscoFunctions.PropertyChangeHelper( + policeNotifiedField, + null, + '"); + + + #line 250 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotified(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral(@"', + 'PoliceNotified' + ); + document.DiscoFunctions.PropertyChangeHelper( + $('#Job_JobMetaInsurance_PoliceNotifiedStation'), + 'Unknown', + '"); + + + #line 256 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedStation(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral(@"', + 'PoliceNotifiedStation' + ); + var dateField = $('#Job_JobMetaInsurance_PoliceNotifiedDate'); + document.DiscoFunctions.DateChangeHelper( + dateField, + 'Unknown', + '"); + + + #line 263 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedDate(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral(@"', + 'PoliceNotifiedDate', + null, + true + ); + document.DiscoFunctions.PropertyChangeHelper( + $('#Job_JobMetaInsurance_PoliceNotifiedCrimeReportNo'), + 'Unknown', + '"); + + + #line 271 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsurancePoliceNotifiedCrimeReportNo(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'PoliceNotifiedCrimeReportNo\'\r\n " + +" );\r\n });\r\n \r\n \r" + +"\n \r\n"); + +WriteLiteral(" \r\n \r\n Action to Recover/Reduce Loss\r\n " + +" \r\n \r\n"); + +WriteLiteral(" "); + + + #line 283 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.RecoverReduceAction)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 284 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 285 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFun" + +"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaInsuran" + +"ce_RecoverReduceAction\'),\r\n \'None\',\r\n " + +" \'"); + + + #line 291 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceRecoverReduceAction(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'RecoverReduceAction\'\r\n );" + +"\r\n });\r\n \r\n \r\n " + +" \r\n"); + +WriteLiteral(" \r\n \r\n Other Interested Parties\r\n " + +" \r\n \r\n"); + +WriteLiteral(" "); + + + #line 303 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.OtherInterestedParties)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 304 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 305 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.PropertyChangeHelper( + $('#Job_JobMetaInsurance_OtherInterestedParties'), + 'None', + '"); + + + #line 311 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceOtherInterestedParties(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'OtherInterestedParties\'\r\n " + +" );\r\n });\r\n \r\n \r\n " + +" \r\n"); + +WriteLiteral(" \r\n \r\n Date of Purchase\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 323 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.DateOfPurchase)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 324 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + var dateField = $('#Job_JobMetaInsurance_DateOfPurchase'); + document.DiscoFunctions.DateChangeHelper( + dateField, + 'Unknown', + '"); + + + #line 331 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceDateOfPurchase(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'DateOfPurchase\',\r\n null,\r\n " + +" true\r\n );\r\n });\r\n" + +" \r\n \r\n \r\n"); + +WriteLiteral(" \r\n \r\n Claim Form Sent Date\r\n " + +" \r\n \r\n"); + +WriteLiteral(" "); + + + #line 345 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaInsurance.ClaimFormSentDate)); + + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 346 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString())); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 347 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.DateChangeUserHelper( + $('#Job_JobMetaInsurance_ClaimFormSentDate'), + $('#Job_JobMetaInsurance_ClaimFormSentUserId'), + 'Unknown', + '"); + + + #line 354 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateInsuranceClaimFormSentDate(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'ClaimFormSentDate\',\r\n"); + +WriteLiteral(" "); + + + #line 356 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Model.Job.OpenedDate.ToJavascriptDate()); + + + #line default + #line hidden +WriteLiteral("\r\n );\r\n });\r\n \r" + +"\n \r\n \r\n"); + + + #line 362 "..\..\Views\Job\JobParts\Insurance.cshtml" + } + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n Insurance Claim\r\n \r\n \r" + +"\n \r\n"); + + + #line 369 "..\..\Views\Job\JobParts\Insurance.cshtml" + + + #line default + #line hidden + + #line 369 "..\..\Views\Job\JobParts\Insurance.cshtml" + if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim) + { + + + #line default + #line hidden + + #line 371 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true))); + + + #line default + #line hidden + + #line 371 "..\..\Views\Job\JobParts\Insurance.cshtml" + + } + else + { + + + #line default + #line hidden + + #line 375 "..\..\Views\Job\JobParts\Insurance.cshtml" + Write(Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true))); + + + #line default + #line hidden + + #line 375 "..\..\Views\Job\JobParts\Insurance.cshtml" + + } + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n \r\n\r\n"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/Job/JobParts/JobMetaAdditions.cshtml b/Disco.Web/Views/Job/JobParts/JobMetaAdditions.cshtml index 1f3fa9dc..84c24f37 100644 --- a/Disco.Web/Views/Job/JobParts/JobMetaAdditions.cshtml +++ b/Disco.Web/Views/Job/JobParts/JobMetaAdditions.cshtml @@ -1,19 +1,19 @@ -@model Disco.Web.Models.Job.ShowModel -@using Disco.Models.Repository; -@{ - Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); -} -@switch (Model.Job.JobTypeId) -{ - case JobType.JobTypeIds.HWar: - @Html.Partial(MVC.Job.Views.JobParts.Warranty); - break; - case JobType.JobTypeIds.HNWar: - @Html.Partial(MVC.Job.Views.JobParts.NonWarranty); - break; - case JobType.JobTypeIds.UMgmt: - @Html.Partial(MVC.Job.Views.JobParts.Flags); - break; - default: - break; +@model Disco.Web.Models.Job.ShowModel +@using Disco.Models.Repository; +@{ + Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); +} +@switch (Model.Job.JobTypeId) +{ + case JobType.JobTypeIds.HWar: + @Html.Partial(MVC.Job.Views.JobParts.Warranty); + break; + case JobType.JobTypeIds.HNWar: + @Html.Partial(MVC.Job.Views.JobParts.NonWarranty); + break; + case JobType.JobTypeIds.UMgmt: + @Html.Partial(MVC.Job.Views.JobParts.Flags); + break; + default: + break; } \ No newline at end of file diff --git a/Disco.Web/Views/Job/JobParts/JobMetaAdditions1.generated.cs b/Disco.Web/Views/Job/JobParts/JobMetaAdditions1.generated.cs index 6c016cee..52fc7727 100644 --- a/Disco.Web/Views/Job/JobParts/JobMetaAdditions1.generated.cs +++ b/Disco.Web/Views/Job/JobParts/JobMetaAdditions1.generated.cs @@ -1,119 +1,119 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.Job.JobParts -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - - #line 2 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - using Disco.Models.Repository; - - #line default - #line hidden - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/JobMetaAdditions.cshtml")] - public class JobMetaAdditions : System.Web.Mvc.WebViewPage - { - public JobMetaAdditions() - { - } - public override void Execute() - { - - #line 3 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - - Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); - - - #line default - #line hidden -WriteLiteral("\r\n"); - - - #line 6 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - switch (Model.Job.JobTypeId) -{ - case JobType.JobTypeIds.HWar: - - - #line default - #line hidden - - #line 9 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - Write(Html.Partial(MVC.Job.Views.JobParts.Warranty)); - - - #line default - #line hidden - - #line 9 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - ; - break; - case JobType.JobTypeIds.HNWar: - - - #line default - #line hidden - - #line 12 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - Write(Html.Partial(MVC.Job.Views.JobParts.NonWarranty)); - - - #line default - #line hidden - - #line 12 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - ; - break; - case JobType.JobTypeIds.UMgmt: - - - #line default - #line hidden - - #line 15 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - Write(Html.Partial(MVC.Job.Views.JobParts.Flags)); - - - #line default - #line hidden - - #line 15 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" - ; - break; - default: - break; -} - - #line default - #line hidden - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.Job.JobParts +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + + #line 2 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + using Disco.Models.Repository; + + #line default + #line hidden + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/JobMetaAdditions.cshtml")] + public class JobMetaAdditions : System.Web.Mvc.WebViewPage + { + public JobMetaAdditions() + { + } + public override void Execute() + { + + #line 3 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + + Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers"); + + + #line default + #line hidden +WriteLiteral("\r\n"); + + + #line 6 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + switch (Model.Job.JobTypeId) +{ + case JobType.JobTypeIds.HWar: + + + #line default + #line hidden + + #line 9 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + Write(Html.Partial(MVC.Job.Views.JobParts.Warranty)); + + + #line default + #line hidden + + #line 9 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + ; + break; + case JobType.JobTypeIds.HNWar: + + + #line default + #line hidden + + #line 12 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + Write(Html.Partial(MVC.Job.Views.JobParts.NonWarranty)); + + + #line default + #line hidden + + #line 12 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + ; + break; + case JobType.JobTypeIds.UMgmt: + + + #line default + #line hidden + + #line 15 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + Write(Html.Partial(MVC.Job.Views.JobParts.Flags)); + + + #line default + #line hidden + + #line 15 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml" + ; + break; + default: + break; +} + + #line default + #line hidden + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/Job/JobParts/NonWarranty.cshtml b/Disco.Web/Views/Job/JobParts/NonWarranty.cshtml index 3adec048..866d8512 100644 --- a/Disco.Web/Views/Job/JobParts/NonWarranty.cshtml +++ b/Disco.Web/Views/Job/JobParts/NonWarranty.cshtml @@ -1,16 +1,16 @@ -@model Disco.Web.Models.Job.ShowModel -
- @Html.Partial(MVC.Job.Views.JobParts.Components) -
-
- @Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance) -
-
- @Html.Partial(MVC.Job.Views.JobParts.Repairs) -
-
- @Html.Partial(MVC.Job.Views.JobParts.Insurance) -
- +@model Disco.Web.Models.Job.ShowModel +
+ @Html.Partial(MVC.Job.Views.JobParts.Components) +
+
+ @Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance) +
+
+ @Html.Partial(MVC.Job.Views.JobParts.Repairs) +
+
+ @Html.Partial(MVC.Job.Views.JobParts.Insurance) +
+ diff --git a/Disco.Web/Views/Job/JobParts/NonWarranty.generated.cs b/Disco.Web/Views/Job/JobParts/NonWarranty.generated.cs index 8bb0a9cf..002bde24 100644 --- a/Disco.Web/Views/Job/JobParts/NonWarranty.generated.cs +++ b/Disco.Web/Views/Job/JobParts/NonWarranty.generated.cs @@ -1,123 +1,123 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.Job.JobParts -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/NonWarranty.cshtml")] - public class NonWarranty : System.Web.Mvc.WebViewPage - { - public NonWarranty() - { - } - public override void Execute() - { -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 3 "..\..\Views\Job\JobParts\NonWarranty.cshtml" -Write(Html.Partial(MVC.Job.Views.JobParts.Components)); - - - #line default - #line hidden -WriteLiteral("\r\n\r\n\r\n"); - -WriteLiteral(" "); - - - #line 6 "..\..\Views\Job\JobParts\NonWarranty.cshtml" -Write(Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance)); - - - #line default - #line hidden -WriteLiteral("\r\n\r\n\r\n"); - -WriteLiteral(" "); - - - #line 9 "..\..\Views\Job\JobParts\NonWarranty.cshtml" -Write(Html.Partial(MVC.Job.Views.JobParts.Repairs)); - - - #line default - #line hidden -WriteLiteral("\r\n\r\n\r\n"); - -WriteLiteral(" "); - - - #line 12 "..\..\Views\Job\JobParts\NonWarranty.cshtml" -Write(Html.Partial(MVC.Job.Views.JobParts.Insurance)); - - - #line default - #line hidden -WriteLiteral("\r\n\r\n - $('#jobDetailTabItems').append('
  • Components
  • Finance
  • Repairs
  • Insurance
  • '); - -"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.Job.JobParts +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/NonWarranty.cshtml")] + public class NonWarranty : System.Web.Mvc.WebViewPage + { + public NonWarranty() + { + } + public override void Execute() + { +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 3 "..\..\Views\Job\JobParts\NonWarranty.cshtml" +Write(Html.Partial(MVC.Job.Views.JobParts.Components)); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n\r\n"); + +WriteLiteral(" "); + + + #line 6 "..\..\Views\Job\JobParts\NonWarranty.cshtml" +Write(Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance)); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n\r\n"); + +WriteLiteral(" "); + + + #line 9 "..\..\Views\Job\JobParts\NonWarranty.cshtml" +Write(Html.Partial(MVC.Job.Views.JobParts.Repairs)); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n\r\n"); + +WriteLiteral(" "); + + + #line 12 "..\..\Views\Job\JobParts\NonWarranty.cshtml" +Write(Html.Partial(MVC.Job.Views.JobParts.Insurance)); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n + $('#jobDetailTabItems').append('
  • Components
  • Finance
  • Repairs
  • Insurance
  • '); + +"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.cshtml b/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.cshtml index 7dd14d1e..cb02157b 100644 --- a/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.cshtml +++ b/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.cshtml @@ -1,184 +1,184 @@ -@model Disco.Web.Models.Job.ShowModel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Accounting Charge Required - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeRequiredDate) - @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUser.ToString())) - @AjaxHelpers.AjaxLoader() - -
    - Accounting Charge Added - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeAddedDate) - @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeAddedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeAddedUser.ToString())) - @AjaxHelpers.AjaxLoader() - -
    - Accounting Charge Paid - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargePaidDate) - @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargePaidUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargePaidUser.ToString())) - @AjaxHelpers.AjaxLoader() - -
    - Purchase Order Raised - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderRaisedDate) - @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUser.ToString())) - @AjaxHelpers.AjaxLoader() - -
    - Purchase Order Reference - - @Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
    - Purchase Order Sent - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderSentDate) - @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderSentUser.ToString())) - @AjaxHelpers.AjaxLoader() - -
    - Invoice Received - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.InvoiceReceivedDate) - @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.InvoiceReceivedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.InvoiceReceivedUser.ToString())) - @AjaxHelpers.AjaxLoader() - -
    +@model Disco.Web.Models.Job.ShowModel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Accounting Charge Required + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeRequiredDate) + @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUser.ToString())) + @AjaxHelpers.AjaxLoader() + +
    + Accounting Charge Added + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeAddedDate) + @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeAddedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeAddedUser.ToString())) + @AjaxHelpers.AjaxLoader() + +
    + Accounting Charge Paid + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargePaidDate) + @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargePaidUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargePaidUser.ToString())) + @AjaxHelpers.AjaxLoader() + +
    + Purchase Order Raised + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderRaisedDate) + @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUser.ToString())) + @AjaxHelpers.AjaxLoader() + +
    + Purchase Order Reference + + @Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
    + Purchase Order Sent + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderSentDate) + @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderSentUser.ToString())) + @AjaxHelpers.AjaxLoader() + +
    + Invoice Received + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.InvoiceReceivedDate) + @(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.InvoiceReceivedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.InvoiceReceivedUser.ToString())) + @AjaxHelpers.AjaxLoader() + +
    diff --git a/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.generated.cs b/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.generated.cs index c9af42a0..116ac495 100644 --- a/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.generated.cs +++ b/Disco.Web/Views/Job/JobParts/NonWarrantyFinance.generated.cs @@ -1,561 +1,561 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.Job.JobParts -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/NonWarrantyFinance.cshtml")] - public class NonWarrantyFinance : System.Web.Mvc.WebViewPage - { - public NonWarrantyFinance() - { - } - public override void Execute() - { -WriteLiteral("\r\n \r\n \r\n Accounting Charge Required\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 8 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeRequiredDate)); - - - #line default - #line hidden -WriteLiteral("\r\n "); - - - #line 9 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUser.ToString())); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 10 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.DateChangeUserHelper( - $('#Job_JobMetaNonWarranty_AccountingChargeRequiredDate'), - $('#Job_JobMetaNonWarranty_AccountingChargeRequiredUser'), - 'Not Required', - '"); - - - #line 17 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargeRequired(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'AccountingChargeRequiredDate\',\r\n"); - -WriteLiteral(" "); - - - #line 19 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); - - - #line default - #line hidden -WriteLiteral("\r\n );\r\n });\r\n \r\n " + -" \r\n \r\n \r\n \r\n Accounting Charge Added\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 30 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeAddedDate)); - - - #line default - #line hidden -WriteLiteral("\r\n "); - - - #line 31 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeAddedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeAddedUser.ToString())); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 32 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.DateChangeUserHelper( - $('#Job_JobMetaNonWarranty_AccountingChargeAddedDate'), - $('#Job_JobMetaNonWarranty_AccountingChargeAddedUser'), - 'Not Added', - '"); - - - #line 39 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargeAdded(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'AccountingChargeAddedDate\',\r\n"); - -WriteLiteral(" "); - - - #line 41 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); - - - #line default - #line hidden -WriteLiteral("\r\n );\r\n });\r\n \r\n " + -" \r\n \r\n \r\n \r\n Accounting Charge Paid\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 52 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargePaidDate)); - - - #line default - #line hidden -WriteLiteral("\r\n "); - - - #line 53 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargePaidUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargePaidUser.ToString())); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 54 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.DateChangeUserHelper( - $('#Job_JobMetaNonWarranty_AccountingChargePaidDate'), - $('#Job_JobMetaNonWarranty_AccountingChargePaidUser'), - 'Not Paid', - '"); - - - #line 61 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargePaid(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'AccountingChargePaidDate\',\r\n"); - -WriteLiteral(" "); - - - #line 63 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); - - - #line default - #line hidden -WriteLiteral("\r\n );\r\n });\r\n \r\n " + -" \r\n \r\n \r\n \r\n Purchase Order Raised\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 74 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderRaisedDate)); - - - #line default - #line hidden -WriteLiteral("\r\n "); - - - #line 75 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUser.ToString())); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 76 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.DateChangeUserHelper( - $('#Job_JobMetaNonWarranty_PurchaseOrderRaisedDate'), - $('#Job_JobMetaNonWarranty_PurchaseOrderRaisedUser'), - 'Not Raised', - '"); - - - #line 83 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderRaised(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'PurchaseOrderRaisedDate\',\r\n"); - -WriteLiteral(" "); - - - #line 85 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); - - - #line default - #line hidden -WriteLiteral("\r\n );\r\n });\r\n \r\n " + -" \r\n \r\n \r\n \r\n Purchase Order Reference\r" + -"\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 96 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 97 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 98 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference'); - var $ajaxSave = $purchaseOrderReference.next('.ajaxSave'); - $purchaseOrderReference - .watermark('No Reference') - .focus(function () { $purchaseOrderReference.select() }) - .keydown(function (e) { - $ajaxSave.show(); - if (e.which == 13) { - $(this).blur(); - } - }).blur(function () { - $ajaxSave.hide(); - }) - .change(function () { - $ajaxSave.hide(); - $ajaxLoading = $ajaxSave.next('.ajaxLoading').show(); - var data = { PurchaseOrderReference: $purchaseOrderReference.val() }; - $.ajax({ - url: '"); - - - #line 119 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral(@"', - dataType: 'json', - data: data, - success: function (d) { - if (d == 'OK') { - $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); - } else { - $ajaxLoading.hide(); - alert('Unable to update purchase order reference: ' + d); - } - }, - error: function (jqXHR, textStatus, errorThrown) { - alert('Unable to update purchase order reference: ' + textStatus); - $ajaxLoading.hide(); - } - }); - }); - }); - - - - - \r\n Purchase Order Sent\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 145 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderSentDate)); - - - #line default - #line hidden -WriteLiteral("\r\n "); - - - #line 146 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderSentUser.ToString())); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 147 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.DateChangeUserHelper( - $('#Job_JobMetaNonWarranty_PurchaseOrderSentDate'), - $('#Job_JobMetaNonWarranty_PurchaseOrderSentUser'), - 'Not Sent', - '"); - - - #line 154 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderSent(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'PurchaseOrderSentDate\',\r\n"); - -WriteLiteral(" "); - - - #line 156 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); - - - #line default - #line hidden -WriteLiteral("\r\n );\r\n });\r\n \r\n " + -" \r\n \r\n \r\n \r\n Invoice Received\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 167 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.InvoiceReceivedDate)); - - - #line default - #line hidden -WriteLiteral("\r\n "); - - - #line 168 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.InvoiceReceivedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.InvoiceReceivedUser.ToString())); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 169 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - document.DiscoFunctions.DateChangeUserHelper( - $('#Job_JobMetaNonWarranty_InvoiceReceivedDate'), - $('#Job_JobMetaNonWarranty_InvoiceReceivedUser'), - 'Not Received', - '"); - - - #line 176 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyInvoiceReceived(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'InvoiceReceivedDate\',\r\n"); - -WriteLiteral(" "); - - - #line 178 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" - Write(Model.Job.OpenedDate.ToJavascriptDate()); - - - #line default - #line hidden -WriteLiteral("\r\n );\r\n });\r\n \r\n " + -" \r\n \r\n\r\n"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.Job.JobParts +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/NonWarrantyFinance.cshtml")] + public class NonWarrantyFinance : System.Web.Mvc.WebViewPage + { + public NonWarrantyFinance() + { + } + public override void Execute() + { +WriteLiteral("\r\n \r\n \r\n Accounting Charge Required\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 8 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeRequiredDate)); + + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 9 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUser.ToString())); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 10 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.DateChangeUserHelper( + $('#Job_JobMetaNonWarranty_AccountingChargeRequiredDate'), + $('#Job_JobMetaNonWarranty_AccountingChargeRequiredUser'), + 'Not Required', + '"); + + + #line 17 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargeRequired(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'AccountingChargeRequiredDate\',\r\n"); + +WriteLiteral(" "); + + + #line 19 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Model.Job.OpenedDate.ToJavascriptDate()); + + + #line default + #line hidden +WriteLiteral("\r\n );\r\n });\r\n \r\n " + +" \r\n \r\n \r\n \r\n Accounting Charge Added\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 30 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargeAddedDate)); + + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 31 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeAddedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeAddedUser.ToString())); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 32 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.DateChangeUserHelper( + $('#Job_JobMetaNonWarranty_AccountingChargeAddedDate'), + $('#Job_JobMetaNonWarranty_AccountingChargeAddedUser'), + 'Not Added', + '"); + + + #line 39 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargeAdded(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'AccountingChargeAddedDate\',\r\n"); + +WriteLiteral(" "); + + + #line 41 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Model.Job.OpenedDate.ToJavascriptDate()); + + + #line default + #line hidden +WriteLiteral("\r\n );\r\n });\r\n \r\n " + +" \r\n \r\n \r\n \r\n Accounting Charge Paid\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 52 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.AccountingChargePaidDate)); + + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 53 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargePaidUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargePaidUser.ToString())); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 54 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.DateChangeUserHelper( + $('#Job_JobMetaNonWarranty_AccountingChargePaidDate'), + $('#Job_JobMetaNonWarranty_AccountingChargePaidUser'), + 'Not Paid', + '"); + + + #line 61 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyAccountingChargePaid(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'AccountingChargePaidDate\',\r\n"); + +WriteLiteral(" "); + + + #line 63 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Model.Job.OpenedDate.ToJavascriptDate()); + + + #line default + #line hidden +WriteLiteral("\r\n );\r\n });\r\n \r\n " + +" \r\n \r\n \r\n \r\n Purchase Order Raised\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 74 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderRaisedDate)); + + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 75 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUser.ToString())); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 76 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.DateChangeUserHelper( + $('#Job_JobMetaNonWarranty_PurchaseOrderRaisedDate'), + $('#Job_JobMetaNonWarranty_PurchaseOrderRaisedUser'), + 'Not Raised', + '"); + + + #line 83 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderRaised(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'PurchaseOrderRaisedDate\',\r\n"); + +WriteLiteral(" "); + + + #line 85 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Model.Job.OpenedDate.ToJavascriptDate()); + + + #line default + #line hidden +WriteLiteral("\r\n );\r\n });\r\n \r\n " + +" \r\n \r\n \r\n \r\n Purchase Order Reference\r" + +"\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 96 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 97 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 98 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference'); + var $ajaxSave = $purchaseOrderReference.next('.ajaxSave'); + $purchaseOrderReference + .watermark('No Reference') + .focus(function () { $purchaseOrderReference.select() }) + .keydown(function (e) { + $ajaxSave.show(); + if (e.which == 13) { + $(this).blur(); + } + }).blur(function () { + $ajaxSave.hide(); + }) + .change(function () { + $ajaxSave.hide(); + $ajaxLoading = $ajaxSave.next('.ajaxLoading').show(); + var data = { PurchaseOrderReference: $purchaseOrderReference.val() }; + $.ajax({ + url: '"); + + + #line 119 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral(@"', + dataType: 'json', + data: data, + success: function (d) { + if (d == 'OK') { + $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow'); + } else { + $ajaxLoading.hide(); + alert('Unable to update purchase order reference: ' + d); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + alert('Unable to update purchase order reference: ' + textStatus); + $ajaxLoading.hide(); + } + }); + }); + }); + + + + + \r\n Purchase Order Sent\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 145 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderSentDate)); + + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 146 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderSentUser.ToString())); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 147 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.DateChangeUserHelper( + $('#Job_JobMetaNonWarranty_PurchaseOrderSentDate'), + $('#Job_JobMetaNonWarranty_PurchaseOrderSentUser'), + 'Not Sent', + '"); + + + #line 154 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderSent(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'PurchaseOrderSentDate\',\r\n"); + +WriteLiteral(" "); + + + #line 156 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Model.Job.OpenedDate.ToJavascriptDate()); + + + #line default + #line hidden +WriteLiteral("\r\n );\r\n });\r\n \r\n " + +" \r\n \r\n \r\n \r\n Invoice Received\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 167 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.InvoiceReceivedDate)); + + + #line default + #line hidden +WriteLiteral("\r\n "); + + + #line 168 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.InvoiceReceivedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.InvoiceReceivedUser.ToString())); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 169 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + document.DiscoFunctions.DateChangeUserHelper( + $('#Job_JobMetaNonWarranty_InvoiceReceivedDate'), + $('#Job_JobMetaNonWarranty_InvoiceReceivedUser'), + 'Not Received', + '"); + + + #line 176 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyInvoiceReceived(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'InvoiceReceivedDate\',\r\n"); + +WriteLiteral(" "); + + + #line 178 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml" + Write(Model.Job.OpenedDate.ToJavascriptDate()); + + + #line default + #line hidden +WriteLiteral("\r\n );\r\n });\r\n \r\n " + +" \r\n \r\n\r\n"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/Job/JobParts/Repairs.cshtml b/Disco.Web/Views/Job/JobParts/Repairs.cshtml index 4233b085..c65b073b 100644 --- a/Disco.Web/Views/Job/JobParts/Repairs.cshtml +++ b/Disco.Web/Views/Job/JobParts/Repairs.cshtml @@ -1,85 +1,85 @@ -@model Disco.Web.Models.Job.ShowModel - - - - - - - - - - - - - - - - - -
    - Repairer Name - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
    - Repair Logged - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerLoggedDate) - @AjaxHelpers.AjaxLoader() - -
    - Repair Reference - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
    - Repair Completed - - @Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerCompletedDate) - @AjaxHelpers.AjaxLoader() - -
    +@model Disco.Web.Models.Job.ShowModel + + + + + + + + + + + + + + + + + +
    + Repairer Name + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
    + Repair Logged + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerLoggedDate) + @AjaxHelpers.AjaxLoader() + +
    + Repair Reference + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference) + @AjaxHelpers.AjaxSave() + @AjaxHelpers.AjaxLoader() + +
    + Repair Completed + + @Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerCompletedDate) + @AjaxHelpers.AjaxLoader() + +
    diff --git a/Disco.Web/Views/Job/JobParts/Repairs.generated.cs b/Disco.Web/Views/Job/JobParts/Repairs.generated.cs index c095f53a..4f358e47 100644 --- a/Disco.Web/Views/Job/JobParts/Repairs.generated.cs +++ b/Disco.Web/Views/Job/JobParts/Repairs.generated.cs @@ -1,256 +1,256 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.Job.JobParts -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Repairs.cshtml")] - public class Repairs : System.Web.Mvc.WebViewPage - { - public Repairs() - { - } - public override void Execute() - { -WriteLiteral("\r\n \r\n \r\n Repairer Name\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 8 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 9 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 10 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFunctions.P" + -"ropertyChangeHelper(\r\n $(\'#Job_JobMetaNonWarranty_Rep" + -"airerName\'),\r\n \'Unknown\',\r\n " + -" \'"); - - - #line 16 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'RepairerName\'\r\n );\r\n " + -" });\r\n \r\n \r\n \r\n \r\n " + -" \r\n Repair Logged\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 28 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerLoggedDate)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 29 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - var dateField = $('#Job_JobMetaNonWarranty_RepairerLoggedDate'); - document.DiscoFunctions.DateChangeHelper( - dateField, - 'Unknown', - '"); - - - #line 36 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerLoggedDate(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'RepairerLoggedDate\',\r\n null\r\n" + -" );\r\n });\r\n \r\n " + -"\r\n \r\n \r\n \r\n Repair Reference\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 49 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 50 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(AjaxHelpers.AjaxSave()); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 51 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFunctions.P" + -"ropertyChangeHelper(\r\n $(\'#Job_JobMetaNonWarranty_Rep" + -"airerReference\'),\r\n \'Unknown\',\r\n " + -" \'"); - - - #line 57 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'RepairerReference\'\r\n );\r\n" + -" });\r\n \r\n \r\n \r\n \r\n" + -" \r\n Repair Completed\r\n \r\n \r\n"); - -WriteLiteral(" "); - - - #line 69 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerCompletedDate)); - - - #line default - #line hidden -WriteLiteral("\r\n"); - -WriteLiteral(" "); - - - #line 70 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(AjaxHelpers.AjaxLoader()); - - - #line default - #line hidden -WriteLiteral("\r\n - $(function () { - var dateField = $('#Job_JobMetaNonWarranty_RepairerCompletedDate'); - document.DiscoFunctions.DateChangeHelper( - dateField, - 'Unknown', - '"); - - - #line 77 "..\..\Views\Job\JobParts\Repairs.cshtml" - Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n \'RepairerCompletedDate\',\r\n nul" + -"l\r\n );\r\n });\r\n \r\n " + -" \r\n \r\n\r\n"); - - } - } -} -#pragma warning restore 1591 +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.Job.JobParts +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco.BI.Extensions; + using Disco.Models.Repository; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Repairs.cshtml")] + public class Repairs : System.Web.Mvc.WebViewPage + { + public Repairs() + { + } + public override void Execute() + { +WriteLiteral("\r\n \r\n \r\n Repairer Name\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 8 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 9 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 10 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFunctions.P" + +"ropertyChangeHelper(\r\n $(\'#Job_JobMetaNonWarranty_Rep" + +"airerName\'),\r\n \'Unknown\',\r\n " + +" \'"); + + + #line 16 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'RepairerName\'\r\n );\r\n " + +" });\r\n \r\n \r\n \r\n \r\n " + +" \r\n Repair Logged\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 28 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerLoggedDate)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 29 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + var dateField = $('#Job_JobMetaNonWarranty_RepairerLoggedDate'); + document.DiscoFunctions.DateChangeHelper( + dateField, + 'Unknown', + '"); + + + #line 36 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerLoggedDate(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'RepairerLoggedDate\',\r\n null\r\n" + +" );\r\n });\r\n \r\n " + +"\r\n \r\n \r\n \r\n Repair Reference\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 49 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 50 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(AjaxHelpers.AjaxSave()); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 51 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n \r\n $(function () {\r\n document.DiscoFunctions.P" + +"ropertyChangeHelper(\r\n $(\'#Job_JobMetaNonWarranty_Rep" + +"airerReference\'),\r\n \'Unknown\',\r\n " + +" \'"); + + + #line 57 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'RepairerReference\'\r\n );\r\n" + +" });\r\n \r\n \r\n \r\n \r\n" + +" \r\n Repair Completed\r\n \r\n \r\n"); + +WriteLiteral(" "); + + + #line 69 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerCompletedDate)); + + + #line default + #line hidden +WriteLiteral("\r\n"); + +WriteLiteral(" "); + + + #line 70 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(AjaxHelpers.AjaxLoader()); + + + #line default + #line hidden +WriteLiteral("\r\n + $(function () { + var dateField = $('#Job_JobMetaNonWarranty_RepairerCompletedDate'); + document.DiscoFunctions.DateChangeHelper( + dateField, + 'Unknown', + '"); + + + #line 77 "..\..\Views\Job\JobParts\Repairs.cshtml" + Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerCompletedDate(Model.Job.Id, null))); + + + #line default + #line hidden +WriteLiteral("\',\r\n \'RepairerCompletedDate\',\r\n nul" + +"l\r\n );\r\n });\r\n \r\n " + +" \r\n \r\n\r\n"); + + } + } +} +#pragma warning restore 1591 diff --git a/Disco.Web/Views/Job/JobParts/Resources.cshtml b/Disco.Web/Views/Job/JobParts/Resources.cshtml index b8a687d9..7debc24b 100644 --- a/Disco.Web/Views/Job/JobParts/Resources.cshtml +++ b/Disco.Web/Views/Job/JobParts/Resources.cshtml @@ -1,332 +1,332 @@ -@model Disco.Web.Models.Job.ShowModel -@{ - Html.BundleDeferred("~/Style/Shadowbox"); - Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox"); -} - - - - - -
    -
    - @foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp)) - { -
    - @jl.TechUser.ToString()@jl.Timestamp.ToFuzzy() - @jl.Comments.ToMultilineJobRefString() -
    - } -
    -
    - - -
    - -
    - -
    - -
    - -
    -
    -
    -
    -
    -
    -

    - - Are you sure? -

    -
    -
    -

    - - Are you sure? -

    -
    +@model Disco.Web.Models.Job.ShowModel +@{ + Html.BundleDeferred("~/Style/Shadowbox"); + Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox"); +} + + + + + +
    +
    + @foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp)) + { +
    + @jl.TechUser.ToString()@jl.Timestamp.ToFuzzy() + @jl.Comments.ToMultilineJobRefString() +
    + } +
    +
    + + +
    + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    +

    + + Are you sure? +

    +
    +
    +

    + + Are you sure? +

    +
    diff --git a/Disco.Web/Views/Job/JobParts/Resources.generated.cs b/Disco.Web/Views/Job/JobParts/Resources.generated.cs index c4e30ed0..3b9a3b76 100644 --- a/Disco.Web/Views/Job/JobParts/Resources.generated.cs +++ b/Disco.Web/Views/Job/JobParts/Resources.generated.cs @@ -1,718 +1,718 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.17929 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Disco.Web.Views.Job.JobParts -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Text; - using System.Web; - using System.Web.Helpers; - using System.Web.Mvc; - using System.Web.Mvc.Ajax; - using System.Web.Mvc.Html; - using System.Web.Routing; - using System.Web.Security; - using System.Web.UI; - using System.Web.WebPages; - using Disco.BI.Extensions; - using Disco.Models.Repository; - using Disco.Web; - using Disco.Web.Extensions; - - [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/Resources.cshtml")] - public class Resources : System.Web.Mvc.WebViewPage - { - public Resources() - { - } - public override void Execute() - { - - #line 2 "..\..\Views\Job\JobParts\Resources.cshtml" - - Html.BundleDeferred("~/Style/Shadowbox"); - Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox"); - - - #line default - #line hidden -WriteLiteral("\r\n\r\n \r\n \r\n \r\n"); - - - #line 10 "..\..\Views\Job\JobParts\Resources.cshtml" - - - #line default - #line hidden - - #line 10 "..\..\Views\Job\JobParts\Resources.cshtml" - foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp)) - { - - - #line default - #line hidden -WriteLiteral("