目前10240 版本中,還沒有IIS ,本來想說可以寫一些網頁來控制的,不過目前網路上看官方的一些範例,是可以透過自己實作一個httpD ,所以我也動手實作看看,當然我改寫了一部分,我直接讓他可以讀取專案下面 Assets\html\ 的所有檔案
兼任的偽善者,part-time的故事家,業餘的code generator,不服輸的夢想家,長不大的幼稚鬼,一個撿技術破爛的中年大叔
目前10240 版本中,還沒有IIS ,本來想說可以寫一些網頁來控制的,不過目前網路上看官方的一些範例,是可以透過自己實作一個httpD ,所以我也動手實作看看,當然我改寫了一部分,我直接讓他可以讀取專案下面 Assets\html\ 的所有檔案
最近在看 Universal Windows Platform 的東西,之前都是用isolated storage ,但是最近看到官方文件寫到
Isolated storage is not available for Windows Store apps. Instead, use the application data classes in the Windows.Storagenamespaces included in the Windows Runtime API to store local data and files. For more information, see Application data in the Windows Dev Center.
所以就乾脆改變紀錄的方法,其實,透過Windows.Storage他存放的位置跟之前Isolated Storage 位置差不多 基本上只是多一層,目前我測試位置是
C:\Users\[USERNAME]\AppData\Local\Packages\[APPID]\LocalState\
上一篇文章 [Winform] 筆記一下,C#透過UDP 傳送資料 傳送了資料,那如何接受透過UDP接受資料呢?
一樣這一篇是屬於C# Winform or Console 透過 System.Net 的做法,新的UWP 是不能用的,不過當你需要測試時候就很好用,範例是,一直不斷Port 1947 的所有訊息,並且Text Encoding 是 UTF8
首先先撰寫接收的程式,因為是一值不斷地在聽牌,所以是要寫while(true) 的作法
/// <summary> /// UDP Client /// </summary> UdpClient udpClient = new UdpClient(1947); /// <summary> /// UDP 一直接收Port 1947 的資料,收到後跳Messagebox /// </summary>private void ThreadRunMethod()
{while (true)
{ var remoteIp = new IPEndPoint(IPAddress.Any, 0); var receivedBytes = udpClient.Receive(ref remoteIp);if (receivedBytes == null || receivedBytes.Length == 0)
return; string strReceiveStr = Encoding.UTF8.GetString(receivedBytes); MessageBox.Show("收到資料囉: " + strReceiveStr);}
}
先說好,這是 C# Winform or Console 透過 System.Net 的做法,新的UWP 是不能用的,但是因為最近在測試Windows 10 IoT 的東西,所以我得在電腦端這邊寫測試程式紀錄一下
1.首先,要先using
using System.Net;using System.Net.Sockets;using System.Text;2.這邊範例是 傳給 IP 為 192.168.6.100 , Port : 1947 , 中文字 許當麻 , Encoding : UTF8
var socket = new Socket(AddressFamily.InterNetwork,SocketType.Dgram,ProtocolType.Udp);
var serverAddr = IPAddress.Parse("192.168.6.100");var endPoint = new IPEndPoint(serverAddr, 1947);string text = "許當麻";
byte[] sendByte = Encoding.UTF8.GetBytes(text);socket.SendTo(sendByte, endPoint);
現在有線網路越來越少,結果網路上看文件http://ms-iot.github.io/content/en-US/win10/SetupWiFi.htm
結果我眼殘沒有看到原來TP-LINK WN725N 是支援 MinnowBoard Max
上一篇文章 關於如何將Execl 變成限定Administrator 執行 我們用了三個方法讓Excel 執行起來,但是如果你要改word 你會發現 他並沒有 winword.exe.manifest,這時候我們要用點小技巧
1.上篇文章我們不是改過 excel.exe.manifest 的內容,這時候我們複製這檔案變成 winword.exe.manifest 其內容為
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInherit></noInherit>
<assemblyIdentity version="11.0.0.0" processorArchitecture="*" name="excel" type="win32"></assemblyIdentity>
<description>Microsoft Excel</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows 7 --><supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
<!--This Id value indicates the application supports Windows 8 functionality--><supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
<!-- This Id value indicates the application supports Windows 8.1 functionality--><supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
<!-- This Id value indicates the application supports Windows 10 functionality--><supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
</application>
</compatibility>
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
上篇文章 [Xamarin] 上傳檔案/圖片 到Server 端 (Server 接檔案端) 我們從Server可以收檔案,現在就是Client 端的部分,我們要把圖檔上傳
1. 介紹畫面,按下按鈕後我們會把Assets/ld.jpg 傳到 server 上面
筆記一下,在Xamarin 中在Android 裡播放mp4影片檔,接下來有三個筆記三個項目
1. 播放線上的mp4 網址
FindViewById<Button>(Resource.Id.btnPlay).Click += delegate{ //設定播放網址 videoView.SetVideoURI(Uri.Parse("http://techslides.com/demos/sample-videos/small.mp4")); //Seek 到第0秒videoView.SeekTo(0);
//開始撥放videoView.Start();
};
記得要開INTERNET 的 PERMISSION 這邊操控是沒有啥困難的 ..