ForceRedraws() публичный статический Метод

public static ForceRedraws ( ) : void
Результат void
Пример #1
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && SliderHasFocus)
     {
         SliderHasFocus = false;
         Global.ForceRedraws();
     }
 }
Пример #2
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (e.X >= 4 && e.X <= 20 && e.Y >= 4 && e.Y <= 20)
            {
                if (Render == false)
                {
                    Render = true;
                    if (Global.ActiveMap != null)
                    {
                        Global.ActiveMap.UIState[LayerRef].bRender = true;
                    }
                }
                else
                {
                    //if ( Write ) return;
                    Render = false;
                    if (Global.ActiveMap != null)
                    {
                        Global.ActiveMap.UIState[LayerRef].bRender = false;
                    }
                }
                Global.ForceRedraws();
            }
            else if (e.X >= 24 && e.X <= 40 && e.Y >= 4 && e.Y <= 20)
            {
                SelectForWrite();
                Global.ForceRedraws();
            }
            else if (e.Button == MouseButtons.Left && SliderRect.Contains(e.X, e.Y) && mLayerRef.type == LayerType.Tile)
            {
                SliderHasFocus = true;
                _slideUpdate   = 0;
                SlideTo(e.X - SliderRect.X);
            }
            else if (e.Clicks == 1 && e.Button == MouseButtons.Left && e.X > 45)
            {
                SelectForWrite();
            }
            else if (e.Clicks == 2 && e.Button == MouseButtons.Left)
            {
                if (mLayerRef.type == LayerType.Tile)
                {
                    open_properties();
                }
                else if (mLayerRef.type == LayerType.Zone)
                {
                    Global.mainWindow.OpenZoneEditor();
                }
                else if (mLayerRef.type == LayerType.Entity)
                {
                    Global.mainWindow.OpenEntityEditor();
                }
            }

            Invalidate();
        }
Пример #3
0
        private void open_properties()
        {
            LayerPropertiesWnd lpw = new LayerPropertiesWnd();

            lpw.init(mLayerRef);
            if (lpw.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            lpw.setvalues(mLayerRef);
            mLayerRef.parentmap.touch();
            Global.ForceRedraws();
        }
Пример #4
0
        private void SlideTo(int x)
        {
            mLayerRef.Translucency = 100 - Math.Max(Math.Min(x, 100), 0);
            if (_slideUpdate == 0)
            {
                Global.ForceRedraws();
                _slideUpdate = 10;
            }
            else
            {
                _slideUpdate--;
            }

            Invalidate();
        }