Bloom.Edit.ToolboxView.SaveToolboxSettings C# (CSharp) Метод

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

Used to save various settings relating to the toolbox. Passed a string which is typically two or three elements divided by a tab. - may be passed 'active' followed by the ID of one of the check boxes that indicates whether the DR, LR, or TB tools are in use, followed by "1" if it is used, or "0" if not. These IDs are arranged to be the tool name followed by "Check". - may be passed 'current' followed by the name of one of the toolbox tools - may be passed 'state' followed by the name of one of the tools and its current state string.
public static SaveToolboxSettings ( Book book, string data ) : void
book Bloom.Book.Book
data string
Результат void
        public static void SaveToolboxSettings(Book.Book book, string data)
        {
            var args = data.Split(new[] { '\t' });

            switch (args[0])
            {
                case "active":
                    UpdateActiveToolSetting(book, args[1].Substring(0, args[1].Length - "Check".Length), args[2] == "1");
                    return;

                case "current":
                    book.BookInfo.CurrentTool = args[1];
                    return;

                case "state":
                    UpdateToolState(book, args[1], args[2]);
                    return;
                case "visibility":
                    UpdateToolboxVisibility(book, args[1]);
                    return;
            }
        }