Skip to content

Commit 8170238

Browse files
committed
Last fixed and addition before Pre release V1.0.0-Beta
1 parent a16a644 commit 8170238

File tree

9 files changed

+23
-37
lines changed

9 files changed

+23
-37
lines changed

API/Graph/InteractiveComponents/Internal/EmbeddedWebUI.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
WindowStyle="ToolWindow"
99
Loaded="Window_Loaded"
1010
Closed="Window_Closed"
11-
Title="EmbeddedWebUiWindow" Height="450" Width="800">
11+
WindowStartupLocation="CenterOwner"
12+
Title="Login with Microsoft" Height="450" Width="800">
1213
<Grid>
1314
<WebBrowser x:Name="webBrowser"
1415
Navigating="WebBrowser_Navigating"/>

Caching/CacheHandler.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ public void WriteGraphCache()
133133
{
134134
new Thread(() =>
135135
{
136-
//TODO: Dont forget to set indenting to none on release.
137-
string JsonToWrite = JsonConvert.SerializeObject(Cache, Formatting.Indented);
136+
string JsonToWrite = JsonConvert.SerializeObject(Cache, Formatting.None);
138137
IO.JsonHandler.WriteJson(JsonToWrite, "graphcache.json");
139138
}).Start();
140139
}

Login/LoginWindow.xaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
6+
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
77
xmlns:local="clr-namespace:OneDrive_Cloud_Player.Login"
88
mc:Ignorable="d"
9-
Title="LoginWindow" Height="450" Width="800">
9+
WindowStartupLocation="CenterScreen"
10+
Title="Login" Height="450" Width="800">
11+
1012
<Window.DataContext>
11-
<local:LoginViewModel/>
13+
<local:LoginViewModel/>
1214
</Window.DataContext>
13-
15+
1416
<!--Applies the gradient background-->
1517
<Window.Background>
1618
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">

Main/MainWindow.xaml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
77
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
88
Title="OneDrive Cloud Player" Height="700" Width="1000"
9+
WindowStartupLocation="CenterScreen"
910
>
1011

1112

@@ -204,7 +205,7 @@
204205
FontWeight="Regular"
205206
Foreground="White"
206207

207-
Command="{Binding SettingsCommand}">
208+
Command="{Binding ReloadCommand}">
208209
<Button.Style>
209210
<Style TargetType="{x:Type Button}">
210211
<Setter Property="Background" Value="#1C262E"/>
@@ -506,33 +507,13 @@
506507
</Grid>
507508

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

511512
<i:Interaction.Triggers>
512513
<i:EventTrigger SourceName="GoToParentBox" EventName="MouseLeftButtonUp">
513-
<i:InvokeCommandAction Command="{Binding DataContext.ToParentFolderCommand, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
514+
<i:InvokeCommandAction Command="{Binding DataContext.ToParentFolderCommand, RelativeSource={RelativeSource AncestorType={x:Type Border}}}"/>
514515
</i:EventTrigger>
515516
</i:Interaction.Triggers>
516-
517-
<Button.Style>
518-
<Style TargetType="{x:Type Button}">
519-
<Setter Property="Background" Value="Transparent"/>
520-
<Setter Property="Template">
521-
<Setter.Value>
522-
<ControlTemplate TargetType="{x:Type Button}">
523-
<Border Background="{TemplateBinding Background}">
524-
<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
525-
</Border>
526-
</ControlTemplate>
527-
</Setter.Value>
528-
</Setter>
529-
<Style.Triggers>
530-
<Trigger Property="IsMouseOver" Value="True">
531-
<Setter Property="Background" Value="#414E58"/>
532-
</Trigger>
533-
</Style.Triggers>
534-
</Style>
535-
</Button.Style>
536517
<Grid>
537518
<Grid.ColumnDefinitions>
538519
<ColumnDefinition Width="50"/>
@@ -551,7 +532,7 @@
551532
FontWeight="Regular"
552533
Foreground="White"/>
553534
</Grid>
554-
</Button>
535+
</Grid>
555536
</Border>
556537

557538
<ListBox Grid.Row="3" x:Name="ExplorerListBox" ItemsSource="{Binding ExplorerItemsList}" SelectedItem="{Binding SelectedExplorerItem}" Background="Transparent" HorizontalAlignment="Stretch">

Main/MainWindowViewModel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ public MainWindowViewModel()
149149
ReloadCommand = new CommandHandler(ReloadCache, CanExecuteMethod);
150150
LogoutCommand = new CommandHandler(Logout, CanExecuteMethod);
151151
ToParentFolderCommand = new CommandHandler(ToParentFolder, CanExecuteMethod);
152-
GetProfileInfoCommand = new CommandHandler(GetProfileInfo, CanExecuteMethod);
152+
//GetProfileInfoCommand = new CommandHandler(GetProfileInfo, CanExecuteMethod);
153153
//GetProfileInfoCommand.Execute(null);
154154
// OnLoad runs the login and gets the shared drives
155155
GetUserInformation();
156156
}
157157

158158
public async void GetUserInformation()
159159
{
160-
CurrentUsername = "Hi, " (await graph.GetOneDriveUserInformationAsync()).GivenName;
160+
CurrentUsername = "Hi, " + (await graph.GetOneDriveUserInformationAsync()).GivenName;
161161
ProfileImage = await graph.GetOneDriveOwnerPhotoAsync();
162162
}
163163

@@ -275,6 +275,7 @@ public async void GetChildrenFomItem(object obj)
275275
}
276276
else
277277
{
278+
App.Current.MainWindow.Hide();
278279
OpenItemWithVideoPlayer(SelectedExplorerItem);
279280
}
280281
Console.WriteLine(" + Loaded children from folder item.");
@@ -315,9 +316,8 @@ private void ToParentFolder(object obj)
315316

316317

317318
/// <summary>
318-
/// Test code. Do not remove without asking @Tim Gels first.
319+
/// Changes XAML Elements on runtime.
319320
/// </summary>
320-
/// This method is created so i could test how to detect and change the personal user drive on runtime.
321321
/// <param name="value"></param>
322322
/// <param name="targetType"></param>
323323
/// <param name="parameter"></param>

OneDrive-Cloud-Player.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
33
<PropertyGroup>
4-
<OutputType>Exe</OutputType>
4+
<OutputType>WinExe</OutputType>
55
<TargetFramework>netcoreapp3.1</TargetFramework>
66
<RootNamespace>OneDrive_Cloud_Player</RootNamespace>
77
<UseWPF>true</UseWPF>
88
<UserSecretsId>1327468f-ef86-48f2-9afe-4d5f09ed837d</UserSecretsId>
99
<StartupObject></StartupObject>
1010
<SignAssembly>false</SignAssembly>
11+
<ApplicationIcon>appIcon.ico</ApplicationIcon>
1112
</PropertyGroup>
1213
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
1314
<DocumentationFile></DocumentationFile>

VLC/VideoPlayerWindow.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
BorderThickness="1"
1313
ResizeMode="CanResizeWithGrip"
1414
Background="Black"
15-
Title="OneDrive Cloud Player" Width="1280" Height="720" >
15+
WindowStartupLocation="CenterScreen"
16+
Title="Video Player" Width="1280" Height="720" >
1617

1718
<Window.Resources>
1819

VLC/VideoPlayerWindow.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ private void StopButton_Click(object sender, RoutedEventArgs e)
200200
protected override void OnClosed(EventArgs e)
201201
{
202202
this.DisposeVLC();
203+
App.Current.MainWindow.Show();
203204
}
204205

205206
/// <summary>

appIcon.ico

105 KB
Binary file not shown.

0 commit comments

Comments
 (0)