Exemplo n.º 1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            UITableViewCell cell = tableView.DequeueReusableCell(TimerCellIdentifier);

            string  cellTitle = $"Phase {indexPath.Row}";
            MyTimer timer     = ViewModel.Timers[indexPath.Row];

            if (cell == null)
            {
                cell = new UITableViewCell(UITableViewCellStyle.Subtitle, TimerCellIdentifier);
            }

            cell.TextLabel.Text       = timer.Name;
            cell.DetailTextLabel.Text = $"{timer.Duration} mn";

            return(cell);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            MyTimer t = new MyTimer(increment);


            t.intervalo = 1000;
            string op = "";

            do
            {
                Console.WriteLine("Press any key to start.");
                Console.ReadKey();
                t.run();
                Console.WriteLine("Press any key to pause.");
                Console.ReadKey();
                t.pause();
                Console.WriteLine("Press 1 to restart or Enter to end.");
                op = Console.ReadLine();
            } while (op == "1");
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            MyTimer timer = new MyTimer("alabalaportocala", 2);

            timer.Run();
        }