Ejemplo n.º 1
0
        /// <summary>
        /// UI Control
        /// </summary>
        /// <param name="text"></param>
        #region UI Control
        //For Log calls
        public void logCall(bool sent, string text)
        {
            invokeDelegate del = () =>
            {
                logData(sent, text);
            };

            Invoke(del);
        }
Ejemplo n.º 2
0
        private void tcpServer1_OnConnect(tcpServer.TcpServerConnection connection)
        {
            invokeDelegate setText = () => lblConnected.Text = tcpServer1.Connections.Count.ToString();

            Invoke(setText);
            while (tcpServer1.Connections.Count != 0)
            {
                toolStripStatusLabel4.Text = "Connection: 1 !"; toolStripStatusLabel4.BackColor = Color.Lime;
            }
        }
Ejemplo n.º 3
0
 private void ShowCompleted()
 {
     if (this.InvokeRequired)
     {
         invokeDelegate updateControl = delegate() { };
         updateControl = ShowCompleted;
         Invoke(updateControl);
     }
     this.SetPages();
     this.CheckEnable();
     this.printButton.Enabled = true;
     this.pdfButton.Enabled   = true;
     this.UpdateToolStrip();
     ShowSelectedPage();
 }
Ejemplo n.º 4
0
        private void tcpServer1_OnDataAvailable(tcpServer.TcpServerConnection connection)
        {
            byte[] data = readStream(connection.Socket);

            if (data != null)
            {
                string dataStr = Encoding.ASCII.GetString(data);

                invokeDelegate del = () =>
                {
                    logData(false, dataStr);
                };
                Invoke(del);

                data = null;
            }
        }
Ejemplo n.º 5
0
 private void UpdateToolStrip()
 {
     if (this.InvokeRequired)
     {
         invokeDelegate updateControl = delegate() { };
         updateControl = UpdateToolStrip;
         Invoke(updateControl);
     }
     if (this.toolStrip1 != null)
     {
         string str = String.Empty;
         if (this.Pages != null)
         {
             str = String.Format(CultureInfo.CurrentCulture, "of {0}", this.Pages.Count);
         }
         this.numericToolStripTextBox2.Text = (this.pageNumber + 1).ToString(CultureInfo.CurrentCulture);
         this.pageInfoLabel.Text            = str;
     }
 }
Ejemplo n.º 6
0
        private void _tcpServer_OnDataAvailable(TcpServerConnection connection)
        {
            byte[] data = readStream(connection.Socket);

            if (data != null)
            {
                //string dataStr = Encoding.ASCII.GetString(data);
                try
                {
                    invokeDelegate del = () =>
                    {
                        ParseSvsData(data);
                    };
                    Invoke(del);
                    data = null;
                }
                catch { }
            }
        }
Ejemplo n.º 7
0
        private void ShowSelectedPage()
        {
            if (this.InvokeRequired)
            {
                invokeDelegate updateControl = delegate(){};
                updateControl = ShowSelectedPage;
                Invoke(updateControl);
            }
            if (this.pageNumber < this.pages.Count)
            {
                ExporterPage sp = pages[this.pageNumber];

                if (this.bitmap != null)
                {
                    this.bitmap.Dispose();
                }
                this.bitmap = this.CreateBitmap(sp);
                this.Invalidate(true);
                this.Update();
            }
            this.UpdateToolStrip();
        }
Ejemplo n.º 8
0
        private void tcpServer1_OnConnect(tcpServer.TcpServerConnection connection)
        {
            invokeDelegate setText = () => lbconnectstate.Text = GT_DataPusher.m_object.Connections.Count > 0? "Connect" : "Not Connect";

            Invoke(setText);
        }
Ejemplo n.º 9
0
        private void tcpServer4_OnConnect(tcpServer.TcpServerConnection connection)
        {
            invokeDelegate setText = () => lblConnected4.Text = tcpServer4.Connections.Count.ToString();

            Invoke(setText);
        }