public void LoadCommand(string file, JobCommand cmd) { m_jobconn = new JobConnection(file); m_cmd = m_jobconn.GetCommand(cmd.GroupId); RefreshFactories(); RefreshConfigs(); }
private void CopyCommand(AppObject appobj, int d, bool deleteold) { var cmdobj = appobj as JobCommandAppObject; var cmd = cmdobj.GetCommand(); int idx = IndexInParent; Parent.JobConn.Reload(); if (idx < 0) { Parent.Command.m_commands.Insert(0, cmd.Clone(true)); } else if (idx + d >= Parent.Command.m_commands.Count) { Parent.Command.m_commands.Add(cmd.Clone(true)); } else { Parent.Command.m_commands.Insert(idx + d, cmd.Clone(true)); } Parent.JobConn.SaveToFile(); if (deleteold) { var parconn = new JobConnection(cmdobj.JobFile); parconn.GetJob().Root.m_commands.RemoveIf(c => c.GroupId == cmd.GroupId); parconn.SaveToFile(); cmdobj.CallCompleteChanged(); } Parent.CompleteRefresh(); }
public JobCommandEditorFrame(JobConnection jobconn, JobCommand command) { InitializeComponent(); m_jobconn = jobconn; m_command = command; propertyFrame1.SelectedObject = m_command; }
public JobReportFrame(string file) { InitializeComponent(); m_jobconn = new JobConnection(file); m_job = m_jobconn.GetJob(); RefreshFactories(); RefreshConfigs(); }
private void EditCommand(Dictionary <string, string> args) { Job job = Job.LoadFromFile(args["job"]); JobConnection jobconn = new JobConnection(args["job"]); JobCommand cmd = job.Root.FindCommand(args["cmd"]); cmd.Edit(jobconn); }
public JobCommandTreeNode(PolyCommandTreeNode parent, JobConnection jobconn, JobCommand command) : base(parent, command.GroupId) { m_command = command; m_jobconn = jobconn; SetAppObject(new JobCommandAppObject { JobFile = jobconn.FileName, CommandGroupId = command.GroupId }); }
public virtual void Edit(JobConnection jobconn) { MainWindow.Instance.OpenContent(new JobCommandEditorFrame(jobconn, this)); }
public JobTreeNode(ITreeNode parent, IFileHandler fhandler) : base(parent, fhandler) { m_jobconn = new JobConnection(fhandler.FileObject.DataDiskPath); }
public PolyCommandTreeNode(ITreeNode parent, JobConnection jobconn) : base(parent, "commands") { m_jobconn = jobconn; }
public PolyCommandTreeNode(ITreeNode parent, JobConnection jobconn, JobPolyCommand command) : base(parent, command.GroupId) { m_command = command; m_jobconn = jobconn; }
public static ITreeNode GetCommandTreeNode(PolyCommandTreeNode parent, JobCommand command, JobConnection jobconn) { if (command is JobPolyCommand) { return(new PolyCommandTreeNode(parent, jobconn, (JobPolyCommand)command)); } else { return(new JobCommandTreeNode(parent, jobconn, command)); } }
public JobCommand GetCommand() { var conn = new JobConnection(JobFile); return(conn.GetCommand(CommandGroupId)); }