コード例 #1
0
        /// <summary>
        /// Export the shapes
        /// </summary>
        private void ExportClick(object sender, RoutedEventArgs e)
        {
            if (!int.TryParse(WidthTextBox.Text, out int width))
            {
                return;
            }

            VisualExporter.Export(selectedPath, width, MarginCheckBox.IsChecked == true, out string message);
        }
コード例 #2
0
        /// <summary>
        /// Export the shapes
        /// </summary>
        private void OnExport()
        {
            int.TryParse(ExportWidth, out int width);
            VisualExporter.Export(selectedVisual, width, AddMargin, out string message);

            if (string.IsNullOrEmpty(message))
            {
                ErrorMessage = null;
            }
            else
            {
                ErrorMessage = message;
            }
        }
コード例 #3
0
        /// <summary>
        /// Export the shapes
        /// </summary>
        private void ExportClick(object sender, RoutedEventArgs e)
        {
            if (!int.TryParse(WidthTextBox.Text, out int width))
            {
                return;
            }

            VisualExporter.Export(selectedVisual, width, MarginCheckBox.IsChecked == true, out string message);

            if (string.IsNullOrEmpty(message))
            {
                ExportMessage.Visibility = Visibility.Collapsed;
            }
            else
            {
                ExportMessage.Visibility = Visibility.Visible;
                ExportMessage.Content    = message;
            }
        }