Exemple #1
0
        public void LoadConfiguration(DataTable dt)
        {
            LoadGeneratedEventItems(dt);

            string address = "/GeneratedData/SnapShotData/";

            string   filter = "address LIKE '" + address + "*'";
            DataView dv     = dt.AsDataView();

            dv.RowFilter = filter;
            DataTable temp_dt = dv.ToTable();

            temp_dt.PrimaryKey = new DataColumn[] { temp_dt.Columns["address"] };

            SnapshotItems.Clear();

            foreach (DataRow row in temp_dt.Rows)
            {
                var snapshot = new Snapshot();
                snapshot.Name = DataTable_Functions.TrakHound.GetRowAttribute("name", row);

                string type = DataTable_Functions.TrakHound.GetLastNode(row);
                if (type != null)
                {
                    switch (type.ToLower())
                    {
                    case "collected": snapshot.Type = SnapshotType.Collected; break;

                    case "generated": snapshot.Type = SnapshotType.Generated; break;

                    case "variable": snapshot.Type = SnapshotType.Variable; break;
                    }
                }

                snapshot.Link = DataTable_Functions.TrakHound.GetRowAttribute("link", row);

                var item = new Controls.SnapshotItem(this, snapshot);
                item.SettingChanged += Snapshot_SettingChanged;
                item.RemoveClicked  += Snapshot_RemoveClicked;
                SnapshotItems.Add(item);
            }

            if (!Loaded)
            {
                LoadCollectedItems(probeData);
            }
        }
Exemple #2
0
 public void Start()
 {
     SnapshotItems.Clear();
     SnapshotSize = 0;
 }