public void SelectedChangeChanged(IChangeReport report)
 {
     if (_changedRecordSelectedEventToRaise != null)
     {
         _changedRecordSelectedEventToRaise.Raise(report);
     }
 }
Beispiel #2
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     // TODO: Add better presenter.
     return(report is ErrorDeterminingChangeReport
                                 ? (IChangePresenter)report
                                 : new DefaultChangePresenter(report, repository));
 }
Beispiel #3
0
 public void ChangeOccurred(IChangeReport change)
 {
     foreach (IMergeEventListener listener in _listeners)
     {
         listener.ChangeOccurred(change);
     }
 }
Beispiel #4
0
 public void ChangeOccurred(IChangeReport change)
 {
     foreach (IMergeEventListener listener in _listeners)
     {
         listener.ChangeOccurred(change);
     }
 }
Beispiel #5
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     if (report is TextEditChangeReport)
     {
         return(new TextEditChangePresenter(report as TextEditChangeReport, repository));
     }
     return(new DefaultChangePresenter(report, repository));
 }
Beispiel #6
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     if ((report as IXmlChangeReport) != null)
     {
         return(new NotePresenter(report as IXmlChangeReport, repository));
     }
     return(new DefaultChangePresenter(report, repository));
 }
Beispiel #7
0
        public void LoadReport(IChangeReport report)
        {
            if (report == null)
            {
                if (Platform.IsWindows)
                {
                    // GECKOFX blank url does not blank page
                    _normalChangeDescriptionRenderer.Navigate(string.Empty);
                }
            }
            else
            {
                var presenter = _handlers.GetHandlerForPresentation(report.PathToFile).GetChangePresenter(report, _repository);
                var path      = Path.GetTempFileName();
                File.WriteAllText(path, presenter.GetHtml("normal", _styleSheet));
                try
                {
                    this._normalChangeDescriptionRenderer.Navigate(path);
                }
                catch (InvalidOperationException)
                {
                    System.Console.WriteLine("_normalChangeDescriptionRenderer not ready");
                }
                path = Path.GetTempFileName();
                string contents;
                try
                {
                    contents = presenter.GetHtml("raw", _styleSheet);
                }
                catch (Exception error)
                {
                    contents = error.Message;
                }

                if (!string.IsNullOrEmpty(contents))
                {
                    if (!tabControl1.TabPages.Contains(tabPageRaw))
                    {
                        System.Console.WriteLine("adding raw tab back");
                        this.tabControl1.TabPages.Add(tabPageRaw);
                    }
                    File.WriteAllText(path, contents);
                    try
                    {
                        this._rawChangeDescriptionRenderer.Navigate(path);
                    }
                    catch (InvalidOperationException)
                    {
                        System.Console.WriteLine("_rawChangeDescriptionRenderer not ready");
                    }
                }
                else
                {
                    this.tabControl1.TabPages.Remove(tabPageRaw);
                }
            }
        }
        public void LoadReport(IChangeReport report)
        {
            if (report == null)
            {
            #if !MONO
                // GECKOFX blank url does not blank page
                _normalChangeDescriptionRenderer.Navigate(string.Empty);
            #endif
            }
            else
            {
                var presenter = _handlers.GetHandlerForPresentation(report.PathToFile).GetChangePresenter(report, _repository);
                var path = Path.GetTempFileName();
                File.WriteAllText(path, presenter.GetHtml("normal", _styleSheet));
                try
                {
                    this._normalChangeDescriptionRenderer.Navigate(path);
                }
                catch (InvalidOperationException)
                {
                    System.Console.WriteLine("_normalChangeDescriptionRenderer not ready");
                }
                path = Path.GetTempFileName();
                string contents;
                try
                {
                    contents = presenter.GetHtml("raw", _styleSheet);
                }
                catch (Exception error)
                {
                    contents = error.Message;
                }

                if (!string.IsNullOrEmpty(contents))
                {
                    if(!tabControl1.TabPages.Contains(tabPageRaw))
                    {
                        System.Console.WriteLine("adding raw tab back");
                        this.tabControl1.TabPages.Add(tabPageRaw);
                    }
                    File.WriteAllText(path, contents);
                    try
                    {
                        this._rawChangeDescriptionRenderer.Navigate(path);
                    }
                    catch (InvalidOperationException)
                    {
                        System.Console.WriteLine("_rawChangeDescriptionRenderer not ready");
                    }
                }
                else
                {
                    this.tabControl1.TabPages.Remove(tabPageRaw);
                }
            }
        }
		public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
		{
			var fieldWorksModelVersionChangeReport = report as FieldWorksModelVersionChangeReport;
			if (fieldWorksModelVersionChangeReport != null)
				return new FieldWorksModelVersionChangePresenter(fieldWorksModelVersionChangeReport);

			if (report is ErrorDeterminingChangeReport)
				return (IChangePresenter)report;

			return new DefaultChangePresenter(report, repository);
		}
		internal static IChangePresenter GetCommonChangePresenter(IChangeReport report, HgRepository repository)
		{
			var xmlChangeReport = report as IXmlChangeReport;
			if (xmlChangeReport != null)
				return new FieldWorksChangePresenter(xmlChangeReport);

			if (report is ErrorDeterminingChangeReport)
				return (IChangePresenter)report;

			return new DefaultChangePresenter(report, repository);
		}
