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

C# Conversation类代码示例

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

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



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

示例1: AssignConnectors

        private void AssignConnectors(DialogueEntry entry, Conversation conversation, HashSet<string> alreadyConnected, HashSet<int> entriesVisited, int level)
        {
            // Sanity check to prevent infinite recursion:
            if (level > 10000) return;

            // Set non-connectors:
            foreach (Link link in entry.outgoingLinks) {
                if (link.originConversationID == link.destinationConversationID) {
                    string destination = string.Format("{0}.{1}", link.destinationConversationID, link.destinationDialogueID);
                    if (alreadyConnected.Contains(destination)) {
                        link.isConnector = true;
                    } else {
                        link.isConnector = false;
                        alreadyConnected.Add(destination);
                    }
                }
            }

            // Then process each child:
            foreach (Link link in entry.outgoingLinks) {
                if (link.originConversationID == link.destinationConversationID) {
                    if (!entriesVisited.Contains(link.destinationDialogueID)) {
                        entriesVisited.Add(link.destinationDialogueID);
                        var childEntry = conversation.GetDialogueEntry(link.destinationDialogueID);
                        if (childEntry != null) {
                            AssignConnectors(childEntry, conversation, alreadyConnected, entriesVisited, level + 1);
                        }
                    }
                }
            }
        }
开发者ID:farreltr,项目名称:OneLastSunset,代码行数:31,代码来源:DialogueEditorWindowDatabaseSection.cs


示例2: BeginCinematic

    public void BeginCinematic(Type CinematicType)
    {
        // Disable player input
        // Hide castle UI

        // Handle enum types
        switch(CinematicType)
        {
            case Type.HoarderConversation:
                // NOTE (zesty): For special types, always use index 0, the list is used for other types that have
                //  a randomization feature
                Conv = GameData.Cinematics[CinematicType][0];
                break;
            case Type.RandomExclamation:
                Conv = GameData.Cinematics[CinematicType][Random.Range(0, GameData.Cinematics[CinematicType].Count)];
                break;
        }

        // TESTING
        //Conv = GameData.Cinematics[Type.RandomExclamation][3];

        LetterDelay = Conv.LetterDelay;
        TimeToNextLetter = LetterDelay;

        SentenceIndex = 0;
        LetterIndex = 0;
        CurSentence = Conv.Sentences[SentenceIndex];

        CurTextBox = GetTextBox(CurSentence.OwningTextBox);
        SetTextBoxVisible(CurTextBox, true);
        bSentenceComplete = false;

        if(Conv.PauseGame)
            App.inst.SpawnController.PauseEnemiesForCinematic();
    }
开发者ID:clickerdefenseggj,项目名称:clicker-defense,代码行数:35,代码来源:CinematicSet.cs


示例3: testConversation

	// Testing Conversation class
	void testConversation () {

		Conversation conversation = new Conversation("Text/SampleDialogue");

		Debug.Log(conversation.GetCurrentDialogue());
	
	}
开发者ID:imann24,项目名称:cs327-bestmobilegameever,代码行数:8,代码来源:IsaiahTestingGround.cs


示例4: Start

    // Use this for initialization
    void Start()
    {
        mConver = transform.FindChild("Anchor_T/Conver");
        if (mConver == null) return;

        mUIConver = mConver.GetComponent<Conversation>();
    }
开发者ID:yabos,项目名称:BattleHit,代码行数:8,代码来源:FieldUI_Control.cs


示例5: RunConversationCoroutine

    private IEnumerator RunConversationCoroutine(Conversation conversation)
    {
        IsInProgress = true;

        Coroutine alignCoroutine = conversation.alignCharacters ? StartCoroutine(AlignCharactersCoroutine()) : null;

        if (conversation.controlCamera)
            camera.target = conversationTarget;
        
        foreach(DialogCard card in conversation.Cards())
        {
            dialog.SetDialogQueue(card);
            dialog.DisplayNextCard();
            while (dialog.IsDisplaying())
                yield return null;

            yield return null;
        }

        if (alignCoroutine != null)
            StopCoroutine(alignCoroutine);
        camera.target = teaganFollowTarget;

        IsInProgress = false;
    }
