Ejemplo n.º 1
0
            public static NetworkListTitleInfo Parse(string data)
            {
                // very simple this one
                ServiceType Service = (ServiceType)Int32.Parse(data.Substring(0, 2), NumberStyles.HexNumber);
                ListUIType  UI      = (ListUIType)Int32.Parse(data.Substring(2, 1), NumberStyles.HexNumber);
                int         Layer   = Int32.Parse(data.Substring(3, 1), NumberStyles.HexNumber);

                int         CursorPosition = Int32.Parse(data.Substring(4, 4), NumberStyles.HexNumber);
                int         ItemCount      = Int32.Parse(data.Substring(8, 4), NumberStyles.HexNumber);
                int         LayerIndex     = Int32.Parse(data.Substring(12, 2), NumberStyles.HexNumber);
                ServiceType Icon           = (ServiceType)Int32.Parse(data.Substring(18, 2), NumberStyles.HexNumber);
                int         Status         = Int32.Parse(data.Substring(20, 2), NumberStyles.HexNumber);
                string      Title          = data.Substring(22);

                return(new NetworkListTitleInfo(
                           Service,
                           UI,
                           Layer,
                           CursorPosition,
                           LayerIndex,
                           Icon,
                           Status,
                           Title,
                           ItemCount));
            }
Ejemplo n.º 2
0
 private NetworkListTitleInfo(ServiceType service, ListUIType uiType, int layer, int cursorPosition, int layerIndex, ServiceType icon, int status, string title, int itemCount)
 {
     this.Service        = service;
     this.UIType         = uiType;
     this.Layer          = layer;
     this.CursorPosition = cursorPosition;
     this.LayerIndex     = layerIndex;
     this.Icon           = icon;
     this.Status         = status;
     this.Title          = title;
     this.ItemCount      = itemCount;
 }