• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UserAction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Control

 public Control(int panelId, DataTable data, List<string> PKColNames, UserAction action)
 {
     this.panelId = panelId;
     this.data = data;
     this.PKColNames = PKColNames;
     this.action = action;
 }
开发者ID:rjankovic,项目名称:webminVS2010,代码行数:7,代码来源:Control.cs


示例2: OnUserAction

        protected override void OnUserAction(BackgroundAudioPlayer player, AudioTrack track, UserAction action, object param)
        {
            ShellTile mainTile = ShellTile.ActiveTiles.FirstOrDefault();
            switch (action)
            {
                case UserAction.Play:
                    if (PlayState.Paused == player.PlayerState)
                    {
                        player.Play();

                        mainTile.Update(new StandardTileData
                        {
                            BackContent = "Play"
                        });

                    }
                    break;

                case UserAction.Pause:
                    player.Pause();

                    mainTile.Update(new StandardTileData
                    {
                        BackContent = "Pause"
                    });
                    break;
            }
            NotifyComplete();
        }
开发者ID:OlivierRiberi,项目名称:3NET-SimpleRadio,代码行数:29,代码来源:AudioPlayer.cs


示例3: OnUserAction

        protected override void OnUserAction(BackgroundAudioPlayer player, AudioTrack track, UserAction action, object param)
        {
            switch (action)
            {
                case UserAction.Play:
                    if (PlayState.Playing != player.PlayerState)
                    {
                        player.Play();
                    }
                    break;

                case UserAction.Stop:
                    player.Stop();
                    break;

                case UserAction.Pause:
                    if (PlayState.Playing == player.PlayerState)
                    {
                        player.Pause();
                    }
                    break;
                case UserAction.Rewind:
                  player.Position = player.Position.Subtract(new TimeSpan(0,0,10));
                    break;

                case UserAction.FastForward:
                  player.Position = player.Position.Add(new TimeSpan(0,0,10));
                    break;
            }

            NotifyComplete();
        }
开发者ID:juhariis,项目名称:Windows-Phone-Starter-Kit-for-Podcasts,代码行数:32,代码来源:AudioPlayer.cs


示例4: CalendarCell

		/// ------------------------------------------------------------------------------------
		public CalendarCell(Func<DateTime> getDefaultValue, UserAction whenToUseDefault)
		{
			_getDefaultValue = getDefaultValue ?? (() => DateTime.Now.Date);
			_whenToUseDefault = whenToUseDefault;
			// Use the short date format.
			Style.Format = "d";
		}
开发者ID:jwickberg,项目名称:libpalaso,代码行数:8,代码来源:CalendarCell.cs


示例5: Display

        public ActionResult Display(string name)
        {
            ProfileViewModel profileViewModel = new ProfileViewModel();
            User displayUser = null;
            int userID = 0;
            User thisUser = Users.GetLoggedInUser();

            if (Int32.TryParse(name, out userID)) {
                displayUser = Users.GetUser(userID);
            } else {
                displayUser = Users.GetUser(name);
            }

            if (displayUser == null) {
                return RedirectToAction("Index");
            }

            profileViewModel.User = displayUser;

            // relationships
            if (displayUser.UserID != thisUser.UserID) {
                profileViewModel.CommonUserRelationships = UserRelationships.GetCommonRelationshipUsers(displayUser.UserID, thisUser.UserID);
                profileViewModel.CommonCarsCourses = UserRelationships.GetCommonCourses(displayUser.UserID, thisUser.UserID);

                profileViewModel.ViewerRelationshipToUser = UserRelationships.GetRelationshipStatus(thisUser.UserID, displayUser.UserID);
            } else {

                profileViewModel.CommonUserRelationships = null;
                profileViewModel.CommonCarsCourses = null;
            }

            /*
            profileViewModel.Children = db.FamilyMember
                                                .Where(fm => fm.UserID == displayUser.UserID && fm.Family == "C")
                                                .OrderBy(fm => fm.BirthDate)
                                                .ToList();

            profileViewModel.Spouses = db.CarsRelationships
                                                .Where(fm => (fm.PrimaryID == displayUser.UserID && fm.Relationship == "HW") ||
                                                             (fm.SecondaryID == displayUser.UserID && fm.Relationship == "WH"))
                                                .ToList();
            */

            UserAction ua = new UserAction() {
                SourceUserID = thisUser.UserID,
                TargetUserID = displayUser.UserID,
                UserActionType = UserActionType.ViewProfile,
                ActionDate = DateTime.Now,
                GroupID = 0,
                MessageID = 0,
                PostCommentID = 0,
                PostID = 0,
                Text = ""
            };
            db.UserActions.Add(ua);
            db.SaveChanges();

            return View(profileViewModel);
        }
