7월, 2011의 게시물 표시

c# Create Zip File Using 7-zip

d:\s 폴더 안에 있는 모든 파일 (서브디렉토리포함) zip파일 형태로 압축하여 d\s.kmz 파일로 떨군다. Creating "d\s.kmz" file from all files including sub folders in "d\s". 7zip Option : -t[Type] public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         private void button1_Click(object sender, EventArgs e)         {             string directoryName = Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().Location);             string processName = Path.Combine( directoryName,"7z.exe");             string argument = " a -tZip \"d:\\s.kmz\" \"d:\\s\\*\"";             Process p = new Process();             p.StartInfo.Arguments = argum...

cmd Key overriding

protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { Keys key = keyData & ~(Keys.Shift Keys.Control); switch (key) { case Keys.D: if ((keyData & Keys.Control) != 0 && (keyData & Keys.Shift) != 0) { if (m_debuggingForm == null) { TPSMessageBox.Show(this, "Debug Mode Activated"); m_debuggingForm = new Debugging_Form(); m_debuggingForm.Show(); m_debuggingForm.SetDesktopLocation(this.Left + (this.Width - m_debuggingForm.Width) / 2, this.Top + (this.Height - m_debuggingForm.Height) / 2); } else if (m_debuggingForm.IsDisposed) { TPSMessageBox.Show(this, "Debug Mode Activated"); m_debuggingForm = new Debugging_Form(); m_debuggingForm.Show(); m_debuggingForm.SetDesktopLocation(this.Left + (this.Width - m_debuggingForm.Width) / 2, this.Top + (this.Height - m_debuggingForm.Height) / 2); } else { m_debuggingForm.BringToFront(); } return true; } break; } return base.ProcessCm...