Пример #1
0
 public static void Init(ICoreServices cs)
 {
     cs.PreferenceExtensionPoint.RegisterExtension(ProtocolsPlugin.Instance.ProtocolOptionsSupplier);
     _strings = new StringResource("Poderosa.Protocols.strings", typeof(PEnv).Assembly);
     ProtocolsPlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_strings);
     _windowManager = cs.WindowManager;
 }
Пример #2
0
 public TestEditorShell(CompositionContainer container, ICoreServices coreServices)
 {
     FileDialog     = new TestFileDialog();
     ProgressDialog = new TestProgressDialog();
     _container     = container;
     Services       = coreServices;
 }
Пример #3
0
        public DeviceViewModel(ICoreServices services) : base(services)
        {
            this.SelectCharacteristic = new Acr.Command <GattCharacteristicViewModel>(x => x.Select());
            this.SelectDescriptor     = new Acr.Command <GattDescriptorViewModel>(x => x.Select());

            this.ConnectionToggle = ReactiveCommand.CreateAsyncTask(
                this.WhenAny(
                    x => x.Status,
                    x => x.Value != ConnectionStatus.Disconnecting
                    ),
                x =>
            {
                if (this.conn == null)
                {
                    this.conn = this.device.CreateConnection().Subscribe();
                }
                else
                {
                    this.conn?.Dispose();
                    this.conn = null;
                }
                return(Task.FromResult(Unit.Default));
            }
                );
        }
Пример #4
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);

            _instance = this;
            _stringResource = new StringResource("Poderosa.Usability.strings", typeof(OptionDialogPlugin).Assembly);
            poderosa.Culture.AddChangeListener(this);
            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            IExtensionPoint panel_ext = pm.CreateExtensionPoint(OPTION_PANEL_ID, typeof(IOptionPanelExtension), this);

            ICommandCategory dialogs = _coreServices.CommandManager.CommandCategories.Dialogs;
            _optionDialogCommand = new GeneralCommandImpl("org.poderosa.optiondialog.open", _stringResource, "Command.OptionDialog", dialogs, new ExecuteDelegate(OptionDialogCommand.OpenOptionDialog)).SetDefaultShortcutKey(Keys.Alt | Keys.Control | Keys.T);
            _detailedPreferenceCommand = new GeneralCommandImpl("org.poderosa.preferenceeditor.open", _stringResource, "Command.PreferenceEditor", dialogs, new ExecuteDelegate(OptionDialogCommand.OpenPreferenceEditor));

            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");
            _optionDialogMenuGroup = new PoderosaMenuGroupImpl(new IPoderosaMenuItem[] {
                new PoderosaMenuItemImpl(_optionDialogCommand, _stringResource, "Menu.OptionDialog"),
                new PoderosaMenuItemImpl(_detailedPreferenceCommand, _stringResource, "Menu.PreferenceEditor") }).SetPosition(PositionType.Last, null);

            toolmenu.RegisterExtension(_optionDialogMenuGroup);

            //基本のオプションパネルを登録
            panel_ext.RegisterExtension(new DisplayOptionPanelExtension());
            panel_ext.RegisterExtension(new TerminalOptionPanelExtension());
            panel_ext.RegisterExtension(new PeripheralOptionPanelExtension());
            panel_ext.RegisterExtension(new CommandOptionPanelExtension());
            panel_ext.RegisterExtension(new SSHOptionPanelExtension());
            panel_ext.RegisterExtension(new ConnectionOptionPanelExtension());
            panel_ext.RegisterExtension(new GenericOptionPanelExtension());
        }
Пример #5
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="poderosa">an instance of PoderosaWorld</param>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);

            _instance      = this;
            _poderosaWorld = poderosa;

            _adapterManager = poderosa.AdapterManager;
            _coreServices   = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _stringResource = new StringResource("Poderosa.Pipe.strings", typeof(PipePlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);

            _terminalSessionsService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService)) as ITerminalSessionsService;
            _terminalEmulatorService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService)) as ITerminalEmulatorService;
            _serializeService        = poderosa.PluginManager.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService)) as ISerializeService;

            IExtensionPoint extSer = _coreServices.SerializerExtensionPoint;

            extSer.RegisterExtension(new PipeTerminalParameterSerializer());
            extSer.RegisterExtension(new PipeTerminalSettingsSerializer());

            _openPipeCommand = new OpenPipeCommand();

            IPluginManager pm = poderosa.PluginManager;

            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new PipeMenuGroup(_openPipeCommand));

            // Toolbar button has not been added yet
            //pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new PipeToolBarComponent());

            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new PipeConnectionFactory());
        }
Пример #6
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);

            Instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _optionSupplier = new MRUOptionsSupplier();
            _coreServices   = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);

            _protocolService         = (IProtocolService)pm.FindPlugin("org.poderosa.protocols", typeof(IProtocolService));
            _terminalSessionsService = (ITerminalSessionsService)pm.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService));

            //接続成功時にリスト更新
            _mruList = new MRUList(this, pm);
            _coreServices.SessionManager.AddSessionListener(_mruList);
            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.telnetSSHLoginDialogInitializer").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.loginDialogUISupport").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.terminalParameterStore").RegisterExtension(_mruList);

            _mruCommand = new OpenMRUCommand();
        }
