├── .gitattributes ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── Libraries ├── MFaaP.MFilesAPI.Tests │ ├── ExtensionMethods │ │ ├── IMFilesServerApplicationExtensionMethods.cs │ │ └── ISearchConditionsExtensionMethods.cs │ ├── MFaaP.MFilesAPI.Tests.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── MFaaP.MFilesAPI │ ├── AuthenticationDetails.cs │ ├── ConnectionDetails.cs │ ├── ConnectionType.cs │ ├── ExtensionMethods │ │ ├── IMFilesServerApplicationExtensionMethods.cs │ │ ├── ISearchConditionsExtensionMethods.cs │ │ └── IVaultObjectSearchOperationsExtensionMethods.cs │ ├── MFaaP.MFilesAPI.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Readme.md │ └── ServerDetails.cs ├── Postman │ ├── M-Files.postman_collection.json │ ├── localhost.postman_environment.json │ └── readme.md └── Readme.md ├── MFSamplesAndLibraries.sln ├── MFSamplesAndLibraries.sln.DotSettings ├── MFWSSamplesAndLibraries.sln ├── Readme.md ├── Samples ├── COM API │ ├── SearchByDisplayId │ │ ├── App.config │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ └── SearchByDisplayId.csproj │ └── SegmentedSearch │ │ ├── App.config │ │ ├── Program.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ └── SegmentedSearch.csproj ├── EventTracing │ ├── vaf │ │ ├── EventTracing.csproj │ │ ├── MFVaultApplicationInstaller.exe │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── appdef.xml │ │ ├── packages.config │ │ └── src │ │ │ ├── VaultApplication.Lifecycle.cs │ │ │ ├── VaultApplication.VaultEvents.cs │ │ │ └── VaultApplication.cs │ └── vault │ │ └── Event Tracing.mfb ├── GenerateApplicationPreApprovalKey │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── GenerateApplicationPreApprovalKey.App.csproj │ ├── GenerateApplicationPreApprovalKey.App.csproj.DotSettings │ ├── Helpers │ │ ├── ActionCommand.cs │ │ └── PasswordBoxAssistant.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── MarkupExtension │ │ └── EnumToItemsSource.cs │ ├── Properties │ │ ├── Annotations.cs │ │ ├── Annotations1.cs │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Readme.md │ ├── ValueConverters │ │ ├── IsNullValueConverter.cs │ │ └── MFAuthTypeToStringValueConverter.cs │ └── ViewModels │ │ └── MainWindowViewModel.cs ├── OAuth │ ├── COMAPI │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AssemblyInfo.cs │ │ ├── COMAPI.csproj │ │ ├── Controls │ │ │ ├── MFConnectionDetails.xaml │ │ │ └── MFConnectionDetails.xaml.cs │ │ ├── ExtensionMethods │ │ │ └── PluginInfoExtensionMethods.cs │ │ ├── MainWindow.xaml │ │ └── MainWindow.xaml.cs │ ├── Common │ │ ├── Common.csproj │ │ ├── ExtensionMethods │ │ │ ├── IEnumerableExtensionMethods.cs │ │ │ ├── RestRequestExtensionMethods.cs │ │ │ └── UriBuilderExtensionMethods.cs │ │ └── OAuth2TokenResponse.cs │ └── RESTAPI │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AssemblyInfo.cs │ │ ├── Controls │ │ ├── MFConnectionDetails.xaml │ │ └── MFConnectionDetails.xaml.cs │ │ ├── ExtensionMethods │ │ └── PluginInfoExtensionMethods.cs │ │ ├── MFWSStructs.cs │ │ ├── MainWindow.xaml │ │ ├── MainWindow.xaml.cs │ │ └── RESTAPI.csproj ├── Processes │ ├── ClientToServerCode │ │ ├── MFVaultApplicationInstaller.exe │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ ├── ServerComponent.csproj │ │ ├── UIX │ │ │ ├── appdef.xml │ │ │ └── main.js │ │ ├── appdef.xml │ │ ├── packages.config │ │ ├── src │ │ │ └── VaultApplication.cs │ │ └── vault-backup.mfb │ ├── CopyingObjects │ │ ├── readme.md │ │ ├── vaf │ │ │ ├── CopyingObjects.csproj │ │ │ ├── MFVaultApplicationInstaller.exe │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ ├── packages.config │ │ │ └── src │ │ │ │ └── VaultApplication.cs │ │ ├── vault │ │ │ └── Vault Backup.mfb │ │ └── vbscript │ │ │ └── VBScript.txt │ ├── MaintainOriginalTemplate │ │ ├── Readme.md │ │ ├── vaf │ │ │ ├── MFVaultApplicationInstaller.exe │ │ │ ├── MaintainOriginalTemplate.csproj │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── appdef.xml │ │ │ ├── packages.config │ │ │ └── src │ │ │ │ └── VaultApplication.cs │ │ └── vault │ │ │ └── MaintainOriginalTemplate.mfb │ └── Readme.md ├── REST API │ ├── MFWSCheckOutStatus │ │ ├── App.config │ │ ├── MFWSCheckOutStatus.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ └── packages.config │ ├── MFWSDownloading │ │ ├── App.config │ │ ├── MFWSDownloading.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ └── packages.config │ ├── MFWSSearching │ │ ├── App.config │ │ ├── MFWSSearching.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ └── packages.config │ ├── MFWSVaultStructure │ │ ├── App.config │ │ ├── MFWSVaultStructure.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ └── packages.config │ └── MFWSViewNavigation │ │ ├── App.config │ │ ├── MFWSViewNavigation.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ └── packages.config ├── Readme.md ├── UIX Applications │ ├── Readme.md │ ├── Version1 │ │ ├── AlterContextMenuDependingOnSelectedObject │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ ├── dashboard.html │ │ │ └── main.js │ │ ├── AssignToMe │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ ├── icons │ │ │ │ ├── clipboard.ico │ │ │ │ └── clipboard.png │ │ │ └── main.js │ │ ├── BuiltInCommandEvent │ │ │ ├── appdef.xml │ │ │ └── main.js │ │ ├── Commands │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ ├── icons │ │ │ │ └── uparrow.ico │ │ │ └── main.js │ │ ├── ConfirmWorkflowStateChange │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ └── vaultui.js │ │ ├── DisplayPersistentWebPageInTab │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ └── main.js │ │ ├── HelloWorld │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ └── main.js │ │ ├── OpenExternalApplicationOnCommand │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ └── main.js │ │ ├── PowerBI │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ ├── mfshell.js │ │ │ ├── png │ │ │ │ ├── Report2.ico │ │ │ │ └── disabled.ico │ │ │ └── style.css │ │ ├── Readme.md │ │ ├── ShowWebPageInIFrame │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ ├── dashboard.html │ │ │ └── main.js │ │ ├── UsingManagedAssemblies │ │ │ ├── Readme.md │ │ │ ├── classlibrary │ │ │ │ ├── Class1.cs │ │ │ │ ├── MyClassLibrary.csproj │ │ │ │ └── Properties │ │ │ │ │ └── AssemblyInfo.cs │ │ │ └── uix │ │ │ │ ├── MyClassLibrary.dll │ │ │ │ ├── appdef.xml │ │ │ │ └── main.js │ │ └── ViewURLGenerator │ │ │ ├── Application.js │ │ │ ├── Readme.md │ │ │ ├── appdef.xml │ │ │ ├── dashboard.html │ │ │ └── jquery-1.7.1.min.js │ └── Version2 │ │ ├── Assign to me UIX sample │ │ ├── README.md │ │ ├── appdef.xml │ │ ├── main.js │ │ └── screenshots │ │ │ ├── CreateAssignment_1.png │ │ │ └── CreateAssignment_2.png │ │ ├── Built-in Command Demonstration │ │ ├── README.md │ │ ├── appdef.xml │ │ ├── main.js │ │ └── screenshots │ │ │ ├── BuiltInCommands_1.png │ │ │ └── BuiltInCommands_2.png │ │ ├── Commands │ │ ├── README.md │ │ ├── appdef.xml │ │ ├── main.js │ │ └── screenshots │ │ │ ├── Commands_1.png │ │ │ ├── Commands_2.png │ │ │ ├── Commands_3.png │ │ │ ├── Commands_4.png │ │ │ └── Commands_5.png │ │ ├── HelloWord │ │ ├── README.md │ │ ├── appdef.xml │ │ ├── main.js │ │ └── screenshots │ │ │ ├── HelloWorld_1.png │ │ │ ├── HelloWorld_2.png │ │ │ └── HelloWorld_3.png │ │ ├── PopUp Dashboard │ │ ├── README.md │ │ ├── appdef.xml │ │ ├── dashboard.js │ │ ├── index.html │ │ ├── main.js │ │ ├── screenshots │ │ │ ├── PopupDashboard_1.png │ │ │ ├── PopupDashboard_2.png │ │ │ └── PopupDashboard_3.png │ │ └── style.css │ │ ├── PopUpDashboardWithAccentColor │ │ ├── appdef.xml │ │ ├── dashboard.js │ │ ├── index.html │ │ ├── main.js │ │ ├── screenshots │ │ │ ├── PopupDashboard_1.png │ │ │ ├── PopupDashboard_2.png │ │ │ ├── PopupDashboard_3.png │ │ │ └── PopupDashboard_4.png │ │ └── style.css │ │ └── ShellFrameAndDashboard │ │ ├── dist │ │ ├── appdef.xml │ │ ├── index.html │ │ ├── shellui.js │ │ └── style.css │ │ ├── package.json │ │ ├── screenshot │ │ ├── Dashboard_1.png │ │ ├── Dashboard_2.png │ │ └── Dashboard_3.png │ │ ├── src │ │ └── index.js │ │ └── webpack.config.js └── VAF │ ├── .gitignore │ ├── ComplexConfiguration │ ├── ComplexConfiguration.sln │ ├── ComplexConfiguration │ │ ├── ComplexConfiguration.csproj │ │ ├── ConfigurationEditors │ │ │ ├── ColorConfigurationEditors.cs │ │ │ ├── ConfigurationEditors.cs │ │ │ ├── DateConfigurationEditors.cs │ │ │ ├── MFIdentifierConfigurationEditors.cs │ │ │ ├── NumericConfigurationEditors.cs │ │ │ ├── PlaceholderConfigurationEditors.cs │ │ │ ├── PreconfiguredListConfigurationEditors.cs │ │ │ ├── SearchConditionsConfigurationEditors.cs │ │ │ ├── TextConfigurationEditors.cs │ │ │ ├── TimeConfigurationEditors.cs │ │ │ └── TimestampConfigurationEditors.cs │ │ ├── Lists │ │ │ ├── Lists.cs │ │ │ ├── MFIdentifiers.cs │ │ │ ├── POCOs.cs │ │ │ └── SimpleDataTypes.cs │ │ ├── MyConfiguration.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ ├── ShowingAndHidingConfigurationOptions │ │ │ ├── HidingConfigurationOptions.cs │ │ │ ├── ShowingAndHidingConfigurationOptions.cs │ │ │ └── ShowingConfigurationOptions.cs │ │ ├── VaultApplication.CustomValidation.cs │ │ ├── VaultApplication.Dashboard.cs │ │ ├── VaultApplication.cs │ │ ├── appdef.xml │ │ ├── install-application.ps1 │ │ └── packages.config │ ├── NuGet.Config │ └── packages │ │ ├── MFiles.VAF.2.0.0.0 │ │ ├── lib │ │ │ └── net45 │ │ │ │ ├── MFiles.Crypto.dll │ │ │ │ ├── MFiles.VAF.Configuration.dll │ │ │ │ ├── MFiles.VAF.Configuration.xml │ │ │ │ ├── MFiles.VAF.XML │ │ │ │ └── MFiles.VAF.dll │ │ └── readme.txt │ │ └── MSBuildTasks.1.5.0.196 │ │ ├── build │ │ └── MSBuildTasks.targets │ │ └── tools │ │ ├── MSBuild.Community.Tasks.Targets │ │ ├── MSBuild.Community.Tasks.dll │ │ ├── MSBuild.Community.Tasks.xml │ │ └── MSBuild.Community.Tasks.xsd │ ├── MultiServerMode │ ├── BroadcastTaskQueue │ │ ├── BroadcastTaskQueue.csproj │ │ ├── Configuration.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── VaultApplication.cs │ │ ├── appdef.xml │ │ ├── install-application.ps1 │ │ └── packages.config │ ├── ConcurrentTaskQueue │ │ ├── ConcurrentTaskQueue.csproj │ │ ├── Configuration.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── VaultApplication.cs │ │ ├── appdef.xml │ │ ├── install-application.ps1 │ │ └── packages.config │ ├── MultiServerMode.sln │ ├── RecurringTask │ │ ├── Configuration.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── RecurringTask.csproj │ │ ├── VaultApplication.cs │ │ ├── appdef.xml │ │ ├── install-application.ps1 │ │ └── packages.config │ └── SequentialTaskQueue │ │ ├── Configuration.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── SequentialTaskQueue.csproj │ │ ├── VaultApplication.cs │ │ ├── appdef.xml │ │ ├── install-application.ps1 │ │ └── packages.config │ ├── SimpleConfiguration │ ├── NuGet.Config │ ├── SimpleConfiguration.sln │ ├── SimpleConfiguration │ │ ├── MyConfiguration.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Readme.md │ │ ├── SimpleConfiguration.csproj │ │ ├── VaultApplication.cs │ │ ├── appdef.xml │ │ ├── install-application.ps1 │ │ └── packages.config │ └── packages │ │ ├── MFiles.VAF.2.0.0.0 │ │ ├── lib │ │ │ └── net45 │ │ │ │ ├── MFiles.Crypto.dll │ │ │ │ ├── MFiles.VAF.Configuration.dll │ │ │ │ ├── MFiles.VAF.Configuration.xml │ │ │ │ ├── MFiles.VAF.XML │ │ │ │ └── MFiles.VAF.dll │ │ └── readme.txt │ │ └── MSBuildTasks.1.5.0.196 │ │ ├── build │ │ └── MSBuildTasks.targets │ │ └── tools │ │ ├── MSBuild.Community.Tasks.Targets │ │ ├── MSBuild.Community.Tasks.dll │ │ ├── MSBuild.Community.Tasks.xml │ │ └── MSBuild.Community.Tasks.xsd │ └── XmlImporter │ ├── Licensing │ ├── sample.Keys.conf │ ├── sample.mflconf │ └── valid.lic │ ├── XmlImporter.sln │ ├── XmlImporter │ ├── AttachedFileConfiguration.cs │ ├── AttachedFileHandlingStrategy.cs │ ├── Configuration.cs │ ├── FileLocationStrategy.cs │ ├── FileNotFoundHandlingStrategy.cs │ ├── ImportExceptionHandlingStrategy.cs │ ├── ImportInstruction.cs │ ├── ObjectSelector.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── PropertySelector.cs │ ├── Readme.md │ ├── StaticPropertyValue.cs │ ├── VaultApplication.BackgroundOperations.cs │ ├── VaultApplication.Dashboard.cs │ ├── VaultApplication.ExceptionHandling.cs │ ├── VaultApplication.ImportXmlFile.cs │ ├── VaultApplication.Licensing.cs │ ├── VaultApplication.cs │ ├── XPathSelector.cs │ ├── XmlImporter.csproj │ ├── XmlNamespace.cs │ ├── appdef.xml │ ├── install-application.ps1 │ └── packages.config │ └── packages │ ├── MFiles.VAF.2.0.0.0 │ ├── lib │ │ └── net45 │ │ │ ├── MFiles.Crypto.dll │ │ │ ├── MFiles.VAF.Configuration.dll │ │ │ ├── MFiles.VAF.Configuration.xml │ │ │ ├── MFiles.VAF.XML │ │ │ └── MFiles.VAF.dll │ └── readme.txt │ └── MSBuildTasks.1.5.0.196 │ ├── build │ └── MSBuildTasks.targets │ └── tools │ ├── MSBuild.Community.Tasks.Targets │ ├── MSBuild.Community.Tasks.dll │ ├── MSBuild.Community.Tasks.xml │ └── MSBuild.Community.Tasks.xsd └── Visual Studio Snippets └── Vault Application Framework ├── Licence.txt ├── Properties └── AssemblyInfo.cs ├── Readme.md ├── Snippets └── CSharp │ └── MFilesVAF │ ├── MFVAFConfiguration.snippet │ ├── MFVAFEventHandlers.snippet │ ├── MFVAFProperties.snippet │ ├── MFVAFVaultExtensionMethods.snippet │ └── MFVAFWorkflows.snippet ├── VAFSnippets.csproj ├── VAFSnippets.pkgdef ├── packages.config └── source.extension.vsixmanifest /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright (c) 2017 M-Files Oy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | **THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE.** 22 | -------------------------------------------------------------------------------- /Libraries/MFaaP.MFilesAPI.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MFaaP.MFilesAPI.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MFaaP.MFilesAPI.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6941c5d4-1d26-418a-9367-e511df913a4d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Libraries/MFaaP.MFilesAPI.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Libraries/MFaaP.MFilesAPI/ConnectionType.cs: -------------------------------------------------------------------------------- 1 | namespace MFaaP.MFilesAPI 2 | { 3 | /// 4 | /// The type of connection to make to the server. 5 | /// 6 | public enum ConnectionType 7 | { 8 | /// 9 | /// An unknown connection type; will fail if used. 10 | /// 11 | Unknown = 0, 12 | 13 | /// 14 | /// A connection using TCP/IP. 15 | /// Equivalent to the protocol sequence "ncacn_ip_tcp" in the API. 16 | /// 17 | TcpIp = 1, 18 | 19 | /// 20 | /// A connection using HTTPS. 21 | /// Equivalent to the protocol squence "ncacn_http" in the API. 22 | /// 23 | Https = 2, 24 | 25 | /// 26 | /// A connection using a local interprocess call (LPC). 27 | /// Equivalent to the protocol squence "ncalrpc" in the API. 28 | /// 29 | Lpc = 3 30 | } 31 | } -------------------------------------------------------------------------------- /Libraries/MFaaP.MFilesAPI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("MFaaP.MFilesAPI")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("MFaaP.MFilesAPI")] 12 | [assembly: AssemblyCopyright("Copyright © 2017")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("82567936-e6eb-45e5-9faf-8eefcd92f7bb")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Libraries/Postman/readme.md: -------------------------------------------------------------------------------- 1 | # Getting started with the M-Files Postman Collection and Environment 2 | 3 | 1. Make sure that M-Files Web is enabled in the development environment. 4 | 1. Install [Postman](https://www.getpostman.com/) from their website. 5 | 1. Open Postman. 6 | 1. Import the two json files (`M-Files.postman_collection.json` and `localhost.postman_environment.json`). 7 | 1. Edit the environment to change the `MFWSUrl` to the REST API url of your environment (M-Files Web Url + /REST). 8 | 1. Under `1. Connection group` Select the `Login to Vault` request. 9 | 1. Modify the body of the request to contain credentials and vault guid for the vault in your environment. 10 | 1. Click Send. The response is the authentication token to the vault. 11 | 1. Edit the environment to change the `MFAuthenticationToken` to be the value from previous response. 12 | 1. Test other requests. Some of them will require you to change some values in the environment or in the request url and body. 13 | 14 | -------------------------------------------------------------------------------- /Libraries/Readme.md: -------------------------------------------------------------------------------- 1 | # M-Files Libraries 2 | 3 | *Please note that these libraries are provided "as-is" and with no warranty, explicit or otherwise. You should ensure that the functionality of these libraries meet your requirements, and thoroughly test them, prior to using in any production scenarios.* 4 | 5 | The following helper libraries are provided as work-in-progress, and may not be fully complete. 6 | 7 | ## MFaaP.MFilesAPI (M-Files API Helper Library) 8 | 9 | This library provides helper and extension methods to more easily work with the M-Files API. 10 | 11 | It currently provides the following functionality: 12 | 13 | * Connection/Disconnection 14 | * Searching 15 | * Creation of "Not Deleted" search condition 16 | * Creation of "Object Type" search condition 17 | * Creation of "Display Id" search condition 18 | * Execution of a segmented search to enumerate all objects in a large vault 19 | 20 | Further details are available within the [project folder](MFaaP.MFilesAPI). 21 | 22 | ## MFaaP.MFWSClient (C# M-Files Web Service Wrapper) 23 | 24 | This library has been moved to [https://github.com/M-Files/Libraries.MFWSClient](https://github.com/M-Files/Libraries.MFWSClient). -------------------------------------------------------------------------------- /Samples/COM API/SearchByDisplayId/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/COM API/SearchByDisplayId/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SearchByDisplayId")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SearchByDisplayId")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("873d8e72-00a8-45f2-a8d2-3644e733c89f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/COM API/SegmentedSearch/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/COM API/SegmentedSearch/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("SegmentedSearch")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("SegmentedSearch")] 12 | [assembly: AssemblyCopyright("Copyright © 2017")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("5f9215b3-f0d3-4061-9064-b50c7f070aa1")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Samples/EventTracing/vaf/MFVaultApplicationInstaller.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/EventTracing/vaf/MFVaultApplicationInstaller.exe -------------------------------------------------------------------------------- /Samples/EventTracing/vaf/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("EventTracing")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("EventTracing")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/EventTracing/vaf/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 15187e7f-d10d-4864-9707-7988d6158e15 7 | Event Tracing 8 | A Vault Application Framework application used to log (to the Windows Event log) vault events and lifecycle. 9 | 10 | 0.1.0.0 11 | 12 | 13 | 14 | EventTracing 15 | EventTracing.dll 16 | EventTracing.VaultApplication 17 | Install 18 | Uninstall 19 | Initialize 20 | Uninitialize 21 | StartOperations 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Samples/EventTracing/vaf/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Samples/EventTracing/vaf/src/VaultApplication.Lifecycle.cs: -------------------------------------------------------------------------------- 1 | using MFiles.VAF.Common; 2 | using MFilesAPI; 3 | 4 | namespace EventTracing 5 | { 6 | /// 7 | /// A sample vault application which aids in tracing events and VAF lifecycle. 8 | /// 9 | public partial class VaultApplication 10 | { 11 | /// 12 | protected override void InitializeApplication(Vault vault) 13 | { 14 | SysUtils.ReportInfoToEventLog($"Begin InitializeApplication"); 15 | base.InitializeApplication(vault); 16 | SysUtils.ReportInfoToEventLog($"End InitializeApplication"); 17 | } 18 | 19 | /// 20 | protected override void InstallApplication(Vault vault) 21 | { 22 | SysUtils.ReportInfoToEventLog($"Begin InstallApplication"); 23 | base.InstallApplication(vault); 24 | SysUtils.ReportInfoToEventLog($"End InstallApplication"); 25 | } 26 | 27 | /// 28 | protected override void StartApplication() 29 | { 30 | SysUtils.ReportInfoToEventLog($"Begin StartApplication"); 31 | base.StartApplication(); 32 | SysUtils.ReportInfoToEventLog($"End StartApplication"); 33 | } 34 | 35 | /// 36 | protected override void UninitializeApplication(Vault vault) 37 | { 38 | SysUtils.ReportInfoToEventLog($"Begin UninitializeApplication"); 39 | base.UninitializeApplication(vault); 40 | SysUtils.ReportInfoToEventLog($"End UninitializeApplication"); 41 | } 42 | 43 | /// 44 | protected override void UninstallApplication(Vault vault) 45 | { 46 | SysUtils.ReportInfoToEventLog($"Begin UninstallApplication"); 47 | base.UninstallApplication(vault); 48 | SysUtils.ReportInfoToEventLog($"End UninstallApplication"); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Samples/EventTracing/vaf/src/VaultApplication.cs: -------------------------------------------------------------------------------- 1 |  2 | using MFiles.VAF; 3 | using MFiles.VAF.Common; 4 | 5 | namespace EventTracing 6 | { 7 | /// 8 | /// A sample vault application which aids in tracing events and VAF lifecycle. 9 | /// 10 | public partial class VaultApplication 11 | : VaultApplicationBase 12 | { 13 | /// 14 | public VaultApplication() 15 | { 16 | SysUtils.ReportInfoToEventLog($"Constructor called."); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Samples/EventTracing/vault/Event Tracing.mfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/EventTracing/vault/Event Tracing.mfb -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace GenerateApplicationPreApprovalKey.App 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/GenerateApplicationPreApprovalKey.App.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/Helpers/ActionCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace GenerateApplicationPreApprovalKey.App.Helpers 5 | { 6 | /// 7 | /// An implemenation of that allows an 8 | /// to be called in response to an event binding. 9 | /// 10 | public class ActionCommand 11 | : ICommand 12 | { 13 | /// 14 | /// The action to call when the event is fired. 15 | /// 16 | private Action Action { get; set; } 17 | 18 | /// 19 | /// Instantiates an . 20 | /// 21 | /// The action to execute. 22 | public ActionCommand(Action action) 23 | { 24 | // Assign. 25 | this.Action = action ?? throw new ArgumentNullException(nameof(action)); 26 | } 27 | 28 | /// 29 | public bool CanExecute(object parameter) 30 | { 31 | return true; 32 | } 33 | 34 | /// 35 | public void Execute(object parameter) 36 | { 37 | this.Action(parameter); 38 | } 39 | 40 | /// 41 | public event EventHandler CanExecuteChanged; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Linq; 4 | using System.Runtime.CompilerServices; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using GenerateApplicationPreApprovalKey.App.ViewModels; 8 | using MFilesAPI; 9 | 10 | namespace GenerateApplicationPreApprovalKey.App 11 | { 12 | /// 13 | /// Interaction logic for MainWindow.xaml 14 | /// 15 | public partial class MainWindow 16 | : INotifyPropertyChanged 17 | { 18 | /// 19 | /// Our application data context. 20 | /// 21 | public new ViewModels.MainWindowViewModel DataContext 22 | { 23 | get { return base.DataContext as MainWindowViewModel; } 24 | set 25 | { 26 | base.DataContext = value; 27 | this.OnPropertyChanged(); 28 | } 29 | } 30 | 31 | /// 32 | /// Instantiates the main window and assigns a data context. 33 | /// 34 | public MainWindow() 35 | { 36 | this.InitializeComponent(); 37 | this.DataContext = new MainWindowViewModel(this); 38 | } 39 | 40 | #region INotifyPropertyChanged 41 | 42 | /// 43 | public event PropertyChangedEventHandler PropertyChanged; 44 | 45 | /// 46 | /// Notifies subscribers that a property value has changed. 47 | /// 48 | /// The name of the property that changed. 49 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) 50 | { 51 | this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 52 | } 53 | 54 | #endregion 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/MarkupExtension/EnumToItemsSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using MFilesAPI; 4 | 5 | namespace GenerateApplicationPreApprovalKey.App 6 | { 7 | /// 8 | /// Class for easy binding enum items to a combo box. 9 | /// 10 | /// From https://stackoverflow.com/questions/6145888/how-to-bind-an-enum-to-a-combobox-control-in-wpf, with thanks. 11 | public class EnumToItemsSource 12 | : System.Windows.Markup.MarkupExtension 13 | { 14 | /// 15 | /// The enum type to expose items for. 16 | /// 17 | private readonly Type type; 18 | 19 | /// 20 | /// Instantiates an for the provided type. 21 | /// 22 | /// 23 | public EnumToItemsSource(Type type) 24 | { 25 | this.type = type; 26 | } 27 | 28 | /// 29 | public override object ProvideValue(IServiceProvider serviceProvider) 30 | { 31 | return Enum.GetValues(this.type) 32 | .Cast() 33 | .Select(e => new { Value = e, DisplayName = e.ToString() }); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GenerateApplicationPreApprovalKey.App.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Samples/GenerateApplicationPreApprovalKey/ValueConverters/IsNullValueConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace GenerateApplicationPreApprovalKey.App.ValueConverters 6 | { 7 | /// 8 | /// An implementation of 9 | /// that returns true if the item is null or false otherwise. 10 | /// Note that a boolean parameter is supported to invert the logic. 11 | /// 12 | public class IsNullValueConverter 13 | : IValueConverter 14 | { 15 | /// 16 | /// Converts an object to true (if null) or false (if not null). 17 | /// 18 | /// The object to check. 19 | /// Not used. 20 | /// Passing true (boolean) will invert the logic. 21 | /// Not used. 22 | /// True if is null, false otherwise (unless inverted with ). 23 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | bool invert = false; 26 | Boolean.TryParse(parameter?.ToString() ?? "", out invert); 27 | 28 | return false == invert 29 | ? null == value 30 | : null != value; 31 | } 32 | 33 | /// 34 | /// Not implemented. Throws an exception. 35 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 36 | { 37 | throw new NotImplementedException(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Samples/OAuth/COMAPI/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Samples/OAuth/COMAPI/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace COMAPI 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Samples/OAuth/COMAPI/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /Samples/OAuth/COMAPI/COMAPI.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | netcoreapp3.1 6 | true 7 | 8 | 9 | 10 | 11 | tlbimp 12 | 0 13 | 1 14 | b9c079aa-92dd-4fb4-a0e0-aa3198955b45 15 | 0 16 | false 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Samples/OAuth/COMAPI/Controls/MFConnectionDetails.xaml.cs: -------------------------------------------------------------------------------- 1 | using MFilesAPI; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | 15 | namespace COMAPI.Controls 16 | { 17 | /// 18 | /// Interaction logic for MFConnectionDetails.xaml 19 | /// 20 | public partial class MFConnectionDetails : UserControl 21 | { 22 | public string UserName => ""; 23 | public string Domain => ""; 24 | public string VaultGuid { 25 | get 26 | { 27 | var guid = this.vaultGuid?.Text; 28 | if (Guid.TryParse(guid, out Guid result)) 29 | return result.ToString("B"); 30 | return string.Empty; 31 | } 32 | } 33 | public string ProtocolSequence => (this.protocolSequence?.SelectedItem as ComboBoxItem)?.Tag?.ToString() ?? string.Empty; 34 | public string NetworkAddress => this.networkAddress?.Text ?? string.Empty; 35 | public string Endpoint => this.endpoint?.Text ?? string.Empty; 36 | public bool EncryptedConnection => this.encryptedConnection?.IsChecked ?? false; 37 | public MFConnectionDetails() 38 | { 39 | InitializeComponent(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Samples/OAuth/COMAPI/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 28 | 35 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Samples/OAuth/Common/Common.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Samples/OAuth/Common/ExtensionMethods/IEnumerableExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Common.ExtensionMethods 6 | { 7 | /// 8 | /// Extension methods for IEnumerable{T}. 9 | /// 10 | // ReSharper disable once InconsistentNaming 11 | public static class IEnumerableExtensionMethods 12 | { 13 | /// 14 | /// Creates a string from the sequence by concatenating the result 15 | /// of the specified string selector function for each element. 16 | /// 17 | public static string ToConcatenatedString(this IEnumerable source, 18 | Func stringSelector) 19 | { 20 | return source.ToConcatenatedString(stringSelector, String.Empty); 21 | } 22 | 23 | /// 24 | /// Creates a string from the sequence by concatenating the result 25 | /// of the specified string selector function for each element. 26 | /// 27 | /// A function describing how to select a string from the source. 28 | /// The string which separates each concatenated item. 29 | /// The source collection to enumerate. 30 | public static string ToConcatenatedString(this IEnumerable source, 31 | Func stringSelector, 32 | string separator) 33 | { 34 | var b = new StringBuilder(); 35 | bool needsSeparator = false; // don't use for first item 36 | 37 | foreach (var item in source) 38 | { 39 | if (needsSeparator) 40 | b.Append(separator); 41 | 42 | b.Append(stringSelector(item)); 43 | needsSeparator = true; 44 | } 45 | 46 | return b.ToString(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Samples/OAuth/Common/ExtensionMethods/RestRequestExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using RestSharp; 2 | 3 | namespace Common.ExtensionMethods 4 | { 5 | /// 6 | /// REST request extension methods. 7 | /// 8 | public static class RestRequestExtensionMethods 9 | { 10 | /// 11 | /// Calls if the 12 | /// is not null or whitespace. 13 | /// 14 | /// The request to add the parameter to. 15 | /// The name of the parameter. 16 | /// The value of the parameter. 17 | /// The request, for chaining. 18 | public static RestRequest AddParameterIfNotNullOrWhitespace(this RestRequest request, string name, string value) 19 | { 20 | // Call the other method if appropriate. 21 | if (false == string.IsNullOrWhiteSpace(value)) 22 | request.AddParameter(name, value); 23 | 24 | // Return the request for chaining. 25 | return request; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Samples/OAuth/RESTAPI/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Samples/OAuth/RESTAPI/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace RESTAPI 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Samples/OAuth/RESTAPI/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /Samples/OAuth/RESTAPI/Controls/MFConnectionDetails.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Samples/OAuth/RESTAPI/Controls/MFConnectionDetails.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | using System.Windows.Data; 7 | using System.Windows.Documents; 8 | using System.Windows.Input; 9 | using System.Windows.Media; 10 | using System.Windows.Media.Imaging; 11 | using System.Windows.Navigation; 12 | using System.Windows.Shapes; 13 | 14 | namespace RESTAPI.Controls 15 | { 16 | /// 17 | /// Interaction logic for MFConnectionDetails.xaml 18 | /// 19 | public partial class MFConnectionDetails : UserControl 20 | { 21 | public string NetworkAddress => this.networkAddress?.Text ?? string.Empty; 22 | public MFConnectionDetails() 23 | { 24 | InitializeComponent(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Samples/OAuth/RESTAPI/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 28 | 35 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Samples/OAuth/RESTAPI/RESTAPI.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | netcoreapp3.1 6 | true 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Samples/Processes/ClientToServerCode/MFVaultApplicationInstaller.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/Processes/ClientToServerCode/MFVaultApplicationInstaller.exe -------------------------------------------------------------------------------- /Samples/Processes/ClientToServerCode/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ServerComponent")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ServerComponent")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/Processes/ClientToServerCode/Readme.md: -------------------------------------------------------------------------------- 1 | # Sending commands from the client to the server 2 | 3 | Creates two buttons in the M-Files client (either Desktop or Web Access). Clicking each of the buttons executes a Vault Extension Method on the server, passing content to it and receiving content back. The returned content is displayed in a messagebox on screen. 4 | 5 | More information is available within the [M-Files Developer Portal](http://developer.m-files.com/Samples-And-Libraries/Samples/User-Interface-Extensibility-Framework/Client-To-Server-Communication/). 6 | -------------------------------------------------------------------------------- /Samples/Processes/ClientToServerCode/UIX/appdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 4 | 1B9552B3-C1C5-44b9-905F-D4ABAC5E7AA2 5 | Client to server communication UIX sample 6 | 1.1 7 | A demonstration application for calling the server with content and retrieving the response. 8 | M-Files Corporation 9 | (c) M-Files Corporation 2017 10 | 11.3.0000.0 11 | b0797ece-4c7e-4e60-8576-8fc74b3bf968 12 | 13 | Desktop 14 | Web 15 | 16 | 17 | 18 | main.js 19 | 20 | 21 | -------------------------------------------------------------------------------- /Samples/Processes/ClientToServerCode/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | b0797ece-4c7e-4e60-8576-8fc74b3bf968 7 | The server component which will be called by the User Interface Extensibility Framework application 8 | 9 | 10 | 1.0.0.0 11 | 12 | 13 | 14 | ServerComponent 15 | ServerComponent.dll 16 | ServerComponent.VaultApplication 17 | Install 18 | Uninstall 19 | Initialize 20 | Uninitialize 21 | StartOperations 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Samples/Processes/ClientToServerCode/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Samples/Processes/ClientToServerCode/src/VaultApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using MFiles.VAF; 4 | using MFiles.VAF.Common; 5 | using MFilesAPI; 6 | 7 | namespace ServerComponent 8 | { 9 | public class VaultApplication 10 | : VaultApplicationBase 11 | { 12 | /// 13 | /// Install the UIX application, as it will not be installed by default. 14 | /// 15 | /// The vault to install the application into. 16 | protected override void InitializeApplication(Vault vault) 17 | { 18 | try 19 | { 20 | string appPath = "UIX.mfappx"; 21 | if (File.Exists(appPath)) 22 | { 23 | vault.CustomApplicationManagementOperations.InstallCustomApplication(appPath); 24 | } 25 | else 26 | { 27 | SysUtils.ReportErrorToEventLog("File: " + appPath + " does not exist"); 28 | } 29 | } 30 | catch (Exception ex) 31 | { 32 | SysUtils.ReportErrorToEventLog(ex.Message); 33 | } 34 | 35 | base.InitializeApplication(vault); 36 | } 37 | 38 | /// 39 | /// A vault extension method, that will be installed to the vault with the application. 40 | /// The vault extension method can be called through the API. 41 | /// 42 | /// The event handler environment for the method. 43 | /// The output string to the caller. 44 | [VaultExtensionMethod("VaultExtensionMethod_VAF", RequiredVaultAccess = MFVaultAccess.MFVaultAccessNone)] 45 | private string TestVaultExtensionMethod(EventHandlerEnvironment env) 46 | { 47 | return "The VAF event handler said the time was: " 48 | + DateTime.Now.ToLongTimeString() 49 | + " (input was: " + env.Input 50 | + ")"; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /Samples/Processes/ClientToServerCode/vault-backup.mfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/Processes/ClientToServerCode/vault-backup.mfb -------------------------------------------------------------------------------- /Samples/Processes/CopyingObjects/readme.md: -------------------------------------------------------------------------------- 1 | # Copying Objects 2 | 3 | -------------------------------------------------------------------------------- /Samples/Processes/CopyingObjects/vaf/MFVaultApplicationInstaller.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/Processes/CopyingObjects/vaf/MFVaultApplicationInstaller.exe -------------------------------------------------------------------------------- /Samples/Processes/CopyingObjects/vaf/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("CopyingObjects")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CopyingObjects")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/Processes/CopyingObjects/vaf/Readme.md: -------------------------------------------------------------------------------- 1 | # Copying objects 2 | 3 | Copies an object (including all metadata, direct relationships and files) when it reaches a specific state in a workflow. 4 | 5 | More information is available within the [M-Files Developer Portal](http://developer.m-files.com/Samples-And-Libraries/Samples/User-Interface-Extensibility-Framework/Copying-Objects/). 6 | -------------------------------------------------------------------------------- /Samples/Processes/CopyingObjects/vaf/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 629132fe-2dd6-4300-8fb1-5a75f93da121 7 | CopyingObjects 8 | CopyingObjects 9 | 10 | 1.0.0.0 11 | 12 | 13 | 14 | CopyingObjects 15 | CopyingObjects.dll 16 | CopyingObjects.VaultApplication 17 | Install 18 | Uninstall 19 | Initialize 20 | Uninitialize 21 | StartOperations 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Samples/Processes/CopyingObjects/vaf/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Samples/Processes/CopyingObjects/vault/Vault Backup.mfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/Processes/CopyingObjects/vault/Vault Backup.mfb -------------------------------------------------------------------------------- /Samples/Processes/MaintainOriginalTemplate/Readme.md: -------------------------------------------------------------------------------- 1 | # Maintaining the original object template 2 | 3 | This sample shows how to use an event handler to automatically maintain a reference to the template which was used to create an object. -------------------------------------------------------------------------------- /Samples/Processes/MaintainOriginalTemplate/vaf/MFVaultApplicationInstaller.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/Processes/MaintainOriginalTemplate/vaf/MFVaultApplicationInstaller.exe -------------------------------------------------------------------------------- /Samples/Processes/MaintainOriginalTemplate/vaf/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MaintainOriginalTemplate")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MaintainOriginalTemplate")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/Processes/MaintainOriginalTemplate/vaf/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | b87f9e89-9061-4069-a8c8-078ef784f13a 7 | MaintainOriginalTemplate 8 | MaintainOriginalTemplate 9 | 10 | 1.0.0.0 11 | 12 | 13 | 14 | MaintainOriginalTemplate 15 | MaintainOriginalTemplate.dll 16 | MaintainOriginalTemplate.VaultApplication 17 | Install 18 | Uninstall 19 | Initialize 20 | Uninitialize 21 | StartOperations 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Samples/Processes/MaintainOriginalTemplate/vaf/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Samples/Processes/MaintainOriginalTemplate/vault/MaintainOriginalTemplate.mfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/Processes/MaintainOriginalTemplate/vault/MaintainOriginalTemplate.mfb -------------------------------------------------------------------------------- /Samples/Processes/Readme.md: -------------------------------------------------------------------------------- 1 | # M-Files Sample Process Applications 2 | 3 | The following applications are available: 4 | 5 | ## [Client to Server Communication](ClientToServerCode) 6 | 7 | ## [Copying Objects](CopyingObjects) 8 | 9 | ## [Maintaining the original object template](MaintainOriginalTemplate) -------------------------------------------------------------------------------- /Samples/REST API/MFWSCheckOutStatus/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSCheckOutStatus/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MFWSCheckOutStatus")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MFWSCheckOutStatus")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5cde9a3c-c7cf-45f9-bac7-cace11958da4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSCheckOutStatus/Readme.md: -------------------------------------------------------------------------------- 1 | # Retrieving an object's checkout status 2 | 3 | This sample shows how to retrieve an object's [checkout status](http://www.m-files.com/mfws/resources/objects/type/objectid/version/checkedout.html) using both the REST API wrapper for .NET, and also using the native HttpClient object. 4 | 5 | ## Using the native HttpClient 6 | 7 | The code below uses JSON.NET to handle the serialization and deserialization of objects to and from JSON. This is not directly required but is used below for brevity and clarity. Classes such as `PrimitiveType` and enumerations such as `MFCheckOutStatus` can be found in the [sample code on the M-Files Web Service documentation](http://www.m-files.com/mfws/samples.html). 8 | 9 | ```csharp 10 | // Create a HttpClient to use for our requests. 11 | var httpClient = new System.Net.Http.HttpClient(); 12 | 13 | // Create an ObjID for the object to reference. 14 | var objId = new ObjID() 15 | { 16 | ID = 5, 17 | Type = 0 18 | }; 19 | 20 | // Retrieve the checkout status. 21 | url = 22 | new Uri($"http://kb.cloudvault.m-files.com/REST/objects/{objId.Type}/{objId.ID}/latest/checkedout"); 23 | responseBody = await httpClient.GetStringAsync(url); 24 | 25 | // Attempt to parse it. 26 | var checkoutStatus = JsonConvert.DeserializeObject>(responseBody); 27 | ``` 28 | 29 | 30 | ## Using the REST API wrapper 31 | 32 | [The REST API wrapper](https://github.com/M-Files/Libraries.MFWSClient) exposes a method (GetCheckoutStatus) on the MFWSVaultObjectOperations class. This can be executed as below: 33 | 34 | ```csharp 35 | // Create an MFWSClient for the knowledgebase. 36 | var client = new MFWSClient("http://kb.cloudvault.m-files.com"); 37 | 38 | // Create an ObjID for the object to reference. 39 | var objId = new ObjID() 40 | { 41 | ID = 5, 42 | Type = 0 43 | }; 44 | 45 | // Retrieve the checkout status. 46 | var checkoutStatus = client.ObjectOperations.GetCheckoutStatus(objId); 47 | ``` 48 | 49 | 50 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSCheckOutStatus/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSDownloading/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSDownloading/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MFWSDownloading")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MFWSDownloading")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("0847d452-bc13-4a6f-83d7-6ef351c1c3f8")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSDownloading/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSSearching/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSSearching/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("MFWSSearching")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("MFWSSearching")] 12 | [assembly: AssemblyCopyright("Copyright © 2017")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("5e028db1-361c-407b-99cf-68c0184583f5")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSSearching/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSVaultStructure/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSVaultStructure/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MFWSVaultStructure")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MFWSVaultStructure")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a5eff65f-5d70-4a7b-9869-9a08fd85e132")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSVaultStructure/Readme.md: -------------------------------------------------------------------------------- 1 | # Enumerating the vault structure 2 | 3 | This sample shows how to retrieve various elements of the vault structure using the REST API wrapper for .NET. 4 | 5 | ## Using the REST API wrapper 6 | 7 | [The REST API](https://github.com/M-Files/Libraries.MFWSClient) wrapper exposes various methods which mimic the [M-Files API](https://www.m-files.com/api/documentation/latest/index.html) to retrieve the vault structure. 8 | 9 | ```csharp 10 | // Connect to the online knowledgebase. 11 | // Note that this doesn't require authentication. 12 | var client = new MFWSClient("http://kb.cloudvault.m-files.com"); 13 | 14 | // Get the object types. 15 | var objectTypes = client.ObjectTypeOperations.GetObjectTypes(); 16 | Console.WriteLine($"There are {objectTypes.Count} object types in the vault:"); 17 | foreach (var item in objectTypes) 18 | { 19 | // Output basic content. 20 | System.Console.WriteLine($"\t{item.Name} ({item.NamePlural})"); 21 | System.Console.WriteLine($"\t\tID: {item.ID}"); 22 | } 23 | 24 | // Get the value lists. 25 | var valueLists = client.ValueListOperations.GetValueLists(); 26 | Console.WriteLine($"There are {valueLists.Count} value lists in the vault:"); 27 | foreach (var item in valueLists) 28 | { 29 | // Output basic content. 30 | System.Console.WriteLine($"\t{item.Name}"); 31 | System.Console.WriteLine("\t\tID: {item.ID}"); 32 | 33 | // Retrieve the items. 34 | var valueListItems = client.ValueListItemOperations.GetValueListItems(item.ID); 35 | System.Console.WriteLine($"\t\tItems ({valueListItems.Items.Count}):"); 36 | 37 | // Output the items. 38 | foreach (var valueListItem in valueListItems.Items) 39 | { 40 | System.Console.WriteLine($"\t\t\t{valueListItem.Name}, ID: {valueListItem.ID}"); 41 | } 42 | 43 | } 44 | ``` 45 | 46 | 47 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSVaultStructure/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSViewNavigation/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSViewNavigation/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MFWSViewNavigation")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MFWSViewNavigation")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("c14184fa-5940-43c6-a8d3-81d175b8aef5")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSViewNavigation/Readme.md: -------------------------------------------------------------------------------- 1 | # Enumerating the view structure 2 | 3 | This sample shows how to navigate through the views on the vault using the REST API wrapper for .NET. 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/REST API/MFWSViewNavigation/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Readme.md: -------------------------------------------------------------------------------- 1 | # M-Files UIX Sample Applications 2 | 3 | Information on the available UIX applications is available [on the M-Files Developer Portal](http://developer.m-files.com/Samples-And-Libraries/Samples/User-Interface-Extensibility-Framework/). 4 | 5 | ## Versions 6 | 7 | This repository contains examples for Version 2 - the latest version of the UIX Framework - and for Version 1. 8 | 9 | New development should target Version 2. Version 2 of the UIX is supported in M-Files Web and the new M-Files Desktop client. These newer clients do not support Version 1 applications. 10 | 11 | Version 1 of the UIX is considered legacy and should only be used when explicitly targeting the M-Files Classic Web or M-Files Classic Desktop clients. These classic clients do not support Version 2 applications. 12 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/AlterContextMenuDependingOnSelectedObject/appdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 1B9662B3-C1C5-44b9-905F-D4ABDE5E8AE2 4 | Alter context menu depending on object 5 | 0.2 6 | 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | 14 | 15 | 16 | main.js 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/AssignToMe/Readme.md: -------------------------------------------------------------------------------- 1 | # Creating assignments on button click 2 | 3 | This application registers a [ShellUI module](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Modules/#shellui) that creates an "Assign to me" button. The button is only shown when at least one object is selected. When the button is clicked, an assignment is created for the selected object(s), and assigned to the current user. 4 | 5 | This application is compatible with M-Files Web Access as well as M-Files Desktop. 6 | 7 | More information is available within the [M-Files Developer Portal](http://developer.m-files.com/Samples-And-Libraries/Samples/User-Interface-Extensibility-Framework/AssignToMe/). 8 | 9 | ## Testing and deploying 10 | 11 | ### Testing 12 | 13 | The simplest method to test an application is to copy the files into a [local development folder](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Local-Development-Folder/). This allows you to alter the files and simply log out and into the vault to see the changes. 14 | 15 | ### Deploying 16 | 17 | To deploy the application, you must zip the application files and deploy them using the M-Files Admin tool. This process is detailed [on the M-Files Developer Portal](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Deployment/). 18 | 19 | #### Pre-approval 20 | 21 | When a client connects a vault, new User Interface Extensibility Framework applications will be downloaded and the user will be prompted to install them. [This can be avoided by pre-approving it using registry keys](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Pre-Approval/). -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/AssignToMe/appdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 1B9552B3-C1C5-44b9-905F-D4ABAC5E7FF2 4 | Assign to me UIX sample 5 | 1.4 6 | A demonstration application for reacting to selected items and assigning them via a command. 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | Web 14 | 15 | 16 | 17 | main.js 18 | 19 | 20 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/AssignToMe/icons/clipboard.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version1/AssignToMe/icons/clipboard.ico -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/AssignToMe/icons/clipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version1/AssignToMe/icons/clipboard.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/BuiltInCommandEvent/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BDB8D786-74AB-44E9-8F92-BF1FDDBB1FAE 4 | Built-in Command Demonstration 5 | 1.1 6 | Simple M-Files built-in command demonstration 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | 14 | 15 | 16 | main.js 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/Commands/Readme.md: -------------------------------------------------------------------------------- 1 | # Creates two commands that interact with each other 2 | 3 | This application registers a [ShellUI module](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Modules/#shellui) that creates two commands (one initially hidden). Clicking the first command shows the second command). Clicking the second command disables itself. 4 | 5 | More information is available within the [M-Files Developer Portal](http://developer.m-files.com/Samples-And-Libraries/Samples/User-Interface-Extensibility-Framework/Commands/). -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/Commands/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 60c93a08-27c3-4c59-aa61-906aaff52b81 4 | Commands 5 | 0.2 6 | A basic application showing how to work with commands. 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | 14 | 15 | 16 | main.js 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/Commands/icons/uparrow.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version1/Commands/icons/uparrow.ico -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/ConfirmWorkflowStateChange/appdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 1B9662B3-C1C5-44b9-875F-D4ABAC5E8AE2 4 | Confirm workflow state change 5 | 0.1 6 | 7 | M-Files Corporation 8 | (c) M-Files Corporation 2017 9 | 11.3.4330.0 10 | 11 | 12 | vaultui.js 13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/DisplayPersistentWebPageInTab/Readme.md: -------------------------------------------------------------------------------- 1 | # Persistent Web Page 2 | 3 | This application registers a [ShellUI module](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Modules/#shellui) that creates a persistent web page and shows the content within a tab on the right-hand-side of the interface. The navigation within the tab is persisted even as the user interacts with M-Files (e.g. by navigating into a view). 4 | 5 | More information is available within the [M-Files Developer Portal](http://developer.m-files.com/Samples-And-Libraries/Samples/User-Interface-Extensibility-Framework/Display-Persistent-Web-Page-In-Tab/). 6 | 7 | ## Testing and deploying 8 | 9 | ### Testing 10 | 11 | The simplest method to test an application is to copy the files into a [local development folder](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Local-Development-Folder/). This allows you to alter the files and simply log out and into the vault to see the changes. 12 | 13 | ### Deploying 14 | 15 | To deploy the application, you must zip the application files and deploy them using the M-Files Admin tool. This process is detailed [on the M-Files Developer Portal](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Deployment/). 16 | 17 | #### Pre-approval 18 | 19 | When a client connects a vault, new User Interface Extensibility Framework applications will be downloaded and the user will be prompted to install them. [This can be avoided by pre-approving it using registry keys](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Pre-Approval/). -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/DisplayPersistentWebPageInTab/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 711441b6-dca0-4c9c-a04e-37bd4717e7ff 4 | Display persistent web page 5 | 0.2 6 | Shows how to display a persistent web page (e.g. an intranet) in a tab. 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | 14 | 15 | 16 | main.js 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/HelloWorld/Readme.md: -------------------------------------------------------------------------------- 1 | # Hello, world 2 | 3 | This application registers a [ShellUI module](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Modules/#shellui) that displays a message when the shellframe is available. 4 | 5 | More information is available within the [M-Files Developer Portal](http://developer.m-files.com/Samples-And-Libraries/Samples/User-Interface-Extensibility-Framework/HelloWorld/). 6 | 7 | ## Testing and deploying 8 | 9 | ### Testing 10 | 11 | The simplest method to test an application is to copy the files into a [local development folder](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Local-Development-Folder/). This allows you to alter the files and simply log out and into the vault to see the changes. 12 | 13 | ### Deploying 14 | 15 | To deploy the application, you must zip the application files and deploy them using the M-Files Admin tool. This process is detailed [on the M-Files Developer Portal](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Deployment/). 16 | 17 | #### Pre-approval 18 | 19 | When a client connects a vault, new User Interface Extensibility Framework applications will be downloaded and the user will be prompted to install them. [This can be avoided by pre-approving it using registry keys](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Pre-Approval/). -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/HelloWorld/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 711441b6-dca0-4c9c-a04e-37bd4717e7fe 4 | Hello, world 5 | 0.2 6 | A basic application showing how to react to the shell frame being available. 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | 14 | 15 | 16 | main.js 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/OpenExternalApplicationOnCommand/appdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 1B9552B5-C1C5-44b9-905F-D4ABAC5E7BE3 4 | Open external application on command 5 | 1.1 6 | A demonstration UIX for running an external application on a command click. 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | 14 | 15 | 16 | main.js 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/PowerBI/Readme.md: -------------------------------------------------------------------------------- 1 | # M-Files Power BI Reports 2 | 3 | This repository contains an open-source implementation of a viewer to render Microsoft Power BI reports inside the M-Files desktop client. 4 | 5 | This code is provided as-is and has no official support. It is released as sample code only and should not be used in production environments. 6 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/PowerBI/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5C76769E-D507-481c-9BE4-39319BCB5F57 4 | M-Files Power BI Reports 5 | 1.0.3 6 | M-Files Power BI Report UI Extension 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | true 12 | true 13 | 14 | Desktop 15 | 16 | 17 | 18 | mfshell.js 19 | 20 | 21 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/PowerBI/png/Report2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version1/PowerBI/png/Report2.ico -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/PowerBI/png/disabled.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version1/PowerBI/png/disabled.ico -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/PowerBI/style.css: -------------------------------------------------------------------------------- 1 | #container 2 | { 3 | margin: 0 auto; 4 | width: 600px; 5 | background:#fff; 6 | } 7 | 8 | #header 9 | { 10 | background:#ccc; 11 | padding: 20px; 12 | } 13 | 14 | #header h1 { margin: 0; } 15 | 16 | #navigation 17 | { 18 | float: left; 19 | width: 600px; 20 | background:#333; 21 | } 22 | 23 | #navigation ul 24 | { 25 | margin: 0; 26 | padding: 0; 27 | } 28 | 29 | #navigation ul li 30 | { 31 | list-style-type: none; 32 | display: inline; 33 | } 34 | 35 | #navigation li a 36 | { 37 | display: block; 38 | float: left; 39 | padding: 5px 10px; 40 | color:#fff; 41 | text-decoration: none; 42 | border-right: 1px solid#fff; 43 | } 44 | 45 | #navigation li a:hover { background:#383; } 46 | 47 | #content 48 | { 49 | clear: left; 50 | padding: 20px; 51 | } 52 | 53 | #content h2 54 | { 55 | color:#000; 56 | font-size: 160%; 57 | margin: 0 0 .5em; 58 | } 59 | 60 | #footer 61 | { 62 | background:#ccc; 63 | text-align: right; 64 | padding: 20px; 65 | height: 1%; 66 | } 67 | 68 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/Readme.md: -------------------------------------------------------------------------------- 1 | # M-Files UIX Sample Applications 2 | 3 | Information on the available UIX applications is available [on the M-Files Developer Portal](http://developer.m-files.com/Samples-And-Libraries/Samples/User-Interface-Extensibility-Framework/). 4 | 5 | ## Testing and deploying 6 | 7 | ### Testing 8 | 9 | The simplest method to test an application is to copy the files into a [local development folder](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Local-Development-Folder/). This allows you to alter the files and simply log out and into the vault to see the changes. 10 | 11 | ### Deploying 12 | 13 | To deploy the application, you must zip the application files and deploy them using the M-Files Admin tool. This process is detailed [on the M-Files Developer Portal](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Deployment/). 14 | 15 | #### Pre-approval 16 | 17 | When a client connects a vault, new User Interface Extensibility Framework applications will be downloaded and the user will be prompted to install them. [This can be avoided by pre-approving it using registry keys](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Pre-Approval/). 18 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/ShowWebPageInIFrame/appdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 1B9762B3-C2D5-44b9-905F-D4ABAC5E8AE2 4 | Show web page in iframe 5 | 0.2 6 | 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | 14 | 15 | 16 | main.js 17 | 18 | 19 | 20 | 21 | dashboard.html 22 | http:// 23 | https:// 24 | 25 | 26 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/UsingManagedAssemblies/classlibrary/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace MyClassLibrary 5 | { 6 | /// 7 | /// The class which will be instantiated from the UIX application. 8 | /// 9 | public class Class1 10 | { 11 | /// 12 | /// Shows a message from within the managed assembly. 13 | /// 14 | /// A handle for the parent window (see https://www.m-files.com/UI_Extensibility_Framework/index.html#MFClientScript~IWindow~Handle.html). 15 | /// The message to show, which will be prefixed by the vault name. 16 | /// The M-Files API Vault object (see https://www.m-files.com/api/documentation/latest/index.html#MFilesAPI~Vault.html). 17 | public void ShowMessage(Int32 parentHWND, string message, dynamic vault) 18 | { 19 | // Get a reference to the window from the provided handle. 20 | IWin32Window parentWindow = Control.FromHandle((IntPtr)parentHWND); 21 | 22 | // Show the message. 23 | MessageBox.Show(parentWindow, $"{vault.Name} says {message}"); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/UsingManagedAssemblies/classlibrary/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MyClassLibrary")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MyClassLibrary")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("11a8ce62-74b0-4a17-b7ef-8d7d00368d05")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/UsingManagedAssemblies/uix/MyClassLibrary.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version1/UsingManagedAssemblies/uix/MyClassLibrary.dll -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/UsingManagedAssemblies/uix/appdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 1B9662B3-C1C5-44b9-905F-D5ABAC5E8AE2 4 | Managed Assemblies 5 | 0.2 6 | Shows how to communicate between a UIX application and a (C#) managed assembly deployed within it. 7 | M-Files Corporation 8 | (c) M-Files Corporation 2021 9 | 10 | 20.12.0.0 11 | 12 | Desktop 13 | 14 | 15 | 16 | main.js 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/ViewURLGenerator/Readme.md: -------------------------------------------------------------------------------- 1 | # M-Files View URL Generator 2 | 3 | This vault application creates a context menu item for creating a view URL for a selected view or a virtual folder. 4 | 5 | *Please note: This is a consultancy template solution. This is not an official M-Files product. The solution can be used to provide certain functionality not available with the M-Files offering without customization. This solution does not have any official support. It is always used at your own risk and should be tested thoroughly for the use case before implementing in a production environment.* 6 | 7 | ## Usage 8 | 9 | 1. Select a view or a virtual folder 10 | 2. Select Get M-Files View URL from the context menu 11 | 3. Copy the view URL 12 | 13 | ## Testing and deploying 14 | 15 | ### Testing 16 | 17 | The simplest method to test an application is to copy the files into a [local development folder](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Local-Development-Folder/). This allows you to alter the files and simply log out and into the vault to see the changes. 18 | 19 | ### Deploying 20 | 21 | To deploy the application, you must zip the application files and deploy them using the M-Files Admin tool. This process is detailed [on the M-Files Developer Portal](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Development-Practices/Deployment/). 22 | 23 | #### Pre-approval 24 | 25 | When a client connects a vault, new User Interface Extensibility Framework applications will be downloaded and the user will be prompted to install them. [This can be avoided by pre-approving it using registry keys](http://developer.m-files.com/Frameworks/User-Interface-Extensibility-Framework/Pre-Approval/). 26 | 27 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version1/ViewURLGenerator/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ae94b402-e56f-4b69-984d-3177d7277312 4 | M-Files View URL Generator 5 | Adds a Get M-Files View URL command to the context menu. The option appears when the user right-clicks above a selected view or virtual folder. 6 | 0.0.1 7 | 8 | 9 | Application.js 10 | 11 | 12 | 13 | 14 | dashboard.html 15 | 16 | 17 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Assign to me UIX sample/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | C311B570-40F4-4893-96C8-05110A30743C 4 | Assign to me UIX sample 5 | 0.1 6 | A demonstration application for reacting to selected items and assigning them via a command. 7 | M-Files Corporation 8 | true 9 | 10 | 11 | main.js 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Assign to me UIX sample/screenshots/CreateAssignment_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Assign to me UIX sample/screenshots/CreateAssignment_1.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Assign to me UIX sample/screenshots/CreateAssignment_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Assign to me UIX sample/screenshots/CreateAssignment_2.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Built-in Command Demonstration/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | D14E6DA7-E7A6-498E-B709-C682C75DC887 4 | Built-in Command Demonstration 5 | 0.1 6 | Simple M-Files built-in command demonstration. 7 | M-Files Corporation 8 | true 9 | 10 | 11 | main.js 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Built-in Command Demonstration/screenshots/BuiltInCommands_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Built-in Command Demonstration/screenshots/BuiltInCommands_1.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Built-in Command Demonstration/screenshots/BuiltInCommands_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Built-in Command Demonstration/screenshots/BuiltInCommands_2.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Commands/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | A50FF521-9167-4366-9CDE-6CB5C3BDDAFF 4 | Commands 5 | 0.1 6 | A basic application showing how to work with commands. 7 | M-Files Corporation 8 | true 9 | 10 | 11 | main.js 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Commands/screenshots/Commands_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Commands/screenshots/Commands_1.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Commands/screenshots/Commands_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Commands/screenshots/Commands_2.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Commands/screenshots/Commands_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Commands/screenshots/Commands_3.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Commands/screenshots/Commands_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Commands/screenshots/Commands_4.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/Commands/screenshots/Commands_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/Commands/screenshots/Commands_5.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/HelloWord/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5EA29AF2-1EC9-4AB7-A0D1-FE1D586310D4 4 | Hello, World 5 | 0.1 6 | A basic application showing how to react to the shell frame being available. 7 | M-Files Corporation 8 | true 9 | 10 | 11 | main.js 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/HelloWord/main.js: -------------------------------------------------------------------------------- 1 | // NOTE! This code is for demonstration purposes only and does not contain any kind of 2 | // error handling. MUST be revised before using in production. 3 | 4 | function OnNewShellUI( shellUI ) 5 | { 6 | /// Executed by the UIX when a ShellUI module is started. 7 | /// The shell UI object which was created. 8 | 9 | // This is the start point of a ShellUI module. 10 | 11 | // Register to be notified when a new normal shell frame (MFiles.Event.NewShellFrame) is created. 12 | // We use MFiles.Event.NewShellFrame rather than MFiles.Event.NewShellFrame as this won't fire for history (etc.) dialogs. 13 | shellUI.Events.Register( 14 | MFiles.Event.NewShellFrame, 15 | handleNewShellFrame ); 16 | } 17 | 18 | function handleNewShellFrame( shellFrame ) 19 | { 20 | /// Handles the OnNewShellFrame event for an IShellUI. 21 | /// The shell frame object which was created. 22 | 23 | // The shell frame was created but it cannot be used yet. 24 | // The following line would throw an exception ("The object cannot be accessed, because it is not ready."): 25 | // shellFrame.ShowMessage("A shell frame was created"); 26 | 27 | // Register to be notified when the shell frame is started. 28 | // This time pass a reference to the function to call when the event is fired. 29 | shellFrame.Events.Register( 30 | MFiles.Event.Started, 31 | getShellFrameStartedHandler( shellFrame) ); 32 | } 33 | 34 | function getShellFrameStartedHandler( shellFrame ) 35 | { 36 | /// Returns a function which handles the OnStarted event for an IShellFrame. 37 | 38 | return async () => { 39 | 40 | // The shell frame is now started and can be used. 41 | // Note: we need to use the global-scope variable. 42 | await shellFrame.ShowMessage( "A shell frame is available for use." ); 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/HelloWord/screenshots/HelloWorld_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/HelloWord/screenshots/HelloWorld_1.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/HelloWord/screenshots/HelloWorld_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/HelloWord/screenshots/HelloWorld_2.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/HelloWord/screenshots/HelloWorld_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/HelloWord/screenshots/HelloWorld_3.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUp Dashboard/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 83A5DD0A-E386-454E-B5AB-3D52AF13B7C3 4 | PopUp Dashboard 5 | 0.1 6 | A basic application showing how to work with dashboards. 7 | M-Files Corporation 8 | true 9 | 10 | 11 | main.js 12 | 13 | 14 | 15 | 16 | index.html 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUp Dashboard/dashboard.js: -------------------------------------------------------------------------------- 1 | function OnNewDashboard( dashboard ) { 2 | 3 | /// Executed by the UIX when a dashboared is started. 4 | /// The dashboard object which was created. 5 | 6 | // Get the viewshistory and sort items in descending order. 7 | let viewsHistory = dashboard.CustomData.viewsHistory || []; 8 | viewsHistory = viewsHistory.sort( ( a, b ) => b.time - a.time ); 9 | 10 | // Register a handler to listen the started event. 11 | dashboard.Events.Register( 12 | MFiles.Event.Started, 13 | () => { 14 | 15 | // Get the element from the UI. 16 | const contentElement = document.getElementById( "content" ); 17 | 18 | // Prepare the html content that to be updated. 19 | const htmlContent = ` 20 |
Your view history
21 | ${viewsHistory.map( ( value ) => { 22 | return`
23 |
${value.viewUrl }
24 |
- ${value.viewPath }
25 |
`; } 26 | ).join( "" ) } 27 | `; 28 | 29 | // Update the content. 30 | contentElement.innerHTML = htmlContent; 31 | } 32 | ) ; 33 | } 34 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUp Dashboard/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Sample 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUp Dashboard/screenshots/PopupDashboard_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/PopUp Dashboard/screenshots/PopupDashboard_1.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUp Dashboard/screenshots/PopupDashboard_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/PopUp Dashboard/screenshots/PopupDashboard_2.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUp Dashboard/screenshots/PopupDashboard_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/PopUp Dashboard/screenshots/PopupDashboard_3.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUp Dashboard/style.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | font-family: Lato, "Segoe UI", Sans-Serif; 3 | margin: 0; 4 | background: #FFF; 5 | height: 100%; 6 | color: #363A40; 7 | font-size: 14px; 8 | padding: 0 10px; 9 | } 10 | 11 | div { 12 | padding: 4px 0; 13 | } 14 | 15 | span { 16 | font-size: 18px; 17 | font-weight: 500; 18 | } 19 | 20 | .label { 21 | font-size: 18px; 22 | font-weight: 500; 23 | color: #318ccc; 24 | margin-top: 13px; 25 | } 26 | 27 | .history-item { 28 | width: calc(100% - 30px); 29 | height: 25px; 30 | margin: 2px 0; 31 | padding: 2px 15px; 32 | background: #e7e6e6; 33 | border-radius: 15px; 34 | } 35 | 36 | .viewid { 37 | display: inline-block; 38 | width: 30%; 39 | } 40 | 41 | .viewpath { 42 | display: inline-block; 43 | width: 69%; 44 | } -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 83A5DD0A-E386-454E-B5AB-3D52AF13B7C3 4 | PopUp Dashboard 5 | 0.1 6 | A basic application showing how to work with popup dashboards. 7 | M-Files Corporation 8 | true 9 | 10 | 11 | main.js 12 | 13 | 14 | 15 | 16 | index.html 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/dashboard.js: -------------------------------------------------------------------------------- 1 | async function OnNewDashboard(dashboard) { 2 | const accentColor = await MFiles.GetAccentColor() 3 | document 4 | .querySelector(':root') 5 | .style.setProperty('--scrollbar-thumb-color', accentColor) 6 | document.getElementById('accentColorValue').innerHTML = accentColor 7 | } 8 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My Popup Dashboard 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |

A simple scrollable DIV

14 |
Accent color:
15 |
16 |

AI-Driven Automation

17 |

18 | M-Files helps automate the entire knowledge work process from document 19 | creation and management to workflow automation, external 20 | collaboration, enterprise search, security, compliance, and audit 21 | trail. 22 |

23 |

24 | Powered by M-Files' generative AI technology, M-Files Aino, the 25 | platform helps organize information, understand the context of 26 | documents, and interact with their organization's knowledge using 27 | natural language. 28 |

29 | 30 |

Organize your content

31 |

32 | M-Files adapts to the document flow and content of any organization. 33 | Classifying documents and extracting their meaning optimizes knowledge 34 | worker productivity by automating routines and ensuring information 35 | can be easily found and used in the proper business context. 36 |

37 |
38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/main.js: -------------------------------------------------------------------------------- 1 | // NOTE! This code is for demonstration purposes only and does not contain any kind of 2 | // error handling. MUST be revised before using in production. 3 | 4 | function OnNewShellUI(shellUI) { 5 | /// Executed by the UIX when a ShellUI module is started. 6 | /// The shell UI object which was created. 7 | 8 | // This is the start point of a ShellUI module. 9 | 10 | // Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created. 11 | shellUI.Events.Register(MFiles.Event.NewShellFrame, onNewNormalShellFrame) 12 | } 13 | 14 | function onNewNormalShellFrame(shellFrame) { 15 | // Add tab to right pane, when the shell frame is started. 16 | shellFrame.Events.Register(MFiles.Event.Started, onStarted) 17 | 18 | // NOTE: to be on the safe side, handle the callback in "async" function and await all the 19 | // return values, because when the postMessage API is used, all return values will be async. 20 | async function onStarted() { 21 | const myCommand = await shellFrame.Commands.CreateCustomCommand( 22 | 'Show my popup dashboard', 23 | ) 24 | await shellFrame.Commands.AddCustomCommandToMenu( 25 | myCommand, 26 | MFiles.MenuLocation.MenuLocation_TopPaneMenu, 27 | 1, 28 | ) 29 | await shellFrame.Commands.Events.Register( 30 | MFiles.Event.CustomCommand, 31 | (command) => { 32 | // Execute only our custom command. 33 | if (command === myCommand) { 34 | shellFrame.ShowPopupDashboard( 35 | 'MyPopUpDashboard', 36 | {}, 37 | 'My popup dashboard', 38 | ) 39 | } 40 | }, 41 | ) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/screenshots/PopupDashboard_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/screenshots/PopupDashboard_1.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/screenshots/PopupDashboard_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/screenshots/PopupDashboard_2.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/screenshots/PopupDashboard_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/screenshots/PopupDashboard_3.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/screenshots/PopupDashboard_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/screenshots/PopupDashboard_4.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/PopUpDashboardWithAccentColor/style.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | font-family: Lato, 'Segoe UI', Sans-Serif; 4 | margin: 0; 5 | background: #fff; 6 | height: 100%; 7 | font-size: 14px; 8 | padding: 0 10px; 9 | } 10 | 11 | :root { 12 | --scrollbar-thumb-color: black; 13 | } 14 | 15 | div { 16 | padding: 4px 0; 17 | } 18 | 19 | span { 20 | font-weight: 500; 21 | } 22 | 23 | #scrollableDIV { 24 | height: 200px; 25 | overflow-y: scroll; 26 | scrollbar-color: var(--scrollbar-thumb-color) lightgray; 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/dist/appdef.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 2c68aa24-4f5b-4d03-af09-0d1d8035746d 4 | Shellframe - dashboard 5 | 0.1 6 | A basic application showing how to work with Shellframe. 7 | M-Files Corporation 8 | true 9 | 10 | 11 | shellui.js 12 | 13 | 14 | 15 | 16 | index.html 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | React with Webpack 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/dist/shellui.js: -------------------------------------------------------------------------------- 1 | // NOTE! This code is for demonstration purposes only and does not contain any kind of 2 | // error handling. MUST be revised before using in production. 3 | 4 | function OnNewShellUI(shellUI) { 5 | 6 | /// Executed by the UIX when a ShellUI module is started. 7 | /// The shell UI object which was created. 8 | 9 | // This is the start point of a ShellUI module. 10 | 11 | // Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created. 12 | shellUI.Events.Register( 13 | MFiles.Event.NewShellFrame, 14 | onNewNormalShellFrame 15 | ); 16 | } 17 | 18 | function onNewNormalShellFrame(shellFrame) { 19 | 20 | // Add tab to right pane, when the shell frame is started. 21 | shellFrame.Events.Register(MFiles.Event.Started, onStarted); 22 | 23 | // NOTE: to be on the safe side, handle the callback in "async" function and await all the 24 | // return values, because when the postMessage API is used, all return values will be async. 25 | async function onStarted() { 26 | 27 | const dashboardCommand = await shellFrame.Commands.CreateCustomCommand("Show my dashboard"); 28 | await shellFrame.Commands.AddCustomCommandToMenu(dashboardCommand, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1); 29 | await shellFrame.Commands.Events.Register( 30 | MFiles.Event.CustomCommand, 31 | (command) => { 32 | // Execute only our custom command. 33 | if (command === dashboardCommand) { 34 | shellFrame.ShowDashboard("MyDashboard"); 35 | } 36 | }); 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/dist/style.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | font-family: Lato, "Segoe UI", Sans-Serif; 3 | margin: 0; 4 | background: #FFF; 5 | height: 100%; 6 | font-size: 14px; 7 | padding: 0 10px; 8 | } 9 | 10 | div { 11 | padding: 2px 0; 12 | } 13 | 14 | button { 15 | width: 150px; 16 | height: 20px; 17 | } 18 | 19 | .label { 20 | font-weight: 500; 21 | color:mediumblue; 22 | } -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-blog", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "webpack" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0" 15 | }, 16 | "devDependencies": { 17 | "@babel/core": "^7.23.7", 18 | "@babel/preset-env": "^7.23.7", 19 | "@babel/preset-react": "^7.23.3", 20 | "@types/react-dom": "^18.2.18", 21 | "babel-loader": "^9.1.3", 22 | "webpack": "^5.89.0", 23 | "webpack-cli": "^5.0.1", 24 | "webpack-dev-server": "^4.11.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/screenshot/Dashboard_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/ShellFrameAndDashboard/screenshot/Dashboard_1.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/screenshot/Dashboard_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/ShellFrameAndDashboard/screenshot/Dashboard_2.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/screenshot/Dashboard_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/UIX Applications/Version2/ShellFrameAndDashboard/screenshot/Dashboard_3.png -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | const App = () => { 5 | return ( 6 |
7 |

Hello, React with Webpack!

8 |
9 | ) 10 | } 11 | 12 | ReactDOM.render(, document.getElementById('root')); -------------------------------------------------------------------------------- /Samples/UIX Applications/Version2/ShellFrameAndDashboard/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: './src/index.js', 5 | output: { 6 | path: path.resolve(__dirname, 'dist'), 7 | filename: 'bundle.js' 8 | }, 9 | module: { 10 | rules: [ 11 | { 12 | test: /\.(js|jsx)$/, 13 | exclude: /node_modules/, 14 | use: { 15 | loader: 'babel-loader' 16 | } 17 | } 18 | ] 19 | }, 20 | resolve: { 21 | extensions: ['.js', '.jsx'] 22 | }, 23 | devServer: { 24 | contentBase: path.join(__dirname, 'dist'), 25 | compress: true, 26 | port: 9000 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /Samples/VAF/.gitignore: -------------------------------------------------------------------------------- 1 | # VAF 2.0 must be included for now. 2 | !**/packages/MFiles.VAF.2.0.0.0 3 | !**/packages/MSBuildTasks.1.5.0.196 -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComplexConfiguration", "ComplexConfiguration\ComplexConfiguration.csproj", "{D9CBC017-358E-490C-958A-49A4E3BE3A29}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D9CBC017-358E-490C-958A-49A4E3BE3A29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D9CBC017-358E-490C-958A-49A4E3BE3A29}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D9CBC017-358E-490C-958A-49A4E3BE3A29}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D9CBC017-358E-490C-958A-49A4E3BE3A29}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {3EE5C663-90BB-48B0-80C0-B21A31BE2CA5} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/ConfigurationEditors/ColorConfigurationEditors.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | using MFiles.VAF.Configuration; 4 | 5 | namespace ComplexConfiguration.ConfigurationEditors 6 | { 7 | /// 8 | /// Showcases options for "color"-style editors. 9 | /// 10 | [DataContract] 11 | public class ColorConfigurationEditors 12 | { 13 | /// 14 | /// A colour value that will be saved as a string. 15 | /// 16 | /// Will be saved in the #RRGGBB format. 17 | [DataMember] 18 | [JsonConfEditor(TypeEditor = "color")] 19 | public string ColorValueAsString { get; set; } 20 | 21 | /// 22 | /// A colour value that will be saved as a string. 23 | /// 24 | [DataMember] 25 | [JsonConfEditor(TypeEditor = "color", DefaultValue = "#FF0000")] 26 | public string ColorValueAsStringWithDefault { get; set; } = "#FF0000"; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/ConfigurationEditors/DateConfigurationEditors.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | using MFiles.VAF.Configuration; 4 | 5 | namespace ComplexConfiguration.ConfigurationEditors 6 | { 7 | /// 8 | /// Showcases options for "date"-style editors. 9 | /// 10 | /// The user cannot select a "time" portion of the associated value. 11 | [DataContract] 12 | public class DateConfigurationEditors 13 | { 14 | /// 15 | /// A simple nullable datetime value. 16 | /// 17 | [DataMember] 18 | [JsonConfEditor(TypeEditor = "date")] 19 | public DateTime? SimpleDateValue { get; set; } 20 | 21 | /// 22 | /// A datetime value that will be saved as a string. 23 | /// 24 | /// Will be saved in a locale-neutral ISO format (YYYY-MM-DD). May be displayed in the administration area in a locale-specific format. 25 | [DataMember] 26 | [JsonConfEditor(TypeEditor = "date")] 27 | public string DateValueAsString { get; set; } 28 | 29 | /// 30 | /// A simple nullable datetime value. 31 | /// 32 | [DataMember] 33 | [JsonConfEditor(TypeEditor = "date", DefaultValue = "2018-01-01")] 34 | public DateTime? DateValueWithDefault { get; set; } = DateTime.Parse("2018-01-01"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/ConfigurationEditors/PlaceholderConfigurationEditors.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | 4 | namespace ComplexConfiguration.ConfigurationEditors 5 | { 6 | /// 7 | /// Showcases options for editors that allow users to create templates with placeholder text that can be replaced at runtime. 8 | /// 9 | /// 10 | /// Use ObjVerEx.ExpandPlaceholerText (https://developer.m-files.com/Frameworks/Vault-Application-Framework/Helpers/ObjVerEx/#expandplaceholdertext) at runtime to use the template. 11 | /// 12 | [DataContract] 13 | public class PlaceholderConfigurationEditors 14 | { 15 | 16 | /// 17 | /// A value allowing the user to create/customise a template (e.g. for notifications). 18 | /// 19 | [DataMember] 20 | [JsonConfEditor(TypeEditor = "placeholderText")] 21 | public string TextPlaceholderTemplateValue { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/ConfigurationEditors/SearchConditionsConfigurationEditors.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | using MFiles.VAF.Configuration.JsonAdaptor; 4 | 5 | namespace ComplexConfiguration.ConfigurationEditors 6 | { 7 | /// 8 | /// Showcases options for editors that allow users to define their own search conditions. 9 | /// 10 | /// 11 | /// See https://developer.m-files.com/Frameworks/Vault-Application-Framework/Configuration/Editors/#search-conditions-editor for information on usage. 12 | /// 13 | [DataContract] 14 | public class SearchConditionsConfigurationEditors 15 | { 16 | 17 | /// 18 | /// A value allowing the user to customise their own set of search conditions. 19 | /// 20 | [DataMember] 21 | public SearchConditionsJA SearchConditionsValue { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/ConfigurationEditors/TimeConfigurationEditors.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | using MFiles.VAF.Configuration; 4 | 5 | namespace ComplexConfiguration.ConfigurationEditors 6 | { 7 | /// 8 | /// Showcases options for "time"-style editors. 9 | /// 10 | /// The values will be saved as a so cannot include date information. 11 | [DataContract] 12 | public class TimeConfigurationEditors 13 | { 14 | /// 15 | /// A simple nullable time value. 16 | /// 17 | [DataMember] 18 | [JsonConfEditor(TypeEditor = "time")] 19 | public TimeSpan? SimpleTimeValue { get; set; } 20 | 21 | /// 22 | /// A time value that will be saved as a string. 23 | /// 24 | /// Will be saved in the HH:MM:SS format. 25 | [DataMember] 26 | [JsonConfEditor(TypeEditor = "time")] 27 | public string TimeValueAsString { get; set; } 28 | 29 | /// 30 | /// A simple nullable time value. 31 | /// 32 | [DataMember] 33 | [JsonConfEditor(TypeEditor = "time", DefaultValue = "02:00:00")] 34 | public TimeSpan? TimeValueWithDefault { get; set; } = TimeSpan.Parse("02:00:00"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/ConfigurationEditors/TimestampConfigurationEditors.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | using MFiles.VAF.Configuration; 4 | 5 | namespace ComplexConfiguration.ConfigurationEditors 6 | { 7 | /// 8 | /// Showcases options for "timestamp" (date and time)-style editors. 9 | /// 10 | [DataContract] 11 | public class TimestampConfigurationEditors 12 | { 13 | /// 14 | /// A simple nullable timestamp value. 15 | /// 16 | [DataMember] 17 | [JsonConfEditor(TypeEditor = "timestamp")] 18 | public DateTime? SimpleTimestampValue { get; set; } 19 | 20 | /// 21 | /// A timestamp value that will be saved as a string. 22 | /// 23 | /// Will be saved in the YYYY-MM-DD HH:mm:SS format. 24 | [DataMember] 25 | [JsonConfEditor(TypeEditor = "timestamp")] 26 | public string TimestampValueAsString { get; set; } 27 | 28 | /// 29 | /// A simple nullable datetime value. 30 | /// 31 | [DataMember] 32 | [JsonConfEditor(TypeEditor = "timestamp", DefaultValue = "2018-01-01 02:00:00")] 33 | public DateTime? TimestampValueWithDefault { get; set; } = DateTime.Parse("2018-01-01 02:00:00"); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/Lists/Lists.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | 4 | namespace ComplexConfiguration.Lists 5 | { 6 | /// 7 | /// Examples of using lists in the configuration area. 8 | /// 9 | [DataContract] 10 | public class Lists 11 | { 12 | /// 13 | /// Example of using lists of simple data types. 14 | /// 15 | [DataMember] 16 | [JsonConfEditor(Label = "Lists of simple data types")] 17 | public SimpleDataTypes SimpleDataTypes { get; set; } 18 | = new SimpleDataTypes(); 19 | 20 | /// 21 | /// Example of using lists of vault structural references. 22 | /// 23 | [DataMember] 24 | [JsonConfEditor(Label = "Lists of vault structural references")] 25 | // ReSharper disable once InconsistentNaming 26 | public MFIdentifiers MFIdentifiers { get; set; } 27 | = new MFIdentifiers(); 28 | 29 | /// 30 | /// Example of using lists of vault structural references. 31 | /// 32 | [DataMember] 33 | [JsonConfEditor(Label = "Plain Old CLR Objects")] 34 | // ReSharper disable once InconsistentNaming 35 | public POCOs POCOs { get; set; } 36 | = new POCOs(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/Lists/MFIdentifiers.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | using MFiles.VAF.Configuration; 4 | 5 | namespace ComplexConfiguration.Lists 6 | { 7 | /// 8 | /// Examples of how to use lists of vault structural references. 9 | /// 10 | [DataContract] 11 | // ReSharper disable once InconsistentNaming 12 | public class MFIdentifiers 13 | { 14 | /// 15 | /// A set of classes that the user can add to, update, and remove from. 16 | /// 17 | [DataMember] 18 | [MFClass] 19 | public List ListOfClasses { get; set; } 20 | 21 | /// 22 | /// A set of property definitions that the user can add to, update, and remove from. 23 | /// 24 | [DataMember] 25 | [MFPropertyDef] 26 | public List ListOfPropertyDefinitions { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/Lists/POCOs.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | using MFiles.VAF.Configuration; 4 | // ReSharper disable InconsistentNaming 5 | 6 | namespace ComplexConfiguration.Lists 7 | { 8 | /// 9 | /// Examples of how to use POCOs (Plain Old CLR Objects) 10 | /// in lists. 11 | /// 12 | [DataContract] 13 | public class POCOs 14 | { 15 | /// 16 | /// A set of POCO objects that the user can add to, update, and remove from. 17 | /// 18 | [DataMember] 19 | public List SimplePOCOs { get; set; } 20 | 21 | /// 22 | /// A set of classes that the user can add to, update, and remove from. 23 | /// 24 | [DataMember] 25 | [JsonConfEditor(HelpText = "As this POCO object contains a Name property, it will be used in the configuration screen, instead of 'MyObjectWithName[1]'")] 26 | public List SimplePOCOsWithNameProperty { get; set; } 27 | 28 | /// 29 | /// A set of classes that the user can add to, update, and remove from. 30 | /// 31 | [DataMember] 32 | [JsonConfEditor(HelpText = "As this POCO object contains a Value1 property which has been marked as the name property. It will be used in the configuration screen, instead of 'MyObjectWithCustomName[1]'")] 33 | public List SimplePOCOsWithCustomNameProperty { get; set; } 34 | } 35 | 36 | [DataContract] 37 | public class MyObject 38 | { 39 | [DataMember] 40 | public string Value1 { get; set; } 41 | } 42 | 43 | [DataContract] 44 | public class MyObjectWithName 45 | { 46 | [DataMember] 47 | public string Name { get; set; } 48 | } 49 | 50 | [DataContract] 51 | [JsonConfEditor(NameMember = "Value1")] 52 | public class MyObjectWithCustomName 53 | { 54 | [DataMember] 55 | public string Value1 { get; set; } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/Lists/SimpleDataTypes.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace ComplexConfiguration.Lists 5 | { 6 | /// 7 | /// Examples of how to use lists of basic data types. 8 | /// 9 | [DataContract] 10 | public class SimpleDataTypes 11 | { 12 | /// 13 | /// A set of strings that the user can add to, update, and remove from. 14 | /// 15 | [DataMember] 16 | public List ListOfStrings { get; set; } 17 | 18 | = new List(); 19 | /// 20 | /// A set of integers that the user can add to, update, and remove from. 21 | /// 22 | [DataMember] 23 | public List ListOfIntegers { get; set; } 24 | = new List(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ComplexConfiguration")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ComplexConfiguration")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/Readme.md: -------------------------------------------------------------------------------- 1 | # Vault Application Framework 2.0 (Complex) integration to the M-Files Admin Configuration section 2 | 3 | This sample shows a number of ways of exposing Vault Application Framework configuration to the M-Files Admin area. 4 | 5 | Specifically: 6 | 7 | * Configuration editors: 8 | * Allowing users to choose colours. 9 | * Allowing users to select dates, times, and timestamps. 10 | * Allowing users to select [vault structural elements](https://developer.m-files.com/Frameworks/Vault-Application-Framework/Attributes/Configuration/#mfidentifier) (e.g. property definitions or classes). 11 | * Allowing users to select numeric values (integers and floating-point values). 12 | * Allowing users to enter "placeholder text", [which can have values replaced into it at runtime](https://developer.m-files.com/Frameworks/Vault-Application-Framework/Helpers/ObjVerEx/#expandplaceholdertext). 13 | * Allowing users to select values from preconfigured lists (e.g. enumerations). 14 | * Allowing users to choose their own search conditions, similarly to the M-Files Desktop client. 15 | * Allowing users to enter text values, with regular expression validation. 16 | * Lists: 17 | * Allowing users to manage (add to, update, and remove from) lists of simple data types (e.g. strings). 18 | * Allowing users to manage (add to, update, and remove from) lists of [vault structural elements](https://developer.m-files.com/Frameworks/Vault-Application-Framework/Attributes/Configuration/#mfidentifier). 19 | * Allowing users to manage (add to, update, and remove from) lists of [POCOs (Plain Old CLR Objects)](https://en.wikipedia.org/wiki/Plain_old_CLR_object). 20 | * Altering the visible configuration options based on selected values: 21 | * Showing configuration options based on other values. 22 | * Hiding configuration options based on other values. -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/ShowingAndHidingConfigurationOptions/HidingConfigurationOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | 4 | namespace ComplexConfiguration.ShowingAndHidingConfigurationOptions 5 | { 6 | [DataContract] 7 | public class HidingConfigurationOptions 8 | { 9 | /// 10 | /// Used as a trigger to show . 11 | /// 12 | /// If true, will be shown in the administration area. If false then it will not. 13 | [DataMember] 14 | [JsonConfEditor( 15 | DefaultValue = true, 16 | HelpText = "If true, the AdvancedConfiguration settings will be shown. If false (or not set) then it will not.")] 17 | public bool UsesAdvancedConfiguration { get; set; } 18 | = true; 19 | 20 | /// 21 | /// Shown only if is true. 22 | /// 23 | [DataMember] 24 | [JsonConfEditor( 25 | Hidden = false, 26 | HideWhen = ".parent._children{.key == 'UsesAdvancedConfiguration' && .value != true }", 27 | HelpText = "This is hidden by default but shown if UsesAdvancedConfiguration is set to true.")] 28 | public AdvancedConfiguration AdvancedConfiguration { get; set; } 29 | } 30 | 31 | /// 32 | /// A dummy "advanced configuration" class. 33 | /// 34 | [DataContract] 35 | public class AdvancedConfiguration 36 | { 37 | /// 38 | /// A sample value that should only be populated in advanced configurations. 39 | /// 40 | [DataMember] 41 | public string Value { get; set; } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/ShowingAndHidingConfigurationOptions/ShowingAndHidingConfigurationOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | 4 | namespace ComplexConfiguration.ShowingAndHidingConfigurationOptions 5 | { 6 | /// 7 | /// Examples of using ShowWhen and HideWhen to control when configuration options are shown. 8 | /// 9 | [DataContract] 10 | public class ShowingAndHidingConfigurationOptions 11 | { 12 | /// 13 | /// Example of using values to show other configuration values. 14 | /// 15 | [DataMember] 16 | [JsonConfEditor( 17 | Label = "Showing values based on other configuration settings", 18 | HelpText = "ShowWhen and HideWhen configuration options use JSPath syntax to define the triggers to use. More information is available at https://developer.m-files.com/Frameworks/Vault-Application-Framework/Configuration/Showing-And-Hiding/.")] 19 | public ShowingConfigurationOptions ShowingOptions { get; set; } 20 | = new ShowingConfigurationOptions(); 21 | 22 | /// 23 | /// Example of using values to show other configuration values. 24 | /// 25 | [DataMember] 26 | [JsonConfEditor( 27 | Label = "Hiding values based on other configuration settings", 28 | HelpText = "ShowWhen and HideWhen configuration options use JSPath syntax to define the triggers to use. More information is available at https://developer.m-files.com/Frameworks/Vault-Application-Framework/Configuration/Showing-And-Hiding/.")] 29 | public HidingConfigurationOptions HidingOptions { get; set; } 30 | = new HidingConfigurationOptions(); 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/VaultApplication.CustomValidation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using MFiles.VAF.Configuration; 4 | 5 | namespace ComplexConfiguration 6 | { 7 | public partial class VaultApplication 8 | { 9 | /// 10 | /// Provides server-side validation of the current configuration. 11 | /// 12 | /// The configuration to validate. 13 | /// Validation findings. 14 | private IEnumerable CustomValidator(MyConfiguration myConfiguration) 15 | { 16 | // Sanity. 17 | if(null == myConfiguration) 18 | throw new ArgumentNullException(nameof(myConfiguration)); 19 | 20 | // Return an informational validation finding. 21 | yield return new ValidationFinding(ValidationFindingType.Info, 22 | string.Empty, 23 | "This is an informational finding related to no specific configuration part."); 24 | 25 | // Return something which is okay. 26 | yield return new ValidationFinding(ValidationFindingType.Ok, 27 | "/ConfigurationEditors", 28 | "The configuration editors are not null."); 29 | 30 | // Return an error. 31 | // NOTE: Errors do not stop the configuration from saving or becoming active! 32 | if (null == myConfiguration?.ConfigurationEditors?.DateConfigurationEditors?.SimpleDateValue) 33 | { 34 | yield return new ValidationFinding(ValidationFindingType.Error, 35 | "/ConfigurationEditors/DateConfigurationEditors/SimpleDateValue", 36 | "Simple date value was not provided"); 37 | } 38 | 39 | } 40 | 41 | } 42 | } -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/VaultApplication.Dashboard.cs: -------------------------------------------------------------------------------- 1 | using MFiles.VAF.Configuration.Domain.Dashboards; 2 | 3 | namespace ComplexConfiguration 4 | { 5 | public partial class VaultApplication 6 | { 7 | /// 8 | /// Generates the dashboard when the user selects the "Dashboard" tab in the configuration area. 9 | /// 10 | /// The dashboard HTML. 11 | private string GenerateDashboard() 12 | { 13 | // Note: only some HTML tags and attributes are allowed. 14 | // ref: https://developer.m-files.com/Frameworks/Vault-Application-Framework/Configuration/Custom-Dashboards/ 15 | 16 | // Retrieve something from the configuration. 17 | var propertyDefId = this 18 | .Configuration? 19 | .ConfigurationEditors? 20 | .IdentifierConfigurationEditors? 21 | .PropertyDefValue? 22 | .ID ?? -1; 23 | 24 | // Build up a dashboard. 25 | var dashboard = new StatusDashboard() 26 | { 27 | Contents = new DashboardContentCollection() 28 | { 29 | new DashboardPanel() 30 | { 31 | Title = "My first dashboard", 32 | InnerContent = new DashboardContentCollection() 33 | { 34 | // Output what one of the MFIdentifiers is currently resolved to. 35 | new DashboardCustomContent( 36 | $"

The property definition ID for ConfigurationEditors.IdentifierConfigurationEditors.PropertyDefValue was {propertyDefId}.

"), 37 | } 38 | } 39 | } 40 | }; 41 | return dashboard.ToString(); 42 | } 43 | 44 | } 45 | } -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/VaultApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using MFiles.VAF; 4 | using MFiles.VAF.AdminConfigurations; 5 | using MFiles.VAF.Common; 6 | using MFiles.VAF.Configuration; 7 | using MFiles.VAF.Configuration.AdminConfigurations; 8 | using MFiles.VAF.Core; 9 | using MFilesAPI; 10 | 11 | namespace ComplexConfiguration 12 | { 13 | /// 14 | /// The entry point for this Vault Application Framework application. 15 | /// 16 | /// Examples and further information available on the developer portal: http://developer.m-files.com/. 17 | public partial class VaultApplication 18 | : ConfigurableVaultApplicationBase 19 | { 20 | protected override IEnumerable CustomValidation(Vault vault, MyConfiguration config) 21 | { 22 | return this.CustomValidator(config); 23 | } 24 | 25 | protected override void OnConfigurationUpdated(IConfigurationRequestContext context, ClientOperations clientOps, MyConfiguration oldConfiguration) 26 | { 27 | SysUtils.ReportInfoToEventLog($"Updated (complex) configuration is:\r\n{this.Configuration}"); 28 | } 29 | 30 | /// 31 | protected override void StartApplication() 32 | { 33 | // Allow the application to start up as normal. 34 | base.StartApplication(); 35 | 36 | // Output the (startup) configuration information to the Windows Event Log. 37 | SysUtils.ReportInfoToEventLog($"Startup (complex) configuration is:\r\n{this.Configuration}"); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | d5ff5720-00ac-4a5d-b361-77472bf449a1 7 | ComplexConfiguration 8 | An example of a simple integration between a Vault Application and the M-Files 2018 Configurations area. 9 | 10 | 0.1 11 | M-Files 2018 onwards 12 | 12.0.6400.37 13 | 14 | 15 | ComplexConfiguration 16 | ComplexConfiguration.dll 17 | ComplexConfiguration.VaultApplication 18 | Install 19 | Uninstall 20 | Initialize 21 | Uninitialize 22 | StartOperations 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/ComplexConfiguration/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.Crypto.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/ComplexConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.Crypto.dll -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.Configuration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/ComplexConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.Configuration.dll -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/ComplexConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.dll -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/packages/MFiles.VAF.2.0.0.0/readme.txt: -------------------------------------------------------------------------------- 1 | M-Files Vault Application Framework 2 | 3 | Framework for developing M-Files Vault Applications. 4 | 5 | Requirements: 6 | - M-Files API installed on the local environment. (Comes with any M-Files installation.) 7 | - Reference to MFilesAPI added to the Visual Studio project. (Add reference... -> COM -> Type Libraries -> M-Files API ) -------------------------------------------------------------------------------- /Samples/VAF/ComplexConfiguration/packages/MSBuildTasks.1.5.0.196/tools/MSBuild.Community.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/ComplexConfiguration/packages/MSBuildTasks.1.5.0.196/tools/MSBuild.Community.Tasks.dll -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/BroadcastTaskQueue/Configuration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using MFiles.VAF.Configuration; 5 | using MFiles.VAF.Configuration.JsonAdaptor; 6 | 7 | namespace BroadcastTaskQueue 8 | { 9 | [DataContract] 10 | public class Configuration 11 | { 12 | /// 13 | /// If true, running data is logged to the Windows Event Log. 14 | /// 15 | [DataMember( Order = 0 )] 16 | [JsonConfEditor( 17 | Label = "Enable Logging", 18 | DefaultValue = false 19 | )] 20 | public bool LoggingEnabled { get; set; } = false; 21 | 22 | /// 23 | /// The max number of seconds that can pass between polling intervals. 24 | /// 25 | [DataMember( Order = 1 )] 26 | [JsonConfIntegerEditor( 27 | DefaultValue = 15, 28 | Label = "Maximum Polling Interval", 29 | HelpText = "The max number of seconds that can pass between polling intervals.", 30 | Min = 5 31 | )] 32 | public int MaxPollingIntervalInSeconds { get; set; } = 10; 33 | 34 | /// 35 | /// The max number of batches that can be running in the task processor at once. 36 | /// 37 | [DataMember( Order = 2 )] 38 | [JsonConfIntegerEditor( 39 | HelpText = "The max number of batches that can be running in the task processor at once.", 40 | Label = "Max Concurrent Batches", 41 | Min = 1, 42 | Max = 100, 43 | DefaultValue = 5 44 | )] 45 | public int MaxConcurrentBatches { get; set; } = 5; 46 | 47 | /// 48 | /// The max number of jobs that can be running within a batch at once. 49 | /// 50 | [DataMember( Order = 3 )] 51 | [JsonConfIntegerEditor( 52 | HelpText = "The max number of jobs that can be running within a batch at once.", 53 | Label = "Maximum Concurrent Jobs", 54 | Min = 5, 55 | Max = 100, 56 | DefaultValue = 5 57 | )] 58 | public int MaxConcurrentJobs { get; set; } = 5; 59 | } 60 | } -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/BroadcastTaskQueue/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("BroadcastTaskQueue")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("BroadcastTaskQueue")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/BroadcastTaskQueue/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 1d8ff5df-c511-45c6-a5ac-1ef973349ab4 7 | BroadcastTaskQueue 8 | 9 | 10 | 0.2 11 | 12 | 20.5.0.0 13 | true 14 | 15 | 16 | BroadcastTaskQueue 17 | BroadcastTaskQueue.dll 18 | BroadcastTaskQueue.VaultApplication 19 | Install 20 | Uninstall 21 | Initialize 22 | Uninitialize 23 | StartOperations 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/BroadcastTaskQueue/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/ConcurrentTaskQueue/Configuration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using MFiles.VAF.Configuration; 5 | using MFiles.VAF.Configuration.JsonAdaptor; 6 | 7 | namespace ConcurrentTaskQueue 8 | { 9 | [DataContract] 10 | public class Configuration 11 | { 12 | /// 13 | /// If true, running data is logged to the Windows Event Log. 14 | /// 15 | [DataMember( Order = 0 )] 16 | [JsonConfEditor( 17 | Label = "Enable Logging", 18 | DefaultValue = false 19 | )] 20 | public bool LoggingEnabled { get; set; } = false; 21 | 22 | /// 23 | /// The max number of seconds that can pass between polling intervals. 24 | /// 25 | [DataMember( Order = 1 )] 26 | [JsonConfIntegerEditor( 27 | DefaultValue = 15, 28 | Label = "Maximum Polling Interval", 29 | HelpText = "The max number of seconds that can pass between polling intervals.", 30 | Min = 5 31 | )] 32 | public int MaxPollingIntervalInSeconds { get; set; } = 10; 33 | 34 | /// 35 | /// The max number of batches that can be running in the task processor at once. 36 | /// 37 | [DataMember( Order = 2 )] 38 | [JsonConfIntegerEditor( 39 | HelpText = "The max number of batches that can be running in the task processor at once.", 40 | Label = "Max Concurrent Batches", 41 | Min = 1, 42 | Max = 100, 43 | DefaultValue = 5 44 | )] 45 | public int MaxConcurrentBatches { get; set; } = 5; 46 | 47 | /// 48 | /// The max number of jobs that can be running within a batch at once. 49 | /// 50 | [DataMember( Order = 3 )] 51 | [JsonConfIntegerEditor( 52 | HelpText = "The max number of jobs that can be running within a batch at once.", 53 | Label = "Maximum Concurrent Jobs", 54 | Min = 5, 55 | Max = 100, 56 | DefaultValue = 5 57 | )] 58 | public int MaxConcurrentJobs { get; set; } = 5; 59 | } 60 | } -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/ConcurrentTaskQueue/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ConcurrentTaskQueue")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ConcurrentTaskQueue")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/ConcurrentTaskQueue/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 5ebbec7f-ede3-4d6d-9ff4-58d90a254d26 7 | ConcurrentTaskQueue 8 | 9 | 10 | 0.2 11 | 12 | 20.5.0.0 13 | true 14 | 15 | 16 | ConcurrentTaskQueue 17 | ConcurrentTaskQueue.dll 18 | ConcurrentTaskQueue.VaultApplication 19 | Install 20 | Uninstall 21 | Initialize 22 | Uninitialize 23 | StartOperations 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/ConcurrentTaskQueue/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/RecurringTask/Configuration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization; 4 | using MFiles.VAF.Configuration; 5 | using MFiles.VAF.Configuration.JsonAdaptor; 6 | 7 | namespace RecurringTask 8 | { 9 | [DataContract] 10 | public class Configuration 11 | { 12 | /// 13 | /// If true, running data is logged to the Windows Event Log. 14 | /// 15 | [DataMember( Order = 0 )] 16 | [JsonConfEditor( 17 | Label = "Enable Logging", 18 | DefaultValue = false 19 | )] 20 | public bool LoggingEnabled { get; set; } = false; 21 | 22 | /// 23 | /// The max number of seconds that can pass between polling intervals. 24 | /// 25 | [DataMember( Order = 1 )] 26 | [JsonConfIntegerEditor( 27 | DefaultValue = 15, 28 | Label = "Maximum Polling Interval", 29 | HelpText = "The max number of seconds that can pass between polling intervals.", 30 | Min = 5 31 | )] 32 | public int MaxPollingIntervalInSeconds { get; set; } = 10; 33 | 34 | /// 35 | /// The max number of batches that can be running in the task processor at once. 36 | /// 37 | [DataMember( Order = 2 )] 38 | [JsonConfIntegerEditor( 39 | HelpText = "The max number of batches that can be running in the task processor at once.", 40 | Label = "Max Concurrent Batches", 41 | Min = 1, 42 | Max = 100, 43 | DefaultValue = 5 44 | )] 45 | public int MaxConcurrentBatches { get; set; } = 5; 46 | 47 | /// 48 | /// The max number of jobs that can be running within a batch at once. 49 | /// 50 | [DataMember( Order = 3 )] 51 | [JsonConfIntegerEditor( 52 | HelpText = "The max number of jobs that can be running within a batch at once.", 53 | Label = "Maximum Concurrent Jobs", 54 | Min = 5, 55 | Max = 100, 56 | DefaultValue = 5 57 | )] 58 | public int MaxConcurrentJobs { get; set; } = 5; 59 | } 60 | } -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/RecurringTask/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RecurringTask")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RecurringTask")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/RecurringTask/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | a4c1d909-03f8-4c6d-8d7d-17c38d50f927 7 | RecurringTask 8 | 9 | 10 | 0.2 11 | 12 | 20.5.0.0 13 | true 14 | 15 | 16 | RecurringTask 17 | RecurringTask.dll 18 | RecurringTask.VaultApplication 19 | Install 20 | Uninstall 21 | Initialize 22 | Uninitialize 23 | StartOperations 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/RecurringTask/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/SequentialTaskQueue/Configuration.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | 4 | namespace SequentialTaskQueue 5 | { 6 | [DataContract] 7 | public class Configuration 8 | { 9 | /// 10 | /// If true, running data is logged to the Windows Event Log. 11 | /// 12 | [DataMember( Order = 0 )] 13 | [JsonConfEditor( 14 | Label = "Enable Logging", 15 | DefaultValue = false 16 | )] 17 | public bool LoggingEnabled { get; set; } = false; 18 | 19 | /// 20 | /// The max number of seconds that can pass between polling intervals. 21 | /// 22 | [DataMember( Order = 1 )] 23 | [JsonConfIntegerEditor( 24 | DefaultValue = 15, 25 | Label = "Maximum Polling Interval", 26 | HelpText = "The max number of seconds that can pass between polling intervals.", 27 | Min = 5 28 | )] 29 | public int MaxPollingIntervalInSeconds { get; set; } = 10; 30 | } 31 | } -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/SequentialTaskQueue/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SequentialTaskQueue")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SequentialTaskQueue")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/SequentialTaskQueue/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 992674e4-f976-4770-a40f-4a429ed8c9f7 7 | SequentialTaskQueue 8 | 9 | 10 | 0.2 11 | 12 | 20.5.0.0 13 | true 14 | 15 | 16 | SequentialTaskQueue 17 | SequentialTaskQueue.dll 18 | SequentialTaskQueue.VaultApplication 19 | Install 20 | Uninstall 21 | Initialize 22 | Uninitialize 23 | StartOperations 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Samples/VAF/MultiServerMode/SequentialTaskQueue/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/SimpleConfiguration.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleConfiguration", "SimpleConfiguration\SimpleConfiguration.csproj", "{A5F63EDD-EA6D-4FBD-9334-0A531E96A21A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {A5F63EDD-EA6D-4FBD-9334-0A531E96A21A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {A5F63EDD-EA6D-4FBD-9334-0A531E96A21A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {A5F63EDD-EA6D-4FBD-9334-0A531E96A21A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {A5F63EDD-EA6D-4FBD-9334-0A531E96A21A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {C6668D03-B4FF-4897-8500-D20816123AD7} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/SimpleConfiguration/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleConfiguration")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleConfiguration")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/SimpleConfiguration/Readme.md: -------------------------------------------------------------------------------- 1 | # Vault Application Framework 2.0 (Simple) integration to the M-Files Admin Configuration section 2 | 3 | This sample shows how to add an area to the M-Files Admin "Configuration" section that allows users to customise the behaviour of your Vault Application Framework application. -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/SimpleConfiguration/VaultApplication.cs: -------------------------------------------------------------------------------- 1 | using MFiles.VAF; 2 | using MFiles.VAF.AdminConfigurations; 3 | using MFiles.VAF.Common; 4 | using MFiles.VAF.Configuration.AdminConfigurations; 5 | using MFiles.VAF.Core; 6 | 7 | namespace SimpleConfiguration 8 | { 9 | /// 10 | /// An example vault application showing a basic configuration. 11 | /// 12 | /// defines the specific options that the user sees in the administration area. 13 | public class VaultApplication 14 | : ConfigurableVaultApplicationBase 15 | { 16 | 17 | protected override void OnConfigurationUpdated(IConfigurationRequestContext context, ClientOperations clientOps, MyConfiguration oldConfiguration) 18 | { 19 | SysUtils.ReportInfoToEventLog($"Updated (simple) configuration is:\r\n{this.Configuration}"); 20 | } 21 | 22 | /// 23 | protected override void StartApplication() 24 | { 25 | // Allow the application to start up as normal. 26 | base.StartApplication(); 27 | 28 | // Output the (startup) configuration information to the Windows Event Log. 29 | SysUtils.ReportInfoToEventLog($"Startup (simple) configuration is:\r\n{this.Configuration}"); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/SimpleConfiguration/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 93d323d2-c3f5-44d7-a8f3-d052ba6ffcfb 7 | SimpleConfiguration 8 | An example of a simple integration between a Vault Application and the M-Files 2018 Configurations area. 9 | 10 | 0.1 11 | M-Files 2018 onwards 12 | 12.0.6400.37 13 | 14 | 15 | SimpleConfiguration 16 | SimpleConfiguration.dll 17 | SimpleConfiguration.VaultApplication 18 | Install 19 | Uninstall 20 | Initialize 21 | Uninitialize 22 | StartOperations 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/SimpleConfiguration/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.Crypto.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/SimpleConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.Crypto.dll -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.Configuration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/SimpleConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.Configuration.dll -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/SimpleConfiguration/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.dll -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/packages/MFiles.VAF.2.0.0.0/readme.txt: -------------------------------------------------------------------------------- 1 | M-Files Vault Application Framework 2 | 3 | Framework for developing M-Files Vault Applications. 4 | 5 | Requirements: 6 | - M-Files API installed on the local environment. (Comes with any M-Files installation.) 7 | - Reference to MFilesAPI added to the Visual Studio project. (Add reference... -> COM -> Type Libraries -> M-Files API ) -------------------------------------------------------------------------------- /Samples/VAF/SimpleConfiguration/packages/MSBuildTasks.1.5.0.196/tools/MSBuild.Community.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/SimpleConfiguration/packages/MSBuildTasks.1.5.0.196/tools/MSBuild.Community.Tasks.dll -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/Licensing/sample.mflconf: -------------------------------------------------------------------------------- 1 | { 2 | "GeneratorHeader": "M-Files Vault Application Framework License Generator", 3 | "Advanced": true, 4 | 5 | "KeyFile": "sample.Keys.conf", 6 | //"Keys": {}, 7 | 8 | //"EditorFile": "MyApp.editor.json", 9 | "Editor": { 10 | "editors" : { 11 | "LicenseConfiguration" : { 12 | "type" : "LicenseConfiguration", 13 | "extend" : "object", 14 | "members" : { 15 | "Description" : { 16 | "type" : "string", 17 | "helpText" : "License Name:", 18 | "defaultValue" : "Xml Importer" 19 | }, 20 | "LicensedTo" : { 21 | "type" : "string", 22 | "helpText" : "Customer:" 23 | }, 24 | "Application" : { 25 | "type" : "string", 26 | "defaultValue" : "{468e859a-704f-470f-aa4f-d57ec81b0112}", 27 | "hidden": true, 28 | "includeInHeader": false 29 | }, 30 | "LicenseExpireDate" : { 31 | "type" : "date", 32 | "helpText" : "Expire date:\n(unset is never)", 33 | "format" : "d.M.yyyy" 34 | }, 35 | "Vaults": { 36 | "type": "array", 37 | "childTemplate": "string", 38 | "helpText": "Only valid in vaults:\n(empty for allow all)" , 39 | "freeAdd": true, 40 | }, 41 | "Modules": { 42 | "type": "array", 43 | "childTemplate": "string", 44 | "selectOptions": [ 45 | { 46 | "value": "Option1-Value", 47 | "label": "Option 1" }, 48 | { "value": "Option2-Value", 49 | "label": "Option 2" } 50 | ], 51 | "defaultValue": [ "Option1-Value" ], 52 | "freeAdd": true 53 | }, 54 | "CustomField1" : { 55 | "type" : "string" 56 | } 57 | } 58 | } 59 | }, 60 | "type" : "LicenseConfiguration" 61 | }, 62 | 63 | "Password": "", 64 | "SignatureField": "", 65 | "Mode": "TwoKeys", 66 | "Version": 3, 67 | "IncludeHeader": true, 68 | "Template": "Hello World" 69 | } 70 | -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/Licensing/valid.lic: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "Description": "Xml Importer", 4 | "Modules": [ 5 | "Option1-Value" 6 | ] 7 | } 8 | --- 9 | MFIDgAAAAEnge/070G1+UyTmnCYE1ThqEH+IYIF2JbOdOKJL+rQ65IasXKmIPIxusZyGVN8Syl014zTiZdfjQ/xC83YtaZaje0lw1QgiE213h7iuuEnT7sl4ud6Cc77nprBNiFw+2LGcFGV2TItxBqsK4loawIigzshcyfsUss+/at+AmI+4gAAAACAAAABnQ5KeTFBDGhiBio5wQhhCZEj9PgaE+J5SzPkCYSTdtRKfD/KhGBqcZWPBM556oxEdQc3O2OjqIFEQSXr4rvnX2jCZ7EeDxKx0ETCFIesyloWJ0dmzRXDs6B40aFdnKXJ2oW9pmajEdrWYkyPpJX3RsuiqA1yCXMgJOub04KPAjm/WTX1H4pGESr5zDn1LRbA90TZJYpc2tHNnH0QZTsi571/RNMDDE4ZyRHXecbYAegGcekuLIIWLmUUjeO7GhcbeftPYBWhqRByGdj169E38xi6rGPSgNXmd8bqkHTwQPXeuk63XGAPi1M1vcm1Y4ubTivcTPg81p8GmQNxCkz/HGhwW1JgrIhVXe78cG+APa8f7UEIVFNiTc9aEeVqQR6SCe61jMcMM47EAITjbWYtjQbL2v1jBRCow8PU3bWJu+Q== -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlImporter", "XmlImporter\XmlImporter.csproj", "{97D37B4D-7B2A-47EF-8BC2-DFD0EB435490}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {97D37B4D-7B2A-47EF-8BC2-DFD0EB435490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {97D37B4D-7B2A-47EF-8BC2-DFD0EB435490}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {97D37B4D-7B2A-47EF-8BC2-DFD0EB435490}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {97D37B4D-7B2A-47EF-8BC2-DFD0EB435490}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {DA037901-5C84-486F-83A6-06C11C827AEF} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/AttachedFileHandlingStrategy.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Runtime.Serialization; 3 | 4 | namespace XmlImporter 5 | { 6 | /// 7 | /// The strategy to use when attaching files to object selectors. 8 | /// 9 | public enum AttachedFileHandlingStrategy 10 | { 11 | None = 0, 12 | 13 | /// 14 | /// The file is attached to the object created by the object selector. 15 | /// 16 | AttachToCurrentObject = 1, 17 | 18 | /// 19 | /// The file is attached to a new object, then related to the object created by the object selector. 20 | /// 21 | CreateNewObject = 2 22 | } 23 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/Configuration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | using MFiles.VAF.Configuration; 4 | 5 | namespace XmlImporter 6 | { 7 | /// 8 | /// The configuration of the Xml importer. 9 | /// 10 | [DataContract] 11 | public class Configuration 12 | { 13 | 14 | /// 15 | /// Instructions for importing. 16 | /// Each import instruction is a definition of what to import and can 17 | /// import from multiple locations. 18 | /// 19 | [DataMember] 20 | [JsonConfEditor(Label = "Import Instructions", ChildName = "Import Instruction")] 21 | public List ImportInstructions { get; set; } 22 | = new List(); 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/FileLocationStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace XmlImporter 2 | { 3 | /// 4 | /// Strategy to use to locate the PDF (or other) file to attach. 5 | /// 6 | public enum FileLocationStrategy 7 | { 8 | /// 9 | /// Look for a file with the same name as the current XML file (e.g. "Invoice0001.xml" would look for "Invoice0001.pdf"). 10 | /// 11 | LookForFileWithSameName = 0, 12 | 13 | /// 14 | /// Use an XPath query to identify the file to attach. 15 | /// 16 | UseXPathQueryToLocateFileName = 1 17 | } 18 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/FileNotFoundHandlingStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace XmlImporter 2 | { 3 | /// 4 | /// The strategy to use when expecting to attach a file, but the file not being found. 5 | /// 6 | public enum FileNotFoundHandlingStrategy 7 | { 8 | /// 9 | /// An exception is thrown and the file is not imported. 10 | /// 11 | Fail = 0, 12 | 13 | /// 14 | /// The fact that the file is missing is ignored and the new object creation skipped. 15 | /// 16 | Ignore = 1 17 | } 18 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/ImportExceptionHandlingStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace XmlImporter 2 | { 3 | /// 4 | /// The strategy to use for exceptions during file import. 5 | /// 6 | public enum ImportExceptionHandlingStrategy 7 | { 8 | /// 9 | /// Items will be moved to a subfolder in the path in which they were found. 10 | /// 11 | MoveToSubFolder = 0, 12 | 13 | /// 14 | /// Items will be deleted. 15 | /// 16 | Delete = 1, 17 | 18 | /// 19 | /// Items will be moved to a specific folder. 20 | /// 21 | MoveToSpecificFolder = 2 22 | 23 | // TODO: CreateMFilesObject = 3 24 | } 25 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("XmlImporter")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("XmlImporter")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b344f366-4805-4546-8d26-9ecd5de03c69")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/PropertySelector.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | using MFilesAPI; 4 | 5 | namespace XmlImporter 6 | { 7 | /// 8 | /// Identifies a specific property value to import for an object. 9 | /// 10 | /// Extends . 11 | [DataContract] 12 | [JsonConfEditor(NameMember = nameof(PropertySelector.PropertyDef))] 13 | public class PropertySelector 14 | : XPathSelector 15 | { 16 | /// 17 | /// The property definition that this value is for. 18 | /// 19 | [DataMember(Order = 1)] 20 | [MFPropertyDef] 21 | public MFIdentifier PropertyDef { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/Readme.md: -------------------------------------------------------------------------------- 1 | # XML Importer 2 | 3 | This code sample supports the how-to video available within the [M-Files Academy](https://m-files.csod.com/LMS/LoDetails/DetailsLo.aspx?loId=e600d2d9-677b-4a61-9483-d1b202b98004&back=%2fLMS%2fBrowseTraining%2fBrowseTraining.aspx#t=1). Pull requests that improve this code sample are accepted, provided they meet our contribution guidelines. 4 | 5 | This source code is unsupported. Use at your own risk, under the acceptance that you - the company compiling and deploying the software - take full responsibility for the impact of deployment, any issues caused by the deployment, and the ongoing maintenance of the code you are deploying. 6 | 7 | -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/StaticPropertyValue.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | 4 | namespace XmlImporter 5 | { 6 | /// 7 | /// A static property value to be set on new objects. 8 | /// 9 | [DataContract] 10 | [JsonConfEditor(NameMember = nameof(StaticPropertyValue.PropertyDef))] 11 | public class StaticPropertyValue 12 | { 13 | /// 14 | /// The property definition that this value is for. 15 | /// 16 | [DataMember] 17 | [MFPropertyDef] 18 | public MFIdentifier PropertyDef { get; set; } 19 | 20 | /// 21 | /// The value for the property value. 22 | /// 23 | [DataMember] 24 | [TextEditor] 25 | public object Value { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/VaultApplication.Dashboard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MFiles.VAF.Configuration.Domain.Dashboards; 3 | 4 | namespace XmlImporter 5 | { 6 | public partial class VaultApplication 7 | { 8 | /// 9 | /// Generates the HTML for the dashboard. 10 | /// 11 | /// 12 | public string DashboardGenerator() 13 | { 14 | 15 | // Create the content for the dashboard. 16 | var content = new DashboardContentCollection 17 | { 18 | // Display the licence information. 19 | new DashboardCustomContent($"

The current licence status is: {this.License.LicenseStatus}.

"), 20 | 21 | // Display some configuration information. 22 | new DashboardCustomContent($"

There are {this.Configuration.ImportInstructions.Count} import instructions configured.

") 23 | }; 24 | 25 | // The status dashboard is our root object, and will handle generating the required HTML. 26 | var statusDashboard = new StatusDashboard(); 27 | 28 | // Create a panel for this content to sit in and set the content and title. 29 | var panel = new DashboardPanel() 30 | { 31 | Title = "Xml Importer", 32 | InnerContent = content 33 | }; 34 | 35 | // Add the panel to the dashboard. 36 | statusDashboard.Contents.Add(panel); 37 | 38 | //Return the dashboard HTML. 39 | return statusDashboard.ToString(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/VaultApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Xml.Linq; 6 | using System.Xml.XPath; 7 | using MFiles.VAF; 8 | using MFiles.VAF.AdminConfigurations; 9 | using MFiles.VAF.Common; 10 | using MFiles.VAF.Configuration; 11 | using MFiles.VAF.Core; 12 | using MFilesAPI; 13 | 14 | namespace XmlImporter 15 | { 16 | /// 17 | /// The entry point for this Vault Application Framework application. 18 | /// 19 | /// Examples and further information available on the developer portal: http://developer.m-files.com/. 20 | public partial class VaultApplication 21 | : ConfigurableVaultApplicationBase 22 | { 23 | } 24 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/XPathSelector.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | 4 | namespace XmlImporter 5 | { 6 | /// 7 | /// An abstract class for selecting data via an XPath query. 8 | /// 9 | [DataContract] 10 | public abstract class XPathSelector 11 | { 12 | /// 13 | /// The XPath query that selects the data. 14 | /// 15 | [DataMember(Order = 0)] 16 | [TextEditor(Label = "XPath Query")] 17 | public string XPathQuery { get; set; } 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/XmlNamespace.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using MFiles.VAF.Configuration; 3 | 4 | namespace XmlImporter 5 | { 6 | /// 7 | /// A prefix/URI combination, 8 | /// used in combination with an 9 | /// when querying data in XML files containing XML namespaces. 10 | /// 11 | [DataContract] 12 | public class XmlNamespace 13 | { 14 | /// 15 | /// The prefix to be used in the XPath query. 16 | /// 17 | /// Does not need to be the same prefix as the document, but recommended for readability. 18 | [DataMember] 19 | public string Prefix { get; set; } 20 | 21 | /// 22 | /// The Uri that this prefix represents. 23 | /// 24 | [DataMember] 25 | public string Uri { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/appdef.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 468e859a-704f-470f-aa4f-d57ec81b0112 7 | XmlImporter 8 | 9 | 10 | 0.1 11 | 12 | 13 | 14 | XmlImporter 15 | XmlImporter.dll 16 | XmlImporter.VaultApplication 17 | Install 18 | Uninstall 19 | Initialize 20 | Uninitialize 21 | StartOperations 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/XmlImporter/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.Crypto.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/XmlImporter/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.Crypto.dll -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.Configuration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/XmlImporter/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.Configuration.dll -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/XmlImporter/packages/MFiles.VAF.2.0.0.0/lib/net45/MFiles.VAF.dll -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/packages/MFiles.VAF.2.0.0.0/readme.txt: -------------------------------------------------------------------------------- 1 | M-Files Vault Application Framework 2 | 3 | Framework for developing M-Files Vault Applications. 4 | 5 | Requirements: 6 | - M-Files API installed on the local environment. (Comes with any M-Files installation.) 7 | - Reference to MFilesAPI added to the Visual Studio project. (Add reference... -> COM -> Type Libraries -> M-Files API ) -------------------------------------------------------------------------------- /Samples/VAF/XmlImporter/packages/MSBuildTasks.1.5.0.196/tools/MSBuild.Community.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Files/MFilesSamplesAndLibraries/f409874bc37484fa964ff19e8644b36c2d6f3edf/Samples/VAF/XmlImporter/packages/MSBuildTasks.1.5.0.196/tools/MSBuild.Community.Tasks.dll -------------------------------------------------------------------------------- /Visual Studio Snippets/Vault Application Framework/Licence.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 M-Files Oy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Visual Studio Snippets/Vault Application Framework/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("VAFSnippets")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("M-Files Corporation")] 12 | [assembly: AssemblyCopyright("2017-")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // Version information for an assembly consists of the following four values: 22 | // 23 | // Major Version 24 | // Minor Version 25 | // Build Number 26 | // Revision 27 | // 28 | // You can specify all the values or you can default the Build and Revision Numbers 29 | // by using the '*' as shown below: 30 | [assembly: AssemblyVersion("1.2.*")] 31 | [assembly: AssemblyFileVersion("1.2.5")] 32 | -------------------------------------------------------------------------------- /Visual Studio Snippets/Vault Application Framework/VAFSnippets.pkgdef: -------------------------------------------------------------------------------- 1 | // C# snippets 2 | [$RootKey$\Languages\CodeExpansions\CSharp\Paths] 3 | "VAFSnippets"="$PackageFolder$\Snippets\CSharp\MFilesVAF" -------------------------------------------------------------------------------- /Visual Studio Snippets/Vault Application Framework/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Visual Studio Snippets/Vault Application Framework/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | M-Files Code Snippets - VAF 6 | Creates Visual Studio code snippets to create M-Files Vault Application Framework applications. 7 | http://developer.m-files.com/Frameworks/Vault-Application-Framework/Visual-Studio-Template/Code-Snippets/ 8 | Licence.txt 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | --------------------------------------------------------------------------------