Example #1
0
        public windowTerminalGTK(clsHost host)
            : base(String.Format("{0} - {1}:{2}",host.Name,host.RemoteHost,host.RemoteSSHPort))
        {
            SSH = new clsSSHTerminal(host);
            Host = host;

            ScrolledWindow scrolledWindow = new ScrolledWindow();
            textview1 = new TextView();

            this.SetSizeRequest(800,600);

            scrolledWindow.Add(textview1);
            textview1.ModifyFont(FontDescription.FromString(host.TerminalFont));

            this.Add(scrolledWindow);

            this.CanFocus = true;

            ShowAll ();

            SSH.TerminalData += (string text) =>
            {
                Gtk.Application.Invoke (delegate {
                    TextIter mIter = textview1.Buffer.EndIter;
                    textview1.Buffer.Insert(ref mIter, text);
                    textview1.ScrollToIter(textview1.Buffer.EndIter, 0, false, 0, 0);
                });
            };
        }
Example #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);
                });
            };
        }
Example #3
0
        public windowTerminalGTK(clsHost host) : base(String.Format("{0} - {1}:{2}", host.Name, host.RemoteHost, host.RemoteSSHPort))
        {
            SSH  = new clsSSHTerminal(host);
            Host = host;

            ScrolledWindow scrolledWindow = new ScrolledWindow();

            textview1 = new TextView();

            this.SetSizeRequest(800, 600);

            scrolledWindow.Add(textview1);
            textview1.ModifyFont(FontDescription.FromString(host.TerminalFont));


            this.Add(scrolledWindow);

            this.CanFocus = true;

            ShowAll();

            SSH.TerminalData += (string text) =>
            {
                Gtk.Application.Invoke(delegate {
                    TextIter mIter = textview1.Buffer.EndIter;
                    textview1.Buffer.Insert(ref mIter, text);
                    textview1.ScrollToIter(textview1.Buffer.EndIter, 0, false, 0, 0);
                });
            };
        }
Example #4
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);
                });
            };
        }