当前位置: 首页>>代码示例>>C#>>正文


C# UserAction.ToString方法代码示例

本文整理汇总了C#中UserAction.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# UserAction.ToString方法的具体用法?C# UserAction.ToString怎么用?C# UserAction.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserAction的用法示例。


在下文中一共展示了UserAction.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: getPanel

        public IPanel getPanel(string tableName, UserAction action, bool recursive = true, IPanel parent = null)
        {
            int panelId = (int)fetchSingle("SELECT id_panel FROM panels JOIN panel_types USING(id_type) WHERE table_name = '" + tableName
                + "' AND id_project = ", CE.project.id, " AND type_name = '" + action.ToString() + "'");

            return getPanel(panelId, recursive, parent);
        }
开发者ID:rjankovic,项目名称:deskmin,代码行数:7,代码来源:SystemMySql.cs

示例2: RecordActionInternal

        private void RecordActionInternal(XmlElement group, ModelBase model, UserAction action)
        {
            if (IsRecordedInActionGroup(group, model))
                return;

            // Serialize the affected model into xml representation
            // and store it under the current action group.
            XmlNode childNode = model.Serialize(document, SaveContext.Undo);
            SetNodeAction(childNode, action.ToString());
            group.AppendChild(childNode);
        }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:11,代码来源:UndoRedoRecorder.cs

示例3: OnUserAction

        /// <summary>
        /// Called when the user requests an action using application/system provided UI
        /// </summary>
        /// <param name="player">The BackgroundAudioPlayer</param>
        /// <param name="track">The track playing at the time of the user action</param>
        /// <param name="action">The action the user has requested</param>
        /// <param name="param">The data associated with the requested action.
        /// In the current version this parameter is only for use with the Seek action,
        /// to indicate the requested position of an audio track</param>
        /// <remarks>
        /// User actions do not automatically make any changes in system state; the agent is responsible
        /// for carrying out the user actions if they are supported.
        /// 
        /// Call NotifyComplete() only once, after the agent request has been completed, including async callbacks.
        /// </remarks>
        protected override void OnUserAction(BackgroundAudioPlayer player, AudioTrack track, UserAction action, object param)
        {
            System.Diagnostics.Debug.WriteLine("AGENT RECEIVED USER ACTION: " + action.ToString());
            switch (action)
            {
                case UserAction.Play:
                    PlayTrack(player);
                    break;
                case UserAction.Stop:
                    player.Stop();
                    break;
                case UserAction.Pause:
                    player.Pause();
                    break;
                case UserAction.FastForward:
                    player.FastForward();
                    break;
                case UserAction.Rewind:
                    player.Rewind();
                    break;
                case UserAction.Seek:
                    player.Position = (TimeSpan)param;
                    break;
                case UserAction.SkipNext:
                    player.Track = GetNextTrack();
                    break;
                case UserAction.SkipPrevious:
                    AudioTrack previousTrack = GetPreviousTrack();
                    if (previousTrack != null)
                    {
                        player.Track = previousTrack;
                    }
                    break;
            }

            NotifyComplete();
        }
开发者ID:dharmababa,项目名称:35ConfessionBuddhas,代码行数:52,代码来源:AudioPlayer.cs


注:本文中的UserAction.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。