Ejemplo n.º 1
0
 internal static void SavePEDCString(this PwGroup pg, PEDCalcValue days)
 {
     pg.CustomData.Remove(Configuration.DaysField);
     if (days.Inherit)
     {
         pg.CustomData.Remove(Configuration.Interval);
     }
     else
     {
         pg.CustomData.Set(Configuration.Interval, days.ToString());
     }
     PEDCValueDAO.Invalidate(pg);
 }
Ejemplo n.º 2
0
 internal static void SavePEDCString(this PwEntry pe, PEDCalcValue days)
 {
     pe.Strings.Remove(Configuration.DaysField);
     if (days.Inherit)
     {
         pe.Strings.Remove(Configuration.Interval);
     }
     else
     {
         pe.Strings.Set(Configuration.Interval, new ProtectedString(false, days.ToString()));
     }
     PEDCValueDAO.Invalidate(pe);
 }
Ejemplo n.º 3
0
 public static string GetPEDCValueString(PwEntry pe)
 {
     if (!m_dPEDValuesString.ContainsKey(pe.Uuid))
     {
         PEDCalcValue pcv_entry = pe.GetPEDValue(false);
         bool         bInherit  = pcv_entry.Inherit;
         if (bInherit)
         {
             pcv_entry = pe.GetPEDValue(true);
         }
         string sUnit = pcv_entry.ToString(true);
         m_dPEDValuesString[pe.Uuid] = sUnit + (bInherit ? "*" : string.Empty);
         PluginDebug.AddInfo("Add PEDCValue-string to buffer", 0,
                             "Entry: " + pe.Uuid.ToHexString() + " / " + pe.Strings.ReadSafe(PwDefs.TitleField),
                             "Value: " + m_dPEDValuesString[pe.Uuid]);
     }
     return(m_dPEDValuesString[pe.Uuid]);
 }
Ejemplo n.º 4
0
 internal void SetInheritValue(PEDCalcValue pcvInherit)
 {
     DropDown.Items[3].Text = string.Format(PluginTranslate.OptionsInherit, pcvInherit.ToString(true));
 }