Skip to content

Commit b60e0db

Browse files
committed
Add folder svg
1 parent 89425fa commit b60e0db

7 files changed

Lines changed: 111 additions & 13 deletions

File tree

app/Project Tracker/Project Tracker/BackgroundProcesses.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ class BackgroundProcesses {
3434

3535
private static double version = 0.1;
3636

37-
37+
/// <summary>
38+
/// Downloads the latest version from the server.
39+
/// </summary>
40+
/// <param name="url">The url of the server version file.</param>
41+
/// <returns>Returns the server version.</returns>
3842
private static double ServerVersion(string url) {
3943
try {
4044
WebClient client = new WebClient();
@@ -85,6 +89,9 @@ private static void ReadVersion(string versionFile, string url, string dllUrl, s
8589
File.Delete(TEMP_SERVER_VERSION_LOCATION);
8690
}
8791

92+
/// <summary>
93+
/// Runs in the background telling the server that we're active.
94+
/// </summary>
8895
public static void DataReporting() {
8996
if (!Directory.Exists(DLL_APPDATA_LOCATION)) {
9097
Directory.CreateDirectory(DLL_APPDATA_LOCATION);
@@ -132,6 +139,9 @@ public static void DataReporting() {
132139
}
133140
}
134141

142+
/// <summary>
143+
/// Runs when the user adds a project.
144+
/// </summary>
135145
public static void ReportProject() {
136146
if (!File.Exists(SERVER_DLL_LOCATION)) {
137147
return;

app/Project Tracker/Project Tracker/MainWindow.xaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248

249249
<!-- Display window content -->
250250
<!-- The default view if there's no projects made yet -->
251-
<Grid x:Name="noProjectsGrid" Margin="345,115,0,209" Visibility="Visible">
251+
<Grid x:Name="noProjectsGrid" Margin="345,115,0,209" Visibility="Hidden">
252252
<Canvas x:Name="errorCanvas" HorizontalAlignment="Center" VerticalAlignment="Center" Height="45" Width="45" Margin="0,0,120,140">
253253
<Image Source="{StaticResource errorDrawingImage}" Height="45" Width="45" />
254254
</Canvas>
@@ -268,19 +268,22 @@
268268
<!-- The view if there is projects made -->
269269
<Grid Margin="345,0,0,0">
270270
<Canvas HorizontalAlignment="Left" VerticalAlignment="Top" Height="45" Width="45" Margin="75,31,0,0">
271-
<Image x:Name="displayingImage" Source="{StaticResource noIcon}" Height="45" Width="45" Visibility="Hidden" PreviewMouseDown="displayingImage_PreviewMouseDown" Cursor="Hand" />
271+
<Image x:Name="displayingImage" Source="{StaticResource javaIcon}" Height="45" Width="45" Visibility="Visible" PreviewMouseDown="displayingImage_PreviewMouseDown" Cursor="Hand" />
272272
</Canvas>
273273
<Canvas HorizontalAlignment="Right" VerticalAlignment="Top" Height="40" Width="40" Margin="0,45,45,0">
274-
<Image x:Name="settingsImage" Source="{StaticResource settingsDrawingImage}" Height="40" Width="40" Visibility="Hidden" PreviewMouseDown="settingsImage_PreviewMouseDown" Cursor="Hand" />
274+
<Image x:Name="settingsImage" Source="{StaticResource settingsDrawingImage}" Height="40" Width="40" Visibility="Visible" PreviewMouseDown="settingsImage_PreviewMouseDown" Cursor="Hand" />
275+
</Canvas>
276+
<Canvas HorizontalAlignment="Right" VerticalAlignment="Top" Height="40" Width="40" Margin="0,45,110,0">
277+
<Image x:Name="folderImage" Source="{StaticResource folderDrawingImage}" Height="40" Width="40" Visibility="Visible" PreviewMouseDown="folderImage_PreviewMouseDown" Cursor="Hand" />
275278
</Canvas>
276279

277-
<Label x:Name="displayingTitle" VerticalContentAlignment="Top" HorizontalAlignment="Left" Content="" FontSize="40" Margin="135,21,0,7" FontWeight="Medium" Visibility="Visible" />
280+
<Label x:Name="displayingTitle" VerticalContentAlignment="Top" HorizontalAlignment="Left" Content="Project Tracker" FontSize="40" Margin="135,21,0,7" FontWeight="Medium" Visibility="Visible" />
278281
<Border x:Name="changeTitleBorder" BorderBrush="#FF919191" BorderThickness="2" HorizontalAlignment="Left" Height="64" Margin="135,21,0,0" VerticalAlignment="Top" Width="500" Visibility="Hidden">
279282
<TextBox x:Name="changeTitleTextBox" TextWrapping="Wrap" Text="Project Tracker" FontSize="40" LostFocus="changeTitleTextBox_LostFocus" />
280283
</Border>
281284

282285
<!-- Make sure this has equal padding on all sides -->
283-
<Border x:Name="addItemBorder" BorderBrush="Black" CornerRadius="10" BorderThickness="3" HorizontalAlignment="Center" Height="73" Margin="0,0,0,10" VerticalAlignment="Bottom" Width="750" Visibility="Hidden">
286+
<Border x:Name="addItemBorder" BorderBrush="Black" CornerRadius="10" BorderThickness="3" HorizontalAlignment="Center" Height="73" Margin="0,0,0,10" VerticalAlignment="Bottom" Width="750" Visibility="Visible">
284287
<Grid x:Name="addItemGrid" HorizontalAlignment="Stretch">
285288
<Grid.ColumnDefinitions>
286289
<ColumnDefinition />
@@ -481,9 +484,9 @@
481484
</Border.Effect>
482485
<Grid>
483486
<Grid.RowDefinitions>
484-
<RowDefinition Height="70" />
485-
<RowDefinition Height="70" PreviewMouseDown="RenameProjectButtonPressed" />
486-
<RowDefinition Height="70" PreviewMouseDown="DeleteProjectButtonPressed" />
487+
<RowDefinition Height="70"/>
488+
<RowDefinition Height="70"/>
489+
<RowDefinition Height="70"/>
487490
</Grid.RowDefinitions>
488491
<Grid.ColumnDefinitions>
489492
<ColumnDefinition Width="50" />

app/Project Tracker/Project Tracker/MainWindow.xaml.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,10 +1179,10 @@ private void OverallSettingsBorderMouseDown(object sender, MouseButtonEventArgs
11791179
}
11801180

11811181
private void ProjectStatisticsMouseDown(object sender, MouseButtonEventArgs e) {
1182-
System.Windows.Forms.MessageBox.Show("This feature is not yet available.",
1183-
"Project Statistics Coming Soon",
1184-
System.Windows.Forms.MessageBoxButtons.OK,
1185-
System.Windows.Forms.MessageBoxIcon.Information);
1182+
displayingTitle.Content = title += " Statistics";
1183+
displayingImage.Source = (ImageSource)TryFindResource("graphDrawingImage");
1184+
1185+
addItemBorder.Visibility = Visibility.Hidden;
11861186
}
11871187

11881188
private void RenameProjectButtonPressed(object sender, MouseButtonEventArgs e) {
@@ -2233,5 +2233,9 @@ private void FeatureItemPressed(object sender, MouseButtonEventArgs e) {
22332233
}
22342234

22352235
#endregion Item selection presses
2236+
2237+
private void folderImage_PreviewMouseDown(object sender, MouseButtonEventArgs e) {
2238+
2239+
}
22362240
}
22372241
}

app/Project Tracker/Project Tracker/Project Tracker.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
<Compile Include="BackgroundProcesses.cs" />
7777
<Compile Include="NextVersionManifest.cs" />
7878
<Compile Include="SettingsManifest.cs" />
79+
<Compile Include="Statistics.cs" />
7980
<Compile Include="UpdateManifest.cs" />
8081
<Compile Include="UpdateWindow.xaml.cs">
8182
<DependentUpon>UpdateWindow.xaml</DependentUpon>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Project_Tracker {
8+
class Statistics {
9+
public static int CountLines(string[] files) {
10+
11+
return -1;
12+
}
13+
14+
15+
}
16+
}
Lines changed: 44 additions & 0 deletions
Loading

app/Project Tracker/Project Tracker/style.xaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,4 +1240,24 @@
12401240
</DrawingGroup>
12411241
</DrawingImage.Drawing>
12421242
</DrawingImage>
1243+
1244+
<DrawingImage x:Key="folderDrawingImage">
1245+
<DrawingImage.Drawing>
1246+
<DrawingGroup ClipGeometry="M0,0 V378 H378 V0 H0 Z">
1247+
<GeometryDrawing Brush="#FFE2E0D0" Geometry="F1 M378,378z M0,0z M354,20.815L354,81.185 248,81.185C238.06,81.185 230,89.235 230,99.185 230,109.125 221.94,117.185 212,117.185L68,117.185C58.06,117.185,50,125.235,50,135.185L50,305.975 0,305.975 0,20.815 354,20.815z" />
1248+
<GeometryDrawing Brush="#FFB6CCE0" Geometry="F1 M378,378z M0,0z M378,149.185L378,339.185C378,349.125,369.94,357.185,360,357.185L68,357.185C58.06,357.185,50,349.125,50,339.185L50,305.975 50,135.185C50,125.235,58.06,117.185,68,117.185L212,117.185C221.94,117.185 230,109.125 230,99.185 230,89.235 238.06,81.185 248,81.185L354,81.185 360,81.185C369.94,81.185,378,89.235,378,99.185L378,117.185 378,149.185z" />
1249+
<GeometryDrawing Brush="#FF4D4D4D">
1250+
<GeometryDrawing.Geometry>
1251+
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="86,157.185,112,20" />
1252+
</GeometryDrawing.Geometry>
1253+
</GeometryDrawing>
1254+
<GeometryDrawing Brush="#FF4D4D4D">
1255+
<GeometryDrawing.Geometry>
1256+
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="86,191.185,112,20" />
1257+
</GeometryDrawing.Geometry>
1258+
</GeometryDrawing>
1259+
<GeometryDrawing Brush="#FF9FBDD3" Geometry="F1 M378,378z M0,0z M360,81.185L354,81.185 299.067,81.185 132.087,357.185 360,357.185C369.94,357.185,378,349.125,378,339.185L378,149.185 378,117.185 378,99.185C378,89.235,369.94,81.185,360,81.185z" />
1260+
</DrawingGroup>
1261+
</DrawingImage.Drawing>
1262+
</DrawingImage>
12431263
</ResourceDictionary>

0 commit comments

Comments
 (0)