Skip to content

Commit

Permalink
程序图标
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Mar 5, 2012
1 parent 62a967f commit 66413e7
Show file tree
Hide file tree
Showing 25 changed files with 247 additions and 40 deletions.
Binary file modified ApplicationIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion BoardPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Description}" Margin="0" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Description}" Margin="2 0 0 0" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding EnglishName}" Margin="0,-7,0,0" Foreground="{StaticResource PhoneAccentBrush}" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
</StackPanel>

Expand Down
53 changes: 53 additions & 0 deletions HotPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<phone:PhoneApplicationPage
x:Class="sbbs_client_wp7.HotPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
toolkit:TiltEffect.IsTiltEnabled="True"
shell:SystemTray.Opacity="{Binding IsLoading, Converter={StaticResource LoadedOpacityConerter}, ConverterParameter=true}"
shell:SystemTray.IsVisible="True">

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<!--Pivot Control-->
<controls:Pivot Title="虎踞龙蟠BBS">
<!--Pivot item one-->
<controls:PivotItem Header="分区热点">
<ListBox ItemsSource="{Binding Topics}" ItemTemplate="{StaticResource TopicDataTemplate}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</controls:PivotItem>

<!--Pivot item two-->
<controls:PivotItem Header="热门版面">
<Grid/>
</controls:PivotItem>
</controls:Pivot>
</Grid>

<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
<shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
<shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
23 changes: 23 additions & 0 deletions HotPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace sbbs_client_wp7
{
public partial class HotPage : PhoneApplicationPage
{
public HotPage()
{
InitializeComponent();
}
}
}
Binary file added Images/Tiles/board.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Tiles/cup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Tiles/folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Tiles/history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Tiles/list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Tiles/love.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Tiles/mailbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Tiles/pen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/Tiles/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 12 additions & 11 deletions MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<!-- 十大热帖 -->
<controls:PanoramaItem>
<controls:PanoramaItem.Header>
<TextBlock motion:MetroInMotion.Tilt="6" MouseLeftButtonUp="RefreshTopten_Click" Text="十大热帖" Foreground="{StaticResource PhoneAccentBrush}" FontSize="60"/>
<TextBlock motion:MetroInMotion.Tilt="6" Tap="RefreshTopten_Tap" Text="十大热帖" Foreground="{StaticResource PhoneAccentBrush}" FontSize="60"/>
</controls:PanoramaItem.Header>
<ListBox ItemsSource="{Binding ToptenItems}" ItemTemplate="{StaticResource TopicDataTemplate}"
SelectionChanged="Topten_Selected">
Expand All @@ -74,7 +74,7 @@
<!-- 我的最爱 -->
<controls:PanoramaItem>
<controls:PanoramaItem.Header>
<TextBlock motion:MetroInMotion.Tilt="6" MouseLeftButtonUp="RefreshFavorates_Click" Text="收藏夹" Foreground="{StaticResource PhoneAccentBrush}" FontSize="60"/>
<TextBlock motion:MetroInMotion.Tilt="6" Tap="RefreshFavorates_Tap" Text="收藏夹" Foreground="{StaticResource PhoneAccentBrush}" FontSize="60"/>
</controls:PanoramaItem.Header>
<ListBox ItemsSource="{Binding FavoratesItems}" ItemTemplate="{StaticResource BoardDataTemplate}"
SelectionChanged="Favorates_Selected"
Expand All @@ -99,15 +99,16 @@
</Style>
</toolkit:WrapPanel.Resources>

