Ejemplo n.º 1
0
        private void buttonPost_Click(object sender, EventArgs e)
        {
            noun = comboType.SelectedItem.ToString();
            object obj = comboCategory.SelectedItem;

            if (obj is OidPair)
            {
                OidPair opair = (OidPair)obj;
                oid = opair.oid;
            }
            word = textWord.Text;
            baseTree.Nodes.Clear();
            syncGet(downloadpost);
            panelText.Visible   = true;
            panelDialog.Visible = false;
        }
Ejemplo n.º 2
0
 private void store_Click(object sender, EventArgs e, String def)
 {
     word = textWord.Text;
     if (baseTree.SelectedNode.Tag is Dictionary <String, String> )
     {
         Dictionary <String, String> dict = (Dictionary <String, String>)baseTree.SelectedNode.Tag;
         noun = comboType.Text.ToString();
         if (noun.Length == 0)
         {
             noun = def;
         }
         try
         {
             oid = dict["oid"];
         }
         catch (KeyNotFoundException ex)
         {
             return;
         }
         try
         {
             String  category = baseTree.SelectedNode.Nodes[0].Text;
             OidPair opair    = new OidPair();
             opair.name = category;
             opair.oid  = oid;
             comboCategory.Items.Add(opair);
         }
         finally
         {
         }
     }
     baseTree.Nodes.Clear();
     syncGet(downloadpost);
     panelText.Visible   = true;
     panelDialog.Visible = false;
 }
Ejemplo n.º 3
0
        private void store_Click(object sender,EventArgs e,String def)
        {
            word = textWord.Text;
            if (baseTree.SelectedNode.Tag is Dictionary<String, String>)
            {
                Dictionary<String, String> dict = (Dictionary<String, String>)baseTree.SelectedNode.Tag;
                noun = comboType.Text.ToString();
                if (noun.Length == 0)
                    noun = def;
                try
                {
                    oid = dict["oid"];
                }
                catch (KeyNotFoundException ex)
                {
                    return;
                }
                try
                {
                    String category = baseTree.SelectedNode.Nodes[0].Text;
                    OidPair opair = new OidPair();
                    opair.name = category;
                    opair.oid = oid;
                    comboCategory.Items.Add(opair);
                }
                finally
                {

                }
            }
            baseTree.Nodes.Clear();
            syncGet(downloadpost);
            panelText.Visible = true;
            panelDialog.Visible = false;

        }