本文整理汇总了C#中Participant类的典型用法代码示例。如果您正苦于以下问题:C# Participant类的具体用法?C# Participant怎么用?C# Participant使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Participant类属于命名空间,在下文中一共展示了Participant类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnShowThisStudy_Click
/// <summary>
/// Shows only the quuestions and answers for the current study being viewed
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnShowThisStudy_Click(object sender, EventArgs e)
{
Study study = new Study(Convert.ToInt32(Request.QueryString["study_id"]));
Participant participant = new Participant(Convert.ToInt32(Request.QueryString["participant_id"]));
pnlQualifiers.Controls.Clear();
showStudyInfo(study, participant);
}
示例2: WhisperWindow
public WhisperWindow(Conversation conversation, Participant participant, SeriousBusinessCat seriousBusiness, string info)
{
this.conversation = conversation;
this.participant = participant;
this.seriousBusiness = seriousBusiness;
InitializeComponent();
this.DataContext = this;
InitCommands();
this.Activated += (s,e) => { FlashWindow.Stop(this); };
lbWhispers.ItemsSource = _whispers;
string bob = "neighbor cat";
if (participant != null)
{
bob = participant.Contact.GetContactInformation(ContactInformationType.DisplayName).ToString();
}
textBlock.Text = bob;
if (!string.IsNullOrEmpty(info))
{
textBlock.ToolTip = info;
}
this.Title = $"Whispering with {bob}";
FocusManager.SetFocusedElement(this, tbMessage);
}
示例3: Invitation
internal Invitation(InvType invType, string invId, Participant inviter, int variant)
{
mInvitationType = invType;
mInvitationId = invId;
mInviter = inviter;
mVariant = variant;
}
示例4: gameSetup
// Set up gameboard and players
public override void gameSetup()
{
//Set up gameboard and view
base.gameSetup();
//Online Multiplayer Setup
myHand = new List<int>();
MultiplayerController.Instance.gp = this;
myself = MultiplayerController.Instance.getMyself();
participants = MultiplayerController.Instance.getParticipants();
if (myself == participants [0]) {
playerType = slot.Red;
playerColor = Color.red;
opponentType = slot.Blue;
opponentColor = Color.blue;
opponent = participants[1];
TakeTurn();
}
else{
playerType = slot.Blue;
playerColor = Color.blue;
opponentType = slot.Red;
opponentColor = Color.red;
opponent = participants[0];
base.clearHandArea();
}
}
示例5: Register
// Methods
public void Register( Participant participant )
{
if( participants[ participant.Name ] == null )
participants[ participant.Name ] = participant;
participant.Chatroom = this;
}
示例6: showAllInfo
/// <summary>
/// Shows questions/answers for all existing studies
/// </summary>
private void showAllInfo(Participant participant)
{
List<Study> studies = DAL.GetStudies();
foreach (Study study in studies) {
showStudyInfo(study, participant);
}
}
示例7: GetParticipantPoints
public static int GetParticipantPoints(Participant p, Dictionary<string, List<Result>> results)
{
if (!results.ContainsKey(p.Id))
return 0;
return results[p.Id].Sum(r => Global.GetPoints(r.Place));
}
示例8: ParticipantInfo
public ParticipantInfo(Participant p)
{
InitializeComponent();
Title = String.Format("Participant Info — {0} {1}", p.FirstName, p.LastName);
P = p;
ReadResults();
string info = String.Format("Name:\t\t{0}\n\n" +
"Gender:\t\t{1}\n\n" +
"Team:\t\t{2}\n\n" +
"Age division:\t{3}",
p.FirstName + " " + p.LastName, Global.GendersFull[p.Gender], p.Team, p.AgeDivision);
if (Results.Count > 0)
{
dataGridParticipantResults.Visibility = Visibility.Visible;
dataGridParticipantResults.ItemsSource = Results;
}
else
{
info += String.Format("\n\n{0} has no results recorded.", p.FirstName);
}
labelParticipantInfo.Content = info;
}
示例9: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Participant participant = new Participant();
if(Session["TTID"] != null)
{
participant = Participant.GetParticipantDetails(int.Parse(Session["TTID"].ToString()));
Session["TTID"] = null;
}
else
{
participant = Participant.GetParticipantDetails(Session["EmailID"].ToString());
Session["EmailID"] = null;
}
if (participant != null)
{
lblName.Text = participant.Name;
lblBranch.Text = participant.Branch.ToString();
lblCollege.Text = Participant.GetCollegeName(participant.CollegeID);
lblTTID.Text = "TT" + participant.TTID.ToString();
lblYear.Text = participant.Year.ToString();
lblContact.Text = participant.ContactNo;
}
else
{
Response.Redirect("ICard.aspx");
}
}
示例10: AgeChampion
public AgeChampion(Participant p, int place, int points)
{
Name = p.FirstName + " " + p.LastName;
Team = p.Team;
Place = place;
Points = points;
}
示例11: btnParSubmit_Click
/// <summary>
/// Event handler when a participant is finished creating/editing an account.
/// If there are no errors, the session variable will be set to the user and they
/// will be redirected to the participant form.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnParSubmit_Click(object sender, EventArgs e)
{
if (isFormValid(SuperUser.UserType.Participant)) {
DatabaseQuery query;
string queryString = "";
if (Request.QueryString["edit"] == "true") {
int parID = ((Participant)Session["user"]).UserID;
DAL.UpdateParticipant(tbParUserName.Text, tbParFirstName.Text, tbParLastName.Text, tbParEmail.Text, tbParPassword.Text, parID);
}
else {
try {
DAL.InsertParticipant(tbParUserName.Text, tbParFirstName.Text, tbParLastName.Text, tbParEmail.Text, tbParPassword.Text);
}
catch (Exception exception) {
lblParStatus.Text = exception.Message;
lblParStatus.Visible = true;
return;
}
}
lblParStatus.Text = "";
queryString = "select Par_ID from Participant where User_Name = '" + tbParUserName.Text + "'";
query = new DatabaseQuery(queryString, DatabaseQuery.Type.Select);
int userID = Convert.ToInt32(query.Results[0][0]);
Session["user"] = new Participant(userID, tbParUserName.Text, tbParFirstName.Text, tbParLastName.Text, tbParEmail.Text, new List<Answer>());
Response.Redirect("ParticipantForm.aspx");
}
}
示例12: a_AddValid
public void a_AddValid()
{
var response = client.AddParticipant(entity);
WasSuccessfulTest(response);
Assert.True(response.Data.id > 0);
Assert.True(response.Data.data_saved.id == response.Data.id);
entity = response.Data.data_saved;
}
示例13: BuildTestParticipantFromDataBase
public static TestParticipant BuildTestParticipantFromDataBase(string idCase, string idDoctor, byte idPersonRole)
{
Participant p = new Participant();
p.IdRole = idPersonRole;
TestParticipant part = new TestParticipant(p);
part.doctor = TestDoctor.BuildTestDoctorFromDataBase(idDoctor);
return part;
}
示例14: AddNewPartyMember
private void AddNewPartyMember(Attack newAttack, String partyMemberName)
{
var result = MessageBox.Show("Is this character an NPC?", "NPC?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
var npc = (result != DialogResult.No);
var newPerson = new Participant(partyMemberName, npc, newAttack);
group.Add(newPerson);
}
示例15: GetMailTo
public static string GetMailTo(Participant participant)
{
string returnVar = "mailto:" + participant.Email;
if (!string.IsNullOrEmpty(participant.AlternateEmail))
{
returnVar += "?cc=" + participant.AlternateEmail;
}
return returnVar;
}