OOB features of Silverlight)

Source: Internet
Author: User
Tags silverlight

The Out Of Brower transport layer protocol uses out-of-band (OOB) to send important data. If the communication party has important data to notify the other party, the protocol can send the data to the other Party quickly. to send the data, the Protocol generally uses another channel instead of the same channel as normal data. the socket mechanism in Linux supports sending and receiving out-of-band data through low-layer protocols. however, the TCP protocol has no real out-of-band data. to send important protocols, TCP provides a mechanism called urgent mode. set the URG bit in the Data Segment of TCP to enter the emergency mode. the recipient can take special measures for the emergency mode. it is easy to see that data is not blocked in this way. You can capture sigurg signals in our server programs to accept the data in time or use the Recv function with OOB flag to accept the data. intel active management technology (Intel AMT) is OOB.

Out of brower

Sliverlight is a new feature of Microsoft Silverlight. sliverlight allows independent browsers to access specific file directories in the system. Like a general desktop program, sliverlight can minimize the number of drag messages and install shortcuts in the pop-up window.

The following is a demo of Silverlight OOB, which includes installation, update detection, system tray, and opening Word by calling COM components.

View code

1 using system;
2 using system. Collections. Generic;
3 using system. LINQ;
4 using system. net;
5 using system. windows;
6 using system. Windows. controls;
7 using system. Windows. documents;
8 using system. Windows. input;
9 using system. Windows. Media;
10 using system. Windows. Media. animation;
11 using system. Windows. shapes;
12 using system. runtime. interopservices. automation;
13
14 namespace silverlightapplicationdemo
15 {
16 publicpartialclass mainpage: usercontrol
17 {
18 public mainpage ()
19 {
20 initializecomponent ();
21 app. Current. checkanddownloadupdateasync ();
22 loaded + = new routedeventhandler (mainpage_loaded );
23 app. Current. checkanddownloadupdatecompleted + = new checkanddownloadupdatecompletedeventhandler (current_checkanddownloadupdatecompleted );
24 Webb. Source = new uri ("http://www.bing.com ");
25 // Webb. navigatetostring ("<B> Hello World </B> ");
26 Webb. loadcompleted + = new system. Windows. Navigation. loadcompletedeventhandler (webb_loadcompleted );
27}
28
29 void webb_loadcompleted (Object sender, system. Windows. Navigation. navigationeventargs E)
30 {
31 // System Tray
32 notificationwindow y = new notificationwindow ();
33 bytes Y. width = 400;
34 notify. Height = 100;
35 textblock TB = new textblock ();
36 TB. Text = "load complete ";
37 TB. fontsize = 24;
38 bytes Y. content = Tb;
39 notify. Show (3000 );
40}
41
42 void current_checkanddownloadupdatecompleted (Object sender, checkanddownloadupdatecompletedeventargs E)
43 {
44 // detection update
45 if (E. updateavailable)
46 {
47 MessageBox. Show ("an update has been installed to see the updates please ECIT and restart tne Application! ");
48}
49}
50
51 void mainpage_loaded (Object sender, routedeventargs E)
52 {
53 If (App. Current. installstate = installstate. installed)
54 {
55 installcontainer. Visibility = visibility. collapsed;
56}
57}
58
59 privatevoid installbtn_click (Object sender, system. Windows. routedeventargs E)
60 {
61 // Installation
62 app. Current. Install ();
63}
64
65 privatevoid launchbtn_click (Object sender, system. Windows. routedeventargs E)
66 {
67 // call the COM component to open the word
68 dynamic word = automationfactory. Createobject ("word. application ");
69 word. Visible = true;
70 dynamic Doc = word. Documents. Add ();
71 string inserttext = textregion. text;
72 dynamic range = Doc. Range (0, 0 );
73 range. Text = inserttext;
74}
75}
76}

Source code: http://files.cnblogs.com/yujian/SilverlightApplicationDemo.rar

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.