Ejemplo n.º 1
0
        public override void initState()
        {
            base.initState();
            this._refreshController = new RefreshController();
            this._isHaveTitle       = false;
            this._titleHeight       = 0.0f;
            this._controller        = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, navBarHeight, 0, 0),
                RelativeRect.fromLTRB(0, 13, 0, 0)
                );

            this._animation = rectTween.animate(this._controller);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchArticleDetail();
                this.widget.actionModel.fetchArticleDetail(this.widget.viewModel.articleId);
            });
            this._loginSubId = EventBus.subscribe(EventBusConstant.login_success, args => {
                this.widget.actionModel.startFetchArticleDetail();
                this.widget.actionModel.fetchArticleDetail(this.widget.viewModel.articleId);
            });
            this._jumpState             = _ArticleJumpToCommentState.Inactive;
            this._cachedCommentPosition = null;
        }
Ejemplo n.º 2
0
 public override void initState()
 {
     base.initState();
     this._refreshController = new RefreshController();
     this.cardWidth          = 0;
     this.avatarSize         = 0;
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchFollowing();
         this.widget.actionModel.fetchFollowing(arg1: this.widget.viewModel.currentUserId, 0);
         this.widget.actionModel.startFetchFollowArticles();
         this.widget.actionModel.fetchFollowArticles(arg1: firstPageNumber, true, false);
     });
     this._followUserSubId = EventBus.subscribe(sName: EventBusConstant.follow_user, args => {
         this._pageNumber = firstPageNumber;
         this.widget.actionModel.fetchFollowing(arg1: this.widget.viewModel.currentUserId, 0);
         this.widget.actionModel.fetchFollowArticles(arg1: firstPageNumber, true, false);
     });
     this._loginSubId = EventBus.subscribe(sName: EventBusConstant.login_success, args => {
         var currentUserId = args != null && args.Count > 0
             ? (string)args[0]
             : this.widget.viewModel.currentUserId;
         this._pageNumber = firstPageNumber;
         this.widget.actionModel.fetchFollowing(arg1: currentUserId, 0);
         this.widget.actionModel.fetchFollowArticles(arg1: firstPageNumber, true, false);
     });
 }
Ejemplo n.º 3
0
 public override void initState()
 {
     base.initState();
     this._refreshController = new RefreshController();
     this.cardWidth          = 0;
     this.avatarSize         = 0;
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchFollowing();
         this.widget.actionModel.fetchFollowing(arg1: this.widget.viewModel.currentUserId, 0);
         this.widget.actionModel.startFetchFollowArticles();
         this.widget.actionModel.fetchFollowArticles(arg1: firstPageNumber, true, false);
     });
     this._followUserSubId = EventBus.subscribe(sName: EventBusConstant.follow_user, args => {
         this._pageNumber = firstPageNumber;
         this.widget.actionModel.fetchFollowing(arg1: this.widget.viewModel.currentUserId, 0);
         this.widget.actionModel.fetchFollowArticles(arg1: firstPageNumber, true, false);
     });
     this._loginSubId = EventBus.subscribe(sName: EventBusConstant.login_success, args => {
         var currentUserId = args != null && args.Count > 0
             ? (string)args[0]
             : this.widget.viewModel.currentUserId;
         this._pageNumber = firstPageNumber;
         this.widget.actionModel.fetchFollowing(arg1: currentUserId, 0);
         this.widget.actionModel.fetchFollowArticles(arg1: firstPageNumber, true, false);
     });
     this._articleTabSubId = EventBus.subscribe(sName: EventBusConstant.article_tab, args => {
         if (this.widget.viewModel.selectedIndex == 0)
         {
             this._refreshController.sendBack(true, mode: RefreshStatus.refreshing);
             this._refreshController.animateTo(0.0f, TimeSpan.FromMilliseconds(300), curve: Curves.linear);
         }
     });
 }
Ejemplo n.º 4
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(true);
            this._articleOffset     = 0;
            this._refreshController = new RefreshController();
            this._isHaveTitle       = false;
            this._hideNavBar        = true;
            this._controller        = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, 44, 0, 0),
                RelativeRect.fromLTRB(0, 0, 0, 0)
                );

            this._animation = rectTween.animate(this._controller);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchTeam();
                this.widget.actionModel.fetchTeam();
                this.widget.actionModel.startFetchTeamArticle();
                this.widget.actionModel.fetchTeamArticle(0);
            });
        }
