void IContextMenu.GetCommandString(uint idcmd, GCS_UFlags uflags, uint reserved, IntPtr commandstring, int cchMax) { string tip = ""; switch (uflags) { case GCS_UFlags.HelpTextW: IContextMenuCommand temp; if (commandDictionary.TryGetValue((int)idcmd, out temp)) tip = temp.Description; if (!string.IsNullOrEmpty(tip)) { byte[] data = new byte[cchMax * 2]; Encoding.Unicode.GetBytes(tip, 0, tip.Length, data, 0); Marshal.Copy(data, 0, commandstring, data.Length); } break; } }
void IContextMenu.GetCommandString(uint idcmd, GCS_UFlags uflags, uint reserved, IntPtr commandstring, int cchMax) { string tip = ""; switch (uflags) { case GCS_UFlags.HelpTextW: switch (idcmd) { case 0: tip = "删除此目录下的所有.svn文件夹"; break; case 1: tip = "删除此目录下的所有Thumbs.db文件"; break; case 2: tip = "批量文件重命名"; break; case 3: tip = "批量文本编码格式转换"; break; case 4: tip = "如果你有好的建议或意见,请发送邮件至[email protected]"; break; default: break; } if (!string.IsNullOrEmpty(tip)) { byte[] data = new byte[cchMax * 2]; Encoding.Unicode.GetBytes(tip, 0, tip.Length, data, 0); Marshal.Copy(data, 0, commandstring, data.Length); } break; } }
void IContextMenu.GetCommandString(uint idcmd, GCS_UFlags uflags, uint reserved, IntPtr commandstring, int cchMax) { string tip = ""; switch (uflags) { case GCS_UFlags.HelpTextW: IContextMenuCommand temp; if (commandDictionary.TryGetValue((int)idcmd, out temp)) { tip = temp.Description; } if (!string.IsNullOrEmpty(tip)) { byte[] data = new byte[cchMax * 2]; Encoding.Unicode.GetBytes(tip, 0, tip.Length, data, 0); Marshal.Copy(data, 0, commandstring, data.Length); } break; } }