blob: 63c8cc5f78bc6be3fec14762536d1351c6336b83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Drawing;
using Google.Protobuf;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
using Tango.PMR.Stubs;
using Tango.PMR.Diagnostics;
using Tango.FSE.Common.Connection;
using Tango.FSE.Common.Diagnostics;
using Tango.FSE.Procedures;
namespace Tango.FSE.Procedures.Examples.Connection
{
#region Example
public class Program
{
public void OnExecute(IProcedureContext context)
{
if (context.IsConnected) //Check if there is an active machine connection.
{
if (context.ConnectionType == MachineConnectionTypes.Wifi) //Check enumeration of the active connection type.
{
context.WriteLine("Machine " + context.ConnectedMachine.SerialNumber + " is connected via WiFi.");
}
}
}
}
#endregion
}
|