private void SelectResp(bool on) { if (on) { selectedResp = box_Resp.SelectedItem as Response; } else { selectedResp = null; } SelectLink(false); RefreshLinksList(); btn_SaveResp.Enabled = on; btn_RemResp.Enabled = on; text_Resp.Enabled = on; box_Links.Enabled = on; }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { var result = MessageBox.Show("Do you want to create new Dialogue? Unsaved changes will be deleted!", "New Dialogue", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { lines.Clear(); selectedLine = null; selectedResp = null; selectedLink = null; box_Linked.Text = ""; text_NPC.Text = ""; text_Resp.Text = ""; RefreshAllLists(); } }
private void CreateResponse(Response resp, XmlTextWriter writer) { writer.WriteStartElement("Response"); writer.WriteStartElement("Text"); writer.WriteString(resp.Text); writer.WriteEndElement(); writer.WriteStartElement("Next_Id"); writer.WriteString(resp.Next.Id.ToString()); writer.WriteEndElement(); writer.WriteEndElement(); }