Пример #1
0
        private void OpenDescription(string path)
        {
            try
            {
                var version = Description.CheckVersion(path);
                if (version != Description.CurrentVersion)
                {
                    var result = MessageBox.Show(this, "Would you like to convert it?",
                                                 "Description is outdated.", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                    if (result != DialogResult.Yes)
                    {
                        return;
                    }

                    Converter.ConvertDescription(path);
                }

                path = Path.GetFullPath(path);
                var desc = new Description(path);
                path = Path.Combine(Path.GetDirectoryName(path), "Resources");
                Directory.SetCurrentDirectory(path);

                ResourceExplorer.LoadLocation(path);
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.ToString(), "Error: Can not open description.",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #2
0
 public ExplorerForm(string path, bool multiselect = false, params ResourceType[] type)
 {
     InitializeComponent();
     ResourceExplorer.TypeFilter  = type;
     ResourceExplorer.MultiSelect = multiselect;
     ResourceExplorer.LoadLocation(path);
 }