开发者ID:dallasseminary,项目名称:Didache,代码行数:59,代码来源:CommunityController.cs


示例6: OnUserAction

 /// <summary>
 /// Called when the user requests an action using system-provided UI and the application has requesed
 /// notifications of the action
 /// </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
 /// </remarks>
 protected override void OnUserAction(BackgroundAudioPlayer player, AudioTrack track, UserAction action, object param)
 {
     if (action == UserAction.Play)
         player.Play();
     else if (action == UserAction.Pause)
         player.Pause();
     NotifyComplete();
 }
开发者ID:whrxiao,项目名称:Windows-Phone-7-In-Action,代码行数:22,代码来源:AudioPlayer.cs


示例7: AddActionAtFirstIndex

 public IList<UserAction> AddActionAtFirstIndex(UserAction action)
 {
     using (IRedisTypedClient<UserAction> redis = _redisClient.GetTypedClient<UserAction>())
     {
         IRedisList<UserAction> userActions = redis.Lists["user:actions"];
         userActions.Enqueue(action);
         return userActions;
     }
 }
开发者ID:Grekk,项目名称:MovieAPI,代码行数:9,代码来源:UserActionsDAO.cs


示例8: AddMovie

        public void AddMovie(Guid userId, string userName, Movie movie)
        {
            TinyMovie tinyMovie = (TinyMovie)movie;
            user_movie userMovie = Mapper.Map<TinyMovie, user_movie>(tinyMovie);
            userMovie.user_movie_user_id = userId;

            _userMovieRepo.Insert(userMovie);

            UserAction actionToAdd = new UserAction(userName, movie);
            actionToAdd.Action = Action.ADD_MOVIE;
            AddUserAction(actionToAdd);
        }
开发者ID:Grekk,项目名称:MovieAPI,代码行数:12,代码来源:UserService.cs


示例9: doAction

        //Methods
        public void doAction(UserAction userAction)
        {
            userAction.doAction();
            actionList.AddFirst(userAction);

            //cancel old actions
            if (countUndo > 0)
            {
                countUndo = 0;
                actionUndoList.Clear();
            }
        }
开发者ID:Nicoletti-Seb,项目名称:Oculus-Rift-Outil-de-gestion,代码行数:13,代码来源:ManagerAction.cs


示例10: btnAddNewGlassType_Click

        private void btnAddNewGlassType_Click(object sender, RoutedEventArgs e)
        {
            _glassTypeAction = UserAction.AddNew;
            btnSaveNewGlassType.IsEnabled = true;
            txtGlassTypeName.IsReadOnly = false;

            btnAddNewGlassType.IsEnabled = false;
            btnEditGlassType.IsEnabled = false;
            btnSaveNewGlassType.IsEnabled = true;
            btnDeleteGlassType.IsEnabled = false;
            btnCancelGlassType.IsEnabled = true;
            txtGlassTypeName.Focus();
        }
开发者ID:ultrasonicsoft,项目名称:G1,代码行数:13,代码来源:PriceSettingsContent.xaml.cs


示例11: TreeControl

 public TreeControl(DataTable data, string PKColName,    // tree controls must have a single-column primary key
     string parentColName, string displayColName,
     UserAction action)
     : base(data, PKColName, action)
 {
     this.parentColName = parentColName;
     this.displayColName = displayColName;
     ds = new DataSet();
     this.data.TableName = "data";
     ds.Tables.Add(this.data);
     ds.Relations.Add("hierarchy",
         ds.Tables[0].Columns[PKColNames[0]], ds.Tables[0].Columns[parentColName]);
 }
开发者ID:rjankovic,项目名称:deskmin,代码行数:13,代码来源:Control.cs


