Exemplo n.º 1
0
 /// <summary>
 /// Emits a <see cref="NewDocument"/> event, provided
 /// <see cref="EnableRaisingEvents"/> is <c>true</c>. Use this from
 /// derived classes rather than invoking <see cref="NewDocument"/>
 /// directly.
 /// </summary>
 /// <param name="newDocument">The document to emit to listeners.</param>
 protected void EmitDocument(Document newDocument)
 {
     if (EnableRaisingEvents)
     {
         NewDocument?.Invoke(this, new NewDocumentEventArgs(newDocument));
     }
 }
Exemplo n.º 2
0
        private void btnNewDocument_Click(object sender, RoutedEventArgs e)
        {
            if (_mapDocument == null)
            {
                return;
            }

            if (OnButtonClick == null)
            {
                NewDocument tool = new NewDocument();
                tool.OnCreate(_mapDocument);

                tool.OnEvent(new MapEvent(_mapDocument.FocusMap));
            }

            HideBackstageMenu();
        }
Exemplo n.º 3
0
 internal void OnNewDocument(object Doc)
 {
     NewDocument?.Invoke(GetDocument(Doc));
 }