Skip to content

Commit

Permalink
Last fixed and addition before Pre release V1.0.0-Beta
Browse files Browse the repository at this point in the history
  • Loading branch information
TimGels committed Jun 21, 2020
1 parent a16a644 commit 8170238
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 37 deletions.
3 changes: 2 additions & 1 deletion API/Graph/InteractiveComponents/Internal/EmbeddedWebUI.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
WindowStyle="ToolWindow"
Loaded="Window_Loaded"
Closed="Window_Closed"
Title="EmbeddedWebUiWindow" Height="450" Width="800">
WindowStartupLocation="CenterOwner"
Title="Login with Microsoft" Height="450" Width="800">
<Grid>
<WebBrowser x:Name="webBrowser"
Navigating="WebBrowser_Navigating"/>
Expand Down
3 changes: 1 addition & 2 deletions Caching/CacheHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ public void WriteGraphCache()
{
new Thread(() =>
{
//TODO: Dont forget to set indenting to none on release.
string JsonToWrite = JsonConvert.SerializeObject(Cache, Formatting.Indented);
string JsonToWrite = JsonConvert.SerializeObject(Cache, Formatting.None);
IO.JsonHandler.WriteJson(JsonToWrite, "graphcache.json");
}).Start();
}
Expand Down
10 changes: 6 additions & 4 deletions Login/LoginWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:OneDrive_Cloud_Player.Login"
mc:Ignorable="d"
Title="LoginWindow" Height="450" Width="800">
WindowStartupLocation="CenterScreen"
Title="Login" Height="450" Width="800">

<Window.DataContext>
<local:LoginViewModel/>
<local:LoginViewModel/>
</Window.DataContext>

<!--Applies the gradient background-->
<Window.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
Expand Down
29 changes: 5 additions & 24 deletions Main/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
Title="OneDrive Cloud Player" Height="700" Width="1000"
WindowStartupLocation="CenterScreen"
>


Expand Down Expand Up @@ -204,7 +205,7 @@
FontWeight="Regular"
Foreground="White"

Command="{Binding SettingsCommand}">
Command="{Binding ReloadCommand}">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="#1C262E"/>
Expand Down Expand Up @@ -506,33 +507,13 @@
</Grid>

<Border x:Name="GoToParentBox" Grid.Row="2" BorderThickness="0, 0, 0, 2" BorderBrush="#1AFFFFFF" HorizontalAlignment="Stretch">
<Button Padding="0" Margin="0">
<Grid Margin="0">

<i:Interaction.Triggers>
<i:EventTrigger SourceName="GoToParentBox" EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding DataContext.ToParentFolderCommand, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
<i:InvokeCommandAction Command="{Binding DataContext.ToParentFolderCommand, RelativeSource={RelativeSource AncestorType={x:Type Border}}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>

<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#414E58"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
Expand All @@ -551,7 +532,7 @@
FontWeight="Regular"
Foreground="White"/>
</Grid>
</Button>
</Grid>
</Border>

<ListBox Grid.Row="3" x:Name="ExplorerListBox" ItemsSource="{Binding ExplorerItemsList}" SelectedItem="{Binding SelectedExplorerItem}" Background="Transparent" HorizontalAlignment="Stretch">
Expand Down
8 changes: 4 additions & 4 deletions Main/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ public MainWindowViewModel()
ReloadCommand = new CommandHandler(ReloadCache, CanExecuteMethod);
LogoutCommand = new CommandHandler(Logout, CanExecuteMethod);
ToParentFolderCommand = new CommandHandler(ToParentFolder, CanExecuteMethod);
GetProfileInfoCommand = new CommandHandler(GetProfileInfo, CanExecuteMethod);
//GetProfileInfoCommand = new CommandHandler(GetProfileInfo, CanExecuteMethod);
//GetProfileInfoCommand.Execute(null);
// OnLoad runs the login and gets the shared drives
GetUserInformation();
}

public async void GetUserInformation()
{
CurrentUsername = "Hi, " (await graph.GetOneDriveUserInformationAsync()).GivenName;
CurrentUsername = "Hi, " + (await graph.GetOneDriveUserInformationAsync()).GivenName;
ProfileImage = await graph.GetOneDriveOwnerPhotoAsync();
}

Expand Down Expand Up @@ -275,6 +275,7 @@ public async void GetChildrenFomItem(object obj)
}
else
{
App.Current.MainWindow.Hide();
OpenItemWithVideoPlayer(SelectedExplorerItem);
}
Console.WriteLine(" + Loaded children from folder item.");
Expand Down Expand Up @@ -315,9 +316,8 @@ private void ToParentFolder(object obj)


/// <summary>
/// Test code. Do not remove without asking @Tim Gels first.
/// Changes XAML Elements on runtime.
/// </summary>
/// This method is created so i could test how to detect and change the personal user drive on runtime.
/// <param name="value"></param>
/// <param name="targetType"></param>
/// <param name="parameter"></param>
Expand Down
3 changes: 2 additions & 1 deletion OneDrive-Cloud-Player.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>OneDrive_Cloud_Player</RootNamespace>
<UseWPF>true</UseWPF>
<UserSecretsId>1327468f-ef86-48f2-9afe-4d5f09ed837d</UserSecretsId>
<StartupObject></StartupObject>
<SignAssembly>false</SignAssembly>
<ApplicationIcon>appIcon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile></DocumentationFile>
Expand Down
3 changes: 2 additions & 1 deletion VLC/VideoPlayerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
BorderThickness="1"
ResizeMode="CanResizeWithGrip"
Background="Black"
Title="OneDrive Cloud Player" Width="1280" Height="720" >
WindowStartupLocation="CenterScreen"
Title="Video Player" Width="1280" Height="720" >

<Window.Resources>

Expand Down
1 change: 1 addition & 0 deletions VLC/VideoPlayerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ private void StopButton_Click(object sender, RoutedEventArgs e)
protected override void OnClosed(EventArgs e)
{
this.DisposeVLC();
App.Current.MainWindow.Show();
}

/// <summary>
Expand Down
Binary file added appIcon.ico
Binary file not shown.

0 comments on commit 8170238

Please sign in to comment.