static QuestDebugRow[,] CreateQuestRow(TabPage tabPage)
        {
            var questRows = new QuestDebugRow[5, 6];

            for (int actIndex = 0; actIndex < 5; actIndex++)
            {
                int y = actIndex * 100 - (actIndex > 3 ? 3 * 16 : 0);

                tabPage.Controls.Add(new Label
                {
                    Text     = "Act " + (actIndex + 1),
                    Width    = 40,
                    Location = new Point(20, y)
                });

                for (int questIndex = 0; questIndex < (actIndex == 3 ? 3 : 6); questIndex++)
                {
                    var quest = QuestFactory.CreateByActAndOrder(actIndex + 1, questIndex + 1);
                    var row   = new QuestDebugRow(quest);
                    row.Location = new Point(60, y + (questIndex * 16));
                    tabPage.Controls.Add(row);

                    questRows[actIndex, questIndex] = row;
                }
            }

            return(questRows);
        }
Beispiel #2
0
        private void LoadQuests(Label[] actLabels, QuestDebugRow[,] questRows, TabPage tabPage)
        {
            int y;

            for (int i = 0; i < 5; i++)
            {
                y                     = i * 100 - (i > 3 ? 3 * 16 : 0);
                actLabels[i]          = new Label();
                actLabels[i].Text     = "Act " + (i + 1);
                actLabels[i].Width    = 80;
                actLabels[i].Location = new Point(20, y);
                tabPage.Controls.Add(actLabels[i]);
                for (int j = 0; j < (i == 3 ? 3 : 6); j++)
                {
                    questRows[i, j]          = new QuestDebugRow(D2QuestHelper.GetByActAndQuest(i + 1, j + 1));
                    questRows[i, j].Location = new Point(100, y + (j * 16));
                    tabPage.Controls.Add(questRows[i, j]);
                }
            }
        }