public SledFileWatcherService(MainForm mainForm, ISledDocumentService documentService) { m_mainForm = mainForm; m_documentService = documentService; }
public SledSourceControlService( MainForm mainForm, ICommandService commandService, ISettingsService settingsService, IControlHostService controlHostService, ISledProjectService projectService, ISledDocumentService documentService, IContextRegistry contextRegistry) { m_mainForm = mainForm; m_projectService = projectService; m_documentService = documentService; m_contextRegistry = contextRegistry; // Associate values for commands the 'public' can use m_dictPublicCommands.Add(SledSourceControlCommand.Add, Command.Add); m_dictPublicCommands.Add(SledSourceControlCommand.CheckIn, Command.CheckIn); m_dictPublicCommands.Add(SledSourceControlCommand.CheckOut, Command.CheckOut); m_dictPublicCommands.Add(SledSourceControlCommand.Refresh, Command.Refresh); m_dictPublicCommands.Add(SledSourceControlCommand.Revert, Command.Revert); m_dictPublicCommands.Add(SledSourceControlCommand.History, Command.History); commandService.RegisterMenu( Menu.SourceControl, SourceControlText, "Source Control Menu"); try { m_go = ResourceUtil.GetImageList16().Images[SledIcon.Go]; } catch (Exception ex) { SledOutDevice.OutLine( SledMessageType.Error, "Exception acquiring \"{0}\" image: {1}", SledIcon.Go, ex.Message); m_go = null; } try { m_stop = ResourceUtil.GetImageList16().Images[SledIcon.Stop]; } catch (Exception ex) { SledOutDevice.OutLine( SledMessageType.Error, "Exception acquiring \"{0}\" image: {1}", SledIcon.Stop, ex.Message); m_stop = null; } m_status = commandService.RegisterCommand( Command.Enabled, Menu.SourceControl, Group.SourceControl, "No source control plugin found!", "Enable or disable using the source control plugin", Keys.None, SledIcon.Stop, CommandVisibility.All, this); commandService.RegisterCommand( Command.Add, Menu.SourceControl, Group.SourceControl, SourceControlCommandPrefix + "Add", "Add to source control", Keys.None, Atf.Resources.DocumentAddImage, CommandVisibility.All, this); commandService.RegisterCommand( Command.Revert, Menu.SourceControl, Group.SourceControl, SourceControlCommandPrefix + "Revert", "Revert add or check out from source control", Keys.None, Atf.Resources.DocumentRevertImage, CommandVisibility.All, this); commandService.RegisterCommand( Command.CheckIn, Menu.SourceControl, Group.SourceControl, SourceControlCommandPrefix + "Check In", "Check in to source control", Keys.None, Atf.Resources.DocumentLockImage, CommandVisibility.All, this); commandService.RegisterCommand( Command.CheckOut, Menu.SourceControl, Group.SourceControl, SourceControlCommandPrefix + "Check Out", "Check out from source control", Keys.None, Atf.Resources.DocumentCheckOutImage, CommandVisibility.All, this); commandService.RegisterCommand( Command.Sync, Menu.SourceControl, Group.SourceControl, SourceControlCommandPrefix + "Get Latest Version", "Get latest version from source control", Keys.None, Atf.Resources.DocumentGetLatestImage, CommandVisibility.All, this); commandService.RegisterCommand( Command.Refresh, Menu.SourceControl, Group.SourceControl, SourceControlCommandPrefix + "Refresh Status", "Refresh status in source control", Keys.None, Atf.Resources.DocumentRefreshImage, CommandVisibility.All, this); commandService.RegisterCommand( Command.History, Menu.SourceControl, Group.SourceControl, SourceControlCommandPrefix + "History", "Obtain history of items in source control", Keys.None, Atf.Resources.ResourceFolderImage, CommandVisibility.All, this); //if ((RegisterCommands & CommandRegister.Reconcile) == CommandRegister.Reconcile) //{ // CommandServices.RegisterCommand(m_commandService, // InternalCommand.Reconcile, // StandardMenu.File, // StandardCommandGroup.FileOther, // Localizer.Localize("Source Control/Reconcile Offline Work..."), // Localizer.Localize("Reconcile Offline Work"), // Keys.None, // Resources.DocumentRefreshImage, // CommandVisibility.Menu, // this); //} commandService.RegisterCommand( Command.Connection, Menu.SourceControl, Group.SourceControl, SourceControlCommandPrefix + "Open Connection...", "Source control connection", Keys.None, Atf.Resources.ShowAllImage, CommandVisibility.All, this); // Persist settings settingsService.RegisterSettings( this, new BoundPropertyDescriptor( this, () => PersistedSettings, SettingsDisplayName, SettingsCategory, SettingsDescription)); documentService.Opened += DocumentServiceOpened; documentService.Closing += DocumentServiceClosing; projectService.FileAdded += ProjectServiceFileAdded; projectService.FileRemoving += ProjectServiceFileRemoving; }
public ProjectAdapter(SledProjectFilesType project, ISledDocumentService documentService) { m_project = project; m_documentService = documentService; }