LunarPresentation/Dialogs/LoadExFromOutportedExImageDlg.xaml.cs

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Windows;
using System.Windows.Documents;

namespace SHomeWorkshop.LunarPresentation.Dialogs
{
    /// <summary>
    /// LoadExFromOutportedExImageDlg.xaml 的交互逻辑
    /// </summary>
    public partial class LoadExFromOutportedExImageDlg : Window
    {
        public LoadExFromOutportedExImageDlg()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (this.Owner != null)
            {
                this.Owner.Visibility = Visibility.Hidden;
            }
        }

        private void Window_Closed(object sender, EventArgs e)
        {
            if (this.Owner != null && this.Owner.Visibility == Visibility.Hidden)
            {
                this.Owner.Visibility = Visibility.Visible;
            }
        }

        private void cvReceiver_Drop(object sender, DragEventArgs e)
        {
            //检验放在调用时。在D:\My Documents\Visual Studio 2010\Projects\LunarPresentation\LunarPresentation\MainWindow.xaml.cs
            //中的miTryLoadExFromOutportedExImage_Click()方法头部。

            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                Array dragDataArray = ((System.Array)e.Data.GetData(DataFormats.FileDrop));

                if (dragDataArray.Length <= 0)
                {
                    e.Handled = true;
                    MessageBox.Show("此处只能接收以前导出的某个png的公式图!", Globals.appName,
                        MessageBoxButton.OK, MessageBoxImage.Warning);
                    return;
                }
                else if (dragDataArray.Length > 1)
                {
                    e.Handled = true;
                    MessageBox.Show("此处只能接收以前导出的某个png的公式图!不能接收多个文件。", Globals.appName,
                        MessageBoxButton.OK, MessageBoxImage.Warning);
                    return;
                }

                List<string> filenames = new List<string>();
后面还有 202 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。