/// <summary> /// Start doing whatever is needed for the supported type of action. /// </summary> public void StartWorking(Dictionary<string, string> commandLineArgs) { _fwProjectFolder = Path.GetDirectoryName(commandLineArgs["-p"]); MainForm = new MainBridgeForm { ClientSize = new Size(904, 510) }; _chorusUser = new ChorusUser(commandLineArgs["-u"]); _chorusSystem = Utilities.InitializeChorusSystem(Utilities.LiftOffset(_fwProjectFolder), _chorusUser.Name, LiftFolder.AddLiftFileInfoToFolderConfiguration); _chorusSystem.EnsureAllNotesRepositoriesLoaded(); _notesBrowser = _chorusSystem.WinForms.CreateNotesBrowser(); var conflictHandler = _notesBrowser.MessageContentHandlerRepository.KnownHandlers.OfType<MergeConflictEmbeddedMessageContentHandler>().First(); _chorusSystem.NavigateToRecordEvent.Subscribe(JumpToLiftObject); conflictHandler.HtmlAdjuster = AdjustConflictHtml; if (_connectionHelper != null) JumpUrlChanged += _connectionHelper.SendJumpUrlToFlex; var viewer = new BridgeConflictView(); MainForm.Controls.Add(viewer); MainForm.Text = viewer.Text; viewer.Dock = DockStyle.Fill; viewer.SetBrowseView(_notesBrowser); // Only used by FLEx, so how can it not be in use? //if (_currentLanguageProject.FieldWorkProjectInUse) // viewer.EnableWarning(); viewer.SetProjectName(LiftUtilties.GetLiftProjectName(_fwProjectFolder)); }
/// <summary> /// Get a UI control which shows all notes in the project (including conflicts), and /// lets the user filter them and interact with them. /// </summary> public NotesBrowserPage CreateNotesBrowser() { _parent.EnsureAllNotesRepositoriesLoaded(); return(_container.Resolve <NotesBrowserPage.Factory>()(_parent._annotationRepositories.Values)); }