using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using System.Security.Permissions; using FastForward.WinCore; using FastForward.WinCore.Configuration; namespace FastForward.VisualStudio { public partial class ProjectsControl : UserControl { private ServerList servers; public ProjectsControl() { InitializeComponent(); } public void AttachServerList(ServerList servers) { if (this.servers == null) { this.servers = servers; foreach (var server in this.servers.Servers) { server.Refresh(); projectsView.AddServer(server, server.Data.Get()); } this.servers.ServerAdded += (o, e) => projectsView.AddServer(e.Server, e.Server.Data.Get()); this.servers.ServerRemoved += (o, e) => projectsView.RemoveServer(e.Server); } } /// /// Let this control process the mnemonics. /// [UIPermission(SecurityAction.LinkDemand, Window = UIPermissionWindow.AllWindows)] protected override bool ProcessDialogChar(char charCode) { // If we're the top-level form or control, we need to do the mnemonic handling if (charCode != ' ' && ProcessMnemonic(charCode)) { return true; } return base.ProcessDialogChar(charCode); } /// /// Enable the IME status handling for this control. /// protected override bool CanEnableIme { get { return true; } } } }