コード例 #1
0
        protected override void AddOtherServices()
        {
            var foo = base.LayoutSettingsFileName;

            base.AddOtherServices();
            This.AddService <IAboutService>(new AboutCertXplorerService());

            This.AddService <IDocumentHandlerRegistryService>(
                DocumentFactory.CreateDocumentHandlerRegistryService());
        }
コード例 #2
0
        private void LoadBuilders()
        {
            var registry = This.GetService <IDocumentHandlerRegistryService>(true);

            registry.Register(() => new Asn1DocumentHandler());

            foreach (var p in Globals.PluginsManager.DataHandlerPlugins)
            {
                var plugin = p;
                if (!Globals.PluginsManager.Initialize(plugin))
                {
                    This.Logger.Error("Plugin initialization failed. Disabling it.");
                    continue;
                }

                var documentHandler = new PluginBasedDocumentHandler(plugin);
                registry.RegisterHandlerPlugin(documentHandler);
            }
        }
コード例 #3
0
        private void InitializeActions()
        {
            exitAction.Run  += (s, e) => Close();
            aboutAction.Run += (s, e) =>
            {
                var service = This.GetService <IAboutService>();
                if (service == null)
                {
                    InformationBox.Show(this, string.Format(
                                            "About Delta.CertXplorer Version {0}", ThisAssembly.Version));
                }
                else
                {
                    service.ShowAboutDialog(this);
                }
            };

            openFileDocumentAction.Run += (s, e) =>
                                          Commands.RunVerb(Verbs.OpenFile);
            openCertificateDocumentAction.Run += (s, e) =>
                                                 Commands.RunVerb(Verbs.OpenCertificate);
        }