Ejemplo n.º 5
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(true);
            this._articlePageNumber     = 1;
            this._favoriteArticleOffset = 0;
            this._refreshController     = new RefreshController();
            this._isHaveTitle           = false;
            this._hideNavBar            = true;
            this._isShowTop             = false;
            this._selectedIndex         = 0;
            this._controller            = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, top: navBarHeight, 0, 0),
                RelativeRect.fromLTRB(0, 0, 0, 0)
                );

            this._animation = rectTween.animate(parent: this._controller);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchUserProfile();
                this.widget.actionModel.fetchUserProfile();
                this.widget.actionModel.startFetchUserArticle();
                this.widget.actionModel.startFetchUserFavorite();
            });
        }
        public override void initState()
        {
            base.initState();
            this._refreshController = new RefreshController();
            this._hasBeenLoadedData = false;
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchArticles();
                this.widget.actionModel.fetchArticles(arg1: this.widget.viewModel.currentUserId, arg2: initOffset).Then(
                    () => {
                    if (this._hasBeenLoadedData)
                    {
                        return;
                    }

                    this._hasBeenLoadedData = true;
                    this.setState(() => { });
                });
            });
            this._articleTabSubId = EventBus.subscribe(sName: EventBusConstant.article_tab, args => {
                if (this.widget.viewModel.selectedIndex == 1)
                {
                    this._refreshController.sendBack(true, mode: RefreshStatus.refreshing);
                    this._refreshController.animateTo(0.0f, TimeSpan.FromMilliseconds(300), curve: Curves.linear);
                }
            });
        }
Ejemplo n.º 7
0
 public SectionView(
     int sectionCount,
     RowCountInSectionCallBack numOfRowInSection,
     CellAtIndexPathCallBack cellAtIndexPath,
     SectionHeaderCallBack headerInSection = null,
     RefreshController controller          = null,
     bool enablePullDown  = DefaultConstants.default_enablePullDown,
     bool enablePullUp    = DefaultConstants.default_enablePullUp,
     OnRefresh onRefresh  = null,
     bool hasBottomMargin = false,
     Widget headerWidget  = null,
     Widget footerWidget  = null,
     bool hasScrollBar    = true,
     bool hasRefresh      = true,
     Key key = null
     ) : base(key: key)
 {
     this.sectionCount      = sectionCount;
     this.numOfRowInSection = numOfRowInSection;
     this.cellAtIndexPath   = cellAtIndexPath;
     this.headerInSection   = headerInSection;
     this.controller        = controller;
     this.enablePullDown    = enablePullDown;
     this.enablePullUp      = enablePullUp;
     this.onRefresh         = onRefresh;
     this.hasBottomMargin   = hasBottomMargin;
     this.headerWidget      = headerWidget;
     this.footerWidget      = footerWidget;
     this.hasScrollBar      = hasScrollBar;
     this.hasRefresh        = hasRefresh;
 }
Ejemplo n.º 8
0
 public CustomListView(
     RefreshController controller = null,
     bool enablePullUp            = DefaultConstants.default_enablePullUp,
     bool enablePullDown          = DefaultConstants.default_enablePullDown,
     OnRefresh onRefresh          = null,
     bool hasBottomMargin         = false,
     int?itemCount = null,
     IndexedWidgetBuilder itemBuilder = null,
     Widget headerWidget = null,
     Widget footerWidget = null,
     bool hasScrollBar   = true,
     bool hasRefresh     = true,
     Key key             = null
     ) : base(key: key)
 {
     D.assert(() => {
         if (this.hasRefresh)
         {
             return(this.onRefresh != null);
         }
         return(true);
     });
     this.controller      = controller;
     this.enablePullUp    = enablePullUp;
     this.enablePullDown  = enablePullDown;
     this.onRefresh       = onRefresh;
     this.hasBottomMargin = hasBottomMargin;
     this.itemCount       = itemCount;
     this.itemBuilder     = itemBuilder;
     this.headerWidget    = headerWidget;
     this.footerWidget    = footerWidget;
     this.hasScrollBar    = hasScrollBar;
     this.hasRefresh      = hasRefresh;
 }
 public override void initState()
 {
     base.initState();
     this._refreshController = new RefreshController();
     this._memberOffset      = 0;
     SchedulerBinding.instance.addPostFrameCallback(_ => this.widget.actionModel.fetchMembers(0));
 }
Ejemplo n.º 10
0
 public override void initState()
 {
     base.initState();
     this._completedRefreshController = new RefreshController();
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchEventCompleted();
         this.widget.actionModel.fetchEvents(arg1: firstPageNumber, arg2: eventTab);
     });
 }
