///
/// Copyright © 2003-2008 JetBrains s.r.o.
/// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder).
///
using JetBrains.Omea.GUIControls;
using JetBrains.Omea.OpenAPI;
namespace JetBrains.Omea.ContactsPlugin
{
/**
* Pane for selecting an email account that belongs to the current user.
*/
public class EmailAccountSelector: GenericResourceSelectPane
{
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public EmailAccountSelector()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
// TODO: Add any initialization after the InitializeComponent call
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
public override void SelectResources( string[] resTypes, IResourceList baseList, IResourceList selection )
{
IResourceList accounts = Core.ResourceStore.EmptyResourceList;
if ( Core.ContactManager.MySelf.Resource != null )
{
accounts = Core.ContactManager.MySelf.Resource.GetLinksOfType( "EmailAccount", "EmailAcct" );
}
base.SelectResources( resTypes, accounts, selection );
}
}
}