public void WindowCreated(IApplicationWindow window)
        {
            if (_callbackReference != null && _callbackReference.IsAlive && _windowCreatedCallback != null)
            {
                _windowCreatedCallback(window);
            }

            _stopwatch.Dispose();
        }
예제 #2
0
        public async Task MergeSortFile(string inputFile, string outputFile)
        {
            var inputFileLength = new FileInfo(inputFile).Length;

            _inputFileLength = inputFileLength;
            var asw   = new AutoStopwatch("Total work", _inputFileLength);
            var files = await Split(inputFile, Path.GetTempPath());

            try
            {
                await MergeSortFiles(files.Item2, files.Item1, outputFile, Comparator);
            }
            finally
            {
                asw.Dispose();

                foreach (var file in files.Item2)
                {
                    File.Delete(file);
                }
            }
        }