Revision f2d88248
b/trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj | ||
---|---|---|
15 | 15 |
<FileAlignment>512</FileAlignment> |
16 | 16 |
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
17 | 17 |
<WarningLevel>4</WarningLevel> |
18 |
<PublishUrl>publish\</PublishUrl> |
|
19 |
<Install>true</Install> |
|
20 |
<InstallFrom>Disk</InstallFrom> |
|
21 |
<UpdateEnabled>false</UpdateEnabled> |
|
22 |
<UpdateMode>Foreground</UpdateMode> |
|
23 |
<UpdateInterval>7</UpdateInterval> |
|
24 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
25 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
26 |
<UpdateRequired>false</UpdateRequired> |
|
27 |
<MapFileExtensions>true</MapFileExtensions> |
|
28 |
<ApplicationRevision>0</ApplicationRevision> |
|
29 |
<ApplicationVersion>0.7.0.%2a</ApplicationVersion> |
|
30 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
31 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
32 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
18 | 33 |
</PropertyGroup> |
19 | 34 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> |
20 | 35 |
<PlatformTarget>x86</PlatformTarget> |
... | ... | |
492 | 507 |
<ItemGroup> |
493 | 508 |
<Resource Include="Images\SmallWarning.png" /> |
494 | 509 |
</ItemGroup> |
510 |
<ItemGroup> |
|
511 |
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client"> |
|
512 |
<Visible>False</Visible> |
|
513 |
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName> |
|
514 |
<Install>true</Install> |
|
515 |
</BootstrapperPackage> |
|
516 |
<BootstrapperPackage Include="Microsoft.Net.Client.3.5"> |
|
517 |
<Visible>False</Visible> |
|
518 |
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> |
|
519 |
<Install>false</Install> |
|
520 |
</BootstrapperPackage> |
|
521 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
522 |
<Visible>False</Visible> |
|
523 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
524 |
<Install>false</Install> |
|
525 |
</BootstrapperPackage> |
|
526 |
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> |
|
527 |
<Visible>False</Visible> |
|
528 |
<ProductName>Windows Installer 3.1</ProductName> |
|
529 |
<Install>true</Install> |
|
530 |
</BootstrapperPackage> |
|
531 |
</ItemGroup> |
|
495 | 532 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
496 | 533 |
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
497 | 534 |
Other similar extension points exist, see Microsoft.Common.targets. |
b/trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml | ||
---|---|---|
36 | 36 |
</Grid.RowDefinitions> |
37 | 37 |
|
38 | 38 |
|
39 |
<TabControl Grid.Row="0"> |
|
40 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"> |
|
39 |
<TabControl Grid.Row="0" x:Name="Tabs" >
|
|
40 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="GeneralTab">
|
|
41 | 41 |
<TabItem.Header> |
42 | 42 |
<StackPanel> |
43 | 43 |
<Image Source="/Pithos.Client.WPF;component/Images/General.png" Stretch="Uniform" Height="32"/> |
... | ... | |
51 | 51 |
</StackPanel> |
52 | 52 |
</GroupBox> |
53 | 53 |
</TabItem> |
54 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"> |
|
54 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="AccountTab" IsSelected="{Binding AccountTabSelected,Mode=OneWay}">
|
|
55 | 55 |
<TabItem.Header> |
56 | 56 |
<StackPanel> |
57 | 57 |
<Image Source="/Pithos.Client.WPF;component/Images/Accounts.png" Stretch="Uniform" Height="32"/> |
... | ... | |
136 | 136 |
|
137 | 137 |
</Grid> |
138 | 138 |
</TabItem> |
139 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Visibility="Collapsed"> |
|
139 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Visibility="Collapsed" x:Name="RateTab">
|
|
140 | 140 |
<TabItem.Header> |
141 | 141 |
<StackPanel> |
142 | 142 |
<Image Source="/Pithos.Client.WPF;component/Images/Bandwidth.png" Stretch="Uniform" Height="32"/> |
... | ... | |
152 | 152 |
</GroupBox> |
153 | 153 |
</StackPanel> |
154 | 154 |
</TabItem> |
155 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"> |
|
155 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="ProxyTab">
|
|
156 | 156 |
<TabItem.Header> |
157 | 157 |
<StackPanel> |
158 | 158 |
<Image Source="/Pithos.Client.WPF;component/Images/Network.png" Stretch="Uniform" Height="32"/> |
... | ... | |
192 | 192 |
</GroupBox> |
193 | 193 |
</Grid> |
194 | 194 |
</TabItem> |
195 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"> |
|
195 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="AdvancedTab">
|
|
196 | 196 |
<TabItem.Header> |
197 | 197 |
<StackPanel> |
198 | 198 |
<Image Source="/Pithos.Client.WPF;component/Images/Advanced.png" Stretch="Uniform" Height="32"/> |
b/trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs | ||
---|---|---|
97 | 97 |
public ShellViewModel Shell { get; set; } |
98 | 98 |
//ShellExtensionController _extensionController=new ShellExtensionController(); |
99 | 99 |
|
100 |
public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings) |
|
100 |
public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings, string currentTab)
|
|
101 | 101 |
{ |
102 | 102 |
_windowManager = windowManager; |
103 | 103 |
_events = events; |
104 | 104 |
|
105 | 105 |
DisplayName = "Pithos Preferences"; |
106 | 106 |
Shell = shell; |
107 |
|
|
107 |
|
|
108 | 108 |
Settings=settings; |
109 | 109 |
Accounts = new ObservableConcurrentCollection<AccountSettings>(); |
110 | 110 |
if (settings.Accounts == null) |
... | ... | |
120 | 120 |
|
121 | 121 |
StartOnSystemStartup = File.Exists(_shortcutPath); |
122 | 122 |
|
123 |
SelectedTab = currentTab; |
|
124 |
} |
|
125 |
|
|
126 |
private string _selectedTab="General"; |
|
127 |
public string SelectedTab |
|
128 |
{ |
|
129 |
get { return _selectedTab; } |
|
130 |
set |
|
131 |
{ |
|
132 |
_selectedTab = value??"General"; |
|
133 |
NotifyOfPropertyChange(()=>SelectedTab); |
|
134 |
NotifyOfPropertyChange(() => AccountTabSelected); |
|
135 |
} |
|
123 | 136 |
} |
124 | 137 |
|
125 | 138 |
|
139 |
public bool AccountTabSelected |
|
140 |
{ |
|
141 |
get { return _selectedTab == "AccountTab"; } |
|
142 |
} |
|
126 | 143 |
#region Preferences Properties |
127 | 144 |
|
128 | 145 |
private bool _noProxy; |
b/trunk/Pithos.Client.WPF/Shell/PithosBalloon.xaml | ||
---|---|---|
60 | 60 |
<BeginStoryboard Storyboard="{StaticResource FadeOut}" x:Name="FadeOut_BeginStoryboard"/> |
61 | 61 |
</EventTrigger> |
62 | 62 |
</UserControl.Triggers> |
63 |
<Grid x:Name="grid" MouseEnter="grid_MouseEnter"> |
|
63 |
<Grid x:Name="grid" MouseEnter="grid_MouseEnter" >
|
|
64 | 64 |
<Grid.ColumnDefinitions> |
65 | 65 |
<ColumnDefinition Width="Auto"/> |
66 | 66 |
<ColumnDefinition Width="*"/> |
... | ... | |
107 | 107 |
Foreground="Black" |
108 | 108 |
TextWrapping="Wrap" |
109 | 109 |
Text="{Binding Message,FallbackValue='This is a message'}" |
110 |
Width="Auto" Grid.RowSpan="2"> |
|
110 |
Width="Auto" Grid.RowSpan="2" MouseDown="TextBlock_MouseDown" |
|
111 |
> |
|
111 | 112 |
</TextBlock> |
112 | 113 |
|
113 | 114 |
<Path Grid.Column="1" Fill="#FFFFFFFF" |
b/trunk/Pithos.Client.WPF/Shell/PithosBalloon.xaml.cs | ||
---|---|---|
133 | 133 |
/// </summary> |
134 | 134 |
private void imgClose_MouseDown(object sender, MouseButtonEventArgs e) |
135 | 135 |
{ |
136 |
//the tray icon assigned this attached property to simplify access |
|
137 |
TaskbarIcon taskbarIcon = TaskbarIcon.GetParentTaskbarIcon(this); |
|
138 |
taskbarIcon.CloseBalloon(); |
|
136 |
//the tray icon assigned this attached property to simplify access |
|
137 |
CloseBalloon(); |
|
139 | 138 |
} |
140 |
|
|
141 |
/// <summary> |
|
139 |
|
|
140 |
private void CloseBalloon() |
|
141 |
{ |
|
142 |
TaskbarIcon taskbarIcon = TaskbarIcon.GetParentTaskbarIcon(this); |
|
143 |
taskbarIcon.CloseBalloon(); |
|
144 |
} |
|
145 |
|
|
146 |
/// <summary> |
|
142 | 147 |
/// If the users hovers over the balloon, we don't close it. |
143 | 148 |
/// </summary> |
144 | 149 |
private void grid_MouseEnter(object sender, MouseEventArgs e) |
... | ... | |
163 | 168 |
Popup pp = (Popup)Parent; |
164 | 169 |
pp.IsOpen = false; |
165 | 170 |
} |
171 |
|
|
172 |
private void TextBlock_MouseDown(object sender, MouseButtonEventArgs e) |
|
173 |
{ |
|
174 |
CloseBalloon(); |
|
175 |
if (ClickAction!= null) |
|
176 |
{ |
|
177 |
ClickAction(); |
|
178 |
} |
|
179 |
|
|
180 |
} |
|
181 |
|
|
182 |
public Action ClickAction { get; set; } |
|
166 | 183 |
} |
167 | 184 |
} |
b/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs | ||
---|---|---|
348 | 348 |
|
349 | 349 |
#region Commands |
350 | 350 |
|
351 |
public void ShowPreferences() |
|
351 |
public void ShowPreferences() |
|
352 |
{ |
|
353 |
ShowPreferences(null); |
|
354 |
} |
|
355 |
|
|
356 |
public void ShowPreferences(string currentTab) |
|
352 | 357 |
{ |
353 | 358 |
//Settings.Reload(); |
354 |
var preferences = new PreferencesViewModel(_windowManager,_events, this,Settings);
|
|
355 |
_windowManager.ShowDialog(preferences);
|
|
359 |
var preferences = new PreferencesViewModel(_windowManager, _events, this, Settings,currentTab);
|
|
360 |
_windowManager.ShowDialog(preferences);
|
|
356 | 361 |
|
357 | 362 |
} |
358 | 363 |
|
... | ... | |
861 | 866 |
|
862 | 867 |
if (Settings.ShowDesktopNotifications) |
863 | 868 |
{ |
864 |
var tv = (ShellView) GetView(); |
|
865 |
var balloon=new PithosBalloon{Title=notification.Title,Message=notification.Message,Icon=icon}; |
|
869 |
var tv = (ShellView) GetView(); |
|
870 |
System.Action clickAction = null; |
|
871 |
if (notification is ExpirationNotification) |
|
872 |
{ |
|
873 |
clickAction = ()=>ShowPreferences("AccountTab"); |
|
874 |
} |
|
875 |
var balloon=new PithosBalloon{Title=notification.Title,Message=notification.Message,Icon=icon,ClickAction=clickAction}; |
|
866 | 876 |
tv.TaskbarView.ShowCustomBalloon(balloon,PopupAnimation.Fade,4000); |
867 | 877 |
// tv.TaskbarView.ShowBalloonTip(notification.Title, notification.Message, icon); |
868 | 878 |
} |
Also available in: Unified diff