Merge with default OUT-78-encrypt-self
authorMarkus Schaber <markus@pep-security.net>
Tue, 30 May 2017 21:14:43 +0200
branchOUT-78-encrypt-self
changeset 168248782d780186
parent 1668 5fb1ae62e0b4
parent 1681 fad792269b0a
Merge with default
CryptableMailItem.cs
MsgProcessor.cs
PEPMessage.cs
ThisAddIn.cs
     1.1 --- a/AdapterCallbacks.cs	Sun May 07 13:50:00 2017 +0200
     1.2 +++ b/AdapterCallbacks.cs	Tue May 30 21:14:43 2017 +0200
     1.3 @@ -18,7 +18,7 @@
     1.4      /// </remarks>
     1.5      internal class AdapterCallbacks : StandardOleMarshalObject, IpEpEngineCallbacks2
     1.6      {
     1.7 -        private static  FormHandshake        handshakeDialog         = null;
     1.8 +        private static  HandshakeDialog      handshakeDialog         = null;
     1.9          private static  Timer                timer                   = null;
    1.10          private const   int                  FAST_POLLING_INTERVAL   = 1000;    // 1 second in ms
    1.11          private const   int                  MAX_POLLING_COUNT       = 600;     // 600 times each second => max. 10 minutes
    1.12 @@ -34,13 +34,11 @@
    1.13                                                     ref pEpIdentity partner,
    1.14                                                     SyncHandshakeSignal signal)
    1.15          {
    1.16 -            DialogResult dialogResult = DialogResult.Cancel;
    1.17 +            bool? dialogResult = null;
    1.18              SyncHandshakeResult handshakeResult = SyncHandshakeResult.SyncHandshakeCancel;
    1.19 -            FormControlHandshake.State state;
    1.20 +            HandshakeDialog.HandshakeMode mode;
    1.21              PEPIdentity ownIdentity;
    1.22              PEPIdentity partnerIdentity;
    1.23 -            pEpIdentity[] ownIdentities;
    1.24 -            PEPSettings.PEPAccountSettings acctSettings;
    1.25  
    1.26              Log.Verbose("NotifyHandshake: Started with signal " + signal.ToString());
    1.27  
    1.28 @@ -61,8 +59,7 @@
    1.29  
    1.30                  // We set the result in case of an reentrant call, so the
    1.31                  // "parent" also gets the information.
    1.32 -                handshakeDialog.DialogResult = DialogResult.Cancel;
    1.33 -                handshakeDialog.Dispose();
    1.34 +                handshakeDialog.DialogResult = null;
    1.35                  handshakeDialog = null;
    1.36              }
    1.37  
    1.38 @@ -96,26 +93,14 @@
    1.39                          }
    1.40                          catch { }
    1.41  
    1.42 -                        // Create settings
    1.43 -                        state = new FormControlHandshake.State(ownIdentity,
    1.44 -                                                               partnerIdentity,
    1.45 -                                                               Globals.ThisAddIn.Settings.TrustwordsCulture);
    1.46 -                        
    1.47                          // Specify handshake type
    1.48                          if (signal == SyncHandshakeSignal.SyncNotifyInitMoveOurDevice)
    1.49                          {
    1.50 -                            state.Mode = FormControlHandshake.State.HandshakeMode.SyncTypeB;
    1.51 +                            mode = HandshakeDialog.HandshakeMode.SyncTypeB;
    1.52                          }
    1.53                          else
    1.54                          {
    1.55 -                            state.Mode = FormControlHandshake.State.HandshakeMode.SyncTypeA;
    1.56 -                        }
    1.57 -
    1.58 -                        // Add own identities list to include in sync (this must be from the engine)
    1.59 -                        ownIdentities = ThisAddIn.PEPEngine.OwnIdentitiesRetrieve();
    1.60 -                        foreach (pEpIdentity ident in ownIdentities)
    1.61 -                        {
    1.62 -                            state.SyncList.Add(new PEPIdentity(ident));
    1.63 +                            mode = HandshakeDialog.HandshakeMode.SyncTypeA;
    1.64                          }
    1.65  
    1.66                          // Show handshake dialog
    1.67 @@ -129,71 +114,28 @@
    1.68                              {
    1.69                                  throw;
    1.70                              }
    1.71 -                            handshakeDialog.Dispose();
    1.72                          }
    1.73  
    1.74 -                        handshakeDialog = new FormHandshake();
    1.75 -                        handshakeDialog.StartPosition = FormStartPosition.CenterParent;
    1.76 -                        handshakeDialog.DisplayState = state;
    1.77 +                        handshakeDialog = new HandshakeDialog(ownIdentity,
    1.78 +                                                              partnerIdentity,
    1.79 +                                                              mode);
    1.80                          dialogResult = handshakeDialog.ShowDialog();
    1.81 -                        handshakeDialog?.Dispose(); // Dialog may have been set to null in a nested call
    1.82                          handshakeDialog = null;
    1.83  
    1.84                          // Send result back to the engine
    1.85                          switch (dialogResult)
    1.86                          {
    1.87 -                            case DialogResult.Yes:
    1.88 +                            case true:
    1.89                                  {
    1.90 -                                    /* Save the own identities sync list back to the engine.
    1.91 -                                     * This must be done separately using the original engine list in case the engine has more
    1.92 -                                     * own identities than accounts still in Outlook.
    1.93 -                                     */
    1.94 -                                    foreach (PEPIdentity ident in state.SyncList)
    1.95 -                                    {
    1.96 -                                        foreach (pEpIdentity ident2 in ownIdentities)
    1.97 -                                        {
    1.98 -                                            pEpIdentity ownIdent = ident2;
    1.99 -
   1.100 -                                            if (ident.EqualsByAddress(ownIdent.Address))
   1.101 -                                            {
   1.102 -                                                // Sync the engine's own identity flags
   1.103 -                                                if (ownIdent.GetIsSyncEnabled() != ident.IsSyncEnabled)
   1.104 -                                                {
   1.105 -                                                    if (ident.IsSyncEnabled)
   1.106 -                                                    {
   1.107 -                                                        ThisAddIn.PEPEngine.UnsetIdentityFlags(ref ownIdent, pEpIdentityFlags.pEpIdfNotForSync);
   1.108 -                                                    }
   1.109 -                                                    else
   1.110 -                                                    {
   1.111 -                                                        ThisAddIn.PEPEngine.SetIdentityFlags(ref ownIdent, pEpIdentityFlags.pEpIdfNotForSync);
   1.112 -                                                    }
   1.113 -                                                }
   1.114 -
   1.115 -                                                break;
   1.116 -                                            }
   1.117 -                                        }
   1.118 -                                    }
   1.119 -
   1.120 -                                    // Save the own identites back to settings
   1.121 -                                    foreach (PEPIdentity ident in state.SyncList)
   1.122 -                                    {
   1.123 -                                        acctSettings = Globals.ThisAddIn.Settings.GetAccountSettings(ident.Address);
   1.124 -
   1.125 -                                        if (acctSettings != null)
   1.126 -                                        {
   1.127 -                                            acctSettings.IsSyncEnabled = ident.IsSyncEnabled;
   1.128 -                                        }
   1.129 -                                    }
   1.130 -
   1.131                                      handshakeResult = SyncHandshakeResult.SyncHandshakeAccepted;
   1.132                                      break;
   1.133                                  }
   1.134 -                            case DialogResult.No:
   1.135 +                            case false:
   1.136                                  {
   1.137                                      handshakeResult = SyncHandshakeResult.SyncHandshakeRejected;
   1.138                                      break;
   1.139                                  }
   1.140 -                            case DialogResult.Cancel:
   1.141 +                            case null:
   1.142                              default: // this should never happen if we cover all enums
   1.143                                  {
   1.144                                      handshakeResult = SyncHandshakeResult.SyncHandshakeCancel;
     2.1 --- a/CryptableMailItem.cs	Sun May 07 13:50:00 2017 +0200
     2.2 +++ b/CryptableMailItem.cs	Tue May 30 21:14:43 2017 +0200
     2.3 @@ -2,7 +2,6 @@
     2.4  using System;
     2.5  using System.Collections.Generic;
     2.6  using System.ComponentModel;
     2.7 -using System.Runtime.InteropServices;
     2.8  using System.Threading;
     2.9  using Outlook = Microsoft.Office.Interop.Outlook;
    2.10  using System.Diagnostics;
    2.11 @@ -11,7 +10,7 @@
    2.12  namespace pEp
    2.13  {
    2.14      /// <summary>
    2.15 -    /// Wrapper for the outlook MailItem supporting encryption.
    2.16 +    /// Wrapper for the Outlook MailItem supporting encryption.
    2.17      /// </summary>
    2.18      internal class CryptableMailItem : INotifyPropertyChanged,
    2.19                                         IDisposable
    2.20 @@ -620,6 +619,67 @@
    2.21          }
    2.22  
    2.23          /// <summary>
    2.24 +        /// Recoloring workaround. This should be replaced by a proper engine function.
    2.25 +        /// The rating that is calculated here only is shown in the UI, but never saved to
    2.26 +        /// the mail item.
    2.27 +        /// The functionality is the following:
    2.28 +        /// - Only messages with an original rating of >= pEpRatingReliable are eligible for
    2.29 +        ///   recoloring due to trust changes.
    2.30 +        /// - A message only has green rating if all recipients are green
    2.31 +        /// - A message is yellow is all recipients are at least yellow
    2.32 +        /// - A message is red if at least one contact is red
    2.33 +        /// </summary>
    2.34 +        public pEpRating GetUIRating(pEpRating originalRating)
    2.35 +        {
    2.36 +            if (originalRating >= pEpRating.pEpRatingReliable)
    2.37 +            {
    2.38 +                pEpRating uiRating = originalRating;
    2.39 +
    2.40 +                try
    2.41 +                {
    2.42 +                    // Start using the From identity's rating
    2.43 +                    var tempRating = ThisAddIn.PEPEngine.IdentityRating(this.From.ToCOMType());
    2.44 +
    2.45 +                    // If any of the message recipients' rating is lower, apply it
    2.46 +                    foreach (var identity in this.Recipients)
    2.47 +                    {
    2.48 +                        var identityRating = ThisAddIn.PEPEngine.IdentityRating(identity.ToCOMType());
    2.49 +
    2.50 +                        if (identityRating < tempRating)
    2.51 +                        {
    2.52 +                            tempRating = identityRating;
    2.53 +                        }
    2.54 +                    }
    2.55 +
    2.56 +                    // Original rating was at least reliable, new trust can only be red, yellow or green
    2.57 +                    if (tempRating < 0)
    2.58 +                    {
    2.59 +                        uiRating = pEpRating.pEpRatingMistrust;
    2.60 +                    }
    2.61 +                    else if (tempRating <= pEpRating.pEpRatingReliable)
    2.62 +                    {
    2.63 +                        uiRating = pEpRating.pEpRatingReliable;
    2.64 +                    }
    2.65 +                    else
    2.66 +                    {
    2.67 +                        uiRating = tempRating;
    2.68 +                    }
    2.69 +                }
    2.70 +                catch (Exception e)
    2.71 +                {
    2.72 +                    Log.Verbose("CryptableMailItem.UIRating: Error getting UI rating. " + e.Message);
    2.73 +                    uiRating = originalRating;
    2.74 +                }
    2.75 +
    2.76 +                return uiRating;
    2.77 +            }
    2.78 +            else
    2.79 +            {
    2.80 +                return originalRating;
    2.81 +            }
    2.82 +        }
    2.83 +
    2.84 +        /// <summary>
    2.85          /// Returns whether this cryptable mail item has BCC recipients or not
    2.86          /// </summary>
    2.87          public bool HasBCC
    2.88 @@ -772,7 +832,7 @@
    2.89  
    2.90          /// <summary>
    2.91          /// Gets the rating after the last message processing.
    2.92 -        /// Undefined is the default is no processing has been completed.
    2.93 +        /// Undefined is the default if no processing has been completed.
    2.94          /// </summary>
    2.95          public pEpRating LastProcessedRating
    2.96          {
    2.97 @@ -855,6 +915,40 @@
    2.98          }
    2.99  
   2.100          /// <summary>
   2.101 +        /// Gets the original rating of the internal mail item as saved the first time.
   2.102 +        /// Will return pEpRatingUndefined if an error occured or no rating was found.
   2.103 +        /// </summary>
   2.104 +        public pEpRating OriginalRating
   2.105 +        {
   2.106 +            get
   2.107 +            {
   2.108 +                pEpRating originalRating = pEpRating.pEpRatingUndefined;
   2.109 +
   2.110 +                if (this.internalMailItem != null)
   2.111 +                {
   2.112 +                    lock (mutexMailItem)
   2.113 +                    {
   2.114 +                        try
   2.115 +                        {
   2.116 +                            object rating;
   2.117 +                            if (this.internalMailItem.GetPEPProperty(MailItemExtensions.PEPProperty.Rating, out rating))
   2.118 +                            {
   2.119 +                                originalRating = (pEpRating)rating;
   2.120 +                            }
   2.121 +                        }
   2.122 +                        catch (Exception e)
   2.123 +                        {
   2.124 +                            Log.Warning("CryptableMailItem.OriginalRating: Error getting original rating. " + e.Message);
   2.125 +                            originalRating = pEpRating.pEpRatingUndefined;
   2.126 +                        }
   2.127 +                    }
   2.128 +                }
   2.129 +
   2.130 +                return originalRating;
   2.131 +            }
   2.132 +        }
   2.133 +
   2.134 +        /// <summary>
   2.135          /// Gets the outgoing pEp rating of the cryptable mail item.
   2.136          /// </summary>
   2.137          public pEpRating OutgoingRating
   2.138 @@ -980,9 +1074,9 @@
   2.139          /// The calculated rating will be returned but it is already set as the property value by this method.
   2.140          /// If rating is ever undefined: it can be assumed an error occured.
   2.141          /// </summary>
   2.142 -        private pEpRating ProcessAndGetRating()
   2.143 +        private Globals.ReturnStatus ProcessAndGetRating(out pEpRating rating)
   2.144          {
   2.145 -            pEpRating result = pEpRating.pEpRatingUndefined;
   2.146 +            rating = pEpRating.pEpRatingUndefined;
   2.147  
   2.148              Log.Verbose("ProcessAndGetRating: Started.");
   2.149  
   2.150 @@ -1009,6 +1103,7 @@
   2.151                  PEPMessage message = null;
   2.152                  PEPMessage mirror = null;
   2.153                  PEPMessage processedMessage;
   2.154 +                pEpRating originalRating = pEpRating.pEpRatingUndefined;
   2.155                  pEpRating processedRating;
   2.156                  pEpDecryptFlags decryptionFlags;
   2.157                  MsgProcessor msgProcessor = new MsgProcessor();
   2.158 @@ -1028,7 +1123,9 @@
   2.159                      Log.Error("ProcessAndGetRating: internalMailItem is invalid or EntryID could not get retrieved");
   2.160                      this._LastProcessedRating = pEpRating.pEpRatingUndefined;
   2.161                      this._LastProcessedStatus = Globals.ReturnStatus.Failure;
   2.162 -                    return pEpRating.pEpRatingUndefined;
   2.163 +                    rating = pEpRating.pEpRatingUndefined;
   2.164 +
   2.165 +                    return Globals.ReturnStatus.Failure;
   2.166                  }
   2.167  
   2.168                  // Reset status
   2.169 @@ -1079,9 +1176,18 @@
   2.170                          // Wait for the other thread to finish
   2.171                          if (isAlreadyBeingDecrypted)
   2.172                          {
   2.173 -                            Log.Verbose("ProcessAndGetRating: Waiting for other decryption thread to finish. " + entryId);
   2.174 -                            Thread.Sleep(sleepTime);
   2.175 -                            curWaitTime += sleepTime;
   2.176 +                            // Do not process again incoming messages (rating won't change)
   2.177 +                            if (IsIncoming)
   2.178 +                            {
   2.179 +                                rating = pEpRating.pEpRatingUndefined;
   2.180 +                                return Globals.ReturnStatus.Aborted;
   2.181 +                            }
   2.182 +                            else
   2.183 +                            {
   2.184 +                                Log.Verbose("ProcessAndGetRating: Waiting for other decryption thread to finish. " + entryId);
   2.185 +                                Thread.Sleep(sleepTime);
   2.186 +                                curWaitTime += sleepTime;
   2.187 +                            }
   2.188                          }
   2.189                      }
   2.190                      while ((isAlreadyBeingDecrypted) && (curWaitTime < maxWaitTime));
   2.191 @@ -1106,10 +1212,11 @@
   2.192                      Log.Error("ProcessAndGetRating: Exited by timeout. " + (string.IsNullOrEmpty(entryId) ? "<no ID>" : entryId));
   2.193  
   2.194                      // Save processing status
   2.195 -                    this._LastProcessedRating = pEpRating.pEpRatingCannotDecrypt;
   2.196 -                    this._LastProcessedStatus = Globals.ReturnStatus.Failure;
   2.197 +                    this._LastProcessedRating = pEpRating.pEpRatingUndefined;
   2.198 +                    this._LastProcessedStatus = Globals.ReturnStatus.Aborted;
   2.199  
   2.200 -                    return (pEpRating.pEpRatingCannotDecrypt);
   2.201 +                    rating = pEpRating.pEpRatingUndefined;
   2.202 +                    return Globals.ReturnStatus.Aborted;
   2.203                  }
   2.204  
   2.205                  // Log the download status which can influence later processing
   2.206 @@ -1125,7 +1232,7 @@
   2.207                      (MapiHelper.GetProperty(this.internalMailItem, MapiProperty.PidLidImapMarkedForDeletion, "0").ToString() == "1"))
   2.208                  {
   2.209                      Log.Verbose("ProcessAndGetRating: Deleted IMAP message detected, skipping processing");
   2.210 -                    result = pEpRating.pEpRatingUndefined;
   2.211 +                    rating = pEpRating.pEpRatingUndefined;
   2.212                      specialCaseFound = true;
   2.213                  }
   2.214  
   2.215 @@ -1134,12 +1241,12 @@
   2.216                      (this.internalMailItem.GetIsMirror()))
   2.217                  {
   2.218                      this.internalMailItem.GetPEPProperty(MailItemExtensions.PEPProperty.Rating,
   2.219 -                                                         out propValue,
   2.220 -                                                         pEpRating.pEpRatingUndefined);
   2.221 -                    result = (pEpRating)propValue;
   2.222 +                                                         out propValue);
   2.223 +                    rating = (pEpRating)propValue;
   2.224 +                    originalRating = rating;
   2.225  
   2.226                      // If the value was undefined, don't use it. Recalculation is needed.
   2.227 -                    if (result != pEpRating.pEpRatingUndefined)
   2.228 +                    if (rating != pEpRating.pEpRatingUndefined)
   2.229                      {
   2.230                          Log.Verbose("ProcessAndGetRating: Mirror detected, using stored rating.");
   2.231                          specialCaseFound = true;
   2.232 @@ -1158,7 +1265,7 @@
   2.233                  {
   2.234                      Log.Verbose("ProcessAndGetRating: Draft detected, using outgoing rating.");
   2.235  
   2.236 -                    result = this.OutgoingRating;
   2.237 +                    rating = this.OutgoingRating;
   2.238                      specialCaseFound = true;
   2.239                  }
   2.240  
   2.241 @@ -1197,10 +1304,13 @@
   2.242                      /* Apply a custom message class to secure mail items in secure stores (doesn't apply for pEp internal messages). This is needed for the
   2.243                       * FormRegionPreviewUnencrypted to be shown in Outlook 2010 (technically, all versions require this according to the documentation).
   2.244                       * See: https://msdn.microsoft.com/en-us/library/office/ff866019.aspx
   2.245 +                     * In case of Outlook 2010, set message class for all messages in secure stores, as this version often downloads only mail headers in the first place
   2.246 +                     * which then leads to the form region not being properly dispayed at the first click (OUT-68).
   2.247                       */
   2.248                      if ((isPEPInternal == false) &&
   2.249                          ((this.internalMailItem.GetNeverUnsecure()) ||
   2.250 -                         (this.internalMailItem.GetIsInSecureStore() && this.internalMailItem.GetIsSecure())))
   2.251 +                         (this.internalMailItem.GetIsInSecureStore() && this.internalMailItem.GetIsSecure()) || 
   2.252 +                         (Globals.GetOutlookVersion() == Globals.Version.Outlook2010 && this.internalMailItem.GetIsInSecureStore() && this.internalMailItem.DownloadState == Outlook.OlDownloadState.olHeaderOnly)))
   2.253                      {
   2.254                          try
   2.255                          {
   2.256 @@ -1228,6 +1338,7 @@
   2.257  
   2.258                      // Create PEPMessages for processing
   2.259                      sts1 = PEPMessage.Create(this.internalMailItem, out message);
   2.260 +                    originalRating = message.Rating;
   2.261  
   2.262                      if (this.internalMailItem.GetIsSecurelyStored())
   2.263                      {
   2.264 @@ -1235,12 +1346,12 @@
   2.265                          if (mirrorMailItem != null)
   2.266                          {
   2.267                              sts2 = PEPMessage.Create(mirrorMailItem, out mirror);
   2.268 +                            originalRating = mirror.Rating;
   2.269                          }
   2.270                      }
   2.271  
   2.272                      // Process
   2.273 -                    status = msgProcessor.ProcessMessage(internalMailItem.EntryID,
   2.274 -                                                         message,
   2.275 +                    status = msgProcessor.ProcessMessage(message,
   2.276                                                           sts1,
   2.277                                                           mirror,
   2.278                                                           this.internalMailItem.GetIsInSecureStore(),
   2.279 @@ -1347,29 +1458,14 @@
   2.280                          }
   2.281                      }
   2.282  
   2.283 -                    result = processedRating;
   2.284 +                    rating = processedRating;
   2.285                  }
   2.286  
   2.287 -                /* Apply the custom message class again to secure mail items in secure stores. This is a failsafe method in case
   2.288 -                 * it didn't work the first time above. Again, don't apply to pEp internal messages.
   2.289 -                 */
   2.290 -                if ((isPEPInternal == false) &&
   2.291 -                    (this.disposeAfterProcessing == false) &&
   2.292 -                    (this.internalMailItem.GetIsSecure()))
   2.293 -                {
   2.294 -                    try
   2.295 -                    {
   2.296 -                        MapiHelper.SetProperty(this.internalMailItem, MapiProperty.PidTagMessageClass, MapiPropertyValue.PidTagMessageClassSecurePEP);
   2.297 -                        this.internalMailItem.Save();
   2.298 -                    }
   2.299 -                    catch (Exception e)
   2.300 -                    {
   2.301 -                        Log.Error("ProcessAndGetRating: Could not set custom message class, " + e.ToString());
   2.302 -                    }
   2.303 -                }
   2.304 +                // Recoloring workaround. This should be replaced by a proper engine function.
   2.305 +                rating = this.GetUIRating(rating);
   2.306  
   2.307                  // Save processing status
   2.308 -                this._LastProcessedRating = result;
   2.309 +                this._LastProcessedRating = rating;
   2.310                  this._LastProcessedStatus = status;
   2.311  
   2.312                  // Release objects
   2.313 @@ -1402,7 +1498,7 @@
   2.314  
   2.315              Log.Verbose("ProcessAndGetRating: Completed.");
   2.316  
   2.317 -            return (result);
   2.318 +            return Globals.ReturnStatus.Success;
   2.319          }
   2.320  
   2.321          /// <summary>
   2.322 @@ -1429,7 +1525,17 @@
   2.323          /// </summary>
   2.324          private void Processor_DoWork(object sender, DoWorkEventArgs e)
   2.325          {
   2.326 -            e.Result = this.ProcessAndGetRating();
   2.327 +            pEpRating rating;
   2.328 +
   2.329 +            if (this.ProcessAndGetRating(out rating) == Globals.ReturnStatus.Success)
   2.330 +            {
   2.331 +                e.Result = rating;
   2.332 +            }
   2.333 +            else
   2.334 +            {
   2.335 +                e.Cancel = true;
   2.336 +                Log.Verbose("Processor_DoWork: Processing not successful.");
   2.337 +            }
   2.338              return;
   2.339          }
   2.340  
     3.1 --- a/Extensions/MailItemExtensions.cs	Sun May 07 13:50:00 2017 +0200
     3.2 +++ b/Extensions/MailItemExtensions.cs	Tue May 30 21:14:43 2017 +0200
     3.3 @@ -548,6 +548,37 @@
     3.4          }
     3.5  
     3.6          /// <summary>
     3.7 +        /// Determines a mail item's maximum allowable size in kB for sending through the mail item's current store.
     3.8 +        /// </summary>
     3.9 +        /// <param name="omi">The Outlook mail item to process with.</param>
    3.10 +        /// <returns>The maximum allowed size in kB.</returns>
    3.11 +        public static int GetMaxMailSize(this Outlook.MailItem omi)
    3.12 +        {
    3.13 +            int maxFileSize = 0;
    3.14 +            Outlook.Folder folder = null;
    3.15 +            Outlook.Store store = null;
    3.16 +
    3.17 +            try
    3.18 +            {
    3.19 +                folder = (Outlook.Folder)omi.Parent;
    3.20 +                store = folder.Store;
    3.21 +                maxFileSize = store.GetMaxSubmitSize();
    3.22 +            }
    3.23 +            catch (Exception e)
    3.24 +            {
    3.25 +                maxFileSize = 0;
    3.26 +                Log.Error("GetMaxMailSize: failure occured, returning default. " + e.Message);
    3.27 +            }
    3.28 +            finally
    3.29 +            {
    3.30 +                folder = null;
    3.31 +                store = null;
    3.32 +            }
    3.33 +
    3.34 +            return maxFileSize;
    3.35 +        }
    3.36 +
    3.37 +        /// <summary>
    3.38          /// Gets the pEp store folder used to store the mirror for the given Outlook mail item.
    3.39          /// This will be determined based on the from user name.
    3.40          /// The UNKNOWN_SENDER folder is used if a failure occurs in finding the from user name.
     4.1 --- a/Extensions/StoreExtensions.cs	Sun May 07 13:50:00 2017 +0200
     4.2 +++ b/Extensions/StoreExtensions.cs	Tue May 30 21:14:43 2017 +0200
     4.3 @@ -326,5 +326,34 @@
     4.4  
     4.5              return (result);
     4.6          }
     4.7 +
     4.8 +        /// <summary>
     4.9 +        /// Determines a store's maximum allowable size for a message that is being submitted through that store.
    4.10 +        /// </summary>
    4.11 +        /// <param name="store">The Outlook store to process with.</param>
    4.12 +        /// <returns>The maximum allowed size in kB.</returns>
    4.13 +        public static int GetMaxSubmitSize(this Outlook.Store store)
    4.14 +        {
    4.15 +            const int DEFAULT_MAX_SIZE = 20480; // kB, see: https://support.microsoft.com/en-us/help/2222370/-attachment-size-exceeds-the-allowable-limit-error-when-you-add-a-large-attachment-to-an-email-message-in-outlook-2010
    4.16 +            int maxFileSize = DEFAULT_MAX_SIZE;
    4.17 +            Outlook.PropertyAccessor propertyAccessor = null;
    4.18 +
    4.19 +            try
    4.20 +            {
    4.21 +                propertyAccessor = store.PropertyAccessor;
    4.22 +                maxFileSize = propertyAccessor.GetProperty(MapiProperty.PidTagMaximumSubmitMessageSize.DaslName);
    4.23 +            }
    4.24 +            catch (Exception e)
    4.25 +            {
    4.26 +                maxFileSize = DEFAULT_MAX_SIZE;
    4.27 +                Log.Verbose("GetMaxSubmitSize: Error getting size limit. " + e.Message);
    4.28 +            }
    4.29 +            finally
    4.30 +            {
    4.31 +                propertyAccessor = null;
    4.32 +            }
    4.33 +
    4.34 +            return maxFileSize;
    4.35 +        }
    4.36      }
    4.37  }
     5.1 --- a/Globals.cs	Sun May 07 13:50:00 2017 +0200
     5.2 +++ b/Globals.cs	Tue May 30 21:14:43 2017 +0200
     5.3 @@ -71,7 +71,24 @@
     5.4              /// <summary>
     5.5              /// Successfully completed with no unexpected failures.
     5.6              /// </summary>
     5.7 -            Success
     5.8 +            Success,
     5.9 +
    5.10 +            /// <summary>
    5.11 +            /// Process was aborted
    5.12 +            /// </summary>
    5.13 +            Aborted
    5.14 +        }
    5.15 +
    5.16 +        /// <summary>
    5.17 +        /// Enumeration to define the Outlook version pEp runs on.
    5.18 +        /// For information on version numbers, see: https://en.wikipedia.org/wiki/Microsoft_Outlook#Versions
    5.19 +        /// </summary>            
    5.20 +        public enum Version
    5.21 +        {
    5.22 +            Undefined = 0,
    5.23 +            Outlook2010 = 14,
    5.24 +            Outlook2013 = 15,
    5.25 +            Outlook2016 = 16
    5.26          }
    5.27  
    5.28          private static bool               eventsAreConnected = false;
    5.29 @@ -297,6 +314,42 @@
    5.30          }
    5.31  
    5.32          /// <summary>
    5.33 +        /// Gets the Outlook version pEp runs on.       
    5.34 +        /// </summary>
    5.35 +        /// <returns>The Outlook version or 'Undefined' if an error occured.</returns>
    5.36 +        public static Version GetOutlookVersion()
    5.37 +        {
    5.38 +            var version = Version.Undefined;
    5.39 +            int versionNo = 0;
    5.40 +            string versionNumber = string.Empty;
    5.41 +
    5.42 +            try
    5.43 +            {
    5.44 +                versionNumber = Globals.ThisAddIn.Application.Version.Substring(0, 2);
    5.45 +            }
    5.46 +            catch (Exception e)
    5.47 +            {
    5.48 +                versionNumber = string.Empty;
    5.49 +                Log.Error("GetOutlookVersion: Error getting version. " + e.Message);
    5.50 +            }
    5.51 +
    5.52 +            if (int.TryParse(versionNumber, out versionNo))
    5.53 +            {
    5.54 +                try
    5.55 +                {
    5.56 +                    version = (Globals.Version)versionNo;
    5.57 +                }
    5.58 +                catch (Exception e)
    5.59 +                {
    5.60 +                    version = Version.Undefined;
    5.61 +                    Log.Error("GetOutlookVersion: Error parsing version. " + e.Message);
    5.62 +                }
    5.63 +            }
    5.64 +
    5.65 +            return version;
    5.66 +        }
    5.67 +
    5.68 +        /// <summary>
    5.69          /// Gets the pEp for Outlook version.
    5.70          /// This will never be null.
    5.71          /// </summary>
     6.1 --- a/MsgProcessor.cs	Sun May 07 13:50:00 2017 +0200
     6.2 +++ b/MsgProcessor.cs	Tue May 30 21:14:43 2017 +0200
     6.3 @@ -73,8 +73,7 @@
     6.4              {
     6.5                  msgCont = e.Argument as MsgContainer;
     6.6  
     6.7 -                sts = this.ProcessMessage(msgCont.EntryId,
     6.8 -                                          msgCont.Message,
     6.9 +                sts = this.ProcessMessage(msgCont.Message,
    6.10                                            msgCont.MessageCreationStatus,
    6.11                                            msgCont.Mirror,
    6.12                                            msgCont.IsInSecureStore,
    6.13 @@ -140,119 +139,27 @@
    6.14          /// The main purpose of this method is to do the following (not in order)
    6.15          ///  • Decrypt messages when necessary
    6.16          ///  • Create mirrors when necessary
    6.17 -        ///  • Store color rating to mail items (either mirror or original)
    6.18          ///  • Get the current color rating for the item (either stored or just calculated)
    6.19 +        ///  
    6.20 +        /// This uses the following logic:
    6.21          /// 
    6.22 -        /// The first check is to determine if the cryptable mail item is a special case.
    6.23 -        /// Special cases should be handled externally for:
    6.24 -        ///  • Mirrors
    6.25 -        ///    If it's a mirror, the rating is what is stored in the mirror.
    6.26 -        ///    Note: If the rating was changed since the mirror was last updated (for example by identity updates) 
    6.27 -        ///    this rating change is not captured. This is necessary though otherwise a reverse lookup would be needed 
    6.28 -        ///    to go from the mirror back to the encrypted mail item.
    6.29 -        ///  • Drafts
    6.30 -        ///    If it's a draft, the outgoing rating is used.
    6.31 -        ///    This case would also be detected in the below full logic; however, it may be faster as a special case.
    6.32 -        ///
    6.33 -        /// If the mail item is not a special case, or the special case rating is undefined, the below logic is run.
    6.34 -        /// 
    6.35 -        /// Secure Store      ___ Sent Folder
    6.36 -        ///  (untrusted)       |   |_ Secure Mail (No need to check for NeverUnsecure)
    6.37 -        ///      -or-          |   |   |_ Mirror Exists
    6.38 -        ///  NeverUnsecure     |   |   |   |_ Stored Rating Exists (in Mirror)
    6.39 -        ///                    |   |   |   |   • Set returned rating to the stored rating in the mirror
    6.40 -        ///                    |   |   |   |
    6.41 -        ///                    |   |   |   |_ No Stored Rating Exists/Undefined (in mirror)
    6.42 -        ///                    |   |   |       • Set stored rating in the mirror to the OutgoingRating
    6.43 -        ///                    |   |   |       • Set returned rating to the calculated OutgoingRating
    6.44 -        ///                    |   |   |
    6.45 -        ///                    |   |   |_ No Mirror Exists
    6.46 -        ///                    |   |       • Create mirror and decrypt to it
    6.47 -        ///                    |   |       • Set stored rating in the mirror to the OutgoingRating
    6.48 -        ///                    |   |       • Set returned rating to the calculated OutgoingRating
    6.49 -        ///                    |   |
    6.50 -        ///                    |   |_ Unsecure Mail
    6.51 -        ///                    |       • Set returned rating to pEpRatingUnencrypted
    6.52 -        ///                    |       • Do not set or modify any previous stored rating (needed for switching untrusted->trusted)
    6.53 -        ///                    |
    6.54 -        ///                    |_ Incoming
    6.55 -        ///                    |   |_ Secure Mail (No need to check for NeverUnsecure)
    6.56 -        ///                    |   |   |_ Mirror Exists
    6.57 -        ///                    |   |   |   • Do a test-decrypt of the mail to see if the rating has changed
    6.58 -        ///                    |   |   |     Compare against the stored rating in the mirror
    6.59 -        ///                    |   |   |     (Note: the rating changes if, for example, a handshake was completed on another email)
    6.60 -        ///                    |   |   |   • If ratings differ, update the stored rating in the mirror to new decrypted rating
    6.61 -        ///                    |   |   |   • Set returned rating to the decrypted rating
    6.62 -        ///                    |   |   |
    6.63 -        ///                    |   |   |_ No Mirror Exists
    6.64 -        ///                    |   |      • Create mirror and decrypt to it
    6.65 -        ///                    |   |      • Set stored rating in the mirror to the decrypted rating
    6.66 -        ///                    |   |      • Set returned rating to the decrypted rating
    6.67 -        ///                    |   |
    6.68 -        ///                    |   |_ Unsecure Mail
    6.69 -        ///                    |       • Set returned rating to pEpRatingUnencrypted
    6.70 -        ///                    |       • Do not set or modify any previous stored rating (needed for switching untrusted->trusted)
    6.71 -        ///                    |       • Call Decrypt to process the message even though no decryption/mirror required
    6.72 -        ///                    |
    6.73 -        ///                    |_ Outgoing
    6.74 -        ///                        |_ Draft
    6.75 -        ///                        |   |_ Secure Mail
    6.76 -        ///                        |   |  • Decrypt the mail and overwrite current mail item (no mirror needed) so editing can continue
    6.77 -        ///                        |   |  • NEVER set the stored rating 
    6.78 -        ///                        |   |  • Set returned rating to the calculated OutgoingRating
    6.79 -        ///                        |   | 
    6.80 -        ///                        |   |_ Unsecure Mail
    6.81 -        ///                        |      • Set returned rating to the calculated OutgoingRating
    6.82 -        ///                        |      • No decryption/mirror required
    6.83 -        ///                        |
    6.84 -        ///                        |_ Not Draft (Considered sent but no longer in a sent folder)
    6.85 -        ///                            • Use full Sent Folder logic
    6.86 -        /// 
    6.87 -        /// Unsecure Store    ___ Sent Folder
    6.88 -        ///   (trusted)        |   |_ Secure Mail
    6.89 -        ///                    |   |   • Decrypt the mail and overwrite current mail item (no mirror needed)
    6.90 -        ///                    |   |   • Set stored rating to the OutgoingRating
    6.91 -        ///                    |   |   • Set returned rating to the calculated OutgoingRating
    6.92 -        ///                    |   |
    6.93 -        ///                    |   |_ Unsecure Mail
    6.94 -        ///                    |       |_ Stored Rating Exists
    6.95 -        ///                    |       |   • Set returned rating to the stored rating
    6.96 -        ///                    |       |
    6.97 -        ///                    |       |_ No Stored Rating Exists/Undefined
    6.98 -        ///                    |           • Set returned rating to pEpRatingUnencrypted
    6.99 -        ///                    |
   6.100 -        ///                    |_ Incoming
   6.101 -        ///                    |   |_ Secure Mail
   6.102 -        ///                    |   |   • Decrypt the mail and overwrite current mail item (no mirror needed)
   6.103 -        ///                    |   |   • Set stored rating to the decrypted rating
   6.104 -        ///                    |   |   • Set returned rating to the decrypted rating
   6.105 -        ///                    |   | 
   6.106 -        ///                    |   |_ Unsecure Mail
   6.107 -        ///                    |       |_ Stored Rating Exists
   6.108 -        ///                    |       |   • Set returned rating to the stored rating
   6.109 -        ///                    |       |   • Call Decrypt to process the message even though no decryption/mirror required
   6.110 -        ///                    |       |
   6.111 -        ///                    |       |_ No Stored Rating Exists/Undefined
   6.112 -        ///                    |           • Set returned rating as pEpRatingUnencrypted
   6.113 -        ///                    |           • Call Decrypt to process the message even though no decryption/mirror required  
   6.114 -        ///                    |
   6.115 -        ///                    |_ Outgoing
   6.116 -        ///                        |_ Draft
   6.117 -        ///                        |   |_ Secure Mail
   6.118 -        ///                        |   |  • Decrypt the mail and overwrite current mail item (no mirror needed) so editing can continue
   6.119 -        ///                        |   |  • NEVER set the stored rating 
   6.120 -        ///                        |   |  • Set returned rating to the calculated OutgoingRating
   6.121 -        ///                        |   | 
   6.122 -        ///                        |   |_ Unsecure Mail
   6.123 -        ///                        |      • Set returned rating to the calculated OutgoingRating
   6.124 -        ///                        |      • No decryption/mirror required
   6.125 -        ///                        |
   6.126 -        ///                        |_ Not Draft (Considered sent but no longer in a sent folder)
   6.127 -        ///                            • Use full Sent Folder logic
   6.128 -        /// 
   6.129 -        /// Additional Notes:
   6.130 -        ///  • For untrusted stores or NeverUnsecure messages, the stored rating is saved to the mirror
   6.131 -        ///  • For trusted stores, the stored rating is saved to the mail item itself
   6.132 +        /// -- Outoing message
   6.133 +        ///         |-- Draft
   6.134 +        ///         |     |-- Secure message            => Decrypt, use outgoing rating
   6.135 +        ///         |     |-- Unsecure message          => No decryption needed, use outgoing rating
   6.136 +        ///         |-- No Draft                        => Use Sent folder logic
   6.137 +        ///         
   6.138 +        /// -- Incoming or sent message
   6.139 +        ///         |-- Secure message
   6.140 +        ///         |     |-- Secure store    
   6.141 +        ///         |     |      |-- Mirror exists      => No decryption needed, use mirror 
   6.142 +        ///         |     |      |-- No mirror          => Decrypt and create mirror  
   6.143 +        ///         |     |-- Unsecure store            => Decrypt
   6.144 +        ///         |-- Unsecure message
   6.145 +        ///         |     |-- Secure store              => Unencrypted message
   6.146 +        ///         |     |-- Unsecure store
   6.147 +        ///         |     |      |-- Sent folder        => No decryption needed 
   6.148 +        ///         |     |      |-- Not in Sent folder => Decrypt for message flags
   6.149          /// 
   6.150          /// <param name="message">The original message to process.</param>
   6.151          /// <param name="messageCreationStatus">The return status after creating the message.</param>
   6.152 @@ -267,8 +174,7 @@
   6.153          /// <param name="outProcessedRating">The processed rating of the message.</param>
   6.154          /// <param name="outDecryptionFlags">The output flags after decrypting the message (if it was decrypted).</param>
   6.155          /// <returns>The status of the method.</returns>
   6.156 -        public Globals.ReturnStatus ProcessMessage(string entryID,
   6.157 -                                                   PEPMessage message,
   6.158 +        public Globals.ReturnStatus ProcessMessage(PEPMessage message,
   6.159                                                     Globals.ReturnStatus messageCreationStatus,
   6.160                                                     PEPMessage mirror,
   6.161                                                     bool isInSecureStore,
   6.162 @@ -280,14 +186,13 @@
   6.163                                                     out pEpDecryptFlags outDecryptionFlags)
   6.164          {
   6.165              bool isMirror = false;
   6.166 -            bool success;
   6.167 +            bool success = true;
   6.168 +            bool sentItem = false;
   6.169              string[] decryptionKeyList;
   6.170              pEpDecryptFlags decryptionFlags = pEpDecryptFlags.pEpDecryptFlagsNone;
   6.171 -            PEPMessage newMessage;
   6.172              PEPMessage processedMessage = null;
   6.173              pEpRating processedRating = pEpRating.pEpRatingUndefined;
   6.174 -            pEpRating tRating;
   6.175 -            pEpRating tRating2;
   6.176 +            pEpRating decryptionRating;
   6.177              Globals.ReturnStatus status = Globals.ReturnStatus.Success;
   6.178  
   6.179              if (message == null)
   6.180 @@ -299,444 +204,144 @@
   6.181              {
   6.182                  if (messageCreationStatus == Globals.ReturnStatus.Success)
   6.183                  {
   6.184 -                    // In secure (untrusted) store or marked NeverUnsecure
   6.185 -                    if (isInSecureStore || message.NeverUnsecure)
   6.186 +                    // Outgoing messages
   6.187 +                    if (message.Direction == pEpMsgDirection.pEpDirOutgoing)
   6.188                      {
   6.189 -                        Log.Verbose("ProcessMessage: In secure store or marked never unsecure.");
   6.190 +                        Log.Verbose("ProcessMessage: Outgoing message");
   6.191  
   6.192 -                        // Sent folder
   6.193 -                        if (isInSentFolder)
   6.194 +                        // Draft
   6.195 +                        if (isDraft)
   6.196                          {
   6.197 -                            Log.Verbose("ProcessMessage: In sent folder.");
   6.198 +                            Log.Verbose("ProcessMessage: Is Draft");
   6.199  
   6.200 -                            // Secure mail in a secure (untrusted) store or marked NeverUnsecure
   6.201 -                            // This will use a mirror
   6.202 +                            // Apply outgoing rating to outgoing messages
   6.203 +                            processedRating = this.GetOutgoingRating(message);
   6.204 +
   6.205                              if (message.IsSecure)
   6.206                              {
   6.207 -                                Log.Verbose("ProcessMessage: Is secure.");
   6.208 +                                Log.Verbose("ProcessMessage: Secure message");
   6.209 +
   6.210 +                                // Decrypt message
   6.211 +                                success = this.Decrypt(message,
   6.212 +                                                       out processedMessage,
   6.213 +                                                       out decryptionKeyList,
   6.214 +                                                       out decryptionFlags,
   6.215 +                                                       out decryptionRating);
   6.216 +
   6.217 +                                if (success == false)
   6.218 +                                {
   6.219 +                                    status = Globals.ReturnStatus.Failure;
   6.220 +                                }
   6.221 +                            }
   6.222 +                        }
   6.223 +                        else
   6.224 +                        {
   6.225 +                           // Sent item that is no longer in the Sent folder. Apply full Sent folder logic.
   6.226 +                            sentItem = true;
   6.227 +                        }
   6.228 +                    }
   6.229 +
   6.230 +                    // Incoming messages and sent messages
   6.231 +                    if ((message.Direction == pEpMsgDirection.pEpDirIncoming) ||
   6.232 +                        (isInSentFolder) ||
   6.233 +                        (sentItem))
   6.234 +                    {
   6.235 +                        Log.Verbose("ProcessMessage: Incoming or sent message");
   6.236 +
   6.237 +                        // Secure incoming or sent message
   6.238 +                        if (message.IsSecure)
   6.239 +                        {
   6.240 +                            Log.Verbose("ProcessMessage: Secure message");
   6.241 +
   6.242 +                            // Secure incoming or sent message in secure store or never unprotected
   6.243 +                            if (isInSecureStore || message.NeverUnsecure)
   6.244 +                            {
   6.245 +                                Log.Verbose("ProcessMessage: In secure store or never unprotected");
   6.246                                  isMirror = true;
   6.247  
   6.248 +                                // If no mirror exists, create one
   6.249                                  if (mirror == null)
   6.250                                  {
   6.251 -                                    Log.Verbose("ProcessMessage: Mirror not found, creating and decrypting.");
   6.252 -
   6.253 +                                    // Decrypt message
   6.254                                      success = this.Decrypt(message,
   6.255 -                                                            out newMessage,
   6.256 -                                                            out decryptionKeyList,
   6.257 -                                                            out decryptionFlags,
   6.258 -                                                            out tRating);
   6.259 -                                    tRating2 = this.GetOutgoingRating(message);
   6.260 +                                                           out processedMessage,
   6.261 +                                                           out decryptionKeyList,
   6.262 +                                                           out decryptionFlags,
   6.263 +                                                           out decryptionRating);
   6.264  
   6.265                                      if (success)
   6.266                                      {
   6.267 -                                        processedMessage = newMessage.Copy();
   6.268 -                                        processedMessage.Rating = tRating2;
   6.269 -
   6.270 -                                        processedRating = tRating2; // Outgoing rating
   6.271 +                                        Log.Verbose("ProcessMessage: Message successfully decrypted");
   6.272 +                                        mirror = processedMessage.Copy();
   6.273 +                                        processedRating = decryptionRating;
   6.274                                      }
   6.275                                      else
   6.276                                      {
   6.277 -                                        // Do nothing, decryption failed
   6.278 +                                        Log.Verbose("ProcessMessage: Could not decrypt message");
   6.279                                          status = Globals.ReturnStatus.Failure;
   6.280 -                                        Log.Error("ProcessMessage: Decryption failed, " + tRating.ToString());
   6.281 -
   6.282 -                                        processedRating = tRating;
   6.283 +                                        processedRating = pEpRating.pEpRatingCannotDecrypt;
   6.284                                      }
   6.285                                  }
   6.286                                  else
   6.287                                  {
   6.288 -                                    Log.Verbose("ProcessMessage: Mirror exists");
   6.289 -
   6.290 -                                    if (mirror.Rating == pEpRating.pEpRatingUndefined)
   6.291 -                                    {
   6.292 -                                        tRating = this.GetOutgoingRating(message);
   6.293 -                                        processedMessage = mirror.Copy();
   6.294 -                                        processedMessage.Rating = tRating;
   6.295 -
   6.296 -                                        processedRating = tRating;
   6.297 -                                    }
   6.298 -                                    else
   6.299 -                                    {
   6.300 -                                        processedRating = mirror.Rating;
   6.301 -                                    }
   6.302 +                                    // If mirror exists, take it and its rating
   6.303 +                                    Log.Verbose("ProcessMessage: Mirror found");
   6.304 +                                    processedMessage = mirror.Copy();
   6.305 +                                    processedRating = mirror.Rating;
   6.306                                  }
   6.307                              }
   6.308 -                            // Unsecure mail in a secure (untrusted) store or marked NeverUnsecure
   6.309 -                            // This does not have a mirror
   6.310 +                            // Secure incoming or sent message in unsecure (trusted) store
   6.311                              else
   6.312                              {
   6.313 -                                Log.Verbose("ProcessMessage: Is unsecure.");
   6.314 -                                processedRating = pEpRating.pEpRatingUnencrypted;
   6.315 -                            }
   6.316 -                        }
   6.317 -                        // Incoming
   6.318 -                        else if (message.Direction == pEpMsgDirection.pEpDirIncoming)
   6.319 -                        {
   6.320 -                            Log.Verbose("ProcessMessage: Is incoming.");
   6.321 +                                Log.Verbose("ProcessMessage: Unsecure (trusted) store");
   6.322  
   6.323 -                            // Secure mail in a secure (untrusted) store or marked NeverUnsecure
   6.324 -                            // This will use a mirror
   6.325 -                            if (message.IsSecure)
   6.326 -                            {
   6.327 -                                Log.Verbose("ProcessMessage: Is secure.");
   6.328 -                                isMirror = true;
   6.329 +                                // Decrypt message
   6.330 +                                success = this.Decrypt(message,
   6.331 +                                                       out processedMessage,
   6.332 +                                                       out decryptionKeyList,
   6.333 +                                                       out decryptionFlags,
   6.334 +                                                       out decryptionRating);
   6.335  
   6.336 -                                if (mirror == null)
   6.337 +                                if (success)
   6.338                                  {
   6.339 -                                    Log.Verbose("ProcessMessage: Mirror not found, creating and decrypting.");
   6.340 -
   6.341 -                                    success = this.Decrypt(message,
   6.342 -                                                            out newMessage,
   6.343 -                                                            out decryptionKeyList,
   6.344 -                                                            out decryptionFlags,
   6.345 -                                                            out tRating);
   6.346 -
   6.347 -                                    if (success)
   6.348 -                                    {
   6.349 -                                        processedMessage = newMessage.Copy();
   6.350 -                                        processedMessage.Rating = tRating;
   6.351 -                                    }
   6.352 -                                    else
   6.353 -                                    {
   6.354 -                                        // Do nothing, decryption failed
   6.355 -                                        status = Globals.ReturnStatus.Failure;
   6.356 -                                        Log.Error("ProcessMessage: Decryption failed, " + tRating.ToString());
   6.357 -                                    }
   6.358 -
   6.359 -                                    processedRating = tRating;
   6.360 +                                    Log.Verbose("ProcessMessage: Message successfully decrypted");
   6.361 +                                    processedRating = decryptionRating;
   6.362                                  }
   6.363                                  else
   6.364                                  {
   6.365 -                                    Log.Verbose("ProcessMessage: Mirror exists, verifying rating.");
   6.366 -
   6.367 -                                    tRating = this.Decrypt(message,
   6.368 -                                                            out newMessage,
   6.369 -                                                            out decryptionKeyList,
   6.370 -                                                            out decryptionFlags);
   6.371 -                                    tRating2 = mirror.Rating;
   6.372 -
   6.373 -                                    // Compare ratings and update as needed
   6.374 -                                    if (tRating != tRating2)
   6.375 -                                    {
   6.376 -                                        processedMessage = mirror.Copy();
   6.377 -                                        processedMessage.Rating = tRating;
   6.378 -                                        processedRating = tRating;
   6.379 -                                    }
   6.380 -                                    else
   6.381 -                                    {
   6.382 -                                        processedRating = tRating2;
   6.383 -                                    }
   6.384 -                                }
   6.385 -                            }
   6.386 -                            // Unsecure mail in a secure (untrusted) store or marked NeverUnsecure
   6.387 -                            // This does not have a mirror
   6.388 -                            else
   6.389 -                            {
   6.390 -                                Log.Verbose("ProcessMessage: Is unsecure.");
   6.391 -                                processedRating = pEpRating.pEpRatingUnencrypted;
   6.392 -
   6.393 -                                // Call Decrypt to process the message, keylist and decrypted message can be ignored
   6.394 -                                this.Decrypt(message,
   6.395 -                                                out newMessage,
   6.396 -                                                out decryptionKeyList,
   6.397 -                                                out decryptionFlags);
   6.398 -                            }
   6.399 -                        }
   6.400 -                        // Outgoing
   6.401 -                        else
   6.402 -                        {
   6.403 -                            if (isDraft)
   6.404 -                            {
   6.405 -                                Log.Verbose("ProcessMessage: Is outgoing draft.");
   6.406 -
   6.407 -                                if (message.IsSecure)
   6.408 -                                {
   6.409 -                                    Log.Verbose("ProcessMessage: Is secure.");
   6.410 -
   6.411 -                                    success = this.Decrypt(message,
   6.412 -                                                            out newMessage,
   6.413 -                                                            out decryptionKeyList,
   6.414 -                                                            out decryptionFlags,
   6.415 -                                                            out tRating);
   6.416 -
   6.417 -                                    if (success)
   6.418 -                                    {
   6.419 -                                        processedMessage = newMessage.Copy();
   6.420 -                                        processedMessage.Rating = pEpRating.pEpRatingUndefined; // Never save Rating in this case
   6.421 -                                    }
   6.422 -                                    else
   6.423 -                                    {
   6.424 -                                        // Do nothing, decryption failed
   6.425 -                                        status = Globals.ReturnStatus.Failure;
   6.426 -                                        Log.Error("ProcessMessage: Decryption failed, " + tRating.ToString());
   6.427 -                                    }
   6.428 -
   6.429 -                                    processedRating = this.GetOutgoingRating(message);
   6.430 -                                }
   6.431 -                                else
   6.432 -                                {
   6.433 -                                    Log.Verbose("ProcessMessage: Is unsecure.");
   6.434 -                                    processedRating = this.GetOutgoingRating(message);
   6.435 -                                }
   6.436 -                            }
   6.437 -                            // Sent but no longer in sent folder
   6.438 -                            else
   6.439 -                            {
   6.440 -                                Log.Verbose("ProcessMessage: Is outgoing (assumed previously sent).");
   6.441 -
   6.442 -                                // Secure mail in a secure (untrusted) store or marked NeverUnsecure
   6.443 -                                // This will use a mirror
   6.444 -                                if (message.IsSecure)
   6.445 -                                {
   6.446 -                                    Log.Verbose("ProcessMessage: Is secure.");
   6.447 -                                    isMirror = true;
   6.448 -
   6.449 -                                    if (mirror == null)
   6.450 -                                    {
   6.451 -                                        Log.Verbose("ProcessMessage: Mirror not found, creating and decrypting.");
   6.452 -
   6.453 -                                        success = this.Decrypt(message,
   6.454 -                                                                out newMessage,
   6.455 -                                                                out decryptionKeyList,
   6.456 -                                                                out decryptionFlags,
   6.457 -                                                                out tRating);
   6.458 -                                        tRating2 = this.GetOutgoingRating(message);
   6.459 -
   6.460 -                                        if (success)
   6.461 -                                        {
   6.462 -                                            processedMessage = newMessage.Copy();
   6.463 -                                            processedMessage.Rating = tRating2;
   6.464 -
   6.465 -                                            processedRating = tRating2; // Outgoing rating
   6.466 -                                        }
   6.467 -                                        else
   6.468 -                                        {
   6.469 -                                            // Do nothing, decryption failed
   6.470 -                                            status = Globals.ReturnStatus.Failure;
   6.471 -                                            Log.Error("ProcessMessage: Decryption failed, " + tRating.ToString());
   6.472 -
   6.473 -                                            processedRating = tRating;
   6.474 -                                        }
   6.475 -                                    }
   6.476 -                                    else
   6.477 -                                    {
   6.478 -                                        Log.Verbose("ProcessMessage: Mirror exists");
   6.479 -
   6.480 -                                        if (mirror.Rating == pEpRating.pEpRatingUndefined)
   6.481 -                                        {
   6.482 -                                            tRating = this.GetOutgoingRating(message);
   6.483 -                                            processedMessage = mirror.Copy();
   6.484 -                                            processedMessage.Rating = tRating;
   6.485 -
   6.486 -                                            processedRating = tRating;
   6.487 -                                        }
   6.488 -                                        else
   6.489 -                                        {
   6.490 -                                            processedRating = mirror.Rating;
   6.491 -                                        }
   6.492 -                                    }
   6.493 -                                }
   6.494 -                                // Unsecure mail in a secure (untrusted) store or marked NeverUnsecure
   6.495 -                                // This does not have a mirror
   6.496 -                                else
   6.497 -                                {
   6.498 -                                    Log.Verbose("ProcessMessage: Is unsecure.");
   6.499 -                                    processedRating = pEpRating.pEpRatingUnencrypted;
   6.500 +                                    Log.Verbose("ProcessMessage: Could not decrypt message");
   6.501 +                                    status = Globals.ReturnStatus.Failure;
   6.502 +                                    processedRating = pEpRating.pEpRatingCannotDecrypt;
   6.503                                  }
   6.504                              }
   6.505                          }
   6.506 -                    }
   6.507 -                    // In unsecure (trusted) store
   6.508 -                    else
   6.509 -                    {
   6.510 -                        Log.Verbose("ProcessMessage: In unsecure store.");
   6.511 -
   6.512 -                        // Sent folder
   6.513 -                        if (isInSentFolder)
   6.514 +                        // Unsecure message
   6.515 +                        else
   6.516                          {
   6.517 -                            Log.Verbose("ProcessMessage: In sent folder.");
   6.518 -
   6.519 -                            // Secure mail in an unsecure (trusted) store
   6.520 -                            if (message.IsSecure)
   6.521 +                            // If no rating is stored, the message was unencrypted
   6.522 +                            if (message.Rating == pEpRating.pEpRatingUndefined)
   6.523                              {
   6.524 -                                Log.Verbose("ProcessMessage: Is secure.");
   6.525 -
   6.526 -                                success = this.Decrypt(message,
   6.527 -                                                        out newMessage,
   6.528 -                                                        out decryptionKeyList,
   6.529 -                                                        out decryptionFlags,
   6.530 -                                                        out tRating);
   6.531 -                                tRating2 = this.GetOutgoingRating(message);
   6.532 -
   6.533 -                                if (success)
   6.534 -                                {
   6.535 -                                    processedMessage = newMessage.Copy();
   6.536 -                                    processedMessage.Rating = tRating2;
   6.537 -
   6.538 -                                    processedRating = tRating2; // Outgoing rating
   6.539 -                                }
   6.540 -                                else
   6.541 -                                {
   6.542 -                                    // Do nothing, decryption failed
   6.543 -                                    status = Globals.ReturnStatus.Failure;
   6.544 -                                    Log.Error("ProcessMessage: Decryption failed, " + tRating.ToString());
   6.545 -
   6.546 -                                    processedRating = tRating;
   6.547 -                                }
   6.548 +                                processedRating = pEpRating.pEpRatingUnencrypted;
   6.549                              }
   6.550 -                            // Unsecure mail in an unsecure (trusted) store
   6.551                              else
   6.552                              {
   6.553 -                                Log.Verbose("ProcessMessage: Is unsecure.");
   6.554 +                                processedRating = message.Rating;
   6.555 +                            }
   6.556  
   6.557 -                                // If the rating is undefined, just set it to unencrypted
   6.558 -                                if (message.Rating == pEpRating.pEpRatingUndefined)
   6.559 -                                {
   6.560 -                                    processedRating = pEpRating.pEpRatingUnencrypted;
   6.561 -                                }
   6.562 -                                else
   6.563 -                                {
   6.564 -                                    processedRating = message.Rating;
   6.565 -                                }
   6.566 -                            }
   6.567 -                        }
   6.568 -                        // Incoming
   6.569 -                        else if (message.Direction == pEpMsgDirection.pEpDirIncoming)
   6.570 -                        {
   6.571 -                            Log.Verbose("ProcessMessage: Is incoming.");
   6.572 +                            // Unsecure incoming message (not in Sent folder or sent item)
   6.573 +                            if ((isInSentFolder == false) &&
   6.574 +                                (sentItem == false))
   6.575 +                            {
   6.576 +                                /* Decrypt message. This is mainly done to check if it's a 
   6.577 +                                 * beacon message. The "decrypted" message and the key list
   6.578 +                                 * can be ignored.
   6.579 +                                */
   6.580 +                                PEPMessage dummyMessage;
   6.581 +                                this.Decrypt(message,
   6.582 +                                             out dummyMessage,
   6.583 +                                             out decryptionKeyList,
   6.584 +                                             out decryptionFlags);
   6.585  
   6.586 -                            // Secure mail in an unsecure (trusted) store
   6.587 -                            if (message.IsSecure)
   6.588 -                            {
   6.589 -                                Log.Verbose("ProcessMessage: Is secure.");
   6.590 -
   6.591 -                                success = this.Decrypt(message,
   6.592 -                                                        out newMessage,
   6.593 -                                                        out decryptionKeyList,
   6.594 -                                                        out decryptionFlags,
   6.595 -                                                        out tRating);
   6.596 -
   6.597 -                                if (success)
   6.598 -                                {
   6.599 -                                    processedMessage = newMessage.Copy();
   6.600 -                                    processedMessage.Rating = tRating;
   6.601 -                                }
   6.602 -                                else
   6.603 -                                {
   6.604 -                                    // Do nothing, decryption failed
   6.605 -                                    status = Globals.ReturnStatus.Failure;
   6.606 -                                    Log.Error("ProcessMessage: Decryption failed, " + tRating.ToString());
   6.607 -                                }
   6.608 -
   6.609 -                                processedRating = tRating;
   6.610 -                            }
   6.611 -                            // Unsecure mail in an unsecure (trusted) store
   6.612 -                            else
   6.613 -                            {
   6.614 -                                Log.Verbose("ProcessMessage: Is unsecure.");
   6.615 -
   6.616 -                                // If the rating is undefined, just set it to unencrypted
   6.617 -                                if (message.Rating == pEpRating.pEpRatingUndefined)
   6.618 -                                {
   6.619 -                                    processedRating = pEpRating.pEpRatingUnencrypted;
   6.620 -                                }
   6.621 -                                else
   6.622 -                                {
   6.623 -                                    processedRating = message.Rating;
   6.624 -                                }
   6.625 -
   6.626 -                                // Call Decrypt to process the message, keylist and decrypted message can be ignored
   6.627 -                                this.Decrypt(message,
   6.628 -                                                out newMessage,
   6.629 -                                                out decryptionKeyList,
   6.630 -                                                out decryptionFlags);
   6.631 -                            }
   6.632 -                        }
   6.633 -                        // Outgoing
   6.634 -                        else
   6.635 -                        {
   6.636 -                            if (isDraft)
   6.637 -                            {
   6.638 -                                Log.Verbose("ProcessMessage: Is outgoing draft.");
   6.639 -
   6.640 -                                if (message.IsSecure)
   6.641 -                                {
   6.642 -                                    Log.Verbose("ProcessMessage: Is secure.");
   6.643 -
   6.644 -                                    success = this.Decrypt(message,
   6.645 -                                                            out newMessage,
   6.646 -                                                            out decryptionKeyList,
   6.647 -                                                            out decryptionFlags,
   6.648 -                                                            out tRating);
   6.649 -
   6.650 -                                    if (success)
   6.651 -                                    {
   6.652 -                                        processedMessage = newMessage.Copy();
   6.653 -                                        processedMessage.Rating = pEpRating.pEpRatingUndefined; // Never save Rating in this case
   6.654 -                                    }
   6.655 -                                    else
   6.656 -                                    {
   6.657 -                                        // Do nothing, decryption failed
   6.658 -                                        status = Globals.ReturnStatus.Failure;
   6.659 -                                        Log.Error("ProcessMessage: Decryption failed, " + tRating.ToString());
   6.660 -                                    }
   6.661 -
   6.662 -                                    processedRating = this.GetOutgoingRating(message);
   6.663 -                                }
   6.664 -                                else
   6.665 -                                {
   6.666 -                                    Log.Verbose("ProcessMessage: Is unsecure.");
   6.667 -                                    processedRating = this.GetOutgoingRating(message);
   6.668 -                                }
   6.669 -                            }
   6.670 -                            // Sent but no longer in sent folder
   6.671 -                            else
   6.672 -                            {
   6.673 -                                Log.Verbose("ProcessMessage: Is outgoing (assumed previously sent).");
   6.674 -
   6.675 -                                // Secure mail in an unsecure (trusted) store
   6.676 -                                if (message.IsSecure)
   6.677 -                                {
   6.678 -                                    Log.Verbose("ProcessMessage: Is secure.");
   6.679 -
   6.680 -                                    success = this.Decrypt(message,
   6.681 -                                                            out newMessage,
   6.682 -                                                            out decryptionKeyList,
   6.683 -                                                            out decryptionFlags,
   6.684 -                                                            out tRating);
   6.685 -                                    tRating2 = this.GetOutgoingRating(message);
   6.686 -
   6.687 -                                    if (success)
   6.688 -                                    {
   6.689 -                                        processedMessage = newMessage.Copy();
   6.690 -                                        processedMessage.Rating = tRating2;
   6.691 -
   6.692 -                                        processedRating = tRating2; // Outgoing rating
   6.693 -                                    }
   6.694 -                                    else
   6.695 -                                    {
   6.696 -                                        // Do nothing, decryption failed
   6.697 -                                        status = Globals.ReturnStatus.Failure;
   6.698 -                                        Log.Error("ProcessMessage: Decryption failed, " + tRating.ToString());
   6.699 -
   6.700 -                                        processedRating = tRating;
   6.701 -                                    }
   6.702 -                                }
   6.703 -                                // Unsecure mail in an unsecure (trusted) store
   6.704 -                                else
   6.705 -                                {
   6.706 -                                    Log.Verbose("ProcessMessage: Is unsecure.");
   6.707 -
   6.708 -                                    // If the rating is undefined, just set it to unencrypted
   6.709 -                                    if (message.Rating == pEpRating.pEpRatingUndefined)
   6.710 -                                    {
   6.711 -                                        processedRating = pEpRating.pEpRatingUnencrypted;
   6.712 -                                    }
   6.713 -                                    else
   6.714 -                                    {
   6.715 -                                        processedRating = message.Rating;
   6.716 -                                    }
   6.717 -                                }
   6.718                              }
   6.719                          }
   6.720                      }
   6.721 @@ -770,7 +375,7 @@
   6.722              outProcessedRating = processedRating;
   6.723              outDecryptionFlags = decryptionFlags;
   6.724  
   6.725 -            return (status);
   6.726 +            return status;
   6.727          }
   6.728  
   6.729          /// <summary>
     7.1 --- a/PEPMessage.cs	Sun May 07 13:50:00 2017 +0200
     7.2 +++ b/PEPMessage.cs	Tue May 30 21:14:43 2017 +0200
     7.3 @@ -1333,13 +1333,13 @@
     7.4                  }
     7.5                  else if (string.IsNullOrWhiteSpace(this._LongMsgFormattedHtml))
     7.6                  {
     7.7 +                    omi.Body = this._LongMsg;
     7.8                      omi.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;
     7.9 -                    omi.Body = this._LongMsg;
    7.10                  }
    7.11                  else
    7.12                  {
    7.13 +                    omi.HTMLBody = this._LongMsgFormattedHtml;
    7.14                      omi.BodyFormat = Outlook.OlBodyFormat.olFormatHTML;
    7.15 -                    omi.HTMLBody = this._LongMsgFormattedHtml;
    7.16                  }
    7.17  
    7.18                  // Remove any previous attachments
    7.19 @@ -1359,7 +1359,27 @@
    7.20  
    7.21                      if (pgpMIME != null)
    7.22                      {
    7.23 -                        pgpMIME.AddTo(attachments);
    7.24 +                        try
    7.25 +                        {
    7.26 +                            pgpMIME.AddTo(attachments);
    7.27 +                        }
    7.28 +                        catch (Exception e)
    7.29 +                        {
    7.30 +                            Log.Verbose("Failed to add PGP/MIME attachment. " + e.Message);
    7.31 +
    7.32 +                            /* If adding the attachment fails, check if it is because of file size limitations
    7.33 +                             * and throw dedicated exception in that case (needed for user feedback).
    7.34 +                             */ 
    7.35 +                            var pgpgMIMESizeInKB = pgpMIME.Data.Length / 1000; // Get size in kB
    7.36 +                            if (pgpgMIMESizeInKB > omi.GetMaxMailSize())
    7.37 +                            {
    7.38 +                                throw new AttachmentSizeException(string.Format("Failed to add PGP/MIME attachment due to size restrictions. Allowed size: {0} kB. Actual size: {1} kB.", omi.GetMaxMailSize(), pgpgMIMESizeInKB));
    7.39 +                            }
    7.40 +                            else
    7.41 +                            {
    7.42 +                                throw;
    7.43 +                            }
    7.44 +                        }
    7.45                      }
    7.46                      else
    7.47                      {
    7.48 @@ -1420,7 +1440,14 @@
    7.49                  {
    7.50                      // Note: ignore return status
    7.51                      omi.SetPEPProperty(MailItemExtensions.PEPProperty.KeyList, this._KeyList);
    7.52 -                    omi.SetPEPProperty(MailItemExtensions.PEPProperty.Rating, this._Rating);
    7.53 +
    7.54 +                    // Only store rating once and never change it
    7.55 +                    object storedRating = null;
    7.56 +                    omi.GetPEPProperty(MailItemExtensions.PEPProperty.Rating, out storedRating);
    7.57 +                    if ((pEpRating)storedRating == pEpRating.pEpRatingUndefined)
    7.58 +                    {
    7.59 +                        omi.SetPEPProperty(MailItemExtensions.PEPProperty.Rating, this._Rating);
    7.60 +                    }
    7.61                  }
    7.62  
    7.63                  // Note: ignore return status
    7.64 @@ -1432,6 +1459,7 @@
    7.65              {
    7.66                  status = Globals.ReturnStatus.Failure;
    7.67                  Log.Error("PEPMessage.ApplyTo: Failure occured, " + ex.ToString());
    7.68 +                throw;
    7.69              }
    7.70              finally
    7.71              {
    7.72 @@ -2508,4 +2536,26 @@
    7.73              return (result);
    7.74          }
    7.75      }
    7.76 +
    7.77 +    /// <summary>
    7.78 +    /// Custom exception for when the PGP/MIME attachment exceeds the server's
    7.79 +    /// allowable limit.
    7.80 +    /// </summary>
    7.81 +    [Serializable]
    7.82 +    internal class AttachmentSizeException : Exception
    7.83 +    {
    7.84 +        public AttachmentSizeException()
    7.85 +        {
    7.86 +        }
    7.87 +
    7.88 +        public AttachmentSizeException(string message)
    7.89 +            : base(message)
    7.90 +        {
    7.91 +        }
    7.92 +
    7.93 +        public AttachmentSizeException(string message, Exception inner)
    7.94 +            : base(message, inner)
    7.95 +        {
    7.96 +        }
    7.97 +    }
    7.98  }
     8.1 --- a/Properties/AssemblyInfo.cs	Sun May 07 13:50:00 2017 +0200
     8.2 +++ b/Properties/AssemblyInfo.cs	Tue May 30 21:14:43 2017 +0200
     8.3 @@ -11,8 +11,13 @@
     8.4  // General Information about an assembly is controlled through the following 
     8.5  // set of attributes. Change these attribute values to modify the information
     8.6  // associated with an assembly.
     8.7 +#if READER_RELEASE_MODE
     8.8 +[assembly: AssemblyTitle("p≡p Reader for Outlook")]
     8.9 +[assembly: AssemblyDescription("p≡p Reader for Outlook")]
    8.10 +#else
    8.11  [assembly: AssemblyTitle("p≡p for Outlook")]
    8.12  [assembly: AssemblyDescription("p≡p for Outlook")]
    8.13 +#endif
    8.14  [assembly: AssemblyConfiguration("")]
    8.15  [assembly: AssemblyCompany("p≡p Security SA")]
    8.16  [assembly: AssemblyProduct("p≡p")]
    8.17 @@ -38,5 +43,5 @@
    8.18  // You can specify all the values or you can default the Build and Revision Numbers 
    8.19  // by using the '*' as shown below:
    8.20  // [assembly: AssemblyVersion("1.0.*")]
    8.21 -[assembly: AssemblyVersion("1.1.15.0")]
    8.22 -[assembly: AssemblyFileVersion("1.1.15.0")]
    8.23 +[assembly: AssemblyVersion("1.1.17.0")]
    8.24 +[assembly: AssemblyFileVersion("1.1.17.0")]
     9.1 --- a/Properties/Resources.Designer.cs	Sun May 07 13:50:00 2017 +0200
     9.2 +++ b/Properties/Resources.Designer.cs	Tue May 30 21:14:43 2017 +0200
     9.3 @@ -22,7 +22,7 @@
     9.4      [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
     9.5      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     9.6      [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     9.7 -    internal class Resources {
     9.8 +    public class Resources {
     9.9          
    9.10          private static global::System.Resources.ResourceManager resourceMan;
    9.11          
    9.12 @@ -36,7 +36,7 @@
    9.13          ///   Returns the cached ResourceManager instance used by this class.
    9.14          /// </summary>
    9.15          [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
    9.16 -        internal static global::System.Resources.ResourceManager ResourceManager {
    9.17 +        public static global::System.Resources.ResourceManager ResourceManager {
    9.18              get {
    9.19                  if (object.ReferenceEquals(resourceMan, null)) {
    9.20                      global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("pEp.Properties.Resources", typeof(Resources).Assembly);
    9.21 @@ -51,7 +51,7 @@
    9.22          ///   resource lookups using this strongly typed resource class.
    9.23          /// </summary>
    9.24          [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
    9.25 -        internal static global::System.Globalization.CultureInfo Culture {
    9.26 +        public static global::System.Globalization.CultureInfo Culture {
    9.27              get {
    9.28                  return resourceCulture;
    9.29              }
    9.30 @@ -63,7 +63,7 @@
    9.31          /// <summary>
    9.32          ///   Looks up a localized string similar to Don&apos;t Send.
    9.33          /// </summary>
    9.34 -        internal static string CrashReport_DoNotSendText {
    9.35 +        public static string CrashReport_DoNotSendText {
    9.36              get {
    9.37                  return ResourceManager.GetString("CrashReport_DoNotSendText", resourceCulture);
    9.38              }
    9.39 @@ -72,7 +72,7 @@
    9.40          /// <summary>
    9.41          ///   Looks up a localized string similar to An error has occurred in p≡p for Outlook and the add-in will need to be restarted. To help fix this issue, would you like to send the crash report shown below?.
    9.42          /// </summary>
    9.43 -        internal static string CrashReport_ExplanationText {
    9.44 +        public static string CrashReport_ExplanationText {
    9.45              get {
    9.46                  return ResourceManager.GetString("CrashReport_ExplanationText", resourceCulture);
    9.47              }
    9.48 @@ -81,7 +81,7 @@
    9.49          /// <summary>
    9.50          ///   Looks up a localized string similar to Crash Report.
    9.51          /// </summary>
    9.52 -        internal static string CrashReport_FormText {
    9.53 +        public static string CrashReport_FormText {
    9.54              get {
    9.55                  return ResourceManager.GetString("CrashReport_FormText", resourceCulture);
    9.56              }
    9.57 @@ -90,7 +90,7 @@
    9.58          /// <summary>
    9.59          ///   Looks up a localized string similar to The report will be sent from &lt;{0}&gt; to &lt;{1}&gt;..
    9.60          /// </summary>
    9.61 -        internal static string CrashReport_MessageRecipient1 {
    9.62 +        public static string CrashReport_MessageRecipient1 {
    9.63              get {
    9.64                  return ResourceManager.GetString("CrashReport_MessageRecipient1", resourceCulture);
    9.65              }
    9.66 @@ -99,7 +99,7 @@
    9.67          /// <summary>
    9.68          ///   Looks up a localized string similar to The report will be sent to &lt;{0}&gt;..
    9.69          /// </summary>
    9.70 -        internal static string CrashReport_MessageRecipient2 {
    9.71 +        public static string CrashReport_MessageRecipient2 {
    9.72              get {
    9.73                  return ResourceManager.GetString("CrashReport_MessageRecipient2", resourceCulture);
    9.74              }
    9.75 @@ -108,7 +108,7 @@
    9.76          /// <summary>
    9.77          ///   Looks up a localized string similar to Send.
    9.78          /// </summary>
    9.79 -        internal static string CrashReport_SendText {
    9.80 +        public static string CrashReport_SendText {
    9.81              get {
    9.82                  return ResourceManager.GetString("CrashReport_SendText", resourceCulture);
    9.83              }
    9.84 @@ -118,7 +118,7 @@
    9.85          ///   Looks up a localized string similar to {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}
    9.86          ///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f39\fbidi \fnil\fcharset0\fprq0{\*\panose 00000000000000000000}UniversLTStd;}{ [rest of string was truncated]&quot;;.
    9.87          /// </summary>
    9.88 -        internal static string Credits {
    9.89 +        public static string Credits {
    9.90              get {
    9.91                  return ResourceManager.GetString("Credits", resourceCulture);
    9.92              }
    9.93 @@ -127,7 +127,7 @@
    9.94          /// <summary>
    9.95          ///   Looks up a localized string similar to Outlook Message Format.
    9.96          /// </summary>
    9.97 -        internal static string DraftProtection_MSG_Format {
    9.98 +        public static string DraftProtection_MSG_Format {
    9.99              get {
   9.100                  return ResourceManager.GetString("DraftProtection_MSG_Format", resourceCulture);
   9.101              }
   9.102 @@ -136,7 +136,7 @@
   9.103          /// <summary>
   9.104          ///   Looks up a localized string similar to p≡p Draft Protection.
   9.105          /// </summary>
   9.106 -        internal static string DraftProtection_Title {
   9.107 +        public static string DraftProtection_Title {
   9.108              get {
   9.109                  return ResourceManager.GetString("DraftProtection_Title", resourceCulture);
   9.110              }
   9.111 @@ -145,7 +145,7 @@
   9.112          /// <summary>
   9.113          ///   Looks up a localized string similar to The default drafts folder is not safe. The default drafts folder must be either in a PST file or on a trusted server to store this draft. Do you want to store this draft as a file?.
   9.114          /// </summary>
   9.115 -        internal static string DraftProtection_Warning {
   9.116 +        public static string DraftProtection_Warning {
   9.117              get {
   9.118                  return ResourceManager.GetString("DraftProtection_Warning", resourceCulture);
   9.119              }
   9.120 @@ -154,43 +154,70 @@
   9.121          /// <summary>
   9.122          ///   Looks up a localized string similar to Cancel Handshake.
   9.123          /// </summary>
   9.124 -        internal static string Handshake_CancelText {
   9.125 +        public static string Handshake_CancelText {
   9.126              get {
   9.127                  return ResourceManager.GetString("Handshake_CancelText", resourceCulture);
   9.128              }
   9.129          }
   9.130          
   9.131          /// <summary>
   9.132 +        ///   Looks up a localized string similar to Confirm Fingerprint.
   9.133 +        /// </summary>
   9.134 +        public static string Handshake_ConfirmFingerprint {
   9.135 +            get {
   9.136 +                return ResourceManager.GetString("Handshake_ConfirmFingerprint", resourceCulture);
   9.137 +            }
   9.138 +        }
   9.139 +        
   9.140 +        /// <summary>
   9.141          ///   Looks up a localized string similar to Confirm Trustwords.
   9.142          /// </summary>
   9.143 -        internal static string Handshake_ConfirmText {
   9.144 +        public static string Handshake_ConfirmTrustwords {
   9.145              get {
   9.146 -                return ResourceManager.GetString("Handshake_ConfirmText", resourceCulture);
   9.147 +                return ResourceManager.GetString("Handshake_ConfirmTrustwords", resourceCulture);
   9.148              }
   9.149          }
   9.150          
   9.151          /// <summary>
   9.152          ///   Looks up a localized string similar to Ask your partner in person or over the phone: What are your trustwords? Then compare to the correct answer shown below..
   9.153          /// </summary>
   9.154 -        internal static string Handshake_ConfirmTrustwordsText {
   9.155 +        public static string Handshake_ConfirmTrustwordsText {
   9.156              get {
   9.157                  return ResourceManager.GetString("Handshake_ConfirmTrustwordsText", resourceCulture);
   9.158              }
   9.159          }
   9.160          
   9.161          /// <summary>
   9.162 +        ///   Looks up a localized string similar to Do not add.
   9.163 +        /// </summary>
   9.164 +        public static string Handshake_DoNotJoinDeviceGroup {
   9.165 +            get {
   9.166 +                return ResourceManager.GetString("Handshake_DoNotJoinDeviceGroup", resourceCulture);
   9.167 +            }
   9.168 +        }
   9.169 +        
   9.170 +        /// <summary>
   9.171          ///   Looks up a localized string similar to PGP Fingerprint.
   9.172          /// </summary>
   9.173 -        internal static string Handshake_FingerprintText {
   9.174 +        public static string Handshake_FingerprintText {
   9.175              get {
   9.176                  return ResourceManager.GetString("Handshake_FingerprintText", resourceCulture);
   9.177              }
   9.178          }
   9.179          
   9.180          /// <summary>
   9.181 +        ///   Looks up a localized string similar to Add device.
   9.182 +        /// </summary>
   9.183 +        public static string Handshake_JoinDeviceGroup {
   9.184 +            get {
   9.185 +                return ResourceManager.GetString("Handshake_JoinDeviceGroup", resourceCulture);
   9.186 +            }
   9.187 +        }
   9.188 +        
   9.189 +        /// <summary>
   9.190          ///   Looks up a localized string similar to Myself.
   9.191          /// </summary>
   9.192 -        internal static string Handshake_MyselfText {
   9.193 +        public static string Handshake_MyselfText {
   9.194              get {
   9.195                  return ResourceManager.GetString("Handshake_MyselfText", resourceCulture);
   9.196              }
   9.197 @@ -199,7 +226,7 @@
   9.198          /// <summary>
   9.199          ///   Looks up a localized string similar to Partner.
   9.200          /// </summary>
   9.201 -        internal static string Handshake_PartnerText {
   9.202 +        public static string Handshake_PartnerText {
   9.203              get {
   9.204                  return ResourceManager.GetString("Handshake_PartnerText", resourceCulture);
   9.205              }
   9.206 @@ -208,7 +235,7 @@
   9.207          /// <summary>
   9.208          ///   Looks up a localized string similar to Communication will be more secure by completing a handshake. A handshake is done by checking if both you and your communication partner see identical trustwords..
   9.209          /// </summary>
   9.210 -        internal static string Handshake_StandardExplanationText {
   9.211 +        public static string Handshake_StandardExplanationText {
   9.212              get {
   9.213                  return ResourceManager.GetString("Handshake_StandardExplanationText", resourceCulture);
   9.214              }
   9.215 @@ -217,16 +244,34 @@
   9.216          /// <summary>
   9.217          ///   Looks up a localized string similar to Handshake.
   9.218          /// </summary>
   9.219 -        internal static string Handshake_StandardFormText {
   9.220 +        public static string Handshake_StandardFormText {
   9.221              get {
   9.222                  return ResourceManager.GetString("Handshake_StandardFormText", resourceCulture);
   9.223              }
   9.224          }
   9.225          
   9.226          /// <summary>
   9.227 +        ///   Looks up a localized string similar to Start Trusting.
   9.228 +        /// </summary>
   9.229 +        public static string Handshake_StartTrusting {
   9.230 +            get {
   9.231 +                return ResourceManager.GetString("Handshake_StartTrusting", resourceCulture);
   9.232 +            }
   9.233 +        }
   9.234 +        
   9.235 +        /// <summary>
   9.236 +        ///   Looks up a localized string similar to Stop Trusting.
   9.237 +        /// </summary>
   9.238 +        public static string Handshake_StopTrusting {
   9.239 +            get {
   9.240 +                return ResourceManager.GetString("Handshake_StopTrusting", resourceCulture);
   9.241 +            }
   9.242 +        }
   9.243 +        
   9.244 +        /// <summary>
   9.245          ///   Looks up a localized string similar to Synchronize these accounts between my devices.
   9.246          /// </summary>
   9.247 -        internal static string Handshake_SyncAccountsText {
   9.248 +        public static string Handshake_SyncAccountsText {
   9.249              get {
   9.250                  return ResourceManager.GetString("Handshake_SyncAccountsText", resourceCulture);
   9.251              }
   9.252 @@ -235,7 +280,7 @@
   9.253          /// <summary>
   9.254          ///   Looks up a localized string similar to p≡p Device Group.
   9.255          /// </summary>
   9.256 -        internal static string Handshake_SyncFormText {
   9.257 +        public static string Handshake_SyncFormText {
   9.258              get {
   9.259                  return ResourceManager.GetString("Handshake_SyncFormText", resourceCulture);
   9.260              }
   9.261 @@ -244,7 +289,7 @@
   9.262          /// <summary>
   9.263          ///   Looks up a localized string similar to You are about to add a device to your p≡p device group. Confirm by successfully verifying the following Trustwords..
   9.264          /// </summary>
   9.265 -        internal static string Handshake_SyncTypeAExplanationText {
   9.266 +        public static string Handshake_SyncTypeAExplanationText {
   9.267              get {
   9.268                  return ResourceManager.GetString("Handshake_SyncTypeAExplanationText", resourceCulture);
   9.269              }
   9.270 @@ -253,7 +298,7 @@
   9.271          /// <summary>
   9.272          ///   Looks up a localized string similar to You are about to move a device to another p≡p device group. Confirm by successfully verifying the following Trustwords..
   9.273          /// </summary>
   9.274 -        internal static string Handshake_SyncTypeBExplanationText {
   9.275 +        public static string Handshake_SyncTypeBExplanationText {
   9.276              get {
   9.277                  return ResourceManager.GetString("Handshake_SyncTypeBExplanationText", resourceCulture);
   9.278              }
   9.279 @@ -262,16 +307,34 @@
   9.280          /// <summary>
   9.281          ///   Looks up a localized string similar to .
   9.282          /// </summary>
   9.283 -        internal static string Handshake_SyncTypeCExplanationText {
   9.284 +        public static string Handshake_SyncTypeCExplanationText {
   9.285              get {
   9.286                  return ResourceManager.GetString("Handshake_SyncTypeCExplanationText", resourceCulture);
   9.287              }
   9.288          }
   9.289          
   9.290          /// <summary>
   9.291 +        ///   Looks up a localized string similar to Show full version of Trustwords.
   9.292 +        /// </summary>
   9.293 +        public static string Handshake_TrustwordsExpanderTooltipFull {
   9.294 +            get {
   9.295 +                return ResourceManager.GetString("Handshake_TrustwordsExpanderTooltipFull", resourceCulture);
   9.296 +            }
   9.297 +        }
   9.298 +        
   9.299 +        /// <summary>
   9.300 +        ///   Looks up a localized string similar to Show short version of Trustwords.
   9.301 +        /// </summary>
   9.302 +        public static string Handshake_TrustwordsExpanderTooltipShort {
   9.303 +            get {
   9.304 +                return ResourceManager.GetString("Handshake_TrustwordsExpanderTooltipShort", resourceCulture);
   9.305 +            }
   9.306 +        }
   9.307 +        
   9.308 +        /// <summary>
   9.309          ///   Looks up a localized string similar to Full.
   9.310          /// </summary>
   9.311 -        internal static string Handshake_TrustwordsFullText {
   9.312 +        public static string Handshake_TrustwordsFullText {
   9.313              get {
   9.314                  return ResourceManager.GetString("Handshake_TrustwordsFullText", resourceCulture);
   9.315              }
   9.316 @@ -280,7 +343,7 @@
   9.317          /// <summary>
   9.318          ///   Looks up a localized string similar to Short.
   9.319          /// </summary>
   9.320 -        internal static string Handshake_TrustwordsShortText {
   9.321 +        public static string Handshake_TrustwordsShortText {
   9.322              get {
   9.323                  return ResourceManager.GetString("Handshake_TrustwordsShortText", resourceCulture);
   9.324              }
   9.325 @@ -289,25 +352,34 @@
   9.326          /// <summary>
   9.327          ///   Looks up a localized string similar to Trustwords.
   9.328          /// </summary>
   9.329 -        internal static string Handshake_TrustwordsText {
   9.330 +        public static string Handshake_TrustwordsText {
   9.331              get {
   9.332                  return ResourceManager.GetString("Handshake_TrustwordsText", resourceCulture);
   9.333              }
   9.334          }
   9.335          
   9.336          /// <summary>
   9.337 +        ///   Looks up a localized string similar to Wrong Fingerprint.
   9.338 +        /// </summary>
   9.339 +        public static string Handshake_WrongFingerprint {
   9.340 +            get {
   9.341 +                return ResourceManager.GetString("Handshake_WrongFingerprint", resourceCulture);
   9.342 +            }
   9.343 +        }
   9.344 +        
   9.345 +        /// <summary>
   9.346          ///   Looks up a localized string similar to Wrong Trustwords.
   9.347          /// </summary>
   9.348 -        internal static string Handshake_WrongText {
   9.349 +        public static string Handshake_WrongTrustwords {
   9.350              get {
   9.351 -                return ResourceManager.GetString("Handshake_WrongText", resourceCulture);
   9.352 +                return ResourceManager.GetString("Handshake_WrongTrustwords", resourceCulture);
   9.353              }
   9.354          }
   9.355          
   9.356          /// <summary>
   9.357          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.358          /// </summary>
   9.359 -        internal static System.Drawing.Bitmap ImageAttachOwnKeyOff {
   9.360 +        public static System.Drawing.Bitmap ImageAttachOwnKeyOff {
   9.361              get {
   9.362                  object obj = ResourceManager.GetObject("ImageAttachOwnKeyOff", resourceCulture);
   9.363                  return ((System.Drawing.Bitmap)(obj));
   9.364 @@ -317,7 +389,7 @@
   9.365          /// <summary>
   9.366          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.367          /// </summary>
   9.368 -        internal static System.Drawing.Bitmap ImageAttachOwnKeyOn {
   9.369 +        public static System.Drawing.Bitmap ImageAttachOwnKeyOn {
   9.370              get {
   9.371                  object obj = ResourceManager.GetObject("ImageAttachOwnKeyOn", resourceCulture);
   9.372                  return ((System.Drawing.Bitmap)(obj));
   9.373 @@ -327,7 +399,7 @@
   9.374          /// <summary>
   9.375          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.376          /// </summary>
   9.377 -        internal static System.Drawing.Bitmap ImageBackstageAccounts {
   9.378 +        public static System.Drawing.Bitmap ImageBackstageAccounts {
   9.379              get {
   9.380                  object obj = ResourceManager.GetObject("ImageBackstageAccounts", resourceCulture);
   9.381                  return ((System.Drawing.Bitmap)(obj));
   9.382 @@ -337,7 +409,7 @@
   9.383          /// <summary>
   9.384          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.385          /// </summary>
   9.386 -        internal static System.Drawing.Bitmap ImageBackstageCompatibility {
   9.387 +        public static System.Drawing.Bitmap ImageBackstageCompatibility {
   9.388              get {
   9.389                  object obj = ResourceManager.GetObject("ImageBackstageCompatibility", resourceCulture);
   9.390                  return ((System.Drawing.Bitmap)(obj));
   9.391 @@ -347,7 +419,7 @@
   9.392          /// <summary>
   9.393          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.394          /// </summary>
   9.395 -        internal static System.Drawing.Bitmap ImageForceUnencOff {
   9.396 +        public static System.Drawing.Bitmap ImageForceUnencOff {
   9.397              get {
   9.398                  object obj = ResourceManager.GetObject("ImageForceUnencOff", resourceCulture);
   9.399                  return ((System.Drawing.Bitmap)(obj));
   9.400 @@ -357,7 +429,7 @@
   9.401          /// <summary>
   9.402          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.403          /// </summary>
   9.404 -        internal static System.Drawing.Bitmap ImageForceUnencOn {
   9.405 +        public static System.Drawing.Bitmap ImageForceUnencOn {
   9.406              get {
   9.407                  object obj = ResourceManager.GetObject("ImageForceUnencOn", resourceCulture);
   9.408                  return ((System.Drawing.Bitmap)(obj));
   9.409 @@ -367,7 +439,7 @@
   9.410          /// <summary>
   9.411          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.412          /// </summary>
   9.413 -        internal static System.Drawing.Bitmap ImageLogoLarge {
   9.414 +        public static System.Drawing.Bitmap ImageLogoLarge {
   9.415              get {
   9.416                  object obj = ResourceManager.GetObject("ImageLogoLarge", resourceCulture);
   9.417                  return ((System.Drawing.Bitmap)(obj));
   9.418 @@ -377,7 +449,7 @@
   9.419          /// <summary>
   9.420          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.421          /// </summary>
   9.422 -        internal static System.Drawing.Bitmap ImageLogoMedium {
   9.423 +        public static System.Drawing.Bitmap ImageLogoMedium {
   9.424              get {
   9.425                  object obj = ResourceManager.GetObject("ImageLogoMedium", resourceCulture);
   9.426                  return ((System.Drawing.Bitmap)(obj));
   9.427 @@ -387,7 +459,7 @@
   9.428          /// <summary>
   9.429          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.430          /// </summary>
   9.431 -        internal static System.Drawing.Bitmap ImageLogoSmall {
   9.432 +        public static System.Drawing.Bitmap ImageLogoSmall {
   9.433              get {
   9.434                  object obj = ResourceManager.GetObject("ImageLogoSmall", resourceCulture);
   9.435                  return ((System.Drawing.Bitmap)(obj));
   9.436 @@ -397,7 +469,7 @@
   9.437          /// <summary>
   9.438          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.439          /// </summary>
   9.440 -        internal static System.Drawing.Bitmap ImageNeverUnsecureOff {
   9.441 +        public static System.Drawing.Bitmap ImageNeverUnsecureOff {
   9.442              get {
   9.443                  object obj = ResourceManager.GetObject("ImageNeverUnsecureOff", resourceCulture);
   9.444                  return ((System.Drawing.Bitmap)(obj));
   9.445 @@ -407,7 +479,7 @@
   9.446          /// <summary>
   9.447          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.448          /// </summary>
   9.449 -        internal static System.Drawing.Bitmap ImageNeverUnsecureOn {
   9.450 +        public static System.Drawing.Bitmap ImageNeverUnsecureOn {
   9.451              get {
   9.452                  object obj = ResourceManager.GetObject("ImageNeverUnsecureOn", resourceCulture);
   9.453                  return ((System.Drawing.Bitmap)(obj));
   9.454 @@ -417,7 +489,7 @@
   9.455          /// <summary>
   9.456          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.457          /// </summary>
   9.458 -        internal static System.Drawing.Bitmap ImageOptionsAbout {
   9.459 +        public static System.Drawing.Bitmap ImageOptionsAbout {
   9.460              get {
   9.461                  object obj = ResourceManager.GetObject("ImageOptionsAbout", resourceCulture);
   9.462                  return ((System.Drawing.Bitmap)(obj));
   9.463 @@ -427,7 +499,7 @@
   9.464          /// <summary>
   9.465          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.466          /// </summary>
   9.467 -        internal static System.Drawing.Bitmap ImageOptionsAccounts {
   9.468 +        public static System.Drawing.Bitmap ImageOptionsAccounts {
   9.469              get {
   9.470                  object obj = ResourceManager.GetObject("ImageOptionsAccounts", resourceCulture);
   9.471                  return ((System.Drawing.Bitmap)(obj));
   9.472 @@ -437,7 +509,7 @@
   9.473          /// <summary>
   9.474          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.475          /// </summary>
   9.476 -        internal static System.Drawing.Bitmap ImageOptionsCompatibility {
   9.477 +        public static System.Drawing.Bitmap ImageOptionsCompatibility {
   9.478              get {
   9.479                  object obj = ResourceManager.GetObject("ImageOptionsCompatibility", resourceCulture);
   9.480                  return ((System.Drawing.Bitmap)(obj));
   9.481 @@ -447,7 +519,7 @@
   9.482          /// <summary>
   9.483          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.484          /// </summary>
   9.485 -        internal static System.Drawing.Bitmap ImageOptionsCredits {
   9.486 +        public static System.Drawing.Bitmap ImageOptionsCredits {
   9.487              get {
   9.488                  object obj = ResourceManager.GetObject("ImageOptionsCredits", resourceCulture);
   9.489                  return ((System.Drawing.Bitmap)(obj));
   9.490 @@ -457,7 +529,7 @@
   9.491          /// <summary>
   9.492          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.493          /// </summary>
   9.494 -        internal static System.Drawing.Bitmap ImageOptionsDeveloper {
   9.495 +        public static System.Drawing.Bitmap ImageOptionsDeveloper {
   9.496              get {
   9.497                  object obj = ResourceManager.GetObject("ImageOptionsDeveloper", resourceCulture);
   9.498                  return ((System.Drawing.Bitmap)(obj));
   9.499 @@ -467,7 +539,7 @@
   9.500          /// <summary>
   9.501          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.502          /// </summary>
   9.503 -        internal static System.Drawing.Bitmap ImagePreviewContact {
   9.504 +        public static System.Drawing.Bitmap ImagePreviewContact {
   9.505              get {
   9.506                  object obj = ResourceManager.GetObject("ImagePreviewContact", resourceCulture);
   9.507                  return ((System.Drawing.Bitmap)(obj));
   9.508 @@ -477,7 +549,7 @@
   9.509          /// <summary>
   9.510          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.511          /// </summary>
   9.512 -        internal static System.Drawing.Bitmap ImagePreviewForward {
   9.513 +        public static System.Drawing.Bitmap ImagePreviewForward {
   9.514              get {
   9.515                  object obj = ResourceManager.GetObject("ImagePreviewForward", resourceCulture);
   9.516                  return ((System.Drawing.Bitmap)(obj));
   9.517 @@ -487,7 +559,7 @@
   9.518          /// <summary>
   9.519          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.520          /// </summary>
   9.521 -        internal static System.Drawing.Bitmap ImagePreviewReply {
   9.522 +        public static System.Drawing.Bitmap ImagePreviewReply {
   9.523              get {
   9.524                  object obj = ResourceManager.GetObject("ImagePreviewReply", resourceCulture);
   9.525                  return ((System.Drawing.Bitmap)(obj));
   9.526 @@ -497,7 +569,7 @@
   9.527          /// <summary>
   9.528          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.529          /// </summary>
   9.530 -        internal static System.Drawing.Bitmap ImagePreviewReplyAll {
   9.531 +        public static System.Drawing.Bitmap ImagePreviewReplyAll {
   9.532              get {
   9.533                  object obj = ResourceManager.GetObject("ImagePreviewReplyAll", resourceCulture);
   9.534                  return ((System.Drawing.Bitmap)(obj));
   9.535 @@ -507,7 +579,7 @@
   9.536          /// <summary>
   9.537          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.538          /// </summary>
   9.539 -        internal static System.Drawing.Bitmap ImagePrivacyStatusGreen {
   9.540 +        public static System.Drawing.Bitmap ImagePrivacyStatusGreen {
   9.541              get {
   9.542                  object obj = ResourceManager.GetObject("ImagePrivacyStatusGreen", resourceCulture);
   9.543                  return ((System.Drawing.Bitmap)(obj));
   9.544 @@ -517,7 +589,7 @@
   9.545          /// <summary>
   9.546          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.547          /// </summary>
   9.548 -        internal static System.Drawing.Bitmap ImagePrivacyStatusNoColor {
   9.549 +        public static System.Drawing.Bitmap ImagePrivacyStatusNoColor {
   9.550              get {
   9.551                  object obj = ResourceManager.GetObject("ImagePrivacyStatusNoColor", resourceCulture);
   9.552                  return ((System.Drawing.Bitmap)(obj));
   9.553 @@ -527,7 +599,7 @@
   9.554          /// <summary>
   9.555          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.556          /// </summary>
   9.557 -        internal static System.Drawing.Bitmap ImagePrivacyStatusRed {
   9.558 +        public static System.Drawing.Bitmap ImagePrivacyStatusRed {
   9.559              get {
   9.560                  object obj = ResourceManager.GetObject("ImagePrivacyStatusRed", resourceCulture);
   9.561                  return ((System.Drawing.Bitmap)(obj));
   9.562 @@ -537,7 +609,7 @@
   9.563          /// <summary>
   9.564          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.565          /// </summary>
   9.566 -        internal static System.Drawing.Bitmap ImagePrivacyStatusYellow {
   9.567 +        public static System.Drawing.Bitmap ImagePrivacyStatusYellow {
   9.568              get {
   9.569                  object obj = ResourceManager.GetObject("ImagePrivacyStatusYellow", resourceCulture);
   9.570                  return ((System.Drawing.Bitmap)(obj));
   9.571 @@ -547,7 +619,7 @@
   9.572          /// <summary>
   9.573          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.574          /// </summary>
   9.575 -        internal static System.Drawing.Bitmap ImageReaderSplash {
   9.576 +        public static System.Drawing.Bitmap ImageReaderSplash {
   9.577              get {
   9.578                  object obj = ResourceManager.GetObject("ImageReaderSplash", resourceCulture);
   9.579                  return ((System.Drawing.Bitmap)(obj));
   9.580 @@ -557,7 +629,7 @@
   9.581          /// <summary>
   9.582          ///   Looks up a localized resource of type System.Drawing.Bitmap.
   9.583          /// </summary>
   9.584 -        internal static System.Drawing.Bitmap ImageUpgradePEP {
   9.585 +        public static System.Drawing.Bitmap ImageUpgradePEP {
   9.586              get {
   9.587                  object obj = ResourceManager.GetObject("ImageUpgradePEP", resourceCulture);
   9.588                  return ((System.Drawing.Bitmap)(obj));
   9.589 @@ -567,7 +639,7 @@
   9.590          /// <summary>
   9.591          ///   Looks up a localized string similar to Catalan.
   9.592          /// </summary>
   9.593 -        internal static string Language_Catalan {
   9.594 +        public static string Language_Catalan {
   9.595              get {
   9.596                  return ResourceManager.GetString("Language_Catalan", resourceCulture);
   9.597              }
   9.598 @@ -576,7 +648,7 @@
   9.599          /// <summary>
   9.600          ///   Looks up a localized string similar to Dutch.
   9.601          /// </summary>
   9.602 -        internal static string Language_Dutch {
   9.603 +        public static string Language_Dutch {
   9.604              get {
   9.605                  return ResourceManager.GetString("Language_Dutch", resourceCulture);
   9.606              }
   9.607 @@ -585,7 +657,7 @@
   9.608          /// <summary>
   9.609          ///   Looks up a localized string similar to English.
   9.610          /// </summary>
   9.611 -        internal static string Language_English {
   9.612 +        public static string Language_English {
   9.613              get {
   9.614                  return ResourceManager.GetString("Language_English", resourceCulture);
   9.615              }
   9.616 @@ -594,7 +666,7 @@
   9.617          /// <summary>
   9.618          ///   Looks up a localized string similar to French.
   9.619          /// </summary>
   9.620 -        internal static string Language_French {
   9.621 +        public static string Language_French {
   9.622              get {
   9.623                  return ResourceManager.GetString("Language_French", resourceCulture);
   9.624              }
   9.625 @@ -603,7 +675,7 @@
   9.626          /// <summary>
   9.627          ///   Looks up a localized string similar to German.
   9.628          /// </summary>
   9.629 -        internal static string Language_German {
   9.630 +        public static string Language_German {
   9.631              get {
   9.632                  return ResourceManager.GetString("Language_German", resourceCulture);
   9.633              }
   9.634 @@ -612,7 +684,7 @@
   9.635          /// <summary>
   9.636          ///   Looks up a localized string similar to Hindi.
   9.637          /// </summary>
   9.638 -        internal static string Language_Hindi {
   9.639 +        public static string Language_Hindi {
   9.640              get {
   9.641                  return ResourceManager.GetString("Language_Hindi", resourceCulture);
   9.642              }
   9.643 @@ -621,7 +693,7 @@
   9.644          /// <summary>
   9.645          ///   Looks up a localized string similar to Italian.
   9.646          /// </summary>
   9.647 -        internal static string Language_Italian {
   9.648 +        public static string Language_Italian {
   9.649              get {
   9.650                  return ResourceManager.GetString("Language_Italian", resourceCulture);
   9.651              }
   9.652 @@ -630,7 +702,7 @@
   9.653          /// <summary>
   9.654          ///   Looks up a localized string similar to Mandarin.
   9.655          /// </summary>
   9.656 -        internal static string Language_Mandarin {
   9.657 +        public static string Language_Mandarin {
   9.658              get {
   9.659                  return ResourceManager.GetString("Language_Mandarin", resourceCulture);
   9.660              }
   9.661 @@ -639,7 +711,7 @@
   9.662          /// <summary>
   9.663          ///   Looks up a localized string similar to Marathi.
   9.664          /// </summary>
   9.665 -        internal static string Language_Marathi {
   9.666 +        public static string Language_Marathi {
   9.667              get {
   9.668                  return ResourceManager.GetString("Language_Marathi", resourceCulture);
   9.669              }
   9.670 @@ -648,7 +720,7 @@
   9.671          /// <summary>
   9.672          ///   Looks up a localized string similar to Spanish.
   9.673          /// </summary>
   9.674 -        internal static string Language_Spanish {
   9.675 +        public static string Language_Spanish {
   9.676              get {
   9.677                  return ResourceManager.GetString("Language_Spanish", resourceCulture);
   9.678              }
   9.679 @@ -657,7 +729,7 @@
   9.680          /// <summary>
   9.681          ///   Looks up a localized string similar to Turkish.
   9.682          /// </summary>
   9.683 -        internal static string Language_Turkish {
   9.684 +        public static string Language_Turkish {
   9.685              get {
   9.686                  return ResourceManager.GetString("Language_Turkish", resourceCulture);
   9.687              }
   9.688 @@ -666,7 +738,7 @@
   9.689          /// <summary>
   9.690          ///   Looks up a localized string similar to Close.
   9.691          /// </summary>
   9.692 -        internal static string ManagePrivacyStatus_CloseText {
   9.693 +        public static string ManagePrivacyStatus_CloseText {
   9.694              get {
   9.695                  return ResourceManager.GetString("ManagePrivacyStatus_CloseText", resourceCulture);
   9.696              }
   9.697 @@ -675,7 +747,7 @@
   9.698          /// <summary>
   9.699          ///   Looks up a localized string similar to Explanation.
   9.700          /// </summary>
   9.701 -        internal static string ManagePrivacyStatus_ExplanationTitle {
   9.702 +        public static string ManagePrivacyStatus_ExplanationTitle {
   9.703              get {
   9.704                  return ResourceManager.GetString("ManagePrivacyStatus_ExplanationTitle", resourceCulture);
   9.705              }
   9.706 @@ -684,7 +756,7 @@
   9.707          /// <summary>
   9.708          ///   Looks up a localized string similar to Privacy Status.
   9.709          /// </summary>
   9.710 -        internal static string ManagePrivacyStatus_FormText {
   9.711 +        public static string ManagePrivacyStatus_FormText {
   9.712              get {
   9.713                  return ResourceManager.GetString("ManagePrivacyStatus_FormText", resourceCulture);
   9.714              }
   9.715 @@ -693,7 +765,7 @@
   9.716          /// <summary>
   9.717          ///   Looks up a localized string similar to Incoming message.
   9.718          /// </summary>
   9.719 -        internal static string ManagePrivacyStatus_IncomingMessage {
   9.720 +        public static string ManagePrivacyStatus_IncomingMessage {
   9.721              get {
   9.722                  return ResourceManager.GetString("ManagePrivacyStatus_IncomingMessage", resourceCulture);
   9.723              }
   9.724 @@ -702,7 +774,7 @@
   9.725          /// <summary>
   9.726          ///   Looks up a localized string similar to Outgoing message.
   9.727          /// </summary>
   9.728 -        internal static string ManagePrivacyStatus_OutgoingMessage {
   9.729 +        public static string ManagePrivacyStatus_OutgoingMessage {
   9.730              get {
   9.731                  return ResourceManager.GetString("ManagePrivacyStatus_OutgoingMessage", resourceCulture);
   9.732              }
   9.733 @@ -711,7 +783,7 @@
   9.734          /// <summary>
   9.735          ///   Looks up a localized string similar to p≡p Suggestion.
   9.736          /// </summary>
   9.737 -        internal static string ManagePrivacyStatus_SuggestionTitle {
   9.738 +        public static string ManagePrivacyStatus_SuggestionTitle {
   9.739              get {
   9.740                  return ResourceManager.GetString("ManagePrivacyStatus_SuggestionTitle", resourceCulture);
   9.741              }
   9.742 @@ -720,7 +792,7 @@
   9.743          /// <summary>
   9.744          ///   Looks up a localized string similar to Upgrade p≡p to send secure messages.
   9.745          /// </summary>
   9.746 -        internal static string ManagePrivacyStatus_UpgradeText {
   9.747 +        public static string ManagePrivacyStatus_UpgradeText {
   9.748              get {
   9.749                  return ResourceManager.GetString("ManagePrivacyStatus_UpgradeText", resourceCulture);
   9.750              }
   9.751 @@ -729,7 +801,7 @@
   9.752          /// <summary>
   9.753          ///   Looks up a localized string similar to An internet or mail server connection is required to view this message..
   9.754          /// </summary>
   9.755 -        internal static string Message_DecryptionNoConnection {
   9.756 +        public static string Message_DecryptionNoConnection {
   9.757              get {
   9.758                  return ResourceManager.GetString("Message_DecryptionNoConnection", resourceCulture);
   9.759              }
   9.760 @@ -738,7 +810,7 @@
   9.761          /// <summary>
   9.762          ///   Looks up a localized string similar to Cannot initialize p≡p engine:.
   9.763          /// </summary>
   9.764 -        internal static string Message_InitError {
   9.765 +        public static string Message_InitError {
   9.766              get {
   9.767                  return ResourceManager.GetString("Message_InitError", resourceCulture);
   9.768              }
   9.769 @@ -747,7 +819,7 @@
   9.770          /// <summary>
   9.771          ///   Looks up a localized string similar to Changing this value will require you to reopen the message. Are you sure you want to continue?.
   9.772          /// </summary>
   9.773 -        internal static string Message_NeedReopen {
   9.774 +        public static string Message_NeedReopen {
   9.775              get {
   9.776                  return ResourceManager.GetString("Message_NeedReopen", resourceCulture);
   9.777              }
   9.778 @@ -756,7 +828,7 @@
   9.779          /// <summary>
   9.780          ///   Looks up a localized string similar to Cannot open this message..
   9.781          /// </summary>
   9.782 -        internal static string Message_OpenError {
   9.783 +        public static string Message_OpenError {
   9.784              get {
   9.785                  return ResourceManager.GetString("Message_OpenError", resourceCulture);
   9.786              }
   9.787 @@ -765,7 +837,7 @@
   9.788          /// <summary>
   9.789          ///   Looks up a localized string similar to Opening....
   9.790          /// </summary>
   9.791 -        internal static string Message_Opening {
   9.792 +        public static string Message_Opening {
   9.793              get {
   9.794                  return ResourceManager.GetString("Message_Opening", resourceCulture);
   9.795              }
   9.796 @@ -774,25 +846,34 @@
   9.797          /// <summary>
   9.798          ///   Looks up a localized string similar to It will not be possible to send or receive secured messages. p≡p needs to be reinstalled..
   9.799          /// </summary>
   9.800 -        internal static string Message_Reinstall {
   9.801 +        public static string Message_Reinstall {
   9.802              get {
   9.803                  return ResourceManager.GetString("Message_Reinstall", resourceCulture);
   9.804              }
   9.805          }
   9.806          
   9.807          /// <summary>
   9.808 -        ///   Looks up a localized string similar to An unexpected error occurred during send and the message may not have been secure..
   9.809 +        ///   Looks up a localized string similar to An unexpected error occurred during send and the message may not be secure..
   9.810          /// </summary>
   9.811 -        internal static string Message_SendError {
   9.812 +        public static string Message_SendError {
   9.813              get {
   9.814                  return ResourceManager.GetString("Message_SendError", resourceCulture);
   9.815              }
   9.816          }
   9.817          
   9.818          /// <summary>
   9.819 +        ///   Looks up a localized string similar to The mail size exceeds the allowable limit for encryption..
   9.820 +        /// </summary>
   9.821 +        public static string Message_SendErrorAttachmentSize {
   9.822 +            get {
   9.823 +                return ResourceManager.GetString("Message_SendErrorAttachmentSize", resourceCulture);
   9.824 +            }
   9.825 +        }
   9.826 +        
   9.827 +        /// <summary>
   9.828          ///   Looks up a localized string similar to An internet or mail server connection is required to securely send this message. It&apos;s recommended to save this message as a draft until a connection is re-established..
   9.829          /// </summary>
   9.830 -        internal static string Message_SendingNoConnection {
   9.831 +        public static string Message_SendingNoConnection {
   9.832              get {
   9.833                  return ResourceManager.GetString("Message_SendingNoConnection", resourceCulture);
   9.834              }
   9.835 @@ -801,7 +882,7 @@
   9.836          /// <summary>
   9.837          ///   Looks up a localized string similar to Would you like to send the message as unsecure?.
   9.838          /// </summary>
   9.839 -        internal static string Message_SendUnencryptedConfirmation {
   9.840 +        public static string Message_SendUnencryptedConfirmation {
   9.841              get {
   9.842                  return ResourceManager.GetString("Message_SendUnencryptedConfirmation", resourceCulture);
   9.843              }
   9.844 @@ -810,7 +891,7 @@
   9.845          /// <summary>
   9.846          ///   Looks up a localized string similar to Confirm Operation.
   9.847          /// </summary>
   9.848 -        internal static string Message_TitleConfirmOperation {
   9.849 +        public static string Message_TitleConfirmOperation {
   9.850              get {
   9.851                  return ResourceManager.GetString("Message_TitleConfirmOperation", resourceCulture);
   9.852              }
   9.853 @@ -819,7 +900,7 @@
   9.854          /// <summary>
   9.855          ///   Looks up a localized string similar to p≡p Error.
   9.856          /// </summary>
   9.857 -        internal static string Message_TitlePEPError {
   9.858 +        public static string Message_TitlePEPError {
   9.859              get {
   9.860                  return ResourceManager.GetString("Message_TitlePEPError", resourceCulture);
   9.861              }
   9.862 @@ -828,7 +909,7 @@
   9.863          /// <summary>
   9.864          ///   Looks up a localized string similar to Trustwords:.
   9.865          /// </summary>
   9.866 -        internal static string Message_Trustwords {
   9.867 +        public static string Message_Trustwords {
   9.868              get {
   9.869                  return ResourceManager.GetString("Message_Trustwords", resourceCulture);
   9.870              }
   9.871 @@ -837,7 +918,7 @@
   9.872          /// <summary>
   9.873          ///   Looks up a localized string similar to Warning: If you choose to disable automatic updates, important security fixes can be missed. Are you sure you want to disable automatic updates?.
   9.874          /// </summary>
   9.875 -        internal static string Message_WarningAutoUpdateOff {
   9.876 +        public static string Message_WarningAutoUpdateOff {
   9.877              get {
   9.878                  return ResourceManager.GetString("Message_WarningAutoUpdateOff", resourceCulture);
   9.879              }
   9.880 @@ -846,7 +927,7 @@
   9.881          /// <summary>
   9.882          ///   Looks up a localized string similar to Warning: This communication partner was previously marked as mistrusted. Are you sure you want to continue with another handshake?.
   9.883          /// </summary>
   9.884 -        internal static string Message_WarningMistrustedKey {
   9.885 +        public static string Message_WarningMistrustedKey {
   9.886              get {
   9.887                  return ResourceManager.GetString("Message_WarningMistrustedKey", resourceCulture);
   9.888              }
   9.889 @@ -855,7 +936,7 @@
   9.890          /// <summary>
   9.891          ///   Looks up a localized string similar to You&apos;re about to forward a secure message as unsecure. If you choose to proceed, confidential information might be leaked putting you and your communication partners at risk. Are you sure you want to continue?.
   9.892          /// </summary>
   9.893 -        internal static string Message_WarningSecurityLoss {
   9.894 +        public static string Message_WarningSecurityLoss {
   9.895              get {
   9.896                  return ResourceManager.GetString("Message_WarningSecurityLoss", resourceCulture);
   9.897              }
   9.898 @@ -864,7 +945,7 @@
   9.899          /// <summary>
   9.900          ///   Looks up a localized string similar to Do you want to activate p≡p sync for the account {0}?.
   9.901          /// </summary>
   9.902 -        internal static string NewAccount_SyncAccountMessage {
   9.903 +        public static string NewAccount_SyncAccountMessage {
   9.904              get {
   9.905                  return ResourceManager.GetString("NewAccount_SyncAccountMessage", resourceCulture);
   9.906              }
   9.907 @@ -873,7 +954,7 @@
   9.908          /// <summary>
   9.909          ///   Looks up a localized string similar to Activate p≡p sync for new account?.
   9.910          /// </summary>
   9.911 -        internal static string NewAccount_SyncAccountTitle {
   9.912 +        public static string NewAccount_SyncAccountTitle {
   9.913              get {
   9.914                  return ResourceManager.GetString("NewAccount_SyncAccountTitle", resourceCulture);
   9.915              }
   9.916 @@ -882,7 +963,7 @@
   9.917          /// <summary>
   9.918          ///   Looks up a localized string similar to Enable p≡p privacy protection.
   9.919          /// </summary>
   9.920 -        internal static string Options_AccountIsPEPEnabledText {
   9.921 +        public static string Options_AccountIsPEPEnabledText {
   9.922              get {
   9.923                  return ResourceManager.GetString("Options_AccountIsPEPEnabledText", resourceCulture);
   9.924              }
   9.925 @@ -891,7 +972,7 @@
   9.926          /// <summary>
   9.927          ///   Looks up a localized string similar to Store messages securely.
   9.928          /// </summary>
   9.929 -        internal static string Options_AccountIsSecureStorageEnabledText {
   9.930 +        public static string Options_AccountIsSecureStorageEnabledText {
   9.931              get {
   9.932                  return ResourceManager.GetString("Options_AccountIsSecureStorageEnabledText", resourceCulture);
   9.933              }
   9.934 @@ -900,7 +981,7 @@
   9.935          /// <summary>
   9.936          ///   Looks up a localized string similar to Synchronize between my devices.
   9.937          /// </summary>
   9.938 -        internal static string Options_AccountIsSyncEnabledText {
   9.939 +        public static string Options_AccountIsSyncEnabledText {
   9.940              get {
   9.941                  return ResourceManager.GetString("Options_AccountIsSyncEnabledText", resourceCulture);
   9.942              }
   9.943 @@ -909,7 +990,7 @@
   9.944          /// <summary>
   9.945          ///   Looks up a localized string similar to Warning: Automatic updates are turned off. Switch on for important security and feature updates..
   9.946          /// </summary>
   9.947 -        internal static string Options_AutoUpdateOffWarningText {
   9.948 +        public static string Options_AutoUpdateOffWarningText {
   9.949              get {
   9.950                  return ResourceManager.GetString("Options_AutoUpdateOffWarningText", resourceCulture);
   9.951              }
   9.952 @@ -918,7 +999,7 @@
   9.953          /// <summary>
   9.954          ///   Looks up a localized string similar to Enter a fingerprint to search or add.
   9.955          /// </summary>
   9.956 -        internal static string Options_BlacklistEnteredFingerprintText {
   9.957 +        public static string Options_BlacklistEnteredFingerprintText {
   9.958              get {
   9.959                  return ResourceManager.GetString("Options_BlacklistEnteredFingerprintText", resourceCulture);
   9.960              }
   9.961 @@ -927,7 +1008,7 @@
   9.962          /// <summary>
   9.963          ///   Looks up a localized string similar to No matches found.
   9.964          /// </summary>
   9.965 -        internal static string Options_BlacklistSearchNoResultsText {
   9.966 +        public static string Options_BlacklistSearchNoResultsText {
   9.967              get {
   9.968                  return ResourceManager.GetString("Options_BlacklistSearchNoResultsText", resourceCulture);
   9.969              }
   9.970 @@ -936,7 +1017,7 @@
   9.971          /// <summary>
   9.972          ///   Looks up a localized string similar to Cancel.
   9.973          /// </summary>
   9.974 -        internal static string Options_CancelText {
   9.975 +        public static string Options_CancelText {
   9.976              get {
   9.977                  return ResourceManager.GetString("Options_CancelText", resourceCulture);
   9.978              }
   9.979 @@ -945,7 +1026,7 @@
   9.980          /// <summary>
   9.981          ///   Looks up a localized string similar to Store messages securely for these accounts:.
   9.982          /// </summary>
   9.983 -        internal static string Options_EncryptedAccountsText {
   9.984 +        public static string Options_EncryptedAccountsText {
   9.985              get {
   9.986                  return ResourceManager.GetString("Options_EncryptedAccountsText", resourceCulture);
   9.987              }
   9.988 @@ -954,7 +1035,7 @@
   9.989          /// <summary>
   9.990          ///   Looks up a localized string similar to p≡p Options.
   9.991          /// </summary>
   9.992 -        internal static string Options_FormText {
   9.993 +        public static string Options_FormText {
   9.994              get {
   9.995                  return ResourceManager.GetString("Options_FormText", resourceCulture);
   9.996              }
   9.997 @@ -963,7 +1044,7 @@
   9.998          /// <summary>
   9.999          ///   Looks up a localized string similar to Advanced.
  9.1000          /// </summary>
  9.1001 -        internal static string Options_IsAdvancedEnabledText {
  9.1002 +        public static string Options_IsAdvancedEnabledText {
  9.1003              get {
  9.1004                  return ResourceManager.GetString("Options_IsAdvancedEnabledText", resourceCulture);
  9.1005              }
  9.1006 @@ -972,7 +1053,7 @@
  9.1007          /// <summary>
  9.1008          ///   Looks up a localized string similar to Automatically download and install updates.
  9.1009          /// </summary>
  9.1010 -        internal static string Options_IsAutoUpdateEnabledText {
  9.1011 +        public static string Options_IsAutoUpdateEnabledText {
  9.1012              get {
  9.1013                  return ResourceManager.GetString("Options_IsAutoUpdateEnabledText", resourceCulture);
  9.1014              }
  9.1015 @@ -981,7 +1062,7 @@
  9.1016          /// <summary>
  9.1017          ///   Looks up a localized string similar to Store messages securely for all accounts.
  9.1018          /// </summary>
  9.1019 -        internal static string Options_IsEncryptAllAccountsEnabledText {
  9.1020 +        public static string Options_IsEncryptAllAccountsEnabledText {
  9.1021              get {
  9.1022                  return ResourceManager.GetString("Options_IsEncryptAllAccountsEnabledText", resourceCulture);
  9.1023              }
  9.1024 @@ -990,7 +1071,7 @@
  9.1025          /// <summary>
  9.1026          ///   Looks up a localized string similar to Look up keys on key server.
  9.1027          /// </summary>
  9.1028 -        internal static string Options_IsKeyServerUsedText {
  9.1029 +        public static string Options_IsKeyServerUsedText {
  9.1030              get {
  9.1031                  return ResourceManager.GetString("Options_IsKeyServerUsedText", resourceCulture);
  9.1032              }
  9.1033 @@ -999,7 +1080,7 @@
  9.1034          /// <summary>
  9.1035          ///   Looks up a localized string similar to Show store protected option.
  9.1036          /// </summary>
  9.1037 -        internal static string Options_IsNeverUnsecureOptionVisibleText {
  9.1038 +        public static string Options_IsNeverUnsecureOptionVisibleText {
  9.1039              get {
  9.1040                  return ResourceManager.GetString("Options_IsNeverUnsecureOptionVisibleText", resourceCulture);
  9.1041              }
  9.1042 @@ -1008,7 +1089,7 @@
  9.1043          /// <summary>
  9.1044          ///   Looks up a localized string similar to Show &apos;pEp&apos; data store in navigation pane.
  9.1045          /// </summary>
  9.1046 -        internal static string Options_IsPEPFolderVisibleText {
  9.1047 +        public static string Options_IsPEPFolderVisibleText {
  9.1048              get {
  9.1049                  return ResourceManager.GetString("Options_IsPEPFolderVisibleText", resourceCulture);
  9.1050              }
  9.1051 @@ -1017,7 +1098,7 @@
  9.1052          /// <summary>
  9.1053          ///   Looks up a localized string similar to Show a warning when a message loses security through reply or forward.
  9.1054          /// </summary>
  9.1055 -        internal static string Options_IsSecurityLossWarningEnabledText {
  9.1056 +        public static string Options_IsSecurityLossWarningEnabledText {
  9.1057              get {
  9.1058                  return ResourceManager.GetString("Options_IsSecurityLossWarningEnabledText", resourceCulture);
  9.1059              }
  9.1060 @@ -1026,7 +1107,7 @@
  9.1061          /// <summary>
  9.1062          ///   Looks up a localized string similar to Enable p≡p sync for all accounts.
  9.1063          /// </summary>
  9.1064 -        internal static string Options_IsSyncEnabledForAllAccountsText {
  9.1065 +        public static string Options_IsSyncEnabledForAllAccountsText {
  9.1066              get {
  9.1067                  return ResourceManager.GetString("Options_IsSyncEnabledForAllAccountsText", resourceCulture);
  9.1068              }
  9.1069 @@ -1035,7 +1116,7 @@
  9.1070          /// <summary>
  9.1071          ///   Looks up a localized string similar to Disable TNEF message format.
  9.1072          /// </summary>
  9.1073 -        internal static string Options_IsTNEFDisabledText {
  9.1074 +        public static string Options_IsTNEFDisabledText {
  9.1075              get {
  9.1076                  return ResourceManager.GetString("Options_IsTNEFDisabledText", resourceCulture);
  9.1077              }
  9.1078 @@ -1044,7 +1125,7 @@
  9.1079          /// <summary>
  9.1080          ///   Looks up a localized string similar to Enable unprotected message subjects.
  9.1081          /// </summary>
  9.1082 -        internal static string Options_IsUnencryptedSubjectEnabledText {
  9.1083 +        public static string Options_IsUnencryptedSubjectEnabledText {
  9.1084              get {
  9.1085                  return ResourceManager.GetString("Options_IsUnencryptedSubjectEnabledText", resourceCulture);
  9.1086              }
  9.1087 @@ -1053,7 +1134,7 @@
  9.1088          /// <summary>
  9.1089          ///   Looks up a localized string similar to Enable verbose logging.
  9.1090          /// </summary>
  9.1091 -        internal static string Options_IsVerboseLoggingEnabledText {
  9.1092 +        public static string Options_IsVerboseLoggingEnabledText {
  9.1093              get {
  9.1094                  return ResourceManager.GetString("Options_IsVerboseLoggingEnabledText", resourceCulture);
  9.1095              }
  9.1096 @@ -1062,7 +1143,7 @@
  9.1097          /// <summary>
  9.1098          ///   Looks up a localized string similar to Clear Logs.
  9.1099          /// </summary>
  9.1100 -        internal static string Options_LogClearText {
  9.1101 +        public static string Options_LogClearText {
  9.1102              get {
  9.1103                  return ResourceManager.GetString("Options_LogClearText", resourceCulture);
  9.1104              }
  9.1105 @@ -1071,7 +1152,7 @@
  9.1106          /// <summary>
  9.1107          ///   Looks up a localized string similar to Engine Log.
  9.1108          /// </summary>
  9.1109 -        internal static string Options_LogEngineText {
  9.1110 +        public static string Options_LogEngineText {
  9.1111              get {
  9.1112                  return ResourceManager.GetString("Options_LogEngineText", resourceCulture);
  9.1113              }
  9.1114 @@ -1080,7 +1161,7 @@
  9.1115          /// <summary>
  9.1116          ///   Looks up a localized string similar to Log.
  9.1117          /// </summary>
  9.1118 -        internal static string Options_LogOutlookText {
  9.1119 +        public static string Options_LogOutlookText {
  9.1120              get {
  9.1121                  return ResourceManager.GetString("Options_LogOutlookText", resourceCulture);
  9.1122              }
  9.1123 @@ -1089,7 +1170,7 @@
  9.1124          /// <summary>
  9.1125          ///   Looks up a localized string similar to Refresh Logs.
  9.1126          /// </summary>
  9.1127 -        internal static string Options_LogRefreshText {
  9.1128 +        public static string Options_LogRefreshText {
  9.1129              get {
  9.1130                  return ResourceManager.GetString("Options_LogRefreshText", resourceCulture);
  9.1131              }
  9.1132 @@ -1098,7 +1179,7 @@
  9.1133          /// <summary>
  9.1134          ///   Looks up a localized string similar to OK.
  9.1135          /// </summary>
  9.1136 -        internal static string Options_OKText {
  9.1137 +        public static string Options_OKText {
  9.1138              get {
  9.1139                  return ResourceManager.GetString("Options_OKText", resourceCulture);
  9.1140              }
  9.1141 @@ -1107,7 +1188,7 @@
  9.1142          /// <summary>
  9.1143          ///   Looks up a localized string similar to Open Key Manager.
  9.1144          /// </summary>
  9.1145 -        internal static string Options_OpenKeyManagerText {
  9.1146 +        public static string Options_OpenKeyManagerText {
  9.1147              get {
  9.1148                  return ResourceManager.GetString("Options_OpenKeyManagerText", resourceCulture);
  9.1149              }
  9.1150 @@ -1116,7 +1197,7 @@
  9.1151          /// <summary>
  9.1152          ///   Looks up a localized string similar to About.
  9.1153          /// </summary>
  9.1154 -        internal static string Options_PageAboutText {
  9.1155 +        public static string Options_PageAboutText {
  9.1156              get {
  9.1157                  return ResourceManager.GetString("Options_PageAboutText", resourceCulture);
  9.1158              }
  9.1159 @@ -1125,7 +1206,7 @@
  9.1160          /// <summary>
  9.1161          ///   Looks up a localized string similar to Accounts.
  9.1162          /// </summary>
  9.1163 -        internal static string Options_PageAccountsText {
  9.1164 +        public static string Options_PageAccountsText {
  9.1165              get {
  9.1166                  return ResourceManager.GetString("Options_PageAccountsText", resourceCulture);
  9.1167              }
  9.1168 @@ -1134,7 +1215,7 @@
  9.1169          /// <summary>
  9.1170          ///   Looks up a localized string similar to Compatibility.
  9.1171          /// </summary>
  9.1172 -        internal static string Options_PageCompatibilityText {
  9.1173 +        public static string Options_PageCompatibilityText {
  9.1174              get {
  9.1175                  return ResourceManager.GetString("Options_PageCompatibilityText", resourceCulture);
  9.1176              }
  9.1177 @@ -1143,7 +1224,7 @@
  9.1178          /// <summary>
  9.1179          ///   Looks up a localized string similar to Credits.
  9.1180          /// </summary>
  9.1181 -        internal static string Options_PageCreditsText {
  9.1182 +        public static string Options_PageCreditsText {
  9.1183              get {
  9.1184                  return ResourceManager.GetString("Options_PageCreditsText", resourceCulture);
  9.1185              }
  9.1186 @@ -1152,7 +1233,7 @@
  9.1187          /// <summary>
  9.1188          ///   Looks up a localized string similar to Developer.
  9.1189          /// </summary>
  9.1190 -        internal static string Options_PageDeveloperText {
  9.1191 +        public static string Options_PageDeveloperText {
  9.1192              get {
  9.1193                  return ResourceManager.GetString("Options_PageDeveloperText", resourceCulture);
  9.1194              }
  9.1195 @@ -1161,7 +1242,7 @@
  9.1196          /// <summary>
  9.1197          ///   Looks up a localized string similar to About.
  9.1198          /// </summary>
  9.1199 -        internal static string Options_PageSectionAboutText {
  9.1200 +        public static string Options_PageSectionAboutText {
  9.1201              get {
  9.1202                  return ResourceManager.GetString("Options_PageSectionAboutText", resourceCulture);
  9.1203              }
  9.1204 @@ -1170,7 +1251,7 @@
  9.1205          /// <summary>
  9.1206          ///   Looks up a localized string similar to Account Security.
  9.1207          /// </summary>
  9.1208 -        internal static string Options_PageSectionAccountsText {
  9.1209 +        public static string Options_PageSectionAccountsText {
  9.1210              get {
  9.1211                  return ResourceManager.GetString("Options_PageSectionAccountsText", resourceCulture);
  9.1212              }
  9.1213 @@ -1179,7 +1260,7 @@
  9.1214          /// <summary>
  9.1215          ///   Looks up a localized string similar to Key Blacklist.
  9.1216          /// </summary>
  9.1217 -        internal static string Options_PageSectionBlacklistText {
  9.1218 +        public static string Options_PageSectionBlacklistText {
  9.1219              get {
  9.1220                  return ResourceManager.GetString("Options_PageSectionBlacklistText", resourceCulture);
  9.1221              }
  9.1222 @@ -1188,7 +1269,7 @@
  9.1223          /// <summary>
  9.1224          ///   Looks up a localized string similar to Credits.
  9.1225          /// </summary>
  9.1226 -        internal static string Options_PageSectionCreditsText {
  9.1227 +        public static string Options_PageSectionCreditsText {
  9.1228              get {
  9.1229                  return ResourceManager.GetString("Options_PageSectionCreditsText", resourceCulture);
  9.1230              }
  9.1231 @@ -1197,7 +1278,7 @@
  9.1232          /// <summary>
  9.1233          ///   Looks up a localized string similar to Developer.
  9.1234          /// </summary>
  9.1235 -        internal static string Options_PageSectionDeveloperText {
  9.1236 +        public static string Options_PageSectionDeveloperText {
  9.1237              get {
  9.1238                  return ResourceManager.GetString("Options_PageSectionDeveloperText", resourceCulture);
  9.1239              }
  9.1240 @@ -1206,7 +1287,7 @@
  9.1241          /// <summary>
  9.1242          ///   Looks up a localized string similar to OpenPGP Compatibility.
  9.1243          /// </summary>
  9.1244 -        internal static string Options_PageSectionOpenPGPCompatibilityText {
  9.1245 +        public static string Options_PageSectionOpenPGPCompatibilityText {
  9.1246              get {
  9.1247                  return ResourceManager.GetString("Options_PageSectionOpenPGPCompatibilityText", resourceCulture);
  9.1248              }
  9.1249 @@ -1215,7 +1296,7 @@
  9.1250          /// <summary>
  9.1251          ///   Looks up a localized string similar to www.prettyeasyprivacy.com.
  9.1252          /// </summary>
  9.1253 -        internal static string Options_PEPWebAddress {
  9.1254 +        public static string Options_PEPWebAddress {
  9.1255              get {
  9.1256                  return ResourceManager.GetString("Options_PEPWebAddress", resourceCulture);
  9.1257              }
  9.1258 @@ -1224,7 +1305,7 @@
  9.1259          /// <summary>
  9.1260          ///   Looks up a localized string similar to Reset pEp.pst store.
  9.1261          /// </summary>
  9.1262 -        internal static string Options_ResetPEPStoreText {
  9.1263 +        public static string Options_ResetPEPStoreText {
  9.1264              get {
  9.1265                  return ResourceManager.GetString("Options_ResetPEPStoreText", resourceCulture);
  9.1266              }
  9.1267 @@ -1233,7 +1314,7 @@
  9.1268          /// <summary>
  9.1269          ///   Looks up a localized string similar to Preview Unencrypted.
  9.1270          /// </summary>
  9.1271 -        internal static string PreviewMessage_FormText {
  9.1272 +        public static string PreviewMessage_FormText {
  9.1273              get {
  9.1274                  return ResourceManager.GetString("PreviewMessage_FormText", resourceCulture);
  9.1275              }
  9.1276 @@ -1242,7 +1323,7 @@
  9.1277          /// <summary>
  9.1278          ///   Looks up a localized string similar to Forward.
  9.1279          /// </summary>
  9.1280 -        internal static string PreviewMessage_ForwardText {
  9.1281 +        public static string PreviewMessage_ForwardText {
  9.1282              get {
  9.1283                  return ResourceManager.GetString("PreviewMessage_ForwardText", resourceCulture);
  9.1284              }
  9.1285 @@ -1251,7 +1332,7 @@
  9.1286          /// <summary>
  9.1287          ///   Looks up a localized string similar to Open.
  9.1288          /// </summary>
  9.1289 -        internal static string PreviewMessage_OpenText {
  9.1290 +        public static string PreviewMessage_OpenText {
  9.1291              get {
  9.1292                  return ResourceManager.GetString("PreviewMessage_OpenText", resourceCulture);
  9.1293              }
  9.1294 @@ -1260,7 +1341,7 @@
  9.1295          /// <summary>
  9.1296          ///   Looks up a localized string similar to Preview.
  9.1297          /// </summary>
  9.1298 -        internal static string PreviewMessage_PreviewText {
  9.1299 +        public static string PreviewMessage_PreviewText {
  9.1300              get {
  9.1301                  return ResourceManager.GetString("PreviewMessage_PreviewText", resourceCulture);
  9.1302              }
  9.1303 @@ -1269,7 +1350,7 @@
  9.1304          /// <summary>
  9.1305          ///   Looks up a localized string similar to Reply All.
  9.1306          /// </summary>
  9.1307 -        internal static string PreviewMessage_ReplyAllText {
  9.1308 +        public static string PreviewMessage_ReplyAllText {
  9.1309              get {
  9.1310                  return ResourceManager.GetString("PreviewMessage_ReplyAllText", resourceCulture);
  9.1311              }
  9.1312 @@ -1278,7 +1359,7 @@
  9.1313          /// <summary>
  9.1314          ///   Looks up a localized string similar to Reply.
  9.1315          /// </summary>
  9.1316 -        internal static string PreviewMessage_ReplyText {
  9.1317 +        public static string PreviewMessage_ReplyText {
  9.1318              get {
  9.1319                  return ResourceManager.GetString("PreviewMessage_ReplyText", resourceCulture);
  9.1320              }
  9.1321 @@ -1287,7 +1368,7 @@
  9.1322          /// <summary>
  9.1323          ///   Looks up a localized string similar to Save All Attachments.
  9.1324          /// </summary>
  9.1325 -        internal static string PreviewMessage_SaveAllAttachmentsText {
  9.1326 +        public static string PreviewMessage_SaveAllAttachmentsText {
  9.1327              get {
  9.1328                  return ResourceManager.GetString("PreviewMessage_SaveAllAttachmentsText", resourceCulture);
  9.1329              }
  9.1330 @@ -1296,7 +1377,7 @@
  9.1331          /// <summary>
  9.1332          ///   Looks up a localized string similar to Save As.
  9.1333          /// </summary>
  9.1334 -        internal static string PreviewMessage_SaveAsText {
  9.1335 +        public static string PreviewMessage_SaveAsText {
  9.1336              get {
  9.1337                  return ResourceManager.GetString("PreviewMessage_SaveAsText", resourceCulture);
  9.1338              }
  9.1339 @@ -1305,7 +1386,7 @@
  9.1340          /// <summary>
  9.1341          ///   Looks up a localized string similar to To.
  9.1342          /// </summary>
  9.1343 -        internal static string PreviewMessage_ToText {
  9.1344 +        public static string PreviewMessage_ToText {
  9.1345              get {
  9.1346                  return ResourceManager.GetString("PreviewMessage_ToText", resourceCulture);
  9.1347              }
  9.1348 @@ -1314,7 +1395,7 @@
  9.1349          /// <summary>
  9.1350          ///   Looks up a localized string similar to Privacy Status.
  9.1351          /// </summary>
  9.1352 -        internal static string PrivacyStatus_FormText {
  9.1353 +        public static string PrivacyStatus_FormText {
  9.1354              get {
  9.1355                  return ResourceManager.GetString("PrivacyStatus_FormText", resourceCulture);
  9.1356              }
  9.1357 @@ -1323,7 +1404,7 @@
  9.1358          /// <summary>
  9.1359          ///   Looks up a localized string similar to Handshake….
  9.1360          /// </summary>
  9.1361 -        internal static string PrivacyStatus_Handshake {
  9.1362 +        public static string PrivacyStatus_Handshake {
  9.1363              get {
  9.1364                  return ResourceManager.GetString("PrivacyStatus_Handshake", resourceCulture);
  9.1365              }
  9.1366 @@ -1332,7 +1413,7 @@
  9.1367          /// <summary>
  9.1368          ///   Looks up a localized string similar to Advanced….
  9.1369          /// </summary>
  9.1370 -        internal static string PrivacyStatus_HandshakeAdvanced {
  9.1371 +        public static string PrivacyStatus_HandshakeAdvanced {
  9.1372              get {
  9.1373                  return ResourceManager.GetString("PrivacyStatus_HandshakeAdvanced", resourceCulture);
  9.1374              }
  9.1375 @@ -1341,7 +1422,7 @@
  9.1376          /// <summary>
  9.1377          ///   Looks up a localized string similar to This message has broken encryption or formatting..
  9.1378          /// </summary>
  9.1379 -        internal static string PrivacyStatus_RatingBrokenExplanation {
  9.1380 +        public static string PrivacyStatus_RatingBrokenExplanation {
  9.1381              get {
  9.1382                  return ResourceManager.GetString("PrivacyStatus_RatingBrokenExplanation", resourceCulture);
  9.1383              }
  9.1384 @@ -1350,7 +1431,7 @@
  9.1385          /// <summary>
  9.1386          ///   Looks up a localized string similar to Either you or the sender should resend the message..
  9.1387          /// </summary>
  9.1388 -        internal static string PrivacyStatus_RatingBrokenSuggestion {
  9.1389 +        public static string PrivacyStatus_RatingBrokenSuggestion {
  9.1390              get {
  9.1391                  return ResourceManager.GetString("PrivacyStatus_RatingBrokenSuggestion", resourceCulture);
  9.1392              }
  9.1393 @@ -1359,7 +1440,7 @@
  9.1394          /// <summary>
  9.1395          ///   Looks up a localized string similar to Broken.
  9.1396          /// </summary>
  9.1397 -        internal static string PrivacyStatus_RatingBrokenText {
  9.1398 +        public static string PrivacyStatus_RatingBrokenText {
  9.1399              get {
  9.1400                  return ResourceManager.GetString("PrivacyStatus_RatingBrokenText", resourceCulture);
  9.1401              }
  9.1402 @@ -1368,7 +1449,7 @@
  9.1403          /// <summary>
  9.1404          ///   Looks up a localized string similar to This message cannot be decrypted because the key is not available..
  9.1405          /// </summary>
  9.1406 -        internal static string PrivacyStatus_RatingHaveNoKeyExplanation {
  9.1407 +        public static string PrivacyStatus_RatingHaveNoKeyExplanation {
  9.1408              get {
  9.1409                  return ResourceManager.GetString("PrivacyStatus_RatingHaveNoKeyExplanation", resourceCulture);
  9.1410              }
  9.1411 @@ -1377,7 +1458,7 @@
  9.1412          /// <summary>
  9.1413          ///   Looks up a localized string similar to If this message was addressed to you, please inform the sender that you don&apos;t have the key..
  9.1414          /// </summary>
  9.1415 -        internal static string PrivacyStatus_RatingHaveNoKeySuggestionIncoming {
  9.1416 +        public static string PrivacyStatus_RatingHaveNoKeySuggestionIncoming {
  9.1417              get {
  9.1418                  return ResourceManager.GetString("PrivacyStatus_RatingHaveNoKeySuggestionIncoming", resourceCulture);
  9.1419              }
  9.1420 @@ -1386,7 +1467,7 @@
  9.1421          /// <summary>
  9.1422          ///   Looks up a localized string similar to If you composed this message, your key is not available..
  9.1423          /// </summary>
  9.1424 -        internal static string PrivacyStatus_RatingHaveNoKeySuggestionOutgoing {
  9.1425 +        public static string PrivacyStatus_RatingHaveNoKeySuggestionOutgoing {
  9.1426              get {
  9.1427                  return ResourceManager.GetString("PrivacyStatus_RatingHaveNoKeySuggestionOutgoing", resourceCulture);
  9.1428              }
  9.1429 @@ -1395,7 +1476,7 @@
  9.1430          /// <summary>
  9.1431          ///   Looks up a localized string similar to Cannot Decrypt.
  9.1432          /// </summary>
  9.1433 -        internal static string PrivacyStatus_RatingHaveNoKeyText {
  9.1434 +        public static string PrivacyStatus_RatingHaveNoKeyText {
  9.1435              get {
  9.1436                  return ResourceManager.GetString("PrivacyStatus_RatingHaveNoKeyText", resourceCulture);
  9.1437              }
  9.1438 @@ -1404,7 +1485,7 @@
  9.1439          /// <summary>
  9.1440          ///   Looks up a localized string similar to This message has a communication partner that has previously been marked as mistrusted..
  9.1441          /// </summary>
  9.1442 -        internal static string PrivacyStatus_RatingMistrustExplanation {
  9.1443 +        public static string PrivacyStatus_RatingMistrustExplanation {
  9.1444              get {
  9.1445                  return ResourceManager.GetString("PrivacyStatus_RatingMistrustExplanation", resourceCulture);
  9.1446              }
  9.1447 @@ -1413,7 +1494,7 @@
  9.1448          /// <summary>
  9.1449          ///   Looks up a localized string similar to Re-establish the connection with your communication partner and try to complete another handshake..
  9.1450          /// </summary>
  9.1451 -        internal static string PrivacyStatus_RatingMistrustSuggestion {
  9.1452 +        public static string PrivacyStatus_RatingMistrustSuggestion {
  9.1453              get {
  9.1454                  return ResourceManager.GetString("PrivacyStatus_RatingMistrustSuggestion", resourceCulture);
  9.1455              }
  9.1456 @@ -1422,7 +1503,7 @@
  9.1457          /// <summary>
  9.1458          ///   Looks up a localized string similar to Mistrusted.
  9.1459          /// </summary>
  9.1460 -        internal static string PrivacyStatus_RatingMistrustText {
  9.1461 +        public static string PrivacyStatus_RatingMistrustText {
  9.1462              get {
  9.1463                  return ResourceManager.GetString("PrivacyStatus_RatingMistrustText", resourceCulture);
  9.1464              }
  9.1465 @@ -1431,7 +1512,7 @@
  9.1466          /// <summary>
  9.1467          ///   Looks up a localized string similar to This message is secure but you still need to verify the identity of your communication partner..
  9.1468          /// </summary>
  9.1469 -        internal static string PrivacyStatus_RatingReliableExplanation {
  9.1470 +        public static string PrivacyStatus_RatingReliableExplanation {
  9.1471              get {
  9.1472                  return ResourceManager.GetString("PrivacyStatus_RatingReliableExplanation", resourceCulture);
  9.1473              }
  9.1474 @@ -1440,7 +1521,7 @@
  9.1475          /// <summary>
  9.1476          ///   Looks up a localized string similar to Complete a handshake with your communication partner by exchanging trustwords in person or over the phone. A handshake is needed only once per partner and will ensure secure and trusted communication..
  9.1477          /// </summary>
  9.1478 -        internal static string PrivacyStatus_RatingReliableSuggestion {
  9.1479 +        public static string PrivacyStatus_RatingReliableSuggestion {
  9.1480              get {
  9.1481                  return ResourceManager.GetString("PrivacyStatus_RatingReliableSuggestion", resourceCulture);
  9.1482              }
  9.1483 @@ -1449,7 +1530,7 @@
  9.1484          /// <summary>
  9.1485          ///   Looks up a localized string similar to Secure….
  9.1486          /// </summary>
  9.1487 -        internal static string PrivacyStatus_RatingReliableText {
  9.1488 +        public static string PrivacyStatus_RatingReliableText {
  9.1489              get {
  9.1490                  return ResourceManager.GetString("PrivacyStatus_RatingReliableText", resourceCulture);
  9.1491              }
  9.1492 @@ -1458,7 +1539,7 @@
  9.1493          /// <summary>
  9.1494          ///   Looks up a localized string similar to This message is secure and trusted..
  9.1495          /// </summary>
  9.1496 -        internal static string PrivacyStatus_RatingTrustedExplanation {
  9.1497 +        public static string PrivacyStatus_RatingTrustedExplanation {
  9.1498              get {
  9.1499                  return ResourceManager.GetString("PrivacyStatus_RatingTrustedExplanation", resourceCulture);
  9.1500              }
  9.1501 @@ -1467,7 +1548,7 @@
  9.1502          /// <summary>
  9.1503          ///   Looks up a localized string similar to No action needed!.
  9.1504          /// </summary>
  9.1505 -        internal static string PrivacyStatus_RatingTrustedSuggestion {
  9.1506 +        public static string PrivacyStatus_RatingTrustedSuggestion {
  9.1507              get {
  9.1508                  return ResourceManager.GetString("PrivacyStatus_RatingTrustedSuggestion", resourceCulture);
  9.1509              }
  9.1510 @@ -1476,7 +1557,7 @@
  9.1511          /// <summary>
  9.1512          ///   Looks up a localized string similar to Secure &amp; Trusted.
  9.1513          /// </summary>
  9.1514 -        internal static string PrivacyStatus_RatingTrustedText {
  9.1515 +        public static string PrivacyStatus_RatingTrustedText {
  9.1516              get {
  9.1517                  return ResourceManager.GetString("PrivacyStatus_RatingTrustedText", resourceCulture);
  9.1518              }
  9.1519 @@ -1485,7 +1566,7 @@
  9.1520          /// <summary>
  9.1521          ///   Looks up a localized string similar to This message does not contain enough information to determine if it is secure..
  9.1522          /// </summary>
  9.1523 -        internal static string PrivacyStatus_RatingUndefinedExplanation {
  9.1524 +        public static string PrivacyStatus_RatingUndefinedExplanation {
  9.1525              get {
  9.1526                  return ResourceManager.GetString("PrivacyStatus_RatingUndefinedExplanation", resourceCulture);
  9.1527              }
  9.1528 @@ -1494,7 +1575,7 @@
  9.1529          /// <summary>
  9.1530          ///   Looks up a localized string similar to Be aware this message may not be secure..
  9.1531          /// </summary>
  9.1532 -        internal static string PrivacyStatus_RatingUndefinedSuggestionIncoming {
  9.1533 +        public static string PrivacyStatus_RatingUndefinedSuggestionIncoming {
  9.1534              get {
  9.1535                  return ResourceManager.GetString("PrivacyStatus_RatingUndefinedSuggestionIncoming", resourceCulture);
  9.1536              }
  9.1537 @@ -1503,7 +1584,7 @@
  9.1538          /// <summary>
  9.1539          ///   Looks up a localized string similar to Please add the necessary information..
  9.1540          /// </summary>
  9.1541 -        internal static string PrivacyStatus_RatingUndefinedSuggestionOutgoing {
  9.1542 +        public static string PrivacyStatus_RatingUndefinedSuggestionOutgoing {
  9.1543              get {
  9.1544                  return ResourceManager.GetString("PrivacyStatus_RatingUndefinedSuggestionOutgoing", resourceCulture);
  9.1545              }
  9.1546 @@ -1512,7 +1593,7 @@
  9.1547          /// <summary>
  9.1548          ///   Looks up a localized string similar to Unknown.
  9.1549          /// </summary>
  9.1550 -        internal static string PrivacyStatus_RatingUndefinedText {
  9.1551 +        public static string PrivacyStatus_RatingUndefinedText {
  9.1552              get {
  9.1553                  return ResourceManager.GetString("PrivacyStatus_RatingUndefinedText", resourceCulture);
  9.1554              }
  9.1555 @@ -1521,7 +1602,7 @@
  9.1556          /// <summary>
  9.1557          ///   Looks up a localized string similar to This message is not secure and has been tampered with..
  9.1558          /// </summary>
  9.1559 -        internal static string PrivacyStatus_RatingUnderAttackExplanation {
  9.1560 +        public static string PrivacyStatus_RatingUnderAttackExplanation {
  9.1561              get {
  9.1562                  return ResourceManager.GetString("PrivacyStatus_RatingUnderAttackExplanation", resourceCulture);
  9.1563              }
  9.1564 @@ -1530,7 +1611,7 @@
  9.1565          /// <summary>
  9.1566          ///   Looks up a localized string similar to Separately verify the content of this message with your communication partner..
  9.1567          /// </summary>
  9.1568 -        internal static string PrivacyStatus_RatingUnderAttackSuggestion {
  9.1569 +        public static string PrivacyStatus_RatingUnderAttackSuggestion {
  9.1570              get {
  9.1571                  return ResourceManager.GetString("PrivacyStatus_RatingUnderAttackSuggestion", resourceCulture);
  9.1572              }
  9.1573 @@ -1539,7 +1620,7 @@
  9.1574          /// <summary>
  9.1575          ///   Looks up a localized string similar to Under Attack.
  9.1576          /// </summary>
  9.1577 -        internal static string PrivacyStatus_RatingUnderAttackText {
  9.1578 +        public static string PrivacyStatus_RatingUnderAttackText {
  9.1579              get {
  9.1580                  return ResourceManager.GetString("PrivacyStatus_RatingUnderAttackText", resourceCulture);
  9.1581              }
  9.1582 @@ -1548,7 +1629,7 @@
  9.1583          /// <summary>
  9.1584          ///   Looks up a localized string similar to This message is unsecure..
  9.1585          /// </summary>
  9.1586 -        internal static string PrivacyStatus_RatingUnencryptedExplanation {
  9.1587 +        public static string PrivacyStatus_RatingUnencryptedExplanation {
  9.1588              get {
  9.1589                  return ResourceManager.GetString("PrivacyStatus_RatingUnencryptedExplanation", resourceCulture);
  9.1590              }
  9.1591 @@ -1557,7 +1638,7 @@
  9.1592          /// <summary>
  9.1593          ///   Looks up a localized string similar to This message is unsecure for some communication partners..
  9.1594          /// </summary>
  9.1595 -        internal static string PrivacyStatus_RatingUnencryptedForSomeExplanation {
  9.1596 +        public static string PrivacyStatus_RatingUnencryptedForSomeExplanation {
  9.1597              get {
  9.1598                  return ResourceManager.GetString("PrivacyStatus_RatingUnencryptedForSomeExplanation", resourceCulture);
  9.1599              }
  9.1600 @@ -1566,7 +1647,7 @@
  9.1601          /// <summary>
  9.1602          ///   Looks up a localized string similar to Make sure the privacy status for each communication partner listed is at least secure..
  9.1603          /// </summary>
  9.1604 -        internal static string PrivacyStatus_RatingUnencryptedForSomeSuggestion {
  9.1605 +        public static string PrivacyStatus_RatingUnencryptedForSomeSuggestion {
  9.1606              get {
  9.1607                  return ResourceManager.GetString("PrivacyStatus_RatingUnencryptedForSomeSuggestion", resourceCulture);
  9.1608              }
  9.1609 @@ -1575,7 +1656,7 @@
  9.1610          /// <summary>
  9.1611          ///   Looks up a localized string similar to Unsecure for Some.
  9.1612          /// </summary>
  9.1613 -        internal static string PrivacyStatus_RatingUnencryptedForSomeText {
  9.1614 +        public static string PrivacyStatus_RatingUnencryptedForSomeText {
  9.1615              get {
  9.1616                  return ResourceManager.GetString("PrivacyStatus_RatingUnencryptedForSomeText", resourceCulture);
  9.1617              }
  9.1618 @@ -1584,7 +1665,7 @@
  9.1619          /// <summary>
  9.1620          ///   Looks up a localized string similar to Please ask your communication partner to use an encryption solution or install p≡p..
  9.1621          /// </summary>
  9.1622 -        internal static string PrivacyStatus_RatingUnencryptedSuggestion {
  9.1623 +        public static string PrivacyStatus_RatingUnencryptedSuggestion {
  9.1624              get {
  9.1625                  return ResourceManager.GetString("PrivacyStatus_RatingUnencryptedSuggestion", resourceCulture);
  9.1626              }
  9.1627 @@ -1593,7 +1674,7 @@
  9.1628          /// <summary>
  9.1629          ///   Looks up a localized string similar to Unsecure.
  9.1630          /// </summary>
  9.1631 -        internal static string PrivacyStatus_RatingUnencryptedText {
  9.1632 +        public static string PrivacyStatus_RatingUnencryptedText {
  9.1633              get {
  9.1634                  return ResourceManager.GetString("PrivacyStatus_RatingUnencryptedText", resourceCulture);
  9.1635              }
  9.1636 @@ -1602,7 +1683,7 @@
  9.1637          /// <summary>
  9.1638          ///   Looks up a localized string similar to This message has unreliable protection..
  9.1639          /// </summary>
  9.1640 -        internal static string PrivacyStatus_RatingUnreliableExplanation {
  9.1641 +        public static string PrivacyStatus_RatingUnreliableExplanation {
  9.1642              get {
  9.1643                  return ResourceManager.GetString("PrivacyStatus_RatingUnreliableExplanation", resourceCulture);
  9.1644              }
  9.1645 @@ -1611,7 +1692,7 @@
  9.1646          /// <summary>
  9.1647          ///   Looks up a localized string similar to This message has no reliable encryption or no signature. Ask your communication partner to upgrade their encryption solution or install p≡p..
  9.1648          /// </summary>
  9.1649 -        internal static string PrivacyStatus_RatingUnreliableSuggestion {
  9.1650 +        public static string PrivacyStatus_RatingUnreliableSuggestion {
  9.1651              get {
  9.1652                  return ResourceManager.GetString("PrivacyStatus_RatingUnreliableSuggestion", resourceCulture);
  9.1653              }
  9.1654 @@ -1620,7 +1701,7 @@
  9.1655          /// <summary>
  9.1656          ///   Looks up a localized string similar to Unreliable Security.
  9.1657          /// </summary>
  9.1658 -        internal static string PrivacyStatus_RatingUnreliableText {
  9.1659 +        public static string PrivacyStatus_RatingUnreliableText {
  9.1660              get {
  9.1661                  return ResourceManager.GetString("PrivacyStatus_RatingUnreliableText", resourceCulture);
  9.1662              }
  9.1663 @@ -1629,7 +1710,7 @@
  9.1664          /// <summary>
  9.1665          ///   Looks up a localized string similar to Stop Trusting.
  9.1666          /// </summary>
  9.1667 -        internal static string PrivacyStatus_StopTrusting {
  9.1668 +        public static string PrivacyStatus_StopTrusting {
  9.1669              get {
  9.1670                  return ResourceManager.GetString("PrivacyStatus_StopTrusting", resourceCulture);
  9.1671              }
  9.1672 @@ -1638,7 +1719,7 @@
  9.1673          /// <summary>
  9.1674          ///   Looks up a localized string similar to Buy p≡p to send secure messages.
  9.1675          /// </summary>
  9.1676 -        internal static string PrivacyStatus_UpgradeText {
  9.1677 +        public static string PrivacyStatus_UpgradeText {
  9.1678              get {
  9.1679                  return ResourceManager.GetString("PrivacyStatus_UpgradeText", resourceCulture);
  9.1680              }
  9.1681 @@ -1647,7 +1728,7 @@
  9.1682          /// <summary>
  9.1683          ///   Looks up a localized string similar to Click to manage privacy status.
  9.1684          /// </summary>
  9.1685 -        internal static string PrivacyView_ToolTip {
  9.1686 +        public static string PrivacyView_ToolTip {
  9.1687              get {
  9.1688                  return ResourceManager.GetString("PrivacyView_ToolTip", resourceCulture);
  9.1689              }
  9.1690 @@ -1656,7 +1737,7 @@
  9.1691          /// <summary>
  9.1692          ///   Looks up a localized string similar to Attach My Key.
  9.1693          /// </summary>
  9.1694 -        internal static string Ribbon_AttachOwnKey {
  9.1695 +        public static string Ribbon_AttachOwnKey {
  9.1696              get {
  9.1697                  return ResourceManager.GetString("Ribbon_AttachOwnKey", resourceCulture);
  9.1698              }
  9.1699 @@ -1665,7 +1746,7 @@
  9.1700          /// <summary>
  9.1701          ///   Looks up a localized string similar to Attaches your own public key to the outgoing message. This allows communication partners to securely reply..
  9.1702          /// </summary>
  9.1703 -        internal static string Ribbon_AttachOwnKeyDesc {
  9.1704 +        public static string Ribbon_AttachOwnKeyDesc {
  9.1705              get {
  9.1706                  return ResourceManager.GetString("Ribbon_AttachOwnKeyDesc", resourceCulture);
  9.1707              }
  9.1708 @@ -1674,7 +1755,7 @@
  9.1709          /// <summary>
  9.1710          ///   Looks up a localized string similar to Accounts….
  9.1711          /// </summary>
  9.1712 -        internal static string Ribbon_ButtonAccountsLabel {
  9.1713 +        public static string Ribbon_ButtonAccountsLabel {
  9.1714              get {
  9.1715                  return ResourceManager.GetString("Ribbon_ButtonAccountsLabel", resourceCulture);
  9.1716              }
  9.1717 @@ -1683,7 +1764,7 @@
  9.1718          /// <summary>
  9.1719          ///   Looks up a localized string similar to Compatibility….
  9.1720          /// </summary>
  9.1721 -        internal static string Ribbon_ButtonCompatibilityLabel {
  9.1722 +        public static string Ribbon_ButtonCompatibilityLabel {
  9.1723              get {
  9.1724                  return ResourceManager.GetString("Ribbon_ButtonCompatibilityLabel", resourceCulture);
  9.1725              }
  9.1726 @@ -1692,7 +1773,7 @@
  9.1727          /// <summary>
  9.1728          ///   Looks up a localized string similar to Force Protection.
  9.1729          /// </summary>
  9.1730 -        internal static string Ribbon_ForceEncrypted {
  9.1731 +        public static string Ribbon_ForceEncrypted {
  9.1732              get {
  9.1733                  return ResourceManager.GetString("Ribbon_ForceEncrypted", resourceCulture);
  9.1734              }
  9.1735 @@ -1701,7 +1782,7 @@
  9.1736          /// <summary>
  9.1737          ///   Looks up a localized string similar to Sends the message securely even if the communication partner is unknown or not using p≡p..
  9.1738          /// </summary>
  9.1739 -        internal static string Ribbon_ForceEncryptedDesc {
  9.1740 +        public static string Ribbon_ForceEncryptedDesc {
  9.1741              get {
  9.1742                  return ResourceManager.GetString("Ribbon_ForceEncryptedDesc", resourceCulture);
  9.1743              }
  9.1744 @@ -1710,7 +1791,7 @@
  9.1745          /// <summary>
  9.1746          ///   Looks up a localized string similar to Disable Protection.
  9.1747          /// </summary>
  9.1748 -        internal static string Ribbon_ForceUnencrypted {
  9.1749 +        public static string Ribbon_ForceUnencrypted {
  9.1750              get {
  9.1751                  return ResourceManager.GetString("Ribbon_ForceUnencrypted", resourceCulture);
  9.1752              }
  9.1753 @@ -1719,7 +1800,7 @@
  9.1754          /// <summary>
  9.1755          ///   Looks up a localized string similar to Sends the message without any security or p≡p processing..
  9.1756          /// </summary>
  9.1757 -        internal static string Ribbon_ForceUnencryptedDesc {
  9.1758 +        public static string Ribbon_ForceUnencryptedDesc {
  9.1759              get {
  9.1760                  return ResourceManager.GetString("Ribbon_ForceUnencryptedDesc", resourceCulture);
  9.1761              }
  9.1762 @@ -1728,7 +1809,7 @@
  9.1763          /// <summary>
  9.1764          ///   Looks up a localized string similar to View and adjust account specific or general security options..
  9.1765          /// </summary>
  9.1766 -        internal static string Ribbon_GroupAccountsHelperText {
  9.1767 +        public static string Ribbon_GroupAccountsHelperText {
  9.1768              get {
  9.1769                  return ResourceManager.GetString("Ribbon_GroupAccountsHelperText", resourceCulture);
  9.1770              }
  9.1771 @@ -1737,7 +1818,7 @@
  9.1772          /// <summary>
  9.1773          ///   Looks up a localized string similar to Account Options.
  9.1774          /// </summary>
  9.1775 -        internal static string Ribbon_GroupAccountsLabel {
  9.1776 +        public static string Ribbon_GroupAccountsLabel {
  9.1777              get {
  9.1778                  return ResourceManager.GetString("Ribbon_GroupAccountsLabel", resourceCulture);
  9.1779              }
  9.1780 @@ -1746,7 +1827,7 @@
  9.1781          /// <summary>
  9.1782          ///   Looks up a localized string similar to View and adjust options maintained for compatibility..
  9.1783          /// </summary>
  9.1784 -        internal static string Ribbon_GroupCompatibilityHelperText {
  9.1785 +        public static string Ribbon_GroupCompatibilityHelperText {
  9.1786              get {
  9.1787                  return ResourceManager.GetString("Ribbon_GroupCompatibilityHelperText", resourceCulture);
  9.1788              }
  9.1789 @@ -1755,7 +1836,7 @@
  9.1790          /// <summary>
  9.1791          ///   Looks up a localized string similar to Compatibility Options.
  9.1792          /// </summary>
  9.1793 -        internal static string Ribbon_GroupCompatibilityLabel {
  9.1794 +        public static string Ribbon_GroupCompatibilityLabel {
  9.1795              get {
  9.1796                  return ResourceManager.GetString("Ribbon_GroupCompatibilityLabel", resourceCulture);
  9.1797              }
  9.1798 @@ -1764,7 +1845,7 @@
  9.1799          /// <summary>
  9.1800          ///   Looks up a localized string similar to Store Protected.
  9.1801          /// </summary>
  9.1802 -        internal static string Ribbon_NeverUnsecure {
  9.1803 +        public static string Ribbon_NeverUnsecure {
  9.1804              get {
  9.1805                  return ResourceManager.GetString("Ribbon_NeverUnsecure", resourceCulture);
  9.1806              }
  9.1807 @@ -1773,7 +1854,7 @@
  9.1808          /// <summary>
  9.1809          ///   Looks up a localized string similar to Ensures that this message is always stored securely on the server by p≡p, independent of server settings..
  9.1810          /// </summary>
  9.1811 -        internal static string Ribbon_NeverUnsecureDesc {
  9.1812 +        public static string Ribbon_NeverUnsecureDesc {
  9.1813              get {
  9.1814                  return ResourceManager.GetString("Ribbon_NeverUnsecureDesc", resourceCulture);
  9.1815              }
  9.1816 @@ -1782,7 +1863,7 @@
  9.1817          /// <summary>
  9.1818          ///   Looks up a localized string similar to Buy.
  9.1819          /// </summary>
  9.1820 -        internal static string Ribbon_UpgradePEP {
  9.1821 +        public static string Ribbon_UpgradePEP {
  9.1822              get {
  9.1823                  return ResourceManager.GetString("Ribbon_UpgradePEP", resourceCulture);
  9.1824              }
  9.1825 @@ -1791,7 +1872,7 @@
  9.1826          /// <summary>
  9.1827          ///   Looks up a localized string similar to Upgrade p≡p reader to the full version and benefit from all privacy features such as sending secure emails..
  9.1828          /// </summary>
  9.1829 -        internal static string Ribbon_UpgradePEPDesc {
  9.1830 +        public static string Ribbon_UpgradePEPDesc {
  9.1831              get {
  9.1832                  return ResourceManager.GetString("Ribbon_UpgradePEPDesc", resourceCulture);
  9.1833              }
  9.1834 @@ -1800,7 +1881,7 @@
  9.1835          /// <summary>
  9.1836          ///   Looks up a localized string similar to Do not show this screen again.
  9.1837          /// </summary>
  9.1838 -        internal static string SplashScreen_DoNotShowAgain {
  9.1839 +        public static string SplashScreen_DoNotShowAgain {
  9.1840              get {
  9.1841                  return ResourceManager.GetString("SplashScreen_DoNotShowAgain", resourceCulture);
  9.1842              }
  9.1843 @@ -1809,7 +1890,7 @@
  9.1844          /// <summary>
  9.1845          ///   Looks up a localized string similar to Send.
  9.1846          /// </summary>
  9.1847 -        internal static string SplashScreen_SendUnsecure {
  9.1848 +        public static string SplashScreen_SendUnsecure {
  9.1849              get {
  9.1850                  return ResourceManager.GetString("SplashScreen_SendUnsecure", resourceCulture);
  9.1851              }
  9.1852 @@ -1818,7 +1899,7 @@
  9.1853          /// <summary>
  9.1854          ///   Looks up a localized string similar to Buy Full Version.
  9.1855          /// </summary>
  9.1856 -        internal static string SplashScreen_UpgradePEP {
  9.1857 +        public static string SplashScreen_UpgradePEP {
  9.1858              get {
  9.1859                  return ResourceManager.GetString("SplashScreen_UpgradePEP", resourceCulture);
  9.1860              }
  9.1861 @@ -1829,7 +1910,7 @@
  9.1862          ///
  9.1863          ///By buying the full version you can protect the privacy of this message..
  9.1864          /// </summary>
  9.1865 -        internal static string SplashScreen_WarningText {
  9.1866 +        public static string SplashScreen_WarningText {
  9.1867              get {
  9.1868                  return ResourceManager.GetString("SplashScreen_WarningText", resourceCulture);
  9.1869              }
  9.1870 @@ -1838,7 +1919,7 @@
  9.1871          /// <summary>
  9.1872          ///   Looks up a localized string similar to 64-bit OS:.
  9.1873          /// </summary>
  9.1874 -        internal static string SystemInfo_64BitOS {
  9.1875 +        public static string SystemInfo_64BitOS {
  9.1876              get {
  9.1877                  return ResourceManager.GetString("SystemInfo_64BitOS", resourceCulture);
  9.1878              }
  9.1879 @@ -1847,7 +1928,7 @@
  9.1880          /// <summary>
  9.1881          ///   Looks up a localized string similar to 64-bit Process:.
  9.1882          /// </summary>
  9.1883 -        internal static string SystemInfo_64BitProcess {
  9.1884 +        public static string SystemInfo_64BitProcess {
  9.1885              get {
  9.1886                  return ResourceManager.GetString("SystemInfo_64BitProcess", resourceCulture);
  9.1887              }
  9.1888 @@ -1856,7 +1937,7 @@
  9.1889          /// <summary>
  9.1890          ///   Looks up a localized string similar to Exception:.
  9.1891          /// </summary>
  9.1892 -        internal static string SystemInfo_Exception {
  9.1893 +        public static string SystemInfo_Exception {
  9.1894              get {
  9.1895                  return ResourceManager.GetString("SystemInfo_Exception", resourceCulture);
  9.1896              }
  9.1897 @@ -1865,7 +1946,7 @@
  9.1898          /// <summary>
  9.1899          ///   Looks up a localized string similar to Language Install:.
  9.1900          /// </summary>
  9.1901 -        internal static string SystemInfo_InstallLanguage {
  9.1902 +        public static string SystemInfo_InstallLanguage {
  9.1903              get {
  9.1904                  return ResourceManager.GetString("SystemInfo_InstallLanguage", resourceCulture);
  9.1905              }
  9.1906 @@ -1874,7 +1955,7 @@
  9.1907          /// <summary>
  9.1908          ///   Looks up a localized string similar to OS Version:.
  9.1909          /// </summary>
  9.1910 -        internal static string SystemInfo_OSVersion {
  9.1911 +        public static string SystemInfo_OSVersion {
  9.1912              get {
  9.1913                  return ResourceManager.GetString("SystemInfo_OSVersion", resourceCulture);
  9.1914              }
  9.1915 @@ -1883,7 +1964,7 @@
  9.1916          /// <summary>
  9.1917          ///   Looks up a localized string similar to Outlook Version:.
  9.1918          /// </summary>
  9.1919 -        internal static string SystemInfo_OutlookVersion {
  9.1920 +        public static string SystemInfo_OutlookVersion {
  9.1921              get {
  9.1922                  return ResourceManager.GetString("SystemInfo_OutlookVersion", resourceCulture);
  9.1923              }
  9.1924 @@ -1892,7 +1973,7 @@
  9.1925          /// <summary>
  9.1926          ///   Looks up a localized string similar to p≡p Engine Version:.
  9.1927          /// </summary>
  9.1928 -        internal static string SystemInfo_PEPEngineVersion {
  9.1929 +        public static string SystemInfo_PEPEngineVersion {
  9.1930              get {
  9.1931                  return ResourceManager.GetString("SystemInfo_PEPEngineVersion", resourceCulture);
  9.1932              }
  9.1933 @@ -1901,7 +1982,7 @@
  9.1934          /// <summary>
  9.1935          ///   Looks up a localized string similar to p≡p Version:.
  9.1936          /// </summary>
  9.1937 -        internal static string SystemInfo_PEPForOutlookVersion {
  9.1938 +        public static string SystemInfo_PEPForOutlookVersion {
  9.1939              get {
  9.1940                  return ResourceManager.GetString("SystemInfo_PEPForOutlookVersion", resourceCulture);
  9.1941              }
  9.1942 @@ -1910,7 +1991,7 @@
  9.1943          /// <summary>
  9.1944          ///   Looks up a localized string similar to Reader.
  9.1945          /// </summary>
  9.1946 -        internal static string SystemInfo_Reader {
  9.1947 +        public static string SystemInfo_Reader {
  9.1948              get {
  9.1949                  return ResourceManager.GetString("SystemInfo_Reader", resourceCulture);
  9.1950              }
  9.1951 @@ -1919,7 +2000,7 @@
  9.1952          /// <summary>
  9.1953          ///   Looks up a localized string similar to Serial:.
  9.1954          /// </summary>
  9.1955 -        internal static string SystemInfo_Serial {
  9.1956 +        public static string SystemInfo_Serial {
  9.1957              get {
  9.1958                  return ResourceManager.GetString("SystemInfo_Serial", resourceCulture);
  9.1959              }
  9.1960 @@ -1928,7 +2009,7 @@
  9.1961          /// <summary>
  9.1962          ///   Looks up a localized string similar to Language UI:.
  9.1963          /// </summary>
  9.1964 -        internal static string SystemInfo_UILanguage {
  9.1965 +        public static string SystemInfo_UILanguage {
  9.1966              get {
  9.1967                  return ResourceManager.GetString("SystemInfo_UILanguage", resourceCulture);
  9.1968              }
    10.1 --- a/Properties/Resources.ca.resx	Sun May 07 13:50:00 2017 +0200
    10.2 +++ b/Properties/Resources.ca.resx	Tue May 30 21:14:43 2017 +0200
    10.3 @@ -138,7 +138,7 @@
    10.4    <data name="Handshake_CancelText" xml:space="preserve">
    10.5      <value>Aturar l'intercanvi</value>
    10.6    </data>
    10.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    10.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    10.9      <value>Confirmar les Trustwords</value>
   10.10    </data>
   10.11    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   10.12 @@ -174,7 +174,7 @@
   10.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   10.14      <value>Trustwords</value>
   10.15    </data>
   10.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   10.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   10.18      <value>Trustwords incorrectes</value>
   10.19    </data>
   10.20    <data name="Language_Catalan" xml:space="preserve">
    11.1 --- a/Properties/Resources.de.resx	Sun May 07 13:50:00 2017 +0200
    11.2 +++ b/Properties/Resources.de.resx	Tue May 30 21:14:43 2017 +0200
    11.3 @@ -147,7 +147,7 @@
    11.4    <data name="Handshake_CancelText" xml:space="preserve">
    11.5      <value>Handshake abbrechen</value>
    11.6    </data>
    11.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    11.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    11.9      <value>Trustwords bestätigen</value>
   11.10    </data>
   11.11    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   11.12 @@ -183,7 +183,7 @@
   11.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   11.14      <value>Trustwords</value>
   11.15    </data>
   11.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   11.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   11.18      <value>Falsche Trustwords</value>
   11.19    </data>
   11.20    <data name="Language_Catalan" xml:space="preserve">
   11.21 @@ -259,7 +259,7 @@
   11.22      <value>Speichern unter</value>
   11.23    </data>
   11.24    <data name="Message_SendError" xml:space="preserve">
   11.25 -    <value>Beim Versenden ist ein unbekannter Fehler aufgetreten. Diese Nachricht ist möglicherweise nicht sicher übertragen worden.</value>
   11.26 +    <value>Beim Versenden ist ein unbekannter Fehler aufgetreten. Diese Nachricht ist möglicherweise nicht sicher.</value>
   11.27    </data>
   11.28    <data name="Message_SendingNoConnection" xml:space="preserve">
   11.29      <value>Es wird eine Internet- oder Mail-Server-Verbindung benötigt, um diese Nachricht sicher zu übertragen. Es wird empfohlen, die Nachricht als Entwurf abzuspeichern, bis wieder eine Verbindung besteht.</value>
   11.30 @@ -651,4 +651,28 @@
   11.31    <data name="Handshake_SyncTypeBExplanationText" xml:space="preserve">
   11.32      <value>Sie sind dabei, ein Gerät in eine andere p≡p-Gerätegruppe zu verschieben. Bitte bestätigen Sie dies, wenn die folgenden Trustwords auf den Geräten übereinstimmen.</value>
   11.33    </data>
   11.34 +  <data name="Message_SendErrorAttachmentSize" xml:space="preserve">
   11.35 +    <value>Die Mailgröße überschreitet die zulässige Größenbeschränkung für die Verschlüsselung.</value>
   11.36 +  </data>
   11.37 +  <data name="Handshake_WrongFingerprint" xml:space="preserve">
   11.38 +    <value>Falscher Fingerprint</value>
   11.39 +  </data>
   11.40 +  <data name="Handshake_TrustwordsExpanderTooltipFull" xml:space="preserve">
   11.41 +    <value>Vollversion der Trustwords anzeigen</value>
   11.42 +  </data>
   11.43 +  <data name="Handshake_TrustwordsExpanderTooltipShort" xml:space="preserve">
   11.44 +    <value>Kurzversion der Trustwords anzeigen</value>
   11.45 +  </data>
   11.46 +  <data name="Handshake_StartTrusting" xml:space="preserve">
   11.47 +    <value>Handshake</value>
   11.48 +  </data>
   11.49 +  <data name="Handshake_StopTrusting" xml:space="preserve">
   11.50 +    <value>Vertrauen aufheben</value>
   11.51 +  </data>
   11.52 +  <data name="Handshake_JoinDeviceGroup" xml:space="preserve">
   11.53 +    <value>Gerät hinzufügen</value>
   11.54 +  </data>
   11.55 +  <data name="Handshake_DoNotJoinDeviceGroup" xml:space="preserve">
   11.56 +    <value>Nicht hinzufügen</value>
   11.57 +  </data>
   11.58  </root>
   11.59 \ No newline at end of file
    12.1 --- a/Properties/Resources.es.resx	Sun May 07 13:50:00 2017 +0200
    12.2 +++ b/Properties/Resources.es.resx	Tue May 30 21:14:43 2017 +0200
    12.3 @@ -138,7 +138,7 @@
    12.4    <data name="Handshake_CancelText" xml:space="preserve">
    12.5      <value>Cancelar Handshake</value>
    12.6    </data>
    12.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    12.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    12.9      <value>Confirmar Trustwords</value>
   12.10    </data>
   12.11    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   12.12 @@ -174,7 +174,7 @@
   12.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   12.14      <value>Trustwords</value>
   12.15    </data>
   12.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   12.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   12.18      <value>Trustwords incorrectas</value>
   12.19    </data>
   12.20    <data name="Language_Catalan" xml:space="preserve">
    13.1 --- a/Properties/Resources.fr.resx	Sun May 07 13:50:00 2017 +0200
    13.2 +++ b/Properties/Resources.fr.resx	Tue May 30 21:14:43 2017 +0200
    13.3 @@ -138,7 +138,7 @@
    13.4    <data name="Handshake_CancelText" xml:space="preserve">
    13.5      <value>Annuler le Handshake</value>
    13.6    </data>
    13.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    13.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    13.9      <value>Confirmer les Trustwords</value>
   13.10    </data>
   13.11    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   13.12 @@ -168,7 +168,7 @@
   13.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   13.14      <value>Trustwords</value>
   13.15    </data>
   13.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   13.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   13.18      <value>Trustwords incorrects</value>
   13.19    </data>
   13.20    <data name="Language_Catalan" xml:space="preserve">
    14.1 --- a/Properties/Resources.hi.resx	Sun May 07 13:50:00 2017 +0200
    14.2 +++ b/Properties/Resources.hi.resx	Tue May 30 21:14:43 2017 +0200
    14.3 @@ -148,7 +148,7 @@
    14.4    <data name="Handshake_CancelText" xml:space="preserve">
    14.5      <value>हाथ मिलाना रद्द करें</value>
    14.6    </data>
    14.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    14.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    14.9      <value>विश्वसनीय शब्दों की पुष्टि करें?</value>
   14.10    </data>
   14.11    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   14.12 @@ -190,7 +190,7 @@
   14.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   14.14      <value>विश्वसनीय शब्द</value>
   14.15    </data>
   14.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   14.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   14.18      <value>गलत विश्वसनीय शब्द</value>
   14.19    </data>
   14.20    <data name="Language_Catalan" xml:space="preserve">
    15.1 --- a/Properties/Resources.it.resx	Sun May 07 13:50:00 2017 +0200
    15.2 +++ b/Properties/Resources.it.resx	Tue May 30 21:14:43 2017 +0200
    15.3 @@ -126,7 +126,7 @@
    15.4    <data name="Handshake_CancelText" xml:space="preserve">
    15.5      <value>Anullare Handshake</value>
    15.6    </data>
    15.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    15.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    15.9      <value>Comfirmare le Trustwords</value>
   15.10    </data>
   15.11    <data name="Handshake_FingerprintText" xml:space="preserve">
   15.12 @@ -150,7 +150,7 @@
   15.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   15.14      <value>Trustwords</value>
   15.15    </data>
   15.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   15.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   15.18      <value>Trustwords errate</value>
   15.19    </data>
   15.20    <data name="Language_Catalan" xml:space="preserve">
    16.1 --- a/Properties/Resources.nl.resx	Sun May 07 13:50:00 2017 +0200
    16.2 +++ b/Properties/Resources.nl.resx	Tue May 30 21:14:43 2017 +0200
    16.3 @@ -138,7 +138,7 @@
    16.4    <data name="Handshake_CancelText" xml:space="preserve">
    16.5      <value>Stop de Handshake</value>
    16.6    </data>
    16.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    16.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    16.9      <value>Bevestig Trustwords</value>
   16.10    </data>
   16.11    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   16.12 @@ -174,7 +174,7 @@
   16.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   16.14      <value>Trustwords</value>
   16.15    </data>
   16.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   16.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   16.18      <value>Verkeerde Trustwords</value>
   16.19    </data>
   16.20    <data name="Language_Catalan" xml:space="preserve">
    17.1 --- a/Properties/Resources.resx	Sun May 07 13:50:00 2017 +0200
    17.2 +++ b/Properties/Resources.resx	Tue May 30 21:14:43 2017 +0200
    17.3 @@ -151,7 +151,7 @@
    17.4    <data name="Handshake_CancelText" xml:space="preserve">
    17.5      <value>Cancel Handshake</value>
    17.6    </data>
    17.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    17.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    17.9      <value>Confirm Trustwords</value>
   17.10    </data>
   17.11    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   17.12 @@ -193,7 +193,7 @@
   17.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   17.14      <value>Trustwords</value>
   17.15    </data>
   17.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   17.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   17.18      <value>Wrong Trustwords</value>
   17.19    </data>
   17.20    <data name="ImageAttachOwnKeyOff" type="System.Resources.ResXFileRef, System.Windows.Forms">
   17.21 @@ -347,7 +347,7 @@
   17.22      <value>Save As</value>
   17.23    </data>
   17.24    <data name="Message_SendError" xml:space="preserve">
   17.25 -    <value>An unexpected error occurred during send and the message may not have been secure.</value>
   17.26 +    <value>An unexpected error occurred during send and the message may not be secure.</value>
   17.27    </data>
   17.28    <data name="Message_SendingNoConnection" xml:space="preserve">
   17.29      <value>An internet or mail server connection is required to securely send this message. It's recommended to save this message as a draft until a connection is re-established.</value>
   17.30 @@ -735,4 +735,28 @@
   17.31    <data name="Language_Marathi" xml:space="preserve">
   17.32      <value>Marathi</value>
   17.33    </data>
   17.34 +  <data name="Message_SendErrorAttachmentSize" xml:space="preserve">
   17.35 +    <value>The mail size exceeds the allowable limit for encryption.</value>
   17.36 +  </data>
   17.37 +  <data name="Handshake_WrongFingerprint" xml:space="preserve">
   17.38 +    <value>Wrong Fingerprint</value>
   17.39 +  </data>
   17.40 +  <data name="Handshake_StartTrusting" xml:space="preserve">
   17.41 +    <value>Start Trusting</value>
   17.42 +  </data>
   17.43 +  <data name="Handshake_StopTrusting" xml:space="preserve">
   17.44 +    <value>Stop Trusting</value>
   17.45 +  </data>
   17.46 +  <data name="Handshake_TrustwordsExpanderTooltipFull" xml:space="preserve">
   17.47 +    <value>Show full version of Trustwords</value>
   17.48 +  </data>
   17.49 +  <data name="Handshake_TrustwordsExpanderTooltipShort" xml:space="preserve">
   17.50 +    <value>Show short version of Trustwords</value>
   17.51 +  </data>
   17.52 +  <data name="Handshake_JoinDeviceGroup" xml:space="preserve">
   17.53 +    <value>Add device</value>
   17.54 +  </data>
   17.55 +  <data name="Handshake_DoNotJoinDeviceGroup" xml:space="preserve">
   17.56 +    <value>Do not add</value>
   17.57 +  </data>
   17.58  </root>
   17.59 \ No newline at end of file
    18.1 --- a/Properties/Resources.tr.resx	Sun May 07 13:50:00 2017 +0200
    18.2 +++ b/Properties/Resources.tr.resx	Tue May 30 21:14:43 2017 +0200
    18.3 @@ -138,7 +138,7 @@
    18.4    <data name="Handshake_CancelText" xml:space="preserve">
    18.5      <value>Handshake İptal</value>
    18.6    </data>
    18.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    18.8 +  <data name="Handshake_ConfirmTrustwords" xml:space="preserve">
    18.9      <value>Trustwords'ü onayla</value>
   18.10    </data>
   18.11    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   18.12 @@ -174,7 +174,7 @@
   18.13    <data name="Handshake_TrustwordsText" xml:space="preserve">
   18.14      <value>Trustwords</value>
   18.15    </data>
   18.16 -  <data name="Handshake_WrongText" xml:space="preserve">
   18.17 +  <data name="Handshake_WrongTrustwords" xml:space="preserve">
   18.18      <value>Hatalı Trustwords</value>
   18.19    </data>
   18.20    <data name="Language_Catalan" xml:space="preserve">
    19.1 --- a/Properties/Resources.zh.resx	Sun May 07 13:50:00 2017 +0200
    19.2 +++ b/Properties/Resources.zh.resx	Tue May 30 21:14:43 2017 +0200
    19.3 @@ -147,9 +147,6 @@
    19.4    <data name="Handshake_CancelText" xml:space="preserve">
    19.5      <value>取消握手</value>
    19.6    </data>
    19.7 -  <data name="Handshake_ConfirmText" xml:space="preserve">
    19.8 -    <value>确认信任词</value>
    19.9 -  </data>
   19.10    <data name="Handshake_ConfirmTrustwordsText" xml:space="preserve">
   19.11      <value>当面或以电话询问您的伙伴:信任词是什么?并与以下显示的正确答案作比较。</value>
   19.12    </data>
   19.13 @@ -183,9 +180,6 @@
   19.14    <data name="Handshake_TrustwordsText" xml:space="preserve">
   19.15      <value>信任词</value>
   19.16    </data>
   19.17 -  <data name="Handshake_WrongText" xml:space="preserve">
   19.18 -    <value>错误的信任词</value>
   19.19 -  </data>
   19.20    <data name="Language_Catalan" xml:space="preserve">
   19.21      <value>加泰罗尼亚语</value>
   19.22    </data>
    20.1 --- a/Resources/Dictionary.xaml	Sun May 07 13:50:00 2017 +0200
    20.2 +++ b/Resources/Dictionary.xaml	Tue May 30 21:14:43 2017 +0200
    20.3 @@ -8,28 +8,21 @@
    20.4       * 
    20.5       ***********************************************************-->
    20.6  
    20.7 -    <Color x:Key="ColorGray">#DCDCDC</Color>
    20.8 +    <Color x:Key="ColorGray">#B5B1B4</Color>
    20.9 +    <Color x:Key="ColorGrayHover">#C5C5C5</Color>
   20.10      <Color x:Key="ColorGrayClick">#D6D6D6</Color>
   20.11 -    <Color x:Key="ColorGrayOver">#C5C5C5</Color>
   20.12  
   20.13      <Color x:Key="ColorGreen">#00AA2B</Color>
   20.14 +    <Color x:Key="ColorGreenHover">#00CB33</Color>
   20.15      <Color x:Key="ColorGreenClick">#55DD78</Color>
   20.16 -    <Color x:Key="ColorGreenOver">#00CB33</Color>
   20.17  
   20.18 -    <Color x:Key="ColorRed">#FF0000</Color>
   20.19 +    <Color x:Key="ColorRed">#E80000</Color>
   20.20 +    <Color x:Key="ColorRedHover">#FF0000</Color>
   20.21      <Color x:Key="ColorRedClick">#E77271</Color>
   20.22 -    <Color x:Key="ColorRedOver">#E80000</Color>
   20.23  
   20.24      <Color x:Key="ColorYellow">#FFD900</Color>
   20.25 +    <Color x:Key="ColorYellowHover">#FFDF30</Color>
   20.26      <Color x:Key="ColorYellowClick">#E6D56C</Color>
   20.27 -    <Color x:Key="ColorYellowOver">#E6C200</Color>
   20.28 -
   20.29 -    <!-- Standard Border colors -->
   20.30 -    <Color x:Key="PressedBorderLightColor">#FF888888</Color>
   20.31 -    <Color x:Key="PressedBorderDarkColor">#FF444444</Color>
   20.32 -
   20.33 -    <Color x:Key="DisabledBorderLightColor">#FFAAAAAA</Color>
   20.34 -    <Color x:Key="DisabledBorderDarkColor">#FF888888</Color>
   20.35  
   20.36      <Color x:Key="DisabledControlLightColor">#FFE8EDF9</Color>
   20.37      <Color x:Key="DisabledControlDarkColor">#FFC5CBF9</Color>
   20.38 @@ -43,31 +36,31 @@
   20.39  
   20.40      <SolidColorBrush x:Key="BrushGray"
   20.41                       Color="{StaticResource ColorGray}" />
   20.42 +    <SolidColorBrush x:Key="BrushGrayHover"
   20.43 +                     Color="{StaticResource ColorGrayHover}" />
   20.44      <SolidColorBrush x:Key="BrushGrayClick"
   20.45                       Color="{StaticResource ColorGrayClick}" />
   20.46 -    <SolidColorBrush x:Key="BrushGrayOver"
   20.47 -                     Color="{StaticResource ColorGrayOver}" />
   20.48  
   20.49      <SolidColorBrush x:Key="BrushGreen"
   20.50                       Color="{StaticResource ColorGreen}" />
   20.51 +    <SolidColorBrush x:Key="BrushGreenHover"
   20.52 +                     Color="{StaticResource ColorGreenHover}" />
   20.53      <SolidColorBrush x:Key="BrushGreenClick"
   20.54                       Color="{StaticResource ColorGreenClick}" />
   20.55 -    <SolidColorBrush x:Key="BrushGreenOver"
   20.56 -                     Color="{StaticResource ColorGreenOver}" />
   20.57  
   20.58      <SolidColorBrush x:Key="BrushRed"
   20.59                       Color="{StaticResource ColorRed}" />
   20.60 +    <SolidColorBrush x:Key="BrushRedHover"
   20.61 +                     Color="{StaticResource ColorRedHover}" />
   20.62      <SolidColorBrush x:Key="BrushRedClick"
   20.63                       Color="{StaticResource ColorRedClick}" />
   20.64 -    <SolidColorBrush x:Key="BrushRedOver"
   20.65 -                     Color="{StaticResource ColorRedOver}" />
   20.66  
   20.67      <SolidColorBrush x:Key="BrushYellow"
   20.68                       Color="{StaticResource ColorYellow}" />
   20.69 +    <SolidColorBrush x:Key="BrushYellowHover"
   20.70 +                     Color="{StaticResource ColorYellowHover}" />
   20.71      <SolidColorBrush x:Key="BrushYellowClick"
   20.72                       Color="{StaticResource ColorYellowClick}" />
   20.73 -    <SolidColorBrush x:Key="BrushYellowOver"
   20.74 -                     Color="{StaticResource ColorYellowOver}" />
   20.75  
   20.76      <SolidColorBrush x:Key="BrushTextBlack"
   20.77                       Color="Black" />
   20.78 @@ -113,10 +106,12 @@
   20.79       * 
   20.80       ***********************************************************-->
   20.81  
   20.82 -    <!-- Style for the handshake 'Cancel' button -->
   20.83 -    <Style x:Key="StyleCancelButton"
   20.84 +    <!-- Style for the handshake 'Trust' button -->
   20.85 +    <Style x:Key="StyleTrustButton"
   20.86             TargetType="Button"
   20.87 -           BasedOn="{StaticResource {x:Type Button}}">
   20.88 +           BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
   20.89 +        <Setter Property="Background"
   20.90 +                Value="{StaticResource BrushYellow}" />
   20.91          <Setter Property="Margin"
   20.92                  Value="0,0,0,0" />
   20.93          <Setter Property="Padding"
   20.94 @@ -149,38 +144,17 @@
   20.95                                            Focusable="False" />
   20.96                      </Border>
   20.97                      <ControlTemplate.Triggers>
   20.98 -                        <Trigger Property="Button.IsDefaulted"
   20.99 -                                 Value="True">
  20.100 -                            <Setter Property="Border.BorderBrush"
  20.101 -                                    TargetName="border">
  20.102 -                                <Setter.Value>
  20.103 -                                    <DynamicResource ResourceKey="{x:Static SystemColors.HighlightBrushKey}" />
  20.104 -                                </Setter.Value>
  20.105 -                            </Setter>
  20.106 -                        </Trigger>
  20.107                          <Trigger Property="UIElement.IsMouseOver"
  20.108                                   Value="True">
  20.109                              <Setter Property="Panel.Background"
  20.110                                      TargetName="border"
  20.111 -                                    Value="{StaticResource BrushGrayOver}" />
  20.112 -                            <Setter Property="Border.BorderBrush"
  20.113 -                                    TargetName="border">
  20.114 -                                <Setter.Value>
  20.115 -                                    <SolidColorBrush>#FF3C7FB1</SolidColorBrush>
  20.116 -                                </Setter.Value>
  20.117 -                            </Setter>
  20.118 +                                    Value="{StaticResource BrushYellowHover}" />
  20.119                          </Trigger>
  20.120                          <Trigger Property="ButtonBase.IsPressed"
  20.121                                   Value="True">
  20.122                              <Setter Property="Panel.Background"
  20.123                                      TargetName="border"
  20.124 -                                    Value="{StaticResource BrushGrayClick}" />
  20.125 -                            <Setter Property="Border.BorderBrush"
  20.126 -                                    TargetName="border">
  20.127 -                                <Setter.Value>
  20.128 -                                    <SolidColorBrush>#FF2C628B</SolidColorBrush>
  20.129 -                                </Setter.Value>
  20.130 -                            </Setter>
  20.131 +                                    Value="{StaticResource BrushYellowClick}" />
  20.132                          </Trigger>
  20.133                          <Trigger Property="UIElement.IsEnabled"
  20.134                                   Value="False">
  20.135 @@ -190,12 +164,6 @@
  20.136                                      <SolidColorBrush>#FFF4F4F4</SolidColorBrush>
  20.137                                  </Setter.Value>
  20.138                              </Setter>
  20.139 -                            <Setter Property="Border.BorderBrush"
  20.140 -                                    TargetName="border">
  20.141 -                                <Setter.Value>
  20.142 -                                    <SolidColorBrush>#FFADB2B5</SolidColorBrush>
  20.143 -                                </Setter.Value>
  20.144 -                            </Setter>
  20.145                              <Setter Property="TextElement.Foreground"
  20.146                                      TargetName="contentPresenter">
  20.147                                  <Setter.Value>
  20.148 @@ -209,10 +177,68 @@
  20.149          </Setter>
  20.150      </Style>
  20.151  
  20.152 +    <!-- Style for the handshake 'Cancel' button -->
  20.153 +    <Style x:Key="StyleCancelButton"
  20.154 +           TargetType="Button"
  20.155 +           BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  20.156 +        <Setter Property="Background"
  20.157 +                Value="{StaticResource BrushGray}" />
  20.158 +        <Setter Property="Foreground"
  20.159 +                Value="{StaticResource BrushTextWhite}" />
  20.160 +        <Setter Property="Margin"
  20.161 +                Value="0,0,0,0" />
  20.162 +        <Setter Property="Padding"
  20.163 +                Value="{StaticResource ButtonPaddingStandard}" />
  20.164 +        <Setter Property="MinHeight"
  20.165 +                Value="28" />
  20.166 +        <Setter Property="MinWidth"
  20.167 +                Value="150" />
  20.168 +        <Setter Property="HorizontalContentAlignment"
  20.169 +                Value="Center" />
  20.170 +        <Setter Property="VerticalContentAlignment"
  20.171 +                Value="Center" />
  20.172 +        <Setter Property="Template">
  20.173 +            <Setter.Value>
  20.174 +                <ControlTemplate TargetType="ButtonBase">
  20.175 +                    <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
  20.176 +                            BorderBrush="{TemplateBinding Border.BorderBrush}"
  20.177 +                            Background="{TemplateBinding Panel.Background}"
  20.178 +                            Name="border"
  20.179 +                            SnapsToDevicePixels="True">
  20.180 +                        <ContentPresenter RecognizesAccessKey="True"
  20.181 +                                          Content="{TemplateBinding ContentControl.Content}"
  20.182 +                                          ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
  20.183 +                                          ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
  20.184 +                                          Name="contentPresenter"
  20.185 +                                          Margin="{TemplateBinding Control.Padding}"
  20.186 +                                          HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
  20.187 +                                          VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
  20.188 +                                          SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
  20.189 +                                          Focusable="False" />
  20.190 +                    </Border>
  20.191 +                    <ControlTemplate.Triggers>
  20.192 +                        <Trigger Property="UIElement.IsMouseOver"
  20.193 +                                 Value="True">
  20.194 +                            <Setter Property="Panel.Background"
  20.195 +                                    TargetName="border"
  20.196 +                                    Value="{StaticResource BrushGrayHover}" />
  20.197 +                        </Trigger>
  20.198 +                        <Trigger Property="ButtonBase.IsPressed"
  20.199 +                                 Value="True">
  20.200 +                            <Setter Property="Panel.Background"
  20.201 +                                    TargetName="border"
  20.202 +                                    Value="{StaticResource BrushGrayClick}" />
  20.203 +                        </Trigger>
  20.204 +                    </ControlTemplate.Triggers>
  20.205 +                </ControlTemplate>
  20.206 +            </Setter.Value>
  20.207 +        </Setter>
  20.208 +    </Style>
  20.209 +
  20.210      <!-- Style for the handshake 'Confirm trustwords' button -->
  20.211      <Style x:Key="StyleConfirmButton"
  20.212             TargetType="Button"
  20.213 -           BasedOn="{StaticResource {x:Type Button}}">
  20.214 +           BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  20.215          <Setter Property="Background"
  20.216                  Value="{StaticResource BrushGreen}" />
  20.217          <Setter Property="Foreground"
  20.218 @@ -249,59 +275,17 @@
  20.219                                            Focusable="False" />
  20.220                      </Border>
  20.221                      <ControlTemplate.Triggers>
  20.222 -                        <Trigger Property="Button.IsDefaulted"
  20.223 -                                 Value="True">
  20.224 -                            <Setter Property="Border.BorderBrush"
  20.225 -                                    TargetName="border">
  20.226 -                                <Setter.Value>
  20.227 -                                    <DynamicResource ResourceKey="{x:Static SystemColors.HighlightBrushKey}" />
  20.228 -                                </Setter.Value>
  20.229 -                            </Setter>
  20.230 -                        </Trigger>
  20.231                          <Trigger Property="UIElement.IsMouseOver"
  20.232                                   Value="True">
  20.233                              <Setter Property="Panel.Background"
  20.234                                      TargetName="border"
  20.235 -                                    Value="{StaticResource BrushGreenOver}" />
  20.236 -                            <Setter Property="Border.BorderBrush"
  20.237 -                                    TargetName="border">
  20.238 -                                <Setter.Value>
  20.239 -                                    <SolidColorBrush>#FF3C7FB1</SolidColorBrush>
  20.240 -                                </Setter.Value>
  20.241 -                            </Setter>
  20.242 +                                    Value="{StaticResource BrushGreenHover}" />
  20.243                          </Trigger>
  20.244                          <Trigger Property="ButtonBase.IsPressed"
  20.245                                   Value="True">
  20.246                              <Setter Property="Panel.Background"
  20.247                                      TargetName="border"
  20.248                                      Value="{StaticResource BrushGreenClick}" />
  20.249 -                            <Setter Property="Border.BorderBrush"
  20.250 -                                    TargetName="border">
  20.251 -                                <Setter.Value>
  20.252 -                                    <SolidColorBrush>#FF2C628B</SolidColorBrush>
  20.253 -                                </Setter.Value>
  20.254 -                            </Setter>
  20.255 -                        </Trigger>
  20.256 -                        <Trigger Property="UIElement.IsEnabled"
  20.257 -                                 Value="False">
  20.258 -                            <Setter Property="Panel.Background"
  20.259 -                                    TargetName="border">
  20.260 -                                <Setter.Value>
  20.261 -                                    <SolidColorBrush>#FFF4F4F4</SolidColorBrush>
  20.262 -                                </Setter.Value>
  20.263 -                            </Setter>
  20.264 -                            <Setter Property="Border.BorderBrush"
  20.265 -                                    TargetName="border">
  20.266 -                                <Setter.Value>
  20.267 -                                    <SolidColorBrush>#FFADB2B5</SolidColorBrush>
  20.268 -                                </Setter.Value>
  20.269 -                            </Setter>
  20.270 -                            <Setter Property="TextElement.Foreground"
  20.271 -                                    TargetName="contentPresenter">
  20.272 -                                <Setter.Value>
  20.273 -                                    <SolidColorBrush>#FF838383</SolidColorBrush>
  20.274 -                                </Setter.Value>
  20.275 -                            </Setter>
  20.276                          </Trigger>
  20.277                      </ControlTemplate.Triggers>
  20.278                  </ControlTemplate>
  20.279 @@ -312,7 +296,7 @@
  20.280      <!-- Style for the handshake 'Wrong trustwords' button -->
  20.281      <Style x:Key="StyleWrongButton"
  20.282             TargetType="Button"
  20.283 -           BasedOn="{StaticResource {x:Type Button}}">
  20.284 +           BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  20.285          <Setter Property="Background"
  20.286                  Value="{StaticResource BrushRed}" />
  20.287          <Setter Property="Foreground"
  20.288 @@ -349,59 +333,17 @@
  20.289                                            Focusable="False" />
  20.290                      </Border>
  20.291                      <ControlTemplate.Triggers>
  20.292 -                        <Trigger Property="Button.IsDefaulted"
  20.293 -                                 Value="True">
  20.294 -                            <Setter Property="Border.BorderBrush"
  20.295 -                                    TargetName="border">
  20.296 -                                <Setter.Value>
  20.297 -                                    <DynamicResource ResourceKey="{x:Static SystemColors.HighlightBrushKey}" />
  20.298 -                                </Setter.Value>
  20.299 -                            </Setter>
  20.300 -                        </Trigger>
  20.301                          <Trigger Property="UIElement.IsMouseOver"
  20.302                                   Value="True">
  20.303                              <Setter Property="Panel.Background"
  20.304                                      TargetName="border"
  20.305 -                                    Value="{StaticResource BrushRedOver}" />
  20.306 -                            <Setter Property="Border.BorderBrush"
  20.307 -                                    TargetName="border">
  20.308 -                                <Setter.Value>
  20.309 -                                    <SolidColorBrush>#FF3C7FB1</SolidColorBrush>
  20.310 -                                </Setter.Value>
  20.311 -                            </Setter>
  20.312 +                                    Value="{StaticResource BrushRedHover}" />
  20.313                          </Trigger>
  20.314                          <Trigger Property="ButtonBase.IsPressed"
  20.315                                   Value="True">
  20.316                              <Setter Property="Panel.Background"
  20.317                                      TargetName="border"
  20.318                                      Value="{StaticResource BrushRedClick}" />
  20.319 -                            <Setter Property="Border.BorderBrush"
  20.320 -                                    TargetName="border">
  20.321 -                                <Setter.Value>
  20.322 -                                    <SolidColorBrush>#FF2C628B</SolidColorBrush>
  20.323 -                                </Setter.Value>
  20.324 -                            </Setter>
  20.325 -                        </Trigger>
  20.326 -                        <Trigger Property="UIElement.IsEnabled"
  20.327 -                                 Value="False">
  20.328 -                            <Setter Property="Panel.Background"
  20.329 -                                    TargetName="border">
  20.330 -                                <Setter.Value>
  20.331 -                                    <SolidColorBrush>#FFF4F4F4</SolidColorBrush>
  20.332 -                                </Setter.Value>
  20.333 -                            </Setter>
  20.334 -                            <Setter Property="Border.BorderBrush"
  20.335 -                                    TargetName="border">
  20.336 -                                <Setter.Value>
  20.337 -                                    <SolidColorBrush>#FFADB2B5</SolidColorBrush>
  20.338 -                                </Setter.Value>
  20.339 -                            </Setter>
  20.340 -                            <Setter Property="TextElement.Foreground"
  20.341 -                                    TargetName="contentPresenter">
  20.342 -                                <Setter.Value>
  20.343 -                                    <SolidColorBrush>#FF838383</SolidColorBrush>
  20.344 -                                </Setter.Value>
  20.345 -                            </Setter>
  20.346                          </Trigger>
  20.347                      </ControlTemplate.Triggers>
  20.348                  </ControlTemplate>
    21.1 --- a/ThisAddIn.cs	Sun May 07 13:50:00 2017 +0200
    21.2 +++ b/ThisAddIn.cs	Tue May 30 21:14:43 2017 +0200
    21.3 @@ -107,7 +107,7 @@
    21.4                              code = language[0].Trim();
    21.5                              code = code.Replace("\"", "");
    21.6  
    21.7 -                            phrase = language[2].Trim();
    21.8 +                            phrase = language[1].Trim();
    21.9                              phrase = phrase.Replace("\"", "");
   21.10  
   21.11                              this._LanguageList.Add(new KeyValuePair<CultureInfo, string>(new CultureInfo(code),
   21.12 @@ -1491,19 +1491,8 @@
   21.13                           * message class "IPM.Note.Secure.pEp" to the mail item, which is needed so that the unencrypted 
   21.14                           * preview on untrusted servers is always visible on the first click.
   21.15                           */
   21.16 -                        bool addSendFolder = false;
   21.17 -                        int versionNo = int.MaxValue;
   21.18 -                        string versionNumber = this.Application.Version.Substring(0, 2);
   21.19 -
   21.20 -                        if (int.TryParse(versionNumber, out versionNo) &&
   21.21 -                            (versionNo <= 14)) // Office 2010 has version number 14...
   21.22 -                        {
   21.23 -                            addSendFolder = true;
   21.24 -                        }
   21.25 -
   21.26 -                        folder = null;
   21.27 -                        if (addSendFolder ||
   21.28 -                            store.GetIsAccountType(Outlook.OlAccountType.olEas))
   21.29 +                        if (store.GetIsAccountType(Outlook.OlAccountType.olEas) || 
   21.30 +                            Globals.GetOutlookVersion() == Globals.Version.Outlook2010)
   21.31                          {
   21.32                              try
   21.33                              {
   21.34 @@ -3395,6 +3384,7 @@
   21.35  
   21.36                      bool forceUnencryptedProperty;
   21.37                      bool isInSecureStore;
   21.38 +                    string sendUnencryptedWarning = Properties.Resources.Message_SendError + Environment.NewLine + Environment.NewLine + Properties.Resources.Message_SendUnencryptedConfirmation;
   21.39                      DialogResult result;
   21.40                      Outlook.Account sendingAccount = null;
   21.41                      Outlook.Store sendingStore = null;
   21.42 @@ -3446,12 +3436,34 @@
   21.43                                       * the original Outlook MailItem. This allows outlook to do all the standard processing for
   21.44                                       * send which greatly reduces the number of possible failure points.
   21.45                                       * 
   21.46 +                                     * If a failure occurs, the original mail item is applied back to the Outlook mail item
   21.47 +                                     * and an error dialog enables the user to send the message unencrypted. We currently 
   21.48 +                                     * differentiate between generic errors and the specific error where the unencrypted message
   21.49 +                                     * size is below the allowable limit, but the PGP/MIME encrypted one exceeds it.
   21.50 +                                     * 
   21.51                                       * Notes:
   21.52                                       * Do NOT include internal Header Fields (MAPI properties) on outgoing messages!
   21.53                                       * The sender does not need to be set as the encrypted content is applied to the original
   21.54                                       * MailItem (setSender=false)
   21.55                                       */
   21.56 -                                    messages[0].ApplyTo(omi, false, false);
   21.57 +                                    try
   21.58 +                                    {
   21.59 +                                        messages[0].ApplyTo(omi, false, false);
   21.60 +                                    }
   21.61 +                                    catch (AttachmentSizeException e)
   21.62 +                                    {
   21.63 +                                        // Adjust warning message for this concrete case
   21.64 +                                        sendUnencryptedWarning = Properties.Resources.Message_SendErrorAttachmentSize + Environment.NewLine + Environment.NewLine + Properties.Resources.Message_SendUnencryptedConfirmation;
   21.65 +                                        Log.Verbose("Application_ItemSend: Error with attachments while applying encrypted message. " + e.Message);
   21.66 +                                        sentMessage.ApplyTo(omi, false, false);
   21.67 +                                        throw;
   21.68 +                                    }
   21.69 +                                    catch (Exception e)
   21.70 +                                    {
   21.71 +                                        Log.Verbose("Application_ItemSend: Error applying encrypted message. " + e.Message);
   21.72 +                                        sentMessage.ApplyTo(omi, false, false);
   21.73 +                                        throw;
   21.74 +                                    }                             
   21.75                                  }
   21.76                                  else
   21.77                                  {
   21.78 @@ -3459,8 +3471,25 @@
   21.79                                      Log.Verbose("Application_ItemSend: Sending message(s).");
   21.80                                      for (int i = 0; i < messages.Length; i++)
   21.81                                      {
   21.82 -                                        // Note: exceptions will be caught in the main try/catch to inform the user of an error
   21.83 -                                        this.SendWithoutProcessing(messages[i], true, false);
   21.84 +                                        /* Send the messages directly and catch errors the same way as in case of
   21.85 +                                         * only one message being applied directly (see above).                                      
   21.86 +                                         */ 
   21.87 +                                        try
   21.88 +                                        {
   21.89 +                                            this.SendWithoutProcessing(messages[i], true, false);
   21.90 +                                        }
   21.91 +                                        catch (AttachmentSizeException e)
   21.92 +                                        {
   21.93 +                                            // Adjust warning message for this concrete case
   21.94 +                                            sendUnencryptedWarning = Properties.Resources.Message_SendErrorAttachmentSize + Environment.NewLine + Environment.NewLine + Properties.Resources.Message_SendUnencryptedConfirmation;
   21.95 +                                            Log.Verbose("Application_ItemSend: Error with attachments while sending encrypted message. " + e.Message);
   21.96 +                                            throw;
   21.97 +                                        }
   21.98 +                                        catch (Exception e)
   21.99 +                                        {
  21.100 +                                            Log.Verbose("Application_ItemSend: Error sending encrypted message. " + e.Message);
  21.101 +                                            throw;
  21.102 +                                        }
  21.103                                      }
  21.104  
  21.105                                      // Save the sent message
  21.106 @@ -3667,8 +3696,7 @@
  21.107                          Log.Error("Application_ItemSend: Send failure, " + ex.ToString());
  21.108  
  21.109                          // Ask the user to continue?
  21.110 -                        result = MessageBox.Show(Properties.Resources.Message_SendError + Environment.NewLine + Environment.NewLine +
  21.111 -                                                 Properties.Resources.Message_SendUnencryptedConfirmation,
  21.112 +                        result = MessageBox.Show(sendUnencryptedWarning,
  21.113                                                   Properties.Resources.Message_TitlePEPError,
  21.114                                                   MessageBoxButtons.YesNo,
  21.115                                                   MessageBoxIcon.Error);
    22.1 --- a/UI/FormControlHandshake.xaml.cs	Sun May 07 13:50:00 2017 +0200
    22.2 +++ b/UI/FormControlHandshake.xaml.cs	Tue May 30 21:14:43 2017 +0200
    22.3 @@ -487,7 +487,7 @@
    22.4                  // Set independent properties
    22.5                  this._AdvancedText = pEp.Properties.Resources.Options_IsAdvancedEnabledText;
    22.6                  this._CancelText = pEp.Properties.Resources.Handshake_CancelText;
    22.7 -                this._ConfirmText = pEp.Properties.Resources.Handshake_ConfirmText;
    22.8 +                this._ConfirmText = pEp.Properties.Resources.Handshake_ConfirmTrustwords;
    22.9                  this._ConfirmTrustwordsText = pEp.Properties.Resources.Handshake_ConfirmTrustwordsText;
   22.10                  this._FingerprintText = pEp.Properties.Resources.Handshake_FingerprintText;
   22.11                  this._Mode = HandshakeMode.Standard;
   22.12 @@ -503,7 +503,7 @@
   22.13                  this._TrustwordsFullText = pEp.Properties.Resources.Handshake_TrustwordsFullText;
   22.14                  this._TrustwordsShortText = pEp.Properties.Resources.Handshake_TrustwordsShortText;
   22.15                  this._TrustwordsText = pEp.Properties.Resources.Handshake_TrustwordsText;
   22.16 -                this._WrongText = pEp.Properties.Resources.Handshake_WrongText;
   22.17 +                this._WrongText = pEp.Properties.Resources.Handshake_WrongTrustwords;
   22.18  
   22.19                  this.RaisePropertyChangedEvent(nameof(this.AdvancedText));
   22.20                  this.RaisePropertyChangedEvent(nameof(this.CancelText));
    23.1 --- a/UI/FormControlPreviewMessage.xaml	Sun May 07 13:50:00 2017 +0200
    23.2 +++ b/UI/FormControlPreviewMessage.xaml	Tue May 30 21:14:43 2017 +0200
    23.3 @@ -246,17 +246,25 @@
    23.4                                  Margin="2">
    23.5                              <Grid>
    23.6                                  <Grid.ColumnDefinitions>
    23.7 -                                    <ColumnDefinition Width="30" />
    23.8                                      <ColumnDefinition Width="*" />
    23.9                                      <ColumnDefinition Width="20" />
   23.10                                  </Grid.ColumnDefinitions>
   23.11                                  <Grid.RowDefinitions>
   23.12                                      <RowDefinition Height="*" />
   23.13 -                                    <RowDefinition Height="*" />
   23.14                                  </Grid.RowDefinitions>
   23.15 +                                <ContentControl MouseDoubleClick="ButtonAttachment_DoubleClick">
   23.16 +                                    <Grid Grid.Column="0" Grid.Row="0">
   23.17 +                                        <Grid.ColumnDefinitions>
   23.18 +                                            <ColumnDefinition Width="30" />
   23.19 +                                            <ColumnDefinition Width="*" />
   23.20 +                                        </Grid.ColumnDefinitions>
   23.21 +                                        <Grid.RowDefinitions>
   23.22 +                                            <RowDefinition Height="*" />
   23.23 +                                            <RowDefinition Height="*" />
   23.24 +                                        </Grid.RowDefinitions>
   23.25  
   23.26 -                                <!-- File icon -->
   23.27 -                                <Image Grid.Column="0"
   23.28 +                                        <!-- File icon -->
   23.29 +                                        <Image Grid.Column="0"
   23.30                                         Grid.Row="0"
   23.31                                         Grid.RowSpan="2"
   23.32                                         Stretch="Uniform"
   23.33 @@ -265,27 +273,28 @@
   23.34                                         VerticalAlignment="Stretch"
   23.35                                         Margin="5" />
   23.36  
   23.37 -                                <!-- File name and size -->
   23.38 -                                <TextBlock Grid.Column="1"
   23.39 +                                        <!-- File name and size -->
   23.40 +                                        <TextBlock Grid.Column="1"
   23.41                                             Grid.Row="0"
   23.42                                             HorizontalAlignment="Stretch"
   23.43                                             VerticalAlignment="Bottom"
   23.44                                             Text="{Binding Path='FileName', Mode=OneWay}" />
   23.45 -                                <TextBlock Grid.Column="1"
   23.46 +                                        <TextBlock Grid.Column="1"
   23.47                                             Grid.Row="1"
   23.48                                             HorizontalAlignment="Stretch"
   23.49                                             VerticalAlignment="Center"
   23.50                                             Text="{Binding Path='FileSizeString', Mode=OneWay}" />
   23.51 -
   23.52 -                                <!-- Attachment actions -->
   23.53 -                                <!-- The button needs to pass both the PEPAttachment and DataContext to the ContextMenu
   23.54 +                                    </Grid>
   23.55 +                                </ContentControl>
   23.56 +                                <Grid Grid.Column="1" Grid.Row="0">
   23.57 +                                    <!-- Attachment actions -->
   23.58 +                                    <!-- The button needs to pass both the PEPAttachment and DataContext to the ContextMenu
   23.59                                       This is a little tricky because the ContextMenu is outside of the visual tree. 
   23.60                                       In order to do this, the Button Tag is set to the DataContext and the Tag is the UserControl DataContext.
   23.61                                       You cannot Set the Button DataContext to the UserControl DataContext or the PEPAttachment is lost. -->
   23.62 -                                <Button Name="ButtonAttachment"
   23.63 -                                        Grid.Column="2"
   23.64 +                                    <Button Name="ButtonAttachment"
   23.65 +                                        Grid.Column="0"
   23.66                                          Grid.Row="0"
   23.67 -                                        Grid.RowSpan="2"
   23.68                                          Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
   23.69                                          BorderThickness="0"
   23.70                                          HorizontalContentAlignment="Center"
   23.71 @@ -296,25 +305,26 @@
   23.72                                          Tag="{Binding Path='DataContext', RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
   23.73                                          DataContext="{Binding Path=.}"
   23.74                                          Click="ButtonAttachment_Click">
   23.75 -                                    <Button.ContextMenu>
   23.76 -                                        <ContextMenu Name="ContextMenuAttachment"
   23.77 +                                        <Button.ContextMenu>
   23.78 +                                            <ContextMenu Name="ContextMenuAttachment"
   23.79                                                       Placement="Bottom"
   23.80                                                       DataContext="{Binding Path='PlacementTarget', RelativeSource={RelativeSource Self}}">
   23.81 -                                            <MenuItem Header="{Binding Path='Tag.OpenText'}"
   23.82 +                                                <MenuItem Header="{Binding Path='Tag.OpenText'}"
   23.83                                                        Tag="{Binding Path='DataContext'}"
   23.84                                                        Click="MenuItemOpen_Click" />
   23.85 -                                            <Separator />
   23.86 -                                            <MenuItem Header="{Binding Path='Tag.SaveAsText'}"
   23.87 +                                                <Separator />
   23.88 +                                                <MenuItem Header="{Binding Path='Tag.SaveAsText'}"
   23.89                                                        Tag="{Binding Path='DataContext'}"
   23.90                                                        Click="MenuItemSaveAs_Click" />
   23.91 -                                        </ContextMenu>
   23.92 -                                    </Button.ContextMenu>
   23.93 -                                    <TextBlock Text="▼"
   23.94 +                                            </ContextMenu>
   23.95 +                                        </Button.ContextMenu>
   23.96 +                                        <TextBlock Text="▼"
   23.97                                                 TextAlignment="Center"
   23.98                                                 FontFamily="Arial"
   23.99                                                 FontSize="9"
  23.100                                                 Foreground="DarkGray" />
  23.101 -                                </Button>
  23.102 +                                    </Button>
  23.103 +                                </Grid>
  23.104                              </Grid>
  23.105                          </Border>
  23.106                      </DataTemplate>
  23.107 @@ -355,4 +365,4 @@
  23.108          </WindowsFormsHost>
  23.109  
  23.110      </Grid>
  23.111 -</UserControl>
  23.112 +</UserControl>
  23.113 \ No newline at end of file
    24.1 --- a/UI/FormControlPreviewMessage.xaml.cs	Sun May 07 13:50:00 2017 +0200
    24.2 +++ b/UI/FormControlPreviewMessage.xaml.cs	Tue May 30 21:14:43 2017 +0200
    24.3 @@ -186,6 +186,17 @@
    24.4              return;
    24.5          }
    24.6  
    24.7 +        private void ButtonAttachment_DoubleClick(object sender, RoutedEventArgs e)
    24.8 +        {
    24.9 +            ContentControl contentControl = sender as ContentControl;
   24.10 +          
   24.11 +            if(contentControl != null && contentControl.DataContext is PEPAttachment)
   24.12 +            {
   24.13 +                ((PEPAttachment)contentControl.DataContext).Open();
   24.14 +            }
   24.15 +            return;
   24.16 +
   24.17 +        }
   24.18          /// <summary>
   24.19          /// Event handler for when the Open context menu item is clicked for an attachment.
   24.20          /// </summary>
    25.1 --- a/UI/FormRegionPrivacyStatus.cs	Sun May 07 13:50:00 2017 +0200
    25.2 +++ b/UI/FormRegionPrivacyStatus.cs	Tue May 30 21:14:43 2017 +0200
    25.3 @@ -1,14 +1,9 @@
    25.4  using pEp.UI;
    25.5  using pEpCOMServerAdapterLib;
    25.6  using System;
    25.7 -using System.Collections.Generic;
    25.8  using System.ComponentModel;
    25.9  using System.Diagnostics;
   25.10 -using System.Linq;
   25.11 -using System.Runtime.InteropServices;
   25.12 -using System.Windows;
   25.13  using System.Windows.Forms;
   25.14 -using System.Windows.Media.Imaging;
   25.15  using Outlook = Microsoft.Office.Interop.Outlook;
   25.16  
   25.17  namespace pEp
   25.18 @@ -98,6 +93,7 @@
   25.19  
   25.20          private CryptableMailItem       cryptableMailItem      = null;
   25.21          private bool                    displayMirrorRequested = false;
   25.22 +        private HandshakeDialog         handshakeDialog        = null;
   25.23          private bool                    isEnabled              = true;
   25.24          private bool?                   isExpandedPrevious     = null;
   25.25          private bool                    isManagerFormEnabled   = true;
   25.26 @@ -172,414 +168,43 @@
   25.27          }
   25.28  
   25.29          /// <summary>
   25.30 -        /// Completes the handshake process when the identity of a partner was previously marked as mistrusted.
   25.31 -        /// </summary>
   25.32 -        /// <param name="myself">The personal identity to complete the handshake with.</param>
   25.33 -        /// <param name="partner">The identity of the partner to complete the handshake with.</param>
   25.34 -        private void DoHandshakeForMistrustedKey(PEPIdentity myself,
   25.35 -                                                 PEPIdentity partner)
   25.36 -        {
   25.37 -            DialogResult result;
   25.38 -
   25.39 -            result = System.Windows.Forms.MessageBox.Show(this.ParentForm,
   25.40 -                                                          pEp.Properties.Resources.Message_WarningMistrustedKey,
   25.41 -                                                          pEp.Properties.Resources.Message_TitleConfirmOperation,
   25.42 -                                                          MessageBoxButtons.YesNo,
   25.43 -                                                          MessageBoxIcon.Warning);
   25.44 -
   25.45 -            if (result == DialogResult.Yes)
   25.46 -            {
   25.47 -                this.DoHandshake(myself, partner);
   25.48 -            }
   25.49 -
   25.50 -            return;
   25.51 -        }
   25.52 -
   25.53 -        /// <summary>
   25.54 -        /// Completes the handshake process where the identity of a partner is confirmed.
   25.55 -        /// </summary>
   25.56 -        /// <param name="myself">The personal identity to complete the handshake with.</param>
   25.57 -        /// <param name="partner">The identity of the partner to complete the handshake with.</param>
   25.58 -        private void DoHandshake(PEPIdentity myself,
   25.59 -                                 PEPIdentity partner)
   25.60 -        {
   25.61 -            DialogResult result;
   25.62 -            FormHandshake handshakeDialog;
   25.63 -
   25.64 -            Log.Verbose("DoHandshake: Handshake started.");
   25.65 -
   25.66 -            // Create and show handshake dialog
   25.67 -            handshakeDialog = new FormHandshake();
   25.68 -            handshakeDialog.StartPosition = FormStartPosition.CenterParent;
   25.69 -            handshakeDialog.DisplayState = new FormControlHandshake.State(myself, partner,
   25.70 -                                                                          Globals.ThisAddIn.Settings.TrustwordsCulture);
   25.71 -
   25.72 -            result = handshakeDialog.ShowDialog(this);
   25.73 -            this.ProcessDoHandshakeResult(result, partner);
   25.74 -
   25.75 -            return;
   25.76 -        }
   25.77 -
   25.78 -        /// <summary>
   25.79 -        /// Processes the result of the do handshake dialog after a user makes a selection.
   25.80 -        /// </summary>
   25.81 -        /// <param name="result">The result of the handshake dialog selection.</param>
   25.82 -        /// <param name="partner">The identity of the partner to handshake with.</param>
   25.83 -        private void ProcessDoHandshakeResult(DialogResult result,
   25.84 -                                              PEPIdentity partner)
   25.85 -        {
   25.86 -            pEpRating partnerIdentityRating;
   25.87 -            pEpColor partnerIdentityColor;
   25.88 -            pEpIdentity identityPartner = ThisAddIn.PEPEngine.UpdateIdentity(partner.ToCOMType());
   25.89 -
   25.90 -            switch (result)
   25.91 -            {
   25.92 -                case DialogResult.Yes:
   25.93 -                    {
   25.94 -                        // Get the rating/color to determine if key was previously mistrusted -- warning to user must be displayed earlier
   25.95 -                        try
   25.96 -                        {
   25.97 -                            partnerIdentityRating = ThisAddIn.PEPEngine.IdentityRating(identityPartner);
   25.98 -                        }
   25.99 -                        catch (COMException ex)
  25.100 -                        {
  25.101 -                            partnerIdentityRating = pEpRating.pEpRatingUndefined;
  25.102 -                            Log.Warning("ProcessDoHandshakeResult: Failed to get identity rating, " + ex.ToString());
  25.103 -                        }
  25.104 -                        partnerIdentityColor = partnerIdentityRating.ToColor();
  25.105 -
  25.106 -                        // Process result
  25.107 -                        try
  25.108 -                        {
  25.109 -                            if (partnerIdentityColor == pEpColor.pEpColorRed)
  25.110 -                            {
  25.111 -                                ThisAddIn.PEPEngine.KeyResetTrust(ref identityPartner);
  25.112 -                            }
  25.113 -
  25.114 -                            identityPartner = ThisAddIn.PEPEngine.TrustPersonalKey(ref identityPartner);
  25.115 -                        }
  25.116 -                        catch (Exception ex)
  25.117 -                        {
  25.118 -                            Log.Error("ProcessDoHandshakeResult: Error occured while trying to set trust: " + ex.ToString());
  25.119 -                        }
  25.120 -
  25.121 -                        this.ImmediateRatingAndUIUpdate();
  25.122 -                        this.UpdateManagePrivacyStatusForm();
  25.123 -
  25.124 -                        break;
  25.125 -                    }
  25.126 -                case DialogResult.No:
  25.127 -                    {
  25.128 -                        try
  25.129 -                        {
  25.130 -                            ThisAddIn.PEPEngine.KeyMistrusted(ref identityPartner);
  25.131 -                        }
  25.132 -                        catch (Exception ex)
  25.133 -                        {
  25.134 -                            Log.Error("ProcessDoHandshakeResult: Error occured while trying to mistrust key: " + ex.ToString());
  25.135 -                        }
  25.136 -
  25.137 -                        this.ImmediateRatingAndUIUpdate();
  25.138 -                        this.UpdateManagePrivacyStatusForm();
  25.139 -
  25.140 -                        break;
  25.141 -                    }
  25.142 -            }
  25.143 -
  25.144 -            Log.Verbose("ProcessDoHandshakeResult: Handshake complete.");
  25.145 -
  25.146 -            return;
  25.147 -        }
  25.148 -
  25.149 -        /// <summary>
  25.150 -        /// Reverses any past handshake confirmation by unconfirming the given identity partner.
  25.151 -        /// </summary>
  25.152 -        /// <param name="partner">The identity of the partner to unconfirm.</param>
  25.153 -        private void UndoHandshake(PEPIdentity partner)
  25.154 -        {
  25.155 -            pEpIdentity identityPartner = ThisAddIn.PEPEngine.UpdateIdentity(partner.ToCOMType());
  25.156 -            ThisAddIn.PEPEngine.KeyResetTrust(ref identityPartner);
  25.157 -
  25.158 -            this.ImmediateRatingAndUIUpdate();
  25.159 -            this.UpdateManagePrivacyStatusForm();
  25.160 -
  25.161 -            return;
  25.162 -        }
  25.163 -
  25.164 -        /// <summary>
  25.165 -        /// Builds a new manager form state using this encryption state/mail item current state.
  25.166 -        /// </summary>
  25.167 -        /// <returns>A new manager form state.</returns>
  25.168 -        private FormControlManagePrivacyStatus.State GetManagerState()
  25.169 -        {
  25.170 -            int currIndex = 0;
  25.171 -            bool isMyself;
  25.172 -            string trustwordsShort;
  25.173 -            BitmapImage imageForceUnencOn;
  25.174 -            BitmapImage imageGreen;
  25.175 -            BitmapImage imageNoColor;
  25.176 -            BitmapImage imageRed;
  25.177 -            BitmapImage imageYellow;
  25.178 -            List<PEPIdentity> identities;
  25.179 -            PEPIdentity identity;
  25.180 -            PEPIdentity myIdentity;
  25.181 -            SelectionItem item;
  25.182 -            FormControlManagePrivacyStatus.State managerState = new FormControlManagePrivacyStatus.State();
  25.183 -
  25.184 -            if (this.cryptableMailItem != null)
  25.185 -            {
  25.186 -                // Load all images from resources
  25.187 -                imageForceUnencOn = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImageForceUnencOn.png", UriKind.RelativeOrAbsolute));
  25.188 -                imageGreen = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImagePrivacyStatusGreen.png", UriKind.RelativeOrAbsolute));
  25.189 -                imageNoColor = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImagePrivacyStatusNoColor.png", UriKind.RelativeOrAbsolute));
  25.190 -                imageRed = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImagePrivacyStatusRed.png", UriKind.RelativeOrAbsolute));
  25.191 -                imageYellow = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImagePrivacyStatusYellow.png", UriKind.RelativeOrAbsolute));
  25.192 -
  25.193 -                // Resolve all recipients -- this ensures the identities list is correctly populated
  25.194 -                this.ResolveAllRecipients();
  25.195 -
  25.196 -                managerState.Rating = this.FormControlPrivacyStatusChild.DisplayState.Rating;
  25.197 -                managerState.IsIncoming = this.cryptableMailItem.IsIncoming;
  25.198 -
  25.199 -                // Get identities
  25.200 -                identities = this.cryptableMailItem.Recipients;
  25.201 -                myIdentity = this.cryptableMailItem.Myself;
  25.202 -
  25.203 -                try
  25.204 -                {
  25.205 -                    myIdentity.Rating = ThisAddIn.PEPEngine.IdentityRating(myIdentity.ToCOMType());
  25.206 -                }
  25.207 -                catch (COMException ex)
  25.208 -                {
  25.209 -                    myIdentity.Rating = pEpRating.pEpRatingUndefined;
  25.210 -                    Log.Warning("GetManagerState: Failed to get myself identity rating, " + ex.ToString());
  25.211 -                }
  25.212 -
  25.213 -                // Include the from identity for incoming messages at the beginning
  25.214 -                identity = this.cryptableMailItem.From;
  25.215 -                if ((this.cryptableMailItem.IsIncoming) &&
  25.216 -                    (identity != null))
  25.217 -                {
  25.218 -                    identities.Insert(0, identity);
  25.219 -                }
  25.220 -
  25.221 -                // Remove own identity in the MailItem from the list
  25.222 -                if (myIdentity != null)
  25.223 -                {
  25.224 -                    for (int i = (identities.Count - 1); i >= 0; i--)
  25.225 -                    {
  25.226 -                        if ((identities[i] != null) &&
  25.227 -                            (identities[i].EqualsByAddress(myIdentity)))
  25.228 -                        {
  25.229 -                            identities.RemoveAt(i);
  25.230 -                        }
  25.231 -                    }
  25.232 -                }
  25.233 -
  25.234 -                // Remove duplicates (by address) and add identities
  25.235 -                identities = PEPIdentity.ToFlatList(identities);
  25.236 -                identities = identities.GroupBy(x => x.Address).Select(x => x.First()).ToList();
  25.237 -                managerState.Identities.Clear();
  25.238 -                foreach (PEPIdentity ident in identities)
  25.239 -                {
  25.240 -                    // Needed so index can be used within anonymous methods without getting into the 'outer variable trap' of currIndex
  25.241 -                    int index = currIndex;
  25.242 -
  25.243 -                    if (ident.IsAddressValid)
  25.244 -                    {
  25.245 -                        // Update the partner identity to get a fingerprint, preserve IsForceUnencrypted
  25.246 -                        pEpIdentity partnerIdentity_s = ThisAddIn.PEPEngine.UpdateIdentity(ident.ToCOMType());
  25.247 -                        PEPIdentity partnerIdentity = new PEPIdentity(partnerIdentity_s);
  25.248 -                        partnerIdentity.IsForceUnencrypted = ident.IsForceUnencrypted;
  25.249 -
  25.250 -                        try
  25.251 -                        {
  25.252 -                            partnerIdentity.Rating = ThisAddIn.PEPEngine.IdentityRating(partnerIdentity_s);
  25.253 -                        }
  25.254 -                        catch (COMException ex)
  25.255 -                        {
  25.256 -                            partnerIdentity.Rating = pEpRating.pEpRatingUndefined;
  25.257 -                            Log.Warning("GetManagerState: Failed to get partner identity rating, " + ex.ToString());
  25.258 -                        }
  25.259 -
  25.260 -                        isMyself = PEPIdentity.GetIsOwnIdentity(partnerIdentity.Address);
  25.261 -
  25.262 -                        // Calculate trustwords
  25.263 -                        trustwordsShort = AdapterExtensions.GetTrustwords(myIdentity,
  25.264 -                                                                          partnerIdentity,
  25.265 -                                                                          Globals.ThisAddIn.Settings.TrustwordsCulture?.TwoLetterISOLanguageName,
  25.266 -                                                                          false);
  25.267 -
  25.268 -                        item = new SelectionItem();
  25.269 -                        item.TextLine1 = partnerIdentity.UserName;
  25.270 -                        item.TextLine2 = partnerIdentity.Address;
  25.271 -                        item.Tag = trustwordsShort;
  25.272 -
  25.273 -                        // Don't show both the user name and address if they are the same
  25.274 -                        if ((item.TextLine1 != null) &&
  25.275 -                            (item.TextLine2 != null) &&
  25.276 -                            (item.TextLine1 == item.TextLine2))
  25.277 -                        {
  25.278 -                            item.IsTwoTextLinesVisible = false;
  25.279 -                        }
  25.280 -
  25.281 -                        // Set image
  25.282 -                        if ((partnerIdentity.IsForceUnencryptedBool) &&
  25.283 -                            (managerState.IsIncoming == false))
  25.284 -                        {
  25.285 -                            item.ItemImage = imageForceUnencOn;
  25.286 -                        }
  25.287 -                        else
  25.288 -                        {
  25.289 -                            switch (partnerIdentity.Rating.ToColor())
  25.290 -                            {
  25.291 -                                case pEpColor.pEpColorGreen:
  25.292 -                                    item.ItemImage = imageGreen;
  25.293 -                                    break;
  25.294 -                                case pEpColor.pEpColorYellow:
  25.295 -                                    item.ItemImage = imageYellow;
  25.296 -                                    break;
  25.297 -                                case pEpColor.pEpColorRed:
  25.298 -                                    item.ItemImage = imageRed;
  25.299 -                                    break;
  25.300 -                                case pEpColor.pEpColorNoColor:
  25.301 -                                    item.ItemImage = imageNoColor;
  25.302 -                                    break;
  25.303 -                                default:
  25.304 -                                    item.ItemImage = null;
  25.305 -                                    break;
  25.306 -                            }
  25.307 -                        }
  25.308 -
  25.309 -                        // Set button
  25.310 -                        if ((isMyself) ||
  25.311 -                            ((partnerIdentity.IsForceUnencryptedBool) &&
  25.312 -                             (managerState.IsIncoming == false)))
  25.313 -                        {
  25.314 -                            item.IsButtonVisible = false;
  25.315 -                            item.IsExpandable = false;
  25.316 -                        }
  25.317 -                        else
  25.318 -                        {
  25.319 -                            switch (partnerIdentity.Rating.ToColor())
  25.320 -                            {
  25.321 -                                case pEpColor.pEpColorGreen:
  25.322 -                                    {
  25.323 -                                        // Undo handshake
  25.324 -                                        item.TextButton = pEp.Properties.Resources.PrivacyStatus_StopTrusting;
  25.325 -                                        item.IsButtonVisible = true;
  25.326 -                                        item.ButtonOnClick = (x, y) => { this.UndoHandshake(partnerIdentity.Copy()); };
  25.327 -
  25.328 -                                        item.IsExpandable = false;
  25.329 -
  25.330 -                                        break;
  25.331 -                                    }
  25.332 -                                case pEpColor.pEpColorYellow:
  25.333 -                                    {
  25.334 -                                        // Do handshake
  25.335 -                                        item.TextButton = pEp.Properties.Resources.PrivacyStatus_Handshake;
  25.336 -                                        item.IsButtonVisible = true;
  25.337 -                                        item.ButtonOnClick = (x, y) => { this.DoHandshake(myIdentity.Copy(), partnerIdentity.Copy()); };
  25.338 -
  25.339 -                                        item.IsExpandable = true;
  25.340 -                                        item.ExpandedText = pEp.Properties.Resources.Handshake_ConfirmTrustwordsText + "\n\n" +
  25.341 -                                                            trustwordsShort;
  25.342 -
  25.343 -                                        item.ExpandedButton1Text = pEp.Properties.Resources.Handshake_ConfirmText;
  25.344 -                                        item.ExpandedButton1OnClick = (x, y) => { this.ProcessDoHandshakeResult(DialogResult.Yes, partnerIdentity.Copy()); };
  25.345 -                                        item.ExpandedButton1Style = (Style)Globals.ResourceDict["StyleConfirmButton"];
  25.346 -
  25.347 -                                        item.ExpandedButton2Text = pEp.Properties.Resources.Handshake_CancelText;
  25.348 -                                        item.ExpandedButton2OnClick = (x, y) =>
  25.349 -                                        {
  25.350 -                                            SelectionItem selItem;
  25.351 -                                            FormControlManagePrivacyStatus.State activeState;
  25.352 -
  25.353 -                                            if (this.managerForm != null)
  25.354 -                                            {
  25.355 -                                                activeState = this.managerForm.DisplayState;
  25.356 -
  25.357 -                                                if ((index >= 0) &&
  25.358 -                                                    (index < activeState.Identities.Count))
  25.359 -                                                {
  25.360 -                                                    selItem = activeState.Identities[index];
  25.361 -                                                    selItem.TextButton = pEp.Properties.Resources.PrivacyStatus_Handshake;
  25.362 -                                                    selItem.IsExpanded = false;
  25.363 -                                                    selItem.IsExpandable = false;
  25.364 -                                                }
  25.365 -                                            }
  25.366 -                                        };
  25.367 -                                        item.ExpandedButton2Style = (Style)Globals.ResourceDict["StyleCancelButton"];
  25.368 -
  25.369 -                                        item.ExpandedButton3Text = pEp.Properties.Resources.Handshake_WrongText;
  25.370 -                                        item.ExpandedButton3OnClick = (x, y) => { this.ProcessDoHandshakeResult(DialogResult.No, partnerIdentity.Copy()); };
  25.371 -                                        item.ExpandedButton3Style = (Style)Globals.ResourceDict["StyleWrongButton"];
  25.372 -
  25.373 -                                        break;
  25.374 -                                    }
  25.375 -                                case pEpColor.pEpColorRed:
  25.376 -                                    {
  25.377 -                                        // Redo handshake with confirmation
  25.378 -                                        item.TextButton = pEp.Properties.Resources.PrivacyStatus_Handshake;
  25.379 -                                        item.IsButtonVisible = true;
  25.380 -                                        item.ButtonOnClick = (x, y) => { this.DoHandshakeForMistrustedKey(myIdentity.Copy(), partnerIdentity.Copy()); };
  25.381 -
  25.382 -                                        item.IsExpandable = false;
  25.383 -
  25.384 -                                        break;
  25.385 -                                    }
  25.386 -                                default:
  25.387 -                                    {
  25.388 -                                        item.IsButtonVisible = false;
  25.389 -                                        item.IsExpandable = false;
  25.390 -                                        break;
  25.391 -                                    }
  25.392 -                            }
  25.393 -                        }
  25.394 -                    }
  25.395 -                    else // Invalid identity
  25.396 -                    {
  25.397 -                        item = new SelectionItem();
  25.398 -                        item.TextLine1 = ident.UserName;
  25.399 -                        item.TextLine2 = ident.Address;
  25.400 -                        item.ItemImage = null;
  25.401 -                        item.IsTwoTextLinesVisible = true;
  25.402 -                        item.IsButtonVisible = false;
  25.403 -                    }
  25.404 -
  25.405 -                    managerState.Identities.Add(item);
  25.406 -                    currIndex++;
  25.407 -                }
  25.408 -            }
  25.409 -
  25.410 -            return (managerState);
  25.411 -        }
  25.412 -
  25.413 -        /// <summary>
  25.414          /// Builds the latest state of the encryption status manager then shows the UI.
  25.415          /// </summary>
  25.416          private void BuildAndShowManager()
  25.417          {
  25.418 -            DialogResult result;
  25.419 -            FormManagePrivacyStatus form;
  25.420 -
  25.421 +            /* Resolve all recipients -- this ensures the identities list is correctly populated
  25.422 +             * 
  25.423 +             * Note: The PropertyChanged changed event must be disconnected before trying to resolve.
  25.424 +             * This is because the resolve process can modify the contents of the mail item which triggers an event.
  25.425 +             * The PropertyChanged event would then trigger a UI refresh cycle. However, because the GetManagerState itself 
  25.426 +             * is called within the UI refresh, an infinite loop could occur trying to resolve a recipient that
  25.427 +             * cannot be resolved (no address).
  25.428 +             */
  25.429              try
  25.430              {
  25.431 -                // Show the form
  25.432 -                form = new FormManagePrivacyStatus();
  25.433 -                form.StartPosition = FormStartPosition.CenterParent;
  25.434 -                form.FormClosed += ManagerForm_FormClosed;
  25.435 -                form.DisplayState = this.GetManagerState();
  25.436 -
  25.437 -                this.managerForm = form;
  25.438 -                result = form.ShowDialog(this.ParentForm);
  25.439 +                this.ResolveAllRecipients();
  25.440              }
  25.441 -            catch (Exception ex)
  25.442 +            catch (Exception e)
  25.443              {
  25.444 -                Globals.StopAndSendCrashReport(ex);
  25.445 +                Log.Verbose("BuildAndShowManager: Error resolving recipients. " + e.Message);
  25.446              }
  25.447  
  25.448 -            return;
  25.449 +            // Build the dialog
  25.450 +            try
  25.451 +            {
  25.452 +                handshakeDialog = new HandshakeDialog(this.cryptableMailItem.Myself,
  25.453 +                                                      this.cryptableMailItem.From,
  25.454 +                                                      this.cryptableMailItem.Recipients,
  25.455 +                                                      this.cryptableMailItem.IsIncoming,
  25.456 +                                                      this.cryptableMailItem.LastProcessedRating);
  25.457 +                handshakeDialog.OnUpdateStatus += HandshakeDialog_Updated;
  25.458 +                handshakeDialog.Closed += HandshakeDialog_Closed;
  25.459 +                handshakeDialog.ShowDialog();
  25.460 +            }
  25.461 +            catch (Exception e)
  25.462 +            {
  25.463 +                Globals.StopAndSendCrashReport(e);
  25.464 +            }
  25.465          }
  25.466  
  25.467          /// <summary>
  25.468 @@ -752,21 +377,12 @@
  25.469          /// Immediately update the manage privacy status form display state.
  25.470          /// This by default will completely rebuild the display state.
  25.471          /// </summary>
  25.472 -        /// <param name="onlyRating">True to update only the rating, false to rebuild the entire display state.</param>
  25.473 -        private void UpdateManagePrivacyStatusForm(bool onlyRating = false)
  25.474 +        private void UpdateManagePrivacyStatusForm()
  25.475          {
  25.476              if (this.managerForm != null)
  25.477              {
  25.478 -                if (onlyRating)
  25.479 -                {
  25.480 -                    // Only update the message rating
  25.481 -                    this.managerForm.DisplayState.Rating = this.FormControlPrivacyStatusChild.DisplayState.Rating;
  25.482 -                }
  25.483 -                else
  25.484 -                {
  25.485 -                    // Rebuild the entire display state which will update any identity changes
  25.486 -                    this.managerForm.DisplayState = this.GetManagerState();
  25.487 -                }
  25.488 +                // Only update the message rating
  25.489 +                this.managerForm.DisplayState.Rating = this.FormControlPrivacyStatusChild.DisplayState.Rating;
  25.490              }
  25.491  
  25.492              return;
  25.493 @@ -1216,7 +832,7 @@
  25.494                              {
  25.495                                  this.FormControlPrivacyStatusChild.DisplayState.Rating = e.ProcessedRating;
  25.496                                  RibbonCustomizations.Invalidate();
  25.497 -                                this.UpdateManagePrivacyStatusForm(true); // Only update the rating
  25.498 +                                this.UpdateManagePrivacyStatusForm(); // Only update the rating
  25.499                              }
  25.500                              catch (Exception ex)
  25.501                              {
  25.502 @@ -1527,6 +1143,57 @@
  25.503          }
  25.504  
  25.505          /// <summary>
  25.506 +        /// Event handler for when a handshake dialog was updated.
  25.507 +        /// </summary>
  25.508 +        private void HandshakeDialog_Updated(object sender, EventArgs e)
  25.509 +        {
  25.510 +            // Update current form region
  25.511 +            this.RequestRatingAndUIUpdate();
  25.512 +
  25.513 +            /* If a handshake is performed while having the same message open both in an inspector
  25.514 +             * and an explorer window, the one that didn't trigger the handshake won't get updated
  25.515 +             * automatically. Therefore, after a handshake, we perform a search for all form regions
  25.516 +             * of type FormRegionPrivacyStatus and update the associated cryptable mail items.
  25.517 +             */
  25.518 +            try
  25.519 +            {
  25.520 +                // Get all form regions
  25.521 +                var formRegions = Globals.FormRegions;
  25.522 +
  25.523 +                foreach (var formRegion in formRegions)
  25.524 +                {
  25.525 +                    var fr = formRegion as FormRegionPrivacyStatus;
  25.526 +
  25.527 +                    if (fr != null)
  25.528 +                    {
  25.529 +                        // Only process the ones that differ from the one that triggered the update.
  25.530 +                        if (fr.cryptableMailItem.Equals(this.cryptableMailItem) == false)
  25.531 +                        {
  25.532 +                            fr.cryptableMailItem.StartProcessing();
  25.533 +                        }
  25.534 +                    }
  25.535 +                }
  25.536 +            }
  25.537 +            catch (Exception ex)
  25.538 +            {
  25.539 +                Log.Error("HandshakeDialog_Updated: Error updating form regions. " + ex.Message);
  25.540 +            }
  25.541 +        }
  25.542 +
  25.543 +        /// <summary>
  25.544 +        /// Event handler for when a handshake dialog was closed.
  25.545 +        /// </summary>
  25.546 +        private void HandshakeDialog_Closed(object sender, EventArgs e)
  25.547 +        {
  25.548 +            if (this.handshakeDialog != null)
  25.549 +            {
  25.550 +                this.handshakeDialog.OnUpdateStatus -= HandshakeDialog_Updated;
  25.551 +                this.handshakeDialog.Closed -= HandshakeDialog_Closed;
  25.552 +                this.handshakeDialog = null;
  25.553 +            }
  25.554 +        }
  25.555 +
  25.556 +        /// <summary>
  25.557          /// Event handler for when the manager form is closed.
  25.558          /// </summary>
  25.559          private void ManagerForm_FormClosed(object sender, FormClosedEventArgs e)
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/UI/HandshakeDialog.xaml	Tue May 30 21:14:43 2017 +0200
    26.3 @@ -0,0 +1,290 @@
    26.4 +<Window x:Class="pEp.UI.HandshakeDialog"
    26.5 +        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    26.6 +        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    26.7 +        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    26.8 +        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    26.9 +        xmlns:core="clr-namespace:System;assembly=mscorlib"
   26.10 +        xmlns:p="clr-namespace:pEp.Properties"
   26.11 +        xmlns:local="clr-namespace:pEp.UI"
   26.12 +        x:ClassModifier="internal"
   26.13 +        mc:Ignorable="d"
   26.14 +        MinHeight="5"
   26.15 +        Height="Auto"
   26.16 +        Width="Auto"
   26.17 +        ResizeMode="NoResize"
   26.18 +        SizeToContent="WidthAndHeight"
   26.19 +        Background="{x:Static SystemColors.MenuBarBrush}"
   26.20 +        Icon="pack://application:,,,/pEp;component/Resources/ImageLogoSmall.png"
   26.21 +        WindowStartupLocation="CenterScreen">
   26.22 +    <Window.Resources>
   26.23 +        <ResourceDictionary>
   26.24 +            <!-- Converters -->
   26.25 +            <BooleanToVisibilityConverter x:Key="BoolToVisibility" />
   26.26 +            <local:IsEnabledToColorConverter x:Key="IsEnabledToColor" />
   26.27 +            <local:IsActiveTabToBoolConverter x:Key="IsActiveTabToBool" />
   26.28 +            <local:ValueConverterGroup x:Key="IsActiveTabToVisibility">
   26.29 +                <local:IsActiveTabToBoolConverter />
   26.30 +                <BooleanToVisibilityConverter />
   26.31 +            </local:ValueConverterGroup>
   26.32 +            <local:ValueConverterGroup x:Key="IsActiveTabToBackground">
   26.33 +                <local:IsActiveTabToBoolConverter />
   26.34 +                <local:BooleanToBackgroundConverter />
   26.35 +            </local:ValueConverterGroup>
   26.36 +            <local:InvertBoolConverter x:Key="InvertBool" />
   26.37 +            <local:MultiBooleanToVisibilityConverter x:Key="MultiBooleanToVisibility" />
   26.38 +            <local:ValueConverterGroup x:Key="InvertBoolToVisibility">
   26.39 +                <local:InvertBoolConverter />
   26.40 +                <BooleanToVisibilityConverter />
   26.41 +            </local:ValueConverterGroup>
   26.42 +            <local:ValueConverterGroup x:Key="IsStandardModeToVisibility">
   26.43 +                <local:IsStandardModeToBoolConverter />
   26.44 +                <BooleanToVisibilityConverter />
   26.45 +            </local:ValueConverterGroup>
   26.46 +            <local:ValueConverterGroup x:Key="IsNotStandardModeToVisibility">
   26.47 +                <local:IsStandardModeToBoolConverter />
   26.48 +                <local:InvertBoolConverter />
   26.49 +                <BooleanToVisibilityConverter />
   26.50 +            </local:ValueConverterGroup>
   26.51 +            <local:ValueConverterGroup x:Key="IsStringEmptyToVisibility">
   26.52 +                <local:IsStringEmptyConverter />
   26.53 +                <local:InvertBoolConverter />
   26.54 +                <BooleanToVisibilityConverter />
   26.55 +            </local:ValueConverterGroup>
   26.56 +
   26.57 +            <!-- Dictionary -->
   26.58 +            <ResourceDictionary.MergedDictionaries>
   26.59 +                <ResourceDictionary Source="pack://application:,,,/pEp;component/Resources/Dictionary.xaml" />
   26.60 +            </ResourceDictionary.MergedDictionaries>
   26.61 +        </ResourceDictionary>
   26.62 +    </Window.Resources>
   26.63 +
   26.64 +    <!--The window content-->
   26.65 +    <StackPanel Margin="10"
   26.66 +                Width="470">
   26.67 +
   26.68 +        <!--Information section-->
   26.69 +        <TextBlock Text="{Binding Path=ExplanationText, Mode=OneWay}"
   26.70 +                   TextWrapping="Wrap"
   26.71 +                   Margin="5,5,5,15" />
   26.72 +
   26.73 +        <!--Identities section-->
   26.74 +        <ItemsControl ItemsSource="{Binding Path=Items}">
   26.75 +            <ItemsControl.ItemTemplate>
   26.76 +                <DataTemplate>
   26.77 +
   26.78 +                    <!--Template for identities-->
   26.79 +                    <StackPanel>
   26.80 +                        <StackPanel.Style>
   26.81 +                            <Style TargetType="StackPanel">
   26.82 +                                <Setter Property="Background"
   26.83 +                                        Value="Transparent" />
   26.84 +                                <Style.Triggers>
   26.85 +                                    <MultiDataTrigger>
   26.86 +                                        <MultiDataTrigger.Conditions>
   26.87 +                                            <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}"
   26.88 +                                                       Value="True" />
   26.89 +                                            <Condition Binding="{Binding Path=IsExpanded}"
   26.90 +                                                       Value="False" />
   26.91 +                                            <Condition Binding="{Binding Path=IsButtonVisible}"
   26.92 +                                                       Value="False" />
   26.93 +                                            <Condition Binding="{Binding Path=IsClickable}"
   26.94 +                                                       Value="True" />
   26.95 +                                        </MultiDataTrigger.Conditions>
   26.96 +                                        <Setter Property="Background"
   26.97 +                                                Value="{x:Static SystemColors.ControlLightBrush}" />
   26.98 +                                    </MultiDataTrigger>
   26.99 +                                </Style.Triggers>
  26.100 +                            </Style>
  26.101 +                        </StackPanel.Style>
  26.102 +
  26.103 +                        <!--The list entry-->
  26.104 +                        <Grid Name="IdentityGrid"
  26.105 +                              Background="Transparent"
  26.106 +                              Margin="5"
  26.107 +                              MinHeight="38"
  26.108 +                              MouseLeftButtonUp="IdentityGrid_MouseLeftButtonUp"
  26.109 +                              Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=Mode, Converter={StaticResource IsStandardModeToVisibility}, ConverterParameter=Standard}">
  26.110 +                            <Grid.ColumnDefinitions>
  26.111 +                                <ColumnDefinition Width="Auto" />
  26.112 +                                <ColumnDefinition Width="*" />
  26.113 +                                <ColumnDefinition Width="Auto" />
  26.114 +                            </Grid.ColumnDefinitions>
  26.115 +
  26.116 +                            <!--The identity rating-->
  26.117 +                            <Image Grid.Column="0"
  26.118 +                                   Height="15"
  26.119 +                                   Stretch="Uniform"
  26.120 +                                   VerticalAlignment="Stretch"
  26.121 +                                   HorizontalAlignment="Center"
  26.122 +                                   Margin="0,0,5,0"
  26.123 +                                   Source="{Binding Path=ItemImage, Mode=OneWay}">
  26.124 +                            </Image>
  26.125 +
  26.126 +                            <!--The identity name-->
  26.127 +                            <TextBlock Grid.Column="1"
  26.128 +                                       HorizontalAlignment="Left"
  26.129 +                                       VerticalAlignment="Center"
  26.130 +                                       Margin="5,0"
  26.131 +                                       Text="{Binding Path=ItemName, Mode=OneWay}" />
  26.132 +
  26.133 +                            <!--Trust button-->
  26.134 +                            <Button Grid.Column="2"
  26.135 +                                    Style="{StaticResource StyleTrustButton}"
  26.136 +                                    Visibility="{Binding Path=IsButtonVisible, Converter={StaticResource BoolToVisibility}}"
  26.137 +                                    Margin="5"
  26.138 +                                    HorizontalAlignment="Right"
  26.139 +                                    Content="{Binding Path=ButtonText, Mode=OneWay}"
  26.140 +                                    Click="ButtonTrust_Click" />
  26.141 +                        </Grid>
  26.142 +
  26.143 +                        <!--Advanced section-->
  26.144 +                        <StackPanel Visibility="{Binding Path=IsExpanded, Converter={StaticResource BoolToVisibility}}">
  26.145 +
  26.146 +                            <!--Tabs-->
  26.147 +                            <StackPanel Orientation="Horizontal"
  26.148 +                                        HorizontalAlignment="Right">
  26.149 +                                <Label Name="TrustwordsTabControl"
  26.150 +                                       MouseLeftButtonUp="TabControl_MouseLeftButtonUp"
  26.151 +                                       Content="{x:Static p:Resources.Handshake_TrustwordsText}"
  26.152 +                                       Visibility="{Binding Path=AreTabControlsVisible, Converter={StaticResource BoolToVisibility}}">
  26.153 +                                    <Label.Style>
  26.154 +                                        <Style TargetType="Label">
  26.155 +                                            <Setter Property="BorderBrush"
  26.156 +                                                    Value="LightGray" />
  26.157 +                                            <Setter Property="Background"
  26.158 +                                                    Value="{Binding Path=ActiveTab, Converter={StaticResource IsActiveTabToBackground}, ConverterParameter=Trustwords}" />
  26.159 +                                            <Setter Property="BorderThickness"
  26.160 +                                                    Value="1" />
  26.161 +                                            <Setter Property="Padding"
  26.162 +                                                    Value="10,5" />
  26.163 +                                            <Style.Triggers>
  26.164 +                                                <MultiDataTrigger>
  26.165 +                                                    <MultiDataTrigger.Conditions>
  26.166 +                                                        <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}"
  26.167 +                                                                   Value="True" />
  26.168 +                                                        <Condition Binding="{Binding Path=ActiveTab, Converter={StaticResource IsActiveTabToBool}, ConverterParameter=Trustwords}"
  26.169 +                                                                   Value="False" />
  26.170 +                                                    </MultiDataTrigger.Conditions>
  26.171 +                                                    <Setter Property="Background"
  26.172 +                                                            Value="AliceBlue" />
  26.173 +                                                    <Setter Property="BorderBrush"
  26.174 +                                                            Value="LightSkyBlue" />
  26.175 +                                                </MultiDataTrigger>
  26.176 +                                            </Style.Triggers>
  26.177 +                                        </Style>
  26.178 +                                    </Label.Style>
  26.179 +                                </Label>
  26.180 +                                <Label Name="FingerprintTabControl"
  26.181 +                                       MouseLeftButtonUp="TabControl_MouseLeftButtonUp"
  26.182 +                                       Content="{x:Static p:Resources.Handshake_FingerprintText}"
  26.183 +                                       Visibility="{Binding Path=AreTabControlsVisible, Converter={StaticResource BoolToVisibility}}">
  26.184 +                                    <Label.Style>
  26.185 +                                        <Style TargetType="Label">
  26.186 +                                            <Setter Property="BorderBrush"
  26.187 +                                                    Value="LightGray" />
  26.188 +                                            <Setter Property="Background"
  26.189 +                                                    Value="{Binding Path=ActiveTab, Converter={StaticResource IsActiveTabToBackground}, ConverterParameter=Fingerprint}" />
  26.190 +                                            <Setter Property="BorderThickness"
  26.191 +                                                    Value="1" />
  26.192 +                                            <Setter Property="Padding"
  26.193 +                                                    Value="10,5" />
  26.194 +                                            <Style.Triggers>
  26.195 +                                                <MultiDataTrigger>
  26.196 +                                                    <MultiDataTrigger.Conditions>
  26.197 +                                                        <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}"
  26.198 +                                                                   Value="True" />
  26.199 +                                                        <Condition Binding="{Binding Path=ActiveTab, Converter={StaticResource IsActiveTabToBool}, ConverterParameter=Fingerprint}"
  26.200 +                                                                   Value="False" />
  26.201 +                                                    </MultiDataTrigger.Conditions>
  26.202 +                                                    <Setter Property="Background"
  26.203 +                                                            Value="AliceBlue" />
  26.204 +                                                    <Setter Property="BorderBrush"
  26.205 +                                                            Value="LightSkyBlue" />
  26.206 +                                                </MultiDataTrigger>
  26.207 +                                            </Style.Triggers>
  26.208 +                                        </Style>
  26.209 +                                    </Label.Style>
  26.210 +                                </Label>
  26.211 +
  26.212 +                                <!--Language selector-->
  26.213 +                                <ComboBox Padding="10,2"
  26.214 +                                          VerticalContentAlignment="Center"
  26.215 +                                          ItemsSource="{Binding Path=TrustwordsCultureList, Mode=OneWay}"
  26.216 +                                          DisplayMemberPath="Value"
  26.217 +                                          SelectedValuePath="Key"
  26.218 +                                          SelectedValue="{Binding Path=TrustwordsCulture, Mode=TwoWay}"
  26.219 +                                          IsEnabled="{Binding Path=ActiveTab, Converter={StaticResource IsActiveTabToBool}, ConverterParameter=Trustwords}"
  26.220 +                                          Foreground="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled, Converter={StaticResource IsEnabledToColor}}" />
  26.221 +                            </StackPanel>
  26.222 +
  26.223 +                            <!-- Trustwords -->
  26.224 +                            <StackPanel Background="White"
  26.225 +                                        Visibility="{Binding Path=ActiveTab, Converter={StaticResource IsActiveTabToVisibility}, ConverterParameter=Trustwords}">
  26.226 +                                <TextBlock Text="{Binding Path=TrustwordsShort}"
  26.227 +                                           Visibility="{Binding Path=AreTrustwordsExpanded, Converter={StaticResource InvertBoolToVisibility}}"
  26.228 +                                           TextWrapping="Wrap"
  26.229 +                                           Padding="10" />
  26.230 +                                <TextBlock Text="{Binding Path=TrustwordsFull}"
  26.231 +                                           Visibility="{Binding Path=AreTrustwordsExpanded, Converter={StaticResource BoolToVisibility}}"
  26.232 +                                           TextWrapping="Wrap"
  26.233 +                                           Padding="10" />
  26.234 +                                <Expander ExpandDirection="Down"
  26.235 +                                          Margin="10,10,5,5"
  26.236 +                                          ToolTip="{Binding Path=ExpanderToolTip, Mode=OneWay}"
  26.237 +                                          Collapsed="Expander_Collapsed"
  26.238 +                                          Expanded="Expander_Expanded" />
  26.239 +                            </StackPanel>
  26.240 +
  26.241 +                            <!--Fingerprints-->
  26.242 +                            <StackPanel Background="White"
  26.243 +                                        Visibility="{Binding Path=ActiveTab, Converter={StaticResource IsActiveTabToVisibility}, ConverterParameter=Fingerprint}">
  26.244 +                                <TextBlock Text="{Binding Path=Partner.UserName}"
  26.245 +                                           Margin="10,10,10,2" />
  26.246 +                                <TextBlock Text="{Binding Path=Partner.UserId}"
  26.247 +                                           Margin="10,2" />
  26.248 +                                <TextBlock Text="{Binding Path=FingerprintPartner}"
  26.249 +                                           Margin="10,2,10,22" />
  26.250 +                                <TextBlock Text="{Binding Path=Myself.UserName}"
  26.251 +                                           Margin="10,10,10,2" />
  26.252 +                                <TextBlock Text="{Binding Path=Myself.UserId}"
  26.253 +                                           Margin="10,2" />
  26.254 +                                <TextBlock Text="{Binding Path=FingerprintMyself}"
  26.255 +                                           Margin="10,2,10,10" />
  26.256 +                            </StackPanel>
  26.257 +
  26.258 +                            <!-- Buttons -->
  26.259 +                            <StackPanel Grid.Row="5"
  26.260 +                                        Orientation="Horizontal"
  26.261 +                                        HorizontalAlignment="Right"
  26.262 +                                        Margin="0,5,0,0">
  26.263 +                                <Button Style="{StaticResource StyleConfirmButton}"
  26.264 +                                        HorizontalAlignment="Left"
  26.265 +                                        Margin="0,5,5,5"
  26.266 +                                        Content="{Binding Path=ExpandedButton1Text, FallbackValue=Confirm}"
  26.267 +                                        Click="ButtonConfirm_Click"
  26.268 +                                        IsDefault="True" />
  26.269 +                                <Button Style="{StaticResource StyleWrongButton}"
  26.270 +                                        HorizontalAlignment="Left"
  26.271 +                                        Margin="5,5,0,5"
  26.272 +                                        Content="{Binding Path=ExpandedButton2Text, FallbackValue=Wrong}"
  26.273 +                                        Click="ButtonWrong_Click" />
  26.274 +                                <Button Style="{StaticResource StyleCancelButton}"
  26.275 +                                        HorizontalAlignment="Left"
  26.276 +                                        Margin="10,5,0,5"
  26.277 +                                        Content="{x:Static p:Resources.Handshake_CancelText}"
  26.278 +                                        Click="ButtonCancel_Click"
  26.279 +                                        Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=Mode, Converter={StaticResource IsNotStandardModeToVisibility}, ConverterParameter=Standard}" />
  26.280 +                            </StackPanel>
  26.281 +                        </StackPanel>
  26.282 +
  26.283 +                        <!--Separator between items-->
  26.284 +                        <Separator Margin="5,5,5,0"
  26.285 +                                   Background="LightGray"
  26.286 +                                   Visibility="{Binding Path=IsSeparatorVisible, Converter={StaticResource BoolToVisibility}}" />
  26.287 +
  26.288 +                    </StackPanel>
  26.289 +                </DataTemplate>
  26.290 +            </ItemsControl.ItemTemplate>
  26.291 +        </ItemsControl>
  26.292 +    </StackPanel>
  26.293 +</Window>
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/UI/HandshakeDialog.xaml.cs	Tue May 30 21:14:43 2017 +0200
    27.3 @@ -0,0 +1,896 @@
    27.4 +using pEpCOMServerAdapterLib;
    27.5 +using System;
    27.6 +using System.Collections.Generic;
    27.7 +using System.Collections.ObjectModel;
    27.8 +using System.ComponentModel;
    27.9 +using System.Linq;
   27.10 +using System.Runtime.InteropServices;
   27.11 +using System.Windows;
   27.12 +using System.Windows.Controls;
   27.13 +using System.Windows.Input;
   27.14 +using System.Windows.Media.Imaging;
   27.15 +
   27.16 +namespace pEp.UI
   27.17 +{
   27.18 +    /// <summary>
   27.19 +    /// Interaction logic for HandshakeDialog.xaml
   27.20 +    /// </summary>
   27.21 +    internal partial class HandshakeDialog : Window,
   27.22 +                                             INotifyPropertyChanged,
   27.23 +                                             Interfaces.IReset
   27.24 +
   27.25 +    {
   27.26 +        public delegate void StatusUpdateHandler(object sender, EventArgs e);
   27.27 +
   27.28 +        /// <summary>
   27.29 +        /// Event raised when the state is updated.
   27.30 +        /// </summary>
   27.31 +        public event StatusUpdateHandler OnUpdateStatus;
   27.32 +
   27.33 +        /// <summary>
   27.34 +        /// Event raised when a property is changed on a component.
   27.35 +        /// </summary>
   27.36 +        public event PropertyChangedEventHandler PropertyChanged;
   27.37 +
   27.38 +        /// <summary>
   27.39 +        /// Enumeration to define the mode of the handshake.
   27.40 +        /// </summary>
   27.41 +        public enum HandshakeMode
   27.42 +        {
   27.43 +            /// <summary>
   27.44 +            /// Standard handshake for use with common messages and identities.
   27.45 +            /// </summary>
   27.46 +            Standard,
   27.47 +
   27.48 +            /// <summary>
   27.49 +            /// Special handshake for use with synchronization.
   27.50 +            /// This is to create a device group.
   27.51 +            /// </summary>
   27.52 +            SyncTypeA,
   27.53 +
   27.54 +            /// <summary>
   27.55 +            /// Special handshake for use with synchronization.
   27.56 +            /// This is to move a device from an existing device group to another one.
   27.57 +            /// </summary>
   27.58 +            SyncTypeB,
   27.59 +
   27.60 +            /// <summary>
   27.61 +            /// Special handshake for use with synchronization.
   27.62 +            /// This is to allow a device to join an existing device group.
   27.63 +            /// </summary>
   27.64 +            SyncTypeC
   27.65 +        }
   27.66 +
   27.67 +        private string                                  _ExplanationText;
   27.68 +        private PEPIdentity                             _From;
   27.69 +        private ObservableCollection<HandshakeItem>     _Items;
   27.70 +        private bool                                    _IsIncoming;
   27.71 +        private pEpRating                               _MessageRating;
   27.72 +        private HandshakeMode                           _Mode;
   27.73 +        private PEPIdentity                             _Myself;
   27.74 +        private List<PEPIdentity>                       _Recipients;
   27.75 +        private PEPIdentity                             _SyncPartner;
   27.76 +
   27.77 +        /**************************************************************
   27.78 +         * 
   27.79 +         * Constructors
   27.80 +         * 
   27.81 +         *************************************************************/
   27.82 +
   27.83 +        /// <summary>
   27.84 +        /// Default constructor.
   27.85 +        /// </summary>
   27.86 +        public HandshakeDialog()
   27.87 +        {
   27.88 +            this.InitializeDialog();
   27.89 +        }
   27.90 +
   27.91 +        /// <summary>
   27.92 +        /// Constructor to build a key sync handshake dialog.
   27.93 +        /// </summary>
   27.94 +        /// <param name="ownIdentity">The Myself identity.</param>
   27.95 +        /// <param name="partnerIdentity">The Partner identity.</param>
   27.96 +        /// <param name="mode">The handshake mode.</param>
   27.97 +        public HandshakeDialog(PEPIdentity ownIdentity,
   27.98 +                               PEPIdentity partnerIdentity,
   27.99 +                               HandshakeMode mode)
  27.100 +        {
  27.101 +            this.InitializeDialog();
  27.102 +
  27.103 +            this.Myself = ownIdentity;
  27.104 +            this.SyncPartner = partnerIdentity;
  27.105 +            this.Mode = mode;
  27.106 +
  27.107 +            this.BuildDialog();
  27.108 +        }
  27.109 +
  27.110 +        /// <summary>
  27.111 +        /// Constructor to build a handshake dialog for a set of recipients.
  27.112 +        /// </summary>
  27.113 +        /// <param name="myself">The Myself identity.</param>
  27.114 +        /// <param name="from">The From Identity.</param>
  27.115 +        /// <param name="recipients">The list of recipients.</param>
  27.116 +        /// <param name="isIncoming">Whether the mail item is incoming or not.</param>
  27.117 +        public HandshakeDialog(PEPIdentity myself,
  27.118 +                               PEPIdentity from,
  27.119 +                               List<PEPIdentity> recipients,
  27.120 +                               bool isIncoming,
  27.121 +                               pEpRating messageRating)
  27.122 +        {
  27.123 +            this.InitializeDialog();
  27.124 +
  27.125 +            this.Myself = myself;
  27.126 +            this.From = from;
  27.127 +            this.IsIncoming = isIncoming;
  27.128 +            this.Recipients = recipients;
  27.129 +            this.MessageRating = messageRating;
  27.130 +
  27.131 +            this.BuildDialog();
  27.132 +        }
  27.133 +
  27.134 +        /**************************************************************
  27.135 +         * 
  27.136 +         * Property Accessors
  27.137 +         * 
  27.138 +         *************************************************************/
  27.139 +
  27.140 +        /// <summary>
  27.141 +        /// Gets or sets the explanatory text in the handshake window
  27.142 +        /// </summary>
  27.143 +        public string ExplanationText
  27.144 +        {
  27.145 +            get { return this._ExplanationText; }
  27.146 +            set
  27.147 +            {
  27.148 +                this._ExplanationText = value;
  27.149 +                this.RaisePropertyChangedEvent(nameof(this.ExplanationText));
  27.150 +            }
  27.151 +        }
  27.152 +
  27.153 +        /// <summary>
  27.154 +        /// Gets or sets the From identity.
  27.155 +        /// </summary>
  27.156 +        public PEPIdentity From
  27.157 +        {
  27.158 +            get { return this._From; }
  27.159 +            set
  27.160 +            {
  27.161 +                this._From = value;
  27.162 +                this.RaisePropertyChangedEvent(nameof(this.From));
  27.163 +            }
  27.164 +        }
  27.165 +
  27.166 +        /// <summary>
  27.167 +        /// Gets or sets the items collection.
  27.168 +        /// </summary>
  27.169 +        public ObservableCollection<HandshakeItem> Items
  27.170 +        {
  27.171 +            get { return this._Items; }
  27.172 +            set
  27.173 +            {
  27.174 +                this._Items = value;
  27.175 +                this.RaisePropertyChangedEvent(nameof(this.Items));
  27.176 +            }
  27.177 +        }
  27.178 +
  27.179 +        /// <summary>
  27.180 +        /// Gets or sets whether the mail is incoming or not.
  27.181 +        /// </summary>
  27.182 +        public bool IsIncoming
  27.183 +        {
  27.184 +            get { return this._IsIncoming; }
  27.185 +            set
  27.186 +            {
  27.187 +                this._IsIncoming = value;
  27.188 +                this.RaisePropertyChangedEvent(nameof(this.IsIncoming));
  27.189 +            }
  27.190 +        }
  27.191 +
  27.192 +        /// <summary>
  27.193 +        /// Gets or sets the message rating.
  27.194 +        /// </summary>
  27.195 +        public pEpRating MessageRating
  27.196 +        {
  27.197 +            get { return (this._MessageRating); }
  27.198 +            set
  27.199 +            {
  27.200 +                this._MessageRating = value;
  27.201 +                this.RaisePropertyChangedEvent(nameof(this.MessageRating));
  27.202 +            }
  27.203 +        }
  27.204 +
  27.205 +        /// <summary>
  27.206 +        /// Gets or sets the mode of the handshake.
  27.207 +        /// </summary>
  27.208 +        public HandshakeMode Mode
  27.209 +        {
  27.210 +            get { return (this._Mode); }
  27.211 +            set
  27.212 +            {
  27.213 +                this._Mode = value;
  27.214 +                this.RaisePropertyChangedEvent(nameof(this.Mode));
  27.215 +            }
  27.216 +        }
  27.217 +
  27.218 +        /// <summary>
  27.219 +        /// Gets or sets the identity of myself.
  27.220 +        /// </summary>
  27.221 +        public PEPIdentity Myself
  27.222 +        {
  27.223 +            get { return (this._Myself); }
  27.224 +            set
  27.225 +            {
  27.226 +                this._Myself = value;
  27.227 +                this.RaisePropertyChangedEvent(nameof(this.Myself));
  27.228 +            }
  27.229 +        }
  27.230 +
  27.231 +        /// <summary>
  27.232 +        /// Gets or sets the list of recipients.
  27.233 +        /// </summary>
  27.234 +        public List<PEPIdentity> Recipients
  27.235 +        {
  27.236 +            get { return (this._Recipients); }
  27.237 +            set
  27.238 +            {
  27.239 +                this._Recipients = value;
  27.240 +                this.RaisePropertyChangedEvent(nameof(this.Recipients));
  27.241 +            }
  27.242 +        }
  27.243 +
  27.244 +        /// <summary>
  27.245 +        /// Gets or sets the sync partner identity.
  27.246 +        /// </summary>
  27.247 +        public PEPIdentity SyncPartner
  27.248 +        {
  27.249 +            get { return (this._SyncPartner); }
  27.250 +            set
  27.251 +            {
  27.252 +                this._SyncPartner = value;
  27.253 +                this.RaisePropertyChangedEvent(nameof(this.SyncPartner));
  27.254 +            }
  27.255 +        }
  27.256 +
  27.257 +        /**************************************************************
  27.258 +         * 
  27.259 +         * Event Handling
  27.260 +         * 
  27.261 +         *************************************************************/
  27.262 +
  27.263 +        /// <summary>
  27.264 +        /// Event handler for when an identity entry was clicked.
  27.265 +        /// </summary>
  27.266 +        private void IdentityGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  27.267 +        {
  27.268 +            Grid grid = sender as Grid;
  27.269 +            if (grid != null)
  27.270 +            {
  27.271 +                HandshakeItem handshakeItem = grid.DataContext as HandshakeItem;
  27.272 +
  27.273 +                if ((handshakeItem != null) &&
  27.274 +                    (handshakeItem.IsClickable))
  27.275 +                {
  27.276 +                    foreach (var item in this._Items)
  27.277 +                    {
  27.278 +                        if (item.Equals(handshakeItem) == false)
  27.279 +                        {
  27.280 +                            item.IsExpanded = false;
  27.281 +                            item.IsButtonVisible = false;
  27.282 +                        }
  27.283 +                    }
  27.284 +
  27.285 +                    if (handshakeItem.IsExpandable)
  27.286 +                    {
  27.287 +                        handshakeItem.IsExpanded = !handshakeItem.IsExpanded;
  27.288 +                    }
  27.289 +                    else
  27.290 +                    {
  27.291 +                        handshakeItem.IsButtonVisible = true;
  27.292 +                    }
  27.293 +                }
  27.294 +            }
  27.295 +        }
  27.296 +
  27.297 +        /// <summary>
  27.298 +        /// Event handler for when a custom tab control is clicked.
  27.299 +        /// </summary>
  27.300 +        private void TabControl_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  27.301 +        {
  27.302 +            Label label = sender as Label;
  27.303 +
  27.304 +            if (label != null)
  27.305 +            {
  27.306 +                HandshakeItem handshakeItem = label.DataContext as HandshakeItem;
  27.307 +
  27.308 +                if (handshakeItem != null)
  27.309 +                {
  27.310 +                    if (label.Name == "TrustwordsTabControl")
  27.311 +                    {
  27.312 +                        handshakeItem.ActiveTab = HandshakeItem.Tabs.Trustwords;
  27.313 +                    }
  27.314 +                    else if (label.Name == "FingerprintTabControl")
  27.315 +                    {
  27.316 +                        handshakeItem.ActiveTab = HandshakeItem.Tabs.Fingerprint;
  27.317 +                    }
  27.318 +                }
  27.319 +            }
  27.320 +        }
  27.321 +
  27.322 +        /// <summary>
  27.323 +        /// Event handler for when a property is changed within the display state.
  27.324 +        /// </summary>
  27.325 +        private void DisplayState_PropertyChanged(object sender, PropertyChangedEventArgs e)
  27.326 +        {
  27.327 +            this.PropertyChanged?.Invoke(this, e);
  27.328 +            return;
  27.329 +        }
  27.330 +
  27.331 +        /// <summary>
  27.332 +        /// Event handler for when the confirm button is clicked.
  27.333 +        /// </summary>
  27.334 +        private void ButtonConfirm_Click(object sender, RoutedEventArgs e)
  27.335 +        {
  27.336 +            // In standard mode, update identity
  27.337 +            if (this._Mode == HandshakeMode.Standard)
  27.338 +            {
  27.339 +                pEpRating partnerIdentityRating;
  27.340 +                pEpColor partnerIdentityColor;
  27.341 +                pEpIdentity identityPartner;
  27.342 +
  27.343 +                Button btn = sender as Button;
  27.344 +                if (btn != null)
  27.345 +                {
  27.346 +                    HandshakeItem handshakeItem = btn.DataContext as HandshakeItem;
  27.347 +                    if ((handshakeItem != null) &&
  27.348 +                        (handshakeItem.Partner != null))
  27.349 +                    {
  27.350 +                        identityPartner = handshakeItem.Partner.ToCOMType();
  27.351 +                        try
  27.352 +                        {
  27.353 +                            identityPartner = ThisAddIn.PEPEngine.UpdateIdentity(identityPartner);
  27.354 +                            partnerIdentityRating = ThisAddIn.PEPEngine.IdentityRating(identityPartner);
  27.355 +                        }
  27.356 +                        catch (COMException ex)
  27.357 +                        {
  27.358 +                            partnerIdentityRating = pEpRating.pEpRatingUndefined;
  27.359 +                            Log.Warning("ButtonConfirm_Click: Failed to get identity rating, " + ex.ToString());
  27.360 +                        }
  27.361 +                        partnerIdentityColor = partnerIdentityRating.ToColor();
  27.362 +
  27.363 +                        // Process result
  27.364 +                        try
  27.365 +                        {
  27.366 +                            if (partnerIdentityColor == pEpColor.pEpColorRed)
  27.367 +                            {
  27.368 +                                ThisAddIn.PEPEngine.KeyResetTrust(ref identityPartner);
  27.369 +                            }
  27.370 +
  27.371 +                            identityPartner = ThisAddIn.PEPEngine.TrustPersonalKey(ref identityPartner);
  27.372 +
  27.373 +                        }
  27.374 +                        catch (Exception ex)
  27.375 +                        {
  27.376 +                            Log.Error("ButtonConfirm_Click: Error occured while trying to set trust: " + ex.ToString());
  27.377 +                        }
  27.378 +
  27.379 +                        this.Reload();
  27.380 +                    }
  27.381 +                }
  27.382 +            }
  27.383 +            // In key sync mode, close window
  27.384 +            else
  27.385 +            {
  27.386 +                this.DialogResult = true;
  27.387 +                this.Close();
  27.388 +            }
  27.389 +        }
  27.390 +
  27.391 +        /// <summary>
  27.392 +        /// Event handler for when the wrong button is clicked.
  27.393 +        /// </summary>
  27.394 +        private void ButtonWrong_Click(object sender, RoutedEventArgs e)
  27.395 +        {
  27.396 +            // In standard mode, update identity
  27.397 +            if (this._Mode == HandshakeMode.Standard)
  27.398 +            {
  27.399 +                Button btn = sender as Button;
  27.400 +                if (btn != null)
  27.401 +                {
  27.402 +                    HandshakeItem handshakeItem = btn.DataContext as HandshakeItem;
  27.403 +                    if ((handshakeItem != null) &&
  27.404 +                        (handshakeItem.Partner != null))
  27.405 +                    {
  27.406 +                        pEpIdentity identityPartner = handshakeItem.Partner.ToCOMType();
  27.407 +
  27.408 +                        // Set the trust to mistrusted
  27.409 +                        try
  27.410 +                        {
  27.411 +                            ThisAddIn.PEPEngine.KeyMistrusted(ref identityPartner);
  27.412 +                        }
  27.413 +                        catch (Exception ex)
  27.414 +                        {
  27.415 +                            Log.Error("ButtonWrong_Click: Error occured while trying to mistrust key: " + ex.ToString());
  27.416 +                        }
  27.417 +
  27.418 +                        this.Reload();
  27.419 +                    }
  27.420 +                }
  27.421 +            }
  27.422 +            // In key sync mode, close window
  27.423 +            else
  27.424 +            {
  27.425 +                this.DialogResult = false;
  27.426 +                this.Close();
  27.427 +            }
  27.428 +        }
  27.429 +
  27.430 +        /// <summary>
  27.431 +        /// Event handler for when the cancel button is clicked.
  27.432 +        /// </summary>
  27.433 +        private void ButtonCancel_Click(object sender, RoutedEventArgs e)
  27.434 +        {
  27.435 +            this.DialogResult = null;
  27.436 +            this.Close();
  27.437 +        }
  27.438 +
  27.439 +        /// <summary>
  27.440 +        /// Event handler for when the start/stop trusting button is clicked.
  27.441 +        /// </summary>
  27.442 +        private void ButtonTrust_Click(object sender, RoutedEventArgs e)
  27.443 +        {
  27.444 +            bool resetTrust = true;
  27.445 +            pEpRating partnerRating = pEpRating.pEpRatingUndefined;
  27.446 +
  27.447 +            Button btn = sender as Button;
  27.448 +            if (btn != null)
  27.449 +            {
  27.450 +                HandshakeItem handshakeItem = btn.DataContext as HandshakeItem;
  27.451 +                if ((handshakeItem != null) &&
  27.452 +                    (handshakeItem.Partner != null))
  27.453 +                {
  27.454 +                    pEpIdentity identityPartner = handshakeItem.Partner.ToCOMType();
  27.455 +
  27.456 +                    try
  27.457 +                    {
  27.458 +                        partnerRating = ThisAddIn.PEPEngine.IdentityRating(ref identityPartner);
  27.459 +                    }
  27.460 +                    catch (Exception ex)
  27.461 +                    {
  27.462 +                        partnerRating = pEpRating.pEpRatingUndefined;
  27.463 +                        Log.Error("ButtonTrust_Click: Could not determine partner trust. " + ex.Message);
  27.464 +                    }
  27.465 +
  27.466 +                    // If partner was previously mistrusted, show warning message
  27.467 +                    if (partnerRating < pEpRating.pEpRatingUndefined)
  27.468 +                    {
  27.469 +                        var result = MessageBox.Show(Properties.Resources.Message_WarningMistrustedKey, Properties.Resources.Message_TitleConfirmOperation, MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
  27.470 +                        resetTrust = (result == MessageBoxResult.Yes);
  27.471 +                    }
  27.472 +
  27.473 +                    if (resetTrust)
  27.474 +                    {
  27.475 +                        // Reset trust. This applies for formerly trusted and mistrusted keys
  27.476 +                        try
  27.477 +                        {
  27.478 +                            ThisAddIn.PEPEngine.KeyResetTrust(ref identityPartner);
  27.479 +                        }
  27.480 +                        catch (Exception ex)
  27.481 +                        {
  27.482 +                            Log.Error("ButtonTrust_Click: Error occured while trying to reset trust: " + ex.ToString());
  27.483 +                        }
  27.484 +
  27.485 +                        this.Reload();
  27.486 +                    }
  27.487 +                }
  27.488 +            }
  27.489 +        }
  27.490 +
  27.491 +        /// <summary>
  27.492 +        /// Event handler for when the expander is collapsed.
  27.493 +        /// </summary>
  27.494 +        private void Expander_Collapsed(object sender, RoutedEventArgs e)
  27.495 +        {
  27.496 +            Expander expander = sender as Expander;
  27.497 +
  27.498 +            if (expander != null)
  27.499 +            {
  27.500 +                HandshakeItem handshakeItem = expander.DataContext as HandshakeItem;
  27.501 +
  27.502 +                if (handshakeItem != null)
  27.503 +                {
  27.504 +                    handshakeItem.AreTrustwordsExpanded = false;
  27.505 +                }
  27.506 +            }
  27.507 +        }
  27.508 +
  27.509 +        /// <summary>
  27.510 +        /// Event handler for when the expander is expanded.
  27.511 +        /// </summary>
  27.512 +        private void Expander_Expanded(object sender, RoutedEventArgs e)
  27.513 +        {
  27.514 +            Expander expander = sender as Expander;
  27.515 +
  27.516 +            if (expander != null)
  27.517 +            {
  27.518 +                HandshakeItem handshakeItem = expander.DataContext as HandshakeItem;
  27.519 +
  27.520 +                if (handshakeItem != null)
  27.521 +                {
  27.522 +                    handshakeItem.AreTrustwordsExpanded = true;
  27.523 +                }
  27.524 +            }
  27.525 +        }
  27.526 +
  27.527 +        /**************************************************************
  27.528 +         * 
  27.529 +         * Methods
  27.530 +         * 
  27.531 +         *************************************************************/
  27.532 +
  27.533 +        /// <summary>
  27.534 +        /// Initializes the dialog.
  27.535 +        /// </summary>
  27.536 +        private void InitializeDialog()
  27.537 +        {
  27.538 +            this.InitializeComponent();
  27.539 +            this.DataContext = this;
  27.540 +
  27.541 +            this.Reset();
  27.542 +        }
  27.543 +
  27.544 +        /// <summary>
  27.545 +        /// Raises the property changed event, if possible, with the given arguments.
  27.546 +        /// </summary>
  27.547 +        /// <param name="propertyName">The name of the property that changed.</param>
  27.548 +        private void RaisePropertyChangedEvent(string propertyName)
  27.549 +        {
  27.550 +            this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  27.551 +            return;
  27.552 +        }
  27.553 +
  27.554 +        /// <summary>
  27.555 +        /// Reloads the current state.
  27.556 +        /// </summary>
  27.557 +        public void Reload()
  27.558 +        {
  27.559 +            // Rebuild state
  27.560 +            this.BuildDialog();
  27.561 +
  27.562 +            // Raise updated event
  27.563 +            OnUpdateStatus(null, new EventArgs());
  27.564 +        }
  27.565 +
  27.566 +        /// <summary>
  27.567 +        /// Builds a new key sync state.
  27.568 +        /// </summary>
  27.569 +        /// <param name="ownIdentity">The own identity.</param>
  27.570 +        /// <param name="partnerIdentity">The partner identity.</param>
  27.571 +        /// <param name="mode">The handshake mode.</param>
  27.572 +        public void BuildSyncState(PEPIdentity ownIdentity,
  27.573 +                                   PEPIdentity partnerIdentity,
  27.574 +                                   HandshakeMode mode)
  27.575 +        {
  27.576 +            this.Items = new ObservableCollection<HandshakeItem>();
  27.577 +
  27.578 +
  27.579 +        }
  27.580 +
  27.581 +        /// <summary>
  27.582 +        /// Builds the dialog.
  27.583 +        /// </summary>
  27.584 +        public void BuildDialog()
  27.585 +        {
  27.586 +            bool isMyself;
  27.587 +            bool addItemToDialog;
  27.588 +            int expandedItemCount = 0;
  27.589 +            int index = 0;
  27.590 +            BitmapImage imageForceUnencOn;
  27.591 +            BitmapImage imageGreen;
  27.592 +            BitmapImage imageNoColor;
  27.593 +            BitmapImage imageRed;
  27.594 +            BitmapImage imageYellow;
  27.595 +            HandshakeItem item;
  27.596 +
  27.597 +            this.Items = new ObservableCollection<HandshakeItem>();
  27.598 +
  27.599 +            if (this._Mode == HandshakeMode.Standard) // Standard dialog
  27.600 +            {
  27.601 +                // Use standard wording
  27.602 +                this.Title = Properties.Resources.Handshake_StandardFormText;
  27.603 +                this.ExplanationText = Properties.Resources.Handshake_StandardExplanationText;
  27.604 +
  27.605 +                // Load all images from resources
  27.606 +                imageForceUnencOn = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImageForceUnencOn.png", UriKind.RelativeOrAbsolute));
  27.607 +                imageGreen = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImagePrivacyStatusGreen.png", UriKind.RelativeOrAbsolute));
  27.608 +                imageNoColor = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImagePrivacyStatusNoColor.png", UriKind.RelativeOrAbsolute));
  27.609 +                imageRed = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImagePrivacyStatusRed.png", UriKind.RelativeOrAbsolute));
  27.610 +                imageYellow = new BitmapImage(new Uri("pack://application:,,,/pEp;component/Resources/ImagePrivacyStatusYellow.png", UriKind.RelativeOrAbsolute));
  27.611 +
  27.612 +                // Get own identity rating
  27.613 +                try
  27.614 +                {
  27.615 +                    this.Myself.Rating = ThisAddIn.PEPEngine.IdentityRating(this.Myself.ToCOMType());
  27.616 +                }
  27.617 +                catch (COMException ex)
  27.618 +                {
  27.619 +                    this.Myself.Rating = pEpRating.pEpRatingUndefined;
  27.620 +                    Log.Warning("BuildState: Failed to get myself identity rating, " + ex.ToString());
  27.621 +                }
  27.622 +
  27.623 +                // Include the from identity for incoming messages at the beginning
  27.624 +                if ((IsIncoming) &&
  27.625 +                    (this.From != null) &&
  27.626 +                    (this.Recipients != null))
  27.627 +                {
  27.628 +                    Recipients.Insert(0, this.From);
  27.629 +                }
  27.630 +
  27.631 +                // Remove own identity from the list
  27.632 +                if ((this.Myself != null) &&
  27.633 +                    (this.Recipients != null))
  27.634 +                {
  27.635 +                    for (int i = (this.Recipients.Count - 1); i >= 0; i--)
  27.636 +                    {
  27.637 +                        if ((this.Recipients[i] != null) &&
  27.638 +                            (this.Recipients[i].EqualsByAddress(this.Myself)))
  27.639 +                        {
  27.640 +                            this.Recipients.RemoveAt(i);
  27.641 +                        }
  27.642 +                    }
  27.643 +                }
  27.644 +
  27.645 +                // Remove duplicates (by address) and add identities
  27.646 +                if (this.Recipients != null)
  27.647 +                {
  27.648 +                    this.Recipients = PEPIdentity.ToFlatList(this.Recipients);
  27.649 +                    this.Recipients = this.Recipients.GroupBy(x => x.Address).Select(x => x.First()).ToList();
  27.650 +                    foreach (PEPIdentity ident in this.Recipients)
  27.651 +                    {
  27.652 +                        item = new HandshakeItem();
  27.653 +
  27.654 +                        if (ident.IsAddressValid)
  27.655 +                        {
  27.656 +                            addItemToDialog = true;
  27.657 +
  27.658 +                            // Update the partner identity to get a fingerprint, preserve IsForceUnencrypted
  27.659 +                            pEpIdentity partnerIdentity_s = ThisAddIn.PEPEngine.UpdateIdentity(ident.ToCOMType());
  27.660 +                            PEPIdentity partnerIdentity = new PEPIdentity(partnerIdentity_s);
  27.661 +                            partnerIdentity.IsForceUnencrypted = ident.IsForceUnencrypted;
  27.662 +
  27.663 +                            try
  27.664 +                            {
  27.665 +                                partnerIdentity.Rating = ThisAddIn.PEPEngine.IdentityRating(partnerIdentity_s);
  27.666 +                            }
  27.667 +                            catch (COMException ex)
  27.668 +                            {
  27.669 +                                partnerIdentity.Rating = pEpRating.pEpRatingUndefined;
  27.670 +                                Log.Warning("BuildState: Failed to get partner identity rating, " + ex.ToString());
  27.671 +                            }
  27.672 +
  27.673 +                            isMyself = PEPIdentity.GetIsOwnIdentity(partnerIdentity.Address);
  27.674 +
  27.675 +                            item.Myself = this.Myself;
  27.676 +                            item.Partner = partnerIdentity;
  27.677 +                            item.ItemName = partnerIdentity.UserName;
  27.678 +
  27.679 +                            // Check if PGP user and show fingerprint tab in this case
  27.680 +                            if ((partnerIdentity_s.CommType == pEpComType.pEpCtOpenPGPUnconfirmed) ||
  27.681 +                                (partnerIdentity_s.CommType == pEpComType.pEpCtOpenPGP))
  27.682 +                            {
  27.683 +                                item.AreTabControlsVisible = true;
  27.684 +                            }
  27.685 +
  27.686 +#warning Remove this line once OUT-259 is fixed
  27.687 +                            item.ActiveTab = HandshakeItem.Tabs.Trustwords;
  27.688 +
  27.689 +                            // Set image
  27.690 +                            if ((partnerIdentity.IsForceUnencryptedBool) &&
  27.691 +                                (this.IsIncoming == false))
  27.692 +                            {
  27.693 +                                item.ItemImage = imageForceUnencOn;
  27.694 +                            }
  27.695 +                            else
  27.696 +                            {
  27.697 +                                switch (partnerIdentity.Rating.ToColor())
  27.698 +                                {
  27.699 +                                    case pEpColor.pEpColorGreen:
  27.700 +                                        item.ItemImage = imageGreen;
  27.701 +                                        break;
  27.702 +                                    case pEpColor.pEpColorYellow:
  27.703 +                                        item.ItemImage = imageYellow;
  27.704 +                                        break;
  27.705 +                                    case pEpColor.pEpColorRed:
  27.706 +                                        item.ItemImage = imageRed;
  27.707 +                                        break;
  27.708 +                                    case pEpColor.pEpColorNoColor:
  27.709 +                                        item.ItemImage = imageNoColor;
  27.710 +                                        break;
  27.711 +                                    default:
  27.712 +                                        item.ItemImage = null;
  27.713 +                                        break;
  27.714 +                                }
  27.715 +                            }
  27.716 +
  27.717 +                            // Identities that cannot be interacted with are getting filtered out
  27.718 +                            if ((isMyself) ||
  27.719 +                                ((partnerIdentity.IsForceUnencryptedBool) &&
  27.720 +                                 (this.IsIncoming == false)))
  27.721 +                            {
  27.722 +                                addItemToDialog = false;
  27.723 +                            }
  27.724 +                            else
  27.725 +                            {
  27.726 +                                switch (partnerIdentity.Rating.ToColor())
  27.727 +                                {
  27.728 +                                    case pEpColor.pEpColorGreen:
  27.729 +                                        {
  27.730 +                                            // Undo handshake
  27.731 +                                            item.IsButtonVisible = (expandedItemCount++ == 0);
  27.732 +                                            item.ButtonText = pEp.Properties.Resources.PrivacyStatus_StopTrusting;
  27.733 +
  27.734 +                                            break;
  27.735 +                                        }
  27.736 +                                    case pEpColor.pEpColorYellow:
  27.737 +                                        {
  27.738 +                                            // Do handshake
  27.739 +                                            item.IsExpandable = true;
  27.740 +                                            item.IsExpanded = (expandedItemCount++ == 0);
  27.741 +
  27.742 +                                            break;
  27.743 +                                        }
  27.744 +                                    case pEpColor.pEpColorRed:
  27.745 +                                        {
  27.746 +                                            // Redo handshake with confirmation
  27.747 +                                            item.IsButtonVisible = (expandedItemCount++ == 0);
  27.748 +                                            item.ButtonText = pEp.Properties.Resources.PrivacyStatus_Handshake;
  27.749 +
  27.750 +                                            break;
  27.751 +                                        }
  27.752 +                                    // Do not add to list
  27.753 +                                    case pEpColor.pEpColorNoColor:
  27.754 +                                    default:
  27.755 +                                        {
  27.756 +                                            addItemToDialog = false;
  27.757 +                                            break;
  27.758 +                                        }
  27.759 +                                }
  27.760 +                            }
  27.761 +                        }
  27.762 +                        else // Invalid identity
  27.763 +                        {
  27.764 +                            addItemToDialog = false;
  27.765 +                        }
  27.766 +
  27.767 +                        index++;
  27.768 +
  27.769 +                        if (addItemToDialog)
  27.770 +                        {
  27.771 +                            item.IsSeparatorVisible = (index != this.Recipients.Count);
  27.772 +
  27.773 +                            this.Items.Add(item);
  27.774 +                        }
  27.775 +                    }
  27.776 +                }
  27.777 +                else
  27.778 +                {
  27.779 +                    Log.Error("BuildState: Recipients list is null.");
  27.780 +                }
  27.781 +
  27.782 +                /* If no item was added to the list, it means that no action can be taken. The dialog
  27.783 +                 * then opens with only a text, which has to be adjusted according to the message's UI rating.
  27.784 +                 */ 
  27.785 +                if (this.Items?.Count == 0)
  27.786 +                {
  27.787 +                    switch (this._MessageRating)
  27.788 +                    {                
  27.789 +                        case pEpRating.pEpRatingCannotDecrypt:
  27.790 +                        case pEpRating.pEpRatingHaveNoKey:
  27.791 +                            if (this._IsIncoming)
  27.792 +                            {
  27.793 +                                this.ExplanationText = Properties.Resources.PrivacyStatus_RatingHaveNoKeyExplanation + " " + Properties.Resources.PrivacyStatus_RatingHaveNoKeySuggestionIncoming;
  27.794 +                            }
  27.795 +                            else
  27.796 +                            {
  27.797 +                                this.ExplanationText = Properties.Resources.PrivacyStatus_RatingHaveNoKeyExplanation + " " + Properties.Resources.PrivacyStatus_RatingHaveNoKeySuggestionOutgoing;
  27.798 +                            }
  27.799 +                            break;
  27.800 +                        case pEpRating.pEpRatingUnencrypted:
  27.801 +                            this.ExplanationText = Properties.Resources.PrivacyStatus_RatingUnencryptedExplanation + " " + Properties.Resources.PrivacyStatus_RatingUnencryptedSuggestion;
  27.802 +                            break;
  27.803 +                        case pEpRating.pEpRatingUnencryptedForSome:
  27.804 +                            this.ExplanationText = Properties.Resources.PrivacyStatus_RatingUnencryptedForSomeExplanation + " " + Properties.Resources.PrivacyStatus_RatingUnencryptedForSomeSuggestion;
  27.805 +                            break;
  27.806 +                        case pEpRating.pEpRatingUnreliable:
  27.807 +                            this.ExplanationText = Properties.Resources.PrivacyStatus_RatingUnreliableExplanation + " " + Properties.Resources.PrivacyStatus_RatingUnreliableSuggestion;
  27.808 +                            break;
  27.809 +                        case pEpRating.pEpRatingReliable:
  27.810 +                            this.ExplanationText = Properties.Resources.PrivacyStatus_RatingReliableExplanation;
  27.811 +                            break;
  27.812 +                        case pEpRating.pEpRatingTrusted:
  27.813 +                        case pEpRating.pEpRatingTrustedAndAnonymized:
  27.814 +                        case pEpRating.pEpRatingFullyAnonymous:
  27.815 +                            this.ExplanationText = Properties.Resources.PrivacyStatus_RatingTrustedExplanation + " " + Properties.Resources.PrivacyStatus_RatingTrustedSuggestion;
  27.816 +                            break;
  27.817 +                        case pEpRating.pEpRatingMistrust:
  27.818 +                            this.ExplanationText = Properties.Resources.PrivacyStatus_RatingMistrustExplanation;
  27.819 +                            break;
  27.820 +                        case pEpRating.pEpRatingB0rken:
  27.821 +                            this.ExplanationText = Properties.Resources.PrivacyStatus_RatingBrokenExplanation + " " + Properties.Resources.PrivacyStatus_RatingBrokenSuggestion;
  27.822 +                            break;
  27.823 +                        case pEpRating.pEpRatingUnderAttack:
  27.824 +                            this.ExplanationText = Properties.Resources.PrivacyStatus_RatingUnderAttackExplanation + " " + Properties.Resources.PrivacyStatus_RatingUnderAttackSuggestion;
  27.825 +                            break;
  27.826 +                        case pEpRating.pEpRatingUndefined:
  27.827 +                        default:
  27.828 +                            if (this._IsIncoming)
  27.829 +                            {
  27.830 +                                this.ExplanationText = Properties.Resources.PrivacyStatus_RatingUndefinedExplanation + " " + Properties.Resources.PrivacyStatus_RatingUndefinedSuggestionIncoming;
  27.831 +                            }
  27.832 +                            else
  27.833 +                            {
  27.834 +                                this.ExplanationText = Properties.Resources.PrivacyStatus_RatingUndefinedExplanation + " " + Properties.Resources.PrivacyStatus_RatingUndefinedSuggestionIncoming;
  27.835 +                            }
  27.836 +                            break;
  27.837 +                    }
  27.838 +                }
  27.839 +            }
  27.840 +            else // Build key sync dialog
  27.841 +            {
  27.842 +                // Create one single sync item and add it to collection
  27.843 +                item = new HandshakeItem();
  27.844 +
  27.845 +                try
  27.846 +                {
  27.847 +                    item.Myself = this._Myself;
  27.848 +                    item.Partner = this._SyncPartner;
  27.849 +                    item.IsClickable = false;
  27.850 +                    item.IsExpanded = true;
  27.851 +                    item.IsSeparatorVisible = false;
  27.852 +                    item.ActiveTab = HandshakeItem.Tabs.Trustwords;
  27.853 +
  27.854 +                    // Adapt wording according to handshake mode
  27.855 +                    switch (this._Mode)
  27.856 +                    {
  27.857 +                        case HandshakeMode.SyncTypeA:
  27.858 +                            this.ExplanationText = Properties.Resources.Handshake_SyncTypeAExplanationText;
  27.859 +                            this.Title = Properties.Resources.Handshake_SyncFormText;
  27.860 +                            break;
  27.861 +                        case HandshakeMode.SyncTypeB:
  27.862 +                            this.ExplanationText = Properties.Resources.Handshake_SyncTypeBExplanationText;
  27.863 +                            this.Title = Properties.Resources.Handshake_SyncFormText;
  27.864 +                            break;
  27.865 +                        case HandshakeMode.SyncTypeC:
  27.866 +                            this.ExplanationText = Properties.Resources.Handshake_SyncTypeCExplanationText;
  27.867 +                            this.Title = Properties.Resources.Handshake_SyncFormText;
  27.868 +                            break;
  27.869 +                        default:
  27.870 +                            this.ExplanationText = string.Empty;
  27.871 +                            break;
  27.872 +                    }
  27.873 +                }
  27.874 +                catch (Exception e)
  27.875 +                {
  27.876 +                    Log.Error("HandshakeDialog.BuildDialog: Error creating key sync item. " + e.Message);
  27.877 +                }
  27.878 +
  27.879 +                this.Items.Add(item);
  27.880 +            }
  27.881 +        }
  27.882 +
  27.883 +        /// <summary>
  27.884 +        /// Resets the object to its default state/values.
  27.885 +        /// </summary>
  27.886 +        public void Reset()
  27.887 +        {
  27.888 +            // Set properties to default values
  27.889 +            this.From = null;
  27.890 +            this.Items = new ObservableCollection<HandshakeItem>();
  27.891 +            this.IsIncoming = true;
  27.892 +            this.MessageRating = pEpRating.pEpRatingUndefined;
  27.893 +            this.Mode = HandshakeMode.Standard;
  27.894 +            this.Myself = null;
  27.895 +            this.Recipients = new List<PEPIdentity>();
  27.896 +            this.SyncPartner = null;
  27.897 +        }
  27.898 +    }
  27.899 +}
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/UI/HandshakeItem.cs	Tue May 30 21:14:43 2017 +0200
    28.3 @@ -0,0 +1,597 @@
    28.4 +using System;
    28.5 +using System.Collections.Generic;
    28.6 +using System.ComponentModel;
    28.7 +using System.Globalization;
    28.8 +using System.Windows.Media;
    28.9 +using System.Windows.Media.Imaging;
   28.10 +
   28.11 +namespace pEp.UI
   28.12 +{
   28.13 +    /// <summary>
   28.14 +    /// Class to contain a selection item used with the selection box control.
   28.15 +    /// </summary>
   28.16 +    internal class HandshakeItem : INotifyPropertyChanged,
   28.17 +                                   Interfaces.ICopy<HandshakeItem>
   28.18 +    {
   28.19 +        /// <summary>
   28.20 +        /// Event raised when a property is changed on a component.
   28.21 +        /// </summary>
   28.22 +        public event PropertyChangedEventHandler PropertyChanged;
   28.23 +
   28.24 +        public enum HandshakeMode
   28.25 +        {
   28.26 +            Standard,
   28.27 +            Sync
   28.28 +        }
   28.29 +
   28.30 +        public enum Tabs
   28.31 +        {
   28.32 +            Trustwords,
   28.33 +            Fingerprint
   28.34 +        }
   28.35 +
   28.36 +        private Tabs                                        _ActiveTab;
   28.37 +        private bool                                        _AreTabControlsVisible;
   28.38 +        private bool                                        _AreTrustwordsExpanded;
   28.39 +        private EventHandler                                _ButtonOnClick;
   28.40 +        private string                                      _ButtonText;
   28.41 +        private EventHandler                                _ExpandedButton1OnClick;
   28.42 +        private EventHandler                                _ExpandedButton2OnClick;
   28.43 +        private string                                      _ExpandedButton1Text;
   28.44 +        private string                                      _ExpandedButton2Text;
   28.45 +        private string                                      _ExpanderToolTip;
   28.46 +        private bool                                        _IsButtonVisible;
   28.47 +        private bool                                        _IsClickable;
   28.48 +        private bool                                        _IsExpanded;
   28.49 +        private bool                                        _IsExpandable;
   28.50 +        private bool                                        _IsSeparatorVisible;
   28.51 +        private ImageSource                                 _ItemImage;
   28.52 +        private string                                      _ItemName;
   28.53 +        private HandshakeMode                               _Mode;
   28.54 +        private PEPIdentity                                 _Myself;
   28.55 +        private PEPIdentity                                 _Partner;
   28.56 +        private CultureInfo                                 _TrustwordsCulture;
   28.57 +        private List<KeyValuePair<CultureInfo, string>>     _TrustwordsCultureList;
   28.58 +        private string                                      _TrustwordsFull;
   28.59 +        private string                                      _TrustwordsShort;
   28.60 +
   28.61 +        /**************************************************************
   28.62 +         * 
   28.63 +         * Constructors
   28.64 +         * 
   28.65 +         *************************************************************/
   28.66 +
   28.67 +        /// <summary>
   28.68 +        /// Default constructor.
   28.69 +        /// </summary>
   28.70 +        public HandshakeItem()
   28.71 +        {
   28.72 +            this.Reset();
   28.73 +        }
   28.74 +
   28.75 +        /**************************************************************
   28.76 +         * 
   28.77 +         * Property Accessors
   28.78 +         * 
   28.79 +         *************************************************************/
   28.80 +
   28.81 +        /// <summary>
   28.82 +        /// Gets or sets the active tab
   28.83 +        /// </summary>
   28.84 +        public Tabs ActiveTab
   28.85 +        {
   28.86 +            get { return this._ActiveTab; }
   28.87 +            set
   28.88 +            {
   28.89 +                this._ActiveTab = value;
   28.90 +                this.RaisePropertyChangedEvent(nameof(this.ActiveTab));
   28.91 +
   28.92 +                this.CalcDependentProperties();
   28.93 +            }
   28.94 +        }
   28.95 +
   28.96 +        /// <summary>
   28.97 +        /// Gets or sets whether the tab controls are visible
   28.98 +        /// </summary>
   28.99 +        public bool AreTabControlsVisible
  28.100 +        {
  28.101 +            get { return this._AreTabControlsVisible; }
  28.102 +            set
  28.103 +            {
  28.104 +                this._AreTabControlsVisible = value;
  28.105 +                this.RaisePropertyChangedEvent(nameof(this.AreTabControlsVisible));
  28.106 +            }
  28.107 +        }
  28.108 +
  28.109 +        /// <summary>
  28.110 +        /// Gets or sets whether the short or long trustwords are shown
  28.111 +        /// </summary>
  28.112 +        public bool AreTrustwordsExpanded
  28.113 +        {
  28.114 +            get { return this._AreTrustwordsExpanded; }
  28.115 +            set
  28.116 +            {
  28.117 +                this._AreTrustwordsExpanded = value;
  28.118 +                this.RaisePropertyChangedEvent(nameof(this.AreTrustwordsExpanded));
  28.119 +
  28.120 +                this.CalcDependentProperties();
  28.121 +            }
  28.122 +        }
  28.123 +
  28.124 +        /// <summary>
  28.125 +        /// Gets or sets the button text.
  28.126 +        /// </summary>
  28.127 +        public string ButtonText
  28.128 +        {
  28.129 +            get { return (this._ButtonText); }
  28.130 +            set
  28.131 +            {
  28.132 +                this._ButtonText = value;
  28.133 +                this.RaisePropertyChangedEvent(nameof(this.ButtonText));
  28.134 +            }
  28.135 +        }
  28.136 +
  28.137 +        /// <summary>
  28.138 +        /// Gets or sets the text to display on the first expanded button.
  28.139 +        /// </summary>
  28.140 +        public string ExpandedButton1Text
  28.141 +        {
  28.142 +            get { return (this._ExpandedButton1Text); }
  28.143 +            set
  28.144 +            {
  28.145 +                this._ExpandedButton1Text = value;
  28.146 +                this.RaisePropertyChangedEvent(nameof(this.ExpandedButton1Text));
  28.147 +            }
  28.148 +        }
  28.149 +
  28.150 +        /// <summary>
  28.151 +        /// Gets or sets the text to display on the second expanded button.
  28.152 +        /// </summary>
  28.153 +        public string ExpandedButton2Text
  28.154 +        {
  28.155 +            get { return (this._ExpandedButton2Text); }
  28.156 +            set
  28.157 +            {
  28.158 +                this._ExpandedButton2Text = value;
  28.159 +                this.RaisePropertyChangedEvent(nameof(this.ExpandedButton2Text));
  28.160 +            }
  28.161 +        }
  28.162 +
  28.163 +        /// <summary>
  28.164 +        /// Gets or sets the text to display on the second expanded button.
  28.165 +        /// </summary>
  28.166 +        public string ExpanderToolTip
  28.167 +        {
  28.168 +            get { return (this._ExpanderToolTip); }
  28.169 +            set
  28.170 +            {
  28.171 +                this._ExpanderToolTip = value;
  28.172 +                this.RaisePropertyChangedEvent(nameof(this.ExpanderToolTip));
  28.173 +            }
  28.174 +        }
  28.175 +
  28.176 +        /// <summary>
  28.177 +        /// Returns the own identity's PGP fingerprint
  28.178 +        /// </summary>
  28.179 +        public string FingerprintMyself
  28.180 +        {
  28.181 +            get
  28.182 +            {
  28.183 +                string fpr = string.Empty;
  28.184 +
  28.185 +                if ((this._Myself != null) &&
  28.186 +                    (this._Myself.Fingerprint != null))
  28.187 +                {
  28.188 +                    fpr = Globals.ThisAddIn.ToQuadruple(this._Myself.Fingerprint, false);
  28.189 +                }
  28.190 +
  28.191 +                return fpr;
  28.192 +            }
  28.193 +        }
  28.194 +
  28.195 +        /// <summary>
  28.196 +        /// Returns the partner's PGP fingerprint
  28.197 +        /// </summary>
  28.198 +        public string FingerprintPartner
  28.199 +        {
  28.200 +            get
  28.201 +            {
  28.202 +                string fpr = string.Empty;
  28.203 +
  28.204 +                if ((this._Partner != null) &&
  28.205 +                    (this._Partner.Fingerprint != null))
  28.206 +                {
  28.207 +                    fpr = Globals.ThisAddIn.ToQuadruple(this._Partner.Fingerprint, false);
  28.208 +                }
  28.209 +
  28.210 +                return fpr;
  28.211 +            }
  28.212 +        }
  28.213 +
  28.214 +        /// <summary>
  28.215 +        /// Gets or sets whether the button is visible next to the item.
  28.216 +        /// </summary>
  28.217 +        public bool IsButtonVisible
  28.218 +        {
  28.219 +            get { return (this._IsButtonVisible); }
  28.220 +            set
  28.221 +            {
  28.222 +                this._IsButtonVisible = value;
  28.223 +                this.RaisePropertyChangedEvent(nameof(this.IsButtonVisible));
  28.224 +            }
  28.225 +        }
  28.226 +
  28.227 +        /// <summary>
  28.228 +        /// Gets or sets whether this item responds to click events.
  28.229 +        /// </summary>
  28.230 +        public bool IsClickable
  28.231 +        {
  28.232 +            get { return (this._IsClickable); }
  28.233 +            set
  28.234 +            {
  28.235 +                this._IsClickable = value;
  28.236 +                this.RaisePropertyChangedEvent(nameof(this.IsClickable));
  28.237 +            }
  28.238 +        }
  28.239 +
  28.240 +        /// <summary>
  28.241 +        /// Gets or sets whether the item can be expanded.
  28.242 +        /// </summary>
  28.243 +        public bool IsExpandable
  28.244 +        {
  28.245 +            get { return (this._IsExpandable); }
  28.246 +            set
  28.247 +            {
  28.248 +                this._IsExpandable = value;
  28.249 +                this.RaisePropertyChangedEvent(nameof(this.IsExpandable));
  28.250 +            }
  28.251 +        }
  28.252 +
  28.253 +        /// <summary>
  28.254 +        /// Gets or sets whether the item is expanded.
  28.255 +        /// If an item is expanded, it must also be expandable to be shown.
  28.256 +        /// </summary>
  28.257 +        public bool IsExpanded
  28.258 +        {
  28.259 +            get { return (this._IsExpanded); }
  28.260 +            set
  28.261 +            {
  28.262 +                this._IsExpanded = value;
  28.263 +                this.RaisePropertyChangedEvent(nameof(this.IsExpanded));
  28.264 +            }
  28.265 +        }
  28.266 +
  28.267 +        /// <summary>
  28.268 +        /// Gets or sets whether the separator at the end of this item is visible or not.
  28.269 +        /// </summary>
  28.270 +        public bool IsSeparatorVisible
  28.271 +        {
  28.272 +            get { return (this._IsSeparatorVisible); }
  28.273 +            set
  28.274 +            {
  28.275 +                this._IsSeparatorVisible = value;
  28.276 +                this.RaisePropertyChangedEvent(nameof(this.IsSeparatorVisible));
  28.277 +            }
  28.278 +        }
  28.279 +
  28.280 +        /// <summary>
  28.281 +        /// Gets or sets the image to display for this line item.
  28.282 +        /// </summary>
  28.283 +        public ImageSource ItemImage
  28.284 +        {
  28.285 +            get { return (this._ItemImage); }
  28.286 +            set
  28.287 +            {
  28.288 +                this._ItemImage = value;
  28.289 +                this.RaisePropertyChangedEvent(nameof(this.ItemImage));
  28.290 +            }
  28.291 +        }
  28.292 +
  28.293 +        /// <summary>
  28.294 +        /// Gets or sets the name to display for this item.
  28.295 +        /// </summary>
  28.296 +        public string ItemName
  28.297 +        {
  28.298 +            get { return (this._ItemName); }
  28.299 +            set
  28.300 +            {
  28.301 +                this._ItemName = value;
  28.302 +                this.RaisePropertyChangedEvent(nameof(this.ItemName));
  28.303 +            }
  28.304 +        }
  28.305 +
  28.306 +        /// <summary>
  28.307 +        /// Gets or sets the handshake mode (Default or sync mode) 
  28.308 +        /// </summary>
  28.309 +        public HandshakeMode Mode
  28.310 +        {
  28.311 +            get { return this._Mode; }
  28.312 +            set
  28.313 +            {
  28.314 +                this._Mode = value;
  28.315 +                this.RaisePropertyChangedEvent(nameof(this.Mode));
  28.316 +            }
  28.317 +        }
  28.318 +
  28.319 +        /// <summary>
  28.320 +        /// Gets or sets the own identity for this handshake.
  28.321 +        /// </summary>
  28.322 +        public PEPIdentity Myself
  28.323 +        {
  28.324 +            get { return (this._Myself); }
  28.325 +            set
  28.326 +            {
  28.327 +                this._Myself = value;
  28.328 +                this.RaisePropertyChangedEvent(nameof(this.Myself));
  28.329 +
  28.330 +                this.UpdateTrustwords();
  28.331 +            }
  28.332 +        }
  28.333 +
  28.334 +        /// <summary>
  28.335 +        /// Gets or sets the partner identity for this handshake.
  28.336 +        /// </summary>
  28.337 +        public PEPIdentity Partner
  28.338 +        {
  28.339 +            get { return (this._Partner); }
  28.340 +            set
  28.341 +            {
  28.342 +                this._Partner = value;
  28.343 +                this.RaisePropertyChangedEvent(nameof(this.Partner));
  28.344 +
  28.345 +                this.UpdateTrustwords();
  28.346 +            }
  28.347 +        }
  28.348 +
  28.349 +        /// <summary>
  28.350 +        /// Gets or sets the current trustwords culture/language.
  28.351 +        /// Warning: This must correlate with TrustwordsCultureList.
  28.352 +        /// </summary>
  28.353 +        public CultureInfo TrustwordsCulture
  28.354 +        {
  28.355 +            get { return (this._TrustwordsCulture); }
  28.356 +            set
  28.357 +            {
  28.358 +                this._TrustwordsCulture = value;
  28.359 +                this.RaisePropertyChangedEvent(nameof(this.TrustwordsCulture));
  28.360 +
  28.361 +                this.UpdateTrustwords();
  28.362 +            }
  28.363 +        }
  28.364 +
  28.365 +        /// <summary>
  28.366 +        /// Gets the list of possible cultures/languages for trustwords.
  28.367 +        /// </summary>
  28.368 +        public List<KeyValuePair<CultureInfo, string>> TrustwordsCultureList
  28.369 +        {
  28.370 +            get { return (this._TrustwordsCultureList); }
  28.371 +        }
  28.372 +
  28.373 +        /// <summary>
  28.374 +        /// Gets or sets the text to display on the button next to the item.
  28.375 +        /// </summary>
  28.376 +        public string TrustwordsFull
  28.377 +        {
  28.378 +            get { return (this._TrustwordsFull); }
  28.379 +            set
  28.380 +            {
  28.381 +                this._TrustwordsFull = value;
  28.382 +                this.RaisePropertyChangedEvent(nameof(this.TrustwordsFull));
  28.383 +            }
  28.384 +        }
  28.385 +
  28.386 +        /// <summary>
  28.387 +        /// Gets or sets the second line of display text.
  28.388 +        /// </summary>
  28.389 +        public string TrustwordsShort
  28.390 +        {
  28.391 +            get { return (this._TrustwordsShort); }
  28.392 +            set
  28.393 +            {
  28.394 +                this._TrustwordsShort = value;
  28.395 +                this.RaisePropertyChangedEvent(nameof(this.TrustwordsShort));
  28.396 +            }
  28.397 +        }
  28.398 +
  28.399 +        /**************************************************************
  28.400 +         * 
  28.401 +         * Event Handlers
  28.402 +         * 
  28.403 +         *************************************************************/
  28.404 +
  28.405 +        /// <summary>
  28.406 +        /// Gets or sets the event handler to occur when the button next to the item is clicked.
  28.407 +        /// </summary>
  28.408 +        public EventHandler ButtonOnClick
  28.409 +        {
  28.410 +            get { return (this._ButtonOnClick); }
  28.411 +            set
  28.412 +            {
  28.413 +                this._ButtonOnClick = value;
  28.414 +                this.RaisePropertyChangedEvent(nameof(this.ButtonOnClick));
  28.415 +            }
  28.416 +        }
  28.417 +
  28.418 +        /// <summary>
  28.419 +        /// Gets or sets the event handler to occur when the first expanded button is clicked.
  28.420 +        /// </summary>
  28.421 +        public EventHandler ExpandedButton1OnClick
  28.422 +        {
  28.423 +            get { return (this._ExpandedButton1OnClick); }
  28.424 +            set
  28.425 +            {
  28.426 +                this._ExpandedButton1OnClick = value;
  28.427 +                this.RaisePropertyChangedEvent(nameof(this.ExpandedButton1OnClick));
  28.428 +            }
  28.429 +        }
  28.430 +
  28.431 +        /// <summary>
  28.432 +        /// Gets or sets the event handler to occur when the second expanded button is clicked.
  28.433 +        /// </summary>
  28.434 +        public EventHandler ExpandedButton2OnClick
  28.435 +        {
  28.436 +            get { return (this._ExpandedButton2OnClick); }
  28.437 +            set
  28.438 +            {
  28.439 +                this._ExpandedButton2OnClick = value;
  28.440 +                this.RaisePropertyChangedEvent(nameof(this.ExpandedButton2OnClick));
  28.441 +            }
  28.442 +        }
  28.443 +
  28.444 +        /**************************************************************
  28.445 +         * 
  28.446 +         * Methods
  28.447 +         * 
  28.448 +         *************************************************************/
  28.449 +
  28.450 +        /// <summary>
  28.451 +        /// Raises the property changed event, if possible, with the given arguments.
  28.452 +        /// </summary>
  28.453 +        /// <param name="propertyName">The name of the property that changed.</param>
  28.454 +        private void RaisePropertyChangedEvent(string propertyName)
  28.455 +        {
  28.456 +            this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  28.457 +            return;
  28.458 +        }
  28.459 +
  28.460 +        /// <summary>
  28.461 +        /// Gets a deep copy of the object and all it's data.
  28.462 +        /// Warning: Styles are not copied and the reference is shared.
  28.463 +        /// </summary>
  28.464 +        /// <returns>The deep copy of the object.</returns>
  28.465 +        public HandshakeItem Copy()
  28.466 +        {
  28.467 +            HandshakeItem copy = new HandshakeItem();
  28.468 +
  28.469 +            copy.ActiveTab = this._ActiveTab;
  28.470 +            copy.AreTabControlsVisible = this._AreTabControlsVisible;
  28.471 +            copy.AreTrustwordsExpanded = this._AreTrustwordsExpanded;
  28.472 +            copy.ButtonOnClick = (this._ButtonOnClick == null ? null : (EventHandler)this._ButtonOnClick.Clone());
  28.473 +            copy.ButtonText = this._ButtonText;
  28.474 +            copy.ExpandedButton1OnClick = (this._ExpandedButton1OnClick == null ? null : (EventHandler)this._ExpandedButton1OnClick.Clone());
  28.475 +            copy.ExpandedButton2OnClick = (this._ExpandedButton2OnClick == null ? null : (EventHandler)this._ExpandedButton2OnClick.Clone());
  28.476 +            copy.ExpandedButton1Text = this._ExpandedButton1Text;
  28.477 +            copy.ExpandedButton2Text = this._ExpandedButton2Text;
  28.478 +            copy.ExpanderToolTip = this._ExpanderToolTip;
  28.479 +            copy.ItemImage = (this._ItemImage == null ? null : (BitmapSource)this._ItemImage.Clone());
  28.480 +            copy.ItemName = this._ItemName;
  28.481 +            copy.Mode = this._Mode;
  28.482 +            copy.Myself = this._Myself;
  28.483 +            copy.Partner = this._Partner;
  28.484 +            copy.TrustwordsCulture = this._TrustwordsCulture;
  28.485 +            copy.IsButtonVisible = this._IsButtonVisible;
  28.486 +            copy.IsClickable = this._IsClickable;
  28.487 +            copy.IsExpanded = this._IsExpanded;
  28.488 +            copy.IsExpandable = this._IsExpandable;
  28.489 +
  28.490 +            return (copy);
  28.491 +        }
  28.492 +
  28.493 +        /// <summary>
  28.494 +        /// Resets the object to it's default state/values.
  28.495 +        /// </summary>
  28.496 +        private void Reset()
  28.497 +        {
  28.498 +            this._ActiveTab = Tabs.Fingerprint;
  28.499 +            this._AreTabControlsVisible = false;
  28.500 +            this._AreTrustwordsExpanded = false;
  28.501 +            this._ButtonOnClick = null;
  28.502 +            this._ButtonText = null;
  28.503 +            this._ExpandedButton1OnClick = null;
  28.504 +            this._ExpandedButton2OnClick = null;
  28.505 +            this._ExpandedButton1Text = null;
  28.506 +            this._ExpandedButton2Text = null;
  28.507 +            this._ExpanderToolTip = null;
  28.508 +            this._IsButtonVisible = false;
  28.509 +            this._IsClickable = true;
  28.510 +            this._IsExpanded = false;
  28.511 +            this._IsExpandable = false;
  28.512 +            this._IsSeparatorVisible = true;
  28.513 +            this._ItemImage = null;
  28.514 +            this._ItemName = null;
  28.515 +            this._Mode = HandshakeMode.Standard;
  28.516 +            this._Myself = null;
  28.517 +            this._Partner = null;
  28.518 +            this._TrustwordsCulture = Globals.ThisAddIn.Settings.TrustwordsCulture;
  28.519 +            this._TrustwordsCultureList = Globals.ThisAddIn.LanguageList;
  28.520 +
  28.521 +
  28.522 +            this.RaisePropertyChangedEvent(nameof(this.ActiveTab));
  28.523 +            this.RaisePropertyChangedEvent(nameof(this.AreTabControlsVisible));
  28.524 +            this.RaisePropertyChangedEvent(nameof(this.AreTrustwordsExpanded));
  28.525 +            this.RaisePropertyChangedEvent(nameof(this.ButtonOnClick));
  28.526 +            this.RaisePropertyChangedEvent(nameof(this.ButtonText));
  28.527 +            this.RaisePropertyChangedEvent(nameof(this.ExpandedButton1OnClick));
  28.528 +            this.RaisePropertyChangedEvent(nameof(this.ExpandedButton2OnClick));
  28.529 +            this.RaisePropertyChangedEvent(nameof(this.ExpandedButton1Text));
  28.530 +            this.RaisePropertyChangedEvent(nameof(this.ExpandedButton2Text));
  28.531 +            this.RaisePropertyChangedEvent(nameof(this.ExpanderToolTip));
  28.532 +            this.RaisePropertyChangedEvent(nameof(this.IsButtonVisible));
  28.533 +            this.RaisePropertyChangedEvent(nameof(this.IsClickable));
  28.534 +            this.RaisePropertyChangedEvent(nameof(this.IsExpanded));
  28.535 +            this.RaisePropertyChangedEvent(nameof(this.IsExpandable));
  28.536 +            this.RaisePropertyChangedEvent(nameof(this.IsSeparatorVisible));
  28.537 +            this.RaisePropertyChangedEvent(nameof(this.ItemImage));
  28.538 +            this.RaisePropertyChangedEvent(nameof(this.ItemName));
  28.539 +            this.RaisePropertyChangedEvent(nameof(this.Mode));
  28.540 +            this.RaisePropertyChangedEvent(nameof(this.TrustwordsCulture));
  28.541 +            this.RaisePropertyChangedEvent(nameof(this.TrustwordsCultureList));
  28.542 +
  28.543 +            this.CalcDependentProperties();
  28.544 +
  28.545 +            return;
  28.546 +        }
  28.547 +
  28.548 +        /// <summary>
  28.549 +        /// Recalculates the dependent properties from the current independent property values. 
  28.550 +        /// This will raise property changed events.
  28.551 +        /// </summary>
  28.552 +        private void CalcDependentProperties()
  28.553 +        {
  28.554 +            // Define button text
  28.555 +            if (this._Mode == HandshakeMode.Sync)
  28.556 +            {
  28.557 +                // Sync mode button text
  28.558 +                this._ExpandedButton1Text = Properties.Resources.Handshake_JoinDeviceGroup;
  28.559 +                this._ExpandedButton2Text = Properties.Resources.Handshake_DoNotJoinDeviceGroup;
  28.560 +            }
  28.561 +            else
  28.562 +            {
  28.563 +                // Handshake mode button text depends on active tab
  28.564 +                if (this.ActiveTab == Tabs.Fingerprint)
  28.565 +                {
  28.566 +                    this._ExpandedButton1Text = Properties.Resources.Handshake_ConfirmFingerprint;
  28.567 +                    this._ExpandedButton2Text = Properties.Resources.Handshake_WrongFingerprint;
  28.568 +                }
  28.569 +                else
  28.570 +                {
  28.571 +                    this._ExpandedButton1Text = Properties.Resources.Handshake_ConfirmTrustwords;
  28.572 +                    this._ExpandedButton2Text = Properties.Resources.Handshake_WrongTrustwords;
  28.573 +                }
  28.574 +            }
  28.575 +
  28.576 +            this.RaisePropertyChangedEvent(nameof(this.ExpandedButton1Text));
  28.577 +            this.RaisePropertyChangedEvent(nameof(this.ExpandedButton2Text));
  28.578 +
  28.579 +            // Set Expander tooltipp
  28.580 +            this.ExpanderToolTip = (this.AreTrustwordsExpanded) ? Properties.Resources.Handshake_TrustwordsExpanderTooltipShort : Properties.Resources.Handshake_TrustwordsExpanderTooltipFull;
  28.581 +            this.RaisePropertyChangedEvent(nameof(this.ExpanderToolTip));
  28.582 +        }
  28.583 +
  28.584 +        /// <summary>
  28.585 +        /// Gets the trustwords from the engine and updates the respective properties.
  28.586 +        /// </summary>
  28.587 +        private void UpdateTrustwords()
  28.588 +        {
  28.589 +            if ((string.IsNullOrEmpty(this.Myself?.Fingerprint) == false) &&
  28.590 +                (string.IsNullOrEmpty(this.Partner?.Fingerprint) == false))
  28.591 +            {
  28.592 +                this.TrustwordsFull = AdapterExtensions.GetTrustwords(this._Myself, this._Partner, this._TrustwordsCulture?.TwoLetterISOLanguageName, true);
  28.593 +                this.TrustwordsShort = AdapterExtensions.GetTrustwords(this._Myself, this._Partner, this._TrustwordsCulture?.TwoLetterISOLanguageName, false);
  28.594 +
  28.595 +                this.RaisePropertyChangedEvent(nameof(this.TrustwordsFull));
  28.596 +                this.RaisePropertyChangedEvent(nameof(this.TrustwordsShort));
  28.597 +            }
  28.598 +        }
  28.599 +    }
  28.600 +}
  28.601 \ No newline at end of file
    29.1 --- a/UI/PrivacyState.cs	Sun May 07 13:50:00 2017 +0200
    29.2 +++ b/UI/PrivacyState.cs	Tue May 30 21:14:43 2017 +0200
    29.3 @@ -37,7 +37,7 @@
    29.4  
    29.5              this._Background = (Brush)Globals.ResourceDict["BrushGray"];
    29.6              this._BackgroundClick = (Brush)Globals.ResourceDict["BrushGrayClick"];
    29.7 -            this._BackgroundMouseOver = (Brush)Globals.ResourceDict["BrushGrayOver"];
    29.8 +            this._BackgroundMouseOver = (Brush)Globals.ResourceDict["BrushGrayHover"];
    29.9              this._Color = this._Rating.ToColor();
   29.10              this._Explanation = pEp.Properties.Resources.PrivacyStatus_RatingUndefinedExplanation;
   29.11              this._Foreground = (Brush)Globals.ResourceDict["BrushTextBlack"];
   29.12 @@ -362,27 +362,27 @@
   29.13                  case pEpColor.pEpColorNoColor:
   29.14                      brush = (Brush)Globals.ResourceDict["BrushGray"];
   29.15                      brushClick = (Brush)Globals.ResourceDict["BrushGrayClick"];
   29.16 -                    brushMouseOver = (Brush)Globals.ResourceDict["BrushGrayOver"];
   29.17 +                    brushMouseOver = (Brush)Globals.ResourceDict["BrushGrayHover"];
   29.18                      return;
   29.19                  case pEpColor.pEpColorRed:
   29.20                      brush = (Brush)Globals.ResourceDict["BrushRed"];
   29.21                      brushClick = (Brush)Globals.ResourceDict["BrushRedClick"];
   29.22 -                    brushMouseOver = (Brush)Globals.ResourceDict["BrushRedOver"];
   29.23 +                    brushMouseOver = (Brush)Globals.ResourceDict["BrushRedHover"];
   29.24                      return;
   29.25                  case pEpColor.pEpColorYellow:
   29.26                      brush = (Brush)Globals.ResourceDict["BrushYellow"];
   29.27                      brushClick = (Brush)Globals.ResourceDict["BrushYellowClick"];
   29.28 -                    brushMouseOver = (Brush)Globals.ResourceDict["BrushYellowOver"];
   29.29 +                    brushMouseOver = (Brush)Globals.ResourceDict["BrushYellowHover"];
   29.30                      return;
   29.31                  case pEpColor.pEpColorGreen:
   29.32                      brush = (Brush)Globals.ResourceDict["BrushGreen"];
   29.33                      brushClick = (Brush)Globals.ResourceDict["BrushGreenClick"];
   29.34 -                    brushMouseOver = (Brush)Globals.ResourceDict["BrushGreenOver"];
   29.35 +                    brushMouseOver = (Brush)Globals.ResourceDict["BrushGreenHover"];
   29.36                      return;
   29.37                  default:
   29.38                      brush = (Brush)Globals.ResourceDict["BrushGray"];
   29.39                      brushClick = (Brush)Globals.ResourceDict["BrushGrayClick"];
   29.40 -                    brushMouseOver = (Brush)Globals.ResourceDict["BrushGrayOver"];
   29.41 +                    brushMouseOver = (Brush)Globals.ResourceDict["BrushGrayHover"];
   29.42                      return;
   29.43              }
   29.44          }
    30.1 --- a/UI/ValueConverters.cs	Sun May 07 13:50:00 2017 +0200
    30.2 +++ b/UI/ValueConverters.cs	Tue May 30 21:14:43 2017 +0200
    30.3 @@ -46,29 +46,29 @@
    30.4      }
    30.5  
    30.6      /// <summary>
    30.7 -    /// Returns a black or gray text color depending on the value's boolean value.
    30.8 +    /// Returns gray if false or black if true or error.
    30.9      /// </summary>
   30.10      public class IsEnabledToColorConverter : IValueConverter
   30.11      {
   30.12 -        public object Convert(object value, 
   30.13 -                              Type targetType, 
   30.14 -                              object parameter, 
   30.15 +        public object Convert(object value,
   30.16 +                              Type targetType,
   30.17 +                              object parameter,
   30.18                                CultureInfo culture)
   30.19          {
   30.20 -            System.Windows.Media.Brush color = System.Windows.Media.Brushes.Black;
   30.21 +            var color = System.Windows.SystemColors.ControlTextBrush;
   30.22  
   30.23              if ((value is bool) &&
   30.24                  ((bool)value == false))
   30.25              {
   30.26 -                color = System.Windows.Media.Brushes.DarkGray;
   30.27 +                color = System.Windows.SystemColors.GrayTextBrush;
   30.28              }
   30.29  
   30.30              return color;
   30.31          }
   30.32  
   30.33 -        public object ConvertBack(object value, 
   30.34 -                                  Type targetType, 
   30.35 -                                  object parameter, 
   30.36 +        public object ConvertBack(object value,
   30.37 +                                  Type targetType,
   30.38 +                                  object parameter,
   30.39                                    CultureInfo culture)
   30.40          {
   30.41              throw new NotImplementedException();
   30.42 @@ -76,6 +76,115 @@
   30.43      }
   30.44  
   30.45      /// <summary>
   30.46 +    /// Returns true if given parameter is equal to HandshakeMode.Standard. Otherwise false
   30.47 +    /// </summary>
   30.48 +    public class IsStandardModeToBoolConverter : IValueConverter
   30.49 +    {
   30.50 +        public object Convert(object value,
   30.51 +                              Type targetType,
   30.52 +                              object parameter,
   30.53 +                              CultureInfo culture)
   30.54 +        {
   30.55 +            bool result = false;
   30.56 +            string param = null;
   30.57 +            string val = null;
   30.58 +
   30.59 +            param = parameter as string;
   30.60 +
   30.61 +            try
   30.62 +            {
   30.63 +                val = Enum.GetName(typeof(HandshakeDialog.HandshakeMode), value);
   30.64 +            }
   30.65 +            catch
   30.66 +            {
   30.67 +                val = null;
   30.68 +            }
   30.69 +
   30.70 +            if ((param != null) &&
   30.71 +                (val != null) &&
   30.72 +                (val == param))
   30.73 +            {
   30.74 +                result = true;
   30.75 +            }
   30.76 +
   30.77 +            return result;
   30.78 +        }
   30.79 +
   30.80 +        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
   30.81 +        {
   30.82 +            throw new NotImplementedException();
   30.83 +        }
   30.84 +    }
   30.85 +
   30.86 +    /// <summary>
   30.87 +    /// Returns true if given parameter is same as an active tab. Otherwise false
   30.88 +    /// </summary>
   30.89 +    public class IsActiveTabToBoolConverter : IValueConverter
   30.90 +    {
   30.91 +        public object Convert(object value,
   30.92 +                              Type targetType,
   30.93 +                              object parameter,
   30.94 +                              CultureInfo culture)
   30.95 +        {
   30.96 +            bool result = false;
   30.97 +            string param = null;
   30.98 +            string val = null;
   30.99 +
  30.100 +            param = parameter as string;
  30.101 +
  30.102 +            try
  30.103 +            {
  30.104 +                val = Enum.GetName(typeof(HandshakeItem.Tabs), value);
  30.105 +            }
  30.106 +            catch
  30.107 +            {
  30.108 +                val = null;
  30.109 +            }
  30.110 +
  30.111 +            if ((param != null) &&
  30.112 +                (val != null) &&
  30.113 +                (val == param))
  30.114 +            {
  30.115 +                result = true;
  30.116 +            }
  30.117 +
  30.118 +            return result;
  30.119 +        }
  30.120 +
  30.121 +        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  30.122 +        {
  30.123 +            throw new NotImplementedException();
  30.124 +        }
  30.125 +    }
  30.126 +
  30.127 +    /// <summary>
  30.128 +    /// Returns transparent if false or white if true or error.
  30.129 +    /// </summary>
  30.130 +    public class BooleanToBackgroundConverter : IValueConverter
  30.131 +    {
  30.132 +        public object Convert(object value,
  30.133 +                              Type targetType,
  30.134 +                              object parameter,
  30.135 +                              CultureInfo culture)
  30.136 +        {
  30.137 +            System.Windows.Media.Brush color = System.Windows.Media.Brushes.Transparent;
  30.138 +
  30.139 +            if ((value is bool) &&
  30.140 +                ((bool)value))
  30.141 +            {
  30.142 +                color = System.Windows.Media.Brushes.White;
  30.143 +            }
  30.144 +
  30.145 +            return color;
  30.146 +        }
  30.147 +
  30.148 +        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  30.149 +        {
  30.150 +            throw new NotImplementedException();
  30.151 +        }
  30.152 +    }
  30.153 +
  30.154 +    /// <summary>
  30.155      /// Returns a bool value indicating if the release mode matches the given parameter.
  30.156      /// </summary>
  30.157      public class IsReleaseModeConverter : IValueConverter
    31.1 --- a/pEpForOutlook.csproj	Sun May 07 13:50:00 2017 +0200
    31.2 +++ b/pEpForOutlook.csproj	Tue May 30 21:14:43 2017 +0200
    31.3 @@ -41,7 +41,7 @@
    31.4      <PublishUrl>publish\</PublishUrl>
    31.5      <InstallUrl>https://pep-project.org/</InstallUrl>
    31.6      <TargetCulture>en</TargetCulture>
    31.7 -    <ApplicationVersion>1.1.15.0</ApplicationVersion>
    31.8 +    <ApplicationVersion>1.1.17.0</ApplicationVersion>
    31.9      <AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
   31.10      <UpdateEnabled>true</UpdateEnabled>
   31.11      <UpdateInterval>0</UpdateInterval>
   31.12 @@ -391,6 +391,10 @@
   31.13      <Compile Include="UI\FormRegionPreviewUnencrypted2.Designer.cs">
   31.14        <DependentUpon>FormRegionPreviewUnencrypted2.cs</DependentUpon>
   31.15      </Compile>
   31.16 +    <Compile Include="UI\HandshakeDialog.xaml.cs">
   31.17 +      <DependentUpon>HandshakeDialog.xaml</DependentUpon>
   31.18 +    </Compile>
   31.19 +    <Compile Include="UI\HandshakeItem.cs" />
   31.20      <Compile Include="UI\RibbonCustomizations.cs" />
   31.21      <Compile Include="UI\FormManagePrivacyStatus.cs">
   31.22        <SubType>Form</SubType>
   31.23 @@ -435,50 +439,50 @@
   31.24      </Compile>
   31.25      <Compile Include="UI\ValueConverters.cs" />
   31.26      <EmbeddedResource Include="Properties\Resources.hi.resx">
   31.27 -      <Generator>ResXFileCodeGenerator</Generator>
   31.28 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.29        <LastGenOutput>Resources.hi.Designer.cs</LastGenOutput>
   31.30      </EmbeddedResource>
   31.31      <EmbeddedResource Include="Properties\Resources.nl.resx">
   31.32 -      <Generator>ResXFileCodeGenerator</Generator>
   31.33 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.34        <LastGenOutput>Resources.nl.Designer.cs</LastGenOutput>
   31.35      </EmbeddedResource>
   31.36      <EmbeddedResource Include="Properties\Resources.tr.resx">
   31.37        <SubType>Designer</SubType>
   31.38 -      <Generator>ResXFileCodeGenerator</Generator>
   31.39 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.40        <LastGenOutput>Resources.tr.Designer.cs</LastGenOutput>
   31.41      </EmbeddedResource>
   31.42      <EmbeddedResource Include="Properties\Resources.resx">
   31.43 -      <Generator>ResXFileCodeGenerator</Generator>
   31.44 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.45        <SubType>Designer</SubType>
   31.46        <LastGenOutput>Resources.Designer.cs</LastGenOutput>
   31.47      </EmbeddedResource>
   31.48      <EmbeddedResource Include="Properties\Resources.ca.resx">
   31.49 -      <Generator>ResXFileCodeGenerator</Generator>
   31.50 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.51        <LastGenOutput>Resources.ca.Designer.cs</LastGenOutput>
   31.52        <SubType>Designer</SubType>
   31.53      </EmbeddedResource>
   31.54      <EmbeddedResource Include="Properties\Resources.de.resx">
   31.55 -      <Generator>ResXFileCodeGenerator</Generator>
   31.56 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.57        <LastGenOutput>Resources.de.Designer.cs</LastGenOutput>
   31.58        <SubType>Designer</SubType>
   31.59      </EmbeddedResource>
   31.60      <EmbeddedResource Include="Properties\Resources.es.resx">
   31.61 -      <Generator>ResXFileCodeGenerator</Generator>
   31.62 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.63        <LastGenOutput>Resources.es.Designer.cs</LastGenOutput>
   31.64        <SubType>Designer</SubType>
   31.65      </EmbeddedResource>
   31.66      <EmbeddedResource Include="Properties\Resources.fr.resx">
   31.67 -      <Generator>ResXFileCodeGenerator</Generator>
   31.68 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.69        <LastGenOutput>Resources.fr.Designer.cs</LastGenOutput>
   31.70        <SubType>Designer</SubType>
   31.71      </EmbeddedResource>
   31.72      <EmbeddedResource Include="Properties\Resources.it.resx">
   31.73 -      <Generator>ResXFileCodeGenerator</Generator>
   31.74 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.75        <LastGenOutput>Resources.it.Designer.cs</LastGenOutput>
   31.76        <SubType>Designer</SubType>
   31.77      </EmbeddedResource>
   31.78 -    <EmbeddedResource Include="Properties\Resources.mr.resx">
   31.79 -      <Generator>ResXFileCodeGenerator</Generator>
   31.80 +	<EmbeddedResource Include="Properties\Resources.mr.resx">
   31.81 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.82        <LastGenOutput>Resources.mr.Designer.cs</LastGenOutput>
   31.83        <SubType>Designer</SubType>
   31.84      </EmbeddedResource>
   31.85 @@ -523,7 +527,7 @@
   31.86      <Resource Include="Resources\ImageNeverUnsecureOff.png" />
   31.87      <Resource Include="Resources\ImageNeverUnsecureOn.png" />
   31.88      <EmbeddedResource Include="Properties\Resources.zh.resx">
   31.89 -      <Generator>ResXFileCodeGenerator</Generator>
   31.90 +      <Generator>PublicResXFileCodeGenerator</Generator>
   31.91        <LastGenOutput>Resources.zh.Designer.cs</LastGenOutput>
   31.92      </EmbeddedResource>
   31.93      <EmbeddedResource Include="UI\RibbonCustomizations.xml">
   31.94 @@ -579,6 +583,10 @@
   31.95        <SubType>Designer</SubType>
   31.96        <Generator>MSBuild:Compile</Generator>
   31.97      </Page>
   31.98 +    <Page Include="UI\HandshakeDialog.xaml">
   31.99 +      <SubType>Designer</SubType>
  31.100 +      <Generator>MSBuild:Compile</Generator>
  31.101 +    </Page>
  31.102      <Page Include="UI\PrivacyView.xaml">
  31.103        <SubType>Designer</SubType>
  31.104        <Generator>MSBuild:Compile</Generator>