IEnumerator<ITask> OnLoadHandler(OnLoad onLoad) { _driveControl = onLoad.DriveControl; LogInfo("Loaded Form"); yield return EnumerateJoysticks(); yield return SubscribeToJoystick(); }
void OnLoadHandler(OnLoad onLoad) { LogInfo("Video Viewer Loaded!"); _form = onLoad.Form; }
/// <summary> /// Handle the Form Load event for the ObstacleAvoidance Form /// </summary> /// <param name="onLoad">The load message</param> /// <returns>An iterator</returns> private IEnumerator<ITask> OnLoadHandler(OnLoad onLoad) { this.obstacleAvoidanceForm = onLoad.ObstacleAvoidanceForm; LogInfo("Loaded Form"); yield return this.SubscribeToJoystick(); }
public bool Read() { if (IsComplete()) { return(false); } _fileStream.ReadByte(); // Пропускаю стартовый байт элемента данных _fileStream.Read(_buffer, 0, _buffer.Length); int Index = 0; object value; Field field; string dbfValue; for (int i = 0; i < _fields.Length; i++) { field = _fields[i]; dbfValue = _encoding.GetString(_buffer, Index, field.Size) .TrimEnd((char)0x00, (char)0x20); Index += field.Size; if (!string.IsNullOrEmpty(dbfValue)) { switch (field.Type) { case 'L': value = StringComparer.Ordinal.Equals(dbfValue, "T"); break; case 'D': value = DateTime.ParseExact(dbfValue, "yyyyMMdd", _dateTimeFormat); break; case 'N': { if (field.Digits == 0) { value = int.Parse(dbfValue, _numberFormat); } else { value = decimal.Parse(dbfValue, _numberFormat); } } break; case 'F': value = double.Parse(dbfValue, _numberFormat); break; default: value = dbfValue; break; } } else { value = DBNull.Value; } _fieldValues[i] = value; } _readedRow++; _step++; if (_step >= 20000 || IsComplete()) { OnLoad?.Invoke(_step); _step = 0; } return(true); }
public async Task __ModelLoad__() { OnLoad?.Invoke(); }
public void Load(string placementId) { loaded = true; OnLoad?.Invoke(this, new EventArgs()); }
protected virtual void Load(EventArgs e) => OnLoad?.Invoke(this, e);
public ManagerBase2() { HostContext.Current.OnInitialize += delegate(object sender, EventArgs a) { try { Initialize(); } catch { } if (OnInitialize != null) { try { OnInitialize.Invoke(this, EventArgs.Empty); } catch (Exception) { } } }; HostContext.Current.OnBeforeQuerySettings += delegate(object sender, EventArgs a) { if (OnBeforeQuerySettings != null) { try { OnBeforeQuerySettings.Invoke(this, EventArgs.Empty); } catch (Exception) { } } try { QuerySettings(); } catch (Exception) { } }; HostContext.Current.OnAfterQuerySettings += delegate(object sender, EventArgs a) { if (OnAfterQuerySettings != null) { try { OnAfterQuerySettings.Invoke(this, EventArgs.Empty); } catch (Exception) { } } }; HostContext.Current.OnLoad += delegate(object sender, EventArgs a) { if (OnLoad != null) { try { OnLoad.Invoke(this, EventArgs.Empty); } catch (Exception) { } } try { Load(); } catch (Exception) { } }; HostContext.Current.OnLoad += delegate(object sender, EventArgs a) { try { FinishedLoading(); } catch (Exception) { } if (OnFinishedLoad != null) { try { OnFinishedLoad.Invoke(this, EventArgs.Empty); } catch (Exception) { } } }; }
public void LoadGameData(int fileNum) { Debug.Log("Game Loaded"); OnLoad?.Invoke(fileNum); }
/// <summary> /// Calls the OnLoad event. /// </summary> private static void CallOnLoad() { OnLoad?.Invoke(MethodBase.GetCurrentMethod().DeclaringType, EventArgs.Empty); }