public void Init( )
        {
            int index = 0;

            TabSettings.LoadSettings(TabFileName, (tab) =>
            {
                AddProcess(tab).Index = index++;
            });


            ColorSettings.LoadColorTable("color.json");
        }
        public void Exit( )
        {
            StopAllProcess(true);

            var list = new List <TabInfo>();

            var sortedModel = _modelByID.Values.ToList();

            sortedModel.Sort((a, b) =>
            {
                return(a.Index < b.Index ? -1 : 1);
            });

            foreach (ProcessModel model in sortedModel)
            {
                var tabInfo = new TabInfo();
                tabInfo.OnSave(model);
                list.Add(tabInfo);
            }

            TabSettings.SaveSettings(TabFileName, list);
        }