Skip to content

Commit 506c6cb

Browse files
Updated release notes and some small bug fixes
1 parent 044f36a commit 506c6cb

File tree

6 files changed

+95
-41
lines changed

6 files changed

+95
-41
lines changed

Maverick.PCF.Builder.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ EndProject
1818
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{433E52F5-84E6-4160-852C-ADAB3124A822}"
1919
ProjectSection(SolutionItems) = preProject
2020
PCF-CustomControlBuilder.nuspec = PCF-CustomControlBuilder.nuspec
21+
README.md = README.md
2122
EndProjectSection
2223
EndProject
2324
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Maverick.PCF.Builder.Extensions", "Maverick.PCF.Builder.Extensions\Maverick.PCF.Builder.Extensions.shproj", "{135BE41D-FFC2-40B1-ACB5-EBC2309014B2}"

Maverick.PCF.Builder/Forms/ShowPreviewImage.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ public ShowPreviewImage(ControlManifestDetails details)
2525
_controlDetails = details;
2626
lblDisplayName.Text = _controlDetails.ControlDisplayName;
2727
lblDescription.Text = _controlDetails.ControlDescription;
28-
lblTypes.Text = String.Join(", ", _controlDetails.TypeGroups.FirstOrDefault().Types);
28+
lblTypes.Text = String.Join(", ", _controlDetails.Properties
29+
.Where(p => p.IsUsingTypeGroup == false && p.Usage == Helper.Enum.UsageType.bound)
30+
.Select(p => p.TypeOrTypeGroup));
2931

3032
pboxPreviewImage.ImageLocation = _controlDetails.PreviewImagePath;
3133
}
@@ -44,13 +46,13 @@ private void btnChangePreviewImage_Click(object sender, EventArgs e)
4446

4547
File.Copy(ofdPreviewImage.FileName, $"{filePath}\\{fileName}", true);
4648
pboxPreviewImage.ImageLocation = $"{filePath}\\{fileName}";
47-
49+
4850
}
4951
}
5052

5153
private void ShowPreviewImage_FormClosing(object sender, FormClosingEventArgs e)
5254
{
53-
55+
5456
}
5557
}
5658
}
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
---- NEW FEATURES ----
2-
1. Added "Existing Publisher" option
3-
2. Automatically detects if npm packages needs to be installed and prompts to run 'npm install'
2+
1. Separation of Display name and Control name for PCF Project initialization
3+
2. Ability to update control display name and description right from the tool after creation
4+
3. Full properties and type-group management
5+
4. Enable and Disable features
6+
5. Add or update Preview image with ease
7+
6. Added "Existing Solution" option
8+
7. Automatically detects if npm packages needs to be installed and prompts to run 'npm install'
9+
8. Ability to add solution Friendly name and Unique name
10+
9. Added solution package type option
11+
10. Build mode for creating a regular or optimized packages
412

513
---- UPDATES ----
6-
No updates
14+
1. UI Rearranged
15+
2. Automatically identify if node_modules are missing and runs 'npm install'
716

817
---- BUG FIXES ----
9-
None
18+
None
19+
20+
Enhancements & Issues reported by the community fixed in this version:
21+
- #31: Add fields for control property (Rappen)
22+
- #35: Managed should be renamed to Release (Power-Maverick)
23+
- #46: Ability to select Managed/Unmanaged/Both (Power-Maverick)
24+
- #38: Use existing publisher option similar to use existing solution (OliverFlint)
25+
- #44: Create a new button to just install dependencies (Power-Maverick)

Maverick.PCF.Builder/UserControls/PropertyControl.Designer.cs

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Maverick.PCF.Builder/UserControls/PropertyControl.cs

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private void LoadControlValues()
9292
default:
9393
break;
9494
}
95-
}
95+
}
9696
}
9797
}
9898

@@ -117,15 +117,15 @@ private void ToggleTypeDataset()
117117
ddOfType.DisplayMember = "Name";
118118
ddOfType.ValueMember = "Name";
119119

120-
lblType.Text = "Type Group (Data Type)";
120+
lblType.Text = "Type Group (Data Type)*";
121121
}
122122
else
123123
{
124124
ddOfType.DataSource = dataTypes;
125125
ddOfType.DisplayMember = "DataTypeName";
126126
ddOfType.ValueMember = "DataTypeName";
127127

128-
lblType.Text = "Type (Data Type)";
128+
lblType.Text = "Type (Data Type)*";
129129
}
130130
}
131131

@@ -143,33 +143,52 @@ private void Routine_EditControl()
143143
newProperty = false;
144144
}
145145

