Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add seperate columns for From and To fields; show Date and Time #7

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) 2016, Dijji, and released under Ms-PL. This can be found in the root of this distribution.-->
<!-- Copyright (c) 2016, Dijji, and released under Ms-PL. This can be found in the root of this distribution.-->
<Window x:Class="XstReader.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down Expand Up @@ -62,7 +62,7 @@
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="350" >
<GridViewColumn Width="250" >
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Subject" Click="listMessagesColumnHeader_Click">Subject</GridViewColumnHeader>
</GridViewColumn.Header>
Expand All @@ -74,11 +74,21 @@
</GridViewColumn>
<GridViewColumn Width="100" >
<GridViewColumn.Header>
<GridViewColumnHeader Tag="FromTo" Click="listMessagesColumnHeader_Click">From or To</GridViewColumnHeader>
<GridViewColumnHeader Tag="From" Click="listMessagesColumnHeader_Click">From</GridViewColumnHeader>
</GridViewColumn.Header>
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=FromTo}" />
<TextBlock Text="{Binding Path=From}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Width="100" >
<GridViewColumn.Header>
<GridViewColumnHeader Tag="To" Click="listMessagesColumnHeader_Click">To</GridViewColumnHeader>
</GridViewColumn.Header>
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=To}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
Expand Down
2 changes: 1 addition & 1 deletion View.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Message
public DateTime? Submitted { get; set; }
public DateTime? Modified { get; set; } // When any attachment was last modified
public DateTime? Date { get { return Received ?? Submitted; } }
public string DisplayDate { get { return Date != null ? ((DateTime)Date).ToShortDateString() : "<unknown>"; } }
public string DisplayDate { get { return Date != null ? ((DateTime)Date).ToShortDateString() + " " + ((DateTime)Date).ToShortTimeString() : "<unknown>"; } }
public NID Nid { get; set; }
public BodyType NativeBody { get; set; }
public string Body { get; set; }
Expand Down