Example #1
0
        /// <summary>
        /// Opens a file in the right program.
        /// </summary>
        /// <param name="dir">The file path. Why this is named "dir", which means DIRECTORY, not FILE, by the way, is beyond me.</param>
        public void OpenFile(string dir)
        {
            var f = new File_Skimmer();

            if (dir.StartsWith("/"))
            {
                var real       = dir;
                var real_slash = real.Replace("/", OSInfo.DirectorySeparator);
                var real_path  = $"{Paths.SaveRoot}{real_slash}";
                f.OpenFile(real_path);
            }
        }
Example #2
0
        /// <summary>
        /// Open a file skimmer in the specified directory.
        /// </summary>
        /// <param name="dir">Directory to open in.</param>
        public void OpenFS(string dir)
        {
            var f = new File_Skimmer();

            API.CreateForm(f, API.LoadedNames.FileSkimmerName, Properties.Resources.iconFileSkimmer);
            if (dir.StartsWith("/"))
            {
                var real       = dir;
                var real_slash = real.Replace("/", OSInfo.DirectorySeparator);
                var real_path  = $"{Paths.SaveRoot}{real_slash}";
                f.CurrentFolder = real_path;
                f.ListFiles();
            }
        }