当前位置: 首页>>代码示例>>C#>>正文


C# Participant类代码示例

本文整理汇总了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);
 }
开发者ID:SpencerForell,项目名称:Study-Participant-Portal,代码行数:12,代码来源:ParticipantInfo.aspx.cs

示例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);
        }
开发者ID:adzm,项目名称:BusinessCats,代码行数:34,代码来源:WhisperWindow.xaml.cs

示例3: Invitation

 internal Invitation(InvType invType, string invId, Participant inviter, int variant)
 {
     mInvitationType = invType;
     mInvitationId = invId;
     mInviter = inviter;
     mVariant = variant;
 }
开发者ID:CenzyGames,项目名称:The-Paper-Boat-SepScenes,代码行数:7,代码来源:Invitation.cs

示例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();
     }
 }
开发者ID:chengray,项目名称:ConnectDraw,代码行数:27,代码来源:OnlineGameController.cs

示例5: Register

  // Methods
  public void Register( Participant participant )
  {
    if( participants[ participant.Name ] == null )
      participants[ participant.Name ] = participant;

    participant.Chatroom = this;
  }
开发者ID:tian1ll1,项目名称:WPF_Examples,代码行数:8,代码来源:Mediator_RealWorld.cs

示例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);
     }
 }
开发者ID:SpencerForell,项目名称:Study-Participant-Portal,代码行数:10,代码来源:ParticipantInfo.aspx.cs

示例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));
        }
开发者ID:dhaigh,项目名称:Swimalicious,代码行数:7,代码来源:Global.cs

示例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;
        }
开发者ID:dhaigh,项目名称:Swimalicious,代码行数:26,代码来源:ParticipantInfo.xaml.cs

示例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");
        }
    }
开发者ID:priyanshu92,项目名称:EventManagementSystem,代码行数:28,代码来源:PrintICard.aspx.cs

示例10: AgeChampion

 public AgeChampion(Participant p, int place, int points)
 {
     Name = p.FirstName + " " + p.LastName;
     Team = p.Team;
     Place = place;
     Points = points;
 }
开发者ID:dhaigh,项目名称:Swimalicious,代码行数:7,代码来源:AgeChampion.cs

示例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");
        }
    }
开发者ID:SpencerForell,项目名称:Study-Participant-Portal,代码行数:38,代码来源:CreateAccount.aspx.cs

示例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;
 }
开发者ID:NickLarsen,项目名称:RegPointApi.NET,代码行数:8,代码来源:ParticipantTests.cs

示例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;
 }
开发者ID:nbIxMaN,项目名称:EMKT,代码行数:8,代码来源:TestParticipant.cs

示例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);
        }
开发者ID:cidthecoatrack,项目名称:BattleOrder,代码行数:8,代码来源:GroupHandler.cs

示例15: GetMailTo

 public static string GetMailTo(Participant participant)
 {
     string returnVar = "mailto:" + participant.Email;
     if (!string.IsNullOrEmpty(participant.AlternateEmail))
     {
         returnVar += "?cc=" + participant.AlternateEmail;
     }
     return returnVar;
 }
开发者ID:mcshaz,项目名称:SimPlanner,代码行数:9,代码来源:EmailBase.cs


注:本文中的Participant类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。