/// <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); }
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); }
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"; } }
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 }
public void ResetClientProfiles() { ClientProfiles.Clear(); SaveClientProfiles(); }