Beispiel #11
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     if ((report as IXmlChangeReport) != null)
     {
         return(new LiftChangePresenter(report as IXmlChangeReport));
     }
     if (report is ErrorDeterminingChangeReport)
     {
         return((IChangePresenter)report);
     }
     return(new DefaultChangePresenter(report, repository));
 }
 public IChangePresenter GetChangePresenterForDataType(IChangeReport report)
 {
     IChorusFileTypeHandler handler;
     if (string.IsNullOrEmpty(report.PathToFile))
     {
         Debug.Fail("Report had empty path (only seeing this because in Debug Mode)");
         handler = new DefaultFileTypeHandler();
     }
     else
     {
         handler = _fileHandlers.GetHandlerForPresentation(report.PathToFile);
     }
     return handler.GetChangePresenter(report, _revisionInspector.Repository);
 }
Beispiel #13
0
        public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
        {
            if (report == null)
            {
                throw new ArgumentNullException("report");
            }
            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            var extension = FileWriterService.GetExtensionFromPathname(report.PathToFile);

            return(GetHandlerfromExtension(extension).GetChangePresenter(report, repository));
        }
        public IChangePresenter GetChangePresenterForDataType(IChangeReport report)
        {
            IChorusFileTypeHandler handler;

            if (string.IsNullOrEmpty(report.PathToFile))
            {
                Debug.Fail("Report had empty path (only seeing this because in Debug Mode)");
                handler = new DefaultFileTypeHandler();
            }
            else
            {
                handler = _fileHandlers.GetHandlerForPresentation(report.PathToFile);
            }
            return(handler.GetChangePresenter(report, _revisionInspector.Repository));
        }
        public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
        {
            var fieldWorksModelVersionChangeReport = report as FieldWorksModelVersionChangeReport;

            if (fieldWorksModelVersionChangeReport != null)
            {
                return(new FieldWorksModelVersionChangePresenter(fieldWorksModelVersionChangeReport));
            }

            if (report is ErrorDeterminingChangeReport)
            {
                return((IChangePresenter)report);
            }

            return(new DefaultChangePresenter(report, repository));
        }
Beispiel #16
0
        internal static IChangePresenter GetCommonChangePresenter(IChangeReport report, HgRepository repository)
        {
            var xmlChangeReport = report as IXmlChangeReport;

            if (xmlChangeReport != null)
            {
                return(new FieldWorksCustomLayoutChangePresenter(xmlChangeReport));
            }

            if (report is ErrorDeterminingChangeReport)
            {
                return((IChangePresenter)report);
            }

            return(new DefaultChangePresenter(report, repository));
        }
Beispiel #17
0
        public void LoadReport(IChangeReport report)
        {
            if (report == null)
            {
                _normalChangeDescriptionRenderer.Navigate(string.Empty);
            }
            else
            {
                var presenter = _handlers.GetHandlerForPresentation(report.PathToFile).GetChangePresenter(report, _repository);
                var path = Path.GetTempFileName();
                File.WriteAllText(path, presenter.GetHtml("normal", _styleSheet));
                this._normalChangeDescriptionRenderer.Navigate(path);
                path = Path.GetTempFileName();
                string contents;
                try
                {
                    contents = presenter.GetHtml("raw", _styleSheet);
                }
                catch (Exception error)
                {
                    contents = error.Message;
                }

                if (!string.IsNullOrEmpty(contents))
                {
                    if(!tabControl1.TabPages.Contains(tabPageRaw))
                        this.tabControl1.TabPages.Add(tabPageRaw);
                    File.WriteAllText(path, contents);
                    this._rawChangeDescriptionRenderer.Navigate(path);
                }
                else
                {
                    this.tabControl1.TabPages.Remove(tabPageRaw);
                }
            }
        }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     return new DefaultChangePresenter(report, repository);
 }
Beispiel #19
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     if (report is TextEditChangeReport)
     {
         return new TextEditChangePresenter(report as TextEditChangeReport, repository);
     }
     return new DefaultChangePresenter(report, repository);
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     //this is never called because we said we don't present diffs; review is handled some other way
     throw new NotImplementedException();
 }
