diff --git a/ClickForensics.Quartz.Manager/AddJobForm.cs b/ClickForensics.Quartz.Manager/AddJobForm.cs index ff52468..e0a7b54 100644 --- a/ClickForensics.Quartz.Manager/AddJobForm.cs +++ b/ClickForensics.Quartz.Manager/AddJobForm.cs @@ -1,176 +1,174 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using Quartz; -using System.Reflection; -using Quartz.Job; -using System.IO; - -namespace ClickForensics.Quartz.Manager -{ - public partial class AddJobForm : Form - { - public AddJobForm() - { - InitializeComponent(); - loadJobAssemblies(); - cboTriggerType.Items.Add("Cron"); - cboTriggerType.SelectedItem = "Cron"; - if (cboJobType.SelectedText == "NativeJob") - { - jobDataListView.Items.Add(new ListViewItem(new string[] { "consumeStreams", "true" })); - jobDataListView.Items.Add(new ListViewItem(new string[] { "waitForProcess", "true" })); - txtKey.Text = "command"; - } - } - private void loadJobAssemblies() - { - FileStream stream = File.OpenRead("JobAssemblies.txt"); - StreamReader reader = new StreamReader(stream); - string line; - SortedList jobTypes = new SortedList(); - while ((line = reader.ReadLine()) != null) - { - Assembly assembly = Assembly.LoadFile(Environment.CurrentDirectory + "\\" + line); - foreach (Type type in assembly.GetTypes()) - { - if (typeof(IJob).IsAssignableFrom(type) && type.IsClass) - { - jobTypes.Add(type.FullName, assembly.GetName().Name); - } - } - } - foreach (var item in jobTypes) - { - cboJobType.Items.Add(new JobType() { AssemblyName = item.Value, FullName = item.Key }); - } - //cboJobType.Items.AddRange(jobTypes.Values.ToArray()); - - } - - public AddJobForm(TriggerNode node) - : this() - { - setTriggerData((CronTrigger)node.Trigger); - setJobData(((JobNode)node.Parent.Parent).Detail); - } - - private void setTriggerData(CronTrigger trigger) - { - setTriggerType(); - txtCronExpression.Text = trigger.CronExpressionString; - txtTriggerDescription.Text = trigger.Description; - txtTriggerGroup.Text = trigger.Group; - txtTriggerName.Text = trigger.Name; - } - - private void setJobData(JobDetail detail) - { - setJobType(detail); - txtJobDescription.Text = detail.Description; - txtJobGroup.Text = detail.Group; - txtJobName.Text = detail.Name; - setJobDataMap(detail); - } - - private void setJobDataMap(JobDetail detail) - { - jobDataListView.Items.Clear(); - foreach (var item in detail.JobDataMap.GetKeys()) - { - jobDataListView.Items.Add(new ListViewItem(new string[] { item, detail.JobDataMap.Get(item).ToString() })); - } - } - - private void setJobType(JobDetail detail) - { - cboJobType.SelectedItem = detail.JobType.FullName; - - } - - private void setTriggerType() - { - //nothing to do right now - } - public JobDetail JobDetail { get; set; } - public Trigger Trigger { get; set; } - private void btnCancel_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void btnAdd_Click(object sender, EventArgs e) - { - JobDetail = getJobDetail(); - Trigger = getTrigger(); - Trigger.JobGroup = JobDetail.Group; - Trigger.JobName = JobDetail.Name; - this.Close(); - } - - private JobDetail getJobDetail() - { - JobDetail detail = new JobDetail(); - detail.Description = txtJobDescription.Text; - detail.Group = txtJobGroup.Text; - detail.JobDataMap = getJobDataMap(); - detail.JobType = getJobType(); - detail.Name = txtJobName.Text; - return detail; - } - - private Trigger getTrigger() - { - Trigger trigger; - if (cboTriggerType.SelectedText == "Simple") - { - trigger = new SimpleTrigger(); - } - else - { - trigger = new CronTrigger(); - ((CronTrigger)trigger).CronExpressionString = txtCronExpression.Text; - } - trigger.Description = txtTriggerDescription.Text; - trigger.Group = txtTriggerGroup.Text; - trigger.Name = txtTriggerName.Text; - return trigger; - } - - private Type getJobType() - { - JobType type = (JobType)cboJobType.SelectedItem; - return Type.GetType(type.FullName + "," + type.AssemblyName, true); - } - - private JobDataMap getJobDataMap() - { - JobDataMap map = new JobDataMap(); - foreach (ListViewItem item in jobDataListView.Items) - { - map.Add(item.SubItems[0].Text, item.SubItems[1].Text); - } - - return map; - } - - private void btnAddKeyValue_Click(object sender, EventArgs e) - { - ListViewItem item = new ListViewItem(new string[] { txtKey.Text, txtValue.Text }); - jobDataListView.Items.Add(item); - } - - private void btnDelete_Click(object sender, EventArgs e) - { - foreach (ListViewItem item in jobDataListView.SelectedItems) - { - jobDataListView.Items.Remove(item); - } - } - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using Quartz; +using System.Reflection; +using Quartz.Job; +using System.IO; + +namespace ClickForensics.Quartz.Manager +{ + public partial class AddJobForm : Form + { + public AddJobForm() + { + InitializeComponent(); + loadJobAssemblies(); + cboTriggerType.Items.Add("Cron"); + cboTriggerType.SelectedItem = "Cron"; + if (cboJobType.SelectedText == "NativeJob") + { + jobDataListView.Items.Add(new ListViewItem(new string[] { "consumeStreams", "true" })); + jobDataListView.Items.Add(new ListViewItem(new string[] { "waitForProcess", "true" })); + txtKey.Text = "command"; + } + } + private void loadJobAssemblies() + { + var assemblies = AssemblyRepository.GetAssemblies(); + SortedList jobTypes = new SortedList(); + foreach (var assemblyName in assemblies) + { + Assembly assembly = Assembly.LoadFile(Environment.CurrentDirectory + "\\" + assemblyName); + foreach (Type type in assembly.GetTypes()) + { + if (typeof(IJob).IsAssignableFrom(type) && type.IsClass) + { + jobTypes.Add(type.FullName, assembly.GetName().Name); + } + } + } + foreach (var item in jobTypes) + { + cboJobType.Items.Add(new JobType() { AssemblyName = item.Value, FullName = item.Key }); + } + //cboJobType.Items.AddRange(jobTypes.Values.ToArray()); + + } + + public AddJobForm(TriggerNode node) + : this() + { + setTriggerData((CronTrigger)node.Trigger); + setJobData(((JobNode)node.Parent.Parent).Detail); + } + + private void setTriggerData(CronTrigger trigger) + { + setTriggerType(); + txtCronExpression.Text = trigger.CronExpressionString; + txtTriggerDescription.Text = trigger.Description; + txtTriggerGroup.Text = trigger.Group; + txtTriggerName.Text = trigger.Name; + } + + private void setJobData(JobDetail detail) + { + setJobType(detail); + txtJobDescription.Text = detail.Description; + txtJobGroup.Text = detail.Group; + txtJobName.Text = detail.Name; + setJobDataMap(detail); + } + + private void setJobDataMap(JobDetail detail) + { + jobDataListView.Items.Clear(); + foreach (var item in detail.JobDataMap.GetKeys()) + { + jobDataListView.Items.Add(new ListViewItem(new string[] { item, detail.JobDataMap.Get(item).ToString() })); + } + } + + private void setJobType(JobDetail detail) + { + cboJobType.SelectedItem = detail.JobType.FullName; + + } + + private void setTriggerType() + { + //nothing to do right now + } + public JobDetail JobDetail { get; set; } + public Trigger Trigger { get; set; } + private void btnCancel_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void btnAdd_Click(object sender, EventArgs e) + { + JobDetail = getJobDetail(); + Trigger = getTrigger(); + Trigger.JobGroup = JobDetail.Group; + Trigger.JobName = JobDetail.Name; + this.Close(); + } + + private JobDetail getJobDetail() + { + JobDetail detail = new JobDetail(); + detail.Description = txtJobDescription.Text; + detail.Group = txtJobGroup.Text; + detail.JobDataMap = getJobDataMap(); + detail.JobType = getJobType(); + detail.Name = txtJobName.Text; + return detail; + } + + private Trigger getTrigger() + { + Trigger trigger; + if (cboTriggerType.SelectedText == "Simple") + { + trigger = new SimpleTrigger(); + } + else + { + trigger = new CronTrigger(); + ((CronTrigger)trigger).CronExpressionString = txtCronExpression.Text; + } + trigger.Description = txtTriggerDescription.Text; + trigger.Group = txtTriggerGroup.Text; + trigger.Name = txtTriggerName.Text; + return trigger; + } + + private Type getJobType() + { + JobType type = (JobType)cboJobType.SelectedItem; + return Type.GetType(type.FullName + "," + type.AssemblyName, true); + } + + private JobDataMap getJobDataMap() + { + JobDataMap map = new JobDataMap(); + foreach (ListViewItem item in jobDataListView.Items) + { + map.Add(item.SubItems[0].Text, item.SubItems[1].Text); + } + + return map; + } + + private void btnAddKeyValue_Click(object sender, EventArgs e) + { + ListViewItem item = new ListViewItem(new string[] { txtKey.Text, txtValue.Text }); + jobDataListView.Items.Add(item); + } + + private void btnDelete_Click(object sender, EventArgs e) + { + foreach (ListViewItem item in jobDataListView.SelectedItems) + { + jobDataListView.Items.Remove(item); + } + } + } +} diff --git a/ClickForensics.Quartz.Manager/AssemblyRepository.cs b/ClickForensics.Quartz.Manager/AssemblyRepository.cs new file mode 100644 index 0000000..4af88e9 --- /dev/null +++ b/ClickForensics.Quartz.Manager/AssemblyRepository.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace ClickForensics.Quartz.Manager +{ + public class AssemblyRepository + { + public static void AddAssembly(string assembly) + { + var assemblies = GetAssemblies(); + assemblies.Add(assembly); + using (StreamWriter stream = File.CreateText("JobAssemblies.txt")) + { + foreach (var assemblyName in assemblies) + { + stream.WriteLine(assemblyName); + } + } + } + + public static HashSet GetAssemblies() + { + HashSet assemblies = new HashSet(); + using (FileStream stream = File.OpenRead("JobAssemblies.txt")) + { + using (StreamReader reader = new StreamReader(stream)) + { + string line; + while ((line = reader.ReadLine()) != null) + { + assemblies.Add(line); + } + } + } + + return assemblies; + } + + public static void DeleteAssembly(string assembly) + { + var assemblies = GetAssemblies(); + assemblies.Remove(assembly); + using (StreamWriter stream = File.CreateText("JobAssemblies.txt")) + { + foreach (var assemblyName in assemblies) + { + stream.WriteLine(assemblyName); + } + } + } + } +} diff --git a/ClickForensics.Quartz.Manager/ClickForensics.Quartz.Manager.csproj b/ClickForensics.Quartz.Manager/ClickForensics.Quartz.Manager.csproj index ef624bd..ef8eb74 100644 --- a/ClickForensics.Quartz.Manager/ClickForensics.Quartz.Manager.csproj +++ b/ClickForensics.Quartz.Manager/ClickForensics.Quartz.Manager.csproj @@ -87,7 +87,14 @@ AddListenerForm.cs + + + Form + + + DeleteAssembliesForm.cs + UserControl @@ -122,6 +129,9 @@ AddListenerForm.cs + + DeleteAssembliesForm.cs + SimpleTriggerDisplay.cs diff --git a/ClickForensics.Quartz.Manager/DeleteAssembliesForm.Designer.cs b/ClickForensics.Quartz.Manager/DeleteAssembliesForm.Designer.cs new file mode 100644 index 0000000..56e07a0 --- /dev/null +++ b/ClickForensics.Quartz.Manager/DeleteAssembliesForm.Designer.cs @@ -0,0 +1,72 @@ +namespace ClickForensics.Quartz.Manager +{ + partial class DeleteAssembliesForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbxAssemblies = new System.Windows.Forms.ListBox(); + this.btnDelete = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // lbxAssemblies + // + this.lbxAssemblies.FormattingEnabled = true; + this.lbxAssemblies.Location = new System.Drawing.Point(42, 25); + this.lbxAssemblies.Name = "lbxAssemblies"; + this.lbxAssemblies.Size = new System.Drawing.Size(162, 212); + this.lbxAssemblies.TabIndex = 0; + // + // btnDelete + // + this.btnDelete.Location = new System.Drawing.Point(80, 243); + this.btnDelete.Name = "btnDelete"; + this.btnDelete.Size = new System.Drawing.Size(75, 23); + this.btnDelete.TabIndex = 1; + this.btnDelete.Text = "Delete"; + this.btnDelete.UseVisualStyleBackColor = true; + this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); + // + // DeleteAssembliesForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(247, 291); + this.Controls.Add(this.btnDelete); + this.Controls.Add(this.lbxAssemblies); + this.Name = "DeleteAssembliesForm"; + this.Text = "DeleteAssembliesForm"; + this.Load += new System.EventHandler(this.DeleteAssembliesForm_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListBox lbxAssemblies; + private System.Windows.Forms.Button btnDelete; + } +} \ No newline at end of file diff --git a/ClickForensics.Quartz.Manager/DeleteAssembliesForm.cs b/ClickForensics.Quartz.Manager/DeleteAssembliesForm.cs new file mode 100644 index 0000000..6e7d730 --- /dev/null +++ b/ClickForensics.Quartz.Manager/DeleteAssembliesForm.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace ClickForensics.Quartz.Manager +{ + public partial class DeleteAssembliesForm : Form + { + public DeleteAssembliesForm() + { + InitializeComponent(); + } + + private void btnDelete_Click(object sender, EventArgs e) + { + if (lbxAssemblies.SelectedItem != null) + { + AssemblyRepository.DeleteAssembly(lbxAssemblies.SelectedItem as string); + lbxAssemblies.DataSource = AssemblyRepository.GetAssemblies().ToList(); + } + } + + private void DeleteAssembliesForm_Load(object sender, EventArgs e) + { + lbxAssemblies.DataSource = AssemblyRepository.GetAssemblies().ToList(); + } + } +} diff --git a/ClickForensics.Quartz.Manager/DeleteAssembliesForm.resx b/ClickForensics.Quartz.Manager/DeleteAssembliesForm.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/ClickForensics.Quartz.Manager/DeleteAssembliesForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ClickForensics.Quartz.Manager/MainForm.Designer.cs b/ClickForensics.Quartz.Manager/MainForm.Designer.cs index 041d217..530f165 100644 --- a/ClickForensics.Quartz.Manager/MainForm.Designer.cs +++ b/ClickForensics.Quartz.Manager/MainForm.Designer.cs @@ -1,399 +1,429 @@ -namespace ClickForensics.Quartz.Manager -{ - partial class MainForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.mainMenuStrip = new System.Windows.Forms.MenuStrip(); - this.schedulerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.connectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.jobsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addJobToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.listenersStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.globalListenersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addGlobalJobListenerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addTriggerListenerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addJobListenerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.statusStrip1 = new System.Windows.Forms.StatusStrip(); - this.serverConnectStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.StripStatusLabel_Job_Groups = new System.Windows.Forms.ToolStripStatusLabel(); - this.StripStatusLabel_Jobs_Refresh_date = new System.Windows.Forms.ToolStripStatusLabel(); - this.jobGroupsTreeView = new System.Windows.Forms.TreeView(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.btnRefreshRunningJobs = new System.Windows.Forms.Button(); - this.btnRefreshJobGroups = new System.Windows.Forms.Button(); - this.btnDeleteJob = new System.Windows.Forms.Button(); - this.btnRunJobNow = new System.Windows.Forms.Button(); - this.btnPause = new System.Windows.Forms.Button(); - this.pnlDetails = new System.Windows.Forms.Panel(); - this.label3 = new System.Windows.Forms.Label(); - this.btnEdit = new System.Windows.Forms.Button(); - this.ctxScheduler = new System.Windows.Forms.ContextMenuStrip(this.components); - this.backupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.timer_Refresh_Running_Jobs = new System.Windows.Forms.Timer(this.components); - this.listView_RunningJobs = new System.Windows.Forms.ListView(); - this.JobName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.JobDuration = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.mainMenuStrip.SuspendLayout(); - this.statusStrip1.SuspendLayout(); - this.ctxScheduler.SuspendLayout(); - this.SuspendLayout(); - // - // mainMenuStrip - // - this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.schedulerToolStripMenuItem, - this.jobsToolStripMenuItem, - this.listenersStripMenuItem}); - this.mainMenuStrip.Location = new System.Drawing.Point(0, 0); - this.mainMenuStrip.Name = "mainMenuStrip"; - this.mainMenuStrip.Size = new System.Drawing.Size(913, 24); - this.mainMenuStrip.TabIndex = 0; - this.mainMenuStrip.Text = "menuStrip1"; - // - // schedulerToolStripMenuItem - // - this.schedulerToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.connectToolStripMenuItem}); - this.schedulerToolStripMenuItem.Name = "schedulerToolStripMenuItem"; - this.schedulerToolStripMenuItem.Size = new System.Drawing.Size(71, 20); - this.schedulerToolStripMenuItem.Text = "Scheduler"; - // - // connectToolStripMenuItem - // - this.connectToolStripMenuItem.Name = "connectToolStripMenuItem"; - this.connectToolStripMenuItem.Size = new System.Drawing.Size(119, 22); - this.connectToolStripMenuItem.Text = "Connect"; - this.connectToolStripMenuItem.Click += new System.EventHandler(this.connectToolStripMenuItem_Click); - // - // jobsToolStripMenuItem - // - this.jobsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.addJobToolStripMenuItem}); - this.jobsToolStripMenuItem.Enabled = false; - this.jobsToolStripMenuItem.Name = "jobsToolStripMenuItem"; - this.jobsToolStripMenuItem.Size = new System.Drawing.Size(42, 20); - this.jobsToolStripMenuItem.Text = "Jobs"; - // - // addJobToolStripMenuItem - // - this.addJobToolStripMenuItem.Name = "addJobToolStripMenuItem"; - this.addJobToolStripMenuItem.Size = new System.Drawing.Size(96, 22); - this.addJobToolStripMenuItem.Text = "Add"; - this.addJobToolStripMenuItem.Click += new System.EventHandler(this.addJobToolStripMenuItem_Click); - // - // listenersStripMenuItem - // - this.listenersStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.globalListenersToolStripMenuItem, - this.addJobListenerToolStripMenuItem}); - this.listenersStripMenuItem.Enabled = false; - this.listenersStripMenuItem.Name = "listenersStripMenuItem"; - this.listenersStripMenuItem.Size = new System.Drawing.Size(65, 20); - this.listenersStripMenuItem.Text = "Listeners"; - // - // globalListenersToolStripMenuItem - // - this.globalListenersToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.addGlobalJobListenerToolStripMenuItem, - this.addTriggerListenerToolStripMenuItem}); - this.globalListenersToolStripMenuItem.Name = "globalListenersToolStripMenuItem"; - this.globalListenersToolStripMenuItem.Size = new System.Drawing.Size(161, 22); - this.globalListenersToolStripMenuItem.Text = "Global"; - // - // addGlobalJobListenerToolStripMenuItem - // - this.addGlobalJobListenerToolStripMenuItem.Name = "addGlobalJobListenerToolStripMenuItem"; - this.addGlobalJobListenerToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.addGlobalJobListenerToolStripMenuItem.Text = "Add Job Listener"; - this.addGlobalJobListenerToolStripMenuItem.Click += new System.EventHandler(this.addGlobalListenerToolStripMenuItem_Click); - // - // addTriggerListenerToolStripMenuItem - // - this.addTriggerListenerToolStripMenuItem.Name = "addTriggerListenerToolStripMenuItem"; - this.addTriggerListenerToolStripMenuItem.Size = new System.Drawing.Size(181, 22); - this.addTriggerListenerToolStripMenuItem.Text = "Add Trigger Listener"; - // - // addJobListenerToolStripMenuItem - // - this.addJobListenerToolStripMenuItem.Name = "addJobListenerToolStripMenuItem"; - this.addJobListenerToolStripMenuItem.Size = new System.Drawing.Size(161, 22); - this.addJobListenerToolStripMenuItem.Text = "Add Job Listener"; - this.addJobListenerToolStripMenuItem.Click += new System.EventHandler(this.addJobListenerToolStripMenuItem_Click); - // - // statusStrip1 - // - this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.serverConnectStatusLabel, - this.StripStatusLabel_Job_Groups, - this.StripStatusLabel_Jobs_Refresh_date}); - this.statusStrip1.Location = new System.Drawing.Point(0, 639); - this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(913, 22); - this.statusStrip1.TabIndex = 1; - this.statusStrip1.Text = "statusStrip1"; - // - // serverConnectStatusLabel - // - this.serverConnectStatusLabel.Name = "serverConnectStatusLabel"; - this.serverConnectStatusLabel.Size = new System.Drawing.Size(86, 17); - this.serverConnectStatusLabel.Text = "Not connected"; - // - // StripStatusLabel_Job_Groups - // - this.StripStatusLabel_Job_Groups.BackColor = System.Drawing.Color.LightCyan; - this.StripStatusLabel_Job_Groups.Name = "StripStatusLabel_Job_Groups"; - this.StripStatusLabel_Job_Groups.Size = new System.Drawing.Size(157, 17); - this.StripStatusLabel_Job_Groups.Text = "StripStatusLabel_Job_Groups"; - this.StripStatusLabel_Job_Groups.ToolTipText = "Last Refresh of Job Groups"; - // - // StripStatusLabel_Jobs_Refresh_date - // - this.StripStatusLabel_Jobs_Refresh_date.BackColor = System.Drawing.SystemColors.ActiveCaptionText; - this.StripStatusLabel_Jobs_Refresh_date.Name = "StripStatusLabel_Jobs_Refresh_date"; - this.StripStatusLabel_Jobs_Refresh_date.Size = new System.Drawing.Size(191, 17); - this.StripStatusLabel_Jobs_Refresh_date.Text = "StripStatusLabel_Jobs_Refresh_date"; - this.StripStatusLabel_Jobs_Refresh_date.ToolTipText = "Last Refresh Date of Running Jobs"; - // - // jobGroupsTreeView - // - this.jobGroupsTreeView.HideSelection = false; - this.jobGroupsTreeView.Location = new System.Drawing.Point(8, 48); - this.jobGroupsTreeView.Name = "jobGroupsTreeView"; - this.jobGroupsTreeView.Size = new System.Drawing.Size(351, 252); - this.jobGroupsTreeView.TabIndex = 2; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(8, 32); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(94, 13); - this.label1.TabIndex = 4; - this.label1.Text = "Scheduler Objects"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(9, 319); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(72, 13); - this.label2.TabIndex = 5; - this.label2.Text = "Running Jobs"; - // - // btnRefreshRunningJobs - // - this.btnRefreshRunningJobs.Location = new System.Drawing.Point(371, 609); - this.btnRefreshRunningJobs.Name = "btnRefreshRunningJobs"; - this.btnRefreshRunningJobs.Size = new System.Drawing.Size(75, 23); - this.btnRefreshRunningJobs.TabIndex = 6; - this.btnRefreshRunningJobs.Text = "Refresh"; - this.btnRefreshRunningJobs.UseVisualStyleBackColor = true; - this.btnRefreshRunningJobs.Click += new System.EventHandler(this.btnRefreshRunningJobs_Click); - // - // btnRefreshJobGroups - // - this.btnRefreshJobGroups.Location = new System.Drawing.Point(284, 306); - this.btnRefreshJobGroups.Name = "btnRefreshJobGroups"; - this.btnRefreshJobGroups.Size = new System.Drawing.Size(75, 23); - this.btnRefreshJobGroups.TabIndex = 7; - this.btnRefreshJobGroups.Text = "Refresh"; - this.btnRefreshJobGroups.UseVisualStyleBackColor = true; - this.btnRefreshJobGroups.Click += new System.EventHandler(this.btnRefreshJobGroups_Click); - // - // btnDeleteJob - // - this.btnDeleteJob.Enabled = false; - this.btnDeleteJob.Location = new System.Drawing.Point(533, 306); - this.btnDeleteJob.Name = "btnDeleteJob"; - this.btnDeleteJob.Size = new System.Drawing.Size(65, 23); - this.btnDeleteJob.TabIndex = 8; - this.btnDeleteJob.Text = "Delete"; - this.btnDeleteJob.UseVisualStyleBackColor = true; - this.btnDeleteJob.Click += new System.EventHandler(this.btnDeleteJob_Click); - // - // btnRunJobNow - // - this.btnRunJobNow.Enabled = false; - this.btnRunJobNow.Location = new System.Drawing.Point(391, 306); - this.btnRunJobNow.Name = "btnRunJobNow"; - this.btnRunJobNow.Size = new System.Drawing.Size(65, 23); - this.btnRunJobNow.TabIndex = 9; - this.btnRunJobNow.Text = "Run"; - this.btnRunJobNow.UseVisualStyleBackColor = true; - this.btnRunJobNow.Click += new System.EventHandler(this.btnRunJobNow_Click); - // - // btnPause - // - this.btnPause.Enabled = false; - this.btnPause.Location = new System.Drawing.Point(462, 306); - this.btnPause.Name = "btnPause"; - this.btnPause.Size = new System.Drawing.Size(65, 23); - this.btnPause.TabIndex = 10; - this.btnPause.Text = "Pause"; - this.btnPause.UseVisualStyleBackColor = true; - this.btnPause.Click += new System.EventHandler(this.btnPause_Click); - // - // pnlDetails - // - this.pnlDetails.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pnlDetails.Location = new System.Drawing.Point(391, 45); - this.pnlDetails.Name = "pnlDetails"; - this.pnlDetails.Size = new System.Drawing.Size(342, 252); - this.pnlDetails.TabIndex = 11; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(388, 29); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(39, 13); - this.label3.TabIndex = 12; - this.label3.Text = "Details"; - // - // btnEdit - // - this.btnEdit.Enabled = false; - this.btnEdit.Location = new System.Drawing.Point(604, 306); - this.btnEdit.Name = "btnEdit"; - this.btnEdit.Size = new System.Drawing.Size(65, 23); - this.btnEdit.TabIndex = 13; - this.btnEdit.Text = "Edit"; - this.btnEdit.UseVisualStyleBackColor = true; - this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click); - // - // ctxScheduler - // - this.ctxScheduler.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.backupToolStripMenuItem}); - this.ctxScheduler.Name = "ctxScheduler"; - this.ctxScheduler.Size = new System.Drawing.Size(109, 26); - // - // backupToolStripMenuItem - // - this.backupToolStripMenuItem.Name = "backupToolStripMenuItem"; - this.backupToolStripMenuItem.Size = new System.Drawing.Size(108, 22); - this.backupToolStripMenuItem.Text = "Backup"; - this.backupToolStripMenuItem.Click += new System.EventHandler(this.backupToolStripMenuItem_Click); - // - // timer_Refresh_Running_Jobs - // - this.timer_Refresh_Running_Jobs.Interval = 30000; - this.timer_Refresh_Running_Jobs.Tick += new System.EventHandler(this.timer_Refresh_Running_Jobs_Tick); - // - // listView_RunningJobs - // - this.listView_RunningJobs.AllowColumnReorder = true; - this.listView_RunningJobs.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.JobName, - this.JobDuration}); - this.listView_RunningJobs.Location = new System.Drawing.Point(8, 335); - this.listView_RunningJobs.Name = "listView_RunningJobs"; - this.listView_RunningJobs.Size = new System.Drawing.Size(725, 268); - this.listView_RunningJobs.Sorting = System.Windows.Forms.SortOrder.Ascending; - this.listView_RunningJobs.TabIndex = 14; - this.listView_RunningJobs.UseCompatibleStateImageBehavior = false; - this.listView_RunningJobs.View = System.Windows.Forms.View.Details; - // - // JobName - // - this.JobName.Text = "Job Name"; - // - // JobDuration - // - this.JobDuration.Text = "Duration"; - // - // MainForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(913, 661); - this.Controls.Add(this.btnRefreshJobGroups); - this.Controls.Add(this.listView_RunningJobs); - this.Controls.Add(this.pnlDetails); - this.Controls.Add(this.label3); - this.Controls.Add(this.label1); - this.Controls.Add(this.btnEdit); - this.Controls.Add(this.btnRefreshRunningJobs); - this.Controls.Add(this.btnPause); - this.Controls.Add(this.label2); - this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.mainMenuStrip); - this.Controls.Add(this.btnRunJobNow); - this.Controls.Add(this.jobGroupsTreeView); - this.Controls.Add(this.btnDeleteJob); - this.MainMenuStrip = this.mainMenuStrip; - this.Name = "MainForm"; - this.Text = "Quartz Manager"; - this.mainMenuStrip.ResumeLayout(false); - this.mainMenuStrip.PerformLayout(); - this.statusStrip1.ResumeLayout(false); - this.statusStrip1.PerformLayout(); - this.ctxScheduler.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.MenuStrip mainMenuStrip; - private System.Windows.Forms.ToolStripMenuItem schedulerToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem connectToolStripMenuItem; - private System.Windows.Forms.StatusStrip statusStrip1; - private System.Windows.Forms.ToolStripStatusLabel serverConnectStatusLabel; - private System.Windows.Forms.TreeView jobGroupsTreeView; - private System.Windows.Forms.ToolStripMenuItem listenersStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem globalListenersToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem addGlobalJobListenerToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem addTriggerListenerToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem addJobListenerToolStripMenuItem; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.ToolStripMenuItem jobsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem addJobToolStripMenuItem; - private System.Windows.Forms.Button btnRefreshRunningJobs; - private System.Windows.Forms.Button btnRefreshJobGroups; - private System.Windows.Forms.Button btnDeleteJob; - private System.Windows.Forms.Button btnRunJobNow; - private System.Windows.Forms.Button btnPause; - private System.Windows.Forms.Panel pnlDetails; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button btnEdit; - private System.Windows.Forms.ContextMenuStrip ctxScheduler; - private System.Windows.Forms.ToolStripMenuItem backupToolStripMenuItem; - private System.Windows.Forms.Timer timer_Refresh_Running_Jobs; - private System.Windows.Forms.ToolStripStatusLabel StripStatusLabel_Jobs_Refresh_date; - private System.Windows.Forms.ToolStripStatusLabel StripStatusLabel_Job_Groups; - private System.Windows.Forms.ListView listView_RunningJobs; - private System.Windows.Forms.ColumnHeader JobName; - private System.Windows.Forms.ColumnHeader JobDuration; - } -} - +namespace ClickForensics.Quartz.Manager +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.mainMenuStrip = new System.Windows.Forms.MenuStrip(); + this.schedulerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.connectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.jobsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addJobToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.listenersStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.globalListenersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addGlobalJobListenerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addTriggerListenerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addJobListenerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.serverConnectStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.StripStatusLabel_Job_Groups = new System.Windows.Forms.ToolStripStatusLabel(); + this.StripStatusLabel_Jobs_Refresh_date = new System.Windows.Forms.ToolStripStatusLabel(); + this.jobGroupsTreeView = new System.Windows.Forms.TreeView(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.btnRefreshRunningJobs = new System.Windows.Forms.Button(); + this.btnRefreshJobGroups = new System.Windows.Forms.Button(); + this.btnDeleteJob = new System.Windows.Forms.Button(); + this.btnRunJobNow = new System.Windows.Forms.Button(); + this.btnPause = new System.Windows.Forms.Button(); + this.pnlDetails = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); + this.btnEdit = new System.Windows.Forms.Button(); + this.ctxScheduler = new System.Windows.Forms.ContextMenuStrip(this.components); + this.backupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.timer_Refresh_Running_Jobs = new System.Windows.Forms.Timer(this.components); + this.listView_RunningJobs = new System.Windows.Forms.ListView(); + this.JobName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.JobDuration = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.jobAssembliesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addAssemblyMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteAssemblyMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mainMenuStrip.SuspendLayout(); + this.statusStrip1.SuspendLayout(); + this.ctxScheduler.SuspendLayout(); + this.SuspendLayout(); + // + // mainMenuStrip + // + this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.schedulerToolStripMenuItem, + this.jobsToolStripMenuItem, + this.listenersStripMenuItem, + this.jobAssembliesToolStripMenuItem}); + this.mainMenuStrip.Location = new System.Drawing.Point(0, 0); + this.mainMenuStrip.Name = "mainMenuStrip"; + this.mainMenuStrip.Size = new System.Drawing.Size(913, 24); + this.mainMenuStrip.TabIndex = 0; + this.mainMenuStrip.Text = "menuStrip1"; + // + // schedulerToolStripMenuItem + // + this.schedulerToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.connectToolStripMenuItem}); + this.schedulerToolStripMenuItem.Name = "schedulerToolStripMenuItem"; + this.schedulerToolStripMenuItem.Size = new System.Drawing.Size(71, 20); + this.schedulerToolStripMenuItem.Text = "Scheduler"; + // + // connectToolStripMenuItem + // + this.connectToolStripMenuItem.Name = "connectToolStripMenuItem"; + this.connectToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.connectToolStripMenuItem.Text = "Connect"; + this.connectToolStripMenuItem.Click += new System.EventHandler(this.connectToolStripMenuItem_Click); + // + // jobsToolStripMenuItem + // + this.jobsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addJobToolStripMenuItem}); + this.jobsToolStripMenuItem.Enabled = false; + this.jobsToolStripMenuItem.Name = "jobsToolStripMenuItem"; + this.jobsToolStripMenuItem.Size = new System.Drawing.Size(42, 20); + this.jobsToolStripMenuItem.Text = "Jobs"; + // + // addJobToolStripMenuItem + // + this.addJobToolStripMenuItem.Name = "addJobToolStripMenuItem"; + this.addJobToolStripMenuItem.Size = new System.Drawing.Size(96, 22); + this.addJobToolStripMenuItem.Text = "Add"; + this.addJobToolStripMenuItem.Click += new System.EventHandler(this.addJobToolStripMenuItem_Click); + // + // listenersStripMenuItem + // + this.listenersStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.globalListenersToolStripMenuItem, + this.addJobListenerToolStripMenuItem}); + this.listenersStripMenuItem.Enabled = false; + this.listenersStripMenuItem.Name = "listenersStripMenuItem"; + this.listenersStripMenuItem.Size = new System.Drawing.Size(65, 20); + this.listenersStripMenuItem.Text = "Listeners"; + // + // globalListenersToolStripMenuItem + // + this.globalListenersToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addGlobalJobListenerToolStripMenuItem, + this.addTriggerListenerToolStripMenuItem}); + this.globalListenersToolStripMenuItem.Name = "globalListenersToolStripMenuItem"; + this.globalListenersToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.globalListenersToolStripMenuItem.Text = "Global"; + // + // addGlobalJobListenerToolStripMenuItem + // + this.addGlobalJobListenerToolStripMenuItem.Name = "addGlobalJobListenerToolStripMenuItem"; + this.addGlobalJobListenerToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.addGlobalJobListenerToolStripMenuItem.Text = "Add Job Listener"; + this.addGlobalJobListenerToolStripMenuItem.Click += new System.EventHandler(this.addGlobalListenerToolStripMenuItem_Click); + // + // addTriggerListenerToolStripMenuItem + // + this.addTriggerListenerToolStripMenuItem.Name = "addTriggerListenerToolStripMenuItem"; + this.addTriggerListenerToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.addTriggerListenerToolStripMenuItem.Text = "Add Trigger Listener"; + // + // addJobListenerToolStripMenuItem + // + this.addJobListenerToolStripMenuItem.Name = "addJobListenerToolStripMenuItem"; + this.addJobListenerToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.addJobListenerToolStripMenuItem.Text = "Add Job Listener"; + this.addJobListenerToolStripMenuItem.Click += new System.EventHandler(this.addJobListenerToolStripMenuItem_Click); + // + // statusStrip1 + // + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.serverConnectStatusLabel, + this.StripStatusLabel_Job_Groups, + this.StripStatusLabel_Jobs_Refresh_date}); + this.statusStrip1.Location = new System.Drawing.Point(0, 639); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(913, 22); + this.statusStrip1.TabIndex = 1; + this.statusStrip1.Text = "statusStrip1"; + // + // serverConnectStatusLabel + // + this.serverConnectStatusLabel.Name = "serverConnectStatusLabel"; + this.serverConnectStatusLabel.Size = new System.Drawing.Size(86, 17); + this.serverConnectStatusLabel.Text = "Not connected"; + // + // StripStatusLabel_Job_Groups + // + this.StripStatusLabel_Job_Groups.BackColor = System.Drawing.Color.LightCyan; + this.StripStatusLabel_Job_Groups.Name = "StripStatusLabel_Job_Groups"; + this.StripStatusLabel_Job_Groups.Size = new System.Drawing.Size(157, 17); + this.StripStatusLabel_Job_Groups.Text = "StripStatusLabel_Job_Groups"; + this.StripStatusLabel_Job_Groups.ToolTipText = "Last Refresh of Job Groups"; + // + // StripStatusLabel_Jobs_Refresh_date + // + this.StripStatusLabel_Jobs_Refresh_date.BackColor = System.Drawing.SystemColors.ActiveCaptionText; + this.StripStatusLabel_Jobs_Refresh_date.Name = "StripStatusLabel_Jobs_Refresh_date"; + this.StripStatusLabel_Jobs_Refresh_date.Size = new System.Drawing.Size(191, 17); + this.StripStatusLabel_Jobs_Refresh_date.Text = "StripStatusLabel_Jobs_Refresh_date"; + this.StripStatusLabel_Jobs_Refresh_date.ToolTipText = "Last Refresh Date of Running Jobs"; + // + // jobGroupsTreeView + // + this.jobGroupsTreeView.HideSelection = false; + this.jobGroupsTreeView.Location = new System.Drawing.Point(8, 48); + this.jobGroupsTreeView.Name = "jobGroupsTreeView"; + this.jobGroupsTreeView.Size = new System.Drawing.Size(351, 252); + this.jobGroupsTreeView.TabIndex = 2; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(8, 32); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(94, 13); + this.label1.TabIndex = 4; + this.label1.Text = "Scheduler Objects"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(9, 319); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(72, 13); + this.label2.TabIndex = 5; + this.label2.Text = "Running Jobs"; + // + // btnRefreshRunningJobs + // + this.btnRefreshRunningJobs.Location = new System.Drawing.Point(371, 609); + this.btnRefreshRunningJobs.Name = "btnRefreshRunningJobs"; + this.btnRefreshRunningJobs.Size = new System.Drawing.Size(75, 23); + this.btnRefreshRunningJobs.TabIndex = 6; + this.btnRefreshRunningJobs.Text = "Refresh"; + this.btnRefreshRunningJobs.UseVisualStyleBackColor = true; + this.btnRefreshRunningJobs.Click += new System.EventHandler(this.btnRefreshRunningJobs_Click); + // + // btnRefreshJobGroups + // + this.btnRefreshJobGroups.Location = new System.Drawing.Point(284, 306); + this.btnRefreshJobGroups.Name = "btnRefreshJobGroups"; + this.btnRefreshJobGroups.Size = new System.Drawing.Size(75, 23); + this.btnRefreshJobGroups.TabIndex = 7; + this.btnRefreshJobGroups.Text = "Refresh"; + this.btnRefreshJobGroups.UseVisualStyleBackColor = true; + this.btnRefreshJobGroups.Click += new System.EventHandler(this.btnRefreshJobGroups_Click); + // + // btnDeleteJob + // + this.btnDeleteJob.Enabled = false; + this.btnDeleteJob.Location = new System.Drawing.Point(533, 306); + this.btnDeleteJob.Name = "btnDeleteJob"; + this.btnDeleteJob.Size = new System.Drawing.Size(65, 23); + this.btnDeleteJob.TabIndex = 8; + this.btnDeleteJob.Text = "Delete"; + this.btnDeleteJob.UseVisualStyleBackColor = true; + this.btnDeleteJob.Click += new System.EventHandler(this.btnDeleteJob_Click); + // + // btnRunJobNow + // + this.btnRunJobNow.Enabled = false; + this.btnRunJobNow.Location = new System.Drawing.Point(391, 306); + this.btnRunJobNow.Name = "btnRunJobNow"; + this.btnRunJobNow.Size = new System.Drawing.Size(65, 23); + this.btnRunJobNow.TabIndex = 9; + this.btnRunJobNow.Text = "Run"; + this.btnRunJobNow.UseVisualStyleBackColor = true; + this.btnRunJobNow.Click += new System.EventHandler(this.btnRunJobNow_Click); + // + // btnPause + // + this.btnPause.Enabled = false; + this.btnPause.Location = new System.Drawing.Point(462, 306); + this.btnPause.Name = "btnPause"; + this.btnPause.Size = new System.Drawing.Size(65, 23); + this.btnPause.TabIndex = 10; + this.btnPause.Text = "Pause"; + this.btnPause.UseVisualStyleBackColor = true; + this.btnPause.Click += new System.EventHandler(this.btnPause_Click); + // + // pnlDetails + // + this.pnlDetails.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlDetails.Location = new System.Drawing.Point(391, 45); + this.pnlDetails.Name = "pnlDetails"; + this.pnlDetails.Size = new System.Drawing.Size(342, 252); + this.pnlDetails.TabIndex = 11; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(388, 29); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(39, 13); + this.label3.TabIndex = 12; + this.label3.Text = "Details"; + // + // btnEdit + // + this.btnEdit.Enabled = false; + this.btnEdit.Location = new System.Drawing.Point(604, 306); + this.btnEdit.Name = "btnEdit"; + this.btnEdit.Size = new System.Drawing.Size(65, 23); + this.btnEdit.TabIndex = 13; + this.btnEdit.Text = "Edit"; + this.btnEdit.UseVisualStyleBackColor = true; + this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click); + // + // ctxScheduler + // + this.ctxScheduler.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.backupToolStripMenuItem}); + this.ctxScheduler.Name = "ctxScheduler"; + this.ctxScheduler.Size = new System.Drawing.Size(109, 26); + // + // backupToolStripMenuItem + // + this.backupToolStripMenuItem.Name = "backupToolStripMenuItem"; + this.backupToolStripMenuItem.Size = new System.Drawing.Size(108, 22); + this.backupToolStripMenuItem.Text = "Backup"; + this.backupToolStripMenuItem.Click += new System.EventHandler(this.backupToolStripMenuItem_Click); + // + // timer_Refresh_Running_Jobs + // + this.timer_Refresh_Running_Jobs.Interval = 30000; + this.timer_Refresh_Running_Jobs.Tick += new System.EventHandler(this.timer_Refresh_Running_Jobs_Tick); + // + // listView_RunningJobs + // + this.listView_RunningJobs.AllowColumnReorder = true; + this.listView_RunningJobs.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.JobName, + this.JobDuration}); + this.listView_RunningJobs.Location = new System.Drawing.Point(8, 335); + this.listView_RunningJobs.Name = "listView_RunningJobs"; + this.listView_RunningJobs.Size = new System.Drawing.Size(725, 268); + this.listView_RunningJobs.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.listView_RunningJobs.TabIndex = 14; + this.listView_RunningJobs.UseCompatibleStateImageBehavior = false; + this.listView_RunningJobs.View = System.Windows.Forms.View.Details; + // + // JobName + // + this.JobName.Text = "Job Name"; + // + // JobDuration + // + this.JobDuration.Text = "Duration"; + // + // jobAssembliesToolStripMenuItem + // + this.jobAssembliesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addAssemblyMenuItem, + this.deleteAssemblyMenuItem}); + this.jobAssembliesToolStripMenuItem.Name = "jobAssembliesToolStripMenuItem"; + this.jobAssembliesToolStripMenuItem.Size = new System.Drawing.Size(99, 20); + this.jobAssembliesToolStripMenuItem.Text = "Job Assemblies"; + // + // addAssemblyMenuItem + // + this.addAssemblyMenuItem.Name = "addAssemblyMenuItem"; + this.addAssemblyMenuItem.Size = new System.Drawing.Size(152, 22); + this.addAssemblyMenuItem.Text = "Add"; + this.addAssemblyMenuItem.Click += new System.EventHandler(this.addAssemblyMenuItem_Click); + // + // deleteAssemblyMenuItem + // + this.deleteAssemblyMenuItem.Name = "deleteAssemblyMenuItem"; + this.deleteAssemblyMenuItem.Size = new System.Drawing.Size(152, 22); + this.deleteAssemblyMenuItem.Text = "Delete"; + this.deleteAssemblyMenuItem.Click += new System.EventHandler(this.deleteAssemblyMenuItem_Click); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(913, 661); + this.Controls.Add(this.btnRefreshJobGroups); + this.Controls.Add(this.listView_RunningJobs); + this.Controls.Add(this.pnlDetails); + this.Controls.Add(this.label3); + this.Controls.Add(this.label1); + this.Controls.Add(this.btnEdit); + this.Controls.Add(this.btnRefreshRunningJobs); + this.Controls.Add(this.btnPause); + this.Controls.Add(this.label2); + this.Controls.Add(this.statusStrip1); + this.Controls.Add(this.mainMenuStrip); + this.Controls.Add(this.btnRunJobNow); + this.Controls.Add(this.jobGroupsTreeView); + this.Controls.Add(this.btnDeleteJob); + this.MainMenuStrip = this.mainMenuStrip; + this.Name = "MainForm"; + this.Text = "Quartz Manager"; + this.mainMenuStrip.ResumeLayout(false); + this.mainMenuStrip.PerformLayout(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.ctxScheduler.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip mainMenuStrip; + private System.Windows.Forms.ToolStripMenuItem schedulerToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem connectToolStripMenuItem; + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel serverConnectStatusLabel; + private System.Windows.Forms.TreeView jobGroupsTreeView; + private System.Windows.Forms.ToolStripMenuItem listenersStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem globalListenersToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem addGlobalJobListenerToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem addTriggerListenerToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem addJobListenerToolStripMenuItem; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ToolStripMenuItem jobsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem addJobToolStripMenuItem; + private System.Windows.Forms.Button btnRefreshRunningJobs; + private System.Windows.Forms.Button btnRefreshJobGroups; + private System.Windows.Forms.Button btnDeleteJob; + private System.Windows.Forms.Button btnRunJobNow; + private System.Windows.Forms.Button btnPause; + private System.Windows.Forms.Panel pnlDetails; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btnEdit; + private System.Windows.Forms.ContextMenuStrip ctxScheduler; + private System.Windows.Forms.ToolStripMenuItem backupToolStripMenuItem; + private System.Windows.Forms.Timer timer_Refresh_Running_Jobs; + private System.Windows.Forms.ToolStripStatusLabel StripStatusLabel_Jobs_Refresh_date; + private System.Windows.Forms.ToolStripStatusLabel StripStatusLabel_Job_Groups; + private System.Windows.Forms.ListView listView_RunningJobs; + private System.Windows.Forms.ColumnHeader JobName; + private System.Windows.Forms.ColumnHeader JobDuration; + private System.Windows.Forms.ToolStripMenuItem jobAssembliesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem addAssemblyMenuItem; + private System.Windows.Forms.ToolStripMenuItem deleteAssemblyMenuItem; + } +} + diff --git a/ClickForensics.Quartz.Manager/MainForm.cs b/ClickForensics.Quartz.Manager/MainForm.cs index 12ef5df..cb1b996 100644 --- a/ClickForensics.Quartz.Manager/MainForm.cs +++ b/ClickForensics.Quartz.Manager/MainForm.cs @@ -11,6 +11,7 @@ using Quartz.Collection; using System.Net.Sockets; //using ClickForensics.Quartz.Jobs; using System.IO; +using System.Reflection; namespace ClickForensics.Quartz.Manager { @@ -422,5 +423,24 @@ namespace ClickForensics.Quartz.Manager { updateRunningJobs(); } + + private void addAssemblyMenuItem_Click(object sender, EventArgs e) + { + FileDialog dialog = new OpenFileDialog(); + dialog.InitialDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + dialog.Filter = "Assemblies (*.dll)|*.dll"; + dialog.ShowDialog(); + string fileName = Path.GetFileName(dialog.FileName); + AssemblyRepository.AddAssembly(fileName); + } + + private void deleteAssemblyMenuItem_Click(object sender, EventArgs e) + { + using (DeleteAssembliesForm form = new DeleteAssembliesForm()) + { + form.ShowDialog(); + form.Close(); + } + } } } diff --git a/ClickForensics.Quartz.Manager/MainForm.resx b/ClickForensics.Quartz.Manager/MainForm.resx index 8d62819..b1e15c2 100644 --- a/ClickForensics.Quartz.Manager/MainForm.resx +++ b/ClickForensics.Quartz.Manager/MainForm.resx @@ -1,135 +1,135 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 143, 17 - - - 259, 17 - - - 374, 5 - - - 25 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 143, 17 + + + 259, 17 + + + 374, 5 + + + 25 + \ No newline at end of file diff --git a/ClickForensics.Quartz.Manager/RegistryStore.cs b/ClickForensics.Quartz.Manager/RegistryStore.cs index 31f6bdd..a2087a8 100644 --- a/ClickForensics.Quartz.Manager/RegistryStore.cs +++ b/ClickForensics.Quartz.Manager/RegistryStore.cs @@ -58,15 +58,15 @@ namespace ClickForensics.Quartz.Manager } //TODO: check that the key doesn't exist before trying to add. if it exists, move it to the top, but don't add it - for (int i = 4; i > 0; i--) - { - var previous = key.GetValue(string.Format("connection{0}", i - 1), null); - if (previous != null) - { - key.SetValue(string.Format("connection{0}", i), previous); + //for (int i = 4; i > 0; i--) + //{ + // var previous = key.GetValue(string.Format("connection{0}", i - 1), null); + // if (previous != null) + // { + // key.SetValue(string.Format("connection{0}", i), previous); - } - } + // } + //} key.SetValue("connection0", info, RegistryValueKind.String); }