put console attributes in own variable
This commit is contained in:
parent
a247624e90
commit
2661fbe0b9
|
@ -154,7 +154,8 @@ namespace ColorTool
|
|||
|
||||
if (colorTable != null)
|
||||
{
|
||||
return new ColorScheme { colorTable = colorTable, consoleAttributes = new ConsoleAttributes { background = backgroundColor, foreground = foregroundColor, popupBackground = popupBackgroundColor, popupForeground = popupForegroundColor } };
|
||||
var consoleAttributes = new ConsoleAttributes { background = backgroundColor, foreground = foregroundColor, popupBackground = popupBackgroundColor, popupForeground = popupForegroundColor };
|
||||
return new ColorScheme { colorTable = colorTable, consoleAttributes = consoleAttributes };
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -116,7 +116,8 @@ namespace ColorTool
|
|||
}
|
||||
}
|
||||
|
||||
return new ColorScheme { colorTable = colorTable, consoleAttributes = new ConsoleAttributes { background = screenBackground, foreground = screenForeground, popupBackground = popupBackground, popupForeground = popupForeground } };
|
||||
var consoleAttributes = new ConsoleAttributes { background = screenBackground, foreground = screenForeground, popupBackground = popupBackground, popupForeground = popupForeground };
|
||||
return new ColorScheme { colorTable = colorTable, consoleAttributes = consoleAttributes };
|
||||
}
|
||||
catch (Exception /*e*/)
|
||||
{
|
||||
|
|
|
@ -135,7 +135,8 @@ namespace ColorTool
|
|||
return null;
|
||||
}
|
||||
|
||||
return new ColorScheme { colorTable = colorTable, consoleAttributes = new ConsoleAttributes { foreground = fgColor, background = bgColor } };
|
||||
var consoleAttributes = new ConsoleAttributes { foreground = fgColor, background = bgColor };
|
||||
return new ColorScheme { colorTable = colorTable, consoleAttributes = consoleAttributes };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue