Example #1
0
        private void PluginManager_Load(object sender, EventArgs e)
        {
            IEnumerator enumerator1 = (IEnumerator)null;

            this.lstLoaded.Items.Clear();
            this.lstAvailable.Items.Clear();
            if (this.OrderList != null)
            {
                foreach (PluginInfo order in this.OrderList)
                {
                    IEnumerator enumerator2 = (IEnumerator)null;
                    bool        flag        = false;
                    try
                    {
                        foreach (object availablePlugin in this.AvailablePlugins)
                        {
                            if (((BasePlugin)RuntimeHelpers.GetObjectValue(availablePlugin)).GetPluginInfo().Equals(order))
                            {
                                flag = true;
                            }
                        }
                    }
                    finally
                    {
                        if (enumerator2 is IDisposable)
                        {
                            (enumerator2 as IDisposable).Dispose();
                        }
                    }
                    if (flag)
                    {
                        this.lstLoaded.Items.Add((object)order);
                    }
                }
            }
            try
            {
                foreach (object availablePlugin in this.AvailablePlugins)
                {
                    BasePlugin objectValue = (BasePlugin)RuntimeHelpers.GetObjectValue(availablePlugin);
                    if (!objectValue.IsLoaded)
                    {
                        this.lstAvailable.Items.Add((object)objectValue.GetPluginInfo());
                    }
                }
            }
            finally
            {
                if (enumerator1 is IDisposable)
                {
                    (enumerator1 as IDisposable).Dispose();
                }
            }
        }