Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass required dependencies in the constructor

  • Loading branch information...
commit b04a7e82d5db1fb7f61c22b240d876bde48f4eb9 1 parent 3ec178d
@igstan authored
Showing with 6 additions and 4 deletions.
  1. +1 −2  Nemira/MainWindow.xaml.cs
  2. +5 −2 Nemira/RenameSubscription.xaml.cs
View
3  Nemira/MainWindow.xaml.cs
@@ -158,9 +158,8 @@ private void CanRemoveSubscription(object sender, CanExecuteRoutedEventArgs e)
private void OnRenameSubscription(object sender, RoutedEventArgs e)
{
var subscription = subscriptions.SelectedItem as Subscription;
- var renameDialog = new RenameSubscription();
+ var renameDialog = new RenameSubscription(subscription);
renameDialog.Owner = this;
- renameDialog.SubscriptionName = subscription.Title;
if (renameDialog.ShowDialog() == true)
{
View
7 Nemira/RenameSubscription.xaml.cs
@@ -3,14 +3,17 @@
using System.Linq;
using System.Text;
using System.Windows;
+using GoogleReader.API;
namespace Nemira
{
public partial class RenameSubscription : Window
{
- public RenameSubscription()
+ public RenameSubscription(Subscription subscription)
{
InitializeComponent();
+
+ SubscriptionName = subscription.Title;
}
private void OnSubmit(object sender, RoutedEventArgs e)
@@ -21,7 +24,7 @@ private void OnSubmit(object sender, RoutedEventArgs e)
public string SubscriptionName
{
get { return name.Text; }
- set { name.Text = value; }
+ private set { name.Text = value; }
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.