예제 #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!IsHandleCreated || WinFormsUtility.IsDesignerHosted(this) || EditorAPI.ClosingApplication)
            {
                return;
            }
            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return;
            }

            InfoUpdate();
            NewUpdate();
            //OpenUpdate();
            PackagingUpdate();
            LoginUpdate();

            if (Visible && doInitActionsInTimer)
            {
                doInitActionsInTimer = false;

                kryptonNavigator1.Focus();
                kryptonNavigator1.Select();
                kryptonTextBoxInfoName.Select(0, 0);
            }
        }
예제 #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!IsHandleCreated || WinFormsUtility.IsDesignerHosted(this) || EditorAPI.ClosingApplication)
            {
                return;
            }
            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return;
            }

            //need periodically check for case when component inside _File item was loaded
            UpdateSelectedType();

            UpdateControls();

            //!!!!лучше совсем окно не показывать
            //auto create and close
            if (firstTick && creationData.initSupportAutoCreateAndClose)
            {
                if (tableLayoutPanel1.Controls.Count == 0)
                {
                    if (IsReadyToCreate(out _))
                    {
                        ButtonCreateAndClose_Click(null, null);
                    }
                }
            }

            firstTick = false;
        }
예제 #3
0
        public bool IsAllowRender()
        {
            if (EngineApp.Instance == null)
            {
                return(false);
            }

            //!!!!new. надо ли. поставлено т.к. валилось в UpdateTransformToolObjects на "foreach( var obj in transformTool.Objects )" в OnPaint, в Tick
            if (!loaded)
            {
                return(false);
            }

            //if( WinFormsAppWorld.DuringWarningOrErrorMessageBox )
            //	return;
            //if( RenderSystem.IsDeviceLostByTestCooperativeLevel() )
            //	return;

            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return(false);
            }

            //!!!! check perf. replace to alternative with flag check for better perf.
            if (!IsPhysicalVisibleCheckBy5Points(this))
            {
                return(false);
            }

            return(true);
        }
예제 #4
0
        private void timer10ms_Tick(object sender, EventArgs e)
        {
            if (!IsHandleCreated || WinFormsUtility.IsDesignerHosted(this) || EditorAPI.ClosingApplication)
            {
                return;
            }
            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return;
            }

            bool cancel = false;

            BeforeTimerUpdate?.Invoke(this, ref cancel);
            if (cancel)
            {
                return;
            }

            //!!!!когда не обновлять?
            PerformUpdate();

            if (doubleBufferCompositedTime.HasValue && (DateTime.Now - doubleBufferCompositedTime.Value).TotalSeconds > 0)
            {
                ControlDoubleBufferComposited.RestoreComposited(this);
                doubleBufferCompositedTime = null;
            }
        }
예제 #5
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!IsHandleCreated || WinFormsUtility.IsDesignerHosted(this) || EditorAPI.ClosingApplication)
            {
                return;
            }
            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return;
            }

            UpdateWindowTitle();
        }
예제 #6
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!IsHandleCreated || WinFormsUtility.IsDesignerHosted(this) || EditorAPI.ClosingApplication)
            {
                return;
            }
            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return;
            }

            //need periodically check for case when component inside _File item was loaded
            UpdateSelectedType();

            UpdateControls();
        }
예제 #7
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!IsHandleCreated || WinFormsUtility.IsDesignerHosted(this) || EditorAPI.ClosingApplication)
            {
                return;
            }
            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return;
            }

            double updateTime = 0.05;

            {
                var count = EditorForm.Instance.GetObjectsInFocus().Objects.Length;
                if (count > 2000)
                {
                    updateTime = 2.0;
                }
                else if (count > 500)
                {
                    updateTime = 1.0;
                }
                else if (count > 250)
                {
                    updateTime = 0.5;
                }
                else if (count > 100)
                {
                    updateTime = 0.1;
                }
                else
                {
                    updateTime = 0.05;
                }
            }
            if (EngineApp.GetSystemTime() - lastUpdateTime < updateTime)
            {
                return;
            }

            UpdateSelectedPanel();

            lastUpdateTime = EngineApp.GetSystemTime();
        }
예제 #8
0
        void updateTimer_Tick(object sender, EventArgs e)
        {
            if (WinFormsUtility.IsDesignerHosted(this))
            {
                return;
            }
            if (!IsHandleCreated)
            {
                return;
            }
            //!!!!надо ли?
            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return;
            }

            //!!!!

            if (automaticUpdateFPS == 0)
            {
                UpdateInput();
            }

            ////!!!!
            ////if( WinFormsAppWorld.DuringWarningOrErrorMessageBox )
            ////	return;

            //	if( viewport != null )
            //	UpdateKeysAndMouseButtons();

            ////!!!!
            ////if( automaticUpdateFPS != 0 )
            ////{
            ////	if( !invalidated )//!!!!temp?
            ////	{
            ////		invalidated = true;
            ////		Invalidate();
            ////	}
            ////}

            ////!!!!!так? может проверки какие
            //if( viewport != null && viewport.MouseRelativeMode )
            //	MouseRelativeModeResetPosition();
        }
예제 #9
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!IsHandleCreated || WinFormsUtility.IsDesignerHosted(this) || EditorAPI.ClosingApplication)
            {
                return;
            }
            if (!WinFormsUtility.IsControlVisibleInHierarchy(this))
            {
                return;
            }

            if (kryptonSplitContainer1.Orientation != options.SplitterOrientation)
            {
                kryptonSplitContainer1.Orientation = options.SplitterOrientation;
            }

            //set splitter position from config
            if (splitterDistanceFromConfig != -1)
            {
                kryptonSplitContainer1.SplitterDistance = splitterDistanceFromConfig;
                splitterDistanceFromConfig = -1;
            }
        }