Beispiel #1
0
        /// <summary>Initialize Stylist</summary>
        /// <param name="CSS_File">The path to the CSS file (or null if only internal styles are need to be used)</param>
        public Stylist(string CSS_File = null)
        {
            DefaultStyle = Utilities.GetEmbeddedResource("Resources.Default.css");

            if (DefaultStyle == null) Environment.FailFast("File Commander has been crashed: the default theme's stylesheet is unable to load. Possibly there is a failure of the pluginner.dll body or RAM banks. Try to reinstall FC.", new InvalidProgramException("Default style isn't loading"));
            if(CSS_File != null && CSS_File != "")
                { CSS = new Stylesheet(System.IO.File.ReadAllText(CSS_File) + DefaultStyle); }
            else
                CSS = new Stylesheet(DefaultStyle);
        }
Beispiel #2
0
        /// <summary>Initialize Stylist</summary>
        /// <param name="CSS_File">The path to the CSS file (or null if only internal styles are need to be used)</param>
        public Stylist(string CSS_File = null)
        {
            DefaultStyle = Utilities.GetEmbeddedResource("Resources.Default.css");

            if (DefaultStyle == null)
            {
                Environment.FailFast("File Commander has been crashed: the default theme's stylesheet is unable to load. Possibly there is a failure of the pluginner.dll body or RAM banks. Try to reinstall FC.", new InvalidProgramException("Default style isn't loading"));
            }
            if (CSS_File != null && CSS_File != "")
            {
                CSS = new Stylesheet(System.IO.File.ReadAllText(CSS_File) + DefaultStyle);
            }
            else
            {
                CSS = new Stylesheet(DefaultStyle);
            }
        }