Skip to content

Commit

Permalink
Implemented "view job details"
Browse files Browse the repository at this point in the history
  • Loading branch information
nakov committed Dec 18, 2020
1 parent 0ec8df6 commit ff7beb2
Show file tree
Hide file tree
Showing 12 changed files with 750 additions and 87 deletions.
3 changes: 3 additions & 0 deletions CDN-Video-Uploader.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
<Compile Update="Forms\FormVideoUploader.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Forms\FormViewJob.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
</Project>
124 changes: 67 additions & 57 deletions Forms/FormVideoUploader.Designer.cs

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

26 changes: 25 additions & 1 deletion Forms/FormVideoUploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ private void AppendFileForProcessing(string fileName)
Description = ftpPath + fileInfo.Name + " (" + fileSizeAsText + ")",
PercentsDone = 0,
Actions = actions,
ActiveActionIndex = 0,
VideoURL = hlsVideoURL
};
job.ExecutionStateChanged += Job_ExecutionStateChanged;
Expand Down Expand Up @@ -570,6 +569,14 @@ private void LogError(string errMsg, string errTitle = "Error", int indentTabs =

private void dataGridViewCompletedJobs_CellClick(object sender, DataGridViewCellEventArgs e)
{
var senderGrid = (DataGridView)sender;
if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
{
Job job = this.completedJobs[e.RowIndex];
ViewJobDetails(job);
return;
}

if (e.RowIndex >= 0 && e.RowIndex < this.completedJobs.Count)
{
string hlsVideoURL = this.completedJobs[e.RowIndex].VideoURL;
Expand All @@ -586,5 +593,22 @@ private void buttonSettings_Click(object sender, EventArgs e)
FormAppSettings formSettings = new FormAppSettings();
formSettings.ShowDialog();
}

private void dataGridViewActiveJobs_CellContentClick(
object sender, DataGridViewCellEventArgs e)
{
var senderGrid = (DataGridView)sender;
if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
{
Job job = this.activeJobsQueue[e.RowIndex];
ViewJobDetails(job);
}
}

private void ViewJobDetails(Job job)
{
FormViewJob formViewJob = new FormViewJob(job);
formViewJob.ShowDialog();
}
}
}
6 changes: 6 additions & 0 deletions Forms/FormVideoUploader.resx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,13 @@
<metadata name="pictureBoxUploadImage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ColumnDetails.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ColumnResult.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ColumnCompletedJobDetails.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
Loading

0 comments on commit ff7beb2

Please sign in to comment.