/// <summary> /// Flips an image. /// Fires an event containing the flipped image to display listeners. /// </summary> /// <param name="imageKey"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="rotateDegrees"></param> public void FlipImage(string key, int width, int height, bool flipVeritcal, bool flipHorizontal) { Image image = _imageManager.FlipImage(key, width, height, flipVeritcal, flipHorizontal); DisplayEventArgs args = new DisplayEventArgs(image); DisplayEvent(this, args); }
/// <summary> /// Resizes an image. /// Fires an event containing the resized image to display listeners. /// </summary> /// <param name="imageKey"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="rotateDegrees"></param> public void ResizeImage(string imageKey, int width, int height) { Image image = _imageManager.Resize(imageKey, width, height); DisplayEventArgs args = new DisplayEventArgs(image); DisplayEvent(this, args); }
public void DisplayManager_OnAnimationCompleted(DisplayEventArgs e) { try { //what animation completed? if (e == null || e.SceneName == null) { return; } switch (e.SceneName) { case DisplayConstants.CutScenes.Bonuses.STAGECLEARED: //Stage is cleared, now lets rotate and begin the next level ModeStart(GameManagerConstants.GameModes.NORMALPLAY); break; default: break; } } catch (Exception ex) { _log.Error(ex); } }
/// <summary> /// Rotates an image. /// Fires an event containing the rotated image to display listeners. /// </summary> /// <param name="imageKey"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="rotateDegrees"></param> public void RotateImage(string imageKey, int width, int height, float rotateDegrees) { Image image = _imageManager.RotateImage(imageKey, width, height, rotateDegrees); DisplayEventArgs args = new DisplayEventArgs(image); DisplayEvent(this, args); }
private void _display_OnAnimationCompleted(DisplayEventArgs e) { if (OnAnimationCompleted != null) { OnAnimationCompleted(e); } }
/// <summary> /// METHOD: OnDisplayImageEvent, a method which sends an image out to the display view /// creates a new DisplayEventArgs /// </summary> /// <param name="pImg"></param> private void OnDisplayImageEvent(Image pImg) { // DECLARE and instantiate a new DisplayEventArgs // passing in the image which was passed into the method as a parameter // to the constructor DisplayEventArgs args = new DisplayEventArgs(pImg); // CALL to OnDisplayEvent event handler OnDisplayEvent(this, args); }
/// <summary> /// Listener method, receives display events. /// </summary> /// <param name="source"></param> /// <param name="args"></param> public void OnNewInput(object source, DisplayEventArgs args) { // Reset picture box location _pictureBox.Location = new Point(0, 0); // Reset picture box size to image size _pictureBox.Size = new Size(args.Image.Width, args.Image.Height); // Reset picture box images _pictureBox.Image = args.Image; // Add picture box to displayPanel displayPanel.Controls.Add(_pictureBox); }
public void infoEvent(ref string text) { EventHandler displayEventhandler = TerminalInformationEvent; DisplayEventArgs arg = new DisplayEventArgs(); arg.Items.Add(text); if (displayEventhandler != null) { displayEventhandler(this, arg); } }
void RaiseTerminalReceiptEvent(string[] items) { EventHandler receiptEventhandler = TerminalReceiptEvent; DisplayEventArgs arg = new DisplayEventArgs(); foreach (var iten in items) { arg.Items.Add(iten); } if (receiptEventhandler != null) { receiptEventhandler(this, arg); } }
void RaiseTerminalExceptionEvent(string[] items) { EventHandler exceptionEventhandler = TerminalExceptionEvent; DisplayEventArgs arg = new DisplayEventArgs(); foreach (var iten in items) { arg.Items.Add(iten); } if (exceptionEventhandler != null) { exceptionEventhandler(this, arg); } }
public void DisplayManager_OnAnimationCompleted(DisplayEventArgs e) { try { //what animation completed? if (e == null || e.SceneName == null) { return; } switch (e.SceneName) { case DisplayConstants.Modes.AttractMode.ATTRACT: DisplayManager.PlaySequence(DisplayConstants.Modes.AttractMode.ATTRACT); //send high scores break; default: break; } } catch (Exception ex) { _log.Error(ex); } }
public void DisplayManager_OnAnimationCompleted(DisplayEventArgs e) { try { //what animation completed? if (e == null || e.SceneName == null) { return; } switch (e.SceneName) { case DisplayConstants.CutScenes.MapMode.MAP: CurrentInputMode = InputMode.NormalPlay; //we displayed the map, time to show the user status. //if (!statusUpdate) //what if we just long-pressed for status update? beginPlay(); break; case DisplayConstants.CutScenes.Bonuses.COLLECTBONUS: //Call CollectBonusCompleted GameManager._instance.BonusCollected(); break; case DisplayConstants.CutScenes.ActiveGameMode.ADDLETTER: //what to do if we've finished this animation? break; default: break; } } catch (Exception ex) { _log.Error(ex); } }
private void DisplayMessage(object sender, DisplayEventArgs e) { this.Log.LogMessageFromText(e.Message, MessageImportance.Normal); }
private void DisplayEvent(object sender, DisplayEventArgs e) { UpdateStatus(e.DisplayText); }
/// <summary> /// Display a test-generator message to the user via the MSBuild logger. /// </summary> /// <param name="sender">The sender of the message.</param> /// <param name="e">Arguments for the message event.</param> private void DisplayMessage(object sender, DisplayEventArgs e) { MessageImportance importance = (MessageLevel.Error == e.Level || MessageLevel.Warning == e.Level) ? MessageImportance.High : MessageImportance.Normal; this.Log.LogMessage(importance, e.Message); }
private void MessageDisplay(object sender, DisplayEventArgs e) { }
/// <summary> /// Handler for display message events. /// </summary> /// <param name="sender">Sender of message.</param> /// <param name="e">Event arguments containing message to display.</param> private static void DisplayMessage(object sender, DisplayEventArgs e) { Console.WriteLine(e.Message); }
private void ToastDisplayEvent(object sender, DisplayEventArgs e) { ShowToast(e.DisplayText); }