146+
private bool validatePropertyData()
147+
{
148+
bool isValid = false;
149+
150+
if (!string.IsNullOrEmpty(txtPropertyName.Text) && !string.IsNullOrEmpty(txtDisplayNameKey.Text))
151+
{
152+
isValid = true;
153+
}
154+
155+
return isValid;
156+
}
157+
146158
#endregion
147159

148160
private void btnUpdate_Click(object sender, EventArgs e)
149161
{
150-
ControlProperty controlProperty = new ControlProperty();
151-
controlProperty.Name = txtPropertyName.Text;
152-
controlProperty.DisplayNameKey = txtDisplayNameKey.Text;
153-
controlProperty.DescriptionNameKey = txtDescriptionKey.Text;
154-
controlProperty.Usage = (Enum.UsageType)ddUsage.SelectedItem;
155-
controlProperty.IsRequired = chkRequired.Checked;
156-
controlProperty.IsUsingTypeGroup = chkUseTypeGroup.Checked;
157-
controlProperty.TypeOrTypeGroup = ddOfType.SelectedValue.ToString();
158-
159-
ControlManifestHelper manifestHelper = new ControlManifestHelper();
160-
161-
if (newProperty)
162+
if (validatePropertyData())
162163
{
163-
manifestHelper.CreateNewProperty(manifestDetails, controlProperty);
164-
Routine_EditControl();
164+
ControlProperty controlProperty = new ControlProperty();
165+
controlProperty.Name = txtPropertyName.Text;
166+
controlProperty.DisplayNameKey = txtDisplayNameKey.Text;
167+
controlProperty.DescriptionNameKey = txtDescriptionKey.Text;
168+
controlProperty.Usage = (Enum.UsageType)ddUsage.SelectedItem;
169+
controlProperty.IsRequired = chkRequired.Checked;
170+
controlProperty.IsUsingTypeGroup = chkUseTypeGroup.Checked;
171+
controlProperty.TypeOrTypeGroup = ddOfType.SelectedValue.ToString();
172+
173+
ControlManifestHelper manifestHelper = new ControlManifestHelper();
174+
175+
if (newProperty)
176+
{
177+
manifestHelper.CreateNewProperty(manifestDetails, controlProperty);
178+
Routine_EditControl();
179+
}
180+
else
181+
{
182+
manifestDetails = manifestHelper.UpdatePropertyDetails(persistedPropertyName, manifestDetails, controlProperty);
183+
}
184+
185+
persistedPropertyName = controlProperty.Name;
186+
ParentControl.RefreshControlManifestDetails();
165187
}
166188
else
167189
{
168-
manifestDetails = manifestHelper.UpdatePropertyDetails(persistedPropertyName, manifestDetails, controlProperty);
190+
MessageBox.Show("The property entry is invalid. Please populate all required fields.", "Invalid Propert State", MessageBoxButtons.OK, MessageBoxIcon.Error);
169191
}
170-
171-
persistedPropertyName = controlProperty.Name;
172-
ParentControl.RefreshControlManifestDetails();
173192
}
174193

175194
private void chkUseTypeGroup_CheckedChanged(object sender, EventArgs e)

PCF-CustomControlBuilder.nuspec

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,30 @@
1616
<summary>Easily create, build and deployment solution for your custom control using PCF.</summary>
1717
<releaseNotes>
1818
---- NEW FEATURES ----
19-
1. Added "Existing Publisher" option
20-
2. Automatically detects if npm packages needs to be installed and prompts to run 'npm install'
19+
1. Separation of Display name and Control name for PCF Project initialization
20+
2. Ability to update control display name and description right from the tool after creation
21+
3. Full properties and type-group management
22+
4. Enable and Disable features
23+
5. Add or update Preview image with ease
24+
6. Added "Existing Solution" option
25+
7. Automatically detects if npm packages needs to be installed and prompts to run 'npm install'
26+
8. Ability to add solution Friendly name and Unique name
27+
9. Added solution package type option
28+
10. Build mode for creating a regular or optimized packages
2129

2230
---- UPDATES ----
23-
No updates
31+
1. UI Rearranged
32+
2. Automatically identify if node_modules are missing and runs 'npm install'
2433

2534
---- BUG FIXES ----
2635
None
36+
37+
Enhancements and Issues reported by the community fixed in this version:
38+
- #31: Add fields for control property (Rappen)
39+
- #35: Managed should be renamed to Release (Power-Maverick)
40+
- #46: Ability to select Managed/Unmanaged/Both (Power-Maverick)
41+
- #38: Use existing publisher option similar to use existing solution (OliverFlint)
42+
- #44: Create a new button to just install dependencies (Power-Maverick)
2743
</releaseNotes>
2844
<copyright>Copyright © Danish Naglekar</copyright>
2945
<tags>XrmToolBox, PCF, Power Apps, Power Apps Component Framework, PCF Builder</tags>

0 commit comments

Comments
 (0)