Пример #7
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorPlugin = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            Debug.Assert(_terminalEmulatorPlugin != null);

            TerminalUICommand.Register(_coreServices.CommandManager);

            TerminalUIMenuGroup uimenu = new TerminalUIMenuGroup();
            LogMenuGroup logmenu = new LogMenuGroup();
            //Console Menu
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");
            consolemenu.RegisterExtension(uimenu);
            consolemenu.RegisterExtension(logmenu);
            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");
            contextmenu.RegisterExtension(uimenu);
            contextmenu.RegisterExtension(logmenu);
            IExtensionPoint documentContextMenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.documentContextMenu");
            documentContextMenu.RegisterExtension(uimenu);
            documentContextMenu.RegisterExtension(logmenu);

            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");
            toolmenu.RegisterExtension(new ShellSchemeEditMenuGroup());
        }
Пример #8
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _coreServices           = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorPlugin = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            Debug.Assert(_terminalEmulatorPlugin != null);

            TerminalUICommand.Register(_coreServices.CommandManager);

            TerminalUIMenuGroup uimenu  = new TerminalUIMenuGroup();
            LogMenuGroup        logmenu = new LogMenuGroup();
            //Console Menu
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");

            consolemenu.RegisterExtension(uimenu);
            consolemenu.RegisterExtension(logmenu);
            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");

            contextmenu.RegisterExtension(uimenu);
            contextmenu.RegisterExtension(logmenu);
            IExtensionPoint documentContextMenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.documentContextMenu");

            documentContextMenu.RegisterExtension(uimenu);
            documentContextMenu.RegisterExtension(logmenu);

            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(new ShellSchemeEditMenuGroup());
        }
Пример #9
0
 public RemoteUriWebService(string baseUri, ICoreServices services, IConsole console)
 {
     PostUri   = new Uri(new Uri(baseUri), new Uri("/remoteuri", UriKind.Relative));
     _services = services;
     _console  = console;
     _log      = _services.Log;
 }
Пример #10
0
        /// <summary>
        /// <ja>初期化</ja>
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new StringResource("Poderosa.ExtendPaste.strings", typeof(ExtendPastePlugin).Assembly);
            ExtendPastePlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // コマンド登録
            IPluginManager  pm       = poderosa.PluginManager;
            IExtensionPoint extp_cmd = pm.FindExtensionPoint("org.poderosa.terminalsessions.pasteCommand");

            extp_cmd.RegisterExtension(new ExtendPasteCommand());

            // オプションパネル登録
            IExtensionPoint extp_opt = pm.FindExtensionPoint("org.poderosa.optionpanel");

            extp_opt.RegisterExtension(new ExtendPastePanelExtension());

            // オプションクラス登録
            _optionSupplier = new ExtendPasteOptionsSupplier();
            _coreServices   = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);
        }
Пример #11
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance       = this;
            _stringResource = new StringResource("Poderosa.Macro.strings", typeof(MacroPlugin).Assembly);
            _instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            IPluginManager pm = poderosa.PluginManager;

            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _macroManager = new MacroManager();

            _macroListCommand = new MacroListCommand();
            _coreServices.CommandManager.Register(_macroListCommand);

            pm.FindExtensionPoint("org.poderosa.menu.tool").RegisterExtension(new MacroMenuGroup());

            _coreServices.PreferenceExtensionPoint.RegisterExtension(_macroManager);

            ISessionManager sessionManager = poderosa.PluginManager.FindPlugin("org.poderosa.core.sessions", typeof(ISessionManager)) as ISessionManager;

            if (sessionManager != null)
            {
                sessionManager.AddSessionListener(_sessionBinder);
            }
        }
 protected ServicesViewModel(ICoreServices core)
 {
     this.Core = core;
     this.Core
     .Connectivity
     .WhenInternetStatusChanged()
     .ToPropertyEx(this, x => x.IsNetworkAvailable);
 }
Пример #13
0
 public Blobs(CoreServicesFixture coreServices, TestMethodFixture testMethod, TaskObserverMethodFixture taskObserver)
 {
     _coreServices = coreServices;
     _taskObserver = taskObserver;
     _testMethod   = testMethod;
     _brokerClient = CreateLocalBrokerClient(_coreServices, nameof(RSessionTest) + nameof(Blobs));
     _session      = new RSession(0, testMethod.FileSystemSafeName, _brokerClient, new AsyncReaderWriterLock().CreateExclusiveReaderLock(), () => { });
 }
Пример #14
0
        public VsAppShell(ITelemetryService telemetryService)
        {
            _appConstants  = new ApplicationConstants();
            ProgressDialog = new VsProgressDialog(this);
            FileDialog     = new VsFileDialog(this);

            _coreServices = new CoreServices(_appConstants, telemetryService, new VsTaskService(), this, new SecurityService(this));
        }
Пример #15
0
        public RemoteBrokerClient(string name, Uri brokerUri, ICoreServices services, IConsole console)
            : base(name, brokerUri, brokerUri.Fragment, new RemoteCredentialsDecorator(brokerUri, services.Security), services.Log)
        {
            _console  = console;
            _services = services;

            CreateHttpClient(brokerUri);
            HttpClientHandler.ServerCertificateValidationCallback = ValidateCertificateHttpHandler;
        }
Пример #16
0
        public LocalBrokerClient(string name, string rHome, ICoreServices services, string rhostDirectory = null)
            : base(name, new Uri(rHome), InterpreterId, _credentials, services.Log)
        {
            _rhostDirectory = rhostDirectory ?? Path.GetDirectoryName(typeof(RHost).Assembly.GetAssemblyPath());
            _rHome          = rHome;
            _services       = services;

            IsVerified = true;
        }
Пример #17
0
        public LocalBrokerClient(string name, string rHome, ICoreServices services, IConsole console, string rhostDirectory = null)
            : base(name, new Uri(rHome), InterpreterId, _credentials, services.Log, console) {

            _rhostDirectory = rhostDirectory ?? Path.GetDirectoryName(typeof(RHost).Assembly.GetAssemblyPath());
            _rHome = rHome;
            _services = services;

            IsVerified = true;
        }
Пример #18
0
        public XamarinApp(ICoreServices coreServices)
        {
            CoreServices = coreServices;

            InitializeComponent();

            MainPage = coreServices.ApplicationServices.CreateView <ShellView>();
            ApplicationLogger.Information("OmniCore App initialized");
        }
Пример #19
0
        public LocalBrokerClient(string name, BrokerConnectionInfo connectionInfo, ICoreServices services, IConsole console, string rhostDirectory = null)
            : base(name, connectionInfo, _credentials, services.Log, console)
        {
            _rhostDirectory = rhostDirectory ?? Path.GetDirectoryName(typeof(RHost).Assembly.GetAssemblyPath());
            _rHome          = connectionInfo.Uri.LocalPath;
            _services       = services;

            IsVerified = true;
        }
Пример #20
0
        public RemoteBrokerClient(string name, Uri brokerUri, ICoreServices services, IConsole console, CancellationToken cancellationToken)
            : base(name, brokerUri, brokerUri.Fragment, new RemoteCredentialsDecorator(brokerUri, services.Security, services.MainThread), services.Log, console) {
            _console = console;
            _services = services;
            _cancellationToken = cancellationToken;

            CreateHttpClient(brokerUri);
            HttpClientHandler.ServerCertificateValidationCallback = ValidateCertificateHttpHandler;
        }
Пример #21
0
        public VsAppShell(ITelemetryService telemetryService)
        {
            _appConstants  = new ApplicationConstants();
            ProgressDialog = new VsProgressDialog(this);
            FileDialog     = new VsFileDialog(this);

            var loggingPermissions = new LoggingPermissions(_appConstants, telemetryService, new RegistryImpl());

            _coreServices = new CoreServices(_appConstants, telemetryService, new VsTaskService(), new ProcessServices(), loggingPermissions, this, new SecurityService(this));
        }
Пример #22
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);

            ICoreServices cs = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            ShortcutFileCommands.Register(poderosa.PluginManager, cs.CommandManager);

            poderosa.PluginManager.FindExtensionPoint(WindowManagerConstants.FILEDROPHANDLER_ID).RegisterExtension(this);
        }
Пример #23
0
        public RemoteBrokerClient(string name, BrokerConnectionInfo connectionInfo, ICoreServices services, IConsole console, CancellationToken cancellationToken)
            : base(name, connectionInfo, new RemoteCredentialsDecorator(connectionInfo.CredentialAuthority, connectionInfo.Name, services.Security, services.MainThread), services.Log, console)
        {
            _console           = console;
            _services          = services;
            _cancellationToken = cancellationToken;

            CreateHttpClient(connectionInfo.Uri);
            HttpClientHandler.ServerCertificateValidationCallback = ValidateCertificateHttpHandler;
        }
