static void Main()
 {
     // When the receiver is ready to receive, it sends its ID.
     using var MyId = new GlobalReader <Guid>("MyId", handler: MyId_DataChanged);
     // And now sit and wait
     Console.ReadLine();
 }
Ejemplo n.º 2
0
        public FormVote()
        {
            InitializeComponent();

            Yes          = new Global <bool>("Yes");
            TotalYes     = new GlobalReader <int>("TotalYes", handler: TotalYes_DataChanged);
            TotalNo      = new GlobalReader <int>("TotalNo", handler: TotalNo_DataChanged);
            ServerOnline = new GlobalReader <bool>("ServerOnline", false, ServerOnline_DataChanged);
        }
        static void Main()
        {
            Guid myId = Guid.NewGuid();

            using (gPlantData = new GlobalReader <PlantData>(myId.ToString(), handler: GPlantData_DataChanged))
                using (Global <Guid> MyId = new Global <Guid>("MyId"))
                {
                    MyId.Value = myId;
                    Console.ReadLine();
                }
        }
Ejemplo n.º 4
0
        public VoteFormServer()
        {
            InitializeComponent();

            Yes      = new GlobalReader <bool>("Yes", handler: Yes_DataChanged);
            TotalYes = new Global <int>("TotalYes")
            {
                Value = 0
            };
            TotalNo = new Global <int>("TotalNo")
            {
                Value = 0
            };

            ServerOnline = new Global <bool>("ServerOnline")
            {
                Value = true
            };
        }