mirror of
https://github.com/seriocomedy/ShiftOS-C-.git
synced 2025-01-23 01:22:16 +00:00
Release Candidate 2
We're almost there...
This commit is contained in:
parent
e2d2829ce9
commit
c43d82eebd
5 changed files with 82 additions and 163 deletions
|
@ -30,6 +30,7 @@ private void setbgcolor(object sender, MouseEventArgs e)
|
||||||
var c = API.GetLastColorFromSession();
|
var c = API.GetLastColorFromSession();
|
||||||
pnl.BackgroundColor = c;
|
pnl.BackgroundColor = c;
|
||||||
pnl.BackgroundImage = null;
|
pnl.BackgroundImage = null;
|
||||||
|
pnl.ImagePath = null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if(e.Button == MouseButtons.Right)
|
else if(e.Button == MouseButtons.Right)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"BufferOverflow":{"IsLeader":false,"Name":"BufferOverflow","FriendDesc":"BufferOverflow is a question-and-answer site with millions of Shifters willing to share their knowledge.","Description":"BufferOverflow is a question-and-answer site with millions of Shifters willing to share their knowledge.","FriendSpeed":0,"FriendSkill":0,"Difficulty":"easy","Network":[{"Hostname":"bufferoverflow","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"main_av","ModuleType":0,"Type":1,"HP":0,"Grade":4,"X":371,"Y":148},{"Hostname":"defense1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":252,"Y":121},{"Hostname":"defense2","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":251,"Y":163}]},
|
"BufferOverflow":{"IsLeader":false,"Name":"BufferOverflow","FriendDesc":"BufferOverflow is a question-and-answer site with millions of Shifters willing to share their knowledge.","Description":"BufferOverflow is a question-and-answer site with millions of Shifters willing to share their knowledge.","FriendSpeed":0,"FriendSkill":0,"Difficulty":"easy","Network":[{"Hostname":"bufferoverflow","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"main_av","ModuleType":0,"Type":1,"HP":0,"Grade":4,"X":371,"Y":148},{"Hostname":"defense1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":252,"Y":121},{"Hostname":"defense2","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":251,"Y":163}]},
|
||||||
"Exodus Software":{"IsLeader":false,"Name":"Exodus Software","FriendDesc":"Known for their ShiftOS desktop environment \"Exodus Desktop Environment\", Exodus Software is well-known among the ShiftOS user-base. Now they're trying to dig their hands into hacker battles.","Description":"Known for their ShiftOS desktop environment \"Exodus Desktop Environment\", Exodus Software is well-known among the ShiftOS user-base. Now they're trying to dig their hands into hacker battles.","FriendSpeed":75,"FriendSkill":45,"Difficulty":"easy","Network":[{"Hostname":"exodus_software","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"exds_turret1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":500,"Y":215},{"Hostname":"exds_antimalware","ModuleType":0,"Type":1,"HP":0,"Grade":1,"X":500,"Y":259},{"Hostname":"exds_antimalware2","ModuleType":0,"Type":1,"HP":0,"Grade":1,"X":498,"Y":162},{"Hostname":"exds_repairman","ModuleType":0,"Type":9,"HP":0,"Grade":2,"X":351,"Y":210}]},
|
"Exodus Software":{"IsLeader":false,"Name":"Exodus Software","FriendDesc":"Known for their ShiftOS desktop environment \"Exodus Desktop Environment\", Exodus Software is well-known among the ShiftOS user-base. Now they're trying to dig their hands into hacker battles.","Description":"Known for their ShiftOS desktop environment \"Exodus Desktop Environment\", Exodus Software is well-known among the ShiftOS user-base. Now they're trying to dig their hands into hacker battles.","FriendSpeed":75,"FriendSkill":45,"Difficulty":"easy","Network":[{"Hostname":"exodus_software","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"exds_turret1","ModuleType":0,"Type":3,"HP":0,"Grade":4,"X":500,"Y":215},{"Hostname":"exds_antimalware","ModuleType":0,"Type":1,"HP":0,"Grade":1,"X":500,"Y":259},{"Hostname":"exds_antimalware2","ModuleType":0,"Type":1,"HP":0,"Grade":1,"X":498,"Y":162},{"Hostname":"exds_repairman","ModuleType":0,"Type":9,"HP":0,"Grade":2,"X":351,"Y":210}]},
|
||||||
"Orange Inc.":{"IsLeader":false,"Name":"Orange Inc.","FriendDesc":"Orange is a computer industry giant. Let's see how they can compete in a Hacker Battle.","Description":"Orange is a computer industry giant. Let's see how they can compete in a Hacker Battle.","FriendSpeed":100,"FriendSkill":2001,"Difficulty":"hard","Network":[{"Hostname":"orange_inc.","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"blood_orange","ModuleType":0,"Type":6,"HP":0,"Grade":4,"X":484,"Y":203},{"Hostname":"yummy","ModuleType":0,"Type":2,"HP":0,"Grade":3,"X":497,"Y":150},{"Hostname":"juicy","ModuleType":0,"Type":5,"HP":0,"Grade":4,"X":356,"Y":212},{"Hostname":"sweet","ModuleType":0,"Type":9,"HP":0,"Grade":2,"X":316,"Y":212},{"Hostname":"orange","ModuleType":0,"Type":2,"HP":0,"Grade":3,"X":490,"Y":270}]}
|
"Orange Inc.":{"IsLeader":false,"Name":"Orange Inc.","FriendDesc":"Orange is a computer industry giant. Let's see how they can compete in a Hacker Battle.","Description":"Orange is a computer industry giant. Let's see how they can compete in a Hacker Battle.","FriendSpeed":100,"FriendSkill":2001,"Difficulty":"hard","Network":[{"Hostname":"orange_inc.","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"blood_orange","ModuleType":0,"Type":6,"HP":0,"Grade":4,"X":484,"Y":203},{"Hostname":"yummy","ModuleType":0,"Type":2,"HP":0,"Grade":3,"X":497,"Y":150},{"Hostname":"juicy","ModuleType":0,"Type":5,"HP":0,"Grade":4,"X":356,"Y":212},{"Hostname":"sweet","ModuleType":0,"Type":9,"HP":0,"Grade":2,"X":316,"Y":212},{"Hostname":"orange","ModuleType":0,"Type":2,"HP":0,"Grade":3,"X":490,"Y":270}]},
|
||||||
|
"UltraDOS Foundation":{"IsLeader":false,"Name":"UltraDOS Foundation","FriendDesc":"UltraDOS Foundation is a group of competent programmers responsible for the ShiftOS-based UltraDOS operating system.","Description":"UltraDOS Foundation is a group of competent programmers responsible for the ShiftOS-based UltraDOS operating system.","FriendSpeed":65,"FriendSkill":75,"Difficulty":"medium","Network":[{"Hostname":"ultrados_foundation","ModuleType":0,"Type":0,"HP":100,"Grade":1,"X":0,"Y":0},{"Hostname":"ud_trt1","ModuleType":0,"Type":3,"HP":0,"Grade":2,"X":361,"Y":171},{"Hostname":"ud_trt2","ModuleType":0,"Type":3,"HP":0,"Grade":2,"X":358,"Y":220},{"Hostname":"ud_repairer","ModuleType":0,"Type":9,"HP":0,"Grade":4,"X":494,"Y":215}]}
|
||||||
}
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -482,6 +483,7 @@ private void btnwindows_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
public void GrabSkinData()
|
public void GrabSkinData()
|
||||||
{
|
{
|
||||||
|
Skinning.Utilities.SavePanels();
|
||||||
string json = JsonConvert.SerializeObject(API.CurrentSkin);
|
string json = JsonConvert.SerializeObject(API.CurrentSkin);
|
||||||
CustomizingSkin = JsonConvert.DeserializeObject<Skinning.Skin>(json);
|
CustomizingSkin = JsonConvert.DeserializeObject<Skinning.Skin>(json);
|
||||||
GetAllImages();
|
GetAllImages();
|
||||||
|
@ -625,6 +627,8 @@ private void btnapply_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
Skinning.Utilities.loadedSkin = CustomizingSkin;
|
Skinning.Utilities.loadedSkin = CustomizingSkin;
|
||||||
Skinning.Utilities.loadedskin_images = CustomizingImages;
|
Skinning.Utilities.loadedskin_images = CustomizingImages;
|
||||||
|
API.CurrentSkin.DesktopPanels = JsonConvert.DeserializeObject<List<Skinning.DesktopPanel>>(File.ReadAllText(Paths.LoadedSkin + "panels.json"));
|
||||||
|
Skinning.Utilities.LoadPanels();
|
||||||
Skinning.Utilities.saveimages();
|
Skinning.Utilities.saveimages();
|
||||||
Skinning.Utilities.saveskin();
|
Skinning.Utilities.saveskin();
|
||||||
API.AddCodepoints(codepointstogive);
|
API.AddCodepoints(codepointstogive);
|
||||||
|
|
|
@ -1451,46 +1451,60 @@ public void DoCommand()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "endgame_test":
|
case "endgame_test":
|
||||||
try
|
if (API.DeveloperMode)
|
||||||
{
|
{
|
||||||
switch(args[1])
|
try
|
||||||
{
|
{
|
||||||
case "choice_screen":
|
switch (args[1])
|
||||||
var cscreen = new ShiftOS.FinalMission.ChooseYourApproach();
|
{
|
||||||
cscreen.WindowState = FormWindowState.Maximized;
|
case "choice_screen":
|
||||||
//cscreen.TopMost = true;
|
var cscreen = new ShiftOS.FinalMission.ChooseYourApproach();
|
||||||
cscreen.Show();
|
cscreen.WindowState = FormWindowState.Maximized;
|
||||||
break;
|
//cscreen.TopMost = true;
|
||||||
case "limitedmode":
|
cscreen.Show();
|
||||||
API.LimitedMode = !API.LimitedMode;
|
break;
|
||||||
WriteLine($"Limited mode set to {API.LimitedMode}.");
|
case "limitedmode":
|
||||||
break;
|
API.LimitedMode = !API.LimitedMode;
|
||||||
|
WriteLine($"Limited mode set to {API.LimitedMode}.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
WriteLine("Invalid arguments.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
else
|
||||||
{
|
{
|
||||||
WriteLine("Invalid arguments.");
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "fake_buy":
|
case "fake_buy":
|
||||||
try
|
if (API.DeveloperMode)
|
||||||
{
|
{
|
||||||
if(API.Upgrades.ContainsKey(args[1]))
|
try
|
||||||
{
|
{
|
||||||
API.Upgrades[args[1]] = true;
|
if (API.Upgrades.ContainsKey(args[1]))
|
||||||
WriteLine($"Bought upgrade {args[1]}.");
|
{
|
||||||
API.CurrentSession.SetupAppLauncher();
|
API.Upgrades[args[1]] = true;
|
||||||
API.UpdateWindows();
|
WriteLine($"Bought upgrade {args[1]}.");
|
||||||
SaveSystem.Utilities.saveGame();
|
API.CurrentSession.SetupAppLauncher();
|
||||||
|
API.UpdateWindows();
|
||||||
|
SaveSystem.Utilities.saveGame();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WriteLine("Upgrade not found.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch
|
||||||
{
|
{
|
||||||
WriteLine("Upgrade not found.");
|
WriteLine("fake_buy: Bad arguments.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
else
|
||||||
{
|
{
|
||||||
WriteLine("fake_buy: Bad arguments.");
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "connections":
|
case "connections":
|
||||||
|
@ -1571,21 +1585,9 @@ public void DoCommand()
|
||||||
else { wrongcommand(); }
|
else { wrongcommand(); }
|
||||||
break;
|
break;
|
||||||
case "htutorial":
|
case "htutorial":
|
||||||
ShiftOS.Hacking.StartBattleTutorial();
|
if (API.DeveloperMode)
|
||||||
break;
|
|
||||||
case "lua_test":
|
|
||||||
if(API.DeveloperMode == true)
|
|
||||||
{
|
{
|
||||||
if(Lua_API.UseLuaAPI == true)
|
ShiftOS.Hacking.StartBattleTutorial();
|
||||||
{
|
|
||||||
WriteLine("Lua API disabled, 'saa' command uses old Modding API");
|
|
||||||
Lua_API.UseLuaAPI = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WriteLine("ShiftOS Lua API enabled. 'saa' command now parses Lua code and interprets it.");
|
|
||||||
Lua_API.UseLuaAPI = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1613,15 +1615,22 @@ public void DoCommand()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "toggle_music":
|
case "toggle_music":
|
||||||
if(Audio.Enabled == false)
|
if (API.DeveloperMode)
|
||||||
{
|
{
|
||||||
WriteLine(@"Music enabled.
|
if (Audio.Enabled == false)
|
||||||
|
{
|
||||||
|
WriteLine(@"Music enabled.
|
||||||
|
|
||||||
Warning: The music player code in ShiftOS has a memory leak issue and is quite CPU-intensive. If your CPU fan starts to spin up while listening to a song, that's why.
|
Warning: The music player code in ShiftOS has a memory leak issue and is quite CPU-intensive. If your CPU fan starts to spin up while listening to a song, that's why.
|
||||||
|
|
||||||
Warning: Music is not embedded within the game. You must download the external resources directory at http://playshiftos.ml/shiftos/resources.zip to have applications play their music.");
|
Warning: Music is not embedded within the game. You must download the external resources directory at http://playshiftos.ml/shiftos/resources.zip to have applications play their music.");
|
||||||
|
}
|
||||||
|
Audio.Enabled = !Audio.Enabled;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wrongcommand();
|
||||||
}
|
}
|
||||||
Audio.Enabled = !Audio.Enabled;
|
|
||||||
break;
|
break;
|
||||||
case "linux":
|
case "linux":
|
||||||
if(API.DeveloperMode)
|
if(API.DeveloperMode)
|
||||||
|
@ -1651,22 +1660,6 @@ public void DoCommand()
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "enemy_test":
|
|
||||||
var e = new EnemyHacker("DevX", "I am the god of this world.", "I am the god of this world.", 100, 100, "Hard");
|
|
||||||
e.AddModule(new Module(SystemType.Antivirus, 4, "you_can't_stop_me"));
|
|
||||||
e.AddModule(new Module(SystemType.Antivirus, 4, "not_happening"));
|
|
||||||
e.AddModule(new Module(SystemType.DedicatedDDoS, 2, "dos"));
|
|
||||||
e.AddModule(new Module(SystemType.Turret, 4, "remotehost"));
|
|
||||||
e.AddModule(new Module(SystemType.Turret, 2, "boom"));
|
|
||||||
string json = JsonConvert.SerializeObject(e);
|
|
||||||
var tp = new TextPad();
|
|
||||||
API.CreateForm(tp, "Enemy JSON", API.GetIcon("TextPad"));
|
|
||||||
tp.txtuserinput.Text = json;
|
|
||||||
break;
|
|
||||||
case "htest":
|
|
||||||
var hui = new HackUI();
|
|
||||||
hui.Show();
|
|
||||||
break;
|
|
||||||
case "lua":
|
case "lua":
|
||||||
if(API.DeveloperMode == true)
|
if(API.DeveloperMode == true)
|
||||||
{
|
{
|
||||||
|
@ -1720,18 +1713,7 @@ public void DoCommand()
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "unitytest":
|
case "virusscanner":
|
||||||
if (API.DeveloperMode == true)
|
|
||||||
{
|
|
||||||
var u = new AlternateDesktop();
|
|
||||||
u.Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wrongcommand();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "virusscanner":
|
|
||||||
case "vscan":
|
case "vscan":
|
||||||
if(API.Upgrades["virusscanner"] == true)
|
if(API.Upgrades["virusscanner"] == true)
|
||||||
{
|
{
|
||||||
|
@ -1792,26 +1774,16 @@ public void DoCommand()
|
||||||
wrongcommand();
|
wrongcommand();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "infect":
|
|
||||||
try {
|
|
||||||
if (API.DeveloperMode == true)
|
|
||||||
{
|
|
||||||
Viruses.InfectRandom();
|
|
||||||
WriteLine("A random file has been infected.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wrongcommand();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(Exception ex)
|
|
||||||
{
|
|
||||||
WriteLine("infect: Error. Probably a mess-up with the virus scanner.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "binarywater":
|
case "binarywater":
|
||||||
ShiftOS.Hacking.AddCharacter(new Character("Philip Adams", "Hello, and welcome to another episode of OSFirstTimer.", 100, 100, 0));
|
if (API.DeveloperMode)
|
||||||
WriteLine("Philip Adams is now in the list of hirable hackers.");
|
{
|
||||||
|
ShiftOS.Hacking.AddCharacter(new Character("Philip Adams", "Hello, and welcome to another episode of OSFirstTimer.", 100, 100, 0));
|
||||||
|
WriteLine("Philip Adams is now in the list of hirable hackers.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WriteLine("I see you went in the ShiftOS source code... ummm yeah... this isn't a developer mode release so I can't just give you a full-skilled hacker even if you beg.");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "color":
|
case "color":
|
||||||
try
|
try
|
||||||
|
@ -2159,75 +2131,11 @@ public void DoCommand()
|
||||||
{
|
{
|
||||||
showhelp(args[1]);
|
showhelp(args[1]);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch
|
||||||
{
|
{
|
||||||
showhelp();
|
showhelp();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "kill":
|
|
||||||
if(API.Upgrades["shiftnet"] == true)
|
|
||||||
{
|
|
||||||
List<Process> cleanup = new List<Process>();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
foreach (Process mod in API.RunningModProcesses)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (args[1] == mod.Id.ToString() || args[1].ToLower() == mod.ProcessName.Remove(0, 1).Replace(".exe", "").ToLower())
|
|
||||||
{
|
|
||||||
WriteLine("[" + mod.Id.ToString() + "] - Killed.");
|
|
||||||
cleanup.Add(mod);
|
|
||||||
mod.Kill();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(Exception ex)
|
|
||||||
{
|
|
||||||
WriteLine("kill: Missing argument.");
|
|
||||||
}
|
|
||||||
foreach (Process prc in cleanup)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
API.RunningModProcesses.Remove(prc);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wrongcommand();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "proclist":
|
|
||||||
if(API.Upgrades["shiftnet"] == true)
|
|
||||||
{
|
|
||||||
WriteLine("Running Applications:");
|
|
||||||
foreach(Process mod in API.RunningModProcesses)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
WriteLine("[" + mod.Id.ToString() + "] " + mod.ProcessName.Replace(".exe", ""));
|
|
||||||
}
|
|
||||||
catch(Exception ex)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wrongcommand();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "codepoints":
|
case "codepoints":
|
||||||
case "cp":
|
case "cp":
|
||||||
WriteLine("You have " + API.Codepoints.ToString() + " Codepoints.");
|
WriteLine("You have " + API.Codepoints.ToString() + " Codepoints.");
|
||||||
|
@ -2383,7 +2291,6 @@ public void DoCommand()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//cmds(UBound(cmds)) = command
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartChoice1EndStory()
|
private void StartChoice1EndStory()
|
||||||
|
|
|
@ -463,18 +463,24 @@ public static void LoadPanels()
|
||||||
public static void SavePanels()
|
public static void SavePanels()
|
||||||
{
|
{
|
||||||
string dir = Paths.LoadedSkin + "panels";
|
string dir = Paths.LoadedSkin + "panels";
|
||||||
if(Directory.Exists(dir))
|
if (!Directory.Exists(dir))
|
||||||
{
|
{
|
||||||
Directory.Delete(dir, true);
|
Directory.CreateDirectory(dir);
|
||||||
}
|
}
|
||||||
Directory.CreateDirectory(dir);
|
foreach (var pnl in loadedSkin.DesktopPanels)
|
||||||
foreach(var pnl in loadedSkin.DesktopPanels)
|
|
||||||
{
|
{
|
||||||
string dpath = Paths.LoadedSkin + "panels" + OSInfo.DirectorySeparator + pnl.Position + loadedSkin.DesktopPanels.IndexOf(pnl).ToString();
|
string dpath = Paths.LoadedSkin + "panels" + OSInfo.DirectorySeparator + pnl.Position + loadedSkin.DesktopPanels.IndexOf(pnl).ToString();
|
||||||
if(pnl.BackgroundImage != null)
|
if (pnl.BackgroundImage != null)
|
||||||
{
|
{
|
||||||
pnl.BackgroundImage.Save(dpath);
|
try
|
||||||
pnl.BackgroundImage = null;
|
{
|
||||||
|
pnl.BackgroundImage.Save(dpath);
|
||||||
|
pnl.BackgroundImage = null;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
pnl.BackgroundImage = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue