PageRenderTime 10ms CodeModel.GetById 10ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/cs/MiniTwitter-ma/MiniTwitter-ma/modified-files.diff

https://bitbucket.org/ksksts/junk
Unknown | 1126 lines | 1098 code | 28 blank | 0 comment | 0 complexity | 59919cdd510adcca09a82d7135a38b80 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1
  2C:\home\development\projects\bitbucket\junk\cs\MiniTwitter-ma>C:\cygwin\bin\diff.exe -urN -xobj -xbin -xmodified-files.diff MiniTwitter MiniTwitter-ma 
  3diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/Account.cs MiniTwitter-ma/MiniTwitter/Account.cs
  4--- MiniTwitter/MiniTwitter/Account.cs	1970-01-01 09:00:00.000000000 +0900
  5+++ MiniTwitter-ma/MiniTwitter/Account.cs	2010-01-12 22:47:24.183337200 +0900
  6@@ -0,0 +1,90 @@
  7+?using System;
  8+using System.Collections.Generic;
  9+using System.ComponentModel;
 10+using System.Linq;
 11+using System.Text;
 12+using System.Text.RegularExpressions;
 13+using System.Xml.Serialization;
 14+
 15+using MiniTwitter.Net.Twitter;
 16+
 17+namespace MiniTwitter
 18+{
 19+    [Serializable]
 20+    public class Account : PropertyChangedBase, IEditableObject, IEquatable<Account>
 21+    {
 22+        private string username;
 23+
 24+        [XmlAttribute]
 25+        public string Username
 26+        {
 27+            get { return username; }
 28+            set
 29+            {
 30+                if (username != value)
 31+                {
 32+                    username = value;
 33+                    OnPropertyChanged("Username");
 34+                }
 35+            }
 36+        }
 37+
 38+        private string password;
 39+
 40+        [XmlAttribute]
 41+        public string Password
 42+        {
 43+            get { return password; }
 44+            set
 45+            {
 46+                if (password != value)
 47+                {
 48+                    password = value;
 49+                    OnPropertyChanged("Password");
 50+                    OnPropertyChanged("HiddenPassword");
 51+                }
 52+            }
 53+        }
 54+
 55+        [XmlIgnore]
 56+        public string HiddenPassword
 57+        {
 58+            get { return new string('?', password.Length); }
 59+        }
 60+
 61+        private Account copy;
 62+
 63+        public void BeginEdit()
 64+        {
 65+            if (copy == null)
 66+            {
 67+                copy = new Account();
 68+            }
 69+            copy.Username = this.Username;
 70+            copy.Password = this.Password;
 71+        }
 72+
 73+        public void CancelEdit()
 74+        {
 75+            this.Username = copy.Username;
 76+            this.Password = copy.Password;
 77+        }
 78+
 79+        public void EndEdit()
 80+        {
 81+            copy.Username = "";
 82+            copy.Password = "";
 83+        }
 84+
 85+        #region IEquatable<Account> ???
 86+
 87+        public bool Equals(Account other)
 88+        {
 89+            if (other == null)
 90+                return false;
 91+            return username == other.username && password == other.password;
 92+        }
 93+
 94+        #endregion
 95+    }
 96+}
 97diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/App.xaml.cs MiniTwitter-ma/MiniTwitter/App.xaml.cs
 98--- MiniTwitter/MiniTwitter/App.xaml.cs	2010-01-16 19:32:34.890625000 +0900
 99+++ MiniTwitter-ma/MiniTwitter/App.xaml.cs	2010-01-22 22:46:46.156250000 +0900
