Example #1
0
    public static void CheckArpgRes()
    {
        var paths = Directory.GetFiles(PathTools.ExportResourceRoot, "*.*", SearchOption.AllDirectories);

        ScanTools.ScanAll("CheckRes", paths, path => {
            for (int i = 0; i < path.Length; ++i)
            {
                if ((int)path[i] > 127)
                {
                    Console.WriteLine(path);
                    File.Delete(path);
                    break;
                }
            }
        });
    }
Example #2
0
        private void timer_Tick(object sender, EventArgs e)
        {
            var scanned    = HCommAir.GetScannedTools();
            var registered = HCommAir.GetRegisteredTools();

            // check scanned tools count
            if (scanned.Count != ScanTools.Count)
            {
                // clear scanned tools item
                ScanTools.Clear();
                // add item list
                foreach (var info in scanned)
                {
                    // add
                    ScanTools.Add(info);
                }
                // refresh
                lbScannedTools.Refresh();
            }
            // check registered tools count
            if (registered.Count != RegisterTools.Count)
            {
                // clear register tools item
                RegisterTools.Clear();
                // add item list
                foreach (var info in registered)
                {
                    // add
                    RegisterTools.Add(info);
                }
                // refresh
                lbRegisteredTools.Refresh();
            }
            // check graph state
            if (!GraphState || SelectedSession == null || SelectedSession.State != ConnectionState.Connected ||
                !((DateTime.Now - GraphTime).TotalSeconds > 5))
            {
                return;
            }
            // set
            SelectedSession.SetGraph();
            // reset time
            GraphTime = DateTime.Now;
        }
Example #3
0
    public static void CheckArpgRes()
    {
        var abf     = XmlTools.Deserialize <AssetBundleFolders> (Constants.AssetBundleFoldersPath);
        var folders = abf.normal_folders;

        for (int i = 0; i < folders.Length; ++i)
        {
            var source = os.path.join(Application.dataPath, folders [i]);

            var paths = Directory.GetFiles(source, "*.*", SearchOption.AllDirectories);
            ScanTools.ScanAll("CheckRes", paths, path => {
                for (int j = 0; j < path.Length; ++j)
                {
                    if ((int)path[j] > 127)
                    {
                        Console.WriteLine(path);
                        File.Delete(path);
                        break;
                    }
                }
            });
        }
    }