IEnumerator Generate_Internal(VoidCallback callback) { _RoomList = CreateRooms(); Time.timeScale = 100f; while(true) { if (IsSeparationComplete(_RoomList)) { break; } yield return null; } Time.timeScale = 1f; Size tileMapSize = AdjustRoomPos(_RoomList); _MainRoomList = GetMainRooms(_RoomList); CreateTiles(tileMapSize, _RoomList); _MST = GetMST(_MainRoomList); CreateExit(); CreateCorridors(_MST); CreateMonsters(_MainRoomList); CreateFoods(_MainRoomList); callback(); }
/// <summary> /// Constructs HTML to PDF converter instance from <code>GlobalSettings</code>. /// </summary> /// <param name="config">global configuration object</param> public SimplePechkin() { this.onErrorDelegate = new StringCallback(this.OnError); this.onFinishedDelegate = new IntCallback(this.OnFinished); this.onPhaseChangedDelegate = new VoidCallback(this.OnPhaseChanged); this.onProgressChangedDelegate = new IntCallback(this.OnProgressChanged); this.onWarningDelegate = new StringCallback(this.OnWarning); Tracer.Trace(string.Format("T:{0} Created SimplePechkin", Thread.CurrentThread.Name)); }
/// <summary> /// Constructs HTML to PDF converter instance from <code>GlobalConfig</code>. /// </summary> /// <param name="config">global configuration object</param> public SimplePechkin(GlobalConfig config) { if (_log.IsTraceEnabled) _log.Trace("T:" + Thread.CurrentThread.Name + " Creating SimplePechkin"); // create and STORE delegates to protect them from GC _errorCallback = OnError; _finishedCallback = OnFinished; _phaseChangedCallback = OnPhaseChanged; _progressChangedCallback = OnProgressChanged; _warningCallback = OnWarning; PechkinStatic.InitLib(false); _globalConfig = config; if (_log.IsTraceEnabled) _log.Trace("T:" + Thread.CurrentThread.Name + " Created global config"); CreateConverter(); }
public static extern int wkhtmltopdf_set_progress_changed_callback(IntPtr converter, [MarshalAs(UnmanagedType.FunctionPtr)] VoidCallback callback);
public override void Refresh() { if (this.InvokeRequired) { VoidCallback d = new VoidCallback(Refresh); this.Invoke(d); } else { base.Refresh(); } }
/// <summary> /// Thread safe draw game /// </summary> public void DrawGame() { if (this.BoardPictureBox.InvokeRequired) { var d = new VoidCallback(DrawGame); this.Invoke(d); } else { var graphics = Graphics.FromImage(this.BoardImage); var blackBrush = new SolidBrush(Color.BurlyWood); var whiteBrush = new SolidBrush(Color.White); for (int i = 0; i < 64; ++i) { int x = (i % 8) * 30; int y = 210 - (i / 8) * 30; graphics.FillRectangle((i + (i / 8)) % 2 == 0 ? blackBrush : whiteBrush, x, y, 30, 30); var chessPiece = this.Game.Board.Fields[i]; if (chessPiece != ChessPiece.None) { Image chessPieceImage = null; switch (chessPiece) { case ChessPiece.BPawn: chessPieceImage = Resources.b_6_pawn; break; case ChessPiece.BKnight: chessPieceImage = Resources.b_4_knight; break; case ChessPiece.BBishop: chessPieceImage = Resources.b_3_bishop; break; case ChessPiece.BRook: chessPieceImage = Resources.b_5_rook; break; case ChessPiece.BQueen: chessPieceImage = Resources.b_2_queen; break; case ChessPiece.BKing: chessPieceImage = Resources.b_1_king; break; case ChessPiece.WPawn: chessPieceImage = Resources.w_6_pawn; break; case ChessPiece.WKnight: chessPieceImage = Resources.w_4_knight; break; case ChessPiece.WBishop: chessPieceImage = Resources.w_3_bishop; break; case ChessPiece.WRook: chessPieceImage = Resources.w_5_rook; break; case ChessPiece.WQueen: chessPieceImage = Resources.w_2_queen; break; case ChessPiece.WKing: chessPieceImage = Resources.w_1_king; break; } graphics.DrawImage(chessPieceImage, new Rectangle(x + 2, y + 2, 26, 26)); } } this.HistoryTextBox.Text = Game.GetHistoryAsText(); this.HistoryTextBox.ScrollToCaret(); this.BoardPictureBox.Image = this.BoardImage; } }
public void RemoveRecursively(VoidCallback successCallback, FileErrorCallback errorCallback = null) { }
public void UndoTransaction(int transactionId, VoidCallback callback) { if (CurrentTimeline == -1) throw new InvalidOperationException("No timeline has been started."); if (Syncing) { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters["timeline"] = CurrentTimeline.ToString(); parameters["transaction_id"] = transactionId.ToString(); GetResponse("rtm.transactions.undo", true, (r) => { callback(); }); } else { callback(); } }
public void requestPermission(VoidCallback callback) {}
protected internal override int SetProgressChangedCallback( IntPtr converter, VoidCallback callback) => WkHtmlToImageModule.SetProgressChangedCallback(converter, callback);
public void SetDefaultList(int? listId, int timeline, VoidCallback callback) { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("timeline", timeline.ToString()); if (listId.HasValue) parameters.Add("list_id", listId.ToString()); GetResponse("rtm.lists.setDefaultList", parameters, (r) => { callback(); }); }
public static void SetPhaseChangedCallback(IntPtr converter, VoidCallback callback) { Tracer.Trace("T:" + Thread.CurrentThread.Name + " Setting phase change callback (wkhtmltopdf_set_phase_changed_callback)"); PechkinBindings.wkhtmltopdf_set_phase_changed_callback(converter, callback); }
public int SetProgressChangedCallback(IntPtr converter, VoidCallback callback) { this.delegates.Add(callback); return(this.module.wkhtmltopdf_set_progress_changed_callback(converter, callback)); }
public InkRipple( MaterialInkController controller = null, RenderBox referenceBox = null, Offset position = null, Color color = null, bool containedInkWell = false, RectCallback rectCallback = null, BorderRadius borderRadius = null, ShapeBorder customBorder = null, double?radius = null, VoidCallback onRemoved = null ) : base( controller: controller, referenceBox: referenceBox, color: color, onRemoved: onRemoved) { D.assert(controller != null); D.assert(referenceBox != null); D.assert(color != null); D.assert(position != null); this._position = position; this._borderRadius = borderRadius ?? BorderRadius.zero; this._customBorder = customBorder; this._targetRadius = radius ?? InkRippleUtils._getTargetRadius(referenceBox, containedInkWell, rectCallback, position); this._clipCallback = InkRippleUtils._getClipCallback(referenceBox, containedInkWell, rectCallback); D.assert(this._borderRadius != null); this._fadeInController = new AnimationController(duration: InkRippleUtils._kFadeInDuration, vsync: controller.vsync); this._fadeInController.addListener(controller.markNeedsPaint); this._fadeInController.forward(); this._fadeIn = this._fadeInController.drive(new IntTween( begin: 0, end: color.alpha )); this._radiusController = new AnimationController( duration: InkRippleUtils._kUnconfirmedRippleDuration, vsync: controller.vsync); this._radiusController.addListener(controller.markNeedsPaint); this._radiusController.forward(); this._radius = this._radiusController.drive(new DoubleTween( begin: this._targetRadius * 0.30, end: this._targetRadius + 5.0 ).chain(_easeCurveTween) ); this._fadeOutController = new AnimationController( duration: InkRippleUtils._kFadeOutDuration, vsync: controller.vsync); this._fadeOutController.addListener(controller.markNeedsPaint); this._fadeOutController.addStatusListener(this._handleAlphaStatusChanged); this._fadeOut = this._fadeOutController.drive(new IntTween( begin: color.alpha, end: 0 ).chain(_fadeOutIntervalTween) ); controller.addInkFeature(this); }
public void removeListener(VoidCallback listener) { D.assert(this._debugAssertNotDisposed()); this._listeners.Remove(listener); }
public void addListener(VoidCallback listener) { D.assert(this._debugAssertNotDisposed()); this._listeners.Add(listener); }
public abstract void Generate(VoidCallback callback);
public override BoxPainter createBoxPainter(VoidCallback onChanged = null) { D.assert(onChanged != null || this.image == null); return(new _BoxDecorationPainter(this, onChanged)); }
public void DeleteTaskNode(int noteId, int timeline, VoidCallback callback) { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("timeline", timeline.ToString()); parameters.Add("note_id", noteId.ToString()); GetResponse("rtm.notes.delete", parameters, (response) => { callback(); }); }
public _BoxDecorationPainter(BoxDecoration decoration, VoidCallback onChanged) : base(onChanged) { D.assert(decoration != null); this._decoration = decoration; }
public abstract int SetProgressChangedCallback( IntPtr converter, VoidCallback callback);
public override int SetProgressChangedCallback( IntPtr converter, VoidCallback callback) { return(NativeMethodsPdf.wkhtmltopdf_set_progress_changed_callback(converter, callback)); }
public void remove(VoidCallback successCallback) {}
public LocalHistoryEntry(VoidCallback onRemove = null) { this.onRemove = onRemove; }
public void Unarchive(VoidCallback callback) { if (Syncing) { if (GetFlag(TaskListFlags.Archived)) { RestRequest request = new RestRequest("rtm.lists.unarchive"); request.Parameters.Add("timeline", Owner.GetTimeline().ToString()); request.Parameters.Add("list_id", Id.ToString()); request.Callback = (response) => { callback(); }; Owner.ExecuteRequest(request); SetFlag(TaskListFlags.Archived, false); } } SetFlag(TaskListFlags.Archived, false); }
internal void _routeSetState(VoidCallback fn) { this.setState(fn); }
public void ReadTransaction(SQLTransactionCallback callback, SQLTransactionErrorCallback errorCallback, VoidCallback successCallback) { }
public void addListener(VoidCallback listener) { this._repaint?.addListener(listener); }
public virtual void GoBack() { //thread safe call if (this.InvokeRequired) { VoidCallback callback = new VoidCallback(GoBack); this.Invoke(callback); } else { this.disabled = true; this.RedrawButtons(); this.Cursor = Cursors.WaitCursor; try { WizardPageBase selectedPage = this.SelectedPage; CancelEventArgs args = new CancelEventArgs(); selectedPage.OnBeforeMoveBack(args); if (!args.Cancel) { WizardPageBase prevPage = selectedPage.PreviousPage; this.SelectedPage = prevPage; if (prevPage != null) { prevPage.OnAfterDisplay(EventArgs.Empty); } } } finally { this.disabled = false; this.RedrawButtons(); this.Cursor = Cursors.Default; } } }
public void removeListener(VoidCallback listener) { this._repaint?.removeListener(listener); }
public static FloatingActionButton extended( Key key = null, string tooltip = null, Color foregroundColor = null, Color backgroundColor = null, object heroTag = null, float?elevation = null, float?highlightElevation = null, float?disabledElevation = null, VoidCallback onPressed = null, ShapeBorder shape = null, bool isExtended = true, MaterialTapTargetSize?materialTapTargetSize = null, Clip clipBehavior = Clip.none, Widget icon = null, Widget label = null ) { D.assert(elevation == null || elevation >= 0.0f); D.assert(highlightElevation == null || highlightElevation >= 0.0f); D.assert(disabledElevation == null || disabledElevation >= 0.0f); D.assert(label != null); heroTag = heroTag ?? new _DefaultHeroTag(); BoxConstraints _sizeConstraints = FloatActionButtonUtils._kExtendedSizeConstraints; bool mini = false; Widget child = new _ChildOverflowBox( child: new Row( mainAxisSize: MainAxisSize.min, children: icon == null ? new List <Widget> { new SizedBox(width: 20.0f), label, new SizedBox(width: 20.0f), } : new List <Widget> { new SizedBox(width: 16.0f), icon, new SizedBox(width: 8.0f), label, new SizedBox(width: 20.0f) })); return(new FloatingActionButton( key: key, child: child, tooltip: tooltip, foregroundColor: foregroundColor, backgroundColor: backgroundColor, heroTag: heroTag, elevation: elevation, highlightElevation: highlightElevation, disabledElevation: disabledElevation, onPressed: onPressed, mini: mini, shape: shape, clipBehavior: clipBehavior, materialTapTargetSize: materialTapTargetSize, isExtended: isExtended, _sizeConstraints: _sizeConstraints )); }
public CupertinoTextField( Key key = null, TextEditingController controller = null, FocusNode focusNode = null, BoxDecoration decoration = null, EdgeInsets padding = null, string placeholder = null, TextStyle placeholderStyle = null, Widget prefix = null, OverlayVisibilityMode prefixMode = OverlayVisibilityMode.always, Widget suffix = null, OverlayVisibilityMode suffixMode = OverlayVisibilityMode.always, OverlayVisibilityMode clearButtonMode = OverlayVisibilityMode.never, TextInputType keyboardType = null, TextInputAction?textInputAction = null, TextCapitalization textCapitalization = TextCapitalization.none, TextStyle style = null, StrutStyle strutStyle = null, TextAlign textAlign = TextAlign.left, TextAlignVertical textAlignVertical = null, bool readOnly = false, ToolbarOptions toolbarOptions = null, bool?showCursor = null, bool autofocus = false, bool obscureText = false, bool autocorrect = true, SmartDashesType?smartDashesType = null, SmartQuotesType?smartQuotesType = null, bool enableSuggestions = true, int?maxLines = 1, int?minLines = null, bool expands = false, int?maxLength = null, bool maxLengthEnforced = true, ValueChanged <string> onChanged = null, VoidCallback onEditingComplete = null, ValueChanged <string> onSubmitted = null, List <TextInputFormatter> inputFormatters = null, bool?enabled = null, float cursorWidth = 2.0f, Radius cursorRadius = null, Color cursorColor = null, ui.BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight, ui.BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight, Brightness?keyboardAppearance = null, EdgeInsets scrollPadding = null, DragStartBehavior dragStartBehavior = DragStartBehavior.start, bool enableInteractiveSelection = true, GestureTapCallback onTap = null, ScrollController scrollController = null, ScrollPhysics scrollPhysics = null ) : base(key: key) { this.smartDashesType = smartDashesType ?? (obscureText ? SmartDashesType.disabled : SmartDashesType.enabled); this.smartQuotesType = smartQuotesType ?? (obscureText ? SmartQuotesType.disabled : SmartQuotesType.enabled); D.assert(maxLines == null || maxLines > 0); D.assert(minLines == null || minLines > 0); D.assert(maxLines == null || minLines == null || maxLines >= minLines, () => "minLines can't be greater than maxLines"); D.assert(!expands || (maxLines == null && minLines == null), () => "minLines and maxLines must be null when expands is true."); D.assert(maxLength == null || maxLength > 0); this.controller = controller; this.focusNode = focusNode; this.decoration = decoration ?? CupertinoTextFieldUtils._kDefaultRoundedBorderDecoration; this.padding = padding ?? EdgeInsets.all(6.0f); this.placeholder = placeholder; this.placeholderStyle = placeholderStyle ?? new TextStyle( fontWeight: FontWeight.w400, color: CupertinoColors.placeholderText ); this.prefix = prefix; this.prefixMode = prefixMode; this.suffix = suffix; this.suffixMode = suffixMode; this.clearButtonMode = clearButtonMode; this.textInputAction = textInputAction; this.textCapitalization = textCapitalization; this.style = style; this.strutStyle = strutStyle; this.textAlign = textAlign; this.textAlignVertical = textAlignVertical; this.readOnly = readOnly; this.showCursor = showCursor; this.autofocus = autofocus; this.obscureText = obscureText; this.autocorrect = autocorrect; this.enableSuggestions = enableSuggestions; this.maxLines = maxLines; this.minLines = minLines; this.expands = expands; this.maxLength = maxLength; this.maxLengthEnforced = maxLengthEnforced; this.onChanged = onChanged; this.onEditingComplete = onEditingComplete; this.onSubmitted = onSubmitted; this.inputFormatters = inputFormatters; this.enabled = enabled; this.cursorWidth = cursorWidth; this.cursorRadius = cursorRadius ?? Radius.circular(2.0f); this.cursorColor = cursorColor; this.selectionHeightStyle = selectionHeightStyle; this.selectionWidthStyle = selectionWidthStyle; this.keyboardAppearance = keyboardAppearance; this.scrollPadding = scrollPadding ?? EdgeInsets.all(20.0f); this.dragStartBehavior = dragStartBehavior; this.enableInteractiveSelection = enableInteractiveSelection; this.scrollPhysics = scrollPhysics; this.onTap = onTap; this.scrollController = scrollController; this.keyboardType = keyboardType ?? (maxLines == 1 ? TextInputType.text : TextInputType.multiline); this.toolbarOptions = toolbarOptions ?? (obscureText ? new ToolbarOptions( selectAll: true, paste: true ) : new ToolbarOptions( copy: true, cut: true, selectAll: true, paste: true )); }
public void setRemoteDescription(RTCSessionDescription description, VoidCallback successCallback, RTCErrorCallback failureCallback) {}
public override void initState() { base.initState(); this._showBottomSheetCallback = this._showBottomSheet; }
public void DeleteContactGroup(int groupId, int timeline, VoidCallback callback) { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("group_id", groupId.ToString()); parameters.Add("timeline", timeline.ToString()); GetResponse("rtm.groups.delete", parameters, (response) => { callback(); }); }
public void AddTask(string name, bool parse, string listId, VoidCallback callback) { if (Client is RestClient) { GetOrStartTimeline((t) => { (Client as RestClient).AddTask(name, parse, listId, CurrentTimeline, (list) => { CacheTasks(() => { callback(); }); }); }); } }
public void RemoveContactFromContactGroup(int contactId, int groupId, int timeline, VoidCallback callback) { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("timeline", timeline.ToString()); parameters.Add("group_id", groupId.ToString()); parameters.Add("contact_id", contactId.ToString()); GetResponse("rtm.groups.removeContact", (response) => { callback(); }); }
public void CacheTasks(VoidCallback callback) { if (!Syncing) throw new InvalidOperationException(); // Get the tasks asynchronously. var taskLists = TaskLists; Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters["filter"] = "status:incomplete"; GetResponse("rtm.tasks.getList", parameters, (response) => { LoadTasksFromResponse(response); if (CacheTasksEvent != null) CacheTasksEvent(response); callback(); }); }
protected internal abstract int SetProgressChangedCallback( IntPtr converter, VoidCallback callback);
public abstract int SetPhaseChangedCallback( IntPtr converter, VoidCallback callback);
public void CacheLocations(VoidCallback callback) { GetResponse("rtm.locations.getList", response => { LoadLocationsFromResponse(response); if (CacheLocationsEvent != null) CacheLocationsEvent(response); callback(); }); }
internal DecorationImagePainter(DecorationImage details, VoidCallback onChanged) { D.assert(details != null); this._details = details; this._onChanged = onChanged; }
public void UndoTransaction(Transaction transaction, VoidCallback callback) { UndoTransaction(transaction.Id, callback); }
public DecorationImagePainter createPainter(VoidCallback onChanged) { D.assert(onChanged != null); return(new DecorationImagePainter(this, onChanged)); }
public void removeRecursively(VoidCallback successCallback, ErrorCallback errorCallback) {}
public abstract ScrollHoldController hold(VoidCallback holdCancelCallback);
public void remove(VoidCallback successCallback, ErrorCallback errorCallback) {}
public abstract Drag drag(DragStartDetails details, VoidCallback dragCancelCallback);
public void AddTask(Task task, VoidCallback callback) { // Freeze this task list so that we don't needlessly resync a smart-list // while adding a task to it. bool previousFreezeState = mIsFrozen; mIsFrozen = true; try { Tasks.Add(task); } finally { mIsFrozen = previousFreezeState; } }
public DialogDemoItem(Key key = null, IconData icon = null, Color color = null, string text = null, VoidCallback onPressed = null) : base(key: key) { this.icon = icon; this.color = color; this.text = text; this.onPressed = onPressed; }
public static void SetPhaseChangedCallback(IntPtr converter, VoidCallback callback) { if (Log.IsTraceEnabled) { Log.Trace("T:" + Thread.CurrentThread.Name + " Setting phase change callback (wkhtmltopdf_set_phase_changed_callback)"); } PechkinBindings.wkhtmltopdf_set_phase_changed_callback(converter, callback); }
public override BoxPainter createBoxPainter(VoidCallback onChanged = null) { return(new _CustomEdgeShadowPainter(this, onChanged)); }
public void ChangeVersion(JsString oldVersion, JsString newVersion, SQLTransactionCallback callback, SQLTransactionErrorCallback errorCallback, VoidCallback successCallback) { }
public override void addListener(VoidCallback listener) { }
public void RemoveRecursively(VoidCallback successCallback) { }
public override void addListener(VoidCallback listener) { this.parent.addListener(listener); }
/// <summary> /// Reloads application /// </summary> internal void ReloadApplication() { //thread safe call if (this.InvokeRequired) { VoidCallback callback = new VoidCallback(ReloadApplication); this.Invoke(callback); } else { AppConfigManager.LoadConfiguration(); Update(); //LoadConfiguration(); ScopeNode componentsNode = scopeTree.Nodes[0] as ScopeNode; componentsNode.Nodes.Clear(); componentsNode.Populated = false; OnScopeTreeAfterSelect(scopeTree, new TreeViewEventArgs(componentsNode)); } }
public override void removeListener(VoidCallback listener) { this.parent.removeListener(listener); }
public virtual void GoNext() { //thread safe call if (this.InvokeRequired) { VoidCallback callback = new VoidCallback(GoNext); this.Invoke(callback); } else { if (this.SelectedPage != null) { this.disabled = true; this.RedrawButtons(); this.Cursor = Cursors.WaitCursor; try { WizardPageBase selectedPage = this.SelectedPage; CancelEventArgs args = new CancelEventArgs(); selectedPage.OnBeforeMoveNext(args); if (!args.Cancel) { if (selectedPage.NextPage == null) { this.OnFinish(EventArgs.Empty); } else { WizardPageBase nextPage = selectedPage.NextPage; if (nextPage != null) { nextPage.OnBeforeDisplay(EventArgs.Empty); } this.SelectedPage = nextPage; if (nextPage != null) { nextPage.OnAfterDisplay(EventArgs.Empty); } } } } finally { this.disabled = false; this.RedrawButtons(); this.Cursor = Cursors.Default; } } } }
public override void removeListener(VoidCallback listener) { }