Example #1
0
        public string GetFileName()
        {
            switch (EntryType)
            {
            case SharedEntryType.Weather:
                return(Regex.Replace(Target ?? Name ?? @"shared_weather", @"\W+", "").ToLowerInvariant());

            default:
                // TODO: even localized?
                return((Name ?? EntryType.GetDescription()) +
                       // (Target == null ? "" : " for " + Target) +
                       (Author == null ? "" : @" (" + Author + @")") + SharingHelper.GetExtenstion(EntryType));
            }
        }
Example #2
0
 public static void Initialize()
 {
     Debug.Assert(Instance == null);
     Instance = new SharingHelper();
 }