public SynchronizeNotesOperation(SynchronizationSettings settings, List<Note> notes)
   : base(settings) {
   notes_ = new SortedDictionary<string, Note>();
   foreach (Note note in notes) {
     notes_[note.Guid] = note;
   }
 }
    /// <summary>
    /// Creates a new preferences dialog, initializing our form based on the
    /// settings in the given Preferences instance.
    /// </summary>
    public PreferencesDialog(Preferences preferences) {
      InitializeComponent();
      this.Icon = Media.StickiesIcon;
      this.Text = String.Format(Messages.PreferencesTitle, Application.ProductName);
      saveButton_.Text = Messages.PreferencesSave;
      cancelButton_.Text = Messages.PreferencesCancel;
      appearanceTabPage_.Text = Messages.PreferencesAppearanceTab;
      settingsTabPage_.Text = Messages.PreferencesSettingsTab;
      startOnWindowsCheckBox_.Text = Messages.PreferencesStartWithWindows;
      iconCheckBox_.Text = Messages.PreferencesCustomIcon;

      // Start the preferences dialog under the mouse cursor. Since we are
      // a ContainedControl, this will work correctly even if the mouse is
      // near the edge of the screen.
      this.StartPosition = FormStartPosition.Manual;
      this.Location = Control.MousePosition;

      // Reflect the initial set of preferences in our form
      notePreferencesControl_.NoteBackgroundColor = Color.FromArgb(preferences.Note.BackColor);
      notePreferencesControl_.NoteBorderColor = Color.FromArgb(preferences.Note.BorderColor);
      noteTextBox_.ForeColor = Color.FromArgb(preferences.Note.FontColor);
      notePreferencesControl_.NoteTransparency = preferences.Note.Transparency;
      if (preferences.Note.Rtf != null) {
        noteTextBox_.Rtf = preferences.Note.Rtf;
        notePreferencesControl_.NoteFont = noteTextBox_.SelectionFont;
        notePreferencesControl_.NoteFontColor = noteTextBox_.SelectionColor;
      }
      notePreferencesControl_.NoteAlwaysOnTop = preferences.Note.AlwaysOnTop;
      noteTextBox_.Text = Messages.PreferencesNoteText;
      if (preferences.TrayIconPath != null) {
        iconTextBox_.Text = preferences.TrayIconPath;
      }
      iconCheckBox_.Checked = preferences.TrayIconPath != null;
      iconTextBox_.Enabled = iconCheckBox_.Checked;
      iconBrowseButton_.Enabled = iconCheckBox_.Checked;
      startOnWindowsCheckBox_.Checked = Preferences.StartWithWindows();

      synchronizationSettings_ = preferences.SynchronizeSettings;
      if (synchronizationSettings_ != null) {
        synchronizeCheckBox_.Checked = true;
        amazonAccessKeyIdTextBox_.Text = synchronizationSettings_.AmazonAccessKeyId;
        amazonSecretAccessKeyTextBox_.Text = synchronizationSettings_.AmazonSecretAccessKey;
      }

      // Hack to make slider bar look right on top of the light colored
      // TabControl. The slider bar control does not support transparent
      // background colors.
      notePreferencesControl_.SliderBarBackColor = Color.FromArgb(244, 243, 239);

      UpdateSynchronizationEnabled();
    }
 protected AmazonS3Operation(SynchronizationSettings settings) {
   settings_ = settings;
   s3_ = new AmazonS3();
 }
 public TestSynchronizationOperation(SynchronizationSettings settings)
   : base(settings) {
 }