-<Window x:Class="Pithos.Client.WPF.Preferences.AddAccountView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:cal="http://www.caliburnproject.org"
- xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
- Title="AddAccountView" Height="300" Width="467" xmlns:my="clr-namespace:Microsoft.Windows.Controls.Core.Converters;assembly=WPFToolkit.Extended"
- xmlns:Preferences="clr-namespace:Pithos.Client.WPF.Preferences">
- <Window.Resources>
- <my:InverseBoolConverter x:Key="InverseBool" />
- <BooleanToVisibilityConverter x:Key="BoolToVisible" />
- </Window.Resources>
- <extToolkit:Wizard FinishButtonClosesWindow="True" Name="AccountWizard" PageChanged="AccountWizard_PageChanged" HelpButtonVisibility="Collapsed">
- <extToolkit:WizardPage x:Name="IntroPage"
- Title="Setup your Pithos Account"
- Description="This wizard will walk you through in setting up your Pithos account and retrieving an authentication token."
-
- BackButtonVisibility="Collapsed"
- FinishButtonVisibility="Collapsed">
- <extToolkit:WizardPage.ExteriorPanelBackground>
- <ImageBrush ImageSource="/PithosPlus;component/Images/pithos_logo-icon.ico" Stretch="Uniform" TileMode="None" />
- </extToolkit:WizardPage.ExteriorPanelBackground>
- </extToolkit:WizardPage>
- <extToolkit:WizardPage x:Name="ChooseServer" PageType="Interior"
- Title="Where do you want to connect?"
- Description="You can connect to the production or development server, or enter your own server URL"
- FinishButtonVisibility="Collapsed"
- CanSelectNextPage="{Binding IsValidServer}"
-
- >
- <StackPanel >
- <Label Content="Pithos+ Server" Target="{Binding ElementName=Servers}" />
- <ComboBox x:Name="Servers" IsEditable="True" ItemsSource="{Binding Servers}"
- Text="{Binding CurrentServer,ValidatesOnExceptions=True, Mode=TwoWay}" >
- <Validation.ErrorTemplate>
- <ControlTemplate>
- <StackPanel>
- <AdornedElementPlaceholder />
- <TextBlock Foreground="Red" >Invalid Path</TextBlock>
- </StackPanel>
- </ControlTemplate>
- </Validation.ErrorTemplate>
- </ComboBox>
- </StackPanel>
- </extToolkit:WizardPage>
- <extToolkit:WizardPage x:Name="ChooseMethodPage" PageType="Interior"
- Title="How do you want to add the account?"
- Description="You can add an account either by logging in the Pithos Web Site or by entering your username and password manually"
- FinishButtonVisibility="Collapsed"
- CanSelectNextPage="False"
- >
- <StackPanel >
- <RadioButton x:Name="Automatic" Content="By logging to Pithos" Checked="Automatic_Checked" Margin="5"/>
- <RadioButton x:Name="Manually" Content="Manually" Checked="Manually_Checked" Margin="5"/>
- </StackPanel>
- </extToolkit:WizardPage>
- <extToolkit:WizardPage x:Name="ManualAccountPage" PageType="Interior"
- Title="Add an account manually"
- Description="Please enter the account credentials and press "Validate Credentials""
- NextPage="{Binding ElementName=AccountPathPage}"
- FinishButtonVisibility="Collapsed"
- CanSelectNextPage="{Binding HasValidCredentials,NotifyOnTargetUpdated=True}"
- TargetUpdated="OnTargetUpdated"
-
- >
- <extToolkit:BusyIndicator x:Name="ManualBusyIndicator" IsBusy="{Binding IsWorking,NotifyOnSourceUpdated=true}" DisplayAfter="0" >
- <extToolkit:BusyIndicator.BusyContent>
- <TextBlock x:Name="ManualBusyMessage" Text="{Binding BusyTitle}" HorizontalAlignment="Center" />
- </extToolkit:BusyIndicator.BusyContent>
- <extToolkit:BusyIndicator.Content>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="91*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Label Content="Account" Grid.Column="0" Grid.Row="0" Margin="0,5" HorizontalAlignment="Left"/>
- <TextBox Name="AccountName" Grid.Column="1" Grid.Row="0" Margin="5"/>
- <Label Content="API Key" Grid.Column="0" Grid.Row="1" Margin="0,5" HorizontalAlignment="Left"/>
- <TextBox Name="Token" Grid.Column="1" Grid.Row="1" Margin="5"/>
- <Button x:Name="TestManualAccount" Content="Validate Credentials" IsEnabled="{Binding HasCredentials}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" cal:Message.Attach="TestAccount" Margin="5"/>
- <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding ValidationMessage}" Margin="10" HorizontalAlignment="Center"/>
- </Grid>
- </extToolkit:BusyIndicator.Content>
- </extToolkit:BusyIndicator>
- </extToolkit:WizardPage>
- <extToolkit:WizardPage x:Name="AutoAccountPage" PageType="Interior"
- Title="Add an account automatically"
- Description="By clicking on the button below you will be taken to the Pithos web site where you can login with your username and password."
- FinishButtonVisibility="Collapsed"
- CanSelectNextPage="{Binding HasValidCredentials,NotifyOnTargetUpdated=true}"
- TargetUpdated="OnTargetUpdated"
-
- >
- <extToolkit:BusyIndicator x:Name="AutoBusyIndicator" IsBusy="{Binding IsWorking}" DisplayAfter="0">
- <extToolkit:BusyIndicator.BusyContent>
- <TextBlock TextWrapping="Wrap">
- <TextBlock HorizontalAlignment="Center" Text="{Binding BusyTitle}"/>
- <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding BusyDetail}"/>
- </TextBlock>
- </extToolkit:BusyIndicator.BusyContent>
- <extToolkit:BusyIndicator.Content>
- <StackPanel x:Name="AutoPanel" VerticalAlignment="Center" >
- <Button Margin="5" Name="RetrieveCredentials" Content="Retrieve Credentials" Width="150"/>
- <TextBlock Text="Credentials Retrieved Succesfully" Visibility="{Binding Converter={StaticResource BoolToVisible}, Path=HasCredentials}" Margin="10" HorizontalAlignment="Center"/>
- <Button x:Name="TestAutoAccount" Content="Validate Credentials" IsEnabled="{Binding HasCredentials}" HorizontalAlignment="Center" cal:Message.Attach="TestAccount" Margin="5"/>
-
- <TextBlock x:Name="ValidationMessage" Text="Credentials Validated" Visibility="{Binding Converter={StaticResource BoolToVisible}, Path=HasValidCredentials}" Margin="10" HorizontalAlignment="Center"/>
- </StackPanel>
- </extToolkit:BusyIndicator.Content>
- </extToolkit:BusyIndicator>
- </extToolkit:WizardPage>
- <extToolkit:WizardPage x:Name="AccountPathPage" PageType="Interior"
- Title="Select Account Path"
- Description="Please select the roor path for your account"
- NextPage="{Binding ElementName=LastPage}"
- FinishButtonVisibility="Collapsed"
- CanSelectNextPage="{Binding HasAccountPath}"
- >
- <StackPanel>
- <Label Content="Path:" Target="{Binding ElementName=AccountPath}"/>
- <Grid HorizontalAlignment="Stretch">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <TextBox x:Name="AccountPath" HorizontalAlignment="Stretch" Grid.Column="0" Grid.Row="0">
- <TextBox.Text>
- <Binding Path="AccountPath" Mode="TwoWay">
- <Binding.ValidationRules>
- <Preferences:DirectoryExistsRule/>
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- <Validation.ErrorTemplate>
- <ControlTemplate>
- <StackPanel>
- <AdornedElementPlaceholder />
- <TextBlock Foreground="Red" >Invalid Path</TextBlock>
- </StackPanel>
- </ControlTemplate>
- </Validation.ErrorTemplate>
- </TextBox>
- <Button x:Name="SelectAccount" Content="Select ..." HorizontalAlignment="Right" Grid.Column="1" Grid.Row="0"/>
- <CheckBox x:Name="ShouldCreateOkeanosFolder" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" >
- <CheckBox.Content>
- <TextBlock TextWrapping="Wrap">
- Create an Okeanos folder below the selected folder
- <LineBreak/>
- Clear this setting to use the currently selected folder and synchronize its contents
- </TextBlock>
- </CheckBox.Content>
- </CheckBox>
- </Grid>
- </StackPanel>
- </extToolkit:WizardPage>
- <extToolkit:WizardPage x:Name="LastPage" PageType="Interior"
- Title="Finish"
- Description="Press finish to create the account"
- CanFinish="True"
- >
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock Text="Server:" Grid.Column="0" Grid.Row="0" Margin="5,2"/>
- <TextBlock Text="{Binding CurrentServer}" Grid.Column="1" Grid.Row="0" Margin="5,2"/>
- <TextBlock Text="Account Name:" Grid.Column="0" Grid.Row="1" Margin="5,2"/>
- <TextBlock Text="{Binding AccountName}" Grid.Column="1" Grid.Row="1" Margin="5,2"/>
- <TextBlock Text="Token:" Grid.Column="0" Grid.Row="2" Margin="5,2"/>
- <TextBlock Text="{Binding Token}" Grid.Column="1" Grid.Row="2" Margin="5,2"/>
- <TextBlock Text="Account Path:" Grid.Column="0" Grid.Row="3" Margin="5,2"/>
- <TextBlock Text="{Binding AccountPath}" Grid.Column="1" Grid.Row="3" Margin="5,2"/>
-
- <CheckBox x:Name="IsAccountActive" Content="Start using the account immediatelly" Grid.ColumnSpan="2" Grid.Row="5" Margin="5"/>
- </Grid>
- </extToolkit:WizardPage>
- </extToolkit:Wizard>
-
+<Window x:Class="Pithos.Client.WPF.Preferences.AddAccountView"\r
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
+ xmlns:cal="http://www.caliburnproject.org" \r
+ Title="AddAccountView" Height="300" Width="467" \r
+ xmlns:Preferences="clr-namespace:Pithos.Client.WPF.Preferences"\r
+ xmlns:my="http://schemas.xceed.com/wpf/xaml/toolkit">\r
+ <Window.Resources>\r
+ <my:InverseBoolConverter x:Key="InverseBool" />\r
+ <BooleanToVisibilityConverter x:Key="BoolToVisible" />\r
+ </Window.Resources>\r
+ <my:Wizard FinishButtonClosesWindow="True" Name="AccountWizard" PageChanged="AccountWizard_PageChanged" HelpButtonVisibility="Collapsed">\r
+ <my:WizardPage x:Name="IntroPage" \r
+ Title="Setup your Pithos+ Account"\r
+ Description="This wizard will walk you through the setup of your Pithos+ account." \r
+ \r
+ \r
+ BackButtonVisibility="Collapsed"\r
+ FinishButtonVisibility="Collapsed">\r
+ <my:WizardPage.ExteriorPanelBackground>\r
+ <ImageBrush ImageSource="/PithosPlus;component/Images/pithos_logo-icon.ico" Stretch="Uniform" TileMode="None" />\r
+ </my:WizardPage.ExteriorPanelBackground>\r
+ </my:WizardPage>\r
+ <my:WizardPage x:Name="ChooseServer" PageType="Interior"\r
+ Title="Select your Pithos+ Server"\r
+ Description="Please specify the Pithos+ Server you would like to setup, please note that you can also add a custom server in the field." \r
+ FinishButtonVisibility="Collapsed"\r
+ CanSelectNextPage="{Binding IsValidServer}"\r
+ \r
+ >\r
+ <StackPanel >\r
+ <Label Content="Pithos+ Server" Target="{Binding ElementName=Servers}" />\r
+ <ComboBox x:Name="Servers" IsEditable="True" ItemsSource="{Binding Servers}"\r
+ Text="{Binding CurrentServer,ValidatesOnExceptions=True, Mode=TwoWay}" > \r
+ <Validation.ErrorTemplate>\r
+ <ControlTemplate>\r
+ <StackPanel>\r
+ <AdornedElementPlaceholder />\r
+ <TextBlock Foreground="Red" >Invalid Path</TextBlock>\r
+ </StackPanel>\r
+ </ControlTemplate>\r
+ </Validation.ErrorTemplate>\r
+ </ComboBox> \r
+ </StackPanel>\r
+ </my:WizardPage>\r
+ <my:WizardPage x:Name="ChooseMethodPage" PageType="Interior"\r
+ Title="Pithos+ Account Setup"\r
+ Description="We recomend that you use the Automated process to retrieve your account token, if it fails for any reason you can still use the Manual process"\r
+ FinishButtonVisibility="Collapsed"\r
+ CanSelectNextPage="False"\r
+ >\r
+ <StackPanel >\r
+ <RadioButton x:Name="Automatic" Content="Automated Token Retrieval" Checked="Automatic_Checked" Margin="5"/>\r
+ <RadioButton x:Name="Manually" Content="Manual Token Retrieval" Checked="Manually_Checked" Margin="5"/>\r
+ </StackPanel>\r
+ </my:WizardPage>\r
+ <my:WizardPage x:Name="ManualAccountPage" PageType="Interior"\r
+ Title="Add your account manually"\r
+ Description="Enter the account credentials and press "Validate Credentials""\r
+ NextPage="{Binding ElementName=AccountPathPage}" \r
+ FinishButtonVisibility="Collapsed"\r
+ CanSelectNextPage="{Binding HasValidCredentials,NotifyOnTargetUpdated=True}" \r
+ TargetUpdated="OnTargetUpdated"\r
+ \r
+ >\r
+ <my:BusyIndicator x:Name="ManualBusyIndicator" IsBusy="{Binding IsWorking,NotifyOnSourceUpdated=true}" DisplayAfter="0" >\r
+ <my:BusyIndicator.BusyContent>\r
+ <TextBlock x:Name="ManualBusyMessage" Text="{Binding BusyTitle}" HorizontalAlignment="Center" />\r
+ </my:BusyIndicator.BusyContent>\r
+ <my:BusyIndicator.Content>\r
+ <Grid>\r
+ <Grid.ColumnDefinitions>\r
+ <ColumnDefinition Width="Auto"/>\r
+ <ColumnDefinition Width="91*"/>\r
+ </Grid.ColumnDefinitions>\r
+ <Grid.RowDefinitions>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition />\r
+ </Grid.RowDefinitions>\r
+ <Label Content="User ID" Grid.Column="0" Grid.Row="0" Margin="0,5" HorizontalAlignment="Left"/>\r
+ <TextBox Name="AccountName" Grid.Column="1" Grid.Row="0" Margin="5"/>\r
+ <Label Content="API Key" Grid.Column="0" Grid.Row="1" Margin="0,5" HorizontalAlignment="Left"/>\r
+ <TextBox Name="Token" Grid.Column="1" Grid.Row="1" Margin="5"/>\r
+ <Button x:Name="TestManualAccount" Content="Validate Credentials" IsEnabled="{Binding HasCredentials}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" cal:Message.Attach="TestAccount" Margin="5"/>\r
+ <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding ValidationMessage}" Margin="10" HorizontalAlignment="Center"/>\r
+ </Grid>\r
+ </my:BusyIndicator.Content>\r
+ </my:BusyIndicator>\r
+ </my:WizardPage>\r
+ <my:WizardPage x:Name="AutoAccountPage" PageType="Interior"\r
+ Title="Add your account"\r
+ Description="When you click Retrieve Credentials, I will open a browser with the authentication page of your selected server. The required information will be automatically retrieved after you finish your login." \r
+ FinishButtonVisibility="Collapsed"\r
+ CanSelectNextPage="{Binding HasValidCredentials,NotifyOnTargetUpdated=true}" \r
+ TargetUpdated="OnTargetUpdated"\r
+ \r
+ >\r
+ <my:BusyIndicator x:Name="AutoBusyIndicator" IsBusy="{Binding IsWorking}" DisplayAfter="0">\r
+ <my:BusyIndicator.BusyContent>\r
+ <TextBlock TextWrapping="Wrap">\r
+ <TextBlock HorizontalAlignment="Center" Text="{Binding BusyTitle}"/>\r
+ <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding BusyDetail}"/>\r
+ </TextBlock> \r
+ </my:BusyIndicator.BusyContent>\r
+ <my:BusyIndicator.Content>\r
+ <StackPanel x:Name="AutoPanel" VerticalAlignment="Center" >\r
+ <Button Margin="5" Name="RetrieveCredentials" Content="Retrieve Credentials" Width="150"/>\r
+ <TextBlock Text="Credentials Retrieved Succesfully" Visibility="{Binding Converter={StaticResource BoolToVisible}, Path=HasCredentials}" Margin="10" HorizontalAlignment="Center"/>\r
+ <Button x:Name="TestAutoAccount" Content="Validate Credentials" IsEnabled="{Binding HasCredentials}" HorizontalAlignment="Center" cal:Message.Attach="TestAccount" Margin="5"/>\r
+ \r
+ <TextBlock x:Name="ValidationMessage" Text="Credentials Validated" Visibility="{Binding Converter={StaticResource BoolToVisible}, Path=HasValidCredentials}" Margin="10" HorizontalAlignment="Center"/>\r
+ </StackPanel>\r
+ </my:BusyIndicator.Content>\r
+ </my:BusyIndicator>\r
+ </my:WizardPage>\r
+ <my:WizardPage x:Name="AccountPathPage" PageType="Interior"\r
+ Title="Select your local container"\r
+ Description="Select the local folder that you will use for your local container."\r
+ NextPage="{Binding ElementName=LastPage}"\r
+ FinishButtonVisibility="Collapsed"\r
+ CanSelectNextPage="{Binding HasAccountPath}"\r
+ >\r
+ <StackPanel>\r
+ <Label Content="Path:" Target="{Binding ElementName=AccountPath}"/>\r
+ <Grid HorizontalAlignment="Stretch">\r
+ <Grid.RowDefinitions>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition/>\r
+ </Grid.RowDefinitions>\r
+ <Grid.ColumnDefinitions>\r
+ <ColumnDefinition />\r
+ <ColumnDefinition Width="Auto" />\r
+ </Grid.ColumnDefinitions>\r
+ <TextBox x:Name="AccountPath" HorizontalAlignment="Stretch" Grid.Column="0" Grid.Row="0">\r
+ <TextBox.Text>\r
+ <Binding Path="AccountPath" Mode="TwoWay">\r
+ <Binding.ValidationRules>\r
+ <Preferences:DirectoryExistsRule/>\r
+ </Binding.ValidationRules>\r
+ </Binding>\r
+ </TextBox.Text>\r
+ <Validation.ErrorTemplate>\r
+ <ControlTemplate>\r
+ <StackPanel> \r
+ <AdornedElementPlaceholder />\r
+ <TextBlock Foreground="Red" >Invalid Path</TextBlock>\r
+ </StackPanel>\r
+ </ControlTemplate>\r
+ </Validation.ErrorTemplate>\r
+ </TextBox>\r
+ <Button x:Name="SelectAccount" Content="Select ..." HorizontalAlignment="Right" Grid.Column="1" Grid.Row="0"/>\r
+ <CheckBox x:Name="ShouldCreateOkeanosFolder" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" >\r
+ <CheckBox.Content>\r
+ <TextBlock TextWrapping="Wrap">\r
+ Create the Okeanos container(folder) below the selected folder\r
+ </TextBlock>\r
+ </CheckBox.Content>\r
+ </CheckBox>\r
+ </Grid>\r
+ </StackPanel>\r
+ </my:WizardPage>\r
+ <my:WizardPage x:Name="LastPage" PageType="Interior"\r
+ Title="Thank You!"\r
+ Description="The moment you press finish I will create everything you need to start using the Pithos+ client."\r
+ CanFinish="True"\r
+ >\r
+ <Grid>\r
+ <Grid.RowDefinitions>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition Height="Auto"/>\r
+ <RowDefinition />\r
+ </Grid.RowDefinitions>\r
+ <Grid.ColumnDefinitions>\r
+ <ColumnDefinition Width="Auto"/>\r
+ <ColumnDefinition />\r
+ </Grid.ColumnDefinitions>\r
+ <TextBlock Text="Server:" Grid.Column="0" Grid.Row="0" Margin="5,2"/>\r
+ <TextBlock Text="{Binding CurrentServer}" Grid.Column="1" Grid.Row="0" Margin="5,2"/>\r
+ <TextBlock Text="Account Name:" Grid.Column="0" Grid.Row="1" Margin="5,2"/>\r
+ <TextBlock Text="{Binding AccountName}" Grid.Column="1" Grid.Row="1" Margin="5,2"/>\r
+ <TextBlock Text="Token:" Grid.Column="0" Grid.Row="2" Margin="5,2"/>\r
+ <TextBlock Text="{Binding Token}" Grid.Column="1" Grid.Row="2" Margin="5,2"/>\r
+ <TextBlock Text="Account Path:" Grid.Column="0" Grid.Row="3" Margin="5,2"/>\r
+ <TextBlock Text="{Binding AccountPath}" Grid.Column="1" Grid.Row="3" Margin="5,2"/>\r
+\r
+ <CheckBox x:Name="IsAccountActive" Content="Start using the account immediatelly" Grid.ColumnSpan="2" Grid.Row="5" Margin="5"/>\r
+ </Grid>\r
+ </my:WizardPage>\r
+ </my:Wizard>\r
+ \r
</Window>
\ No newline at end of file