Example #1
0
        private void ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem item = sender as ToolStripMenuItem;
            GridRelatedInfo   info = item.Tag as GridRelatedInfo;

            GridGotoFormTaskPane.ShowFormFromGrid(this.Parent.FindForm() as IArchiveMasterForm, info, false);
        }
        private void ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var childForm = this.Parent.FindForm();

            if (childForm == null)
            {
                MessageForm.ShowError("未能找到父窗体!");
                return;
            }
            var masterForm = childForm.ParentForm as IArchiveMasterForm;

            ToolStripMenuItem item = sender as ToolStripMenuItem;
            GridRelatedInfo   info = item.Tag as GridRelatedInfo;

            if (info.RelatedType == GridRelatedType.ByRows)
            {
                GridGotoFormTaskPane.ShowFormFromGrid(masterForm, info, true);
            }
            else
            {
                throw new NotSupportedException("Not Supported now!");
            }
        }