source: trunk/CrypPlugins/QuadraticSieve/QuadraticSievePresentation.xaml.cs @ 1677

Last change on this file since 1677 was 1677, checked in by Sven Rech, 12 years ago

small quadratic sieve layout fix

File size: 1.9 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows;
6using System.Windows.Controls;
7using System.Windows.Data;
8using System.Windows.Documents;
9using System.Windows.Input;
10using System.Windows.Media;
11using System.Windows.Media.Imaging;
12using System.Windows.Navigation;
13using System.Windows.Shapes;
14
15namespace Cryptool.Plugins.QuadraticSieve
16{
17    /// <summary>
18    /// Interaction logic for QuadraticSievePresentation.xaml
19    /// </summary>
20    public partial class QuadraticSievePresentation : UserControl
21    {
22        private ProgressYields progressYields = new ProgressYields();
23        public ProgressYields ProgressYields
24        {
25            get { return progressYields; }
26        }
27
28        public QuadraticSievePresentation()
29        {
30            InitializeComponent();           
31            SizeChanged += sizeChanged;
32
33            ScrollViewer sviewer = new ScrollViewer();
34            sviewer.CanContentScroll = true;
35            sviewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
36            sviewer.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
37            sviewer.Content = progressYields;
38            Grid grid = ((Grid)peer2peer.Content);
39            Grid.SetRow(sviewer, 0);
40            grid.Children.Add(sviewer);
41            sviewer.MinHeight = 100;
42            sviewer.MaxHeight = 100;
43            progressYields.MaxWidth = factorList.Width - 10;
44        }
45
46        public void sizeChanged(Object sender, EventArgs eventArgs)
47        {
48            this.Grid.RenderTransform = new ScaleTransform( this.ActualWidth / this.Grid.ActualWidth,
49                                                       this.ActualHeight / this.Grid.ActualHeight);
50        }
51
52        public void Redraw()
53        {
54            //TODO: Redraw here
55        }
56    }
57}
Note: See TracBrowser for help on using the repository browser.