OUT-386: Add button to reset all own identities sync
authorThomas
Tue, 30 Jul 2019 15:11:56 +0200
branchsync
changeset 2688580069604044
parent 2687 f7f12cd4dd77
child 2689 7cd444e4eaa0
OUT-386: Add button to reset all own identities
Properties/Resources.Designer.cs
Properties/Resources.de.resx
Properties/Resources.es.resx
Properties/Resources.resx
UI/FormControlOptions.xaml
UI/FormControlOptions.xaml.cs
     1.1 --- a/Properties/Resources.Designer.cs	Tue Jul 30 08:18:44 2019 +0200
     1.2 +++ b/Properties/Resources.Designer.cs	Tue Jul 30 15:11:56 2019 +0200
     1.3 @@ -1457,6 +1457,15 @@
     1.4          }
     1.5          
     1.6          /// <summary>
     1.7 +        ///   Looks up a localized string similar to All accounts have been reset..
     1.8 +        /// </summary>
     1.9 +        public static string Notifications_AllOwnKeysReset {
    1.10 +            get {
    1.11 +                return ResourceManager.GetString("Notifications_AllOwnKeysReset", resourceCulture);
    1.12 +            }
    1.13 +        }
    1.14 +        
    1.15 +        /// <summary>
    1.16          ///   Looks up a localized string similar to Device Group has been left.
    1.17          /// </summary>
    1.18          public static string Notifications_DeviceGroupLeftText {
    1.19 @@ -1853,6 +1862,15 @@
    1.20          }
    1.21          
    1.22          /// <summary>
    1.23 +        ///   Looks up a localized string similar to Reset all accounts.
    1.24 +        /// </summary>
    1.25 +        public static string Options_ResetAllOwnKeys {
    1.26 +            get {
    1.27 +                return ResourceManager.GetString("Options_ResetAllOwnKeys", resourceCulture);
    1.28 +            }
    1.29 +        }
    1.30 +        
    1.31 +        /// <summary>
    1.32          ///   Looks up a localized string similar to Reset pEp.pst store.
    1.33          /// </summary>
    1.34          public static string Options_ResetPEPStoreText {
     2.1 --- a/Properties/Resources.de.resx	Tue Jul 30 08:18:44 2019 +0200
     2.2 +++ b/Properties/Resources.de.resx	Tue Jul 30 15:11:56 2019 +0200
     2.3 @@ -852,4 +852,10 @@
     2.4    <data name="Handshake_SelectSyncIdentities" xml:space="preserve">
     2.5      <value>Zu synchronisierende Identitäten</value>
     2.6    </data>
     2.7 +  <data name="Options_ResetAllOwnKeys" xml:space="preserve">
     2.8 +    <value>Alle Konten zurücksetzen</value>
     2.9 +  </data>
    2.10 +  <data name="Notifications_AllOwnKeysReset" xml:space="preserve">
    2.11 +    <value>Alle Konten wurden zurückgesetzt.</value>
    2.12 +  </data>
    2.13  </root>
    2.14 \ No newline at end of file
     3.1 --- a/Properties/Resources.es.resx	Tue Jul 30 08:18:44 2019 +0200
     3.2 +++ b/Properties/Resources.es.resx	Tue Jul 30 15:11:56 2019 +0200
     3.3 @@ -852,4 +852,10 @@
     3.4    <data name="Handshake_SelectSyncIdentities" xml:space="preserve">
     3.5      <value>Identidades a sincronizar</value>
     3.6    </data>
     3.7 +  <data name="Options_ResetAllOwnKeys" xml:space="preserve">
     3.8 +    <value>Restablecer todas las cuentas</value>
     3.9 +  </data>
    3.10 +  <data name="Notifications_AllOwnKeysReset" xml:space="preserve">
    3.11 +    <value>Todas las cuentas han sido restablecidas.</value>
    3.12 +  </data>
    3.13  </root>
    3.14 \ No newline at end of file
     4.1 --- a/Properties/Resources.resx	Tue Jul 30 08:18:44 2019 +0200
     4.2 +++ b/Properties/Resources.resx	Tue Jul 30 15:11:56 2019 +0200
     4.3 @@ -973,4 +973,10 @@
     4.4    <data name="Handshake_SelectSyncIdentities" xml:space="preserve">
     4.5      <value>Select identities to sync</value>
     4.6    </data>
     4.7 +  <data name="Options_ResetAllOwnKeys" xml:space="preserve">
     4.8 +    <value>Reset all accounts</value>
     4.9 +  </data>
    4.10 +  <data name="Notifications_AllOwnKeysReset" xml:space="preserve">
    4.11 +    <value>All accounts have been reset.</value>
    4.12 +  </data>
    4.13  </root>
    4.14 \ No newline at end of file
     5.1 --- a/UI/FormControlOptions.xaml	Tue Jul 30 08:18:44 2019 +0200
     5.2 +++ b/UI/FormControlOptions.xaml	Tue Jul 30 15:11:56 2019 +0200
     5.3 @@ -478,12 +478,19 @@
     5.4                                        Margin="5">
     5.5                              </ComboBox>
     5.6                          </StackPanel>
     5.7 -                        <Button Grid.Row="7"
     5.8 -                                Style="{StaticResource StyleWrongButton}"
     5.9 -                                HorizontalAlignment="Left"
    5.10 -                                Content="{x:Static p:Resources.Options_LeaveDeviceGroupText}"
    5.11 -                                Click="ButtonLeaveDeviceGroup_Click"
    5.12 -                                Visibility="{Binding IsGrouped, Converter={StaticResource BoolToVisibility}}" />
    5.13 +                        <StackPanel Grid.Row="7"
    5.14 +                                    Orientation="Horizontal">
    5.15 +                            <Button Style="{StaticResource StyleWrongButton}"
    5.16 +                                    Margin="0,0,10,0"
    5.17 +                                    HorizontalAlignment="Left"
    5.18 +                                    Content="{x:Static p:Resources.Options_LeaveDeviceGroupText}"
    5.19 +                                    Click="ButtonLeaveDeviceGroup_Click"
    5.20 +                                    Visibility="{Binding IsGrouped, Converter={StaticResource BoolToVisibility}}" />
    5.21 +                            <Button Style="{StaticResource StyleWrongButton}"
    5.22 +                                    HorizontalAlignment="Left"
    5.23 +                                    Content="{x:Static p:Resources.Options_ResetAllOwnKeys}"
    5.24 +                                    Click="ButtonResetAllOwnKeys_Click" />
    5.25 +                        </StackPanel>
    5.26                      </Grid>
    5.27  
    5.28                  </Grid>
     6.1 --- a/UI/FormControlOptions.xaml.cs	Tue Jul 30 08:18:44 2019 +0200
     6.2 +++ b/UI/FormControlOptions.xaml.cs	Tue Jul 30 15:11:56 2019 +0200
     6.3 @@ -273,6 +273,22 @@
     6.4              }
     6.5          }
     6.6  
     6.7 +        /// <summary>
     6.8 +        /// Event handler for when the Reset All Own Keys button is clicked.
     6.9 +        /// </summary>
    6.10 +        private void ButtonResetAllOwnKeys_Click(object sender, RoutedEventArgs e)
    6.11 +        {
    6.12 +            try
    6.13 +            {
    6.14 +                ThisAddIn.PEPEngine.KeyResetAllOwnKeys();
    6.15 +                Notification.Show(Properties.Resources.PrivacyStatus_ResetTrust, Properties.Resources.Notifications_AllOwnKeysReset);
    6.16 +            }
    6.17 +            catch (Exception ex)
    6.18 +            {
    6.19 +                Log.Error("ButtonResetAllOwnKeys_Click: Error resetting all own identities. " + ex.ToString());
    6.20 +            }
    6.21 +        }
    6.22 +
    6.23          /**************************************************************
    6.24           * 
    6.25           * Sub-classes