Exemplo n.º 1
0
        //Condition when download data complete
        void Detail_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                HTMLText = e.Result;
            }

            GetTimer.Start();
        }
Exemplo n.º 2
0
        //Button Start
        private void StartBtn_Click_1(object sender, EventArgs e)
        {
            //set button color when click start
            StartBtn.BackColor = Color.LimeGreen;
            StopBtn.BackColor  = Color.Empty;

            //timer 1000 milisec start
            timer2.Enabled = true;
            timer2.Start();

            //start get data
            string result = null;
            string url    = "http://192.168.70.61";

            //timer get data start
            GetTimer.Enabled = true;
            GetTimer.Start();
        }
Exemplo n.º 3
0
        //When form loadding
        private void Dataform_Load(object sender, EventArgs e)
        {
            //set url to get data from sensor
            string result = null;
            string url    = "http://192.168.70.61";

            //start get data
            GetTimer.Enabled = true;
            GetTimer.Start();

            //set button color
            StartBtn.BackColor = Color.LimeGreen;

            //set timer star
            timer2.Enabled = true;
            timer2.Start();

            //set size graph and set plot graph
            SetSize();
            stopwatch.Start();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 根据键获得对应的值。
        /// </summary>
        /// <param name="key">键。</param>
        /// <returns><paramref name="key"/> 对应的值。</returns>
        /// <exception cref="ArgumentNullException">当 <paramref name="key"/> 为 <c>null</c> 时抛出此异常。</exception>
        public TValue Get(TKey key)
        {
            GetTimer.Start();
            if (key == null)
            {
                throw new ArgumentNullException("argument to Get() is null");
            }
            if (IsEmpty())
            {
                GetTimer.Stop();
                return(default(TValue));
            }
            var rank = Rank(key);

            if (rank < n && keys[rank].Equals(key))
            {
                return(values[rank]);
            }

            GetTimer.Stop();
            return(default(TValue));
        }