Inheritance: System.Windows.Forms.Form
Beispiel #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;
            }
            BioConversation.EntryListStuct el = Dialog.EntryList[Index];
            AddReply ar = new AddReply();

            ar.pcc = pcc;
            if (SubIndx != -1)
            {
                BioConversation.EntryListReplyListStruct tr = el.ReplyList[SubIndx];
                ar.textBox1.Text = tr.Paraphrase;
                ar.textBox2.Text = tr.refParaphrase.ToString();
                ar.textBox3.Text = tr.CategoryValue.ToString();
                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 <BioConversation.EntryListReplyListStruct>();
            }
            el.ReplyList.Add(ar.res);
            Dialog.EntryList[Index] = el;
            RefreshTabs();
        }
 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;
     }
     ME1BioConversation.EntryListStuct el = Dialog.EntryList[Index];
     AddReply ar = new AddReply();
     ar.pcc = pcc as ME1Package;
     if (SubIndx != -1)
     {
         ME1BioConversation.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<ME1BioConversation.EntryListReplyListStruct>();
     el.ReplyList.Add(ar.res);
     Dialog.EntryList[Index] = el;
     Dialog.Save();
 }