VI.Transport.Wizards/VI.Transport.Wizards/ModuleGuid.cs
Decompiler Source FileVI.Transport.Wizards.ModuleGuidDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- CallMethodAsync: SwitchToModuleGuid at line 164
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.
None extracted.
Summary: classes ModuleGuid; methods MoveNext, SetStateMachine, _InitializeComponent, pageExportProgress_ShowFromNext, workerExport_DoWork, workerExport_RunWorkerCompleted
Classes
ModuleGuidMethods
DB/Dialog object references
None extracted.
OIM key/entity markers
None extracted.API/entity calls
None extracted.Registrations / handlers
None extracted.
Complete Source
1using System;2using System.Collections;3using System.Collections.Generic;4using System.ComponentModel;5using System.Diagnostics;6using System.Drawing;7using System.Linq;8using System.Runtime.CompilerServices;9using System.Runtime.InteropServices;10using System.Threading;11using System.Windows.Forms;12using VI.Base;13using VI.CommonDialogs;14using VI.Controls;15using VI.Controls.Wizard;16using VI.DB;17using VI.DB.Entities;18using VI.FormBase;19using VI.FormBase.CommandCenter;20using VI.ImageLibrary;21using VI.Transport.UI;22using VI.UI.Controls.Common;2324namespace VI.Transport.Wizards;2526public class ModuleGuid : Form27{28 [StructLayout((LayoutKind)3)]29 [CompilerGenerated]30 private struct _003CworkerExport_DoWork_003Ed__8 : IAsyncStateMachine31 {32 public int _003C_003E1__state;3334 public AsyncVoidMethodBuilder _003C_003Et__builder;3536 public ModuleGuid _003C_003E4__this;3738 public DoWorkEventArgs e;3940 private ISession _003Csession_003E5__2;4142 private TransportProgress _003Ctp_003E5__3;4344 private int _003CiMax_003E5__4;4546 private int _003CiPos_003E5__5;4748 private IUnitOfWork _003CunitOf_003E5__6;4950 private DbObjectKey[] _003C_003E7__wrap6;5152 private int _003C_003E7__wrap7;5354 private IEntity _003Centity_003E5__9;5556 private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__1;5758 private ConfiguredValueTaskAwaiter _003C_003Eu__2;5960 private ConfiguredTaskAwaiter _003C_003Eu__3;6162 private void MoveNext()63 {64 //IL_0113: Unknown result type (might be due to invalid IL or missing references)65 //IL_0118: Unknown result type (might be due to invalid IL or missing references)66 //IL_0120: Unknown result type (might be due to invalid IL or missing references)67 //IL_0199: Unknown result type (might be due to invalid IL or missing references)68 //IL_019e: Unknown result type (might be due to invalid IL or missing references)69 //IL_01a6: Unknown result type (might be due to invalid IL or missing references)70 //IL_0212: Unknown result type (might be due to invalid IL or missing references)71 //IL_0217: Unknown result type (might be due to invalid IL or missing references)72 //IL_021f: Unknown result type (might be due to invalid IL or missing references)73 //IL_014c: Unknown result type (might be due to invalid IL or missing references)74 //IL_015b: Unknown result type (might be due to invalid IL or missing references)75 //IL_0160: Unknown result type (might be due to invalid IL or missing references)76 //IL_0164: Unknown result type (might be due to invalid IL or missing references)77 //IL_0169: Unknown result type (might be due to invalid IL or missing references)78 //IL_01c9: Unknown result type (might be due to invalid IL or missing references)79 //IL_01d4: Unknown result type (might be due to invalid IL or missing references)80 //IL_01d9: Unknown result type (might be due to invalid IL or missing references)81 //IL_01dd: Unknown result type (might be due to invalid IL or missing references)82 //IL_01e2: Unknown result type (might be due to invalid IL or missing references)83 //IL_017e: Unknown result type (might be due to invalid IL or missing references)84 //IL_0180: Unknown result type (might be due to invalid IL or missing references)85 //IL_01f7: Unknown result type (might be due to invalid IL or missing references)86 //IL_01f9: Unknown result type (might be due to invalid IL or missing references)87 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)88 //IL_00d5: Unknown result type (might be due to invalid IL or missing references)89 //IL_00da: Unknown result type (might be due to invalid IL or missing references)90 //IL_00de: Unknown result type (might be due to invalid IL or missing references)91 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)92 //IL_00f8: Unknown result type (might be due to invalid IL or missing references)93 //IL_00fa: Unknown result type (might be due to invalid IL or missing references)94 int num = _003C_003E1__state;95 ModuleGuid moduleGuid = _003C_003E4__this;96 try97 {98 _ = 2;99 try100 {101 DbObjectKey[] array = default(DbObjectKey[]);102 if ((uint)num > 2u)103 {104 array = moduleGuid.Variables.Resolve<DbObjectKey[]>();105 _003Csession_003E5__2 = moduleGuid.Variables.Session();106 _003Ctp_003E5__3 = new TransportProgress();107 moduleGuid.pageProgress.Progress = _003Ctp_003E5__3;108 _003CiMax_003E5__4 = array.Length;109 _003CiPos_003E5__5 = 0;110 _003CunitOf_003E5__6 = _003Csession_003E5__2.StartUnitOfWork();111 }112 try113 {114 ConfiguredTaskAwaiter<IEntity> val3;115 ConfiguredValueTaskAwaiter val2;116 ConfiguredTaskAwaiter val;117 IEntity result;118 ConfiguredValueTaskAwaitable val4;119 ConfiguredTaskAwaitable val5;120 switch (num)121 {122 default:123 _003C_003E7__wrap6 = array;124 _003C_003E7__wrap7 = 0;125 goto IL_025c;126 case 0:127 val3 = _003C_003Eu__1;128 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);129 num = (_003C_003E1__state = -1);130 goto IL_012f;131 case 1:132 val2 = _003C_003Eu__2;133 _003C_003Eu__2 = default(ConfiguredValueTaskAwaiter);134 num = (_003C_003E1__state = -1);135 goto IL_01b5;136 case 2:137 {138 val = _003C_003Eu__3;139 _003C_003Eu__3 = default(ConfiguredTaskAwaiter);140 num = (_003C_003E1__state = -1);141 goto IL_022e;142 }143 IL_025c:144 if (_003C_003E7__wrap7 < _003C_003E7__wrap6.Length)145 {146 DbObjectKey key = _003C_003E7__wrap6[_003C_003E7__wrap7];147 _003Ctp_003E5__3.SetCurrent(_003CiPos_003E5__5, _003CiMax_003E5__4);148 val3 = _003Csession_003E5__2.Source().GetAsync(key, moduleGuid._ct).ConfigureAwait(false)149 .GetAwaiter();150 if (!val3.IsCompleted)151 {152 num = (_003C_003E1__state = 0);153 _003C_003Eu__1 = val3;154 ((AsyncVoidMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CworkerExport_DoWork_003Ed__8>(ref val3, ref this);155 return;156 }157 goto IL_012f;158 }159 _003C_003E7__wrap6 = null;160 break;161 IL_012f:162 result = val3.GetResult();163 _003Centity_003E5__9 = result;164 val4 = _003Centity_003E5__9.CallMethodAsync("SwitchToModuleGuid", moduleGuid._ct).ConfigureAwait(false);165 val2 = ((ConfiguredValueTaskAwaitable)(ref val4)).GetAwaiter();166 if (!((ConfiguredValueTaskAwaiter)(ref val2)).IsCompleted)167 {168 num = (_003C_003E1__state = 1);169 _003C_003Eu__2 = val2;170 ((AsyncVoidMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter, _003CworkerExport_DoWork_003Ed__8>(ref val2, ref this);171 return;172 }173 goto IL_01b5;174 IL_022e:175 ((ConfiguredTaskAwaiter)(ref val)).GetResult();176 _003CiPos_003E5__5++;177 _003Centity_003E5__9 = null;178 _003C_003E7__wrap7++;179 goto IL_025c;180 IL_01b5:181 ((ConfiguredValueTaskAwaiter)(ref val2)).GetResult();182 val5 = _003CunitOf_003E5__6.PutAsync(_003Centity_003E5__9, moduleGuid._ct).ConfigureAwait(false);183 val = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();184 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)185 {186 num = (_003C_003E1__state = 2);187 _003C_003Eu__3 = val;188 ((AsyncVoidMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CworkerExport_DoWork_003Ed__8>(ref val, ref this);189 return;190 }191 goto IL_022e;192 }193 }194 finally195 {196 if (num < 0 && _003CunitOf_003E5__6 != null)197 {198 ((System.IDisposable)_003CunitOf_003E5__6).Dispose();199 }200 }201 _003CunitOf_003E5__6 = null;202 _003Csession_003E5__2 = null;203 _003Ctp_003E5__3 = null;204 }205 catch (System.Exception result2)206 {207 e.Result = result2;208 }209 }210 catch (System.Exception exception)211 {212 _003C_003E1__state = -2;213 ((AsyncVoidMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);214 return;215 }216 _003C_003E1__state = -2;217 ((AsyncVoidMethodBuilder)(ref _003C_003Et__builder)).SetResult();218 }219220 [DebuggerHidden]221 private void SetStateMachine(IAsyncStateMachine stateMachine)222 {223 ((AsyncVoidMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);224 }225 }226227 private LanguageManager LM = LanguageManager.Instance;228229 private Wizard _ownerWizard;230231 private bool m_bCancelWorker;232233 private CancellationToken _ct;234235 private Wizard wizard;236237 private TranslatorComponent Translator;238239 private PageConnect pageConnect;240241 private PageSelectObjects pageSelectObjects;242243 private PageProgress pageProgress;244245 private PageDBQueue pageDbQueue;246247 private CommandCenter viCC;248249 private IContainer components;250251 private StockImageComponent imageLib;252253 private IVarContext Variables => _ownerWizard.Variables;254255 public string Description => LanguageManager.Instance["ModuleGuid_Description"];256257 public string Name => LanguageManager.Instance["ModuleGuid_Name"];258259 public Image Image => ImageHandler.GetImage(StockImage.Refresh, ImageSize.Large);260261 public string PluginID => "ModuleGuid";262263 public int SortOrder => 50;264265 private void _InitializeComponent()266 {267 pageSelectObjects.Header.Title = LM["headerExportFile_Title"];268 pageSelectObjects.Header.Description = LM["headerExportFile_Description"];269 pageDbQueue.Header.Title = LM["headerExportTask_Title"];270 pageDbQueue.Header.Description = LM["headerExportTask_Description"];271 pageProgress.Header.Title = LM["headerExportProgress_Title"];272 pageProgress.Header.Description = LM["headerExportProgress_Description"];273 }274275 private void pageExportProgress_ShowFromNext(object sender, EventArgs e)276 {277 try278 {279 using (new WaitCursor())280 {281 _ownerWizard.NextEnabled = false;282 _ownerWizard.BackEnabled = false;283 m_bCancelWorker = false;284 }285 }286 catch (System.Exception ex)287 {288 _ownerWizard.NextEnabled = true;289 _ownerWizard.BackEnabled = true;290 ExceptionDialog.Show((Form)(object)this, ex);291 }292 }293294 [AsyncStateMachine(typeof(_003CworkerExport_DoWork_003Ed__8))]295 private void workerExport_DoWork(object sender, DoWorkEventArgs e)296 {297 //IL_0002: Unknown result type (might be due to invalid IL or missing references)298 //IL_0007: Unknown result type (might be due to invalid IL or missing references)299 _003CworkerExport_DoWork_003Ed__8 _003CworkerExport_DoWork_003Ed__ = default(_003CworkerExport_DoWork_003Ed__8);300 _003CworkerExport_DoWork_003Ed__._003C_003Et__builder = AsyncVoidMethodBuilder.Create();301 _003CworkerExport_DoWork_003Ed__._003C_003E4__this = this;302 _003CworkerExport_DoWork_003Ed__.e = e;303 _003CworkerExport_DoWork_003Ed__._003C_003E1__state = -1;304 ((AsyncVoidMethodBuilder)(ref _003CworkerExport_DoWork_003Ed__._003C_003Et__builder)).Start<_003CworkerExport_DoWork_003Ed__8>(ref _003CworkerExport_DoWork_003Ed__);305 }306307 private void workerExport_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)308 {309 _ownerWizard.NextEnabled = true;310 _ownerWizard.BackEnabled = true;311 if (e.Result is System.Exception)312 {313 ShowException((System.Exception)e.Result);314 }315 else if (((List<TransportError>)Variables.Transport().Errors).Count == 0)316 {317 _ownerWizard.Next();318 }319 }320321 private void ShowException(System.Exception ex)322 {323 if (((Control)this).InvokeRequired)324 {325 ((Control)this).Invoke((System.Delegate)(object)new Action<System.Exception>(ShowException), new object[1] { ex });326 return;327 }328 ExceptionDialog.Show((Form)(object)this, ex);329 if (Variables.Transport() != null && ((List<TransportError>)Variables.Transport().Errors).Count == 0)330 {331 ((List<TransportError>)Variables.Transport().Errors).Add(TransportError.FromException(ex));332 }333 }334335 public WizardPage[] GetPages()336 {337 if (wizard == null)338 {339 InitializeComponent();340 _InitializeComponent();341 }342 return Enumerable.ToArray<WizardPage>(Enumerable.OfType<WizardPage>((System.Collections.IEnumerable)wizard.Pages));343 }344345 public void Initialize(Wizard wizard)346 {347 _ownerWizard = wizard;348 }349350 private void pageConnect_CloseFromNext(object sender, PageEventArgs e)351 {352 Transport transport = new Transport(pageConnect.Session);353 transport.InitFile();354 Variables.Put(TransportVariables.Transport, transport);355 }356357 private void InitializeComponent()358 {359 //IL_0001: Unknown result type (might be due to invalid IL or missing references)360 //IL_000b: Expected O, but got Unknown361 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)362 //IL_0154: Unknown result type (might be due to invalid IL or missing references)363 //IL_01ae: Unknown result type (might be due to invalid IL or missing references)364 //IL_01c8: Unknown result type (might be due to invalid IL or missing references)365 //IL_0202: Unknown result type (might be due to invalid IL or missing references)366 //IL_0238: Unknown result type (might be due to invalid IL or missing references)367 //IL_0249: Unknown result type (might be due to invalid IL or missing references)368 //IL_0273: Unknown result type (might be due to invalid IL or missing references)369 //IL_02a1: Unknown result type (might be due to invalid IL or missing references)370 //IL_02d7: Unknown result type (might be due to invalid IL or missing references)371 //IL_02e8: Unknown result type (might be due to invalid IL or missing references)372 //IL_0312: Unknown result type (might be due to invalid IL or missing references)373 //IL_0353: Unknown result type (might be due to invalid IL or missing references)374 //IL_035d: Expected O, but got Unknown375 //IL_036a: Unknown result type (might be due to invalid IL or missing references)376 //IL_0374: Expected O, but got Unknown377 //IL_0381: Unknown result type (might be due to invalid IL or missing references)378 //IL_038b: Expected O, but got Unknown379 //IL_0391: Unknown result type (might be due to invalid IL or missing references)380 //IL_03c7: Unknown result type (might be due to invalid IL or missing references)381 //IL_03d8: Unknown result type (might be due to invalid IL or missing references)382 //IL_0402: Unknown result type (might be due to invalid IL or missing references)383 //IL_0456: Unknown result type (might be due to invalid IL or missing references)384 //IL_0467: Unknown result type (might be due to invalid IL or missing references)385 //IL_0491: Unknown result type (might be due to invalid IL or missing references)386 //IL_04db: Unknown result type (might be due to invalid IL or missing references)387 components = (IContainer)new Container();388 viCC = new CommandCenter(components);389 imageLib = new StockImageComponent();390 Translator = new TranslatorComponent();391 wizard = new Wizard();392 pageDbQueue = new PageDBQueue();393 pageProgress = new PageProgress();394 pageSelectObjects = new PageSelectObjects();395 pageConnect = new PageConnect();396 ((ISupportInitialize)Translator).BeginInit();397 ((Control)wizard).SuspendLayout();398 ((Control)this).SuspendLayout();399 viCC.ImageList = null;400 viCC.ShowTextOnToolBar = false;401 viCC.Tag = null;402 imageLib.DefaultImageProperty = null;403 Translator.SetTextProperty((IComponent)(object)imageLib, null);404 ((Control)wizard).BackColor = Color.White;405 ((Control)wizard).Controls.Add((Control)(object)pageProgress);406 ((Control)wizard).Controls.Add((Control)(object)pageSelectObjects);407 ((Control)wizard).Controls.Add((Control)(object)pageConnect);408 ((Control)wizard).Controls.Add((Control)(object)pageDbQueue);409 ((Control)wizard).Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);410 ((Control)wizard).Location = new Point(0, 0);411 ((Control)wizard).Name = "wizard";412 wizard.Pages.AddRange(new WizardPage[4] { pageConnect, pageSelectObjects, pageProgress, pageDbQueue });413 wizard.PanelBackColor = SystemColors.Window;414 ((Control)wizard).Size = new Size(640, 480);415 ((Control)wizard).TabIndex = 1;416 Translator.SetTextProperty((IComponent)(object)wizard, null);417 ((Control)wizard).Visible = false;418 ((Control)pageDbQueue).BackColor = Color.White;419 ((Control)pageDbQueue).Dock = (DockStyle)5;420 pageDbQueue.HelpTopic = null;421 pageDbQueue.IsFinishPage = false;422 ((Control)pageDbQueue).Location = new Point(0, 0);423 ((Control)pageDbQueue).Margin = new Padding(0);424 ((Control)pageDbQueue).Name = "pageDbQueue";425 ((Control)pageDbQueue).Size = new Size(640, 432);426 ((Control)pageDbQueue).TabIndex = 1;427 Translator.SetTextProperty((IComponent)(object)pageDbQueue, null);428 ((Control)pageProgress).BackColor = Color.White;429 ((Control)pageProgress).Dock = (DockStyle)5;430 pageProgress.HelpTopic = null;431 pageProgress.IsFinishPage = false;432 ((Control)pageProgress).Location = new Point(0, 0);433 ((Control)pageProgress).Margin = new Padding(0);434 ((Control)pageProgress).Name = "pageProgress";435 ((Control)pageProgress).Size = new Size(640, 432);436 ((Control)pageProgress).TabIndex = 4;437 Translator.SetTextProperty((IComponent)(object)pageProgress, null);438 ((Control)pageProgress).Visible = false;439 pageProgress.WorkerDo += new DoWorkEventHandler(workerExport_DoWork);440 pageProgress.WorkerDone += new RunWorkerCompletedEventHandler(workerExport_RunWorkerCompleted);441 pageProgress.ShowFromNext += new EventHandler(pageExportProgress_ShowFromNext);442 ((Control)pageSelectObjects).BackColor = Color.White;443 ((Control)pageSelectObjects).Dock = (DockStyle)5;444 pageSelectObjects.HelpTopic = null;445 pageSelectObjects.IsFinishPage = false;446 ((Control)pageSelectObjects).Location = new Point(0, 0);447 ((Control)pageSelectObjects).Margin = new Padding(0);448 ((Control)pageSelectObjects).Name = "pageSelectObjects";449 ((Control)pageSelectObjects).Size = new Size(640, 432);450 ((Control)pageSelectObjects).TabIndex = 5;451 Translator.SetTextProperty((IComponent)(object)pageSelectObjects, null);452 ((Control)pageConnect).Dock = (DockStyle)5;453 pageConnect.HelpTopic = null;454 pageConnect.IsFinishPage = false;455 ((Control)pageConnect).Location = new Point(0, 0);456 ((Control)pageConnect).Margin = new Padding(0);457 ((Control)pageConnect).Name = "pageConnect";458 ((Control)pageConnect).Size = new Size(640, 432);459 ((Control)pageConnect).TabIndex = 7;460 Translator.SetTextProperty((IComponent)(object)pageConnect, null);461 pageConnect.CloseFromNext += pageConnect_CloseFromNext;462 ((Form)this).ClientSize = new Size(655, 493);463 ((Control)this).Controls.Add((Control)(object)wizard);464 Translator.SetTextProperty((IComponent)(object)this, null);465 ((ISupportInitialize)Translator).EndInit();466 ((Control)wizard).ResumeLayout(false);467 ((Control)this).ResumeLayout(false);468 }469}470