Changeset 902


Ignore:
Timestamp:
Nov 25, 2009, 10:02:53 PM (12 years ago)
Author:
kopal
Message:
  • Quadratic Sieve and KeySearcher both have now a better scalable QuickWatch
  • because of QuickWatch adapted samples for KeySearcher
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/KeySearcherQuickWatchPresentation.xaml

    r785 r902  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     MinHeight="180" MinWidth="250" Width="AUTO" Height="AUTO">
    5     <Grid Background="White" Height="AUTO" Width="AUTO">
     4    HorizontalAlignment="Stretch"
     5    VerticalAlignment="Stretch"
     6    Background="White">
     7    <Canvas Name="Canvas">
     8    <Grid Background="White" Width="300" Name="Grid">
    69        <Grid.RowDefinitions>
    7             <RowDefinition Height="20pt"/>
    8             <RowDefinition Height="20pt"/>
    9             <RowDefinition Height="20pt"/>
    10             <RowDefinition Height="20pt"/>
    11             <RowDefinition Height="*"/>
     10            <RowDefinition/>
     11            <RowDefinition/>
     12            <RowDefinition/>
     13            <RowDefinition Height="80pt"/>           
    1214        </Grid.RowDefinitions>
    1315        <Grid.ColumnDefinitions>
     
    1618        </Grid.ColumnDefinitions>
    1719
    18         <Label Grid.Row="0" Grid.Column="0" FontSize="10" Background="White" VerticalAlignment="Top" Height="28" Width="AUTO">Probable time left :</Label>
    19         <Label Grid.Row="0" Grid.Column="1" FontSize="10" Background="White" VerticalAlignment="Top" Height="28" Width="AUTO">Estimated end time :</Label>
     20        <Label Grid.Row="0" Grid.Column="0" FontSize="12" Background="White" VerticalAlignment="Top" Height="28" Width="AUTO">Probable time left :</Label>
     21        <Label Grid.Row="0" Grid.Column="1" FontSize="12" Background="White" VerticalAlignment="Top" Height="28" Width="AUTO">Estimated end time :</Label>
    2022
    2123        <TextBox Name="timeLeft" Grid.Row="1" Grid.Column="0"
    22                  TextAlignment="Center" IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top" Height="28"/>
     24                 TextAlignment="Center" IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top" Height="28" FontSize="10" BorderThickness="1" />
    2325        <TextBox Name="endTime" Grid.Row="1" Grid.Column="1"
    24                  TextAlignment="Center" IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top" Height="28"/>
     26                 TextAlignment="Center" IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top" Height="28" FontSize="10" BorderThickness="1" />
    2527
    26         <Label Grid.Row="2" Grid.Column="0" FontSize="10" Grid.ColumnSpan="1" Background="White" Width="AUTO">Keys per second :</Label>
     28        <Label Grid.Row="2" Grid.Column="0" FontSize="12" Grid.ColumnSpan="1" Background="White" Width="AUTO">Keys per second :</Label>
    2729
    2830        <TextBox x:Name="keysPerSecond" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2"
    29                  TextAlignment="Left"  IsReadOnly="True" TextWrapping="WrapWithOverflow"/>
    30         <!--
    31         <ScrollViewer Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="4">-->
    32             <ListBox Name="listbox" Grid.ColumnSpan="2" Grid.Row="4" />
    33         <!--</ScrollViewer>-->
    34     </Grid>
     31                 TextAlignment="Left"  IsReadOnly="True" TextWrapping="WrapWithOverflow" FontSize="10" BorderThickness="1" HorizontalContentAlignment="Center" />
     32        <ListBox Name="listbox" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" FontSize="10" />
     33    </Grid>       
     34    </Canvas>
    3535</UserControl>
  • trunk/CrypPlugins/KeySearcher/KeySearcherQuickWatchPresentation.xaml.cs

    r785 r902  
    2323        public KeySearcherQuickWatchPresentation()
    2424        {
    25             InitializeComponent();
     25            InitializeComponent();
     26            SizeChanged += sizeChanged;
     27        }
     28
     29        public void sizeChanged(Object sender, EventArgs eventArgs)
     30        {
     31            this.Grid.RenderTransform = new ScaleTransform(this.ActualWidth / this.Grid.ActualWidth,
     32                                                       this.ActualHeight / this.Grid.ActualHeight);
    2633        }
    2734    }
  • trunk/CrypPlugins/QuadraticSieve/QuadraticSievePresentation.xaml

    r732 r902  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     HorizontalAlignment="Center"
    5     Height="Auto"
    6     Width="Auto"
    7     MinWidth="300"
    8     MinHeight="75">
    9     <Grid Background="White">
     4    HorizontalAlignment="Stretch"
     5    VerticalAlignment="Stretch"
     6    Background="White"
     7    Name="Presentation">
     8    <Canvas Name="Canvas">
     9    <Grid Name="Grid" Width="250" Height="100">
    1010        <Grid.RowDefinitions>
    1111            <RowDefinition Height="*"/>
     
    1515        </Grid.RowDefinitions>
    1616        <Grid.ColumnDefinitions>
    17             <ColumnDefinition/>
    18             <ColumnDefinition/>
     17            <ColumnDefinition Width="*" />
     18            <ColumnDefinition Width="*" />
    1919        </Grid.ColumnDefinitions>
    2020       
    21         <Label Grid.Row="0" Grid.Column="0" FontSize="10" Background="White">Probable time left :</Label>
    22         <Label Grid.Row="0" Grid.Column="1" FontSize="10" Background="White">Estimated end time :</Label>
     21        <Label FontSize="12" Name="Label1">Probable time left :</Label>
     22        <Label Grid.Column="1" FontSize="12" Name="Label2">Estimated end time :</Label>
    2323       
    24         <TextBox Name="timeLeft" Grid.Row="1" Grid.Column="0"
    25                  TextAlignment="Center" IsReadOnly="True" TextWrapping="WrapWithOverflow"/>
    26         <TextBox Name="endTime" Grid.Row="1" Grid.Column="1"
    27                  TextAlignment="Center" IsReadOnly="True" TextWrapping="WrapWithOverflow"/>
    28         <Label Grid.Row="2" Grid.Column="0" FontSize="10" Grid.ColumnSpan="2" Background="White">logging :</Label>
     24        <TextBox Name="timeLeft" Grid.Row="1" TextAlignment="Center" IsReadOnly="True" TextWrapping="WrapWithOverflow"/>
     25        <TextBox Name="endTime" Grid.Row="1" Grid.Column="1" TextAlignment="Center" IsReadOnly="True" TextWrapping="WrapWithOverflow"/>
     26        <Label Grid.Row="2" FontSize="12" Grid.ColumnSpan="2" Name="Label3">console:</Label>
    2927       
    30         <TextBox Name="logging" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
    31                  TextAlignment="Left"  IsReadOnly="True" TextWrapping="WrapWithOverflow"/>
     28        <TextBox Name="logging" Grid.Row="3" Grid.ColumnSpan="2" TextAlignment="Left" IsReadOnly="True" TextWrapping="WrapWithOverflow"/>
    3229    </Grid>
    33    
     30    </Canvas>
    3431</UserControl>
  • trunk/CrypPlugins/QuadraticSieve/QuadraticSievePresentation.xaml.cs

    r675 r902  
    1515namespace QuadraticSieve
    1616{
     17
     18
    1719    /// <summary>
    1820    /// Interaction logic for QuadraticSievePresentation.xaml
     
    2022    public partial class QuadraticSievePresentation : UserControl
    2123    {
     24
    2225        public QuadraticSievePresentation()
    2326        {
    24             InitializeComponent();
    25             this.Width = Double.NaN;
    26             this.Height = Double.NaN;
     27            InitializeComponent();           
     28            SizeChanged += sizeChanged;
     29        }
     30
     31        public void sizeChanged(Object sender, EventArgs eventArgs)
     32        {
     33            this.Grid.RenderTransform = new ScaleTransform( this.ActualWidth / this.Grid.ActualWidth,
     34                                                       this.ActualHeight / this.Grid.ActualHeight);                       
    2735        }
    2836    }
Note: See TracChangeset for help on using the changeset viewer.