Пример #24
0
        public Test1ViewModel(ICoreServices services) : base(services)
        {
            this.BleAdapter
            .WhenScanningStatusChanged()
            .Skip(1)
            .Subscribe(x => this.WriteMsg(
                           "BLE Scanning " + (x ? "Started" : "Stopped"),
                           String.Empty
                           ));

            this.BleAdapter
            .WhenDeviceStatusChanged()
            .Subscribe(x => this.WriteMsg(
                           "Device " + x.Status,
                           x.Name
                           ));

            this.Run = ReactiveCommand.Create(() =>
            {
                if (this.scan == null)
                {
                    this.scan = this.BleAdapter
                                .ScanWhenAdapterReady()
                                //.Where(x => x.AdvertisementData.ServiceUuids.Any(y => y.Equals(ScratchServiceUuid)))
                                .Where(x => x.Device?.Name?.StartsWith("bean", StringComparison.CurrentCultureIgnoreCase) ?? false)
                                .Take(1)
                                .Select(x =>
                    {
                        this.device = x.Device;
                        x.Device.Connect().Subscribe();
                        return(x.Device.GetKnownService(ScratchServiceUuid));
                    })
                                .Where(x => x != null)
                                .Switch()
                                .Select(x => x.WhenCharacteristicDiscovered())
                                .Switch()
                                .Subscribe(ch =>
                    {
                        this.WriteMsg("Subscribing to characteristic", ch.Uuid.ToString());
                        ch
                        .SubscribeToNotifications()
                        .Subscribe(x => this.WriteMsg(
                                       x.Characteristic.Uuid.ToString(),
                                       UTF8Encoding.UTF8.GetString(x.Data, 0, x.Data.Length)
                                       ));
                    });
                }
                else
                {
                    this.scan?.Dispose();
                    this.scan = null;
                    this.device?.CancelConnection();
                }
            });
        }
Пример #25
0
        private WebServer(string remoteHostIp, int remotePort, string baseAddress, string name, ICoreServices services, IConsole console) {
            _name = name.ToUpperInvariant();
            _services = services;
            _console = console;

            LocalHost = IPAddress.Loopback.ToString();
            RemoteHost = remoteHostIp;
            RemotePort = remotePort;

            _remoteUriService = new RemoteUriWebService(baseAddress);
        }
Пример #26
0
        private WebServer(string remoteHostIp, int remotePort, string baseAddress, string name, ICoreServices services, IConsole console)
        {
            _name        = name.ToUpperInvariant();
            _baseAddress = baseAddress;
            _services    = services;
            _console     = console;

            LocalHost  = IPAddress.Loopback.ToString();
            RemoteHost = remoteHostIp;
            RemotePort = remotePort;

            _remoteUriService = new RemoteUriWebService(baseAddress);
        }
Пример #27
0
        public VsAppShell(ITelemetryService telemetryService
                          , IRSettings settings
                          , ICoreServices coreServices
                          , IApplicationConstants appConstants)
        {
            _coreServices  = coreServices;
            AppConstants   = appConstants;
            ProgressDialog = new VsProgressDialog(this);
            FileDialog     = new VsFileDialog(this);

            _settings = settings;
            _settings.PropertyChanged += OnSettingsChanged;
        }
Пример #28
0
        public ScanViewModel(ICoreServices services) : base(services)
        {
            this.connect = this.BleAdapter
                           .WhenDeviceStatusChanged()
                           .Subscribe(x =>
            {
                var vm = this.Devices.FirstOrDefault(dev => dev.Uuid.Equals(x.Uuid));
                if (vm != null)
                {
                    vm.IsConnected = x.Status == ConnectionStatus.Connected;
                }
            });

            this.AppState.WhenBackgrounding().Subscribe(_ => this.scan?.Dispose());
            this.BleAdapter.WhenScanningStatusChanged().Subscribe(on =>
            {
                this.IsScanning = on;
                this.ScanText   = on ? "Stop Scan" : "Scan";
            });
            this.Devices = new ObservableCollection <ScanResultViewModel>();

            this.SelectDevice = new Acr.Command <ScanResultViewModel>(x =>
            {
                this.scan?.Dispose();
                services.VmManager.Push <DeviceViewModel>(x.Device);
            });

            this.ScanToggle = ReactiveCommand.CreateAsyncTask(
                this.WhenAny(
                    x => x.IsSupported,
                    x => x.Value
                    ),
                x =>
            {
                if (this.IsScanning)
                {
                    this.scan?.Dispose();
                }
                else
                {
                    this.Devices.Clear();
                    this.ScanText = "Stop Scan";

                    this.scan = this.BleAdapter
                                .Scan()
                                .Subscribe(this.OnScanResult);
                }
                return(Task.FromResult <object>(null));
            }
                );
        }
Пример #29
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;
            IExtensionPoint ep = poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.file");

            ep.RegisterExtension(new DummySessionMenuGroup());

            ICoreServices cs = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            poderosa.PluginManager.FindExtensionPoint(WindowManagerConstants.VIEWFORMATEVENTHANDLER_ID).RegisterExtension(this);
            poderosa.PluginManager.FindExtensionPoint("org.poderosa.core.sessions.docViewRelationHandler").RegisterExtension(this);
            poderosa.PluginManager.FindExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID).RegisterExtension(this);
        }
Пример #30
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            TEnv.ReloadStringResource();
            _terminalViewFactory = new TerminalViewFactory();
            pm.FindExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID).RegisterExtension(_terminalViewFactory);
            //このViewFactoryはデフォ
            foreach (IViewManagerFactory mf in pm.FindExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID).GetExtensions())
            {
                mf.DefaultViewFactory = _terminalViewFactory;
            }

            //ログインダイアログのサポート用
            pm.CreateExtensionPoint("org.poderosa.terminalsessions.telnetSSHLoginDialogInitializer", typeof(ITelnetSSHLoginDialogInitializer), this);
            pm.CreateExtensionPoint("org.poderosa.terminalsessions.loginDialogUISupport", typeof(ILoginDialogUISupport), this);
            pm.CreateExtensionPoint("org.poderosa.terminalsessions.terminalParameterStore", typeof(ITerminalSessionParameterStore), this);
            IExtensionPoint factory_point = pm.CreateExtensionPoint(TERMINAL_CONNECTION_FACTORY_ID, typeof(ITerminalConnectionFactory), this);

            _pasteCommandExt = pm.CreateExtensionPoint("org.poderosa.terminalsessions.pasteCommand", typeof(IPoderosaCommand), this);

            _terminalSessionsOptionSupplier = new TerminalSessionOptionsSupplier();
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_terminalSessionsOptionSupplier);


            //Add conversion for TerminalPane
            _paneBridgeAdapter = new PaneBridgeAdapter();
            poderosa.AdapterManager.RegisterFactory(_paneBridgeAdapter);

            _startCommand     = new StartCommand(factory_point);
            _reproduceCommand = new ReproduceCommand();
            _coreServices.CommandManager.Register(_reproduceCommand);

            ReproduceMenuGroup rmg         = new ReproduceMenuGroup();
            IExtensionPoint    consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");

            consolemenu.RegisterExtension(rmg);

            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");

            contextmenu.RegisterExtension(rmg);

            IExtensionPoint documentContext = pm.FindExtensionPoint("org.poderosa.terminalemulator.documentContextMenu");

            documentContext.RegisterExtension(rmg);
        }
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;
            _strings = new StringResource("Poderosa.PortForwardingCommand.strings", typeof(PortForwardingCommandPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_strings);

            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _execPortForwardingCommand = new ExecPortForwardingCommand();
            _coreServices.CommandManager.Register(_execPortForwardingCommand);
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");
            toolmenu.RegisterExtension(new PoderosaMenuGroupImpl(
                new IPoderosaMenu[] { new PoderosaMenuItemImpl(_execPortForwardingCommand, _strings, "Menu.PortForwarding") }, false));
        }
Пример #32
0
        /// <summary>
        /// Overrides PluginBase
        /// </summary>
        /// <param name="poderosa">Poderosa World</param>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            SFTPToolbar toolbar = new SFTPToolbar();

            poderosa.PluginManager.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(toolbar);
            poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.tool").RegisterExtension(toolbar.MenuGroup);

            ICoreServices coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            coreServices.SessionManager.AddActiveDocumentChangeListener(toolbar);

            poderosa.Culture.AddChangeListener(_stringResource);
        }
Пример #33
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;
            _stringResource = new StringResource("Poderosa.XZModem.strings", typeof(XZModemPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);

            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorService = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));

            _startXZModemCommand = new StartXZModemCommand();
            _coreServices.CommandManager.Register(_startXZModemCommand);

            IExtensionPoint consolemenu = pm.FindExtensionPoint(TerminalEmulatorConstants.TERMINALSPECIAL_EXTENSIONPOINT);
            consolemenu.RegisterExtension(new XZModemMenuGroup());

        }
Пример #34
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;
            ICoreServices cs = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _commandManager  = cs.CommandManager;
            _windowManager   = cs.WindowManager;
            _sessionService  = (ITerminalSessionsService)poderosa.PluginManager.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService));
            _protocolService = (IProtocolService)poderosa.PluginManager.FindPlugin("org.poderosa.protocols", typeof(IProtocolService));
            _cygwinService   = (ICygwinPlugin)poderosa.PluginManager.FindPlugin("org.poderosa.cygwin", typeof(ICygwinPlugin));
            Debug.Assert(_sessionService != null);
            Debug.Assert(_protocolService != null);
            Debug.Assert(_cygwinService != null);

            cs.PreferenceExtensionPoint.RegisterExtension(this);
            poderosa.PluginManager.FindExtensionPoint(WindowManagerConstants.MAINWINDOWEVENTHANDLER_ID).RegisterExtension(this);
        }
Пример #35
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;
            _strings  = new StringResource("Poderosa.PortForwardingCommand.strings", typeof(PortForwardingCommandPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_strings);

            IPluginManager pm = poderosa.PluginManager;

            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _execPortForwardingCommand = new ExecPortForwardingCommand();
            _coreServices.CommandManager.Register(_execPortForwardingCommand);
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(new PoderosaMenuGroupImpl(
                                           new IPoderosaMenu[] { new PoderosaMenuItemImpl(_execPortForwardingCommand, _strings, "Menu.PortForwarding") }, false));
        }
