public override bool IsSameType(BaseActionClass action) { if (!base.IsSameType(action)) { return(false); } else { switch (this.Name) { case INTERNET_OPEN_WEBSITE: case INTERNET_SEARCH_WEB: case INTERNET_SEND_EMAIL: return(this.Name == action.Name); } switch (action.Name) { case INTERNET_OPEN_WEBSITE: case INTERNET_SEARCH_WEB: case INTERNET_SEND_EMAIL: return(this.Name == action.Name); } return(true); } }
private static TreeNode GetNode(BaseActionClass action) { TreeNode node = new TreeNode(); node.Text = Languages.Translation.GetText(action.Name); node.Name = action.Name; node.SelectedImageKey = action.Name; node.ImageKey = action.Name; node.Tag = action; return node; }
public BaseActionClass(BaseActionClass action) : this (action.Name) { this.Details = action.Details; this.KeyScript = new List<List<MyKey>>(); foreach (List<MyKey> script in action.KeyScript) this.KeyScript.Add(new List<MyKey>(script.ToArray())); m_scriptContainsMouse = action.ScriptContainsMouse; }
public BaseActionClass(BaseActionClass action) : this(action.Name) { this.Details = action.Details; this.KeyScript = new List <List <MyKey> >(); foreach (List <MyKey> script in action.KeyScript) { this.KeyScript.Add(new List <MyKey>(script.ToArray())); } m_scriptContainsMouse = action.ScriptContainsMouse; }
public override bool IsSameType(BaseActionClass action) { if (!base.IsSameType(action)) { return(false); } else { switch (this.Name) { case KEYSTROKES_CUSTOM: case KEYSTROKES_PLAIN_TEXT: return(this.Name == action.Name); case KEYSTROKES_PRIVATE_COPY_TEXT: case KEYSTROKES_PRIVATE_PASTE_TEXT: if (action.Name == KEYSTROKES_PRIVATE_COPY_TEXT || action.Name == KEYSTROKES_PRIVATE_PASTE_TEXT) { return(true); } else { return(false); } } switch (action.Name) { case KEYSTROKES_CUSTOM: case KEYSTROKES_PLAIN_TEXT: return(this.Name == action.Name); case KEYSTROKES_PRIVATE_COPY_TEXT: case KEYSTROKES_PRIVATE_PASTE_TEXT: if (this.Name == KEYSTROKES_PRIVATE_COPY_TEXT || this.Name == KEYSTROKES_PRIVATE_PASTE_TEXT) { return(true); } else { return(false); } } return(true); } }
private void ExecuteImplicitOnlyAction(BaseActionClass action, KeystrokesOptions.MouseAction mouse, bool selectWnd) { Debug.WriteLine(string.Format("ExecuteImplicitOnlyAction - Action: {0}, Mouse: {1}, SelectWindow: {2} Handle WndUnderCursor: {3}", action.Name, mouse, selectWnd, Config.User.HandleWndUnderCursor)); IntPtr hwnd = m_hwndWindowToUse;//GetWindowToUse(m_cursorPosition); //if (Config.User.handleWndUnderCursor) // hwnd = m_mouse.ActiveWindow; //else // hwnd = m_hwndWndToUse; Point location = new Point(m_cursorPosition.X, m_cursorPosition.Y); lock (this) { m_mouse.StartSimulation(); action.ExecuteKeyScript(mouse, hwnd, selectWnd, location); m_mouse.StopSimulation(); } }
private static BaseActionClass InitializeAction(string category, string actionName) { BaseActionClass action = null; switch (category) { case InternetOptions.NAME: if (category != actionName) action = new InternetOptions(actionName); else action = new InternetOptions(); break; case WinampOptions.NAME: if (category != actionName) action = new WinampOptions(actionName); else action = new WinampOptions(); break; case MediaControl.NAME: if (category != actionName) action = new MediaControl(actionName); else action = new MediaControl(); break; case WindowOptions.NAME: if (category != actionName) action = new WindowOptions(actionName); else action = new WindowOptions(); break; case WindowsShell.NAME: if (category != actionName) action = new WindowsShell(actionName); else action = new WindowsShell(); break; case KeystrokesOptions.NAME: if (category != actionName) action = new KeystrokesOptions(actionName); else action = new KeystrokesOptions(); break; case SpecialOptions.NAME: if (category != actionName) action = new SpecialOptions(actionName); else action = new SpecialOptions(); break; case AppGroupOptions.NAME: if (category != actionName) action = new AppGroupOptions(actionName); else action = new AppGroupOptions(); break; case ExtrasOptions.NAME: if (category != actionName) action = new ExtrasOptions(actionName); else action = new ExtrasOptions(); break; case VolumeOptions.NAME: if (category != actionName) action = new VolumeOptions(actionName); else action = new VolumeOptions(); break; default: //if (category != actionName) // action = new BaseActionClass(actionName); //else action = new BaseActionClass(); break; } return action; }
public override bool IsSameType(BaseActionClass action) { if (!base.IsSameType(action)) return false; else { switch (this.Name) { case INTERNET_OPEN_WEBSITE: case INTERNET_SEARCH_WEB: case INTERNET_SEND_EMAIL: return (this.Name == action.Name); } switch (action.Name) { case INTERNET_OPEN_WEBSITE: case INTERNET_SEARCH_WEB: case INTERNET_SEND_EMAIL: return (this.Name == action.Name); } return true; } }
public virtual bool IsSameType(BaseActionClass action) { return(this.GetType().Name == action.GetType().Name); }
public virtual object Clone() { BaseActionClass action = new BaseActionClass(this); return(action); }
public virtual object Clone() { BaseActionClass action = new BaseActionClass(this); return action; }
public virtual bool IsSameType(BaseActionClass action) { return this.GetType().Name == action.GetType().Name; }
public override bool IsSameType(BaseActionClass action) { if (!base.IsSameType(action)) return false; else { switch (this.Name) { case KEYSTROKES_CUSTOM: case KEYSTROKES_PLAIN_TEXT: return (this.Name == action.Name); case KEYSTROKES_PRIVATE_COPY_TEXT: case KEYSTROKES_PRIVATE_PASTE_TEXT: if (action.Name == KEYSTROKES_PRIVATE_COPY_TEXT || action.Name == KEYSTROKES_PRIVATE_PASTE_TEXT) return true; else return false; } switch (action.Name) { case KEYSTROKES_CUSTOM: case KEYSTROKES_PLAIN_TEXT: return (this.Name == action.Name); case KEYSTROKES_PRIVATE_COPY_TEXT: case KEYSTROKES_PRIVATE_PASTE_TEXT: if (this.Name == KEYSTROKES_PRIVATE_COPY_TEXT || this.Name == KEYSTROKES_PRIVATE_PASTE_TEXT) return true; else return false; } return true; } }