mirror of
https://github.com/seriocomedy/ShiftOS-C-.git
synced 2025-02-02 13:07:33 +00:00
Initial commit.
This commit is contained in:
parent
98fe96c5d3
commit
9322701aa1
2 changed files with 15 additions and 22 deletions
|
@ -51,7 +51,7 @@ namespace ShiftOS
|
||||||
public void SetLanguage(SyntaxSettings.Language lang)
|
public void SetLanguage(SyntaxSettings.Language lang)
|
||||||
{
|
{
|
||||||
Color white = Color.Black;
|
Color white = Color.Black;
|
||||||
Color keyword = Color.Red;
|
Color keyword = Color.Orange;
|
||||||
Color integer = Color.LightGreen;
|
Color integer = Color.LightGreen;
|
||||||
Color comment = Color.DarkGray;
|
Color comment = Color.DarkGray;
|
||||||
Color str = Color.Orange;
|
Color str = Color.Orange;
|
||||||
|
@ -76,7 +76,7 @@ namespace ShiftOS
|
||||||
switch (lang)
|
switch (lang)
|
||||||
{
|
{
|
||||||
case SyntaxSettings.Language.Lua:
|
case SyntaxSettings.Language.Lua:
|
||||||
var kw = new List<string>() { "function", "local", "return", "if", "else", "elseif", "while", "true", "do", "next", "end", "for", "pairs", "in", "{", "}", "false", "=", "+", "-", "/", "*", "..", "," };
|
var kw = new List<string>() { "function", "then", "local", "return", "if", "else", "elseif", "while", "true", "do", "next", "end", "for", "pairs", "in", "{", "}", "false", "=", "+", "-", "/", "*", "..", "," };
|
||||||
Settings.Keywords.Clear();
|
Settings.Keywords.Clear();
|
||||||
foreach (var k in kw)
|
foreach (var k in kw)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,7 @@ using System.Drawing.Imaging;
|
||||||
|
|
||||||
namespace Skinning
|
namespace Skinning
|
||||||
{
|
{
|
||||||
|
[Obsolete("ShiftOS is moving to the new ShiftUI framework which has a built-in skinning engine. This Skin class is mostly un-needed now.")]
|
||||||
public class Skin {
|
public class Skin {
|
||||||
//Widget Positions
|
//Widget Positions
|
||||||
public string ALPosition = "Top";
|
public string ALPosition = "Top";
|
||||||
|
@ -561,29 +562,21 @@ namespace Skinning
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void loadskin()
|
public static void loadskin()
|
||||||
{
|
{
|
||||||
if(Directory.Exists(Paths.LoadedSkin))
|
if (Directory.Exists(Paths.LoadedSkin))
|
||||||
{
|
{
|
||||||
try {
|
string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json");
|
||||||
string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json");
|
loadedSkin = JsonConvert.DeserializeObject<Skin>(rawData);
|
||||||
loadedSkin = JsonConvert.DeserializeObject<Skin>(rawData);
|
if (File.Exists(Paths.LoadedSkin + "panels.json"))
|
||||||
if (File.Exists(Paths.LoadedSkin + "panels.json"))
|
|
||||||
{
|
|
||||||
string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json");
|
|
||||||
loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels);
|
|
||||||
LoadPanels();
|
|
||||||
}
|
|
||||||
loadimages();
|
|
||||||
LoadEmbeddedNamePack();
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
{
|
||||||
//No skin to load.
|
string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json");
|
||||||
loadedSkin = new Skin();
|
loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels);
|
||||||
loadedskin_images = new Images();
|
LoadPanels();
|
||||||
saveskin();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} else
|
loadimages();
|
||||||
|
LoadEmbeddedNamePack();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
loadedSkin = new Skin();
|
loadedSkin = new Skin();
|
||||||
loadedskin_images = new Images();
|
loadedskin_images = new Images();
|
||||||
|
|
Loading…
Add table
Reference in a new issue