<local:Tile Title="登录" MouseLeftButtonUp="Login_Click" Visibility="{Binding IsLogin, Converter={StaticResource BoolVisibleConverter}, ConverterParameter=True}"/>
<local:Tile Title="热门版面"/>
<local:Tile Title="分区热点"/>
<local:Tile Title="版面分区"/>
<local:Tile Title="最近浏览"/>
<local:Tile Title="我的信箱" Visibility="{Binding IsLogin, Converter={StaticResource BoolVisibleConverter}}"/>
<local:Tile Title="注册" Visibility="{Binding IsLogin, Converter={StaticResource BoolVisibleConverter}, ConverterParameter=True}"/>
<local:Tile Title="关于"/>
<local:Tile Title="退出" MouseLeftButtonUp="Logout_Click" Visibility="{Binding IsLogin, Converter={StaticResource BoolVisibleConverter}}"/>
<local:Tile Title="登录" Src="/Images/Tiles/pen.png" Tap="Login_Tap" Visibility="{Binding IsLogin, Converter={StaticResource BoolVisibleConverter}, ConverterParameter=True}"/>
<local:Tile Title="分区热点" Tap="HotTopics_Tap" Src="/Images/Tiles/board.png"/>
<local:Tile Title="热门版面" Src="/Images/Tiles/list.png"/>
<local:Tile Title="版面分区" Src="/Images/Tiles/folder.png"/>
<local:Tile Title="最近浏览" Src="/Images/Tiles/history.png"/>
<local:Tile Title="我的信箱" Src="/Images/Tiles/mailbox.png" Visibility="{Binding IsLogin, Converter={StaticResource BoolVisibleConverter}}"/>
<local:Tile Title="搜索" Src="/Images/Tiles/search.png"/>
<local:Tile Title="注册" Src="/Images/Tiles/cup.png" Visibility="{Binding IsLogin, Converter={StaticResource BoolVisibleConverter}, ConverterParameter=True}"/>
<local:Tile Title="关于" Src="/Images/Tiles/love.png"/>
<local:Tile Title="退出" Src="/Images/Tiles/pen.png" Tap="Logout_Tap" Visibility="{Binding IsLogin, Converter={StaticResource BoolVisibleConverter}}"/>
</toolkit:WrapPanel>
</controls:PanoramaItem>
</controls:Panorama>
Expand Down
14 changes: 10 additions & 4 deletions MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,33 +62,39 @@ private void MainPage_Loaded(object sender, RoutedEventArgs e)
}

// 登录
private void Login_Click(object sender, MouseButtonEventArgs e)
private void Login_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
this.NavigationService.Navigate(new Uri("/LoginPage.xaml", UriKind.Relative));
}

// 注销
private void Logout_Click(object sender, MouseButtonEventArgs e)
private void Logout_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
MessageBoxResult result = MessageBox.Show("真的要注销吗?", "注销", MessageBoxButton.OKCancel);
if (result == MessageBoxResult.OK)
App.ViewModel.IsLogin = false;
}

// 刷新十大
private void RefreshTopten_Click(object sender, MouseButtonEventArgs e)
private void RefreshTopten_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
App.ViewModel.IsToptenLoaded = false;
LoadTopten();
}

// 刷新收藏夹
private void RefreshFavorates_Click(object sender, MouseButtonEventArgs e)
private void RefreshFavorates_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
App.ViewModel.IsFavoratesLoaded = false;
LoadFavorates();
}

// 分区热点
private void HotTopics_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{

}

// 点击收藏夹

private void Favorates_Selected(object sender, SelectionChangedEventArgs e)
Expand Down
37 changes: 18 additions & 19 deletions Properties/WMAppManifest.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>

<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
<App xmlns="" ProductID="{df35a3b9-d6fc-475e-b676-9c4143259657}" Title="虎踞龙蟠BBS" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="赵成" Description="虎踞龙蟠BBS官方客户端" Publisher="小型笨蛋">
<App xmlns="" ProductID="{df35a3b9-d6fc-475e-b676-9c4143259657}" Title="虎踞龙蟠BBS" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="赵成" Description="虎踞龙蟠BBS官方客户端" Publisher="小型笨蛋">
<IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_GAMERSERVICES"/>
<Capability Name="ID_CAP_IDENTITY_DEVICE"/>
<Capability Name="ID_CAP_IDENTITY_USER"/>
<Capability Name="ID_CAP_LOCATION"/>
<Capability Name="ID_CAP_MEDIALIB"/>
<Capability Name="ID_CAP_MICROPHONE"/>
<Capability Name="ID_CAP_NETWORKING"/>
<Capability Name="ID_CAP_PHONEDIALER"/>
<Capability Name="ID_CAP_PUSH_NOTIFICATION"/>
<Capability Name="ID_CAP_SENSORS"/>
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/>
<Capability Name="ID_CAP_ISV_CAMERA"/>
<Capability Name="ID_CAP_CONTACTS"/>
<Capability Name="ID_CAP_APPOINTMENTS"/>
<Capability Name="ID_CAP_GAMERSERVICES" />
<Capability Name="ID_CAP_IDENTITY_DEVICE" />
<Capability Name="ID_CAP_IDENTITY_USER" />
<Capability Name="ID_CAP_LOCATION" />
<Capability Name="ID_CAP_MEDIALIB" />
<Capability Name="ID_CAP_MICROPHONE" />
<Capability Name="ID_CAP_NETWORKING" />
<Capability Name="ID_CAP_PHONEDIALER" />
<Capability Name="ID_CAP_PUSH_NOTIFICATION" />
<Capability Name="ID_CAP_SENSORS" />
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
<Capability Name="ID_CAP_ISV_CAMERA" />
<Capability Name="ID_CAP_CONTACTS" />
<Capability Name="ID_CAP_APPOINTMENTS" />
</Capabilities>
<Tasks>
<DefaultTask Name ="_default" NavigationPage="MainPage.xaml"/>
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
</Tasks>
<Tokens>
<PrimaryToken TokenID="sbbs_client_wp7Token" TaskName="_default">
<TemplateType5>
<BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
<Count>0</Count>
<Title>sbbs_client_wp7</Title>
<Title>虎踞龙蟠BBS</Title>
</TemplateType5>
</PrimaryToken>
</Tokens>
</App>
</Deployment>
</Deployment>
2 changes: 1 addition & 1 deletion SampleData/MainViewModelSampleData.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</local:MainViewModel.FavoratesItems>

