From 7577d23014bed66e02379a81c5ca5bbff37075d8 Mon Sep 17 00:00:00 2001 From: Ivan Mogilko Date: Tue, 24 Jan 2023 12:02:15 +0300 Subject: [PATCH 1/6] AGS.Native: some tidy of the load_template_file() --- Editor/AGS.Native/NativeMethods.cpp | 16 +++--- Editor/AGS.Native/agsnative.cpp | 80 ++++++++++++++--------------- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/Editor/AGS.Native/NativeMethods.cpp b/Editor/AGS.Native/NativeMethods.cpp index 1be70228d45..9a643b7a24f 100644 --- a/Editor/AGS.Native/NativeMethods.cpp +++ b/Editor/AGS.Native/NativeMethods.cpp @@ -80,7 +80,7 @@ extern int GetPaletteAsHPalette(); extern bool DoesSpriteExist(int slot); extern int GetMaxSprites(); extern int GetCurrentlyLoadedRoomNumber(); -extern int load_template_file(const AGSString &fileName, char **iconDataBuffer, size_t *iconDataSize, bool isRoomTemplate); +extern bool load_template_file(const AGSString &fileName, std::vector &iconDataBuffer, bool isRoomTemplate); extern HAGSError extract_template_files(const AGSString &templateFileName); extern HAGSError extract_room_template_files(const AGSString &templateFileName, int newRoomNumber); extern void change_sprite_number(int oldNumber, int newNumber); @@ -670,18 +670,16 @@ namespace AGS BaseTemplate^ NativeMethods::LoadTemplateFile(String ^fileName, bool isRoomTemplate) { AGSString fileNameAnsi = TextHelper::ConvertUTF8(fileName); - char *iconDataBuffer = NULL; - size_t iconDataSize = 0u; + std::vector iconDataBuffer; - int success = load_template_file(fileNameAnsi, &iconDataBuffer, &iconDataSize, isRoomTemplate); + int success = load_template_file(fileNameAnsi, iconDataBuffer, isRoomTemplate); if (success) { Icon ^icon = nullptr; - if (iconDataBuffer != NULL) + if (!iconDataBuffer.empty()) { - cli::array^ managedArray = gcnew cli::array(iconDataSize); - Marshal::Copy(IntPtr(iconDataBuffer), managedArray, 0, iconDataSize); - ::free(iconDataBuffer); + cli::array^ managedArray = gcnew cli::array(iconDataBuffer.size()); + Marshal::Copy(IntPtr(&iconDataBuffer.front()), managedArray, 0, iconDataBuffer.size()); System::IO::MemoryStream^ ms = gcnew System::IO::MemoryStream(managedArray); try { @@ -699,7 +697,7 @@ namespace AGS } else { - return gcnew GameTemplate(fileName, icon); + return gcnew GameTemplate(fileName, nullptr, icon); } } return nullptr; diff --git a/Editor/AGS.Native/agsnative.cpp b/Editor/AGS.Native/agsnative.cpp index b856bffde69..1202d0ced6b 100644 --- a/Editor/AGS.Native/agsnative.cpp +++ b/Editor/AGS.Native/agsnative.cpp @@ -110,6 +110,8 @@ const char *old_editor_data_file = "editor.dat"; const char *new_editor_data_file = "game.agf"; const char *old_editor_main_game_file = "ac2game.dta"; const char *TEMPLATE_LOCK_FILE = "template.dta"; +const char *TEMPLATE_ICON_FILE = "template.ico"; +const char *GAME_ICON_FILE = "user.ico"; const char *ROOM_TEMPLATE_ID_FILE = "rtemplate.dat"; const int ROOM_TEMPLATE_ID_FILE_SIGNATURE = 0x74673812; bool spritesModified = false; @@ -441,51 +443,48 @@ HAGSError extract_template_files(const AGSString &templateFileName) exclude_list, {}); } -void extract_icon_from_template(AssetManager *templateMgr, char *iconName, char **iconDataBuffer, size_t *bufferSize) +static bool load_asset_data(AssetManager *mgr, const char *asset_name, std::vector &data, const size_t data_limit = SIZE_MAX) { - // make sure we get the icon from the file - templateMgr->SetSearchPriority(Common::kAssetPriorityLib); - auto inpu = templateMgr->OpenAsset (iconName); - const size_t sizey = inpu->GetLength(); - if ((inpu != NULL) && (sizey > 0)) - { - char *iconbuffer = (char*)malloc(sizey); - inpu->Read (iconbuffer, sizey); - *iconDataBuffer = iconbuffer; - *bufferSize = sizey; - } - else - { - *iconDataBuffer = NULL; - *bufferSize = 0u; - } + std::unique_ptr in(mgr->OpenAsset(asset_name)); + if (!in) + return false; + const size_t data_sz = std::min(static_cast(in->GetLength()), data_limit); + if (data_sz >= 0) + { + data.resize(data_sz); + in->Read(&data.front(), data_sz); + } + return true; } -int load_template_file(const AGSString &fileName, char **iconDataBuffer, size_t *iconDataSize, bool isRoomTemplate) +bool load_template_file(const AGSString &fileName, std::vector &iconDataBuffer, bool isRoomTemplate) { const AssetLibInfo *lib = nullptr; std::unique_ptr templateMgr(new AssetManager()); + templateMgr->SetSearchPriority(Common::kAssetPriorityLib); if (templateMgr->AddLibrary(fileName, &lib) == Common::kAssetNoError) { if (isRoomTemplate) { if (templateMgr->DoesAssetExist(ROOM_TEMPLATE_ID_FILE)) { - auto inpu = templateMgr->OpenAsset(ROOM_TEMPLATE_ID_FILE); - if (inpu->ReadInt32() != ROOM_TEMPLATE_ID_FILE_SIGNATURE) - { - return 0; - } - int roomNumber = inpu->ReadInt32(); + std::unique_ptr in(templateMgr->OpenAsset(ROOM_TEMPLATE_ID_FILE)); + if (!in) + return false; + if (in->ReadInt32() != ROOM_TEMPLATE_ID_FILE_SIGNATURE) + return false; + int roomNumber = in->ReadInt32(); + in.reset(); + char iconName[MAX_PATH]; sprintf(iconName, "room%d.ico", roomNumber); if (templateMgr->DoesAssetExist(iconName)) { - extract_icon_from_template(templateMgr.get(), iconName, iconDataBuffer, iconDataSize); + load_asset_data(templateMgr.get(), iconName, iconDataBuffer); } - return 1; + return true; } - return 0; + return false; } else if ((templateMgr->DoesAssetExist(old_editor_data_file)) || (templateMgr->DoesAssetExist(new_editor_data_file))) { @@ -495,35 +494,36 @@ int load_template_file(const AGSString &fileName, char **iconDataBuffer, size_t (oriname.FindString(".ags") != -1)) { // wasn't originally meant as a template - return 0; + return false; } - auto inpu = templateMgr->OpenAsset(old_editor_main_game_file); - if (inpu != NULL) + std::unique_ptr in(templateMgr->OpenAsset(old_editor_main_game_file)); + if (in) { - inpu->Seek(30); - int gameVersion = inpu->ReadInt32(); + in->Seek(30); + int gameVersion = in->ReadInt32(); + // TODO: check this out, in theory we still support pre-2.72 game import - if (gameVersion != 32) + if (gameVersion != 32) // CHECKME: why we use `!=` and not `>=` ? also what's 32? { // older than 2.72 template - return 0; + return false; } + in.reset(); } int useIcon = 0; - char *iconName = "template.ico"; + const char *iconName = TEMPLATE_ICON_FILE; if (!templateMgr->DoesAssetExist(iconName)) - iconName = "user.ico"; - // the file is a CLIB file, so let's extract the icon to display + iconName = GAME_ICON_FILE; if (templateMgr->DoesAssetExist(iconName)) { - extract_icon_from_template(templateMgr.get(), iconName, iconDataBuffer, iconDataSize); + load_asset_data(templateMgr.get(), iconName, iconDataBuffer); } - return 1; + return true; } } - return 0; + return false; } void drawBlockDoubleAt (HDC hdc, Common::Bitmap *todraw ,int x, int y) { From b82fb6d088ec45c8fae24f8f623e44abccfd0541 Mon Sep 17 00:00:00 2001 From: Ivan Mogilko Date: Tue, 24 Jan 2023 13:04:42 +0300 Subject: [PATCH 2/6] Editor: preload game template description when scanning --- Editor/AGS.Native/NativeMethods.cpp | 8 +++++--- Editor/AGS.Native/agsnative.cpp | 11 ++++++++++- Editor/AGS.Types/EditorFeatures/BaseTemplate.cs | 13 ++++++++++--- Editor/AGS.Types/EditorFeatures/GameTemplate.cs | 3 ++- Editor/AGS.Types/EditorFeatures/RoomTemplate.cs | 4 ++-- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Editor/AGS.Native/NativeMethods.cpp b/Editor/AGS.Native/NativeMethods.cpp index 9a643b7a24f..8ff8e329cd6 100644 --- a/Editor/AGS.Native/NativeMethods.cpp +++ b/Editor/AGS.Native/NativeMethods.cpp @@ -80,7 +80,8 @@ extern int GetPaletteAsHPalette(); extern bool DoesSpriteExist(int slot); extern int GetMaxSprites(); extern int GetCurrentlyLoadedRoomNumber(); -extern bool load_template_file(const AGSString &fileName, std::vector &iconDataBuffer, bool isRoomTemplate); +extern bool load_template_file(const AGSString &fileName, AGSString &description, + std::vector &iconDataBuffer, bool isRoomTemplate); extern HAGSError extract_template_files(const AGSString &templateFileName); extern HAGSError extract_room_template_files(const AGSString &templateFileName, int newRoomNumber); extern void change_sprite_number(int oldNumber, int newNumber); @@ -670,9 +671,10 @@ namespace AGS BaseTemplate^ NativeMethods::LoadTemplateFile(String ^fileName, bool isRoomTemplate) { AGSString fileNameAnsi = TextHelper::ConvertUTF8(fileName); + AGSString description; std::vector iconDataBuffer; - int success = load_template_file(fileNameAnsi, iconDataBuffer, isRoomTemplate); + int success = load_template_file(fileNameAnsi, description, iconDataBuffer, isRoomTemplate); if (success) { Icon ^icon = nullptr; @@ -697,7 +699,7 @@ namespace AGS } else { - return gcnew GameTemplate(fileName, nullptr, icon); + return gcnew GameTemplate(fileName, TextHelper::ConvertUTF8(description), icon); } } return nullptr; diff --git a/Editor/AGS.Native/agsnative.cpp b/Editor/AGS.Native/agsnative.cpp index 1202d0ced6b..2828efe8637 100644 --- a/Editor/AGS.Native/agsnative.cpp +++ b/Editor/AGS.Native/agsnative.cpp @@ -112,6 +112,7 @@ const char *old_editor_main_game_file = "ac2game.dta"; const char *TEMPLATE_LOCK_FILE = "template.dta"; const char *TEMPLATE_ICON_FILE = "template.ico"; const char *GAME_ICON_FILE = "user.ico"; +const char *TEMPLATE_DESC_FILE = "template.txt"; const char *ROOM_TEMPLATE_ID_FILE = "rtemplate.dat"; const int ROOM_TEMPLATE_ID_FILE_SIGNATURE = 0x74673812; bool spritesModified = false; @@ -457,7 +458,8 @@ static bool load_asset_data(AssetManager *mgr, const char *asset_name, std::vect return true; } -bool load_template_file(const AGSString &fileName, std::vector &iconDataBuffer, bool isRoomTemplate) +bool load_template_file(const AGSString &fileName, AGSString &description, + std::vector &iconDataBuffer, bool isRoomTemplate) { const AssetLibInfo *lib = nullptr; std::unique_ptr templateMgr(new AssetManager()); @@ -512,6 +514,13 @@ bool load_template_file(const AGSString &fileName, std::vector &iconDataBu in.reset(); } + if (templateMgr->DoesAssetExist(TEMPLATE_DESC_FILE)) + { + std::vector desc_data; + load_asset_data(templateMgr.get(), TEMPLATE_DESC_FILE, desc_data); + description.SetString(&desc_data.front(), desc_data.size()); + } + int useIcon = 0; const char *iconName = TEMPLATE_ICON_FILE; if (!templateMgr->DoesAssetExist(iconName)) diff --git a/Editor/AGS.Types/EditorFeatures/BaseTemplate.cs b/Editor/AGS.Types/EditorFeatures/BaseTemplate.cs index 4345dc3840e..b789cb16bbc 100644 --- a/Editor/AGS.Types/EditorFeatures/BaseTemplate.cs +++ b/Editor/AGS.Types/EditorFeatures/BaseTemplate.cs @@ -10,12 +10,14 @@ public class BaseTemplate { protected string _fileName; protected string _friendlyName; - protected Icon _icon; + protected string _description; + protected Icon _icon; - public BaseTemplate(string fileName, Icon icon) + public BaseTemplate(string fileName, string description, Icon icon) { _fileName = fileName; - _icon = icon; + _description = description; + _icon = icon; if (_fileName != null) { _friendlyName = Path.GetFileNameWithoutExtension(_fileName); @@ -32,6 +34,11 @@ public string FriendlyName get { return _friendlyName; } } + public string Description + { + get { return _description; } + } + public Icon Icon { get { return _icon; } diff --git a/Editor/AGS.Types/EditorFeatures/GameTemplate.cs b/Editor/AGS.Types/EditorFeatures/GameTemplate.cs index fdf651e0a27..2cc5da1c17f 100644 --- a/Editor/AGS.Types/EditorFeatures/GameTemplate.cs +++ b/Editor/AGS.Types/EditorFeatures/GameTemplate.cs @@ -8,7 +8,8 @@ namespace AGS.Types { public class GameTemplate : BaseTemplate { - public GameTemplate(string fileName, Icon icon) : base(fileName, icon) + public GameTemplate(string fileName, string description, Icon icon) + : base(fileName, description, icon) { } } diff --git a/Editor/AGS.Types/EditorFeatures/RoomTemplate.cs b/Editor/AGS.Types/EditorFeatures/RoomTemplate.cs index 705760da81e..93a907589bc 100644 --- a/Editor/AGS.Types/EditorFeatures/RoomTemplate.cs +++ b/Editor/AGS.Types/EditorFeatures/RoomTemplate.cs @@ -9,12 +9,12 @@ namespace AGS.Types public class RoomTemplate : BaseTemplate { public RoomTemplate(string fileName, Icon icon) - : base(fileName, icon) + : base(fileName, null, icon) { } public RoomTemplate(string fileName, Icon icon, string friendlyName) - : base(fileName, icon) + : base(fileName, null, icon) { _friendlyName = friendlyName; } From b51851d3f9cc981dfd4ac7d58579ee5f5b5a5423 Mon Sep 17 00:00:00 2001 From: Ivan Mogilko Date: Tue, 24 Jan 2023 14:19:19 +0300 Subject: [PATCH 3/6] Editor: added template info preview to the NewGameWizard --- .../GUI/StartNewGameWizardPage.Designer.cs | 25 ++++++++++++++-- .../AGS.Editor/GUI/StartNewGameWizardPage.cs | 9 ++++++ .../GUI/StartNewGameWizardPage.resx | 4 +-- .../AGS.Editor/GUI/WizardDialog.Designer.cs | 30 ++++++++++++------- Editor/AGS.Editor/GUI/WizardDialog.cs | 7 +++++ Editor/AGS.Editor/GUI/WizardDialog.resx | 6 ++-- 6 files changed, 63 insertions(+), 18 deletions(-) diff --git a/Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs b/Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs index a4553b2c364..6999e6457bf 100644 --- a/Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs +++ b/Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs @@ -29,6 +29,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.tbDescription = new System.Windows.Forms.TextBox(); this.lstTemplates = new System.Windows.Forms.ListView(); this.label1 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); @@ -36,15 +37,30 @@ private void InitializeComponent() // // groupBox1 // + this.groupBox1.Controls.Add(this.tbDescription); this.groupBox1.Controls.Add(this.lstTemplates); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Location = new System.Drawing.Point(9, 7); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(520, 219); + this.groupBox1.Size = new System.Drawing.Size(520, 320); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "Select Template"; // + // tbDescription + // + this.tbDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbDescription.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbDescription.Location = new System.Drawing.Point(16, 215); + this.tbDescription.Multiline = true; + this.tbDescription.Name = "tbDescription"; + this.tbDescription.ReadOnly = true; + this.tbDescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.tbDescription.Size = new System.Drawing.Size(489, 99); + this.tbDescription.TabIndex = 2; + // // lstTemplates // this.lstTemplates.HideSelection = false; @@ -54,6 +70,7 @@ private void InitializeComponent() this.lstTemplates.Size = new System.Drawing.Size(491, 167); this.lstTemplates.TabIndex = 1; this.lstTemplates.UseCompatibleStateImageBehavior = false; + this.lstTemplates.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.lstTemplates_ItemSelectionChanged); // // label1 // @@ -63,7 +80,7 @@ private void InitializeComponent() this.label1.Size = new System.Drawing.Size(425, 13); this.label1.TabIndex = 0; this.label1.Text = "Your new game is created based on a template. Please select the one you\'d like to" + - " use:"; + " use:"; // // StartNewGameWizardPage // @@ -71,8 +88,9 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.Controls.Add(this.groupBox1); this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.MinimumSize = new System.Drawing.Size(520, 425); this.Name = "StartNewGameWizardPage"; - this.Size = new System.Drawing.Size(1017, 632); + this.Size = new System.Drawing.Size(1504, 580); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.ResumeLayout(false); @@ -84,5 +102,6 @@ private void InitializeComponent() private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.ListView lstTemplates; private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox tbDescription; } } diff --git a/Editor/AGS.Editor/GUI/StartNewGameWizardPage.cs b/Editor/AGS.Editor/GUI/StartNewGameWizardPage.cs index 6f33431abab..811bf3ad936 100644 --- a/Editor/AGS.Editor/GUI/StartNewGameWizardPage.cs +++ b/Editor/AGS.Editor/GUI/StartNewGameWizardPage.cs @@ -63,5 +63,14 @@ public override void PageShown() { lstTemplates.Focus(); } + + private void lstTemplates_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) + { + if (e.IsSelected && e.ItemIndex >= 0) + tbDescription.Text = string.IsNullOrWhiteSpace(_templates[e.ItemIndex].Description) + ? "No description available." : _templates[e.ItemIndex].Description; + else + tbDescription.Text = ""; + } } } diff --git a/Editor/AGS.Editor/GUI/StartNewGameWizardPage.resx b/Editor/AGS.Editor/GUI/StartNewGameWizardPage.resx index ff31a6db56e..c7e0d4bdf13 100644 --- a/Editor/AGS.Editor/GUI/StartNewGameWizardPage.resx +++ b/Editor/AGS.Editor/GUI/StartNewGameWizardPage.resx @@ -112,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/Editor/AGS.Editor/GUI/WizardDialog.Designer.cs b/Editor/AGS.Editor/GUI/WizardDialog.Designer.cs index 2078b0ce0f0..cf647c86c22 100644 --- a/Editor/AGS.Editor/GUI/WizardDialog.Designer.cs +++ b/Editor/AGS.Editor/GUI/WizardDialog.Designer.cs @@ -49,7 +49,9 @@ private void InitializeComponent() // // groupBox1 // - this.groupBox1.Location = new System.Drawing.Point(12, 295); + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Location = new System.Drawing.Point(12, 389); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(516, 10); this.groupBox1.TabIndex = 0; @@ -57,7 +59,8 @@ private void InitializeComponent() // // btnNext // - this.btnNext.Location = new System.Drawing.Point(353, 311); + this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnNext.Location = new System.Drawing.Point(353, 405); this.btnNext.Name = "btnNext"; this.btnNext.Size = new System.Drawing.Size(83, 27); this.btnNext.TabIndex = 1; @@ -67,8 +70,9 @@ private void InitializeComponent() // // btnCancel // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(445, 311); + this.btnCancel.Location = new System.Drawing.Point(445, 405); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(83, 27); this.btnCancel.TabIndex = 2; @@ -77,7 +81,8 @@ private void InitializeComponent() // // btnBack // - this.btnBack.Location = new System.Drawing.Point(264, 311); + this.btnBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnBack.Location = new System.Drawing.Point(264, 405); this.btnBack.Name = "btnBack"; this.btnBack.Size = new System.Drawing.Size(83, 27); this.btnBack.TabIndex = 3; @@ -87,25 +92,29 @@ private void InitializeComponent() // // panel1 // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panel1.BackColor = System.Drawing.Color.White; this.panel1.Controls.Add(this.pnlMainPages); this.panel1.Controls.Add(this.lblIntroText); this.panel1.Controls.Add(this.lblTitle); this.panel1.Controls.Add(this.pictureBox1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(540, 300); + this.panel1.Size = new System.Drawing.Size(540, 394); this.panel1.TabIndex = 5; // // pnlMainPages // + this.pnlMainPages.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.pnlMainPages.BackColor = System.Drawing.SystemColors.Control; this.pnlMainPages.Controls.Add(this.pnlHeader); - this.pnlMainPages.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlMainPages.Location = new System.Drawing.Point(0, 0); this.pnlMainPages.Name = "pnlMainPages"; - this.pnlMainPages.Size = new System.Drawing.Size(540, 300); + this.pnlMainPages.Size = new System.Drawing.Size(540, 394); this.pnlMainPages.TabIndex = 8; // // pnlHeader @@ -145,7 +154,7 @@ private void InitializeComponent() this.lblIntroText.Size = new System.Drawing.Size(291, 199); this.lblIntroText.TabIndex = 7; this.lblIntroText.Text = "This wizard will guide you through doing something or other, and if youér lucky s" + - "omething else."; + "omething else."; // // lblTitle // @@ -173,8 +182,9 @@ private void InitializeComponent() this.AcceptButton = this.btnNext; this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.AutoSize = true; this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(540, 343); + this.ClientSize = new System.Drawing.Size(540, 437); this.Controls.Add(this.panel1); this.Controls.Add(this.btnBack); this.Controls.Add(this.btnCancel); diff --git a/Editor/AGS.Editor/GUI/WizardDialog.cs b/Editor/AGS.Editor/GUI/WizardDialog.cs index 5f3a1016657..57b4318b7f7 100644 --- a/Editor/AGS.Editor/GUI/WizardDialog.cs +++ b/Editor/AGS.Editor/GUI/WizardDialog.cs @@ -28,6 +28,13 @@ public WizardDialog(string wizardName, string introText, List pages) this.btnBack.Enabled = false; _pageNumber = 0; _pages = pages; + foreach (var page in pages) + { + if (page.MinimumSize.Width > pnlMainPages.Width) + pnlMainPages.Width = page.MinimumSize.Width; + if (page.MinimumSize.Height > pnlMainPages.Height - pnlHeader.Height) + pnlMainPages.Height = page.MinimumSize.Height + pnlHeader.Height; + } Utilities.CheckLabelWidthsOnForm(this); } diff --git a/Editor/AGS.Editor/GUI/WizardDialog.resx b/Editor/AGS.Editor/GUI/WizardDialog.resx index d460ca7d78b..82674c607e6 100644 --- a/Editor/AGS.Editor/GUI/WizardDialog.resx +++ b/Editor/AGS.Editor/GUI/WizardDialog.resx @@ -112,12 +112,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Qk3W5AIAAAAAADYAAAAoAAAA0gAAACwBAAABABgAAAAAAAAAAACIEQAAiBEAAAAAAAAAAAAAHx4eDw8P From a585f9cf4ed2137fd2b86282d263b905f92eb768 Mon Sep 17 00:00:00 2001 From: Ivan Mogilko Date: Sun, 29 Jan 2023 20:38:55 +0300 Subject: [PATCH 4/6] AGS.Native: force uniform linebreaks in loaded template descriptions --- Editor/AGS.Native/NativeMethods.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Editor/AGS.Native/NativeMethods.cpp b/Editor/AGS.Native/NativeMethods.cpp index 8ff8e329cd6..ae791a1bcdf 100644 --- a/Editor/AGS.Native/NativeMethods.cpp +++ b/Editor/AGS.Native/NativeMethods.cpp @@ -699,7 +699,11 @@ namespace AGS } else { - return gcnew GameTemplate(fileName, TextHelper::ConvertUTF8(description), icon); + // Bring linebreaks in description to the uniform "\r\n" format. + String ^uniDescription = TextHelper::ConvertUTF8(description); + uniDescription = System::Text::RegularExpressions::Regex + ::Replace(uniDescription, "(? Date: Sun, 29 Jan 2023 20:45:00 +0300 Subject: [PATCH 5/6] Editor: don't display template's description as popup on project create --- Editor/AGS.Editor/GUI/GUIController.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Editor/AGS.Editor/GUI/GUIController.cs b/Editor/AGS.Editor/GUI/GUIController.cs index d7a1121fbbe..08bfe0cb245 100644 --- a/Editor/AGS.Editor/GUI/GUIController.cs +++ b/Editor/AGS.Editor/GUI/GUIController.cs @@ -23,7 +23,6 @@ public class GUIController : IGUIController public const string FILE_MENU_ID = "fileToolStripMenuItem"; public const string HELP_MENU_ID = "HelpMenu"; private const string CONTROL_ID_SPLIT = "^!^"; - private const string TEMPLATE_INTRO_FILE = "template.txt"; private const string ROOM_TEMPLATE_ID_FILE = "rtemplate.dat"; private const int ROOM_TEMPLATE_ID_FILE_SIGNATURE = 0x74673812; private const string WINDOW_CONFIG_FILENAME = "WindowConfig.json"; @@ -1153,14 +1152,6 @@ private bool CreateNewGame(string newGamePath, string newFileName, string newGam Factory.AGSEditor.Settings.MessageBoxOnCompile = oldMessageBoxSetting; } - if (File.Exists(TEMPLATE_INTRO_FILE)) - { - StreamReader sr = new StreamReader(TEMPLATE_INTRO_FILE); - string introText = sr.ReadToEnd(); - sr.Close(); - - Factory.GUIController.ShowMessage(introText, MessageBoxIcon.Information); - } createdSuccessfully = true; } } From caaa509df42c80c2aa4488d788c97a143581aa36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Porto?= Date: Sun, 10 Nov 2024 14:42:25 -0300 Subject: [PATCH 6/6] Editor: adjust wizard dialog layout --- .../GUI/StartNewGameWizardPage.Designer.cs | 48 ++++++++-- .../AGS.Editor/GUI/WizardDialog.Designer.cs | 92 +++++++++++++------ 2 files changed, 103 insertions(+), 37 deletions(-) diff --git a/Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs b/Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs index 6999e6457bf..a94d92be98d 100644 --- a/Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs +++ b/Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs @@ -32,39 +32,43 @@ private void InitializeComponent() this.tbDescription = new System.Windows.Forms.TextBox(); this.lstTemplates = new System.Windows.Forms.ListView(); this.label1 = new System.Windows.Forms.Label(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.groupBox1.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // - this.groupBox1.Controls.Add(this.tbDescription); - this.groupBox1.Controls.Add(this.lstTemplates); + this.groupBox1.Controls.Add(this.tableLayoutPanel1); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Location = new System.Drawing.Point(9, 7); + this.groupBox1.Margin = new System.Windows.Forms.Padding(4); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(520, 320); + this.groupBox1.Padding = new System.Windows.Forms.Padding(4); + this.groupBox1.Size = new System.Drawing.Size(520, 219); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "Select Template"; // // tbDescription // - this.tbDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); this.tbDescription.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tbDescription.Location = new System.Drawing.Point(16, 215); + this.tbDescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.tbDescription.Location = new System.Drawing.Point(4, 157); + this.tbDescription.Margin = new System.Windows.Forms.Padding(4); this.tbDescription.Multiline = true; this.tbDescription.Name = "tbDescription"; this.tbDescription.ReadOnly = true; this.tbDescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.tbDescription.Size = new System.Drawing.Size(489, 99); + this.tbDescription.Size = new System.Drawing.Size(764, 145); this.tbDescription.TabIndex = 2; // // lstTemplates // + this.lstTemplates.Dock = System.Windows.Forms.DockStyle.Fill; this.lstTemplates.HideSelection = false; this.lstTemplates.Location = new System.Drawing.Point(14, 41); + this.lstTemplates.Margin = new System.Windows.Forms.Padding(4); this.lstTemplates.MultiSelect = false; this.lstTemplates.Name = "lstTemplates"; this.lstTemplates.Size = new System.Drawing.Size(491, 167); @@ -75,12 +79,32 @@ private void InitializeComponent() // label1 // this.label1.AutoSize = true; + this.label1.Dock = System.Windows.Forms.DockStyle.Top; this.label1.Location = new System.Drawing.Point(13, 19); + this.label1.Margin = new System.Windows.Forms.Padding(8); this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(8); this.label1.Size = new System.Drawing.Size(425, 13); this.label1.TabIndex = 0; this.label1.Text = "Your new game is created based on a template. Please select the one you\'d like to" + " use:"; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.AutoSize = true; + this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.lstTemplates, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.tbDescription, 0, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 61); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(772, 306); + this.tableLayoutPanel1.TabIndex = 1; // // StartNewGameWizardPage // @@ -88,11 +112,14 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.Controls.Add(this.groupBox1); this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.MinimumSize = new System.Drawing.Size(520, 425); + this.Margin = new System.Windows.Forms.Padding(4); + this.MinimumSize = new System.Drawing.Size(491, 167); this.Name = "StartNewGameWizardPage"; - this.Size = new System.Drawing.Size(1504, 580); + this.Size = new System.Drawing.Size(1017, 632); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); } @@ -103,5 +130,6 @@ private void InitializeComponent() private System.Windows.Forms.ListView lstTemplates; private System.Windows.Forms.Label label1; private System.Windows.Forms.TextBox tbDescription; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; } } diff --git a/Editor/AGS.Editor/GUI/WizardDialog.Designer.cs b/Editor/AGS.Editor/GUI/WizardDialog.Designer.cs index cf647c86c22..fa1738c84b0 100644 --- a/Editor/AGS.Editor/GUI/WizardDialog.Designer.cs +++ b/Editor/AGS.Editor/GUI/WizardDialog.Designer.cs @@ -41,28 +41,33 @@ private void InitializeComponent() this.lblIntroText = new System.Windows.Forms.Label(); this.lblTitle = new System.Windows.Forms.Label(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.panel1.SuspendLayout(); this.pnlMainPages.SuspendLayout(); this.pnlHeader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox1.Location = new System.Drawing.Point(12, 389); + this.groupBox1.Location = new System.Drawing.Point(18, 442); + this.groupBox1.Margin = new System.Windows.Forms.Padding(6); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(516, 10); + this.groupBox1.Padding = new System.Windows.Forms.Padding(6); + this.groupBox1.Size = new System.Drawing.Size(774, 15); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // // btnNext // this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnNext.Location = new System.Drawing.Point(353, 405); + this.btnNext.Location = new System.Drawing.Point(540, 6); + this.btnNext.Margin = new System.Windows.Forms.Padding(6); this.btnNext.Name = "btnNext"; - this.btnNext.Size = new System.Drawing.Size(83, 27); + this.btnNext.Size = new System.Drawing.Size(122, 40); this.btnNext.TabIndex = 1; this.btnNext.Text = "&Next >"; this.btnNext.UseVisualStyleBackColor = true; @@ -72,9 +77,10 @@ private void InitializeComponent() // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(445, 405); + this.btnCancel.Location = new System.Drawing.Point(674, 6); + this.btnCancel.Margin = new System.Windows.Forms.Padding(6); this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(83, 27); + this.btnCancel.Size = new System.Drawing.Size(122, 40); this.btnCancel.TabIndex = 2; this.btnCancel.Text = "&Cancel"; this.btnCancel.UseVisualStyleBackColor = true; @@ -82,9 +88,10 @@ private void InitializeComponent() // btnBack // this.btnBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnBack.Location = new System.Drawing.Point(264, 405); + this.btnBack.Location = new System.Drawing.Point(406, 6); + this.btnBack.Margin = new System.Windows.Forms.Padding(6); this.btnBack.Name = "btnBack"; - this.btnBack.Size = new System.Drawing.Size(83, 27); + this.btnBack.Size = new System.Drawing.Size(122, 40); this.btnBack.TabIndex = 3; this.btnBack.Text = "< &Back"; this.btnBack.UseVisualStyleBackColor = true; @@ -101,8 +108,9 @@ private void InitializeComponent() this.panel1.Controls.Add(this.lblTitle); this.panel1.Controls.Add(this.pictureBox1); this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(6); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(540, 394); + this.panel1.Size = new System.Drawing.Size(810, 450); this.panel1.TabIndex = 5; // // pnlMainPages @@ -113,8 +121,9 @@ private void InitializeComponent() this.pnlMainPages.BackColor = System.Drawing.SystemColors.Control; this.pnlMainPages.Controls.Add(this.pnlHeader); this.pnlMainPages.Location = new System.Drawing.Point(0, 0); + this.pnlMainPages.Margin = new System.Windows.Forms.Padding(6); this.pnlMainPages.Name = "pnlMainPages"; - this.pnlMainPages.Size = new System.Drawing.Size(540, 394); + this.pnlMainPages.Size = new System.Drawing.Size(810, 450); this.pnlMainPages.TabIndex = 8; // // pnlHeader @@ -124,16 +133,18 @@ private void InitializeComponent() this.pnlHeader.Controls.Add(this.lblHeader1); this.pnlHeader.Dock = System.Windows.Forms.DockStyle.Top; this.pnlHeader.Location = new System.Drawing.Point(0, 0); + this.pnlHeader.Margin = new System.Windows.Forms.Padding(6); this.pnlHeader.Name = "pnlHeader"; - this.pnlHeader.Size = new System.Drawing.Size(540, 59); + this.pnlHeader.Size = new System.Drawing.Size(810, 88); this.pnlHeader.TabIndex = 0; // // lblHeader2 // this.lblHeader2.AutoSize = true; - this.lblHeader2.Location = new System.Drawing.Point(23, 26); + this.lblHeader2.Location = new System.Drawing.Point(23, 43); + this.lblHeader2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); this.lblHeader2.Name = "lblHeader2"; - this.lblHeader2.Size = new System.Drawing.Size(35, 13); + this.lblHeader2.Size = new System.Drawing.Size(54, 21); this.lblHeader2.TabIndex = 1; this.lblHeader2.Text = "label1"; // @@ -141,29 +152,32 @@ private void InitializeComponent() // this.lblHeader1.AutoSize = true; this.lblHeader1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblHeader1.Location = new System.Drawing.Point(20, 8); + this.lblHeader1.Location = new System.Drawing.Point(20, 13); + this.lblHeader1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); this.lblHeader1.Name = "lblHeader1"; - this.lblHeader1.Size = new System.Drawing.Size(79, 13); + this.lblHeader1.Size = new System.Drawing.Size(119, 21); this.lblHeader1.TabIndex = 0; this.lblHeader1.Text = "wizard name"; // // lblIntroText // - this.lblIntroText.Location = new System.Drawing.Point(227, 93); + this.lblIntroText.Location = new System.Drawing.Point(340, 140); + this.lblIntroText.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); this.lblIntroText.Name = "lblIntroText"; - this.lblIntroText.Size = new System.Drawing.Size(291, 199); + this.lblIntroText.Size = new System.Drawing.Size(700, 250); this.lblIntroText.TabIndex = 7; - this.lblIntroText.Text = "This wizard will guide you through doing something or other, and if youér lucky s" + + this.lblIntroText.Text = "This wizard will guide you through doing something or other, and if you\'r lucky s" + "omething else."; // // lblTitle // this.lblTitle.AutoSize = true; this.lblTitle.Font = new System.Drawing.Font("Tahoma", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblTitle.Location = new System.Drawing.Point(227, 13); - this.lblTitle.MaximumSize = new System.Drawing.Size(320, 0); + this.lblTitle.Location = new System.Drawing.Point(339, 21); + this.lblTitle.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); + this.lblTitle.MaximumSize = new System.Drawing.Size(550, 0); this.lblTitle.Name = "lblTitle"; - this.lblTitle.Size = new System.Drawing.Size(231, 66); + this.lblTitle.Size = new System.Drawing.Size(527, 98); this.lblTitle.TabIndex = 6; this.lblTitle.Text = "Welcome to the Something Wizard"; // @@ -171,27 +185,48 @@ private void InitializeComponent() // this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(4); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(210, 300); + this.pictureBox1.Size = new System.Drawing.Size(315, 450); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex = 5; this.pictureBox1.TabStop = false; // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.AutoSize = true; + this.tableLayoutPanel1.ColumnCount = 5; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 134F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 134F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 134F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 8F)); + this.tableLayoutPanel1.Controls.Add(this.btnBack, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.btnCancel, 3, 0); + this.tableLayoutPanel1.Controls.Add(this.btnNext, 2, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.tableLayoutPanel1.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 462); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(810, 52); + this.tableLayoutPanel1.TabIndex = 6; + // // WizardDialog // this.AcceptButton = this.btnNext; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleDimensions = new System.Drawing.SizeF(144F, 144F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoSize = true; this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(540, 437); + this.ClientSize = new System.Drawing.Size(810, 514); + this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.panel1); - this.Controls.Add(this.btnBack); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.btnNext); this.Controls.Add(this.groupBox1); this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Margin = new System.Windows.Forms.Padding(6); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "WizardDialog"; @@ -203,7 +238,9 @@ private void InitializeComponent() this.pnlHeader.ResumeLayout(false); this.pnlHeader.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.tableLayoutPanel1.ResumeLayout(false); this.ResumeLayout(false); + this.PerformLayout(); } @@ -221,5 +258,6 @@ private void InitializeComponent() private System.Windows.Forms.Panel pnlHeader; private System.Windows.Forms.Label lblHeader2; private System.Windows.Forms.Label lblHeader1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; } } \ No newline at end of file