Example #1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //ADD New Track
            List <String> ids;
            List <String> names;

            AllObjectIDs(out ids, out names);
            SelectObjectDialog dlg = new SelectObjectDialog();

            dlg.Owner = this;
            dlg.SetList(ids, names, _mostRecentlyClickedObject);
            if (dlg.ShowDialog().Value == false)
            {
                return;
            }
            if (IsBeingTracked(dlg.SelectedID))
            {
                MessageBox.Show(this, "That asset is already being tracked");
                return;
            }
            if (MaxTracks <= Objects.Count)
            {
                MessageBox.Show(this, String.Format("Adding this track would exceed your maximum number of tracks ({0}); Try removing a Track before adding a new track.", MaxTracks));
                return;
            }
            DDDObj d = GetFromAllObjects(dlg.SelectedID);

            Objects.Add(d);

            AddAlert("A new object (" + d.ID + ") was added", Urgency.NONE);
            SendTrackAddedEvent(MyDM, d.ID);
        }
Example #2
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //ADD New Track
            List<String> ids;
            List<String> names;
            AllObjectIDs(out ids, out names);
            SelectObjectDialog dlg = new SelectObjectDialog();
            dlg.Owner = this;
            dlg.SetList(ids, names, _mostRecentlyClickedObject);
            if (dlg.ShowDialog().Value == false)
            {
                return;
            }
            if (IsBeingTracked(dlg.SelectedID))
            {
                MessageBox.Show(this,"That asset is already being tracked");
                return;
            }
            if (MaxTracks <= Objects.Count)
            {
                MessageBox.Show(this,String.Format("Adding this track would exceed your maximum number of tracks ({0}); Try removing a Track before adding a new track.", MaxTracks));
                return;
            }
            DDDObj d = GetFromAllObjects(dlg.SelectedID);
            Objects.Add(d);

            AddAlert("A new object (" + d.ID + ") was added", Urgency.NONE);
            SendTrackAddedEvent(MyDM, d.ID);
        }