public XamarinFormsXASdkProject(string outputType = "Exe") : base(outputType) { PackageReferences.Add(KnownPackages.XamarinForms_4_5_0_617); // Workaround for AndroidX, see: https://github.com/xamarin/AndroidSupportComponents/pull/239 Imports.Add(new Import(() => "Directory.Build.targets") { TextContent = () => @"<Project> <PropertyGroup> <VectorDrawableCheckBuildToolsVersionTaskBeforeTargets /> </PropertyGroup> </Project>" }); Sources.Add(new AndroidItem.AndroidResource("Resources\\values\\colors.xml") { TextContent = () => colors_xml, }); Sources.Add(new AndroidItem.AndroidResource("Resources\\values\\styles.xml") { TextContent = () => styles_xml, }); Sources.Add(new AndroidItem.AndroidResource("Resources\\layout\\Tabbar.xml") { TextContent = () => Tabbar_xml, }); Sources.Add(new AndroidItem.AndroidResource("Resources\\layout\\Toolbar.xml") { TextContent = () => Toolbar_xml, }); Sources.Add(new BuildItem("EmbeddedResource", "MainPage.xaml") { TextContent = MainPageXaml, }); Sources.Add(new BuildItem.Source("MainPage.xaml.cs") { TextContent = () => ProcessSourceTemplate(MainPage_xaml_cs), }); Sources.Add(new BuildItem("EmbeddedResource", "App.xaml") { TextContent = () => ProcessSourceTemplate(App_xaml), }); Sources.Add(new BuildItem.Source("App.xaml.cs") { TextContent = () => ProcessSourceTemplate(App_xaml_cs), }); MainActivity = default_main_activity_cs; }
public MSBuildSdkExtrasProject() { Sdk = "MSBuild.Sdk.Extras/2.0.41"; Sources.Add(new BuildItem.Source("Class1.cs") { TextContent = () => "public class Class1 { }" }); Sources.Add(new AndroidItem.AndroidResource("Resources\\values\\Strings.xml") { TextContent = () => StringsXml.Replace("${PROJECT_NAME}", ProjectName) }); StringsXml = XamarinAndroidLibraryProject.default_strings_xml; TargetFrameworks = "MonoAndroid10.0"; }
public void RenameMethod(string name, string newName) { if (!Sources.ContainsKey(name)) { throw new ArgumentException("Unknown method name"); } if (Sources.ContainsKey(newName)) { throw new ArgumentException("Method " + newName + " already exists."); } if (newName.Length != name.Length) { throw new ArgumentException("New method name must have same number of symbols as old name"); } if (newName.Length != 1 && newName.Length != 4) { throw new ArgumentException("Incorrect length of new method name"); } if (newName.Length == 1 && (!System.Text.RegularExpressions.Regex.IsMatch(newName, "[B-Za-z]") || newName == "A" || newName == "V")) { throw new ArgumentException("Incorrect method name.\nMethod name must be 1 Latin character except 'A' or 'V'"); } ProjectChanged = true; Sources.Add(newName, Sources[name]); Sources.Remove(name); FileNames.Add(newName, FileNames[name]); FileNames.Remove(name); FilesChanged.Add(newName, FilesChanged[name]); FilesChanged.Remove(name); Comments.Add(newName, Comments[name]); Comments.Remove(name); if (name.Length == 1) { char old = name[0]; char nw = newName[0]; foreach (var a in Sources.Keys) { for (int i = 0; i < 16; i++) { for (int j = 0; j < 16; j++) { if (Sources[a][i, j] == old) { Sources[a][i, j] = nw; } } } } } }
public void RegisterSource([Required] string source, [Required] string version, DateTime timestamp) { if (Sources == null) { Sources = new List <Source>(); } if (Sources.All(x => string.CompareOrdinal(source, x.Name) != 0 || string.CompareOrdinal(version, x.Version) != 0 || timestamp != x.Timestamp)) { Sources.Add(new Source(source, version, timestamp)); } }
public XASdkProject(string sdkVersion = "") { Sdk = string.IsNullOrEmpty(sdkVersion) ? "Xamarin.Android.Sdk" : $"Xamarin.Android.Sdk/{sdkVersion}"; TargetFramework = "MonoAndroid10.0"; PackageName = PackageName ?? string.Format("{0}.{0}", ProjectName); JavaPackageName = JavaPackageName ?? PackageName.ToLowerInvariant(); ExtraNuGetConfigSources = new List <string> { XABuildPaths.BuildOutputDirectory }; GlobalPackagesFolder = Path.Combine(XABuildPaths.TopDirectory, "packages"); SetProperty("_ApkDebugKeyStore", "debug.keystore"); using (var sr = new StreamReader(typeof(XamarinAndroidApplicationProject).Assembly.GetManifestResourceStream("Xamarin.ProjectTools.Resources.Base.AndroidManifest.xml"))) default_android_manifest = sr.ReadToEnd(); using (var sr = new StreamReader(typeof(XamarinAndroidApplicationProject).Assembly.GetManifestResourceStream("Xamarin.ProjectTools.Resources.Base.MainActivity.cs"))) default_main_activity_cs = sr.ReadToEnd(); using (var sr = new StreamReader(typeof(XamarinAndroidApplicationProject).Assembly.GetManifestResourceStream("Xamarin.ProjectTools.Resources.Base.LayoutMain.axml"))) default_layout_main = sr.ReadToEnd(); using (var stream = typeof(XamarinAndroidCommonProject).Assembly.GetManifestResourceStream("Xamarin.ProjectTools.Resources.Base.Icon.png")) { icon_binary_mdpi = new byte [stream.Length]; stream.Read(icon_binary_mdpi, 0, (int)stream.Length); } // Add relevant Android content to our project without writing it to the .csproj file Sources.Add(new BuildItem.Source("Properties\\AndroidManifest.xml") { TextContent = () => default_android_manifest.Replace("${PROJECT_NAME}", ProjectName).Replace("${PACKAGENAME}", string.Format("{0}.{0}", ProjectName)) }); Sources.Add(new BuildItem.Source($"MainActivity{Language.DefaultExtension}") { TextContent = () => ProcessSourceTemplate(default_main_activity_cs) }); Sources.Add(new BuildItem.Source("Resources\\layout\\Main.axml") { TextContent = () => default_layout_main }); Sources.Add(new BuildItem.Source("Resources\\values\\Strings.xml") { TextContent = () => default_strings_xml.Replace("${PROJECT_NAME}", ProjectName) }); Sources.Add(new BuildItem.Source("Resources\\drawable-mdpi\\Icon.png") { BinaryContent = () => icon_binary_mdpi }); Sources.Add(new BuildItem.Source($"Resources\\Resource.designer{Language.DefaultExtension}") { TextContent = () => string.Empty }); }
public CoreWindowInputSourceConfiguration(CoreWindow coreWindow) { UwpGamepadInputSource gamepadSource = new UwpGamepadInputSource(); Sources.Add(gamepadSource); CoreWindowKeyboardInputSource keyboardSource = new CoreWindowKeyboardInputSource(coreWindow); Sources.Add(keyboardSource); CoreWindowPointerInputSource pointerSource = new CoreWindowPointerInputSource(coreWindow); Sources.Add(pointerSource); }
public override void Linearize(Stack <IRStackObject> pStack) { IRStackObject value = pStack.Pop(); Sources.Add(new IRLinearizedLocation(value.LinearizedTarget)); IRStackObject result = new IRStackObject(); result.Type = value.Type; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, value.Type); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public XamlInputSourceConfiguration(UIElement uiElement) { UwpGamepadInputSource gamepadSource = new UwpGamepadInputSource(); Sources.Add(gamepadSource); XamlKeyboardInputSource keyboardSource = new XamlKeyboardInputSource(uiElement); Sources.Add(keyboardSource); XamlPointerInputSource pointerSource = new XamlPointerInputSource(uiElement); Sources.Add(pointerSource); }
public Router() { directInput = new DirectInput(); var joysticks = directInput .GetDevices(DeviceClass.GameControl, DeviceEnumerationFlags.AllDevices) .Where(j => j.ProductGuid != xboxControllerProductGuid && j.ProductGuid != _3dConnexionKmjEmultorProductGuid); foreach (var joystick in joysticks) { Sources.Add(new DirectInputSource(directInput, joystick.InstanceGuid)); } Sources.Add(new XInputSource(SharpDX.XInput.UserIndex.One)); }
public Edge_Curved(ref IEnumerable <Hare.Geometry.Point> SPT, ref IEnumerable <Hare.Geometry.Point> RPT, bool issoft, double EdgeLength, Environment.Medium_Properties Att_Props, MathNet.Numerics.Interpolation.CubicSpline[] Edge_Crv, MathNet.Numerics.Interpolation.CubicSpline[] TangentA, MathNet.Numerics.Interpolation.CubicSpline[] TangentB) { //Find the secondary source spacing DeltaZ double fs = 176400; //Hz. double DeltaZ = 0; Point pt1 = new Point(Edge_Crv[0].Interpolate(0), Edge_Crv[1].Interpolate(0), Edge_Crv[2].Interpolate(0)); Vector Z_Dir = pt1 - new Point(Edge_Crv[0].Interpolate(0.001), Edge_Crv[1].Interpolate(0.001), Edge_Crv[2].Interpolate(0.001)); Z_Dir.Normalize(); List <Hare.Geometry.Point> Dpt = new List <Hare.Geometry.Point>(); //Find the secondary source spacing DeltaZ //Dpt.AddRange(RPT); //Dpt.AddRange(SPT); double i = 0; do { double MinAngle = double.NegativeInfinity; foreach (Point spt in SPT) { foreach (Point pt in RPT) { Vector D1 = (pt1 - pt); Vector D2 = (pt1 - spt); D1.Normalize(); D2.Normalize(); double angle = Math.Abs(Hare_math.Dot((D2 + D1) / 2, Z_Dir)); if (angle > MinAngle) { MinAngle = angle; } } } DeltaZ = Att_Props.Sound_Speed(pt1) / (fs * MinAngle); i += DeltaZ; if (i > EdgeLength) { break; } Hare.Geometry.Point pt2 = new Point(Edge_Crv[0].Interpolate(i), Edge_Crv[1].Interpolate(i), Edge_Crv[2].Interpolate(i)); Sources.Add(new EdgeSource(Edge.Rigid, pt1, pt2, new Vector[2] { new Vector(TangentA[0].Interpolate(i), TangentA[1].Interpolate(i), TangentA[2].Interpolate(i)), new Vector(TangentA[3].Interpolate(i), TangentA[4].Interpolate(i), TangentA[5].Interpolate(i)) })); pt1 = pt2; } while (true); }
public override void Linearize(Stack <IRStackObject> pStack) { IRLinearizedLocation source = new IRLinearizedLocation(IRLinearizedLocationType.StaticField); source.StaticField.Field = Field; Sources.Add(source); IRStackObject result = new IRStackObject(); result.Type = Field.Type; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, Field.Type); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public override void Linearize(Stack <IRStackObject> pStack) { IRLinearizedLocation source = new IRLinearizedLocation(IRLinearizedLocationType.ArrayLength); source.ArrayLength.ArrayLocation = new IRLinearizedLocation(pStack.Pop().LinearizedTarget); Sources.Add(source); IRStackObject result = new IRStackObject(); result.Type = ParentMethod.Assembly.AppDomain.System_Int32; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, ParentMethod.Assembly.AppDomain.System_Int32); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public void AddProjectFile(string fileName, bool rebuildCsProj = true) { if (Sources == null) { Sources = new List <string>(); } if (!Sources.Contains(fileName)) { Sources.Add(fileName); if (rebuildCsProj) { RebuildCSProjFile(); } } }
//Загрузить сигналы всех провайдеров public void LoadAllSignals() { Sources.Clear(); Receivers.Clear(); foreach (var s in Project.SchemeSources.Values) { Sources.Add(s.Code, new TablikSource(this, s.Code, s.Complect)); Sources[s.Code].LoadSignals(); } foreach (var r in Project.SchemeReceivers.Values) { Receivers.Add(r.Code, new TablikReceiver(this, r.Code, r.Complect)); Receivers[r.Code].LoadSignals(); } }
private void Seed() { var source = new Source { Name = "name", InnerSource = new InnerSource { Description = "description" }, OtherInnerSource = new OtherInnerSource { Title = "title" } }; Sources.Add(source); SaveChanges(); }
//if source order or data context changes, we update private void UpdateOrderedSources() { Sources.Clear(); var ap = DataContext as ArgPoint; if (ap == null) { return; } foreach (var orderedSrc in ap.Description.Source.OrderBy(s => s.OrderNumber)) { Sources.Add(orderedSrc); } }
public override void Linearize(Stack <IRStackObject> pStack) { IRLinearizedLocation source = new IRLinearizedLocation(IRLinearizedLocationType.ParameterAddress); source.ParameterAddress.ParameterIndex = ParameterIndex; Sources.Add(source); IRStackObject result = new IRStackObject(); result.Type = ParentMethod.Assembly.AppDomain.System_IntPtr; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, ParentMethod.Assembly.AppDomain.System_IntPtr); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public override void Linearize(Stack <IRStackObject> pStack) { IRLinearizedLocation value = new IRLinearizedLocation(IRLinearizedLocationType.SizeOf); value.SizeOf.Type = Type; Sources.Add(value); IRStackObject result = new IRStackObject(); result.Type = ParentMethod.Assembly.AppDomain.System_UInt32; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, ParentMethod.Assembly.AppDomain.System_UInt32); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public override void Linearize(Stack <IRStackObject> pStack) { Sources.Add(new IRLinearizedLocation(pStack.Pop().LinearizedTarget)); Destination = new IRLinearizedLocation(IRLinearizedLocationType.ArrayElement); Destination.ArrayElement.IndexLocation = new IRLinearizedLocation(pStack.Pop().LinearizedTarget); var arraySource = pStack.Pop(); Destination.ArrayElement.ArrayLocation = new IRLinearizedLocation(arraySource.LinearizedTarget); if (Type == null) { Type = arraySource.Type.ArrayType; } Destination.ArrayElement.ElementType = Type; }
public override void Linearize(Stack <IRStackObject> pStack) { IRLinearizedLocation source = new IRLinearizedLocation(IRLinearizedLocationType.Parameter); source.Parameter.ParameterIndex = ParameterIndex; Sources.Add(source); IRStackObject result = new IRStackObject(); result.Type = ParentMethod.Parameters[(int)ParameterIndex].Type; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, ParentMethod.Parameters[(int)ParameterIndex].Type); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public stalker_editor_cdb(string ProjectPath) { PCHFile = Path.Combine(ProjectPath, "source", "stdafx.cpp"); PCHIncludeFile = "stdafx.h"; Defines.Private.Add("XRCDB_EXPORTS"); Projects.Private.Add("stalkertools"); Projects.Private.Add("stalkerapi"); Sources.Add(Path.Combine(ProjectPath, "source", "Frustum.cpp")); Sources.Add(Path.Combine(ProjectPath, "source", "xrCDB_Collector.cpp")); Include.Public.Add(Path.Combine(ProjectPath, "include")); Include.Private.Add(Path.Combine(ProjectPath, "include", "cdb")); }
public XamarinFormsAndroidApplicationProject(string debugConfigurationName = "Debug", string releaseConfigurationName = "Release", [CallerMemberName] string packageName = "") : base(debugConfigurationName, releaseConfigurationName, packageName) { if (Builder.UseDotNet) { PackageReferences.Add(KnownPackages.XamarinForms_4_7_0_1142); this.AddDotNetCompatPackages(); } else { PackageReferences.Add(KnownPackages.XamarinForms_4_0_0_425677); } AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\values\\colors.xml") { TextContent = () => colors_xml, }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\values\\styles.xml") { TextContent = () => styles_xml, }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\layout\\Tabbar.axml") { TextContent = () => Tabbar_axml, }); AndroidResources.Add(new AndroidItem.AndroidResource("Resources\\layout\\Toolbar.axml") { TextContent = () => Toolbar_axml, }); OtherBuildItems.Add(new BuildItem("EmbeddedResource", "MainPage.xaml") { TextContent = MainPageXaml, }); Sources.Add(new BuildItem.Source("MainPage.xaml.cs") { TextContent = () => ProcessSourceTemplate(MainPage_xaml_cs), }); OtherBuildItems.Add(new BuildItem("EmbeddedResource", "App.xaml") { TextContent = () => ProcessSourceTemplate(App_xaml), }); Sources.Add(new BuildItem.Source("App.xaml.cs") { TextContent = () => ProcessSourceTemplate(App_xaml_cs), }); MainActivity = default_main_activity_cs; }
public override void Linearize(Stack <IRStackObject> pStack) { IRLinearizedLocation source = new IRLinearizedLocation(IRLinearizedLocationType.Indirect); source.Indirect.Type = Type; source.Indirect.AddressLocation = new IRLinearizedLocation(pStack.Pop().LinearizedTarget); Sources.Add(source); IRStackObject result = new IRStackObject(); result.Type = Type; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, Type); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public override void Linearize(Stack <IRStackObject> pStack) { IRLinearizedLocation value = new IRLinearizedLocation(IRLinearizedLocationType.FunctionAddress); value.FunctionAddress.Method = Target; value.FunctionAddress.Virtual = Virtual; Sources.Add(value); IRStackObject result = new IRStackObject(); result.Type = ParentMethod.Assembly.AppDomain.System_IntPtr; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, ParentMethod.Assembly.AppDomain.System_IntPtr); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public override void Linearize(Stack <IRStackObject> pStack) { // Skip first parameter source, it is the 'this' reference that is put on the stack by newobj before constructor call for (int count = 1; count < Constructor.Parameters.Count; ++count) { Sources.Add(new IRLinearizedLocation(pStack.Pop().LinearizedTarget)); } IRStackObject result = new IRStackObject(); result.Type = Constructor.ParentType; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, Constructor.ParentType); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
/// <summary> /// Registers a new draw command source. /// </summary> /// <param name="source">Source to add.</param> internal static void AddSource(ICubismMaskCommandSource source) { // Make sure singleton is initialized. Initialize(); // Prevent same source from being added twice. if (Sources.Contains(source)) { return; } // Add source and force refresh. Sources.Add(source); }
public Il2CppOutputProgram(string name) : base(name) { AddLibIl2CppAsLibraryFor(this); var distRoot = Distribution.Path.ResolveWithFileSystem(); Libraries.Add(BoehmGCProgram); Sources.Add(distRoot.Combine("external").Combine("xxHash/xxhash.c")); this.DynamicLinkerSettingsForMsvc() .Add(l => l.WithSubSystemType(SubSystemType.Console).WithEntryPoint("wWinMainCRTStartup")); Libraries.Add(c => c.ToolChain.Platform is WindowsPlatform, new SystemLibrary("kernel32.lib")); this.DynamicLinkerSettingsForMsvc().Add(l => l .WithSubSystemType(SubSystemType.Console) .WithEntryPoint("wWinMainCRTStartup") ); Defines.Add(c => c.ToolChain.DynamicLibraryFormat == null, "FORCE_PINVOKE_INTERNAL=1"); this.DynamicLinkerSettingsForAndroid().Add(c => ((DotsRuntimeNativeProgramConfiguration)c).CSharpConfig.DotsConfiguration == DotsConfiguration.Release, l => l.WithStripAll(true)); Libraries.Add(c => c.Platform is WebGLPlatform, new PreJsLibrary(BuildProgram.BeeRoot.Parent.Combine("LowLevelSupport~", "WebSupport", "tiny_runtime.js"))); Defines.Add(ManagedDebuggingIsEnabled, "IL2CPP_MONO_DEBUGGER=1"); Defines.Add(ManagedDebuggingIsEnabled, "IL2CPP_DEBUGGER_PORT=56000"); // Remove this comment to enable the managed debugger log file. It will be written to the working directory. For Web builds, the output will go to the browser's console. //Defines.Add(ManagedDebuggingIsEnabled, "IL2CPP_MONO_DEBUGGER_LOGFILE=il2cpp-debugger.log"); Defines.Add(c => ((DotsRuntimeNativeProgramConfiguration)c).CSharpConfig.DotsConfiguration != DotsConfiguration.Release, "IL2CPP_TINY_DEBUG_METADATA"); CompilerSettings().Add(ManagedDebuggingIsEnabled, c => c.WithExceptions(true)); CompilerSettings().Add(ManagedDebuggingIsEnabled, c => c.WithRTTI(true)); IncludeDirectories.Add(ManagedDebuggingIsEnabled, distRoot.Combine("libil2cpp/pch")); CompilerSettings().Add(s => s.WithCppLanguageVersion(CppLanguageVersion.Cpp11)); this.CompilerSettingsForMsvc().Add(c => c.WithWarningPolicies(new [] { new WarningAndPolicy("4102", WarningPolicy.Silent) })); this.CompilerSettingsForGcc().Add(s => s.WithWarningPolicies(GetGccLikeWarningPolicies())); this.CompilerSettingsForClang().Add(s => s.WithWarningPolicies(GetGccLikeWarningPolicies())); this.CompilerSettingsForEmscripten().Add(s => s.WithWarningPolicies(GetGccLikeWarningPolicies())); this.CompilerSettingsForIos().Add(s => s.WithWarningPolicies(GetGccLikeWarningPolicies())); NativeJobsPrebuiltLibrary.AddToNativeProgram(this); // Only required for managed debugging this.CompilerSettingsForEmscripten().Add(ManagedDebuggingIsEnabled, c => c.WithMultithreading_Compiler(EmscriptenMultithreadingMode.Enabled)); this.CompilerSettingsForGccLike().Add(s => s.WithCustomFlags(new[] { "-fno-strict-overflow" })); }
public async void Save() { if (string.IsNullOrWhiteSpace(SelectedSource.Id)) { await _progressService.ShowMessageAsync(Resources.SettingsViewModel_SavingSource, Resources.SettingsViewModel_SourceMissingId); return; } if (string.IsNullOrWhiteSpace(SelectedSource.Value)) { await _progressService.ShowMessageAsync(Resources.SettingsViewModel_SavingSource, Resources.SettingsViewModel_SourceMissingValue); return; } await _progressService.StartLoading(Resources.SettingsViewModel_SavingSourceLoading); try { if (_isNewItem) { await _packageService.AddSource(SelectedSource); _isNewItem = false; Sources.Add(SelectedSource); NotifyOfPropertyChange(nameof(CanRemove)); } else { await _packageService.UpdateSource(_originalId, SelectedSource); } _originalId = SelectedSource?.Id; await _eventAggregator.PublishOnUIThreadAsync(new SourcesUpdatedMessage()); } catch (UnauthorizedAccessException) { await _progressService.ShowMessageAsync( Resources.General_UnauthorisedException_Title, Resources.General_UnauthorisedException_Description); } finally { await _progressService.StopLoading(); } }
public override void Linearize(Stack <IRStackObject> pStack) { IRStackObject value2 = pStack.Pop(); IRStackObject value1 = pStack.Pop(); Sources.Add(new IRLinearizedLocation(value1.LinearizedTarget)); Sources.Add(new IRLinearizedLocation(value2.LinearizedTarget)); IRType resultType = ParentMethod.Assembly.AppDomain.BinaryNumericResult(value1.Type, value2.Type); IRStackObject result = new IRStackObject(); result.Type = resultType; result.LinearizedTarget = new IRLinearizedLocation(IRLinearizedLocationType.Local); result.LinearizedTarget.Local.LocalIndex = AddLinearizedLocal(pStack, resultType); Destination = new IRLinearizedLocation(result.LinearizedTarget); pStack.Push(result); }
public override void Initialize(VehicleController vc, AudioMixerGroup amg) { this.vc = vc; this.audioMixerGroup = amg; smoothedVolume = new HysteresisSmoothedValue(0, 0.25f, 0.5f); smoothedPitch = new HysteresisSmoothedValue(0, 0.25f, 0.5f); foreach (Wheel wheel in vc.Wheels) { AudioSource a = wheel.ControllerGO.AddComponent <AudioSource>(); vc.sound.SetAudioSourceDefaults(a, true, true); Sources.Add(a); } RegisterSources(); }
internal Sources AllVisibleSources(OCL.User AccessingUser) { try { string sSQL = ""; //bool CheckScene = false; if(!AccessingUser.mvarIsSuperUser) { sSQL = "SELECT DISTINCT tblGroupTokens.ObjectId FROM tblGroupTokens left outer join tblSource ON " + " tblSource.ID = tblGroupTokens.ObjectId WHERE UserId = " + AccessingUser.ID + " AND tblGroupTokens.ObjectTypeId = " + Convert.ToInt32(OCL.OysterObjectType.Source) + " AND tblGroupTokens.IsVisible <> 0" + " AND tblSource.IsDefault = 0"; //CheckScene = true; } else { /// User is either a SuperUser or can see all Sources in System sSQL = "Select Id FROM tblSource WHERE IsDefault = 0"; } Sources X = new Sources(); DataSet DS = RF.GetDataSet(sSQL); DataTable DT = DS.Tables[0]; //OCL.Scene DefaultScene = (OCL.Scene)GetUnassignedObject(OCL.OysterUnassignedObjects.Scene); foreach(DataRow R in DT.Rows) { Source Ro = GetSource(Convert.ToInt32((object)R[0])); if(Ro != null) { X.Add(Ro); } } DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }
/// <summary> /// Return all of sources that are visible to AccessingUser in a scene that is in this group /// </summary> /// <param name="AccessingUser"></param> /// <param name="TargetGroup"></param> /// <param name="TargetScene"></param> /// <returns></returns> internal Sources AllVisibleSources(OCL.User AccessingUser, OCL.Group TargetGroup,OCL.Scene TargetScene) { try { string sSQL = ""; int GroupID = TargetGroup.mvarID; if(!AccessingUser.mvarIsSuperUser) { sSQL = "SELECT DISTINCT tblGroupTokens.ObjectId FROM tblGroupTokens left outer join tblSource ON " + " tblSource.ID = tblGroupTokens.ObjectId" + " WHERE UserId = " + AccessingUser.ID + " AND tblGroupTokens.ObjectTypeId = " + Convert.ToInt32(OCL.OysterObjectType.Source) + " AND tblGroupTokens.IsVisible <> 0" + " AND tblSource.IsDefault = 0" + " AND tblSource.SceneId = " + TargetScene.mvarID + " AND tblGroupTokens.GroupID = " + GroupID; } else { //This is a Super User or User can see all Sources... show em every Source in this Group except the default group of course sSQL = "SELECT DISTINCT tblGroupTokens.ObjectId FROM tblGroupTokens left outer join tblSource ON " + " tblSource.ID = tblGroupTokens.ObjectId WHERE " + " tblGroupTokens.ObjectTypeId = " + Convert.ToInt32(OCL.OysterObjectType.Source) + " AND tblSource.IsDefault = 0" + " AND tblSource.SceneId = " + TargetScene.mvarID + " AND tblGroupTokens.GroupID = " + GroupID; } Sources X = new Sources(); DataSet DS = RF.GetDataSet(sSQL); DataTable DT = DS.Tables[0]; foreach(DataRow R in DT.Rows) { Source Ro = GetSource(Convert.ToInt32((object)R[0])); if(Ro != null) { X.Add(Ro); } } DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }
/// <summary> /// Returns all Streaming Encoders currently in this Scene /// </summary> /// <returns></returns> internal Sources ALLStreamingEncoders(double GroupId) { try { int iGroupId = Convert.ToInt32(GroupId); Sources X = new Sources(); string sSQL = "Select * FROM tblGroupStreamingEncoderRel " + "WHERE GroupId = " + iGroupId; DataSet DS = RF.GetDataSet(sSQL); DataTable DT = DS.Tables[0]; foreach(DataRow R in DT.Rows) { Source S = null; S = GetSource(Convert.ToInt32((object)R[1])); if(S != null) X.Add(S); } return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }
/// <summary> /// Returns all Streaming Encoders currently in the System /// </summary> /// <returns></returns> internal Sources ALLStreamingEncoders() { try { Sources X = new Sources(); string sSQL = "SELECT tblSource.Id FROM tblSource " + "Left Outer Join tblScene ON tblScene.Id=tblSource.SceneId " + "Order By tblScene.Name"; DataSet DS = RF.GetDataSet(sSQL); DataTable DT = DS.Tables[0]; foreach(DataRow R in DT.Rows) { Source S = null; S = GetSource(Convert.ToInt32((object)R[0])); if(S != null) X.Add(S); } DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }