Inheritance: IOutboxManager, IInitable, ITreeNode, IKeyedNode
Exemple #1
0
        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>();
        }
Exemple #2
0
 private void OutboxPreviewEventHandler(object sender, JanusProtocolEventArgs e)
 {
     e.Response =
         new Resource(
             _mimeTypeHtml,
             OutboxManager.GetPreviewData(e.Id));
 }
Exemple #3
0
        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;
        }
Exemple #4
0
		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;
		}
Exemple #5
0
        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;
        }
Exemple #6
0
 internal NewMessageCollection(IServiceProvider provider, OutboxManager manager)
 {
     _provider = provider;
     _manager  = manager;
 }
 internal RateMarkCollection(IServiceProvider provider, OutboxManager manager)
 {
     _provider = provider;
     _manager  = manager;
 }
Exemple #8
0
		internal RateMarkCollection(IServiceProvider provider, OutboxManager manager)
		{
			_provider = provider;
			_manager = manager;
		}
Exemple #9
0
 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;
		}