<local:MainViewModel.CurrentBoard>
<sbbs:CurrentBoardViewModel Description="C/C++语言" EnglishName="C_CPlusPlus" />
<local:CurrentBoardViewModel Description="C/C++语言" EnglishName="C_CPlusPlus" />
</local:MainViewModel.CurrentBoard>

</local:MainViewModel>
32 changes: 32 additions & 0 deletions Sbbs/TopicsGroupViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Runtime.Serialization.Json;
using System.Runtime.Serialization;

namespace sbbs_client_wp7.Sbbs
{
[DataContract]
public class TopicsGroupViewModel : ObservableCollection<TopicViewModel>
{
[DataMember(Name = "description")]
public string Title { get; set; }

[DataMember(Name = "topics")]
public ObservableCollection<TopicViewModel> Topics { get; set; }

public bool HasItems
{
get
{
return Count != 0;
}

private set
{
}
}

// 将ObservableCollection的全部元素操作转向Topics
}
}
Binary file modified SplashScreenImage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Tile.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
d:DesignHeight="160" d:DesignWidth="160">

<Grid x:Name="LayoutRoot" Width="160" Height="160" Background="{StaticResource PhoneAccentBrush}">
<Image x:Name="TileImage"/>
<Image x:Name="TileImage" Width="100" Height="100"/>
<TextBlock x:Name="TileTitle" Text="未设定"
Foreground="White" FontSize="20"
HorizontalAlignment="Left" VerticalAlignment="Bottom"
Expand Down
4 changes: 2 additions & 2 deletions Tile.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public String Title
}
}

public String Source
public String Src
{
set
{
Uri uri = new Uri(value, UriKind.Absolute);
Uri uri = new Uri(value, UriKind.RelativeOrAbsolute);
this.TileImage.Source = new BitmapImage(uri);
}
get
Expand Down
2 changes: 1 addition & 1 deletion TopicPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="{Binding Board}" Margin="0" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="{Binding Board}" Margin="2 0 0 0" Style="{StaticResource PhoneTextNormalStyle}"/>
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Visible">
<TextBlock x:Name="PageTitle" Text="{Binding Title}" Margin="0,-7,0,0" Foreground="{StaticResource PhoneAccentBrush}" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
</ScrollViewer>
Expand Down
75 changes: 75 additions & 0 deletions ViewModels/HotViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
using System;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace sbbs_client_wp7
{
using Sbbs;

public class HotViewModel : INotifyPropertyChanged
{
private bool isLoading;

public bool IsLoading
{
get
{
return isLoading;
}
set
{
if (isLoading != value)
{
isLoading = value;
NotifyPropertyChanged("IsLoading");
}
}
}

// 热门版面集合
private ObservableCollection<BoardViewModel> hotboardsItems;
public ObservableCollection<BoardViewModel> HotboardsItems
{
get
{
return hotboardsItems;
}
set
{
if (value != hotboardsItems)
{
hotboardsItems = value;
NotifyPropertyChanged("HotboardsItems");
}
}
}

// 分区热点
private ObservableCollection<TopicsGroupViewModel> topicsGroupItems;
public ObservableCollection<TopicsGroupViewModel> TopicsGroupItems
{
get
{
return topicsGroupItems;
}
set
{
if (value != topicsGroupItems)
{
topicsGroupItems = value;
NotifyPropertyChanged("TopicsGroupItems");
}
}
}

public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (null != handler)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}
Loading

0 comments on commit 66413e7

Please sign in to comment.