Esempio n. 1
0
        private void toEntrysReplyListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TreeNode t = treeView1.SelectedNode;

            if (t == null || t.Parent == null)
            {
                return;
            }
            TreeNode p = t.Parent;
            int      Index;
            int      SubIndx = -1;

            if (p.Parent == null)
            {
                Index = p.Index;
            }
            else
            {
                Index   = p.Parent.Index;
                SubIndx = t.Index;
            }
            ME2BioConversation.EntryListStuct el = Dialog.EntryList[Index];
            AddReply ar = new AddReply();

            ar.pcc = pcc as ME2Package;
            if (SubIndx != -1)
            {
                ME2BioConversation.EntryListReplyListStruct tr = el.ReplyList[SubIndx];
                ar.textBox1.Text          = tr.Paraphrase;
                ar.textBox2.Text          = tr.refParaphrase.ToString();
                ar.comboBox1.SelectedItem = pcc.getNameEntry(tr.CategoryValue);
                ar.textBox4.Text          = tr.Index.ToString();
            }
            ar.Show();
            while (ar.state == 0)
            {
                Application.DoEvents();
            }
            ar.Close();
            if (ar.state == -1)
            {
                return;
            }
            if (el.ReplyList == null)
            {
                el.ReplyList = new List <ME2BioConversation.EntryListReplyListStruct>();
            }
            el.ReplyList.Add(ar.res);
            Dialog.EntryList[Index] = el;
            Dialog.Save();
        }
Esempio n. 2
0
 private void toEntrysReplyListToolStripMenuItem_Click(object sender, EventArgs e)
 {
     TreeNode t = treeView1.SelectedNode;
     if (t == null || t.Parent == null)
         return;
     TreeNode p = t.Parent;
     int Index;
     int SubIndx = -1;
     if (p.Parent == null)
         Index = p.Index;
     else
     {
         Index = p.Parent.Index;
         SubIndx = t.Index;
     }
     ME2BioConversation.EntryListStuct el = Dialog.EntryList[Index];
     AddReply ar = new AddReply();
     ar.pcc = pcc as ME2Package;
     if (SubIndx != -1)
     {
         ME2BioConversation.EntryListReplyListStruct tr = el.ReplyList[SubIndx];
         ar.textBox1.Text = tr.Paraphrase;
         ar.textBox2.Text = tr.refParaphrase.ToString();
         ar.comboBox1.SelectedItem = pcc.getNameEntry(tr.CategoryValue);
         ar.textBox4.Text = tr.Index.ToString();
     }
     ar.Show();
     while (ar.state == 0) Application.DoEvents();
     ar.Close();
     if (ar.state == -1)
         return;
     if(el.ReplyList == null)
         el.ReplyList = new List<ME2BioConversation.EntryListReplyListStruct>();
     el.ReplyList.Add(ar.res);
     Dialog.EntryList[Index] = el;
     Dialog.Save();
 }