private void CustomInitializeComponent() { StyleConfig.StyleChange += OnStyleChanged; UpdateStyle(); _msgViewer = new MsgViewer(_serviceManager) { Dock = DockStyle.Fill }; _splitContainer.Panel2.Controls.Add(_msgViewer); _grid.Columns[0].Text = SR.TGColumnNameLink; _grid.Columns[1].Text = SR.TGColumnComment; _grid.SmallImageList = _treeImages; if (Config.Instance.FavoritesColumnOrder.Length == _grid.Columns.Count) { _grid.ColumnsOrder = Config.Instance.FavoritesColumnOrder; } if (Config.Instance.FavoritesColumnWidth.Length == _grid.Columns.Count) { _grid.ColumnsWidth = Config.Instance.FavoritesColumnWidth; } _favManager.FavoritesReloaded += FavoritesReloaded; _grid.Indent = Config.Instance.ForumDisplayConfig.GridIndent; }
public MessageViewerActiveMessageService(MsgViewer messageViewer) { if (messageViewer == null) throw new ArgumentNullException("messageViewer"); _messageViewer = messageViewer; }
public MessageViewerActiveMessageService(MsgViewer messageViewer) { if (messageViewer == null) { throw new ArgumentNullException("messageViewer"); } _messageViewer = messageViewer; }
public SearchDummyForm(IServiceProvider provider) { _asyncOperation = AsyncHelper.CreateOperation(); _serviceManager = new ServiceManager(provider); _serviceManager.Publish<IDefaultCommandService>( new DefaultCommandService("Janus.Forum.GoToMessage")); this.AssignServices(provider); InitializeComponent(); _msgViewer = new MsgViewer(_serviceManager) { Dock = DockStyle.Fill }; _splitContainer.Panel2.Controls.Add(_msgViewer); CustomInitializeComponent(); }
public SearchDummyForm(IServiceProvider provider) { _asyncOperation = AsyncHelper.CreateOperation(); _serviceManager = new ServiceManager(provider); _serviceManager.Publish <IDefaultCommandService>( new DefaultCommandService("Janus.Forum.GoToMessage")); this.AssignServices(provider); InitializeComponent(); _msgViewer = new MsgViewer(_serviceManager) { Dock = DockStyle.Fill }; _splitContainer.Panel2.Controls.Add(_msgViewer); CustomInitializeComponent(); }
private void CustomInitializeComponent() { StyleConfig.StyleChange += OnStyleChanged; UpdateStyle(); _msgViewer = new MsgViewer(_serviceManager) { Dock = DockStyle.Fill }; _splitContainer.Panel2.Controls.Add(_msgViewer); _grid.Columns[0].Text = SR.TGColumnNameLink; _grid.Columns[1].Text = SR.TGColumnComment; _grid.SmallImageList = _treeImages; if (Config.Instance.FavoritesColumnOrder.Length == _grid.Columns.Count) _grid.ColumnsOrder = Config.Instance.FavoritesColumnOrder; if (Config.Instance.FavoritesColumnWidth.Length == _grid.Columns.Count) _grid.ColumnsWidth = Config.Instance.FavoritesColumnWidth; _favManager.FavoritesReloaded += FavoritesReloaded; _grid.Indent = Config.Instance.ForumDisplayConfig.GridIndent; }
private void CustomInitializeComponent() { StyleConfig.StyleChange += OnStyleChanged; State = Config.Instance.ForumFormState; var imageList = new ImageList { ColorDepth = ColorDepth.Depth32Bit }; // Делаем поддержку локализации для TreeGrid'а // В случае изменения TreeGrid'а в Designer'е, необходимо внести изменения сюда _tgMsgs.Columns[1].ImageIndex = imageList.AddImage(_imageManager.GetMarkImage(MessageFlagExistence.OnMessage)); _tgMsgs.Columns[2].Text = SR.TGColumnSubject; _tgMsgs.Columns[2].ImageIndex = imageList.AddImage( _imageManager.GetMessageImage( MessageType.Ordinal, MessageFlagExistence.None, false, MessageFlagExistence.None, false)); _tgMsgs.Columns[3].Text = SR.TGColumnAuthor; _tgMsgs.Columns[3].ImageIndex = imageList.AddImage(_imageManager.GetUserImage(UserClass.User)); _tgMsgs.Columns[4].Text = SR.TGColumnRate; _tgMsgs.Columns[5].Text = SR.TGColumnSubjectRate; _tgMsgs.Columns[6].Text = SR.TGColumnAnswers; _tgMsgs.Columns[7].Text = SR.TGColumnDate; _tgMsgs.Columns[7].ImageIndex = imageList.AddImage(_imageManager.GetMessageDateImage(DateTime.Now)); _tgMsgs.Font = Config.Instance.StyleConfig.MessageTreeFont; _tgMsgs.BackColor = Config.Instance.StyleConfig.MessageTreeBack; _tgMsgs.GridLines = Config.Instance.ForumDisplayConfig.MsgListGridLines; _tgMsgs.SmallImageList = imageList; if (Config.Instance.ForumColumnOrder.Length == _tgMsgs.Columns.Count) _tgMsgs.ColumnsOrder = Config.Instance.ForumColumnOrder; if (Config.Instance.ForumColumnWidth.Length == _tgMsgs.Columns.Count) _tgMsgs.ColumnsWidth = Config.Instance.ForumColumnWidth; _msgViewer = new MsgViewer(_serviceManager) { Dock = DockStyle.Fill }; _bottomPanel.Controls.Add(_msgViewer); ApplicationManager.Instance.ForumNavigator.MessageNavigated += MessageNavigated; _btnResetFilter.Text = SR.Forum.ResetFilter; }
private void CustomInitializeComponent() { StyleConfig.StyleChange += OnStyleChanged; State = Config.Instance.ForumFormState; var imageList = new ImageList { ColorDepth = ColorDepth.Depth32Bit }; // Делаем поддержку локализации для TreeGrid'а // В случае изменения TreeGrid'а в Designer'е, необходимо внести изменения сюда _tgMsgs.Columns[1].ImageIndex = imageList.AddImage(_imageManager.GetMarkImage(MessageFlagExistence.OnMessage)); _tgMsgs.Columns[2].Text = SR.TGColumnSubject; _tgMsgs.Columns[2].ImageIndex = imageList.AddImage( _imageManager.GetMessageImage( MessageType.Ordinal, MessageFlagExistence.None, false, MessageFlagExistence.None, false)); _tgMsgs.Columns[3].Text = SR.TGColumnAuthor; _tgMsgs.Columns[3].ImageIndex = imageList.AddImage(_imageManager.GetUserImage(UserClass.User)); _tgMsgs.Columns[4].Text = SR.TGColumnRate; _tgMsgs.Columns[5].Text = SR.TGColumnSubjectRate; _tgMsgs.Columns[6].Text = SR.TGColumnAnswers; _tgMsgs.Columns[7].Text = SR.TGColumnDate; _tgMsgs.Columns[7].ImageIndex = imageList.AddImage(_imageManager.GetMessageDateImage(DateTime.Now)); _tgMsgs.Font = Config.Instance.StyleConfig.MessageTreeFont; _tgMsgs.BackColor = Config.Instance.StyleConfig.MessageTreeBack; _tgMsgs.GridLines = Config.Instance.ForumDisplayConfig.MsgListGridLines; _tgMsgs.SmallImageList = imageList; if (Config.Instance.ForumColumnOrder.Length == _tgMsgs.Columns.Count) { _tgMsgs.ColumnsOrder = Config.Instance.ForumColumnOrder; } if (Config.Instance.ForumColumnWidth.Length == _tgMsgs.Columns.Count) { _tgMsgs.ColumnsWidth = Config.Instance.ForumColumnWidth; } _msgViewer = new MsgViewer(_serviceManager) { Dock = DockStyle.Fill }; _bottomPanel.Controls.Add(_msgViewer); ApplicationManager.Instance.ForumNavigator.MessageNavigated += MessageNavigated; _btnResetFilter.Text = SR.Forum.ResetFilter; }