Esempio n. 1
0
 /// <summary>
 /// Initiates a spin of 5 seconds after the winner has been declared and shows the result
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">Results of the vote</param>
 private void _clientSocket_VoteEnded(object sender, Events.VoteEndedEventArgs e)
 {
     ClientProfiles.AddRange(e.Clients);
     Spin();
     System.Threading.Thread.Sleep(5000);
     Stop(e.Winner);
 }
Esempio n. 2
0
        public void Test03_HandleInvalidClientProfileLocation()
        {
            ClientProfiles wspp = new ClientProfiles(true);
            // manually change profiles location
            object ret = typeof(ClientProfiles).InvokeMember("ProfilesLocation", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, wspp, new object[] { m_nonexistfolder });
			ret = typeof(ClientProfiles).InvokeMember("Update", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, wspp, new object[] {});

            Assert.IsNotNull(((IWorkshareProfileProvider)wspp).GetProfiles());
            Assert.AreEqual(0, ((IWorkshareProfileProvider)wspp).GetProfiles().Count);
        }
Esempio n. 3
0
        public void Load()
        {
            ClientProfiles = LoadClientProfiles();
            ServerProfiles = LoadServerProfiles();

            // Attempt to correct existing profiles with no localization set
            foreach (var clientProfile in ClientProfiles.Where(x => string.IsNullOrWhiteSpace(x.Localization)))
            {
                clientProfile.Localization = "North America";
            }
        }
Esempio n. 4
0
        public void Test01_GetProfiles()
        {
            ClientProfiles wspp = new ClientProfiles(true);

            // manually change profiles location
            object ret = typeof(ClientProfiles).InvokeMember("ProfilesLocation", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty, null, wspp, new object[]{ m_profilesfolder });
			ret = typeof(ClientProfiles).InvokeMember("Update", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, wspp, new object[] {});
            
            Assert.IsNotNull(((IWorkshareProfileProvider)wspp).GetProfiles());
            Assert.AreEqual(2, ((IWorkshareProfileProvider)wspp).GetProfiles().Count);    // only 2 folder contain valid runtimepolicy
        }
Esempio n. 5
0
 public void ResetClientProfiles()
 {
     ClientProfiles.Clear();
     SaveClientProfiles();
 }