public FileSettingsStorage(
     ISettingsStorage storage)
 {
     _args = storage
             .GetKeys()
             .ToDictionary(k => k, v => storage[v]);
 }
        public void Work()
        {
            var form = (ActEditForm)_container.Resolve <Form>("ActEditForm");
            var act  = _settings.GetKeys().Contains(ArgsKeyList.Mode) &&
                       _settings[ArgsKeyList.Mode].Equals("Act")
                ? new Act().LoadFromJson(LoadJsonFile())
                : BlankList.GetList(LoadJsonFile(), ex =>
                                    _console?.AddException(ex)).ToModelFormat(e => _console?.AddException(e));

            if (ActEditForm.ShowModal(_container, act) == null)
            {
                return;
            }

            _context.Acts.Add(act);
            _context.SaveChanges();

            var item          = listBox1.Items[listBox1.SelectedIndex].ToString();
            var storeFileName = $"{_settings[ArgsKeyList.StorePath]}\\{_items[item].Id}";

            File.Delete(storeFileName);
            _items.Remove(item);
            listBox1.Items.RemoveAt(listBox1.SelectedIndex);
        }