100@@ -1,4 +1,5 @@
101-?using System;
102+?/* modified by ksksts. see modified-files.diff */
103+using System;
104 using System.Collections.Generic;
105 using System.Configuration;
106 using System.Data;
107@@ -120,7 +121,7 @@
108 
109         private readonly string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), NAME);
110 
111-        public const string VERSION = "1.05.2";
112-        public const string NAME = "MiniTwitter";
113+        public const string VERSION = "1.05.2+20100122";
114+        public const string NAME = "MiniTwitter-ma";
115     }
116 }
117diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/Controls/TextViewer.xaml MiniTwitter-ma/MiniTwitter/Controls/TextViewer.xaml
118--- MiniTwitter/MiniTwitter/Controls/TextViewer.xaml	2010-01-16 19:32:34.906250000 +0900
119+++ MiniTwitter-ma/MiniTwitter/Controls/TextViewer.xaml	2010-01-22 22:27:31.125000000 +0900
120@@ -1,6 +1,7 @@
121-?<UserControl x:Class="MiniTwitter.Controls.TextViewer"
122+?<!-- modified by ksksts. see modified-files.diff -->
123+<UserControl x:Class="MiniTwitter.Controls.TextViewer"
124     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
125     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
126     x:Name="UserControl">
127-    <TextBlock x:Name="TextBlock" TextWrapping="{Binding ElementName=UserControl, Path=TextWrapping}" TextTrimming="{Binding ElementName=UserControl, Path=TextTrimming}"/>
128+    <TextBlock x:Name="TextBlock" TextWrapping="{Binding ElementName=UserControl, Path=TextWrapping}" TextTrimming="{Binding ElementName=UserControl, Path=TextTrimming}" LineHeight="{Binding ElementName=UserControl, Path=LineHeight}" LineStackingStrategy="{Binding ElementName=UserControl, Path=LineStackingStrategy}"/>
129 </UserControl>
130diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/Controls/TextViewer.xaml.cs MiniTwitter-ma/MiniTwitter/Controls/TextViewer.xaml.cs
131--- MiniTwitter/MiniTwitter/Controls/TextViewer.xaml.cs	2010-01-16 19:32:34.921875000 +0900
132+++ MiniTwitter-ma/MiniTwitter/Controls/TextViewer.xaml.cs	2010-01-22 22:33:57.187500000 +0900
133@@ -1,4 +1,5 @@
134-?using System;
135+?/* modified by ksksts. see modified-files.diff */
136+using System;
137 using System.Collections.Generic;
138 using System.Diagnostics;
139 using System.Linq;
140@@ -57,6 +58,24 @@
141         public static readonly DependencyProperty TextTrimmingProperty =
142             DependencyProperty.Register("TextTrimming", typeof(TextTrimming), typeof(TextViewer), new PropertyMetadata(TextTrimming.None));
143 
144+        public double LineHeight
145+        {
146+            get { return (double)GetValue(LineHeightProperty); }
147+            set { SetValue(LineHeightProperty, value); }
148+        }
149+
150+        public static readonly DependencyProperty LineHeightProperty =
151+            DependencyProperty.Register("LineHeight", typeof(double), typeof(TextViewer), new PropertyMetadata(Double.NaN));
152+
153+        public LineStackingStrategy LineStackingStrategy
154+        {
155+            get { return (LineStackingStrategy)GetValue(LineStackingStrategyProperty); }
156+            set { SetValue(LineStackingStrategyProperty, value); }
157+        }
158+
159+        public static readonly DependencyProperty LineStackingStrategyProperty =
160+            DependencyProperty.Register("LineStackingStrategy", typeof(LineStackingStrategy), typeof(TextViewer), new PropertyMetadata(LineStackingStrategy.MaxHeight));
161+
162         private static void TextPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
163         {
164             ((TextViewer)sender).OnTextChanged((string)e.NewValue);
165diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/Controls/TimelineStyleSelector.cs MiniTwitter-ma/MiniTwitter/Controls/TimelineStyleSelector.cs
166--- MiniTwitter/MiniTwitter/Controls/TimelineStyleSelector.cs	2010-01-16 19:32:34.921875000 +0900
167+++ MiniTwitter-ma/MiniTwitter/Controls/TimelineStyleSelector.cs	2010-01-22 22:33:57.140625000 +0900
168@@ -1,4 +1,5 @@
169-?using System;
170+?/* modified by ksksts. see modified-files.diff */
171+using System;
172 using System.Collections.Generic;
173 using System.Linq;
174 using System.Text;
175@@ -26,6 +27,9 @@
176                 case TimelineStyle.List:
177                     style = "List";
178                     break;
179+                case TimelineStyle.Tight:
180+                    style = "Tight";
181+                    break;
182                 default:
183                     return null;
184             }
185diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/MainWindow.xaml MiniTwitter-ma/MiniTwitter/MainWindow.xaml
186--- MiniTwitter/MiniTwitter/MainWindow.xaml	2010-01-16 19:32:34.937500000 +0900
187+++ MiniTwitter-ma/MiniTwitter/MainWindow.xaml	2010-01-22 22:32:28.109375000 +0900
188@@ -1,4 +1,5 @@
189-?<Window x:Class="MiniTwitter.MainWindow"
190+?<!-- modified by ksksts. see modified-files.diff -->
191+<Window x:Class="MiniTwitter.MainWindow"
192     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
193     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
194     xmlns:MiniTwitter="clr-namespace:MiniTwitter"
195@@ -48,9 +49,21 @@
196                 <RowDefinition/>
197             </Grid.RowDefinitions>
198             <TextBlock Grid.Row="0" Text="What's happening?" VerticalAlignment="Center" Style="{DynamicResource HeaderTextBlockStyle}"/>
199-            <TextBlock Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Center"
200-                       Text="{Binding ElementName=TweetTextBox, Path=Text.Length, Converter={StaticResource TextCountConverter}}"
201-                       Style="{DynamicResource CounterTextBlockStyle}"/>
202+            <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
203+                <Button VerticalAlignment="Center" Margin="0,0,6,0" 
204+                        Click="AccountSwitchButton_Click" Style="{DynamicResource ImageButtonStyle}">
205+                    <StackPanel Orientation="Horizontal">
206+                        <Image Margin="0,0,3,0" Style="{DynamicResource ImageStyle}" 
207+                               Source="{Binding ElementName=Window, Path=LoginedUserImageUrl}"
208+                               Visibility="{Binding Source={x:Static MiniTwitter_Properties:Settings.Default}, Path=IsIconVisible, Converter={StaticResource BooleanToVisibilityConverter}}"/>
209+                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Right" 
210+                                   Text="{Binding ElementName=Window, Path=LoginedUserName}"
211+                                   Style="{DynamicResource CurrentAccountTextBlockStyle}"/>
212+                    </StackPanel>
213+                </Button>
214+                <TextBlock Text="{Binding ElementName=TweetTextBox, Path=Text.Length, Converter={StaticResource TextCountConverter}}"
215+                           VerticalAlignment="Center" Style="{DynamicResource CounterTextBlockStyle}"/>
216+            </StackPanel>
217             <TextBox x:Name="TweetTextBox" Grid.Row="1" Margin="0,4.5,0,6" TextWrapping="Wrap" TextChanged="TweetTextBox_TextChanged"
218                      VerticalScrollBarVisibility="Auto" KeyDown="TweetTextBox_KeyDown" PreviewKeyDown="TweetTextBox_PreviewKeyDown"  Style="{DynamicResource TweetTextBoxStyle}">
219                 <TextBox.CommandBindings>
220diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/MainWindow.xaml.cs MiniTwitter-ma/MiniTwitter/MainWindow.xaml.cs
221--- MiniTwitter/MiniTwitter/MainWindow.xaml.cs	2010-01-16 19:32:34.953125000 +0900
222+++ MiniTwitter-ma/MiniTwitter/MainWindow.xaml.cs	2010-01-22 22:33:57.093750000 +0900
223@@ -1,4 +1,5 @@
224-?using System;
225+?/* modified by ksksts. see modified-files.diff */
226+using System;
227 using System.Collections.Generic;
228 using System.Collections.ObjectModel;
229 using System.ComponentModel;
230@@ -74,6 +75,24 @@
231         public static readonly DependencyProperty StatusTextProperty =
232                 DependencyProperty.Register("StatusText", typeof(string), typeof(MainWindow), new PropertyMetadata(App.NAME + " " + App.VERSION));
233 
234+        public string LoginedUserName
235+        {
236+            get { return (string)GetValue(LoginedUserNameProperty); }
237+            set { SetValue(LoginedUserNameProperty, value); }
238+        }
239+
240+        public static readonly DependencyProperty LoginedUserNameProperty =
241+                DependencyProperty.Register("LoginedUserName", typeof(string), typeof(MainWindow));
242+
243+        public string LoginedUserImageUrl
244+        {
245+            get { return (string)GetValue(LoginedUserImageUrlProperty); }
246+            set { SetValue(LoginedUserImageUrlProperty, value); }
247+        }
248+
249+        public static readonly DependencyProperty LoginedUserImageUrlProperty =
250+                DependencyProperty.Register("LoginedUserImageUrl", typeof(string), typeof(MainWindow));
251+       
252         public enum RefreshTarget
253         {
254             All,
255@@ -107,7 +126,7 @@
256             replies.Filters.Add(new Filter { Type = FilterType.RegexText, Pattern = string.Format(@"@{0}[^a-zA-Z_0-9]", client.LoginedUser.ScreenName) });
257             var archive = Timelines.TypeAt(TimelineType.Archive);
258             archive.Filters.Clear();
259-            archive.Filters.Add(new Filter { Type = FilterType.Name, Pattern = Settings.Default.Username });
260+            archive.Filters.Add(new Filter { Type = FilterType.Name, Pattern = client.LoginedUser.Name });
261         }
262 
263         private void InitializeAutoRefresh()
264@@ -207,8 +226,17 @@
265 
266         private void LoginCallback(object state)
267         {
268+            // ??????????????????
269+            Timelines.ClearAll();
270             // ???????????
271-            var result = client.Login(Settings.Default.Username, Settings.Default.Password);
272+            var account = Settings.Default.CurrentAccount;
273+            if (account == null)
274+            {
275+                // ??????????????
276+                this.Invoke(() => StatusText = "???????????????");
277+                return;
278+            }
279+            var result = client.Login(account.Username, account.Password);
280             if (result == null)
281             {
282                 // ????ID?????????
283@@ -222,8 +250,9 @@
284             }
285             else
286             {
287-                // ??????????????????
288-                Timelines.ClearAll();
289+                // ??????????????
290+                this.Invoke(() => LoginedUserName = client.LoginedUser.Name);
291+                this.Invoke(() => LoginedUserImageUrl = client.LoginedUser.ImageUrl);
292                 // ????????
293                 InitializeFilter();
294                 // ???????????????
295@@ -346,7 +375,7 @@
296                         popupWindow.Show(statuses);
297                     }
298                 }
299-                var action = statuses.Any(p => Regex.IsMatch(p.Text, string.Format(@"{0}[^a-zA-Z_0-9]", Settings.Default.Username))) ? SoundAction.Reply : SoundAction.Status;
300+                var action = statuses.Any(p => Regex.IsMatch(p.Text, string.Format(@"{0}[^a-zA-Z_0-9]", client.LoginedUser.Name))) ? SoundAction.Reply : SoundAction.Status;
301                 var sound = Settings.Default.SoundBindings.Where(p => p.IsEnabled && p.Action == action).FirstOrDefault();
302                 if (sound != null)
303                 {
304@@ -460,7 +489,7 @@
305 
306         private void MainWindow_Loaded(object sender, RoutedEventArgs e)
307         {
308-            if (string.IsNullOrEmpty(Settings.Default.Username) || string.IsNullOrEmpty(Settings.Default.Password))
309+            if (Settings.Default.CurrentAccount == null)
310             {
311                 SettingButton_Click(null, null);
312                 return;
313@@ -616,6 +645,29 @@
314             TweetTextBox.Focus();
315         }
316 
317+        private void AccountSwitchButton_Click(object sender, RoutedEventArgs e)
318+        {
319+            var accountMenu = new ContextMenu();
320+            foreach (var account in Settings.Default.Accounts)
321+            {
322+                var item = new MenuItem();
323+                item.Header = account.Username;
324+                item.Tag = accountMenu.Items.Count;
325+                item.Click += (senderItem, eventArgs) =>
326+                {
327+                    Settings.Default.CurrentAccountIndex = (int)((MenuItem)senderItem).Tag;
328+                    Login();
329+                };
330+                accountMenu.Items.Add(item);
331+            }
332+            if (Settings.Default.CurrentAccountIndex >= 0)
333+            {
334+                var item = (MenuItem)accountMenu.Items[Settings.Default.CurrentAccountIndex];
335+                item.IsChecked = true;
336+            }
337+            accountMenu.IsOpen = true;
338+        }
339+
340         private void HomeButton_Click(object sender, RoutedEventArgs e)
341         {
342             Process.Start("http://twitter.com/home");
343@@ -623,6 +675,7 @@
344 
345         private void SettingButton_Click(object sender, RoutedEventArgs e)
346         {
347+            var currentAccount = Settings.Default.CurrentAccount;
348             SettingDialog dialog = new SettingDialog { Owner = this };
349             if (!(dialog.ShowDialog() ?? false))
350             {
351@@ -636,8 +689,9 @@
352             InitializePopupWindow();
353             // ????????????????
354             InitializeKeyboardShortcut();
355-            // ???????????
356-            if (!client.IsLogined)
357+            // ?????????
358+            if (Settings.Default.CurrentAccount != null &&
359+                !Settings.Default.CurrentAccount.Equals(currentAccount))
360             {
361                 // Twitter ?????
362                 Login();
363diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/MiniTwitter.csproj MiniTwitter-ma/MiniTwitter/MiniTwitter.csproj
364--- MiniTwitter/MiniTwitter/MiniTwitter.csproj	2010-01-16 19:32:34.968750000 +0900
365+++ MiniTwitter-ma/MiniTwitter/MiniTwitter.csproj	2010-01-12 22:39:47.402087200 +0900
366@@ -17,10 +17,14 @@
367     <UICulture>ja-JP</UICulture>
368     <TargetFrameworkSubset>Full</TargetFrameworkSubset>
369     <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
370-    <SccProjectName>SAK</SccProjectName>
371-    <SccLocalPath>SAK</SccLocalPath>
372-    <SccAuxPath>SAK</SccAuxPath>
373-    <SccProvider>SAK</SccProvider>
374+    <SccProjectName>
375+    </SccProjectName>
376+    <SccLocalPath>
377+    </SccLocalPath>
378+    <SccAuxPath>
379+    </SccAuxPath>
380+    <SccProvider>
381+    </SccProvider>
382     <PublishUrl>publish\</PublishUrl>
383     <Install>true</Install>
384     <InstallFrom>Disk</InstallFrom>
385@@ -58,11 +62,11 @@
386   <ItemGroup>
387     <Reference Include="Microsoft.WindowsAPICodePack, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
388       <SpecificVersion>False</SpecificVersion>
389-      <HintPath>.\Microsoft.WindowsAPICodePack.dll</HintPath>
390+      <HintPath>..\..\..\..\libraries\WindowsAPICodePack\WindowsAPICodePack\Core\bin\Release\Microsoft.WindowsAPICodePack.dll</HintPath>
391     </Reference>
392     <Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
393       <SpecificVersion>False</SpecificVersion>
394-      <HintPath>.\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
395+      <HintPath>..\..\..\..\libraries\WindowsAPICodePack\WindowsAPICodePack\Shell\bin\Release\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
396     </Reference>
397     <Reference Include="System" />
398     <Reference Include="System.Core">
399@@ -103,6 +107,7 @@
400     </Compile>
401   </ItemGroup>
402   <ItemGroup>
403+    <Compile Include="Account.cs" />
404     <Compile Include="Controls\HyperlinkButton.xaml.cs">
405       <DependentUpon>HyperlinkButton.xaml</DependentUpon>
406     </Compile>
407diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/Properties/Settings.cs MiniTwitter-ma/MiniTwitter/Properties/Settings.cs
408--- MiniTwitter/MiniTwitter/Properties/Settings.cs	2010-01-16 19:32:34.968750000 +0900
409+++ MiniTwitter-ma/MiniTwitter/Properties/Settings.cs	2010-01-22 22:33:57.000000000 +0900
410@@ -1,4 +1,5 @@
411-?using System;
412+?/* modified by ksksts. see modified-files.diff */
413+using System;
414 using System.Collections.Generic;
415 using System.Collections.ObjectModel;
416 using System.ComponentModel;
417@@ -61,15 +62,10 @@
418         /// </summary>
419         public WindowState WindowState { get; set; }
420 
421-        /// <summary>
422-        /// ?????
423-        /// </summary>
424-        public string Username { get; set; }
425-
426-        /// <summary>
427-        /// ?????
428+         /// <summary>
429+        /// ???????????????
430         /// </summary>
431-        public string Password { get; set; }
432+        public int CurrentAccountIndex { get; set; }
433 
434         /// <summary>
435         /// ??????????
436@@ -279,6 +275,30 @@
437         [XmlIgnore]
438         public ObservableCollection<KeywordBinding> KeywordBindings { get; private set; }
439 
440+        [XmlArray("Accounts")]
441+        public Account[] AccountsInternal
442+        {
443+            get { return Accounts.Count != 0 ? Accounts.ToArray() : null; }
444+            set { Accounts = new ObservableCollection<Account>(value ?? Enumerable.Empty<Account>()); }
445+        }
446+
447+        [XmlIgnore]
448+        public ObservableCollection<Account> Accounts { get; private set; }
449+
450+        [XmlIgnore]
451+        public Account CurrentAccount
452+        {
453+            get
454+            {
455+                Account currentAccount = null;
456+                if (CurrentAccountIndex >= 0 && CurrentAccountIndex < Accounts.Count)
457+                {
458+                    currentAccount = Accounts[CurrentAccountIndex];
459+                }
460+                return currentAccount;
461+            }
462+        }
463+
464         [XmlIgnore]
465         public Regex FavoriteRegex { get; set; }
466 
467@@ -321,6 +341,10 @@
468             {
469                 KeywordBindings = new ObservableCollection<KeywordBinding>();
470             }
471+            if (Accounts == null)
472+            {
473+                Accounts = new ObservableCollection<Account>();
474+            }
475             InitializeKeywordRegex();
476         }
477 
478@@ -344,10 +368,6 @@
479                         throw new Exception();
480                     }
481                 }
482-                if (!Default.Password.IsNullOrEmpty())
483-                {
484-                    Default.Password = Encoding.ASCII.GetString(Convert.FromBase64String(Default.Password));
485-                }
486                 if (Default.RefreshReplyTick > 20)
487                 {
488                     Default.RefreshReplyTick = 10;
489@@ -358,6 +378,14 @@
490                     Default.RefreshTick = Math.Min(Default.RefreshTick * 60, 120);
491                     Default.Version = 2;
492                 }
493+                for (int i = 0; i < Default.Accounts.Count; i++)
494+                {
495+                    var account = Default.Accounts[i];
496+                    if (!account.Password.IsNullOrEmpty())
497+                    {
498+                        account.Password = Encoding.ASCII.GetString(Convert.FromBase64String(account.Password));
499+                    }
500+                }
501             }
502             catch
503             {
504@@ -381,9 +409,13 @@
505             {
506                 Directory.CreateDirectory(BaseDirectory);
507             }
508-            if (!Default.Password.IsNullOrEmpty())
509+            for (int i = 0; i < Default.Accounts.Count; i++)
510             {
511-                Default.Password = Convert.ToBase64String(Encoding.ASCII.GetBytes(Default.Password));
512+                var account = Default.Accounts[i];
513+                if (!account.Password.IsNullOrEmpty())
514+                {
515+                    account.Password = Convert.ToBase64String(Encoding.ASCII.GetBytes(account.Password));
516+                }
517             }
518             using (var stream = File.Open(Path.Combine(BaseDirectory, @"Preference.xml"), FileMode.Create, FileAccess.Write, FileShare.None))
519             {
520diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/Resources/Common.xaml MiniTwitter-ma/MiniTwitter/Resources/Common.xaml
521--- MiniTwitter/MiniTwitter/Resources/Common.xaml	2010-01-16 19:32:34.984375000 +0900
522+++ MiniTwitter-ma/MiniTwitter/Resources/Common.xaml	2010-01-22 22:32:27.734375000 +0900
523@@ -1,4 +1,5 @@
524-?<ResourceDictionary
525+?<!-- modified by ksksts. see modified-files.diff -->
526+<ResourceDictionary
527     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
528     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
529     xmlns:System_ComponentModel="clr-namespace:System.ComponentModel;assembly=System"
530@@ -50,6 +51,14 @@
531         </Style.Triggers>
532     </Style>
533 
534+    <Style x:Key="TightMenuItemStyle" TargetType="{x:Type MenuItem}">
535+        <Style.Triggers>
536+            <DataTrigger Binding="{Binding Source={x:Static MiniTwitter_Properties:Settings.Default}, Path=TimelineStyle}" Value="Tight">
537+                <Setter Property="IsChecked" Value="True"/>
538+            </DataTrigger>
539+        </Style.Triggers>
540+    </Style>
541+
542     <Style x:Key="CreatedAtCategoryMenuItemStyle" TargetType="{x:Type MenuItem}">
543         <Style.Triggers>
544             <DataTrigger Binding="{Binding Source={x:Static MiniTwitter_Properties:Settings.Default}, Path=SortCategory}" Value="CreatedAt">
545@@ -90,7 +99,7 @@
546             </DataTrigger>
547         </Style.Triggers>
548     </Style>
549-    
550+
551     <Style x:Key="TimelineTextStyle" TargetType="{x:Type MiniTwitter_Controls:TextViewer}">
552         <Style.Triggers>
553             <DataTrigger Binding="{Binding Path=IsMention}" Value="True">
554@@ -102,6 +111,11 @@
555         </Style.Triggers>
556     </Style>
557 
558+    <Style x:Key="TightTimelineTextStyle" TargetType="{x:Type MiniTwitter_Controls:TextViewer}" BasedOn="{StaticResource TimelineTextStyle}">
559+        <Setter Property="LineHeight" Value="12.0" />
560+        <Setter Property="LineStackingStrategy" Value="BlockLineHeight" />
561+    </Style>
562+
563     <ContextMenu x:Key="TextBoxContextMenu">
564         <MenuItem Header="????(_U)" Command="ApplicationCommands.Undo"/>
565         <Separator/>
566@@ -154,6 +168,7 @@
567             <MenuItem Header="??(_S)" Command="MiniTwitter_Input:Commands.TimelineStyle" CommandParameter="{x:Static MiniTwitter:TimelineStyle.Standard}" Style="{StaticResource StandardMenuItemStyle}"/>
568             <MenuItem Header="????(_B)" Command="MiniTwitter_Input:Commands.TimelineStyle" CommandParameter="{x:Static MiniTwitter:TimelineStyle.Balloon}" Style="{StaticResource BalloonMenuItemStyle}"/>
569             <MenuItem Header="??(_L)" Command="MiniTwitter_Input:Commands.TimelineStyle" CommandParameter="{x:Static MiniTwitter:TimelineStyle.List}" Style="{StaticResource ListMenuItemStyle}"/>
570+            <MenuItem Header="???(_T)" Command="MiniTwitter_Input:Commands.TimelineStyle" CommandParameter="{x:Static MiniTwitter:TimelineStyle.Tight}" Style="{StaticResource TightMenuItemStyle}"/>
571             <Separator/>
572             <MenuItem Header="???????(_I)" IsCheckable="True" IsChecked="{Binding Source={x:Static MiniTwitter_Properties:Settings.Default}, Path=IsIconVisible}"/>
573         </MenuItem>
574diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/Resources/Templates.xaml MiniTwitter-ma/MiniTwitter/Resources/Templates.xaml
575--- MiniTwitter/MiniTwitter/Resources/Templates.xaml	2010-01-16 19:32:34.984375000 +0900
576+++ MiniTwitter-ma/MiniTwitter/Resources/Templates.xaml	2010-01-22 22:32:27.515625000 +0900
577@@ -1,4 +1,5 @@
578-?<ResourceDictionary
579+?<!-- modified by ksksts. see modified-files.diff -->
580+<ResourceDictionary
581     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
582     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
583     xmlns:MiniTwitter="clr-namespace:MiniTwitter"
584@@ -183,7 +184,7 @@
585             </StackPanel>
586         </Grid>
587     </DataTemplate>
588-    
589+
590     <DataTemplate x:Key="BalloonStatusTemplate" DataType="{x:Type MiniTwitter_Net_Twitter:Status}">
591         <Grid Margin="7,7,7,7" SnapsToDevicePixels="True">
592             <Grid.RowDefinitions>
593@@ -436,4 +437,181 @@
594         </Grid>
595     </DataTemplate>
596 
597+    <DataTemplate x:Key="TightStatusTemplate" DataType="{x:Type MiniTwitter_Net_Twitter:Status}">
598+        <Grid Margin="3,3,3,3" SnapsToDevicePixels="True">
599+            <Grid.ColumnDefinitions>
600+                <ColumnDefinition Width="Auto"/>
601+                <ColumnDefinition Width="*"/>
602+            </Grid.ColumnDefinitions>
603+            <Image Width="36" Height="36" Margin="0,0,8,0" Grid.Column="0" VerticalAlignment="Top"
604+                   Source="{Binding Path=Sender.ImageUrl}"
605+                   Visibility="{Binding Source={x:Static MiniTwitter_Properties:Settings.Default}, Path=IsIconVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
606+                <Image.ToolTip>
607+                    <StackPanel MaxWidth="400">
608+                        <TextBlock FontWeight="Bold">
609+                            <TextBlock.Text>
610+                                <MultiBinding StringFormat="{}{0} / {1}">
611+                                    <Binding Path="Sender.Name" />
612+                                    <Binding Path="Sender.Location" />
613+                                </MultiBinding>
614+                            </TextBlock.Text>
615+                        </TextBlock>
616+                        <TextBlock Text="{Binding Path=Sender.Description}" TextWrapping="Wrap" />
617+                    </StackPanel>
618+                </Image.ToolTip>
619+            </Image>
620+            <StackPanel Grid.Column="1">
621+                <StackPanel Orientation="Horizontal">
622+                    <MiniTwitter_Controls:HyperlinkButton Text="{Binding Path=Sender.ScreenName}" ToolTip="{Binding Path=Sender.Name}"
623+                                                          FontWeight="Bold" FontSize="11" HorizontalAlignment="Left" VerticalAlignment="Center"
624+                                                          Command="MiniTwitter_Input:Commands.MoveToUserPage" CommandParameter="{Binding}"/>
625+                    <Image Width="12" Height="12" Margin="3,0,0,0" Visibility="{Binding Path=Sender.Protected, Converter={StaticResource BooleanToVisibilityConverter}}"
626+                           Style="{DynamicResource ProtectImageStyle}"/>
627+                    <Image Width="12" Height="12" Margin="3,0,0,0" Visibility="{Binding Path=IsNewest, Converter={StaticResource BooleanToVisibilityConverter}}"
628+                           Style="{DynamicResource NewImageStyle}"/>
629+                </StackPanel>
630+                <MiniTwitter_Controls:TextViewer Text="{Binding Path=Text}" Style="{StaticResource TightTimelineTextStyle}"/>
631+                <WrapPanel>
632+                    <MiniTwitter_Controls:HyperlinkButton Text="{Binding Path=RelativeTime}" FontSize="10" Margin="0,0,3,0" VerticalAlignment="Center"
633+                                                          Command="MiniTwitter_Input:Commands.MoveToStatusPage" CommandParameter="{Binding}">
634+                        <MiniTwitter_Controls:HyperlinkButton.ToolTip>
635+                            <TextBlock Text="{Binding Path=CreatedAt, StringFormat=yyyy/MM/dd HH:mm:ss}"/>
636+                        </MiniTwitter_Controls:HyperlinkButton.ToolTip>
637+                    </MiniTwitter_Controls:HyperlinkButton>
638+                    <TextBlock Margin="0,0,3,0" FontSize="10" VerticalAlignment="Center" Text="{Binding Path=Source, StringFormat=from \{0\}}"/>
639+                    <Button Margin="0,0,3,0" Padding="0" Visibility="{Binding Path=IsAuthor, Converter={StaticResource BooleanToVisibilityConverter}}"
640+                            Command="MiniTwitter_Input:Commands.Delete" CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
641+                        <Image Width="14" Height="14" Style="{DynamicResource CrossImageStyle}"/>
642+                    </Button>
643+                    <Button Margin="0,0,3,0" Padding="0" Command="MiniTwitter_Input:Commands.Favorite"
644+                            CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
645+                        <Image Width="14" Height="14" Style="{DynamicResource FavoriteImageStyle}"/>
646+                    </Button>
647+                    <Button Margin="0,0,3,0" Padding="0" Command="MiniTwitter_Input:Commands.Reply" ToolTip="Reply"
648+                            CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
649+                        <Image Width="14" Height="14" Style="{DynamicResource ArrowReplyImageStyle}"/>
650+                    </Button>
651+                    <Button Margin="0,0,3,0" Padding="0" Command="MiniTwitter_Input:Commands.ReTweet" ToolTip="?????? ReTweet"
652+                            CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
653+                        <Image Width="14" Height="14" Style="{DynamicResource ArrowReTweetImageStyle}"/>
654+                    </Button>
655+                </WrapPanel>
656+            </StackPanel>
657+        </Grid>
658+    </DataTemplate>
659+
660+    <DataTemplate x:Key="TightReTweetTemplate" DataType="{x:Type MiniTwitter_Net_Twitter:Status}">
661+        <Grid Margin="3,3,3,3" SnapsToDevicePixels="True">
662+            <Grid.ColumnDefinitions>
663+                <ColumnDefinition Width="Auto"/>
664+                <ColumnDefinition Width="*"/>
665+            </Grid.ColumnDefinitions>
666+            <Grid Width="36" Height="36" Margin="0,0,8,0" Grid.Column="0" VerticalAlignment="Top"
667+                  Visibility="{Binding Source={x:Static MiniTwitter_Properties:Settings.Default}, Path=IsIconVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
668+                <Image Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Left" Source="{Binding Path=ReTweetedStatus.Sender.ImageUrl}">
669+                    <Image.ToolTip>
670+                        <StackPanel MaxWidth="400">
671+                            <TextBlock FontWeight="Bold">
672+                            <TextBlock.Text>
673+                                <MultiBinding StringFormat="{}{0} / {1}">
674+                                    <Binding Path="ReTweetedStatus.Sender.Name" />
675+                                    <Binding Path="ReTweetedStatus.Sender.Location" />
676+                                </MultiBinding>
677+                            </TextBlock.Text>
678+                            </TextBlock>
679+                            <TextBlock Text="{Binding Path=ReTweetedStatus.Sender.Description}" TextWrapping="Wrap" />
680+                        </StackPanel>
681+                    </Image.ToolTip>
682+                </Image>
683+                <Image Width="12" Height="12" VerticalAlignment="Bottom" HorizontalAlignment="Right" Source="{Binding Path=Sender.ImageUrl}">
684+                    <Image.ToolTip>
685+                        <StackPanel MaxWidth="400">
686+                            <TextBlock FontWeight="Bold">
687+                            <TextBlock.Text>
688+                                <MultiBinding StringFormat="{}{0} / {1}">
689+                                    <Binding Path="Sender.Name" />
690+                                    <Binding Path="Sender.Location" />
691+                                </MultiBinding>
692+                            </TextBlock.Text>
693+                            </TextBlock>
694+                            <TextBlock Text="{Binding Path=Sender.Description}" TextWrapping="Wrap" />
695+                        </StackPanel>
696+                    </Image.ToolTip>
697+                </Image>
698+            </Grid>
699+            <StackPanel Grid.Column="1">
700+                <StackPanel Orientation="Horizontal">
701+                    <MiniTwitter_Controls:HyperlinkButton Text="{Binding Path=Sender.ScreenName}" ToolTip="{Binding Path=Sender.Name}"
702+                                                          FontWeight="Bold" FontSize="11" HorizontalAlignment="Left" VerticalAlignment="Center"
703+                                                          Command="MiniTwitter_Input:Commands.MoveToUserPage" CommandParameter="{Binding}"/>
704+                    <Image Width="12" Height="12" Margin="3,0,0,0" Visibility="{Binding Path=Sender.Protected, Converter={StaticResource BooleanToVisibilityConverter}}"
705+                           Style="{DynamicResource ProtectImageStyle}"/>
706+                    <Image Width="12" Height="12" Margin="3,0,0,0" Visibility="{Binding Path=IsNewest, Converter={StaticResource BooleanToVisibilityConverter}}"
707+                           Style="{DynamicResource NewImageStyle}"/>
708+                </StackPanel>
709+                <MiniTwitter_Controls:TextViewer Text="{Binding Path=Text}" Style="{StaticResource TightTimelineTextStyle}"/>
710+                <WrapPanel>
711+                    <MiniTwitter_Controls:HyperlinkButton Text="{Binding Path=RelativeTime}" FontSize="10" Margin="0,0,3,0" VerticalAlignment="Center"
712+                                                          Command="MiniTwitter_Input:Commands.MoveToStatusPage" CommandParameter="{Binding}">
713+                        <MiniTwitter_Controls:HyperlinkButton.ToolTip>
714+                            <TextBlock Text="{Binding Path=CreatedAt, StringFormat=yyyy/MM/dd HH:mm:ss}"/>
715+                        </MiniTwitter_Controls:HyperlinkButton.ToolTip>
716+                    </MiniTwitter_Controls:HyperlinkButton>
717+                    <TextBlock Margin="0,0,3,0" FontSize="10" VerticalAlignment="Center" Text="{Binding Path=Source, StringFormat=from \{0\}}"/>
718+                    <Button Margin="0,0,3,0" Padding="0" Visibility="{Binding Path=IsAuthor, Converter={StaticResource BooleanToVisibilityConverter}}"
719+                            Command="MiniTwitter_Input:Commands.Delete" CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
720+                        <Image Width="14" Height="14" Style="{DynamicResource CrossImageStyle}"/>
721+                    </Button>
722+                    <Button Margin="0,0,3,0" Padding="0" Command="MiniTwitter_Input:Commands.Favorite"
723+                            CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
724+                        <Image Width="14" Height="14" Style="{DynamicResource FavoriteImageStyle}"/>
725+                    </Button>
726+                    <Button Margin="0,0,3,0" Padding="0" Command="MiniTwitter_Input:Commands.Reply" ToolTip="Reply"
727+                            CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
728+                        <Image Width="14" Height="14" Style="{DynamicResource ArrowReplyImageStyle}"/>
729+                    </Button>
730+                    <Button Margin="0,0,3,0" Padding="0" Command="MiniTwitter_Input:Commands.ReTweet" ToolTip="?????? ReTweet"
731+                            CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
732+                        <Image Width="14" Height="14" Style="{DynamicResource ArrowReTweetImageStyle}"/>
733+                    </Button>
734+                </WrapPanel>
735+            </StackPanel>
736+        </Grid>
737+    </DataTemplate>
738+
739+    <DataTemplate x:Key="TightMessageTemplate" DataType="{x:Type MiniTwitter_Net_Twitter:DirectMessage}">
740+        <Grid Margin="3,3,3,3" SnapsToDevicePixels="True">
741+            <Grid.ColumnDefinitions>
742+                <ColumnDefinition Width="Auto"/>
743+                <ColumnDefinition Width="*"/>
744+            </Grid.ColumnDefinitions>
745+            <Grid Width="36" Height="36" Margin="0,0,8,0" Grid.Column="0" VerticalAlignment="Top"
746+                  Visibility="{Binding Source={x:Static MiniTwitter_Properties:Settings.Default}, Path=IsIconVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
747+                <Image Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Left" Source="{Binding Path=Sender.ImageUrl}" ToolTip="{Binding Path=Sender.Name}"/>
748+                <Image Width="12" Height="12" VerticalAlignment="Bottom" HorizontalAlignment="Right" Source="{Binding Path=Recipient.ImageUrl}" ToolTip="{Binding Path=Recipient.Name}"/>
749+            </Grid>
750+            <StackPanel Grid.Column="1">
751+                <StackPanel Orientation="Horizontal">
752+                    <MiniTwitter_Controls:HyperlinkButton Text="{Binding Path=Sender.ScreenName}" ToolTip="{Binding Path=Sender.Name}" FontWeight="Bold" FontSize="11" HorizontalAlignment="Left" VerticalAlignment="Center" Command="MiniTwitter_Input:Commands.MoveToUserPage" CommandParameter="{Binding}"/>
753+                    <Image Width="12" Height="12" Margin="3,0,0,0" Visibility="{Binding Path=Sender.Protected, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{DynamicResource ProtectImageStyle}"/>
754+                    <Image Width="12" Height="12" Margin="3,0,0,0" Visibility="{Binding Path=IsNewest, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{DynamicResource NewImageStyle}"/>
755+                </StackPanel>
756+                <MiniTwitter_Controls:TextViewer Text="{Binding Path=Text}" Style="{StaticResource TightTimelineTextStyle}"/>
757+                <WrapPanel>
758+                    <TextBlock Text="{Binding Path=RelativeTime}" FontSize="10" Margin="0,0,3,0" VerticalAlignment="Center">
759+                        <TextBlock.ToolTip>
760+                            <TextBlock Text="{Binding Path=CreatedAt, StringFormat=yyyy/MM/dd HH:mm:ss}"/>
761+                        </TextBlock.ToolTip>
762+                    </TextBlock>
763+                    <Button Margin="0,0,3,0" Padding="0" Command="MiniTwitter_Input:Commands.Delete" CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
764+                        <Image Width="14" Height="14" Style="{DynamicResource CrossImageStyle}"/>
765+                    </Button>
766+                    <Button Margin="0,0,3,0" Padding="0" Command="MiniTwitter_Input:Commands.ReplyMessage" CommandParameter="{Binding}" Style="{DynamicResource ImageButtonStyle}">
767+                        <Image Width="14" Height="14" Style="{DynamicResource ArrowReplyImageStyle}"/>
768+                    </Button>
769+                </WrapPanel>
770+            </StackPanel>
771+        </Grid>
772+    </DataTemplate>
773+
774 </ResourceDictionary>
775\ No newline at end of file
776diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/SettingDialog.xaml MiniTwitter-ma/MiniTwitter/SettingDialog.xaml
777--- MiniTwitter/MiniTwitter/SettingDialog.xaml	2010-01-16 19:32:35.000000000 +0900
778+++ MiniTwitter-ma/MiniTwitter/SettingDialog.xaml	2010-01-22 22:32:26.015625000 +0900
779@@ -1,4 +1,5 @@
780-?<Window
781+?<!-- modified by ksksts. see modified-files.diff -->
782+<Window
783     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
784     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
785     xmlns:MiniTwitter="clr-namespace:MiniTwitter"
786@@ -103,11 +104,34 @@
787             <Button Content="?????" Width="90" IsCancel="True" Click="CancelButton_Click"/>
788         </StackPanel>
789         <Canvas Grid.Column="2" Grid.Row="0" Visibility="{Binding Path=IsSelected, ElementName=AccountListBoxItem, Converter={StaticResource BooleanToVisibilityConverter}}">
790-            <TextBlock Text="?????" TextWrapping="Wrap" Canvas.Left="14" Canvas.Top="17"/>
791-            <TextBlock Text="?????" TextWrapping="Wrap" Canvas.Left="14" Canvas.Top="45"/>
792-            <TextBox Width="200" InputMethod.IsInputMethodEnabled="False" Canvas.Left="110" Canvas.Top="14" Text="{Binding Path=Username}"/>
793-            <PasswordBox x:Name="PasswordBox" Width="200" Canvas.Left="110" Canvas.Top="42"/>
794-        </Canvas>
795+            <ListView x:Name="AccountListView" Width="347" Height="162" IsSynchronizedWithCurrentItem="True" SelectedIndex="0"
796+                      VerticalContentAlignment="Center" Canvas.Left="14" Canvas.Top="14" SelectionChanged="AccountListView_SelectionChanged">
797+                <ListView.View>
798+                    <GridView AllowsColumnReorder="False">
799+                        <GridViewColumn Header="?????" Width="120">
800+                            <GridViewColumn.CellTemplate>
801+                                <DataTemplate>
802+                                    <TextBlock Text="{Binding Path=Username}" Margin="4,0,0,0" VerticalAlignment="Center"/>
803+                                </DataTemplate>
804+                            </GridViewColumn.CellTemplate>
805+                        </GridViewColumn>
806+                        <GridViewColumn Header="?????" Width="180">
807+                            <GridViewColumn.CellTemplate>
808+                                <DataTemplate>
809+                                    <TextBlock Text="{Binding Path=HiddenPassword}" Margin="4,0,0,0" VerticalAlignment="Center"/>
810+                                </DataTemplate>
811+                            </GridViewColumn.CellTemplate>
812+                        </GridViewColumn>
813+                    </GridView>
814+                </ListView.View>
815+            </ListView>
816+            <TextBlock Text="?????" TextWrapping="Wrap" Canvas.Left="14" Canvas.Top="185"/>
817+            <TextBlock Text="?????" TextWrapping="Wrap" Canvas.Left="14" Canvas.Top="213"/>
818+            <TextBox x:Name="EditingUsernameBox" Width="251" InputMethod.IsInputMethodEnabled="False" Canvas.Left="110" Canvas.Top="182"/>
819+            <PasswordBox x:Name="EditingPasswordBox" Width="251" InputMethod.IsInputMethodEnabled="False" Canvas.Left="110" Canvas.Top="210"/>
820+            <Button x:Name="AddAccountButton" Content="??" Width="75" Canvas.Left="128" Canvas.Top="238" Click="AddAccountButton_Click" />
821+            <Button x:Name="UpdateAccountButton" Content="??" Width="75" Canvas.Left="207" Canvas.Top="238" Click="UpdateAccountButton_Click" />
822+            <Button x:Name="DeleteAccountButton" Content="??" Width="75" Canvas.Left="286" Canvas.Top="238" Click="DeleteAccountButton_Click" />        </Canvas>
823         <Canvas Grid.Column="2" Grid.Row="0" Visibility="{Binding Path=IsSelected, ElementName=NetworkListBoxItem, Converter={StaticResource BooleanToVisibilityConverter}}">
824             <CheckBox x:Name="UseProxyCheckBox" Content="????????????" Canvas.Left="14" Canvas.Top="14" IsChecked="{Binding Path=UseProxy}"/>
825             <CheckBox x:Name="UseIEProxyCheckBox" Content="Internet Explorer ????????" Canvas.Left="14" Canvas.Top="36" IsChecked="{Binding Path=UseIEProxy}" IsEnabled="{Binding Path=IsChecked, ElementName=UseProxyCheckBox}"/>
826diff -urN -xobj -xbin -xmodified-files.diff MiniTwitter/MiniTwitter/SettingDialog.xaml.cs MiniTwitter-ma/MiniTwitter/SettingDialog.xaml.cs
827--- MiniTwitter/MiniTwitter/SettingDialog.xaml.cs	2010-01-16 19:32:35.015625000 +0900
828+++ MiniTwitter-ma/MiniTwitter/SettingDialog.xaml.cs	2010-01-22 22:33:56.953125000 +0900
829@@ -1,4 +1,5 @@
830-?using System;
831+?/* modified by ksksts. see modified-files.diff */
832+using System;
833 using System.Collections.Generic;
834 using System.Collections.ObjectModel;
835 using System.Linq;
836@@ -35,6 +36,7 @@
837         private ObservableCollection<MiniTwitter.Input.KeyBinding> keyBindings;
838         private ObservableCollection<SoundBinding> soundBindings;
839         private ObservableCollection<KeywordBinding> keywordBindings;
840+        private ObservableCollection<Account> accounts;
841 
842         private static readonly PopupLocation[] locations = new[]
843         {
844@@ -61,8 +63,7 @@
845         {
846             // ??????????????????
847             Settings settings = Settings.Default;
848-            // ???????????????
849-            PasswordBox.Password = settings.Password;
850+            // ?????????
851             ProxyPasswordBox.Password = settings.ProxyPassword;
852             // ??????????????
853             var array = Enum.GetValues(typeof(KeyAction));
854@@ -85,6 +86,15 @@
855             keywordBindings = new ObservableCollection<KeywordBinding>(settings.KeywordBindings ?? Enumerable.Empty<KeywordBinding>());
856             keywordBindings.BeginEdit();
857             KeywordListView.ItemsSource = keywordBindings;
858+            // ???????
859+            accounts = new ObservableCollection<Account>(settings.Accounts ?? Enumerable.Empty<Account>());
860+            accounts.BeginEdit();
861+            AccountListView.ItemsSource = accounts;
862+            // ???????????????
863+            if (settings.CurrentAccountIndex < AccountListView.Items.Count)
864+            {
865+                AccountListView.SelectedIndex = settings.CurrentAccountIndex;
866+            }
867             // ??????????
868             TweetFooterComboBox.ItemsSource = settings.TweetFooterHistory;
869             BindingGroup.BeginEdit();
870@@ -97,7 +107,6 @@
871             // ?????????????????
872             Settings settings = Settings.Default;
873             // ????????
874-            settings.Password = PasswordBox.Password;
875             settings.ProxyPassword = ProxyPasswordBox.Password;
876             // ???????????????
877             if (KeyMappingComboBox.SelectedValue != null)
878@@ -121,11 +130,19 @@
879             {
880                 settings.KeywordBindings.Add(item);
881             }
882+            // ??????????
883+            settings.Accounts.Clear();
884+            foreach (var item in accounts)
885+            {
886+                settings.Accounts.Add(item);
887+            }
888             // ??????????????
889             if (!settings.TweetFooter.IsNullOrEmpty() && !settings.TweetFooterHistory.Contains(settings.TweetFooter))
890             {
891                 settings.TweetFooterHistory.Add(settings.TweetFooter);
892             }
893+            // ??????????????????
894+            settings.CurrentAccountIndex = AccountListView.SelectedIndex;
895             DialogResult = true;
896         }
897 
898@@ -135,9 +152,58 @@
899             keyBindings.CancelEdit();
900             soundBindings.CancelEdit();
901             keywordBindings.CancelEdit();
902+            accounts.CancelEdit();
903             DialogResult = false;
904         }
905 
906+        private void AccountListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
907+        {
908+            var item = (Account)AccountListView.SelectedItem;
909+            EditingUsernameBox.Text = item != null ? item.Username : "";
910+            EditingPasswordBox.Password = item != null ? item.Password : "";
911+            UpdateAccountButton.IsEnabled = item != null;
912+            DeleteAccountButton.IsEnabled = item != null;
913+        }
914+
915+        private void AddAccountButton_Click(object sender, RoutedEventArgs e)
916+        {
917+            var username = EditingUsernameBox.Text;
918+            var password = EditingPasswordBox.Password;
919+            if (username.IsNullOrEmpty() || password.IsNullOrEmpty())
920+            {
921+                return;
922+            }
923+            var account = new Account { Username = username, Password = password };
924+            accounts.Add(account);
925+        }
926+
927+        private void UpdateAccountButton_Click(object sender, RoutedEventArgs e)
928+        …

Large files files are truncated, but you can click here to view the full file