コード例 #1
0
ファイル: PlugInUtilImpl.cs プロジェクト: drosenstark/KBase
 public override string derelativizeLinkAccordingToKbaseDirectory(string path)
 {
     string retVal = path;
     // if it's a physical drive, we don't do this
     if (!path.Substring(1, 1).Equals(":"))
         retVal = new HyperlinkUtil(Universe.Instance.Path).Derelativize(path);
     return retVal;
 }
コード例 #2
0
ファイル: DetailPane.cs プロジェクト: drosenstark/KBase
 private void insertFileLink(string path)
 {
     if (path != null)
     {
         path = new HyperlinkUtil(Universe.Instance.Path).Relativize(path) + "";
         path = System.Web.HttpUtility.UrlPathEncode(path);
         path = "<file://" + path + ">";
         Paste(path);
     }
 }
コード例 #3
0
ファイル: DetailPane.cs プロジェクト: TheProjecter/thekbase
        private void InsertHyperlink()
        {
            if (!Enabled)
                return;
            OpenFileDialog fileDialog = new OpenFileDialog();
            DialogResult result = fileDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                string path = fileDialog.FileName;
                if (path != null)
                {
                    path = new HyperlinkUtil(Universe.Instance.Path).Relativize(path) + "";
                    path = System.Web.HttpUtility.UrlPathEncode(path);
                    path = "<file://" + path + ">";
                    Paste(path);
                }
            }
        }