コード例 #1
0
ファイル: Node.cs プロジェクト: klenin/Citrus
        /// <summary>
        /// Returns a clone of the node hierarchy.
        /// </summary>
        public virtual Node Clone()
        {
            var clone = (Node)MemberwiseClone();

            ++CreatedCount;
            clone.Parent         = null;
            clone.FirstAnimation = null;
            clone.FirstChild     = null;
            clone.NextSibling    = null;
            clone.gestures       = null;
            clone.AsWidget       = clone as Widget;
            clone.Animations     = Animations.Clone(clone);
            clone.Animators      = AnimatorCollection.SharedClone(clone, Animators);
            clone.Nodes          = Nodes.Clone(clone);
            clone.Components     = Components.Clone(clone);
            clone.IsAwake        = false;
            if (RenderChainBuilder != null)
            {
                clone.RenderChainBuilder = RenderChainBuilder.Clone(clone);
            }
            if (Presenter != null)
            {
                clone.Presenter = Presenter.Clone();
            }
            if (PostPresenter != null)
            {
                clone.PostPresenter = PostPresenter.Clone();
            }
            clone.DirtyMask = DirtyFlags.All;
            clone.UserData  = null;
            return(clone);
        }
コード例 #2
0
        public async Task <ActionResult <int> > Post(User user)
        {
            PostPresenter <int> postPresenter = new PostPresenter <int>();

            var userLoggedIn = User;

            _ = await _registerUserUseCase.HandleAsync(new Core.Dto.UseCaseRequests.UseCaseRequest <Core.Dto.UserDto, Core.Dto.UseCaseResponses.UseCaseResponse <int> >(new Core.Dto.UserDto(0, user.Email, user.Username, user.Password, user.FullName, user.Bio)), postPresenter).ConfigureAwait(false);

            return(postPresenter.ContentResult);
        }
コード例 #3
0
        internal override async Task AddRecord()
        {
            try
            {
                _post      = new EditingPostForm();
                _presenter = new PostPresenter(_post);
                _post.ShowDialog();

                await Update();
            }
            catch (Exception ex)
            {
                ShowError(ex.Message);
            }
        }
コード例 #4
0
        internal override async Task EditRecord()
        {
            try
            {
                if (ExistsRecord)
                {
                    _post      = new EditingPostForm();
                    _presenter = new PostPresenter(_post, Item.ID);
                    _post.ShowDialog();

                    await Update();
                }
            }
            catch (Exception ex)
            {
                ShowError(ex.Message);
            }
        }
コード例 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _presenter = new PostPresenter();
     _presenter.Init(this);
 }