コード例 #1
0
        void PropsShell_Click(object sender, EventArgs e)
        {
            Tab tab = sender as Tab;

            if (tab == null)
            {
                return;
            }

            WizPropPageElement page = tab.Tag as WizPropPageElement;

            if (page == null)
            {
                return;
            }

            tab.Selected = true;

            foreach (Tab item in tabs)
            {
                if (item != sender)
                {
                    item.Selected = false;
                }
            }

            ShowTab(page);
        }
コード例 #2
0
        private void ShowTab(WizPropPageElement element)
        {
            if (currentPage != null)
            {
                currentPage.Save();
                this.Controls.Remove(currentPage);
                currentPage.Dispose();
            }


            PropPage page = (PropPage)Activator.CreateInstance(element.Page);

            page.Top     = this.Contents.Top;
            page.Left    = this.Contents.Left;
            page.Binding = target;
            page.SetData(Target.Data);
            this.Controls.Add(page);

            currentPage = page;
            UpdateButtonStates();
        }
コード例 #3
0
        private void ShowTab(WizPropPageElement element)
        {
            if (currentPage != null)
            {
                currentPage.Save();
                this.Controls.Remove(currentPage);
                currentPage.Dispose();
            }

            PropPage page = (PropPage)Activator.CreateInstance(element.Page);
            page.Top = this.Contents.Top;
            page.Left = this.Contents.Left;
            page.Binding = target;
            page.SetData(Target.Data);
            this.Controls.Add(page);

            currentPage = page;
            UpdateButtonStates();
        }