Skip to content

Commit

Permalink
Merge pull request #36 from Tx0actical/dev
Browse files Browse the repository at this point in the history
Latest release build
  • Loading branch information
Tx0actical authored Sep 4, 2023
2 parents b90adc2 + 62e5158 commit e0122f0
Show file tree
Hide file tree
Showing 935 changed files with 2,124 additions and 2,121 deletions.
Binary file modified .vs/Lambda/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file modified .vs/Lambda/v17/.futdcache.v2
Binary file not shown.
Binary file modified .vs/Lambda/v17/.suo
Binary file not shown.
Binary file modified .vs/ProjectEvaluation/lambda.metadata.v6.1
Binary file not shown.
Binary file modified .vs/ProjectEvaluation/lambda.projects.v6.1
Binary file not shown.
7 changes: 4 additions & 3 deletions Lambda/APIHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@ public async Task<APIResponse> UploadFileAsync (string filePath, CancellationTok
request.Headers.Add ("x-apikey", __privateAPIKey);
using var content = new MultipartFormDataContent();

using var fileStream = File.OpenRead(filePath);
var fileContent = new StreamContent(fileStream);
var fileContent = new StreamContent(File.OpenRead(filePath));
fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse ("application/octet-stream");

content.Add (fileContent, "file", Path.GetFileName (filePath));
request.Content = content;
var response = await ExecuteAsync(request, cancellationToken);

var responseContent = await response.Content.ReadAsStringAsync();

System.Diagnostics.Debug.WriteLine ("Raw response content: " + responseContent); // Debug

var apiResponse = JsonSerializer.Deserialize<APIResponse>(responseContent);

System.Diagnostics.Debug.WriteLine ("Deserialized ApiResponse in UploadFileAsync: " + JsonSerializer.Serialize (apiResponse));
System.Diagnostics.Debug.WriteLine ("Deserialized ApiResponse in UploadFileAsync: " + JsonSerializer.Serialize (apiResponse)); // Debug
apiResponse.IsSuccessStatusCode = response.IsSuccessStatusCode;
apiResponse.StatusCode = (int) response.StatusCode;

Expand Down
7 changes: 5 additions & 2 deletions Lambda/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ private void MainWindow_Activated (object sender, Microsoft.UI.Xaml.WindowActiva

// Navigation Helpers

private readonly List<(string Tag, Type Page)> __pages = new List<(string Tag, Type Page)> {
// Reference: https://learn.microsoft.com/en-us/windows/apps/design/controls/navigationview
private readonly List<(string Tag, Type Page)> __pages = new List<(string Tag, Type Page)> { // Reference: https://learn.microsoft.com/en-us/windows/apps/design/controls/navigationview
("Tag_HomePage", typeof(HomePage)),
("Tag_FileScanningPage", typeof(AdvancedScanningPage)),
("Tag_ScanHistoryPage", typeof(ScanHistoryPage)),
Expand Down Expand Up @@ -105,6 +104,8 @@ private void NavView_Navigate (string navItemTag, NavigationTransitionInfo trans
}
}

// START -> Helper Functions

private bool TryGoBack () {
// Reference: https://learn.microsoft.com/en-us/windows/apps/design/controls/navigationview
if (!ContentFrame.CanGoBack)
Expand Down Expand Up @@ -143,6 +144,8 @@ private void System_BackRequested (object sender, BackRequestedEventArgs e) {
}
}

// END -> Helper Functions

public void SetCurrentNavigationViewItem (NavigationViewItem item) {
if (item != null) {
string tag = item.Tag.ToString();
Expand Down
2 changes: 1 addition & 1 deletion Lambda/Pages/AccountPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Grid>
<ScrollViewer>
<StackPanel Orientation="Vertical" Width="Auto" Height="Auto" Margin="50">
<InfoBar IsOpen="True" IsClosable="False" Severity="Informational" Title="Information" Message="This feature is a work in progress." />
<InfoBar IsOpen="True" IsClosable="True" Severity="Informational" Title="Information" Message="This feature is a work in progress." />
<PersonPicture Initials="AP" Margin="0, 25"/>
<TextBlock Text="Welcome Amit Panghal!" Margin="0, 25" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<Button Style="{StaticResource AccentButtonStyle}" Content="Log Out" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0, 25" Click="LogOutButton_Click"/>
Expand Down
2 changes: 1 addition & 1 deletion Lambda/Pages/AdvancedScanningPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Grid>
<ScrollViewer>
<StackPanel x:Name="AdvScanStackPanel" Orientation="Vertical" Width="Auto" Height="Auto" Margin="50">
<InfoBar IsOpen="True" IsClosable="False" Severity="Informational" Title="Information" Message="This feature is a work in progress." />
<InfoBar IsOpen="True" IsClosable="True" Severity="Informational" Title="Information" Message="This feature is a work in progress." />
<Line Stroke="SteelBlue" X1="0" Y1="25" X2="10000" Y2="25" StrokeThickness="5"/>
<Button x:Name="PickAFileButton" Style="{StaticResource AccentButtonStyle}" Margin="0, 25" Content="Select Object" Height="44" Click="PickObjectButton_Click" HorizontalAlignment="Center"/>
<TextBlock x:Name="PickAFileOutputTextBlock" TextWrapping="Wrap" HorizontalAlignment="Center" Height="44"/>
Expand Down
1 change: 0 additions & 1 deletion Lambda/Pages/AdvancedScanningPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public sealed partial class AdvancedScanningPage : Page
public string __selectedFilePath;
private readonly DispatcherQueue __dispatcherQueue = DispatcherQueue.GetForCurrentThread();


public AdvancedScanningPage ()
{
this.InitializeComponent();
Expand Down
2 changes: 1 addition & 1 deletion Lambda/Pages/HelpPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Width="Auto" Height="Auto" Margin="50">
<InfoBar IsOpen="True" IsClosable="False" Severity="Error" Title="Error" Message="Feature not implemented." />
<InfoBar IsOpen="True" IsClosable="True" Severity="Error" Title="Error" Message="Feature not implemented." />
</StackPanel>
<!-- Main content -->
<Grid Grid.Row="0">
Expand Down
2 changes: 1 addition & 1 deletion Lambda/Pages/HomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</Grid.RowDefinitions>
<ScrollViewer>
<StackPanel Orientation="Vertical" Width="Auto" Height="Auto" Margin="50">
<InfoBar IsOpen="True" IsClosable="False" Severity="Warning" Title="Important" Message="This project is currently in development. If you have any feedback, post an issue on the official repo.">
<InfoBar IsOpen="True" IsClosable="True" Severity="Warning" Title="Important" Message="This project is currently in development. If you have any feedback, post an issue on the official repo.">
<InfoBar.ActionButton>
<HyperlinkButton Content="Issues" NavigateUri="https://github.com/Tx0actical/Lambda/issues" />
</InfoBar.ActionButton>
Expand Down
2 changes: 1 addition & 1 deletion Lambda/Pages/ResultsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Width="Auto" Height="Auto" Margin="50">
<InfoBar IsOpen="True" IsClosable="False" Severity="Error" Title="Error" Message="Feature not implemented." />
<InfoBar IsOpen="True" IsClosable="True" Severity="Error" Title="Error" Message="Feature not implemented." />
</StackPanel>


Expand Down
2 changes: 1 addition & 1 deletion Lambda/Pages/ScanHistoryPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Width="Auto" Height="Auto" Margin="50">
<InfoBar IsOpen="True" IsClosable="False" Severity="Error" Title="Error" Message="Feature not implemented." />
<InfoBar IsOpen="True" IsClosable="True" Severity="Error" Title="Error" Message="Feature not implemented." />
</StackPanel>
<!-- Main content -->
<Grid Grid.Row="0">
Expand Down
2 changes: 1 addition & 1 deletion Lambda/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Width="Auto" Height="Auto" Margin="50">
<InfoBar IsOpen="True" IsClosable="False" Severity="Error" Title="Error" Message="Feature not implemented." />
<InfoBar IsOpen="True" IsClosable="True" Severity="Error" Title="Error" Message="Feature not implemented." />
</StackPanel>
<!-- Main content -->
<Grid Grid.Row="0">
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit e0122f0

Please sign in to comment.