1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-08-18 13:31:41 +02:00
Files
Configuration
Core
Libraries
Migration
Properties
Resources
ScriptLoader.cs
code.js
icon.ico
notification.js
.gitignore
LICENSE.md
Program.cs
README.md
TweetDck.csproj
TweetDck.sln
_postbuild.bat
TweetDuck/Resources/ScriptLoader.cs

18 lines
689 B
C#

using System;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace TweetDck.Resources{
static class ScriptLoader{
public static string LoadResource(string name){
try{
return File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory,name),Encoding.UTF8);
}catch(Exception ex){
MessageBox.Show("Unfortunately, "+Program.BrandName+" could not load the "+name+" file. The program will continue running with limited functionality.\r\n\r\n"+ex.Message,Program.BrandName+" Has Failed :(",MessageBoxButtons.OK,MessageBoxIcon.Error);
return null;
}
}
}
}