Пример #36
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);

            _instance = this;
            _strings = new StringResource("Poderosa.Usability.strings", typeof(PoderosaLogViewerPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_strings);
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _viewFactory = new LogViewerFactory();
            poderosa.PluginManager.FindExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID).RegisterExtension(_viewFactory);
            _session = new PoderosaLogViewerSession();

            ICommandManager cm = _coreServices.CommandManager;
            //Command and Menu
            _command = new GeneralCommandImpl("org.poderosa.poderosalogviewer.show", _strings, "Command.PoderosaLog", cm.CommandCategories.Dialogs,
                new ExecuteDelegate(CmdShowPoderosaLog));
            poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.tool").RegisterExtension(
                new PoderosaMenuGroupImpl(new PoderosaMenuItemImpl(_command, _strings, "Menu.PoderosaLog")));
        }
Пример #37
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new Poderosa.StringResource("Contrib.BroadcastCommand.strings", typeof(BroadcastCommandPlugin).Assembly);
            BroadcastCommandPlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // メニュー登録
            IPluginManager pm = poderosa.PluginManager;

            _coreServices            = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _broadcastCommandCommand = new BroadcastCommandCommand();
            _coreServices.CommandManager.Register(_broadcastCommandCommand);
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(new PoderosaMenuGroupImpl(new IPoderosaMenu[] { new PoderosaMenuItemImpl(_broadcastCommandCommand, BroadcastCommandPlugin.Strings, "Menu.BroadcastCommand") }, false));
        }
Пример #38
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;

            _stringResource = new StringResource("Poderosa.SerialPort.strings", typeof(SerialPortPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);
            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            IExtensionPoint pt = _coreServices.SerializerExtensionPoint;
            pt.RegisterExtension(new SerialTerminalParamSerializer());
            pt.RegisterExtension(new SerialTerminalSettingsSerializer());

            _openSerialPortCommand = new OpenSerialPortCommand();
            _coreServices.CommandManager.Register(_openSerialPortCommand);

            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new SerialPortMenuGroup());
            pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new SerialPortToolBarComponent());
            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new SerialConnectionFactory());

        }
Пример #39
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            TEnv.ReloadStringResource();
            _terminalViewFactory = new TerminalViewFactory();
            pm.FindExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID).RegisterExtension(_terminalViewFactory);
            //このViewFactoryはデフォ
            foreach (IViewManagerFactory mf in pm.FindExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID).GetExtensions())
                mf.DefaultViewFactory = _terminalViewFactory;

            //ログインダイアログのサポート用
            pm.CreateExtensionPoint("org.poderosa.terminalsessions.telnetSSHLoginDialogInitializer", typeof(ITelnetSSHLoginDialogInitializer), this);
            pm.CreateExtensionPoint("org.poderosa.terminalsessions.loginDialogUISupport", typeof(ILoginDialogUISupport), this);
            IExtensionPoint factory_point = pm.CreateExtensionPoint(TERMINAL_CONNECTION_FACTORY_ID, typeof(ITerminalConnectionFactory), this);

            _terminalSessionsOptionSupplier = new TerminalSessionOptionsSupplier();
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_terminalSessionsOptionSupplier);


            //Add conversion for TerminalPane
            _paneBridgeAdapter = new PaneBridgeAdapter();
            poderosa.AdapterManager.RegisterFactory(_paneBridgeAdapter);

            _startCommand = new StartCommand(factory_point);
            _reproduceCommand = new ReproduceCommand();
            _coreServices.CommandManager.Register(_reproduceCommand);

            ReproduceMenuGroup rmg = new ReproduceMenuGroup();
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");
            consolemenu.RegisterExtension(rmg);

            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");
            contextmenu.RegisterExtension(rmg);

            IExtensionPoint documentContext = pm.FindExtensionPoint("org.poderosa.terminalemulator.documentContextMenu");
            documentContext.RegisterExtension(rmg);
        }
Пример #40
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;
            _stringResource = new StringResource("Poderosa.Macro.strings", typeof(MacroPlugin).Assembly);
            _instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _macroManager = new MacroManager();

            _macroListCommand = new MacroListCommand();
            _coreServices.CommandManager.Register(_macroListCommand);

            pm.FindExtensionPoint("org.poderosa.menu.tool").RegisterExtension(new MacroMenuGroup());

            _coreServices.PreferenceExtensionPoint.RegisterExtension(_macroManager);

            ISessionManager sessionManager = poderosa.PluginManager.FindPlugin("org.poderosa.core.sessions", typeof(ISessionManager)) as ISessionManager;
            if (sessionManager != null) {
                sessionManager.AddSessionListener(_sessionBinder);
            }
        }
Пример #41
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);

            Instance = this;

            IPluginManager pm = poderosa.PluginManager;
            _optionSupplier = new MRUOptionsSupplier();
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);

            _protocolService = (IProtocolService)pm.FindPlugin("org.poderosa.protocols", typeof(IProtocolService));
            _terminalSessionsService = (ITerminalSessionsService)pm.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService));

            //接続成功時にリスト更新
            _mruList = new MRUList(this, pm);
            _coreServices.SessionManager.AddSessionListener(_mruList);
            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.telnetSSHLoginDialogInitializer").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.loginDialogUISupport").RegisterExtension(_mruList);

            _mruCommand = new OpenMRUCommand();
        }
