Skip to content

Commit

Permalink
Added option to no ask for execute options
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Sep 16, 2024
1 parent d6cb541 commit f32ef6d
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 123 deletions.
1 change: 1 addition & 0 deletions BulkDataUpdater/AppCode/BDUJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public class JobExecuteOptions
public bool BypassSync { get; set; } = false;
public bool BypassAsync { get; set; } = false;
public List<Guid> BypassSteps { get; set; } = new List<Guid>();
public bool DontAskOptions { get; set; } = false;

internal int DelayCurrent = 0;
internal bool DelayNow = false;
Expand Down
185 changes: 100 additions & 85 deletions BulkDataUpdater/BDU.Designer.cs

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion BulkDataUpdater/BDU.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,17 +298,21 @@ private void InitializeTab()
if (tabControl1.SelectedTab == tabUpdate)
{
SetUpdateFromJob(job.Update);
chkAskForExecuteOptions.Visible = job.Update.ExecuteOptions.DontAskOptions;
}
else if (tabControl1.SelectedTab == tabAssign)
{
SetAssignFromJob(job.Assign);
chkAskForExecuteOptions.Visible = job.Assign.ExecuteOptions.DontAskOptions;
}
else if (tabControl1.SelectedTab == tabSetState)
{
SetSetStateFromJob(job.SetState);
chkAskForExecuteOptions.Visible = job.SetState.ExecuteOptions.DontAskOptions;
}
else if (tabControl1.SelectedTab == tabDelete)
{
chkAskForExecuteOptions.Visible = job.Delete.ExecuteOptions.DontAskOptions;
}
btnExecute.Text = tabControl1.SelectedTab.Name.Replace("tab", "");
working = tempworker;
Expand Down Expand Up @@ -701,10 +705,13 @@ internal EntityMetadata GetEntity(string entityname)
private void btnExecute_Click(object sender, EventArgs e)
{
var jobaction = GetJobAction();
if (Execute.Show(this, jobaction, job.SupportMessages) == DialogResult.OK)
if ((jobaction.ExecuteOptions.DontAskOptions && !chkAskForExecuteOptions.Checked) ||
Execute.Show(this, jobaction, job.SupportMessages) == DialogResult.OK)
{
ExecuteAction(jobaction);
}
chkAskForExecuteOptions.Visible = jobaction.ExecuteOptions.DontAskOptions;
chkAskForExecuteOptions.Checked = false;
}

private void btnGetRecords_Click(object sender, EventArgs e)
Expand Down
8 changes: 4 additions & 4 deletions BulkDataUpdater/BDU.resx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC0
KAAAAk1TRnQBSQFMAwEBAAFIAQgBSAEIAVABAAFQAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABQAEB
KAAAAk1TRnQBSQFMAwEBAAFgAQgBYAEIAVABAAFQAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABQAEB
AgABUAMAAQEBAAEgBgABkAEB/wD/AP8A/wD/ALYAA0YBgAM6AWD/AP8A/wD/APgAA0sBjwMAAf8DWQHv
AzoBYP8A/wD/AP8A8AADRgGAAwAB/wMAAf8DAAH/AwAB/wMqAUD/AP8A/wD/AOgAA0ABcAMAAf8DAAH/
AwAB/wMAAf8DAAH/AwAB/wMqAUD/AP8A/wD/AOAAA0YBgAMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA
Expand Down Expand Up @@ -679,12 +679,12 @@
cugAazKtOreIpfrMZ8HuixdlZt7sZ6j/zwSVGTSAgQEAOQ3ecapIcecAAAAASUVORK5CYII=
</value>
</data>
<metadata name="xrmRecordAssign.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>622, 10</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>761, 5</value>
</metadata>
<metadata name="xrmRecordAssign.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>622, 10</value>
</metadata>
<metadata name="xrmRecordAttribute.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>339, 11</value>
</metadata>
Expand Down
73 changes: 44 additions & 29 deletions BulkDataUpdater/Forms/Execute.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion BulkDataUpdater/Forms/Execute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public Execute()
BypassCustom = chkBypassPlugins.Checked,
BypassSync = chkBypassSync.Checked,
BypassAsync = chkBypassAsync.Checked,
BypassSteps = GetStepGuids()
BypassSteps = GetStepGuids(),
DontAskOptions = chkDontAskNext.Checked
};

private List<Guid> GetStepGuids()
Expand Down
3 changes: 0 additions & 3 deletions BulkDataUpdater/Forms/Execute.resx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,4 @@
hA6h2phE/fFj2lH/r0U7Slc2eBC212JwSqYbxKquMft/8uj+AeDYsSCysBvqAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

0 comments on commit f32ef6d

Please sign in to comment.