コード例 #1
0
ファイル: FormMain.cs プロジェクト: gangelo/Touch
        protected void TouchDirectoryChangedProcessing(string touchDirectory)
        {
            if (this.TouchDirectoryLinkLabelToolTip == null) {
                this.TouchDirectoryLinkLabelToolTip = new DefaultToolTip();
            }

            bool hasTouchDirectory = !string.IsNullOrEmpty(touchDirectory);

            m_touchDirectory.Text = hasTouchDirectory ? PathHelpers.MinifyPath(touchDirectory) : FormMain.ClickToSet;
            m_touchDirectory.Tag = hasTouchDirectory ? touchDirectory : null;
            if (hasTouchDirectory) {
                this.TouchDirectoryLinkLabelToolTip.SetToolTip(m_touchDirectory, touchDirectory);
            } else {
                this.TouchDirectoryLinkLabelToolTip.RemoveAll();
            }

            m_folderBrowserDialog.SelectedPath = touchDirectory;
        }
コード例 #2
0
ファイル: FormOptions.cs プロジェクト: gangelo/Touch
        protected void LastTouchDirectoryChangedProcessing(string touchDirectory = null)
        {
            if (this.UpdateLastTouchDirectoryLabelToolTip == null){
                this.UpdateLastTouchDirectoryLabelToolTip = new DefaultToolTip();
            }

            bool hasTouchDirectory = !string.IsNullOrEmpty(touchDirectory);

            m_lastTouchDirectory.Text = hasTouchDirectory ? PathHelpers.MinifyPath(touchDirectory) : "None";
            m_lastTouchDirectory.Tag = hasTouchDirectory ? touchDirectory : null;
            if (hasTouchDirectory) {
                this.UpdateLastTouchDirectoryLabelToolTip.SetToolTip(m_lastTouchDirectory, touchDirectory);
            } else {
                this.UpdateLastTouchDirectoryLabelToolTip.RemoveAll();
            }
        }