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


C# Speaker类代码示例

本文整理汇总了C#中Speaker的典型用法代码示例。如果您正苦于以下问题:C# Speaker类的具体用法?C# Speaker怎么用?C# Speaker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Speaker类属于命名空间,在下文中一共展示了Speaker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: speak

 public void speak(bool val, Speaker speaker=Speaker.Host, string words=null, float time=-1)
 {
     if (val && !isSpeaking ()) {
         startSpeak(speaker, words, time);
     }
     _speak = val;
 }
开发者ID:CG-F15-5-Rutgers,项目名称:UnityProjects,代码行数:7,代码来源:DialogueBodyMecanim.cs

示例2: PostSpeaker

        public async Task<SetTeamOrAdjudicatorResult> PostSpeaker(Speaker speaker)
        {
            var ident = HttpContext.Current.User.Identity as ClaimsIdentity;
            String userId = ident.GetUserId();
            var user = await userManager.FindByIdAsync(userId);

            var team = tournamentRegistrationsManager.GetTeam(speaker.teamId);

            if (team == null)
            {
                return SetTeamOrAdjudicatorResult.TeamNotFound;
            }

            // Check if user has permissions

            if (!userManager.HasOrganizationRole(userId, team.OrganizationId, OrganizationRole.Delegate))
            {
                // User does not have permissions
                return SetTeamOrAdjudicatorResult.NotAuthorized;
            }

            // Add speaker to team

            var result = await tournamentRegistrationsManager.AddSpeakerAsync(speaker.teamId, speaker.userId, user);
            return result;
        }
开发者ID:Rokory,项目名称:DebReg,代码行数:26,代码来源:SpeakerController.cs

示例3: Session

 public Session(Slot slot, Room room, Speaker speaker, string title)
 {
     Slot = slot;
     Room = room;
     Speaker = speaker;
     Title = title;
 }
开发者ID:AntoineGa,项目名称:microstuff,代码行数:7,代码来源:Session.cs

示例4: Speak

    public void Speak(Speaker speaker, string words, float time)
    {
        Debug.Log ("Starting to speak");
        timeLeft = time;
        this.transform.position = startPos;
        text.setText (words);

        //set speakers image
        foreach (Transform child in this.faces.transform) {
            child.gameObject.SetActive(false);
            switch (speaker) {
            case Speaker.Bobby:
                if(child.name == "Bobby") {
                    child.gameObject.SetActive(true);
                }
                break;
            case Speaker.Gary:
                if(child.name == "Gary") {
                    child.gameObject.SetActive(true);
                }
                break;
            case Speaker.Robert:
                if(child.name == "Robert") {
                    child.gameObject.SetActive(true);
                }
                break;
            case Speaker.Host:
                if(child.name == "Host") {
                    child.gameObject.SetActive(true);
                }
                break;
            }
        }
    }
开发者ID:CG-F15-5-Rutgers,项目名称:UnityProjects,代码行数:34,代码来源:DialogueController.cs

示例5: GetSpeakerImagePath

		public async Task<string> GetSpeakerImagePath (Conference conference, Speaker speaker)
		{

			string documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
			string localFilename = conference.Slug + "-" + speaker.Slug + ".png";
			string localPath = Path.Combine (documentsPath, localFilename);
			byte[] bytes = null;

			if (!File.Exists (localPath)) {
				using (var httpClient = new HttpClient (new NativeMessageHandler ())) {

					try {
						bytes = await httpClient.GetByteArrayAsync (speaker.ImageUrl);
					} catch (OperationCanceledException opEx) {
						Insights.Report (opEx);
						return null;
					} catch (Exception e) {
						Insights.Report (e);
						return null;
					}

					//Save the image using writeAsync
					FileStream fs = new FileStream (localPath, FileMode.OpenOrCreate);
					await fs.WriteAsync (bytes, 0, bytes.Length);
				}
			} 

			return localPath;

		}
开发者ID:tekconf,项目名称:TekAuth,代码行数:30,代码来源:ImageService.cs

示例6: SpeakerContainer

        public SpeakerContainer(SpeakerCollection speakers, Speaker s)
        {
            _speaker = s;
            this.SpeakerColletion = speakers;

            _OriginalAttributes = s.Attributes.Select(a => new SpeakerAttribute(a)).ToList(); ;
        }
开发者ID:Ttxman,项目名称:NanoTrans,代码行数:7,代码来源:SpeakerContainer.cs

示例7: ReadyToSpeak

 /// <summary>
 /// Returns true if  Self Filters agree with responce
 /// </summary>
 private bool ReadyToSpeak(Speaker argSpeaker)
 {
     if (argSpeaker != null)
         if (_NPCFilters.Any(x => x == null || x.Accepted(argSpeaker.Tags)))
             return true;
     return _NPCFilters.Count == 0;
 }
开发者ID:DR9885,项目名称:Possessed,代码行数:10,代码来源:Conversation.cs

示例8: ReadyToListen

 /// <summary>
 /// Returns true if Listener Filters agree with responce
 /// </summary>
 private bool ReadyToListen(Speaker argListener)
 {
     if (argListener != null)
         if (_PlayerFilters.Any(x => x == null || x.Accepted(argListener.Tags)))
             return true;
     return _PlayerFilters.Count == 0;
 }
开发者ID:DR9885,项目名称:Possessed,代码行数:10,代码来源:Conversation.cs

