source: trunk/CrypPlugins/P2PEditor/GUI/ParticipateAdorner.cs @ 2277

Last change on this file since 2277 was 1727, checked in by Paul Lelgemann, 11 years ago

+ P2PEditor can display the status of jobs, if available; Participating displays overlay while loading workspace data
+ KeySearcher can upload status for P2PEditor display

File size: 1.0 KB
Line 
1using System.Threading;
2using System.Windows;
3using System.Windows.Documents;
4using System.Windows.Media;
5
6namespace Cryptool.P2PEditor.GUI
7{
8    class ParticipateAdorner : Adorner
9    {
10        public ParticipateAdorner(UIElement adornedElement) : base(adornedElement)
11        {
12        }
13
14        protected override void OnRender(DrawingContext drawingContext)
15        {
16            var text = new FormattedText("Participating...", Thread.CurrentThread.CurrentUICulture,
17                FlowDirection.LeftToRight, new Typeface("Arial"), 26.0, Brushes.Black);
18            var startPoint = new Point((DesiredSize.Width / 2 - text.Width / 2), (DesiredSize.Height / 2 - text.Height / 2));
19            drawingContext.DrawText(text, startPoint);
20
21            drawingContext.DrawRectangle((Brush)new BrushConverter().ConvertFromString("#64D4D4D4"),
22                                         new Pen(Brushes.Gray, 1), new Rect(new Point(0, 0), DesiredSize));
23            base.OnRender(drawingContext);
24        }
25    }
26}
Note: See TracBrowser for help on using the repository browser.