Ejemplo n.º 11
0
        private void saSimpleActionInvoker_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            RefreshController refreshController = Frame.GetController <RefreshController>();

            if (refreshController != null)
            {
                refreshController.RefreshAction.DoExecute();
            }
        }
Ejemplo n.º 12
0
 public override void initState()
 {
     base.initState();
     this._refreshController = new RefreshController();
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchBlogger();
         this.widget.actionModel.fetchBlogger(arg: firstPageNumber);
     });
 }
Ejemplo n.º 13
0
 public override void initState()
 {
     base.initState();
     this._ongoingRefreshController = new RefreshController();
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchEventOngoing();
         this.widget.actionModel.fetchEvents(firstPageNumber, eventTab, eventMode);
     });
 }
Ejemplo n.º 14
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     this._refreshController = new RefreshController();
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchNotifications();
         this.widget.actionModel.fetchNotifications(arg: firstPageNumber);
     });
 }
 public override void initState()
 {
     base.initState();
     this._offset            = 0;
     this._refreshController = new RefreshController();
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchFollowingTeam();
         this.widget.actionModel.fetchFollowingTeam(0);
     });
 }
Ejemplo n.º 16
0
        protected override void OnFrameAssigned()
        {
            base.OnFrameAssigned();
            refreshController = Frame.GetController <RefreshController>();
            if (refreshController == null)
            {
                return;
            }

            refreshController.RefreshAction.Execute += new SimpleActionExecuteEventHandler(RefreshAction_Execute);
        }
Ejemplo n.º 17
0
 public override void initState()
 {
     base.initState();
     this._refreshController = new RefreshController();
     this.navBarHeight       = maxNavBarHeight;
     this.titleStyle         = CTextStyle.H2;
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchArticles();
         this.widget.actionModel.fetchArticles(arg: initOffset);
     });
 }
Ejemplo n.º 18
0
 protected override void OnActivated()
 {
     base.OnActivated();
     refreshController = Frame.GetController <RefreshController>();
     if (refreshController == null)
     {
         return;
     }
     refreshController.RefreshAction.Executing += RefreshAction_Executing;
     refreshController.RefreshAction.Executed  += RefreshAction_Executed;
     // Perform various tasks depending on the target View.
 }
Ejemplo n.º 19
0
 public override void initState()
 {
     base.initState();
     this._refreshController = new RefreshController();
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchArticleDetail();
         this.widget.actionModel.fetchArticleDetail(this.widget.viewModel.articleId);
     });
     this._loginSubId = EventBus.subscribe(EventBusConstant.login_success, args => {
         this.widget.actionModel.startFetchArticleDetail();
         this.widget.actionModel.fetchArticleDetail(this.widget.viewModel.articleId);
     });
 }
Ejemplo n.º 20
0
        public override void initState()
        {
            base.initState();
            this._completedRefreshController = new RefreshController();
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchEventCompleted();
                this.widget.actionModel.fetchEvents(firstPageNumber, "completed");
            });
//            _loginSubId = EventBus.subscribe(EventBusConstant.login_success, args => {
//                widget.actionModel.startFetchEventCompleted();
//                widget.actionModel.fetchEvents(firstPageNumber, "completed");
//            });
        }
Ejemplo n.º 21
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.hideStatusBar(false);
     SplashManager.fetchSplash();
     this._refreshController = new RefreshController();
     this.navBarHeight       = maxNavBarHeight;
     this.titleStyle         = CTextStyle.H2;
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchArticles();
         this.widget.actionModel.fetchArticles(initOffset);
         this.widget.actionModel.fetchReviewUrl();
     });
 }
Ejemplo n.º 22
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     this._userOffset        = 0;
     this._refreshController = new RefreshController();
     this._title             = this.widget.viewModel.currentUserId == this.widget.viewModel.userId
         ? "我的粉丝"
         : "全部粉丝";
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchFollower();
         this.widget.actionModel.fetchFollower(0);
     });
 }
