Beispiel #1
0
        public BatchExport(Cache cache, PluginContainer container)
        {
            InitializeComponent();
            Cache = cache;
            folder = new FolderBrowserDialog();

            foreach (string s in Cache.ArchiveNames)
                cboArchive.Items.Add(s);
            foreach (string s in Cache.SubNames)
                cboSub.Items.Add(s);
            cboSub.SelectedIndex = 0;
            cboArchive.SelectedIndex = 0;

            c_plugins = new List<PluginSelection>();
            foreach (IPlugin p in container.Plugins)
            {
                if (p.Classifications != null && (p.Classifications.Filenames.Length != 0 || p.Classifications.FileExtensions.Length != 0))
                    continue;
                string[] tes = p.StaticFileExtensions.Split('|');
                for (int i = 0; i < tes.Length; i += 2)
                {
                    if (tes[i] != "")
                    {
                        cboType.Items.Add(tes[i] + " [" + p.Name + "]");
                        c_plugins.Add(new PluginSelection(p, tes[i + 1]));
                    }
                }
            }

            if (cboType.Items.Count == 0)
            {
                MessageBox.Show("No suitable plugins for exporting data found.", "Cannot Export Data", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            cboType.SelectedIndex = 0;
        }
Beispiel #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     SetBLE(false);
     if (!FilesLoader.Load())
     {
         MessageBox.Show("Failed to load file names.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     if (Environment.OSVersion.Platform != PlatformID.Win32NT && Environment.OSVersion.Platform != PlatformID.Win32S && Environment.OSVersion.Platform != PlatformID.Win32Windows && Environment.OSVersion.Platform != PlatformID.WinCE)
     {
         file_browser.Font = new System.Drawing.Font("Arial", 8.25f);
         lblFile.Font = new Font("Arial", 8.25f);
     }
     Plugins = new PluginContainer();
     Plugins.LoadPlugins();
     lblPlugins.Text = Plugins.Plugins.Count + " Plugin" + (Plugins.Plugins.Count != 1 ? "s" : "") + " Loaded";
 }