conflict_resolution
stringlengths
27
16k
<<<<<<< /// An offset of where the object is rendered. /// </summary> protected Point renderOffset; /// <summary> /// Renderer used to draw the animation of the game object to the screen. /// </summary> public Consoles.ITextSurfaceRenderer Renderer { get { return renderer; } set { renderer = value; } } /// <summary> /// Offset applied to drawing the game object. /// </summary> public Point RenderOffset { get { return renderOffset; } set { renderOffset = value; UpdateRects(value); } } /// <summary> ======= /// Font for the game object. /// </summary> protected Font font; /// <summary> /// Gets the name of this animation. /// </summary> public string Name { get; set; } /// <summary> /// Font for the game object. /// </summary> public Font Font { get { return font; } set { font = value; UpdateRects(position, true); } } /// <summary> >>>>>>> /// Font for the game object. /// </summary> protected Font font; /// <summary> /// Gets the name of this animation. /// </summary> public string Name { get; set; } /// <summary> /// Font for the game object. /// </summary> public Font Font { get { return font; } set { font = value; UpdateRects(position, true); } } /// <summary> /// An offset of where the object is rendered. /// </summary> protected Point renderOffset; /// <summary> /// Renderer used to draw the animation of the game object to the screen. /// </summary> public Consoles.ITextSurfaceRenderer Renderer { get { return renderer; } set { renderer = value; } } /// <summary> /// Offset applied to drawing the game object. /// </summary> public Point RenderOffset { get { return renderOffset; } set { renderOffset = value; UpdateRects(value); } } /// <summary> <<<<<<< public Consoles.AnimatedTextSurface Animation { get { return animation; } set { animation = value; UpdateRects(position, true); } } ======= public Consoles.AnimatedTextSurface Animation { get { return animation; } set { animation = value; animation.Font = font; UpdateRects(position); } } /// <summary> /// Collection of animations associated with this game object. /// </summary> public Dictionary<string, Consoles.AnimatedTextSurface> Animations { get; protected set; } = new Dictionary<string, Consoles.AnimatedTextSurface>(); >>>>>>> public Consoles.AnimatedTextSurface Animation { get { return animation; } set { animation = value; animation.Font = font; UpdateRects(position, true); } } /// <summary> /// Collection of animations associated with this game object. /// </summary> public Dictionary<string, Consoles.AnimatedTextSurface> Animations { get; protected set; } = new Dictionary<string, Consoles.AnimatedTextSurface>(); <<<<<<< animation = new Consoles.AnimatedTextSurface("default", 1, 1, Engine.DefaultFont); var frame = animation.CreateFrame(); frame[0].GlyphIndex = 1; ======= this.font = font; >>>>>>> animation = new Consoles.AnimatedTextSurface("default", 1, 1, Engine.DefaultFont); var frame = animation.CreateFrame(); frame[0].GlyphIndex = 1; this.font = animation.Font = font; <<<<<<< /// <summary> /// Updates the render rectangles, evaluating <see cref="RepositionRects"/>. /// </summary> ======= /// <summary> /// Forces the rendering rectangles to update with positioning information. /// </summary> >>>>>>> /// <summary> /// Forces the rendering rectangles to update with positioning information. /// </summary>
<<<<<<< { object remoteValue = DoRemote(token, key); if (remoteValue != null || m_doRemoteOnly) return (List<string>)remoteValue; Dictionary<string, object> where = new Dictionary<string, object>(2); where["Token"] = token.MySqlEscape(50); where["KeySetting"] = token.MySqlEscape(50); return GD.Query(new string[1] { "*" }, "lslgenericdata", new QueryFilter { andFilters = where }, null, null, null); ======= { QueryFilter filter = new QueryFilter(); filter.andFilters["Token"] = token.MySqlEscape(50); filter.andFilters["KeySetting"] = token.MySqlEscape(50); return GD.Query(new string[1] { "*" }, "lslgenericdata", filter, null, null, null); >>>>>>> { object remoteValue = DoRemote(token, key); if (remoteValue != null || m_doRemoteOnly) return (List<string>)remoteValue; QueryFilter filter = new QueryFilter(); filter.andFilters["Token"] = token.MySqlEscape(50); filter.andFilters["KeySetting"] = token.MySqlEscape(50); return GD.Query(new string[1] { "*" }, "lslgenericdata", filter, null, null, null);
<<<<<<< var lineNumberMargin = new LineNumberMargin { Margin = new Thickness(0, 0, 10, 0) }; TextBlock.SetForeground(lineNumberMargin, Brushes.Gray); _textEditor.TextArea.LeftMargins.Add(lineNumberMargin); _textEditor.TextArea.IndentationStrategy = new Indentation.CSharp.CSharpIndentationStrategy( ); SearchPanel.Install(_textEditor); ======= _textEditor.TextArea.IndentationStrategy = new Indentation.CSharp.CSharpIndentationStrategy(); >>>>>>> _textEditor.TextArea.IndentationStrategy = new Indentation.CSharp.CSharpIndentationStrategy(); var lineNumberMargin = new LineNumberMargin { Margin = new Thickness(0, 0, 10, 0) }; TextBlock.SetForeground(lineNumberMargin, Brushes.Gray); _textEditor.TextArea.LeftMargins.Add(lineNumberMargin); _textEditor.TextArea.IndentationStrategy = new Indentation.CSharp.CSharpIndentationStrategy( ); SearchPanel.Install(_textEditor);
<<<<<<< using CoiniumServ.Payments; using CoiniumServ.Pools; ======= using CoiniumServ.Pools.Config; >>>>>>> using CoiniumServ.Pools;
<<<<<<< private long size; private string fileDataName; ======= private long size, chunk; >>>>>>> private long size, chunk; private string fileDataName;
<<<<<<< public bool IsEip158IgnoredAccount(Address address) => false; ======= public bool IsEip2028Enabled => false; public bool IsEip152Enabled => false; public bool IsEip1108Enabled => false; public bool IsEip1884Enabled => false; public bool IsEip2200Enabled => false; >>>>>>> public bool IsEip2028Enabled => false; public bool IsEip152Enabled => false; public bool IsEip1108Enabled => false; public bool IsEip1884Enabled => false; public bool IsEip2200Enabled => false; public bool IsEip158IgnoredAccount(Address address) => false;
<<<<<<< ======= using Nethermind.Config; using Nethermind.Monitoring.Config; >>>>>>> using Nethermind.Monitoring.Config;
<<<<<<< using System; namespace Nevermind.Core ======= /* * Copyright (c) 2018 Demerzel Solutions Limited * This file is part of the Nethermind library. * * The Nethermind library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The Nethermind library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with the Nethermind. If not, see <http://www.gnu.org/licenses/>. */ namespace Nevermind.Core >>>>>>> using System; /* * Copyright (c) 2018 Demerzel Solutions Limited * This file is part of the Nethermind library. * * The Nethermind library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The Nethermind library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with the Nethermind. If not, see <http://www.gnu.org/licenses/>. */ namespace Nevermind.Core
<<<<<<< // Contract.Requires(!this.IsEmpty); => Is true, but impossible to proof with acceptable effort. Contract.Requires(value >= 0.0 || Double.IsNaN(value)); ======= Contract.Requires(!this.IsEmpty); Contract.Requires((value >= 0.0) || Double.IsNaN(value) || Double.IsPositiveInfinity(value)); >>>>>>> // Contract.Requires(!this.IsEmpty); => Is true, but impossible to proof with acceptable effort. Contract.Requires((value >= 0.0) || Double.IsNaN(value) || Double.IsPositiveInfinity(value)); <<<<<<< // Contract.Requires(!this.IsEmpty); => Is true, but impossible to proof with acceptable effort. Contract.Requires(value >= 0.0 || Double.IsNaN(value)); ======= Contract.Requires(!this.IsEmpty); Contract.Requires(value >= 0.0 || Double.IsNaN(value) || Double.IsPositiveInfinity(value)); >>>>>>> // Contract.Requires(!this.IsEmpty); => Is true, but impossible to proof with acceptable effort. Contract.Requires(value >= 0.0 || Double.IsNaN(value) || Double.IsPositiveInfinity(value));
<<<<<<< Func<Task<bool>> _runIf = _alwaysRun; ======= Func<T, T, bool> _comparison = DefaultComparison; Func<Task> _beforeRun; >>>>>>> Func<T, T, bool> _comparison = DefaultComparison; Func<Task> _beforeRun; Func<Task<bool>> _runIf = _alwaysRun; <<<<<<< public void RunIf(Func<Task<bool>> block) { _runIf = block; } public void RunIf(Func<bool> block) { _runIf = () => Task.FromResult(block()); } public void Use(Func<Task<T>> control) { _control = control; } ======= public void Use(Func<Task<T>> control) => _control = control; >>>>>>> public void RunIf(Func<Task<bool>> block) => _runIf = block; public void RunIf(Func<bool> block) => _runIf = () => Task.FromResult(block()); public void Use(Func<Task<T>> control) => _control = control; <<<<<<< return new ExperimentInstance<T>(_name, _control, _candidate, _runIf); ======= _beforeRun = action; >>>>>>> _beforeRun = action;
<<<<<<< catch (Exception ex) { Exception = ex; } stopwatch.Stop(); ======= var stop = Stopwatch.GetTimestamp(); >>>>>>> catch (Exception ex) { Exception = ex; } var stop = Stopwatch.GetTimestamp();
<<<<<<< /// Defines the check to run to determine if the experiment should run. /// </summary> /// <param name="check">The delegate to evaluate.</param> void RunIf(Func<bool> check); /// <summary> ======= /// Define any expensive setup here before the experiment is run. /// </summary> void BeforeRun(Action action); /// <summary> >>>>>>> /// Define any expensive setup here before the experiment is run. /// </summary> void BeforeRun(Action action); /// <summary> /// Defines the check to run to determine if the experiment should run. /// </summary> /// <param name="check">The delegate to evaluate.</param> void RunIf(Func<bool> check); /// <summary> <<<<<<< /// Defines the check to run to determine if the experiment should run. /// </summary> /// <param name="check">The delegate to evaluate.</param> void RunIf(Func<Task<bool>> block); /// <summary> ======= /// Define any expensive setup here before the experiment is run. /// </summary> void BeforeRun(Func<Task> action); /// <summary> >>>>>>> /// Define any expensive setup here before the experiment is run. /// </summary> void BeforeRun(Func<Task> action); /// <summary> /// Defines the check to run to determine if the experiment should run. /// </summary> /// <param name="check">The delegate to evaluate.</param> void RunIf(Func<Task<bool>> block); /// <summary>
<<<<<<< Assert.True(candidateRan); Assert.True(controlRan); Assert.False(TestHelper.Observation.First(m => m.ExperimentName == "failure").Matched); ======= await mock.Received().Control(); await mock.Received().Candidate(); Assert.False(TestHelper.Observation.First(m => m.Name == "failure").Success); >>>>>>> await mock.Received().Control(); await mock.Received().Candidate(); Assert.False(TestHelper.Observation.First(m => m.ExperimentName == "failure").Matched); <<<<<<< IResult observedResult = ((InMemoryObservationPublisher)Scientist.ObservationPublisher).Observations.First(m => m.ExperimentName == "success"); Assert.True(observedResult.Matched); Assert.True(observedResult.Control.Duration.Ticks > 0); Assert.True(observedResult.Observations.All(o => o.Duration.Ticks > 0)); ======= Assert.True(((InMemoryObservationPublisher)Scientist.ObservationPublisher).Observations.First(m => m.Name == "failure").Success == false); Assert.True(((InMemoryObservationPublisher)Scientist.ObservationPublisher).Observations.First(m => m.Name == "failure").ControlDuration.Ticks > 0); Assert.True(((InMemoryObservationPublisher)Scientist.ObservationPublisher).Observations.First(m => m.Name == "failure").CandidateDuration.Ticks > 0); >>>>>>> IResult observedResult = ((InMemoryObservationPublisher)Scientist.ObservationPublisher).Observations.First(m => m.ExperimentName == "success"); Assert.True(observedResult.Matched); Assert.True(observedResult.Control.Duration.Ticks > 0); Assert.True(observedResult.Observations.All(o => o.Duration.Ticks > 0));
<<<<<<< readonly Dictionary<string, Func<Task<T>>> _behaviors; ======= >>>>>>> <<<<<<< public ExperimentInstance(string name, Func<Task<T>> control, Func<Task<T>> candidate, Func<Task<bool>> runIf) ======= internal ExperimentInstance(string name, NamedBehavior control, NamedBehavior candidate, Func<T, T, bool> comparator, Func<Task> beforeRun) >>>>>>> internal ExperimentInstance(string name, NamedBehavior control, NamedBehavior candidate, Func<T, T, bool> comparator, Func<Task> beforeRun, Func<Task<bool>> runIf) <<<<<<< _runIf = runIf; ======= _comparator = comparator; _beforeRun = beforeRun; >>>>>>> _comparator = comparator; _beforeRun = beforeRun; _runIf = runIf; <<<<<<< const string name = "control"; // Determine if experiments should be run. if (!await _runIf()) { return await _behaviors[name](); } ======= // TODO determine if experiments should be run. >>>>>>> // Determine if experiments should be run. if (!await _runIf()) { // Run the control behavior. return await _behaviors[0].Behavior(); }
<<<<<<< Result<int> observedResult = TestHelper.Results<int>(experimentName).First(); ======= var observedResult = TestHelper.Results<int>().First(m => m.ExperimentName == experimentName); >>>>>>> var observedResult = TestHelper.Results<int>(experimentName).First(); <<<<<<< Result<int> observedResult = TestHelper.Results<int>(experimentName).First(); ======= var observedResult = TestHelper.Results<int>().First(m => m.ExperimentName == experimentName); >>>>>>> var observedResult = TestHelper.Results<int>(experimentName).First(); <<<<<<< var result = TestHelper.Results<int>(experimentName).First(); var mismatchException = (MismatchException<int>)baseException; ======= var result = TestHelper.Results<int>().First(m => m.ExperimentName == experimentName); var mismatchException = (MismatchException<int, int>)baseException; >>>>>>> var result = TestHelper.Results<int>(experimentName).First(); var mismatchException = (MismatchException<int, int>)baseException; <<<<<<< [Fact] public void ThrowsArgumentExceptionWhenConcurrentTasksInvalid() { var mock = Substitute.For<IControlCandidateTask<int>>(); mock.Control().Returns(x => 1); mock.Candidate().Returns(x => 2); const string experimentName = nameof(ThrowsArgumentExceptionWhenConcurrentTasksInvalid); var ex = Assert.Throws<ArgumentException>(() => { Scientist.ScienceAsync<int>(experimentName, 0, experiment => { experiment.Use(mock.Control); experiment.Try(mock.Candidate); }); }); Exception baseException = ex.GetBaseException(); Assert.IsType<ArgumentException>(baseException); mock.DidNotReceive().Control(); mock.DidNotReceive().Candidate(); } [Theory, InlineData(1), InlineData(2), InlineData(4)] public async Task RunsTasksConcurrently(int concurrentTasks) { // Control + 3 experiments var totalTasks = 1D + 3; // Each task will take 3 seconds var taskSleepMs = 1000; // Calculate expected duration based on concurrentTasks setting var expectedDuration = TimeSpan.FromMilliseconds((taskSleepMs * Math.Ceiling(totalTasks / concurrentTasks))); // Amount of headroom allowed var headRoom = TimeSpan.FromMilliseconds(50); // Our long running task var longTask = new Func<Task<int>>(() => { return Task.Run(() => { Console.WriteLine($"Task is running"); Thread.Sleep(taskSleepMs); Console.WriteLine($"Task is finished"); return 1; }); }); // Run the experiment var watch = new Stopwatch(); watch.Start(); const string experimentName = nameof(ThrowsArgumentExceptionWhenConcurrentTasksInvalid); var result = await Scientist.ScienceAsync<int>(experimentName, concurrentTasks, experiment => { // Add our control and experiments experiment.Use(longTask); for (int idx = 2; idx <= totalTasks; idx++) { experiment.Try($"experiment{idx}", longTask); } }); watch.Stop(); Assert.Equal(result, 1); // Ensure duration is as expected Assert.True(watch.Elapsed >= expectedDuration && watch.Elapsed <= expectedDuration.Add(headRoom)); } ======= [Fact] public void ScientistDisablesExperiment() { const int expectedResult = 42; var mock = Substitute.For<IControlCandidate<int>>(); mock.Control().Returns(expectedResult); mock.Candidate().Returns(0); var settings = Substitute.For<IScientistSettings>(); settings.Enabled().Returns(Task.FromResult(false)); using (Swap.Enabled(settings.Enabled)) { var result = Scientist.Science<int>(nameof(ScientistDisablesExperiment), experiment => { experiment.Use(mock.Control); experiment.Try(mock.Candidate); }); Assert.Equal(expectedResult, result); mock.DidNotReceive().Candidate(); mock.Received().Control(); settings.Received().Enabled(); } } [Fact] public void KeepingItClean() { const int expectedResult = 42; const string expectedCleanResult = "Forty Two"; var mock = Substitute.For<IControlCandidate<int, string>>(); mock.Control().Returns(expectedResult); mock.Candidate().Returns(0); mock.Clean(expectedResult).Returns(expectedCleanResult); var result = Scientist.Science<int, string>(nameof(KeepingItClean), experiment => { experiment.Use(mock.Control); experiment.Try(mock.Candidate); experiment.Clean(mock.Clean); }); Assert.Equal(expectedResult, result); // Make sure that the observations aren't cleaned unless called explicitly. mock.DidNotReceive().Clean(expectedResult); Assert.Equal( expectedCleanResult, TestHelper.Results<int, string>().First(r => r.ExperimentName == nameof(KeepingItClean)).Control.CleanedValue); mock.Received().Clean(expectedResult); } >>>>>>> [Fact] public void ScientistDisablesExperiment() { const int expectedResult = 42; var mock = Substitute.For<IControlCandidate<int>>(); mock.Control().Returns(expectedResult); mock.Candidate().Returns(0); var settings = Substitute.For<IScientistSettings>(); settings.Enabled().Returns(Task.FromResult(false)); using (Swap.Enabled(settings.Enabled)) { var result = Scientist.Science<int>(nameof(ScientistDisablesExperiment), experiment => { experiment.Use(mock.Control); experiment.Try(mock.Candidate); }); Assert.Equal(expectedResult, result); mock.DidNotReceive().Candidate(); mock.Received().Control(); settings.Received().Enabled(); } } [Fact] public void KeepingItClean() { const int expectedResult = 42; const string expectedCleanResult = "Forty Two"; var mock = Substitute.For<IControlCandidate<int, string>>(); mock.Control().Returns(expectedResult); mock.Candidate().Returns(0); mock.Clean(expectedResult).Returns(expectedCleanResult); var result = Scientist.Science<int, string>(nameof(KeepingItClean), experiment => { experiment.Use(mock.Control); experiment.Try(mock.Candidate); experiment.Clean(mock.Clean); }); Assert.Equal(expectedResult, result); // Make sure that the observations aren't cleaned unless called explicitly. mock.DidNotReceive().Clean(expectedResult); Assert.Equal( expectedCleanResult, TestHelper.Results<int, string>(nameof(KeepingItClean)).First().Control.CleanedValue); mock.Received().Clean(expectedResult); } [Fact] public void ThrowsArgumentExceptionWhenConcurrentTasksInvalid() { var mock = Substitute.For<IControlCandidateTask<int>>(); mock.Control().Returns(x => 1); mock.Candidate().Returns(x => 2); const string experimentName = nameof(ThrowsArgumentExceptionWhenConcurrentTasksInvalid); var ex = Assert.Throws<ArgumentException>(() => { Scientist.ScienceAsync<int>(experimentName, 0, experiment => { experiment.Use(mock.Control); experiment.Try(mock.Candidate); }); }); Exception baseException = ex.GetBaseException(); Assert.IsType<ArgumentException>(baseException); mock.DidNotReceive().Control(); mock.DidNotReceive().Candidate(); } [Theory, InlineData(1), InlineData(2), InlineData(4)] public async Task RunsTasksConcurrently(int concurrentTasks) { // Control + 3 experiments var totalTasks = 1D + 3; // Each task will take 3 seconds var taskSleepMs = 1000; // Calculate expected duration based on concurrentTasks setting var expectedDuration = TimeSpan.FromMilliseconds((taskSleepMs * Math.Ceiling(totalTasks / concurrentTasks))); // Amount of headroom allowed var headRoom = TimeSpan.FromMilliseconds(50); // Our long running task var longTask = new Func<Task<int>>(() => { return Task.Run(() => { Console.WriteLine($"Task is running"); Thread.Sleep(taskSleepMs); Console.WriteLine($"Task is finished"); return 1; }); }); // Run the experiment var watch = new Stopwatch(); watch.Start(); const string experimentName = nameof(ThrowsArgumentExceptionWhenConcurrentTasksInvalid); var result = await Scientist.ScienceAsync<int>(experimentName, concurrentTasks, experiment => { // Add our control and experiments experiment.Use(longTask); for (int idx = 2; idx <= totalTasks; idx++) { experiment.Try($"experiment{idx}", longTask); } }); watch.Stop(); Assert.Equal(result, 1); // Ensure duration is as expected Assert.True(watch.Elapsed >= expectedDuration && watch.Elapsed <= expectedDuration.Add(headRoom)); }
<<<<<<< if (m_VolumetricLightingPreset != VolumetricLightingPreset.Off) { // TODO: enable keyword VOLUMETRIC_LIGHTING_ENABLED. SetVolumetricLightingData(hdCamera, cmd); } else { // TODO: disable keyword VOLUMETRIC_LIGHTING_ENABLED. // We should not access any volumetric lighting data in our shaders. } ======= cmd.SetGlobalVectorArray(HDShaderIDs._WorldScales, sssParameters.worldScales); >>>>>>> cmd.SetGlobalVectorArray(HDShaderIDs._WorldScales, sssParameters.worldScales); if (m_VolumetricLightingPreset != VolumetricLightingPreset.Off) { // TODO: enable keyword VOLUMETRIC_LIGHTING_ENABLED. SetVolumetricLightingData(hdCamera, cmd); } else { // TODO: disable keyword VOLUMETRIC_LIGHTING_ENABLED. // We should not access any volumetric lighting data in our shaders. } <<<<<<< m_LightLoop.RenderShadows(renderContext, cmd, m_CullResults); // TODO: check if statement below still apply renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after RenderShadows as it modify our view/proj matrix } using (new ProfilingSample(cmd, "Deferred directional shadows", GetSampler(CustomSamplerId.RenderDeferredDirectionalShadow))) { cmd.ReleaseTemporaryRT(m_DeferredShadowBuffer); cmd.GetTemporaryRT(m_DeferredShadowBuffer, camera.pixelWidth, camera.pixelHeight, 0, FilterMode.Point, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear, 1 , true); m_LightLoop.RenderDeferredDirectionalShadow(hdCamera, m_DeferredShadowBufferRT, GetDepthTexture(), cmd); PushFullScreenDebugTexture(cmd, m_DeferredShadowBuffer, hdCamera.camera, renderContext, FullScreenDebugMode.DeferredShadows); } using (new ProfilingSample(cmd, "Build Light list", GetSampler(CustomSamplerId.BuildLightList))) { m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, GetStencilTexture()); } // Caution: We require sun light here as some sky use the sun light to render, mean UpdateSkyEnvironment // must be call after BuildGPULightLists. // TODO: Try to arrange code so we can trigger this call earlier and use async compute here to run sky convolution during other passes (once we move convolution shader to compute). UpdateSkyEnvironment(hdCamera, cmd); // Render volumetric lighting VolumetricLightingPass(hdCamera, cmd); RenderDeferredLighting(hdCamera, cmd); // We compute subsurface scattering here. Therefore, no objects rendered afterwards will exhibit SSS. // Currently, there is no efficient way to switch between SRT and MRT for the forward pass; // therefore, forward-rendered objects do not output split lighting required for the SSS pass. SubsurfaceScatteringPass(hdCamera, cmd, sssSettings); ======= // TODO: Add another path dedicated to planar reflection / real time cubemap that implement simpler lighting // It is up to the users to only send unlit object for this camera path using (new ProfilingSample(cmd, "Forward", GetSampler(CustomSamplerId.Forward))) { CoreUtils.SetRenderTarget(cmd, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT, ClearFlag.Color | ClearFlag.Depth); RenderOpaqueRenderList(m_CullResults, camera, renderContext, cmd, HDShaderPassNames.s_ForwardName); RenderTransparentRenderList(m_CullResults, camera, renderContext, cmd, HDShaderPassNames.s_ForwardName, false); } renderContext.ExecuteCommandBuffer(cmd); CommandBufferPool.Release(cmd); renderContext.Submit(); continue; } >>>>>>> // TODO: Add another path dedicated to planar reflection / real time cubemap that implement simpler lighting // It is up to the users to only send unlit object for this camera path using (new ProfilingSample(cmd, "Forward", GetSampler(CustomSamplerId.Forward))) { CoreUtils.SetRenderTarget(cmd, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT, ClearFlag.Color | ClearFlag.Depth); RenderOpaqueRenderList(m_CullResults, camera, renderContext, cmd, HDShaderPassNames.s_ForwardName); RenderTransparentRenderList(m_CullResults, camera, renderContext, cmd, HDShaderPassNames.s_ForwardName, false); } renderContext.ExecuteCommandBuffer(cmd); CommandBufferPool.Release(cmd); renderContext.Submit(); continue; }
<<<<<<< ======= BoogieStmtList procBody = TranslateStatement(node.Body); >>>>>>> <<<<<<< List<BoogieVariable> inParams = TransUtils.GetInParams(); ======= currentBoogieProc = procName; if (!boogieToLocalVarsMap.ContainsKey(currentBoogieProc)) { boogieToLocalVarsMap[currentBoogieProc] = new List<BoogieVariable>(); } List<BoogieVariable> inParams = new List<BoogieVariable>() { new BoogieFormalParam(new BoogieTypedIdent("this", BoogieType.Ref)), new BoogieFormalParam(new BoogieTypedIdent("msgsender_MSG", BoogieType.Ref)), new BoogieFormalParam(new BoogieTypedIdent("msgvalue_MSG", BoogieType.Int)), }; >>>>>>> currentBoogieProc = procName; if (!boogieToLocalVarsMap.ContainsKey(currentBoogieProc)) { boogieToLocalVarsMap[currentBoogieProc] = new List<BoogieVariable>(); } List<BoogieVariable> inParams = TransUtils.GetInParams();
<<<<<<< if (args.Any(x => x.StartsWith("/inlineDepth:"))) { var depth = args.Where(x => x.StartsWith("/inlineDepth:")).First(); translatorFlags.InlineDepthForBoogie = int.Parse(depth.Substring("/inlineDepth:".Length)); } ======= if (args.Any(x => x.Equals("/doModSet"))) { translatorFlags.DoModSetAnalysis = true; } >>>>>>> if (args.Any(x => x.StartsWith("/inlineDepth:"))) { var depth = args.Where(x => x.StartsWith("/inlineDepth:")).First(); translatorFlags.InlineDepthForBoogie = int.Parse(depth.Substring("/inlineDepth:".Length)); } if (args.Any(x => x.Equals("/doModSet"))) { translatorFlags.DoModSetAnalysis = true; }
<<<<<<< else if (unaryOperation.Operator.Equals("--")) { BoogieExpr rhs = new BoogieBinaryOperation(BoogieBinaryOperation.Opcode.SUB, lhs, new BoogieLiteralExpr(1)); BoogieAssignCmd assignCmd = new BoogieAssignCmd(lhs, rhs); currentStmtList = BoogieStmtList.MakeSingletonStmtList(assignCmd); //print the value var callCmd = new BoogieCallCmd("boogie_si_record_sol2Bpl_int", new List<BoogieExpr>() { lhs }, new List<BoogieIdentifierExpr>()); callCmd.Attributes = new List<BoogieAttribute>(); callCmd.Attributes.Add(new BoogieAttribute("cexpr", $"\"{unaryOperation.SubExpression.ToString()}\"")); currentStmtList.AddStatement(callCmd); } ======= >>>>>>>
<<<<<<< [assembly: InternalsVisibleTo("DiscUtils.Swap, PublicKey=002400000480000094000000060200000024000052534131000400000100010047ebec172a9831bb20fede77e17d784026ea7030d7055f2ae09576c71cebe77ebfab436d80580a4fcbba7242ff61bd52b686f5fe9d41fe7cd3e6c05b8a876eccf35b8ad7c5e3a6704295d7210b138d7280a6f72688419a65dd7a8612d66869f2e712c57c41fcc9196e4cb06d95d8e678f6967e65348c370405fb7eeb6aa1d3e8")] ======= [assembly: InternalsVisibleTo("DiscUtils.Streams, PublicKey=002400000480000094000000060200000024000052534131000400000100010047ebec172a9831bb20fede77e17d784026ea7030d7055f2ae09576c71cebe77ebfab436d80580a4fcbba7242ff61bd52b686f5fe9d41fe7cd3e6c05b8a876eccf35b8ad7c5e3a6704295d7210b138d7280a6f72688419a65dd7a8612d66869f2e712c57c41fcc9196e4cb06d95d8e678f6967e65348c370405fb7eeb6aa1d3e8")] >>>>>>> [assembly: InternalsVisibleTo("DiscUtils.Streams, PublicKey=002400000480000094000000060200000024000052534131000400000100010047ebec172a9831bb20fede77e17d784026ea7030d7055f2ae09576c71cebe77ebfab436d80580a4fcbba7242ff61bd52b686f5fe9d41fe7cd3e6c05b8a876eccf35b8ad7c5e3a6704295d7210b138d7280a6f72688419a65dd7a8612d66869f2e712c57c41fcc9196e4cb06d95d8e678f6967e65348c370405fb7eeb6aa1d3e8")] [assembly: InternalsVisibleTo("DiscUtils.Swap, PublicKey=002400000480000094000000060200000024000052534131000400000100010047ebec172a9831bb20fede77e17d784026ea7030d7055f2ae09576c71cebe77ebfab436d80580a4fcbba7242ff61bd52b686f5fe9d41fe7cd3e6c05b8a876eccf35b8ad7c5e3a6704295d7210b138d7280a6f72688419a65dd7a8612d66869f2e712c57c41fcc9196e4cb06d95d8e678f6967e65348c370405fb7eeb6aa1d3e8")]
<<<<<<< LogSectorSize = EndianUtilities.ToUInt16BigEndian(buffer, offset + 0xC2); LogUnitSize = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xC4); Features2 = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xC8); BadFeatures2 = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xCC); CompatibleFeatures = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xD0); ReadOnlyCompatibleFeatures = (ReadOnlyCompatibleFeatures)EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xD4); IncompatibleFeatures = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xD8); LogIncompatibleFeatures = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xDC); Crc = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xE0); SparseInodeAlignment = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xE4); ProjectQuotaInode = EndianUtilities.ToUInt64BigEndian(buffer, offset + 0xE8); Lsn = EndianUtilities.ToInt64BigEndian(buffer, offset + 0xF0); MetaUuid = EndianUtilities.ToGuidBigEndian(buffer, offset + 0xF8); ======= LogSectorSize = Utilities.ToUInt16BigEndian(buffer, offset + 0xC2); LogUnitSize = Utilities.ToUInt32BigEndian(buffer, offset + 0xC4); Features2 = Utilities.ToUInt32BigEndian(buffer, offset + 0xC8); BadFeatures2 = Utilities.ToUInt32BigEndian(buffer, offset + 0xCC); if (SbVersion >= XfsSbVersion5) { CompatibleFeatures = Utilities.ToUInt32BigEndian(buffer, offset); ReadOnlyCompatibleFeatures = (ReadOnlyCompatibleFeatures)Utilities.ToUInt32BigEndian(buffer, offset + 0x04); IncompatibleFeatures = Utilities.ToUInt32BigEndian(buffer, offset + 0x08); LogIncompatibleFeatures = Utilities.ToUInt32BigEndian(buffer, offset + 0x0C); Crc = Utilities.ToUInt32BigEndian(buffer, offset + 0x10); SparseInodeAlignment = Utilities.ToUInt32BigEndian(buffer, offset + 0x14); ProjectQuotaInode = Utilities.ToUInt64BigEndian(buffer, offset + 0x18); Lsn = Utilities.ToInt64BigEndian(buffer, offset + 0x20); MetaUuid = Utilities.ToGuidBigEndian(buffer, offset + 0x28); } >>>>>>> LogSectorSize = EndianUtilities.ToUInt16BigEndian(buffer, offset + 0xC2); LogUnitSize = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xC4); Features2 = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xC8); BadFeatures2 = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0xCC); if (SbVersion >= XfsSbVersion5) { CompatibleFeatures = EndianUtilities.ToUInt32BigEndian(buffer, offset); ReadOnlyCompatibleFeatures = (ReadOnlyCompatibleFeatures)EndianUtilities.ToUInt32BigEndian(buffer, offset + 0x04); IncompatibleFeatures = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0x08); LogIncompatibleFeatures = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0x0C); Crc = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0x10); SparseInodeAlignment = EndianUtilities.ToUInt32BigEndian(buffer, offset + 0x14); ProjectQuotaInode = EndianUtilities.ToUInt64BigEndian(buffer, offset + 0x18); Lsn = EndianUtilities.ToInt64BigEndian(buffer, offset + 0x20); MetaUuid = EndianUtilities.ToGuidBigEndian(buffer, offset + 0x28); }
<<<<<<< InodeBtreeInfo = new AllocationGroupInodeBtreeInfo(); data.Position = offset + superblock.SectorSize*2; var agiData = StreamUtilities.ReadFully(data, InodeBtreeInfo.Size); ======= InodeBtreeInfo = new AllocationGroupInodeBtreeInfo(superblock); data.Position = offset + superblock.SectorSize * 2; var agiData = Utilities.ReadFully(data, InodeBtreeInfo.Size); >>>>>>> InodeBtreeInfo = new AllocationGroupInodeBtreeInfo(superblock); data.Position = offset + superblock.SectorSize * 2; var agiData = StreamUtilities.ReadFully(data, InodeBtreeInfo.Size);
<<<<<<< context.RawStream.Position = GetOffset(context); return StreamUtilities.ReadFully(context.RawStream, (int) count); ======= context.RawStream.Position = GetOffset(context) + offset; return Utilities.ReadFully(context.RawStream, (int) count); >>>>>>> context.RawStream.Position = GetOffset(context) + offset; return StreamUtilities.ReadFully(context.RawStream, (int) count);
<<<<<<< /// </summary> internal static Bindable<bool> DisplayUnbeatableScoresDuringGameplay { get; private set; } /// <summary> ======= /// The selected judgement window preset /// </summary> internal static Bindable<string> JudgementWindows { get; private set; } /// <summary> >>>>>>> /// </summary> internal static Bindable<bool> DisplayUnbeatableScoresDuringGameplay { get; private set; } /// <summary> /// The selected judgement window preset /// </summary> internal static Bindable<string> JudgementWindows { get; private set; } /// <summary> <<<<<<< SelectFilterGameModeBy = ReadValue(@"SelectFilterGameModeBy", SelectFilterGameMode.All, data); DisplayUnbeatableScoresDuringGameplay = ReadValue(@"DisplayUnbeatableScoresDuringGameplay", true, data); ======= JudgementWindows = ReadValue("JudgementWindows", "", data); >>>>>>> SelectFilterGameModeBy = ReadValue(@"SelectFilterGameModeBy", SelectFilterGameMode.All, data); DisplayUnbeatableScoresDuringGameplay = ReadValue(@"DisplayUnbeatableScoresDuringGameplay", true, data); JudgementWindows = ReadValue("JudgementWindows", "", data); <<<<<<< SelectFilterGameModeBy.ValueChanged += AutoSaveConfiguration; DisplayUnbeatableScoresDuringGameplay.ValueChanged += AutoSaveConfiguration; ======= JudgementWindows.ValueChanged += AutoSaveConfiguration; >>>>>>> SelectFilterGameModeBy.ValueChanged += AutoSaveConfiguration; DisplayUnbeatableScoresDuringGameplay.ValueChanged += AutoSaveConfiguration; JudgementWindows.ValueChanged += AutoSaveConfiguration;
<<<<<<< ListeningParty = null; FriendsList = new List<int>(); ======= SpectatorClients = new Dictionary<int, SpectatorClient>(); Spectators = new Dictionary<int, User>(); >>>>>>> ListeningParty = null; FriendsList = new List<int>(); SpectatorClients = new Dictionary<int, SpectatorClient>(); Spectators = new Dictionary<int, User>(); <<<<<<< /// The active listening party the user is in /// </summary> public static ListeningParty ListeningParty { get; private set; } /// <summary> ======= /// The players who the client is currently spectating /// /// Note: /// - Only 1 player is allowed if not running a tournament client /// - Otherwise multiple are allowed. /// </summary> public static Dictionary<int, SpectatorClient> SpectatorClients { get; private set; } /// <summary> /// Players who are currently spectating us /// </summary> public static Dictionary<int, User> Spectators { get; private set; } /// <summary> /// If we're currently being spectated by another user /// </summary> public static bool IsBeingSpectated => Client != null && Status.Value == ConnectionStatus.Connected && Spectators.Count != 0; /// <summary> /// If the client is currently spectating someone /// </summary> public static bool IsSpectatingSomeone => Client != null & Status.Value == ConnectionStatus.Connected && SpectatorClients.Count != 0; >>>>>>> /// The active listening party the user is in /// </summary> public static ListeningParty ListeningParty { get; private set; } /// <summary> /// The players who the client is currently spectating /// /// Note: /// - Only 1 player is allowed if not running a tournament client /// - Otherwise multiple are allowed. /// </summary> public static Dictionary<int, SpectatorClient> SpectatorClients { get; private set; } /// <summary> /// Players who are currently spectating us /// </summary> public static Dictionary<int, User> Spectators { get; private set; } /// <summary> /// If we're currently being spectated by another user /// </summary> public static bool IsBeingSpectated => Client != null && Status.Value == ConnectionStatus.Connected && Spectators.Count != 0; /// <summary> /// If the client is currently spectating someone /// </summary> public static bool IsSpectatingSomeone => Client != null & Status.Value == ConnectionStatus.Connected && SpectatorClients.Count != 0; <<<<<<< Client.OnJoinedListeningParty += OnJoinedListeningParty; Client.OnLeftListeningParty += OnLeftListeningParty; Client.OnListeningPartyStateUpdate += OnListeningPartyStateUpdate; Client.OnListeningPartyFellowJoined += OnListeningPartyFellowJoined; Client.OnListeningPartyFellowLeft += OnListeningPartyFellowLeft; Client.OnListeningPartyChangeHost += OnListeningPartyChangeHost; Client.OnListeningPartyUserMissingSong += OnListeningPartyUserMissingSong; Client.OnListeningPartyUserHasSong += OnListeningPartyUserHasSong; Client.OnUserFriendsListReceived += OnUserFriendsListReceieved; ======= Client.OnStartedSpectatingPlayer += OnStartedSpectatingPlayer; Client.OnStoppedSpectatingPlayer += OnStoppedSpectatingPlayer; Client.OnSpectatorJoined += OnSpectatorJoined; Client.OnSpectatorLeft += OnSpectatorLeft; Client.OnSpectatorReplayFrames += OnSpectatorReplayFrames; >>>>>>> Client.OnJoinedListeningParty += OnJoinedListeningParty; Client.OnLeftListeningParty += OnLeftListeningParty; Client.OnListeningPartyStateUpdate += OnListeningPartyStateUpdate; Client.OnListeningPartyFellowJoined += OnListeningPartyFellowJoined; Client.OnListeningPartyFellowLeft += OnListeningPartyFellowLeft; Client.OnListeningPartyChangeHost += OnListeningPartyChangeHost; Client.OnListeningPartyUserMissingSong += OnListeningPartyUserMissingSong; Client.OnListeningPartyUserHasSong += OnListeningPartyUserHasSong; Client.OnUserFriendsListReceived += OnUserFriendsListReceieved; Client.OnStartedSpectatingPlayer += OnStartedSpectatingPlayer; Client.OnStoppedSpectatingPlayer += OnStoppedSpectatingPlayer; Client.OnSpectatorJoined += OnSpectatorJoined; Client.OnSpectatorLeft += OnSpectatorLeft; Client.OnSpectatorReplayFrames += OnSpectatorReplayFrames;
<<<<<<< using Wobble.Screens; ======= using Quaver.Online; using Wobble.Screens; >>>>>>> using Quaver.Online; using Wobble.Screens;
<<<<<<< ======= using Quaver.Logging; using Quaver.Online; using Quaver.Online.Chat; >>>>>>> using Quaver.Online; using Quaver.Online.Chat; <<<<<<< LogManager.Draw(gameTime); ======= >>>>>>> LogManager.Draw(gameTime); <<<<<<< ConfigManager.Initialize(); Logger.DisplayMessages = ConfigManager.DebugDisplayLogMessages.Value; ConfigManager.DebugDisplayLogMessages.ValueChanged += (o, e) => Logger.DisplayMessages = ConfigManager.DebugDisplayLogMessages.Value; ======= >>>>>>> ConfigManager.Initialize(); Logger.DisplayMessages = ConfigManager.DebugDisplayLogMessages.Value; ConfigManager.DebugDisplayLogMessages.ValueChanged += (o, e) => Logger.DisplayMessages = ConfigManager.DebugDisplayLogMessages.Value;
<<<<<<< public static Texture2D CloseChannelButton { get; set; } public static Texture2D SendMessageButton { get; set; } ======= public static Texture2D ThumbnailSinglePlayer { get; set; } public static Texture2D ThumbnailCompetitive { get; set; } public static Texture2D ThumbnailCustomGames { get; set; } public static Texture2D ThumbnailEditor { get; set; } >>>>>>> public static Texture2D CloseChannelButton { get; set; } public static Texture2D SendMessageButton { get; set; } public static Texture2D ThumbnailSinglePlayer { get; set; } public static Texture2D ThumbnailCompetitive { get; set; } public static Texture2D ThumbnailCustomGames { get; set; } public static Texture2D ThumbnailEditor { get; set; } <<<<<<< CloseChannelButton = AssetLoader.LoadTexture2D(QuaverResources.close_channel_button); SendMessageButton = AssetLoader.LoadTexture2D(QuaverResources.send_message_button); ======= ThumbnailSinglePlayer = AssetLoader.LoadTexture2D(QuaverResources.thumbnail_single_player); ThumbnailCompetitive = AssetLoader.LoadTexture2D(QuaverResources.thumbnail_competitive); ThumbnailCustomGames = AssetLoader.LoadTexture2D(QuaverResources.thumbnail_custom_games); ThumbnailEditor = AssetLoader.LoadTexture2D(QuaverResources.thumbnail_editor); >>>>>>> CloseChannelButton = AssetLoader.LoadTexture2D(QuaverResources.close_channel_button); SendMessageButton = AssetLoader.LoadTexture2D(QuaverResources.send_message_button); ThumbnailSinglePlayer = AssetLoader.LoadTexture2D(QuaverResources.thumbnail_single_player); ThumbnailCompetitive = AssetLoader.LoadTexture2D(QuaverResources.thumbnail_competitive); ThumbnailCustomGames = AssetLoader.LoadTexture2D(QuaverResources.thumbnail_custom_games); ThumbnailEditor = AssetLoader.LoadTexture2D(QuaverResources.thumbnail_editor);
<<<<<<< Gavel = AssetLoader.LoadTexture2D(QuaverResources.fa_legal_hammer); Wrench = AssetLoader.LoadTexture2D(QuaverResources.fa_open_wrench_tool_silhouette); ======= StepBackward = AssetLoader.LoadTexture2D(QuaverResources.fa_step_backward); StepForward = AssetLoader.LoadTexture2D(QuaverResources.fa_step_forward); Undo = AssetLoader.LoadTexture2D(QuaverResources.fa_undo_arrow); BarGraph = AssetLoader.LoadTexture2D(QuaverResources.fa_bar_graph_on_a_rectangle); >>>>>>> Gavel = AssetLoader.LoadTexture2D(QuaverResources.fa_legal_hammer); Wrench = AssetLoader.LoadTexture2D(QuaverResources.fa_open_wrench_tool_silhouette); StepBackward = AssetLoader.LoadTexture2D(QuaverResources.fa_step_backward); StepForward = AssetLoader.LoadTexture2D(QuaverResources.fa_step_forward); Undo = AssetLoader.LoadTexture2D(QuaverResources.fa_undo_arrow); BarGraph = AssetLoader.LoadTexture2D(QuaverResources.fa_bar_graph_on_a_rectangle);
<<<<<<< /// Whether or not to play hitsounds in the editor. /// </summary> internal static Bindable<bool> EditorEnableHitsounds { get; private set; } /// <summary> /// The type of beat snap colors that'll be displayed in the editor. /// </summary> internal static Bindable<EditorBeatSnapColor> EditorBeatSnapColorType { get; private set; } /// <summary> /// Whether or not the user only wants to display measure lines while editing. /// </summary> internal static Bindable<bool> EditorOnlyShowMeasureLines { get; private set; } /// <summary> /// Whether or not the user would like to display the lines that divide the lanes. /// </summary> internal static Bindable<bool> EditorShowLaneDividerLines { get; private set; } /// <summary> /// Anchors HitObjects to the middle, so the snap lines are in the middle of the object. /// </summary> internal static Bindable<bool> EditorHitObjectsMidpointAnchored { get; private set; } /// <summary> /// Whether or jot the user wants to play the metronome in the editor /// </summary> internal static Bindable<bool> EditorPlayMetronome { get; private set; } /// <summary> /// If the metronome in the editor will play half beats. /// </summary> internal static Bindable<bool> EditorMetronomePlayHalfBeats { get; private set; } /// <summary> ======= /// If true, it'll display the numbers for the song time progress /// </summary> internal static Bindable<bool> DisplaySongTimeProgressNumbers { get; private set; } /// </summary> internal static Bindable<bool> DisplayJudgementCounter { get; private set; } /// If true, the user will skip the results screen after quitting the game. /// </summary> internal static Bindable<bool> SkipResultsScreenAfterQuit { get; private set; } /// <summary> >>>>>>> /// Whether or not to play hitsounds in the editor. /// </summary> internal static Bindable<bool> EditorEnableHitsounds { get; private set; } /// <summary> /// The type of beat snap colors that'll be displayed in the editor. /// </summary> internal static Bindable<EditorBeatSnapColor> EditorBeatSnapColorType { get; private set; } /// <summary> /// Whether or not the user only wants to display measure lines while editing. /// </summary> internal static Bindable<bool> EditorOnlyShowMeasureLines { get; private set; } /// <summary> /// Whether or not the user would like to display the lines that divide the lanes. /// </summary> internal static Bindable<bool> EditorShowLaneDividerLines { get; private set; } /// <summary> /// Anchors HitObjects to the middle, so the snap lines are in the middle of the object. /// </summary> internal static Bindable<bool> EditorHitObjectsMidpointAnchored { get; private set; } /// <summary> /// Whether or jot the user wants to play the metronome in the editor /// </summary> internal static Bindable<bool> EditorPlayMetronome { get; private set; } /// <summary> /// If the metronome in the editor will play half beats. /// </summary> internal static Bindable<bool> EditorMetronomePlayHalfBeats { get; private set; } /// <summary> /// If true, it'll display the numbers for the song time progress /// </summary> internal static Bindable<bool> DisplaySongTimeProgressNumbers { get; private set; } /// <summary> /// /// </summary> internal static Bindable<bool> DisplayJudgementCounter { get; private set; } /// <summary></summary> /// If true, the user will skip the results screen after quitting the game. /// </summary> internal static Bindable<bool> SkipResultsScreenAfterQuit { get; private set; } /// <summary> <<<<<<< EditorEnableHitsounds = ReadValue(@"EditorEnableHitsounds", true, data); EditorBeatSnapColorType = ReadValue(@"EditorBeatSnapColorType", EditorBeatSnapColor.Default, data); EditorOnlyShowMeasureLines = ReadValue(@"EditorOnlyShowMeasureLines", false, data); EditorShowLaneDividerLines = ReadValue(@"EditorShowDividerLines", true, data); EditorHitObjectsMidpointAnchored = ReadValue(@"EditorHitObjectsMidpointAnchored", false, data); EditorPlayMetronome = ReadValue(@"EditorPlayMetronome", true, data); EditorMetronomePlayHalfBeats = ReadValue(@"EditorMetronomePlayHalfBeats", false, data); ======= DisplaySongTimeProgressNumbers = ReadValue(@"DisplaySongTimeProgressNumbers", true, data); DisplayJudgementCounter = ReadValue(@"DisplayJudgementCounter", true, data); SkipResultsScreenAfterQuit = ReadValue(@"SkipResultsScreenAfterQuit", false, data); DisplayComboAlerts = ReadValue(@"DisplayComboAlerts", true, data); LaneCoverTopHeight = ReadInt(@"LaneCoverTopHeight", 25, 0, 75, data); LaneCoverBottomHeight = ReadInt(@"LaneCoverBottomHeight", 25, 0, 75, data); LaneCoverTop = ReadValue(@"LaneCoverTop", false, data); LaneCoverBottom = ReadValue(@"LaneCoverBottom", false, data); UIElementsOverLaneCover = ReadValue(@"UIElementsOverLaneCover", true, data); >>>>>>> EditorEnableHitsounds = ReadValue(@"EditorEnableHitsounds", true, data); EditorBeatSnapColorType = ReadValue(@"EditorBeatSnapColorType", EditorBeatSnapColor.Default, data); EditorOnlyShowMeasureLines = ReadValue(@"EditorOnlyShowMeasureLines", false, data); EditorShowLaneDividerLines = ReadValue(@"EditorShowDividerLines", true, data); EditorHitObjectsMidpointAnchored = ReadValue(@"EditorHitObjectsMidpointAnchored", false, data); EditorPlayMetronome = ReadValue(@"EditorPlayMetronome", true, data); EditorMetronomePlayHalfBeats = ReadValue(@"EditorMetronomePlayHalfBeats", false, data); DisplaySongTimeProgressNumbers = ReadValue(@"DisplaySongTimeProgressNumbers", true, data); DisplayJudgementCounter = ReadValue(@"DisplayJudgementCounter", true, data); SkipResultsScreenAfterQuit = ReadValue(@"SkipResultsScreenAfterQuit", false, data); DisplayComboAlerts = ReadValue(@"DisplayComboAlerts", true, data); LaneCoverTopHeight = ReadInt(@"LaneCoverTopHeight", 25, 0, 75, data); LaneCoverBottomHeight = ReadInt(@"LaneCoverBottomHeight", 25, 0, 75, data); LaneCoverTop = ReadValue(@"LaneCoverTop", false, data); LaneCoverBottom = ReadValue(@"LaneCoverBottom", false, data); UIElementsOverLaneCover = ReadValue(@"UIElementsOverLaneCover", true, data); <<<<<<< EditorBeatSnapColorType.ValueChanged += AutoSaveConfiguration; EditorShowLaneDividerLines.ValueChanged += AutoSaveConfiguration; EditorHitObjectsMidpointAnchored.ValueChanged += AutoSaveConfiguration; EditorPlayMetronome.ValueChanged += AutoSaveConfiguration; EditorMetronomePlayHalfBeats.ValueChanged += AutoSaveConfiguration; ======= DisplaySongTimeProgressNumbers.ValueChanged += AutoSaveConfiguration; DisplayJudgementCounter.ValueChanged += AutoSaveConfiguration; SkipResultsScreenAfterQuit.ValueChanged += AutoSaveConfiguration; DisplayComboAlerts.ValueChanged += AutoSaveConfiguration; LaneCoverTopHeight.ValueChanged += AutoSaveConfiguration; LaneCoverBottomHeight.ValueChanged += AutoSaveConfiguration; LaneCoverTop.ValueChanged += AutoSaveConfiguration; LaneCoverBottom.ValueChanged += AutoSaveConfiguration; UIElementsOverLaneCover.ValueChanged += AutoSaveConfiguration; >>>>>>> EditorBeatSnapColorType.ValueChanged += AutoSaveConfiguration; EditorShowLaneDividerLines.ValueChanged += AutoSaveConfiguration; EditorHitObjectsMidpointAnchored.ValueChanged += AutoSaveConfiguration; EditorPlayMetronome.ValueChanged += AutoSaveConfiguration; EditorMetronomePlayHalfBeats.ValueChanged += AutoSaveConfiguration; DisplaySongTimeProgressNumbers.ValueChanged += AutoSaveConfiguration; DisplayJudgementCounter.ValueChanged += AutoSaveConfiguration; SkipResultsScreenAfterQuit.ValueChanged += AutoSaveConfiguration; DisplayComboAlerts.ValueChanged += AutoSaveConfiguration; LaneCoverTopHeight.ValueChanged += AutoSaveConfiguration; LaneCoverBottomHeight.ValueChanged += AutoSaveConfiguration; LaneCoverTop.ValueChanged += AutoSaveConfiguration; LaneCoverBottom.ValueChanged += AutoSaveConfiguration; UIElementsOverLaneCover.ValueChanged += AutoSaveConfiguration;
<<<<<<< /// </summary> internal static Bindable<bool> ShowSpectators { get; private set; } /// <summary> ======= /// The selected judgement window preset /// </summary> internal static Bindable<string> JudgementWindows { get; private set; } /// <summary> >>>>>>> /// </summary> internal static Bindable<bool> ShowSpectators { get; private set; } /// <summary> /// The selected judgement window preset /// </summary> internal static Bindable<string> JudgementWindows { get; private set; } /// <summary> <<<<<<< ShowSpectators = ReadValue(@"ShowSpectators", true, data); ======= JudgementWindows = ReadValue("JudgementWindows", "", data); >>>>>>> ShowSpectators = ReadValue(@"ShowSpectators", true, data); JudgementWindows = ReadValue("JudgementWindows", "", data); <<<<<<< ShowSpectators.ValueChanged += AutoSaveConfiguration; ======= JudgementWindows.ValueChanged += AutoSaveConfiguration; >>>>>>> ShowSpectators.ValueChanged += AutoSaveConfiguration; JudgementWindows.ValueChanged += AutoSaveConfiguration;
<<<<<<< using Quaver.Shared.Online; ======= using Quaver.Shared.Scheduling; >>>>>>> using Quaver.Shared.Online; using Quaver.Shared.Scheduling;
<<<<<<< using Quaver.Shared.Audio; ======= using Quaver.Shared.Database.Judgements; >>>>>>> using Quaver.Shared.Audio; using Quaver.Shared.Database.Judgements; <<<<<<< VirtualPlayer = new VirtualReplayPlayer(Replay, Screen.Map, Screen.SpectatorClient != null); ======= VirtualPlayer = new VirtualReplayPlayer(Replay, Screen.Map, JudgementWindowsDatabaseCache.Selected.Value); >>>>>>> VirtualPlayer = new VirtualReplayPlayer(Replay, Screen.Map, JudgementWindowsDatabaseCache.Selected.Value, Screen.SpectatorClient != null);
<<<<<<< internal static Texture2D Pencil { get; set; } internal static Texture2D Play { get; set; } internal static Texture2D Pause { get; set; } internal static Texture2D Stop { get; set; } internal static Texture2D File { get; set; } internal static Texture2D Folder { get; set; } internal static Texture2D Save { get; set; } internal static Texture2D FastForward { get; set; } internal static Texture2D Clock { get; set; } internal static Texture2D ArrowLeft { get; set; } internal static Texture2D ArrowRight { get; set; } internal static Texture2D ChevronSignLeft { get; set; } internal static Texture2D ChevronSignRight { get; set; } ======= internal static Texture2D Twitter { get; set; } internal static Texture2D Rss { get; set; } internal static Texture2D Code { get; set; } internal static Texture2D Bars { get; set; } internal static Texture2D Question { get; set; } internal static Texture2D Trophy { get; set; } internal static Texture2D Globe { get; set; } internal static Texture2D Comments { get; set; } internal static Texture2D Spinner { get; set; } >>>>>>> internal static Texture2D Pencil { get; set; } internal static Texture2D Play { get; set; } internal static Texture2D Pause { get; set; } internal static Texture2D Stop { get; set; } internal static Texture2D File { get; set; } internal static Texture2D Folder { get; set; } internal static Texture2D Save { get; set; } internal static Texture2D FastForward { get; set; } internal static Texture2D Clock { get; set; } internal static Texture2D ArrowLeft { get; set; } internal static Texture2D ArrowRight { get; set; } internal static Texture2D ChevronSignLeft { get; set; } internal static Texture2D ChevronSignRight { get; set; } internal static Texture2D Twitter { get; set; } internal static Texture2D Rss { get; set; } internal static Texture2D Code { get; set; } internal static Texture2D Bars { get; set; } internal static Texture2D Question { get; set; } internal static Texture2D Trophy { get; set; } internal static Texture2D Globe { get; set; } internal static Texture2D Comments { get; set; } internal static Texture2D Spinner { get; set; } <<<<<<< VideoPlay = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_play_video_button); Pencil = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_pencil); Play = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_play_button); Pause = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_pause_symbol); Stop = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_square_shape_shadow); File = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_file); Folder = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_open_folder); Save = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_save_file_option); FastForward = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_fast_forward_arrows); Clock = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_time); ArrowLeft = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_arrow_pointing_to_left); ArrowRight = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_arrow_pointing_to_right); ChevronSignLeft = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_angle_pointing_to_left); ChevronSignRight = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_angle_arrow_pointing_to_right); ======= VideoPlay= ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_play_video_button); Twitter = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_twitter_black_shape); Rss = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_rss_symbol); Code = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_code); Bars = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_signal_bars); Question = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_question_sign); Trophy = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_trophy); Globe = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_earth_globe); Comments = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_comments); Spinner = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_spinner_of_dots); >>>>>>> VideoPlay = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_play_video_button); Pencil = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_pencil); Play = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_play_button); Pause = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_pause_symbol); Stop = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_square_shape_shadow); File = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_file); Folder = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_open_folder); Save = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_save_file_option); FastForward = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_fast_forward_arrows); Clock = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_time); ArrowLeft = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_arrow_pointing_to_left); ArrowRight = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_arrow_pointing_to_right); ChevronSignLeft = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_angle_pointing_to_left); ChevronSignRight = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_angle_arrow_pointing_to_right); VideoPlay= ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_play_video_button); Twitter = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_twitter_black_shape); Rss = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_rss_symbol); Code = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_code); Bars = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_signal_bars); Question = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_question_sign); Trophy = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_trophy); Globe = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_earth_globe); Comments = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_comments); Spinner = ResourceHelper.LoadTexture2DFromPng(QuaverResources.fa_spinner_of_dots);
<<<<<<< /// </summary> internal static Bindable<bool> DisplayJudgementCounter { get; private set; } /// <summary> ======= /// If true, the user will skip the results screen after quitting the game. /// </summary> internal static Bindable<bool> SkipResultsScreenAfterQuit { get; private set; } /// <summary> >>>>>>> /// </summary> internal static Bindable<bool> DisplayJudgementCounter { get; private set; } /// If true, the user will skip the results screen after quitting the game. /// </summary> internal static Bindable<bool> SkipResultsScreenAfterQuit { get; private set; } /// <summary> <<<<<<< DisplayJudgementCounter = ReadValue(@"DisplayJudgementCounter", true, data); ======= SkipResultsScreenAfterQuit = ReadValue(@"SkipResultsScreenAfterQuit", false, data); DisplayComboAlerts = ReadValue(@"DisplayComboAlerts", true, data); >>>>>>> DisplayJudgementCounter = ReadValue(@"DisplayJudgementCounter", true, data); SkipResultsScreenAfterQuit = ReadValue(@"SkipResultsScreenAfterQuit", false, data); DisplayComboAlerts = ReadValue(@"DisplayComboAlerts", true, data); <<<<<<< DisplayJudgementCounter.ValueChanged += AutoSaveConfiguration; ======= SkipResultsScreenAfterQuit.ValueChanged += AutoSaveConfiguration; DisplayComboAlerts.ValueChanged += AutoSaveConfiguration; >>>>>>> DisplayJudgementCounter.ValueChanged += AutoSaveConfiguration; SkipResultsScreenAfterQuit.ValueChanged += AutoSaveConfiguration; DisplayComboAlerts.ValueChanged += AutoSaveConfiguration;
<<<<<<< var textureHeight = SliceSize / 2; ======= >>>>>>> var textureHeight = SliceSize / 2; <<<<<<< } public override void Update(GameTime gameTime) { base.Update(gameTime); ======= >>>>>>>
<<<<<<< /// </summary> internal static Bindable<bool> DisplayUnbeatableScoresDuringGameplay { get; private set; } /// <summary> ======= /// </summary> internal static Bindable<bool> ShowSpectators { get; private set; } /// <summary> >>>>>>> /// </summary> internal static Bindable<bool> DisplayUnbeatableScoresDuringGameplay { get; private set; } /// <summary> /// </summary> internal static Bindable<bool> ShowSpectators { get; private set; } /// <summary> <<<<<<< SelectFilterGameModeBy = ReadValue(@"SelectFilterGameModeBy", SelectFilterGameMode.All, data); DisplayUnbeatableScoresDuringGameplay = ReadValue(@"DisplayUnbeatableScoresDuringGameplay", true, data); ======= ShowSpectators = ReadValue(@"ShowSpectators", true, data); >>>>>>> SelectFilterGameModeBy = ReadValue(@"SelectFilterGameModeBy", SelectFilterGameMode.All, data); DisplayUnbeatableScoresDuringGameplay = ReadValue(@"DisplayUnbeatableScoresDuringGameplay", true, data); ShowSpectators = ReadValue(@"ShowSpectators", true, data); <<<<<<< SelectFilterGameModeBy.ValueChanged += AutoSaveConfiguration; DisplayUnbeatableScoresDuringGameplay.ValueChanged += AutoSaveConfiguration; ======= ShowSpectators.ValueChanged += AutoSaveConfiguration; >>>>>>> SelectFilterGameModeBy.ValueChanged += AutoSaveConfiguration; DisplayUnbeatableScoresDuringGameplay.ValueChanged += AutoSaveConfiguration; ShowSpectators.ValueChanged += AutoSaveConfiguration;
<<<<<<< internal List<List<Texture2D>> NoteHitObjects { get; set; } = new List<List<Texture2D>>(); internal Texture2D[] NoteHoldBodies { get; set; } = new Texture2D[4]; internal Texture2D[] NoteHoldEnds { get; set; } = new Texture2D[4]; internal Texture2D[] NoteReceptors { get; set; } = new Texture2D[4]; ======= internal Texture2D[] NoteHitObjects4K { get; set; } = new Texture2D[4]; internal Texture2D[] NoteHoldBodies4K { get; set; } = new Texture2D[4]; internal Texture2D[] NoteHoldEnds4K { get; set; } = new Texture2D[4]; internal Texture2D[] NoteReceptors4K { get; set; } = new Texture2D[4]; >>>>>>> internal List<List<Texture2D>> NoteHitObjects { get; set; } = new List<List<Texture2D>>(); internal Texture2D[] NoteHoldBodies { get; set; } = new Texture2D[4]; internal Texture2D[] NoteHoldEnds { get; set; } = new Texture2D[4]; internal Texture2D[] NoteReceptors { get; set; } = new Texture2D[4]; internal Texture2D[] NoteHoldBodies4K { get; set; } = new Texture2D[4]; internal Texture2D[] NoteHoldEnds4K { get; set; } = new Texture2D[4]; internal Texture2D[] NoteReceptors4K { get; set; } = new Texture2D[4]; <<<<<<< LoadHitObjects(skinDir, element, 0); ======= NoteHitObjects4K[0] = LoadIndividualElement(element, skinElementPath); >>>>>>> LoadHitObjects(skinDir, element, 0); <<<<<<< LoadHitObjects(skinDir, element, 1); ======= NoteHitObjects4K[1] = LoadIndividualElement(element, skinElementPath); >>>>>>> LoadHitObjects(skinDir, element, 1); <<<<<<< LoadHitObjects(skinDir, element, 2); ======= NoteHitObjects4K[2] = LoadIndividualElement(element, skinElementPath); >>>>>>> LoadHitObjects(skinDir, element, 2); <<<<<<< LoadHitObjects(skinDir, element, 3); ======= NoteHitObjects4K[3] = LoadIndividualElement(element, skinElementPath); >>>>>>> LoadHitObjects(skinDir, element, 3);
<<<<<<< new SettingsBool(this, "Display Judgement Counter", ConfigManager.DisplayJudgementCounter), ======= new SettingsBool(this, "Enable Combo Alerts", ConfigManager.DisplayComboAlerts), >>>>>>> new SettingsBool(this, "Display Judgement Counter", ConfigManager.DisplayJudgementCounter), new SettingsBool(this, "Enable Combo Alerts", ConfigManager.DisplayComboAlerts),
<<<<<<< using Quaver.Graphics.Buttons.Selection; using Quaver.Graphics.Colors; ======= using Quaver.Graphics.Buttons.Dropdowns; using Quaver.Graphics.Buttons.Sliders; >>>>>>> using Quaver.Graphics.Buttons.Selection;
<<<<<<< /// Argument Processor for the "/Port" command line argument. ======= /// Argument Executor for the "--Port|/Port" command line argument. >>>>>>> /// Argument Processor for the "--Port|/Port" command line argument.
<<<<<<< if (classServices.Length != 1) ======= if (classServices.Count() != 1) >>>>>>> if (classServices.Count() != 1) <<<<<<< var classService = classServices[0]; ======= var classService = classServices.Single(); >>>>>>> var classService = classServices.Single(); <<<<<<< if (registration.Services.Count == 1) ======= if (registration.ServicesCount == 1) // the delegate is the only service we expose >>>>>>> if (registration.ServicesCount == 1) // the delegate is the only service we expose <<<<<<< "Type {0} is a delegate, however the component has also {1} inteface(s) specified as it's service. Delegate-based typed factories can't expose any additional services.", classService, registration.Services.Count - 1)); ======= "Type {0} is a delegate, however the component has also {1} inteface(s) specified as its service. Delegate-based typed factories can't expose any additional services.", classService.Name, registration.ServicesCount - 1)); >>>>>>> "Type {0} is a delegate, however the component has also {1} inteface(s) specified as its service. Delegate-based typed factories can't expose any additional services.", classService.Name, registration.ServicesCount - 1)); <<<<<<< var delegateType = registration.Services.Single(); ======= >>>>>>>
<<<<<<< ======= using Castle.Core.Interceptor; using Castle.DynamicProxy; >>>>>>> using Castle.DynamicProxy;
<<<<<<< private readonly Func<IKernel, CreationContext, T> creator; ======= public FactoryMethodActivator(ComponentModel model, IKernel kernel, ComponentInstanceDelegate onCreation, ComponentInstanceDelegate onDestruction) : base(model, kernel, onCreation, onDestruction) { } >>>>>>> private readonly Func<IKernel, CreationContext, T> creator; <<<<<<< protected override object Instantiate(CreationContext context) { return creator(Kernel, context); } ======= >>>>>>> protected override object Instantiate(CreationContext context) { return creator(Kernel, context); }
<<<<<<< var gameState = new GameState { Id = id, Name = name, MapId = _mapProvider.GetRandomMap().Id }; ======= var gameState = new GameState { Id = id, Name = name, Started = false, Map = _mapProvider.GetRandomMap() }; >>>>>>> var gameState = new GameState { Id = id, Name = name, MapId = _mapProvider.GetRandomMap().Id, Started = false }; <<<<<<< public ValidationResult<string[]> GetMap(Guid mapId) { try { var map = _mapProvider.Get(mapId); return ValidationResult<string[]>.Success.WithData(map.GetStringRepresentation()); } catch { return ValidationResult<string[]>.Failure("Invalid Map Id"); } } ======= public ValidationResult<GameState> StartGame(Guid gameId) { if (gameId == Guid.Empty) return ValidationResult<GameState>.Failure("gameId needs to be set"); var game = _repo.Get(gameId); if (game == null) return ValidationResult<GameState>.Failure("Game could not be found"); if(game.Players.Count < 2) ValidationResult<GamePlayer>.Failure("Game must have at least 2 players to start"); var list = new List<GamePlayer>(game.Players); for (int i = 0; i < game.Players.Count; i++) { var random = new Random(); var item = list.ElementAt(random.Next(0, list.Count - 1)); game.PlayerOrder.Add(i, item.Id); list.Remove(item); } game.Turn = 0; game.Started = true; _repo.Save(); return ValidationResult<GameState>.Success.WithData(game); } >>>>>>> public ValidationResult<string[]> GetMap(Guid mapId) { try { var map = _mapProvider.Get(mapId); return ValidationResult<string[]>.Success.WithData(map.GetStringRepresentation()); } catch { return ValidationResult<string[]>.Failure("Invalid Map Id"); } } public ValidationResult<GameState> StartGame(Guid gameId) { if (gameId == Guid.Empty) return ValidationResult<GameState>.Failure("gameId needs to be set"); var game = _repo.Get(gameId); if (game == null) return ValidationResult<GameState>.Failure("Game could not be found"); if(game.Players.Count < 2) ValidationResult<GamePlayer>.Failure("Game must have at least 2 players to start"); var list = new List<GamePlayer>(game.Players); for (int i = 0; i < game.Players.Count; i++) { var random = new Random(); var item = list.ElementAt(random.Next(0, list.Count - 1)); game.PlayerOrder.Add(i, item.Id); list.Remove(item); } game.Turn = 0; game.Started = true; _repo.Save(); return ValidationResult<GameState>.Success.WithData(game); }
<<<<<<< using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Samurai.Client.Wp7.Screens; namespace Samurai.Client.Wp7 { /// <summary> /// This is the main type for your game /// </summary> public class SamuraiGame : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; ScreenManager _screens; public SamuraiGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; #if WINDOWS_PHONE // Frame rate is 30 fps by default for Windows Phone. TargetElapsedTime = TimeSpan.FromTicks(333333); // Extend battery life under lock. InactiveSleepTime = TimeSpan.FromSeconds(1); graphics.IsFullScreen = true; #endif } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { _screens = new ScreenManager(this); Components.Add(_screens); base.Initialize(); } protected override void LoadContent() { // Do this here so that the Graphics device is ready _screens.GetOrCreateScreen<MainMenuScreen>(); _screens.TransitionTo<MainMenuScreen>(); base.LoadContent(); } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { // DrawableGameComponent automatically does this for our screens base.Update(gameTime); } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); // DrawableGameComponent automatically does this for our screens base.Draw(gameTime); } } } ======= using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Samurai.Client.Wp7.Screens; namespace Samurai.Client.Wp7 { /// <summary> /// This is the main type for your game /// </summary> public class SamuraiGame : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; ScreenManager _screens; public SamuraiGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; // Frame rate is 30 fps by default for Windows Phone. TargetElapsedTime = TimeSpan.FromTicks(333333); #if !MONO // Extend battery life under lock. InactiveSleepTime = TimeSpan.FromSeconds(1); #endif graphics.IsFullScreen = true; } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { _screens = new ScreenManager(this); Components.Add(_screens); base.Initialize(); } protected override void LoadContent() { // Do this here so that the Graphics device is ready _screens.GetOrCreateScreen<MainMenuScreen>(); _screens.TransitionTo<MainMenuScreen>(); base.LoadContent(); } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { // DrawableGameComponent automatically does this for our screens base.Update(gameTime); } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); // DrawableGameComponent automatically does this for our screens base.Draw(gameTime); } } } >>>>>>> using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Samurai.Client.Wp7.Screens; namespace Samurai.Client.Wp7 { /// <summary> /// This is the main type for your game /// </summary> public class SamuraiGame : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; ScreenManager _screens; public SamuraiGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; #if WINDOWS_PHONE // Frame rate is 30 fps by default for Windows Phone. TargetElapsedTime = TimeSpan.FromTicks(333333); #if !MONO // Extend battery life under lock. InactiveSleepTime = TimeSpan.FromSeconds(1); #endif graphics.IsFullScreen = true; #endif } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { _screens = new ScreenManager(this); Components.Add(_screens); base.Initialize(); } protected override void LoadContent() { // Do this here so that the Graphics device is ready _screens.GetOrCreateScreen<MainMenuScreen>(); _screens.TransitionTo<MainMenuScreen>(); base.LoadContent(); } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { // DrawableGameComponent automatically does this for our screens base.Update(gameTime); } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); // DrawableGameComponent automatically does this for our screens base.Draw(gameTime); } } }
<<<<<<< QueryFilter filter = new QueryFilter(); filter.andFilters["RegionID"] = regionID; List<string> telehubposition = GD.Query(new string[11]{ "RegionLocX", "RegionLocY", "TelehubLocX", "TelehubLocY", "TelehubLocZ", "TelehubRotX", "TelehubRotY", "TelehubRotZ", "Spawns", "ObjectUUID", "Name" }, "telehubs", filter, null, null, null); ======= object remoteValue = DoRemote(regionID, regionHandle); if (remoteValue != null || m_doRemoteOnly) return (Telehub)remoteValue; Telehub telehub = new Telehub(); List<string> telehubposition = GD.Query("RegionID", regionID, "telehubs", "RegionLocX,RegionLocY,TelehubLocX,TelehubLocY,TelehubLocZ,TelehubRotX,TelehubRotY,TelehubRotZ,Spawns,ObjectUUID,Name"); //Not the right number of values, so its not there. if (telehubposition.Count != 11) return null; telehub.RegionID = regionID; telehub.RegionLocX = float.Parse(telehubposition[0]); telehub.RegionLocY = float.Parse(telehubposition[1]); telehub.TelehubLocX = float.Parse(telehubposition[2]); telehub.TelehubLocY = float.Parse(telehubposition[3]); telehub.TelehubLocZ = float.Parse(telehubposition[4]); telehub.TelehubRotX = float.Parse(telehubposition[5]); telehub.TelehubRotY = float.Parse(telehubposition[6]); telehub.TelehubRotZ = float.Parse(telehubposition[7]); telehub.SpawnPos = telehub.BuildToList(telehubposition[8]); telehub.ObjectUUID = UUID.Parse(telehubposition[9]); telehub.Name = telehubposition[10]; >>>>>>> object remoteValue = DoRemote(regionID, regionHandle); if (remoteValue != null || m_doRemoteOnly) return (Telehub)remoteValue; QueryFilter filter = new QueryFilter(); filter.andFilters["RegionID"] = regionID; List<string> telehubposition = GD.Query(new string[11]{ "RegionLocX", "RegionLocY", "TelehubLocX", "TelehubLocY", "TelehubLocZ", "TelehubRotX", "TelehubRotY", "TelehubRotZ", "Spawns", "ObjectUUID", "Name" }, "telehubs", filter, null, null, null);
<<<<<<< // ServerInputTextField.text = "signalingserver.centralus.cloudapp.azure.com:3000"; ======= ServerInputTextField.text = "signalingserver.centralus.cloudapp.azure.com:3000"; // Heartbeat interval in ms (-1 will disable) HeartbeatInputTextField.text = "5000"; >>>>>>> ServerInputTextField.text = "signalingserver.centralus.cloudapp.azure.com:3000"; // Heartbeat interval in ms (-1 will disable) HeartbeatInputTextField.text = "5000"; <<<<<<< _webRtcControl.ConnectToServer(host, port, PeerInputTextField.text); ======= int heartbeatMs; if (!int.TryParse(HeartbeatInputTextField.text, out heartbeatMs)) { heartbeatMs = -1; } #if !UNITY_EDITOR _webRtcControl.ConnectToServer(host, port, PeerInputTextField.text, heartbeatMs); >>>>>>> int heartbeatMs; if (!int.TryParse(HeartbeatInputTextField.text, out heartbeatMs)) { heartbeatMs = -1; } _webRtcControl.ConnectToServer(host, port, PeerInputTextField.text, heartbeatMs);
<<<<<<< ======= >>>>>>> <<<<<<< await LoadSettings().ConfigureAwait(false); ======= await LoadSettings().ConfigureAwait(false); Conductor.Instance.Signaller.SetHeartbeatMs(Convert.ToInt32(_heartbeat)); >>>>>>> await LoadSettings().ConfigureAwait(false); Conductor.Instance.Signaller.SetHeartbeatMs(Convert.ToInt32(_heartbeat));
<<<<<<< private bool _shouldIgnoreCaseForEnum; ======= private bool _shouldSerializeCharAsInt; >>>>>>> private bool _shouldIgnoreCaseForEnum; private bool _shouldSerializeCharAsInt; <<<<<<< object encryptKey = null, bool ShouldIgnoreCaseForEnum = false) ======= object encryptKey = null, bool shouldSerializeCharAsInt = false) >>>>>>> object encryptKey = null, bool ShouldIgnoreCaseForEnum = false, bool shouldSerializeCharAsInt = false) <<<<<<< _shouldIgnoreCaseForEnum = ShouldIgnoreCaseForEnum; ======= this._shouldSerializeCharAsInt = shouldSerializeCharAsInt; >>>>>>> _shouldIgnoreCaseForEnum = ShouldIgnoreCaseForEnum; this._shouldSerializeCharAsInt = shouldSerializeCharAsInt; <<<<<<< bool ISerializeOptions.ShouldIgnoreCaseForEnum { get { return _shouldIgnoreCaseForEnum; } } ======= public bool ShouldSerializeCharAsInt { get { return this._shouldSerializeCharAsInt; }} >>>>>>> bool ISerializeOptions.ShouldIgnoreCaseForEnum { get { return _shouldIgnoreCaseForEnum; } } public bool ShouldSerializeCharAsInt { get { return this._shouldSerializeCharAsInt; }} <<<<<<< public XmlSerializationOptions IgnoreCaseForEnum() { _shouldIgnoreCaseForEnum = true; return this; } ======= public XmlSerializationOptions SerializeCharAsInt() { _shouldSerializeCharAsInt = true; return this; } >>>>>>> public XmlSerializationOptions IgnoreCaseForEnum() { _shouldIgnoreCaseForEnum = true; return this; } public XmlSerializationOptions SerializeCharAsInt() { _shouldSerializeCharAsInt = true; return this; }
<<<<<<< bool ShouldIgnoreCaseForEnum { get; } ======= bool ShouldSerializeCharAsInt { get; } >>>>>>> bool ShouldIgnoreCaseForEnum { get; } bool ShouldSerializeCharAsInt { get; }
<<<<<<< public bool ShouldIgnoreCaseForEnum { get; set; } ======= public bool ShouldSerializeCharAsInt { get; set; } >>>>>>> public bool ShouldIgnoreCaseForEnum { get; set; } public bool ShouldSerializeCharAsInt { get; set; }
<<<<<<< ======= Release = ""; // Get data from the HTTP request Request = SentryRequest.GetRequest(); // Get the user data from the HTTP context or environment User = Request != null ? Request.GetUser() : new SentryUser(Environment.UserName); >>>>>>> Release = "";
<<<<<<< #region License // Copyright (c) 2014 The Sentry Team and individual contributors. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are permitted // provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, this list of // conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. // // 3. Neither the name of the Sentry nor the names of its contributors may be used to // endorse or promote products derived from this software without specific prior written // permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endregion using System; using System.Collections.Generic; using NUnit.Framework; using SharpRaven.Data; using SharpRaven.UnitTests.Utilities; namespace SharpRaven.UnitTests.Data { [TestFixture] public class SentryRequestTests { #region Setup/Teardown [SetUp] public void SetUp() { // Set the HTTP Context to null before so tests don't bleed data into each other. @asbjornu SentryRequest.HttpContext = null; } [TearDown] public void TearDown() { // Set the HTTP Context to null before so tests don't bleed data into each other. @asbjornu SentryRequest.HttpContext = null; } #endregion private static void SimulateHttpRequest(Action<SentryRequest> test) { using (var simulator = new HttpSimulator()) { simulator.SetFormVariable("Form1", "Value1"); simulator.SetHeader("UserAgent", "SharpRaven"); simulator.SetCookie("Cookie", "Monster"); using (simulator.SimulateRequest()) { var request = SentryRequest.GetRequest(); test.Invoke(request); } } } [Test] public void GetRequest_NoHttpContext_ReturnsNull() { var request = SentryRequest.GetRequest(); Assert.That(request, Is.Null); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasCookies() { SimulateHttpRequest(request => { Assert.That(request.Cookies, Has.Count.EqualTo(1)); Assert.That(request.Cookies["Cookie"], Is.EqualTo("Monster")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasFormVariables() { SimulateHttpRequest(request => { Assert.That(request.Data, Is.TypeOf<Dictionary<string, string>>()); var data = (Dictionary<string, string>) request.Data; Assert.That(data, Has.Count.EqualTo(1)); Assert.That(data["Form1"], Is.EqualTo("Value1")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasHeaders() { SimulateHttpRequest(request => { Assert.That(request.Headers, Has.Count.EqualTo(3)); Assert.That(request.Headers["UserAgent"], Is.EqualTo("SharpRaven")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestIsNotNull() { SimulateHttpRequest(request => Assert.That(request, Is.Not.Null)); } } ======= #region License // Copyright (c) 2014 The Sentry Team and individual contributors. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are permitted // provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, this list of // conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. // // 3. Neither the name of the Sentry nor the names of its contributors may be used to // endorse or promote products derived from this software without specific prior written // permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endregion using System; using System.Collections.Generic; using NUnit.Framework; using SharpRaven.Data; using SharpRaven.UnitTests.Utilities; namespace SharpRaven.UnitTests.Data { [TestFixture] public class SentryRequestTests { private static void SimulateHttpRequest(Action<SentryRequest> test) { using (var simulator = new HttpSimulator()) { simulator.SetFormVariable("Form1", "Value1"); simulator.SetHeader("UserAgent", "SharpRaven"); simulator.SetCookie("Cookie", "Monster"); using (simulator.SimulateRequest()) { var request = SentryRequest.GetRequest(); test.Invoke(request); } } } [Test] public void GetRequest_NoHttpContext_ReturnsNull() { var request = SentryRequest.GetRequest(); Assert.That(request, Is.Null); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasCookies() { SimulateHttpRequest(request => { Assert.That(request.Cookies, Has.Count.EqualTo(1)); Assert.That(request.Cookies["Cookie"], Is.EqualTo("Monster")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasFormVariables() { SimulateHttpRequest(request => { Assert.That(request.Data, Is.TypeOf<Dictionary<string, string>>()); var data = (Dictionary<string, string>) request.Data; Assert.That(data, Has.Count.EqualTo(1)); Assert.That(data["Form1"], Is.EqualTo("Value1")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasHeaders() { SimulateHttpRequest(request => { Assert.That(request.Headers, Has.Count.EqualTo(3)); Assert.That(request.Headers["UserAgent"], Is.EqualTo("SharpRaven")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestIsNotNull() { SimulateHttpRequest(request => Assert.That(request, Is.Not.Null)); } } >>>>>>> #region License // Copyright (c) 2014 The Sentry Team and individual contributors. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are permitted // provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, this list of // conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. // // 3. Neither the name of the Sentry nor the names of its contributors may be used to // endorse or promote products derived from this software without specific prior written // permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endregion using System; using System.Collections.Generic; using NUnit.Framework; using SharpRaven.Data; using SharpRaven.UnitTests.Utilities; namespace SharpRaven.UnitTests.Data { [TestFixture] public class SentryRequestTests { private static void SimulateHttpRequest(Action<SentryRequest> test) { using (var simulator = new HttpSimulator()) { simulator.SetFormVariable("Form1", "Value1"); simulator.SetHeader("UserAgent", "SharpRaven"); simulator.SetCookie("Cookie", "Monster"); using (simulator.SimulateRequest()) { var request = SentryRequest.GetRequest(); test.Invoke(request); } } } [Test] public void GetRequest_NoHttpContext_ReturnsNull() { var request = SentryRequest.GetRequest(); Assert.That(request, Is.Null); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasCookies() { SimulateHttpRequest(request => { Assert.That(request.Cookies, Has.Count.EqualTo(1)); Assert.That(request.Cookies["Cookie"], Is.EqualTo("Monster")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasFormVariables() { SimulateHttpRequest(request => { Assert.That(request.Data, Is.TypeOf<Dictionary<string, string>>()); var data = (Dictionary<string, string>) request.Data; Assert.That(data, Has.Count.EqualTo(1)); Assert.That(data["Form1"], Is.EqualTo("Value1")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestHasHeaders() { SimulateHttpRequest(request => { Assert.That(request.Headers, Has.Count.EqualTo(3)); Assert.That(request.Headers["UserAgent"], Is.EqualTo("SharpRaven")); }); } [Test] [Category("NoMono")] public void GetRequest_WithHttpContext_RequestIsNotNull() { SimulateHttpRequest(request => Assert.That(request, Is.Not.Null)); } }
<<<<<<< Extra = Convert(extra) ======= Fingerprint = fingerprint, Extra = extra >>>>>>> Fingerprint = fingerprint, Extra = Convert(extra) <<<<<<< Extra = Convert(extra, exception.Data) ======= Fingerprint = fingerprint, Extra = extra >>>>>>> Fingerprint = fingerprint, Extra = Convert(extra, exception.Data)
<<<<<<< ======= if (ActiveDes != null) { string txt = String.Format("{0} {1} - {2}", ActiveEntry.DispName,ActiveDes.OriginalName, ActiveDes.NameOnBoard); G.DrawString(txt, F, Brushes.Pink, 2, 20); } >>>>>>> if (ActiveDes != null) { string txt = String.Format("{0} {1} - {2}", ActiveEntry.DispName,ActiveDes.OriginalName, ActiveDes.NameOnBoard); G.DrawString(txt, F, Brushes.Pink, 2, 20); } <<<<<<< float cx = (float)r.x - R / S; float cy = (float)r.y - R / S; ======= float cx = (float)r.x - R/S; float cy = (float)r.y - R/S; >>>>>>> float cx = (float)r.x - R / S; float cy = (float)r.y - R / S; <<<<<<< g.FillRectangle(soldered ? Brushes.Green : Brushes.Red, cx, cy, R / S * 2, R / S * 2); ======= if (activedes) { float R2 = 8; float cx2 = (float)r.x - R2 / S; float cy2 = (float)r.y - R2 / S; g.FillRectangle(new SolidBrush(Color.HotPink), cx2, cy2, R2 / S * 2, R2 / S * 2); } g.FillRectangle(soldered ? Brushes.Green : Brushes.Red, cx, cy, R/S*2, R/S*2); >>>>>>> if (activedes) { float R2 = 8; float cx2 = (float)r.x - R2 / S; float cy2 = (float)r.y - R2 / S; g.FillRectangle(new SolidBrush(Color.HotPink), cx2, cy2, R2 / S * 2, R2 / S * 2); } g.FillRectangle(soldered ? Brushes.Green : Brushes.Red, cx, cy, R/S*2, R/S*2); <<<<<<< private void Viewer_KeyPress(object sender, KeyPressEventArgs e) { switch (e.KeyChar) { case 't': case 'T': TopView = !TopView; InvalidatePicture(); break; } } ======= private void PictureBox1_MouseDown(object sender, MouseEventArgs e) { Bitmap B = new Bitmap(10,10); Graphics G = Graphics.FromImage(B); G.TranslateTransform(10, 10); float S = (float)Math.Min(pictureBox1.Width / (TheBox.Width() - 20), pictureBox1.Height / (TheBox.Height() - 20)); if (TopView) { G.ScaleTransform(S * 0.8f, -S * 0.8f); G.TranslateTransform((float)-TheBox.TopLeft.X, (float)-TheBox.TopLeft.Y - (float)TheBox.Height()); } else { G.ScaleTransform(-S * 0.8f, -S * 0.8f); G.TranslateTransform((float)(-TheBox.TopLeft.X - TheBox.Width()), (float)-TheBox.TopLeft.Y - (float)TheBox.Height()); } var inverseTransform = G.Transform.Clone(); inverseTransform.Invert(); Point [] location = new Point[1]; Point p = new Point(e.X, e.Y); location[0] = p; inverseTransform.TransformPoints(location); double rx=location[0].X, ry= location[0].Y; Console.WriteLine("mouse: {0}, {1} - tranlated to {2},{3}", e.X, e.Y,rx, ry); ToolX = rx; ToolY = ry; var PL = SolderTool.GetPartList(); float clodist = 1000000l; BOMEntry.RefDesc closest = null; PartList.ListItem LI; foreach (var v in PL) { foreach (var r in v.RefDes) { float DX = (float)r.x - (float)ToolX; float DY = (float)r.y - (float)ToolY; float dist = (float)Math.Sqrt(DX * DX + DY * DY); // DrawMarker(G, r, v.soldered, S, Current, r == ActiveDes); if (dist<clodist) { clodist = dist; ActiveEntry = v; closest = r; } } } ActiveDes = closest; pictureBox1.Invalidate(); } public double ToolX = 0; public double ToolY = 0; private void PictureBox1_MouseUp(object sender, MouseEventArgs e) { } >>>>>>> private void Viewer_KeyPress(object sender, KeyPressEventArgs e) { switch (e.KeyChar) { case 't': case 'T': TopView = !TopView; InvalidatePicture(); break; } } private void PictureBox1_MouseDown(object sender, MouseEventArgs e) { Bitmap B = new Bitmap(10,10); Graphics G = Graphics.FromImage(B); G.TranslateTransform(10, 10); float S = (float)Math.Min(pictureBox1.Width / (TheBox.Width() - 20), pictureBox1.Height / (TheBox.Height() - 20)); if (TopView) { G.ScaleTransform(S * 0.8f, -S * 0.8f); G.TranslateTransform((float)-TheBox.TopLeft.X, (float)-TheBox.TopLeft.Y - (float)TheBox.Height()); } else { G.ScaleTransform(-S * 0.8f, -S * 0.8f); G.TranslateTransform((float)(-TheBox.TopLeft.X - TheBox.Width()), (float)-TheBox.TopLeft.Y - (float)TheBox.Height()); } var inverseTransform = G.Transform.Clone(); inverseTransform.Invert(); Point [] location = new Point[1]; Point p = new Point(e.X, e.Y); location[0] = p; inverseTransform.TransformPoints(location); double rx=location[0].X, ry= location[0].Y; Console.WriteLine("mouse: {0}, {1} - tranlated to {2},{3}", e.X, e.Y,rx, ry); ToolX = rx; ToolY = ry; var PL = SolderTool.GetPartList(); float clodist = 1000000l; BOMEntry.RefDesc closest = null; PartList.ListItem LI; foreach (var v in PL) { foreach (var r in v.RefDes) { float DX = (float)r.x - (float)ToolX; float DY = (float)r.y - (float)ToolY; float dist = (float)Math.Sqrt(DX * DX + DY * DY); // DrawMarker(G, r, v.soldered, S, Current, r == ActiveDes); if (dist<clodist) { clodist = dist; ActiveEntry = v; closest = r; } } } ActiveDes = closest; pictureBox1.Invalidate(); } public double ToolX = 0; public double ToolY = 0; private void PictureBox1_MouseUp(object sender, MouseEventArgs e) { }
<<<<<<< _lockFactory = new MultiIndexLockFactory(new AzureDirectoryNativeLockFactory(this), _cacheDirectory.LockFactory); ======= _lockFactory = isReadOnly ? CacheDirectory.GetLockFactory() : new MultiIndexLockFactory(new AzureDirectorySimpleLockFactory(this), CacheDirectory.GetLockFactory()); >>>>>>> _lockFactory = isReadOnly ? CacheDirectory.LockFactory : new MultiIndexLockFactory(new AzureDirectorySimpleLockFactory(this), CacheDirectory.LockFactory); <<<<<<< ======= /// <summary>Renames an existing file in the directory. /// If a file already exists with the new name, then it is replaced. /// This replacement should be atomic. /// </summary> [Obsolete("This is actually never used")] public override void RenameFile(string from, string to) { //if we are readonly, then we are only modifying local storage if (!_isReadOnly) { try { var blobFrom = _blobContainer.GetBlockBlobReference(from); var blobTo = _blobContainer.GetBlockBlobReference(to); blobTo.StartCopy(blobFrom); blobFrom.DeleteIfExists(); SetDirty(); } catch (Exception ex) { Trace.TraceError("Could not rename file on master index; " + ex); } } try { // we delete and force a redownload, since we can't do this in an atomic way if (CacheDirectory.FileExists(from)) CacheDirectory.RenameFile(from, to); // drop old cached data as it's wrong now if (CacheDirectory.FileExists(from + ".blob")) CacheDirectory.DeleteFile(from + ".blob"); SetDirty(); } catch (Exception ex) { Trace.TraceError("Could not rename file on local index; " + ex); } } >>>>>>> <<<<<<< return string.Concat(base.GetLockId(), _cacheDirectory.GetLockId()); ======= return string.Concat(base.GetLockID(), CacheDirectory.GetLockID()); >>>>>>> return string.Concat(base.GetLockId(), CacheDirectory.GetLockId());
<<<<<<< using System; ======= using System; using System.Collections; using System.Collections.Generic; >>>>>>> using System; using System.Collections; using System.Collections.Generic; <<<<<<< ======= public IBooleanOperation SelectFieldsInternal(ISet<string> loadedFieldNames) { Selector = new SetBasedFieldSelector(loadedFieldNames, new HashSet<string>()); return new LuceneBooleanOperation(this); } public IBooleanOperation SelectFieldsInternal(Hashtable loadedFieldNames) { HashSet<string> hs = new HashSet<string>(); foreach (string item in loadedFieldNames.Keys) { hs.Add(item); } Selector = new SetBasedFieldSelector(hs, new HashSet<string>()); return new LuceneBooleanOperation(this); } internal IBooleanOperation SelectFieldsInternal(params string[] loadedFieldNames) { ISet<string> loaded = new HashSet<string>(loadedFieldNames); Selector = new SetBasedFieldSelector(loaded, new HashSet<string>()); return new LuceneBooleanOperation(this); } internal IBooleanOperation SelectFieldInternal(string fieldName) { ISet<string> loaded = new HashSet<string>(new string[] { fieldName }); Selector = new SetBasedFieldSelector(loaded, new HashSet<string>()); return new LuceneBooleanOperation(this); } public IBooleanOperation SelectFirstFieldOnlyInternal() { Selector = new LoadFirstFieldSelector(); return new LuceneBooleanOperation(this); } public IBooleanOperation SelectAllFieldsInternal() { Selector = null; return new LuceneBooleanOperation(this); } >>>>>>> public IBooleanOperation SelectFieldsInternal(ISet<string> loadedFieldNames) { Selector = new SetBasedFieldSelector(loadedFieldNames, new HashSet<string>()); return new LuceneBooleanOperation(this); } public IBooleanOperation SelectFieldsInternal(Hashtable loadedFieldNames) { HashSet<string> hs = new HashSet<string>(); foreach (string item in loadedFieldNames.Keys) { hs.Add(item); } Selector = new SetBasedFieldSelector(hs, new HashSet<string>()); return new LuceneBooleanOperation(this); } internal IBooleanOperation SelectFieldsInternal(params string[] loadedFieldNames) { ISet<string> loaded = new HashSet<string>(loadedFieldNames); Selector = new SetBasedFieldSelector(loaded, new HashSet<string>()); return new LuceneBooleanOperation(this); } internal IBooleanOperation SelectFieldInternal(string fieldName) { ISet<string> loaded = new HashSet<string>(new string[] { fieldName }); Selector = new SetBasedFieldSelector(loaded, new HashSet<string>()); return new LuceneBooleanOperation(this); } public IBooleanOperation SelectFirstFieldOnlyInternal() { Selector = new LoadFirstFieldSelector(); return new LuceneBooleanOperation(this); } public IBooleanOperation SelectAllFieldsInternal() { Selector = null; return new LuceneBooleanOperation(this); } <<<<<<< var pagesResults = new LuceneSearchResults(query, SortFields, searcher, maxResults); ======= var pagesResults = new LuceneSearchResults(query, SortFields, searcher, maxResults, Selector); >>>>>>> var pagesResults = new LuceneSearchResults(query, SortFields, searcher, maxResults, Selector);
<<<<<<< private void DoSearch(Query query, IEnumerable<SortField> sortField, int maxResults) { var extractTermsSupported = CheckQueryForExtractTerms(query); ======= private void DoSearch(Query query, IEnumerable<SortField> sortField, int maxResults, int? skip = null, int? take = null) { //This try catch is because analyzers strip out stop words and sometimes leave the query //with null values. This simply tries to extract terms, if it fails with a null //reference then its an invalid null query, NotSupporteException occurs when the query is //valid but the type of query can't extract terms. //This IS a work-around, theoretically Lucene itself should check for null query parameters //before throwing exceptions. try { var set = new HashSet<Term>(); query.ExtractTerms(set); } catch (NullReferenceException) { //this means that an analyzer has stipped out stop words and now there are //no words left to search on >>>>>>> private void DoSearch(Query query, IEnumerable<SortField> sortField, int maxResults, int? skip = null, int? take = null) { var extractTermsSupported = CheckQueryForExtractTerms(query);
<<<<<<< ======= // Master avatar cruft // string masterAvatarUUID; if (!creatingNew) { masterAvatarUUID = config.GetString("MasterAvatarUUID", UUID.Zero.ToString()); MasterAvatarFirstName = config.GetString("MasterAvatarFirstName", String.Empty); MasterAvatarLastName = config.GetString("MasterAvatarLastName", String.Empty); MasterAvatarSandboxPassword = config.GetString("MasterAvatarSandboxPassword", String.Empty); } else { masterAvatarUUID = MainConsole.Instance.CmdPrompt("Master Avatar UUID", UUID.Zero.ToString()); if (masterAvatarUUID != UUID.Zero.ToString()) { config.Set("MasterAvatarUUID", masterAvatarUUID); } else { MasterAvatarFirstName = MainConsole.Instance.CmdPrompt("Master Avatar first name (enter for no master avatar)", String.Empty); if (MasterAvatarFirstName != String.Empty) { MasterAvatarLastName = MainConsole.Instance.CmdPrompt("Master Avatar last name", String.Empty); MasterAvatarSandboxPassword = MainConsole.Instance.CmdPrompt("Master Avatar sandbox password", String.Empty); config.Set("MasterAvatarFirstName", MasterAvatarFirstName); config.Set("MasterAvatarLastName", MasterAvatarLastName); config.Set("MasterAvatarSandboxPassword", MasterAvatarSandboxPassword); } } } MasterAvatarAssignedUUID = new UUID(masterAvatarUUID); >>>>>>>
<<<<<<< [UnitOfWork] public virtual List<NotificationSubscriptionInfo> GetSubscriptions(UserIdentifier user) { using (_unitOfWorkManager.Current.SetTenantId(user.TenantId)) { return _notificationSubscriptionRepository.GetAllList(s => s.UserId == user.UserId); } } ======= >>>>>>> [UnitOfWork] public virtual List<NotificationSubscriptionInfo> GetSubscriptions(UserIdentifier user) { using (_unitOfWorkManager.Current.SetTenantId(user.TenantId)) { return _notificationSubscriptionRepository.GetAllList(s => s.UserId == user.UserId); } } <<<<<<< public virtual void DeleteUserNotification(int? tenantId, Guid userNotificationId) { using (_unitOfWorkManager.Current.SetTenantId(tenantId)) { _userNotificationRepository.Delete(userNotificationId); _unitOfWorkManager.Current.SaveChanges(); } } [UnitOfWork] public virtual async Task DeleteAllUserNotificationsAsync(UserIdentifier user) ======= public virtual async Task DeleteAllUserNotificationsAsync(UserIdentifier user, UserNotificationState? state = null, DateTime? startDate = null, DateTime? endDate = null) >>>>>>> public virtual void DeleteUserNotification(int? tenantId, Guid userNotificationId) { using (_unitOfWorkManager.Current.SetTenantId(tenantId)) { _userNotificationRepository.Delete(userNotificationId); _unitOfWorkManager.Current.SaveChanges(); } } [UnitOfWork] public virtual async Task DeleteAllUserNotificationsAsync(UserIdentifier user, UserNotificationState? state = null, DateTime? startDate = null, DateTime? endDate = null) <<<<<<< public virtual void DeleteAllUserNotifications(UserIdentifier user) { using (_unitOfWorkManager.Current.SetTenantId(user.TenantId)) { _userNotificationRepository.Delete(un => un.UserId == user.UserId); _unitOfWorkManager.Current.SaveChanges(); } } [UnitOfWork] public virtual Task<List<UserNotificationInfoWithNotificationInfo>> GetUserNotificationsWithNotificationsAsync(UserIdentifier user, UserNotificationState? state = null, int skipCount = 0, int maxResultCount = int.MaxValue) ======= public virtual Task<List<UserNotificationInfoWithNotificationInfo>> GetUserNotificationsWithNotificationsAsync(UserIdentifier user, UserNotificationState? state = null, int skipCount = 0, int maxResultCount = int.MaxValue, DateTime? startDate = null, DateTime? endDate = null) >>>>>>> public virtual void DeleteAllUserNotifications(UserIdentifier user) { using (_unitOfWorkManager.Current.SetTenantId(user.TenantId)) { _userNotificationRepository.Delete(un => un.UserId == user.UserId); _unitOfWorkManager.Current.SaveChanges(); } } [UnitOfWork] public virtual Task<List<UserNotificationInfoWithNotificationInfo>> GetUserNotificationsWithNotificationsAsync(UserIdentifier user, UserNotificationState? state = null, int skipCount = 0, int maxResultCount = int.MaxValue, DateTime? startDate = null, DateTime? endDate = null) <<<<<<< public virtual List<UserNotificationInfoWithNotificationInfo> GetUserNotificationsWithNotifications(UserIdentifier user, UserNotificationState? state = null, int skipCount = 0, int maxResultCount = int.MaxValue) { using (_unitOfWorkManager.Current.SetTenantId(user.TenantId)) { var query = from userNotificationInfo in _userNotificationRepository.GetAll() join tenantNotificationInfo in _tenantNotificationRepository.GetAll() on userNotificationInfo.TenantNotificationId equals tenantNotificationInfo.Id where userNotificationInfo.UserId == user.UserId && (state == null || userNotificationInfo.State == state.Value) orderby tenantNotificationInfo.CreationTime descending select new { userNotificationInfo, tenantNotificationInfo = tenantNotificationInfo }; query = query.PageBy(skipCount, maxResultCount); var list = query.ToList(); return list.Select( a => new UserNotificationInfoWithNotificationInfo(a.userNotificationInfo, a.tenantNotificationInfo) ).ToList(); } } [UnitOfWork] public virtual async Task<int> GetUserNotificationCountAsync(UserIdentifier user, UserNotificationState? state = null) ======= public virtual async Task<int> GetUserNotificationCountAsync(UserIdentifier user, UserNotificationState? state = null, DateTime? startDate = null, DateTime? endDate = null) >>>>>>> public virtual List<UserNotificationInfoWithNotificationInfo> GetUserNotificationsWithNotifications(UserIdentifier user, UserNotificationState? state = null, int skipCount = 0, int maxResultCount = int.MaxValue) { using (_unitOfWorkManager.Current.SetTenantId(user.TenantId)) { var query = from userNotificationInfo in _userNotificationRepository.GetAll() join tenantNotificationInfo in _tenantNotificationRepository.GetAll() on userNotificationInfo.TenantNotificationId equals tenantNotificationInfo.Id where userNotificationInfo.UserId == user.UserId && (state == null || userNotificationInfo.State == state.Value) orderby tenantNotificationInfo.CreationTime descending select new { userNotificationInfo, tenantNotificationInfo = tenantNotificationInfo }; query = query.PageBy(skipCount, maxResultCount); var list = query.ToList(); return list.Select( a => new UserNotificationInfoWithNotificationInfo(a.userNotificationInfo, a.tenantNotificationInfo) ).ToList(); } } [UnitOfWork] public virtual async Task<int> GetUserNotificationCountAsync(UserIdentifier user, UserNotificationState? state = null, DateTime? startDate = null, DateTime? endDate = null)
<<<<<<< ======= [Obsolete] IClientCacheAttribute DefaultClientCacheAttribute { get; set; } ResponseCacheAttribute DefaultResponseCacheAttributeForControllers { get; set; } ResponseCacheAttribute DefaultResponseCacheAttributeForAppServices { get; set; } >>>>>>> ResponseCacheAttribute DefaultResponseCacheAttributeForControllers { get; set; } ResponseCacheAttribute DefaultResponseCacheAttributeForAppServices { get; set; }
<<<<<<< // IPasswordValidator doesn't have a sync version of Validate(...) //public virtual IdentityResult ChangePassword(TUser user, string newPassword) //{ // var errors = new List<IdentityError>(); // foreach (var validator in PasswordValidators) // { // var validationResult = validator.Validate(this, user, newPassword); // if (!validationResult.Succeeded) // { // errors.AddRange(validationResult.Errors); // } // } // if (errors.Any()) // { // return IdentityResult.Failed(errors.ToArray()); // } // AbpUserStore.SetPasswordHash(user, PasswordHasher.HashPassword(user, newPassword)); // return IdentityResult.Success; //} ======= >>>>>>> // IPasswordValidator doesn't have a sync version of Validate(...) //public virtual IdentityResult ChangePassword(TUser user, string newPassword) //{ // var errors = new List<IdentityError>(); // foreach (var validator in PasswordValidators) // { // var validationResult = validator.Validate(this, user, newPassword); // if (!validationResult.Succeeded) // { // errors.AddRange(validationResult.Errors); // } // } // if (errors.Any()) // { // return IdentityResult.Failed(errors.ToArray()); // } // AbpUserStore.SetPasswordHash(user, PasswordHasher.HashPassword(user, newPassword)); // return IdentityResult.Success; //} <<<<<<< private void CheckMaxUserOrganizationUnitMembershipCount(int? tenantId, int requestedCount) { var maxCount = _organizationUnitSettings.GetMaxUserMembershipCount(tenantId); if (requestedCount > maxCount) { throw new AbpException($"Can not set more than {maxCount} organization unit for a user!"); } } ======= [UnitOfWork] >>>>>>> private void CheckMaxUserOrganizationUnitMembershipCount(int? tenantId, int requestedCount) { var maxCount = _organizationUnitSettings.GetMaxUserMembershipCount(tenantId); if (requestedCount > maxCount) { throw new AbpException($"Can not set more than {maxCount} organization unit for a user!"); } } [UnitOfWork] <<<<<<< public virtual void RemoveTokenValidityKey( TUser user, string tokenValidityKey, CancellationToken cancellationToken = default(CancellationToken)) { AbpUserStore.RemoveTokenValidityKey(user, tokenValidityKey, cancellationToken); } public bool IsLockedOut(string userId) { var user = AbpUserStore.FindById(userId); if (user == null) { throw new AbpException("There is no user with id: " + userId); } var lockoutEndDateUtc = AbpUserStore.GetLockoutEndDate(user); return lockoutEndDateUtc > DateTimeOffset.UtcNow; } public bool IsLockedOut(TUser user) { var lockoutEndDateUtc = AbpUserStore.GetLockoutEndDate(user); return lockoutEndDateUtc > DateTimeOffset.UtcNow; } public void ResetAccessFailedCount(TUser user) { AbpUserStore.ResetAccessFailedCount(user); } ======= >>>>>>> public virtual void RemoveTokenValidityKey( TUser user, string tokenValidityKey, CancellationToken cancellationToken = default(CancellationToken)) { AbpUserStore.RemoveTokenValidityKey(user, tokenValidityKey, cancellationToken); } public bool IsLockedOut(string userId) { var user = AbpUserStore.FindById(userId); if (user == null) { throw new AbpException("There is no user with id: " + userId); } var lockoutEndDateUtc = AbpUserStore.GetLockoutEndDate(user); return lockoutEndDateUtc > DateTimeOffset.UtcNow; } public bool IsLockedOut(TUser user) { var lockoutEndDateUtc = AbpUserStore.GetLockoutEndDate(user); return lockoutEndDateUtc > DateTimeOffset.UtcNow; } public void ResetAccessFailedCount(TUser user) { AbpUserStore.ResetAccessFailedCount(user); }
<<<<<<< return new EntityHistorySnapshot(snapshotPropertiesDictionary, propertyChangesStackTreeDictionary); } var changes = await _asyncQueryableExecuter.ToListAsync( GetEntityChanges<TEntity, TPrimaryKey>(id, snapshotTime) .Select(x => new { x.ChangeType, x.PropertyChanges }) ); ======= var changes = await AsyncQueryableExecuter.ToListAsync( GetEntityChanges<TEntity, TPrimaryKey>(id, snapshotTime) .Select(x => new { x.ChangeType, x.PropertyChanges }) ); >>>>>>> return new EntityHistorySnapshot(snapshotPropertiesDictionary, propertyChangesStackTreeDictionary); } var changes = await AsyncQueryableExecuter.ToListAsync( GetEntityChanges<TEntity, TPrimaryKey>(id, snapshotTime) .Select(x => new { x.ChangeType, x.PropertyChanges }) ); //revoke all changes <<<<<<< private static void RevokeChange<TEntity, TPrimaryKey>( Dictionary<string, string> snapshotPropertiesDictionary, EntityPropertyChange entityPropertyChange, TEntity entity) where TEntity : class, IEntity<TPrimaryKey> { snapshotPropertiesDictionary[entityPropertyChange.PropertyName] = entityPropertyChange.OriginalValue; } private static void AddChangeToPropertyChangesStackTree<TEntity, TPrimaryKey>( EntityPropertyChange entityPropertyChange, Dictionary<string, string> propertyChangesStackTreeDictionary, TEntity entity) where TEntity : class, IEntity<TPrimaryKey> { if (propertyChangesStackTreeDictionary.ContainsKey(entityPropertyChange.PropertyName)) { propertyChangesStackTreeDictionary[entityPropertyChange.PropertyName] += " -> " + entityPropertyChange.OriginalValue; } else { var propertyCurrentValue = "PropertyNotExist"; var propertyInfo = typeof(TEntity).GetProperty(entityPropertyChange.PropertyName); if (propertyInfo != null) { var val = propertyInfo.GetValue(entity); propertyCurrentValue = val == null ? "null" : val.ToJsonString(); } propertyChangesStackTreeDictionary.Add( entityPropertyChange.PropertyName, propertyCurrentValue + " -> " + entityPropertyChange.OriginalValue ); } } ======= >>>>>>> private static void RevokeChange<TEntity, TPrimaryKey>( Dictionary<string, string> snapshotPropertiesDictionary, EntityPropertyChange entityPropertyChange, TEntity entity) where TEntity : class, IEntity<TPrimaryKey> { snapshotPropertiesDictionary[entityPropertyChange.PropertyName] = entityPropertyChange.OriginalValue; } private static void AddChangeToPropertyChangesStackTree<TEntity, TPrimaryKey>( EntityPropertyChange entityPropertyChange, Dictionary<string, string> propertyChangesStackTreeDictionary, TEntity entity) where TEntity : class, IEntity<TPrimaryKey> { if (propertyChangesStackTreeDictionary.ContainsKey(entityPropertyChange.PropertyName)) { propertyChangesStackTreeDictionary[entityPropertyChange.PropertyName] += " -> " + entityPropertyChange.OriginalValue; } else { var propertyCurrentValue = "PropertyNotExist"; var propertyInfo = typeof(TEntity).GetProperty(entityPropertyChange.PropertyName); if (propertyInfo != null) { var val = propertyInfo.GetValue(entity); propertyCurrentValue = val == null ? "null" : val.ToJsonString(); } propertyChangesStackTreeDictionary.Add( entityPropertyChange.PropertyName, propertyCurrentValue + " -> " + entityPropertyChange.OriginalValue ); } }
<<<<<<< newPosition = currentPosition; // 1. Are we already at the end of the test string? if (currentPosition >= allChars.Length - 1) { return true; } // A) If leading separator then current character needs to be that separator. char currentChar = allChars[currentPosition]; if (_token.LeadingPathSeparator != null) { if (!GlobStringReader.IsPathSeparator(currentChar)) ======= newPosition = currentPosition; // A) If leading seperator then current character needs to be that seperator. char currentChar = allChars[currentPosition]; if (_token.LeadingPathSeperator != null) { if (!GlobStringReader.IsPathSeperator(currentChar)) >>>>>>> newPosition = currentPosition; // A) If leading seperator then current character needs to be that seperator. char currentChar = allChars[currentPosition]; if (_token.LeadingPathSeparator != null) { if (!GlobStringReader.IsPathSeparator(currentChar)) <<<<<<< { // no leading separator, means ** used at start of pattern not /** used within pattern. // If **/ is used for start of pattern then input string doesn't need to start with a / or \ and it will be matched. // i.e **/foo/bar will match foo/bar or /foo/bar. // where as /**/foo/bar will not match foo/bar it will only match /foo/bar. if (GlobStringReader.IsPathSeparator(currentChar)) ======= { // no leading seperator, means ** used at start of pattern not /** used within pattern. // If **/ is used for start of pattern then input string doesn't need to start with a / or \ and it will be matched. // i.e **/foo/bar will match foo/bar or /foo/bar. // where as /**/foo/bar will not match foo/bar it will only match /foo/bar. currentChar = allChars[currentPosition]; if (GlobStringReader.IsPathSeperator(currentChar)) >>>>>>> { // no leading seperator, means ** used at start of pattern not /** used within pattern. // If **/ is used for start of pattern then input string doesn't need to start with a / or \ and it will be matched. // i.e **/foo/bar will match foo/bar or /foo/bar. // where as /**/foo/bar will not match foo/bar it will only match /foo/bar. currentChar = allChars[currentPosition]; if (GlobStringReader.IsPathSeparator(currentChar))
<<<<<<< /// <summary> /// Checks if two strings are equal. Compares every char to prevent timing attacks. /// </summary> /// <param name="a">String to compare.</param> /// <param name="b">String to compare.</param> /// <returns>True if both strings are equal</returns> private static bool SafeEquals(string a, string b) { var diff = (uint) a.Length ^ (uint) b.Length; for (var i = 0; i < a.Length && i < b.Length; i++) { diff |= (uint) a[i] ^ (uint) b[i]; } return diff == 0; } ======= /// <summary> /// Gets the string representation of the salt revision /// </summary> /// <param name="saltSaltRevision">Salt revision enum</param> /// <returns>The string representation of the salt revision</returns> private static string GetSaltRevisionString(SaltRevision saltSaltRevision) { switch (saltSaltRevision) { case SaltRevision.Revision2: return "2"; case SaltRevision.Revision2A: return "2a"; case SaltRevision.Revision2B: return "2b"; case SaltRevision.Revision2X: return "2x"; case SaltRevision.Revision2Y: return "2y"; default: throw new ArgumentOutOfRangeException(nameof(saltSaltRevision), saltSaltRevision, null); } } >>>>>>> /// <summary> /// Checks if two strings are equal. Compares every char to prevent timing attacks. /// </summary> /// <param name="a">String to compare.</param> /// <param name="b">String to compare.</param> /// <returns>True if both strings are equal</returns> private static bool SafeEquals(string a, string b) { var diff = (uint) a.Length ^ (uint) b.Length; for (var i = 0; i < a.Length && i < b.Length; i++) { diff |= (uint) a[i] ^ (uint) b[i]; } return diff == 0; } /// <summary> /// Gets the string representation of the salt revision /// </summary> /// <param name="saltSaltRevision">Salt revision enum</param> /// <returns>The string representation of the salt revision</returns> private static string GetSaltRevisionString(SaltRevision saltSaltRevision) { switch (saltSaltRevision) { case SaltRevision.Revision2: return "2"; case SaltRevision.Revision2A: return "2a"; case SaltRevision.Revision2B: return "2b"; case SaltRevision.Revision2X: return "2x"; case SaltRevision.Revision2Y: return "2y"; default: throw new ArgumentOutOfRangeException(nameof(saltSaltRevision), saltSaltRevision, null); } }
<<<<<<< Vector3 PrintOffset; private ProjectionStack m_projectionStack = ProjectionStack.DefaultStack; public ProjectionStack ProjectionStack { get { return m_projectionStack; } set { m_projectionStack = value; } } ======= Vector3 m_printOffset; public Vector3 PrintOffset { get { return m_printOffset; } set { m_printOffset = value; if (fontData.dropShadow != null) fontData.dropShadow.PrintOffset = value; } } private readonly ProjectionStack m_projectionStack = new ProjectionStack(); >>>>>>> private ProjectionStack m_projectionStack = ProjectionStack.DefaultStack; public ProjectionStack ProjectionStack { get { return m_projectionStack; } set { m_projectionStack = value; } } Vector3 m_printOffset; public Vector3 PrintOffset { get { return m_printOffset; } set { m_printOffset = value; if (fontData.dropShadow != null) fontData.dropShadow.PrintOffset = value; } } <<<<<<< transToVp = qfont.OrthogonalTransform(out fontScale); ======= transToVp = qfont.OrthogonalTransform(out fontScale); >>>>>>> transToVp = qfont.OrthogonalTransform(out fontScale); <<<<<<< public void Print(string text, Vector3 position, Color color, QFontAlignment alignment = QFontAlignment.Left) { var position2 = new Vector2(position.X, position.Y); position2 = TransformPositionToViewport(position2); position2 = LockToPixel(position2); Options.Colour = color; GL.PushMatrix(); GL.Translate(position.X, position.Y, 0f); PrintOrMeasure(text, alignment, false); GL.PopMatrix(); } ======= public void PrintToVBO(string text, SizeF maxSize, QFontAlignment alignment, Vector2 position) { PrintOffset = new Vector3(position.X, position.Y, 0f); Print(text, maxSize, alignment); } public void PrintToVBO(string text, Vector2 position, QFontAlignment alignment = QFontAlignment.Left) { PrintOffset = new Vector3(position.X, position.Y, 0f); PrintOrMeasure(text, alignment, false); } public void PrintToVBO(string text, Vector2 position, Color color, QFontAlignment alignment = QFontAlignment.Left) { Options.Colour = color; PrintOffset = new Vector3(position.X, position.Y, 0f); PrintOrMeasure(text, alignment, false); } >>>>>>> public void Print(string text, Vector3 position, Color color, QFontAlignment alignment = QFontAlignment.Left) { var position2 = new Vector2(position.X, position.Y); position2 = TransformPositionToViewport(position2); position2 = LockToPixel(position2); Options.Colour = color; GL.PushMatrix(); GL.Translate(position.X, position.Y, 0f); PrintOrMeasure(text, alignment, false); GL.PopMatrix(); } public void PrintToVBO(string text, SizeF maxSize, QFontAlignment alignment, Vector2 position) { PrintOffset = new Vector3(position.X, position.Y, 0f); Print(text, maxSize, alignment); } public void PrintToVBO(string text, Vector2 position, QFontAlignment alignment = QFontAlignment.Left) { PrintOffset = new Vector3(position.X, position.Y, 0f); PrintOrMeasure(text, alignment, false); } public void PrintToVBO(string text, Vector2 position, Color color, QFontAlignment alignment = QFontAlignment.Left) { Options.Colour = color; PrintOffset = new Vector3(position.X, position.Y, 0f); PrintOrMeasure(text, alignment, false); } <<<<<<< ProjectionStack.DefaultStack.End(); ======= m_projectionStack.End(); >>>>>>> ProjectionStack.End(); }*/ public static void Begin() { ProjectionStack.DefaultStack.Begin(); } public static void End() { ProjectionStack.DefaultStack.End(); <<<<<<< ProjectionStack.DefaultStack.InvalidateViewport(); ======= m_projectionStack.InvalidateViewport(); >>>>>>> ProjectionStack.DefaultStack.InvalidateViewport();
<<<<<<< using KeePassLib.Security; ======= using System.Linq; >>>>>>> using KeePassLib.Security; using System.Linq; <<<<<<< ProtectedString decrypted = await Decrypt(encrypted, rResult); if (decrypted != null) ======= string decrypted = await Decrypt(encrypted, rResult); if (decrypted != "") >>>>>>> ProtectedString decrypted = await Decrypt(encrypted, rResult); if (decrypted != null)
<<<<<<< var sr = new CachedSchemaRegistryClient(new Dictionary<string, object> { { "schema.registry.url", config.Server } }); ======= var sr = new CachedSchemaRegistryClient(new SchemaRegistryConfig { SchemaRegistryUrl = server }); >>>>>>> var sr = new CachedSchemaRegistryClient(new SchemaRegistryConfig { SchemaRegistryUrl = config.Server });
<<<<<<< var sr = new CachedSchemaRegistryClient(new Dictionary<string, object> { { "schema.registry.url", config.Server } }); ======= var sr = new CachedSchemaRegistryClient(new SchemaRegistryConfig { SchemaRegistryUrl = server }); >>>>>>> var sr = new CachedSchemaRegistryClient(new SchemaRegistryConfig { SchemaRegistryUrl = config.Server });
<<<<<<< var sr = new CachedSchemaRegistryClient(new Dictionary<string, object> { { "schema.registry.url", config.Server } }); ======= var sr = new CachedSchemaRegistryClient(new SchemaRegistryConfig { SchemaRegistryUrl = server }); >>>>>>> var sr = new CachedSchemaRegistryClient(new SchemaRegistryConfig { SchemaRegistryUrl = config.Server });
<<<<<<< ======= using OpenWrap.PackageManagement.Packages; >>>>>>> using OpenWrap.PackageManagement.Packages; <<<<<<< ======= using OpenWrap.Runtime; using OpenWrap.Services; >>>>>>> using OpenWrap.Runtime; using OpenWrap.Services; <<<<<<< using (_authenticationSupport.WithCredentials(User,Pwd)) _remoteRepository.Publish(_packageFileName, packageStream); ======= publisher.Publish(_packageFileName, packageStream); >>>>>>> publisher.Publish(_packageFileName, packageStream);
<<<<<<< using ProtonVPN.Common.Threading; ======= using ProtonVPN.Common.OS.Processes; >>>>>>> using ProtonVPN.Common.OS.Processes; <<<<<<< ======= using System.Dynamic; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; >>>>>>> <<<<<<< private readonly UpdateService _updateService; ======= private readonly IModals _modals; >>>>>>> <<<<<<< private readonly IScheduler _scheduler; ======= private readonly IOsProcesses _osProcesses; >>>>>>> private readonly IOsProcesses _osProcesses; <<<<<<< _scheduler.Schedule(() => Updating = false); }); ======= // Privileges were not granted Updating = false; } >>>>>>> // Privileges were not granted Updating = false; }
<<<<<<< using System.Net; ======= using System.Security.Cryptography.X509Certificates; >>>>>>> using System.Net; using System.Security.Cryptography.X509Certificates; <<<<<<< public static byte[] NewASReq(string userName, string domain, Interop.KERB_ETYPE etype, bool opsec = false) ======= public static AS_REQ NewASReq(string userName, string domain, Interop.KERB_ETYPE etype) >>>>>>> public static AS_REQ NewASReq(string userName, string domain, Interop.KERB_ETYPE etype, bool opsec = false) <<<<<<< public static byte[] NewASReq(string userName, string domain, string keyString, Interop.KERB_ETYPE etype, bool opsec = false) ======= public static AS_REQ NewASReq(string userName, string domain, string keyString, Interop.KERB_ETYPE etype) >>>>>>> public static AS_REQ NewASReq(string userName, string domain, string keyString, Interop.KERB_ETYPE etype, bool opsec = false) <<<<<<< req_body = new KDCReqBody(true, opsec); ======= req_body = new KDCReqBody(); this.keyString = keyString; } public AS_REQ(X509Certificate2 pkCert, KDCKeyAgreement agreement) { // default, for creation pvno = 5; msg_type = 10; padata = new List<PA_DATA>(); req_body = new KDCReqBody(); // add the include-pac == true padata.Add(new PA_DATA()); // add the encrypted timestamp padata.Add(new PA_DATA(pkCert, agreement, req_body)); >>>>>>> req_body = new KDCReqBody(true, opsec); this.keyString = keyString; } public AS_REQ(X509Certificate2 pkCert, KDCKeyAgreement agreement) { // default, for creation pvno = 5; msg_type = 10; padata = new List<PA_DATA>(); req_body = new KDCReqBody(); // add the include-pac == true padata.Add(new PA_DATA()); // add the encrypted timestamp padata.Add(new PA_DATA(pkCert, agreement, req_body));
<<<<<<< var socket = new Socket(addressFamily, SocketType.Stream, ProtocolType.Tcp); if (addressFamily != AddressFamily.Unix) SocketConnection.SetRecommendedClientOptions(socket); ======= var protocolType = addressFamily == AddressFamily.Unix ? ProtocolType.Unspecified : ProtocolType.Tcp; var socket = new Socket(addressFamily, SocketType.Stream, protocolType); SetFastLoopbackOption(socket); if (addressFamily != AddressFamily.Unix) { socket.NoDelay = true; } >>>>>>> var protocolType = addressFamily == AddressFamily.Unix ? ProtocolType.Unspecified : ProtocolType.Tcp; var socket = new Socket(addressFamily, SocketType.Stream, protocolType); SocketConnection.SetRecommendedClientOptions(socket);
<<<<<<< public void DisableProxy() { _config.useProxy = false; SaveConfig(_config); } public void EnableProxy(string proxy, int port) { _config.useProxy = true; _config.proxyServer = proxy; _config.proxyPort = port; SaveConfig(_config); } ======= public void ToggleVerboseLogging(bool enabled) { _config.isVerboseLogging = enabled; SaveConfig(_config); if ( VerboseLoggingStatusChanged != null ) { VerboseLoggingStatusChanged(this, new EventArgs()); } } >>>>>>> public void DisableProxy() { _config.useProxy = false; SaveConfig(_config); } public void EnableProxy(string proxy, int port) { _config.useProxy = true; _config.proxyServer = proxy; _config.proxyPort = port; SaveConfig(_config); } public void ToggleVerboseLogging(bool enabled) { _config.isVerboseLogging = enabled; SaveConfig(_config); if ( VerboseLoggingStatusChanged != null ) { VerboseLoggingStatusChanged(this, new EventArgs()); } }
<<<<<<< private TrainingResult m_taskResult; private bool m_drawBlackscreen = false; // The curriculum to use. [MyBrowsable, Category("Curriculum"), Description("Choose which type of curriculum you want to use.")] [YAXSerializableField(DefaultValue = CurriculumType.TrainingCurriculum)] public CurriculumType TypeOfCurriculum { get; set; } ======= public SchoolCurriculum Curriculum { get; set; } private ILearningTask m_currentLearningTask; public ILearningTask CurrentLearningTask { get { return m_currentLearningTask; } set { m_currentLearningTask = value; } } >>>>>>> public SchoolCurriculum Curriculum { get; set; } private ILearningTask m_currentLearningTask; public ILearningTask CurrentLearningTask { get { return m_currentLearningTask; } set { m_currentLearningTask = value; } } private TrainingResult m_taskResult; private bool m_drawBlackscreen = false; <<<<<<< m_taskResult = m_currentLearningTask.EvaluateStep(); ======= bool learningTaskFail; CurrentLearningTask.EvaluateStep(out learningTaskFail); >>>>>>> m_taskResult = m_currentLearningTask.EvaluateStep(); <<<<<<< MyLog.Writer.WriteLine(MyLogLevel.INFO, "Switching to LearningTask: " + m_currentLearningTask.GetTypeName()); ======= MyLog.Writer.WriteLine(MyLogLevel.INFO, "Switching to LearningTask: " + CurrentLearningTask.GetTypeName()); >>>>>>> MyLog.Writer.WriteLine(MyLogLevel.INFO, "Switching to LearningTask: " + m_currentLearningTask.GetTypeName());
<<<<<<< Delta.Count = Neurons * ParentNetwork.BatchSize; PreviousWeightDelta.Count = Weights.Count; // momentum method ======= Delta.Count = Neurons; Delta.Mode = MyTemporalMemoryBlock<float>.ModeType.Cumulate; PreviousWeightDelta.Count = Neurons * Input.Count; // momentum method >>>>>>> Delta.Count = Neurons * ParentNetwork.BatchSize; Delta.Mode = MyTemporalMemoryBlock<float>.ModeType.Cumulate; PreviousWeightDelta.Count = Weights.Count; // momentum method
<<<<<<< ======= dataGridView1.ClearSelection(); /*if (m_currentRow >= 0) { dataGridView1.Rows[m_currentRow].Selected = true; }*/ >>>>>>> dataGridView1.ClearSelection(); /*if (m_currentRow >= 0) { dataGridView1.Rows[m_currentRow].Selected = true; }*/ <<<<<<< } })); ======= (tabControl1.SelectedTab.Controls[0] as DataGridView).ClearSelection(); })); } >>>>>>> (tabControl1.SelectedTab.Controls[0] as DataGridView).ClearSelection(); } }));
<<<<<<< newSimpleLayer.Tiles[i][j] = staticTilesContainer[tileNumber]; ======= newSimpleLayer.Tiles[i, j] = staticTilesContainer[tileNumber]; >>>>>>> newSimpleLayer.Tiles[i][j] = staticTilesContainer[tileNumber]; <<<<<<< newSimpleLayer.Tiles[i][j] = newTile; ======= initializer.Invoke(newTile); newSimpleLayer.Tiles[i, j] = newTile; >>>>>>> newSimpleLayer.Tiles[i][j] = newTile; initializer.Invoke(newTile); newSimpleLayer.Tiles[i][j] = newTile;
<<<<<<< Owner.NeuronInput, Owner.Bias, Owner.DropoutMask, dropout, Owner.Neurons, Owner.ParentNetwork.BatchSize ); ======= Owner.Weights, Owner.NeuronInput, Owner.Bias, Owner.DropoutMask, dropout, Owner.Input.Count, Owner.Output.Count ); >>>>>>> Owner.NeuronInput, Owner.Bias, Owner.DropoutMask, dropout, Owner.Neurons, Owner.ParentNetwork.BatchSize ); <<<<<<< ======= MyAbstractLayer previousLayer = node as MyAbstractLayer; // reset delta only if next is not Gaussian HACK. // (Gaussian layer already reseted delta and filled with regularization deltas) previousLayer.Delta.Fill(0); >>>>>>> MyAbstractLayer previousLayer = node as MyAbstractLayer; // reset delta only if next is not Gaussian HACK. // (Gaussian layer already reseted delta and filled with regularization deltas) previousLayer.Delta.Fill(0); <<<<<<< Owner.ParentNetwork.BatchSize ); ======= Owner.Neurons ); >>>>>>> Owner.ParentNetwork.BatchSize );
<<<<<<< // bbpt single step BPTTSingleStep.AddRange(newPlan.Where(task => task is IMyDeltaTask).ToList().Reverse<IMyExecutable>()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MyLSTMPartialDerivativesTask).ToList()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MyQLearningTask).ToList()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MyGradientCheckTask).ToList()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MyRestoreValuesTask).ToList()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MySaveActionTask).ToList()); BPTTSingleStep.Add(DecrementTimeStep); // backprop until unfolded (timestep=0) MyExecutionBlock BPTTLoop = new MyLoopBlock(i => TimeStep != -1, BPTTSingleStep.ToArray() ); // bptt architecture BPTTAllSteps.Add(BPTTLoop); BPTTAllSteps.Add(RunTemporalBlocksMode); BPTTAllSteps.AddRange(newPlan.Where(task => task is IMyUpdateWeightsTask).ToList()); // if current time is time for bbp, do it MyExecutionBlock BPTTExecuteBPTTIfTimeCountReachedSequenceLength = new MyIfBlock(() => TimeStep == SequenceLength-1, BPTTAllSteps.ToArray() ); ======= // remove group backprop tasks (they should be called from the individual layers) // DO NOT remove RBM tasks // DO NOT remove the currently selected backprop task (it handles batch learning) selected = newPlan.Where(task => task is MyAbstractBackpropTask && !(task.Enabled) && !(task is MyRBMLearningTask || task is MyRBMReconstructionTask)).ToList(); newPlan.RemoveAll(selected.Contains); // move MyCreateDropoutMaskTask(s) before the first MyForwardTask selected = newPlan.Where(task => task is MyCreateDropoutMaskTask).ToList(); newPlan.RemoveAll(selected.Contains); newPlan.InsertRange(newPlan.IndexOf(newPlan.Find(task => task is IMyForwardTask)), selected); >>>>>>> // remove group backprop tasks (they should be called from the individual layers) // DO NOT remove RBM tasks // DO NOT remove the currently selected backprop task (it handles batch learning) selected = newPlan.Where(task => task is MyAbstractBackpropTask && !(task.Enabled) && !(task is MyRBMLearningTask || task is MyRBMReconstructionTask)).ToList(); newPlan.RemoveAll(selected.Contains); // bbpt single step BPTTSingleStep.AddRange(newPlan.Where(task => task is IMyDeltaTask).ToList().Reverse<IMyExecutable>()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MyLSTMPartialDerivativesTask).ToList()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MyQLearningTask).ToList()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MyGradientCheckTask).ToList()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MyRestoreValuesTask).ToList()); BPTTSingleStep.AddRange(newPlan.Where(task => task is MySaveActionTask).ToList()); BPTTSingleStep.Add(DecrementTimeStep); // backprop until unfolded (timestep=0) MyExecutionBlock BPTTLoop = new MyLoopBlock(i => TimeStep != -1, BPTTSingleStep.ToArray() ); // bptt architecture BPTTAllSteps.Add(BPTTLoop); BPTTAllSteps.Add(RunTemporalBlocksMode); BPTTAllSteps.AddRange(newPlan.Where(task => task is IMyUpdateWeightsTask).ToList()); // if current time is time for bbp, do it MyExecutionBlock BPTTExecuteBPTTIfTimeCountReachedSequenceLength = new MyIfBlock(() => TimeStep == SequenceLength-1, BPTTAllSteps.ToArray() ); <<<<<<< // after FF add deltaoutput and bptt if needed, then increpement one step :) newPlan.Insert(0, IncrementTimeStep); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyForwardTask)) + 1, selected.Reverse<IMyExecutable>()); newPlan.Add(BPTTExecuteBPTTIfTimeCountReachedSequenceLength); ======= if ((selected.Where(task => task.Enabled)).Count() > 1) MyLog.WARNING.WriteLine("More than one output tasks are active!"); if (selected.Count <= 0) MyLog.WARNING.WriteLine("No output tasks are active! Planning (of SGD, RMS, Adadelta etc.) might not work properly. Possible cause: no output layer is present.\nIgnore this if RBM task is currently selected."); selected.Reverse(); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyForwardTask)) + 1, selected); // move reversed MyDeltaTask(s) after the last MyOutputDeltaTask selected = newPlan.Where(task => task is IMyDeltaTask).ToList(); newPlan.RemoveAll(selected.Contains); selected.Reverse(); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyOutputDeltaTask)) + 1, selected); // move MyGradientCheckTask after the last MyDeltaTask selected = newPlan.Where(task => task is MyGradientCheckTask).ToList(); newPlan.RemoveAll(selected.Contains); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyDeltaTask)) + 1, selected); // move currently selected backprop task between Delta tasks and UpdateWeights task selected = newPlan.Where(task => task is MyAbstractBackpropTask && (task.Enabled)).ToList(); if (selected.Count > 1) MyLog.WARNING.WriteLine("Two or more backprop tasks selected."); if (selected.Count <= 0) MyLog.WARNING.WriteLine("No backprop task selected."); newPlan.RemoveAll(selected.Contains); selected.Reverse(); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyDeltaTask)) + 1, selected); // move MyUpdateWeightsTask(s) after the last MyGradientCheckTask selected = newPlan.Where(task => task is IMyUpdateWeightsTask).ToList(); newPlan.RemoveAll(selected.Contains); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is MyGradientCheckTask)) + 1, selected); // move MyQLearningTask after the last MyForwardTask selected = newPlan.Where(task => task is MyQLearningTask).ToList(); newPlan.RemoveAll(selected.Contains); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyForwardTask)) + 1, selected); // move MyRestoreValuesTask after the last MyAbstractBackPropTask selected = newPlan.Where(task => task is MyRestoreValuesTask).ToList(); newPlan.RemoveAll(selected.Contains); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyUpdateWeightsTask)) + 1, selected); // move MyLSTMPartialDerivativesTask after the last MyForwardTask selected = newPlan.Where(task => task is MyLSTMPartialDerivativesTask).ToList(); newPlan.RemoveAll(selected.Contains); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyForwardTask)) + 1, selected); // move MySaveActionTask to the end of the task list selected = newPlan.Where(task => task is MySaveActionTask).ToList(); newPlan.RemoveAll(selected.Contains); newPlan.AddRange(selected); >>>>>>> // after FF add deltaoutput and bptt if needed, then increpement one step :) newPlan.Insert(0, IncrementTimeStep); newPlan.InsertRange(newPlan.IndexOf(newPlan.FindLast(task => task is IMyForwardTask)) + 1, selected.Reverse<IMyExecutable>()); newPlan.Add(BPTTExecuteBPTTIfTimeCountReachedSequenceLength);
<<<<<<< private static FastIoPipe _fastIo; private bool forceQuit = false; private bool cmdLaunch = false; Window window = Application.Current.MainWindow; ======= private static ControlPipe _pipe; >>>>>>> private bool forceQuit = false; private bool cmdLaunch = false; Window window = Application.Current.MainWindow; private static FastIoPipe _fastIo; <<<<<<< ======= >>>>>>> <<<<<<< ======= _pipe?.Start(); >>>>>>> <<<<<<< if (_parrotData.UseMouse && _gameProfile.GunGame) { _diThread?.Abort(0); _diThread = null; } else { _diThread?.Abort(0); _diThread = CreateInputListenerThread(_gameProfile.ConfigValues.Any(x => x.FieldName == "XInput" && x.FieldValue == "1")); } ======= _diThread?.Abort(0); _diThread = (useMouseForGun && _gameProfile.GunGame) ? null : CreateInputListenerThread(_parrotData.XInputMode); >>>>>>> if (_parrotData.UseMouse && _gameProfile.GunGame) { _diThread?.Abort(0); _diThread = null; } else { _diThread?.Abort(0); _diThread = CreateInputListenerThread(_gameProfile.ConfigValues.Any(x => x.FieldName == "XInput" && x.FieldValue == "1")); } <<<<<<< switch (_gameProfile.EmulationProfile) ======= switch (_gameProfile.EmulationProfile) >>>>>>> switch (_gameProfile.EmulationProfile) <<<<<<< if (_gameProfile.EmulationProfile == EmulationProfile.Vf5Lindbergh) info.EnvironmentVariables.Add("tp_msysType", "2"); if (_gameProfile.EmulationProfile == EmulationProfile.Vf5cLindbergh) info.EnvironmentVariables.Add("tp_msysType", "2"); if (_gameProfile.EmulationProfile == EmulationProfile.SegaRtv) info.EnvironmentVariables.Add("tp_msysType", "3"); if (_gameProfile.EmulationProfile == EmulationProfile.SegaJvsLetsGoJungle) ======= if (_gameProfile.EmulationProfile == EmulationProfile.SegaRtv || _gameProfile.EmulationProfile == EmulationProfile.SegaJvsLetsGoJungle) >>>>>>> if (_gameProfile.EmulationProfile == EmulationProfile.SegaRtv || _gameProfile.EmulationProfile == EmulationProfile.SegaJvsLetsGoJungle) <<<<<<< info.RedirectStandardError = true; info.RedirectStandardOutput = true; info.CreateNoWindow = true; info.WindowStyle = ProcessWindowStyle.Normal; ======= if (_parrotData.SilentMode) { info.WindowStyle = ProcessWindowStyle.Hidden; info.CreateNoWindow = true; } else { info.WindowStyle = ProcessWindowStyle.Normal; } >>>>>>> if (_parrotData.SilentMode) { info.WindowStyle = ProcessWindowStyle.Hidden; info.CreateNoWindow = true; } else { info.WindowStyle = ProcessWindowStyle.Normal; } info.RedirectStandardError = true; info.RedirectStandardOutput = true; info.CreateNoWindow = true; <<<<<<< if (_JvsOverride) Dispatcher.Invoke(DispatcherPriority.Normal, new ThreadStart(this.DoCheckBoxesDude)); if (forceQuit) { cmdProcess.Kill(); } ======= //if (_JvsOverride) // Dispatcher.Invoke(DispatcherPriority.Normal, new ThreadStart(this.DoCheckBoxesDude)); >>>>>>> if (_JvsOverride) Dispatcher.Invoke(DispatcherPriority.Normal, new ThreadStart(this.DoCheckBoxesDude)); if (forceQuit) { cmdProcess.Kill(); }
<<<<<<< [Timeout( 60000 )] ======= [TestFixture] [Timeout( 30000 )] >>>>>>> [TestFixture] [Timeout( 60000 )]
<<<<<<< [Timeout( 60000 )] ======= [TestFixture] [Timeout( 30000 )] >>>>>>> [TestFixture] [Timeout( 60000 )]
<<<<<<< [Timeout( 60000 )] ======= [TestFixture] [Timeout( 30000 )] >>>>>>> [TestFixture] [Timeout( 60000 )]
<<<<<<< [Timeout( 60000 )] ======= [TestFixture] [Timeout( 30000 )] >>>>>>> [TestFixture] [Timeout( 60000 )]
<<<<<<< [Timeout( 60000 )] ======= [TestFixture] [Timeout( 30000 )] >>>>>>> [TestFixture] [Timeout( 60000 )]
<<<<<<< using System.Threading.Tasks; ======= using System.Text; >>>>>>> using System.Threading.Tasks; using System.Text; <<<<<<< public CancellationTokenSource CancellationTokenSource { get; private set; } = new CancellationTokenSource(); private ManualResetEvent _syncWorkerCompletedEvent = new ManualResetEvent(false); private ManualResetEvent _checkSystemsWorkerCompletedEvent = new ManualResetEvent(false); Action cancelDownloadMaps = null; Task<bool> downloadMapsTask = null; ======= private string logname; private bool logsetupfailed; >>>>>>> public CancellationTokenSource CancellationTokenSource { get; private set; } = new CancellationTokenSource(); private ManualResetEvent _syncWorkerCompletedEvent = new ManualResetEvent(false); private ManualResetEvent _checkSystemsWorkerCompletedEvent = new ManualResetEvent(false); Action cancelDownloadMaps = null; Task<bool> downloadMapsTask = null; private string logname; private bool logsetupfailed;
<<<<<<< this.cAPIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ======= this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); >>>>>>> this.cAPIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); <<<<<<< this.menuStrip1.Size = new System.Drawing.Size(313, 24); ======= this.menuStrip1.Size = new System.Drawing.Size(314, 24); >>>>>>> this.menuStrip1.Size = new System.Drawing.Size(313, 24); <<<<<<< this.stopCurrentlyRunningActionProgramToolStripMenuItem, this.cAPIToolStripMenuItem}); ======= this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem, this.stopCurrentlyRunningActionProgramToolStripMenuItem}); >>>>>>> this.stopCurrentlyRunningActionProgramToolStripMenuItem, this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem, this.cAPIToolStripMenuItem}); <<<<<<< // notifyIcon1 // this.notifyIcon1.ContextMenuStrip = this.notifyIconContextMenuStrip1; this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); this.notifyIcon1.Text = "EDDiscovery"; this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick); // // notifyIconContextMenuStrip1 // this.notifyIconContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.notifyIconMenu_Open, this.notifyIconMenu_Hide, this.notifyIconMenu_Exit}); this.notifyIconContextMenuStrip1.Name = "notifyIconContextMenuStrip1"; this.notifyIconContextMenuStrip1.Size = new System.Drawing.Size(172, 70); // // notifyIconMenu_Open // this.notifyIconMenu_Open.Name = "notifyIconMenu_Open"; this.notifyIconMenu_Open.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Open.Text = "&Open EDDiscovery"; this.notifyIconMenu_Open.Click += new System.EventHandler(this.notifyIconMenu_Open_Click); // // notifyIconMenu_Hide // this.notifyIconMenu_Hide.Name = "notifyIconMenu_Hide"; this.notifyIconMenu_Hide.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Hide.Text = "&Hide Tray Icon"; this.notifyIconMenu_Hide.Click += new System.EventHandler(this.notifyIconMenu_Hide_Click); // // notifyIconMenu_Exit // this.notifyIconMenu_Exit.Name = "notifyIconMenu_Exit"; this.notifyIconMenu_Exit.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Exit.Text = "E&xit"; this.notifyIconMenu_Exit.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // // cAPIToolStripMenuItem // this.cAPIToolStripMenuItem.Name = "cAPIToolStripMenuItem"; this.cAPIToolStripMenuItem.Size = new System.Drawing.Size(280, 22); this.cAPIToolStripMenuItem.Text = "CAPI"; this.cAPIToolStripMenuItem.Click += new System.EventHandler(this.cAPIToolStripMenuItem_Click); // ======= // notifyIcon1 // this.notifyIcon1.ContextMenuStrip = this.notifyIconContextMenuStrip1; this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); this.notifyIcon1.Text = "EDDiscovery"; this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick); // // notifyIconContextMenuStrip1 // this.notifyIconContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.notifyIconMenu_Open, this.notifyIconMenu_Hide, this.notifyIconMenu_Exit}); this.notifyIconContextMenuStrip1.Name = "notifyIconContextMenuStrip1"; this.notifyIconContextMenuStrip1.Size = new System.Drawing.Size(172, 70); // // notifyIconMenu_Open // this.notifyIconMenu_Open.Name = "notifyIconMenu_Open"; this.notifyIconMenu_Open.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Open.Text = "&Open EDDiscovery"; this.notifyIconMenu_Open.Click += new System.EventHandler(this.notifyIconMenu_Open_Click); // // notifyIconMenu_Hide // this.notifyIconMenu_Hide.Name = "notifyIconMenu_Hide"; this.notifyIconMenu_Hide.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Hide.Text = "&Hide Tray Icon"; this.notifyIconMenu_Hide.Click += new System.EventHandler(this.notifyIconMenu_Hide_Click); // // notifyIconMenu_Exit // this.notifyIconMenu_Exit.Name = "notifyIconMenu_Exit"; this.notifyIconMenu_Exit.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Exit.Text = "E&xit"; this.notifyIconMenu_Exit.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // // editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem // this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Image = global::EDDiscovery.Properties.Resources.missioncompleted; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Name = "editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem"; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Size = new System.Drawing.Size(313, 22); this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Text = "Edit in text current Speech Synthesis Variables"; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Click += new System.EventHandler(this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem_Click); // >>>>>>> // notifyIcon1 // this.notifyIcon1.ContextMenuStrip = this.notifyIconContextMenuStrip1; this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); this.notifyIcon1.Text = "EDDiscovery"; this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick); // // notifyIconContextMenuStrip1 // this.notifyIconContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.notifyIconMenu_Open, this.notifyIconMenu_Hide, this.notifyIconMenu_Exit}); this.notifyIconContextMenuStrip1.Name = "notifyIconContextMenuStrip1"; this.notifyIconContextMenuStrip1.Size = new System.Drawing.Size(172, 70); // // notifyIconMenu_Open // this.notifyIconMenu_Open.Name = "notifyIconMenu_Open"; this.notifyIconMenu_Open.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Open.Text = "&Open EDDiscovery"; this.notifyIconMenu_Open.Click += new System.EventHandler(this.notifyIconMenu_Open_Click); // // notifyIconMenu_Hide // this.notifyIconMenu_Hide.Name = "notifyIconMenu_Hide"; this.notifyIconMenu_Hide.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Hide.Text = "&Hide Tray Icon"; this.notifyIconMenu_Hide.Click += new System.EventHandler(this.notifyIconMenu_Hide_Click); // // notifyIconMenu_Exit // this.notifyIconMenu_Exit.Name = "notifyIconMenu_Exit"; this.notifyIconMenu_Exit.Size = new System.Drawing.Size(171, 22); this.notifyIconMenu_Exit.Text = "E&xit"; this.notifyIconMenu_Exit.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // // editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem // this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Image = global::EDDiscovery.Properties.Resources.missioncompleted; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Name = "editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem"; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Size = new System.Drawing.Size(313, 22); this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Text = "Edit in text current Speech Synthesis Variables"; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Click += new System.EventHandler(this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem_Click); // // cAPIToolStripMenuItem // this.cAPIToolStripMenuItem.Name = "cAPIToolStripMenuItem"; this.cAPIToolStripMenuItem.Size = new System.Drawing.Size(280, 22); this.cAPIToolStripMenuItem.Text = "CAPI"; this.cAPIToolStripMenuItem.Click += new System.EventHandler(this.cAPIToolStripMenuItem_Click); // <<<<<<< private System.Windows.Forms.ToolStripMenuItem cAPIToolStripMenuItem; ======= private System.Windows.Forms.ToolStripMenuItem editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem; >>>>>>> private System.Windows.Forms.ToolStripMenuItem cAPIToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem;
<<<<<<< List<VisitedSystemsClass> result; if (atMost > 0) { result = visitedSystems.OrderByDescending(s => s.Time).Take(atMost).ToList(); } else { var oldestData = DateTime.Now.Subtract(maxDataAge); result = (from systems in visitedSystems where systems.Time > oldestData orderby systems.Time descending select systems).ToList(); } ======= var filter = (TravelHistoryFilter) comboBoxHistoryWindow.SelectedItem ?? TravelHistoryFilter.NoFilter; List<SystemPosition> result = filter.Filter(visitedSystems); >>>>>>> List<VisitedSystemsClass> result; if (atMost > 0) { result = visitedSystems.OrderByDescending(s => s.Time).Take(atMost).ToList(); } else { var oldestData = DateTime.Now.Subtract(maxDataAge); result = (from systems in visitedSystems where systems.Time > oldestData orderby systems.Time descending select systems).ToList(); } var filter = (TravelHistoryFilter) comboBoxHistoryWindow.SelectedItem ?? TravelHistoryFilter.NoFilter; List<SystemPosition> result = filter.Filter(visitedSystems); <<<<<<< ShowSystemInformation((VisitedSystemsClass)(dataGridViewTravel.Rows[0].Cells[1].Tag)); ======= ShowSystemInformation((SystemPosition)(dataGridViewTravel.Rows[0].Cells[TravelHistoryColumns.SystemName].Tag)); >>>>>>> ShowSystemInformation((SystemPosition)(dataGridViewTravel.Rows[0].Cells[TravelHistoryColumns.SystemName].Tag)); ShowSystemInformation((VisitedSystemsClass)(dataGridViewTravel.Rows[0].Cells[1].Tag)); <<<<<<< object[] rowobj = { item.Time, item.Name, diststr, item.curSystem.Note, "█" }; int rownr; ======= object[] rowobj = { item.time, item.Name, diststr, item.curSystem.Note, "█" }; int rownr; >>>>>>> object[] rowobj = { item.time, item.Name, diststr, item.curSystem.Note, "█" }; int rownr; object[] rowobj = { item.Time, item.Name, diststr, item.curSystem.Note, "█" }; int rownr; <<<<<<< cell = dataGridViewTravel.Rows[rownr].Cells[4]; cell.Style.ForeColor = Color.FromArgb(item.MapColour); ======= cell = dataGridViewTravel.Rows[rownr].Cells[TravelHistoryColumns.Map]; cell.Style.ForeColor = (item.vs == null) ? Color.FromArgb(defaultMapColour) : Color.FromArgb(item.vs.MapColour); >>>>>>> cell = dataGridViewTravel.Rows[rownr].Cells[TravelHistoryColumns.Map]; cell.Style.ForeColor = (item.vs == null) ? Color.FromArgb(defaultMapColour) : Color.FromArgb(item.vs.MapColour); cell = dataGridViewTravel.Rows[rownr].Cells[4]; cell.Style.ForeColor = Color.FromArgb(item.MapColour); <<<<<<< ShowSystemInformation((VisitedSystemsClass)(dataGridViewTravel.Rows[e.RowIndex].Cells[1].Tag)); ======= ShowSystemInformation((SystemPosition)(dataGridViewTravel.Rows[e.RowIndex].Cells[TravelHistoryColumns.SystemName].Tag)); >>>>>>> ShowSystemInformation((SystemPosition)(dataGridViewTravel.Rows[e.RowIndex].Cells[TravelHistoryColumns.SystemName].Tag)); ShowSystemInformation((VisitedSystemsClass)(dataGridViewTravel.Rows[e.RowIndex].Cells[1].Tag)); <<<<<<< selectedSys = (VisitedSystemsClass)dataGridViewTravel.Rows[selectedLine].Cells[1].Tag; ======= selectedSys = (SystemPosition)dataGridViewTravel.Rows[selectedLine].Cells[TravelHistoryColumns.SystemName].Tag; >>>>>>> selectedSys = (VisitedSystemsClass)dataGridViewTravel.Rows[selectedLine].Cells[1].Tag; selectedSys = (SystemPosition)dataGridViewTravel.Rows[selectedLine].Cells[TravelHistoryColumns.SystemName].Tag; <<<<<<< ======= LogText(" : Vist nr " + count + Environment.NewLine); System.Diagnostics.Trace.WriteLine("Arrived to system: " + name + " " + count + ":th visit."); >>>>>>> LogText(" : Vist nr " + count + Environment.NewLine); System.Diagnostics.Trace.WriteLine("Arrived to system: " + name + " " + count + ":th visit."); <<<<<<< Task taskEDSM = Task.Factory.StartNew(() => EDSMSync.SendTravelLog(edsm, item, null)); } ======= if (currentSystem == null || previousSystem == null || !currentSystem.HasCoordinate || !previousSystem.HasCoordinate) { var presetDistance = DistanceParser.ParseJumpDistance(textBoxDistanceToNextSystem.Text.Trim(), MaximumJumpRange); if (presetDistance.HasValue) { var distance = new DistanceClass { Dist = presetDistance.Value, CreateTime = DateTime.UtcNow, CommanderCreate = EDDiscoveryForm.EDDConfig.CurrentCommander.Name, NameA = item.Name, NameB = item2.Name, Status = DistancsEnum.EDDiscovery }; Console.Write("Pre-set distance " + distance.NameA + " -> " + distance.NameB + " = " + distance.Dist); distance.Store(); SQLiteDBClass.AddDistanceToCache(distance); } } } textBoxDistanceToNextSystem.Clear(); textBoxDistanceToNextSystem.Enabled = true; >>>>>>> Task taskEDSM = Task.Factory.StartNew(() => EDSMSync.SendTravelLog(edsm, item, null)); } <<<<<<< return ((VisitedSystemsClass)dataGridViewTravel.CurrentRow.Cells[1].Tag).curSystem; ======= return ((SystemPosition)dataGridViewTravel.CurrentRow.Cells[TravelHistoryColumns.SystemName].Tag).curSystem; >>>>>>> return ((SystemPosition)dataGridViewTravel.CurrentRow.Cells[TravelHistoryColumns.SystemName].Tag).curSystem; return ((VisitedSystemsClass)dataGridViewTravel.CurrentRow.Cells[1].Tag).curSystem; <<<<<<< VisitedSystemsClass sp = null; sp = (VisitedSystemsClass)r.Cells[1].Tag; ======= SystemPosition sp = null; sp = (SystemPosition)r.Cells[TravelHistoryColumns.SystemName].Tag; >>>>>>> SystemPosition sp = null; sp = (SystemPosition)r.Cells[TravelHistoryColumns.SystemName].Tag; VisitedSystemsClass sp = null; sp = (VisitedSystemsClass)r.Cells[1].Tag;
<<<<<<< Compass, // 31 Map, // 32 ======= Compass, // 31 Plot, // 32 >>>>>>> Compass, // 31 Map, // 32 Plot, // 33 <<<<<<< { new PanelInfo( PanelIDs.Map, typeof(UserControlMap), "Map", "Map", EDDiscovery.Properties.Resources.map, "3D Map of systems in range", transparent: false) }, ======= { new PanelInfo( PanelIDs.Plot, typeof(UserControlPlot), "2D Plot", "Plot", EDDiscovery.Properties.Resources.plot, "2D Plot of systems in range", transparent: false) }, >>>>>>> { new PanelInfo( PanelIDs.Map, typeof(UserControlMap), "Map", "Map", EDDiscovery.Properties.Resources.map, "3D Map of systems in range", transparent: false) }, { new PanelInfo( PanelIDs.Plot, typeof(UserControlPlot), "2D Plot", "Plot", EDDiscovery.Properties.Resources.plot, "2D Plot of systems in range", transparent: false) },
<<<<<<< public void AddOrUpdateLocation(string planet, Location loc) { AddOrUpdateLocation(planet, loc.Name, loc.Comment, loc.Latitude, loc.Longitude); } public void DeleteLocation( string planet, string placename) ======= public bool DeleteLocation(string planet, string placename) >>>>>>> public void AddOrUpdateLocation(string planet, Location loc) { AddOrUpdateLocation(planet, loc.Name, loc.Comment, loc.Latitude, loc.Longitude); } public bool DeleteLocation(string planet, string placename) <<<<<<< public bool hasSurfaceMarks { get { return PlanetaryMarks != null && PlanetaryMarks.Planets.Count > 0 && PlanetaryMarks.Planets.Where(pl => pl.Locations.Count > 0).Any(); } } ======= public bool isStar { get { return Heading == null; } } public string Name { get { return Heading == null ? StarName : Heading; } } >>>>>>> public bool hasSurfaceMarks { get { return PlanetaryMarks != null && PlanetaryMarks.Planets.Count > 0 && PlanetaryMarks.Planets.Where(pl => pl.Locations.Count > 0).Any(); } } public bool isStar { get { return Heading == null; } } public string Name { get { return Heading == null ? StarName : Heading; } } <<<<<<< // bk = null, new bookmark, else update. isstar = true, region = false. public static BookmarkClass AddOrUpdateBookmark(BookmarkClass bk, bool isstar, string name, double x, double y, double z, DateTime tme, string notes, PlanetMarks planetMarks = null) ======= // bk = null, new bookmark, else update. isstar = true, region = false. if notes is null, don't update notes on an existing one, and empty on new ones public static BookmarkClass AddOrUpdateBookmark(BookmarkClass bk, bool isstar, string name, double x, double y, double z, DateTime tme, string notes = null) >>>>>>> // bk = null, new bookmark, else update. isstar = true, region = false. public static BookmarkClass AddOrUpdateBookmark(BookmarkClass bk, bool isstar, string name, double x, double y, double z, DateTime tme, string notes = null, PlanetMarks planetMarks = null) <<<<<<< if (bk == null) ======= if (bk == null) { >>>>>>> if (bk == null) { <<<<<<< bk.Note = notes; bk.PlanetaryMarks = planetMarks; ======= bk.Note = notes ?? bk.Note; // only override notes if its set. >>>>>>> bk.PlanetaryMarks = planetMarks ?? bk.PlanetaryMarks; bk.Note = notes ?? bk.Note; // only override notes if its set.
<<<<<<< // Also update galactic mapping from EDSM LogLine("Get galactic mapping from EDSM"); galacticMapping.DownloadFromEDSM(); galacticMapping.ParseData(); ======= _db.GetAllBookmarks(); >>>>>>> _db.GetAllBookmarks(); // Also update galactic mapping from EDSM LogLine("Get galactic mapping from EDSM"); galacticMapping.DownloadFromEDSM(); galacticMapping.ParseData();
<<<<<<< ======= // Systems in data dumps are now sorted by modify time ascending, so // the last inserted system should be the most recently modified system. public static DateTime GetLastSystemModifiedTimeFast() { DateTime lasttime = new DateTime(2010, 1, 1, 0, 0, 0); try { using (SQLiteConnectionSystem cn = new SQLiteConnectionSystem()) { using (DbCommand cmd = cn.CreateCommand("SELECT UpdateTimestamp FROM EdsmSystems ORDER BY Id DESC LIMIT 1")) { using (DbDataReader reader = cmd.ExecuteReader()) { if (reader.Read() && System.DBNull.Value != reader["UpdateTimestamp"]) lasttime = new DateTime(2015, 1, 1, 0, 0, 0, DateTimeKind.Utc) + TimeSpan.FromSeconds((long)reader["UpdateTimestamp"]); } } } } catch (Exception ex) { System.Diagnostics.Trace.WriteLine("Exception : " + ex.Message); System.Diagnostics.Trace.WriteLine(ex.StackTrace); } return lasttime; } public static void TouchSystem(SQLiteConnectionSystem cn, string systemName) { foreach (long edsmid in GetEdsmIdsFromName(systemName)) { using (DbCommand cmd = cn.CreateCommand("UPDATE EdsmSystems SET VersionTimestamp = @VersionTimestamp where EdsmId=@EdsmId")) { cmd.AddParameterWithValue("@EdsmId", edsmid); cmd.AddParameterWithValue("@VersionTimestamp", DateTime.UtcNow.Subtract(new DateTime(2015, 1, 1)).TotalSeconds); cmd.ExecuteNonQuery(); } } } >>>>>>>
<<<<<<< this.cAPIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ======= >>>>>>> this.cAPIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); <<<<<<< this.menuStrip1.Size = new System.Drawing.Size(313, 24); ======= this.menuStrip1.Size = new System.Drawing.Size(222, 24); >>>>>>> this.menuStrip1.Size = new System.Drawing.Size(222, 24); <<<<<<< this.speechSynthesisSettingsToolStripMenuItem, this.stopCurrentlyRunningActionProgramToolStripMenuItem, ======= >>>>>>> <<<<<<< this.cAPIToolStripMenuItem}); ======= this.stopCurrentlyRunningActionProgramToolStripMenuItem, this.speechSynthesisSettingsToolStripMenuItem, this.soundSettingsToolStripMenuItem}); >>>>>>> this.stopCurrentlyRunningActionProgramToolStripMenuItem, this.speechSynthesisSettingsToolStripMenuItem, this.stopCurrentlyRunningActionProgramToolStripMenuItem, this.cAPIToolStripMenuItem, this.soundSettingsToolStripMenuItem}); <<<<<<< // editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem // this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Image = global::EDDiscovery.Properties.Resources.missioncompleted; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Name = "editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem"; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Size = new System.Drawing.Size(313, 22); this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Text = "Edit in text current Speech Synthesis Variables"; this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem.Click += new System.EventHandler(this.editInTextCurrentSpeechSynthesisVariablesToolStripMenuItem_Click); // // cAPIToolStripMenuItem // this.cAPIToolStripMenuItem.Name = "cAPIToolStripMenuItem"; this.cAPIToolStripMenuItem.Size = new System.Drawing.Size(280, 22); this.cAPIToolStripMenuItem.Text = "CAPI"; this.cAPIToolStripMenuItem.Click += new System.EventHandler(this.cAPIToolStripMenuItem_Click); // ======= >>>>>>> // cAPIToolStripMenuItem // this.cAPIToolStripMenuItem.Name = "cAPIToolStripMenuItem"; this.cAPIToolStripMenuItem.Size = new System.Drawing.Size(280, 22); this.cAPIToolStripMenuItem.Text = "CAPI"; this.cAPIToolStripMenuItem.Click += new System.EventHandler(this.cAPIToolStripMenuItem_Click); //
<<<<<<< ======= this.trilaterationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.wantedSystemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.bothToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.comboBoxHistoryWindow = new System.Windows.Forms.ComboBox(); >>>>>>> this.trilaterationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.wantedSystemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.bothToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.comboBoxHistoryWindow = new System.Windows.Forms.ComboBox(); <<<<<<< this.panel_system = new System.Windows.Forms.Panel(); this.label_warning = new System.Windows.Forms.Label(); ======= this.buttonMap3D = new System.Windows.Forms.Button(); this.textBoxSystem = new System.Windows.Forms.TextBox(); this.panel1 = new System.Windows.Forms.Panel(); >>>>>>> this.panel_system = new System.Windows.Forms.Panel(); this.label_warning = new System.Windows.Forms.Label(); this.buttonMap3D = new System.Windows.Forms.Button(); this.textBoxSystem = new System.Windows.Forms.TextBox(); this.panel1 = new System.Windows.Forms.Panel(); <<<<<<< // panel_system // this.panel_system.Controls.Add(this.label_warning); this.panel_system.Controls.Add(this.label14); this.panel_system.Controls.Add(this.textBoxSolDist); this.panel_system.Controls.Add(this.buttonTrilaterate); this.panel_system.Controls.Add(this.buttonRoss); this.panel_system.Controls.Add(this.buttonEDDB); this.panel_system.Controls.Add(this.textBoxState); this.panel_system.Controls.Add(this.textBoxEconomy); this.panel_system.Controls.Add(this.label12); this.panel_system.Controls.Add(this.label13); this.panel_system.Controls.Add(this.textBoxGovernment); this.panel_system.Controls.Add(this.textBoxAllegiance); this.panel_system.Controls.Add(this.label11); this.panel_system.Controls.Add(this.label10); this.panel_system.Controls.Add(this.label9); this.panel_system.Controls.Add(this.textBoxVisits); this.panel_system.Controls.Add(this.label8); this.panel_system.Controls.Add(this.richTextBoxNote); this.panel_system.Controls.Add(this.buttonUpdate); this.panel_system.Controls.Add(this.textBoxDistance); this.panel_system.Controls.Add(this.label7); this.panel_system.Controls.Add(this.textBoxPrevSystem); this.panel_system.Controls.Add(this.label_Z); this.panel_system.Controls.Add(this.textBoxZ); this.panel_system.Controls.Add(this.labelDistEnter); this.panel_system.Controls.Add(this.label5); this.panel_system.Controls.Add(this.textBoxY); this.panel_system.Controls.Add(this.textBoxX); this.panel_system.Controls.Add(this.label4); this.panel_system.Controls.Add(this.textBoxSystem); this.panel_system.Location = new System.Drawing.Point(7, 110); this.panel_system.Name = "panel_system"; this.panel_system.Size = new System.Drawing.Size(293, 250); this.panel_system.TabIndex = 6; // // label_warning // this.label_warning.AutoSize = true; this.label_warning.Location = new System.Drawing.Point(3, 221); this.label_warning.MaximumSize = new System.Drawing.Size(280, 50); this.label_warning.Name = "label_warning"; this.label_warning.Size = new System.Drawing.Size(245, 26); this.label_warning.TabIndex = 44; this.label_warning.Text = "Important!! Use galaxy map to get distance with 2 decimals. Ex 17.44"; ======= // buttonMap3D // this.buttonMap3D.Location = new System.Drawing.Point(217, 80); this.buttonMap3D.Name = "buttonMap3D"; this.buttonMap3D.Size = new System.Drawing.Size(65, 23); this.buttonMap3D.TabIndex = 4; this.buttonMap3D.Text = "3D map"; this.buttonMap3D.UseVisualStyleBackColor = true; this.buttonMap3D.Click += new System.EventHandler(this.buttonMap_Click); // // textBoxSystem // this.textBoxSystem.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBoxSystem.Location = new System.Drawing.Point(50, 9); this.textBoxSystem.Name = "textBoxSystem"; this.textBoxSystem.ReadOnly = true; this.textBoxSystem.Size = new System.Drawing.Size(203, 13); this.textBoxSystem.TabIndex = 15; this.textBoxSystem.TabStop = false; // // panel1 // this.panel1.Controls.Add(this.label14); this.panel1.Controls.Add(this.textBoxSolDist); this.panel1.Controls.Add(this.buttonTrilaterate); this.panel1.Controls.Add(this.buttonRoss); this.panel1.Controls.Add(this.buttonEDDB); this.panel1.Controls.Add(this.textBoxState); this.panel1.Controls.Add(this.textBoxEconomy); this.panel1.Controls.Add(this.label12); this.panel1.Controls.Add(this.label13); this.panel1.Controls.Add(this.textBoxGovernment); this.panel1.Controls.Add(this.textBoxAllegiance); this.panel1.Controls.Add(this.label11); this.panel1.Controls.Add(this.label10); this.panel1.Controls.Add(this.label9); this.panel1.Controls.Add(this.textBoxVisits); this.panel1.Controls.Add(this.label8); this.panel1.Controls.Add(this.richTextBoxNote); this.panel1.Controls.Add(this.textBoxDistText); this.panel1.Controls.Add(this.buttonUpdate); this.panel1.Controls.Add(this.textBoxDistance); this.panel1.Controls.Add(this.label7); this.panel1.Controls.Add(this.textBoxPrevSystem); this.panel1.Controls.Add(this.label_Z); this.panel1.Controls.Add(this.textBoxZ); this.panel1.Controls.Add(this.labelDistEnter); this.panel1.Controls.Add(this.label5); this.panel1.Controls.Add(this.textBoxY); this.panel1.Controls.Add(this.textBoxX); this.panel1.Controls.Add(this.label4); this.panel1.Controls.Add(this.textBoxSystem); this.panel1.Location = new System.Drawing.Point(7, 110); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(293, 235); this.panel1.TabIndex = 6; >>>>>>> // buttonMap3D // this.panel_system.Controls.Add(this.label_warning); this.panel_system.Controls.Add(this.label14); this.panel_system.Controls.Add(this.textBoxSolDist); this.panel_system.Controls.Add(this.buttonTrilaterate); this.panel_system.Controls.Add(this.buttonRoss); this.panel_system.Controls.Add(this.buttonEDDB); this.panel_system.Controls.Add(this.textBoxState); this.panel_system.Controls.Add(this.textBoxEconomy); this.panel_system.Controls.Add(this.label12); this.panel_system.Controls.Add(this.label13); this.panel_system.Controls.Add(this.textBoxGovernment); this.panel_system.Controls.Add(this.textBoxAllegiance); this.panel_system.Controls.Add(this.label11); this.panel_system.Controls.Add(this.label10); this.panel_system.Controls.Add(this.label9); this.panel_system.Controls.Add(this.textBoxVisits); this.panel_system.Controls.Add(this.label8); this.panel_system.Controls.Add(this.richTextBoxNote); this.panel_system.Controls.Add(this.buttonUpdate); this.panel_system.Controls.Add(this.textBoxDistance); this.panel_system.Controls.Add(this.label7); this.panel_system.Controls.Add(this.textBoxPrevSystem); this.panel_system.Controls.Add(this.label_Z); this.panel_system.Controls.Add(this.textBoxZ); this.panel_system.Controls.Add(this.labelDistEnter); this.panel_system.Controls.Add(this.label5); this.panel_system.Controls.Add(this.textBoxY); this.panel_system.Controls.Add(this.textBoxX); this.panel_system.Controls.Add(this.label4); this.panel_system.Controls.Add(this.textBoxSystem); this.panel_system.Location = new System.Drawing.Point(7, 110); this.panel_system.Name = "panel_system"; this.panel_system.Size = new System.Drawing.Size(293, 250); this.panel_system.TabIndex = 6; this.buttonMap3D.Location = new System.Drawing.Point(217, 80); this.buttonMap3D.Name = "buttonMap3D"; this.buttonMap3D.Size = new System.Drawing.Size(65, 23); this.buttonMap3D.TabIndex = 4; this.buttonMap3D.Text = "3D map"; this.buttonMap3D.UseVisualStyleBackColor = true; this.buttonMap3D.Click += new System.EventHandler(this.buttonMap_Click); // // label_warning // this.label_warning.AutoSize = true; this.label_warning.Location = new System.Drawing.Point(3, 221); this.label_warning.MaximumSize = new System.Drawing.Size(280, 50); this.label_warning.Name = "label_warning"; this.label_warning.Size = new System.Drawing.Size(245, 26); this.label_warning.TabIndex = 44; this.label_warning.Text = "Important!! Use galaxy map to get distance with 2 decimals. Ex 17.44"; <<<<<<< this.dataGridViewNearest.Location = new System.Drawing.Point(7, 380); ======= this.dataGridViewNearest.ContextMenuStrip = this.closestContextMenu; this.dataGridViewNearest.Location = new System.Drawing.Point(7, 379); >>>>>>> this.dataGridViewNearest.Location = new System.Drawing.Point(7, 380); this.dataGridViewNearest.ContextMenuStrip = this.closestContextMenu; this.dataGridViewNearest.Location = new System.Drawing.Point(7, 379); <<<<<<< private ExtendedControls.ButtonExt buttonMap; internal ExtendedControls.RichTextBoxBorder richTextBox_History; private ExtendedControls.TextBoxBorder textBoxSystem; private System.Windows.Forms.Panel panel_system; private ExtendedControls.TextBoxBorder textBoxDistance; ======= private System.Windows.Forms.Button buttonMap3D; internal System.Windows.Forms.RichTextBox richTextBox_History; private System.Windows.Forms.TextBox textBoxSystem; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.TextBox textBoxDistance; >>>>>>> private System.Windows.Forms.Button buttonMap3D; internal System.Windows.Forms.RichTextBox richTextBox_History; private System.Windows.Forms.TextBox textBoxSystem; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.TextBox textBoxDistance; <<<<<<< private System.Windows.Forms.Label label_warning; ======= private System.Windows.Forms.Button buttonMap2D; private System.Windows.Forms.ContextMenuStrip closestContextMenu; private System.Windows.Forms.ToolStripMenuItem addToTrilaterationToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem trilaterationToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem wantedSystemsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem bothToolStripMenuItem; >>>>>>> private System.Windows.Forms.Label label_warning; private System.Windows.Forms.Button buttonMap2D; private System.Windows.Forms.ContextMenuStrip closestContextMenu; private System.Windows.Forms.ToolStripMenuItem addToTrilaterationToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem trilaterationToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem wantedSystemsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem bothToolStripMenuItem;
<<<<<<< _useDistances = _db.GetSettingBool("EDSMDistances", false); _EDSMLog = _db.GetSettingBool("EDSMLog", false); _canSkipSlowUpdates = _db.GetSettingBool("CanSkipSlowUpdates", false); _orderrowsinverted = _db.GetSettingBool("OrderRowsInverted", false); _focusOnNewSystem = _db.GetSettingBool("FocusOnNewSystem", false); _keepOnTop = _db.GetSettingBool("KeepOnTop", false); ======= _useDistances = SQLiteDBClass.GetSettingBool("EDSMDistances", false); _EDSMLog = SQLiteDBClass.GetSettingBool("EDSMLog", false); _canSkipSlowUpdates = SQLiteDBClass.GetSettingBool("CanSkipSlowUpdates", false); _orderrowsinverted = SQLiteDBClass.GetSettingBool("OrderRowsInverted", false); _focusOnNewSystem = SQLiteDBClass.GetSettingBool("FocusOnNewSystem", false); >>>>>>> _useDistances = SQLiteDBClass.GetSettingBool("EDSMDistances", false); _EDSMLog = SQLiteDBClass.GetSettingBool("EDSMLog", false); _canSkipSlowUpdates = SQLiteDBClass.GetSettingBool("CanSkipSlowUpdates", false); _orderrowsinverted = SQLiteDBClass.GetSettingBool("OrderRowsInverted", false); _focusOnNewSystem = SQLiteDBClass.GetSettingBool("FocusOnNewSystem", false); _keepOnTop = _db.GetSettingBool("KeepOnTop", false);
<<<<<<< bool IsTravelling(HistoryList hl, out DateTime startTime) { bool inTrip = false; startTime = DateTime.Now; HistoryEntry lastStartMark = hl.GetLastHistoryEntry(x => x.StartMarker); if (lastStartMark != null) { HistoryEntry lastStopMark = hl.GetLastHistoryEntry(x => x.StopMarker); inTrip = lastStopMark == null || lastStopMark.EventTimeLocal < lastStartMark.EventTimeLocal; if (inTrip) startTime = lastStartMark.EventTimeLocal; } return inTrip; } ======= void SizeControls() { try { int height = 0; foreach (DataGridViewRow row in dataGridViewStats.Rows) { height += row.Height + 1; } height += dataGridViewStats.ColumnHeadersHeight + 2; dataGridViewStats.Size = new Size(Math.Max(10, panelData.DisplayRectangle.Width - panelData.ScrollBarWidth), height); // all controls should be placed each time. //System.Diagnostics.Debug.WriteLine("DGV {0} {1}", dataGridViewStats.Size, dataGridViewStats.Location); mostVisited.Location = new Point(0, height); mostVisited.Size = new Size(Math.Max(10, panelData.DisplayRectangle.Width - panelData.ScrollBarWidth), mostVisited.Height); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine($"UserControlStats::SizeControls Exception: {ex.Message}"); return; } } void StatToDGV(string title, string data) { object[] rowobj = { title, data }; dataGridViewStats.Rows.Add(rowobj); } void StatToDGV(string title, int data) { object[] rowobj = { title, data.ToString() }; dataGridViewStats.Rows.Add(rowobj); } #endregion //////////////////////////////////////////////////////////////////////////////////////////////////////// #region Travel Panel >>>>>>> bool IsTravelling(HistoryList hl, out DateTime startTime) { bool inTrip = false; startTime = DateTime.Now; HistoryEntry lastStartMark = hl.GetLastHistoryEntry(x => x.StartMarker); if (lastStartMark != null) { HistoryEntry lastStopMark = hl.GetLastHistoryEntry(x => x.StopMarker); inTrip = lastStopMark == null || lastStopMark.EventTimeLocal < lastStartMark.EventTimeLocal; if (inTrip) startTime = lastStartMark.EventTimeLocal; } return inTrip; } void SizeControls() { try { int height = 0; foreach (DataGridViewRow row in dataGridViewStats.Rows) { height += row.Height + 1; } height += dataGridViewStats.ColumnHeadersHeight + 2; dataGridViewStats.Size = new Size(Math.Max(10, panelData.DisplayRectangle.Width - panelData.ScrollBarWidth), height); // all controls should be placed each time. //System.Diagnostics.Debug.WriteLine("DGV {0} {1}", dataGridViewStats.Size, dataGridViewStats.Location); mostVisited.Location = new Point(0, height); mostVisited.Size = new Size(Math.Max(10, panelData.DisplayRectangle.Width - panelData.ScrollBarWidth), mostVisited.Height); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine($"UserControlStats::SizeControls Exception: {ex.Message}"); return; } } void StatToDGV(string title, string data) { object[] rowobj = { title, data }; dataGridViewStats.Rows.Add(rowobj); } void StatToDGV(string title, int data) { object[] rowobj = { title, data.ToString() }; dataGridViewStats.Rows.Add(rowobj); } #endregion //////////////////////////////////////////////////////////////////////////////////////////////////////// #region Travel Panel <<<<<<< if (userControlStatsTimeTravel.TimeMode == UserControlStatsTimeModeEnum.Summary || userControlStatsTimeTravel.TimeMode == UserControlStatsTimeModeEnum.Custom) { dataGridViewTravel.Rows.Clear(); dataGridViewTravel.Columns.Clear(); dataGridViewTravel.Dock = DockStyle.Fill; dataGridViewTravel.Visible = true; if (userControlStatsTimeTravel.TimeMode == UserControlStatsTimeModeEnum.Summary) ======= int sortcol = dataGridViewTravel.SortedColumn?.Index ?? 0; SortOrder sortorder = dataGridViewTravel.SortOrder; dataGridViewTravel.Rows.Clear(); dataGridViewTravel.Columns.Clear(); if (userControlStatsTimeTravel.TimeMode == StatsTimeUserControl.TimeModeType.Summary || userControlStatsTimeTravel.TimeMode == StatsTimeUserControl.TimeModeType.Custom) { if (userControlStatsTimeTravel.TimeMode == StatsTimeUserControl.TimeModeType.Summary) >>>>>>> int sortcol = dataGridViewTravel.SortedColumn?.Index ?? 0; SortOrder sortorder = dataGridViewTravel.SortOrder; dataGridViewTravel.Rows.Clear(); dataGridViewTravel.Columns.Clear(); if (userControlStatsTimeTravel.TimeMode == StatsTimeUserControl.TimeModeType.Summary || userControlStatsTimeTravel.TimeMode == StatsTimeUserControl.TimeModeType.Custom) { if (userControlStatsTimeTravel.TimeMode == StatsTimeUserControl.TimeModeType.Summary) <<<<<<< ======= >>>>>>> <<<<<<< ======= >>>>>>> <<<<<<< dataGridViewTravel.Rows.Clear(); dataGridViewTravel.Columns.Clear(); dataGridViewTravel.Dock = DockStyle.Fill; dataGridViewTravel.Visible = true; ======= >>>>>>> <<<<<<< ======= >>>>>>> <<<<<<< ======= >>>>>>> <<<<<<< for (int ii = 0; ii < intervals; ii++) strarr[ii] = hl.GetFSDBoostUsed(timeintervals[ii + 1], timeintervals[ii], 3).ToString("N0", System.Globalization.CultureInfo.CurrentCulture); StatToDGV(dataGridViewTravel, "Premium Boost", strarr); ======= >>>>>>> for (int ii = 0; ii < intervals; ii++) strarr[ii] = hl.GetFSDBoostUsed(timeintervals[ii + 1], timeintervals[ii], 3).ToString("N0", System.Globalization.CultureInfo.CurrentCulture); StatToDGV(dataGridViewTravel, "Premium Boost", strarr); <<<<<<< for (int ii = 0; ii < intervals; ii++) strarr[ii] = hl.GetFSDBoostUsed(timeintervals[ii+ 1], timeintervals[ii], 1).ToString("N0", System.Globalization.CultureInfo.CurrentCulture); StatToDGV(dataGridViewTravel, "Basic Boost", strarr); ======= >>>>>>> for (int ii = 0; ii < intervals; ii++) strarr[ii] = hl.GetFSDBoostUsed(timeintervals[ii+ 1], timeintervals[ii], 1).ToString("N0", System.Globalization.CultureInfo.CurrentCulture); StatToDGV(dataGridViewTravel, "Basic Boost", strarr); <<<<<<< ======= >>>>>>> <<<<<<< } ======= } for (int i = 1; i < dataGridViewTravel.Columns.Count; i++) ColumnValueAlignment(dataGridViewTravel.Columns[i] as DataGridViewTextBoxColumn); if (sortcol < dataGridViewTravel.Columns.Count) { dataGridViewTravel.Sort(dataGridViewTravel.Columns[sortcol], (sortorder == SortOrder.Descending) ? ListSortDirection.Descending : ListSortDirection.Ascending); dataGridViewTravel.Columns[sortcol].HeaderCell.SortGlyphDirection = sortorder; } } private void dataGridViewTravel_SortCompare(object sender, DataGridViewSortCompareEventArgs e) { if (e.Column.Tag == null) // tag null means numeric sort. e.SortDataGridViewColumnDate(); } private void userControlStatsTimeTravel_TimeModeChanged(object sender, EventArgs e) { Stats(null, null); >>>>>>> } for (int i = 1; i < dataGridViewTravel.Columns.Count; i++) ColumnValueAlignment(dataGridViewTravel.Columns[i] as DataGridViewTextBoxColumn); if (sortcol < dataGridViewTravel.Columns.Count) { dataGridViewTravel.Sort(dataGridViewTravel.Columns[sortcol], (sortorder == SortOrder.Descending) ? ListSortDirection.Descending : ListSortDirection.Ascending); dataGridViewTravel.Columns[sortcol].HeaderCell.SortGlyphDirection = sortorder; } } private void dataGridViewTravel_SortCompare(object sender, DataGridViewSortCompareEventArgs e) { if (e.Column.Tag == null) // tag null means numeric sort. e.SortDataGridViewColumnDate(); } private void userControlStatsTimeTravel_TimeModeChanged(object sender, EventArgs e) { Stats(null, null);
<<<<<<< LogLineHighlight("DLLs failed to load: " + res.Item1); LogLine("Profile " + EDDProfiles.Instance.Current.Name + " Loaded"); ======= LogLineHighlight("DLLs failed to load: " + res.Item2); >>>>>>> LogLineHighlight("DLLs failed to load: " + res.Item2); LogLine("Profile " + EDDProfiles.Instance.Current.Name + " Loaded");