. Net language APP development platform-Smobiler Learning Log: How to Implement the message style of WeChat circle of friends ?, Aggregatorer

Source: Internet
Author: User

. Net language APP development platform-Smobiler learning logs: How to Implement Message styles in the circle of friends ?, Aggregatorer
First, scycler is a development platform that uses the. Net language to develop apps in the VS environment. It may be more convenient than Xamarin. 1. Target Style

The following operations are required to achieve the effect:

1. Drag a MicroBlog control from "Smobiler Components" on the toolbar to the form interface.

2. Use code to add the content displayed on the mobile phone interface
Load Event code: VB: Private Sub TestMicroBlog_Load (sender As Object, e As EventArgs) Handles MyBase. load Try Me. microblog1.defauserusername = "Wei bin" Me. microblog1.defauseruserid = "Wei bin" contentArray (0) = "Dedicate your youth to the one behind you" + vbCrLf + "brilliant City" + vbCrLf + "to this dream" + vbCrLf + "we pay the price" userarray (0) = "Wei bin" picturearray (0) = 0 InitialMicroBlogData () Catch ex As Exception MessageBox. show (ex. message, Sub () Me. close () End TryEnd Sub
C #: private void TestMicroBlog_Load (object sender, EventArgs e) {try {this. microblog1.defauserusername = "Wei bin"; this. microBlog1.DefaultUserID = "Wei bin"; contentArray [0] = "Dedicate your youth to the one behind you" + System. environment. newLine + "brilliant City" + System. environment. newLine + "for this dream" + System. environment. newLine + "we pay the price"; userarray [0] = "Wei bin"; picturearray [0] = "0"; InitialMicroBlogData ();} catch (Exception ex) {MessageBox. show (ex. message, (Object s, MessageBoxHandlerArgs args) => this. close ());}}
Other code: VB: Dim contentArray (4) As String Dim userarray (4) As String Dim picturearray (8) As String Dim voice (5) as String Private Sub InitialMicroBlogData (Optional count As Integer = 10, Optional ByVal insert As Boolean = False) Dim user As String = userarray (0) dim picturerandomnum As Integer = 6 Dim imageList As New List (Of String) imageList. add (6) Dim item As New MicroBlogItem (user, user, contentArray (0), DateTime. now. toString) item. pictures = imageList item. ILikes. add (userarray (0), userarray (0) If insert = False Then Me. microBlog1.BlogItems. add (item) Else Me. microBlog1.BlogItems. addTop (item) End If NextEnd Sub
C#:    string[] contentArray = new string[5];    string[] userarray = new string[5];    string[] picturearray new string[9];    string[] voice = new string[6];    private void InitialMicroBlogData(int count = 10, bool insert = false)    {        string user = userarray[0];        List<string> imageList = new List<string>();        imageList.Add("6");                        MicroBlogItem item = new MicroBlogItem(user, user, contentArray[0], DateTime.Now.ToString());        item.Pictures = imageList;        item.ILikes.Add(userarray[0], userarray[0]);        if (insert == false)        {             this.MicroBlog1.BlogItems.Add(item);        }        else             this.MicroBlog1.BlogItems.AddTop(item);        }    }
Ii. Mobile phone effect display

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.