Experienced a day, learning c #, visual studio 2019, the.net FrameWork, the demand is to be a Windows client, there is a similar screen controls and two buttons, already use Windows media player did add local video playback and stop, but it's requirement is click on the button, unmanned aircraft take off, at the same time, put the camera on the unmanned aerial vehicle (uav) to the images back to the play, click the down button uav backhaul,
Should now be docking unmanned aerial vehicle (uav) on the other side of the poor, but I am ios development, don't know. Net how docking SDK, have recommended study place, want to prepare in advance, or instance can let me learn quickly to
CodePudding user response:
To see your SDK documentation, or consulting company,CodePudding user response:
. The.net SDK docking is very simple, you should use much earlier before the ajax request data, and so on post get, that the way some requests,Actually the background of principle is the same, define the parameters, define the json array, how are you going to define data, define what the type of the string, int, and so on, such as
These should see the SDK documentation and producers there docking, the parameters of the interface, and so on, and then the background you can write an HTTP request, the parameters can be configured to your conifg, so you can get the config node information, assign values to the object, the parcel address to request, is what baidu to SMS interface API interface, these things, about the same, by the way, I give you post a background packaging request well, only need to pass the address can be,
CodePudding user response:
///Cs///the background in the code to send a POST request
///
///
///
///
Public static string Post (url string, the string postData)
{
System. Text. ASCIIEncoding encoding=new System. Text. The ASCIIEncoding ();
Byte [] data=https://bbs.csdn.net/topics/encoding.GetBytes (postData);
//Prepare web request... Write a web request
//WebRequest url requests
System.Net.HttpWebRequest myRequest=
(System.Net.HttpWebRequest) System.Net.WebRequest.Create (url);
MyRequest. Method="POST";
MyRequest. ContentType="application/x - WWW - form - urlencoded";
MyRequest. ContentLength=data. Length;
System. IO. Stream newStream=myRequest. GetRequestStream ();
//myRequest. BeginGetResponse (
//Send the data.
NewStream. Write (data, 0, the data Length);
NewStream. Close ();
//Get the response returned from the response of the Internet resources
System.Net.HttpWebResponse myResponse=(System.Net.HttpWebResponse) myRequest. The method GetResponse ();
System. IO. StreamReader reader=
. The new System. IO. StreamReader (myResponse GetResponseStream (), System. Text. The Encoding. The UTF8);
The string content=reader. ReadToEnd ();
Reader. The Close ();
//reader. The Dispose ();
MyResponse. Close ();
Return the content;
}
Public static string Get (string url)
{
//byte [] data=https://bbs.csdn.net/topics/encoding.GetBytes (postData);
//Prepare web request...
System.Net.HttpWebRequest myRequest=
(System.Net.HttpWebRequest) System.Net.WebRequest.Create (url);
MyRequest. Method="GET";//get or set the request method
MyRequest. ContentType="application/x - WWW - form - urlencoded";
//Get the response
System.Net.HttpWebResponse myResponse=(System.Net.HttpWebResponse) myRequest. The method GetResponse ();
System. IO. StreamReader reader=new System. IO. StreamReader (myResponse. GetResponseStream (), System. Text. The Encoding. The UTF8);
The string content=reader. ReadToEnd ();
Reader. The Close ();
//reader. The Dispose ();////close method has released the system resource, here need not again release,
MyResponse. Close ();//close the response flow
Return the content;
}
It's as simple as that
return to remember to points haha