private void BrowserOnLoadCompleted(object sender, NavigationEventArgs navigationEventArgs) { var webBrowser = ((WebBrowser)sender); var args = new WebBrowserEventArgs((HTMLDocument)webBrowser.Document, webBrowser.Source); DocumentLoaded?.Invoke(sender, args); }
private void OnDocumentLoaded(DocumentLoaded msg) { Clear(); foreach (var nodeId in _editor.CurrentDocument.GetNodeIdsInDrawOrder().Reverse()) { AddSpriteNode(nodeId, _editor.CurrentDocument.GetNode(nodeId).Name); } }
private void OnDocumentLoaded(DocumentLoaded msg) { if (Editor == null) { return; } LoadCurrentDocument(); }
private void OnDocumentLoaded(DocumentLoaded msg) { Animations.Clear(); _index.Clear(); foreach (var animation in msg.Document.GetAnimations()) { AddAnimation(animation.Id, animation.Name); } _selectedAnimation = null; }
private void Browser_FrameLoadEnd1(object sender, FrameLoadEndEventArgs e) { if (e.Frame.IsMain) { Dispatcher.BeginInvoke(new Action(async() => { if (_disposed) { return; } DocumentLoaded?.Invoke(this, EventArgs.Empty); })); } //Browser.ShowDevTools(); }
public async Task LoadDocumentAsync() { try { _tokenSource?.Cancel(); _tokenSource = null; Documents.Clear(); } catch (Exception e) { _logger.Error(e); } using (_tokenSource = new CancellationTokenSource()) { var token = _tokenSource.Token; // ドキュメントデータ一覧をファイルから取得 Directory.CreateDirectory(_config.Project); int index = 0; foreach (var directory in Directory.EnumerateDirectories(_config.Project, "*", SearchOption.AllDirectories) .OrderByDescending(x => new FileInfo(x).LastWriteTimeUtc)) { if (TryGetDocumentMetaData(directory, out var data)) { if ((index++ % 3) is 0) { await Task.Delay(1); } if (token.IsCancellationRequested || _tokenSource is null) { return; } Documents.Add(new ImageDocument(data, _config)); } } DocumentLoaded?.Invoke(this, EventArgs.Empty); } _tokenSource = null; }
public void OpenFile(ISourceFile file, IIntellisenseControl intellisense, ICompletionAssistant completionAssistant) { if (ProjectFile != file) { if (System.IO.File.Exists(file.Location)) { using (var fs = System.IO.File.OpenText(file.Location)) { TextDocument = new TextDocument(fs.ReadToEnd()); TextDocument.FileName = file.Location; } ProjectFile = file; RegisterLanguageService(intellisense, completionAssistant); DocumentLoaded?.Invoke(this, new EventArgs()); } } }
private void OnDocumentLoaded(DocumentLoaded msg) { Clear(); }
protected virtual void OnDocumentLoaded(DocumentLoadedEventArgs e) { DocumentLoaded?.Invoke(this, e); }
internal void RaiseDocumentLoaded(GenericTextDocument document) { // Inform caller DocumentLoaded?.Invoke(document); }
public void OnDocumentLoaded(object sender, DocumentLoadedEventArgs e) { DocumentLoaded?.Invoke(sender, e); }
private async void OnProjectLoadedEvent(DocumentLoaded e) { await ChangeAssetFolderAsync(e.Document.AbsoluteAssetFolder); }