Пример #1
0
        public criWindow(string bot_name, ref ConversationalResponseItems cri)
        {
            criItems = cri;
            botName  = bot_name;

            InitializeComponent();

            currentSaysComboBox.Enabled = false;

            if (cri.ResponseItems.Count != 0)
            {
                foreach (ConversationalResponseItem responseItem in cri.ResponseItems)
                {
                    criDataGrid.Rows.Add(responseItem.To, responseItem.Response, responseItem.AltResponse, responseItem.EngineCommand, responseItem.VisibilityOptions);
                }
            }

            Dictionary <int, string> currentConversations = Conversational.Instance.GetBotConversations(botName);

            if (currentConversations.Count != 0)
            {
                currentSaysComboBox.Enabled = true;

                foreach (int key in currentConversations.Keys)
                {
                    string conversation = currentConversations[key].ToString();

                    currentSaysComboBox.Items.Add(key.ToString() + " - " + conversation);
                }
            }
        }
Пример #2
0
        public AddNewConversationWindow(string bot_name)
        {
            this.botName = bot_name;
            this.cri     = new ConversationalResponseItems();

            InitializeComponent();
        }
Пример #3
0
        private void LoadEditConversationWindow(string botName, int conversationID, string say)
        {
            ConversationalResponseItems cri = Conversational.Instance.GetBotCRI(botName, conversationID);

            EditConversationWindow editWindow = new EditConversationWindow(botName, conversationID, say, cri);

            editWindow.ShowDialog();
            editWindow.Dispose();

            LoadConversationalGrid();
        }
Пример #4
0
        public EditConversationWindow(string bot_name, int id, string say, ConversationalResponseItems cri)
        {
            this.botName        = bot_name;
            this.conversationID = id;
            this.cri            = cri;

            this.Text = "Edit Conversation For '" + this.botName + "'";

            InitializeComponent();

            conversationSayTextBox.Text = say;
            criTotal.Text = cri.ResponseItems.Count.ToString();
        }