Ejemplo n.º 23
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(false);
            this._refreshController = new RefreshController();
            this.navBarHeight       = maxNavBarHeight;
            this.titleStyle         = CTextStyle.H2;
            this._hasBeenLoadedData = false;
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchNotifications();
                this.widget.actionModel.fetchNotifications(arg: firstPageNumber).Then(() => {
                    if (this._hasBeenLoadedData)
                    {
                        return;
                    }

                    this._hasBeenLoadedData = true;
                    this.setState(() => { });
                });
            });
            this._loginSubId = EventBus.subscribe(sName: EventBusConstant.login_success, args => {
                this.navBarHeight = maxNavBarHeight;
                this.titleStyle   = CTextStyle.H2;
                this.widget.actionModel.startFetchNotifications();
                this.widget.actionModel.fetchNotifications(arg: firstPageNumber).Then(() => {
                    if (this._hasBeenLoadedData)
                    {
                        return;
                    }

                    this._hasBeenLoadedData = true;
                    this.setState(() => { });
                });
            });
            this._refreshSubId = EventBus.subscribe(sName: EventBusConstant.refreshNotifications, args => {
                this.navBarHeight = maxNavBarHeight;
                this.titleStyle   = CTextStyle.H2;
                this.widget.actionModel.startFetchNotifications();
                this.widget.actionModel.fetchNotifications(arg: firstPageNumber).Then(() => {
                    if (this._hasBeenLoadedData)
                    {
                        return;
                    }

                    this._hasBeenLoadedData = true;
                    this.setState(() => { });
                });
            });
        }
Ejemplo n.º 24
0
        public override void initState()
        {
            base.initState();
            this._pageNumber        = 0;
            this._refreshController = new RefreshController();
            this._focusNode         = new FocusNode();
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                if (this.widget.viewModel.searchKeyword.Length > 0 || this.widget.viewModel.searchArticles.Count > 0)
                {
                    this.widget.actionModel.clearSearchArticleResult();
                }

                this.widget.actionModel.fetchPopularSearch();
            });
        }
Ejemplo n.º 25
0
 protected override void OnActivated()
 {
     base.OnActivated();
     InitSearchObjectActionItems();
     if (typeof(ISearchObject).IsAssignableFrom(View.ObjectTypeInfo.Type))
     {
         DetailView dv = View as DetailView;
         if (dv != null)
         {
             foreach (ListPropertyEditor editor in dv.GetItems <ListPropertyEditor>())
             {
                 if (editor.PropertyName == SearchResultsCollectionName)
                 {
                     editor.ControlCreated += new EventHandler <EventArgs>(editor_ControlCreated);
                 }
             }
             RefreshController refreshController = Frame.GetController <RefreshController>();
             if (refreshController != null)
             {
                 refreshController.RefreshAction.Active[ActiveKeySearchObject] = false;
             }
             RecordsNavigationController recordsNavigationController = Frame.GetController <RecordsNavigationController>();
             if (recordsNavigationController != null)
             {
                 recordsNavigationController.PreviousObjectAction.Active[ActiveKeySearchObject] = false;
                 recordsNavigationController.NextObjectAction.Active[ActiveKeySearchObject]     = false;
             }
             ModificationsController modificationsController = Frame.GetController <ModificationsController>();
             if (modificationsController != null)
             {
                 modificationsController.SaveAction.Active[ActiveKeySearchObject]         = false;
                 modificationsController.SaveAndCloseAction.Active[ActiveKeySearchObject] = false;
                 modificationsController.CancelAction.Active[ActiveKeySearchObject]       = false;
             }
             DeleteObjectsViewController deleteObjectsViewController = Frame.GetController <DeleteObjectsViewController>();
             if (deleteObjectsViewController != null)
             {
                 deleteObjectsViewController.DeleteAction.Active[ActiveKeySearchObject] = false;
             }
             NewObjectViewController newObjectViewController = Frame.GetController <NewObjectViewController>();
             if (newObjectViewController != null)
             {
                 newObjectViewController.NewObjectAction.Active[ActiveKeySearchObject] = false;
             }
         }
         SearchObjectAction.Active[ActiveKeySearchObject] = false;
     }
 }
Ejemplo n.º 26
0
        protected override void OnDeactivated()
        {
            // Unsubscribe from previously subscribed events and release other references and resources.
            if (DeleteController != null)
            {
                DeleteController.Active.RemoveItem(Key);
                DeleteController = null;
            }

            if (NewController != null)
            {
                NewController.Active.RemoveItem(Key);
                NewController = null;
            }

            if (refreshController != null)
            {
                refreshController.Active.RemoveItem(Key);
                refreshController = null;
            }

            if (modificationsController != null)
            {
                modificationsController.Active.RemoveItem(Key);
                modificationsController = null;
            }

            if (recordsNavigationController != null)
            {
                recordsNavigationController.Active.RemoveItem(Key);
                recordsNavigationController = null;
            }

            if (resetViewSettingsController != null)
            {
                resetViewSettingsController.Active.RemoveItem(Key);
                resetViewSettingsController = null;
            }

            if (openObjectController != null)
            {
                openObjectController.Active.RemoveItem(Key);
                openObjectController = null;
            }

            base.OnDeactivated();
        }
