Ejemplo n.º 1
0
        private void BrowserOnLoadCompleted(object sender, NavigationEventArgs navigationEventArgs)
        {
            var webBrowser = ((WebBrowser)sender);
            var args       = new WebBrowserEventArgs((HTMLDocument)webBrowser.Document, webBrowser.Source);

            DocumentLoaded?.Invoke(sender, args);
        }
Ejemplo n.º 2
0
 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();
        }
Ejemplo n.º 4
0
 private void OnDocumentLoaded(DocumentLoaded msg)
 {
     Animations.Clear();
     _index.Clear();
     foreach (var animation in msg.Document.GetAnimations())
     {
         AddAnimation(animation.Id, animation.Name);
     }
     _selectedAnimation = null;
 }
Ejemplo n.º 5
0
 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();
 }
Ejemplo n.º 6
0
        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;
        }
Ejemplo n.º 7
0
        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());
                }
            }
        }
Ejemplo n.º 8
0
 private void OnDocumentLoaded(DocumentLoaded msg)
 {
     Clear();
 }
Ejemplo n.º 9
0
 protected virtual void OnDocumentLoaded(DocumentLoadedEventArgs e)
 {
     DocumentLoaded?.Invoke(this, e);
 }
Ejemplo n.º 10
0
 internal void RaiseDocumentLoaded(GenericTextDocument document)
 {
     // Inform caller
     DocumentLoaded?.Invoke(document);
 }
Ejemplo n.º 11
0
 public void OnDocumentLoaded(object sender, DocumentLoadedEventArgs e)
 {
     DocumentLoaded?.Invoke(sender, e);
 }
Ejemplo n.º 12
0
 private async void OnProjectLoadedEvent(DocumentLoaded e)
 {
     await ChangeAssetFolderAsync(e.Document.AbsoluteAssetFolder);
 }