示例#1
0
        private void fillData()
        {
            busy = true;

            dgRules.Columns.Clear();
            dgRules.Columns[dgRules.Columns.Add("rulesCol", "Rules")].ReadOnly = true;

            var needNames = new Dictionary <Visualizers.Types, string>()
            {
                { Visualizers.Code_swarm, @"C:\actions.xml" },
                { Visualizers.Gource, @"C:\actions.log" },
                { Visualizers.Logstalgia, @"C:\actlogs.log" },
                { Visualizers.Gephi, @"C:\gephidata.db" }
            };

            foreach (var key in rules.Keys)
            {
                var name = Visualizers.GetName(key);
                dgRules.Columns.Add(name + "Col", name);

                var control = new OutFilePanel()
                {
                    Title    = name,
                    FileName = needNames[key],
                    Checked  = true,
                    Dock     = DockStyle.Top,
                    Tag      = key
                };
                control.CheckedChanged += new System.EventHandler(cb_CheckedChanged);
                groupBox1.Controls.Add(control);
            }

            foreach (var item in rulesName)
            {
                item.Row = dgRules.Rows.Add(item.Name, "none", "none");
            }

            foreach (var item in rules)
            {
                foreach (var rule in rulesName)
                {
                    if (item.Value.Keys.Contains(rule.Rule))
                    {
                        dgRules[item.Key.ToString() + "Col", rule.Row].Value = item.Value[rule.Rule];
                    }
                }
            }

            busy = false;
        }
示例#2
0
        private void fillData()
        {
            busy = true;

            dgRules.Columns.Clear();
            dgRules.Columns[dgRules.Columns.Add("rulesCol", "Rules")].ReadOnly = true;

            var needNames = new Dictionary<Visualizers.Types, string>() {
                {Visualizers.Code_swarm, @"C:\actions.xml"},
                {Visualizers.Gource, @"C:\actions.log"},
                {Visualizers.Logstalgia, @"C:\actlogs.log"},
                {Visualizers.Gephi, @"C:\gephidata.db"}
            };

            foreach (var key in rules.Keys) {
                var name = Visualizers.GetName(key);
                dgRules.Columns.Add(name + "Col", name);

                var control = new OutFilePanel() {
                    Title = name,
                    FileName = needNames[key],
                    Checked = true,
                    Dock = DockStyle.Top,
                    Tag = key
                };
                control.CheckedChanged += new System.EventHandler(cb_CheckedChanged);
                groupBox1.Controls.Add(control);
            }

            foreach (var item in rulesName) {
                item.Row = dgRules.Rows.Add(item.Name, "none", "none");
            }

            foreach (var item in rules) {
                foreach (var rule in rulesName) {
                    if (item.Value.Keys.Contains(rule.Rule))
                        dgRules[item.Key.ToString() + "Col", rule.Row].Value = item.Value[rule.Rule];
                }
            }

            busy = false;
        }