protected override void Execute(CodeActivityContext context) { var filename = Filename.Get(context); var script = Script.Get(context); var function = Function.Get(context); var newinstance = NewInstance.Get(context); var param1 = Param1.Get(context); var param2 = Param2.Get(context); var param3 = Param3.Get(context); var param4 = Param4.Get(context); if (sharpAHK.ahkGlobal.ahkdll == null || newinstance) { New_AHKSession(newinstance); } if (!sharpAHK.ahkGlobal.ahkdll.FunctionExists(function)) { if (!string.IsNullOrEmpty(filename)) { sharpAHK.ahkGlobal.ahkdll.LoadFile(filename); } else { sharpAHK.ahkGlobal.ahkdll.LoadScript(script); } } if (!sharpAHK.ahkGlobal.ahkdll.FunctionExists(function)) { throw new ArgumentNullException("Function '" + function + "' does not exists"); } var result = sharpAHK.ahkGlobal.ahkdll.ExecFunction(function, param1, param2, param3, param4); Result.Set(context, result); }
public void SetNewInstances(HashSet <Prop> NewProps) { HashSet <PropGameObject> ToRemove = new HashSet <PropGameObject>(); foreach (Prop OldInstance in PropsInstances) { if (!NewProps.Contains(OldInstance) && OldInstance.Obj) { ToRemove.Add(OldInstance.Obj); } } foreach (Prop NewInstance in NewProps) { if (!NewInstance.Obj) // !PropsInstances.Contains(NewInstance) { NewInstance.Group = this; NewInstance.CreateObject(); } } foreach (PropGameObject PropObj in ToRemove) { Destroy(PropObj.gameObject); } PropsInstances.Clear(); PropsInstances = NewProps; }
public void TestAdlsFileSystem() { var workingPath = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath); var testLocation = Path.Combine(workingPath, "ScenarioTests", (this.GetType().Name + ".ps1")); NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreFileSystem -fileToCopy '{0}' -location '{1}'", testLocation, AdlsTestsBase.TestFileSystemResourceGroupLocation)); }
//WebBrowser Help Functions //ProcessStartInfo psi; private void WebBrowserOnNewWindow(object sender, System.ComponentModel.CancelEventArgs e) { WebBrowser browser = (WebBrowser)sender; dynamic activeElement = ((HTMLDocument)browser.Document).activeElement; string link = activeElement.ToString( ); NewInstance.StartNewInstance(link); e.Cancel = true; }
private void button_Click1(object sender, RoutedEventArgs e) { foreach (CheckBox cb in listBox1.Items) { if (cb.IsChecked == true) { NewInstance.StartNewInstance((string)cb.Content); } } }
private void HistoryNewWindow(object sender, RoutedEventArgs e) { foreach (ConfigData item in HistoryData) { if (item.IsChecked == true) { NewInstance.StartNewInstance(item.SiteAddress); } } }
public void OnNewWindow(NewWindowEventArgs e) { if (BrowserCore.CefInstance.OnlyThis.IsChecked == false) { NewInstance.StartNewInstance(e.Url); } else { BrowserCore.Navigate(e.Url); } }
public static bool ItFromStringConstructor(ConstructorInfo C) { ParameterInfo[] ps = C.GetParameters(); if ((ps.Length == 1) && (NewInstance.WithoutRef(ps[0].ParameterType).Name == "String")) { return(true); } else { return(false); } }
public static bool ItIConvertableConstructor(ConstructorInfo C) { ParameterInfo[] ps = C.GetParameters(); if ((ps.Length == 1) && (NewInstance.WithoutRef(ps[0].ParameterType).GetInterface("IConvertible") != null)) { return(true); } else { return(false); } }
/// <inheritdoc /> protected override void Format(IScriptToken token, StringBuilder resulttext, IFormatterCollection formatters, int depth = 0) { NewInstance instance = (NewInstance)token; resulttext.Append("new ").Append(instance.TypeName).Append('('); if (instance.Parameters.Any()) { foreach (IScriptToken parameter in instance.Parameters) { formatters[parameter].FormatToken(parameter, resulttext, formatters, depth); resulttext.Append(", "); } resulttext.Length -= 2; } resulttext.Append(')'); }
public HealingOverTimeNPC(NPCBase nPC, float initialHeal, float totalHoT, int durationSeconds, ushort indicator) { HealPerTic = totalHoT / durationSeconds; DurationSeconds = durationSeconds; InitialHeal = initialHeal; Target = nPC; TotalHoTTime = totalHoT; TicksLeft = durationSeconds; Indicator = indicator; NewInstance?.Invoke(this, null); _instances.Add(this); Target.Heal(InitialHeal); Target.SetIndicatorState(new IndicatorState(1, Indicator)); Tick += HealingOverTimeNPC_Tick; }
private void Listen(IAsyncResult ar) { var server = _server; if (server == null) { return; } try { try { server.EndWaitForConnection(ar); } catch (ObjectDisposedException) { return; } StartNamedPipeServer(); using var binaryReader = new BinaryReader(server); if (binaryReader.ReadByte() == NotifyInstanceMessageType) { var processId = binaryReader.ReadInt32(); var argCount = binaryReader.ReadInt32(); if (argCount >= 0) { var args = new string[argCount]; for (var i = 0; i < argCount; i++) { args[i] = binaryReader.ReadString(); } NewInstance?.Invoke(this, new SingleInstanceEventArgs(processId, args)); } } } finally { server.Dispose(); } }
public void TestAnalysisServicesServerRestart() { NewInstance.RunPsTest("Test-AnalysisServicesServerRestart"); }
public void TestNegativeAnalysisServicesServer() { NewInstance.RunPsTest("Test-NegativeAnalysisServicesServer"); }
public void TestAnalysisServicesServerDisableBackup() { NewInstance.RunPsTest("Test-AnalysisServicesServerDisableBackup"); }
public void TestNegativeAdlsAccount() { NewInstance.RunPsTest(_logger, string.Format("Test-NegativeDataLakeStoreAccount -location '{0}'", AdlsTestsBase.ResourceGroupLocation)); }
public void TestAdlsFileSystem() { NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreFileSystem -fileToCopy '{0}' -location '{1}'", ".\\ScenarioTests\\" + this.GetType().Name + ".ps1", AdlsTestsBase.ResourceGroupLocation)); }
public void TestAdlsVirtualNetworkRules() { NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreVirtualNetwork -location '{0}'", AdlsTestsBase.ResourceGroupLocation)); }
public void TestConfigurationPipelining() { NewInstance.RunPsTest("Test-ConfigurationPipelining"); }
public void TestDataLakeStoreClusterCreate() { NewInstance.RunPsTest("Test-DataLakeStoreClusterCreate"); }
public void TestAdlsAccountTiers() { NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreAccountTiers -location '{0}'", AdlsTestsBase.resourceGroupLocation)); }
public void TestKustoClusterRemove() { NewInstance.RunPsTest(_logger, "Test-KustoClusterRemove"); }
public void TestAnalysisServicesServerLoginWithSPN() { NewInstance.RunPsTest("Test-AnalysisServicesServerLoginWithSPN"); }
public void TestAdlsFirewallRules() { NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreFirewall -location '{0}'", AdlsTestsBase.ResourceGroupLocation)); }
public void TestPBIECapacityScale() { NewInstance.RunPsTest("Test-PowerBIEmbeddedCapacityScale"); }
public void TestAdlsTrustedIdProvider() { NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreTrustedIdProvider -location '{0}'", AdlsTestsBase.ResourceGroupLocation)); }
public void TestNegativePBIECapacity() { NewInstance.RunPsTest("Test-NegativePowerBIEmbeddedCapacity"); }
public void TestAdlsFileSystemPermissions() { NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreFileSystemPermissions -location '{0}'", AdlsTestsBase.ResourceGroupLocation)); }
void OP_NEWINSTANCE(out pBaseLangObject outObj, pBaseLangObject parent) { var obj = new NewInstance(parent); outObj = obj; pBaseLangObject blo; pBaseLangObject blo2; Expect(63); IDENTACCESS(out blo, obj, false); obj.Name = (Ident)blo; if (la.kind == 21) { Template te; TEMPLATE(out te, ((Ident)blo).LastIdent); obj.TemplateObject = te; } BODY_FUNCTIONCALL(out blo2, ((Ident)blo).LastIdent); ((Ident)blo).LastIdent.addChild(blo2); }
public void TestAdlsEnumerateAndRestoreDeletedItem() { NewInstance.RunPsTest(_logger, string.Format("Test-EnumerateAndRestoreDataLakeStoreDeletedItem -location '{0}'", AdlsTestsBase.ResourceGroupLocation)); }
public void TestAnalysisServicesServerScaleUpDown() { NewInstance.RunPsTest("Test-AnalysisServicesServerScaleUpDown"); }