开发者ID:GlowLimeGames,项目名称:the-experiment,代码行数:25,代码来源:ConversationManager.cs


示例6: Post

        public IHttpActionResult Post(ConversationRequestModel model)
        {
            if (!this.ModelState.IsValid)
            {
                return this.BadRequest(this.ModelState);
            }

            var topic = this.data.Conversations.Select(x => x.Topic).FirstOrDefault();
            var text = this.data.Conversations.Select(x => x.Text).FirstOrDefault();
            var startedOn = this.data.Conversations.Select(x => x.StartedOn).FirstOrDefault();
            var currentUserName = this.User.Identity.Name;
            var currentUser = this.data.Users.Where(u => u.UserName == currentUserName).FirstOrDefault();

            var conversationToAdd = new Conversation
            {
                Topic = model.Topic,
                Text = model.Text,
                StartedOn = model.StartedOn,
                Author = currentUser
            };

            this.data.Conversations.Add(conversationToAdd);
            this.data.SaveChanges();

            PubNubNotificationProvider.Notify(conversationToAdd.Topic);

            return this.Ok(conversationToAdd.Id);
        }
开发者ID:Team-Iris,项目名称:JustMeet,代码行数:28,代码来源:ConversationsController.cs


示例7: 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


示例8: CreateConference

 private async Task CreateConference()
 {
     _confConversation = new Conversation(_endpoint);
     var options = new ConferenceJoinOptions() { JoinMode = JoinMode.TrustedParticipant, AdHocConferenceAccessLevel = ConferenceAccessLevel.Everyone, AdHocConferenceAutomaticLeaderAssignment = AutomaticLeaderAssignment.Everyone };
     await _confConversation.ConferenceSession.JoinAsync(options);
     Console.WriteLine("New conference created");
 }
开发者ID:juancarlosbaezpozos,项目名称:UCMA-IVR-Demo,代码行数:7,代码来源:LyncServer.cs


示例9: Write_TwoMessagesOnDifferentDays_TwoDaysGenerated

        public void Write_TwoMessagesOnDifferentDays_TwoDaysGenerated()
        {
            var writer = new MoqWriter();
            var message1 = Factory.Create<Message>();
            var message2 = Factory.Create<Message>();
            message1.Date = message2.Date.AddDays( 1 );

            var conversation = new Conversation
            {
                ContactName = Factory.Create<string>(),
                PhoneNumber = Factory.Create<string>(),
                Messages = new List<Message> { message1, message2 }
            };

            ConversationFile file = new ConversationFile( conversation, Factory.Create<string>() );
            file.Write( writer );

            string expectedResult = string.Concat(
                    Common.GetExpectedHead( conversation.ContactName ),
                    GetExpectedPageHeader( conversation ),
                    "<div class='day'>",
                    GetExpectedDayTitle( message1.Date ),
                    GetExpectedMessageBody( message1 ),
                    "</div><div class='day'>",
                    GetExpectedDayTitle( message2.Date ),
                    GetExpectedMessageBody( message2 ),
                    "</div></body></html>" );

            Assert.AreEqual( expectedResult, writer.Data );
        }
开发者ID:Gupocca,项目名称:sms-reimaginer,代码行数:30,代码来源:ConversationFileTests.cs


示例10: Hyperlink_Click

        private void Hyperlink_Click(object sender, RoutedEventArgs e)
        {
            BusinessLayer.ConversationManager cm = new BusinessLayer.ConversationManager();

            EntityLayer.Conversation c;

            if(AddNum.Text.Length > 0)
            {
                c = cm.getConversationsFromContact(AddNum.Text);
                if (c == null)
                {
                    cm.AddConversation(new EntityLayer.Contact(AddNum.Text));
                    IList<EntityLayer.Conversation> convs = cm.getConversations();
                    ViewModel.Conversation.ConversationsModelView cmv = new ViewModel.Conversation.ConversationsModelView(convs);
                    parent.ListConversations.DataContext = cmv;

                }

                if (!parent.findConvos(AddNum.Text))
                {
                    Conversation cw = new Conversation(parent, AddNum.Text);
                    parent.addConv(cw);
                    cw.Show();
                }

                this.Close();
            }
        }
