Пример #1
0
        private void onNodeSelection(object sender, EventArgs e)
        {
            bool bHandled = false;
            EventArgObjectSelected eos = e as EventArgObjectSelected;

            if (eos != null)
            {
                TreeNodeResource tr = eos.SelectedObject as TreeNodeResource;
                if (tr != null)
                {
                    bHandled = true;
                    tr.OnSelected(textBoxDefault, textBoxLocal, pictureBoxDefault, pictureBoxLocal, null);
                }
                else
                {
                    TreeNodeLocalizeResource tnl = eos.SelectedObject as TreeNodeLocalizeResource;
                    if (tnl != null)
                    {
                        bHandled = true;
                        tnl.OnSelected(textBoxDefault, textBoxLocal, pictureBoxDefault, pictureBoxLocal, tnl.Culture);
                    }
                }
            }
            if (!bHandled)
            {
                textBoxDefault.Visible    = false;
                textBoxLocal.Visible      = false;
                pictureBoxDefault.Visible = false;
                pictureBoxLocal.Visible   = false;
            }
        }
        private void treeView1_TypeSelected(object sender, EventArgs e)
        {
            btOK.Enabled = false;
            EventArgObjectSelected e0 = e as EventArgObjectSelected;

            if (e0 != null)
            {
                RetType      = e0.SelectedObject as Type;
                btOK.Enabled = (RetType != null);
            }
        }