国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

首頁(yè) 微信小程序 微信開(kāi)發(fā) 圖文詳解.Net語(yǔ)言Smobiler開(kāi)發(fā)之如何仿微信朋友圈的消息樣式

圖文詳解.Net語(yǔ)言Smobiler開(kāi)發(fā)之如何仿微信朋友圈的消息樣式

Mar 31, 2017 pm 03:28 PM

這篇文章主要介紹了.Net語(yǔ)言Smobiler開(kāi)發(fā)平臺(tái)如何仿微信朋友圈的消息樣式?本文為大家揭曉答案

最前面的話(huà):Smobiler是一個(gè)在VS環(huán)境中使用.Net語(yǔ)言來(lái)開(kāi)發(fā)APP的開(kāi)發(fā)平臺(tái),也許比Xamarin更方便

一、目標(biāo)樣式

圖文詳解.Net語(yǔ)言Smobiler開(kāi)發(fā)之如何仿微信朋友圈的消息樣式

我們要實(shí)現(xiàn)上圖中的效果,需要如下的操作:

1.從工具欄上的”Smobiler Components”拖動(dòng)一個(gè)MicroBlog控件到窗體界面上

圖文詳解.Net語(yǔ)言Smobiler開(kāi)發(fā)之如何仿微信朋友圈的消息樣式

2.用代碼添加手機(jī)界面上顯示的內(nèi)容

Load事件代碼:

VB:


 Private Sub TestMicroBlog_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  Try
   Me.MicroBlog1.DefaultUserName = "偉斌"
   Me.MicroBlog1.DefaultUserID = "偉斌"

   contentArray(0) = "把青春獻(xiàn)給身后那座"+ vbCrLf + "輝煌的城市" + vbCrLf + "為了這個(gè)美夢(mèng)" + vbCrLf + "我們付出著代價(jià)"
   
   userarray(0) = "偉斌"

   picturearray(0) = 0

   InitialMicroBlogData()

  Catch ex As Exception
   MessageBox.Show(ex.Message, Sub() Me.Close())
  End Try
End Sub C#:
 private void TestMicroBlog_Load(object sender, EventArgs e)
 {
  try
  {
   this.MicroBlog1.DefaultUserName = "偉斌";
   this.MicroBlog1.DefaultUserID = "偉斌";

   contentArray[0] = "把青春獻(xiàn)給身后那座" + System.Environment.NewLine + "輝煌的城市" + System.Environment.NewLine + "為了這個(gè)美夢(mèng)"+ System.Environment.NewLine + "我們付出著代價(jià)";
   
   userarray[0] = "偉斌";

   picturearray[0] = "0";

   InitialMicroBlogData();
  }
  catch (Exception ex)
  {
   MessageBox.Show(ex.Message, (Object s, MessageBoxHandlerArgs args) => this.Close());
  }
 }

其他代碼:
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
 Next
End 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);
  }
 }

二、手機(jī)效果顯示

圖文詳解.Net語(yǔ)言Smobiler開(kāi)發(fā)之如何仿微信朋友圈的消息樣式

圖文詳解.Net語(yǔ)言Smobiler開(kāi)發(fā)之如何仿微信朋友圈的消息樣式

圖文詳解.Net語(yǔ)言Smobiler開(kāi)發(fā)之如何仿微信朋友圈的消息樣式

以上是圖文詳解.Net語(yǔ)言Smobiler開(kāi)發(fā)之如何仿微信朋友圈的消息樣式的詳細(xì)內(nèi)容。更多信息請(qǐng)關(guān)注PHP中文網(wǎng)其他相關(guān)文章!

本站聲明
本文內(nèi)容由網(wǎng)友自發(fā)貢獻(xiàn),版權(quán)歸原作者所有,本站不承擔(dān)相應(yīng)法律責(zé)任。如您發(fā)現(xiàn)有涉嫌抄襲侵權(quán)的內(nèi)容,請(qǐng)聯(lián)系admin@php.cn

熱AI工具

Undress AI Tool

Undress AI Tool

免費(fèi)脫衣服圖片

Undresser.AI Undress

Undresser.AI Undress

人工智能驅(qū)動(dòng)的應(yīng)用程序,用于創(chuàng)建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用于從照片中去除衣服的在線(xiàn)人工智能工具。

Clothoff.io

Clothoff.io

AI脫衣機(jī)

Video Face Swap

Video Face Swap

使用我們完全免費(fèi)的人工智能換臉工具輕松在任何視頻中換臉!

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費(fèi)的代碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

功能強(qiáng)大的PHP集成開(kāi)發(fā)環(huán)境

Dreamweaver CS6

Dreamweaver CS6

視覺(jué)化網(wǎng)頁(yè)開(kāi)發(fā)工具

SublimeText3 Mac版

SublimeText3 Mac版

神級(jí)代碼編輯軟件(SublimeText3)

熱門(mén)話(huà)題

Laravel 教程
1600
29
PHP教程
1502
276