ExpiredNotifications now add an action to the balloon that opens the account preferences when clicked
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>0.7.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<ItemGroup>
<Resource Include="Images\SmallWarning.png" />
</ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
</Grid.RowDefinitions>
- <TabControl Grid.Row="0">
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabControl Grid.Row="0" x:Name="Tabs" >
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="GeneralTab">
<TabItem.Header>
<StackPanel>
<Image Source="/Pithos.Client.WPF;component/Images/General.png" Stretch="Uniform" Height="32"/>
</StackPanel>
</GroupBox>
</TabItem>
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="AccountTab" IsSelected="{Binding AccountTabSelected,Mode=OneWay}">
<TabItem.Header>
<StackPanel>
<Image Source="/Pithos.Client.WPF;component/Images/Accounts.png" Stretch="Uniform" Height="32"/>
</Grid>
</TabItem>
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Visibility="Collapsed">
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Visibility="Collapsed" x:Name="RateTab">
<TabItem.Header>
<StackPanel>
<Image Source="/Pithos.Client.WPF;component/Images/Bandwidth.png" Stretch="Uniform" Height="32"/>
</GroupBox>
</StackPanel>
</TabItem>
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="ProxyTab">
<TabItem.Header>
<StackPanel>
<Image Source="/Pithos.Client.WPF;component/Images/Network.png" Stretch="Uniform" Height="32"/>
</GroupBox>
</Grid>
</TabItem>
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="AdvancedTab">
<TabItem.Header>
<StackPanel>
<Image Source="/Pithos.Client.WPF;component/Images/Advanced.png" Stretch="Uniform" Height="32"/>
public ShellViewModel Shell { get; set; }
//ShellExtensionController _extensionController=new ShellExtensionController();
- public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings)
+ public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings, string currentTab)
{
_windowManager = windowManager;
_events = events;
DisplayName = "Pithos Preferences";
Shell = shell;
-
+
Settings=settings;
Accounts = new ObservableConcurrentCollection<AccountSettings>();
if (settings.Accounts == null)
StartOnSystemStartup = File.Exists(_shortcutPath);
+ SelectedTab = currentTab;
+ }
+
+ private string _selectedTab="General";
+ public string SelectedTab
+ {
+ get { return _selectedTab; }
+ set
+ {
+ _selectedTab = value??"General";
+ NotifyOfPropertyChange(()=>SelectedTab);
+ NotifyOfPropertyChange(() => AccountTabSelected);
+ }
}
+ public bool AccountTabSelected
+ {
+ get { return _selectedTab == "AccountTab"; }
+ }
#region Preferences Properties
private bool _noProxy;
<BeginStoryboard Storyboard="{StaticResource FadeOut}" x:Name="FadeOut_BeginStoryboard"/>\r
</EventTrigger>\r
</UserControl.Triggers>\r
- <Grid x:Name="grid" MouseEnter="grid_MouseEnter">\r
+ <Grid x:Name="grid" MouseEnter="grid_MouseEnter" >\r
<Grid.ColumnDefinitions>\r
<ColumnDefinition Width="Auto"/>\r
<ColumnDefinition Width="*"/>\r
Foreground="Black" \r
TextWrapping="Wrap" \r
Text="{Binding Message,FallbackValue='This is a message'}" \r
- Width="Auto" Grid.RowSpan="2">\r
+ Width="Auto" Grid.RowSpan="2" MouseDown="TextBlock_MouseDown"\r
+ >\r
</TextBlock>\r
\r
<Path Grid.Column="1" Fill="#FFFFFFFF"\r
/// </summary>\r
private void imgClose_MouseDown(object sender, MouseButtonEventArgs e)\r
{\r
- //the tray icon assigned this attached property to simplify access\r
- TaskbarIcon taskbarIcon = TaskbarIcon.GetParentTaskbarIcon(this);\r
- taskbarIcon.CloseBalloon();\r
+ //the tray icon assigned this attached property to simplify access\r
+ CloseBalloon();\r
}\r
- \r
- /// <summary>\r
+\r
+ private void CloseBalloon()\r
+ {\r
+ TaskbarIcon taskbarIcon = TaskbarIcon.GetParentTaskbarIcon(this);\r
+ taskbarIcon.CloseBalloon();\r
+ }\r
+\r
+ /// <summary>\r
/// If the users hovers over the balloon, we don't close it.\r
/// </summary>\r
private void grid_MouseEnter(object sender, MouseEventArgs e)\r
Popup pp = (Popup)Parent;\r
pp.IsOpen = false;\r
}\r
+\r
+ private void TextBlock_MouseDown(object sender, MouseButtonEventArgs e)\r
+ {\r
+ CloseBalloon();\r
+ if (ClickAction!= null)\r
+ {\r
+ ClickAction();\r
+ } \r
+ \r
+ }\r
+\r
+ public Action ClickAction { get; set; }\r
}\r
}\r
#region Commands
- public void ShowPreferences()
+ public void ShowPreferences()
+ {
+ ShowPreferences(null);
+ }
+
+ public void ShowPreferences(string currentTab)
{
//Settings.Reload();
- var preferences = new PreferencesViewModel(_windowManager,_events, this,Settings);
- _windowManager.ShowDialog(preferences);
+ var preferences = new PreferencesViewModel(_windowManager, _events, this, Settings,currentTab);
+ _windowManager.ShowDialog(preferences);
}
if (Settings.ShowDesktopNotifications)
{
- var tv = (ShellView) GetView();
- var balloon=new PithosBalloon{Title=notification.Title,Message=notification.Message,Icon=icon};
+ var tv = (ShellView) GetView();
+ System.Action clickAction = null;
+ if (notification is ExpirationNotification)
+ {
+ clickAction = ()=>ShowPreferences("AccountTab");
+ }
+ var balloon=new PithosBalloon{Title=notification.Title,Message=notification.Message,Icon=icon,ClickAction=clickAction};
tv.TaskbarView.ShowCustomBalloon(balloon,PopupAnimation.Fade,4000);
// tv.TaskbarView.ShowBalloonTip(notification.Title, notification.Message, icon);
}