private void LongBar_Drop(object sender, DragEventArgs e) { string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, true); if (files.Length > 0) { for (int i = 0; i < files.Length; i++) { if (files[i].EndsWith(".tile")) { FileInfo info = new FileInfo(files[i]); TaskDialogs.TileInstallDialog.ShowDialog(this, info.Name, files[i]); } if (files[i].EndsWith(".locale.xaml")) { if (LocaleManager.InstallLocale(Sidebar.SidebarWindow.sett.path, files[i])) { MessageBox.Show("Localization was succesfully installed!", "Installing localization", MessageBoxButton.OK, MessageBoxImage.Information); string name = System.IO.Path.GetFileName(files[i]); sett.locale = name.Substring(0, name.IndexOf(@".locale.xaml")); SetLocale(sett.locale); } else { MessageBox.Show("Can't install localization.", "Installing localization", MessageBoxButton.OK, MessageBoxImage.Error); } } if (files[i].EndsWith(".theme.xaml")) { if (ThemesManager.InstallTheme(Sidebar.SidebarWindow.sett.path, files[i])) { MessageBox.Show("Theme was succesfully installed!", "Installing theme", MessageBoxButton.OK, MessageBoxImage.Information); string name = System.IO.Path.GetFileName(files[i]); sett.theme = name.Substring(0, name.IndexOf(@".theme.xaml")); SetTheme(sett.theme); } else { MessageBox.Show("Can't install theme.", "Installing theme", MessageBoxButton.OK, MessageBoxImage.Error); } } } } }