Exemple #1
0
        private void variablesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var listDescriptor = new SimpleListDescriptor
            {
                WindowTitle          = "Variables",
                PrimaryColumnTitle   = "Variable",
                SecondaryColumnTitle = "Usage (job name)"
            };

            listDescriptor.AddRange(
                from variable
                in Variables.All
                let jobs = Jobs.GetVariableUsage(variable)
                           select new SimpleListItem(
                    $"\"{variable.Name}\"=\"{variable.Value}\"",
                    jobs.Names,
                    $"[{variable.Name}]"
                    )
                );
            SimpleListDialog.ShowListDialog(
                this,
                listDescriptor,
                Config.IsAdministrator ? (Action <SimpleListDescriptor>)AddVariable : null
                );
        }
Exemple #2
0
        private void lblVariables_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var listDescriptor = new SimpleListDescriptor
            {
                WindowTitle          = "Variables",
                PrimaryColumnTitle   = "Variable",
                SecondaryColumnTitle = "Usage (job name)"
            };

            listDescriptor.AddRange(
                from variable
                in Variables.All
                let jobs = Jobs.GetVariableUsage(variable)
                           select new SimpleListItem(
                    $"\"{variable.Name}\"=\"{variable.Value}\"",
                    jobs.Names,
                    $"[{variable.Name}]"
                    )
                );
            SimpleListDialog.ShowListDialog(this, listDescriptor, null);
        }
Exemple #3
0
        private void jobsToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            var listDescriptor = new SimpleListDescriptor
            {
                WindowTitle          = "Jobs",
                PrimaryColumnTitle   = "Job",
                SecondaryColumnTitle = "Variables"
            };

            listDescriptor.AddRange(
                from job
                in Jobs.All
                let variables = Variables.GetVariables(job)
                                select new SimpleListItem(
                    job.Name,
                    variables.GetVariableNames(job),
                    job.Name
                    )
                );
            SimpleListDialog.ShowListDialog(this, listDescriptor, null);
        }