Example #1
0
        /// <summary>
        /// Add item for given track. It will automatically create a subtrack if none exists or if no free subtrack exists.
        /// </summary>
        /// <param name="parentId">Parent track id, must be positive number.</param>
        /// <param name="time">Time for this item to start.</param>
        /// <param name="name">Name for this item, does not need to be unique.</param>
        /// <returns>Positive unique identifier if item was successfully added and -1 if it could not be added.</returns>
        public long AddGenericItem(long parentId, int time, String name)
        {
            if (parentId < 0)
            {
                return(-1);
            }

            try
            {
                lock (operationLock)
                {
                    IReView_HierarchicalTimelineLog RPCHTLProxy = RPC_Manager.Instance.Get_Client_Proxy <RPC_Client_Proxy_IReView_HierarchicalTimelineLog>();
                    if (RPCHTLProxy != null)
                    {
                        long id = GetUniqueID();
                        RPCHTLProxy.AddGenericItem(parentId, id, time, name);
                        return(id);
                    }
                }
            }
            catch (Exception)
            {
                Disconnect();
            }
            return(-1);
        }
Example #2
0
        /// <summary>
        /// Send selection changed
        /// </summary>
        public void SelectionChanged(long selectedId)
        {
            IReView_HierarchicalTimelineLog RPCHTLProxy = RPC_Manager.Instance.Get_Client_Proxy <RPC_Client_Proxy_IReView_HierarchicalTimelineLog>();

            if (RPCHTLProxy != null)
            {
                RPCHTLProxy.SelectionChanged(selectedId);
            }
        }
Example #3
0
        /// <summary>
        /// Append log for item specified by positive id.
        /// </summary>
        /// <param name="id">Positive id for the item / generic item.</param>
        /// <param name="time">Time to add the log output to.</param>
        /// <param name="type">Flags for the log output.</param>
        /// <param name="content">Log output content.</param>
        public void AppendLog(long id, int time, uint flags, string content)
        {
            if (id < 0)
            {
                return;
            }

            try
            {
                lock (operationLock)
                {
                    IReView_HierarchicalTimelineLog RPCHTLProxy = RPC_Manager.Instance.Get_Client_Proxy <RPC_Client_Proxy_IReView_HierarchicalTimelineLog>();
                    if (RPCHTLProxy != null)
                    {
                        RPCHTLProxy.AppendLog(id, time, flags, content);
                    }
                }
            }
            catch (Exception)
            {
                Disconnect();
            }
        }
Example #4
0
        /// <summary>
        /// End existing open item.
        /// </summary>
        /// <param name="id">Positive id for the item / generic item.</param>
        /// <param name="time">Time when to end this item.</param>
        public void EndItem(long id, int time)
        {
            if (id < 0)
            {
                return;
            }

            try
            {
                lock (operationLock)
                {
                    IReView_HierarchicalTimelineLog RPCHTLProxy = RPC_Manager.Instance.Get_Client_Proxy <RPC_Client_Proxy_IReView_HierarchicalTimelineLog>();
                    if (RPCHTLProxy != null)
                    {
                        RPCHTLProxy.EndItem(id, time);
                    }
                }
            }
            catch (Exception)
            {
                Disconnect();
            }
        }