Esempio n. 1
0
        private void Hide_INTERNAL(AppearanceParameters parameters)
        {
            WindowSystem.GetHistoryTracker().Add(this, parameters, HistoryTrackerEventType.HideManual);

            this.manualShowHideControl = true;

            //parameters = parameters.ReplaceManual(manual: true);

            var callback         = parameters.GetCallback(null);
            var parametersResult = parameters.ReplaceCallback(() => {
                if (this.GetComponentState() != WindowObjectState.Hiding)
                {
                    if (callback != null)
                    {
                        callback.Invoke();
                    }
                    return;
                }

                this.DoHideEnd_INTERNAL(parameters);
                if (callback != null)
                {
                    callback.Invoke();
                }
            });

            parametersResult = parametersResult.ReplaceForced(forced: true);

            this.DoHideBegin_INTERNAL(parametersResult);
        }
        public void Show(AppearanceParameters parameters)
        {
            if (this.IsStateReadyToShow() == false &&
                parameters.GetForced(defaultValue: false) == false)
            {
                parameters.Call();
                return;
            }

            WindowSystem.GetHistoryTracker().Add(this, parameters, HistoryTrackerEventType.ShowManual);

            this.manualShowHideControl = true;

            //parameters = parameters.ReplaceManual(manual: true);

            var callback         = parameters.GetCallback(null);
            var parametersResult = parameters.ReplaceCallback(() => {
                if (this.GetComponentState() != WindowObjectState.Showing)
                {
                    if (callback != null)
                    {
                        callback.Invoke();
                    }
                    return;
                }

                this.DoShowEnd_INTERNAL(parameters);
                if (callback != null)
                {
                    callback.Invoke();
                }
            });

            parametersResult = parametersResult.ReplaceForced(forced: true);

            this.DoShowBegin_INTERNAL(parametersResult);
        }