Beispiel #1
0
        public void SaveTo(IFavorite favorite)
        {
            var consoleOptions = TerminalConnection.GetConsoleOptions(favorite);

            if (consoleOptions == null)
            {
                return;
            }
            consoleOptions.BackColor   = BackColorTextBox.Text;
            consoleOptions.Font        = FontTextbox.Text;
            consoleOptions.CursorColor = CursorColorTextBox.Text;
            consoleOptions.TextColor   = TextColorTextBox.Text;
            consoleOptions.Columns     = Convert.ToInt32(ColumnsTextBox.Text);
            consoleOptions.Rows        = Convert.ToInt32(RowsTextBox.Text);
        }
Beispiel #2
0
        public void LoadFrom(IFavorite favorite)
        {
            // replace with shared method
            var consoleOptions = TerminalConnection.GetConsoleOptions(favorite);

            if (consoleOptions == null)
            {
                return;
            }
            BackColorTextBox.Text   = consoleOptions.BackColor;
            FontTextbox.Text        = consoleOptions.Font;
            CursorColorTextBox.Text = consoleOptions.CursorColor;
            TextColorTextBox.Text   = consoleOptions.TextColor;
            ColumnsTextBox.Text     = consoleOptions.Columns.ToString();
            RowsTextBox.Text        = consoleOptions.Rows.ToString();
        }