public MouseActiveTrigger(OverlayPlugin plugin, XmlNode node) : base(node) { mManager = GetManager(plugin, node, "trigger"); mCore = plugin.Core; mMoveListener = new Action <FrameOverlayManager, EventArgs>(mManager_CursorMoved); }
void coordinator_InitialisationFinished() { if (mFrame.Core.HasPlugin <OverlayPlugin>()) { mManager = mFrame.Core.GetPlugin <OverlayPlugin>()[mFrame.Name]; } }
public override IFrameState CreateWindowState(FrameOverlayManager manager) { IFrameState w = new FrameState(manager); if (mUseDefaultBG) w.AddFeature(new ColourFeature(mDefaultBG)); return w; }
public override IFrameState CreateFrameState(FrameOverlayManager manager) { SeeThroughMenuWindow stateWindow = new SeeThroughMenuWindow(manager); mWindows.Add(stateWindow); return(stateWindow); }
/// <summary> /// CreateWindowState a window state for drawing this state to the specified window. /// </summary> /// <param name="window">The window the new window state is to draw on.</param> public override IFrameState CreateFrameState(FrameOverlayManager manager) { ImageBGWindow win = new ImageBGWindow(manager, mWindowBGs.ContainsKey(manager.Name) ? mWindowBGs[manager.Name] : mDefaultBG); mWindows.Add(manager.Name, win); return(win); }
public CursorRenderer(OverlayPlugin manager, XmlNode node) { ISelectionRenderer renderer = manager.GetRenderer(node, "cursor renderer", null, "InnerRenderer"); mOverlayManager = GetManager(manager, node, "cursor renderer"); Size size = new Size(GetInt(node, 80, "W"), GetInt(node, 80, "H")); Init(size, renderer.DrawHover); }
public TouchscreenWindow(FrameOverlayManager manager, TouchscreenPlugin plugin) : base(manager) { mPlugin = plugin; mPlugin.Left.SizeChanged += () => Manager.ForceRedrawStatic(); mPlugin.Right.SizeChanged += () => Manager.ForceRedrawStatic(); mPlugin.Single.SizeChanged += () => Manager.ForceRedrawStatic(); }
private void coordinator_WindowAdded(Frame frame, EventArgs args) { if (frame.Name == mWindow) { mManager = mOverlayPlugin[frame.Name]; frame.Core.FrameAdded -= mWindowAddedListener; } }
public CursorTrigger(ISelectionRenderer renderer, FrameOverlayManager manager) : base(manager.Frame.Core, "CursorTrigger", mSelectMS) { mManager = manager; mRenderer = renderer; //mSelectCursor = new Cursor(new IntPtr(65571)); mSelectCursor = new Cursor(new IntPtr(65567)); }
public override IFrameState CreateFrameState(FrameOverlayManager manager) { if (manager.Name.Equals(mPlugin.Frame.Name)) { return(new TouchscreenWindow(manager, mPlugin)); } return(new FrameState(manager)); }
public override IFrameState CreateFrameState(FrameOverlayManager manager) { IFrameState w = new FrameState(manager); if (mUseDefaultBG) { w.AddFeature(new ColourFeature(mDefaultBG)); } return(w); }
/// <summary> /// Initialise the fade transition, specifying how long the fade should last, in ms. /// </summary> /// <param name="transition">The transition this fade is part of.</param> /// <param name="manager">The window this fade is to be drawn on.</param> /// <param name="lengthMS">The length of time, in ms, the fade should last.</param> public FeatureFrameTransition(StateTransition transition, FrameOverlayManager manager, IFeatureTransition transitionEffect) : base(transition, manager) { mTransition = transitionEffect; mTransition.Start = From; mTransition.Finish = To; mTransition.Finished += new Action(transitionEffect_Finished); AddFeature(mTransition); }
public UnityState(OverlayPlugin manager, XmlNode node) : base(GetName(node, "creating unity state"), manager, node, false) { mUnity = Path.GetFullPath(GetString(node, null, "File")); mManager = manager; mMainWindow = GetManager(manager, node, "unity state"); mBounds = manager.GetBounds(node, "unity state"); ResizedHandler = new System.EventHandler(this.Resized); }
/// <summary> /// /// </summary> /// <param name="transition"></param> /// <param name="window"></param> /// <exception cref="InvalidArgumentException">Thrown if there is no window state for the To or From state.</exception> public FrameTransition(StateTransition transition, FrameOverlayManager manager) : base(manager.Name) { mManager = manager; mTransition = transition; mFrom = transition.From[manager.Name]; mTo = transition.To[manager.Name]; Finished += trans => mSelected = false; }
/// <summary> /// Initialise the fade transition, specifying how long the fade should last, in ms. /// </summary> /// <param name="transition">The transition this fade is part of.</param> /// <param name="manager">The window this fade is to be drawn on.</param> /// <param name="lengthMS">The length of time, in ms, the fade should last.</param> public OpacityFadeWindowTransition(StateTransition transition, FrameOverlayManager manager, double lengthMS, bool fadeIn) : base(transition, manager) { mLengthMS = lengthMS; mFadeIn = fadeIn; mTickListener = new Action(Coordinator_Tick); Finished += new Action <IWindowTransition>(OpacityFadeWindowTransition_Finished); #if DEBUG StatisticsCollection.AddStatistics(mStatistics, transition.Name + " " + manager.Name); #endif }
public OverlayTouchSource(FrameOverlayManager manager) { mManager = manager; mManager.OnPress += () => { if (OnPress != null) { OnPress(0); } }; mManager.OnRelease += () => { if (OnRelease != null) { OnRelease(0); } }; }
public OpacityFadeFeature(OverlayPlugin manager, XmlNode node) { mManager = GetManager(manager, node, "Opacity Fade"); if (node.Attributes["FadeIn"] != null) { mStart = GetBool(node, true, "FadeIn") ? 0.0 : 1.0; mFinish = GetBool(node, true, "FadeIn") ? 1.0 : 0.0; } mStart = GetDouble(node, mStart, "Start"); mFinish = GetDouble(node, mFinish, "Finish"); mWait = GetDouble(node, 0.0, "Wait"); mLength = GetDouble(node, mLength, "Length"); }
protected ControlFeature(OverlayPlugin manager, XmlNode node, bool singletonControl) { mPlugin = manager; mManager = GetManager(manager, node, "control feature"); mFrame = mManager.Frame.Name; mSingletonControl = singletonControl; float x = GetFloat(node, 0f, "X"); float y = GetFloat(node, 0f, "Y"); float w = GetFloat(node, 1f, "W", "Width"); float h = GetFloat(node, 1f, "H", "Height"); mBounds = new RectangleF(x, y, w, h); }
void Core_InitialisationComplete() { if (mFrame.Core.HasPlugin <OverlayPlugin>()) { mManager = mFrame.Core.GetPlugin <OverlayPlugin>()[mFrame.Name]; } if (mConfig.AutoStartViewer) { Launch(); } else if (mConfig.AutoStartProxy) { StartProxy(); } }
void mManager_CursorMoved(FrameOverlayManager manager, EventArgs args) { if (Inside) { if (!mInside) { mInside = true; Entered(); } } else if (mInside) { mInside = false; Exited(); } }
public void Init(FrameOverlayManager manager) { mManager = manager; drawPanel.BackColor = manager.TransparencyKey; TransparencyKey = manager.TransparencyKey; BackColor = manager.TransparencyKey; Opacity = manager.Opacity; refreshTimer.Interval = manager.FrameLength; //refreshTimer.Enabled = true; Thread tickthread = new Thread(TickThread); tickthread.Name = mManager.Name + " graphics thread."; tickthread.Start(); }
public VideoState(OverlayPlugin manager, XmlNode node, IMediaPlayer player) : base(GetName(node, "creating video state"), manager, node, false) { //: base(manager, node, false) { mPlayer = player; mVideo = GetString(node, null, "File"); if (mVideo == null) { throw new ArgumentException("Unable to load VideoState. No File attribute specified."); } mVideo = Path.GetFullPath(mVideo); if (!File.Exists(mVideo)) { throw new ArgumentException("Unable to load VideoState. The file '" + mVideo + "' does not exist."); } mPlayer.PlaybackFinished += new Action(mPlayer_VideoFinished); mPlayer.PlaybackStarted += new Action(mPlayer_VideoStarted); mMainWindow = GetManager(manager, node, "video state"); mBounds = manager.GetBounds(node, "video state"); XmlAttribute toAttr = node.Attributes["FinishState"]; if (toAttr != null && manager.GetState(toAttr.Value) != null) { mTrigger = new SimpleTrigger(); ITransitionStyle transition = manager.GetTransition(node, "video state finish transition", new FeatureFrameTransitionFactory(new FeatureFadeFactory(), 2000), "Transition"); if (transition == null) { Logger.Debug("No transition specified for VideoState. using default 2s bitmap fade transition."); transition = new FeatureFrameTransitionFactory(new FeatureFadeFactory(), 2000); } AddTransition(new StateTransition(Manager, this, manager.GetState(toAttr.Value), mTrigger, transition)); } LoadTriggers(node, manager, "StartTriggers", mStartTriggers, new Action <ITrigger>(StartTriggered)); LoadTriggers(node, manager, "StopTriggers", mStopTriggers, new Action <ITrigger>(StopTriggered)); mRestartMode = GetBool(node, false, "RestartMode"); if (mRestartMode) { LoadTriggers(node, manager, "ResetTriggers", mResetTriggers, new Action <ITrigger>(RestartTriggered)); } }
public void Init(Core core) { if (!core.HasPlugin <OverlayPlugin>()) { //throw new ArgumentException("Unable to load kinect cursor. Overlay plugin is not loaded."); Logger.Warn("Unable to load axis cursor. Overlay plugin is not loaded."); Init(); return; } mOverlayPlugin = core.GetPlugin <OverlayPlugin>(); if (core.HasFrame(mWindow)) { mManager = mOverlayPlugin[mWindow]; } else { mWindowAddedListener = new Action <Chimera.Frame, EventArgs>(coordinator_WindowAdded); core.FrameAdded += mWindowAddedListener; } Init(); }
public HoverTrigger(FrameOverlayManager manager, ISelectionRenderer renderer, RectangleF bounds) : base(manager, bounds) { mRenderer = renderer; }
public HoverTrigger(FrameOverlayManager manager, ISelectionRenderer renderer, int x, int y, int w, int h, Rectangle clip) : this(manager, renderer, (float) x / (float) clip.Width, (float) y / (float) clip.Height, (float) w / (float) clip.Width, (float) h / (float) clip.Height) { }
public override IFrameState CreateWindowState(FrameOverlayManager manager) { return new FrameState(manager); }
public SeeThroughMenuWindow(FrameOverlayManager manager) : base(manager) { }
public CursorRenderer(ISelectionRenderer renderer, Size size, FrameOverlayManager manager) { mOverlayManager = manager; Init(size, renderer.DrawHover); }
public StaticText(string text, FrameOverlayManager manager, Font font, Color colour, PointF location) : base(text, manager.Frame.Name, font, colour, location) { mManager = manager; }
public IWindowTransition Create(StateTransition transition, FrameOverlayManager manager) { return(new OpacityFadeWindowTransition(transition, manager, mLengthMS, !mFadeOut)); }
public CursorRenderer(Action<Graphics, Rectangle, double> drawStep, Size size, FrameOverlayManager manager) { mOverlayManager = manager; Init(size, drawStep); }
public AreaTrigger(FrameOverlayManager manager, int x, int y, int w, int h, Rectangle clip) : this(manager, (float)x / (float)clip.Width, (float)y / (float)clip.Height, (float)w / (float)clip.Width, (float)h / (float)clip.Height) { }
public ClickTrigger(FrameOverlayManager manager, RectangleF bounds) : base(manager, bounds) { Manager.OnRelease += new Action(mManager_OnRelease); }
/// <summary> /// Create the trigger. Specifies the position and size of the area the cursor must hover in to trigger this trigger as values between 0 and 1. /// 0,0 is top left, 1,1 is bottom right. /// </summary> /// <param name="manager">The manager which manages the window this trigger is to draw to.</param> /// <param name="render">The renderer used to draw this trigger being selected.</param> /// <param name="x">The x coordinate for where the image is to be positioned, specified between 0 and 1. 0 is flush to the left, 1 flush to the right.</param> /// <param name="y">The y coordinate for where the image is to be positioned, specified between 0 and 1. 0 is flush to the top, 1 flush to the bottom.</param> /// <param name="x">The width of the image, specified between 0 and 1. 1 will fill the entire width, 0 will be invisible.</param> /// <param name="y">The width of the image, specified between 0 and 1. 1 will fill the entire height, 0 will be invisible.</param> public ClickTrigger(FrameOverlayManager manager, float x, float y, float w, float h) : this(manager, new RectangleF(x, y, w, h)) { }
/// <summary> /// Create the trigger. Specifies the position and size of the area the cursor must hover in to trigger this trigger as values between 0 and 1. /// 0,0 is top left, 1,1 is bottom right. /// </summary> /// <param name="manager">The manager which manages the window this trigger is to draw to.</param> /// <param name="render">The renderer used to draw this trigger being selected.</param> /// <param name="x">The x coordinate for where the image is to be positioned, specified between 0 and 1. 0 is flush to the left, 1 flush to the right.</param> /// <param name="y">The y coordinate for where the image is to be positioned, specified between 0 and 1. 0 is flush to the top, 1 flush to the bottom.</param> /// <param name="x">The width of the image, specified between 0 and 1. 1 will fill the entire width, 0 will be invisible.</param> /// <param name="y">The width of the image, specified between 0 and 1. 1 will fill the entire height, 0 will be invisible.</param> public HoverTrigger(FrameOverlayManager manager, ISelectionRenderer renderer, float x, float y, float w, float h) : this(manager, renderer, new RectangleF(x, y, w, h)) { }
public ImageBGWindow(FrameOverlayManager manager, Bitmap BG) : base(manager) { mBG = BG; }
public ImageClickTrigger(FrameOverlayManager manager, OverlayImage image) : base(manager, image.Bounds) { mImage = image; }
public ImageHoverTrigger(FrameOverlayManager manager, ISelectionRenderer render, OverlayImage image) : base(manager, render, image.Bounds) { mImage = image; }
public TextClickTrigger(FrameOverlayManager manager, Text text, Rectangle clip) : base(manager, Text.GetBounds(text, clip)) { mText = text; Clip = clip; }
public TextHoverTrigger(FrameOverlayManager manager, ISelectionRenderer renderer, Text text, Rectangle clip) : base(manager, renderer, Text.GetBounds(text, clip)) { mText = text; Clip = clip; }
/// <summary> /// Create the trigger. Specifies the position and size of the area the cursor must hover in to trigger this trigger as values between 0 and 1. /// 0,0 is top left, 1,1 is bottom right. /// </summary> /// <param name="manager">The manager which manages the window this trigger is to draw to.</param> /// <param name="render">The renderer used to draw this trigger being selected.</param> /// <param name="x">The x coordinate for where the image is to be positioned, specified between 0 and 1. 0 is flush to the left, 1 flush to the right.</param> /// <param name="y">The y coordinate for where the image is to be positioned, specified between 0 and 1. 0 is flush to the top, 1 flush to the bottom.</param> /// <param name="x">The width of the image, specified between 0 and 1. 1 will fill the entire width, 0 will be invisible.</param> /// <param name="y">The width of the image, specified between 0 and 1. 1 will fill the entire height, 0 will be invisible.</param> public AreaTrigger(FrameOverlayManager manager, float x, float y, float w, float h) : this(manager, new RectangleF(x, y, w, h)) { }
protected FeatureBase(OverlayPlugin plugin, XmlNode node) { mManager = GetManager(plugin, node, "FeatureBase"); mControlPanel = new FeatureControl(this); }
public AreaTrigger(FrameOverlayManager manager, RectangleF bounds) { mManager = manager; mBounds = bounds; mMoveListener = new Action <FrameOverlayManager, EventArgs>(mManager_CursorMoved); }
public StaticText(OverlayPlugin manager, XmlNode node) : base(manager, node) { mManager = GetManager(manager, node, "text"); }
public OverlayWindow(FrameOverlayManager manager) : this() { Init(manager); }
public ScreenshotFeature(OverlayPlugin plugin, XmlNode node) { mManager = GetManager(plugin, node, "Screenshot Feature"); mIncludeOverlay = GetBool(node, false, "IncludeOverlay"); }
public override IFrameState CreateFrameState(FrameOverlayManager manager) { SeeThroughMenuWindow stateWindow = new SeeThroughMenuWindow(manager); mWindows.Add(stateWindow); return stateWindow; }
public StaticText(OverlayPlugin manager, XmlNode node, Rectangle clip) : base(manager, node, clip) { mManager = GetManager(manager, node, "text"); }
public ClickTrigger(FrameOverlayManager manager, int x, int y, int w, int h, Rectangle clip) : this(manager, (float) x / (float) clip.Width, (float) y / (float) clip.Height, (float) w / (float) clip.Width, (float) h / (float) clip.Height) { }
public AreaTrigger(FrameOverlayManager manager, RectangleF bounds) { mManager = manager; mBounds = bounds; mMoveListener = new Action<FrameOverlayManager,EventArgs>(mManager_CursorMoved); }