コード例 #1
0
ファイル: QuestDialog.cs プロジェクト: MadTonG/mir3-zircon-zh
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                if (TabControl != null)
                {
                    if (!TabControl.IsDisposed)
                    {
                        TabControl.Dispose();
                    }

                    TabControl = null;
                }

                if (AvailableTab != null)
                {
                    if (!AvailableTab.IsDisposed)
                    {
                        AvailableTab.Dispose();
                    }

                    AvailableTab = null;
                }

                if (CurrentTab != null)
                {
                    if (!CurrentTab.IsDisposed)
                    {
                        CurrentTab.Dispose();
                    }

                    CurrentTab = null;
                }

                if (CompletedTab != null)
                {
                    if (!CompletedTab.IsDisposed)
                    {
                        CompletedTab.Dispose();
                    }

                    CompletedTab = null;
                }
            }
        }
コード例 #2
0
ファイル: QuestDialog.cs プロジェクト: MadTonG/mir3-zircon-zh
        public QuestDialog()
        {
            TitleLabel.Text = "任务日志";

            SetClientSize(new Size(558, 380));

            TabControl = new DXTabControl
            {
                Parent   = this,
                Location = ClientArea.Location,
                Size     = ClientArea.Size,
            };

            CurrentTab = new QuestTab
            {
                TabButton  = { Label = { Text = "当前任务" } },
                Parent     = TabControl,
                Border     = true,
                ChoiceGrid = { ReadOnly = true }
            };

            AvailableTab = new QuestTab
            {
                TabButton      = { Label = { Text = "可接任务" } },
                Parent         = TabControl,
                Border         = true,
                ShowTrackerBox = { Visible = false }
            };


            CompletedTab = new QuestTab
            {
                TabButton      = { Label = { Text = "已完成" } },
                Parent         = TabControl,
                Border         = true,
                ShowTrackerBox = { Visible = false }
            };
        }