public override void BindToForm(ActionBase extension) { EnsureChildControls(); var runInstanceAction = (CreateEC2InstanceAction)extension; txtAmiID.Text = runInstanceAction.AmiID; }
public ActionSequence(List<ActionBase> actionQueue, bool looping = false) : base() { LoopingSequence = looping; ActionQueue = actionQueue; CurrentAction = ActionQueue.First(); }
void ExecuteAndDisableAction(ActionBase actionBase) { var simpleAction = ((SimpleAction)actionBase); simpleAction.Active[ActiveObjectTypeHasActionRules] = true; if (simpleAction.Active && simpleAction.Enabled) simpleAction.DoExecute(); simpleAction.Active[ActiveObjectTypeHasActionRules] = false; }
public override void BindToForm(ActionBase extension) { EnsureChildControls(); var terminateInstanceAction = (TerminateEC2InstanceAction)extension; txtInstanceId.Text = terminateInstanceAction.InstanceIdOrIPAddress; }
public override void BindToForm(ActionBase extension) { var action = (UninstallServiceAction)extension; this.ddlServices.Value = action.ServiceName; this.chkErrorIfNotInstalled.Checked = action.ErrorIfNotInstalled; this.chkStopIfRunning.Checked = action.StopIfRunning; }
public override void BindToForm(ActionBase extension) { var convert = (ConvertProjectReferencesAction)extension; this.libPath.Text = convert.LibraryPath; this.searchMask.Text = string.Join(Environment.NewLine, convert.SearchMasks); this.recursive.Checked = convert.Recursive; }
public override void BindToForm(ActionBase extension) { var action = (WriteAssemblyInfoVersionsAction)extension; this.txtFileMasks.Text = string.Join(Environment.NewLine, action.FileMasks ?? new string[0]); this.chkRecursive.Checked = action.Recursive; this.txtVersion.Text = action.Version; }
public override void BindToForm(ActionBase extension) { var action = (ChangeDeploymentConfigurationAction)extension; this.EnsureChildControls(); base.BindToForm(extension); this.txtMode.Text = action.Mode.ToString(); }
public override void BindToForm(ActionBase extension) { var action = (BuildAspNetProjectAction)extension; this.txtProjectBuildConfiguration.Text = action.ProjectBuildConfiguration; this.txtProjectPath.Text = Util.Path2.Combine(action.OverriddenSourceDirectory, action.ProjectPath); this.txtAdditionalArguments.Text = action.AdditionalArguments; }
public override void BindToForm(ActionBase extension) { var action = (AddComponentLicenseAction)extension; this.txtComponents.Text = string.Join(Environment.NewLine, action.LicenesedComponents ?? new string[0]); this.txtProjects.Text = string.Join(Environment.NewLine, action.SearchMasks ?? new string[0]); this.chkRecursive.Checked = action.Recursive; }
public override void BindToForm(ActionBase extension) { this.EnsureChildControls(); base.BindToForm(extension); var action = (AzureActionWithConfigBase)extension; this.ffpConfigFilePath.Text = action.ConfigurationFilePath; this.txtConfigText.Text = action.ConfigurationFileContents; if (action.ConfigurationFileId <= 0) { this.txtConfigurationFileName.Text = action.ConfigurationFileName; this.txtInstanceName.Text = action.InstanceName; this.ddlConfigurationFile.SelectedValue = "X"; this.ctl_txtConfigurationFileName.Visible = true; this.ctl_ddlInstance.Visible = false; this.ctl_txtInstanceName.Visible = true; } else { this.PreRender += (_s, _e) => { (ddlConfigurationFile.Items.FindByValue(action.ConfigurationFileId.ToString()) ?? new ListItem()) .Selected = true; ddlConfigurationFile_SelectedIndexChanged(ddlConfigurationFile, EventArgs.Empty); (ddlInstance.Items.FindByValue(action.InstanceName) ?? new ListItem()) .Selected = true; }; } }
public override void BindToForm(ActionBase extension) { var action = (SwapDeploymentAction)extension; this.EnsureChildControls(); base.BindToForm(extension); this.txtProductionDeploymentName.Text = action.ProductionDeploymentName; this.txtSourceDeploymentName.Text = action.SourceDeploymentName; }
public override void BindToForm(ActionBase extension) { var action = (PrecompileAspNetSiteAction)extension; this.txtVirtualPath.Text = action.ApplicationVirtualPath; this.ddlVersion.SelectedValue = action.DotNetVersion ?? ""; this.chkFixedNames.Checked = action.FixedNames; this.chkUpdatable.Checked = action.Updatable; }
public override void BindToForm(ActionBase extension) { var buildAction = (ExecuteMSBuildScriptAction)extension; this.txtProjectFilePath.Text = Util.Path2.Combine(buildAction.OverriddenSourceDirectory, buildAction.MSBuildPath); this.txtMSBuildTarget.Text = buildAction.ProjectBuildTarget; this.txtAdditionalProperties.Text = buildAction.MSBuildProperties; this.txtAdditionalArguments.Text = buildAction.AdditionalArguments; }
public override void BindToForm(ActionBase extension) { this.EnsureChildControls(); var execCScript = (ExecuteCScriptAction)extension; this.ctlScriptPath.Text = Util.Path2.Combine(execCScript.OverriddenSourceDirectory ?? string.Empty, execCScript.ScriptPath ?? string.Empty); this.txtArguments.Text = execCScript.Arguments; }
public override void BindToForm(ActionBase extension) { this.EnsureChildControls(); var gac = (GacInstallAction)extension; txtGacFiles.Text = string.Join(Environment.NewLine, gac.FileMasks); chkForceRefresh.Checked = gac.ForceRefresh; }
void ExecuteAction(ActionBase actionBase) { if (!(actionBase is SimpleAction)) throw new NotSupportedException(actionBase.GetType().ToString()); var simpleAction = ((SimpleAction)actionBase); if (simpleAction.Active && simpleAction.Enabled) { simpleAction.DoExecute(); } }
public override void BindToForm(ActionBase extension) { var ngen = (NGenAction)extension; this.ddlMode.SelectedValue = ngen.RunMode.ToString(); this.txtTargetAssembly.Text = ngen.TargetAssembly ?? string.Empty; this.cbQueue.Checked = ngen.UseQueue; this.HandleModeChange(); }
/// <summary> /// 原因(Action)には結果が伴う /// </summary> public ActionNode(ActionBase action, StateNode stateNodeNext) : base() { _action = action; this.StateNodeNext = stateNodeNext; this.Connect(stateNodeNext); }
/// <summary> /// Binds to form. /// </summary> /// <param name="extension">The extension.</param> public override void BindToForm(ActionBase extension) { var action = (TriggerBuildAction)extension; this.txtBuildConfigurationId.Text = action.BuildConfigurationId; this.txtAdditionalParameters.Text = action.AdditionalParameters; this.chkWaitForCompletion.Checked = action.WaitForCompletion; }
public static void AreEqual(ActionBase expected, ActionBase actual, string message) { Assert.AreEqual(expected.ActionCode, actual.ActionCode, message + ".ActionCode"); if ((byte)expected.ActionCode < 0x80) { Assert.IsAssignableFrom(expected.GetType(), actual); } else { throw new NotImplementedException(); } }
public override void BindToForm(ActionBase extension) { this.EnsureChildControls(); var ssa = (StopServiceAction)extension; this.ddlServices.Value = ssa.ServiceName; this.chkWaitForStop.Checked = ssa.WaitForStop; this.chkIgnoreAlreadyStoppedError.Checked = ssa.IgnoreAlreadyStoppedError; }
public override void BindToForm(ActionBase extension) { var action = (CreateTfsBuildAction)extension; this.txtTeamProject.Text = action.TeamProject; this.txtBuildDefinition.Text = action.BuildDefinition; this.chkWaitForCompletion.Checked = action.WaitForCompletion; this.chkValidateBuild.Checked = action.ValidateBuild; }
protected virtual void Start() { if (action == null) { action = GetComponent<ActionBase>(); if (action == null) { throw new Exception("Action wasn't assigned to " + this + " on gameObject: " + gameObject); } } }
/// <summary> /// Binds to form. /// </summary> /// <param name="extension">The extension.</param> public override void BindToForm(ActionBase extension) { var action = (GetArtifactAction)extension; this.txtArtifactName.Text = action.ArtifactName; this.txtBuildConfigurationId.Text = action.BuildConfigurationId; this.txtBuildNumber.Text = action.BuildNumber; this.chkExtractFilesToTargetDirectory.Checked = action.ExtractFilesToTargetDirectory; }
public override void BindToForm(ActionBase extension) { this.EnsureChildControls(); base.BindToForm(extension); var action = extension as WaitForStackCreationAction; if (null != action) { txtStackName.Text = action.StackName; } }
public override void BindToForm(ActionBase extension) { EnsureChildControls(); var buildAction = (ExecuteMSBuildScriptAction)extension; txtProjectFilePath.Text = buildAction.MSBuildPath; txtMSBuildTarget.Text = buildAction.ProjectBuildTarget; txtAdditionalProperties.Text = buildAction.MSBuildProperties; ddlVersion.SelectedValue = buildAction.DotNetVersion ?? ""; }
public override void BindToForm(ActionBase extension) { var action = (CreateTfsBuildOutputArtifactAction)extension; this.txtTeamProject.Text = action.TeamProject; this.txtArtifactName.Text = action.ArtifactName; this.txtBuildDefinition.Text = action.BuildDefinition; this.txtBuildNumber.Text = action.BuildNumber; this.chkIncludeUnsuccessful.Checked = action.IncludeUnsuccessful; }
public override void BindToForm(ActionBase extension) { var action = (XdtTransformAction)extension; this.txtSourceFile.Text = Util.Path2.Combine(action.OverriddenSourceDirectory, action.SourceFile); this.txtTransformFile.Text = action.TransformFile; this.txtDestinationFile.Text = Path.Combine(action.OverriddenTargetDirectory, action.DestinationFile); this.chkPreserveWhitespace.Checked = action.PreserveWhitespace; this.chkVerbose.Checked = action.Verbose; }
/// <summary> /// /// </summary> public ActionUpdatedEvent(IAcSession acSession, ActionBase source) : base(acSession, source) { this.Verb = source.Verb; this.Name = source.Name; this.IsAllowed = source.IsAllowed; this.IsAudit = source.IsAudit; this.IsPersist = source.IsPersist; this.SortCode = source.SortCode; }
private void action_Changed(ActionBase action) { Program.Invoke(this, () => UpdateProgressControls(action)); }
public override void PrePerform(ActionBase action) { //运行活动由新的浏览器代替 //不同线程可以读取自己创建的浏览器对象 // action.CoreBrowser = System.Threading.Thread.GetData(slot) as MyBrowser; }
private void IscsiPopulateLunsAction_Completed(ActionBase sender) { Program.Invoke(this, (WaitCallback)IscsiPopulateLunsAction_Completed_, sender); }
void action_Completed(ActionBase sender) { Program.Invoke(this, BuildList); }
public virtual void Add(ActionBase action) { actions.Add(action); }
private void SolutionAction_Completed(ActionBase sender) { SolutionActionCompleted = true; }
public static IObservable <TController> When <TController>(this TController source, ActionBase actionBase) where TController : Controller { return(Observable.Return(source).When(actionBase)); }
public override bool IsAttackState(ActionBase action) => action is ActionStealWeapon;
public ErrorExecutionActionEventArgs(ActionBase action, Exception ex) { Action = action ?? throw new ArgumentNullException(nameof(action)); Exception = ex ?? throw new ArgumentNullException(nameof(ex)); }
public ActionController(EDDiscoveryForm frm, EDDiscoveryController ctrl, System.Drawing.Icon ic) : base(frm, ic) { discoveryform = frm; discoverycontroller = ctrl; #if !NO_SYSTEM_SPEECH // Windows TTS (2000 and above). Speech *recognition* will be Version.Major >= 6 (Vista and above) if (Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major >= 5 && !EDDOptions.Instance.NoSound) { audiodriverwave = AudioHelper.GetAudioDriver(ctrl.LogLineHighlight, EDDConfig.Instance.DefaultWaveDevice); audiodriverspeech = AudioHelper.GetAudioDriver(ctrl.LogLineHighlight, EDDConfig.Instance.DefaultVoiceDevice); ISpeechEngine speechengine; speechengine = AudioHelper.GetSpeechEngine(ctrl.LogLineHighlight); speechsynth = new AudioExtensions.SpeechSynthesizer(speechengine); voicerecon = AudioHelper.GetVoiceRecognition(ctrl.LogLineHighlight); } else { audiodriverwave = new AudioExtensions.AudioDriverDummy(); audiodriverspeech = new AudioExtensions.AudioDriverDummy(); speechsynth = new AudioExtensions.SpeechSynthesizer(new AudioExtensions.DummySpeechEngine()); voicerecon = new AudioExtensions.VoiceRecognitionDummy(); } #else audiodriverwave = new AudioExtensions.AudioDriverDummy(); audiodriverspeech = new AudioExtensions.AudioDriverDummy(); speechsynth = new AudioExtensions.SpeechSynthesizer(new AudioExtensions.DummySpeechEngine()); voicerecon = new AudioExtensions.VoiceRecognitionDummy(); #endif audioqueuewave = new AudioExtensions.AudioQueue(audiodriverwave); audioqueuespeech = new AudioExtensions.AudioQueue(audiodriverspeech); frontierbindings = new BindingsFile(); inputdevices = new DirectInputDevices.InputDeviceList(a => discoveryform.BeginInvoke(a)); inputdevicesactions = new Actions.ActionsFromInputDevices(inputdevices, frontierbindings, this); frontierbindings.LoadBindingsFile(); //System.Diagnostics.Debug.WriteLine("Bindings" + frontierbindings.ListBindings()); //System.Diagnostics.Debug.WriteLine("Key Names" + frontierbindings.ListKeyNames("{","}")); voicerecon.SpeechRecognised += Voicerecon_SpeechRecognised; voicerecon.SpeechNotRecognised += Voicerecon_SpeechNotRecognised; Functions.GetCFH = DefaultGetCFH; LoadPeristentVariables(new Variables(SQLiteConnectionUser.GetSettingString("UserGlobalActionVars", ""), Variables.FromMode.MultiEntryComma)); lasteditedpack = SQLiteConnectionUser.GetSettingString("ActionPackLastFile", ""); ActionBase.AddCommand("Bookmarks", typeof(ActionBookmarks), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Captainslog", typeof(ActionCaptainsLog), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Commanders", typeof(ActionCommanders), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Commodities", typeof(ActionCommodities), ActionBase.ActionType.Cmd); ActionBase.AddCommand("DLLCall", typeof(ActionDLLCall), ActionBase.ActionType.Cmd); ActionBase.AddCommand("EliteBindings", typeof(ActionEliteBindings), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Event", typeof(ActionEventCmd), ActionBase.ActionType.Cmd); ActionBase.AddCommand("GMO", typeof(ActionGMO), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Historytab", typeof(ActionHistoryTab), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Key", typeof(ActionKeyED), ActionBase.ActionType.Cmd); // override key ActionBase.AddCommand("Ledger", typeof(ActionLedger), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Materials", typeof(ActionMaterials), ActionBase.ActionType.Cmd); ActionBase.AddCommand("MenuItem", typeof(ActionMenuItem), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Perform", typeof(ActionPerform), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Play", typeof(ActionPlay), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Popout", typeof(ActionPopout), ActionBase.ActionType.Cmd); ActionBase.AddCommand("ProgramWindow", typeof(ActionProgramwindow), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Scan", typeof(ActionScan), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Ship", typeof(ActionShip), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Star", typeof(ActionStar), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Target", typeof(ActionTarget), ActionBase.ActionType.Cmd); ActionBase.AddCommand("Timer", typeof(ActionTimer), ActionBase.ActionType.Cmd); }
public static bool Available(this ActionBase a) { return(a.Active && a.Enabled); }
private void action_Completed(ActionBase sender) { Thread.Sleep(1000); Program.Invoke(Program.MainWindow, RefreshRechecks); }
private void action_Completed(ActionBase sender) { OnCompleted(new RenameCompletedEventArgs(sender.Succeeded)); }
void solveActionCompleted(ActionBase sender) { // this should rescan the vm errors and update the dialog. Program.Invoke(this, update); }
private void action_Completed(ActionBase sender) { Program.Invoke(Program.MainWindow.GeneralPage, Program.MainWindow.GeneralPage.EnableDisableEdit); }
public ActionRemovedEvent(IAcSession acSession, ActionBase source) : base(acSession, source) { }
public static IObservable <TController> When <TController>(this IObservable <TController> source, ActionBase actionBase) where TController : Controller { return(source.When(actionBase.TargetViewType, actionBase.TargetObjectType ?? typeof(object), actionBase.TargetViewNesting)); }
private void action_Completed(ActionBase action) { Program.Invoke(this, () => RemoveActionRow(action)); }
private static void actionCompleted(ActionBase sender) { Program.AssertOffEventThread(); DownloadUpdatesXmlAction action = sender as DownloadUpdatesXmlAction; if (action == null) { return; } bool succeeded = action.Succeeded; string errorMessage = string.Empty; lock (updateAlertsLock) updateAlerts.Clear(); if (succeeded) { lock (downloadedUpdatesLock) { var xcvs = action.XenCenterVersions.Where(v => !XenCenterVersions.Contains(v)); XenCenterVersions.AddRange(xcvs); var vers = action.XenServerVersions.Where(v => !XenServerVersions.Contains(v)); XenServerVersions.AddRange(vers); var patches = action.XenServerPatches.Where(p => !XenServerPatches.Contains(p)); XenServerPatches.AddRange(patches); } var xenCenterAlert = NewXenCenterUpdateAlert(XenCenterVersions, Program.Version); if (xenCenterAlert != null && !xenCenterAlert.IsDismissed()) { updateAlerts.Add(xenCenterAlert); } var xenServerUpdateAlert = NewXenServerVersionAlert(XenServerVersions); if (xenServerUpdateAlert != null && !xenServerUpdateAlert.CanIgnore) { updateAlerts.Add(xenServerUpdateAlert); } var xenServerPatchAlerts = NewXenServerPatchAlerts(XenServerVersions, XenServerPatches); if (xenServerPatchAlerts != null) { updateAlerts.AddRange(xenServerPatchAlerts.Where(alert => !alert.CanIgnore)); } } else { if (action.Exception != null) { if (action.Exception is System.Net.Sockets.SocketException) { errorMessage = Messages.AVAILABLE_UPDATES_NETWORK_ERROR; } else { // Clean up and remove excess newlines, carriage returns, trailing nonsense string errorText = action.Exception.Message.Trim(); errorText = System.Text.RegularExpressions.Regex.Replace(errorText, @"\r\n+", ""); errorMessage = string.Format(Messages.AVAILABLE_UPDATES_ERROR, errorText); } } if (string.IsNullOrEmpty(errorMessage)) { errorMessage = Messages.AVAILABLE_UPDATES_INTERNAL_ERROR; } } if (CheckForUpdatesCompleted != null) { CheckForUpdatesCompleted(succeeded, errorMessage); } }
private void DeregisterActionEvents(ActionBase action) { action.Changed -= action_Changed; action.Completed -= action_Changed; }
protected virtual bool IsExcluded(ActionBase action) { return(false); }
void action_Completed(ActionBase sender) { Program.Invoke(Program.MainWindow, PopulateGridView); }
private void RegisterActionEvents(ActionBase action) { DeregisterActionEvents(action); action.Changed += action_Changed; action.Completed += action_Changed; }
private static async Task Version16Upgrade(int version, string filePath) { if (version < 16) { string data = File.ReadAllText(filePath); DesktopChannelSettings settings = SerializerHelper.DeserializeFromString <DesktopChannelSettings>(data); await ChannelSession.Services.Settings.Initialize(settings); List <CommandBase> commands = new List <CommandBase>(); commands.AddRange(settings.ChatCommands); commands.AddRange(settings.EventCommands); commands.AddRange(settings.InteractiveCommands); commands.AddRange(settings.TimerCommands); commands.AddRange(settings.ActionGroupCommands); commands.AddRange(settings.GameCommands); commands.AddRange(settings.RemoteCommands); foreach (CommandBase command in commands) { for (int i = 0; i < command.Actions.Count; i++) { ActionBase action = command.Actions[i]; #pragma warning disable CS0612 // Type or member is obsolete if (action is OBSStudioAction || action is XSplitAction || action is StreamlabsOBSAction) { StreamingSoftwareTypeEnum type = StreamingSoftwareTypeEnum.OBSStudio; string scene = null; string source = null; bool visible = false; string text = null; string textPath = null; string url = null; StreamingSourceDimensions dimensions = null; if (action is OBSStudioAction) { type = StreamingSoftwareTypeEnum.OBSStudio; OBSStudioAction obsAction = (OBSStudioAction)action; scene = obsAction.SceneName; source = obsAction.SourceName; visible = obsAction.SourceVisible; text = obsAction.SourceText; url = obsAction.SourceURL; dimensions = obsAction.SourceDimensions; if (!string.IsNullOrEmpty(source)) { textPath = GetDefaultReferenceFilePath(OBSStudioReferenceTextFilesDirectory, source); } } else if (action is XSplitAction) { type = StreamingSoftwareTypeEnum.XSplit; XSplitAction xsplitAction = (XSplitAction)action; scene = xsplitAction.SceneName; source = xsplitAction.SourceName; visible = xsplitAction.SourceVisible; text = xsplitAction.SourceText; url = xsplitAction.SourceURL; if (!string.IsNullOrEmpty(source)) { textPath = GetDefaultReferenceFilePath(XSplitReferenceTextFilesDirectory, source); } } else if (action is StreamlabsOBSAction) { type = StreamingSoftwareTypeEnum.StreamlabsOBS; StreamlabsOBSAction slobsAction = (StreamlabsOBSAction)action; scene = slobsAction.SceneName; source = slobsAction.SourceName; visible = slobsAction.SourceVisible; text = slobsAction.SourceText; if (!string.IsNullOrEmpty(source)) { textPath = GetDefaultReferenceFilePath(StreamlabsOBSStudioReferenceTextFilesDirectory, source); } } #pragma warning restore CS0612 // Type or member is obsolete StreamingSoftwareAction sAction = null; if (!string.IsNullOrEmpty(scene)) { sAction = StreamingSoftwareAction.CreateSceneAction(type, scene); } else if (!string.IsNullOrEmpty(text)) { sAction = StreamingSoftwareAction.CreateTextSourceAction(type, source, visible, text, textPath); } else if (!string.IsNullOrEmpty(url)) { sAction = StreamingSoftwareAction.CreateWebBrowserSourceAction(type, source, visible, url); } else if (dimensions != null) { sAction = StreamingSoftwareAction.CreateSourceDimensionsAction(type, source, visible, dimensions); } else { sAction = StreamingSoftwareAction.CreateSourceVisibilityAction(type, source, visible); } command.Actions[i] = sAction; } } } await ChannelSession.Services.Settings.Save(settings); } }
public DataGridViewActionRow(ActionBase action) { Action = action; Cells.AddRange(expanderCell, statusCell, messageCell, locationCell, dateCell); RefreshSelf(); }
public override void PostPerform(ActionBase action) { //还原主浏览器 // action.CoreBrowser = AppContext.Browser; }
/// <summary> /// Formats action to xml representation. /// </summary> /// <param name="action">Action to format.</param> /// <returns>Action xml representation.</returns> public static XElement ToXml(ActionBase action) { return(_writer.Serialize(action)); }
/// <summary> /// 子活动执行完后处理 /// </summary> /// <param name="action">当前子活动</param> public virtual void PostPerform(ActionBase action) { }
void a_Completed(ActionBase sender) { Program.Invoke(Program.MainWindow, RefreshButtons); }
private void PopulateLunsAction_Completed(ActionBase sender) { Program.Invoke(this, () => PopulateLunsAction_Completed_(sender as ISCSIPopulateLunsAction)); }