public MessageForm( [NotNull] IServiceProvider provider, MessageFormMode mode, MessageInfo message) { if (provider == null) { throw new ArgumentNullException("provider"); } _serviceManager = new ServiceManager(provider); InitializeComponent(); _formMode = mode; _messageInfo = message ?? new MessageInfo(); _previewSourceNum = OutboxManager.RegisterPreviewSource(this); _serviceManager.Publish <IMessageEditorService>( new MessageEditorService(this)); CustomInitializeComponent(); _menuGenerator = new StripMenuGenerator(_serviceManager, _menuStrip, "MessageEditor.Menu"); _toolbarGenerator = new StripMenuGenerator(_serviceManager, _toolStrip, "MessageEditor.Toolbar"); _tagsbarGenerator = new SmilesToolbarGenerator(_serviceManager, "Forum.MessageEditor.TagsBar", _tagsBar); _syntaxExtSvc = provider.GetRequiredService <IEditorSyntaxExtensibilityService>(); }
private void OutboxPreviewEventHandler(object sender, JanusProtocolEventArgs e) { e.Response = new Resource( _mimeTypeHtml, OutboxManager.GetPreviewData(e.Id)); }
protected override void OnClosed(EventArgs e) { OutboxManager.UnregisterPreviewSource(_previewSourceNum); Config.Instance.MessageFormBounds.Bounds = WindowState == FormWindowState.Normal ? Bounds : RestoreBounds; Config.Instance.MessageFormBounds .Maximized = WindowState == FormWindowState.Maximized; Config.Instance.ShowMessageFormTagBar = _tagsBar.Visible; }
public OutboxDummyForm(IServiceProvider provider, OutboxManager manager) { if (provider == null) throw new ArgumentNullException(nameof(provider)); _serviceManager = new ServiceContainer(provider); _manager = manager; InitializeComponent(); _serviceManager.Publish<IDefaultCommandService>( new DefaultCommandService("Janus.Outbox.EditItem")); MessageForm.MessageSent += MessageSent; _grid.Indent = Config.Instance.ForumDisplayConfig.GridIndent; _grid.SmallImageList = OutboxImageManager.ImageList; }
public OutboxDummyForm(IServiceProvider provider, OutboxManager manager) { if (provider == null) { throw new ArgumentNullException("provider"); } _serviceManager = new ServiceManager(provider); _manager = manager; InitializeComponent(); _serviceManager.Publish <IDefaultCommandService>( new DefaultCommandService("Janus.Outbox.EditItem")); MessageForm.MessageSent += MessageSent; _grid.Indent = Config.Instance.ForumDisplayConfig.GridIndent; _grid.SmallImageList = OutboxImageManager.ImageList; }
internal NewMessageCollection(IServiceProvider provider, OutboxManager manager) { _provider = provider; _manager = manager; }
internal RateMarkCollection(IServiceProvider provider, OutboxManager manager) { _provider = provider; _manager = manager; }
internal DownloadTopicCollection(IServiceProvider provider, OutboxManager manager) { _provider = provider; _manager = manager; }
public FeatureActiveOutboxItemService(IServiceProvider provider) { Features.Instance.AfterFeatureActivate += AfterFeatureActivate; _outboxManager = (OutboxManager)provider.GetRequiredService<IOutboxManager>(); _outboxManager.OutboxForm.SelectedNodesChanged += OutboxForm_SelectedNodesChanged; }