11 2011 档案

摘要:新建一个类库。编写一个简单的类库实例,例如:DllTest在默认名为:calss1.cs里编写代码一下是一个简单的:在控制台显示 “你以成功调用了动态连接!”sing System;using System.Collections.Generic;using System.Text;namespace DllTest { public class Class1 { public void ShowMessage() { Console.WriteLine("你以成功调用了动态连接!"); Console.ReadLine(); } }}配置输出,在解决方案上右击——属性,在 阅读全文
posted @ 2011-11-28 22:19 softimagewht 阅读(235) 评论(0) 推荐(0)
摘要://访问Photoshop,并把应用程序放置顶层#target photoshopapp.bringToFront();//设置场景像素app.preferences.rulerUnits = Units.PIXELS;app.preferences.typeUnits = TypeUnits.PIXELS;if (app.documents.length != 0){ //放缩图大小 不知道为什么不起作用 BUG? app.activeDocument.resizeImage =( 20 , 20 ,72 , ResampleMethod.BICUBICSHARPER) ; //获取当前时间 阅读全文
posted @ 2011-11-27 15:40 softimagewht 阅读(580) 评论(0) 推荐(0)
摘要://访问Photoshop,并把应用程序放置顶层#target photoshopapp.bringToFront();var dlg = new Window('dialog', 'Alert Box Builder', [100,100,480,245]);// create list box with two titled columnsvar list = dlg.add ('ListBox', [0, 0, 150, 75], 'asd',{numberOfColumns: 2, showHeaders: true,co 阅读全文
posted @ 2011-11-27 15:20 softimagewht 阅读(340) 评论(0) 推荐(0)
摘要:应用程序开发中,经常需要多窗体之间进行数据通信,写几个例子,把几种常用的通信方式总结一下:主窗体Form1是一个ListBox,单击选中某列时,弹出窗体Form2,Form2中两个控件,一个是TextBox,显示选中的该列的文本,另一个是按钮,点击时将修改后的值回传,且在Form1中修改相应的列的文本,同时Form2关闭。C#窗体间通讯方法一:传值最先想到的,Form2构造函数中接收一个string类型参数,即Form1中选中行的文本,将Form2的TextBox控件的Text设置为该string,即完成了Form1向Form2的传值。当Form2的AcceptChange按钮按下,需要修改F 阅读全文
posted @ 2011-11-24 09:56 softimagewht 阅读(271) 评论(0) 推荐(0)
摘要:void Update () {//处理横向两个方向旋转if(Input.deviceOrientation == DeviceOrientation.LandscapeLeft){if (Screen.orientation != ScreenOrientation.LandscapeLeft) {Screen.orientation = ScreenOrientation.LandscapeLeft;}}else if(Input.deviceOrientation == DeviceOrientation.LandscapeRight){if (Screen.orientation != 阅读全文
posted @ 2011-11-21 14:58 softimagewht 阅读(301) 评论(0) 推荐(0)
摘要:private void Form1_Load(object sender, System.EventArgs e) { FileSystemWatcher p = new FileSystemWatcher("d:\\"); p.EnableRaisingEvents = true; p.IncludeSubdirectories = true; p.Changed+=new FileSystemEventHandler(p_Changed); p.Created+=new FileSystemEventHandler(p_Created); p.Deleted+=new 阅读全文
posted @ 2011-11-13 16:24 softimagewht 阅读(241) 评论(0) 推荐(0)
摘要:DirectoryInfo TheFolder=new DirectoryInfo("c:\\"); foreach(DirectoryInfo NextFolder in TheFolder.GetDirectories()) this.listBox1.Items.Add(NextFolder.Name); foreach(FileInfo NextFile in TheFolder.GetFiles()) this.listBox2.Items.Add(NextFile.Name); 阅读全文
posted @ 2011-11-12 20:38 softimagewht 阅读(210) 评论(0) 推荐(0)
摘要:http://hi.baidu.com/zhs1021/blog/item/52255d43e5a24d079313c6e0.htmlhttp://www.cnblogs.com/zhaojingjing/archive/2011/01/21/1941586.html 阅读全文
posted @ 2011-11-12 19:23 softimagewht 阅读(228) 评论(0) 推荐(0)
摘要:private void Form1_DragDrop(object sender, DragEventArgs e) { string fullPath = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString(); string filename = System.IO.Path.GetFileName(fullPath);//文件名 “Default.aspx” string extension = System.IO.Path.GetExtension(fullPath);//扩展名 “.a. 阅读全文
posted @ 2011-11-12 08:51 softimagewht 阅读(169) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;namespace wht{ public partial class Form1 : Form { private static int FormCount = 0; public Form1() { Initia 阅读全文
posted @ 2011-11-07 21:40 softimagewht 阅读(257) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;namespace wht{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void bu 阅读全文
posted @ 2011-11-04 08:00 softimagewht 阅读(224) 评论(0) 推荐(0)