示例#1
0
        public void Count()
        {
            while (ShouldCount)
            {
                long beginTime = DateTime.Now.Ticks;
                try
                {
                    CurrentTime.Timer();
                    TimeLabel.Invoke(new Action(() => TimeLabel.Text = CurrentTime.ToString()));

                    Distance += (Speed / 3600);
                    DistanceLabel.Invoke(new Action(() => DistanceLabel.Text = $"{Distance:f2}"));

                    RPM = Speed * 2.8;
                    RpmLabel.Invoke(new Action(() => RpmLabel.Text = RPM.ToString()));

                    Pulse = 90 + (int)((Power / 6) * (Speed / 10));
                    PulseLabel.Invoke(new Action(() => PulseLabel.Text = Pulse.ToString()));


                    SpeedTrackbar.Invoke(new Action(() => SpeedTrackbar.Value = (int)Speed));
                    SpeedLabel.Invoke(new Action(() => SpeedLabel.Text        = Speed.ToString()));
                    PowerTrackbar.Invoke(new Action(() => PowerTrackbar.Value = (int)Power));
                    PowerLabel.Invoke(new Action(() => PowerLabel.Text        = Power.ToString()));
                }
                catch (Exception e)
                {
                }

                Wait1s(beginTime);
            }
        }
示例#2
0
        void ReleaseDesignerOutlets()
        {
            if (ProfLabel != null)
            {
                ProfLabel.Dispose();
                ProfLabel = null;
            }

            if (RoomLabel != null)
            {
                RoomLabel.Dispose();
                RoomLabel = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (DividerView != null)
            {
                DividerView.Dispose();
                DividerView = null;
            }

            if (RoomLabel != null)
            {
                RoomLabel.Dispose();
                RoomLabel = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (EndTimeLabel != null)
            {
                EndTimeLabel.Dispose();
                EndTimeLabel = null;
            }
        }
示例#4
0
        void ReleaseDesignerOutlets()
        {
            if (CellColorHintView != null)
            {
                CellColorHintView.Dispose();
                CellColorHintView = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (GuideCardNameLabel != null)
            {
                GuideCardNameLabel.Dispose();
                GuideCardNameLabel = null;
            }
        }
示例#5
0
        public void Count()
        {
            while (ShouldCount)
            {
                try
                {
                    CurrentTime.Timer();
                    TimeLabel.Invoke(new Action(() => TimeLabel.Text = CurrentTime.ToString()));

                    Distance += (Speed / 3600);
                    DistanceLabel.Invoke(new Action(() => DistanceLabel.Text = $"{Distance:f2}"));

                    RPM = Speed * 2.8;
                    RpmLabel.Invoke(new Action(() => RpmLabel.Text = RPM.ToString()));

                    Pulse = 90 + (int)((Power / 6) * (Speed / 20));
                    PulseLabel.Invoke(new Action(() => PulseLabel.Text = Pulse.ToString()));


                    SpeedTrackbar.Invoke(new Action(() => SpeedTrackbar.Value = (int)Speed));
                    SpeedLabel.Invoke(new Action(() => SpeedLabel.Text        = Speed.ToString()));
                    PowerTrackbar.Invoke(new Action(() => PowerTrackbar.Value = (int)Power));
                    PowerLabel.Invoke(new Action(() => PowerLabel.Text        = Power.ToString()));
                }
                catch (Exception e)
                {
                }

                Thread.Sleep(1000);
            }
        }
示例#6
0
        //-------------------------------------------------------------------------------------------------------------

        private void Tick_tmr_call_time(Object myObject, EventArgs myEventArgs)
        {
            DateTime TickTime = DateTime.Parse(DateTime.Now.ToLongTimeString());
            TimeSpan diff     = TickTime - BEGIN_CALL_TIME;

            TimeLabel.Text = diff.ToString();
            TimeLabel.Refresh();

            //if call answered
            if (AsteriskPhoneAgentForm.INCOMING_CALL_ANSWER == true)
            {
                CaptionPanel.BackColor = Color.Blue;
                TITLElabel.BackColor   = Color.Blue;
                AsteriskPhoneAgentForm.INCOMING_CALL_ANSWER = false;
                if (AsteriskPhoneAgentForm.CALLCENTER_OPENONANSWER)
                {
                    if (URL_label.Text.Contains("http"))
                    {
                        System.Diagnostics.Process.Start(URL_label.Text);
                    }
                }

                if (RINGENABLED == true)
                {
                    //activate tranfer call button
                    btTansfercall.Enabled = true;

                    //Enable keypress feature
                    this.KeyPreview = true;
                }
            }
        }
示例#7
0
        void ReleaseDesignerOutlets()
        {
            if (ContentLabel != null)
            {
                ContentLabel.Dispose();
                ContentLabel = null;
            }

            if (MainImageView != null)
            {
                MainImageView.Dispose();
                MainImageView = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (ContentConstraint != null)
            {
                ContentConstraint.Dispose();
                ContentConstraint = null;
            }
        }
示例#8
0
        public void TimeTypeProperty()
        {
            TimeLabel testLabel = new TimeLabel();

            testLabel.TimeType = TimeType.Approximate;

            Assert.AreEqual <TimeType>(testLabel.TimeType, TimeType.Approximate);
        }
示例#9
0
        public void DisplaySecondsProperty()
        {
            TimeLabel testLabel = new TimeLabel();

            testLabel.DisplaySeconds = true;

            Assert.AreEqual <bool>(testLabel.DisplaySeconds, true);
        }
示例#10
0
        protected void LogTime(TimeLabel tl)
        {
            long elapsed = Stopwatch.ElapsedMilliseconds;

            StringBuilder.Append(tl + "=" + elapsed + "ms ");
            Times[(int)tl].Add(elapsed);
            Stopwatch.Restart();
        }
示例#11
0
        public void NullIndexProperty()
        {
            TimeLabel testLabel = new TimeLabel();

            testLabel.NullIndex = 2;

            Assert.AreEqual <int>(2, testLabel.NullIndex);
        }
示例#12
0
        public void DisplayAMPMProperty()
        {
            TimeLabel testLabel = new TimeLabel();

            testLabel.DisplayAMPM = true;

            Assert.AreEqual <bool>(testLabel.DisplayAMPM, true);
        }
示例#13
0
        public void Display12HourProperty()
        {
            TimeLabel testLabel = new TimeLabel();

            testLabel.Display12Hour = true;

            Assert.AreEqual <bool>(testLabel.Display12Hour, true);
        }
示例#14
0
        private void SetTime(string time)
        {
            if (TimeLabel.InvokeRequired)
            {
                TimeLabel.Invoke(new MethodInvoker(() => { SetTime(time); }));
            }

            TimeLabel.Text = time;
        }
示例#15
0
        public void ValueProperty()
        {
            NhsTime   time      = new NhsTime();
            TimeLabel testLabel = new TimeLabel();

            testLabel.Value = time;

            Assert.AreEqual <NhsTime>(testLabel.Value, time);
        }
示例#16
0
        void ReleaseDesignerOutlets()
        {
            if (AddressLabel != null)
            {
                AddressLabel.Dispose();
                AddressLabel = null;
            }

            if (AdvisorLabel != null)
            {
                AdvisorLabel.Dispose();
                AdvisorLabel = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (IconImage != null)
            {
                IconImage.Dispose();
                IconImage = null;
            }

            if (NumberLabel != null)
            {
                NumberLabel.Dispose();
                NumberLabel = null;
            }

            if (ReasonLabel != null)
            {
                ReasonLabel.Dispose();
                ReasonLabel = null;
            }

            if (StatusLabel != null)
            {
                StatusLabel.Dispose();
                StatusLabel = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
 protected override void SetBindings()
 {
     Bindings.Add(this.SetBinding(() => ViewModel.SuccessfullySent).WhenSourceChanges(() =>
     {
         if (ViewModel.SuccessfullySent)
         {
             TimeLabel.SetCompoundDrawablesWithIntrinsicBounds(0, 0, Resource.Drawable.icon_double_tick, 0);
         }
     }));
 }
示例#18
0
 private Task UpdateTime()
 {
     return(Task.Run(() =>
     {
         while (updateTime)
         {
             TimeLabel.Invoke(new Action(() => TimeLabel.Text = DateTime.Now.ToString()));
         }
     }));
 }
示例#19
0
        public void TimeValueProperty()
        {
            DateTime baseDateTime = new DateTime(2008, 12, 12);

            TimeLabel testLabel = new TimeLabel();

            testLabel.TimeValue = baseDateTime;

            Assert.AreEqual <DateTime>(baseDateTime, testLabel.TimeValue);
        }
示例#20
0
    public void ActivateLabel(string txt)
    {
        if (_pool.Count == 0)
        {
            return;
        }

        TimeLabel timeLabel = _pool.Pop();

        timeLabel.Activate(txt, _labelTTL);
    }
示例#21
0
 private void MenuButton_Click(object sender, EventArgs e)
 {
     TimeLabel.Hide();
     NextButton.Hide();
     AddQuestionButton.Show();
     StartButton.Show();
     ResetButton.Hide();
     IDLabel.Show();
     IDTextField.Show();
     DeleteAnswersButton.Hide();
     Timp.Stop();
 }
示例#22
0
 private void UpdateUI()
 {
     if (TimeLabel.InvokeRequired)
     {
         var d = new SafeCallDelegate(UpdateUI);
         TimeLabel.Invoke(d, new object[] { });
     }
     else
     {
         TimeLabel.FitText(Stopwatch.Elapsed.ToString().Substring(0, 8), 999);
     }
 }
示例#23
0
 void Awake()
 {
     _pool = new Stack <TimeLabel>();
     for (int i = 0; i < POOLS_SIZE; i++)
     {
         Transform timeLabelTF = Instantiate(timeLabelPrefab, timeLabelPrefab.position, Quaternion.identity) as Transform;
         timeLabelTF.parent = timePenaltyParent;
         TimeLabel timeLabel = timeLabelTF.GetComponent <TimeLabel>();
         timeLabel.OnReturnToPool.AddListener += OnReturnToPoolEvent;
         timeLabel.Init(timeLabelPrefab.position, timeLabelPrefab.position - 0.2f * Vector3.up);
         _pool.Push(timeLabel);
     }
 }
示例#24
0
        void ReleaseDesignerOutlets()
        {
            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (LocationLabel != null)
            {
                LocationLabel.Dispose();
                LocationLabel = null;
            }

            if (NavLabel != null)
            {
                NavLabel.Dispose();
                NavLabel = null;
            }

            if (PaidSwitch != null)
            {
                PaidSwitch.Dispose();
                PaidSwitch = null;
            }

            if (ShareLabel != null)
            {
                ShareLabel.Dispose();
                ShareLabel = null;
            }

            if (SplitNumberLabel != null)
            {
                SplitNumberLabel.Dispose();
                SplitNumberLabel = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TotalLabel != null)
            {
                TotalLabel.Dispose();
                TotalLabel = null;
            }
        }
 static void howell5198client_FileDataReceived(object sender, FileDataReceivedEventArgs e)
 {
     if (e.FileData.Type == 0)
     {
         if (e.FileData.Datalen != 100)
         {
             Console.WriteLine("data error.");
         }
         TimeLabel timelabel = new TimeLabel();
         timelabel.FromBytes(e.FileData.Buffer, 0, 100);
         Console.WriteLine("FileLen:{0}", timelabel.FileLen);
     }
     Console.WriteLine("FileDataReceived: ChannelNo:{0} DataLen:{1}", ((Howell5198FileStream)sender).ChannelNo, e.FileData.Datalen);
 }
示例#26
0
 public AddPaymentForm(int id, string n, decimal m)
 {
     InitializeComponent();
     id_user              = id;
     name                 = n;
     old_money            = m;
     UserLogin.Text      += name;
     DateCheckBox.Checked = true;
     HourBox.Hide();
     MinuteBox.Hide();
     TimeLabel.Hide();
     IDLabel.Hide();
     IDComboBox.Hide();
     hLabel.Hide();
     mLabel.Hide();
 }
示例#27
0
        public ControlPanel()
        {
            this.SuspendLayout();
            _newgame = new NewGameButton();
            this.Controls.Add(_newgame);

            _mineCtr = new MineCounter();
            this.Controls.Add(_mineCtr);

            _time = new TimeLabel();
            this.Controls.Add(_time);
            this.ResumeLayout();

            InitializeComponent();
            this.BackColor = Color.FromArgb(0, Color.White);
        }
        private void prepareTimeViews()
        {
            var tapRecognizer = new UITapGestureRecognizer(() =>
            {
                switchTimeLabelAndInput();

                if (!TimeInput.Hidden)
                {
                    TimeInput.FormattedDuration = TimeLabel.Text;
                    TimeInput.BecomeFirstResponder();
                }
            });

            TimeLabel.UserInteractionEnabled = true;
            TimeLabel.AddGestureRecognizer(tapRecognizer);

            TimeInput.LostFocus += onTimeInputLostFocus;
        }
        void ReleaseDesignerOutlets()
        {
            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (LocationLabel != null)
            {
                LocationLabel.Dispose();
                LocationLabel = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (SpeakerLabel != null)
            {
                SpeakerLabel.Dispose();
                SpeakerLabel = null;
            }

            if (OverviewLabel != null)
            {
                OverviewLabel.Dispose();
                OverviewLabel = null;
            }

            if (FavoriteButton != null)
            {
                FavoriteButton.Dispose();
                FavoriteButton = null;
            }

            if (ScrollView != null)
            {
                ScrollView.Dispose();
                ScrollView = null;
            }
        }
示例#30
0
        void ReleaseDesignerOutlets()
        {
            if (IndexLabel != null)
            {
                IndexLabel.Dispose();
                IndexLabel = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
示例#31
0
 public void Time(string label)
 {
     TimeLabel timeLabel = new TimeLabel();
     timeLabel.Name = label;
     timeLabel.StartTime = DateTime.Now.Ticks / 10000;
 }