• 大小: 59KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-10
  • 语言: C#
  • 标签: photoshop  

资源简介

C#调用photoshop工具源码 photoshop

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Diagnostics;


namespace WindowsApplication5
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender EventArgs e)
        {
            Application.Exit();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            textBox1.Text = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
        }

        private void button2_Click(object sender EventArgs e)
        {
            string myRar;
            RegistryKey myReg;
            object myObj;
            ProcessStartInfo myStartInfo;
            Process myProcess;
            try
            {
                myReg = Registry.ClassesRoot.OpenSubKey(“Applications\\photoshop.exe\\shell\\Open\\Command“);
                myObj = myReg.GetValue(““);
                myRar = myObj.ToString();
                myReg.Close();
                myRar = myRar.Substring(1 myRar.Length - 7);
                myStartInfo = new ProcessStartInfo();
                myStartInfo.FileName = myRar;
                myStartInfo.Arguments = textBox1.Text.ToString();

                myProcess = new Process();
                myProcess.StartInfo = myStartInfo;
                myProcess.Start();
            }
            catch (Exception ex)
            {
                DisplayException(new Exception(“Export failed please make sure Photoshop is installed on this computer and try again“));
            }
            
        }

        private void button1_Click(object sender EventArgs e)
        {
            OpenFileDialog fbd = new OpenFileDialog();
            if (fbd.ShowDialog() == DialogResult.OK)
            {
                textBox1.Text = fbd.FileName.ToString();
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3245  2009-08-05 15:39  C#调用ps\Backup\WindowsApplication5\ExportPhotoshop.csproj

     文件       2090  2009-08-05 16:03  C#调用ps\Backup\WindowsApplication5\Form1.cs

     文件       4809  2009-08-05 15:41  C#调用ps\Backup\WindowsApplication5\Form1.Designer.cs

     文件       6226  2009-08-05 15:41  C#调用ps\Backup\WindowsApplication5\Form1.resx

     文件        486  2009-08-05 15:11  C#调用ps\Backup\WindowsApplication5\Program.cs

     文件       1310  2009-08-05 15:11  C#调用ps\Backup\WindowsApplication5\Properties\AssemblyInfo.cs

     文件       2865  2009-08-05 15:11  C#调用ps\Backup\WindowsApplication5\Properties\Resources.Designer.cs

     文件       5612  2009-08-05 15:11  C#调用ps\Backup\WindowsApplication5\Properties\Resources.resx

     文件       1102  2009-08-05 15:11  C#调用ps\Backup\WindowsApplication5\Properties\Settings.Designer.cs

     文件        249  2009-08-05 15:11  C#调用ps\Backup\WindowsApplication5\Properties\Settings.settings

     文件        938  2009-08-05 16:05  C#调用ps\Backup\WindowsApplication5.sln

    ..A..H.     12800  2009-08-05 16:05  C#调用ps\Backup\WindowsApplication5.suo

     文件       3929  2011-12-06 15:21  C#调用ps\UpgradeLog.xml

     文件      10240  2011-12-06 15:22  C#调用ps\WindowsApplication5\bin\Debug\WindowsApplication5.exe

     文件      22016  2011-12-06 15:22  C#调用ps\WindowsApplication5\bin\Debug\WindowsApplication5.pdb

     文件      14328  2011-12-06 15:22  C#调用ps\WindowsApplication5\bin\Debug\WindowsApplication5.vshost.exe

     文件        490  2009-06-11 05:14  C#调用ps\WindowsApplication5\bin\Debug\WindowsApplication5.vshost.exe.manifest

     文件       3453  2011-12-06 15:21  C#调用ps\WindowsApplication5\ExportPhotoshop.csproj

     文件       2092  2011-12-06 15:22  C#调用ps\WindowsApplication5\Form1.cs

     文件       4809  2009-08-05 15:41  C#调用ps\WindowsApplication5\Form1.Designer.cs

     文件       6226  2009-08-05 15:41  C#调用ps\WindowsApplication5\Form1.resx

     文件        788  2011-12-06 15:22  C#调用ps\WindowsApplication5\obj\Debug\ExportPhotoshop.csproj.FileListAbsolute.txt

     文件        847  2011-12-06 15:22  C#调用ps\WindowsApplication5\obj\Debug\ExportPhotoshop.csproj.GenerateResource.Cache

     文件       4608  2011-12-06 15:21  C#调用ps\WindowsApplication5\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件        842  2009-08-05 15:41  C#调用ps\WindowsApplication5\obj\Debug\WindowsApplication5.csproj.GenerateResource.Cache

     文件      10240  2011-12-06 15:22  C#调用ps\WindowsApplication5\obj\Debug\WindowsApplication5.exe

     文件        180  2011-12-06 15:21  C#调用ps\WindowsApplication5\obj\Debug\WindowsApplication5.Form1.resources

     文件      22016  2011-12-06 15:22  C#调用ps\WindowsApplication5\obj\Debug\WindowsApplication5.pdb

     文件        180  2011-12-06 15:21  C#调用ps\WindowsApplication5\obj\Debug\WindowsApplication5.Properties.Resources.resources

     文件        352  2009-08-05 15:58  C#调用ps\WindowsApplication5\obj\WindowsApplication5.csproj.FileList.txt

............此处省略27个文件信息

评论

共有 条评论