Beispiel #1
0
        private void UpdateConnectionFilter()
        {
            CurrentFilterValues.ConnectionMask = new HashSet <int>();

            for (int i = 0; i < ConnectionListBox.Items.Count; i++)
            {
                if (ConnectionListBox.GetItemChecked(i))
                {
                    CurrentFilterValues.ConnectionMask.Add(i);
                }
            }
        }
        public void ParseStreamForListViews()
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new Action(() => ParseStreamForListViews()));
                return;
            }

            StreamParser.ParseStreamIntoListView(CurrentNetworkStream, CurrentNetworkStream.ActorNameToSummary, ActorListView);
            StreamParser.ParseStreamIntoListView(CurrentNetworkStream, CurrentNetworkStream.PropertyNameToSummary, PropertyListView);
            StreamParser.ParseStreamIntoListView(CurrentNetworkStream, CurrentNetworkStream.RPCNameToSummary, RPCListView);
            StreamParser.ParseStreamIntoReplicationListView(CurrentNetworkStream, CurrentNetworkStream.ObjectNameToReplicationSummary, ObjectReplicationListView);

            ActorFilterBox.Items.Clear();
            ActorFilterBox.Items.Add("");

            PropertyFilterBox.Items.Clear();
            PropertyFilterBox.Items.Add("");

            RPCFilterBox.Items.Clear();
            RPCFilterBox.Items.Add("");

            foreach (var SummaryEntry in CurrentNetworkStream.ActorNameToSummary)
            {
                ActorFilterBox.Items.Add(CurrentNetworkStream.GetName(SummaryEntry.Key));
            }

            foreach (var SummaryEntry in CurrentNetworkStream.PropertyNameToSummary)
            {
                PropertyFilterBox.Items.Add(CurrentNetworkStream.GetName(SummaryEntry.Key));
            }

            foreach (var SummaryEntry in CurrentNetworkStream.RPCNameToSummary)
            {
                RPCFilterBox.Items.Add(CurrentNetworkStream.GetName(SummaryEntry.Key));
            }

            ConnectionListBox.Items.Clear();

            int NumberOfAddresses = (CurrentNetworkStream.GetVersion() < 12) ?
                                    CurrentNetworkStream.AddressArray.Count : CurrentNetworkStream.StringAddressArray.Count;

            for (int i = 0; i < NumberOfAddresses; i++)
            {
                ConnectionListBox.Items.Add(CurrentNetworkStream.GetIpString(i, CurrentNetworkStream.GetVersion()));
            }


            for (int i = 0; i < ConnectionListBox.Items.Count; ++i)
            {
                ConnectionListBox.SetItemChecked(i, true);
            }
        }
Beispiel #3
0
        private void CheckAllConnectionsCheckBox_Click(object sender, System.EventArgs e)
        {
            bool bAreAllUnchecked = true;

            for (int i = 0; i < ConnectionListBox.Items.Count; i++)
            {
                if (ConnectionListBox.GetItemChecked(i) == false)
                {
                    bAreAllUnchecked = false;
                    break;
                }
            }

            for (int i = 0; i < ConnectionListBox.Items.Count; i++)
            {
                ConnectionListBox.SetItemChecked(i, !bAreAllUnchecked);
            }

            checkAllConnectionsCheckBox.Checked = !bAreAllUnchecked;
        }