コード例 #1
0
ファイル: Dataset.cs プロジェクト: silou/SWL-Clockwatcher
 private void ClearReady()
 {
     foreach (var tReady in (from t in TimerList
                             where t.IsReady
                             select t).ToList())
     {
         TimerList.Remove(tReady);
     }
 }
コード例 #2
0
 /// <summary>
 /// Saves the current state time spent on.
 /// </summary>
 void SaveTimer()
 {
     StateTimer.Stop();
     if (StateTimer.ElapsedMilliseconds >= 1000)
     {
         TimerList.Add(new Tuple <string, double> (currentState, StateTimer.ElapsedSeconds));
     }
     StateTimer.Reset();
 }
コード例 #3
0
 /// <summary>
 /// Start is called just before any of the Update methods is called the first time.
 /// </summary>
 private void Start()
 {
     skillACDTimer = new Timer(1, 3, true, true, false);
     skillACDTimer.TimerTicking += OnSkillACDTimerTicking;
     skillBCDTimer = new Timer(1, 4, true, true, false);
     skillBCDTimer.TimerTicking     += OnSkillBCDTimerTicking;
     skillCDTimerList                = new TimerList(skillACDTimer, skillBCDTimer);
     skillCDTimerList.TimersReseted += OnSkillTimersReseted;
     Invoke("ResetAllSkills", 2.5f);
 }
コード例 #4
0
        internal void SaveWorkouts(string name)
        {
            List <AtomicTimer> currentTimers = TimerList.ToList <AtomicTimer>();

            //var currentSet = ;
            AppCore.CurrentWorkout.Timers.Where(set => string.Equals(this.SetId, set.SetId)).First().Timers = currentTimers;
            AppCore.Workouts.Where(workout => workout.Id == AppCore.CurrentWorkout.Id).First().Timers       = AppCore.CurrentWorkout.Timers;
            var dbMgr = new DatabaseManager();

            dbMgr.SaveWorkouts(AppCore.Workouts);//.SaveObsCollOfTimers(TimerList, name, SetId);
            //throw new NotImplementedException();
        }
コード例 #5
0
    public ChaseSubAct()
    {
        _finished   = false;
        _tempTimers = new();

        _ghostPoints = Points.From(200);

        _tempSprites = new();
        _ghosts      = new();

        var justOffScreen = new Vector2(250, 140);

        _ghostEatenTimer = new(0.Milliseconds(), static () => { });
コード例 #6
0
        public void LoadTimers()
        {
            var blub = AppCore.CurrentWorkout.Timers.Where(timer => string.Equals(timer.SetId, this.SetId)).First().Timers;

            TimerList.Clear();
            foreach (var item in blub)
            {
                TimerList.Add(item);
            }
            //var dbMgr = new DatabaseManager();
            //TimerList = dbMgr.LoadTimerList(SetId);
            //benutze setid um richtgen Datensatz zu ladnen
            //throw new NotImplementedException();
        }
コード例 #7
0
ファイル: Dataset.cs プロジェクト: silou/SWL-Clockwatcher
        internal CharacterTimers(string charName, IEnumerable <TimerEntry> timers) :
            base(charName)
        {
            var view = CollectionViewSource.GetDefaultView(TimerList);

            view.SortDescriptions.Add(new SortDescription(nameof(TimerEntry.RemainingTime), ListSortDirection.Ascending));
            ((ICollectionViewLiveShaping)view).IsLiveSorting = true;

            foreach (var timer in timers)
            {
                TimerList.Add(timer);
            }

            ClearReadyCommand = new CommandWrapper(o => ClearReady(), o => true);
        }
コード例 #8
0
        public MainWindowViewModel()
        {
            //ViewにViewModelのインスタンス渡す
            _window = new MainWindow(this);


            _timeMeasurement = new TimeMeasurement();

            IniViewTimer();


            _workTimeList   = new TimerList();
            _relaxTimerList = new TimerList();

            _modeChangeVm = new ModeChangeVm(_window);
            _modeChangeVm.Stop();
        }
コード例 #9
0
        /// <summary>
        /// Get list with timer entries
        /// </summary>
        /// <returns></returns>
        public TimerList GetTimerList()
        {
            TimerList result = null;

            using (var da = new Enigma2WebInterfaceDataAdapter <TimerList>(this.connectionManager.ActiveConnection))
            {
                try
                {
                    result = da.Execute(Enigma2WebInterfacesMethods.GetTimerList);
                }
                catch (Exception ex)
                {
                    // TODO: Exception-Handling
                }
            }

            return(result);
        }
コード例 #10
0
ファイル: Dataset.cs プロジェクト: silou/SWL-Clockwatcher
 internal void Merge(IEnumerable <TimerEntry> other)
 {
     foreach (var t in other)
     {
         var existing = TimerList.FirstOrDefault((x) => x.IsAgent == t.IsAgent && x.ID == t.ID);
         if (existing != null)
         {
             existing.UnlockTime = t.UnlockTime;
             if (existing.Class != t.Class)
             {
                 existing.ChangeTimerClass(t.Class);
             }
         }
         else if (!t.IsReady)
         {
             TimerList.Add(t);
         }
     }
 }
コード例 #11
0
 private void TimerTick(object sender, EventArgs e)
 {
     timers.Update();
     foreach (Timer timer in timers.ToList())
     {
         if (timer.Elapsed && !timer.DeleteButtonIsShowed)
         {
             TimerList.ScrollIntoView(timer);
             timer.DeleteButtonIsShowed = true;
             timer.IsVisibleFromElapsed = true;
             if (!timers.DoNotDisturb)
             {
                 timer.mediaPlayer.Open(timer.SoundUri);
                 timer.mediaPlayer.Volume = 1;
                 timer.mediaPlayer.Play();
             }
         }
     }
 }
コード例 #12
0
        /// <summary>
        /// Called when [destroy].
        /// </summary>
        private void OnDestroy()
        {
            if (skillACDTimer != null)
            {
                skillACDTimer.TimerTicking -= OnSkillACDTimerTicking;
                skillACDTimer = null;
            }

            if (skillBCDTimer != null)
            {
                skillBCDTimer.TimerTicking -= OnSkillBCDTimerTicking;
                skillBCDTimer = null;
            }

            if (skillCDTimerList != null)
            {
                skillCDTimerList.TimersReseted -= OnSkillTimersReseted;
                skillCDTimerList = null;
            }
        }
コード例 #13
0
ファイル: MainView.cs プロジェクト: dtmajors/Defiance-1
        private void View_Resize(object sender, EventArgs e)
        {
            try
            {
                int width  = View.Width;
                int height = View.Height;

                Wrapper.SetControlRect(Tabs, new Rectangle(45, 50, width - 45, height - 65));

                DefinedLayout.SetControlRect(TimerList, new Rectangle(0, 0, width - 45, height - 80));
                PlayerLayout.SetControlRect(PlayerList, new Rectangle(0, 0, width - 45, (height - 65) / 2));
                PlayerLayout.SetControlRect(GuildList, new Rectangle(0, (height - 65) / 2, width - 45, (height - 65) / 2));
                LogoutLayout.SetControlRect(FriendsList, new Rectangle(0, 20, (width - 45) / 2, height - 145));
                LogoutLayout.SetControlRect(EnemiesList, new Rectangle((width - 45) / 2, 20, (width - 45) / 2, height - 145));
                CorpseLayout.SetControlRect(CorpseList, new Rectangle(0, 0, width - 45, height - 80));
                PortalLayout.SetControlRect(PortalList, new Rectangle(0, 0, width - 45, height - 80));

                PlayerList.SetColumnWidth(1, width - 215);
                PlayerList.SetColumnWidth(2, 45);
                PlayerList.SetColumnWidth(3, 75);
                PlayerList.SetColumnWidth(4, 0);

                GuildList.SetColumnWidth(1, width - 215);
                GuildList.SetColumnWidth(2, 45);
                GuildList.SetColumnWidth(3, 75);
                GuildList.SetColumnWidth(4, 0);

                TimerList.SetColumnWidth(1, width - 215);
                TimerList.SetColumnWidth(2, 45);
                TimerList.SetColumnWidth(3, 75);
                TimerList.SetColumnWidth(4, 0);

                PortalList.SetColumnWidth(1, width - 215);
                PortalList.SetColumnWidth(2, 45);
                PortalList.SetColumnWidth(3, 75);
                PortalList.SetColumnWidth(4, 0);

                CorpseList.SetColumnWidth(1, width - 215);
                CorpseList.SetColumnWidth(2, 45);
                CorpseList.SetColumnWidth(3, 75);
                CorpseList.SetColumnWidth(4, 0);

                FriendsList.SetColumnWidth(0, (width - 45) / 2 - 45);
                EnemiesList.SetColumnWidth(0, (width - 45) / 2 - 45);

                Wrapper2.SetControlRect(Tabs2, new Rectangle(45, 100, width - 45, height - 100));

                Rectangle controlRect = Wrapper.GetControlRect(VersusNote);
                Wrapper.SetControlRect(VersusNote, new Rectangle(width - 125, 32, 35, 15));
                controlRect = Wrapper.GetControlRect(GuildNote);
                Wrapper.SetControlRect(GuildNote, new Rectangle(width - 205, 32, 70, 15));
                controlRect = Wrapper.GetControlRect(EnemyNote);
                Wrapper.SetControlRect(EnemyNote, new Rectangle(width - 75, 32, 70, 15));

                controlRect = LogoutLayout.GetControlRect(AddFriend);
                LogoutLayout.SetControlRect(AddFriend, new Rectangle((width - 45) / 2 - 40, height - 125, 40, 15));
                controlRect = LogoutLayout.GetControlRect(AddEnemy);
                LogoutLayout.SetControlRect(AddEnemy, new Rectangle(width - 85, height - 125, 40, 15));
                controlRect = LogoutLayout.GetControlRect(Friend);
                LogoutLayout.SetControlRect(Friend, new Rectangle(4, height - 125, (width - 45) / 2 - 45, 15));
                controlRect = LogoutLayout.GetControlRect(Enemy);
                LogoutLayout.SetControlRect(Enemy, new Rectangle((width - 45) / 2 + 5, height - 125, (width - 45) / 2 - 45, 15));

                controlRect = LogoutLayout.GetControlRect(FriendsNote);
                LogoutLayout.SetControlRect(FriendsNote, new Rectangle(5, 0, (width / 2) - 5, 15));
                controlRect = LogoutLayout.GetControlRect(EnemiesNote);
                LogoutLayout.SetControlRect(EnemiesNote, new Rectangle((width / 2) + 5, 0, (width / 2) - 5, 15));

                controlRect = AlertLayout.GetControlRect(AudioNote);
                AlertLayout.SetControlRect(AudioNote, new Rectangle(5, 5, width - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertSPK);
                AlertLayout.SetControlRect(AlertSPK, new Rectangle(5, 25, ((width - 45) / 2) - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertSS);
                AlertLayout.SetControlRect(AlertSS, new Rectangle(((width - 45) / 2) + 10, 25, (width / 2) - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertOdds);
                AlertLayout.SetControlRect(AlertOdds, new Rectangle(5, 45, ((width - 45) / 2) - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertBc);
                AlertLayout.SetControlRect(AlertBc, new Rectangle(((width - 45) / 2) + 10, 45, (width / 2) - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertDT);
                AlertLayout.SetControlRect(AlertDT, new Rectangle(5, 65, ((width - 45) / 2) - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertPKT);
                AlertLayout.SetControlRect(AlertPKT, new Rectangle(((width - 45) / 2) + 10, 65, (width / 2) - 10, 20));

                controlRect = AlertLayout.GetControlRect(TextNote);
                AlertLayout.SetControlRect(TextNote, new Rectangle(5, 85, width - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertPA);
                AlertLayout.SetControlRect(AlertPA, new Rectangle(5, 105, ((width - 45) / 2) - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertPF);
                AlertLayout.SetControlRect(AlertPF, new Rectangle(5, 125, ((width - 45) / 2) - 10, 20));
                controlRect = AlertLayout.GetControlRect(AlertLogP);
                AlertLayout.SetControlRect(AlertLogP, new Rectangle(((width - 45) / 2) + 10, 105, ((width - 45) / 2) - 10, controlRect.Height));
                controlRect = AlertLayout.GetControlRect(AlertDA);
                AlertLayout.SetControlRect(AlertDA, new Rectangle(((width - 45) / 2) + 10, 125, ((width - 45) / 2) - 10, controlRect.Height));
                controlRect = AlertLayout.GetControlRect(AlertLS);
                AlertLayout.SetControlRect(AlertLS, new Rectangle(5, 145, ((width - 45) / 2) - 10, 20));

                controlRect = AlertLayout.GetControlRect(SaveSettings2);
                AlertLayout.SetControlRect(SaveSettings2, new Rectangle(0, height - 107, width - 45 - 60, 15));
                controlRect = AlertLayout.GetControlRect(ResetAlarms);
                AlertLayout.SetControlRect(ResetAlarms, new Rectangle(width - 45 - 60, height - 107, 60, 15));

                controlRect = SentryLayout.GetControlRect(ElementLbl);
                SentryLayout.SetControlRect(ElementLbl, new Rectangle(5, 5, 60, 20));
                controlRect = SentryLayout.GetControlRect(BehaviourLbl);
                SentryLayout.SetControlRect(BehaviourLbl, new Rectangle((width - 45) / 2 + 5, 5, 60, 20));

                controlRect = SentryLayout.GetControlRect(Element);
                SentryLayout.SetControlRect(Element, new Rectangle(5, 25, (width - 45) / 2 - 10, 20));
                controlRect = SentryLayout.GetControlRect(Behaviour);
                SentryLayout.SetControlRect(Behaviour, new Rectangle((width - 45) / 2 + 5, 25, (width - 45) / 2 - 10, 20));

                controlRect = SentryLayout.GetControlRect(Ticker);
                SentryLayout.SetControlRect(Ticker, new Rectangle(5, 45, 60, 15));
                controlRect = SentryLayout.GetControlRect(TickerNote);
                SentryLayout.SetControlRect(TickerNote, new Rectangle(70, 45, (width - 45) / 2 - 45, 15));
                controlRect = SentryLayout.GetControlRect(TickerNote2);
                SentryLayout.SetControlRect(TickerNote2, new Rectangle(5, 60, width - 45, 15));

                controlRect = SentryLayout.GetControlRect(Range);
                SentryLayout.SetControlRect(Range, new Rectangle(5, 85, 30, 15));
                controlRect = SentryLayout.GetControlRect(RangeNote);
                SentryLayout.SetControlRect(RangeNote, new Rectangle(40, 85, 120, 15));

                controlRect = SentryLayout.GetControlRect(Timer);
                SentryLayout.SetControlRect(Timer, new Rectangle(5, 105, 30, 15));
                controlRect = SentryLayout.GetControlRect(TimerNote);
                SentryLayout.SetControlRect(TimerNote, new Rectangle(40, 105, 120, 15));

                controlRect = SentryLayout.GetControlRect(Comps);
                SentryLayout.SetControlRect(Comps, new Rectangle(5, 125, 30, 15));
                controlRect = SentryLayout.GetControlRect(TapersNote);
                SentryLayout.SetControlRect(TapersNote, new Rectangle(40, 125, 120, 15));

                controlRect = SentryLayout.GetControlRect(Slots);
                SentryLayout.SetControlRect(Slots, new Rectangle(5, 145, 30, 15));
                controlRect = SentryLayout.GetControlRect(SlotsNote);
                SentryLayout.SetControlRect(SlotsNote, new Rectangle(40, 145, 120, 15));



                controlRect = SentryLayout.GetControlRect(UseMacroLogic);
                SentryLayout.SetControlRect(UseMacroLogic, new Rectangle((width - 45) / 2 + 5, 85, (width - 45) / 2 - 10, 15));
                controlRect = SentryLayout.GetControlRect(UseLogDie);
                SentryLayout.SetControlRect(UseLogDie, new Rectangle((width - 45) / 2 + 5, 105, (width - 45) / 2 - 10, 15));

                controlRect = SentryLayout.GetControlRect(SaveSettings3);
                SentryLayout.SetControlRect(SaveSettings3, new Rectangle(0, height - 107, width - 45 - 60, 15));
                controlRect = SentryLayout.GetControlRect(ResetOptions);
                SentryLayout.SetControlRect(ResetOptions, new Rectangle(width - 45 - 60, height - 107, 60, 15));

                controlRect = Wrapper.GetControlRect(Die);
                Wrapper.SetControlRect(Die, new Rectangle(0, height - 15, 40, 15));
                controlRect = Wrapper.GetControlRect(IgnoreVP);
                Wrapper.SetControlRect(IgnoreVP, new Rectangle(40, height - 15, 40, 15));
                controlRect = Wrapper.GetControlRect(Fixbusy);
                Wrapper.SetControlRect(Fixbusy, new Rectangle(80, height - 15, 40, 15));
                controlRect = Wrapper.GetControlRect(Loc);
                Wrapper.SetControlRect(Loc, new Rectangle(120, height - 15, 40, 15));

                controlRect = Wrapper.GetControlRect(ModeLbl);
                Wrapper.SetControlRect(ModeLbl, new Rectangle(165, height - 15, 35, 15));
                controlRect = Wrapper.GetControlRect(Mode);
                Wrapper.SetControlRect(Mode, new Rectangle(200, height - 15, width - 190, 15));

                controlRect = Wrapper.GetControlRect(Imperil);
                Wrapper.SetControlRect(Imperil, new Rectangle(0, 0, 40, 15));
                controlRect = Wrapper.GetControlRect(Bludge);
                Wrapper.SetControlRect(Bludge, new Rectangle(40, 0, 40, 15));
                controlRect = Wrapper.GetControlRect(Slash);
                Wrapper.SetControlRect(Slash, new Rectangle(80, 0, 40, 15));
                controlRect = Wrapper.GetControlRect(Pierce);
                Wrapper.SetControlRect(Pierce, new Rectangle(120, 0, 40, 15));
                controlRect = Wrapper.GetControlRect(Light);
                Wrapper.SetControlRect(Light, new Rectangle(0, 15, 40, 15));
                controlRect = Wrapper.GetControlRect(Acid);
                Wrapper.SetControlRect(Acid, new Rectangle(40, 15, 40, 15));
                controlRect = Wrapper.GetControlRect(Fire);
                Wrapper.SetControlRect(Fire, new Rectangle(80, 15, 40, 15));
                controlRect = Wrapper.GetControlRect(Cold);
                Wrapper.SetControlRect(Cold, new Rectangle(120, 15, 40, 15));

                controlRect = Wrapper.GetControlRect(Stam);
                Wrapper.SetControlRect(Stam, new Rectangle(200, 0, 40, 15));
                controlRect = Wrapper.GetControlRect(Harm);
                Wrapper.SetControlRect(Harm, new Rectangle(200, 15, 40, 15));
                controlRect = Wrapper.GetControlRect(Tag);
                Wrapper.SetControlRect(Tag, new Rectangle(240, 0, width - 240, 30));

                controlRect = AdminLayout.GetControlRect(AdminNote);
                AdminLayout.SetControlRect(AdminNote, new Rectangle(5, 5, width - 50, 15));
                controlRect = AdminLayout.GetControlRect(ForcelogNote);
                AdminLayout.SetControlRect(ForcelogNote, new Rectangle(5, 35, 100, 15));
                controlRect = AdminLayout.GetControlRect(ForcelogBox);
                AdminLayout.SetControlRect(ForcelogBox, new Rectangle(5, 55, width - 110, 15));
                controlRect = AdminLayout.GetControlRect(ForcelogButton);
                AdminLayout.SetControlRect(ForcelogButton, new Rectangle(0, 85, (width - 50) / 2, 15));
                controlRect = AdminLayout.GetControlRect(ForceRelogButton);
                AdminLayout.SetControlRect(ForceRelogButton, new Rectangle((width - 50) / 2, 85, (width - 50) / 2, 15));

                controlRect = AdminLayout.GetControlRect(ForcelocButton);
                AdminLayout.SetControlRect(ForcelocButton, new Rectangle(0, 105, (width - 50) / 2, 15));
                controlRect = AdminLayout.GetControlRect(ForcedieButton);
                AdminLayout.SetControlRect(ForcedieButton, new Rectangle((width - 50) / 2, 105, (width - 50) / 2, 15));

                controlRect = Wrapper.GetControlRect(Strength);
                Wrapper.SetControlRect(Strength, new Rectangle(0, 50, 20, 20));
                controlRect = Wrapper.GetControlRect(Endurance);
                Wrapper.SetControlRect(Endurance, new Rectangle(20, 50, 20, 20));
                controlRect = Wrapper.GetControlRect(Coordination);
                Wrapper.SetControlRect(Coordination, new Rectangle(0, 70, 20, 20));
                controlRect = Wrapper.GetControlRect(Quickness);
                Wrapper.SetControlRect(Quickness, new Rectangle(20, 70, 20, 20));
                controlRect = Wrapper.GetControlRect(Focus);
                Wrapper.SetControlRect(Focus, new Rectangle(0, 90, 20, 20));
                controlRect = Wrapper.GetControlRect(Willpower);
                Wrapper.SetControlRect(Willpower, new Rectangle(20, 90, 20, 20));

                controlRect = Wrapper.GetControlRect(Run);
                Wrapper.SetControlRect(Run, new Rectangle(0, 120, 20, 20));
                controlRect = Wrapper.GetControlRect(StamRegen);
                Wrapper.SetControlRect(StamRegen, new Rectangle(20, 120, 20, 20));

                controlRect = Wrapper.GetControlRect(Creature);
                Wrapper.SetControlRect(Creature, new Rectangle(0, 150, 20, 20));
                controlRect = Wrapper.GetControlRect(Life);
                Wrapper.SetControlRect(Life, new Rectangle(20, 150, 20, 20));
                controlRect = Wrapper.GetControlRect(War);
                Wrapper.SetControlRect(War, new Rectangle(0, 170, 20, 20));
                controlRect = Wrapper.GetControlRect(MagicD);
                Wrapper.SetControlRect(MagicD, new Rectangle(20, 170, 20, 20));
                controlRect = Wrapper.GetControlRect(HeavyW);
                Wrapper.SetControlRect(HeavyW, new Rectangle(0, 190, 20, 20));
                controlRect = Wrapper.GetControlRect(MelD);
                Wrapper.SetControlRect(MelD, new Rectangle(20, 190, 20, 20));
                controlRect = Wrapper.GetControlRect(MissW);
                Wrapper.SetControlRect(MissW, new Rectangle(0, 210, 20, 20));
                controlRect = Wrapper.GetControlRect(MissD);
                Wrapper.SetControlRect(MissD, new Rectangle(20, 210, 20, 20));
            }
            catch (Exception ex) { Repo.RecordException(ex); }
        }
コード例 #14
0
        static void Main(string[] args)
        {
            var dvbServ = new DVBViewerServerApi
            {
                IpAddress = "192.168.2.101",
                User      = "******",
                Port      = 8089
            };

            //Define new SecureString
            var spw = new SecureString();

            var pw = "integrale";

            foreach (char item in pw)
            {
                spw.AppendChar(item);
            }

            //Set the password
            dvbServ.Password = spw;
            pw  = null;
            spw = null;

            try
            {
                var clients = DVBViewerClients.GetDVBViewerClientsAsync().Result;
                var client  = clients.Items[0];
                var test    = ChannelList.GetChannelListAsync().Result;

                //var sw = new Stopwatch();
                //sw.Start();
                //var epgList = EpgList.GetEpgList();
                //sw.Stop();
                //Console.WriteLine($"EPGList with {epgList.Items.Count} entrys. Needed to load {sw.Elapsed.TotalSeconds} seconds.");

                //Gets the Channel 3Sat HD from the server. (Satellite)
                var sat3 = ChannelList.GetChannelList($"{2359890891631983072}").TopGroups[0].Groups[0].Items[0];
                Console.WriteLine($"EPG Channel ID: {sat3.EpgChannelID}");
                Console.WriteLine($"Channelname: {sat3.Name}");

                //Current EPG Title
                var sat3EpgList = sat3.GetEpgListNow();
                //The sat3EpgList.Items.Count is only 1
                Console.WriteLine($"Current Title: {sat3EpgList.Items[0].Title}");

                //alle Timer holen
                var lTimer = TimerList.GetTimerListAsync().Result;
                //ersten Timer auswählen
                var timer0 = lTimer.Items[0];
                //Epg anzeigen
                var epgLTimer = timer0.EpgListAsync.Result;
                Console.WriteLine($"Timer 0: Channel: {timer0.ChannelItem.Name}, Timername: {timer0.Description} has the EPG Description: {epgLTimer.Items[0].Description}");
                Console.WriteLine($"Timer 0: The channel: {timer0.ChannelList.TopGroups[0].Groups[0].Items[0].Name}, currently has the EPG: {timer0.ChannelList.TopGroups[0].Groups[0].Items[0].EpgListNow.Items[0].Title} - {timer0.ChannelList.TopGroups[0].Groups[0].Items[0].EpgListNow.Items[0].Description}");


                var status = Serverstatus.GetServerstatus();

                Console.WriteLine($"Die Rechte sind: {status.Rights}");
            }
            catch (Exception ex)
            {
                if (ex.InnerException == null)
                {
                    Console.WriteLine(ex.Message);
                }
                else
                {
                    Console.WriteLine(ex.InnerException.Message);
                }
            }

            Console.ReadKey();
        }
コード例 #15
0
 internal void AddTimer()
 {
     TimerList.Add(new AtomicTimer());// { Name = "Timer",Repetitions=1,Duration = new TimeSpan(0,0,1),IsSelected = false});
     //   throw new NotImplementedException();
 }
コード例 #16
0
        public ChaseSubAct()
        {
            _finished   = false;
            _tempTimers = new TimerList();

            _ghostScore = 200;

            _tempSprites = new TimedSpriteList();
            _ghosts      = new List <AttractGhost>();

            var justOffScreen = new Vector2(250, 140);

            _ghostEatenTimer = new EggTimer(0.Milliseconds(), () => { });
            _ghostTimer      = new EggTimer(5.Seconds(), async() => await reverseChase());
            _pacTimer        = new EggTimer(5.1f.Seconds(), () => { });

            _powerPillToEat = new PowerPill
            {
                Visible  = false,
                Position = new Vector2(30, justOffScreen.Y - 4)
            };

            _pillLegend = new Pill {
                Position = new Vector2(70, 178)
            };

            _powerPillLegend = new PowerPill {
                Position = new Vector2(66, 182)
            };

            _pacMan = new AttractScenePacMan {
                Direction = Directions.Left
            };

            var blinky = new AttractGhost(GhostNickname.Blinky, Directions.Left);
            var pinky  = new AttractGhost(GhostNickname.Pinky, Directions.Left);
            var inky   = new AttractGhost(GhostNickname.Inky, Directions.Left);
            var clyde  = new AttractGhost(GhostNickname.Clyde, Directions.Left);

            _ghosts.Add(blinky);
            _ghosts.Add(pinky);
            _ghosts.Add(inky);
            _ghosts.Add(clyde);

            var gap = new Vector2(16, 0);

            _pacPositions    = new StartAndEndPos(justOffScreen, new Vector2(30, justOffScreen.Y));
            _pacMan.Position = _pacPositions.Start;

            _ghostPositions = new Dictionary <GhostNickname, StartAndEndPos>();

            var startPos = justOffScreen + new Vector2(50, 0);
            var endPos   = new Vector2(50, justOffScreen.Y);

            blinky.Position = startPos;
            _ghostPositions[blinky.NickName] = new StartAndEndPos(startPos, endPos);

            startPos       = startPos + gap;
            endPos         = endPos + gap;
            pinky.Position = startPos;
            _ghostPositions[pinky.NickName] = new StartAndEndPos(startPos, endPos);

            startPos      = startPos + gap;
            endPos        = endPos + gap;
            inky.Position = startPos;
            _ghostPositions[inky.NickName] = new StartAndEndPos(startPos, endPos);

            startPos       = startPos + gap;
            endPos         = endPos + gap;
            clyde.Position = startPos;
            _ghostPositions[clyde.NickName] = new StartAndEndPos(startPos, endPos);

            _tempTimers.Add(new EggTimer(1.Seconds(), () => _legendVisible = true));
            _tempTimers.Add(new EggTimer(3.Seconds(), () =>
            {
                _powerPillToEat.Visible = true;
                _copyrightVisible       = true;
            }));

            _tempTimers.Add(new EggTimer(4500.Milliseconds(), () =>
            {
                _ghostsChasing = true;
            }));
        }
コード例 #17
0
        protected void debugTimerTestThread()
        {
            // create set (timer task). initially empty
            TimerTask timerTask = new TimerTask("ShortTimers");

            Console.WriteLine("Start timers " + DateTime.Now);

            // create two types of timers
            TimerList timers_5sec = new TimerList("5sec", 5 * 1000, 100, this.Timer5sHandler, timerTask);
            TimerList timers_30sec = new TimerList("30sec", 30 * 1000, 100, this.Timer30sHandler, timerTask);

            timerTask.Start();

            // start some timers
            timers_5sec.Start();
            timers_5sec.Start();
            timers_5sec.Start();
            Thread.Sleep(1 * 1000);
            timers_5sec.Start();

            ITimer timer;
            long timerId;
            timers_30sec.Start(out timer, out timerId, null, false);
            timers_5sec.Start();

            debugTimerShowCallback(null, null, null);

            // wait for the first timer to expire
            Thread.Sleep(10 * 1000);
            timers_30sec.Stop(timer, timerId);

            Thread.Sleep(30 * 1000);
            debugTimerShowCallback(null, null, null);

            // clean up
            timers_5sec.Dispose();
            timers_30sec.Dispose();
            timerTask.Dispose();
        }
 public bool Stop()
 {
     return(TimerList.RemoveTimer(this));
 }
 public bool Start()
 {
     return(TimerList.AddTimer(this));
 }
コード例 #20
0
 /// <summary>
 /// Load movie data
 /// </summary>
 private void LoadData()
 {
     this.DeviceInfo = this.webInterfaceQueuingService.GetDeviceInfo();
     this.TimerList = this.webInterfaceQueuingService.GetTimerList();
 }