Skip to content

Commit

Permalink
Add pagination.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Sep 9, 2020
1 parent 64a7e94 commit 1aa4a26
Show file tree
Hide file tree
Showing 15 changed files with 549 additions and 357 deletions.
12 changes: 11 additions & 1 deletion Desktop.Win/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace Remotely.Desktop.Win
{
public class Program
{
public static ManualResetEvent AppExitEvent { get; } = new ManualResetEvent(false);
public static Form BackgroundForm { get; private set; }
private static CasterSocket CasterSocket { get; set; }
private static Conductor Conductor { get; set; }
Expand Down Expand Up @@ -71,7 +72,16 @@ await Task.Run(async () =>
StartUiThreads(() => new MainWindow());
}

Thread.Sleep(Timeout.Infinite);
App.Current.Dispatcher.Invoke(() =>
{
App.Current.Exit += (sender, exitArgs) =>
{
AppExitEvent.Set();
};
});


AppExitEvent.WaitOne(Timeout.Infinite);
}
catch (Exception ex)
{
Expand Down
3 changes: 2 additions & 1 deletion Desktop.Win/Services/ShutdownServiceWin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public async Task Shutdown()
await casterSocket.DisconnectAllViewers();
System.Windows.Forms.Application.Exit();
App.Current.Shutdown();
Environment.Exit(0);
// TODO: Still needed?
//Environment.Exit(0);
}
}
}
22 changes: 17 additions & 5 deletions Server/Pages/_DataGrid.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,41 @@
<div id="deviceGridInnerWrapper">
<div id="gridControlsWrapper">
<div>
<div class="mb-2">
<div>
<label>Device Group:</label>
<select id="deviceGroupSelect" asp-items="Model.DeviceGroups" class="form-control" style="width: 200px">
<option value="">All</option>
<option value="">Ungrouped</option>
</select>
</div>
<div class="custom-control custom-checkbox">
<div class="custom-control custom-checkbox mt-2">
<input id="hideOfflineDevicesCheckbox" type="checkbox" class="custom-control-input" checked />
<label class="custom-control-label" for="hideOfflineDevicesCheckbox">Hide offline devices</label>
</div>
</div>
<div>
<div class="mb-2">
<div>
<button id="startRemoteControlButton" class="btn btn-sm btn-secondary mr-1">Remote Control</button>
<button id="toggleAllDevices" class="btn btn-sm btn-secondary">Select All</button>
</div>

<div>
<div class="mt-2">
<span class="mr-1">Filter:</span>
<input id="gridFilter" />
</div>

<div class="mt-2" style="white-space: nowrap">
<button id="leftPaginationButton" class="btn btn-sm btn-secondary">
<i class="fa fa-chevron-left"></i>
</button>
<span class="small">Page</span>
<input id="currentPageInput" style="width:75px" pattern="[0-9]" />
<span class="small">of</span>
<span id="totalPagesSpan"></span>
<button id="rightPaginationButton" class="btn btn-sm btn-secondary">
<i class="fa fa-chevron-right"></i>
</button>
</div>
</div>
</div>
<div style="overflow-y: auto">
Expand All @@ -52,6 +65,5 @@
</tbody>
</table>
</div>

</div>
</div>
198 changes: 124 additions & 74 deletions Server/wwwroot/scripts/Main/DataGrid.js

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

Loading

0 comments on commit 1aa4a26

Please sign in to comment.