Exemplo n.º 1
0
        /// <summary>
        /// 触发是否正在被编辑变化事件;
        /// </summary>
        protected void RaiseIsEditingChanged(ValueChangedEventArgs <bool> e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            IsEditingChanged?.Invoke(this, e);
        }
Exemplo n.º 2
0
        protected async Task CancelAsync(bool isNewPlantInfo = false)
        {
            if (PlantInfo.PlantInfoId == 0 || isNewPlantInfo)
            {
                if (isNewPlantInfo)
                {
                    await RefreshListAsync();
                }

                await Cancel.Invoke();
            }
            else
            {
                await IsEditingChanged.InvokeAsync(false);
                await RefreshListAsync();
            }
        }
        protected async Task CancelAsync(bool isNewSpecimen = false)
        {
            if (Specimen.SpecimenId == 0 || isNewSpecimen)
            {
                if (isNewSpecimen)
                {
                    await RefreshListAsync();
                }

                await Cancel.Invoke();
            }
            else
            {
                await IsEditingChanged.InvokeAsync(false);
                await RefreshListAsync();
            }
        }
        protected async Task CancelAsync(bool isNewActivity = false)
        {
            if (Activity.ActivityId == 0 || isNewActivity)
            {
                if (isNewActivity)
                {
                    await RefreshListAsync();
                }

                await Cancel.Invoke();
            }
            else
            {
                await IsEditingChanged.InvokeAsync(false);

                await RefreshListAsync();
            }
        }
Exemplo n.º 5
0
        protected async Task UnloadItem()
        {
            await IsEditingChanged.InvokeAsync(false);

            await IsItemLoadedChanged.InvokeAsync(false);
        }