-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
157 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<phone:PhoneApplicationPage | ||
x:Class="sbbs_client_wp7.BoardSettingsPage" | ||
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:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:sys ="clr-namespace:System;assembly=mscorlib" | ||
FontFamily="{StaticResource PhoneFontFamilyNormal}" | ||
FontSize="{StaticResource PhoneFontSizeNormal}" | ||
Foreground="{StaticResource PhoneForegroundBrush}" | ||
SupportedOrientations="Portrait" Orientation="Portrait" | ||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480" | ||
toolkit:TiltEffect.IsTiltEnabled="True" | ||
shell:SystemTray.Opacity="0" | ||
shell:SystemTray.IsVisible="True"> | ||
|
||
<toolkit:TransitionService.NavigationInTransition> | ||
<toolkit:NavigationInTransition> | ||
<toolkit:NavigationInTransition.Backward> | ||
<toolkit:TurnstileTransition Mode="BackwardIn"/> | ||
</toolkit:NavigationInTransition.Backward> | ||
<toolkit:NavigationInTransition.Forward> | ||
<toolkit:TurnstileTransition Mode="ForwardIn"/> | ||
</toolkit:NavigationInTransition.Forward> | ||
</toolkit:NavigationInTransition> | ||
</toolkit:TransitionService.NavigationInTransition> | ||
<toolkit:TransitionService.NavigationOutTransition> | ||
<toolkit:NavigationOutTransition> | ||
<toolkit:NavigationOutTransition.Backward> | ||
<toolkit:TurnstileTransition Mode="BackwardOut"/> | ||
</toolkit:NavigationOutTransition.Backward> | ||
<toolkit:NavigationOutTransition.Forward> | ||
<toolkit:TurnstileTransition Mode="ForwardOut"/> | ||
</toolkit:NavigationOutTransition.Forward> | ||
</toolkit:NavigationOutTransition> | ||
</toolkit:TransitionService.NavigationOutTransition> | ||
|
||
<!--LayoutRoot is the root grid where all page content is placed--> | ||
<Grid x:Name="LayoutRoot" Background="Transparent"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
|
||
<!--TitlePanel contains the name of the application and page title--> | ||
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> | ||
<TextBlock x:Name="ApplicationTitle" Margin="0" Text="虎踞龙蟠BBS" Style="{StaticResource PhoneTextNormalStyle}"/> | ||
<TextBlock x:Name="PageTitle" Text="版面设置" Margin="0,-7,0,0" Foreground="{StaticResource PhoneAccentBrush}" Style="{StaticResource PhoneTextExtraLargeStyle}"/> | ||
</StackPanel> | ||
|
||
<!--ContentPanel - place additional content here--> | ||
<ScrollViewer Grid.Row="1"> | ||
<StackPanel> | ||
<toolkit:ListPicker SelectionChanged="Mode_SelectionChanged" x:Name="Mode" Header="版面模式"> | ||
<sys:String>普通模式</sys:String> | ||
<sys:String>主题模式</sys:String> | ||
<sys:String>论坛模式</sys:String> | ||
</toolkit:ListPicker> | ||
</StackPanel> | ||
</ScrollViewer> | ||
</Grid> | ||
|
||
</phone:PhoneApplicationPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Navigation; | ||
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 BoardSettingsPage : PhoneApplicationPage | ||
{ | ||
public BoardSettingsPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
protected override void OnNavigatedTo(NavigationEventArgs e) | ||
{ | ||
base.OnNavigatedTo(e); | ||
|
||
// 恢复选择 | ||
int[] modeMap = { 0, 1, 2, 2 }; | ||
Mode.SelectedIndex = modeMap[App.Service.BoardMode]; | ||
} | ||
|
||
private void Mode_SelectionChanged(object sender, SelectionChangedEventArgs e) | ||
{ | ||
ListPicker list = sender as ListPicker; | ||
|
||
// 设置并保存模式 | ||
int[] modeMap = { 0, 1, 3}; | ||
int mode = modeMap[list.SelectedIndex]; | ||
|
||
if (mode != App.Service.BoardMode) | ||
{ | ||
App.Service.BoardMode = mode; | ||
LocalCache.Set<int>("BoardMode", App.Service.BoardMode); | ||
|
||
// 刷新版面以生效 | ||
App.ViewModel.CurrentBoard.NeedRefresh = true; | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters