hoTools.ActiveX.AddinControlGui.RunService C# (CSharp) Method

RunService() public method

Run service of type Call or Script
public RunService ( int pos ) : void
pos int
return void
        void RunService(int pos)
        {
            // ReSharper disable once IsExpressionAlwaysTrue
            if (AddinSettings.ButtonsServiceConfig[pos] is ServicesConfigCall)
            {

                var call = (ServicesConfigCall) AddinSettings.ButtonsServiceConfig[pos];
                if (call.Method == null) return;
                call.Invoke(_model, _txtSearchText.Text);

            }
            if (AddinSettings.ButtonsServiceConfig[pos] is ServicesConfigScript)
            {
                var script = (ServicesConfigScript)AddinSettings.ButtonsServiceConfig[pos];
                if (script.Function == null) return;
                script.Invoke(_model);
            }
        }
AddinControlGui