Example #1
0
        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);
        }
Example #2
0
            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;
        }
Example #5
0
 private void button_Click1(object sender, RoutedEventArgs e)
 {
     foreach (CheckBox cb in listBox1.Items)
     {
         if (cb.IsChecked == true)
         {
             NewInstance.StartNewInstance((string)cb.Content);
         }
     }
 }
Example #6
0
 private void HistoryNewWindow(object sender, RoutedEventArgs e)
 {
     foreach (ConfigData item in HistoryData)
     {
         if (item.IsChecked == true)
         {
             NewInstance.StartNewInstance(item.SiteAddress);
         }
     }
 }
Example #7
0
 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(')');
        }
Example #11
0
        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;
        }
Example #12
0
        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();
            }
        }
Example #13
0
 public void TestAnalysisServicesServerRestart()
 {
     NewInstance.RunPsTest("Test-AnalysisServicesServerRestart");
 }
Example #14
0
 public void TestNegativeAnalysisServicesServer()
 {
     NewInstance.RunPsTest("Test-NegativeAnalysisServicesServer");
 }
Example #15
0
 public void TestAnalysisServicesServerDisableBackup()
 {
     NewInstance.RunPsTest("Test-AnalysisServicesServerDisableBackup");
 }
Example #16
0
 public void TestNegativeAdlsAccount()
 {
     NewInstance.RunPsTest(_logger, string.Format("Test-NegativeDataLakeStoreAccount -location '{0}'", AdlsTestsBase.ResourceGroupLocation));
 }
Example #17
0
 public void TestAdlsFileSystem()
 {
     NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreFileSystem -fileToCopy '{0}' -location '{1}'", ".\\ScenarioTests\\" + this.GetType().Name + ".ps1", AdlsTestsBase.ResourceGroupLocation));
 }
Example #18
0
 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");
 }
Example #21
0
 public void TestAdlsAccountTiers()
 {
     NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreAccountTiers -location '{0}'", AdlsTestsBase.resourceGroupLocation));
 }
 public void TestKustoClusterRemove()
 {
     NewInstance.RunPsTest(_logger, "Test-KustoClusterRemove");
 }
Example #23
0
 public void TestAnalysisServicesServerLoginWithSPN()
 {
     NewInstance.RunPsTest("Test-AnalysisServicesServerLoginWithSPN");
 }
Example #24
0
 public void TestAdlsFirewallRules()
 {
     NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreFirewall -location '{0}'", AdlsTestsBase.ResourceGroupLocation));
 }
Example #25
0
 public void TestPBIECapacityScale()
 {
     NewInstance.RunPsTest("Test-PowerBIEmbeddedCapacityScale");
 }
Example #26
0
 public void TestAdlsTrustedIdProvider()
 {
     NewInstance.RunPsTest(_logger, string.Format("Test-DataLakeStoreTrustedIdProvider -location '{0}'", AdlsTestsBase.ResourceGroupLocation));
 }
Example #27
0
 public void TestNegativePBIECapacity()
 {
     NewInstance.RunPsTest("Test-NegativePowerBIEmbeddedCapacity");
 }
Example #28
0
 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);
 }
Example #30
0
 public void TestAdlsEnumerateAndRestoreDeletedItem()
 {
     NewInstance.RunPsTest(_logger, string.Format("Test-EnumerateAndRestoreDataLakeStoreDeletedItem -location '{0}'", AdlsTestsBase.ResourceGroupLocation));
 }
Example #31
0
 public void TestAnalysisServicesServerScaleUpDown()
 {
     NewInstance.RunPsTest("Test-AnalysisServicesServerScaleUpDown");
 }