开发者ID:Ace-Nanter,项目名称:SMS_on_PC,代码行数:28,代码来源:Numéro.xaml.cs


示例11: EstablishCall

        private void EstablishCall()
        {
            // Create a new Conversation.
            Conversation conversation = new Conversation(_appEndpoint);

            // Create a new IM call.
            _imCall = new InstantMessagingCall(conversation);

            try
            {
                // Establish the IM call.
                _imCall.BeginEstablish(_destinationSipUri,
                    new CallEstablishOptions(),
                    result =>
                    {
                        try
                        {
                            // Finish the asynchronous operation.
                            _imCall.EndEstablish(result);
                        }
                        catch (RealTimeException ex)
                        {
                            // Catch and log exceptions.
                            _logger.Log("Failed establishing IM call", ex);
                        }
                    },
                    null
                );
            }
            catch (InvalidOperationException ioex)
            {
                _logger.Log("Failed establishing IM call", ioex);
            }
        }
开发者ID:hhqqnu,项目名称:MSLyncProjects,代码行数:34,代码来源:OutboundInstantMessagingCallSample.cs


示例12: StartConversation

    /// <summary>
    /// Starts the conversation with another game object.
    /// </summary>
    /// <param name="obj">Object.</param>
    public void StartConversation(GameObject obj, string reply = null)
    {
        // cannot start another conversation if we have an active one
        if (activeConversation != null) {
            return;
        }
        ConversationSet conversationSet = obj.GetComponent<ConversationSet>();
        if (conversationSet != null) {
            activeConversation = conversationSet.GetActiveConversation();
            if (reply != null && reply != "") {
                activeConversation.headerText = reply;
            }

            // disable rigidbody while in conversation
            if (_state != null) {
                _state.state = State.DISABLED;
            }

            obj.SendMessage(eventName, SendMessageOptions.DontRequireReceiver);

            if (uiPrefab != null) {
                // TODO: finish this
                _uiShown = Instantiate(uiPrefab) as GameObject;
                _buttons = _uiShown.GetComponentsInChildren<Button>();
                for (int i = 0; i < _buttons.Length; ++i) {
                    //				Button.ButtonClickedEvent ev = new Button.ButtonClickedEvent();
                    //				ev.AddListener(
                    //				_buttons[i].onClick += OnResponseClick;
                }
                Button button;
            }
        }
    }
开发者ID:kdoba,项目名称:Undoculife,代码行数:37,代码来源:ConversationStarter.cs


示例13: InterpretComparison

    private static BooleanOperand InterpretComparison(string code, string defaultNPCName, Conversation conversation)
    {
        string comparisonOperator;
        int operatorIndex;

        if (code.Contains(">=")){
            comparisonOperator = ">=";
        } else if (code.Contains("<=")){
            comparisonOperator = "<=";
        } else if (code.Contains("!=")){
            comparisonOperator = "!=";
        } else if (code.Contains("=")){
            comparisonOperator = "=";
        } else if (code.Contains(">")){
            comparisonOperator = ">";
        } else if (code.Contains("<")){
            comparisonOperator = "<";
        } else {
            comparisonOperator = null;
        }
        if (comparisonOperator == null){
            throw new InvalidScriptException("No comparison operator: " + code);
        } else {
            operatorIndex = code.IndexOf(comparisonOperator);
            string firstPart = code.Substring(0, operatorIndex);
            string lastPart = code.Substring(operatorIndex + comparisonOperator.Length);
            if (code.Contains("$")){
                return InterpretStringComparison(firstPart, lastPart, comparisonOperator, operatorIndex, defaultNPCName, conversation);
            } else {
                return InterpretNumericComparison(firstPart, lastPart, comparisonOperator, operatorIndex, defaultNPCName, conversation);
            }
        }
    }
