} // DisposeControls

        #endregion
        
        #region Set Skin

        /// <summary>
        /// Sets a new skin.
        /// </summary>
        public static void SetSkin(string skinName)
        {
            if (SkinChanging != null) 
                SkinChanging.Invoke(new EventArgs());
            
            Skin.LoadSkin(skinName);

            #if (!XBOX)
                if (Skin.Cursors["Default"] != null)
                {
                    Cursor = Skin.Cursors["Default"].Cursor;
                }
            #endif
            
            // Initializing skins for every control created, even not visible or not added to the manager or another control.
            foreach (Control control in Control.ControlList)
            {
                control.InitSkin();
            }
            
            if (SkinChanged != null) 
                SkinChanged.Invoke(new EventArgs());

            //  Initializing all controls created, even not visible or not added to the manager or another control.
            foreach (Control control in Control.ControlList)
            {
                control.Init();
            }
        } // SetSkin
예제 #2
0
 public void SetSkin()
 {
     Debug.Log("Change skin");
     SkinInitializer.skinRenderer.material.mainTexture       = texture;
     PlayerControl.Instance.trail.sharedMaterial.mainTexture = texture;
     CurrentSkin = this;
     SkinChanged?.Invoke(this);
 }
예제 #3
0
        public static void ChangeSkin(Skin newSkin)
        {
            var intSkin = (int)newSkin;

            if (Settings.Default.Skin != intSkin)
            {
                Settings.Default.Skin = intSkin;
                SkinChanged?.Invoke(null, EventArgs.Empty);
            }
        }
예제 #4
0
        /// <summary>
        /// Aplikuje aktuální skin DevExpress do skinu ASOL
        /// </summary>
        public static void ApplyCurrentSkin()
        {
            var activeLookAndFeel = ActiveLookAndFeel;
            // var painter = activeLookAndFeel.Painter;
            var currentSkin = DXS.CommonSkins.GetSkin(activeLookAndFeel);

            DXS.SkinElement element;

            if (SearchSkinElement(currentSkin, out element, DXS.CommonSkins.SkinTextBorder))
            {
                WSC.Skin.TextBox.BorderColor = element.Border.All;
            }

            if (SearchSkinElement(currentSkin, out element, DXS.CommonSkins.SkinTextControl, DXS.CommonSkins.SkinLabel))
            {
                if (!element.Color.BackColor.IsEmpty)
                {
                    WSC.Skin.TextBox.BackColorEnabled = element.Color.BackColor;
                }
                if (!element.Color.ForeColor.IsEmpty)
                {
                    WSC.Skin.TextBox.TextColorFocused = element.Color.ForeColor;
                }
            }



            // Dáme vědět existujícím controlům:
            SkinChanged?.Invoke(activeLookAndFeel, EventArgs.Empty);

            /*
             * var skinSet = DXS.SkinManager.Default.GetRuntimeSkins().FirstOrDefault(s => s.SkinName == activeLookAndFeel.SkinName); // GetRuntimeSkins( .GetSkin(DXS.SkinProductId.Form);
             * var skin = skinSet.GetSkin(DXS.SkinProductId.Tab);
             * WSC.Skin.Reset();
             *
             * WSC.Skin.Control.ControlBackColor = skin.BaseColor;          // activeLookAndFeel.Painter.
             * WSC.Skin.Control.ControlFocusBackColor = skin.BaseColor;          // activeLookAndFeel.Painter.
             *
             * WSC.Skin.Control.ControlBackColor = Color.LightBlue;
             * WSC.Skin.Control.ControlFocusBackColor = Color.LightYellow;
             */
        }
예제 #5
0
 public static void SetCurrentSkin(BaseSkin baseSkin)
 {
     _currentBaseSkin          = baseSkin;
     ToolStripManager.Renderer = new ToolStripSystemRendererEx(baseSkin);
     SkinChanged?.Invoke(null, null);
 }
예제 #6
0
        protected virtual void OnSkinChanged()
        {
            var e = new DocumentEventArgs(m_activeDocument);// a null active document is OK

            SkinChanged.Raise(this, e);
        }
예제 #7
0
 public static void SetCurrentSkin(BaseSkin baseSkin)
 {
     _currentBaseSkin = baseSkin;
     SkinChanged?.Invoke(null, null);
 }