Пример #42
0
        public static async Task<string> CreateWebServerAsync(string remoteUrl, string baseAddress, string name, ICoreServices services, IConsole console, CancellationToken ct = default(CancellationToken)) {
            Uri remoteUri = new Uri(remoteUrl);
            UriBuilder localUri = new UriBuilder(remoteUri);

            WebServer server;
            if(!Servers.TryGetValue(remoteUri.Port, out server)) {
                server = new WebServer(remoteUri.Host, remoteUri.Port, baseAddress, name, services, console);
                await server.InitializeAsync(ct);
                Servers.TryAdd(remoteUri.Port, server);
            }

            server.DoWorkAsync(ct).DoNotWait();

            localUri.Host = server.LocalHost;
            localUri.Port = server.LocalPort;
            return localUri.Uri.ToString();
        }
Пример #43
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="poderosa">an instance of PoderosaWorld</param>
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);

            _instance = this;
            _poderosaWorld = poderosa;

            _adapterManager = poderosa.AdapterManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _stringResource = new StringResource("Poderosa.Pipe.strings", typeof(PipePlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);

            _terminalSessionsService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService)) as ITerminalSessionsService;
            _terminalEmulatorService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService)) as ITerminalEmulatorService;
            _serializeService = poderosa.PluginManager.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService)) as ISerializeService;

            IExtensionPoint extSer = _coreServices.SerializerExtensionPoint;
            extSer.RegisterExtension(new PipeTerminalParameterSerializer());
            extSer.RegisterExtension(new PipeTerminalSettingsSerializer());

            _openPipeCommand = new OpenPipeCommand();

            IPluginManager pm = poderosa.PluginManager;
            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new PipeMenuGroup(_openPipeCommand));

            // Toolbar button has not been added yet
            //pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new PipeToolBarComponent());

            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new PipeConnectionFactory());
        }
 public GoogleShorteningService(ICoreServices coreService)
 {
     this.coreService = coreService;
 }
Пример #45
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;
            _optionSupplier = new TerminalOptionsSupplier();
            _keepAlive = new KeepAlive();
            _customKeySettings = new CustomKeySettings();
            _shellSchemeCollection = new ShellSchemeCollection();

            GEnv.Init();
            IPluginManager pm = poderosa.PluginManager;
            ICoreServices cs = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            Debug.Assert(cs != null);
            cs.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);
            cs.PreferenceExtensionPoint.RegisterExtension(_shellSchemeCollection);
            _coreServices = cs;

            //Serialize Service
            cs.SerializerExtensionPoint.RegisterExtension(new TerminalSettingsSerializer(pm));

            _commandManager = cs.CommandManager;
            TerminalCommand.Register(_commandManager);
            TerminalSettingMenuGroup.Initialize();

            //PromptChecker
            _promptCheckerWithTimer = new PromptCheckerWithTimer();

            //Edit Menuに追加
            IExtensionPoint editmenu = pm.FindExtensionPoint("org.poderosa.menu.edit");
            editmenu.RegisterExtension(new AdvancedCopyPasteMenuGroup());
            editmenu.RegisterExtension(new TerminalBufferMenuGroup());
            editmenu.RegisterExtension(new SelectionMenuGroup());

            //Console Menu : これは処置に困るところだが!
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");
            consolemenu.RegisterExtension(new TerminalSettingMenuGroup());
            consolemenu.RegisterExtension(new IntelliSenseMenuGroup());

            //Context Menu
            _contextMenu = pm.CreateExtensionPoint(TerminalEmulatorConstants.TERMINAL_CONTEXT_MENU_EXTENSIONPOINT, typeof(IPoderosaMenuGroup), this);
            _contextMenu.RegisterExtension(new BasicCopyPasteMenuGroup());
            _contextMenu.RegisterExtension(new TerminalSettingMenuGroup());
            _contextMenu.RegisterExtension(new IntelliSenseMenuGroup());

            //タブのコンテキストメニュー
            _documentContextMenu = pm.CreateExtensionPoint(TerminalEmulatorConstants.DOCUMENT_CONTEXT_MENU_EXTENSIONPOINT, typeof(IPoderosaMenuGroup), this);
            _documentContextMenu.RegisterExtension(new PoderosaMenuGroupImpl(new PoderosaMenuItemImpl(
                cs.CommandManager.Find("org.poderosa.core.session.closedocument"), GEnv.Strings, "Menu.DocumentClose")));

            //ToolBar
            IExtensionPoint toolbar = pm.FindExtensionPoint("org.poderosa.core.window.toolbar");
            TerminalToolBar terminaltoolbar = new TerminalToolBar();
            toolbar.RegisterExtension(terminaltoolbar);
            GetSessionManager().AddActiveDocumentChangeListener(terminaltoolbar);

            //その他 Extension
            _intelliSenseExtension = pm.CreateExtensionPoint(TerminalEmulatorConstants.INTELLISENSE_CANDIDATE_EXTENSIONPOINT, typeof(IIntelliSenseCandidateExtension), this);
            _autoLogFileFormatter = pm.CreateExtensionPoint(TerminalEmulatorConstants.LOG_FILENAME_FORMATTER_EXTENSIONPOINT, typeof(IAutoLogFileFormatter), this);
            _dynamicCaptionFormatter = pm.CreateExtensionPoint(TerminalEmulatorConstants.DYNAMIC_CAPTION_FORMATTER_EXTENSIONPOINT, typeof(IDynamicCaptionFormatter), this);

            //Command Popup
            CommandResultSession.Init(poderosa);
            PopupStyleCommandResultRecognizer.CreateExtensionPointAndDefaultCommands(pm);

            // Preferences for PromptRecognizer
            cs.PreferenceExtensionPoint.RegisterExtension(PromptRecognizerPreferences.Instance);

            // Preferences for XTerm
            cs.PreferenceExtensionPoint.RegisterExtension(XTermPreferences.Instance);
        }
