Exemple #1
0
        /// <summary>
        ///  Called when item in the lVUnits checked
        /// </summary>
        private void lVUnits_ItemChecked(object sender, ItemCheckedEventArgs e)
        {
            if (mIsUnitListUpdating)
            {
                return;
            }

            if (e.Item.Index >= UnitSet.Count)
            {
                return;
            }

            IUnit selectedUnit = UnitSet.GetUnits()[e.Item.Index];

            selectedUnit.IsIgnored = !e.Item.Checked;

            UpdateUnitList();
        }
Exemple #2
0
        protected override void Parse()
        {
            SetStatusMessage("Collecting frames...");
            ParseFrameList();

            SetStatusMessage("Searching for conversations...");
            ParseConversations();

            ParseFrames();

            SetStatusMessage("Searching for WS-Discovery messages");
            new WSDiscoveryParser(this).Parse();

            Progress = 95;

            SetStatusMessage("Obtaining device information");
            foreach (Unit unit in UnitSet.GetUnits(NetworkTrace))
            {
                UnitAnalyzer.ParseUnitInfo(unit);
            }

            SetStatusMessage("Serializing Frame List");
            SaveFrameList();
        }
Exemple #3
0
        private void UpdateUnitList()
        {
            if (!IsHandleCreated)
            {
                return;
            }

            mIsUnitListUpdating = true;

            this.InvokeIfRequired((() =>
            {
                lVUnits.Items.Clear();

                foreach (Unit unit in UnitSet.GetUnits())
                {
                    var item = new ListViewItem();
                    item.SubItems.Add((lVUnits.Items.Count + 1).ToString(CultureInfo.InvariantCulture));

                    item.SubItems.Add(unit.Name);
                    item.SubItems.Add(unit.Mac);
                    item.SubItems.Add(unit.Ip);
                    item.SubItems.Add(GetFeatureListString(unit));
                    item.SubItems.Add(unit.Type.GetDescription());

                    item.Checked = !unit.IsIgnored;
                    item.ToolTipText = TooltipHelper.CreateDeviceTooltip(unit as Device);

                    bool isChecked = item.Checked;
                    item.ForeColor = isChecked ? Settings.Default.CheckedUnitColor : Settings.Default.UnitColor;

                    lVUnits.Items.Add(item);
                }
            }));

            mIsUnitListUpdating = false;
        }
Exemple #4
0
        private String GetUndefinedName()
        {
            int count = UnitSet.GetUnits().Count + 1;

            return(String.Join(" ", TAG_UNDEFINED, count));
        }