public OpenWithItem(string strFilePath, OwFilePathType tPath, string strName, Image imgIcon, DynamicMenu dynMenu) { if (strFilePath == null) { Debug.Assert(false); throw new ArgumentNullException("strFilePath"); } if (strName == null) { Debug.Assert(false); throw new ArgumentNullException("strName"); } if (dynMenu == null) { Debug.Assert(false); throw new ArgumentNullException("dynMenu"); } m_strPath = strFilePath; m_tPath = tPath; m_strName = strName.Trim(); m_imgIcon = imgIcon; m_dynMenu = dynMenu; if (m_strName.Length == 0) { Debug.Assert(false); m_strName = m_strPath; if (m_strName.Length == 0) { m_strName = KPRes.Unknown; } } }
public OpenWithItem(string strFilePath, OwFilePathType tPath, string strMenuText, Image imgIcon, DynamicMenu dynMenu) { m_strPath = strFilePath; m_tPath = tPath; m_strMenuText = strMenuText; m_imgIcon = imgIcon; m_tsmi = dynMenu.AddItem(m_strMenuText, m_imgIcon, this); try { m_tsmi.ToolTipText = m_strPath; } catch(Exception) { } // Too long? }
public OpenWithItem(string strFilePath, OwFilePathType tPath, string strMenuText, Image imgIcon, DynamicMenu dynMenu) { m_strPath = strFilePath; m_tPath = tPath; m_strMenuText = strMenuText; m_imgIcon = imgIcon; m_tsmi = dynMenu.AddItem(m_strMenuText, m_imgIcon, this); try { m_tsmi.ToolTipText = m_strPath; } catch (Exception) { } // Too long? }
public OpenWithItem(string strFilePath, OwFilePathType tPath, string strMenuText, Image imgIcon, DynamicMenu dynMenu) { if (strFilePath == null) { Debug.Assert(false); throw new ArgumentNullException("strFilePath"); } if (strMenuText == null) { Debug.Assert(false); throw new ArgumentNullException("strMenuText"); } if (dynMenu == null) { Debug.Assert(false); throw new ArgumentNullException("dynMenu"); } m_strPath = strFilePath; m_tPath = tPath; m_strMenuText = strMenuText; m_imgIcon = imgIcon; m_tsmi = dynMenu.AddItem(m_strMenuText, m_imgIcon, this); try { string strTip = strFilePath; if (strTip.StartsWith("cmd://", StrUtil.CaseIgnoreCmp)) { strTip = strTip.Substring(6); } if (strTip.Length != 0) { m_tsmi.ToolTipText = strTip; } } catch (Exception) { Debug.Assert(false); } // Too long? }