示例9: SpeechIsCommand

        // return true if we should continue
        internal override bool SpeechIsCommand(string text, Speaker speaker)
        {
            // deal with commands if present
            switch (text)
            {
                case "target only":
                    SetTargetOnly(speaker);
                    return true;
                case "confirm source":
                    SetSourceToo(speaker);
                    return true;

                case "formal":
                    SetFormal(speaker);
                    return true;

                case "polite":
                    SetPolite(speaker);
                    return true;

                case "intimate":
                    SetIntimate(speaker);
                    return true;

                case "close the program":
                    Application.Exit();
                    return true;
            }

            return false;
        }
开发者ID:izuio,项目名称:TSTuring-WindowsLearningClient2015,代码行数:32,代码来源:DefaultLanguage.cs

示例10: setSpeaker

    private void setSpeaker(Speaker speaker) {
        speakers[(int)speaker].SetActive(true);
        speakers[(((int)speaker) + 1) % 3].SetActive(false);
        speakers[(((int)speaker) + 2) % 3].SetActive(false);

        textMesh.color = speakerColors[(int)speaker];
    }
开发者ID:Gkxd,项目名称:ProjectCodetta,代码行数:7,代码来源:Textbox.cs

示例11: GetSpeakerSessions

        public IEnumerable<Speaker> GetSpeakerSessions()
        {
            List<Speaker> speakers = new List<Speaker>();

            //var obj = ServiceStack.Text.CsvSerializer.DeserializeFromStream(typeof(object), File.Open(_filePath, FileMode.OpenOrCreate));
            var dataTable =  CsvToDataTable(_filePath);
            //var dataTable = CSVParser.ParseCSV(_filePath);// CSVReader.ReadCSVFile(_filePath, true);

            //var dataTable = new DataTable();

            foreach (DataRow row in dataTable.Rows)
            {
                var speaker = new Speaker
                {
                    Name = row["Speaker Name"].ToString(),
                    HomeTown = row["City, State"].ToString(),
                    Email = row["Email Address"].ToString(),
                    Website = row["Website or Blog URL"].ToString(),
                    HeadshotUrl = row["URL for a 90x117 pixel JPG headshot image of you"].ToString(),
                    Bio = row["Speaker Bio"].ToString(),
                    NotesToOrganizer = row["Other notes about yourself or your submission"].ToString(),
                };

                var session1 = new Session
                {
                    Level = row["Session 1 - Level"].ToString(),
                    Title = row["Session 1 - Title"].ToString(),
                    Description = row["Session 1 - Description"].ToString(),
                };

                var session2 = new Session
                {
                    Level = row["Session 2 - Level"].ToString(),
                    Title = row["Session 2 - Title"].ToString(),
                    Description = row["Session 2 - Description"].ToString(),
                };

                var session3 = new Session
                {
                    Level = row["Session 3 - Level"].ToString(),
                    Title = row["Session 3 - Title"].ToString(),
                    Description = row["Session 3 - Description"].ToString(),
                };

                if (!string.IsNullOrWhiteSpace(session1.Title))
                    speaker.AddSession(session1);

                if (!string.IsNullOrWhiteSpace(session2.Title))
                    speaker.AddSession(session2);

                if (!string.IsNullOrWhiteSpace(session3.Title))
                    speaker.AddSession(session3);

                speakers.Add(speaker);

            }

            return speakers;
        }
开发者ID:vongillern,项目名称:SpeakerSelectorOfDeath,代码行数:59,代码来源:IccDataProvider.cs

示例12: Remove

        public override bool Remove(Speaker item)
        {
            if (item.DBType == DBType.File || item.DBID == null)
                return false;

            _slist.Remove(item.DBID);
            return base.Remove(item);
        }
开发者ID:Ttxman,项目名称:NanoTrans,代码行数:8,代码来源:AdvancedSpeakerCollection.cs

示例13: ButtonPress

 public void ButtonPress()
 {
     List<string> workingStrings = new List<string>(strings);
     if(lastString != -1) workingStrings.RemoveAt(lastString);
     Speaker newSpeaker = (lastSpeaker == Speaker.LEFT) ? Speaker.RIGHT : Speaker.LEFT;
     lastSpeaker = newSpeaker;
     lastString = Random.Range(0, workingStrings.Count);
     dialogue.NewLine(workingStrings[lastString], newSpeaker);
 }
开发者ID:gbasood,项目名称:Unity-NPC-Chat-Dialogue,代码行数:9,代码来源:DemoScript.cs

示例14: CallHandlerSample

        /// <summary>
        /// Handler of making call and receiving call
        /// </summary>
        /// <param name="registerName">The SIP ID what will registered into your PBX</param>
        /// <param name="domainHost">The address of your PBX</param>
        public CallHandlerSample(string registerName, string domainHost)
        {
            microphone = Microphone.GetDefaultDevice();
            speaker = Speaker.GetDefaultDevice();
            connector = new MediaConnector();
            mediaSender = new PhoneCallAudioSender();
            mediaReceiver = new PhoneCallAudioReceiver();

            InitializeSoftPhone(registerName, domainHost);
        }
开发者ID:shahnikita,项目名称:SpeechToText,代码行数:15,代码来源:CallHandlerSample.cs

示例15: CbxTarget_SelectedIndexChanged

 internal override void CbxTarget_SelectedIndexChanged(string text, Speaker speaker)
 {
     if (speaker != null)
     {
         speaker.cbxRelations.Items.Clear();
         speaker.cbxRelations.Text = "Ignore";
         speaker.cbxRelations.Visible = false;
         speaker.lblSpkRelations.Visible = false;
     }
 }
开发者ID:izuio,项目名称:TSTuring-WindowsLearningClient2015,代码行数:10,代码来源:DefaultLanguage.cs


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