示例#1
0
        private void OnFileExtractComplete(object sender, EventArgs e)
        {
            if (wmoRunner == null)
            {
                return;
            }

            if (e is FileExtractCompleteArgs)
            {
                FileExtractCompleteArgs args = (FileExtractCompleteArgs)e;

                if (wmoRunner != null && args.RunnerID == wmoRunner.runnerID)
                {
                    if (!args.Success)
                    {
                        CancelExtraction();
                        Alert.Show(string.Format("Unable to extract WMO file '{0}'.", args.File.FullName));
                    }

                    wmoDoneCount++;
                    if (wmoDoneCount == currentFiles.Count)
                    {
                        LoadWMOFile();
                    }
                }
            }
            else if (e is FileExtractCompleteUnsafeArgs)
            {
                FileExtractCompleteUnsafeArgs args = (FileExtractCompleteUnsafeArgs)e;

                if (args.RunnerID == texRunner.runnerID)
                {
                    if (!args.Success)
                    {
                        CancelExtraction();
                        Alert.Show(string.Format("Unable to extract WMO texture '{0}'.", args.File));
                    }

                    texDone++;
                    if (texDone == texTotal)
                    {
                        try
                        {
                            CreateWMOMesh();
                        }
                        catch (WMOException ex)
                        {
                            OnWMOException(ex);
                        }
                    }
                    else
                    {
                        UpdateTexturePrepStatus();
                    }
                }
            }
        }
示例#2
0
        private void OnFileExtractComplete(object sender, EventArgs args)
        {
            FileExtractCompleteArgs extractArgs = (FileExtractCompleteArgs)args;

            if (extractArgs.RunnerID == runnerID)
            {
                EventManager.FileExtractComplete -= OnFileExtractComplete;
                if (extractArgs.Success)
                {
                    ready = true;
                    Play();
                }
                else
                {
                    Log.Write("File extract failed for {0}!", localPath);
                    SetState("Unable to load file!");
                }
            }
        }
示例#3
0
        private void OnFileExtractComplete(object sender, EventArgs rawArgs)
        {
            FileExtractCompleteArgs args = (FileExtractCompleteArgs)rawArgs;

            if (args.RunnerID == runnerID)
            {
                extractRunner = null;

                loadingWindow.Close();
                loadingWindow = null;

                if (args.Success)
                {
                    ShowDBCFile(Path.Combine(Constants.TEMP_DIRECTORY, args.File.FullName));
                }
                else
                {
                    throw new Exception("Unable to extract DBC file -> " + args.File.FullName);
                }
            }
        }
示例#4
0
        private void OnFileExtractComplete(object sender, EventArgs rawArgs)
        {
            FileExtractCompleteArgs args = (FileExtractCompleteArgs)rawArgs;

            if (args.RunnerID == runnerID)
            {
                currentImageName = null;

                UI_ExportButton.Hide();

                if (args.Success)
                {
                    displayImage(Path.Combine(Constants.TEMP_DIRECTORY, args.File.FullName));
                }
                else
                {
                    UI_PreviewStatus.Text = "Error loading image!";
                    UI_PreviewStatus.Show();
                }

                extractRunner = null;
            }
        }