| 2043 | | post.PDate = DateTime.ParseExact(xentry.Item("created_at").InnerText, "ddd MMM dd HH:mm:ss zzzz yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo, System.Globalization.DateTimeStyles.None) |
| 2044 | | post.Id = Long.Parse(xentry.Item("id").InnerText) |
| 2045 | | '二重取得回避 |
| 2046 | | SyncLock LockObj |
| 2047 | | If TabInformations.GetInstance.ContainsKey(post.Id) Then Continue For |
| 2048 | | End SyncLock |
| 2049 | | '本文 |
| 2050 | | post.Data = xentry.Item("text").InnerText |
| 2051 | | post.Data = post.Data.Replace("<3", "♡") |
| 2052 | | 'HTMLに整形 |
| 2053 | | post.OriginalData = CreateHtmlAnchor(post.Data, post.ReplyToList) |
| 2054 | | 'Source取得(htmlの場合は、中身を取り出し) |
| 2055 | | post.Source = xentry.Item("source").InnerText |
| 2056 | | If post.Source.StartsWith("<") Then |
| 2057 | | Dim rgS As New Regex(">(?<source>.+)<") |
| 2058 | | Dim mS As Match = rgS.Match(post.Source) |
| 2059 | | If mS.Success Then |
| 2060 | | post.Source = mS.Result("${source}") |
| | 2062 | Try |
| | 2063 | post.PDate = DateTime.ParseExact(xentry.Item("created_at").InnerText, "ddd MMM dd HH:mm:ss zzzz yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo, System.Globalization.DateTimeStyles.None) |
| | 2064 | post.Id = Long.Parse(xentry.Item("id").InnerText) |
| | 2065 | '二重取得回避 |
| | 2066 | SyncLock LockObj |
| | 2067 | If TabInformations.GetInstance.ContainsKey(post.Id) Then Continue For |
| | 2068 | End SyncLock |
| | 2069 | '本文 |
| | 2070 | post.Data = xentry.Item("text").InnerText |
| | 2071 | post.Data = post.Data.Replace("<3", "♡") |
| | 2072 | 'HTMLに整形 |
| | 2073 | post.OriginalData = CreateHtmlAnchor(post.Data, post.ReplyToList) |
| | 2074 | 'Source取得(htmlの場合は、中身を取り出し) |
| | 2075 | post.Source = xentry.Item("source").InnerText |
| | 2076 | If post.Source.StartsWith("<") Then |
| | 2077 | Dim rgS As New Regex(">(?<source>.+)<") |
| | 2078 | Dim mS As Match = rgS.Match(post.Source) |
| | 2079 | If mS.Success Then |
| | 2080 | post.Source = mS.Result("${source}") |
| | 2081 | End If |
| 2062 | | End If |
| 2063 | | Long.TryParse(xentry.Item("in_reply_to_status_id").InnerText, post.InReplyToId) |
| 2064 | | post.InReplyToUser = xentry.Item("in_reply_to_screen_name").InnerText |
| 2065 | | 'in_reply_to_user_idを使うか? |
| 2066 | | post.IsFav = Boolean.Parse(xentry.Item("favorited").InnerText) |
| 2067 | | |
| 2068 | | '以下、ユーザー情報 |
| 2069 | | Dim xUentry As XmlElement = CType(xentry.SelectSingleNode("./user"), XmlElement) |
| 2070 | | post.Uid = Long.Parse(xUentry.Item("id").InnerText) |
| 2071 | | post.Name = xUentry.Item("screen_name").InnerText |
| 2072 | | post.Nickname = xUentry.Item("name").InnerText |
| 2073 | | post.ImageUrl = xUentry.Item("profile_image_url").InnerText |
| 2074 | | post.IsProtect = Boolean.Parse(xUentry.Item("protected").InnerText) |
| 2075 | | post.IsMe = post.Name.ToLower.Equals(_uid.ToLower) |
| 2076 | | post.IsRead = read |
| 2077 | | If gType = WORKERTYPE.Timeline Then |
| 2078 | | post.IsReply = post.ReplyToList.Contains(_uid.ToLower) |
| 2079 | | Else |
| 2080 | | post.IsReply = True |
| 2081 | | End If |
| 2082 | | |
| 2083 | | If post.IsMe Then |
| 2084 | | post.IsOwl = False |
| 2085 | | Else |
| 2086 | | post.IsOwl = Not followerId.Contains(post.Uid) |
| 2087 | | End If |
| 2088 | | |
| 2089 | | post.IsDm = False |
| | 2083 | Long.TryParse(xentry.Item("in_reply_to_status_id").InnerText, post.InReplyToId) |
| | 2084 | post.InReplyToUser = xentry.Item("in_reply_to_screen_name").InnerText |
| | 2085 | 'in_reply_to_user_idを使うか? |
| | 2086 | post.IsFav = Boolean.Parse(xentry.Item("favorited").InnerText) |
| | 2087 | |
| | 2088 | '以下、ユーザー情報 |
| | 2089 | Dim xUentry As XmlElement = CType(xentry.SelectSingleNode("./user"), XmlElement) |
| | 2090 | post.Uid = Long.Parse(xUentry.Item("id").InnerText) |
| | 2091 | post.Name = xUentry.Item("screen_name").InnerText |
| | 2092 | post.Nickname = xUentry.Item("name").InnerText |
| | 2093 | post.ImageUrl = xUentry.Item("profile_image_url").InnerText |
| | 2094 | post.IsProtect = Boolean.Parse(xUentry.Item("protected").InnerText) |
| | 2095 | post.IsMe = post.Name.ToLower.Equals(_uid.ToLower) |
| | 2096 | post.IsRead = read |
| | 2097 | If gType = WORKERTYPE.Timeline Then |
| | 2098 | post.IsReply = post.ReplyToList.Contains(_uid.ToLower) |
| | 2099 | Else |
| | 2100 | post.IsReply = True |
| | 2101 | End If |
| | 2102 | |
| | 2103 | If post.IsMe Then |
| | 2104 | post.IsOwl = False |
| | 2105 | Else |
| | 2106 | post.IsOwl = Not followerId.Contains(post.Uid) |
| | 2107 | End If |
| | 2108 | |
| | 2109 | post.IsDm = False |
| | 2110 | Catch ex As Exception |
| | 2111 | ExceptionOut(ex) |
| | 2112 | TraceOut(True, retMsg) |
| | 2113 | MessageBox.Show("不正なXMLです。(TL-Parse)") |
| | 2114 | Continue For |
| | 2115 | End Try |
| 2139 | | post.Id = Long.Parse(xentry.Item("id").InnerText) |
| 2140 | | '二重取得回避 |
| 2141 | | SyncLock LockObj |
| 2142 | | If TabInformations.GetInstance.ContainsKey(post.Id) Then Continue For |
| 2143 | | End SyncLock |
| 2144 | | 'sender_id |
| 2145 | | 'recipient_id |
| 2146 | | post.PDate = DateTime.ParseExact(xentry.Item("created_at").InnerText, "ddd MMM dd HH:mm:ss zzzz yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo, System.Globalization.DateTimeStyles.None) |
| 2147 | | '本文 |
| 2148 | | post.Data = xentry.Item("text").InnerText |
| 2149 | | post.Data = post.Data.Replace("<3", "♡") |
| 2150 | | 'HTMLに整形 |
| 2151 | | post.OriginalData = CreateHtmlAnchor(post.Data, post.ReplyToList) |
| 2152 | | post.IsFav = False |
| 2153 | | '受信DMかの判定で使用 |
| 2154 | | If gType = WORKERTYPE.DirectMessegeRcv Then |
| 2155 | | post.IsOwl = False |
| 2156 | | Else |
| 2157 | | post.IsOwl = True |
| 2158 | | End If |
| 2159 | | |
| 2160 | | '以下、ユーザー情報 |
| 2161 | | Dim xUentry As XmlElement |
| 2162 | | If gType = WORKERTYPE.DirectMessegeRcv Then |
| 2163 | | xUentry = CType(xentry.SelectSingleNode("./sender"), XmlElement) |
| 2164 | | post.IsMe = False |
| 2165 | | Else |
| 2166 | | xUentry = CType(xentry.SelectSingleNode("./recipient"), XmlElement) |
| 2167 | | post.IsMe = True |
| 2168 | | End If |
| 2169 | | post.Uid = Long.Parse(xUentry.Item("id").InnerText) |
| 2170 | | post.Name = xUentry.Item("screen_name").InnerText |
| 2171 | | post.Nickname = xUentry.Item("name").InnerText |
| 2172 | | post.ImageUrl = xUentry.Item("profile_image_url").InnerText |
| 2173 | | post.IsProtect = Boolean.Parse(xUentry.Item("protected").InnerText) |
| | 2172 | Try |
| | 2173 | post.Id = Long.Parse(xentry.Item("id").InnerText) |
| | 2174 | '二重取得回避 |
| | 2175 | SyncLock LockObj |
| | 2176 | If TabInformations.GetInstance.ContainsKey(post.Id) Then Continue For |
| | 2177 | End SyncLock |
| | 2178 | 'sender_id |
| | 2179 | 'recipient_id |
| | 2180 | post.PDate = DateTime.ParseExact(xentry.Item("created_at").InnerText, "ddd MMM dd HH:mm:ss zzzz yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo, System.Globalization.DateTimeStyles.None) |
| | 2181 | '本文 |
| | 2182 | post.Data = xentry.Item("text").InnerText |
| | 2183 | post.Data = post.Data.Replace("<3", "♡") |
| | 2184 | 'HTMLに整形 |
| | 2185 | post.OriginalData = CreateHtmlAnchor(post.Data, post.ReplyToList) |
| | 2186 | post.IsFav = False |
| | 2187 | '受信DMかの判定で使用 |
| | 2188 | If gType = WORKERTYPE.DirectMessegeRcv Then |
| | 2189 | post.IsOwl = False |
| | 2190 | Else |
| | 2191 | post.IsOwl = True |
| | 2192 | End If |
| | 2193 | |
| | 2194 | '以下、ユーザー情報 |
| | 2195 | Dim xUentry As XmlElement |
| | 2196 | If gType = WORKERTYPE.DirectMessegeRcv Then |
| | 2197 | xUentry = CType(xentry.SelectSingleNode("./sender"), XmlElement) |
| | 2198 | post.IsMe = False |
| | 2199 | Else |
| | 2200 | xUentry = CType(xentry.SelectSingleNode("./recipient"), XmlElement) |
| | 2201 | post.IsMe = True |
| | 2202 | End If |
| | 2203 | post.Uid = Long.Parse(xUentry.Item("id").InnerText) |
| | 2204 | post.Name = xUentry.Item("screen_name").InnerText |
| | 2205 | post.Nickname = xUentry.Item("name").InnerText |
| | 2206 | post.ImageUrl = xUentry.Item("profile_image_url").InnerText |
| | 2207 | post.IsProtect = Boolean.Parse(xUentry.Item("protected").InnerText) |
| | 2208 | Catch ex As Exception |
| | 2209 | ExceptionOut(ex) |
| | 2210 | TraceOut(True, retMsg) |
| | 2211 | MessageBox.Show("不正なXMLです。(DM-Parse)") |
| | 2212 | Continue For |
| | 2213 | End Try |