/// <summary> /// /// </summary> /// <param name="host"></param> /// <param name="settings"></param> /// <param name="connection"></param> /// <exclude/> public TerminalTransmission(AbstractTerminal host, ITerminalSettings settings, ITerminalConnection connection) { _host = host; _settings = settings; _connection = connection; _dataForLocalEcho = new ByteDataFragment(); }
public void Init(AbstractTerminal terminal, IShellScheme scheme, string[] current_input, IntelliSenseMode mode, char append_char) { _ownerControl = terminal.TerminalHost.TerminalControl; Debug.Assert(_ownerControl != null); TerminalDocument doc = terminal.GetDocument(); _commandStartPoint = new Point(doc.CaretColumn + (append_char == '\0' ? 0 : 1), doc.CurrentLineNumber - doc.TopLineNumber); Debug.WriteLineIf(DebugOpt.IntelliSense, String.Format("IS CtxInit M={0} CaretC={1}", mode.ToString(), doc.CaretColumn)); _scheme = scheme; _currentInput = current_input; _intelliSenseMode = mode; Debug.Assert(_currentInput != null); _charQueue.LockedInit(append_char); _buffer.Remove(0, _buffer.Length); if (_intelliSenseMode == IntelliSenseMode.CharComplement) { string last_arg = current_input[current_input.Length - 1]; _buffer.Append(last_arg); _commandStartPoint.X -= last_arg.Length; } BuildCandidates(); }
public PromptRecognizer(AbstractTerminal term) { _terminal = term; _commandBuffer = new StringBuilder(); ITerminalSettings ts = term.TerminalHost.TerminalSettings; ts.AddListener(this); _promptExpression = new Regex(ts.ShellScheme.PromptExpression, RegexOptions.Compiled); //これはシェルにより可変 _listeners = new List <IPromptProcessor>(); }
public TerminalSession(ITerminalConnection connection, ITerminalSettings terminalSettings) { _terminalSettings = terminalSettings; //VT100指定でもxtermシーケンスを送ってくるアプリケーションが後をたたないので _terminal = AbstractTerminal.Create(new TerminalInitializeInfo(this, connection.Destination)); _output = new TerminalTransmission(_terminal, _terminalSettings, connection); _terminalSettings.ChangeCaption += delegate(string caption) { this.OwnerWindow.DocumentTabFeature.Update(_terminal.IDocument); }; }
public PromptRecognizer(AbstractTerminal term) { _terminal = term; _commandBuffer = new StringBuilder(); ITerminalSettings ts = term.TerminalHost.TerminalSettings; ts.AddListener(this); _promptExpression = new Regex(ts.ShellScheme.PromptExpression, RegexOptions.Compiled); //これはシェルにより可変 _listeners = new List<IPromptProcessor>(); _lineCache = new LineCache(PromptRecognizerPreferences.Instance.PromptSearchMaxLines); _lastCachedLineID = -1; }
public TerminalSession(ITerminalConnection connection, ITerminalSettings terminalSettings) { _terminalSettings = terminalSettings; //VT100�w��ł�xterm�V�[�P���X�𑗂��Ă���A�v���P�[�V�������������Ȃ��̂� _terminal = AbstractTerminal.Create(new TerminalInitializeInfo(this, connection.Destination)); _output = new TerminalTransmission(_terminal, _terminalSettings, connection); _terminalSettings.ChangeCaption += delegate(string caption) { this.OwnerWindow.DocumentTabFeature.Update(_terminal.IDocument); }; }
public PromptRecognizer(AbstractTerminal term) { _terminal = term; _commandBuffer = new StringBuilder(); ITerminalSettings ts = term.TerminalHost.TerminalSettings; ts.AddListener(this); _promptExpression = new Regex(ts.ShellScheme.PromptExpression, RegexOptions.Compiled); //これはシェルにより可変 _listeners = new List <IPromptProcessor>(); _lineCache = new LineCache(PromptRecognizerPreferences.Instance.PromptSearchMaxLines); _lastCachedLineID = -1; }
public void Initialize(AbstractTerminal terminal) { StringResource sr = XZModemPlugin.Instance.Strings; _terminal = terminal; this.Text = String.Format(sr.GetString("Caption.XZModemDialog.DialogTitle"), _terminal.TerminalHost.ISession.Caption); //ウィンドウのセンタリング Rectangle r = terminal.TerminalHost.OwnerWindow.AsForm().DesktopBounds; this.Location = new Point(r.Left + r.Width / 2 - this.Width / 2, r.Top + r.Height / 2 - this.Height / 2); //TODO 前回の起動時の設定を覚えておくとよい _protocolBox.SelectedIndex = 1; _directionBox.SelectedIndex = 0; #if DEBUG //テスト時にはここに初期値を設定 _fileNameBox.Text = "C:\\P4\\Work\\FF4K_R.bin"; #endif }
private static void SessionEntryPoint(AbstractTerminal terminal, CommandResultDocument document) { try { TerminalControl tc = terminal.TerminalHost.TerminalControl; Debug.Assert(tc != null); RenderProfile rp = (RenderProfile)tc.GetRenderProfile().Clone(); CommandResultSession session = new CommandResultSession(document, rp); //現在のRenderProfileを使ってセッションを作る TerminalDocument terminaldoc = terminal.GetDocument(); PopupViewCreationParam cp = new PopupViewCreationParam(_viewFactory); //結果のサイズに合わせる。ただし高さは20行を上限とする cp.InitialSize = new Size(tc.ClientSize.Width, (int)(RuntimeUtil.AdjustIntRange(document.Size, 0, 20) * rp.Pitch.Height) + 2); cp.OwnedByCommandTargetWindow = GEnv.Options.CommandPopupAlwaysOnTop; cp.ShowInTaskBar = GEnv.Options.CommandPopupInTaskBar; IWindowManager wm = TerminalEmulatorPlugin.Instance.GetWindowManager(); ISessionManager sm = TerminalEmulatorPlugin.Instance.GetSessionManager(); IPoderosaPopupWindow window = wm.CreatePopupView(cp); sm.StartNewSession(session, window.InternalView); sm.ActivateDocument(session.Document, ActivateReason.InternalAction); } catch (Exception ex) { RuntimeUtil.ReportException(ex); } }
public ModalTerminalTaskSite(AbstractTerminal terminal) { _terminal = terminal; }
public void Attach(ITerminalControlHost session) { lock (_terminalSync) { _terminal = session.Terminal; } }
public void Detach() { lock (_terminalSync) { _terminal = null; } }
private bool _cancelLockFlag; //手動キャンセルしたら手動Enterがあるまで自動ポップアップはしない public IntelliSense(AbstractTerminal terminal) { _terminal = terminal; _context = new IntelliSenseContext(this); _terminal.PromptRecognizer.AddListener(this); }
public void Initialize(AbstractTerminal terminal) { StringResource sr = XZModemPlugin.Instance.Strings; _terminal = terminal; this.Text = String.Format(sr.GetString("Caption.XZModemDialog.DialogTitle"), _terminal.TerminalHost.ISession.Caption); //�E�B���h�E�̃Z���^�����O Rectangle r = terminal.TerminalHost.OwnerWindow.AsForm().DesktopBounds; this.Location = new Point(r.Left + r.Width / 2 - this.Width / 2, r.Top + r.Height / 2 - this.Height / 2); //TODO �O��̋N�����̐ݒ��o���Ă����Ƃ悢 _protocolBox.SelectedIndex = 1; _directionBox.SelectedIndex = 0; #if DEBUG //�e�X�g���ɂ͂����ɏ����l��ݒ� _fileNameBox.Text = "C:\\P4\\Work\\FF4K_R.bin"; #endif }
public void StartCommand(AbstractTerminal terminal, string command_text, GLine prompt_line) { }
public bool IsEnabled(AbstractTerminal control_host) { return(true); }
public PopupStyleCommandResultRecognizer(AbstractTerminal terminal) : base(terminal) { }
public void StartCommand(AbstractTerminal terminal, string command_text, GLine prompt_line) { _executingCommand = command_text; _terminal = terminal; }
public CommandResultRecognizer(AbstractTerminal terminal) { _terminal = terminal; _terminal.PromptRecognizer.AddListener(this); _state = State.NotPrompt; }
public bool IsEnabled(AbstractTerminal control_host) { return true; }