Beispiel #1
0
        public ChangeLog(string message)
        {
            InitializeComponent();
            DocumentFlow.IsToolBarVisible = false;
            var md = new Markdown.Xaml.Markdown();

            Content = md.Transform(message);
        }
Beispiel #2
0
        public void UpdateContent()
        {
            var md           = new Markdown.Xaml.Markdown();
            var checkRelease = _updater.Invoke()?.latestRelease;
            var contents     = checkRelease == null ?
                               Properties.Resources.CheckUpdateNoUpdateAvailable
                : checkRelease.Name + "\r\n" + checkRelease.Body;

            DocFlow.Document             = md.Transform(contents);
            DocFlow.Document.Background  = Brushes.White;
            DocFlow.Document.PagePadding = new Thickness(5);
            DocFlow.Document.FontFamily  = new FontFamily("Arial");
            DocFlow.Document.FontSize    = 14;
        }
Beispiel #3
0
        public Update(Shared.Helpers.Updater updater)
        {
            var md = new Markdown.Xaml.Markdown();

            _updater = updater;

            InitializeComponent();

            var contents = _updater.latestRelease.Name + "\r\n" + _updater.latestRelease.Body;

            DocFlow.Document             = md.Transform(contents);
            DocFlow.Document.Background  = Brushes.White;
            DocFlow.Document.PagePadding = new Thickness(5);
            DocFlow.Document.FontFamily  = new FontFamily("Arial");
            DocFlow.Document.FontSize    = 14;
        }
Beispiel #4
0
        public LogMessageDisplay(string message) : this()
        {
            Regex urlReg = new Regex(@"http(s)?://([\w-]+.)+[\w-]+(/[\w- ./?%&=])?");

            message = urlReg.Replace(message, "[$0]($0)");

            MarkdownEngine engine = new MarkdownEngine();
            FlowDocument   tmpDoc = engine.Transform(message);

            tmpDoc.TextAlignment = TextAlignment.Center;

            richMessageBox.CommandBindings.Add(new CommandBinding(
                                                   NavigationCommands.GoToPage,
                                                   (sender, e) =>
            {
                Process proc = new Process();
                proc.StartInfo.UseShellExecute = true;
                proc.StartInfo.FileName        = (string)e.Parameter;

                proc.Start();
            }));

            richMessageBox.Document = tmpDoc;
        }