Revision 5bcf6d70
b/trunk/Pithos.Client.WPF/App.xaml | ||
---|---|---|
2 | 2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 |
xmlns:local="clr-namespace:Pithos.Client.WPF" |
5 |
xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification"> |
|
5 |
xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification" |
|
6 |
> |
|
6 | 7 |
<Application.Resources> |
7 | 8 |
<ResourceDictionary> |
8 | 9 |
<ResourceDictionary.MergedDictionaries> |
b/trunk/Pithos.Client.WPF/App.xaml.cs | ||
---|---|---|
2 | 2 |
using System.Collections.Generic; |
3 | 3 |
using System.Configuration; |
4 | 4 |
using System.Data; |
5 |
using System.Diagnostics; |
|
5 | 6 |
using System.Linq; |
7 |
using System.Reflection; |
|
6 | 8 |
using System.Windows; |
9 |
using Microsoft.Win32; |
|
10 |
using WPF.Themes; |
|
7 | 11 |
|
8 | 12 |
namespace Pithos.Client.WPF |
9 | 13 |
{ |
... | ... | |
14 | 18 |
{ |
15 | 19 |
public App() |
16 | 20 |
{ |
17 |
InitializeComponent(); |
|
21 |
var extensionController = new ShellExtensionController(); |
|
22 |
extensionController.RegisterExtensions(); |
|
23 |
|
|
24 |
/* |
|
25 |
var appPatth = Assembly.GetExecutingAssembly().Location; |
|
26 |
Registry.LocalMachine.SetValue(@"Software\Pithos\AppPath",appPatth ); |
|
27 |
*/ |
|
28 |
|
|
29 |
InitializeComponent(); |
|
30 |
//Application.Current.ApplyTheme("BureauBlue"); |
|
18 | 31 |
} |
19 | 32 |
} |
20 | 33 |
|
b/trunk/Pithos.Client.WPF/Configuration/PithosSettings.cs | ||
---|---|---|
18 | 18 |
using System.Text; |
19 | 19 |
|
20 | 20 |
[Export(typeof(IPithosSettings))] |
21 |
public class PithosSettings : DynamicObject, IPithosSettings
|
|
21 |
public class PithosSettings : IPithosSettings |
|
22 | 22 |
{ |
23 |
public bool UseDefaultProxy |
|
24 |
{ |
|
25 |
get { return Settings.Default.UseDefaultProxy; } |
|
26 |
set { Settings.Default.UseDefaultProxy = value; } |
|
27 |
} |
|
28 |
|
|
29 |
public bool UseManualProxy |
|
30 |
{ |
|
31 |
get { return Settings.Default.UseManualProxy; } |
|
32 |
set { Settings.Default.UseManualProxy = value; } |
|
33 |
} |
|
34 |
|
|
35 |
public bool UseNoProxy |
|
36 |
{ |
|
37 |
get { return Settings.Default.UseNoProxy; } |
|
38 |
set { Settings.Default.UseNoProxy = value; } |
|
39 |
} |
|
40 |
|
|
23 | 41 |
public string PithosPath |
24 | 42 |
{ |
25 | 43 |
get { return Settings.Default.PithosPath; } |
26 | 44 |
set { Settings.Default.PithosPath = value; } |
27 | 45 |
} |
28 | 46 |
|
47 |
public string PithosSite |
|
48 |
{ |
|
49 |
get { return Settings.Default.PithosSite; } |
|
50 |
} |
|
51 |
|
|
29 | 52 |
public string IconsPath |
30 | 53 |
{ |
31 | 54 |
get { return Settings.Default.IconPath; } |
... | ... | |
56 | 79 |
set { Settings.Default.ProxyServer = value; } |
57 | 80 |
} |
58 | 81 |
|
59 |
public string ProxyPort
|
|
82 |
public int ProxyPort
|
|
60 | 83 |
{ |
61 | 84 |
get { return Settings.Default.ProxyPort; } |
62 | 85 |
set { Settings.Default.ProxyPort = value; } |
... | ... | |
89 | 112 |
set { Settings.Default.ExtensionsActivated = value; } |
90 | 113 |
} |
91 | 114 |
|
115 |
/* |
|
92 | 116 |
public override IEnumerable<string> GetDynamicMemberNames() |
93 | 117 |
{ |
94 | 118 |
return (from SettingsProperty property in Settings.Default.Properties |
... | ... | |
109 | 133 |
result=Settings.Default.Properties[binder.Name]; |
110 | 134 |
return true; |
111 | 135 |
} |
136 |
*/ |
|
112 | 137 |
|
113 | 138 |
public void Save() |
114 | 139 |
{ |
b/trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj | ||
---|---|---|
11 | 11 |
<RootNamespace>Pithos.Client.WPF</RootNamespace> |
12 | 12 |
<AssemblyName>Pithos.Client.WPF</AssemblyName> |
13 | 13 |
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
14 |
<TargetFrameworkProfile> |
|
15 |
</TargetFrameworkProfile> |
|
14 |
<TargetFrameworkProfile>Client</TargetFrameworkProfile> |
|
16 | 15 |
<FileAlignment>512</FileAlignment> |
17 | 16 |
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
18 | 17 |
<WarningLevel>4</WarningLevel> |
... | ... | |
36 | 35 |
<ErrorReport>prompt</ErrorReport> |
37 | 36 |
<WarningLevel>4</WarningLevel> |
38 | 37 |
</PropertyGroup> |
38 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> |
|
39 |
<DebugSymbols>true</DebugSymbols> |
|
40 |
<OutputPath>bin\Debug\</OutputPath> |
|
41 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
42 |
<DebugType>full</DebugType> |
|
43 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
44 |
<CodeAnalysisLogFile>bin\Debug\Pithos.Client.WPF.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile> |
|
45 |
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> |
|
46 |
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> |
|
47 |
<ErrorReport>prompt</ErrorReport> |
|
48 |
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|
49 |
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories> |
|
50 |
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> |
|
51 |
</PropertyGroup> |
|
52 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'"> |
|
53 |
<OutputPath>bin\Release\</OutputPath> |
|
54 |
<DefineConstants>TRACE</DefineConstants> |
|
55 |
<Optimize>true</Optimize> |
|
56 |
<DebugType>pdbonly</DebugType> |
|
57 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
58 |
<CodeAnalysisLogFile>bin\Release\Pithos.Client.WPF.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile> |
|
59 |
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> |
|
60 |
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> |
|
61 |
<ErrorReport>prompt</ErrorReport> |
|
62 |
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|
63 |
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories> |
|
64 |
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> |
|
65 |
</PropertyGroup> |
|
39 | 66 |
<ItemGroup> |
40 | 67 |
<Reference Include="System" /> |
41 | 68 |
<Reference Include="System.ComponentModel.Composition" /> |
42 | 69 |
<Reference Include="System.Configuration.Install" /> |
43 | 70 |
<Reference Include="System.Data" /> |
44 |
<Reference Include="System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
|
|
71 |
<Reference Include="System.Data.SQLite, Version=1.0.74.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
|
45 | 72 |
<SpecificVersion>False</SpecificVersion> |
46 |
<HintPath>..\packages\System.Data.SQLite.1.0.66.1\lib\System.Data.SQLite.DLL</HintPath>
|
|
73 |
<HintPath>..\Libraries\System.Data.SQLite.dll</HintPath>
|
|
47 | 74 |
</Reference> |
48 | 75 |
<Reference Include="System.Drawing" /> |
49 | 76 |
<Reference Include="System.Runtime.Serialization" /> |
... | ... | |
62 | 89 |
<Reference Include="WindowsBase" /> |
63 | 90 |
<Reference Include="PresentationCore" /> |
64 | 91 |
<Reference Include="PresentationFramework" /> |
92 |
<Reference Include="WPF.Themes"> |
|
93 |
<HintPath>..\packages\wpfthemes.0.0.1\lib\WPF.Themes.dll</HintPath> |
|
94 |
</Reference> |
|
65 | 95 |
</ItemGroup> |
66 | 96 |
<ItemGroup> |
67 | 97 |
<ApplicationDefinition Include="App.xaml"> |
... | ... | |
77 | 107 |
</Compile> |
78 | 108 |
<Compile Include="PreferencesViewModel.cs" /> |
79 | 109 |
<Compile Include="ShellExtensionController.cs" /> |
110 |
<Compile Include="TaskbarViewModel.cs" /> |
|
80 | 111 |
<Page Include="MainWindow.xaml"> |
81 | 112 |
<Generator>MSBuild:Compile</Generator> |
82 | 113 |
<SubType>Designer</SubType> |
... | ... | |
99 | 130 |
<SubType>Designer</SubType> |
100 | 131 |
<Generator>MSBuild:Compile</Generator> |
101 | 132 |
</Page> |
102 |
<Page Include="WhistlerBlue.xaml"> |
|
103 |
<Generator>MSBuild:Compile</Generator> |
|
104 |
<SubType>Designer</SubType> |
|
105 |
</Page> |
|
106 | 133 |
</ItemGroup> |
107 | 134 |
<ItemGroup> |
108 | 135 |
<Compile Include="Properties\AssemblyInfo.cs"> |
... | ... | |
172 | 199 |
<Resource Include="Images\General.png" /> |
173 | 200 |
<Resource Include="Images\Network.png" /> |
174 | 201 |
</ItemGroup> |
202 |
<ItemGroup> |
|
203 |
<Resource Include="Images\TraySyncPaused.ico" /> |
|
204 |
</ItemGroup> |
|
175 | 205 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
176 | 206 |
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
177 | 207 |
Other similar extension points exist, see Microsoft.Common.targets. |
b/trunk/Pithos.Client.WPF/PreferencesView.xaml | ||
---|---|---|
2 | 2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 |
xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification" |
5 |
xmlns:cal="http://www.caliburnproject.org" Title="Pithos Preferences" Height="382" Width="445" WindowStartupLocation="CenterScreen" Background="#FFD4D0C8"> |
|
5 |
xmlns:cal="http://www.caliburnproject.org" |
|
6 |
x:Name="TheView" |
|
7 |
Title="Pithos Preferences" Height="382" Width="445" |
|
8 |
ShowInTaskbar="true" |
|
9 |
WindowStartupLocation="CenterScreen" |
|
10 |
Icon="/Pithos.Client.WPF;component/Images/Tray.ico" |
|
11 |
Background="#FFD4D0C8"> |
|
6 | 12 |
<Window.Resources> |
7 | 13 |
<ResourceDictionary> |
8 | 14 |
<ResourceDictionary.MergedDictionaries> |
... | ... | |
10 | 16 |
</ResourceDictionary.MergedDictionaries> |
11 | 17 |
</ResourceDictionary> |
12 | 18 |
</Window.Resources> |
13 |
|
|
19 |
<Window.TaskbarItemInfo> |
|
20 |
<TaskbarItemInfo Description="{Binding StatusMessage}" > |
|
21 |
<TaskbarItemInfo.ThumbButtonInfos> |
|
22 |
<ThumbButtonInfo> |
|
23 |
|
|
24 |
</ThumbButtonInfo> |
|
25 |
</TaskbarItemInfo.ThumbButtonInfos> |
|
26 |
</TaskbarItemInfo> |
|
27 |
</Window.TaskbarItemInfo> |
|
14 | 28 |
<Grid> |
15 | 29 |
<Grid.RowDefinitions> |
16 | 30 |
<RowDefinition Height="*"/> |
17 | 31 |
<RowDefinition Height="Auto"/> |
18 | 32 |
</Grid.RowDefinitions> |
19 | 33 |
|
20 |
<tb:TaskbarIcon x:Name="PithosIcon"
|
|
21 |
IconSource="{Binding StatusIcon}" |
|
34 |
<tb:TaskbarIcon x:Name="TaskbarView"
|
|
35 |
IconSource="{Binding StatusIcon}"
|
|
22 | 36 |
ToolTipText="{Binding StatusMessage}" |
23 |
|
|
37 |
DataContext="{Binding Taskbar}" |
|
24 | 38 |
MenuActivation="LeftOrRightClick" |
25 |
DoubleClickCommand="{Binding OpenPithosFolderCommand}"> |
|
39 |
DoubleClickCommand="{Binding DataContext.Taskbar.OpenPithosFolderCommand,ElementName=TheView}" |
|
40 |
cal:Bind.Model="{Binding DataContext.Taskbar,ElementName=TheView}"> |
|
26 | 41 |
<tb:TaskbarIcon.ContextMenu> |
27 | 42 |
<ContextMenu x:Name="TaskbarMenu" > |
28 |
<MenuItem Header="Open PITHOS Folder" x:Name="OpenPithosFolder" cal:Message.Attach="OpenPithosFolder" /> |
|
43 |
<MenuItem Header="Open PITHOS Folder" x:Name="OpenPithosFolder" cal:Message.Attach="OpenPithosFolder" FontWeight="Bold" />
|
|
29 | 44 |
<MenuItem Header="Launch PITHOS Site" x:Name="GoToSite" cal:Message.Attach="GoToSite" /> |
30 |
<MenuItem Header="Recently Changed Files" x:Name="RecentFiles" ItemsSource="{Binding RecentFiles}"> |
|
45 |
<MenuItem Header="Recently Changed Files" x:Name="Taskbar_RecentFiles" ItemsSource="{Binding RecentFiles}">
|
|
31 | 46 |
<MenuItem.ItemTemplate> |
32 | 47 |
<DataTemplate> |
33 | 48 |
<TextBlock Text="{Binding FileName}"/> |
... | ... | |
39 | 54 |
<Separator /> |
40 | 55 |
<MenuItem Header="{Binding StatusMessage}" x:Name="StatusMessage" /> |
41 | 56 |
<Separator /> |
42 |
<MenuItem Header="Pause Synching" x:Name="ToggleSynching" cal:Message.Attach="ToggleSynching" />
|
|
57 |
<MenuItem Header="{Binding PauseSyncCaption}" x:Name="ToggleSynching" cal:Message.Attach="ToggleSynching" />
|
|
43 | 58 |
<Separator /> |
44 |
<MenuItem Header="Preferences ..." x:Name="ShowPreferences" cal:Message.Attach="ShowPreferences" />
|
|
59 |
<MenuItem Header="Preferences ..." x:Name="ShowPreferences" Click="ShowPreferences_Click" cal:Message.Attach="ShowPreferences" />
|
|
45 | 60 |
<Separator /> |
46 | 61 |
<MenuItem Header="Exit" Name="ExitPithos" cal:Message.Attach="ExitPithos" /> |
47 | 62 |
</ContextMenu> |
... | ... | |
50 | 65 |
|
51 | 66 |
|
52 | 67 |
|
53 |
<TabControl Grid.Row="0">
|
|
54 |
<TabItem > |
|
68 |
<TabControl Grid.Row="0"> |
|
69 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
|
55 | 70 |
<TabItem.Header> |
56 | 71 |
<StackPanel> |
57 | 72 |
<Image Source="/Pithos.Client.WPF;component/Images/General.png" Stretch="Uniform" Height="32"/> |
... | ... | |
65 | 80 |
</StackPanel> |
66 | 81 |
</GroupBox> |
67 | 82 |
</TabItem> |
68 |
<TabItem > |
|
83 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
|
69 | 84 |
<TabItem.Header> |
70 | 85 |
<StackPanel> |
71 | 86 |
<Image Source="/Pithos.Client.WPF;component/Images/Accounts.png" Stretch="Uniform" Height="32"/> |
72 | 87 |
<TextBlock Text="Accounts"/> |
73 | 88 |
</StackPanel> |
74 | 89 |
</TabItem.Header> |
75 |
<StackPanel Orientation="Horizontal"> |
|
90 |
<StackPanel Orientation="Horizontal" VerticalAlignment="Stretch" >
|
|
76 | 91 |
<Grid Margin="5,10,5,5"> |
77 | 92 |
<Grid.RowDefinitions> |
78 | 93 |
<RowDefinition Height="*"/> |
79 | 94 |
<RowDefinition Height="Auto"/> |
80 | 95 |
</Grid.RowDefinitions> |
81 |
<ListBox Name="Settings_Accounts" SelectedItem="{Binding CurrentAccount}" Grid.Row="0" DisplayMemberPath="AccountName" VerticalAlignment="Stretch" > |
|
82 |
|
|
96 |
<ListBox Name="Settings_Accounts" SelectedItem="{Binding CurrentAccount}" Grid.Row="0" |
|
97 |
VerticalAlignment="Stretch" > |
|
98 |
<ListBox.ItemTemplate> |
|
99 |
<DataTemplate> |
|
100 |
<TextBlock Text="{Binding AccountName}"/> |
|
101 |
</DataTemplate> |
|
102 |
</ListBox.ItemTemplate> |
|
83 | 103 |
</ListBox> |
84 | 104 |
<StackPanel Orientation="Horizontal" Grid.Row="1"> |
85 | 105 |
<Button Name="AddAccount" Content="Add" Style="{StaticResource ButtonStyle}" Width="50"/> |
... | ... | |
107 | 127 |
</GroupBox> |
108 | 128 |
</StackPanel> |
109 | 129 |
</TabItem> |
110 |
<TabItem > |
|
130 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
|
111 | 131 |
<TabItem.Header> |
112 | 132 |
<StackPanel> |
113 | 133 |
<Image Source="/Pithos.Client.WPF;component/Images/Bandwidth.png" Stretch="Uniform" Height="32"/> |
... | ... | |
123 | 143 |
</GroupBox> |
124 | 144 |
</StackPanel> |
125 | 145 |
</TabItem> |
126 |
<TabItem > |
|
146 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
|
127 | 147 |
<TabItem.Header> |
128 | 148 |
<StackPanel> |
129 | 149 |
<Image Source="/Pithos.Client.WPF;component/Images/Network.png" Stretch="Uniform" Height="32"/> |
... | ... | |
132 | 152 |
</TabItem.Header> |
133 | 153 |
<GroupBox Header="Proxy Settings" Height="275" Margin="10,5" VerticalAlignment="Top" Width="396"> |
134 | 154 |
<Grid> |
135 |
<RadioButton Content="No Proxy" Margin="5,2,5,2" Height="16" VerticalAlignment="Top"/> |
|
136 |
<RadioButton Content="Use System Defaults" Margin="5,22,5,2" Height="16" VerticalAlignment="Top"/> |
|
137 |
<RadioButton Content="Manual" Margin="5,42,5,2" Height="16" VerticalAlignment="Top"/> |
|
138 |
<Label Content="Proxy Type" Height="28" HorizontalAlignment="Left" Margin="5,56,0,0" Name="label1" VerticalAlignment="Top" Target="{Binding}" /> |
|
139 |
<ComboBox Height="23" HorizontalAlignment="Left" Margin="76,61,0,0" Name="Settings_ProxyType" VerticalAlignment="Top" Width="71"> |
|
140 |
<ComboBoxItem Content="HTTP" IsSelected="True" /> |
|
141 |
<ComboBoxItem Content="SOCKS4" /> |
|
142 |
<ComboBoxItem Content="SOCKS5" /> |
|
143 |
</ComboBox> |
|
144 |
<Label Content="Server" Height="28" HorizontalAlignment="Left" Margin="7,86,0,0" Name="label2" VerticalAlignment="Top" /> |
|
145 |
<TextBox Height="23" HorizontalAlignment="Left" Margin="76,90,0,0" Name="Settings_ProxyServer" VerticalAlignment="Top" Width="162" /> |
|
146 |
<TextBlock Height="23" HorizontalAlignment="Left" Margin="244,90,0,0" Name="textBlock1" Text=":" VerticalAlignment="Top" /> |
|
147 |
<TextBox Height="23" HorizontalAlignment="Left" Margin="254,90,0,0" Name="Settings_ProxyPort" VerticalAlignment="Top" Width="65" /> |
|
148 |
|
|
149 |
<GroupBox Height="109" HorizontalAlignment="Left" Margin="7,119,0,0" Name="groupBox2" VerticalAlignment="Top" Width="373" > |
|
155 |
<RadioButton Name="Settings_UseDefaultProxy" Content="Use System Defaults" Margin="5,6,5,0" Height="16" VerticalAlignment="Top"/> |
|
156 |
<RadioButton Name="Settings_UseManualProxy" Content="Manual" Margin="5,28,5,0" Height="16" VerticalAlignment="Top"/> |
|
157 |
<Label Content="Server" Height="28" HorizontalAlignment="Left" Margin="5,47,0,0" Name="label2" VerticalAlignment="Top" /> |
|
158 |
<TextBox Height="23" HorizontalAlignment="Left" Margin="76,51,0,0" Name="Settings_ProxyServer" VerticalAlignment="Top" Width="162" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}"/> |
|
159 |
<TextBlock Height="23" HorizontalAlignment="Left" Margin="244,51,0,0" Name="textBlock1" Text=":" VerticalAlignment="Top" /> |
|
160 |
<TextBox Height="23" HorizontalAlignment="Left" Margin="254,51,0,0" Name="Settings_ProxyPort" VerticalAlignment="Top" Width="65" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}"/> |
|
161 |
|
|
162 |
<GroupBox Height="109" HorizontalAlignment="Left" Margin="5,80,0,0" Name="groupBox2" VerticalAlignment="Top" Width="373" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}"> |
|
150 | 163 |
<GroupBox.Header> |
151 | 164 |
<CheckBox Content="Proxy requires authentication" Height="16" VerticalAlignment="Top" Name="Settings_ProxyAuthentication" /> |
152 | 165 |
</GroupBox.Header> |
153 |
<Grid> |
|
166 |
<Grid >
|
|
154 | 167 |
<Label Content="Username" Height="28" HorizontalAlignment="Left" Margin="0,6,0,0" Name="label3" VerticalAlignment="Top" /> |
155 | 168 |
<Label Content="Password" Height="28" HorizontalAlignment="Left" Margin="0,32,0,0" Name="label4" VerticalAlignment="Top" /> |
156 |
<TextBox Height="23" HorizontalAlignment="Left" Margin="65,6,0,0" Name="Settings_ProxyUsername" VerticalAlignment="Top" Width="157" /> |
|
157 |
<TextBox Height="23" HorizontalAlignment="Left" Margin="65,37,0,0" Name="Settings_ProxyPassword" VerticalAlignment="Top" Width="157" /> |
|
169 |
<TextBox Height="23" HorizontalAlignment="Left" Margin="65,6,0,0" Name="Settings_ProxyUsername" VerticalAlignment="Top" Width="157" IsEnabled="{Binding IsChecked,ElementName=Settings_ProxyAuthentication}"/>
|
|
170 |
<TextBox Height="23" HorizontalAlignment="Left" Margin="65,37,0,0" Name="Settings_ProxyPassword" VerticalAlignment="Top" Width="157" IsEnabled="{Binding IsChecked,ElementName=Settings_ProxyAuthentication}"/>
|
|
158 | 171 |
</Grid> |
159 | 172 |
</GroupBox> |
160 | 173 |
</Grid> |
161 | 174 |
</GroupBox> |
162 | 175 |
</TabItem> |
163 |
<TabItem > |
|
176 |
<TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
|
|
164 | 177 |
<TabItem.Header> |
165 | 178 |
<StackPanel> |
166 | 179 |
<Image Source="/Pithos.Client.WPF;component/Images/Advanced.png" Stretch="Uniform" Height="32"/> |
... | ... | |
176 | 189 |
</Grid> |
177 | 190 |
</GroupBox> |
178 | 191 |
<CheckBox Content="Activate Shell Extensions" Height="16" HorizontalAlignment="Left" Margin="5" Name="ExtensionsActivated" VerticalAlignment="Top" /> |
192 |
<Button Content="Refresh Overlays" Name="RefreshOverlays" HorizontalAlignment="Left" Margin="5" Style="{StaticResource ButtonStyle}" Width="Auto" /> |
|
179 | 193 |
</StackPanel> |
180 | 194 |
</TabItem> |
181 | 195 |
</TabControl> |
b/trunk/Pithos.Client.WPF/PreferencesView.xaml.cs | ||
---|---|---|
32 | 32 |
{ |
33 | 33 |
this.Hide(); |
34 | 34 |
} |
35 |
|
|
36 |
private void ShowPreferences_Click(object sender, RoutedEventArgs e) |
|
37 |
{ |
|
38 |
this.Show(); |
|
39 |
this.Topmost = true; |
|
40 |
} |
|
35 | 41 |
} |
36 | 42 |
} |
b/trunk/Pithos.Client.WPF/PreferencesViewModel.cs | ||
---|---|---|
9 | 9 |
using System.Diagnostics; |
10 | 10 |
using System.IO; |
11 | 11 |
using System.IO.IsolatedStorage; |
12 |
using System.Net; |
|
12 | 13 |
using System.Runtime.Serialization; |
13 | 14 |
using System.Windows; |
14 | 15 |
using System.Windows.Forms; |
... | ... | |
33 | 34 |
public class PreferencesViewModel : Screen, IShell |
34 | 35 |
{ |
35 | 36 |
|
36 |
private IStatusChecker _statusChecker; |
|
37 | 37 |
|
38 | 38 |
|
39 | 39 |
public IPithosSettings Settings { get; set; } |
... | ... | |
41 | 41 |
|
42 | 42 |
public PithosMonitor Monitor { get; private set; } |
43 | 43 |
|
44 |
public TaskbarViewModel Taskbar { get; set; } |
|
44 | 45 |
|
45 | 46 |
ShellExtensionController _extensionController=new ShellExtensionController(); |
46 | 47 |
|
47 | 48 |
[ImportingConstructor] |
48 |
public PreferencesViewModel(IStatusChecker statusChecker, IPithosSettings settings, PithosMonitor monitor)
|
|
49 |
public PreferencesViewModel(TaskbarViewModel taskbar, IPithosSettings settings, PithosMonitor monitor)
|
|
49 | 50 |
{ |
50 | 51 |
DisplayName = "Pithos Preferences"; |
51 |
_statusChecker = statusChecker; |
|
52 |
|
|
53 |
Taskbar=taskbar; |
|
54 |
Taskbar.Parent = this; |
|
55 |
|
|
52 | 56 |
Settings=settings; |
53 | 57 |
Monitor=monitor; |
54 | 58 |
|
55 |
OpenPithosFolderCommand=new PithosCommand(OpenPithosFolder); |
|
59 |
|
|
56 | 60 |
|
57 | 61 |
|
58 | 62 |
|
59 |
UsageMessage = "Using 15% of 50 GB"; |
|
60 |
RecentFiles.AddRange(new[] |
|
63 |
Taskbar.UsageMessage = "Using 15% of 50 GB";
|
|
64 |
Taskbar.RecentFiles.AddRange(new[]
|
|
61 | 65 |
{ |
62 | 66 |
new FileEntry{FileName="Moo",FullPath=@"e:\Pithos\moo"} , |
63 | 67 |
new FileEntry{FileName="Mee",FullPath=@"e:\Pithos\mee"} |
64 | 68 |
}); |
65 |
StatusMessage = "In Synch"; |
|
66 |
UpdateStatus(); |
|
69 |
Taskbar.StatusMessage = "In Synch";
|
|
70 |
Taskbar.UpdateStatus();
|
|
67 | 71 |
} |
68 | 72 |
protected override void OnViewAttached(object view, object context) |
69 | 73 |
{ |
70 | 74 |
var window = (Window)view; |
75 |
/* |
|
71 | 76 |
window.WindowStartupLocation = WindowStartupLocation.CenterScreen; |
72 | 77 |
window.ShowInTaskbar = false; |
78 |
*/ |
|
73 | 79 |
|
74 | 80 |
base.OnViewAttached(view, context); |
75 | 81 |
} |
... | ... | |
83 | 89 |
base.OnViewLoaded(view); |
84 | 90 |
} |
85 | 91 |
|
92 |
#region Preferences Properties |
|
86 | 93 |
|
87 |
#region Status Properties |
|
88 |
|
|
89 |
private string _statusMessage; |
|
90 |
public string StatusMessage |
|
94 |
private bool _noProxy; |
|
95 |
public bool NoProxy |
|
91 | 96 |
{ |
92 |
get { return _statusMessage; }
|
|
97 |
get { return _noProxy; }
|
|
93 | 98 |
set |
94 | 99 |
{ |
95 |
_statusMessage = value;
|
|
96 |
NotifyOfPropertyChange(() => StatusMessage);
|
|
100 |
_noProxy = value;
|
|
101 |
NotifyOfPropertyChange(()=>NoProxy);
|
|
97 | 102 |
} |
98 | 103 |
} |
99 | 104 |
|
100 |
private string _usageMessage; |
|
101 |
public string UsageMessage |
|
105 |
|
|
106 |
private bool _defaultProxy; |
|
107 |
|
|
108 |
public bool DefaultProxy |
|
102 | 109 |
{ |
103 |
get { return _usageMessage; }
|
|
110 |
get { return _defaultProxy; }
|
|
104 | 111 |
set |
105 | 112 |
{ |
106 |
_usageMessage = value;
|
|
107 |
NotifyOfPropertyChange(() => UsageMessage);
|
|
113 |
_defaultProxy = value;
|
|
114 |
NotifyOfPropertyChange(() => DefaultProxy);
|
|
108 | 115 |
} |
109 | 116 |
} |
110 | 117 |
|
111 |
private readonly IObservableCollection<FileEntry> _recentFiles = new BindableCollection<FileEntry>(); |
|
112 |
public IObservableCollection<FileEntry> RecentFiles |
|
113 |
{ |
|
114 |
get { return _recentFiles; } |
|
115 |
} |
|
116 | 118 |
|
119 |
private bool _manualProxy; |
|
117 | 120 |
|
118 |
private string _statusIcon; |
|
119 |
public string StatusIcon |
|
121 |
public bool ManualProxy |
|
120 | 122 |
{ |
121 |
get { return _statusIcon; }
|
|
123 |
get { return _manualProxy; }
|
|
122 | 124 |
set |
123 | 125 |
{ |
124 |
_statusIcon = value;
|
|
125 |
NotifyOfPropertyChange(()=>StatusIcon);
|
|
126 |
_manualProxy = value;
|
|
127 |
NotifyOfPropertyChange(() => ManualProxy);
|
|
126 | 128 |
} |
127 | 129 |
} |
128 |
|
|
129 | 130 |
#endregion |
130 | 131 |
|
131 |
//public PithosSettings Settings { get; set; } |
|
132 |
|
|
132 |
|
|
133 | 133 |
#region Commands |
134 | 134 |
|
135 | 135 |
|
136 |
public void ShowPreferences() |
|
136 |
/*public void ShowPreferences()
|
|
137 | 137 |
{ |
138 | 138 |
Settings.Reload(); |
139 | 139 |
|
140 | 140 |
var window = (Window)this.GetView(); |
141 | 141 |
window.Show(); |
142 |
} |
|
142 |
}*/
|
|
143 | 143 |
|
144 | 144 |
|
145 |
public PithosCommand OpenPithosFolderCommand { get; private set; } |
|
145 |
/*public PithosCommand OpenPithosFolderCommand { get; private set; }
|
|
146 | 146 |
|
147 | 147 |
public void OpenPithosFolder() |
148 | 148 |
{ |
... | ... | |
158 | 158 |
{ |
159 | 159 |
|
160 | 160 |
} |
161 |
|
|
161 |
*/ |
|
162 | 162 |
public void SaveChanges() |
163 | 163 |
{ |
164 | 164 |
DoSave(); |
... | ... | |
199 | 199 |
} |
200 | 200 |
} |
201 | 201 |
|
202 |
public void ExitPithos() |
|
202 |
/* public void ExitPithos()
|
|
203 | 203 |
{ |
204 | 204 |
Monitor.Stop(); |
205 | 205 |
this.TryClose(); |
206 | 206 |
} |
207 |
*/ |
|
207 | 208 |
|
208 |
#endregion |
|
209 |
|
|
210 |
private AccountSettings _currentAccount; |
|
211 |
public AccountSettings CurrentAccount |
|
209 |
public void AddAccount() |
|
212 | 210 |
{ |
213 |
get { return _currentAccount; } |
|
214 |
set |
|
215 |
{ |
|
216 |
_currentAccount = value; |
|
217 |
NotifyOfPropertyChange(()=>CurrentAccount); |
|
218 |
} |
|
211 |
var newAccount = new AccountSettings(); |
|
212 |
Settings.Accounts.Add(newAccount); |
|
213 |
CurrentAccount = newAccount; |
|
214 |
NotifyOfPropertyChange(()=>Settings); |
|
219 | 215 |
} |
220 | 216 |
|
217 |
public void RemoveAccount() |
|
218 |
{ |
|
219 |
// var idx = Settings.Accounts.IndexOf(CurrentAccount); |
|
220 |
Settings.Accounts.RemoveAll(account => account.AccountName == CurrentAccount.AccountName); |
|
221 |
// Settings.Accounts.RemoveAt(idx); |
|
222 |
CurrentAccount = null; |
|
223 |
NotifyOfPropertyChange(()=>Settings); |
|
224 |
NotifyOfPropertyChange("Settings.Accounts"); |
|
225 |
} |
|
221 | 226 |
|
222 |
private Dictionary<PithosStatus, StatusInfo> iconNames = new List<StatusInfo> |
|
223 |
{ |
|
224 |
new StatusInfo(PithosStatus.InSynch, "All files up to date", "TrayInSynch"), |
|
225 |
new StatusInfo(PithosStatus.Synching, "Synching Files", "TraySynching") |
|
226 |
}.ToDictionary(s => s.Status); |
|
227 |
|
|
228 |
public void UpdateStatus() |
|
227 |
public bool CanRemoveAccount |
|
229 | 228 |
{ |
230 |
var pithosStatus = _statusChecker.GetPithosStatus(); |
|
229 |
get { return (CurrentAccount != null); } |
|
230 |
} |
|
231 | 231 |
|
232 | 232 |
|
233 |
if (iconNames.ContainsKey(pithosStatus)) |
|
234 |
{ |
|
235 |
var info = iconNames[pithosStatus]; |
|
236 |
StatusIcon = String.Format(@"Images/{0}.ico",info.IconName); |
|
237 |
StatusMessage= String.Format("Pithos 1.0\r\n{0}", info.StatusText); |
|
238 |
} |
|
239 |
if (!String.IsNullOrWhiteSpace(Settings.UserName) && |
|
240 |
!String.IsNullOrWhiteSpace(Settings.ApiKey)) |
|
241 |
Monitor.Start(); |
|
242 |
} |
|
243 | 233 |
|
244 |
|
|
245 | 234 |
public bool ExtensionsActivated |
246 | 235 |
{ |
247 | 236 |
get { return Settings.ExtensionsActivated; } |
248 | 237 |
set |
249 | 238 |
{ |
250 | 239 |
if (Settings.ExtensionsActivated == value) |
251 |
return;
|
|
252 |
|
|
240 |
return; |
|
241 |
|
|
253 | 242 |
Settings.ExtensionsActivated = value; |
254 | 243 |
|
255 |
if(value) |
|
244 |
if (value)
|
|
256 | 245 |
_extensionController.RegisterExtensions(); |
257 | 246 |
else |
258 | 247 |
{ |
259 | 248 |
_extensionController.UnregisterExtensions(); |
260 | 249 |
} |
261 |
NotifyOfPropertyChange(()=>ExtensionsActivated);
|
|
250 |
NotifyOfPropertyChange(() => ExtensionsActivated);
|
|
262 | 251 |
} |
263 | 252 |
} |
264 | 253 |
|
254 |
public void RefreshOverlays() |
|
255 |
{ |
|
256 |
this.Monitor.Workflow.RaiseChangeNotification(Settings.PithosPath); |
|
257 |
} |
|
258 |
#endregion |
|
259 |
|
|
260 |
private AccountSettings _currentAccount; |
|
261 |
public AccountSettings CurrentAccount |
|
262 |
{ |
|
263 |
get { return _currentAccount; } |
|
264 |
set |
|
265 |
{ |
|
266 |
_currentAccount = value; |
|
267 |
NotifyOfPropertyChange(()=>CurrentAccount); |
|
268 |
NotifyOfPropertyChange(()=>CanRemoveAccount); |
|
269 |
} |
|
270 |
} |
|
271 |
|
|
272 |
|
|
273 |
|
|
265 | 274 |
/* private void UnregisterExtensions() |
266 | 275 |
{ |
267 | 276 |
using (var installer = new ProjectInstaller()) |
b/trunk/Pithos.Client.WPF/Properties/Settings.Designer.cs | ||
---|---|---|
61 | 61 |
|
62 | 62 |
[global::System.Configuration.UserScopedSettingAttribute()] |
63 | 63 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
64 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
65 |
public string ProxyPort {
|
|
64 |
[global::System.Configuration.DefaultSettingValueAttribute("8080")]
|
|
65 |
public int ProxyPort {
|
|
66 | 66 |
get { |
67 |
return ((string)(this["ProxyPort"]));
|
|
67 |
return ((int)(this["ProxyPort"]));
|
|
68 | 68 |
} |
69 | 69 |
set { |
70 | 70 |
this["ProxyPort"] = value; |
... | ... | |
74 | 74 |
[global::System.Configuration.UserScopedSettingAttribute()] |
75 | 75 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
76 | 76 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
77 |
public string ProxyType { |
|
78 |
get { |
|
79 |
return ((string)(this["ProxyType"])); |
|
80 |
} |
|
81 |
set { |
|
82 |
this["ProxyType"] = value; |
|
83 |
} |
|
84 |
} |
|
85 |
|
|
86 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
87 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
88 |
[global::System.Configuration.DefaultSettingValueAttribute("")] |
|
89 | 77 |
public string ProxyUsername { |
90 | 78 |
get { |
91 | 79 |
return ((string)(this["ProxyUsername"])); |
... | ... | |
157 | 145 |
|
158 | 146 |
[global::System.Configuration.UserScopedSettingAttribute()] |
159 | 147 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
160 |
[global::System.Configuration.DefaultSettingValueAttribute(@" |
|
161 |
<ArrayOfAccountSettings xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> |
|
162 |
<AccountSettings> |
|
163 |
<AccountName>pkanavos</AccountName> |
|
164 |
<ApiKey>9d3cb7b231e96f72ebe96af1c6cd5112</ApiKey> |
|
165 |
<SelectiveFolders /> |
|
166 |
</AccountSettings> |
|
167 |
</ArrayOfAccountSettings> |
|
168 |
")] |
|
169 |
public global::Pithos.Interfaces.AccountsCollection Accounts { |
|
148 |
[global::System.Configuration.DefaultSettingValueAttribute("True")] |
|
149 |
public bool ShowDesktopNotifications { |
|
170 | 150 |
get { |
171 |
return ((global::Pithos.Interfaces.AccountsCollection)(this["Accounts"]));
|
|
151 |
return ((bool)(this["ShowDesktopNotifications"]));
|
|
172 | 152 |
} |
173 | 153 |
set { |
174 |
this["Accounts"] = value;
|
|
154 |
this["ShowDesktopNotifications"] = value;
|
|
175 | 155 |
} |
176 | 156 |
} |
177 | 157 |
|
178 | 158 |
[global::System.Configuration.UserScopedSettingAttribute()] |
179 | 159 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
180 | 160 |
[global::System.Configuration.DefaultSettingValueAttribute("True")] |
181 |
public bool ShowDesktopNotifications {
|
|
161 |
public bool StartOnSystemStartup {
|
|
182 | 162 |
get { |
183 |
return ((bool)(this["ShowDesktopNotifications"]));
|
|
163 |
return ((bool)(this["StartOnSystemStartup"]));
|
|
184 | 164 |
} |
185 | 165 |
set { |
186 |
this["ShowDesktopNotifications"] = value; |
|
166 |
this["StartOnSystemStartup"] = value; |
|
167 |
} |
|
168 |
} |
|
169 |
|
|
170 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
171 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
172 |
[global::System.Configuration.DefaultSettingValueAttribute("False")] |
|
173 |
public bool UseNoProxy { |
|
174 |
get { |
|
175 |
return ((bool)(this["UseNoProxy"])); |
|
176 |
} |
|
177 |
set { |
|
178 |
this["UseNoProxy"] = value; |
|
187 | 179 |
} |
188 | 180 |
} |
189 | 181 |
|
190 | 182 |
[global::System.Configuration.UserScopedSettingAttribute()] |
191 | 183 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
192 | 184 |
[global::System.Configuration.DefaultSettingValueAttribute("True")] |
193 |
public bool StartOnSystemStartup {
|
|
185 |
public bool UseDefaultProxy {
|
|
194 | 186 |
get { |
195 |
return ((bool)(this["StartOnSystemStartup"]));
|
|
187 |
return ((bool)(this["UseDefaultProxy"]));
|
|
196 | 188 |
} |
197 | 189 |
set { |
198 |
this["StartOnSystemStartup"] = value; |
|
190 |
this["UseDefaultProxy"] = value; |
|
191 |
} |
|
192 |
} |
|
193 |
|
|
194 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
195 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
196 |
[global::System.Configuration.DefaultSettingValueAttribute("False")] |
|
197 |
public bool UseManualProxy { |
|
198 |
get { |
|
199 |
return ((bool)(this["UseManualProxy"])); |
|
200 |
} |
|
201 |
set { |
|
202 |
this["UseManualProxy"] = value; |
|
203 |
} |
|
204 |
} |
|
205 |
|
|
206 |
[global::System.Configuration.UserScopedSettingAttribute()] |
|
207 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
208 |
[global::System.Configuration.DefaultSettingValueAttribute(@"<?xml version=""1.0"" encoding=""utf-16""?> |
|
209 |
<ArrayOfAccountSettings xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> |
|
210 |
<AccountSettings> |
|
211 |
<AccountName>pkanavos</AccountName> |
|
212 |
<ApiKey>9d3cb7b231e96f72ebe96af1c6cd5112</ApiKey> |
|
213 |
<SelectiveFolders /> |
|
214 |
</AccountSettings> |
|
215 |
</ArrayOfAccountSettings>")] |
|
216 |
public global::Pithos.Interfaces.AccountsCollection Accounts { |
|
217 |
get { |
|
218 |
return ((global::Pithos.Interfaces.AccountsCollection)(this["Accounts"])); |
|
219 |
} |
|
220 |
set { |
|
221 |
this["Accounts"] = value; |
|
222 |
} |
|
223 |
} |
|
224 |
|
|
225 |
[global::System.Configuration.ApplicationScopedSettingAttribute()] |
|
226 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
227 |
[global::System.Configuration.DefaultSettingValueAttribute("http://pithos.dev.grnet.gr/pithos.html")] |
|
228 |
public string PithosSite { |
|
229 |
get { |
|
230 |
return ((string)(this["PithosSite"])); |
|
199 | 231 |
} |
200 | 232 |
} |
201 | 233 |
} |
b/trunk/Pithos.Client.WPF/Properties/Settings.settings | ||
---|---|---|
11 | 11 |
<Setting Name="ProxyServer" Type="System.String" Scope="User"> |
12 | 12 |
<Value Profile="(Default)" /> |
13 | 13 |
</Setting> |
14 |
<Setting Name="ProxyPort" Type="System.String" Scope="User"> |
|
15 |
<Value Profile="(Default)" /> |
|
16 |
</Setting> |
|
17 |
<Setting Name="ProxyType" Type="System.String" Scope="User"> |
|
18 |
<Value Profile="(Default)" /> |
|
14 |
<Setting Name="ProxyPort" Type="System.Int32" Scope="User"> |
|
15 |
<Value Profile="(Default)">8080</Value> |
|
19 | 16 |
</Setting> |
20 | 17 |
<Setting Name="ProxyUsername" Type="System.String" Scope="User"> |
21 | 18 |
<Value Profile="(Default)" /> |
... | ... | |
35 | 32 |
<Setting Name="ApiKey" Type="System.String" Scope="User"> |
36 | 33 |
<Value Profile="(Default)">9d3cb7b231e96f72ebe96af1c6cd5112</Value> |
37 | 34 |
</Setting> |
38 |
<Setting Name="Accounts" Type="Pithos.Interfaces.AccountsCollection" Scope="User"> |
|
39 |
<Value Profile="(Default)"> |
|
40 |
<ArrayOfAccountSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
41 |
<AccountSettings> |
|
42 |
<AccountName>pkanavos</AccountName> |
|
43 |
<ApiKey>9d3cb7b231e96f72ebe96af1c6cd5112</ApiKey> |
|
44 |
<SelectiveFolders /> |
|
45 |
</AccountSettings> |
|
46 |
</ArrayOfAccountSettings> |
|
47 |
</Value> |
|
48 |
</Setting> |
|
49 | 35 |
<Setting Name="ShowDesktopNotifications" Type="System.Boolean" Scope="User"> |
50 | 36 |
<Value Profile="(Default)">True</Value> |
51 | 37 |
</Setting> |
52 | 38 |
<Setting Name="StartOnSystemStartup" Type="System.Boolean" Scope="User"> |
53 | 39 |
<Value Profile="(Default)">True</Value> |
54 | 40 |
</Setting> |
41 |
<Setting Name="UseNoProxy" Type="System.Boolean" Scope="User"> |
|
42 |
<Value Profile="(Default)">False</Value> |
|
43 |
</Setting> |
|
44 |
<Setting Name="UseDefaultProxy" Type="System.Boolean" Scope="User"> |
|
45 |
<Value Profile="(Default)">True</Value> |
|
46 |
</Setting> |
|
47 |
<Setting Name="UseManualProxy" Type="System.Boolean" Scope="User"> |
|
48 |
<Value Profile="(Default)">False</Value> |
|
49 |
</Setting> |
|
50 |
<Setting Name="Accounts" Type="Pithos.Interfaces.AccountsCollection" Scope="User"> |
|
51 |
<Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?> |
|
52 |
<ArrayOfAccountSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
53 |
<AccountSettings> |
|
54 |
<AccountName>pkanavos</AccountName> |
|
55 |
<ApiKey>9d3cb7b231e96f72ebe96af1c6cd5112</ApiKey> |
|
56 |
<SelectiveFolders /> |
|
57 |
</AccountSettings> |
|
58 |
</ArrayOfAccountSettings></Value> |
|
59 |
</Setting> |
|
60 |
<Setting Name="PithosSite" Type="System.String" Scope="Application"> |
|
61 |
<Value Profile="(Default)">http://pithos.dev.grnet.gr/pithos.html</Value> |
|
62 |
</Setting> |
|
55 | 63 |
</Settings> |
56 | 64 |
</SettingsFile> |
b/trunk/Pithos.Client.WPF/ShellExtensionController.cs | ||
---|---|---|
45 | 45 |
|
46 | 46 |
private static void SaveState(IDictionary state) |
47 | 47 |
{ |
48 |
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
|
|
48 |
using (var store = IsolatedStorageFile.GetUserStoreForAssembly())
|
|
49 | 49 |
using (var file = store.CreateFile("PithosManualInstallFile")) |
50 | 50 |
{ |
51 | 51 |
var serializer = new NetDataContractSerializer(); |
... | ... | |
55 | 55 |
|
56 | 56 |
private static IDictionary LoadState() |
57 | 57 |
{ |
58 |
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
|
|
58 |
using (var store = IsolatedStorageFile.GetUserStoreForAssembly())
|
|
59 | 59 |
{ |
60 | 60 |
if (!store.FileExists("PithosManualInstallFile")) |
61 | 61 |
return new Dictionary<object, object>(); |
b/trunk/Pithos.Client.WPF/TaskbarViewModel.cs | ||
---|---|---|
1 |
๏ปฟ// ----------------------------------------------------------------------- |
|
2 |
// <copyright file="StatusViewModel.cs" company="Microsoft"> |
|
3 |
// TODO: Update copyright text. |
|
4 |
// </copyright> |
|
5 |
// ----------------------------------------------------------------------- |
|
6 |
|
|
7 |
using System.ComponentModel.Composition; |
|
8 |
using System.Diagnostics; |
|
9 |
using System.Windows; |
|
10 |
using Caliburn.Micro; |
|
11 |
using Pithos.Client.WPF.Properties; |
|
12 |
using Pithos.Core; |
|
13 |
using Pithos.Interfaces; |
|
14 |
|
|
15 |
namespace Pithos.Client.WPF |
|
16 |
{ |
|
17 |
using System; |
|
18 |
using System.Collections.Generic; |
|
19 |
using System.Linq; |
|
20 |
using System.Text; |
|
21 |
|
|
22 |
/// <summary> |
|
23 |
/// TODO: Update summary. |
|
24 |
/// </summary> |
|
25 |
[Export] |
|
26 |
public class TaskbarViewModel:ViewAware |
|
27 |
{ |
|
28 |
private IStatusChecker _statusChecker; |
|
29 |
|
|
30 |
public PithosMonitor Monitor { get; private set; } |
|
31 |
|
|
32 |
public IPithosSettings Settings { get; private set; } |
|
33 |
|
|
34 |
public IScreen Parent { get; set; } |
|
35 |
|
|
36 |
[ImportingConstructor] |
|
37 |
public TaskbarViewModel(IStatusChecker statusChecker,PithosMonitor monitor,IPithosSettings settings) |
|
38 |
{ |
|
39 |
OpenPithosFolderCommand = new PithosCommand(OpenPithosFolder); |
|
40 |
_statusChecker = statusChecker; |
|
41 |
Settings = settings; |
|
42 |
Monitor = monitor; |
|
43 |
|
|
44 |
} |
|
45 |
#region Status Properties |
|
46 |
|
|
47 |
private string _statusMessage; |
|
48 |
public string StatusMessage |
|
49 |
{ |
|
50 |
get { return _statusMessage; } |
|
51 |
set |
|
52 |
{ |
|
53 |
_statusMessage = value; |
|
54 |
NotifyOfPropertyChange(() => StatusMessage); |
|
55 |
} |
|
56 |
} |
|
57 |
|
|
58 |
private string _usageMessage; |
|
59 |
public string UsageMessage |
|
60 |
{ |
|
61 |
get { return _usageMessage; } |
|
62 |
set |
|
63 |
{ |
|
64 |
_usageMessage = value; |
|
65 |
NotifyOfPropertyChange(() => UsageMessage); |
|
66 |
} |
|
67 |
} |
|
68 |
|
|
69 |
|
|
70 |
private string _pauseSyncCaption="Pause Syncing"; |
|
71 |
public string PauseSyncCaption |
|
72 |
{ |
|
73 |
get { return _pauseSyncCaption; } |
|
74 |
set |
|
75 |
{ |
|
76 |
_pauseSyncCaption = value; |
|
77 |
NotifyOfPropertyChange(() => PauseSyncCaption); |
|
78 |
} |
|
79 |
} |
|
80 |
|
|
81 |
private readonly IObservableCollection<FileEntry> _recentFiles = new BindableCollection<FileEntry>(); |
|
82 |
public IObservableCollection<FileEntry> RecentFiles |
|
83 |
{ |
|
84 |
get { return _recentFiles; } |
|
85 |
} |
|
86 |
|
|
87 |
|
|
88 |
private string _statusIcon; |
|
89 |
public string StatusIcon |
|
90 |
{ |
|
91 |
get { return _statusIcon; } |
|
92 |
set |
|
93 |
{ |
|
94 |
_statusIcon = value; |
|
95 |
NotifyOfPropertyChange(() => StatusIcon); |
|
96 |
} |
|
97 |
} |
|
98 |
|
|
99 |
#endregion |
|
100 |
|
|
101 |
#region Commands |
|
102 |
|
|
103 |
public void ShowPreferences() |
|
104 |
{ |
|
105 |
Settings.Reload(); |
|
106 |
} |
|
107 |
|
|
108 |
|
|
109 |
public PithosCommand OpenPithosFolderCommand { get; private set; } |
|
110 |
|
|
111 |
public void OpenPithosFolder() |
|
112 |
{ |
|
113 |
Process.Start(Settings.PithosPath); |
|
114 |
} |
|
115 |
|
|
116 |
public void GoToSite() |
|
117 |
{ |
|
118 |
Process.Start(Properties.Settings.Default.PithosSite); |
|
119 |
} |
|
120 |
|
|
121 |
|
|
122 |
public void ToggleSynching() |
|
123 |
{ |
|
124 |
Monitor.Pause = !Monitor.Pause; |
|
125 |
PauseSyncCaption = Monitor.Pause ? "Resume syncing" : "Pause syncing"; |
|
126 |
var iconKey = Monitor.Pause ? "TraySyncPaused" : "TrayInSynch"; |
|
127 |
StatusIcon = String.Format(@"Images/{0}.ico", iconKey); |
|
128 |
} |
|
129 |
|
|
130 |
public void ExitPithos() |
|
131 |
{ |
|
132 |
Monitor.Stop(); |
|
133 |
Parent.TryClose(); |
|
134 |
} |
|
135 |
#endregion |
|
136 |
|
|
137 |
|
|
138 |
private Dictionary<PithosStatus, StatusInfo> iconNames = new List<StatusInfo> |
|
139 |
{ |
|
140 |
new StatusInfo(PithosStatus.InSynch, "All files up to date", "TrayInSynch"), |
|
141 |
new StatusInfo(PithosStatus.Syncing, "Syncing Files", "TraySynching"), |
|
142 |
new StatusInfo(PithosStatus.SyncPaused, "Sync Paused", "TraySyncPaused") |
|
143 |
}.ToDictionary(s => s.Status); |
|
144 |
|
|
145 |
|
|
146 |
public void UpdateStatus() |
|
147 |
{ |
|
148 |
var pithosStatus = _statusChecker.GetPithosStatus(); |
|
149 |
|
|
150 |
if (iconNames.ContainsKey(pithosStatus)) |
|
151 |
{ |
|
152 |
var info = iconNames[pithosStatus]; |
|
153 |
StatusIcon = String.Format(@"Images/{0}.ico", info.IconName); |
|
154 |
StatusMessage = String.Format("Pithos 1.0\r\n{0}", info.StatusText); |
|
155 |
} |
|
156 |
if (!String.IsNullOrWhiteSpace(Settings.UserName) && |
|
157 |
!String.IsNullOrWhiteSpace(Settings.ApiKey)) |
|
158 |
Monitor.Start(); |
|
159 |
} |
|
160 |
} |
|
161 |
} |
/dev/null | ||
---|---|---|
1 |
๏ปฟ<!-- |
|
2 |
// (c) Copyright Microsoft Corporation. |
|
3 |
// This source is subject to Microsoft Public License (Ms-PL). |
|
4 |
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. |
|
5 |
// All other rights reserved. |
|
6 |
--> |
|
7 |
|
|
8 |
<ResourceDictionary |
|
9 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
10 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
11 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
12 |
mc:Ignorable="d" |
|
13 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"> |
|
14 |
|
|
15 |
|
|
16 |
<!-- Color Palette --> |
|
17 |
<SolidColorBrush x:Key="OutsideFontColor" Color="#FF000000"/> |
|
18 |
<SolidColorBrush x:Key="ButtonFontColor" Color="#FF042271"/> |
|
19 |
<Color x:Key="Focus">#FF04CCFF</Color> |
|
20 |
<Color x:Key="HyperlinkFocus">#FF2B54BA</Color> |
|
21 |
<Color x:Key="Calendar">#FF0066CC</Color> |
|
22 |
<Color x:Key="PressStroke1">#FF1D415C</Color> |
|
23 |
<Color x:Key="PressStroke2">#FF2C628B</Color> |
|
24 |
<Color x:Key="TabStroke">#FF4F8BB9</Color> |
|
25 |
<Color x:Key="DataSortArrow">#3F2C628B</Color> |
|
26 |
<!--PressStroke2, 25%--> |
|
27 |
<Color x:Key="DropLocate">#FF6392C8</Color> |
|
28 |
<Color x:Key="TreeviewArrowNorm">#FF76D5FD</Color> |
|
29 |
<Color x:Key="TreeviewArrowOver">#FFC1EFF8</Color> |
|
30 |
<Color x:Key="TreeviewArrowCheck">#FF6380EE</Color> |
|
31 |
<Color x:Key="ExpandArrowStroke">#FF688DC4</Color> |
|
32 |
<Color x:Key="Arrow">#FF425080</Color> |
|
33 |
<Color x:Key="Arrow2">#FF7682E4</Color> |
|
34 |
<Color x:Key="TextBkgSelection">#FF309AFF</Color> |
|
35 |
<Color x:Key="TextboxOver1">#FF5296BD</Color> |
|
36 |
<Color x:Key="TextboxOver2">#FFC2E4F6</Color> |
|
37 |
<Color x:Key="TextboxPress1">#FF3B79AC</Color> |
|
38 |
<Color x:Key="TextboxPress2">#FFB2DBED</Color> |
|
39 |
<Color x:Key="ItemOver1">#FFF4FAFD</Color> |
|
40 |
<Color x:Key="ItemOver2">#FFCFEDFD</Color> |
|
41 |
<Color x:Key="ItemOverStroke">#FFD8F0FA</Color> |
|
42 |
<Color x:Key="ItemSelectStroke">#FF98DDFB</Color> |
|
43 |
<Color x:Key="Over1">#FFE2F5FF</Color> |
|
44 |
<Color x:Key="Over2">#FFC0E7FC</Color> |
|
45 |
<Color x:Key="Over3">#FF9EDDFF</Color> |
|
46 |
<Color x:Key="Press1">#FF759FB6</Color> |
|
47 |
<Color x:Key="Press2">#FFB6E0F6</Color> |
|
48 |
<Color x:Key="Press3">#FF9DD5F4</Color> |
|
49 |
<Color x:Key="PressHighlight">#FF387599</Color> |
|
50 |
<Color x:Key="ButtonHighlightMid">#0095D9FF</Color> |
|
51 |
<Color x:Key="ButtonHighlightMid2">#9935A6E6</Color> |
|
52 |
<!--60%--> |
|
53 |
<Color x:Key="ButtonHighlightMid3">#A535A6E6</Color> |
|
54 |
<!--65%--> |
|
55 |
<Color x:Key="RadioIcon1">#FF90D5E5</Color> |
|
56 |
<Color x:Key="RadioIcon2">#FF28A2D1</Color> |
|
57 |
<Color x:Key="RadioIcon3">#FF1898D1</Color> |
|
58 |
<Color x:Key="RadioIcon4">#FF0F83C7</Color> |
|
59 |
<Color x:Key="RadioIconOver1">#FF1EBEFF</Color> |
|
60 |
<Color x:Key="RadioIconOver2">#FF13A2F3</Color> |
|
61 |
<Color x:Key="RadioIconPress1">#99759FB6</Color> |
|
62 |
<!--Press1, 60%--> |
|
63 |
<Color x:Key="RadioIconPress2">#FF4B8DAF</Color> |
|
64 |
<Color x:Key="RadioStroke">#FF275674</Color> |
|
65 |
<Color x:Key="CheckInnerOver">#FF79C6F9</Color> |
|
66 |
<Color x:Key="CheckInnerOver2">#FFAFDEFD</Color> |
|
67 |
<Color x:Key="CheckInnerPress">#FF5EB6F7</Color> |
|
68 |
<Color x:Key="CheckInnerPress2">#FF90CFFC</Color> |
|
69 |
<Color x:Key="CheckOutterOver">#FF5989A5</Color> |
|
70 |
<Color x:Key="CheckOutterOver2">#FFDEF9FA</Color> |
|
71 |
<Color x:Key="ThumbPress1">#FF6CBBE5</Color> |
|
72 |
<Color x:Key="ThumbPress2">#FF50A1CC</Color> |
|
73 |
<Color x:Key="ExpanderOver1">#FFB1E7FE</Color> |
|
74 |
<Color x:Key="ExpanderOver2">#FFEAFFFF</Color> |
|
75 |
<Color x:Key="ExpanderOver3">#A56EB4F6</Color> |
|
76 |
<Color x:Key="ExpanderMid">#009DD5F4</Color> |
|
77 |
<!--Press3, 0%--> |
|
78 |
<Color x:Key="ExpanderPress1">#FF80CEFF</Color> |
|
79 |
<Color x:Key="ExpanderPress2">#FF2D84CF</Color> |
|
80 |
<Color x:Key="ThumbDivetOver">#E5387599</Color> |
|
81 |
<!--PressHighlight, 20%--> |
|
82 |
<Color x:Key="ThumbDivetFill1">#199DD5F4</Color> |
|
83 |
<!--Press3, 10%--> |
|
84 |
<Color x:Key="ThumbDivetFill2">#33387599</Color> |
|
85 |
<!--PressHighlight, 20%--> |
|
86 |
<!-- End Color Palette--> |
|
87 |
|
|
88 |
|
|
89 |
<!-- Communal Static Resources --> |
|
90 |
<SolidColorBrush x:Key="btnFocus" Color="{StaticResource Focus}"/> |
|
91 |
<SolidColorBrush x:Key="btnPressStroke1" Color="{StaticResource PressStroke1}"/> |
|
92 |
<SolidColorBrush x:Key="btnPressStroke2" Color="{StaticResource PressStroke2}"/> |
|
93 |
|
|
94 |
<LinearGradientBrush x:Key="btnPressBorder" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
95 |
<GradientStop Color="{StaticResource PressStroke1}" Offset="0"/> |
|
96 |
<GradientStop Color="{StaticResource PressStroke2}" Offset="1"/> |
|
97 |
</LinearGradientBrush> |
|
98 |
|
|
99 |
<SolidColorBrush x:Key="hyperlinkPress" Color="{StaticResource HyperlinkFocus}"/> |
|
100 |
<SolidColorBrush x:Key="calendarBtnFill" Color="{StaticResource Over2}"/> |
|
101 |
<SolidColorBrush x:Key="calendarTodayStroke" Color="{StaticResource Calendar}"/> |
|
102 |
<SolidColorBrush x:Key="treeviewArrowUnchecked" Color="{StaticResource TreeviewArrowNorm}"/> |
|
103 |
<SolidColorBrush x:Key="treeviewArrowHover" Color="{StaticResource TreeviewArrowOver}"/> |
|
104 |
<SolidColorBrush x:Key="treeviewArrowChecked" Color="{StaticResource TreeviewArrowCheck}"/> |
|
105 |
|
|
106 |
<SolidColorBrush x:Key="TextBackgroundSelection" Color="{StaticResource TextBkgSelection}"/> |
|
107 |
<SolidColorBrush x:Key="TextBoxOverBrush" Color="{StaticResource TextboxOver1}"/> |
|
108 |
<SolidColorBrush x:Key="TextBoxPressBrush" Color="{StaticResource TextboxPress1}"/> |
|
109 |
|
|
110 |
<LinearGradientBrush x:Key="TextBoxOver" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
111 |
<GradientStop Color="{StaticResource TextboxOver1}" Offset="0"/> |
|
112 |
<GradientStop Color="{StaticResource TextboxOver2}" Offset="0.355"/> |
|
113 |
</LinearGradientBrush> |
|
114 |
<LinearGradientBrush x:Key="TextBoxFocus" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
115 |
<GradientStop Color="{StaticResource TextboxPress1}" Offset="0"/> |
|
116 |
<GradientStop Color="{StaticResource TextboxPress2}" Offset="0.355"/> |
|
117 |
</LinearGradientBrush> |
|
118 |
<LinearGradientBrush x:Key="TextBoxNorm" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
119 |
<GradientStop Color="#FFABAEB3" Offset="0"/> |
|
120 |
<GradientStop Color="#FFE2E8EE" Offset="0.355"/> |
|
121 |
</LinearGradientBrush> |
|
122 |
|
|
123 |
<LinearGradientBrush x:Key="grayGradient" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
124 |
<GradientStop Color="#FFFFFFFF" Offset="0"/> |
|
125 |
<GradientStop Color="#FFEDEDED" Offset="0.171"/> |
|
126 |
<GradientStop Color="#FFE7E7E7" Offset="0.5"/> |
|
127 |
<GradientStop Color="#FFDCDCDC" Offset="0.51"/> |
|
128 |
<GradientStop Color="#FFEAEBEC" Offset="1"/> |
|
129 |
</LinearGradientBrush> |
|
130 |
|
|
131 |
<SolidColorBrush x:Key="hoverStroke" Color="{StaticResource ItemOverStroke}"/> |
|
132 |
<SolidColorBrush x:Key="selectedStroke" Color="{StaticResource ItemSelectStroke}"/> |
|
133 |
|
|
134 |
<LinearGradientBrush x:Key="hoverGradient" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
135 |
<GradientStop Color="{StaticResource ItemOver1}" Offset="0.5"/> |
|
136 |
<GradientStop Color="{StaticResource Over1}" Offset="0.5"/> |
|
137 |
<GradientStop Color="{StaticResource ItemOver2}" Offset="1"/> |
|
138 |
</LinearGradientBrush> |
|
139 |
<LinearGradientBrush x:Key="hoverGradientVertical" EndPoint="1,0.5" StartPoint="0,0.5"> |
|
140 |
<GradientStop Color="{StaticResource ItemOver1}" Offset="0.5"/> |
|
141 |
<GradientStop Color="{StaticResource Over1}" Offset="0.5"/> |
|
142 |
<GradientStop Color="{StaticResource ItemOver2}" Offset="1"/> |
|
143 |
</LinearGradientBrush> |
|
144 |
|
|
145 |
<LinearGradientBrush x:Key="BtnOverFill" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
146 |
<GradientStop Color="{StaticResource Over1}" Offset="0.5"/> |
|
147 |
<GradientStop Color="{StaticResource Over2}" Offset="0.509"/> |
|
148 |
<GradientStop Color="{StaticResource Over3}" Offset="1"/> |
|
149 |
</LinearGradientBrush> |
|
150 |
<LinearGradientBrush x:Key="BtnPressFill" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
151 |
<GradientStop Color="{StaticResource Press1}" Offset="0"/> |
|
152 |
<GradientStop Color="{StaticResource Press2}" Offset="0.152"/> |
|
153 |
<GradientStop Color="{StaticResource Over2}" Offset="0.5"/> |
|
154 |
<GradientStop Color="{StaticResource Press3}" Offset="0.509"/> |
|
155 |
</LinearGradientBrush> |
|
156 |
|
|
157 |
<!-- standard button specific resources --> |
|
158 |
<LinearGradientBrush x:Key="btnOverFillHighlight" EndPoint="1,0.5" StartPoint="0,0.5"> |
|
159 |
<GradientStop Color="{StaticResource ButtonHighlightMid2}" Offset="0"/> |
|
160 |
<GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.101"/> |
|
161 |
<GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.899"/> |
|
162 |
<GradientStop Color="{StaticResource ButtonHighlightMid2}" Offset="1"/> |
|
163 |
</LinearGradientBrush> |
|
164 |
<LinearGradientBrush x:Key="btnPressFillHighlight" EndPoint="1,0.5" StartPoint="0,0.5"> |
|
165 |
<GradientStop Color="{StaticResource PressHighlight}" Offset="0"/> |
|
166 |
<GradientStop Color="{StaticResource ButtonHighlightMid3}" Offset="0.037"/> |
|
167 |
<GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.143"/> |
|
168 |
<GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.857"/> |
|
169 |
<GradientStop Color="{StaticResource ButtonHighlightMid3}" Offset="0.963"/> |
|
170 |
<GradientStop Color="{StaticResource PressHighlight}" Offset="1"/> |
|
171 |
</LinearGradientBrush> |
|
172 |
|
|
173 |
<!-- Radio/Checkbox specific resources --> |
|
174 |
<SolidColorBrush x:Key="checkOverStroke" Color="{StaticResource CheckOutterOver}"/> |
|
175 |
<SolidColorBrush x:Key="checkOverFill" Color="{StaticResource CheckOutterOver2}"/> |
|
176 |
<SolidColorBrush x:Key="checkPressFill" Color="{StaticResource TextboxOver2}"/> |
|
177 |
<SolidColorBrush x:Key="checkInnerOverFill" Color="{StaticResource CheckInnerOver2}"/> |
|
178 |
<SolidColorBrush x:Key="checkInnerPressFill" Color="{StaticResource CheckInnerPress2}"/> |
|
179 |
<SolidColorBrush x:Key="checkIconStroke" Color="{StaticResource Arrow}"/> |
|
180 |
<SolidColorBrush x:Key="radioIconStroke" Color="{StaticResource RadioStroke}"/> |
|
181 |
|
|
182 |
<LinearGradientBrush x:Key="radioIconFill" EndPoint="0.8,0.8" StartPoint="0.3,0.3"> |
|
183 |
<GradientStop Color="{StaticResource RadioIcon1}" Offset="0"/> |
|
184 |
<GradientStop Color="{StaticResource RadioIcon2}" Offset="0.179"/> |
|
185 |
<GradientStop Color="{StaticResource RadioIcon3}" Offset="0.496"/> |
|
186 |
<GradientStop Color="{StaticResource RadioIcon4}" Offset="0.812"/> |
|
187 |
</LinearGradientBrush> |
|
188 |
<LinearGradientBrush x:Key="radioIconFillOver" EndPoint="0.8,0.8" StartPoint="0.3,0.3"> |
|
189 |
<GradientStop Color="{StaticResource Over2}" Offset="0"/> |
|
190 |
<GradientStop Color="{StaticResource Focus}" Offset="0.179"/> |
|
191 |
<GradientStop Color="{StaticResource RadioIconOver1}" Offset="0.496"/> |
|
192 |
<GradientStop Color="{StaticResource RadioIconOver2}" Offset="0.812"/> |
|
193 |
</LinearGradientBrush> |
|
194 |
<LinearGradientBrush x:Key="radioIconFillPress" EndPoint="0.8,0.8" StartPoint="0.3,0.3"> |
|
195 |
<GradientStop Color="{StaticResource RadioIconPress1}" Offset="0"/> |
|
196 |
<GradientStop Color="{StaticResource RadioIconPress2}" Offset="0.317"/> |
|
197 |
<GradientStop Color="{StaticResource PressHighlight}" Offset="0.504"/> |
|
198 |
<GradientStop Color="{StaticResource PressStroke2}" Offset="0.817"/> |
|
199 |
</LinearGradientBrush> |
|
200 |
|
|
201 |
<LinearGradientBrush x:Key="checkInnerOverStroke" EndPoint="0.8,0.8" StartPoint="0.3,0.3"> |
|
202 |
<GradientStop Color="{StaticResource CheckInnerOver}" Offset="0"/> |
|
203 |
<GradientStop Color="{StaticResource ItemOver2}" Offset="1"/> |
|
204 |
</LinearGradientBrush> |
|
205 |
<LinearGradientBrush x:Key="checkInnerPressStroke" EndPoint="0.8,0.8" StartPoint="0.3,0.3"> |
|
206 |
<GradientStop Color="{StaticResource CheckInnerPress}" Offset="0"/> |
|
207 |
<GradientStop Color="{StaticResource Over2}" Offset="1"/> |
|
208 |
</LinearGradientBrush> |
|
209 |
|
|
210 |
<!-- slider specific resources --> |
|
211 |
<LinearGradientBrush x:Key="ThumbOver" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
212 |
<GradientStop Color="#FFFFFFFF" Offset="0"/> |
|
213 |
<GradientStop Color="{StaticResource Over1}" Offset="0.484"/> |
|
214 |
<GradientStop Color="{StaticResource Over2}" Offset="0.493"/> |
|
215 |
<GradientStop Color="{StaticResource Over3}" Offset="1"/> |
|
216 |
</LinearGradientBrush> |
|
217 |
<LinearGradientBrush x:Key="ThumbPress" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
218 |
<GradientStop Color="{StaticResource ItemOver1}" Offset="0"/> |
|
219 |
<GradientStop Color="{StaticResource Press3}" Offset="0.576"/> |
|
220 |
<GradientStop Color="{StaticResource ThumbPress1}" Offset="0.581"/> |
|
221 |
<GradientStop Color="{StaticResource ThumbPress2}" Offset="1"/> |
|
222 |
</LinearGradientBrush> |
|
223 |
|
|
224 |
<!-- datagrid specific resources --> |
|
225 |
<SolidColorBrush x:Key="HeaderSeparator" Color="#FFD7D5D8" /> |
|
226 |
<SolidColorBrush x:Key="GridBorder" Color="#FFD6D7D6" /> |
|
227 |
|
|
228 |
<SolidColorBrush x:Key="dropLocator" Color="{StaticResource DropLocate}" /> |
|
229 |
<LinearGradientBrush x:Key="sortArrow" EndPoint="0.725,0.832" StartPoint="0.275,0.168"> |
|
230 |
<GradientStop Color="{StaticResource PressStroke2}"/> |
|
231 |
<GradientStop Color="{StaticResource DataSortArrow}" Offset="1"/> |
|
232 |
</LinearGradientBrush> |
|
233 |
|
|
234 |
<!-- combobox/datepicker/numericupdown specific resources --> |
|
235 |
<LinearGradientBrush x:Key="ComboTogglePressHighlight" EndPoint="1,0.5" StartPoint="0,0.5"> |
|
236 |
<GradientStop Color="{StaticResource PressHighlight}" Offset="0"/> |
|
237 |
<GradientStop Color="{StaticResource ButtonHighlightMid3}" Offset="0.088"/> |
|
238 |
<GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.221"/> |
|
239 |
<GradientStop Color="{StaticResource ButtonHighlightMid}" Offset="0.779"/> |
|
240 |
<GradientStop Color="{StaticResource ButtonHighlightMid3}" Offset="0.912"/> |
|
241 |
<GradientStop Color="{StaticResource PressHighlight}" Offset="1"/> |
|
242 |
</LinearGradientBrush> |
|
243 |
|
|
244 |
<!-- expander specific resources --> |
|
245 |
<SolidColorBrush x:Key="expanderArrowStroke" Color="{StaticResource ExpandArrowStroke}"/> |
|
246 |
|
|
247 |
<LinearGradientBrush x:Key="ExpanderArrowHoverFill1" EndPoint="0,1" StartPoint="0,0"> |
|
248 |
<GradientStop Color="{StaticResource ItemOver1}" Offset="0"/> |
|
249 |
<GradientStop Color="{StaticResource ExpanderOver1}" Offset="0.52"/> |
|
250 |
<GradientStop Color="{StaticResource Over3}" Offset="0.521"/> |
|
251 |
<GradientStop Color="{StaticResource Over2}" Offset="0.78"/> |
|
252 |
<GradientStop Color="{StaticResource ExpanderOver2}" Offset="1"/> |
|
253 |
</LinearGradientBrush> |
|
254 |
<LinearGradientBrush x:Key="ExpanderArrowHoverFill2" EndPoint="1,0" StartPoint="0,0"> |
|
255 |
<GradientStop Color="{StaticResource ExpanderOver3}" Offset="0"/> |
|
256 |
<GradientStop Color="{StaticResource ExpanderMid}" Offset="0.346"/> |
|
257 |
<GradientStop Color="{StaticResource ExpanderMid}" Offset="0.696"/> |
|
258 |
<GradientStop Color="{StaticResource ExpanderOver3}" Offset="1"/> |
|
259 |
</LinearGradientBrush> |
|
260 |
<LinearGradientBrush x:Key="ExpanderArrowHoverFill3" EndPoint="0,1" StartPoint="0,0"> |
|
261 |
<GradientStop Color="#B9FFFFFF" Offset="0"/> |
|
262 |
<GradientStop Color="#33FFFFFF" Offset="0.51"/> |
|
263 |
<GradientStop Color="#00FFFFFF" Offset="0.52"/> |
|
264 |
</LinearGradientBrush> |
|
265 |
<LinearGradientBrush x:Key="ExpanderArrowPressedFill1" EndPoint="0,1" StartPoint="0,0"> |
|
266 |
<GradientStop Color="{StaticResource ItemOver2}" Offset="0"/> |
|
267 |
<GradientStop Color="{StaticResource ExpanderPress1}" Offset="0.52"/> |
|
268 |
<GradientStop Color="{StaticResource CheckInnerOver}" Offset="0.521"/> |
|
269 |
<GradientStop Color="{StaticResource TreeviewArrowOver}" Offset="1"/> |
|
270 |
</LinearGradientBrush> |
|
271 |
<LinearGradientBrush x:Key="ExpanderArrowPressedFill2" EndPoint="1,0" StartPoint="0,0"> |
|
272 |
<GradientStop Color="{StaticResource ExpanderPress2}" Offset="0"/> |
|
273 |
<GradientStop Color="{StaticResource ExpanderMid}" Offset="0.5"/> |
|
274 |
<GradientStop Color="{StaticResource ExpanderPress2}" Offset="1"/> |
|
275 |
</LinearGradientBrush> |
|
276 |
<LinearGradientBrush x:Key="ExpanderArrowPressedFill3" EndPoint="0,1" StartPoint="0,0"> |
|
277 |
<GradientStop Color="#A5FFFFFF" Offset="0"/> |
|
278 |
<GradientStop Color="#26FFFFFF" Offset="0.506"/> |
|
279 |
<GradientStop Color="#00FFFFFF" Offset="0.521"/> |
|
280 |
</LinearGradientBrush> |
|
281 |
|
|
282 |
<!-- Tab specific resources --> |
|
283 |
<SolidColorBrush x:Key="TabOverStroke" Color="{StaticResource TabStroke}"/> |
|
284 |
|
|
285 |
<!-- Tab vertical (btn over vertical) --> |
|
286 |
<LinearGradientBrush x:Key="VTabOverGradient" EndPoint="1,0.5" StartPoint="0,0.5"> |
|
287 |
<GradientStop Color="{StaticResource Over1}" Offset="0.5"/> |
|
288 |
<GradientStop Color="{StaticResource Over2}" Offset="0.509"/> |
|
289 |
<GradientStop Color="{StaticResource Over3}" Offset="1"/> |
|
290 |
</LinearGradientBrush> |
|
291 |
|
|
292 |
<!-- Scrollbar specific resources --> |
|
293 |
<SolidColorBrush x:Key="ScrollbarBkgNormStroke" Color="#FFA4A4A4"/> |
|
294 |
|
|
295 |
<LinearGradientBrush x:Key="HScrollbarBkgNormFill" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
296 |
<GradientStop Color="#FFEFEFF0" Offset="0.5"/> |
|
297 |
<GradientStop Color="#FFD5D6D8" Offset="0.513"/> |
|
298 |
</LinearGradientBrush> |
|
299 |
<LinearGradientBrush x:Key="HScrollbarBkgOverFill" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
300 |
<GradientStop Color="{StaticResource Over1}" Offset="0.5"/> |
|
301 |
<GradientStop Color="{StaticResource Over2}" Offset="0.513"/> |
|
302 |
</LinearGradientBrush> |
|
303 |
<LinearGradientBrush x:Key="HScrollbarBkgPressFill" EndPoint="0.5,1" StartPoint="0.5,0"> |
|
304 |
<GradientStop Color="{StaticResource Press2}" Offset="0.5"/> |
|
305 |
<GradientStop Color="{StaticResource ThumbPress1}" Offset="0.513"/> |
|
306 |
</LinearGradientBrush> |
|
307 |
<LinearGradientBrush x:Key="VScrollbarBkgNormFill" EndPoint="1,0.5" StartPoint="0,0.5"> |
|
308 |
<GradientStop Color="#FFEFEFF0" Offset="0.5"/> |
|
309 |
<GradientStop Color="#FFD5D6D8" Offset="0.513"/> |
|
310 |
</LinearGradientBrush> |
|
311 |
<LinearGradientBrush x:Key="VScrollbarBkgOverFill" EndPoint="1,0.5" StartPoint="0,0.5"> |
|
312 |
<GradientStop Color="{StaticResource Over1}" Offset="0.5"/> |
|
313 |
<GradientStop Color="{StaticResource Over2}" Offset="0.513"/> |
|
314 |
</LinearGradientBrush> |
|
315 |
<LinearGradientBrush x:Key="VScrollbarBkgPressFill" EndPoint="1,0.5" StartPoint="0,0.5"> |
|
316 |
<GradientStop Color="{StaticResource Press2}" Offset="0.5"/> |
|
317 |
<GradientStop Color="{StaticResource ThumbPress1}" Offset="0.513"/> |
|
318 |
</LinearGradientBrush> |
|
319 |
|
|
320 |
<LinearGradientBrush x:Key="HThumbDivetNormFill" EndPoint="0.5,1" StartPoint="0.5,0.1"> |
|
321 |
<GradientStop Color="#FF979797" Offset="0"/> |
|
322 |
<GradientStop Color="#19979797" Offset="1"/> |
|
323 |
</LinearGradientBrush> |
|
324 |
<LinearGradientBrush x:Key="HThumbDivetNormStroke" EndPoint="0.5,1" StartPoint="0.5,0.1"> |
|
325 |
<GradientStop Color="#B2000000" Offset="0"/> |
|
326 |
<GradientStop Color="#33000000" Offset="1"/> |
|
327 |
</LinearGradientBrush> |
|
328 |
<LinearGradientBrush x:Key="HThumbDivetOverFill" EndPoint="0.5,1" StartPoint="0.5,0.1"> |
|
329 |
<GradientStop Color="{StaticResource Press3}" Offset="0"/> |
|
330 |
<GradientStop Color="{StaticResource ThumbDivetFill1}" Offset="1"/> |
|
331 |
</LinearGradientBrush> |
|
332 |
<LinearGradientBrush x:Key="HThumbDivetOverStroke" EndPoint="0.5,1" StartPoint="0.5,0.1"> |
|
333 |
<GradientStop Color="{StaticResource ThumbDivetOver}" Offset="0"/> |
|
334 |
<GradientStop Color="{StaticResource ThumbDivetFill2}" Offset="1"/> |
|
335 |
</LinearGradientBrush> |
|
336 |
<LinearGradientBrush x:Key="HThumbDivetPressFill" EndPoint="0.5,1" StartPoint="0.5,0.1"> |
|
337 |
<GradientStop Color="{StaticResource RadioIconPress2}" Offset="0"/> |
|
338 |
<GradientStop Color="{StaticResource ThumbDivetFill1}" Offset="1"/> |
|
339 |
</LinearGradientBrush> |
|
340 |
<LinearGradientBrush x:Key="HThumbDivetPressStroke" EndPoint="0.5,1" StartPoint="0.5,0.1"> |
|
341 |
<GradientStop Color="{StaticResource PressStroke1}" Offset="0"/> |
|
342 |
<GradientStop Color="{StaticResource ThumbDivetFill2}" Offset="1"/> |
|
343 |
</LinearGradientBrush> |
|
344 |
<LinearGradientBrush x:Key="VThumbDivetNormFill" EndPoint="1,0.5" StartPoint="0.1,0.5"> |
|
345 |
<GradientStop Color="#FF979797" Offset="0"/> |
|
346 |
<GradientStop Color="#19979797" Offset="1"/> |
|
347 |
</LinearGradientBrush> |
|
348 |
<LinearGradientBrush x:Key="VThumbDivetNormStroke" EndPoint="1,0.5" StartPoint="0.1,0.5"> |
|
349 |
<GradientStop Color="#B2000000" Offset="0"/> |
|
350 |
<GradientStop Color="#33000000" Offset="1"/> |
|
351 |
</LinearGradientBrush> |
|
352 |
<LinearGradientBrush x:Key="VThumbDivetOverFill" EndPoint="1,0.5" StartPoint="0.1,0.5"> |
|
353 |
<GradientStop Color="{StaticResource Press3}" Offset="0"/> |
|
354 |
<GradientStop Color="{StaticResource ThumbDivetFill1}" Offset="1"/> |
|
355 |
</LinearGradientBrush> |
|
356 |
<LinearGradientBrush x:Key="VThumbDivetOverStroke" EndPoint="1,0.5" StartPoint="0.1,0.5"> |
|
357 |
<GradientStop Color="{StaticResource ThumbDivetOver}" Offset="0"/> |
|
358 |
<GradientStop Color="{StaticResource ThumbDivetFill2}" Offset="1"/> |
|
359 |
</LinearGradientBrush> |
|
360 |
<LinearGradientBrush x:Key="VThumbDivetPressFill" EndPoint="1,0.5" StartPoint="0.1,0.5"> |
|
361 |
<GradientStop Color="{StaticResource RadioIconPress2}" Offset="0"/> |
|
362 |
<GradientStop Color="{StaticResource ThumbDivetFill1}" Offset="1"/> |
|
363 |
</LinearGradientBrush> |
|
364 |
<LinearGradientBrush x:Key="VThumbDivetPressStroke" EndPoint="1,0.5" StartPoint="0.1,0.5"> |
|
365 |
<GradientStop Color="{StaticResource PressStroke1}" Offset="0"/> |
|
366 |
<GradientStop Color="{StaticResource ThumbDivetFill2}" Offset="1"/> |
|
367 |
</LinearGradientBrush> |
Also available in: Unified diff