Esempio n. 1
0
        /// <inheritdoc />
        /// <remarks>Sets up <see cref="ConfigurationNode"/> and adds a configuration node to the M-Files Admin interface to edit the configuration.</remarks>
        public void InitializeAdminConfigurations(IAdminConfigurations adminConfigurations)
        {
            // Define a configuration node that will be shown in the admin area, and configuration will be made available in this vault application.
            // The configuration node will be named "Simple Configuration Integration Example".
            // The configuration options shown will be defined by the structure of the MyConfiguration class.
            this.ConfigurationNode =
                adminConfigurations.AddSimpleConfigurationNode <MyConfiguration>("Simple Configuration Integration Example");

            // React when the configuration is changed in the M-Files Admin, output the configuration information.
            this.ConfigurationNode.Changed += (oldConfig, newConfig) =>
            {
                SysUtils.ReportInfoToEventLog($"Updated (simple) configuration is:\r\n{newConfig}");
            };
        }
Esempio n. 2
0
        /// <inheritdoc />
        /// <remarks>Sets up <see cref="ConfigurationNode"/> and adds a configuration node to the M-Files Admin interface to edit the configuration.</remarks>
        public void InitializeAdminConfigurations(IAdminConfigurations adminConfigurations)
        {
            // Define a configuration node that will be shown in the admin area, and configuration will be made available in this vault application.
            // The configuration node will be named "Complex Configuration Integration Example".
            // The configuration options shown will be defined by the structure of the MyConfiguration class.
            // The GenerateDashboard method will be used to create the dashboard when that is selected in the configuration area.
            // Note: GenerateDashboard method is in VaultApplication.Dashboard.cs.
            this.ConfigurationNode =
                adminConfigurations
                .AddSimpleConfigurationNode <MyConfiguration>("Complex Configuration Integration Example", this.GenerateDashboard);

            // React when the configuration is changed in the M-Files Admin, output the configuration information.
            this.ConfigurationNode.Changed += (oldConfig, newConfig) =>
            {
                SysUtils.ReportInfoToEventLog($"Updated (complex) configuration is:\r\n{newConfig}");
            };

            // Provide some custom (server-side) validation.
            this.ConfigurationNode.Validator = this.CustomValidator;
        }
Esempio n. 3
0
 /// <inheritdoc />
 public void InitializeAdminConfigurations(IAdminConfigurations adminConfigurations)
 {
     this.Configuration = adminConfigurations
                          .AddSimpleConfigurationNode <Configuration>("Xml Importer", this.DashboardGenerator);
 }
Esempio n. 4
0
 /// <inheritdoc />
 public void InitializeAdminConfigurations(IAdminConfigurations adminConfigurations)
 {
     this.Configuration = adminConfigurations
                          .AddSimpleConfigurationNode <Configuration>("Split MFD Configuration");
 }