コード例 #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;
            }
        }
コード例 #3
0
        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
ファイル: TimeLabelTest.cs プロジェクト: odnodn/mscui
        public void TimeTypeProperty()
        {
            TimeLabel testLabel = new TimeLabel();

            testLabel.TimeType = TimeType.Approximate;

            Assert.AreEqual <TimeType>(testLabel.TimeType, TimeType.Approximate);
        }
コード例 #9
0
ファイル: TimeLabelTest.cs プロジェクト: odnodn/mscui
        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
ファイル: TimeLabelTest.cs プロジェクト: odnodn/mscui
        public void NullIndexProperty()
        {
            TimeLabel testLabel = new TimeLabel();

            testLabel.NullIndex = 2;

            Assert.AreEqual <int>(2, testLabel.NullIndex);
        }
コード例 #12
0
ファイル: TimeLabelTest.cs プロジェクト: odnodn/mscui
        public void DisplayAMPMProperty()
        {
            TimeLabel testLabel = new TimeLabel();

            testLabel.DisplayAMPM = true;

            Assert.AreEqual <bool>(testLabel.DisplayAMPM, true);
        }
コード例 #13
0
ファイル: TimeLabelTest.cs プロジェクト: odnodn/mscui
        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
ファイル: TimeLabelTest.cs プロジェクト: odnodn/mscui
        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;
            }
        }
コード例 #17
0
 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
ファイル: TimeLabelTest.cs プロジェクト: odnodn/mscui
        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
ファイル: Form1.cs プロジェクト: cristi-iacob/uvvss
 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
ファイル: DWTimer.cs プロジェクト: tonylukasavage/DWR-Tracker
 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;
            }
        }
コード例 #25
0
 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
ファイル: AddPaymentForm.cs プロジェクト: PatrykM5/MySQLApp
 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);
        }
コード例 #28
0
        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
ファイル: Console.cs プロジェクト: nagyistoce/SharpJS
 public void Time(string label)
 {
     TimeLabel timeLabel = new TimeLabel();
     timeLabel.Name = label;
     timeLabel.StartTime = DateTime.Now.Ticks / 10000;
 }