Changeset 2347


Ignore:
Timestamp:
Jan 14, 2011, 11:14:47 PM (10 years ago)
Author:
kopal
Message:
  • p2p editor now animates the world during connecting
  • user now gets an extra view if the certificate request succeeded
  • some smaller design changes
Location:
trunk
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypP2P/P2PSettings.Designer.cs

    r2273 r2347  
    2626        [global::System.Configuration.UserScopedSettingAttribute()]
    2727        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    28         [global::System.Configuration.DefaultSettingValueAttribute("CrypTool2")]
     28        [global::System.Configuration.DefaultSettingValueAttribute("")]
    2929        public string PeerName {
    3030            get {
     
    161161        [global::System.Configuration.UserScopedSettingAttribute()]
    162162        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    163         [global::System.Configuration.DefaultSettingValueAttribute("Chord")]
     163        [global::System.Configuration.DefaultSettingValueAttribute("WebDHT")]
    164164        public global::Cryptool.Plugins.PeerToPeer.Internal.P2PArchitecture Architecture {
    165165            get {
  • trunk/CrypPlugins/P2PEditor/GUI/Controls/ConnectView.xaml

    r2344 r2347  
    22        <GUI:P2PUserControl.Resources>
    33                <Converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
    4         </GUI:P2PUserControl.Resources>
     4        <Storyboard x:Key="AnimateBigWorldIcon">
     5            <DoubleAnimation Storyboard.TargetName="WorldIconImageRotate" Storyboard.TargetProperty="Angle" By="360" Duration="00:00:10" BeginTime="00:00:00" RepeatBehavior="Forever"/>
     6        </Storyboard>
     7    </GUI:P2PUserControl.Resources>
    58        <Grid>
    6         <ScrollViewer>
     9        <ScrollViewer VerticalScrollBarVisibility="Auto">
    710                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="80,55,80,53">
    8                 <Label FontSize="20" HorizontalContentAlignment="Center">Network</Label>
    9                 <Image Source="..\..\images\connected.png" Width="200" />
     11                <Label FontSize="20" HorizontalContentAlignment="Center">CrypTool 2.0</Label>
     12                <Label FontSize="13" HorizontalContentAlignment="Center">Distributed Computing Platform</Label>               
     13                <Image Width="200" Name="WorldIcon" Source="..\..\images\disconnected.png" RenderTransformOrigin="0.5,0.5">
     14                    <Image.RenderTransform>
     15                        <RotateTransform x:Name="WorldIconImageRotate"/>
     16                    </Image.RenderTransform>
     17                </Image>
    1018                <Label>Username:</Label>
    1119                <TextBox Name="Username" TextChanged="Username_TextChanged"/>
     
    1624                <Label/>
    1725                <Button Name="ConnectButton" Content="Connect" Height="38" FontFamily="Consolas" FontSize="20" Click="ConnectButtonClick" IsEnabled="{Binding IsP2PConnecting, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Converter={StaticResource InverseBooleanConverter}}" />
    18                 <Button Name="GetACertificateButton" Content="Get a new certificate now!" FontFamily="Consolas" FontSize="12" Height="20" Margin="0,10,0,0" Click="GetACertificateButton_Click" IsEnabled="{Binding IsP2PConnecting, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Converter={StaticResource InverseBooleanConverter}}"/>
     26                <Button Name="GetACertificateButton" Content="Create a new account!" FontFamily="Consolas" FontSize="12" Height="20" Margin="0,10,0,0" Click="GetACertificateButton_Click" IsEnabled="{Binding IsP2PConnecting, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Converter={StaticResource InverseBooleanConverter}}"/>
     27                <Button Name="ForgotPassword" Content="Forgot password" FontFamily="Consolas" FontSize="12" Height="20" Margin="0,10,0,0" IsEnabled="False"/>
    1928            </StackPanel>
    2029        </ScrollViewer>
  • trunk/CrypPlugins/P2PEditor/GUI/Controls/ConnectView.xaml.cs

    r2344 r2347  
    22using System.Windows;
    33using Cryptool.P2P;
     4using System.Windows.Media.Animation;
     5using System.Windows.Threading;
     6using System.Threading;
    47
    58namespace Cryptool.P2PEditor.GUI.Controls
     
    3134
    3235            ((P2PEditorPresentation) P2PEditor.Presentation).UpdateConnectionState();
     36           
     37            Storyboard storyboard = (Storyboard)FindResource("AnimateBigWorldIcon");               
     38            storyboard.Begin();               
     39
    3340        }
    3441
     
    6269            this.Username.Text = ((P2PEditorSettings)((P2PEditor)GetValue(P2PEditorProperty)).Settings).PeerName;
    6370            this.Worldname.Text = ((P2PEditorSettings)((P2PEditor)GetValue(P2PEditorProperty)).Settings).WorldName;
    64             this.Password.Password = ((P2PEditorSettings)((P2PEditor)GetValue(P2PEditorProperty)).Settings).Password;       
     71            this.Password.Password = ((P2PEditorSettings)((P2PEditor)GetValue(P2PEditorProperty)).Settings).Password;
     72           
     73            Storyboard storyboard = (Storyboard)FindResource("AnimateBigWorldIcon");
     74            if (IsP2PConnecting)
     75            {
     76                storyboard.Begin();
     77            }
     78            else
     79            {
     80                storyboard.Stop();
     81            }
    6582        }
    6683    }
  • trunk/CrypPlugins/P2PEditor/GUI/Controls/GetNewCertificateView.xaml

    r2344 r2347  
    44             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    55             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:GUI="clr-namespace:Cryptool.P2PEditor.GUI" mc:Ignorable="d"
    6              d:DesignHeight="280" d:DesignWidth="620">
    7     <ScrollViewer>
    8         <Grid Height="280" Width="580">
     6             d:DesignHeight="280" d:DesignWidth="680">
     7    <Grid>
     8    <ScrollViewer Name="RequestPage" VerticalScrollBarVisibility="Auto">
     9        <Grid Height="280" Width="670">
    910            <Grid.ColumnDefinitions>
    1011                <ColumnDefinition Width="75" />
     
    2021            </Grid.RowDefinitions>
    2122
    22             <Label Content="_CrypTool 2.0 - Paporator - Certificate Generation"  Grid.ColumnSpan="2" Margin="0,0,0,56" FontSize="15" FontWeight="Bold" HorizontalAlignment="Center" />
     23            <Label Content="Account Creation"  Grid.ColumnSpan="2" Margin="0,0,0,56" FontSize="15" FontWeight="Bold" HorizontalAlignment="Center" />
    2324            <TextBlock Grid.ColumnSpan="2" Margin="5,32,0,0" FlowDirection="LeftToRight" HorizontalAlignment="Center">
    24             Please enter the data below to request your own personal Peers@Play Certificate (needed for
     25            Please enter the data below to request your own personal account (needed for participating in distributed
    2526            <LineBreak/>
    26             participating in our Peer2Peer network). CrypTool 2.0 will connect to our certificate server and request
     27            computing - like distributed key searching). CrypTool 2.0 will connect to our server and request
    2728            <LineBreak/>
    28             your certificate. This certificate will be stored into your Application Data folder of Windows.
     29            your account data. This data will be stored into your application data folder of windows.
    2930            </TextBlock>
    3031            <Label Content="_Username:" Target="{Binding ElementName=UsernameField}" Grid.Row="1" Grid.Column="0" />
     
    3940            <Button Name="RequestButton" Content="_Request" HorizontalAlignment="Right" Width="80" Grid.Row="5" Grid.Column="1" Height="24" Click="Request_Click" Margin="0,19,114,35" />
    4041            <Button Name="BackButton" Content="_Back" Height="24" HorizontalAlignment="Right" Margin="0,19,18,35" Width="80" Grid.Row="5" Grid.Column="1" Click="BackButton_Click" />
    41             <Label Name="RequestLabel" Content="Requesting certificate..." Visibility="Hidden" Target="{Binding ElementName=ConfirmField}" Grid.Row="5" Margin="0,19,275,27" HorizontalAlignment="Right" Width="151" Grid.Column="1" FontWeight="Bold" />
     42            <Label Name="RequestLabel" Content="Requesting certificate..." Visibility="Hidden" Target="{Binding ElementName=ConfirmField}" Grid.Row="5" Margin="0,19,325,27" HorizontalAlignment="Right" Width="151" Grid.Column="1" FontWeight="Bold" />
    4243            <Image Name="WorldIcon" Source="..\..\images\connected.png" Grid.Column="1" Margin="200,0,194,0" Grid.Row="5" RenderTransformOrigin="0.5,0.5">
    4344                <Image.RenderTransform>
     
    4748        </Grid>
    4849    </ScrollViewer>
     50    <ScrollViewer Name="OKPage" VerticalScrollBarVisibility="Auto" Visibility="Hidden">
     51    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="80,55,80,53">
     52        <Label FontSize="16" HorizontalContentAlignment="Center">Account succesfully created</Label>
     53        <Image Name="Account" Source="..\..\images\account.png"  Margin="5,5,5,5" Width="48" />
     54        <TextBlock Grid.ColumnSpan="2" Margin="15,15,15,15" FlowDirection="LeftToRight" HorizontalAlignment="Center">
     55        Your new account was created successfully and can now be used.
     56        <LineBreak/>
     57        Press the OK button to proceed to the login.
     58        </TextBlock>
     59        <Button Name="OKButton" Content="_OK" Height="24" Width="50" Click="OKButton_Click" />
     60    </StackPanel>
     61    </ScrollViewer>
     62    </Grid>
    4963    <GUI:P2PUserControl.Resources>
    5064        <Storyboard x:Key="AnimateWorldIcon">
  • trunk/CrypPlugins/P2PEditor/GUI/Controls/GetNewCertificateView.xaml.cs

    r2344 r2347  
    172172            {
    173173                args.Certificate.SaveCrtToAppData();
    174                 args.Certificate.SavePkcs12ToAppData(args.Certificate.Password);
    175                 System.Windows.MessageBox.Show("Certificate received and stored.", "Certificate received and stored");
     174                args.Certificate.SavePkcs12ToAppData(args.Certificate.Password);               
    176175                this.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    177                 {
     176                {                   
    178177                    ((P2PEditorPresentation)((P2PEditor)GetValue(P2PEditorProperty)).Presentation).Connect.Username.Text = this.UsernameField.Text;
    179178                    ((P2PEditorPresentation)((P2PEditor)GetValue(P2PEditorProperty)).Presentation).Connect.Worldname.Text = "CrypTool2";
     
    182181                    this.EmailField.Text = "";
    183182                    this.PasswordField.Password = "";
    184                     this.ConfirmField.Password = "";                   
    185                     this.P2PEditorPresentation.ShowConnectView();
     183                    this.ConfirmField.Password = "";
     184                    this.RequestPage.Visibility = System.Windows.Visibility.Hidden;
     185                    this.OKPage.Visibility = System.Windows.Visibility.Visible;
    186186                }, null);               
    187187            }
     
    234234            this.P2PEditorPresentation.ShowConnectView();
    235235        }
     236
     237        private void OKButton_Click(object sender, RoutedEventArgs e)
     238        {
     239            this.RequestPage.Visibility = Visibility.Visible;
     240            this.OKPage.Visibility = Visibility.Hidden;
     241            this.P2PEditorPresentation.ShowConnectView();
     242        }
    236243    }
    237244}
  • trunk/CrypPlugins/P2PEditor/GUI/P2PEditorPresentation.xaml.cs

    r2344 r2347  
    2222using Cryptool.P2P.Internal;
    2323using Cryptool.P2PEditor.Distributed;
     24using System.Threading;
     25using System.Windows.Media.Animation;
    2426
    2527namespace Cryptool.P2PEditor.GUI
     
    154156
    155157        internal void ShowHelp()
    156         {
    157             hideAllViews();
     158        {         
    158159            //to be implemented
    159160        }
  • trunk/CrypPlugins/P2PEditor/P2PEditor.cs

    r2344 r2347  
    6565            if (!P2PManager.IsConnected)
    6666            {
    67                 GuiLogMessage("Cannot display new job form, no connection to p2p network.", NotificationLevel.Warning);
     67                //GuiLogMessage("Cannot display new job form, no connection to p2p network.", NotificationLevel.Warning);
    6868                return;
    6969            }
  • trunk/CrypPlugins/P2PEditor/P2PEditor.csproj

    r2344 r2347  
    170170    <Resource Include="images\disconnected.png" />
    171171  </ItemGroup>
     172  <ItemGroup>
     173    <Resource Include="images\account.png" />
     174  </ItemGroup>
    172175  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    173176  <PropertyGroup>
Note: See TracChangeset for help on using the changeset viewer.