Beispiel #1
0
        private void btnSaveAdjList_Click(object sender, EventArgs e)
        {
            var window = new StoredGraphNameForm();

            window.Owner = this;
            window.ShowDialog();
            if (window.Ok)
            {
                CommandEntered?.Invoke(this, new AddCurrentGraphInStoredGraphsCommandArgs(window.ListName));
            }
        }
Beispiel #2
0
        private void btnUnion_Click(object sender, EventArgs e)
        {
            int count;

            if ((count = listBoxAdjList.SelectedItems.Count) == 0)
            {
                return;
            }
            string[] names = new string[count];
            int      i     = 0;

            foreach (var elem in listBoxAdjList.SelectedItems)
            {
                names[i++] = (string)elem;
            }
            var window = new StoredGraphNameForm();

            window.Owner = this;
            window.ShowDialog();
            if (window.Ok)
            {
                CommandEntered?.Invoke(this, new GraphUnionCommandArgs(names, window.ListName));
            }
        }