示例12: LoadFromXML

        public static void LoadFromXML(string path, ref List<UserAction> ActionList)
        {
            FileStream fs = null;
            try
            {
                fs = new FileStream(path, FileMode.Open, FileAccess.Read);

                XmlReader xrReport = XmlReader.Create(fs);

                XmlDocument xdoc = new XmlDocument();
                xdoc.Load(xrReport);

                //   xdoc.SelectSingleNode("/Record/
                ActionHost.ptWindowPoint = new System.Drawing.Point(
                                                                    Convert.ToInt32(xdoc.DocumentElement.SelectSingleNode("LeftTop/Top").InnerText),
                                                                    Convert.ToInt32(xdoc.DocumentElement.SelectSingleNode("LeftTop/Left").InnerText)
                                                                    );

                ActionHost.szTargetBounds = new System.Drawing.Size(
                    Convert.ToInt32(xdoc.DocumentElement.SelectSingleNode("RightBottom/Right").InnerText) - ActionHost.ptWindowPoint.X,
                    Convert.ToInt32(xdoc.DocumentElement.SelectSingleNode("RightBottom/Bottom").InnerText) - ActionHost.ptWindowPoint.Y
                                                                    );
                ActionHost.strTargetExeName = xdoc.DocumentElement.SelectSingleNode("ProgramExe").InnerText;
                ActionHost.TargetWindow = new IntPtr(Convert.ToInt32(xdoc.DocumentElement.SelectSingleNode("MainWindowHandle").InnerText));

                XmlNodeList xnlEvents = xdoc.SelectNodes("Record/Events/Event");

                foreach (XmlNode xnEvent in xnlEvents)
                {

                    System.Windows.Forms.Message mes = new System.Windows.Forms.Message();
                    mes.Msg = Int32.Parse(xnEvent.SelectSingleNode("Message").InnerXml);
                    int mouseX = Int32.Parse(xnEvent.SelectSingleNode("Coords/X").InnerXml);
                    int mouseY = Int32.Parse(xnEvent.SelectSingleNode("Coords/Y").InnerXml);
                    System.Drawing.Point mouseCoords = new System.Drawing.Point(mouseX, mouseY);
                    UserAction uaItem = new UserAction(mes, (uint)ActionHost.TargetWindow.ToInt32());
                    uaItem.MouseCoords = mouseCoords;
                    ActionHost.AddItem(uaItem);
                    string val = xnEvent.InnerXml;

                }
                xrReport.Close();
            }
            finally
            {
                fs.Close();

            }
        }
开发者ID:alexryassky,项目名称:actionlogger,代码行数:49,代码来源:cFunc.cs


示例13: OnUserAction

        /// <summary>
        /// Called when the user requests an action using system-provided UI and the application has requesed
        /// notifications of the action
        /// </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
        /// </remarks>
        protected override void OnUserAction(BackgroundAudioPlayer player, AudioTrack track, UserAction action,
                                             object param)
        {
            switch (action)
            {
                case UserAction.Play:
                    playTrack(player);
                    break;

                case UserAction.Stop:
                    player.Stop();
                    break;
            }

            NotifyComplete();
        }
开发者ID:woodgate,项目名称:MegastrazWP7,代码行数:30,代码来源:AudioPlayer.cs


示例14: SwipeControl

 public void SwipeControl(UserAction action)
 {
     if (action == UserAction.SWIPE_RIGHT && IsBackRun){
         IsBackRun = false;
     }
     else if (action == UserAction.SWIPE_RIGHT && !IsBackRun) {
         IsForwardRun = true;
     }
     else if (action == UserAction.SWIPE_LEFT && IsForwardRun) {
         IsForwardRun = false;
     }
     else if (action == UserAction.SWIPE_LEFT && !IsForwardRun) {
         IsBackRun = true;
     }
     else if (action == UserAction.SWIPE_UP) {
         IsJump = true;
     }
 }
开发者ID:Snarkvadim,项目名称:vremenny,代码行数:18,代码来源:PlayerControlHolder.cs


示例15: NotifyUserAction

 private void NotifyUserAction(UserAction arg1, IDictionary<string, object> arg2)
 {
     Debug.Log("Event: NotifyUserAction Fired");
     //The following are potential UserActions:
     //		AchievementViewAction = 100,
     //		AchievementEngagedAction = 101,
     //		AchievementDismissedAction = 102,
     //		SponsorContentViewedAction = 103,
     //		SponsorContentEngagedAction = 104,
     //		SponsorContentDismissedAction = 105,
     //		PortalViewedAction = 106,
     //		SignInAction = 107,
     //		SignOutAction = 108,
     //		RegisteredAction = 109,
     //		PortalDismissedAction = 110,
     //		RedeemedRewardAction = 111,
     //		CheckinCompletedAction = 112,
     //		VirtualItemRewardAction = 113
 }