Beispiel #21
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     throw new NotImplementedException();
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     throw new NotImplementedException();
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     throw new NotSupportedException("'GetChangePresenter' method is not supported for unknown file types.");
 }
 public void ChangeOccurred(IChangeReport change)
 {
     //Debug.WriteLine(change);
     Changes.Add(change);
 }
 public void SelectedChangeChanged(IChangeReport report)
 {
     if (_changedRecordSelectedEventToRaise != null)
     {
         _changedRecordSelectedEventToRaise.Raise(report);
     }
 }
        public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
        {
            if (report == null)
                throw new ArgumentNullException("report");
            if (repository == null)
                throw new ArgumentNullException("repository");

            var extension = FileWriterService.GetExtensionFromPathname(report.PathToFile);
            return GetHandlerfromExtension(extension).GetChangePresenter(report, repository);
        }
 public void ChangeOccurred(IChangeReport change)
 {
     // N.B.: If you ever decide to write out the change reports,
     // then be prepared to revise XmlMergeService, as it doesn't bother to add them at all,
     // in order to save a ton of memory and avoid 'out of memory' exceptions.
 }
 public WeSayConfigChangePresenter(IChangeReport report, HgRepository repository) : base(report, repository)
 {
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     return(new WeSayConfigChangePresenter(report, repository));
 }
Beispiel #30
0
 public void ChangeOccurred(IChangeReport change)
 {
     // N.B.: If you ever decide to write out the change reports,
     // then be prepared to revise XmlMergeService, as it doesn't bother to add them at all,
     // in order to save a ton of memory and avoid 'out of memory' exceptions.
 }
Beispiel #31
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     if ((report as IXmlChangeReport) != null)
     {
         return new LiftChangePresenter(report as IXmlChangeReport);
     }
     if (report is ErrorDeterminingChangeReport)
     {
         return (IChangePresenter)report;
     }
     return new DefaultChangePresenter(report, repository);
 }
Beispiel #32
0
 public ImageChangePresenter(IChangeReport report)
 {
     _report = report;
 }
Beispiel #33
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     return(new ImageChangePresenter(report));
 }
Beispiel #34
0
 public AudioChangePresenter(IChangeReport report)
 {
     _report = report;
 }
Beispiel #35
0
 public DefaultChangePresenter(IChangeReport report, HgRepository repository)
 {
     _report = report;
     _repository = repository;
 }
Beispiel #36
0
 public DefaultChangePresenter(IChangeReport report, HgRepository repository)
 {
     _report     = report;
     _repository = repository;
 }
 public void ChangeOccurred(IChangeReport change)
 {
     //Debug.WriteLine(change);
     Changes.Add(change);
 }
Beispiel #38
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     return new ImageChangePresenter(report);
 }
Beispiel #39
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     // TODO: Add better presenter.
     return report is ErrorDeterminingChangeReport
             ? (IChangePresenter) report
             : new DefaultChangePresenter(report, repository);
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     if ((report as IXmlChangeReport) != null)
     {
         return new NotePresenter(report as IXmlChangeReport, repository);
     }
     return new DefaultChangePresenter(report, repository);
 }
Beispiel #41
0
 public void ChangeOccurred(IChangeReport change)
 {
 }
Beispiel #42
0
 public ImageChangePresenter(IChangeReport report)
 {
     _report = report;
 }
 public WeSayConfigChangePresenter(IChangeReport report, HgRepository repository)
     : base(report, repository)
 {
 }
Beispiel #44
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     //this is never called because we said we don't present diffs; review is handled some other way
     throw new NotImplementedException();
 }
Beispiel #45
0
 public AudioChangePresenter(IChangeReport report)
 {
     _report = report;
 }
Beispiel #46
0
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     return(FieldWorksChangePresenter.GetCommonChangePresenter(report, repository));
 }
 public void ChangeOccurred(IChangeReport change)
 {
     _stream.WriteLine(change.ToString());
 }
 public void ChangeOccurred(IChangeReport change)
 {
     _stream.WriteLine(change.ToString());
 }
Beispiel #49
0
 public void ChangeOccurred(IChangeReport change)
 {
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     return FieldWorksChangePresenter.GetCommonChangePresenter(report, repository);
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     return new WeSayConfigChangePresenter(report, repository);
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     return(new DefaultChangePresenter(report, repository));
 }
 public IChangePresenter GetChangePresenter(IChangeReport report, HgRepository repository)
 {
     throw new NotSupportedException("'GetChangePresenter' method is not supported for unknown file types.");
 }