Merge branch 'release/r#78' into develmaster
This commit is contained in:
@@ -96,6 +96,7 @@
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Lui\Button\EmailButton.cs" />
|
||||
<Compile Include="Feed\Link\CommonLinkFeed.cs" />
|
||||
<Compile Include="Feed\Link\ClubLinkFeed.cs" />
|
||||
<Compile Include="Feed\Openinghours\OpeninghoursFeed.cs" />
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
@@ -43,9 +44,7 @@
|
||||
<Button Name="Link" Tag="{Binding Url}" Click="ShowWebpage" Height="75">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Link, Source={StaticResource ThemelizedIcons}}" />
|
||||
</Button>
|
||||
<Button Name="Email" Tag="{Binding Email}" Click="ShowEmail" Height="75">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.WebMail, Source={StaticResource ThemelizedIcons}}" />
|
||||
</Button>
|
||||
<lui:EmailButton Height="75" EmailAddress="{Binding Email}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -147,22 +147,6 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
this.StudentCouncilPivot.ItemsSource = this.feed.Model.GetStudentCouncilsGroupByFaculty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called on clicking on a mail button.
|
||||
/// </summary>
|
||||
/// <param name="sender">button object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void ShowEmail(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempUIElem = sender as FrameworkElement;
|
||||
|
||||
string info = tempUIElem.Tag.ToString();
|
||||
|
||||
EmailComposeTask emailTask = new EmailComposeTask();
|
||||
emailTask.To = "mailto:" + info;
|
||||
emailTask.Show();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
81
CampusAppWP8/CampusAppWP8/Utility/Lui/Button/EmailButton.cs
Normal file
81
CampusAppWP8/CampusAppWP8/Utility/Lui/Button/EmailButton.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="EmailButton.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>04.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility.Lui.Button
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// This class create an Button which start the Email-Client
|
||||
/// </summary>
|
||||
public class EmailButton : System.Windows.Controls.Button
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Register the EmailProperty
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty EmailProperty = DependencyProperty.Register("EmailAddress", typeof(object), typeof(EmailButton), new PropertyMetadata(false));
|
||||
|
||||
/// <summary>
|
||||
/// Icon of the Button
|
||||
/// </summary>
|
||||
private static BitmapImage icon = new BitmapImage(new Uri(Icons.WebMail, UriKind.Relative));
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmailButton" /> class.
|
||||
/// </summary>
|
||||
public EmailButton()
|
||||
: base()
|
||||
{
|
||||
this.Content = new Image
|
||||
{
|
||||
Source = icon
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the EmailAddress
|
||||
/// </summary>
|
||||
public object EmailAddress
|
||||
{
|
||||
get { return (object)this.GetValue(EmailProperty); }
|
||||
set { this.SetValue(EmailProperty, value); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the OnClick-Method from button
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// now method start the EmailComposeTask
|
||||
/// </remarks>
|
||||
protected override void OnClick()
|
||||
{
|
||||
EmailComposeTask emailTask = new EmailComposeTask();
|
||||
emailTask.To = "mailto:" + this.EmailAddress.ToString();
|
||||
emailTask.Show();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user