开发者ID:sessionm,项目名称:sessionm-enterprise-unity,代码行数:19,代码来源:SessionMListenerExample.cs


示例16: 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)
 {
     switch (action)
     {
         case UserAction.Play:
             PlayTrack(player);
             break;
         case UserAction.Pause:
             player.Pause();
             break;
         case UserAction.SkipPrevious:
             PlayPreviousTrack(player);
             break;
         case UserAction.SkipNext:
             PlayNextTrack(player);
             break;
     }
     
     NotifyComplete();
 }
开发者ID:GregOnNet,项目名称:WP8BookSamples,代码行数:35,代码来源:AudioPlayer.cs


示例17: AddUserAction

        public IList<UserAction> AddUserAction(UserAction action)
        {
            IList<UserAction> userActions = new List<UserAction>();

            try
            {
                userActions = _userActionDAO.AddActionAtFirstIndex(action);
                if (userActions.Count == UserActionsLength)
                {
                    userActions = _userActionDAO.RemoveLastAction();
                }

                return userActions;
            }
            catch (Exception ex)
            {
                new LogEvent(ex.Message).Raise();
            }

            return userActions;
        }
开发者ID:Grekk,项目名称:MovieAPI,代码行数:21,代码来源:UserService.cs


示例18: ArticleCommentCreateDeleteUpdate

        public bool ArticleCommentCreateDeleteUpdate(ArticleComment articleComment, UserAction ua)
        {
            bool result = false;
            string commandText = string.Empty;
            switch (ua)
            {
                case UserAction.Create:
                    commandText = "INSERT INTO ArticleComment  (ArticleCommentID, ArticleCommentText, UserID, UserName, UserAddress,  ArticleCommentCreateTime, ArticleID) VALUES ("+
                        articleComment.CommentID +", '"+articleComment.CommentText +"',"+articleComment.UserID +", '"+articleComment.UserName +"', '"+articleComment.UserAddress +"','"+articleComment.CommentCreateTime +"',"+articleComment.ArticleID +")";
                        break;
                case UserAction.Delete:
                    commandText = "DELETE FROM ArticleComment WHERE (ArticleCommentID = "+articleComment.CommentID +")";
                    break;
                case UserAction.Update:
                    commandText = "UPDATE ArticleComment SET ArticleCommentText = '"+articleComment.CommentText +"', UserID = "+articleComment.UserID +", UserName = '"+articleComment.UserName +"', UserAddress = '"+articleComment.UserAddress +
                        "',ArticleCommentCreateTime = '"+articleComment.CommentCreateTime +"', ArticleID = "+articleComment.ArticleID +" WHERE (ArticleCommentID = "+articleComment.CommentID +")";
                    break;
            }
            using (SqlConnection conn = new SqlConnection(DataHelper2.SqlConnectionString))
            {
                using (SqlCommand comm = new SqlCommand())
                {
                    comm.CommandText = commandText;
                    comm.Connection = conn;
                    conn.Open();
                    try
                    {
                        comm.ExecuteNonQuery();
                        result = true;
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }

                }
            }

            return result;
        }
开发者ID:ablozhou,项目名称:hairnet,代码行数:40,代码来源:ArticleDataProviderInstance.cs


示例19: Refresh

        public void Refresh()
        {
            ActionContains.Children.Clear();
            if(_actionList != null && _actionList.Count !=0)
            {
                for (int i=0; i < _actionList.Count; i++)
                {
                    UserAction action = new UserAction();
                    action.MyAction = _actionList[i];
                    action.Index = i;
                    action.OnSelectThis += action_OnSelectThis;
                    action.OnEditThis   +=action_OnEditThis;
                    ActionContains.Children.Add(action);
                }
                InvalidateVisual();

                if (OnCurrentActionChange != null)
                {
                    OnCurrentActionChange(this,null);
                }
            }
        }
开发者ID:Stefanying,项目名称:CenterControlEditor,代码行数:22,代码来源:ActionContainer.xaml.cs


示例20: S2C_UserAction

 public S2C_UserAction(User user, UserAction action)
 {
     _User = user;
     _Action = action;
 }
开发者ID:Natsuwind,项目名称:DeepInSummer,代码行数:5,代码来源:Messages.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UserContext类代码示例发布时间:2022-05-24
下一篇:
C# UserAccountService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap