internal TerminalParam() { _encoding = EncodingType.EUC_JP; _logtype = LogType.None; _terminalType = TerminalType.XTerm; _localecho = false; _lineFeedRule = LineFeedRule.Normal; _transmitnl = NewLine.CR; _renderProfile = null; }
internal void Import(TerminalParam r) { _encoding = r._encoding; _logtype = r._logtype; _logpath = r._logpath; _localecho = r._localecho; _transmitnl = r._transmitnl; _lineFeedRule = r._lineFeedRule; _terminalType = r._terminalType; _renderProfile = r._renderProfile == null ? null : new RenderProfile(r._renderProfile); _caption = r._caption; }
public virtual void Import(ConfigNode data) { _encoding = ParseEncoding(data["encoding"]); _terminalType = (TerminalType)EnumDescAttribute.For(typeof(TerminalType)).FromName(data["terminal-type"], TerminalType.VT100); _transmitnl = (NewLine)EnumDescAttribute.For(typeof(NewLine)).FromName(data["transmit-nl"], NewLine.CR); _localecho = GUtil.ParseBool(data["localecho"], false); //_lineFeedByCR = GUtil.ParseBool((string)data["linefeed-by-cr"], false); _lineFeedRule = (LineFeedRule)EnumDescAttribute.For(typeof(LineFeedRule)).FromName(data["linefeed"], LineFeedRule.Normal); _caption = data["caption"]; if (data.Contains("font-name")) //項目がなければ空のまま { _renderProfile = new RenderProfile(data); } }
//ListenerˆÈŠO‚ðŽ‚Á‚Ä‚‚é public virtual void Import(ITerminalSettings src) { _encoding = src.Encoding; _terminalType = src.TerminalType; _localecho = src.LocalEcho; _lineFeedRule = src.LineFeedRule; _transmitnl = src.TransmitNL; _caption = src.Caption; //_icon = src.Icon; _debug = src.DebugFlag; TerminalSettings src_r = (TerminalSettings)src; _multiLogSettings = src.LogSettings == null? null : (IMultiLogSettings)_multiLogSettings.Clone(); }
public TerminalSettings() { //IPoderosaCulture culture = TerminalEmulatorPlugin.Instance.PoderosaWorld.Culture; //if (culture.IsJapaneseOS || culture.IsSimplifiedChineseOS || culture.IsTraditionalChineseOS || culture.IsKoreanOS) // _encoding = EncodingType.UTF8; //else _encoding = EncodingType.ISO8859_1; _debug = 0; _terminalType = TerminalType.XTerm; _localecho = false; _lineFeedRule = LineFeedRule.Normal; _transmitnl = NewLine.CR; _multiLogSettings = new MultiLogSettings(); _listeners = new ListenerList <ITerminalSettingsChangeListener>(); }
//Listener以外を持ってくる public virtual void Import(ITerminalSettings src) { _encoding = src.Encoding; _terminalType = src.TerminalType; _localecho = src.LocalEcho; _lineFeedRule = src.LineFeedRule; _transmitnl = src.TransmitNL; _caption = src.Caption; _icon = src.Icon; TerminalSettings src_r = (TerminalSettings)src; _shellSchemeName = src_r._shellSchemeName; //ちょっとインチキ if (src_r._shellScheme != null) { _shellScheme = src_r._shellScheme; TerminalEmulatorPlugin.Instance.ShellSchemeCollection.AddDynamicChangeListener(this); } _enabledCharTriggerIntelliSense = src.EnabledCharTriggerIntelliSense; _renderProfile = src.RenderProfile == null ? null : (RenderProfile)src.RenderProfile.Clone(); _multiLogSettings = src.LogSettings == null ? null : (IMultiLogSettings)_multiLogSettings.Clone(); }
public TerminalSettings() { IPoderosaCulture culture = TerminalEmulatorPlugin.Instance.PoderosaWorld.Culture; if (culture.IsJapaneseOS || culture.IsSimplifiedChineseOS || culture.IsTraditionalChineseOS || culture.IsKoreanOS) _encoding = EncodingType.UTF8; else _encoding = EncodingType.ISO8859_1; _terminalType = TerminalType.XTerm; _localecho = false; _lineFeedRule = LineFeedRule.Normal; _transmitnl = NewLine.CR; _renderProfile = null; _shellSchemeName = ShellSchemeCollection.DEFAULT_SCHEME_NAME; _enabledCharTriggerIntelliSense = false; _multiLogSettings = new MultiLogSettings(); _listeners = new ListenerList<ITerminalSettingsChangeListener>(); }
public TerminalSettings() { //IPoderosaCulture culture = TerminalEmulatorPlugin.Instance.PoderosaWorld.Culture; //if (culture.IsJapaneseOS || culture.IsSimplifiedChineseOS || culture.IsTraditionalChineseOS || culture.IsKoreanOS) // _encoding = EncodingType.UTF8; //else // _encoding = EncodingType.ISO8859_1; _encoding = Poderosa.Protocols.CygwinUtil.CygwinDefaultEncoding; _terminalType = TerminalType.Cygwin; _localecho = false; _lineFeedRule = LineFeedRule.Normal; _transmitnl = NewLine.CR; _renderProfile = null; _shellSchemeName = ShellSchemeCollection.DEFAULT_SCHEME_NAME; _enabledCharTriggerIntelliSense = false; _multiLogSettings = new MultiLogSettings(); _listeners = new ListenerList <ITerminalSettingsChangeListener>(); }
//Listener以外を持ってくる public virtual void Import(ITerminalSettings src) { _encoding = src.Encoding; _terminalType = src.TerminalType; _localecho = src.LocalEcho; _lineFeedRule = src.LineFeedRule; _transmitnl = src.TransmitNL; _caption = src.Caption; _icon = src.Icon; TerminalSettings src_r = (TerminalSettings)src; _shellSchemeName = src_r._shellSchemeName; //ちょっとインチキ if (src_r._shellScheme != null) { _shellScheme = src_r._shellScheme; TerminalEmulatorPlugin.Instance.ShellSchemeCollection.AddDynamicChangeListener(this); } _enabledCharTriggerIntelliSense = src.EnabledCharTriggerIntelliSense; _renderProfile = src.RenderProfile == null ? null : (RenderProfile)src.RenderProfile.Clone(); _multiLogSettings = src.LogSettings == null ? null : (IMultiLogSettings)_multiLogSettings.Clone(); }
public virtual void Import(ConfigNode data) { _encoding = ParseEncoding(data["encoding"]); _terminalType = (TerminalType)EnumDescAttribute.For(typeof(TerminalType)).FromName(data["terminal-type"], TerminalType.VT100); _transmitnl = (NewLine)EnumDescAttribute.For(typeof(NewLine)).FromName(data["transmit-nl"], NewLine.CR); _localecho = GUtil.ParseBool(data["localecho"], false); //_lineFeedByCR = GUtil.ParseBool((string)data["linefeed-by-cr"], false); _lineFeedRule = (LineFeedRule)EnumDescAttribute.For(typeof(LineFeedRule)).FromName(data["linefeed"], LineFeedRule.Normal); _caption = data["caption"]; if(data.Contains("font-name")) //���ڂ��Ȃ����̂܂� _renderProfile = new RenderProfile(data); }
internal void Import(TerminalParam r) { _encoding = r._encoding; _logtype = r._logtype; _logpath = r._logpath; _localecho = r._localecho; _transmitnl = r._transmitnl; _lineFeedRule = r._lineFeedRule; _terminalType = r._terminalType; _renderProfile = r._renderProfile==null? null : new RenderProfile(r._renderProfile); _caption = r._caption; }
internal TerminalParam() { _encoding = EncodingType.EUC_JP; _logtype = LogType.None; _terminalType = TerminalType.XTerm; _localecho = false; _lineFeedRule = LineFeedRule.Normal; _transmitnl = NewLine.CR; _renderProfile = null; }
protected virtual ProcessCharResult ProcessControlChar(char ch) { if (ch == '\n' || ch == 0xB) //Vertical Tab‚ÍLF‚Æ“™‚µ‚¢ { LineFeedRule rule = GetTerminalSettings().LineFeedRule; if (rule == LineFeedRule.Normal || rule == LineFeedRule.LFOnly) { if (rule == LineFeedRule.LFOnly) //LF‚Ì‚Ý‚Ì“®ì‚Å‚ ‚é‚Æ‚« { DoCarriageReturn(); } DoLineFeed(); } return(ProcessCharResult.Processed); } else if (ch == '\r') { LineFeedRule rule = GetTerminalSettings().LineFeedRule; if (rule == LineFeedRule.Normal || rule == LineFeedRule.CROnly) { DoCarriageReturn(); if (rule == LineFeedRule.CROnly) { DoLineFeed(); } } return(ProcessCharResult.Processed); } else if (ch == 0x07) { this.IndicateBell(); return(ProcessCharResult.Processed); } else if (ch == 0x08) // Backspace //s“ª‚ÅA’¼‘Os‚Ì––”ö‚ªŒp‘±‚Å‚ ‚Á‚½ê‡s‚ð–ß‚· { GetDocument().PutChar(ch); return(ProcessCharResult.Processed); } else if (ch == 0x09) //Tabulator //_manipulator.CaretColumn = GetNextTabStop(_manipulator.CaretColumn); { GetDocument().TabStop(); return(ProcessCharResult.Processed); } else if (ch == 0x0E) { return(ProcessCharResult.Processed); //ˆÈ‰º‚Q‚‚ÍCharDecoder‚Ì’†‚ň—‚³‚ê‚Ä‚¢‚é‚Í‚¸‚È‚Ì‚Å–³Ž‹ } else if (ch == 0x0F) { return(ProcessCharResult.Processed); } else if (ch == 0x00) { return(ProcessCharResult.Processed); //null char‚Í–³Ž‹ !!CR NUL‚ðCR LF‚Æ‚Ý‚È‚·Žd—l‚ª‚ ‚邪ACR LF CR NUL‚Æ‚‚邱‚Æ‚à‚ ‚Á‚ē‚¢ } else { Debug.WriteLine("Unknown char " + (int)ch); //“K“–‚ȃOƒ‰ƒtƒBƒbƒN•\Ž¦‚Ù‚µ‚¢ return(ProcessCharResult.Unsupported); } }
protected virtual ProcessCharResult ProcessControlChar(char ch) { if (ch == ControlCode.LF || ch == ControlCode.VT) //Vertical TabはLFと等しい { LineFeedRule rule = GetTerminalSettings().LineFeedRule; if (rule == LineFeedRule.Normal || rule == LineFeedRule.LFOnly) { if (rule == LineFeedRule.LFOnly) //LFのみの動作であるとき { DoCarriageReturn(); } DoLineFeed(); } return(ProcessCharResult.Processed); } else if (ch == ControlCode.CR) { LineFeedRule rule = GetTerminalSettings().LineFeedRule; if (rule == LineFeedRule.Normal || rule == LineFeedRule.CROnly) { DoCarriageReturn(); if (rule == LineFeedRule.CROnly) { DoLineFeed(); } } return(ProcessCharResult.Processed); } else if (ch == ControlCode.BEL) { this.IndicateBell(); return(ProcessCharResult.Processed); } else if (ch == ControlCode.BS) { //行頭で、直前行の末尾が継続であった場合行を戻す if (_manipulator.CaretColumn == 0) { TerminalDocument doc = GetDocument(); int line = doc.CurrentLineNumber - 1; if (line >= 0 && doc.FindLineOrEdge(line).EOLType == EOLType.Continue) { doc.InvalidatedRegion.InvalidateLine(doc.CurrentLineNumber); doc.CurrentLineNumber = line; if (doc.CurrentLine == null) { _manipulator.Clear(doc.TerminalWidth); } else { _manipulator.Load(doc.CurrentLine, doc.CurrentLine.DisplayLength - 1); //NOTE ここはCharLengthだったが同じだと思って改名した } doc.InvalidatedRegion.InvalidateLine(doc.CurrentLineNumber); } } else { _manipulator.BackCaret(); } return(ProcessCharResult.Processed); } else if (ch == ControlCode.HT) { _manipulator.CaretColumn = GetNextTabStop(_manipulator.CaretColumn); return(ProcessCharResult.Processed); } else if (ch == ControlCode.SO) { return(ProcessCharResult.Processed); //以下2つはCharDecoderの中で処理されているはずなので無視 } else if (ch == ControlCode.SI) { return(ProcessCharResult.Processed); } else if (ch == ControlCode.NUL) { return(ProcessCharResult.Processed); //null charは無視 !!CR NULをCR LFとみなす仕様があるが、CR LF CR NULとくることもあって難しい } else { //Debug.WriteLine("Unknown char " + (int)ch); //適当なグラフィック表示ほしい return(ProcessCharResult.Unsupported); } }
protected virtual ProcessCharResult ProcessControlChar(char ch) { if (ch == '\n' || ch == 0xB) //Vertical TabはLFと等しい { LineFeedRule rule = GetConnection().Param.LineFeedRule; if (rule == LineFeedRule.Normal || rule == LineFeedRule.LFOnly) { if (rule == LineFeedRule.LFOnly) //LFのみの動作であるとき { DoCarriageReturn(); } DoLineFeed(); } return(ProcessCharResult.Processed); } else if (ch == '\r') { LineFeedRule rule = GetConnection().Param.LineFeedRule; if (rule == LineFeedRule.Normal || rule == LineFeedRule.CROnly) { DoCarriageReturn(); if (rule == LineFeedRule.CROnly) { DoLineFeed(); } } return(ProcessCharResult.Processed); } else if (ch == 0x07) { _tag.Receiver.IndicateBell(); return(ProcessCharResult.Processed); } else if (ch == 0x08) { //行頭で、直前行の末尾が継続であった場合行を戻す if (_manipulator.CaretColumn == 0) { TerminalDocument doc = GetDocument(); int line = doc.CurrentLineNumber - 1; if (line >= 0 && doc.FindLineOrEdge(line).EOLType == EOLType.Continue) { doc.InvalidateLine(doc.CurrentLineNumber); doc.CurrentLineNumber = line; if (doc.CurrentLine == null) { _manipulator.Clear(GetConnection().TerminalWidth); } else { _manipulator.Load(doc.CurrentLine, doc.CurrentLine.CharLength - 1); } doc.InvalidateLine(doc.CurrentLineNumber); } } else { _manipulator.BackCaret(); } return(ProcessCharResult.Processed); } else if (ch == 0x09) { _manipulator.CaretColumn = GetNextTabStop(_manipulator.CaretColumn); return(ProcessCharResult.Processed); } else if (ch == 0x0E) { return(ProcessCharResult.Processed); //以下2つはCharDecoderの中で処理されているはずなので無視 } else if (ch == 0x0F) { return(ProcessCharResult.Processed); } else if (ch == 0x00) { return(ProcessCharResult.Processed); //null charは無視 !!CR NULをCR LFとみなす仕様があるが、CR LF CR NULとくることもあって難しい } else { //Debug.WriteLine("Unknown char " + (int)ch); //適当なグラフィック表示ほしい return(ProcessCharResult.Unsupported); } }