JobQueueInfo/VI.Tools.JobQueueInfo/DCJobChains.cs
Decompiler Source FileJobQueueInfo.DCJobChainsDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- CallMethod: SetStartAt at line 1046
- CallMethod: SetPriority at line 1080
- CallMethod: SetRetries at line 1112
- CallMethod: ResetProcess at line 1197
- CallMethod: ResetFrozen at line 1229
- CallMethod: SetLogMode at line 1260
Typed Edges
- No typed edges extracted for this source.
References
- No direct source references extracted.
Referenced By
- No direct source references extracted.
C# source-derived context
Generated by pattern extraction from the decompiled C# source and decompile index. This is factual source evidence, not inferred behavior.
reads entity values writes entity values references DB/Dialog objects Job/process related markers
Summary: classes DCJobChains; methods ToolTipError_Popup, RefreshData, OnHandleDestroyed, _LoadFormSettings, _SaveFormSettings, _ClearTree; references ESet, JobChain, JobParameter, JobQueue, JobTreeParamColl; markers reads entity values, writes entity values, references DB/Dialog objects, Job/process related markers
Classes
DCJobChainsMethods
- ToolTipError_Popup
- RefreshData
- OnHandleDestroyed
- _LoadFormSettings
- _SaveFormSettings
- _ClearTree
- _InsertRootJob
- _InsertJobChains
- _InsertJobChain
- _DisableJobMonitoring
- _InsertJobs
- _InsertJobsBulk
- _LoadJobsBulk
- _InsertJobsOfTree
- _InsertJobsOfTreeSub
- _RefreshNode
- _ParseTreeProcess
- _ParseTreeProcess_Sub
- _ParseTreeProcess_Disable
- _ParseTreeProcess_NodeState
- JobDelete
- _SetJobStartTime
- _SetJobPriority
- _SetJobRetries
- JobDefrost
- JobOverlimit
- _SetResetProcess
- _SetJobContinue
- _SetJobLogMode
- _GetChainRoot
- _RefreshJobsOfTree
- _RemoveChainFromTree
- ConfigureColumns
- mnuPopup_LogMode_Click
- tlcJobChains_NodeExpanding
- tlcJobChains_SelectedNodeChanged
- _TranslateForm
- CmPopup_Opening
- tmrMonitor_Tick
- mnuPopup_ShowFlat_Click
- ExpandAll
- ExpandChilds
- CollapseAll
- MonitorQueue
- JobShowError
- JobContinue
- ResetProcess
- JobEditRetries
- JobStartNow
- tlcJobChains_KeyUp
- tlcJobChains_KeyDown
- viReset
- viActivate
- clsMain_ConnectionChanged
- clsMain_LayoutChanged
- _GetSelectNodeState
- _GetSelectNode
- ConfigureToolTip
- _GetToolTipText
- tlcJobChains_MouseMove
- tlcJobChains_MouseLeave
- miLogMode_Show_Click
- JobPriority
- JobStartAt
- Activated
- viCC_CommandsUpdating
- viCC_ExecuteCommand
- InitializeComponent
- Dispose
DB/Dialog object references
OIM key/entity markers
UID_Tree UID_Job UID_JobSuccess UID_JobError UID_JobOriginAPI/entity calls
GetValue CreateSingle PutValue CreateSqlExecutor CreateSingle From SourceRegistrations / handlers
None extracted.
Complete Source
1using System;2using System.Collections;3using System.Collections.Generic;4using System.Collections.ObjectModel;5using System.ComponentModel;6using System.Data;7using System.Drawing;8using System.Linq;9using System.Runtime.CompilerServices;10using System.Threading;11using System.Windows.Forms;12using VI.Base;13using VI.Base.JobProcessing;14using VI.CommonDialogs;15using VI.Controls;16using VI.Controls.Base;17using VI.Controls.ElementEdit;18using VI.DB;19using VI.DB.Entities;20using VI.DB.Filters;21using VI.DB.Sync;22using VI.FormBase;23using VI.FormBase.CommandCenter;24using VI.FormBase.Help;25using VI.UI.Base.Images;2627namespace VI.Tools.JobQueueInfo;2829internal class DCJobChains : DCBase30{31 private TreeListNode _tlnMonitor;3233 private TreeListControl tlcJobChains;3435 private ToolTip toolTipError;3637 private string _filter;3839 private UserFilter _userFilter;4041 private bool _bLoadFlat;4243 private ToolStripMenuItem mnuPopup_ShowError;4445 private bool _toolTipLock;4647 [CompilerGenerated]48 private EventHandler m_ProcessUpdated;4950 [CompilerGenerated]51 private EventHandler m_FilterChanged;5253 private ColumnHeader columnHeader1;5455 private ContextMenuStrip cmPopup;5657 private ToolStripMenuItem mnuPopup_ConfigColumns;5859 private ToolStripMenuItem mnuPopup_Monitor;6061 private Timer tmrMonitor;6263 private IContainer components;6465 private ToolStripMenuItem mnuPopup_ResetProcess;6667 private ToolStripMenuItem mnuPopup_Defrost;6869 private ToolStripMenuItem mnuPopup_ContinueSuccess;7071 private ToolStripMenuItem mnuPopup_ContinueError;7273 private ToolStripMenuItem mnuPopup_ShowFlat;7475 private ToolStripMenuItem mnuPopup_ExpandAll;7677 private ToolStripMenuItem mnuPopup_CollapseAll;7879 private ToolStripSeparator menuItemSeparator;8081 private ToolStripMenuItem mnuPopup_ExpandChilds;8283 private ToolStripMenuItem mnuPopup_LogMode;8485 private ToolStripMenuItem miLogMode_Full;8687 private ToolStripMenuItem miLogMode_Error;8889 private ToolStripMenuItem miLogMode_None;9091 private ToolStripMenuItem miLogMode_Show;9293 private ToolStripSeparator menuItem3;9495 private ToolStripMenuItem mnuPopup_MonitorQueue;9697 private ToolStripMenuItem mnuPopup_Retries;9899 private ToolStripMenuItem mnuPopup_StartAt;100101 private CommandCenter viCC;102103 private Command cmdStartNow;104105 private Command cmdRetries;106107 private Command cmdResetProcess;108109 private Command cmdDefrost;110111 private Command cmdExpandAll;112113 private Command cmdExpandChilds;114115 private Command cmdCollapseAll;116117 private Command cmdContinueSuccess;118119 private Command cmdContinueError;120121 private Command cmdLogMode;122123 private Command cmdMonitorQueue;124125 private Command cmdMonitorChain;126127 private Command cmdConfigureColumns;128129 private Command cmdDelete;130131 private Command cmdStartAt;132133 private Command cmdPriority;134135 private Command cmdShowError;136137 [DefaultValue(null)]138 [DesignerSerializationVisibility(/*Could not decode attribute arguments.*/)]139 public UserFilter Filter140 {141 get142 {143 return _userFilter;144 }145 set146 {147 _userFilter = value;148 _filter = frmMain.GetWhereClause(_userFilter);149 _InsertRootJob();150 EventHandler obj = this.FilterChanged;151 if (obj != null)152 {153 obj.Invoke((object)this, EventArgs.Empty);154 }155 }156 }157158 [DesignerSerializationVisibility(/*Could not decode attribute arguments.*/)]159 public bool ShowFlat160 {161 get162 {163 return _bLoadFlat;164 }165 set166 {167 if (_bLoadFlat != value)168 {169 _bLoadFlat = value;170 mnuPopup_ShowFlat.Checked = _bLoadFlat;171 _InsertRootJob();172 }173 }174 }175176 public event EventHandler ProcessUpdated177 {178 [CompilerGenerated]179 add180 {181 //IL_0010: Unknown result type (might be due to invalid IL or missing references)182 //IL_0016: Expected O, but got Unknown183 EventHandler val = this.m_ProcessUpdated;184 EventHandler val2;185 do186 {187 val2 = val;188 EventHandler val3 = (EventHandler)System.Delegate.Combine((System.Delegate)(object)val2, (System.Delegate)(object)value);189 val = Interlocked.CompareExchange<EventHandler>(ref this.m_ProcessUpdated, val3, val2);190 }191 while (val != val2);192 }193 [CompilerGenerated]194 remove195 {196 //IL_0010: Unknown result type (might be due to invalid IL or missing references)197 //IL_0016: Expected O, but got Unknown198 EventHandler val = this.m_ProcessUpdated;199 EventHandler val2;200 do201 {202 val2 = val;203 EventHandler val3 = (EventHandler)System.Delegate.Remove((System.Delegate)(object)val2, (System.Delegate)(object)value);204 val = Interlocked.CompareExchange<EventHandler>(ref this.m_ProcessUpdated, val3, val2);205 }206 while (val != val2);207 }208 }209210 public event EventHandler FilterChanged211 {212 [CompilerGenerated]213 add214 {215 //IL_0010: Unknown result type (might be due to invalid IL or missing references)216 //IL_0016: Expected O, but got Unknown217 EventHandler val = this.m_FilterChanged;218 EventHandler val2;219 do220 {221 val2 = val;222 EventHandler val3 = (EventHandler)System.Delegate.Combine((System.Delegate)(object)val2, (System.Delegate)(object)value);223 val = Interlocked.CompareExchange<EventHandler>(ref this.m_FilterChanged, val3, val2);224 }225 while (val != val2);226 }227 [CompilerGenerated]228 remove229 {230 //IL_0010: Unknown result type (might be due to invalid IL or missing references)231 //IL_0016: Expected O, but got Unknown232 EventHandler val = this.m_FilterChanged;233 EventHandler val2;234 do235 {236 val2 = val;237 EventHandler val3 = (EventHandler)System.Delegate.Remove((System.Delegate)(object)val2, (System.Delegate)(object)value);238 val = Interlocked.CompareExchange<EventHandler>(ref this.m_FilterChanged, val3, val2);239 }240 while (val != val2);241 }242 }243244 public DCJobChains()245 {246 //IL_002e: Unknown result type (might be due to invalid IL or missing references)247 //IL_0038: Expected O, but got Unknown248 //IL_0044: Unknown result type (might be due to invalid IL or missing references)249 //IL_004e: Expected O, but got Unknown250 //IL_005b: Unknown result type (might be due to invalid IL or missing references)251 //IL_0065: Expected O, but got Unknown252 InitializeComponent();253 _TranslateForm();254 tlcJobChains.ImageList = StockImageList.Small;255 clsMain.Instance.ConnectionChanged += new EventHandler(clsMain_ConnectionChanged);256 clsMain.Instance.LayoutChanged += new EventHandler(clsMain_LayoutChanged);257 toolTipError.Popup += new PopupEventHandler(ToolTipError_Popup);258 }259260 private void ToolTipError_Popup(object sender, PopupEventArgs e)261 {262 if (_toolTipLock)263 {264 return;265 }266 try267 {268 _toolTipLock = true;269 string text = _GetToolTipText(base.TipNode);270 if (string.IsNullOrEmpty(text))271 {272 toolTipError.Active = false;273 }274 else275 {276 toolTipError.SetToolTip((Control)(object)tlcJobChains, text);277 }278 }279 catch (System.Exception exception)280 {281 ExceptionMgr.Instance.HandleException(exception, this);282 }283 finally284 {285 _toolTipLock = false;286 }287 }288289 public void RefreshData(TreeListNode tlNode)290 {291 if (tlNode != null)292 {293 _RefreshNode(tlNode);294 }295 else296 {297 _InsertRootJob();298 }299 }300301 protected override void OnHandleDestroyed(EventArgs e)302 {303 _SaveFormSettings();304 ((Control)this).OnHandleDestroyed(e);305 }306307 private void _LoadFormSettings()308 {309 base.Columns.Load(((Control)this).Name);310 TreeListHelper.InitializeTreeColumns(tlcJobChains, base.Columns);311 }312313 private void _SaveFormSettings()314 {315 if (tlcJobChains.Columns.Count > 0)316 {317 base.Columns.TreeColumn.Width = tlcJobChains.Columns[0].EffectiveWidth;318 for (int i = 1; i < tlcJobChains.Columns.Count; i++)319 {320 ((Collection<Column>)(object)base.Columns)[i - 1].Width = tlcJobChains.Columns[i].EffectiveWidth;321 }322 base.Columns.Save(((Control)this).Name);323 }324 }325326 private void _ClearTree()327 {328 using (new UpdateHelper(tlcJobChains))329 {330 tlcJobChains.Nodes.Clear();331 }332 }333334 private void _InsertRootJob()335 {336 //IL_012e: Unknown result type (might be due to invalid IL or missing references)337 //IL_0134: Invalid comparison between Unknown and I4338 if (clsMain.Instance.ConnectData == null)339 {340 return;341 }342 try343 {344 Cursor.Current = Cursors.WaitCursor;345 ((Dictionary<string, JobBase>)base.Jobs).Clear();346 tlcJobChains.BeginUpdate();347 TreeListNode tlnMonitor = _tlnMonitor;348 TreeListNode treeListNode;349 if (tlnMonitor != null && tlnMonitor.IsRootNode)350 {351 treeListNode = tlcJobChains.Nodes[0];352 treeListNode.Nodes.Clear();353 }354 else355 {356 tlcJobChains.Nodes.Clear();357 _tlnMonitor = null;358 treeListNode = tlcJobChains.Nodes.Add(LanguageManager.Instance["frmJobChains_ColumnTree"], -1);359 treeListNode.SetData(new NodeData(NodeType.Root, "", ""));360 treeListNode.ImageIndex = 192;361 treeListNode.ShowExpansionIndicator = false;362 treeListNode.UseSubItems = false;363 }364 if (_bLoadFlat)365 {366 _InsertJobChain(treeListNode);367 }368 else369 {370 _InsertJobChains(treeListNode);371 }372 treeListNode.Expand(inclSubNodes: false);373 tlcJobChains.SelectedNode = treeListNode;374 }375 catch (System.Exception ex)376 {377 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);378 if (!string.IsNullOrEmpty(_filter) && (int)MessageBox.Show(LanguageManager.Instance["ResetFilter_Question"], LanguageManager.Instance["%Globals.QIM_ProductNameFull%"], (MessageBoxButtons)4, (MessageBoxIcon)48) == 6)379 {380 Filter = null;381 }382 }383 finally384 {385 tlcJobChains.EndUpdate();386 Cursor.Current = Cursors.Default;387 }388 }389390 private void _InsertJobChains(TreeListNode tlnRoot)391 {392 SqlExecutor sqlExecutor = clsMain.Instance.ConnectData.Connection.CreateSqlExecutor(clsMain.Instance.ConnectData.PublicKey);393 ISqlFormatter sqlFormatter = clsMain.Instance.ConnectData.Connection.SqlFormatter;394 LanguageManager instance = LanguageManager.Instance;395 long num = 0L;396 string text = sqlFormatter.Comparison("IsRootJob", true, ValType.Bool);397 if (!string.IsNullOrEmpty(_filter))398 {399 text = sqlFormatter.AndRelation(text, $"UID_Tree in ( select UID_Tree from JobQueue where {_filter} )");400 }401 string sqlStatement = string.Concat(new string[11]402 {403 "select ",404 sqlFormatter.FormatColumnname("jobchainname", forComparisons: false, ValType.String, FormatterOptions.ConvertNull),405 " as jobchainname, ",406 sqlFormatter.Aggregate(AggregateFunction.Count, sqlFormatter.FormatColumnname("jobchainname", forComparisons: false, ValType.String)),407 " as anzahl from ",408 clsMain.Instance.QueueName,409 " ",410 sqlExecutor.Connection.SqlStrings["ReadPastOption"],411 " where ",412 text,413 " group by jobchainname order by jobchainname asc"414 });415 IDataReader val = (IDataReader)(object)new CachedDataReader(sqlExecutor.SqlExecute(sqlStatement));416 try417 {418 while (val.Read())419 {420 string text2 = ((IDataRecord)val).GetString(0);421 long @int = ((IDataRecord)val).GetInt64(1);422 TreeListNode treeListNode = tlnRoot.Nodes.Add(text2, -1);423 treeListNode.SubText = @int.ToString();424 treeListNode.SetData(new NodeData(NodeType.JobChains, text2, ""));425 treeListNode.ImageIndex = 110;426 treeListNode.UseSubItems = false;427 treeListNode.ShowExpansionIndicator = true;428 num += @int;429 }430 }431 finally432 {433 ((System.IDisposable)val)?.Dispose();434 }435 tlnRoot.SubText = num.ToString();436 if (!tlnRoot.HasChildren && !string.IsNullOrEmpty(_filter))437 {438 TreeListNode treeListNode2 = tlnRoot.Nodes.Add(instance["NoResultForFilter"], -1);439 treeListNode2.SetData(new NodeData(NodeType.Root, "", ""));440 treeListNode2.ImageIndex = 106;441 treeListNode2.ShowExpansionIndicator = false;442 treeListNode2.UseSubItems = false;443 }444 }445446 private void _InsertJobChain(TreeListNode tlnJobChains)447 {448 //IL_03b7: Unknown result type (might be due to invalid IL or missing references)449 //IL_03bd: Invalid comparison between Unknown and I4450 NodeData data = tlnJobChains.GetData();451 long num = 0L;452 SqlExecutor sqlExecutor = clsMain.Instance.ConnectData.Connection.CreateSqlExecutor(clsMain.Instance.ConnectData.PublicKey);453 ISqlFormatter sqlFormatter = clsMain.Instance.ConnectData.Connection.SqlFormatter;454 string data2 = data.Data1;455 string text = sqlFormatter.AndRelation(string.IsNullOrEmpty(data2) ? "" : sqlFormatter.Comparison("JobChainName", data.Data1, ValType.String), sqlFormatter.Comparison("IsRootJob", true, ValType.Bool));456 if (!string.IsNullOrEmpty(_filter))457 {458 text = sqlFormatter.AndRelation(text, $"UID_Tree in ( select UID_Tree from JobQueue where {_filter} )");459 }460 string systemIdentifier = clsMain.Instance.ConnectData.Connection.SystemIdentifier;461 string sqlStatement;462 if (!(systemIdentifier == "MSSQL"))463 {464 if (!(systemIdentifier == "ORACLE"))465 {466 if (!(systemIdentifier == "SQLite"))467 {468 throw new System.Exception($"Unknown DB-System '{clsMain.Instance.ConnectData.Connection.SystemIdentifier}' in frmJobChains._InsertJobChain");469 }470 sqlStatement = string.Concat(new string[6]471 {472 " select * from ( select xdateinserted as xdateinserted, UID_Tree as tree, UID_Job as job from ",473 clsMain.Instance.QueueName,474 " where ",475 text,476 " ) where 1=1 order by XDateInserted ",477 clsMain.Instance.ResultLimit.rlOrder478 });479 }480 else481 {482 sqlStatement = string.Concat(new string[8]483 {484 " select * from ( select xdateinserted as xdateinserted, UID_Tree as tree, UID_Job as job, JobChainName as JobChainName from ",485 clsMain.Instance.QueueName,486 " where ",487 text,488 " ) where 1=1 ",489 clsMain.Instance.ResultLimit.rlRowNum,490 " order by XDateInserted ",491 clsMain.Instance.ResultLimit.rlOrder492 });493 }494 }495 else496 {497 sqlStatement = string.Concat(new string[10]498 {499 "select ",500 clsMain.Instance.ResultLimit.rlTop,501 " xdateinserted as xdateinserted, UID_Tree as tree, UID_Job as job, JobChainName as JobChainName from ",502 clsMain.Instance.QueueName,503 " ",504 sqlExecutor.Connection.SqlStrings["NoLockOption"],505 " where ",506 text,507 " order by XDateInserted ",508 clsMain.Instance.ResultLimit.rlOrder509 });510 }511 try512 {513 tlcJobChains.BeginUpdate();514 Cursor.Current = Cursors.WaitCursor;515 tlnJobChains.Nodes.Clear();516 DisplayConverter displayConverter = new DisplayConverter((IFormatProvider)(object)LanguageManager.Culture, sqlExecutor.Connection.TimeZone);517 IDataReader val = (IDataReader)(object)new CachedDataReader(sqlExecutor.SqlExecute(sqlStatement));518 try519 {520 while (val.Read())521 {522 string caption = displayConverter.ToDisplayString(((IDataRecord)val).GetDateTime(0), ValType.Date);523 TreeListNode treeListNode = tlnJobChains.Nodes.Add(caption, -1);524 if (_bLoadFlat)525 {526 treeListNode.SubText = ((IDataRecord)val).GetString(3);527 treeListNode.UseSubItems = false;528 }529 NodeData nodeData = new NodeData(NodeType.JobChain, ((IDataRecord)val).GetString(1), ((IDataRecord)val).GetString(2));530 nodeData.Job = new JobChain(((IDataRecord)val).GetString(1), val);531 treeListNode.SetData(nodeData);532 treeListNode.ImageIndex = 164;533 treeListNode.ShowExpansionIndicator = true;534 num++;535 }536 }537 finally538 {539 ((System.IDisposable)val)?.Dispose();540 }541 tlnJobChains.SubText = num.ToString();542 }543 catch (System.Exception ex)544 {545 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);546 if (!string.IsNullOrEmpty(_filter) && (int)MessageBox.Show(LanguageManager.Instance["ResetFilter_Question"], LanguageManager.Instance["%Globals.QIM_ProductNameFull%"], (MessageBoxButtons)4, (MessageBoxIcon)48) == 6)547 {548 Filter = null;549 }550 }551 finally552 {553 tlcJobChains.EndUpdate();554 Cursor.Current = Cursors.Default;555 }556 }557558 private void _DisableJobMonitoring()559 {560 TreeListNode tlnMonitor = _tlnMonitor;561 if (tlnMonitor != null)562 {563 tlnMonitor.ImageIndex = (tlnMonitor.IsRootNode ? 192 : 164);564 tmrMonitor.Stop();565 _tlnMonitor = null;566 }567 }568569 private void _InsertJobs(TreeListNode tlnJobChain, bool update)570 {571 NodeData data = tlnJobChain.GetData();572 int num = 0;573 JobQueue jobQueue = new JobQueue("");574 SqlExecutor sqlExecutor = clsMain.Instance.ConnectData.Connection.CreateSqlExecutor(clsMain.Instance.ConnectData.PublicKey);575 ISqlFormatter sqlFormatter = sqlExecutor.Connection.SqlFormatter;576 string sqlStatement = string.Format("select ParameterName, ParameterValue, IsCrypted, IsHidden from JobTreeParamColl {0} where {1}", (object)sqlExecutor.Connection.SqlStrings["NoLockOption"], (object)sqlFormatter.UidComparison("UID_Tree", data.Data1));577 global::_003C_003Ey__InlineArray4<object> buffer = default(global::_003C_003Ey__InlineArray4<object>);578 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 0) = jobQueue.SQLColumns;579 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 1) = clsMain.Instance.QueueName;580 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 2) = sqlExecutor.Connection.SqlStrings["NoLockOption"];581 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 3) = sqlFormatter.UidComparison("UID_Tree", data.Data1);582 string sqlStatement2 = string.Format("select {0} from {1} {2} where {3}", global::_003CPrivateImplementationDetails_003E.InlineArrayAsReadOnlySpan<global::_003C_003Ey__InlineArray4<object>, object>(in buffer, 4));583 try584 {585 tlcJobChains.BeginUpdate();586 Cursor.Current = Cursors.WaitCursor;587 if (!update)588 {589 tlnJobChain.Nodes.Clear();590 }591 JobParameters jobParameters = new JobParameters();592 IDataReader val = (IDataReader)(object)new CachedDataReader(sqlExecutor.SqlExecute(sqlStatement));593 try594 {595 while (val.Read())596 {597 JobParameter jobParameter = new JobParameter(((IDataRecord)val).GetString(0), ((IDataRecord)val).GetString(1));598 jobParameter.IsCrypted = ((IDataRecord)val).GetBoolean(2);599 jobParameter.IsHidden = ((IDataRecord)val).GetBoolean(3);600 jobParameters.Add(jobParameter);601 }602 }603 finally604 {605 ((System.IDisposable)val)?.Dispose();606 }607 IDataReader val2 = (IDataReader)(object)new CachedDataReader(sqlExecutor.SqlExecute(sqlStatement2));608 try609 {610 while (val2.Read())611 {612 string text = ((IDataRecord)val2).GetString(0);613 jobQueue = new JobQueue(text, (IDataRecord)(object)val2, jobParameters);614 if (((Dictionary<string, JobBase>)base.Jobs).ContainsKey(text))615 {616 base.Jobs[text] = jobQueue;617 }618 else619 {620 base.Jobs.Add(jobQueue);621 }622 num++;623 }624 if (num == 0 && update)625 {626 _DisableJobMonitoring();627 _RemoveChainFromTree(tlnJobChain);628 }629 }630 finally631 {632 ((System.IDisposable)val2)?.Dispose();633 }634 if (update)635 {636 _RefreshJobsOfTree(tlnJobChain);637 }638 else639 {640 _InsertJobsOfTree(tlnJobChain);641 }642 _ParseTreeProcess(tlnJobChain);643 }644 finally645 {646 tlcJobChains.EndUpdate();647 Cursor.Current = Cursors.Default;648 }649 }650651 private void _InsertJobsBulk(System.Collections.Generic.IEnumerable<TreeListNode> bulkNodes)652 {653 new JobQueue("");654 _ = clsMain.Instance.ConnectData.Connection.CreateSqlExecutor(clsMain.Instance.ConnectData.PublicKey).Connection.SqlFormatter;655 try656 {657 tlcJobChains.BeginUpdate();658 Cursor.Current = Cursors.WaitCursor;659 _LoadJobsBulk(Enumerable.Select<TreeListNode, NodeData>(bulkNodes, (Func<TreeListNode, NodeData>)((TreeListNode tln) => tln.GetData())));660 System.Collections.Generic.IEnumerator<TreeListNode> enumerator = bulkNodes.GetEnumerator();661 try662 {663 while (((System.Collections.IEnumerator)enumerator).MoveNext())664 {665 TreeListNode current = enumerator.Current;666 if (current.HasChildren)667 {668 _RefreshJobsOfTree(current);669 }670 else671 {672 _InsertJobsOfTree(current);673 }674 _ParseTreeProcess(current);675 }676 }677 finally678 {679 ((System.IDisposable)enumerator)?.Dispose();680 }681 }682 finally683 {684 tlcJobChains.EndUpdate();685 Cursor.Current = Cursors.Default;686 }687 }688689 private void _LoadJobsBulk(System.Collections.Generic.IEnumerable<NodeData> bulkData)690 {691 SqlExecutor sqlExecutor = clsMain.Instance.ConnectData.Connection.CreateSqlExecutor(clsMain.Instance.ConnectData.PublicKey);692 ISqlFormatter sqlFormatter = sqlExecutor.Connection.SqlFormatter;693 JobQueue jobQueue = new JobQueue("");694 System.Collections.Generic.IEnumerator<System.Collections.Generic.IReadOnlyList<NodeData>> enumerator = bulkData.Partition(sqlFormatter.InClauseLimit).GetEnumerator();695 try696 {697 while (((System.Collections.IEnumerator)enumerator).MoveNext())698 {699 System.Collections.Generic.IReadOnlyList<NodeData> current = enumerator.Current;700 string text = sqlFormatter.InClause("UID_Tree", ValType.String, FormatterOptions.PrimaryKey, (System.Collections.IEnumerable)Enumerable.Select<NodeData, string>((System.Collections.Generic.IEnumerable<NodeData>)current, (Func<NodeData, string>)((NodeData nd) => nd.Data1)));701 string sqlStatement = string.Format("select UID_Tree, ParameterName, ParameterValue, IsCrypted, IsHidden from JobTreeParamColl {0} where {1}", (object)sqlExecutor.Connection.SqlStrings["NoLockOption"], (object)text);702 global::_003C_003Ey__InlineArray4<object> buffer = default(global::_003C_003Ey__InlineArray4<object>);703 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 0) = jobQueue.SQLColumns;704 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 1) = clsMain.Instance.QueueName;705 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 2) = sqlExecutor.Connection.SqlStrings["NoLockOption"];706 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 3) = text;707 string sqlStatement2 = string.Format("select {0} from {1} {2} where {3}", global::_003CPrivateImplementationDetails_003E.InlineArrayAsReadOnlySpan<global::_003C_003Ey__InlineArray4<object>, object>(in buffer, 4));708 Dictionary<string, JobParameters> val = new Dictionary<string, JobParameters>();709 JobParameters jobParameters = new JobParameters();710 IDataReader val2 = (IDataReader)(object)new CachedDataReader(sqlExecutor.SqlExecute(sqlStatement));711 try712 {713 while (val2.Read())714 {715 string key = ((IDataRecord)val2).GetString(0);716 jobParameters = ((IDictionary<string, JobParameters>)(object)val).GetOrAdd<string, JobParameters>(key, (string uid) => new JobParameters());717 JobParameter jobParameter = new JobParameter(((IDataRecord)val2).GetString(1), ((IDataRecord)val2).GetString(2));718 jobParameter.IsCrypted = ((IDataRecord)val2).GetBoolean(3);719 jobParameter.IsHidden = ((IDataRecord)val2).GetBoolean(4);720 jobParameters.Add(jobParameter);721 }722 }723 finally724 {725 ((System.IDisposable)val2)?.Dispose();726 }727 IDataReader val3 = (IDataReader)(object)new CachedDataReader(sqlExecutor.SqlExecute(sqlStatement2));728 try729 {730 int ordinal = ((IDataRecord)val3).GetOrdinal("UID_Tree");731 while (val3.Read())732 {733 string text2 = ((IDataRecord)val3).GetString(0);734 string text3 = ((IDataRecord)val3).GetString(ordinal);735 val.TryGetValue(text3, ref jobParameters);736 jobQueue = new JobQueue(text2, (IDataRecord)(object)val3, jobParameters);737 if (((Dictionary<string, JobBase>)base.Jobs).ContainsKey(text2))738 {739 base.Jobs[text2] = jobQueue;740 }741 else742 {743 base.Jobs.Add(jobQueue);744 }745 }746 }747 finally748 {749 ((System.IDisposable)val3)?.Dispose();750 }751 }752 }753 finally754 {755 ((System.IDisposable)enumerator)?.Dispose();756 }757 }758759 private void _InsertJobsOfTree(TreeListNode tlnJobChain)760 {761 NodeData data = tlnJobChain.GetData();762 JobBase jobBase = null;763 if (((Dictionary<string, JobBase>)base.Jobs).TryGetValue(data.Data2, ref jobBase))764 {765 _InsertJobsOfTreeSub(tlnJobChain, jobBase as JobQueue, success: true);766 }767 }768769 private void _InsertJobsOfTreeSub(TreeListNode tlnParent, JobQueue job, bool success)770 {771 //IL_0057: Unknown result type (might be due to invalid IL or missing references)772 NodeData nodeData = new NodeData();773 if (job == null)774 {775 return;776 }777 nodeData.Type = NodeType.Job;778 nodeData.Data1 = job.GetValue<string>("UID_Job");779 nodeData.Job = job;780 TreeListNode treeListNode = tlnParent.Nodes.Add(job.GetValue<string>("TaskName"), 109);781 treeListNode.Icon = ServerStateUI.GetStateIcon(job);782 treeListNode.SetData(nodeData);783 treeListNode.ForeColor = job.StateColor;784 TreeListHelper.InsertTreeColumns(treeListNode, base.Columns, job);785 if (job.HasJobSuccess)786 {787 JobBase jobBase = null;788 if (((Dictionary<string, JobBase>)base.Jobs).TryGetValue(job.GetValue<string>("UID_JobSuccess"), ref jobBase))789 {790 _InsertJobsOfTreeSub(treeListNode, jobBase as JobQueue, success: true);791 }792 }793 if (job.HasJobError)794 {795 JobBase jobBase2 = null;796 if (((Dictionary<string, JobBase>)base.Jobs).TryGetValue(job.GetValue<string>("UID_JobError"), ref jobBase2))797 {798 _InsertJobsOfTreeSub(treeListNode, jobBase2 as JobQueue, success: false);799 }800 }801 }802803 private void _RefreshNode(TreeListNode node)804 {805 if (node != null)806 {807 switch (node.GetData().Type)808 {809 case NodeType.Root:810 _InsertRootJob();811 break;812 case NodeType.JobChains:813 _InsertJobChain(node);814 break;815 case NodeType.JobChain:816 _InsertJobs(node, update: true);817 break;818 case NodeType.Job:819 _InsertJobs(_GetChainRoot(node), update: true);820 break;821 }822 if (this.ProcessUpdated != null)823 {824 this.ProcessUpdated.Invoke((object)this, EventArgs.Empty);825 }826 }827 }828829 private void _ParseTreeProcess(TreeListNode tlnJobChain)830 {831 if (tlnJobChain.Nodes.Count == 1)832 {833 _ParseTreeProcess_Sub(tlnJobChain.Nodes[0]);834 }835 }836837 private int _ParseTreeProcess_Sub(TreeListNode tlnJob)838 {839 int num = _ParseTreeProcess_NodeState(tlnJob);840 if (tlnJob.Nodes.Count == 2)841 {842 int num2 = _ParseTreeProcess_Sub(tlnJob.Nodes[0]);843 int num3 = _ParseTreeProcess_Sub(tlnJob.Nodes[1]);844 if (num2 != num3)845 {846 if (num2 > num3)847 {848 _ParseTreeProcess_Disable(tlnJob.Nodes[1]);849 }850 else851 {852 _ParseTreeProcess_Disable(tlnJob.Nodes[0]);853 }854 }855 num = Math.Max(num, Math.Max(num2, num3));856 }857 else if (tlnJob.Nodes.Count == 1)858 {859 num = Math.Max(num, _ParseTreeProcess_Sub(tlnJob.Nodes[0]));860 }861 return num;862 }863864 private void _ParseTreeProcess_Disable(TreeListNode tlnJob)865 {866 //IL_0031: Unknown result type (might be due to invalid IL or missing references)867 System.Collections.Generic.IEnumerator<TreeListNode> enumerator = tlnJob.Nodes.GetEnumerator();868 try869 {870 while (((System.Collections.IEnumerator)enumerator).MoveNext())871 {872 TreeListNode current = enumerator.Current;873 _ParseTreeProcess_Disable(current);874 }875 }876 finally877 {878 ((System.IDisposable)enumerator)?.Dispose();879 }880 tlnJob.ForeColor = Color.Gray;881 }882883 private static int _ParseTreeProcess_NodeState(ITreeListNode tlnJob)884 {885 NodeData data = tlnJob.GetData();886 int result = 0;887 if (data != null)888 {889 string text = ((JobQueue)data.Job).GetValue<string>("Ready2Exe").ToUpperInvariant();890 if (!(text == "TRUE"))891 {892 if (!(text == "PROCESSING"))893 {894 if (text == "FINISHED")895 {896 result = 3;897 }898 }899 else900 {901 result = 2;902 }903 }904 else905 {906 result = 1;907 }908 }909 return result;910 }911912 private void JobDelete(System.Collections.Generic.IEnumerable<ITreeListNode> nodes)913 {914 //IL_012a: Unknown result type (might be due to invalid IL or missing references)915 //IL_0134: Unknown result type (might be due to invalid IL or missing references)916 //IL_0203: Unknown result type (might be due to invalid IL or missing references)917 //IL_0208: Unknown result type (might be due to invalid IL or missing references)918 //IL_018a: Unknown result type (might be due to invalid IL or missing references)919 //IL_0190: Invalid comparison between Unknown and I4920 HashSet<string> val = new HashSet<string>();921 List<ITreeListNode> val2 = new List<ITreeListNode>();922 try923 {924 Cursor.Current = Cursors.WaitCursor;925 System.Collections.Generic.IEnumerator<ITreeListNode> enumerator = nodes.GetEnumerator();926 try927 {928 while (((System.Collections.IEnumerator)enumerator).MoveNext())929 {930 TreeListNode treeListNode = (TreeListNode)enumerator.Current;931 if (treeListNode?.TreeListControl == null)932 {933 continue;934 }935 NodeData data = treeListNode.GetData();936 switch (data.Type)937 {938 case NodeType.Job:939 {940 TreeListNode treeListNode2 = _GetChainRoot(treeListNode);941 NodeData data3 = treeListNode2.GetData();942 val.Add(data3.Data1);943 val2.Add((ITreeListNode)treeListNode2);944 break;945 }946 case NodeType.JobChain:947 val.Add(data.Data1);948 val2.Add((ITreeListNode)treeListNode);949 break;950 case NodeType.JobChains:951 {952 treeListNode.Expand(inclSubNodes: false);953 System.Collections.Generic.IEnumerator<TreeListNode> enumerator2 = treeListNode.Nodes.GetEnumerator();954 try955 {956 while (((System.Collections.IEnumerator)enumerator2).MoveNext())957 {958 NodeData data2 = enumerator2.Current.GetData();959 val.Add(data2.Data1);960 }961 }962 finally963 {964 ((System.IDisposable)enumerator2)?.Dispose();965 }966 val2.Add((ITreeListNode)treeListNode);967 break;968 }969 }970 }971 }972 finally973 {974 ((System.IDisposable)enumerator)?.Dispose();975 }976 if (val.Count <= 0)977 {978 return;979 }980 if ((Control.ModifierKeys & 0x10000) == 0)981 {982 string text;983 if (val.Count != 1)984 {985 LanguageManager instance = LanguageManager.Instance;986 object obj = val.Count;987 text = instance.FormatString("DCJobChains_QueryDeleteJobChains", new System.ReadOnlySpan<object>(ref obj));988 }989 else990 {991 text = LanguageManager.Instance["DCJobChains_QueryDeleteJobChain"];992 }993 string text2 = text;994 if ((int)MessageBox.Show((IWin32Window)(object)this, text2, LanguageManager.Instance["%Globals.QIM_ProductNameFull%"], (MessageBoxButtons)4, (MessageBoxIcon)48) != 6)995 {996 return;997 }998 }999 (clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue").Custom.GetMethod("DeleteTrees", typeof(string[])) ?? throw new System.Exception("Method \"DeleteTrees\" not found on JobQueue.")).Call(new object[1] { Enumerable.ToArray<string>((System.Collections.Generic.IEnumerable<string>)val) });1000 using (new UpdateHelper(tlcJobChains))1001 {1002 Enumerator<ITreeListNode> enumerator3 = val2.GetEnumerator();1003 try1004 {1005 while (enumerator3.MoveNext())1006 {1007 TreeListNode treeListNode3 = (TreeListNode)enumerator3.Current;1008 if (treeListNode3.TreeListControl != null)1009 {1010 treeListNode3.ParentNode.Nodes.Remove(treeListNode3);1011 }1012 }1013 }1014 finally1015 {1016 ((System.IDisposable)enumerator3/*cast due to .constrained prefix*/).Dispose();1017 }1018 }1019 }1020 catch (System.Exception ex)1021 {1022 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);1023 RefreshData(null);1024 }1025 finally1026 {1027 Cursor.Current = Cursors.Default;1028 }1029 }10301031 private void _SetJobStartTime(TreeListNode node, System.DateTime dtStart)1032 {1033 if (node == null)1034 {1035 return;1036 }1037 try1038 {1039 tlcJobChains.BeginUpdate();1040 NodeData data = node.GetData();1041 if (data.Type == NodeType.Job)1042 {1043 ISingleDbObject singleDbObject = clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue");1044 singleDbObject.PutValue("UID_Job", data.Data1);1045 singleDbObject.Load();1046 singleDbObject.Custom.CallMethod("SetStartAt", dtStart);1047 singleDbObject.Save();1048 _RefreshNode(node);1049 }1050 }1051 catch (System.Exception ex)1052 {1053 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);1054 }1055 finally1056 {1057 tlcJobChains.EndUpdate();1058 }1059 }10601061 private void _SetJobPriority(TreeListNode node)1062 {1063 if (node == null)1064 {1065 return;1066 }1067 try1068 {1069 Cursor.Current = Cursors.WaitCursor;1070 tlcJobChains.BeginUpdate();1071 NodeData data = node.GetData();1072 if (data.Type == NodeType.Job)1073 {1074 ISingleDbObject singleDbObject = clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue");1075 singleDbObject.PutValue("UID_Job", data.Data1);1076 singleDbObject.Load();1077 int num = singleDbObject.GetValue("Priority").Int;1078 if (num < 15)1079 {1080 singleDbObject.Custom.CallMethod("SetPriority", num + 1);1081 singleDbObject.Save();1082 }1083 _RefreshNode(node);1084 }1085 }1086 catch (System.Exception ex)1087 {1088 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);1089 }1090 finally1091 {1092 tlcJobChains.EndUpdate();1093 Cursor.Current = Cursors.Default;1094 }1095 }10961097 private void _SetJobRetries(TreeListNode node, int iRetries)1098 {1099 if (node == null)1100 {1101 return;1102 }1103 try1104 {1105 tlcJobChains.BeginUpdate();1106 NodeData data = node.GetData();1107 if (data.Type == NodeType.Job)1108 {1109 ISingleDbObject singleDbObject = clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue");1110 singleDbObject.PutValue("UID_Job", data.Data1);1111 singleDbObject.Load();1112 singleDbObject.Custom.CallMethod("SetRetries", iRetries);1113 singleDbObject.Save();1114 _RefreshNode(node);1115 }1116 }1117 catch (System.Exception ex)1118 {1119 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);1120 }1121 finally1122 {1123 tlcJobChains.EndUpdate();1124 }1125 }11261127 private void JobDefrost(TreeListNode node, object oParam)1128 {1129 if (node == null)1130 {1131 return;1132 }1133 try1134 {1135 Cursor.Current = Cursors.WaitCursor;1136 tlcJobChains.BeginUpdate();1137 NodeData data = node.GetData();1138 if (Job_ResetFrozen(data))1139 {1140 _RefreshNode(node);1141 }1142 }1143 catch (System.Exception ex)1144 {1145 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);1146 }1147 finally1148 {1149 tlcJobChains.EndUpdate();1150 Cursor.Current = Cursors.Default;1151 }1152 }11531154 private void JobOverlimit(TreeListNode node, object oParam)1155 {1156 if (node == null)1157 {1158 return;1159 }1160 try1161 {1162 Cursor.Current = Cursors.WaitCursor;1163 tlcJobChains.BeginUpdate();1164 NodeData data = node.GetData();1165 if (Job_ResetOverlimit(data))1166 {1167 _RefreshNode(node);1168 }1169 }1170 catch (System.Exception ex)1171 {1172 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);1173 }1174 finally1175 {1176 tlcJobChains.EndUpdate();1177 Cursor.Current = Cursors.Default;1178 }1179 }11801181 private void _SetResetProcess(TreeListNode node)1182 {1183 if (node == null)1184 {1185 return;1186 }1187 try1188 {1189 Cursor.Current = Cursors.WaitCursor;1190 tlcJobChains.BeginUpdate();1191 NodeData data = node.GetData();1192 if (data.Type == NodeType.Job && data.Job.IsState("FROZEN"))1193 {1194 ISingleDbObject singleDbObject = clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue");1195 singleDbObject["UID_Job"].NewValue = data.Data1;1196 singleDbObject.Load();1197 singleDbObject.Custom.CallMethod("ResetProcess");1198 singleDbObject.Save();1199 _RefreshNode(node);1200 }1201 }1202 catch (System.Exception ex)1203 {1204 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);1205 }1206 finally1207 {1208 tlcJobChains.EndUpdate();1209 Cursor.Current = Cursors.Default;1210 }1211 }12121213 private void _SetJobContinue(TreeListNode node, bool bSuccess)1214 {1215 if (node == null)1216 {1217 return;1218 }1219 try1220 {1221 Cursor.Current = Cursors.WaitCursor;1222 tlcJobChains.BeginUpdate();1223 NodeData data = node.GetData();1224 if (data.Type == NodeType.Job && data.Job.IsState("FROZEN"))1225 {1226 ISingleDbObject singleDbObject = clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue");1227 singleDbObject["UID_Job"].NewValue = data.Data1;1228 singleDbObject.Load();1229 singleDbObject.Custom.CallMethod("ResetFrozen", bSuccess);1230 singleDbObject.Save();1231 _RefreshNode(node);1232 }1233 }1234 catch (System.Exception ex)1235 {1236 ExceptionDialog.Show(((ContainerControl)this).ParentForm, ex);1237 }1238 finally1239 {1240 tlcJobChains.EndUpdate();1241 Cursor.Current = Cursors.Default;1242 }1243 }12441245 private void _SetJobLogMode(TreeListNode node, string logMode)1246 {1247 if (node == null)1248 {1249 return;1250 }1251 try1252 {1253 tlcJobChains.BeginUpdate();1254 NodeData data = node.GetData();1255 if (data.Type == NodeType.Job)1256 {1257 ISingleDbObject singleDbObject = clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue");1258 singleDbObject["UID_Job"].NewValue = data.Data1;1259 singleDbObject.Load();1260 singleDbObject.Custom.CallMethod("SetLogMode", logMode);1261 singleDbObject.Save();1262 _RefreshNode(node);1263 }1264 }1265 finally1266 {1267 tlcJobChains.EndUpdate();1268 }1269 }12701271 private static TreeListNode _GetChainRoot(TreeListNode node)1272 {1273 if (node == null)1274 {1275 return null;1276 }1277 if (node.GetData().Type != NodeType.Job)1278 {1279 return node;1280 }1281 return _GetChainRoot(node.ParentNode);1282 }12831284 private void _RefreshJobsOfTree(TreeListNode tlnJobChain)1285 {1286 if (tlnJobChain.Nodes.Count > 0)1287 {1288 NodeData data = tlnJobChain.GetData();1289 if (base.Jobs[data.Data2] is JobQueue job)1290 {1291 _RefreshJobsOfTree(tlnJobChain.Nodes[0], job);1292 }1293 else1294 {1295 _RemoveChainFromTree(tlnJobChain);1296 }1297 }1298 }12991300 private void _RefreshJobsOfTree(TreeListNode tlnJob, JobQueue job)1301 {1302 //IL_0017: Unknown result type (might be due to invalid IL or missing references)1303 NodeData data = tlnJob.GetData();1304 int num = 0;1305 TreeListHelper.InsertTreeColumns(tlnJob, base.Columns, job);1306 tlnJob.ForeColor = job.StateColor;1307 data.Job = job;1308 if (job.HasJobSuccess)1309 {1310 JobQueue job2 = base.Jobs[job.GetValue<string>("UID_JobSuccess")] as JobQueue;1311 if (tlnJob.Nodes.Count > num)1312 {1313 _RefreshJobsOfTree(tlnJob.Nodes[num], job2);1314 }1315 num++;1316 }1317 if (job.HasJobError)1318 {1319 JobQueue job3 = base.Jobs[job.GetValue<string>("UID_JobError")] as JobQueue;1320 if (tlnJob.Nodes.Count > num)1321 {1322 _RefreshJobsOfTree(tlnJob.Nodes[num], job3);1323 }1324 }1325 }13261327 private void _RemoveChainFromTree(TreeListNode tlnJobChain)1328 {1329 TreeListNode treeListNode = null;1330 try1331 {1332 tlcJobChains.BeginUpdate();1333 treeListNode = tlnJobChain.NextSibling;1334 tlnJobChain.ParentNode.Nodes.Remove(tlnJobChain);1335 }1336 finally1337 {1338 if (treeListNode == null && tlcJobChains.Nodes.Count > 0)1339 {1340 treeListNode = tlcJobChains.Nodes[0];1341 }1342 tlcJobChains.SelectedNode = treeListNode;1343 tlcJobChains.EndUpdate();1344 }1345 }13461347 private void ConfigureColumns()1348 {1349 //IL_0018: Unknown result type (might be due to invalid IL or missing references)1350 //IL_001e: Invalid comparison between Unknown and I41351 frmConfigureColumns frmConfigureColumns2 = new frmConfigureColumns(new JobQueue(""));1352 try1353 {1354 if ((int)frmConfigureColumns2.ConfigureColumns((IWin32Window)(object)this, base.Columns) == 1)1355 {1356 TreeListHelper.InitializeTreeColumns(tlcJobChains, base.Columns);1357 _InsertRootJob();1358 }1359 }1360 finally1361 {1362 ((System.IDisposable)frmConfigureColumns2)?.Dispose();1363 }1364 }13651366 private void mnuPopup_LogMode_Click(object sender, EventArgs e)1367 {1368 ToolStripMenuItem val = (ToolStripMenuItem)((sender is ToolStripMenuItem) ? sender : null);1369 if (val == null)1370 {1371 return;1372 }1373 try1374 {1375 using (BusyDialog.Start(((Control)this).FindForm()))1376 {1377 foreach (TreeListNode selectedNode in tlcJobChains.SelectedNodes)1378 {1379 _SetJobLogMode(selectedNode, ((ToolStripItem)val).Tag as string);1380 }1381 }1382 }1383 catch (System.Exception exception)1384 {1385 ExceptionMgr.Instance.HandleException(exception, this);1386 }1387 }13881389 private void tlcJobChains_NodeExpanding(object sender, TreeListEventArgs args)1390 {1391 try1392 {1393 NodeData data = args.Node.GetData();1394 if (data != null)1395 {1396 switch (data.Type)1397 {1398 case NodeType.JobChains:1399 _InsertJobChain(args.Node);1400 break;1401 case NodeType.JobChain:1402 _InsertJobs(args.Node, update: false);1403 break;1404 }1405 }1406 }1407 catch (System.Exception exception)1408 {1409 ExceptionMgr.Instance.HandleException(exception, this);1410 }1411 }14121413 private void tlcJobChains_SelectedNodeChanged(object sender, TreeListEventArgs args)1414 {1415 try1416 {1417 if (args.Node != null)1418 {1419 NodeData data = args.Node.GetData();1420 if (data.Type == NodeType.Job)1421 {1422 clsMain.Instance.CurrentJob = base.Jobs[data.Data1] as JobQueue;1423 }1424 else if (data.Type == NodeType.JobChain)1425 {1426 _InsertJobs(args.Node, args.Node.HasChildren);1427 clsMain.Instance.CurrentJob = data.Job;1428 }1429 else1430 {1431 clsMain.Instance.CurrentJob = null;1432 }1433 }1434 else1435 {1436 clsMain.Instance.CurrentJob = null;1437 }1438 if (_tlnMonitor != _GetChainRoot(args.Node))1439 {1440 _DisableJobMonitoring();1441 }1442 }1443 catch (System.Exception exception)1444 {1445 ExceptionMgr.Instance.HandleException(exception, this);1446 }1447 }14481449 private void _TranslateForm()1450 {1451 LanguageManager instance = LanguageManager.Instance;1452 ((Control)this).Text = instance["frmJobChains_Caption"];1453 base.Columns.TreeColumn.Display = instance["frmJobChains_ColumnTree"];1454 ((ToolStripItem)mnuPopup_ShowFlat).Text = instance["frmJobChains_PopUp_ShowFlatHistory"];1455 ((ToolStripItem)mnuPopup_ExpandAll).Text = instance["frmJobChains_PopUp_ExpandAll"];1456 ((ToolStripItem)mnuPopup_ExpandChilds).Text = instance["frmJobChains_PopUp_ExpandChilds"];1457 ((ToolStripItem)mnuPopup_CollapseAll).Text = instance["frmJobChains_PopUp_CollapseAll"];1458 ((ToolStripItem)mnuPopup_ConfigColumns).Text = instance["frmJobChains_PopUp_ConfigureColumns"];1459 ((ToolStripItem)mnuPopup_ShowFlat).Text = instance["frmJobChains_PopUp_ShowFlatHistory"];1460 ((ToolStripItem)mnuPopup_LogMode).Text = instance["frmJobChains_PopUp_LogMode"];1461 ((ToolStripItem)miLogMode_Show).Text = instance["frmJobChains_PopUp_LogMode_Show"];1462 ((ToolStripItem)miLogMode_Full).Text = instance["frmJobChains_PopUp_LogMode_Full"];1463 ((ToolStripItem)miLogMode_Error).Text = instance["frmJobChains_PopUp_LogMode_Error"];1464 ((ToolStripItem)miLogMode_None).Text = instance["frmJobChains_PopUp_LogMode_None"];1465 ((ToolStripItem)mnuPopup_Monitor).Text = instance["frmJobChains_PopUp_MonitorJobChain"];1466 ((ToolStripItem)mnuPopup_MonitorQueue).Text = instance["frmJobChains_PopUp_MonitorQueue"];1467 ((ToolStripItem)mnuPopup_Defrost).Text = instance["frmJobChains_PopUp_Defrost"];1468 ((ToolStripItem)mnuPopup_ResetProcess).Text = instance["frmJobChains_PopUp_ResetProcess"];1469 ((ToolStripItem)mnuPopup_ContinueSuccess).Text = instance["frmJobChains_PopUp_ContinueSuccess"];1470 ((ToolStripItem)mnuPopup_ContinueError).Text = instance["frmJobChains_PopUp_ContinueError"];1471 ((ToolStripItem)mnuPopup_Retries).Text = instance["frmJobChains_PopUp_Retries"];1472 ((ToolStripItem)mnuPopup_StartAt).Text = instance["frmJobChains_PopUp_StartAt"];1473 ((ToolStripItem)mnuPopup_ShowError).Text = instance["frmJobChains_PopUp_ShowError"];1474 }14751476 private void CmPopup_Opening(object sender, CancelEventArgs e)1477 {1478 viCC.UpdateCommands();1479 }14801481 private void tmrMonitor_Tick(object sender, EventArgs e)1482 {1483 try1484 {1485 if (((Component)this).DesignMode)1486 {1487 return;1488 }1489 TreeListNode tlnMonitor = _tlnMonitor;1490 if (tlnMonitor == null)1491 {1492 tmrMonitor.Stop();1493 return;1494 }1495 tmrMonitor.Stop();1496 _RefreshNode(tlnMonitor);1497 if (tlnMonitor.IsRootNode)1498 {1499 tlnMonitor.Expand(inclSubNodes: true);1500 }1501 tmrMonitor.Start();1502 }1503 catch (System.Exception exception)1504 {1505 _DisableJobMonitoring();1506 ExceptionMgr.Instance.HandleException(exception, this);1507 }1508 }15091510 private void mnuPopup_ShowFlat_Click(object sender, EventArgs e)1511 {1512 try1513 {1514 ShowFlat = !ShowFlat;1515 }1516 catch (System.Exception exception)1517 {1518 ExceptionMgr.Instance.HandleException(exception, this);1519 }1520 }15211522 private void ExpandAll()1523 {1524 if (tlcJobChains.SelectedNode == null)1525 {1526 return;1527 }1528 using (BusyDialog.Start(((Control)this).FindForm()))1529 {1530 Enumerable.ToArray<ITreeListNode>((System.Collections.Generic.IEnumerable<ITreeListNode>)tlcJobChains.SelectedNodes).ForEach(delegate(ITreeListNode n)1531 {1532 n.Expand(inclSubNodes: true);1533 });1534 }1535 }15361537 private void ExpandChilds()1538 {1539 if (tlcJobChains.SelectedNode == null)1540 {1541 return;1542 }1543 using (BusyDialog.Start(((Control)this).FindForm()))1544 {1545 ITreeListNode[] array = Enumerable.ToArray<ITreeListNode>((System.Collections.Generic.IEnumerable<ITreeListNode>)tlcJobChains.SelectedNodes);1546 for (int i = 0; i < array.Length; i++)1547 {1548 TreeListNode obj = (TreeListNode)array[i];1549 obj.Collapse(inclSubNodes: true);1550 obj.Expand(inclSubNodes: false);1551 }1552 }1553 }15541555 private void CollapseAll()1556 {1557 if (tlcJobChains.SelectedNode != null)1558 {1559 Enumerable.ToArray<ITreeListNode>((System.Collections.Generic.IEnumerable<ITreeListNode>)tlcJobChains.SelectedNodes).ForEach(delegate(ITreeListNode n)1560 {1561 n.Collapse(inclSubNodes: true);1562 });1563 }1564 }15651566 private void MonitorQueue()1567 {1568 try1569 {1570 if (tlcJobChains.SelectedNode != null)1571 {1572 _tlnMonitor = _GetChainRoot(tlcJobChains.SelectedNode);1573 _tlnMonitor.ImageIndex = 7;1574 tmrMonitor.Start();1575 ((Control)tlcJobChains).Invalidate();1576 }1577 }1578 catch (System.Exception exception)1579 {1580 ExceptionMgr.Instance.HandleException(exception, this);1581 }1582 }15831584 private void JobShowError()1585 {1586 try1587 {1588 if (tlcJobChains.SelectedNode != null)1589 {1590 NodeData data = tlcJobChains.SelectedNode.GetData();1591 ShowErrorMessages(data);1592 }1593 }1594 catch (System.Exception exception)1595 {1596 ExceptionMgr.Instance.HandleException(exception, this);1597 }1598 }15991600 private void JobContinue(bool bSuccess)1601 {1602 try1603 {1604 using (BusyDialog.Start(((Control)this).FindForm()))1605 {1606 BusyDialog.MainText = "Update JobState";1607 BusyDialog.DetailText = "";1608 ITreeListNode[] array = Enumerable.ToArray<ITreeListNode>((System.Collections.Generic.IEnumerable<ITreeListNode>)tlcJobChains.SelectedNodes);1609 for (int i = 0; i < array.Length; i++)1610 {1611 TreeListNode node = (TreeListNode)array[i];1612 _SetJobContinue(node, bSuccess);1613 }1614 }1615 }1616 catch (System.Exception exception)1617 {1618 ExceptionMgr.Instance.HandleException(exception, this);1619 }1620 }16211622 private void ResetProcess()1623 {1624 //IL_0021: Unknown result type (might be due to invalid IL or missing references)1625 //IL_0027: Invalid comparison between Unknown and I41626 try1627 {1628 if ((int)MessageBox.Show(LanguageManager.Instance["frmJobChains_ResetProcess"], LanguageManager.Instance["%Globals.QIM_ProductNameFull%"], (MessageBoxButtons)4, (MessageBoxIcon)48) != 6)1629 {1630 return;1631 }1632 using (BusyDialog.Start(((Control)this).FindForm()))1633 {1634 BusyDialog.MainText = "Update JobState";1635 BusyDialog.DetailText = "";1636 base.TipNode = null;1637 foreach (TreeListNode selectedNode in tlcJobChains.SelectedNodes)1638 {1639 _SetResetProcess(selectedNode);1640 }1641 }1642 }1643 catch (System.Exception exception)1644 {1645 ExceptionMgr.Instance.HandleException(exception, this);1646 }1647 }16481649 private void JobEditRetries()1650 {1651 //IL_004b: Unknown result type (might be due to invalid IL or missing references)1652 //IL_0051: Invalid comparison between Unknown and I41653 try1654 {1655 NodeData nodeData = tlcJobChains?.SelectedNode?.GetData();1656 if (nodeData == null || nodeData.Type != NodeType.Job)1657 {1658 return;1659 }1660 frmJobProperties frmJobProperties2 = new frmJobProperties(nodeData.Job.GetValue<int>("Retries"));1661 try1662 {1663 if ((int)((Form)frmJobProperties2).ShowDialog((IWin32Window)(object)((Control)this).FindForm()) != 1)1664 {1665 return;1666 }1667 foreach (TreeListNode selectedNode in tlcJobChains.SelectedNodes)1668 {1669 _SetJobRetries(selectedNode, frmJobProperties2.Retries);1670 }1671 }1672 finally1673 {1674 ((System.IDisposable)frmJobProperties2)?.Dispose();1675 }1676 }1677 catch (System.Exception exception)1678 {1679 ExceptionMgr.Instance.HandleException(exception, this);1680 }1681 }16821683 private void JobStartNow(TreeListNode tlNode)1684 {1685 //IL_0055: Unknown result type (might be due to invalid IL or missing references)1686 //IL_005b: Invalid comparison between Unknown and I41687 try1688 {1689 NodeData data = tlNode.GetData();1690 if (data == null || data.Type != NodeType.Job)1691 {1692 return;1693 }1694 System.DateTime value = data.Job.GetValue<System.DateTime>("StartAt");1695 TimeZoneInfo timeZone = clsMain.Instance.ConnectData.Connection.TimeZone;1696 value = DbVal.FromUniversalTime(value, timeZone);1697 frmJobProperties frmJobProperties2 = new frmJobProperties(value);1698 try1699 {1700 if ((int)((Form)frmJobProperties2).ShowDialog((IWin32Window)(object)((Control)this).FindForm()) != 1)1701 {1702 return;1703 }1704 foreach (TreeListNode selectedNode in tlcJobChains.SelectedNodes)1705 {1706 value = frmJobProperties2.StartTime;1707 value = DbVal.ToUniversalTime(value, timeZone);1708 _SetJobStartTime(selectedNode, value);1709 }1710 }1711 finally1712 {1713 ((System.IDisposable)frmJobProperties2)?.Dispose();1714 }1715 }1716 catch (System.Exception exception)1717 {1718 ExceptionMgr.Instance.HandleException(exception, this);1719 }1720 }17211722 private void tlcJobChains_KeyUp(object sender, KeyEventArgs e)1723 {1724 //IL_0001: Unknown result type (might be due to invalid IL or missing references)1725 //IL_0006: Unknown result type (might be due to invalid IL or missing references)1726 //IL_0007: Unknown result type (might be due to invalid IL or missing references)1727 //IL_000a: Invalid comparison between Unknown and I41728 //IL_000c: Unknown result type (might be due to invalid IL or missing references)1729 //IL_000f: Invalid comparison between Unknown and I41730 try1731 {1732 Keys keyCode = e.KeyCode;1733 if ((int)keyCode != 112)1734 {1735 if ((int)keyCode == 116)1736 {1737 RefreshData(tlcJobChains.SelectedNode);1738 e.Handled = true;1739 }1740 }1741 else1742 {1743 HelpMgr.Instance.ShowHelp("Help\\JobQueueInfo\\Jobqueue", showNoHelpInfo: true);1744 }1745 }1746 catch (System.Exception exception)1747 {1748 ExceptionMgr.Instance.HandleException(exception, this);1749 }1750 }17511752 private void tlcJobChains_KeyDown(object sender, KeyEventArgs e)1753 {1754 //IL_0020: Unknown result type (might be due to invalid IL or missing references)1755 //IL_0025: Unknown result type (might be due to invalid IL or missing references)1756 //IL_0026: Unknown result type (might be due to invalid IL or missing references)1757 //IL_0029: Invalid comparison between Unknown and I41758 //IL_002b: Unknown result type (might be due to invalid IL or missing references)1759 //IL_002e: Unknown result type (might be due to invalid IL or missing references)1760 //IL_0048: Expected I4, but got Unknown1761 try1762 {1763 if (!e.Control || tlcJobChains.SelectedNode == null)1764 {1765 return;1766 }1767 Keys keyCode = e.KeyCode;1768 if ((int)keyCode != 68)1769 {1770 switch (keyCode - 80)1771 {1772 case 4:1773 if (cmdStartNow.Visible)1774 {1775 viCC.Execute(cmdStartNow);1776 }1777 e.Handled = true;1778 break;1779 case 2:1780 if (cmdRetries.Visible)1781 {1782 viCC.Execute(cmdRetries);1783 }1784 e.Handled = true;1785 break;1786 case 3:1787 if (cmdStartAt.Visible)1788 {1789 viCC.Execute(cmdStartAt);1790 }1791 viCC.UpdateCommands();1792 e.Handled = true;1793 break;1794 case 0:1795 if (cmdPriority.Visible)1796 {1797 viCC.Execute(cmdPriority);1798 }1799 viCC.UpdateCommands();1800 e.Handled = true;1801 break;1802 case 1:1803 break;1804 }1805 }1806 else1807 {1808 if (cmdDelete.Visible)1809 {1810 viCC.Execute(cmdDelete);1811 }1812 e.Handled = true;1813 }1814 }1815 catch (System.Exception exception)1816 {1817 ExceptionMgr.Instance.HandleException(exception, this);1818 }1819 }18201821 public void viReset()1822 {1823 _ClearTree();1824 }18251826 public void viActivate()1827 {1828 _InsertRootJob();1829 }18301831 private void clsMain_ConnectionChanged(object sender, EventArgs e)1832 {1833 if (clsMain.Instance.ConnectData != null && ((Control)this).Parent != null)1834 {1835 _LoadFormSettings();1836 _InsertRootJob();1837 }1838 else1839 {1840 _DisableJobMonitoring();1841 _ClearTree();1842 }1843 }18441845 private void clsMain_LayoutChanged(object sender, EventArgs e)1846 {1847 try1848 {1849 _LoadFormSettings();1850 }1851 catch (System.Exception exception)1852 {1853 ExceptionMgr.Instance.HandleException(exception, this);1854 }1855 }18561857 private string _GetSelectNodeState()1858 {1859 return GetNodeState(tlcJobChains.SelectedNode);1860 }18611862 private JobQueue _GetSelectNode()1863 {1864 NodeData data = tlcJobChains.SelectedNode.GetData();1865 if (data != null)1866 {1867 ((ToolStripItem)mnuPopup_Monitor).Enabled = data.Type == NodeType.Job || data.Type == NodeType.JobChain;1868 if (data.Type == NodeType.Job)1869 {1870 return base.Jobs[data.Data1] as JobQueue;1871 }1872 }1873 return null;1874 }18751876 protected override void ConfigureToolTip(ToolTipInfo tipInfo)1877 {1878 base.ConfigureToolTip(tipInfo);1879 if (tipInfo == null)1880 {1881 toolTipError.RemoveAll();1882 return;1883 }1884 NodeData data = tipInfo.Node.GetData();1885 if (data == null)1886 {1887 if (toolTipError.Active)1888 {1889 toolTipError.RemoveAll();1890 toolTipError.Active = false;1891 }1892 }1893 else if (data.Type == NodeType.Job || data.Type == NodeType.JobChains)1894 {1895 toolTipError.SetToolTip((Control)(object)tlcJobChains, "<Dummy>");1896 toolTipError.Active = true;1897 }1898 }18991900 private string _GetToolTipText(ToolTipInfo tInfo)1901 {1902 NodeData data = tInfo.Node.GetData();1903 if (data == null)1904 {1905 return string.Empty;1906 }1907 if (tInfo.Part == TreeListControl.NodePart.Icon)1908 {1909 return ServerStateUI.GetStateTip(tInfo.Node.Icon);1910 }1911 if (data.Type == NodeType.Job)1912 {1913 ISession session = clsMain.Instance.ConnectData.Connection.Session;1914 string text = data.Job.GetValue<string>("ErrorMessages");1915 if (!string.IsNullOrEmpty(text))1916 {1917 if (text.Length > 1024)1918 {1919 text = text.Substring(0, 1024) + "...";1920 }1921 return text;1922 }1923 string uidJobOrigin = data.Job.GetValue<string>("UID_JobOrigin");1924 if (!string.IsNullOrEmpty(uidJobOrigin))1925 {1926 Query query = (from c in Query.From("Job")1927 where c.Column("UID_Job") == uidJobOrigin1928 select c).Select("Description");1929 if (session.Source().TryGet(query, EntityLoadType.ReadOnly, out var entity) && entity.Columns["Description"].TryGetDisplayValue(session, out var display))1930 {1931 return display;1932 }1933 }1934 }1935 if (data.Type == NodeType.JobChains)1936 {1937 ISession session2 = clsMain.Instance.ConnectData.Connection.Session;1938 string jobChainName = data.Data1;1939 if (!string.IsNullOrEmpty(jobChainName))1940 {1941 Query query2 = (from c in Query.From("JobChain")1942 where c.Column("Name") == jobChainName1943 select c).Select("Description");1944 if (session2.Source().TryGet(query2, EntityLoadType.ReadOnly, out var entity2) && entity2.Columns["Description"].TryGetDisplayValue(session2, out var display2))1945 {1946 return display2;1947 }1948 }1949 }1950 return string.Empty;1951 }19521953 private void tlcJobChains_MouseMove(object sender, MouseEventArgs e)1954 {1955 //IL_0007: Unknown result type (might be due to invalid IL or missing references)1956 try1957 {1958 TreeListControl.NodePart pickedPart;1959 TreeListNode nodeAtPoint = tlcJobChains.GetNodeAtPoint(e.Location, out pickedPart);1960 base.TipNode = ((nodeAtPoint != null) ? new ToolTipInfo(nodeAtPoint, pickedPart) : null);1961 }1962 catch (System.Exception exception)1963 {1964 ExceptionMgr.Instance.HandleException(exception, this);1965 }1966 }19671968 private void tlcJobChains_MouseLeave(object sender, EventArgs e)1969 {1970 try1971 {1972 base.TipNode = null;1973 }1974 catch (System.Exception exception)1975 {1976 ExceptionMgr.Instance.HandleException(exception, this);1977 }1978 }19791980 private void miLogMode_Show_Click(object sender, EventArgs e)1981 {1982 try1983 {1984 JobShowLog(tlcJobChains.SelectedNode);1985 }1986 catch (System.Exception exception)1987 {1988 ExceptionMgr.Instance.HandleException(exception, this);1989 }1990 }19911992 private void JobPriority()1993 {1994 foreach (TreeListNode selectedNode in tlcJobChains.SelectedNodes)1995 {1996 _SetJobPriority(selectedNode);1997 }1998 }19992000 private void JobStartAt()2001 {2002 foreach (TreeListNode selectedNode in tlcJobChains.SelectedNodes)2003 {2004 _SetJobStartTime(selectedNode, (System.DateTime)DbVal.DefaultValue(ValType.Date));2005 }2006 }20072008 internal override void Activated()2009 {2010 base.Activated();2011 if (((Control)this).IsHandleCreated && tlcJobChains.Nodes.Count == 0)2012 {2013 ((Control)this).BeginInvoke((System.Delegate)(object)new Action<object, EventArgs>(clsMain_ConnectionChanged), new object[2]2014 {2015 this,2016 EventArgs.Empty2017 });2018 }2019 }20202021 private void viCC_CommandsUpdating(object sender, EventArgs e)2022 {2023 try2024 {2025 LanguageManager instance = LanguageManager.Instance;2026 JobQueue jobQueue = _GetSelectNode();2027 IConnection connection = clsMain.Instance?.ConnectData?.Connection;2028 bool flag = connection == null || connection.User == null || !connection.User.IsReadOnly;2029 bool flag2;2030 bool flag3;2031 if (jobQueue != null)2032 {2033 jobQueue.GetValue<string>("Ready2Exe").ToUpperInvariant();2034 flag2 = jobQueue.GetValue<string>("UID_JobSuccess").Length > 0;2035 flag3 = jobQueue.GetValue<string>("UID_JobError").Length > 0;2036 }2037 else2038 {2039 _ = string.Empty;2040 flag2 = false;2041 flag3 = false;2042 }2043 bool flag4 = flag && IsAnySelectedJob(tlcJobChains, "FROZEN") && IsAllowed(connection, "JobQueue_Frozen");2044 bool flag5 = flag && IsAnySelectedJob(tlcJobChains, "OVERLIMIT") && IsAllowed(connection, "JobQueue_Frozen");2045 bool flag6 = tlcJobChains.SelectedNode != null && tlcJobChains.SelectedNode.CanExpand;2046 bool flag7 = flag6 && tlcJobChains.SelectedNode.Expanded;2047 bool flag8 = connection != null && jobQueue != null && IsAllowed(connection, "JobQueue_LogMode");2048 bool visible = tlcJobChains.SelectedNode != null && tlcJobChains.SelectedNode.IsRootNode && connection != null && connection.Features.IsAllowed("JobQueue_Monitor");2049 bool flag9 = Enumerable.Any<ITreeListNode>((System.Collections.Generic.IEnumerable<ITreeListNode>)tlcJobChains.SelectedNodes, (Func<ITreeListNode, bool>)((ITreeListNode n) => n.Tag is NodeData && ((NodeData)n.Tag).Type == NodeType.Job));2050 cmdExpandAll.Enabled = flag6;2051 cmdExpandChilds.Enabled = flag6;2052 cmdCollapseAll.Enabled = flag6 && flag7;2053 cmdDefrost.Enabled = flag && (flag4 || flag5);2054 cmdResetProcess.Enabled = flag && flag4;2055 cmdContinueSuccess.Visible = flag && flag4;2056 cmdContinueError.Visible = flag && flag4;2057 cmdStartAt.Enabled = flag;2058 cmdStartNow.Enabled = flag;2059 if (flag4 || flag5)2060 {2061 cmdContinueSuccess.Text = (flag2 ? instance["frmJobChains_PopUp_ContinueSuccess"] : instance["frmJobChains_PopUp_EndSuccess"]);2062 cmdContinueError.Text = (flag3 ? instance["frmJobChains_PopUp_ContinueError"] : instance["frmJobChains_PopUp_EndError"]);2063 }2064 cmdLogMode.Enabled = flag && flag8;2065 cmdMonitorQueue.Visible = visible;2066 cmdShowError.Visible = jobQueue != null && jobQueue.GetValue<string>("ErrorMessages").Length > 0;2067 cmdRetries.Visible = flag && flag9 && IsAllowed(connection, "JobQueue_Retries");2068 cmdStartAt.Visible = flag && flag9 && IsAllowed(connection, "JobQueue_StartAt");2069 cmdDelete.Visible = flag && IsAllowed(connection, "JobQueue_Delete");2070 cmdStartNow.Visible = flag && flag9 && IsAllowed(connection, "JobQueue_StartAt");2071 cmdPriority.Visible = flag;2072 }2073 catch (System.Exception exception)2074 {2075 ExceptionMgr.Instance.HandleException(exception, this);2076 }2077 }20782079 private void viCC_ExecuteCommand(object sender, CommandEventArgs e)2080 {2081 try2082 {2083 if (e.Command == cmdExpandAll)2084 {2085 ExpandAll();2086 }2087 else if (e.Command == cmdExpandChilds)2088 {2089 ExpandChilds();2090 }2091 else if (e.Command == cmdCollapseAll)2092 {2093 CollapseAll();2094 }2095 else if (e.Command == cmdDefrost)2096 {2097 ProcessSelectedJobs(tlcJobChains, "FROZEN", JobDefrost);2098 ProcessSelectedJobs(tlcJobChains, "OVERLIMIT", JobOverlimit);2099 }2100 else if (e.Command == cmdResetProcess)2101 {2102 ResetProcess();2103 }2104 else if (e.Command == cmdContinueSuccess)2105 {2106 JobContinue(bSuccess: true);2107 }2108 else if (e.Command == cmdContinueError)2109 {2110 JobContinue(bSuccess: false);2111 }2112 else if (e.Command == cmdMonitorQueue)2113 {2114 MonitorQueue();2115 }2116 else if (e.Command == cmdMonitorChain)2117 {2118 MonitorQueue();2119 }2120 else if (e.Command == cmdRetries)2121 {2122 JobEditRetries();2123 }2124 else if (e.Command == cmdStartNow)2125 {2126 JobStartNow(tlcJobChains.SelectedNode);2127 }2128 else if (e.Command == cmdConfigureColumns)2129 {2130 ConfigureColumns();2131 }2132 else if (e.Command == cmdStartAt)2133 {2134 JobStartAt();2135 }2136 else if (e.Command == cmdDelete)2137 {2138 JobDelete(tlcJobChains.SelectedNodes);2139 }2140 else if (e.Command == cmdPriority)2141 {2142 JobPriority();2143 }2144 else if (e.Command == cmdShowError)2145 {2146 JobShowError();2147 }2148 }2149 catch (System.Exception exception)2150 {2151 ExceptionMgr.Instance.HandleException(exception, this);2152 }2153 finally2154 {2155 viCC.UpdateCommands();2156 }2157 }21582159 private void InitializeComponent()2160 {2161 //IL_0001: Unknown result type (might be due to invalid IL or missing references)2162 //IL_000b: Expected O, but got Unknown2163 //IL_000c: Unknown result type (might be due to invalid IL or missing references)2164 //IL_0016: Expected O, but got Unknown2165 //IL_001d: Unknown result type (might be due to invalid IL or missing references)2166 //IL_0027: Expected O, but got Unknown2167 //IL_0028: Unknown result type (might be due to invalid IL or missing references)2168 //IL_0032: Expected O, but got Unknown2169 //IL_0033: Unknown result type (might be due to invalid IL or missing references)2170 //IL_003d: Expected O, but got Unknown2171 //IL_003e: Unknown result type (might be due to invalid IL or missing references)2172 //IL_0048: Expected O, but got Unknown2173 //IL_0049: Unknown result type (might be due to invalid IL or missing references)2174 //IL_0053: Expected O, but got Unknown2175 //IL_0054: Unknown result type (might be due to invalid IL or missing references)2176 //IL_005e: Expected O, but got Unknown2177 //IL_005f: Unknown result type (might be due to invalid IL or missing references)2178 //IL_0069: Expected O, but got Unknown2179 //IL_006a: Unknown result type (might be due to invalid IL or missing references)2180 //IL_0074: Expected O, but got Unknown2181 //IL_0075: Unknown result type (might be due to invalid IL or missing references)2182 //IL_007f: Expected O, but got Unknown2183 //IL_0080: Unknown result type (might be due to invalid IL or missing references)2184 //IL_008a: Expected O, but got Unknown2185 //IL_008b: Unknown result type (might be due to invalid IL or missing references)2186 //IL_0095: Expected O, but got Unknown2187 //IL_0096: Unknown result type (might be due to invalid IL or missing references)2188 //IL_00a0: Expected O, but got Unknown2189 //IL_00a1: Unknown result type (might be due to invalid IL or missing references)2190 //IL_00ab: Expected O, but got Unknown2191 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)2192 //IL_00b6: Expected O, but got Unknown2193 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)2194 //IL_00c1: Expected O, but got Unknown2195 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)2196 //IL_00cc: Expected O, but got Unknown2197 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)2198 //IL_00d7: Expected O, but got Unknown2199 //IL_00d8: Unknown result type (might be due to invalid IL or missing references)2200 //IL_00e2: Expected O, but got Unknown2201 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)2202 //IL_00ed: Expected O, but got Unknown2203 //IL_00ee: Unknown result type (might be due to invalid IL or missing references)2204 //IL_00f8: Expected O, but got Unknown2205 //IL_00f9: Unknown result type (might be due to invalid IL or missing references)2206 //IL_0103: Expected O, but got Unknown2207 //IL_0104: Unknown result type (might be due to invalid IL or missing references)2208 //IL_010e: Expected O, but got Unknown2209 //IL_0115: Unknown result type (might be due to invalid IL or missing references)2210 //IL_011f: Expected O, but got Unknown2211 //IL_0131: Unknown result type (might be due to invalid IL or missing references)2212 //IL_013b: Expected O, but got Unknown2213 //IL_035c: Unknown result type (might be due to invalid IL or missing references)2214 //IL_0373: Unknown result type (might be due to invalid IL or missing references)2215 //IL_037d: Expected O, but got Unknown2216 //IL_03b1: Unknown result type (might be due to invalid IL or missing references)2217 //IL_03ff: Unknown result type (might be due to invalid IL or missing references)2218 //IL_044d: Unknown result type (might be due to invalid IL or missing references)2219 //IL_0484: Unknown result type (might be due to invalid IL or missing references)2220 //IL_04ab: Unknown result type (might be due to invalid IL or missing references)2221 //IL_04b5: Expected O, but got Unknown2222 //IL_04d1: Unknown result type (might be due to invalid IL or missing references)2223 //IL_050f: Unknown result type (might be due to invalid IL or missing references)2224 //IL_055d: Unknown result type (might be due to invalid IL or missing references)2225 //IL_05d7: Unknown result type (might be due to invalid IL or missing references)2226 //IL_060b: Unknown result type (might be due to invalid IL or missing references)2227 //IL_0632: Unknown result type (might be due to invalid IL or missing references)2228 //IL_063c: Expected O, but got Unknown2229 //IL_0655: Unknown result type (might be due to invalid IL or missing references)2230 //IL_0690: Unknown result type (might be due to invalid IL or missing references)2231 //IL_06c7: Unknown result type (might be due to invalid IL or missing references)2232 //IL_06d1: Expected O, but got Unknown2233 //IL_0702: Unknown result type (might be due to invalid IL or missing references)2234 //IL_0739: Unknown result type (might be due to invalid IL or missing references)2235 //IL_0743: Expected O, but got Unknown2236 //IL_0774: Unknown result type (might be due to invalid IL or missing references)2237 //IL_07ab: Unknown result type (might be due to invalid IL or missing references)2238 //IL_07b5: Expected O, but got Unknown2239 //IL_07e9: Unknown result type (might be due to invalid IL or missing references)2240 //IL_0837: Unknown result type (might be due to invalid IL or missing references)2241 //IL_0885: Unknown result type (might be due to invalid IL or missing references)2242 //IL_08d3: Unknown result type (might be due to invalid IL or missing references)2243 //IL_0921: Unknown result type (might be due to invalid IL or missing references)2244 //IL_096f: Unknown result type (might be due to invalid IL or missing references)2245 //IL_09bd: Unknown result type (might be due to invalid IL or missing references)2246 //IL_0a0b: Unknown result type (might be due to invalid IL or missing references)2247 //IL_0a42: Unknown result type (might be due to invalid IL or missing references)2248 //IL_0a4c: Expected O, but got Unknown2249 //IL_0a70: Unknown result type (might be due to invalid IL or missing references)2250 //IL_0aab: Unknown result type (might be due to invalid IL or missing references)2251 //IL_0abc: Unknown result type (might be due to invalid IL or missing references)2252 //IL_0add: Unknown result type (might be due to invalid IL or missing references)2253 //IL_0b0f: Unknown result type (might be due to invalid IL or missing references)2254 //IL_0b1f: Unknown result type (might be due to invalid IL or missing references)2255 //IL_0b70: Unknown result type (might be due to invalid IL or missing references)2256 //IL_0b7a: Expected O, but got Unknown2257 //IL_0b87: Unknown result type (might be due to invalid IL or missing references)2258 //IL_0b91: Expected O, but got Unknown2259 //IL_0b9e: Unknown result type (might be due to invalid IL or missing references)2260 //IL_0ba8: Expected O, but got Unknown2261 //IL_0bb5: Unknown result type (might be due to invalid IL or missing references)2262 //IL_0bbf: Expected O, but got Unknown2263 //IL_0cbf: Unknown result type (might be due to invalid IL or missing references)2264 //IL_0cc9: Expected O, but got Unknown2265 //IL_0da0: Unknown result type (might be due to invalid IL or missing references)2266 //IL_0dc8: Unknown result type (might be due to invalid IL or missing references)2267 //IL_0ddd: Unknown result type (might be due to invalid IL or missing references)2268 //IL_0def: Unknown result type (might be due to invalid IL or missing references)2269 //IL_0df9: Expected O, but got Unknown2270 components = (IContainer)new Container();2271 columnHeader1 = new ColumnHeader();2272 cmPopup = new ContextMenuStrip(components);2273 mnuPopup_ExpandAll = new ToolStripMenuItem();2274 mnuPopup_ExpandChilds = new ToolStripMenuItem();2275 mnuPopup_CollapseAll = new ToolStripMenuItem();2276 mnuPopup_ShowFlat = new ToolStripMenuItem();2277 menuItemSeparator = new ToolStripSeparator();2278 mnuPopup_ShowError = new ToolStripMenuItem();2279 mnuPopup_ConfigColumns = new ToolStripMenuItem();2280 mnuPopup_LogMode = new ToolStripMenuItem();2281 miLogMode_Show = new ToolStripMenuItem();2282 menuItem3 = new ToolStripSeparator();2283 miLogMode_Full = new ToolStripMenuItem();2284 miLogMode_Error = new ToolStripMenuItem();2285 miLogMode_None = new ToolStripMenuItem();2286 mnuPopup_Monitor = new ToolStripMenuItem();2287 mnuPopup_MonitorQueue = new ToolStripMenuItem();2288 mnuPopup_ResetProcess = new ToolStripMenuItem();2289 mnuPopup_Defrost = new ToolStripMenuItem();2290 mnuPopup_ContinueSuccess = new ToolStripMenuItem();2291 mnuPopup_ContinueError = new ToolStripMenuItem();2292 mnuPopup_Retries = new ToolStripMenuItem();2293 mnuPopup_StartAt = new ToolStripMenuItem();2294 tmrMonitor = new Timer(components);2295 tlcJobChains = new TreeListControl();2296 toolTipError = new ToolTip(components);2297 viCC = new CommandCenter(components);2298 cmdExpandAll = new Command(components);2299 cmdExpandChilds = new Command(components);2300 cmdCollapseAll = new Command(components);2301 cmdConfigureColumns = new Command(components);2302 cmdLogMode = new Command(components);2303 cmdMonitorChain = new Command(components);2304 cmdMonitorQueue = new Command(components);2305 cmdResetProcess = new Command(components);2306 cmdDefrost = new Command(components);2307 cmdContinueSuccess = new Command(components);2308 cmdContinueError = new Command(components);2309 cmdRetries = new Command(components);2310 cmdStartNow = new Command(components);2311 cmdDelete = new Command(components);2312 cmdStartAt = new Command(components);2313 cmdPriority = new Command(components);2314 cmdShowError = new Command(components);2315 ((Control)cmPopup).SuspendLayout();2316 ((Control)this).SuspendLayout();2317 columnHeader1.Width = 180;2318 ((ToolStrip)cmPopup).Items.AddRange((ToolStripItem[])(object)new ToolStripItem[16]2319 {2320 (ToolStripItem)mnuPopup_ExpandAll,2321 (ToolStripItem)mnuPopup_ExpandChilds,2322 (ToolStripItem)mnuPopup_CollapseAll,2323 (ToolStripItem)mnuPopup_ShowFlat,2324 (ToolStripItem)menuItemSeparator,2325 (ToolStripItem)mnuPopup_ConfigColumns,2326 (ToolStripItem)mnuPopup_LogMode,2327 (ToolStripItem)mnuPopup_Monitor,2328 (ToolStripItem)mnuPopup_MonitorQueue,2329 (ToolStripItem)mnuPopup_ResetProcess,2330 (ToolStripItem)mnuPopup_Defrost,2331 (ToolStripItem)mnuPopup_ContinueSuccess,2332 (ToolStripItem)mnuPopup_ContinueError,2333 (ToolStripItem)mnuPopup_Retries,2334 (ToolStripItem)mnuPopup_StartAt,2335 (ToolStripItem)mnuPopup_ShowError2336 });2337 ((Control)cmPopup).Name = "cmPopup";2338 ((Control)cmPopup).Size = new Size(187, 362);2339 ((ToolStripDropDown)cmPopup).Opening += new CancelEventHandler(CmPopup_Opening);2340 viCC.SetCommand((Component)(object)mnuPopup_ExpandAll, cmdExpandAll);2341 ((ToolStripItem)mnuPopup_ExpandAll).Name = "mnuPopup_ExpandAll";2342 ((ToolStripItem)mnuPopup_ExpandAll).Size = new Size(186, 22);2343 ((ToolStripItem)mnuPopup_ExpandAll).Text = "~ExpandAll";2344 viCC.SetCommand((Component)(object)mnuPopup_ExpandChilds, cmdExpandChilds);2345 ((ToolStripItem)mnuPopup_ExpandChilds).Name = "mnuPopup_ExpandChilds";2346 ((ToolStripItem)mnuPopup_ExpandChilds).Size = new Size(186, 22);2347 ((ToolStripItem)mnuPopup_ExpandChilds).Text = "~ExpandChilds";2348 viCC.SetCommand((Component)(object)mnuPopup_CollapseAll, cmdCollapseAll);2349 ((ToolStripItem)mnuPopup_CollapseAll).Name = "mnuPopup_CollapseAll";2350 ((ToolStripItem)mnuPopup_CollapseAll).Size = new Size(186, 22);2351 ((ToolStripItem)mnuPopup_CollapseAll).Text = "~CollapseAll";2352 ((ToolStripItem)mnuPopup_ShowFlat).Name = "mnuPopup_ShowFlat";2353 ((ToolStripItem)mnuPopup_ShowFlat).Size = new Size(186, 22);2354 ((ToolStripItem)mnuPopup_ShowFlat).Text = "~Show Flat History";2355 ((ToolStripItem)mnuPopup_ShowFlat).Click += new EventHandler(mnuPopup_ShowFlat_Click);2356 ((ToolStripItem)menuItemSeparator).Name = "menuItemSeparator";2357 ((ToolStripItem)menuItemSeparator).Size = new Size(183, 6);2358 viCC.SetCommand((Component)(object)mnuPopup_ShowError, cmdShowError);2359 ((ToolStripItem)mnuPopup_ShowError).Name = "mnuPopup_ShowError";2360 ((ToolStripItem)mnuPopup_ShowError).Size = new Size(186, 22);2361 ((ToolStripItem)mnuPopup_ShowError).Text = "~ShowError";2362 viCC.SetCommand((Component)(object)mnuPopup_ConfigColumns, cmdConfigureColumns);2363 ((ToolStripItem)mnuPopup_ConfigColumns).Name = "mnuPopup_ConfigColumns";2364 ((ToolStripItem)mnuPopup_ConfigColumns).Size = new Size(186, 22);2365 ((ToolStripItem)mnuPopup_ConfigColumns).Text = "~Configure Columns";2366 ((ToolStripDropDownItem)mnuPopup_LogMode).DropDownItems.AddRange((ToolStripItem[])(object)new ToolStripItem[5]2367 {2368 (ToolStripItem)miLogMode_Show,2369 (ToolStripItem)menuItem3,2370 (ToolStripItem)miLogMode_Full,2371 (ToolStripItem)miLogMode_Error,2372 (ToolStripItem)miLogMode_None2373 });2374 ((ToolStripItem)mnuPopup_LogMode).Name = "mnuPopup_LogMode";2375 ((ToolStripItem)mnuPopup_LogMode).Size = new Size(186, 22);2376 ((ToolStripItem)mnuPopup_LogMode).Text = "~LogMode";2377 ((ToolStripItem)miLogMode_Show).Name = "miLogMode_Show";2378 ((ToolStripItem)miLogMode_Show).Size = new Size(103, 22);2379 ((ToolStripItem)miLogMode_Show).Text = "Show";2380 ((ToolStripItem)miLogMode_Show).Click += new EventHandler(miLogMode_Show_Click);2381 ((ToolStripItem)menuItem3).Name = "menuItem3";2382 ((ToolStripItem)menuItem3).Size = new Size(100, 6);2383 viCC.SetCommand((Component)(object)miLogMode_Full, cmdLogMode);2384 ((ToolStripItem)miLogMode_Full).Name = "miLogMode_Full";2385 ((ToolStripItem)miLogMode_Full).Size = new Size(103, 22);2386 ((ToolStripItem)miLogMode_Full).Tag = "Full";2387 ((ToolStripItem)miLogMode_Full).Text = "Full";2388 ((ToolStripItem)miLogMode_Full).Click += new EventHandler(mnuPopup_LogMode_Click);2389 viCC.SetCommand((Component)(object)miLogMode_Error, cmdLogMode);2390 ((ToolStripItem)miLogMode_Error).Name = "miLogMode_Error";2391 ((ToolStripItem)miLogMode_Error).Size = new Size(103, 22);2392 ((ToolStripItem)miLogMode_Error).Tag = "Error";2393 ((ToolStripItem)miLogMode_Error).Text = "Error";2394 ((ToolStripItem)miLogMode_Error).Click += new EventHandler(mnuPopup_LogMode_Click);2395 viCC.SetCommand((Component)(object)miLogMode_None, cmdLogMode);2396 ((ToolStripItem)miLogMode_None).Name = "miLogMode_None";2397 ((ToolStripItem)miLogMode_None).Size = new Size(103, 22);2398 ((ToolStripItem)miLogMode_None).Tag = "";2399 ((ToolStripItem)miLogMode_None).Text = "None";2400 ((ToolStripItem)miLogMode_None).Click += new EventHandler(mnuPopup_LogMode_Click);2401 viCC.SetCommand((Component)(object)mnuPopup_Monitor, cmdMonitorChain);2402 ((ToolStripItem)mnuPopup_Monitor).Name = "mnuPopup_Monitor";2403 ((ToolStripItem)mnuPopup_Monitor).Size = new Size(186, 22);2404 ((ToolStripItem)mnuPopup_Monitor).Text = "~Monitor JobChain";2405 viCC.SetCommand((Component)(object)mnuPopup_MonitorQueue, cmdMonitorQueue);2406 ((ToolStripItem)mnuPopup_MonitorQueue).Name = "mnuPopup_MonitorQueue";2407 ((ToolStripItem)mnuPopup_MonitorQueue).Size = new Size(186, 22);2408 ((ToolStripItem)mnuPopup_MonitorQueue).Text = "~Monitore Queue";2409 viCC.SetCommand((Component)(object)mnuPopup_ResetProcess, cmdResetProcess);2410 ((ToolStripItem)mnuPopup_ResetProcess).Name = "mnuPopup_ResetProcess";2411 ((ToolStripItem)mnuPopup_ResetProcess).Size = new Size(186, 22);2412 ((ToolStripItem)mnuPopup_ResetProcess).Text = "~Reset process";2413 viCC.SetCommand((Component)(object)mnuPopup_Defrost, cmdDefrost);2414 ((ToolStripItem)mnuPopup_Defrost).Name = "mnuPopup_Defrost";2415 ((ToolStripItem)mnuPopup_Defrost).Size = new Size(186, 22);2416 ((ToolStripItem)mnuPopup_Defrost).Text = "~Defrost Job";2417 viCC.SetCommand((Component)(object)mnuPopup_ContinueSuccess, cmdContinueSuccess);2418 ((ToolStripItem)mnuPopup_ContinueSuccess).Name = "mnuPopup_ContinueSuccess";2419 ((ToolStripItem)mnuPopup_ContinueSuccess).Size = new Size(186, 22);2420 ((ToolStripItem)mnuPopup_ContinueSuccess).Text = "~ContinueSuccess";2421 viCC.SetCommand((Component)(object)mnuPopup_ContinueError, cmdContinueError);2422 ((ToolStripItem)mnuPopup_ContinueError).Name = "mnuPopup_ContinueError";2423 ((ToolStripItem)mnuPopup_ContinueError).Size = new Size(186, 22);2424 ((ToolStripItem)mnuPopup_ContinueError).Text = "~ContinueError";2425 viCC.SetCommand((Component)(object)mnuPopup_Retries, cmdRetries);2426 ((ToolStripItem)mnuPopup_Retries).Name = "mnuPopup_Retries";2427 ((ToolStripItem)mnuPopup_Retries).Size = new Size(186, 22);2428 ((ToolStripItem)mnuPopup_Retries).Text = "~Retries";2429 viCC.SetCommand((Component)(object)mnuPopup_StartAt, cmdStartNow);2430 ((ToolStripItem)mnuPopup_StartAt).Name = "mnuPopup_StartAt";2431 ((ToolStripItem)mnuPopup_StartAt).Size = new Size(186, 22);2432 ((ToolStripItem)mnuPopup_StartAt).Text = "~StartAt";2433 tmrMonitor.Interval = 2000;2434 tmrMonitor.Tick += new EventHandler(tmrMonitor_Tick);2435 tlcJobChains.Appearance = new TreeListControlAppearance(paintDisabledNodesImageDisabled: true);2436 tlcJobChains.AutoExpandLimit = 50;2437 ((Control)tlcJobChains).BackColor = SystemColors.Window;2438 ((Control)tlcJobChains).ContextMenuStrip = cmPopup;2439 ((Control)tlcJobChains).Dock = (DockStyle)5;2440 tlcJobChains.HideSelection = false;2441 ((Control)tlcJobChains).Location = new Point(1, 1);2442 ((Control)tlcJobChains).Margin = new Padding(0);2443 tlcJobChains.Name = "tlcJobChains";2444 tlcJobChains.ScrollPadding = new Padding(0);2445 tlcJobChains.SelectionMode = SelectionMode.Multi;2446 tlcJobChains.ShowRootLines = false;2447 ((Control)tlcJobChains).Size = new Size(494, 372);2448 tlcJobChains.SubTextColor = Color.Blue;2449 ((Control)tlcJobChains).TabIndex = 1;2450 tlcJobChains.SelectedNodeChanged += tlcJobChains_SelectedNodeChanged;2451 tlcJobChains.NodeExpanding += tlcJobChains_NodeExpanding;2452 ((Control)tlcJobChains).KeyDown += new KeyEventHandler(tlcJobChains_KeyDown);2453 ((Control)tlcJobChains).KeyUp += new KeyEventHandler(tlcJobChains_KeyUp);2454 ((Control)tlcJobChains).MouseLeave += new EventHandler(tlcJobChains_MouseLeave);2455 ((Control)tlcJobChains).MouseMove += new MouseEventHandler(tlcJobChains_MouseMove);2456 viCC.Commands.AddRange(new Command[17]2457 {2458 cmdStartNow, cmdRetries, cmdResetProcess, cmdDefrost, cmdExpandAll, cmdExpandChilds, cmdCollapseAll, cmdContinueSuccess, cmdContinueError, cmdLogMode,2459 cmdMonitorQueue, cmdMonitorChain, cmdConfigureColumns, cmdDelete, cmdStartAt, cmdPriority, cmdShowError2460 });2461 viCC.ImageList = null;2462 viCC.ShowTextOnToolBar = false;2463 viCC.Tag = null;2464 viCC.ExecuteCommand += viCC_ExecuteCommand;2465 viCC.CommandsUpdating += new EventHandler(viCC_CommandsUpdating);2466 cmdExpandAll.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2467 cmdLogMode.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2468 cmdMonitorChain.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2469 cmdMonitorQueue.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2470 cmdResetProcess.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2471 cmdDefrost.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2472 cmdContinueSuccess.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible | MappingProperties.Text;2473 cmdContinueSuccess.Text = "~ContinueSuccess";2474 cmdContinueError.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible | MappingProperties.Text;2475 cmdContinueError.Text = "~ContinueError";2476 cmdRetries.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2477 cmdStartNow.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2478 cmdDelete.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2479 cmdStartAt.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2480 cmdPriority.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2481 cmdShowError.Properties = MappingProperties.Enabled | MappingProperties.Checked | MappingProperties.Visible;2482 ((Control)this).BackColor = SystemColors.ControlDark;2483 ((Control)this).Controls.Add((Control)(object)tlcJobChains);2484 ((Control)this).Name = "DCJobChains";2485 ((Control)this).Padding = new Padding(1);2486 ((Control)this).Size = new Size(496, 374);2487 ((Control)this).KeyUp += new KeyEventHandler(tlcJobChains_KeyUp);2488 ((Control)cmPopup).ResumeLayout(false);2489 ((Control)this).ResumeLayout(false);2490 }24912492 protected override void Dispose(bool disposing)2493 {2494 //IL_000c: Unknown result type (might be due to invalid IL or missing references)2495 //IL_0016: Expected O, but got Unknown2496 //IL_0022: Unknown result type (might be due to invalid IL or missing references)2497 //IL_002c: Expected O, but got Unknown2498 clsMain.Instance.ConnectionChanged -= new EventHandler(clsMain_ConnectionChanged);2499 clsMain.Instance.LayoutChanged -= new EventHandler(clsMain_LayoutChanged);2500 if (disposing && components != null)2501 {2502 ((System.IDisposable)components).Dispose();2503 }2504 ((ContainerControl)this).Dispose(disposing);2505 }2506}2507