Exemplo n.º 1
0
        /// <summary>
        /// Handle the specified link if it is local.
        /// </summary>
        /// <param name="source"></param>
        /// <returns></returns>
        public bool OnHandleLocalHotlink(object source)
        {
            LocalLinkArgs args = source as LocalLinkArgs;

            if (args == null)
            {
                return(true);                // we can't handle it, but probably no one else can either. Maybe should crash?
            }
            var url = args.Link;

            if (!url.StartsWith(FwLinkArgs.kFwUrlPrefix))
            {
                return(true);                // we can't handle it, but no other colleague can either. Needs to launch whatever can (see VwBaseVc.DoHotLinkAction).
            }
            try
            {
                var      fwargs = new FwAppArgs(new[] { url });
                FdoCache cache  = (FdoCache)m_mediator.PropertyTable.GetValue("cache");
                if (SameServer(fwargs, cache) && SameDatabase(fwargs, cache))
                {
                    OnFollowLink(fwargs);
                    args.LinkHandledLocally = true;
                }
            }
            catch (Exception)
            {
                // Something went wrong, probably its not a kind of link we understand.
            }
            return(true);
        }
Exemplo n.º 2
0
 private void JumpToFlexObject(object sender, FLExJumpEventArgs e)
 {
     // TODO: Test to see if one conflict tool can do both FLEx and LIFT conflicts.
     if (!string.IsNullOrEmpty(e.JumpUrl))
     {
         var args = new LocalLinkArgs {
             Link = e.JumpUrl
         };
         if (_mediator != null)
         {
             _mediator.SendMessage("HandleLocalHotlink", args);
         }
     }
 }