• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Speaker类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Execute

    public override void Execute(Speaker[] speakers)
    {
        foreach (Speaker speaker in speakers)
            foreach (Tag tag in _Tags)
                speaker.Tags.RemoveAll(x => x.Key == tag.Key);

        foreach (Speaker speaker in speakers)
            foreach (Tag tag in _Tags)
                speaker.Tags.Add(tag);
    }
开发者ID:DR9885,项目名称:Possessed,代码行数:10,代码来源:DialogueTagChangeEvent.cs


示例17: Create

        public ActionResult Create(Speaker speaker)
        {
            try {
            var result = repo.Add(speaker);

            return RedirectToAction("Index");
              } catch {
            return View(speaker);
              }
        }
开发者ID:rjester,项目名称:Ssig,代码行数:10,代码来源:AdminSpeakerController.cs


示例18: InsertOrUpdate

 public void InsertOrUpdate(Speaker speaker)
 {
     if (speaker.Id == default(int)) {
         // New entity
         context.Speakers.Add(speaker);
     } else {
         // Existing entity
         context.Entry(speaker).State = EntityState.Modified;
     }
 }
开发者ID:EfrainReyes,项目名称:CodeCampSDQWebAPI,代码行数:10,代码来源:SpeakerRepository.cs


示例19: CbxTarget_SelectedIndexChanged

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


示例20: Should_map_session_fields

        public void Should_map_session_fields()
        {
            var speaker = new Speaker("Joe", "Schmoe");
            var session = new Session("Foo", new string('a', 5000), speaker);

            SaveEntities(session);

            var loaded = SessionSource.CreateSession().Load<Session>(session.Id);

            loaded.Title.ShouldEqual(session.Title);
            loaded.Abstract.ShouldEqual(session.Abstract);
        }
开发者ID:calebjenkins,项目名称:presentations,代码行数:12,代码来源:SessionMapTester.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SpecialFolder类代码示例发布时间:2022-05-24
下一篇:
C# Spawner类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap