/// <summary></summary> /// <param name="Main"></param> public StatusView(Main Main) { InitializeComponent(); this.Main = Main; this.Refresh(); }
/// <summary> /// <para>Create a new instance of <see cref="TaskOptions"/></para> /// </summary> /// <param name="Main"></param> public TaskOptions(Main Main) { InitializeComponent(); this.Main = Main; // get plugins from Settings plugins = GetPluginsAll(Main); // show them in the DataGridView pluginBinding = new BindingSource(); pluginBinding.DataSource = plugins; this.dgvPlugins.DataSource = pluginBinding; }
/// <summary> /// <para>Creates a <see cref="ObservableDictionary<string, bool>"/> that contains all available <see cref="TaskPlugin"/>s and loads their values from the settings</para> /// </summary> /// <param name="Main"></param> /// <returns></returns> public static ObservableDictionary<string, bool> GetPluginsAll(Main Main) { ObservableDictionary<string, bool> setting = GetPluginsSetting(); ObservableDictionary<string, bool> plugins = new ObservableDictionary<string, bool>(); foreach (Type task in Main.TaskMgr.TaskPluginsAvailable) { string name = task.Name; bool enabled = true; if (setting.ContainsKey(name)) enabled = setting[name]; plugins.Add(name, enabled); } return plugins; }
/// <summary></summary> /// <param name="Main"></param> public Log(Main Main) { InitializeComponent(); this.Main = Main; }