コード例 #1
0
        public windowTerminalVTE(clsHost host)
            : base(String.Format("{0} - {1}:{2}",host.Name,host.RemoteHost,host.RemoteSSHPort))
        {
            SSH = new clsSSHTerminal(host);

            Host = host;
            HBox hbox = new HBox ();
            term = new Terminal ();
            term.CursorBlinks = true;
            term.MouseAutohide = false;
            term.ScrollOnKeystroke = true;
            term.DeleteBinding = TerminalEraseBinding.Auto;
            term.BackspaceBinding = TerminalEraseBinding.Auto;
            term.FontFromString = host.TerminalFont;
            term.Emulation = "xterm";
            term.Encoding = "UTF-8";

            term.SetSize(host.TerminalCols,host.TerminalRows);

            VScrollbar vscroll = new VScrollbar (term.Adjustment);
            hbox.PackStart (term);
            hbox.PackStart (vscroll);

            this.CanFocus = true;

            this.Add (hbox);
            ShowAll ();

            SSH.TerminalData += (string text) =>
            {
                Gtk.Application.Invoke (delegate {
                    term.Feed(text);
                });
            };
        }
コード例 #2
0
        public windowTerminalVTE(clsHost host) : base(String.Format("{0} - {1}:{2}", host.Name, host.RemoteHost, host.RemoteSSHPort))
        {
            SSH = new clsSSHTerminal(host);

            Host = host;
            HBox hbox = new HBox();

            term = new Terminal();
            term.CursorBlinks      = true;
            term.MouseAutohide     = false;
            term.ScrollOnKeystroke = true;
            term.DeleteBinding     = TerminalEraseBinding.Auto;
            term.BackspaceBinding  = TerminalEraseBinding.Auto;
            term.FontFromString    = host.TerminalFont;
            term.Emulation         = "xterm";
            term.Encoding          = "UTF-8";

            term.SetSize(host.TerminalCols, host.TerminalRows);

            VScrollbar vscroll = new VScrollbar(term.Adjustment);

            hbox.PackStart(term);
            hbox.PackStart(vscroll);

            this.CanFocus = true;

            this.Add(hbox);
            ShowAll();

            SSH.TerminalData += (string text) =>
            {
                Gtk.Application.Invoke(delegate {
                    term.Feed(text);
                });
            };
        }