public void Restore(Stream str) { if (str.ReadByte() == 0) { short numberOfItems = str.ReadShort(); HintedType = (UIHintedType)str.ReadInteger(); if (numberOfItems > 0) { for (int i = 0; i < numberOfItems; i++) { string key = BinaryHelper.ReadString(str); string value = BinaryHelper.ReadString(str); if (!String.IsNullOrEmpty(key) && !String.IsNullOrEmpty(value)) { Add(key, value); } } } } }
private void ParseHintedType(string typeString) { switch (typeString) { case RenderingHint.ApplicationBar: HintedType = UIHintedType.ApplicationBar; break; case RenderingHint.ApplicationBarOptions: HintedType = UIHintedType.ApplicationBarOptions; break; case RenderingHint.ApplicationBarButton: HintedType = UIHintedType.ApplicationBarButton; break; case RenderingHint.ApplicationBarMenuItem: HintedType = UIHintedType.ApplicationBarMenuItem; break; case RenderingHint.NativeMessageBox: HintedType = UIHintedType.NativeMessageBox; break; case RenderingHint.NativeMessageBoxBody: HintedType = UIHintedType.NativeMessageBoxBody; break; case RenderingHint.NativeMessageBoxButton1: case RenderingHint.NativeMessageBoxButton2: case RenderingHint.NativeMessageBoxButton3: HintedType = UIHintedType.NativeMessageBoxButton; break; case RenderingHint.TabBar: HintedType = UIHintedType.TabBar; break; case RenderingHint.TabBarButton: HintedType = UIHintedType.TabBarButton; break; case RenderingHint.ActionSheet: HintedType = UIHintedType.ActionSheet; break; case RenderingHint.ActionSheetTitle: HintedType = UIHintedType.ActionSheetTitle; break; case RenderingHint.ActionSheetToggle: HintedType = UIHintedType.ActionSheetToggle; break; case RenderingHint.Pivot: HintedType = UIHintedType.Pivot; break; case RenderingHint.PivotTitle: HintedType = UIHintedType.PivotTitle; break; case RenderingHint.Panorama: HintedType = UIHintedType.Panorama; break; case RenderingHint.PanoramaTitle: HintedType = UIHintedType.PanoramaTitle; break; case RenderingHint.SystemTray: HintedType = UIHintedType.SystemTray; break; case RenderingHint.Placeholder: HintedType = UIHintedType.Placeholder; break; } }
public HintsDictionary() : base() { HintedType = UIHintedType.None; }