コード例 #1
0
        void OnCustomSaveDocument(object sender, DiagramCustomSaveDocumentEventArgs e)
        {
            var diagramName = (string)e.DocumentSource;

            Text = diagramName;
            var stream = new MemoryStream();

            diagramControl1.SaveDocument(stream);
            var diagramData = stream.ToArray();

            DiagramRepository.SaveDiagramData(diagramName, diagramData);
            e.Handled = true;
        }
コード例 #2
0
 /// <summary>
 /// Override the behaviour of the quick access save button
 /// </summary>
 /// <param name="e">The <see cref="DiagramShowingSaveDialogEventArgs"/></param>
 protected override void OnCustomSaveDocument(DiagramCustomSaveDocumentEventArgs e)
 {
     this.SaveCommand.Execute(null);
 }