private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var selectedName = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value.ToString();

            if (selectedName != "")
            {
                switch (_gridTypeEnumNow)
                {
                case ViewTypeEnum.JOB:
                    var selectedjob = _jobLogic.appoggio.FirstOrDefault(x => x.name == selectedName);
                    if (selectedjob != null)
                    {
                        var jd = new JobDetail(selectedjob, _jobLogic);
                        _refreshGrid = true;
                        jd.ShowDialog();
                    }

                    break;

                case ViewTypeEnum.TRIGGER:
                    var selectedtrigger = _triggerLogic.appoggio.FirstOrDefault(x => x.name == selectedName);
                    if (selectedtrigger != null)
                    {
                        var td = new TriggerDetail(selectedtrigger, Jobs, _triggerLogic);
                        _refreshGrid = true;
                        td.ShowDialog();
                    }

                    break;
                }
            }
        }
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            switch (_gridTypeEnumNow)
            {
            case ViewTypeEnum.JOB:
                var job = new JobDetail(null, _jobLogic);
                _refreshGrid = true;
                job.ShowDialog();
                break;

            case ViewTypeEnum.TRIGGER:
                var trig = new TriggerDetail(null, Jobs, _triggerLogic);
                _refreshGrid = true;
                trig.ShowDialog();
                break;
            }
        }