Exemplo n.º 1
0
        /// <summary>
        /// Close the customisation panel.
        /// </summary>
        private void CloseButtonOnClick(object sender, EventArgs eventArgs)
        {
            Platform.AnimateWindowOut(_customPanel.Handle);
            _customPanel.Close();

            CRToolbarItemCollection collection = CRToolbarItemCollection.DefaultCollection;

            collection.Save();

            Customising = false;

            // Hide the separators and restore the buttons state back
            foreach (CRToolbarItem item in collection.Buttons.Where(item => item.Type == CRToolbarItemType.Space || item.Type == CRToolbarItemType.FlexibleSpace))
            {
                item.Control.Visible = false;
            }
            RefreshButtons();
        }