Пример #46
0
        /// <summary>
        /// <ja>初期化</ja>
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new StringResource("Poderosa.ExtendPaste.strings", typeof(ExtendPastePlugin).Assembly);
            ExtendPastePlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // コマンド登録
            IPluginManager pm = poderosa.PluginManager;
            IExtensionPoint extp_cmd = pm.FindExtensionPoint("org.poderosa.terminalsessions.pasteCommand");
            extp_cmd.RegisterExtension(new ExtendPasteCommand());

            // オプションパネル登録
            IExtensionPoint extp_opt = pm.FindExtensionPoint("org.poderosa.optionpanel");
            extp_opt.RegisterExtension(new ExtendPastePanelExtension());

            // オプションクラス登録
            _optionSupplier = new ExtendPasteOptionsSupplier();
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);
        }
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new Poderosa.StringResource("Contrib.ConnectProfile.strings", typeof(ConnectProfilePlugin).Assembly);
            ConnectProfilePlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // コマンド登録
            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorPlugin = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            ConnectProfileCommand.Register(_coreServices.CommandManager);

            // メニューリスト作成
            ConnectProfileMenuGroup menulist = new ConnectProfileMenuGroup();
            ConnectProfileContextMenuGroup contextmenulist = new ConnectProfileContextMenuGroup();

            // メニュー登録
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");
            toolmenu.RegisterExtension(menulist);

            // コンテキストメニュー登録
            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");
            contextmenu.RegisterExtension(contextmenulist);

            // 設定ファイル連携
            _connectProfileOptionSupplier = new ConnectProfileOptionsSupplier();
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_connectProfileOptionSupplier);

            // 接続プロファイル
            _profiles = new ConnectProfileList();
        }
 public TinyurlShorteningService(ICoreServices coreService)
 {
     this.coreService = coreService;
 }
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new Poderosa.StringResource("Contrib.BroadcastCommand.strings", typeof(BroadcastCommandPlugin).Assembly);
            BroadcastCommandPlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // メニュー登録
            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _broadcastCommandCommand = new BroadcastCommandCommand();
            _coreServices.CommandManager.Register(_broadcastCommandCommand);
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");
            toolmenu.RegisterExtension(new PoderosaMenuGroupImpl(new IPoderosaMenu[] { new PoderosaMenuItemImpl(_broadcastCommandCommand, BroadcastCommandPlugin.Strings, "Menu.BroadcastCommand") }, false));
        }
 public TwitLongerTweetService(ICoreServices coreService)
 {
     this.coreService = coreService;
       this.LoadSettings();
 }
Пример #51
0
 public FeedbackCommandTest() {
     _lp = Substitute.For<ILoggingPermissions>();
     _services = TestCoreServices.CreateSubstitute(_lp);
 }
Пример #52
0
 public GoogleService(ICoreServices coreService)
 {
     this.coreService = coreService;
 }
 public OpenAdminCommandPromptCommand(ICoreServices services) :
     base(RPackageCommandId.icmdOpenAdminCmdPromptHere, services.ProcessServices) { }
Пример #54
0
 public SendSmileCommand(ICoreServices services) :
     base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdSendSmile, services) {
 }
Пример #55
0
 public static void Init(ICoreServices cs)
 {
     cs.PreferenceExtensionPoint.RegisterExtension(ProtocolsPlugin.Instance.ProtocolOptionsSupplier);
     _strings = new StringResource("Poderosa.Protocols.strings", typeof(PEnv).Assembly);
     ProtocolsPlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_strings);
     _windowManager = cs.WindowManager;
 }
Пример #56
0
 public BingService(ICoreServices coreService)
 {
     this.coreService = coreService;
 }
Пример #57
0
 public RSessionProvider(ICoreServices services, IConsole callback = null) {
     _console = callback ?? new NullConsole();
     _brokerProxy = new BrokerClientProxy();
     _services = services;
 }
Пример #58
0
 public SendMailCommand(Guid group, int id, ICoreServices services) :
     base(group, id) {
     Services = services;
 }
 public BitlyShorteningService(ICoreServices coreService)
 {
     this.coreService = coreService;
       this.LoadSettings();
 }