public static SysLinuxConfigFile OpenFile(string filename, SysLinuxAppearance sysLinuxAppearance) { var configFile = new SysLinuxConfigFile(filename, sysLinuxAppearance); configFile.Load(File.ReadAllText(filename)); return(configFile); }
public static SysLinuxConfigFile Create(string filename, SysLinuxAppearance sysLinuxAppearance) { var configFile = new SysLinuxConfigFile(filename, sysLinuxAppearance); configFile.CreateNew(); return(configFile); }
public BootStickCreator(DriveInfo drive, SysLinuxAppearance sysLinuxAppearance) { _drive = drive; _sysLinuxAppearance = sysLinuxAppearance; _installer = new List <InstallerInfo> { new DefaultInstaller(), new KasperskyRescueDiskInstaller(), new KonBootPurchased(), new Memtest86() }.ToDictionary(x => x.InstallMethod, x => x); }
private bool LoadConfig(string content, string filename) { string pattern; var match = Regex.Match(content, pattern = RegexReplaceNewLine(@"UI vesamenu\.c32 TIMEOUT 300 MENU RESOLUTION 640 480 MENU TITLE (?<title>(.*?)) MENU BACKGROUND background\.png MENU TABMSG (?<tabmsg>(.*?)) MENU CLEAR MENU WIDTH 72 MENU MARGIN 10 MENU VSHIFT 3 MENU HSHIFT 6 MENU ROWS 15 MENU TABMSGROW 20 MENU TIMEOUTROW 22 MENU COLOR title 1;36;44 (?<titleForeground>(#.*?)) (?<titleBackground>(#.*?)) none MENU COLOR hotsel 30;47 #2980b9 #DDDDDDDD MENU COLOR sel 30;47 (?<selectedForeground>(#.*?)) (?<selectedBackground>(#.*?)) MENU COLOR border 30;44 (?<borderForeground>(#.*?)) (?<borderBackground>(#.*?)) std MENU COLOR scrollbar 30;44 (?<scrollbarForeground>(#.*?)) (?<scrollbarBackground>(#.*?)) none MENU COLOR tabmsg 31;40 (?<tabmsgForeground>(#.*?)) #00000000 std MENU COLOR unsel 37;44 (?<unselectedForeground>(#.*?)) (?<unselectedBackground>(#.*?)) std" )); if (!match.Success) { return(false); } SysLinuxAppearance = new SysLinuxAppearance { ScreenTitle = match.Groups["title"].Value, ScreenMessage = match.Groups["tabmsg"].Value, TitleForegroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["titleForeground"].Value), TitleBackgroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["titleBackground"].Value), SelectedForegroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["selectedForeground"].Value), SelectedBackgroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["selectedBackground"].Value), BorderForegroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["borderForeground"].Value), BorderBackgroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["borderBackground"].Value), ScrollBarForegroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["scrollbarForeground"].Value), ScrollBarBackgroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["scrollbarBackground"].Value), TabMsgForegroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["tabmsgForeground"].Value), UnselectedForegroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["unselectedForeground"].Value), UnselectedBackgroundColor = (Color)ColorConverter.ConvertFromString(match.Groups["unselectedBackground"].Value), ScreenBackground = Path.Combine(Path.GetDirectoryName(filename), "background.png") }; _content = content; ParseEntries(); return(true); }
private SysLinuxConfigFile(string filename, SysLinuxAppearance sysLinuxAppearance) { _filename = filename; SysLinuxAppearance = sysLinuxAppearance; Entries = new ObservableCollection <SystemEntry>(); }
public AppearanceDesignerWindow(SysLinuxAppearance sysLinuxAppearance) { SysLinuxAppearance = sysLinuxAppearance; InitializeComponent(); }
public UsbStickSettings() { SysLinuxAppearance = new SysLinuxAppearance(); }