public MainForm()
        {
            try
            {
                string keyName   = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION";
                string valueName = Path.GetFileName(Application.ExecutablePath);
                if (Registry.GetValue(keyName, valueName, null) == null)
                {
                    Registry.SetValue(keyName, valueName, 32768, RegistryValueKind.DWord);
                }
            }
            catch
            {
                ErrorBox.Show(Lng.Elem("Registry write error"), Lng.Elem(@"You need to start the application with administrator right for the first time if you want to use the map functionality or create HKEY_LOCAL_MACHINE\SOFTWARE\[WOW6432Node\]Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\Storyteller.exe REG_DWORD 0x8000 registry entries."));
            }

            InitializeComponent();

            LoadIcons();

            imageList.Images.Add("0", IconChar.Folder.ToBitmap(16, Color.DarkGoldenrod));
            imageList.Images.Add("1", IconChar.Image.ToBitmap(16, Color.ForestGreen));
            imageList.Images.Add("2", IconChar.FileAudio.ToBitmap(16, Color.LightSeaGreen));
            imageList.Images.Add("3", IconChar.User.ToBitmap(16, Color.BlanchedAlmond));

            DirectoryExtension.CreateApplicationDirectories();

            tvImages.Nodes.GetFilesAndFolders(PathProvider.Maps, 1, ExtensionProvider.ImagesFilter);
            tvMusic.Nodes.GetFilesAndFolders(PathProvider.Music, 2, ExtensionProvider.AudioFilter);
            tvSoundEffects.Nodes.GetFilesAndFolders(PathProvider.SoundEffects, 2, ExtensionProvider.AudioFilter);
            tvCharacters.Nodes.GetFilesAndFolders(PathProvider.Characters, 1, ExtensionProvider.ImagesFilter);
            tvVideoClips.Nodes.GetFilesAndFolders(PathProvider.VideoClips, 1, ExtensionProvider.VideoFilter);

            tvImages.ExpandAll();

            FillListViewGroup(lvMarket, "Accomodation");
            FillListViewGroup(lvMarket, "Animals");
            FillListViewGroup(lvMarket, "Clothes");
            FillListViewGroup(lvMarket, "Debauchery");
            FillListViewGroup(lvMarket, "Food");
            FillListViewGroup(lvMarket, "Other");
            FillListViewGroup(lvMarket, "Trappings");
            FillListViewGroup(lvMarket, "Travelling");

            GetLanguages();

            Lng.Translate(this);

            LoadStory(rtbStory);

            charcterGenerator = new CharcterGenerator
            {
                TopLevel        = false,
                FormBorderStyle = FormBorderStyle.None,
                Dock            = DockStyle.Fill
            };
            pCharacterContent.Controls.Add(charcterGenerator);
            charcterGenerator.Show();
        }
        private void TsmiCharacter_Click(object sender, EventArgs e)
        {
            var charcterGenerator = new CharcterGenerator(true);

            if (charcterGenerator.ShowDialog() == DialogResult.OK)
            {
                tvCharacters.Nodes.GetFilesAndFoldersWithClear(PathProvider.Characters, 1, ExtensionProvider.ImagesFilter);
            }
        }