Ejemplo n.º 27
0
 public override void initState()
 {
     base.initState();
     this._refreshController = new RefreshController();
     this.cardWidth          = 0;
     this.avatarSize         = 0;
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchFollowing();
         this.widget.actionModel.fetchFollowing(0);
         this.widget.actionModel.startFetchFollowArticles();
         this.widget.actionModel.fetchFollowArticles(arg: firstPageNumber);
     });
     this._followUserSubId = EventBus.subscribe(sName: EventBusConstant.follow_user, args => {
         this.widget.actionModel.fetchFollowing(0);
         this.widget.actionModel.fetchFollowArticles(arg: firstPageNumber);
     });
 }
Ejemplo n.º 28
0
        public override void initState()
        {
            base.initState();
            this._hasBeenLoadedData          = false;
            this._completedRefreshController = new RefreshController();
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchEventCompleted();
                this.widget.actionModel.fetchEvents(arg1: firstPageNumber, arg2: eventTab).Then(() => {
                    if (this._hasBeenLoadedData)
                    {
                        return;
                    }

                    this._hasBeenLoadedData = true;
                    this.setState(() => { });
                });
            });
        }
Ejemplo n.º 29
0
        public override void initState()
        {
            base.initState();
            this._refreshController = new RefreshController();
            this._hasBeenLoadedData = false;
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchArticles();
                this.widget.actionModel.fetchArticles(arg1: this.widget.viewModel.currentUserId, arg2: initOffset).Then(
                    () => {
                    if (this._hasBeenLoadedData)
                    {
                        return;
                    }

                    this._hasBeenLoadedData = true;
                    this.setState(() => { });
                });
            });
        }
Ejemplo n.º 30
0
 public CustomMarkdown(
     Key key         = null,
     string data     = null,
     bool selectable = false,
     MarkdownStyleSheet markdownStyleSheet = null,
     SyntaxHighlighter syntaxHighlighter   = null,
     MarkdownTapLinkCallback onTapLink     = null,
     string imageDirectory                   = null,
     ExtensionSet extensionSet               = null,
     MarkdownImageBuilder imageBuilder       = null,
     MarkdownCheckboxBuilder checkboxBuilder = null,
     ScrollPhysics physics                   = null,
     bool shrinkWrap                     = false,
     Widget contentHead                  = null,
     Widget relatedArticles              = null,
     List <Widget> commentList           = null,
     RefreshController refreshController = null,
     bool enablePullDown                 = false,
     bool enablePullUp                   = false,
     OnRefresh onRefresh                 = null,
     NotificationListenerCallback <ScrollNotification> onNotification = null,
     float initialOffset = 0f,
     bool needRebuildWithCachedCommentPosition = false,
     bool isArticleJumpToCommentStateActive    = false
     ) : base(key, data, markdownStyleSheet, syntaxHighlighter,
              onTapLink, imageDirectory, extensionSet, imageBuilder, checkboxBuilder, selectable)
 {
     this.padding           = EdgeInsets.all(16);
     this.physics           = physics;
     this.shrinkWrap        = shrinkWrap;
     this.contentHead       = contentHead;
     this.relatedArticles   = relatedArticles;
     this.commentList       = commentList;
     this.refreshController = refreshController;
     this.enablePullDown    = enablePullDown;
     this.enablePullUp      = enablePullUp;
     this.onRefresh         = onRefresh;
     this.onNotification    = onNotification;
     this.initialOffset     = initialOffset;
     this.needRebuildWithCachedCommentPosition = needRebuildWithCachedCommentPosition;
     this.isArticleJumpToCommentStateActive    = isArticleJumpToCommentStateActive;
 }
 protected override void OnFrameAssigned()
 {
     base.OnFrameAssigned();
     base.Frame.TemplateChanged += new EventHandler(this.Frame_TemplateChanged);
     base.Frame.TemplateChanging += new EventHandler(this.Frame_TemplateChanging);
     this.RefreshController = base.Frame.GetController<RefreshController>();
     if (this.RefreshController != null)
     {
         this.RefreshController.RefreshAction.Enabled.Changed += new EventHandler<EventArgs>(this.Enabled_Changed);
         this.RefreshController.RefreshAction.Active.Changed += new EventHandler<EventArgs>(this.Enabled_Changed);
     }
 }