本文整理汇总了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;
}
示例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;
}
示例3: Session
public Session(Slot slot, Room room, Speaker speaker, string title)
{
Slot = slot;
Room = room;
Speaker = speaker;
Title = title;
}
示例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;
}
}
}
示例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;
}
示例6: SpeakerContainer
public SpeakerContainer(SpeakerCollection speakers, Speaker s)
{
_speaker = s;
this.SpeakerColletion = speakers;
_OriginalAttributes = s.Attributes.Select(a => new SpeakerAttribute(a)).ToList(); ;
}
示例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;
}
示例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;
}
示例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;
}
示例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];
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
}