Commit 957ec505 authored by shubham's avatar shubham

Wrapping up changes

parent 42e95ea0
......@@ -45,7 +45,7 @@ namespace Personal_Insight.ComputeProduct
string[] folders = Directory.GetDirectories(productFolderPath);
foreach(String folder in folders)
{
siteList.Add(new Site(getSiteName(folder)));
siteList.Add(new Site(getSiteName(folder),++count));
}
page.enterLog("Logged " + siteList.Count + " Classic Sites!");
......@@ -63,15 +63,19 @@ namespace Personal_Insight.ComputeProduct
return pathName;
}
private int count = 0;
public class Site
{
public int Count { get; set; }
public String siteName { get; set; }
public String siteURL { get; set; }
public Site(string siteName)
public Site(string siteName, int count)
{
this.siteName = siteName;
this.siteURL = "https://sites.google.com/site/" + siteName;
Count = count;
}
}
}
......
......@@ -68,6 +68,15 @@ namespace Personal_Insight.ComputeProduct
}
}
}
foreach(Contact contact in contactsList.ToList())
{
if (contact.Name.Trim().Equals(""))
{
contactsList.Remove(contact);
}
}
}
public class Contact
......
......@@ -48,17 +48,17 @@
<Button x:Name="open_folder_btn" Content="Select folder" Height="Auto" Margin="20,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="50,15" Click="btnClick_openFile" Grid.Column="1"/>
</Grid>
<ListView x:Name="listView" Margin="0,25,0,0" Background="#FF646464" Padding="50" Grid.Row="2" HorizontalAlignment="Center" SelectionMode="Single" IsTextSearchEnabled="False">
<ListView x:Name="listView" Margin="0,25,0,0" Background="#FF646464" Padding="50" Grid.Row="2" HorizontalAlignment="Center" SelectionMode="Single" IsTextSearchEnabled="False" VerticalAlignment="Center">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0">
<Image x:Name="itemImage" Margin="200,5,20,5" Source="{Binding ImageResource}" Width="32" Height="32"/>
<Image x:Name="itemImage" Margin="150,5,20,5" Source="{Binding ImageResource}" Width="32" Height="32"/>
<TextBlock Text="{Binding ProductName}" TextWrapping="Wrap" FontFamily="Microsoft YaHei UI Light" FontSize="16" Foreground="#DDE2E2E2" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" TextAlignment="Left" Width="400" Grid.Column="1" Height="Auto"/>
<TextBlock Text="{Binding ProductFolderPath}" TextWrapping="Wrap" FontFamily="Microsoft YaHei UI Light" FontSize="14" Foreground="#DDA4A4A4" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" TextAlignment="Left" Width="500" Grid.Column="2" Height="Auto"/>
<Image Source="{Binding VerifyModuleImage}" Width="32" Height="32"/>
<TextBlock Text="{Binding VerifyModuleText}" TextWrapping="Wrap" FontFamily="Microsoft YaHei UI Light" FontSize="14" Foreground="#DDA4A4A4" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,200,0" TextAlignment="Left" Width="Auto" Grid.Column="2" Height="Auto"/>
<TextBlock Text="{Binding VerifyModuleText}" TextWrapping="Wrap" FontFamily="Microsoft YaHei UI Light" FontSize="14" Foreground="#DDA4A4A4" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,150,0" TextAlignment="Left" Width="Auto" Grid.Column="2" Height="Auto"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
......
......@@ -97,6 +97,94 @@
</Grid>
<Separator Height="2" Grid.Row="2" Background="#3FA0A0A0"/>
<DataGrid x:Name="dataGrid" AlternatingRowBackground="#33000000" CanUserAddRows="False" AutoGenerateColumns="False" Grid.Row="3" Background="#00000000" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="20" FontSize="20" BorderBrush="#00000000" Foreground="#00000000">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Margin" Value="25" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="25"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border Padding="{TemplateBinding Padding}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" SnapsToDevicePixels="True">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Focusable="False" IsManipulationEnabled="False"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Count" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Count}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Site Name" Width="*" CanUserSort="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=siteName}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Site URL" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=siteURL}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Visit Link" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9">
<Hyperlink Click="onClickHyperLink">
Web Site
</Hyperlink>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</ScrollViewer>
......
using Personal_Insight.Models;
using Personal_Insight.ComputeProduct;
using Personal_Insight.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
......@@ -26,11 +27,14 @@ namespace Personal_Insight.Pages.ModelPages
private GoogleProductModel googleProduct;
private double takeoutSize = 0;
private String takeoutSizeType;
private Classic_Sites productObject;
public Page_Classic_Sites(GoogleProductModel googleProduct)
{
this.googleProduct = googleProduct;
InitializeComponent();
productObject = (Classic_Sites)googleProduct.ProductObject;
dataGrid.ItemsSource = productObject.siteList;
}
private void Window_ContentRendered(object sender, RoutedEventArgs e)
......@@ -67,6 +71,12 @@ namespace Personal_Insight.Pages.ModelPages
}
private void onClickHyperLink(object sender, RoutedEventArgs e)
{
var URL = ((Classic_Sites.Site)((Hyperlink)e.Source).DataContext).siteURL;
System.Diagnostics.Process.Start(URL);
}
private void openFolderClick(object sender, RoutedEventArgs e)
{
Process.Start(googleProduct.ProductFolderPath);
......
......@@ -97,6 +97,81 @@
</Grid>
<Separator Height="2" Grid.Row="2" Background="#3FA0A0A0"/>
<DataGrid x:Name="dataGrid" AlternatingRowBackground="#33000000" CanUserAddRows="False" AutoGenerateColumns="False" Grid.Row="3" Background="#00000000" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="20" FontSize="20" BorderBrush="#00000000" Foreground="#00000000">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Margin" Value="25" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="25"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border Padding="{TemplateBinding Padding}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" SnapsToDevicePixels="True">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Focusable="False" IsManipulationEnabled="False"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Printer Name" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=printername}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Owner Name" Width="*" CanUserSort="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=ownername}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Owner Email" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=owneremail}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</ScrollViewer>
......
using Personal_Insight.Models;
using Personal_Insight.ComputeProduct;
using Personal_Insight.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
......@@ -26,11 +27,14 @@ namespace Personal_Insight.Pages.ModelPages
private GoogleProductModel googleProduct;
private double takeoutSize = 0;
private String takeoutSizeType;
private Cloud_Print productObject;
public Page_Cloud_Print(GoogleProductModel googleProduct)
{
this.googleProduct = googleProduct;
InitializeComponent();
productObject = (Cloud_Print)googleProduct.ProductObject;
dataGrid.ItemsSource = productObject.printerList;
}
private void Window_ContentRendered(object sender, RoutedEventArgs e)
......
......@@ -97,6 +97,83 @@
</Grid>
<Separator Height="2" Grid.Row="2" Background="#3FA0A0A0"/>
<DataGrid x:Name="dataGrid" AlternatingRowBackground="#33000000" CanUserAddRows="False" AutoGenerateColumns="False" Grid.Row="3" Background="#00000000" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="20" FontSize="20" BorderBrush="#00000000" Foreground="#00000000">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Margin" Value="25" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="25"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border Padding="{TemplateBinding Padding}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" SnapsToDevicePixels="True">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Focusable="False" IsManipulationEnabled="False"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Name" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Phone Type" Width="*" CanUserSort="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Phone1_Type }" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Phone Numner" Width="*" CanUserSort="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Phone1_Value }" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</ScrollViewer>
......
using Personal_Insight.Models;
using Personal_Insight.ComputeProduct;
using Personal_Insight.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
......@@ -26,15 +27,26 @@ namespace Personal_Insight.Pages.ModelPages
private GoogleProductModel googleProduct;
private double takeoutSize = 0;
private String takeoutSizeType;
private Contacts productObject;
public Page_Contacts(GoogleProductModel googleProduct)
{
this.googleProduct = googleProduct;
InitializeComponent();
productObject = (Contacts)googleProduct.ProductObject;
}
private void Window_ContentRendered(object sender, RoutedEventArgs e)
{
var collection = new List<Contacts.Contact>();
for (int i = 0; i < 50; i++)
{
collection.Add(productObject.contactsList.ElementAt(i));
}
dataGrid.ItemsSource = collection;
takeoutSize = googleProduct.DirSize;
var tuple = HelpfulMethods.ByteToString(takeoutSize);
takeoutSizeType = tuple.Item2;
......
......@@ -98,6 +98,96 @@
</Grid>
<Separator Height="2" Grid.Row="2" Background="#3FA0A0A0"/>
<DataGrid x:Name="dataGrid" AlternatingRowBackground="#33000000" CanUserAddRows="False" AutoGenerateColumns="False" Grid.Row="3" Background="#00000000" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="20" FontSize="20" BorderBrush="#00000000" Foreground="#00000000">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Margin" Value="25" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="25"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border Padding="{TemplateBinding Padding}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" SnapsToDevicePixels="True">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Focusable="False" IsManipulationEnabled="False"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Background" Value="Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTemplateColumn Header="File Name" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Path" Width="*" CanUserSort="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DirectoryName }" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Size (bytes)" Width="*" CanUserSort="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Length }" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Open File" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Foreground="#DDB9B9B9">
<Hyperlink Click="onClickHyperLink">
Open File
</Hyperlink>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</ScrollViewer>
......
using Personal_Insight.Models;
using Personal_Insight.ComputeProduct;
using Personal_Insight.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
......@@ -26,15 +28,26 @@ namespace Personal_Insight.Pages.ModelPages
private GoogleProductModel googleProduct;
private double takeoutSize = 0;
private String takeoutSizeType;
private Drive productObject;
public Page_Drive(GoogleProductModel googleProduct)
{
this.googleProduct = googleProduct;
InitializeComponent();
productObject = (Drive)googleProduct.ProductObject;
}
private void Window_ContentRendered(object sender, RoutedEventArgs e)
{
var collection = new List<FileInfo>();
for (int i = 0; i < 50; i++)
{
collection.Add(productObject.fileInfoList.ElementAt(i));
}
dataGrid.ItemsSource = collection;
takeoutSize = googleProduct.DirSize;
var tuple = HelpfulMethods.ByteToString(takeoutSize);
takeoutSizeType = tuple.Item2;
......@@ -67,6 +80,12 @@ namespace Personal_Insight.Pages.ModelPages
}
private void onClickHyperLink(object sender, RoutedEventArgs e)
{
var URL = ((FileInfo)((Hyperlink)e.Source).DataContext).FullName;
System.Diagnostics.Process.Start(URL);
}
private void openFolderClick(object sender, RoutedEventArgs e)
{
Process.Start(googleProduct.ProductFolderPath);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment