示例#1
0
        public static void OnDownloadFailed(string folder, string file)
        {
            var packet     = new SpCompilationResult(CompilationResult.DownloadFailed);
            var connection = FindByUniqueKey(folder);

            if (connection != null)
            {
                packet.Send(connection, true);
            }

            Global.WriteLog($"Download failed {folder} / {file}", "Red");
        }
示例#2
0
        public static void OnDownloadCompleted(string folder, string file)
        {
            Global.WriteLog($"Download completed {folder} / {file}", "Green");

            var connection = FindByUniqueKey(folder);

            if (!Compiler.CreateStub(folder, folder, $"./{folder}/{file}"))
            {
                var packet = new SpCompilationResult(CompilationResult.Failed);

                if (connection != null)
                {
                    packet.Send(connection, true);
                }
            }
            else
            {
                StartUpload(connection, folder, "output.exe");
            }
        }