예제 #1
0
        private void deleteToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            if (dgTriggerEvents.MultiSelect == true)
            {
                throw new NotImplementedException("Editing mutliple triggers at once is unsupported.");
            }
            VI_Trigger selected_trigger = null;

            foreach (DataGridViewRow row in this.dgTriggers.SelectedRows)
            {
                selected_trigger = row.DataBoundItem as VI_Trigger;
            }
            if (selected_trigger != null)
            {
                foreach (DataGridViewRow row in this.dgTriggerEvents.SelectedRows)
                {
                    VI_TriggerEvent selected_event = row.DataBoundItem as VI_TriggerEvent;
                    if (selected_event != null)
                    {
                        //Remove Event
                        selected_trigger.Remove(selected_event);
                    }
                }
            }

            ProfileEdited();

            refresh_dgTriggers();
            refresh_dgTriggerEvents();
        }
예제 #2
0
        public frmAddtoTriggerEvent(VI_TriggerEvent event_to_add)
        {
            InitializeComponent();
            MaximizeBox = false;

            this.event_to_add = event_to_add;

            cbAddtoTriggerEvent.DataSource    = GAVPI.vi_profile.Profile_Triggers.ToArray();
            cbAddtoTriggerEvent.DisplayMember = "name";
        }
예제 #3
0
        public frm_Add_to_TriggerEvent( VI_TriggerEvent event_to_add )
        {
            InitializeComponent();
            MaximizeBox = false;

            this.event_to_add = event_to_add;

            cbAddtoTriggerEvent.DataSource = GAVPI.vi_profile.Profile_Triggers.ToArray();
            cbAddtoTriggerEvent.DisplayMember = "name";
            
        }
예제 #4
0
        // Add Trigger to TriggerEvent
        private void addtoeventToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (dgTriggers.MultiSelect == true)
            {
                throw new NotImplementedException("Adding multiple triggers at once is unsupported.");
            }
            foreach (DataGridViewRow row in this.dgTriggers.SelectedRows)
            {
                // In this case it is a Trigger -> Trigger addition
                VI_TriggerEvent         event_to_add         = row.DataBoundItem as VI_TriggerEvent;
                frm_Add_to_TriggerEvent newAddtoTriggerEvent = new frm_Add_to_TriggerEvent(event_to_add);

                if (newAddtoTriggerEvent.ShowDialog() == DialogResult.OK)
                {
                    ProfileEdited();
                }
            }
            refresh_dgTriggerEvents();
        }
예제 #5
0
파일: VI_Trigger.cs 프로젝트: ALyman/AVPI
 public bool Remove(VI_TriggerEvent tevent)
 {
     return(TriggerEvents.Remove(tevent));
 }
예제 #6
0
파일: VI_Trigger.cs 프로젝트: ALyman/AVPI
 public void Add(VI_TriggerEvent tevent)
 {
     TriggerEvents.Add(tevent);
 }
예제 #7
0
 public bool Remove(VI_TriggerEvent tevent)
 {
     return TriggerEvents.Remove(tevent);
 }
예제 #8
0
 public void Add(VI_TriggerEvent tevent)
 {
     TriggerEvents.Add(tevent);
 }