开发者ID:kiichi7,项目名称:Lies_and_Seductions,代码行数:33,代码来源:PrerequisiteInterpreter.cs


示例14: GetSituation

 public GetSituation(Conversation conversation)
 {
     if (conversation == null){
         Debug.LogError("GetSituation.GetSituation(): NULL CONVERSATION!");
     }
     this.conversation = conversation;
 }
开发者ID:kiichi7,项目名称:Lies_and_Seductions,代码行数:7,代码来源:GetSituation.cs


示例15: StoreConversation

 private static void StoreConversation(Conversation conversation, string ConversationID)
 {
     ActiveConversations.Add(ConversationID, new ConversationContainer()
     {
         Conversation = conversation,
         ConversationCreated = DateTime.Now
     });
 }
开发者ID:NALSS,项目名称:LyncConversationTracker,代码行数:8,代码来源:Program.cs


示例16: CreateNewConversation

 void CreateNewConversation(object o)
 {
     string to = (string)o;
     Conversation c = new Conversation(api, to);
     conversations.Add(to, c);
     c.Show();
     conversationStarted.Set();
 }
开发者ID:kidbomb,项目名称:WhatsDotNet,代码行数:8,代码来源:MainWindow.xaml.cs


示例17: OrderDetailController

 public OrderDetailController(Conversation.IConversation conversation, AutoMapper.IMappingEngine mapper, ExtMvc.Data.OrderDetailRepository repository, Nexida.Infrastructure.IValidator validator, Nexida.Infrastructure.IStringConverter<ExtMvc.Domain.OrderDetail> stringConverter)
 {
     _conversation = conversation;
     _mapper = mapper;
     _repository = repository;
     _validator = validator;
     _stringConverter = stringConverter;
 }
开发者ID:gimmi,项目名称:randomhacking,代码行数:8,代码来源:OrderDetailController.cs


示例18: ConversationService

        /// <summary>
        /// Receives the conversation, callback to UI and the OC root object
        /// </summary>
        public ConversationService(Conversation conversation)
        {
            //stores the conversation object
            this.conversation = conversation;

            //gets the IM modality from the self participant in the conversation
            this.myImModality = (InstantMessageModality)conversation.SelfParticipant.Modalities[ModalityTypes.InstantMessage];
        }
开发者ID:wendellinfinity,项目名称:LyncBurstM,代码行数:11,代码来源:ConversationService.cs


示例19: TranscriptRecorderSessionShutdownEventArgs

 public TranscriptRecorderSessionShutdownEventArgs(TranscriptRecorderSession trs)
 {
     _conference = trs.Conference;
     _conversation = trs.Conversation;
     _transcriptRecorderSession = trs;
     _sessionId = trs.SessionId;
     _messages = trs.Messages;
 }
开发者ID:saluber,项目名称:LyncMeetingTranscript,代码行数:8,代码来源:TranscriptRecorderSession.cs


示例20: PermissionController

 public PermissionController(Conversation.IConversation conversation, AutoMapper.IMappingEngine mapper, Rhino.Security.Mgmt.Data.PermissionRepository repository, Rhino.Security.Mgmt.Infrastructure.IValidator validator, Rhino.Security.Mgmt.Infrastructure.IStringConverter<Rhino.Security.Model.Permission> stringConverter)
 {
     _conversation = conversation;
     _mapper = mapper;
     _repository = repository;
     _validator = validator;
     _stringConverter = stringConverter;
 }
开发者ID:smartinz,项目名称:Rhino-Security-Administration,代码行数:8,代码来源:PermissionController.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Conversion类代码示例发布时间:2022-05-24
下一篇:
C# Conventions类代码示例发布时间: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