conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
Assert.AreEqual(tradesPage.Records[0].BaseAccount, "GBZXCJIUEPDXGHMS64UBJHUVKV6ETWYOVHADLTBXJNJFUC7A7RU5B3GN");
=======
Assert.AreEqual(tradesPage.Records[0].BaseOfferId, "10");
Assert.AreEqual(tradesPage.Records[0].CounterOfferId, "11");
Assert.AreEqual(tradesPage.Records[0].BaseAccount.AccountId, "GBZXCJIUEPDXGHMS64UBJHUVKV6ETWYOVHADLTBXJNJFUC7A7RU5B3GN");
>>>>>>>
Assert.AreEqual(tradesPage.Records[0].BaseOfferId, "10");
Assert.AreEqual(tradesPage.Records[0].CounterOfferId, "11");
Assert.AreEqual(tradesPage.Records[0].BaseAccount, "GBZXCJIUEPDXGHMS64UBJHUVKV6ETWYOVHADLTBXJNJFUC7A7RU5B3GN"); |
<<<<<<<
public ChangeTrustOperationResponse(string assetCode, string assetIssuer, string assetType, string limit, string trustee, string trustor)
=======
public ChangeTrustOperationResponse()
{
}
public ChangeTrustOperationResponse(string assetCode, string assetIssuer, string assetType, string limit, KeyPair trustee, KeyPair trustor)
>>>>>>>
public ChangeTrustOperationResponse(string assetCode, string assetIssuer, string assetType, string limit, string trustee, string trustor)
<<<<<<<
[JsonProperty(PropertyName = "limit")]
public string Limit { get; }
=======
[JsonProperty(PropertyName = "limit")]
public string Limit { get; private set; }
>>>>>>>
[JsonProperty(PropertyName = "limit")]
public string Limit { get; private set; }
<<<<<<<
public string Trustee { get; }
=======
[JsonConverter(typeof(KeyPairTypeAdapter))]
public KeyPair Trustee { get; private set; }
>>>>>>>
public string Trustee { get; private set; }
<<<<<<<
public string Trustor { get; }
=======
[JsonConverter(typeof(KeyPairTypeAdapter))]
public KeyPair Trustor { get; private set; }
>>>>>>>
public string Trustor { get; private set; } |
<<<<<<<
public string From { get; }
=======
[JsonConverter(typeof(KeyPairTypeAdapter))]
public KeyPair From { get; private set; }
>>>>>>>
public string From { get; private set; }
<<<<<<<
public string To { get; }
=======
[JsonConverter(typeof(KeyPairTypeAdapter))]
public KeyPair To { get; private set; }
>>>>>>>
public string To { get; private set; } |
<<<<<<<
=======
if (title == null)
{
// Re-label a couple of scan names to make them nicer
nameRemap["AltimetryLoRes"] = "Low resolution altimetry";
nameRemap["AltimetryHiRes"] = "High resolution altimetry";
string scanTypeName = nameRemap.ContainsKey(scanName) ? nameRemap[scanName] : scanName;
this.title = scanTypeName + " scan: " + coverage.ToString("N0") + "% coverage of " + targetBody.PrintName();
}
>>>>>>>
<<<<<<<
currentCoverage = SCANUtil.GetCoverage((int)scanType, targetBody);
=======
double coverageInPercentage = SCANsatUtil.GetCoverage(scanType, targetBody);
>>>>>>>
currentCoverage = SCANsatUtil.GetCoverage(scanType, targetBody); |
<<<<<<<
LoggingUtil.LogError(this.GetType(), ErrorPrefix(configNode) +
": missing required value 'altitude'.");
=======
Debug.LogError("ContractConfigurator: " + ErrorPrefix(configNode) +
": invalid value of " + configNode.GetValue("altitude") + " for altitude. Must be a real number greater than zero.");
>>>>>>>
LoggingUtil.LogError(this.GetType(), ErrorPrefix(configNode) +
": invalid value of " + configNode.GetValue("altitude") + " for altitude. Must be a real number greater than zero.");
<<<<<<<
valid = false;
LoggingUtil.LogError(this.GetType(), ErrorPrefix(configNode) +
": invalid value of " + configNode.GetValue("altitude") + " for altitude. Must be a real number greater than zero.");
=======
altitude = Convert.ToDouble(configNode.GetValue("altitude"));
>>>>>>>
altitude = Convert.ToDouble(configNode.GetValue("altitude")); |
<<<<<<<
/// <summary>
/// ParameterFactory to provide logic for SequenceNode.
/// </summary>
=======
/*
* ParameterFactory to provide logic for SequenceNode.
*/
[Obsolete("Obsolete as of Contract Configurator 0.6.7, please use the completeInSequence attribute instead.")]
>>>>>>>
/// <summary>
/// ParameterFactory to provide logic for SequenceNode.
/// </summary>
[Obsolete("Obsolete as of Contract Configurator 0.6.7, please use the completeInSequence attribute instead.")] |
<<<<<<<
LoggingUtil.LogDebug(this.GetType(), "Start Registering ParameterFactories");
// Get everything that extends ParameterFactory
var subclasses =
from assembly in AppDomain.CurrentDomain.GetAssemblies()
from type in assembly.GetTypes()
where type.IsSubclassOf(typeof(ParameterFactory))
select type;
=======
>>>>>>>
LoggingUtil.LogDebug(this.GetType(), "Start Registering ParameterFactories");
<<<<<<<
LoggingUtil.LogDebug(this.GetType(), "Start Registering BehaviourFactories");
// Get everything that extends BehaviourFactory
var subclasses =
from assembly in AppDomain.CurrentDomain.GetAssemblies()
from type in assembly.GetTypes()
where type.IsSubclassOf(typeof(BehaviourFactory))
select type;
=======
>>>>>>>
LoggingUtil.LogDebug(this.GetType(), "Start Registering BehaviourFactories");
<<<<<<<
LoggingUtil.LogDebug(this.GetType(), "Start Registering ContractRequirements");
// Get everything that extends ContractRequirement
var subclasses =
from assembly in AppDomain.CurrentDomain.GetAssemblies()
from type in assembly.GetTypes()
where type.IsSubclassOf(typeof(ContractRequirement))
select type;
=======
>>>>>>>
LoggingUtil.LogDebug(this.GetType(), "Start Registering ContractRequirements"); |
<<<<<<<
[Theory]
[InlineData("auto")]
public async Task UseHardwareAcceleration(string hardwareAccelerator)
{
string output = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + FileExtensions.Mp4);
IMediaInfo info = await MediaInfo.Get(Resources.MkvWithAudio);
IConversionResult conversionResult = await Conversion.Convert(Resources.MkvWithAudio, output).UseHardwareAcceleration(new HardwareAccelerator(hardwareAccelerator), 0).Start();
Assert.True(conversionResult.Success);
IMediaInfo resultFile = conversionResult.MediaInfo.Value;
Assert.Equal("h264", resultFile.VideoStreams.First().Format);
}
[Theory]
[InlineData("a16f0cb5c0354b6197e9f3bc3108c017")]
public async Task MissingHardwareAccelerator(string hardwareAccelerator)
{
string output = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + FileExtensions.Mp4);
IMediaInfo info = await MediaInfo.Get(Resources.MkvWithAudio);
await Assert.ThrowsAsync<HardwareAcceleratorNotFoundException>(async () =>
{
await Conversion.Convert(Resources.MkvWithAudio, output).UseHardwareAcceleration(new HardwareAccelerator(hardwareAccelerator), 0).Start();
});
}
=======
[Fact]
public async Task OpenNotExistingStream()
{
var ffmpegProcesses = System.Diagnostics.Process.GetProcessesByName("ffmpeg").Count();
string output = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + FileExtensions.WebM);
var cancellationToken = new CancellationTokenSource();
cancellationToken.CancelAfter(1000);
var conversion = Conversion.New().AddStream(new WebStream(new Uri(@"rtsp://192.168.1.123:554/"), "M3U8", TimeSpan.FromMinutes(5))).SetOutput(output);
await Assert.ThrowsAsync<ConversionException>(async () => await conversion.Start(cancellationToken.Token));
Assert.Equal(System.Diagnostics.Process.GetProcessesByName("ffmpeg").Count(), ffmpegProcesses);
}
>>>>>>>
[Theory]
[InlineData("auto")]
public async Task UseHardwareAcceleration(string hardwareAccelerator)
{
string output = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + FileExtensions.Mp4);
IMediaInfo info = await MediaInfo.Get(Resources.MkvWithAudio);
IConversionResult conversionResult = await Conversion.Convert(Resources.MkvWithAudio, output).UseHardwareAcceleration(new HardwareAccelerator(hardwareAccelerator), 0).Start();
Assert.True(conversionResult.Success);
IMediaInfo resultFile = conversionResult.MediaInfo.Value;
Assert.Equal("h264", resultFile.VideoStreams.First().Format);
}
[Theory]
[InlineData("a16f0cb5c0354b6197e9f3bc3108c017")]
public async Task MissingHardwareAccelerator(string hardwareAccelerator)
{
string output = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + FileExtensions.Mp4);
IMediaInfo info = await MediaInfo.Get(Resources.MkvWithAudio);
await Assert.ThrowsAsync<HardwareAcceleratorNotFoundException>(async () =>
{
await Conversion.Convert(Resources.MkvWithAudio, output).UseHardwareAcceleration(new HardwareAccelerator(hardwareAccelerator), 0).Start();
});
}
[Fact]
public async Task OpenNotExistingStream()
{
var ffmpegProcesses = System.Diagnostics.Process.GetProcessesByName("ffmpeg").Count();
string output = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + FileExtensions.WebM);
var cancellationToken = new CancellationTokenSource();
cancellationToken.CancelAfter(1000);
var conversion = Conversion.New().AddStream(new WebStream(new Uri(@"rtsp://192.168.1.123:554/"), "M3U8", TimeSpan.FromMinutes(5))).SetOutput(output);
await Assert.ThrowsAsync<ConversionException>(async () => await conversion.Start(cancellationToken.Token));
Assert.Equal(System.Diagnostics.Process.GetProcessesByName("ffmpeg").Count(), ffmpegProcesses);
} |
<<<<<<<
// adds CommonPart by default
=======
// CommonPart is added by default to all Content Types.
>>>>>>>
// CommonPart is added by default to all Content Types.
<<<<<<<
Content = content,
AllPlacements = listPlacements,
Tabs = grouped,
=======
PlacementSettings = contentTypeDefinition.GetPlacement(PlacementType.Editor),
AllPlacements = _placementService.GetEditorPlacement(id).OrderBy(x => x.PlacementSettings.Position, new FlatPositionComparer()).ThenBy(x => x.PlacementSettings.ShapeType).ToList(),
>>>>>>>
Content = content,
AllPlacements = listPlacements,
Tabs = grouped,
<<<<<<<
foreach (var placement in viewModel.AllPlacements) {
var placementSetting = placement.PlacementSettings;
contentTypeDefinition.Placement(PlacementType.Editor,
placementSetting.ShapeType,
placementSetting.Differentiator,
placementSetting.Zone,
placementSetting.Position);
=======
foreach (var driverPlacement in viewModel.AllPlacements) {
// Save placement changes, if there's any.
if (!allPlacements.Any(x => x.PlacementSettings.Equals(driverPlacement.PlacementSettings))) {
result = result.Where(x => !x.IsSameAs(driverPlacement.PlacementSettings)).ToList();
result.Add(driverPlacement.PlacementSettings);
}
}
foreach (var placementSetting in result)
contentTypeDefinition.Placement(
PlacementType.Editor,
placementSetting.ShapeType,
placementSetting.Differentiator,
placementSetting.Zone,
placementSetting.Position);
>>>>>>>
foreach (var placement in viewModel.AllPlacements) {
var placementSetting = placement.PlacementSettings;
contentTypeDefinition.Placement(
PlacementType.Editor,
placementSetting.ShapeType,
placementSetting.Differentiator,
placementSetting.Zone,
placementSetting.Position);
}
<<<<<<<
Services.Notifier.Success(T("\"{0}\" has been removed.", typeViewModel.DisplayName));
=======
Services.Notifier.Information(T("\"{0}\" has been removed.", typeViewModel.DisplayName));
>>>>>>>
Services.Notifier.Success(T("\"{0}\" has been removed.", typeViewModel.DisplayName));
<<<<<<<
Services.Notifier.Success(T("The \"{0}\" part has been added.", partToAdd));
=======
Services.Notifier.Information(T("The \"{0}\" part has been added.", partToAdd));
>>>>>>>
Services.Notifier.Success(T("The \"{0}\" part has been added.", partToAdd));
<<<<<<<
Services.Notifier.Success(T("\"{0}\" has been removed.", partViewModel.DisplayName));
=======
Services.Notifier.Information(T("\"{0}\" has been removed.", partViewModel.DisplayName));
>>>>>>>
Services.Notifier.Success(T("\"{0}\" has been removed.", partViewModel.DisplayName));
<<<<<<<
if (partViewModel == null) {
// id passed in might be that of a type w/ no implicit field
if (typeViewModel != null) {
partViewModel = new EditPartViewModel { Name = typeViewModel.Name };
_contentDefinitionService.AddPart(new CreatePartViewModel { Name = partViewModel.Name });
_contentDefinitionService.AddPartToType(partViewModel.Name, typeViewModel.Name);
}
else {
return HttpNotFound();
}
}
=======
>>>>>>>
<<<<<<<
if (typeViewModel != null) {
return RedirectToAction("Edit", new { id });
}
return RedirectToAction("EditPart", new { id });
=======
return typeViewModel == null ? RedirectToAction("EditPart", new { id }) : RedirectToAction("Edit", new { id });
>>>>>>>
return typeViewModel == null ? RedirectToAction("EditPart", new { id }) : RedirectToAction("Edit", new { id });
<<<<<<<
if (fieldViewModel == null) {
return HttpNotFound();
}
=======
if (fieldViewModel == null) return HttpNotFound();
>>>>>>>
if (fieldViewModel == null) return HttpNotFound();
<<<<<<<
if (field == null) {
return HttpNotFound();
}
=======
if (field == null) return HttpNotFound();
>>>>>>>
if (field == null) return HttpNotFound(); |
<<<<<<<
if (user != null) {
if (String.Equals(Services.WorkContext.CurrentSite.SuperUser, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("The Super user can't be removed. Please disable this account or specify another Super user account."));
}
else if (String.Equals(Services.WorkContext.CurrentUser.UserName, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("You can't remove your own account. Please log in with another account."));
}
else{
Services.ContentManager.Remove(user.ContentItem);
Services.Notifier.Success(T("User {0} deleted", user.UserName));
}
=======
if (user == null)
return HttpNotFound();
if (string.Equals(Services.WorkContext.CurrentSite.SuperUser, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("The Super user can't be removed. Please disable this account or specify another Super user account."));
}
else if (string.Equals(Services.WorkContext.CurrentUser.UserName, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("You can't remove your own account. Please log in with another account."));
}
else {
Services.ContentManager.Remove(user.ContentItem);
Services.Notifier.Information(T("User {0} deleted", user.UserName));
>>>>>>>
if (user == null)
return HttpNotFound();
if (string.Equals(Services.WorkContext.CurrentSite.SuperUser, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("The Super user can't be removed. Please disable this account or specify another Super user account."));
}
else if (string.Equals(Services.WorkContext.CurrentUser.UserName, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("You can't remove your own account. Please log in with another account."));
}
else {
Services.ContentManager.Remove(user.ContentItem);
Services.Notifier.Success(T("User {0} deleted", user.UserName));
<<<<<<<
if ( user != null ) {
user.As<UserPart>().RegistrationStatus = UserStatus.Approved;
Services.Notifier.Success(T("User {0} approved", user.UserName));
_userEventHandlers.Approved(user);
}
=======
if (user == null)
return HttpNotFound();
user.As<UserPart>().RegistrationStatus = UserStatus.Approved;
Services.Notifier.Information(T("User {0} approved", user.UserName));
_userEventHandlers.Approved(user);
>>>>>>>
if (user == null)
return HttpNotFound();
user.As<UserPart>().RegistrationStatus = UserStatus.Approved;
Services.Notifier.Success(T("User {0} approved", user.UserName));
_userEventHandlers.Approved(user);
<<<<<<<
if (user != null) {
if (String.Equals(Services.WorkContext.CurrentUser.UserName, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("You can't disable your own account. Please log in with another account"));
}
else {
user.As<UserPart>().RegistrationStatus = UserStatus.Pending;
Services.Notifier.Success(T("User {0} disabled", user.UserName));
}
=======
if (user == null)
return HttpNotFound();
if (string.Equals(Services.WorkContext.CurrentUser.UserName, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("You can't disable your own account. Please log in with another account"));
}
else {
user.As<UserPart>().RegistrationStatus = UserStatus.Pending;
Services.Notifier.Information(T("User {0} disabled", user.UserName));
>>>>>>>
if (user == null)
return HttpNotFound();
if (string.Equals(Services.WorkContext.CurrentUser.UserName, user.UserName, StringComparison.Ordinal)) {
Services.Notifier.Error(T("You can't disable your own account. Please log in with another account"));
}
else {
user.As<UserPart>().RegistrationStatus = UserStatus.Pending;
Services.Notifier.Success(T("User {0} disabled", user.UserName)); |
<<<<<<<
public TouchNotification(TouchNotificationKind kind, Point position, Size clientArea, int id, bool primary, Size contactArea)
=======
public TouchNotification(TouchNotificationKind kind, Point position, Size clientArea, int id, Size contactArea, long touchDeviceID)
>>>>>>>
public TouchNotification(TouchNotificationKind kind, Point position, Size clientArea, int id, bool primary, Size contactArea, long touchDeviceID)
<<<<<<<
public TouchDownNotification(Point position, Size clientArea, int id, bool primary, Size contactArea)
: base(TouchNotificationKind.TouchDown, position, clientArea, id, primary, contactArea)
=======
public TouchDownNotification(Point position, Size clientArea, int id, Size contactArea, long touchDeviceID)
: base(TouchNotificationKind.TouchDown, position, clientArea, id, contactArea, touchDeviceID)
>>>>>>>
public TouchDownNotification(Point position, Size clientArea, int id, bool primary, Size contactArea, long touchDeviceID)
: base(TouchNotificationKind.TouchDown, position, clientArea, id, primary, contactArea, touchDeviceID)
<<<<<<<
public TouchMoveNotification(Point position, Size clientArea, int id, bool primary, Size contactArea)
: base(TouchNotificationKind.TouchMove, position, clientArea, id, primary, contactArea)
=======
public TouchMoveNotification(Point position, Size clientArea, int id, Size contactArea, long touchDeviceID)
: base(TouchNotificationKind.TouchMove, position, clientArea, id, contactArea, touchDeviceID)
>>>>>>>
public TouchMoveNotification(Point position, Size clientArea, int id, bool primary, Size contactArea, long touchDeviceID)
: base(TouchNotificationKind.TouchMove, position, clientArea, id, primary, contactArea, touchDeviceID)
<<<<<<<
public TouchUpNotification(Point position, Size clientArea, int id, bool primary, Size contactArea)
: base(TouchNotificationKind.TouchUp, position, clientArea, id, primary, contactArea)
=======
public TouchUpNotification(Point position, Size clientArea, int id, Size contactArea, long touchDeviceID)
: base(TouchNotificationKind.TouchUp, position, clientArea, id, contactArea, touchDeviceID)
>>>>>>>
public TouchUpNotification(Point position, Size clientArea, int id, bool primary, Size contactArea, long touchDeviceID)
: base(TouchNotificationKind.TouchUp, position, clientArea, id, primary, contactArea, touchDeviceID) |
<<<<<<<
//private readonly Func<Tuple<IntPtr, int>> FGetUnmanagedArrayFunc;
private readonly int* FPLength;
private readonly Func<bool> FValidateFunc;
=======
protected readonly Func<Tuple<IntPtr, int>> FGetUnmanagedArrayFunc;
protected readonly Func<bool> FValidateFunc;
>>>>>>>
//private readonly Func<Tuple<IntPtr, int>> FGetUnmanagedArrayFunc;
protected readonly int* FPLength;
protected readonly Func<bool> FValidateFunc; |
<<<<<<<
using System.Security.Cryptography.X509Certificates;
=======
using System.Globalization;
>>>>>>>
using System.Security.Cryptography.X509Certificates;
using System.Globalization; |
<<<<<<<
using Owin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using Autofac.Integration.WebApi;
using Microsoft.Owin;
using Jackett;
using Microsoft.Owin.StaticFiles;
using Microsoft.Owin.FileSystems;
using Autofac;
using Jackett.Services;
using System.Web.Http.Tracing;
using Jackett.Utils;
using Microsoft.AspNet.Identity;
[assembly: OwinStartup(typeof(Startup))]
namespace Jackett
{
public class Startup
{
public static bool TracingEnabled
{
get;
set;
}
public static bool LogRequests
{
get;
set;
}
public static string ClientOverride
{
get;
set;
}
public static string ProxyConnection
{
get;
set;
}
public static bool? DoSSLFix
{
get;
set;
}
public static bool? IgnoreSslErrors
{
get;
set;
}
public void Configuration(IAppBuilder appBuilder)
{
// Configure Web API for self-host.
var config = new HttpConfiguration();
appBuilder.Use<WebApiRootRedirectMiddleware>();
// Setup tracing if enabled
if (TracingEnabled)
{
config.EnableSystemDiagnosticsTracing();
config.Services.Replace(typeof(ITraceWriter), new WebAPIToNLogTracer());
}
// Add request logging if enabled
if (LogRequests)
{
config.MessageHandlers.Add(new WebAPIRequestLogger());
}
config.DependencyResolver = new AutofacWebApiDependencyResolver(Engine.GetContainer());
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "Admin",
routeTemplate: "admin/{action}",
defaults: new { controller = "Admin" }
);
config.Routes.MapHttpRoute(
name: "apiDefault",
routeTemplate: "api/{indexerID}",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "api",
routeTemplate: "api/{indexerID}/api",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "torznabDefault",
routeTemplate: "torznab/{indexerID}",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "torznab",
routeTemplate: "torznab/{indexerID}/api",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "potatoDefault",
routeTemplate: "potato/{indexerID}",
defaults: new { controller = "Potato", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "potato",
routeTemplate: "potato/{indexerID}/api",
defaults: new { controller = "Potato", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "download",
routeTemplate: "dl/{indexerID}/{apiKey}",
defaults: new { controller = "Download", action = "Download" }
);
config.Routes.MapHttpRoute(
name: "blackhole",
routeTemplate: "bh/{indexerID}/{apikey}/{path}",
defaults: new { controller = "Blackhole", action = "Blackhole" }
);
appBuilder.UseWebApi(config);
appBuilder.UseFileServer(new FileServerOptions
{
RequestPath = new PathString(string.Empty),
FileSystem = new PhysicalFileSystem(Engine.ConfigService.GetContentFolder()),
EnableDirectoryBrowsing = false,
});
}
}
}
=======
using Owin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using Autofac.Integration.WebApi;
using Microsoft.Owin;
using Jackett;
using Microsoft.Owin.StaticFiles;
using Microsoft.Owin.FileSystems;
using Autofac;
using Jackett.Services;
using System.Web.Http.Tracing;
using Jackett.Utils;
using Microsoft.AspNet.Identity;
[assembly: OwinStartup(typeof(Startup))]
namespace Jackett
{
public class Startup
{
public static bool TracingEnabled
{
get;
set;
}
public static bool LogRequests
{
get;
set;
}
public static string ClientOverride
{
get;
set;
}
public static bool? DoSSLFix
{
get;
set;
}
public static bool? IgnoreSslErrors
{
get;
set;
}
public void Configuration(IAppBuilder appBuilder)
{
// Configure Web API for self-host.
var config = new HttpConfiguration();
appBuilder.Use<WebApiRootRedirectMiddleware>();
// Setup tracing if enabled
if (TracingEnabled)
{
config.EnableSystemDiagnosticsTracing();
config.Services.Replace(typeof(ITraceWriter), new WebAPIToNLogTracer());
}
// Add request logging if enabled
if (LogRequests)
{
config.MessageHandlers.Add(new WebAPIRequestLogger());
}
config.DependencyResolver = new AutofacWebApiDependencyResolver(Engine.GetContainer());
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "Admin",
routeTemplate: "admin/{action}",
defaults: new { controller = "Admin" }
);
config.Routes.MapHttpRoute(
name: "apiDefault",
routeTemplate: "api/{indexerID}",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "api",
routeTemplate: "api/{indexerID}/api",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "torznabDefault",
routeTemplate: "torznab/{indexerID}",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "torznab",
routeTemplate: "torznab/{indexerID}/api",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "potatoDefault",
routeTemplate: "potato/{indexerID}",
defaults: new { controller = "Potato", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "potato",
routeTemplate: "potato/{indexerID}/api",
defaults: new { controller = "Potato", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "download",
routeTemplate: "dl/{indexerID}/{apiKey}",
defaults: new { controller = "Download", action = "Download" }
);
config.Routes.MapHttpRoute(
name: "blackhole",
routeTemplate: "bh/{indexerID}/{apikey}",
defaults: new { controller = "Blackhole", action = "Blackhole" }
);
appBuilder.UseWebApi(config);
appBuilder.UseFileServer(new FileServerOptions
{
RequestPath = new PathString(string.Empty),
FileSystem = new PhysicalFileSystem(Engine.ConfigService.GetContentFolder()),
EnableDirectoryBrowsing = false,
});
}
}
}
>>>>>>>
using Owin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using Autofac.Integration.WebApi;
using Microsoft.Owin;
using Jackett;
using Microsoft.Owin.StaticFiles;
using Microsoft.Owin.FileSystems;
using Autofac;
using Jackett.Services;
using System.Web.Http.Tracing;
using Jackett.Utils;
using Microsoft.AspNet.Identity;
[assembly: OwinStartup(typeof(Startup))]
namespace Jackett
{
public class Startup
{
public static bool TracingEnabled
{
get;
set;
}
public static bool LogRequests
{
get;
set;
}
public static string ClientOverride
{
get;
set;
}
public static bool? DoSSLFix
{
get;
set;
}
public static bool? IgnoreSslErrors
{
get;
set;
}
public void Configuration(IAppBuilder appBuilder)
{
// Configure Web API for self-host.
var config = new HttpConfiguration();
appBuilder.Use<WebApiRootRedirectMiddleware>();
// Setup tracing if enabled
if (TracingEnabled)
{
config.EnableSystemDiagnosticsTracing();
config.Services.Replace(typeof(ITraceWriter), new WebAPIToNLogTracer());
}
// Add request logging if enabled
if (LogRequests)
{
config.MessageHandlers.Add(new WebAPIRequestLogger());
}
config.DependencyResolver = new AutofacWebApiDependencyResolver(Engine.GetContainer());
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "Admin",
routeTemplate: "admin/{action}",
defaults: new { controller = "Admin" }
);
config.Routes.MapHttpRoute(
name: "apiDefault",
routeTemplate: "api/{indexerID}",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "api",
routeTemplate: "api/{indexerID}/api",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "torznabDefault",
routeTemplate: "torznab/{indexerID}",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "torznab",
routeTemplate: "torznab/{indexerID}/api",
defaults: new { controller = "Torznab", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "potatoDefault",
routeTemplate: "potato/{indexerID}",
defaults: new { controller = "Potato", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "potato",
routeTemplate: "potato/{indexerID}/api",
defaults: new { controller = "Potato", action = "Call" }
);
config.Routes.MapHttpRoute(
name: "download",
routeTemplate: "dl/{indexerID}/{apiKey}",
defaults: new { controller = "Download", action = "Download" }
);
config.Routes.MapHttpRoute(
name: "blackhole",
routeTemplate: "bh/{indexerID}/{apikey}",
defaults: new { controller = "Blackhole", action = "Blackhole" }
);
appBuilder.UseWebApi(config);
appBuilder.UseFileServer(new FileServerOptions
{
RequestPath = new PathString(string.Empty),
FileSystem = new PhysicalFileSystem(Engine.ConfigService.GetContentFolder()),
EnableDirectoryBrowsing = false,
});
}
}
} |
<<<<<<<
[assembly: EdmRelationshipAttribute("Models.NorthwindIB.EDMX", "FK_UserRole_Role", "Role", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(Models.NorthwindIB.EDMX.Role), "UserRole", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Models.NorthwindIB.EDMX.UserRole), true)]
=======
[assembly: EdmRelationshipAttribute("Models.NorthwindIB.EDMX", "FK_Order_Customer", "Customer", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(Models.NorthwindIB.EDMX.Customer), "Order", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Models.NorthwindIB.EDMX.Order), true)]
>>>>>>>
[assembly: EdmRelationshipAttribute("Models.NorthwindIB.EDMX", "FK_UserRole_Role", "Role", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(Models.NorthwindIB.EDMX.Role), "UserRole", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Models.NorthwindIB.EDMX.UserRole), true)]
<<<<<<<
private ObjectSet<BonusOrderDetailItem> _BonusOrderDetailItems;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<Role> Roles
{
get
{
if ((_Roles == null))
{
_Roles = base.CreateObjectSet<Role>("Roles");
}
return _Roles;
}
}
private ObjectSet<Role> _Roles;
=======
private ObjectSet<Customer> _Customers;
>>>>>>>
private ObjectSet<Customer> _Customers;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<Role> Roles
{
get
{
if ((_Roles == null))
{
_Roles = base.CreateObjectSet<Role>("Roles");
}
return _Roles;
}
}
private ObjectSet<Role> _Roles; |
<<<<<<<
private bool _restoreSuccessful;
=======
private double? _reportedProgress;
>>>>>>>
private bool _restoreSuccessful;
private double? _reportedProgress;
<<<<<<<
_executionHost.RestoreMessage += AddResult;
=======
_executionHost.ProgressChanged += p => ReportedProgress = p.Progress;
>>>>>>>
_executionHost.RestoreMessage += AddResult;
_executionHost.ProgressChanged += p => ReportedProgress = p.Progress; |
<<<<<<<
public event Action<RestoreResultObject>? RestoreMessage;
=======
public event Action<ProgressResultObject>? ProgressChanged;
>>>>>>>
public event Action<RestoreResultObject>? RestoreMessage;
public event Action<ProgressResultObject>? ProgressChanged; |
<<<<<<<
public static Gdk.Point Center (this Gdk.Rectangle rect)
{
return new Gdk.Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
}
=======
public static ColorBgra ToBgraColor (this Gdk.Color color)
{
return ColorBgra.FromBgr ((byte)(color.Blue * 255 / ushort.MaxValue), (byte)(color.Green * 255 / ushort.MaxValue), (byte)(color.Red * 255 / ushort.MaxValue));
}
>>>>>>>
public static Gdk.Point Center (this Gdk.Rectangle rect)
{
return new Gdk.Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
}
public static ColorBgra ToBgraColor (this Gdk.Color color)
{
return ColorBgra.FromBgr ((byte)(color.Blue * 255 / ushort.MaxValue), (byte)(color.Green * 255 / ushort.MaxValue), (byte)(color.Red * 255 / ushort.MaxValue));
} |
<<<<<<<
var oldBottomSurface = doc.Layers[0].Surface.Clone ();
=======
CompoundHistoryItem hist = new CompoundHistoryItem ("Menu.Image.Flatten.png", Catalog.GetString ("Flatten"));
SimpleHistoryItem h1 = new SimpleHistoryItem (string.Empty, string.Empty, doc.UserLayers[0].Surface.Clone (), 0);
>>>>>>>
var oldBottomSurface = doc.UserLayers[0].Surface.Clone ();
<<<<<<<
for (int i = doc.Layers.Count - 1; i >= 1; i--)
hist.Push (new DeleteLayerHistoryItem (string.Empty, string.Empty, doc.Layers[i], i));
=======
for (int i = 1; i < doc.UserLayers.Count; i++)
hist.Push (new DeleteLayerHistoryItem (string.Empty, string.Empty, doc.UserLayers[i], i));
>>>>>>>
for (int i = doc.UserLayers.Count - 1; i >= 1; i--)
hist.Push (new DeleteLayerHistoryItem (string.Empty, string.Empty, doc.UserLayers[i], i));
<<<<<<<
foreach (var layer in doc.Layers)
layer.Crop (rect, doc.Selection.SelectionPath);
hist.FinishSnapshotOfImage ();
=======
foreach (var layer in doc.UserLayers)
layer.Crop (rect, doc.SelectionPath);
>>>>>>>
foreach (var layer in doc.UserLayers)
layer.Crop (rect, doc.Selection.SelectionPath);
hist.FinishSnapshotOfImage (); |
<<<<<<<
PintaCore.Actions.Effects.MotionBlur.Activated += HandleEffectMotionBlurActivated;
PintaCore.Actions.Effects.Glow.Activated += HandleEffectGlowActivated;
PintaCore.Actions.Effects.RedEyeRemove.Activated += HandleEffectsRedEyeRemoveActivated;
PintaCore.Actions.Effects.Sharpen.Activated += HandleEffectsSharpenActivated;
PintaCore.Actions.Effects.SoftenPortrait.Activated += HandleEffectsSoftenPortraitActivated;
PintaCore.Actions.Effects.Clouds.Activated += HandleEffectCloudsActivated;
PintaCore.Actions.Effects.JuliaFractal.Activated += HandleEffectJuliaFractalActivated;
PintaCore.Actions.Effects.MandelbrotFractal.Activated += HandleEffectMandelbrotFractalActivated;
PintaCore.Actions.Effects.EdgeDetect.Activated += HandleEffectsEdgeDetectActivated;
=======
PintaCore.Actions.Effects.MotionBlur.Activated += HandleEffectActivated <MotionBlurEffect>;
PintaCore.Actions.Effects.Glow.Activated += HandleEffectActivated <GlowEffect>;
PintaCore.Actions.Effects.RedEyeRemove.Activated += HandleEffectActivated <RedEyeRemoveEffect>;
PintaCore.Actions.Effects.Sharpen.Activated += HandleEffectActivated <SharpenEffect>;
PintaCore.Actions.Effects.SoftenPortrait.Activated += HandleEffectActivated <SoftenPortraitEffect>;
PintaCore.Actions.Effects.EdgeDetect.Activated += HandleEffectActivated <EdgeDetectEffect>;
>>>>>>>
PintaCore.Actions.Effects.MotionBlur.Activated += HandleEffectActivated <MotionBlurEffect>;
PintaCore.Actions.Effects.Glow.Activated += HandleEffectActivated <GlowEffect>;
PintaCore.Actions.Effects.RedEyeRemove.Activated += HandleEffectActivated <RedEyeRemoveEffect>;
PintaCore.Actions.Effects.Sharpen.Activated += HandleEffectActivated <SharpenEffect>;
PintaCore.Actions.Effects.SoftenPortrait.Activated += HandleEffectActivated <SoftenPortraitEffect>;
PintaCore.Actions.Effects.Clouds.Activated += HandleEffectCloudsActivated;
PintaCore.Actions.Effects.JuliaFractal.Activated += HandleEffectJuliaFractalActivated;
PintaCore.Actions.Effects.MandelbrotFractal.Activated += HandleEffectMandelbrotFractalActivated;
PintaCore.Actions.Effects.EdgeDetect.Activated += HandleEffectActivated <EdgeDetectEffect>;
<<<<<<<
private void HandleEffectMotionBlurActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new MotionBlurEffect ());
}
private void HandleEffectGlowActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new GlowEffect ());
}
private void HandleEffectsRedEyeRemoveActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new RedEyeRemoveEffect ());
}
private void HandleEffectsSharpenActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new SharpenEffect ());
}
private void HandleEffectsSoftenPortraitActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new SoftenPortraitEffect ());
}
private void HandleEffectCloudsActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new CloudsEffect ());
}
private void HandleEffectMandelbrotFractalActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new MandelbrotFractalEffect ());
}
private void HandleEffectJuliaFractalActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new JuliaFractalEffect ());
}
private void HandleEffectsEdgeDetectActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new EdgeDetectEffect ());
}
=======
>>>>>>>
private void HandleEffectCloudsActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new CloudsEffect ());
}
private void HandleEffectMandelbrotFractalActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new MandelbrotFractalEffect ());
}
private void HandleEffectJuliaFractalActivated (object sender, EventArgs e)
{
PintaCore.Actions.Adjustments.PerformEffect (new JuliaFractalEffect ());
} |
<<<<<<<
using (ImageSurface i = new ImageSurface (Format.ARGB32, iconBBox.Width, iconBBox.Height)) {
using (Context g = new Context (i)) {
// Don't show shape if shapeWidth less than 3,
if (shapeWidth > 3) {
int diam = Math.Max (1, shapeWidth - 2);
Cairo.Rectangle shapeRect = new Cairo.Rectangle (shapeX - halfOfShapeWidth,
shapeY - halfOfShapeWidth,
diam,
diam);
Cairo.Color outerColor = new Cairo.Color (255, 255, 255, 0.5);
Cairo.Color innerColor = new Cairo.Color (0, 0, 0);
switch (shape) {
case CursorShape.Ellipse:
g.DrawEllipse (shapeRect, outerColor, 1);
shapeRect = shapeRect.Inflate (-1, -1);
g.DrawEllipse (shapeRect, innerColor, 1);
break;
case CursorShape.Rectangle:
g.DrawRectangle (shapeRect, outerColor, 1);
shapeRect = shapeRect.Inflate (-1, -1);
g.DrawRectangle (shapeRect, innerColor, 1);
break;
}
=======
ImageSurface i = new ImageSurface(Format.ARGB32, iconBBox.Width, iconBBox.Height);
using (Context g = new Context(i))
{
// Don't show shape if shapeWidth less than 3,
if (shapeWidth > 3)
{
int diam = Math.Max (1, shapeWidth - 2);
Cairo.Rectangle shapeRect = new Cairo.Rectangle(shapeX - halfOfShapeWidth,
shapeY - halfOfShapeWidth,
diam,
diam);
Cairo.Color outerColor = new Cairo.Color (255, 255, 255, 0.75);
Cairo.Color innerColor = new Cairo.Color (0, 0, 0);
switch (shape)
{
case CursorShape.Ellipse:
g.DrawEllipse(shapeRect, outerColor, 2);
shapeRect = shapeRect.Inflate (-1, -1);
g.DrawEllipse(shapeRect, innerColor, 1);
break;
case CursorShape.Rectangle:
g.DrawRectangle(shapeRect, outerColor, 1);
shapeRect = shapeRect.Inflate (-1, -1);
g.DrawRectangle(shapeRect, innerColor, 1);
break;
>>>>>>>
using (ImageSurface i = new ImageSurface (Format.ARGB32, iconBBox.Width, iconBBox.Height)) {
using (Context g = new Context (i)) {
// Don't show shape if shapeWidth less than 3,
if (shapeWidth > 3) {
int diam = Math.Max (1, shapeWidth - 2);
Cairo.Rectangle shapeRect = new Cairo.Rectangle (shapeX - halfOfShapeWidth,
shapeY - halfOfShapeWidth,
diam,
diam);
Cairo.Color outerColor = new Cairo.Color (255, 255, 255, 0.75);
Cairo.Color innerColor = new Cairo.Color (0, 0, 0);
switch (shape) {
case CursorShape.Ellipse:
g.DrawEllipse (shapeRect, outerColor, 2);
shapeRect = shapeRect.Inflate (-1, -1);
g.DrawEllipse (shapeRect, innerColor, 1);
break;
case CursorShape.Rectangle:
g.DrawRectangle (shapeRect, outerColor, 1);
shapeRect = shapeRect.Inflate (-1, -1);
g.DrawRectangle (shapeRect, innerColor, 1);
break;
} |
<<<<<<<
private PointD center_position;
public PointD ImageSize { get; set; }
=======
public Point ImageSize { get; set; }
>>>>>>>
private PointD center_position;
public Point ImageSize { get; set; }
<<<<<<<
ImageSize = new PointD (800, 600);
center_position = new PointD (400, 300);
=======
ImageSize = new Point (800, 600);
>>>>>>>
center_position = new PointD (400, 300);
ImageSize = new Point (800, 600); |
<<<<<<<
Document doc = PintaCore.Workspace.ActiveDocument;
doc.Selection.SelectionClipper.Clear ();
doc.Selection.SelectionPolygons = newSelectionPolygons;
using (var g = new Cairo.Context (doc.CurrentLayer.Surface)) {
doc.Selection.SelectionPath = g.CreatePolygonPath (DocumentSelection.ConvertToPolygonSet (newSelectionPolygons));
=======
using (Cairo.Context g = new Cairo.Context (doc.CurrentUserLayer.Surface)) {
Path old = doc.SelectionPath;
>>>>>>>
Document doc = PintaCore.Workspace.ActiveDocument;
doc.Selection.SelectionClipper.Clear ();
doc.Selection.SelectionPolygons = newSelectionPolygons;
using (var g = new Cairo.Context (doc.CurrentUserLayer.Surface)) {
doc.Selection.SelectionPath = g.CreatePolygonPath (DocumentSelection.ConvertToPolygonSet (newSelectionPolygons)); |
<<<<<<<
public Gtk.Action Emboss { get; private set; }
=======
public Gtk.Action Relief { get; private set; }
>>>>>>>
public Gtk.Action Relief { get; private set; }
public Gtk.Action Emboss { get; private set; }
<<<<<<<
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Distort.FrostedGlass.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.FrostedGlass.png")));
fact.Add ("Menu.Effects.Distort.Pixelate.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.Pixelate.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.Add ("Menu.Effects.Stylize.Emboss.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Emboss.png")));
=======
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.Add ("Menu.Effects.Stylize.Relief.png",
new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Relief.png")));
>>>>>>>
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Distort.FrostedGlass.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.FrostedGlass.png")));
fact.Add ("Menu.Effects.Distort.Pixelate.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.Pixelate.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.Add ("Menu.Effects.Stylize.Relief.png",
fact.Add ("Menu.Effects.Stylize.Emboss.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Emboss.png")));
new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Relief.png")));
<<<<<<<
Emboss = new Gtk.Action ("Emboss", Mono.Unix.Catalog.GetString ("Emboss..."), null, "Menu.Effects.Stylize.Emboss.png");
=======
Relief = new Gtk.Action ("Relief", Mono.Unix.Catalog.GetString ("Relief..."), null, "Menu.Effects.Stylize.Relief.png");
>>>>>>>
Relief = new Gtk.Action ("Relief", Mono.Unix.Catalog.GetString ("Relief..."), null, "Menu.Effects.Stylize.Relief.png");
Emboss = new Gtk.Action ("Emboss", Mono.Unix.Catalog.GetString ("Emboss..."), null, "Menu.Effects.Stylize.Emboss.png");
<<<<<<<
stylize_sub_menu.Append (Emboss.CreateMenuItem ());
=======
stylize_sub_menu.Append (Relief.CreateMenuItem ());
>>>>>>>
stylize_sub_menu.Append (Relief.CreateMenuItem ());
stylize_sub_menu.Append (Emboss.CreateMenuItem ()); |
<<<<<<<
public static Gdk.Point Center (this Gdk.Rectangle rect)
{
return new Gdk.Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
}
=======
public static ColorBgra ToBgraColor (this Gdk.Color color)
{
return ColorBgra.FromBgr ((byte)(color.Blue * 255 / ushort.MaxValue), (byte)(color.Green * 255 / ushort.MaxValue), (byte)(color.Red * 255 / ushort.MaxValue));
}
>>>>>>>
public static Gdk.Point Center (this Gdk.Rectangle rect)
{
return new Gdk.Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
}
public static ColorBgra ToBgraColor (this Gdk.Color color)
{
return ColorBgra.FromBgr ((byte)(color.Blue * 255 / ushort.MaxValue), (byte)(color.Green * 255 / ushort.MaxValue), (byte)(color.Red * 255 / ushort.MaxValue));
} |
<<<<<<<
Context g = new Context (CurrentLayer.Surface);
Selection.Clip (g);
=======
Context g = new Context (CurrentUserLayer.Surface);
g.AppendPath (SelectionPath);
g.FillRule = Cairo.FillRule.EvenOdd;
g.Clip ();
>>>>>>>
Context g = new Context (CurrentUserLayer.Surface);
Selection.Clip (g);
<<<<<<<
Context g = new Context (CurrentLayer.Surface);
Selection.Clip (g);
=======
Context g = new Context (CurrentUserLayer.Surface);
g.AppendPath (SelectionPath);
g.FillRule = Cairo.FillRule.EvenOdd;
g.Clip ();
>>>>>>>
Context g = new Context (CurrentUserLayer.Surface);
Selection.Clip (g);
<<<<<<<
public Layer CreateLayer (int width, int height)
{
return CreateLayer (string.Format ("{0} {1}", Catalog.GetString ("Layer"), layer_name_int++), width, height);
}
public Layer CreateLayer (string name)
=======
public UserLayer CreateLayer (string name)
>>>>>>>
public UserLayer CreateLayer (int width, int height)
{
return CreateLayer (string.Format ("{0} {1}", Catalog.GetString ("Layer"), layer_name_int++), width, height);
}
public UserLayer CreateLayer (string name)
<<<<<<<
using (Cairo.Context g = new Cairo.Context (CurrentLayer.Surface)) {
layer.Draw(g);
=======
using (Cairo.Context g = new Cairo.Context (CurrentUserLayer.Surface)) {
g.Save ();
g.SetSourceSurface (layer.Surface, (int)layer.Offset.X, (int)layer.Offset.Y);
g.PaintWithAlpha (layer.Opacity);
g.Restore ();
>>>>>>>
using (Cairo.Context g = new Cairo.Context (CurrentUserLayer.Surface)) {
layer.Draw(g);
<<<<<<<
if (layer == CurrentLayer) {
if (!ToolLayer.Hidden)
paint.Add (ToolLayer);
=======
if (layer == CurrentUserLayer) {
if (!tool_layer.Hidden)
paint.Add (tool_layer);
>>>>>>>
if (layer == CurrentUserLayer) {
if (!ToolLayer.Hidden)
paint.Add (ToolLayer);
<<<<<<<
SetCurrentLayer (Layers.IndexOf (layer));
}
=======
current_layer = UserLayers.IndexOf (layer);
>>>>>>>
SetCurrentUserLayer (UserLayers.IndexOf (layer));
} |
<<<<<<<
public Gtk.Action SurfaceBlur { get; private set; }
public Gtk.Action ZoomBlur { get; private set; }
public Gtk.Action Unfocus { get; private set; }
=======
public Gtk.Action RadialBlur { get; private set; }
public Gtk.Action MotionBlur { get; private set; }
>>>>>>>
public Gtk.Action SurfaceBlur { get; private set; }
public Gtk.Action ZoomBlur { get; private set; }
public Gtk.Action Unfocus { get; private set; }
public Gtk.Action RadialBlur { get; private set; }
public Gtk.Action MotionBlur { get; private set; }
<<<<<<<
SurfaceBlur = new Gtk.Action("SurfaceBlur", Mono.Unix.Catalog.GetString("Surface Blur..."), null, "Menu.Effects.Blurs.SurfaceBlur.png");
ZoomBlur = new Gtk.Action("ZoomBlur", Mono.Unix.Catalog.GetString("Zoom Blur..."), null, "Menu.Effects.Blurs.ZoomBlur.png");
Unfocus = new Gtk.Action("Unfocus", Mono.Unix.Catalog.GetString("Unfocus..."), null, "Menu.Effects.Blurs.Unfocus.png");
Glow = new Gtk.Action ("Glow", Mono.Unix.Catalog.GetString ("Glow..."), null, "Menu.Effects.Photo.Glow.png");
=======
RadialBlur = new Gtk.Action ("RadialBlur", Mono.Unix.Catalog.GetString ("Radial Blur..."), null, "Menu.Effects.Blurs.RadialBlur.png");
MotionBlur = new Gtk.Action ("MotionBlur", Mono.Unix.Catalog.GetString ("Motion Blur..."), null, "Menu.Effects.Blurs.MotionBlur.png");
Glow = new Gtk.Action ("Glow", Mono.Unix.Catalog.GetString ("Glow..."), null, "Menu.Effects.Photo.Glow.png");
>>>>>>>
SurfaceBlur = new Gtk.Action("SurfaceBlur", Mono.Unix.Catalog.GetString("Surface Blur..."), null, "Menu.Effects.Blurs.SurfaceBlur.png");
ZoomBlur = new Gtk.Action("ZoomBlur", Mono.Unix.Catalog.GetString("Zoom Blur..."), null, "Menu.Effects.Blurs.ZoomBlur.png");
Unfocus = new Gtk.Action("Unfocus", Mono.Unix.Catalog.GetString("Unfocus..."), null, "Menu.Effects.Blurs.Unfocus.png");
Glow = new Gtk.Action ("Glow", Mono.Unix.Catalog.GetString ("Glow..."), null, "Menu.Effects.Photo.Glow.png");
RadialBlur = new Gtk.Action ("RadialBlur", Mono.Unix.Catalog.GetString ("Radial Blur..."), null, "Menu.Effects.Blurs.RadialBlur.png");
MotionBlur = new Gtk.Action ("MotionBlur", Mono.Unix.Catalog.GetString ("Motion Blur..."), null, "Menu.Effects.Blurs.MotionBlur.png");
Glow = new Gtk.Action ("Glow", Mono.Unix.Catalog.GetString ("Glow..."), null, "Menu.Effects.Photo.Glow.png");
<<<<<<<
blur_sub_menu.Append(SurfaceBlur.CreateMenuItem());
blur_sub_menu.Append(Unfocus.CreateMenuItem());
blur_sub_menu.Append(ZoomBlur.CreateMenuItem());
=======
blur_sub_menu.Append (RadialBlur.CreateMenuItem ());
blur_sub_menu.Append (MotionBlur.CreateMenuItem ());
>>>>>>>
blur_sub_menu.Append(SurfaceBlur.CreateMenuItem());
blur_sub_menu.Append(Unfocus.CreateMenuItem());
blur_sub_menu.Append(ZoomBlur.CreateMenuItem());
blur_sub_menu.Append (RadialBlur.CreateMenuItem ());
blur_sub_menu.Append (MotionBlur.CreateMenuItem ()); |
<<<<<<<
paste_action.Push (new PasteHistoryItem (image, old_path, old_show_selection));
doc.History.PushNewItem (paste_action);
=======
doc.History.PushNewItem (new PasteHistoryItem (image, old_selection, old_show_selection));
>>>>>>>
paste_action.Push (new PasteHistoryItem (image, old_selection, old_show_selection));
doc.History.PushNewItem (paste_action); |
<<<<<<<
g.SetSourceColor (outline_color);
g.Fill ();
=======
g.Color = outline_color;
g.FillPreserve();
g.Color = outline_color;
g.Stroke();
>>>>>>>
g.SetSourceColor (outline_color);
g.FillPreserve();
g.SetSourceColor (outline_color);
g.Stroke();
<<<<<<<
g.SetSourceColor (outline_color);
g.Fill ();
=======
g.Color = outline_color;
g.FillPreserve();
g.Color = outline_color;
g.Stroke();
>>>>>>>
g.SetSourceColor (outline_color);
g.FillPreserve();
g.SetSourceColor (outline_color);
g.Stroke(); |
<<<<<<<
DeleteLayerHistoryItem h1 = new DeleteLayerHistoryItem (string.Empty, string.Empty, doc.CurrentLayer, doc.CurrentLayerIndex);
=======
DeleteLayerHistoryItem h1 = new DeleteLayerHistoryItem (string.Empty, string.Empty, doc.CurrentUserLayer, doc.CurrentUserLayerIndex);
SimpleHistoryItem h2 = new SimpleHistoryItem (string.Empty, string.Empty, doc.UserLayers[doc.CurrentUserLayerIndex - 1].Surface.Clone (), doc.CurrentUserLayerIndex - 1);
hist.Push (h1);
hist.Push (h2);
>>>>>>>
DeleteLayerHistoryItem h1 = new DeleteLayerHistoryItem (string.Empty, string.Empty, doc.CurrentUserLayer, doc.CurrentUserLayerIndex); |
<<<<<<<
public Gtk.Action AddNoise { get; private set; }
public Gtk.Action Median { get; private set; }
public Gtk.Action ReduceNoise { get; private set; }
public Gtk.Action Outline { get; private set; }
=======
public Gtk.Action Relief { get; private set; }
public Gtk.Action Emboss { get; private set; }
>>>>>>>
public Gtk.Action AddNoise { get; private set; }
public Gtk.Action Median { get; private set; }
public Gtk.Action ReduceNoise { get; private set; }
public Gtk.Action Outline { get; private set; }
public Gtk.Action Relief { get; private set; }
public Gtk.Action Emboss { get; private set; }
<<<<<<<
fact.Add ("Menu.Effects.Noise.AddNoise.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Noise.AddNoise.png")));
fact.Add ("Menu.Effects.Noise.Median.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Noise.Median.png")));
fact.Add ("Menu.Effects.Noise.ReduceNoise.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Noise.ReduceNoise.png")));
fact.Add ("Menu.Effects.Stylize.Outline.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Outline.png")));
=======
fact.Add ("Menu.Effects.Stylize.Relief.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Relief.png")));
fact.Add ("Menu.Effects.Stylize.Emboss.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Emboss.png")));
>>>>>>>
fact.Add ("Menu.Effects.Stylize.Relief.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Relief.png")));
fact.Add ("Menu.Effects.Stylize.Emboss.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Emboss.png")));
fact.Add ("Menu.Effects.Stylize.Outline.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Outline.png")));
<<<<<<<
Artistic = new Gtk.Action ("Artistic", Mono.Unix.Catalog.GetString ("Artistic"), null, null);
Blurs = new Gtk.Action ("Blurs", Mono.Unix.Catalog.GetString ("Blurs"), null, null);
Distort = new Gtk.Action ("Distort", Mono.Unix.Catalog.GetString ("Distort"), null, null);
Noise = new Gtk.Action ("Noise", Mono.Unix.Catalog.GetString ("Noise"), null, null);
Photo = new Gtk.Action ("Photo", Mono.Unix.Catalog.GetString ("Photo"), null, null);
Render = new Gtk.Action ("Render", Mono.Unix.Catalog.GetString ("Render"), null, null);
Stylize = new Gtk.Action ("Stylize", Mono.Unix.Catalog.GetString ("Stylize"), null, null);
=======
Artistic = new Gtk.Action ("Artistic", Mono.Unix.Catalog.GetString ("Artistic"), null, null);
Blurs = new Gtk.Action ("Blurs", Mono.Unix.Catalog.GetString ("Blurs"), null, null);
Distort = new Gtk.Action ("Distort", Mono.Unix.Catalog.GetString ("Distort"), null, null);
Noise = new Gtk.Action ("Noise", Mono.Unix.Catalog.GetString ("Noise"), null, null);
Photo = new Gtk.Action ("Photo", Mono.Unix.Catalog.GetString ("Photo"), null, null);
Render = new Gtk.Action ("Render", Mono.Unix.Catalog.GetString ("Render"), null, null);
Stylize = new Gtk.Action ("Stylize", Mono.Unix.Catalog.GetString ("Stylize"), null, null);
Noise.Visible = false;
Render.Visible = false;
>>>>>>>
Artistic = new Gtk.Action ("Artistic", Mono.Unix.Catalog.GetString ("Artistic"), null, null);
Blurs = new Gtk.Action ("Blurs", Mono.Unix.Catalog.GetString ("Blurs"), null, null);
Distort = new Gtk.Action ("Distort", Mono.Unix.Catalog.GetString ("Distort"), null, null);
Noise = new Gtk.Action ("Noise", Mono.Unix.Catalog.GetString ("Noise"), null, null);
Photo = new Gtk.Action ("Photo", Mono.Unix.Catalog.GetString ("Photo"), null, null);
Render = new Gtk.Action ("Render", Mono.Unix.Catalog.GetString ("Render"), null, null);
Stylize = new Gtk.Action ("Stylize", Mono.Unix.Catalog.GetString ("Stylize"), null, null);
<<<<<<<
InkSketch = new Gtk.Action ("InkSketch", Mono.Unix.Catalog.GetString ("Ink Sketch..."), null, "Menu.Effects.Artistic.InkSketch.png");
OilPainting = new Gtk.Action ("OilPainting", Mono.Unix.Catalog.GetString ("Oil Painting..."), null, "Menu.Effects.Artistic.OilPainting.png");
PencilSketch = new Gtk.Action ("PencilSketch", Mono.Unix.Catalog.GetString ("Pencil Sketch..."), null, "Menu.Effects.Artistic.PencilSketch.png");
Fragment = new Gtk.Action ("Fragment", Mono.Unix.Catalog.GetString ("Fragment..."), null, "Menu.Effects.Blurs.Fragment.png");
GaussianBlur = new Gtk.Action ("GaussianBlur", Mono.Unix.Catalog.GetString ("Gaussian Blur..."), null, "Menu.Effects.Blurs.GaussianBlur.png");
SurfaceBlur = new Gtk.Action ("SurfaceBlur", Mono.Unix.Catalog.GetString ("Surface Blur..."), null, "Menu.Effects.Blurs.SurfaceBlur.png");
ZoomBlur = new Gtk.Action ("ZoomBlur", Mono.Unix.Catalog.GetString ("Zoom Blur..."), null, "Menu.Effects.Blurs.ZoomBlur.png");
Unfocus = new Gtk.Action ("Unfocus", Mono.Unix.Catalog.GetString ("Unfocus..."), null, "Menu.Effects.Blurs.Unfocus.png");
Glow = new Gtk.Action ("Glow", Mono.Unix.Catalog.GetString ("Glow..."), null, "Menu.Effects.Photo.Glow.png");
RadialBlur = new Gtk.Action ("RadialBlur", Mono.Unix.Catalog.GetString ("Radial Blur..."), null, "Menu.Effects.Blurs.RadialBlur.png");
Bulge = new Gtk.Action ("Bulge", Mono.Unix.Catalog.GetString ("Bulge..."), null, "Menu.Effects.Distort.Bulge.png");
Dents = new Gtk.Action ("Dents", Mono.Unix.Catalog.GetString ("Dents..."), null, "Menu.Effects.Distort.Dents.png");
PolarInversion = new Gtk.Action ("PolarInversion", Mono.Unix.Catalog.GetString ("Polar Inversion..."), null, "Menu.Effects.Distort.PolarInversion.png");
MotionBlur = new Gtk.Action ("MotionBlur", Mono.Unix.Catalog.GetString ("Motion Blur..."), null, "Menu.Effects.Blurs.MotionBlur.png");
=======
InkSketch = new Gtk.Action ("InkSketch", Mono.Unix.Catalog.GetString ("Ink Sketch..."), null, "Menu.Effects.Artistic.InkSketch.png");
OilPainting = new Gtk.Action ("OilPainting", Mono.Unix.Catalog.GetString ("Oil Painting..."), null, "Menu.Effects.Artistic.OilPainting.png");
PencilSketch = new Gtk.Action ("PencilSketch", Mono.Unix.Catalog.GetString ("Pencil Sketch..."), null, "Menu.Effects.Artistic.PencilSketch.png");
Fragment = new Gtk.Action ("Fragment", Mono.Unix.Catalog.GetString ("Fragment..."), null, "Menu.Effects.Blurs.Fragment.png");
GaussianBlur = new Gtk.Action ("GaussianBlur", Mono.Unix.Catalog.GetString ("Gaussian Blur..."), null, "Menu.Effects.Blurs.GaussianBlur.png");
RadialBlur = new Gtk.Action ("RadialBlur", Mono.Unix.Catalog.GetString ("Radial Blur..."), null, "Menu.Effects.Blurs.RadialBlur.png");
MotionBlur = new Gtk.Action ("MotionBlur", Mono.Unix.Catalog.GetString ("Motion Blur..."), null, "Menu.Effects.Blurs.MotionBlur.png");
Twist = new Gtk.Action ("Twist", Mono.Unix.Catalog.GetString ("Twist..."), null, "Menu.Effects.Distort.Twist.png");
Tile = new Gtk.Action ("Tile", Mono.Unix.Catalog.GetString ("Tile Reflection..."), null, "Menu.Effects.Distort.Tile.png");
FrostedGlass = new Gtk.Action ("FrostedGlass", Mono.Unix.Catalog.GetString ("Frosted Glass..."), null, "Menu.Effects.Distort.FrostedGlass.png");
Pixelate = new Gtk.Action ("Pixelate", Mono.Unix.Catalog.GetString ("Pixelate..."), null, "Menu.Effects.Distort.Pixelate.png");
>>>>>>>
InkSketch = new Gtk.Action ("InkSketch", Mono.Unix.Catalog.GetString ("Ink Sketch..."), null, "Menu.Effects.Artistic.InkSketch.png");
OilPainting = new Gtk.Action ("OilPainting", Mono.Unix.Catalog.GetString ("Oil Painting..."), null, "Menu.Effects.Artistic.OilPainting.png");
PencilSketch = new Gtk.Action ("PencilSketch", Mono.Unix.Catalog.GetString ("Pencil Sketch..."), null, "Menu.Effects.Artistic.PencilSketch.png");
Fragment = new Gtk.Action ("Fragment", Mono.Unix.Catalog.GetString ("Fragment..."), null, "Menu.Effects.Blurs.Fragment.png");
GaussianBlur = new Gtk.Action ("GaussianBlur", Mono.Unix.Catalog.GetString ("Gaussian Blur..."), null, "Menu.Effects.Blurs.GaussianBlur.png");
SurfaceBlur = new Gtk.Action ("SurfaceBlur", Mono.Unix.Catalog.GetString ("Surface Blur..."), null, "Menu.Effects.Blurs.SurfaceBlur.png");
ZoomBlur = new Gtk.Action ("ZoomBlur", Mono.Unix.Catalog.GetString ("Zoom Blur..."), null, "Menu.Effects.Blurs.ZoomBlur.png");
Unfocus = new Gtk.Action ("Unfocus", Mono.Unix.Catalog.GetString ("Unfocus..."), null, "Menu.Effects.Blurs.Unfocus.png");
Glow = new Gtk.Action ("Glow", Mono.Unix.Catalog.GetString ("Glow..."), null, "Menu.Effects.Photo.Glow.png");
RadialBlur = new Gtk.Action ("RadialBlur", Mono.Unix.Catalog.GetString ("Radial Blur..."), null, "Menu.Effects.Blurs.RadialBlur.png");
Bulge = new Gtk.Action ("Bulge", Mono.Unix.Catalog.GetString ("Bulge..."), null, "Menu.Effects.Distort.Bulge.png");
Twist = new Gtk.Action ("Twist", Mono.Unix.Catalog.GetString ("Twist..."), null, "Menu.Effects.Distort.Twist.png");
Tile = new Gtk.Action ("Tile", Mono.Unix.Catalog.GetString ("Tile Reflection..."), null, "Menu.Effects.Distort.Tile.png");
FrostedGlass = new Gtk.Action ("FrostedGlass", Mono.Unix.Catalog.GetString ("Frosted Glass..."), null, "Menu.Effects.Distort.FrostedGlass.png");
Pixelate = new Gtk.Action ("Pixelate", Mono.Unix.Catalog.GetString ("Pixelate..."), null, "Menu.Effects.Distort.Pixelate.png");
Dents = new Gtk.Action ("Dents", Mono.Unix.Catalog.GetString ("Dents..."), null, "Menu.Effects.Distort.Dents.png");
PolarInversion = new Gtk.Action ("PolarInversion", Mono.Unix.Catalog.GetString ("Polar Inversion..."), null, "Menu.Effects.Distort.PolarInversion.png");
MotionBlur = new Gtk.Action ("MotionBlur", Mono.Unix.Catalog.GetString ("Motion Blur..."), null, "Menu.Effects.Blurs.MotionBlur.png");
<<<<<<<
AddNoise = new Gtk.Action ("AddNoise", Mono.Unix.Catalog.GetString ("Add Noise..."), null, "Menu.Effects.Noise.AddNoise.png");
Median = new Gtk.Action ("Median", Mono.Unix.Catalog.GetString ("Median..."), null, "Menu.Effects.Noise.Median.png");
ReduceNoise = new Gtk.Action ("ReduceNoise", Mono.Unix.Catalog.GetString ("Reduce Noise..."), null, "Menu.Effects.Noise.ReduceNoise.png");
Outline = new Gtk.Action ("Outline", Mono.Unix.Catalog.GetString ("Outline..."), null, "Menu.Effects.Stylize.Outline.png");
=======
Relief = new Gtk.Action ("Relief", Mono.Unix.Catalog.GetString ("Relief..."), null, "Menu.Effects.Stylize.Relief.png");
Emboss = new Gtk.Action ("Emboss", Mono.Unix.Catalog.GetString ("Emboss..."), null, "Menu.Effects.Stylize.Emboss.png");
>>>>>>>
AddNoise = new Gtk.Action ("AddNoise", Mono.Unix.Catalog.GetString ("Add Noise..."), null, "Menu.Effects.Noise.AddNoise.png");
Median = new Gtk.Action ("Median", Mono.Unix.Catalog.GetString ("Median..."), null, "Menu.Effects.Noise.Median.png");
Relief = new Gtk.Action ("Relief", Mono.Unix.Catalog.GetString ("Relief..."), null, "Menu.Effects.Stylize.Relief.png");
Emboss = new Gtk.Action ("Emboss", Mono.Unix.Catalog.GetString ("Emboss..."), null, "Menu.Effects.Stylize.Emboss.png");
ReduceNoise = new Gtk.Action ("ReduceNoise", Mono.Unix.Catalog.GetString ("Reduce Noise..."), null, "Menu.Effects.Noise.ReduceNoise.png");
Outline = new Gtk.Action ("Outline", Mono.Unix.Catalog.GetString ("Outline..."), null, "Menu.Effects.Stylize.Outline.png");
<<<<<<<
menu.Remove (menu.Children[1]);
=======
menu.Remove (menu.Children[1]);
>>>>>>>
menu.Remove (menu.Children[1]);
<<<<<<<
blur_sub_menu.Append (GaussianBlur.CreateMenuItem ());
blur_sub_menu.Append (SurfaceBlur.CreateMenuItem ());
blur_sub_menu.Append (Unfocus.CreateMenuItem ());
blur_sub_menu.Append (ZoomBlur.CreateMenuItem ());
blur_sub_menu.Append (RadialBlur.CreateMenuItem ());
blur_sub_menu.Append (MotionBlur.CreateMenuItem ());
distort_sub_menu.Append (Bulge.CreateMenuItem ());
distort_sub_menu.Append (Dents.CreateMenuItem ());
distort_sub_menu.Append (PolarInversion.CreateMenuItem ());
=======
blur_sub_menu.Append (GaussianBlur.CreateMenuItem ());
blur_sub_menu.Append (RadialBlur.CreateMenuItem ());
blur_sub_menu.Append (MotionBlur.CreateMenuItem ());
distort_sub_menu.Append (Twist.CreateMenuItem ());
distort_sub_menu.Append (Tile.CreateMenuItem ());
distort_sub_menu.Append (Pixelate.CreateMenuItem ());
distort_sub_menu.Append (FrostedGlass.CreateMenuItem ());
>>>>>>>
blur_sub_menu.Append (GaussianBlur.CreateMenuItem ());
blur_sub_menu.Append (SurfaceBlur.CreateMenuItem ());
blur_sub_menu.Append (Unfocus.CreateMenuItem ());
blur_sub_menu.Append (ZoomBlur.CreateMenuItem ());
blur_sub_menu.Append (RadialBlur.CreateMenuItem ());
blur_sub_menu.Append (MotionBlur.CreateMenuItem ());
distort_sub_menu.Append (Twist.CreateMenuItem ());
distort_sub_menu.Append (Tile.CreateMenuItem ());
distort_sub_menu.Append (Pixelate.CreateMenuItem ());
distort_sub_menu.Append (FrostedGlass.CreateMenuItem ());
distort_sub_menu.Append (Bulge.CreateMenuItem ());
distort_sub_menu.Append (Dents.CreateMenuItem ());
distort_sub_menu.Append (PolarInversion.CreateMenuItem ());
<<<<<<<
noise_sub_menu.Append (AddNoise.CreateMenuItem ());
noise_sub_menu.Append (Median.CreateMenuItem ());
noise_sub_menu.Append (ReduceNoise.CreateMenuItem ());
stylize_sub_menu.Append (Outline.CreateMenuItem ());
=======
stylize_sub_menu.Append (Relief.CreateMenuItem ());
stylize_sub_menu.Append (Emboss.CreateMenuItem ());
>>>>>>>
stylize_sub_menu.Append (Relief.CreateMenuItem ());
stylize_sub_menu.Append (Emboss.CreateMenuItem ());
stylize_sub_menu.Append (Outline.CreateMenuItem ()); |
<<<<<<<
public Gtk.Action Emboss { get; private set; }
=======
>>>>>>>
public Gtk.Action Emboss { get; private set; }
<<<<<<<
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.Add ("Menu.Effects.Stylize.Emboss.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Emboss.png")));
=======
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Distort.FrostedGlass.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.FrostedGlass.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
>>>>>>>
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Distort.FrostedGlass.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.FrostedGlass.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.Add ("Menu.Effects.Stylize.Emboss.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Emboss.png"))); |
<<<<<<<
PintaCore.Actions.Effects.MotionBlur.Activated += HandleEffectActivated<MotionBlurEffect>;
PintaCore.Actions.Effects.Glow.Activated += HandleEffectActivated<GlowEffect>;
PintaCore.Actions.Effects.RedEyeRemove.Activated += HandleEffectActivated<RedEyeRemoveEffect>;
PintaCore.Actions.Effects.Sharpen.Activated += HandleEffectActivated<SharpenEffect>;
PintaCore.Actions.Effects.SoftenPortrait.Activated += HandleEffectActivated<SoftenPortraitEffect>;
PintaCore.Actions.Effects.EdgeDetect.Activated += HandleEffectActivated<EdgeDetectEffect>;
PintaCore.Actions.Effects.Emboss.Activated += HandleEffectActivated<EmbossEffect>;
=======
PintaCore.Actions.Effects.MotionBlur.Activated += HandleEffectActivated<MotionBlurEffect>;
PintaCore.Actions.Effects.FrostedGlass.Activated += HandleEffectActivated<FrostedGlassEffect>;
PintaCore.Actions.Effects.Glow.Activated += HandleEffectActivated<GlowEffect>;
PintaCore.Actions.Effects.RedEyeRemove.Activated += HandleEffectActivated<RedEyeRemoveEffect>;
PintaCore.Actions.Effects.Sharpen.Activated += HandleEffectActivated<SharpenEffect>;
PintaCore.Actions.Effects.SoftenPortrait.Activated += HandleEffectActivated<SoftenPortraitEffect>;
PintaCore.Actions.Effects.EdgeDetect.Activated += HandleEffectActivated<EdgeDetectEffect>;
>>>>>>>
PintaCore.Actions.Effects.MotionBlur.Activated += HandleEffectActivated<MotionBlurEffect>;
PintaCore.Actions.Effects.FrostedGlass.Activated += HandleEffectActivated<FrostedGlassEffect>;
PintaCore.Actions.Effects.Glow.Activated += HandleEffectActivated<GlowEffect>;
PintaCore.Actions.Effects.RedEyeRemove.Activated += HandleEffectActivated<RedEyeRemoveEffect>;
PintaCore.Actions.Effects.Sharpen.Activated += HandleEffectActivated<SharpenEffect>;
PintaCore.Actions.Effects.SoftenPortrait.Activated += HandleEffectActivated<SoftenPortraitEffect>;
PintaCore.Actions.Effects.EdgeDetect.Activated += HandleEffectActivated<EdgeDetectEffect>;
PintaCore.Actions.Effects.Emboss.Activated += HandleEffectActivated<EmbossEffect>; |
<<<<<<<
g.SetSourceSurface (original.Surface, (int)original.Offset.X, (int)original.Offset.Y);
g.Paint ();
=======
original.Draw(g, original.Surface, 1, canvas_offset.X, canvas_offset.Y, 1);
>>>>>>>
original.Draw(g, original.Surface, 1);
<<<<<<<
if (!layer.Offset.IsEmpty ())
layer = CreateOffsetLayer (layer);
=======
if (!layer.Transform.IsIdentity ())
layer = CreateOffsetLayer (layer, offset);
>>>>>>>
if (!layer.Transform.IsIdentity ())
layer = CreateOffsetLayer (layer);
<<<<<<<
if (!layer.Offset.IsEmpty ())
layer = CreateOffsetLayer (layer);
=======
if (!layer.Transform.IsIdentity ())
layer = CreateOffsetLayer (layer, offset);
>>>>>>>
if (!layer.Transform.IsIdentity ())
layer = CreateOffsetLayer (layer);
<<<<<<<
if (!layer.Offset.IsEmpty ())
layer = CreateOffsetLayer (layer);
=======
if (!layer.Transform.IsIdentity ())
layer = CreateOffsetLayer (layer, offset);
>>>>>>>
if (!layer.Transform.IsIdentity ())
layer = CreateOffsetLayer (layer); |
<<<<<<<
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Render.Clouds.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Render.Clouds.png")));
fact.Add ("Menu.Effects.Render.JuliaFractal.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Render.JuliaFractal.png")));
fact.Add ("Menu.Effects.Render.MandelbrotFractal.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Render.MandelbrotFractal.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.AddDefault ();
=======
fact.Add("Menu.Effects.Noise.AddNoise.png", new IconSet(PintaCore.Resources.GetIcon("Menu.Effects.Noise.AddNoise.png")));
fact.Add("Menu.Effects.Noise.Median.png", new IconSet(PintaCore.Resources.GetIcon("Menu.Effects.Noise.Median.png")));
fact.Add("Menu.Effects.Noise.ReduceNoise.png", new IconSet(PintaCore.Resources.GetIcon("Menu.Effects.Noise.ReduceNoise.png")));
fact.Add("Menu.Effects.Stylize.Outline.png", new IconSet(PintaCore.Resources.GetIcon("Menu.Effects.Stylize.Outline.png")));
fact.AddDefault ();
>>>>>>>
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Render.Clouds.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Render.Clouds.png")));
fact.Add ("Menu.Effects.Render.JuliaFractal.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Render.JuliaFractal.png")));
fact.Add ("Menu.Effects.Render.MandelbrotFractal.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Render.MandelbrotFractal.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.Add("Menu.Effects.Noise.AddNoise.png", new IconSet(PintaCore.Resources.GetIcon("Menu.Effects.Noise.AddNoise.png")));
fact.Add("Menu.Effects.Noise.Median.png", new IconSet(PintaCore.Resources.GetIcon("Menu.Effects.Noise.Median.png")));
fact.Add("Menu.Effects.Noise.ReduceNoise.png", new IconSet(PintaCore.Resources.GetIcon("Menu.Effects.Noise.ReduceNoise.png")));
fact.Add("Menu.Effects.Stylize.Outline.png", new IconSet(PintaCore.Resources.GetIcon("Menu.Effects.Stylize.Outline.png")));
fact.AddDefault ();
<<<<<<<
Noise.Visible = false;
=======
Distort.Visible = false;
Render.Visible = false;
>>>>>>>
<<<<<<<
Sharpen = new Gtk.Action ("Sharpen", Mono.Unix.Catalog.GetString ("Sharpen..."), null, "Menu.Effects.Photo.Sharpen.png");
SoftenPortrait = new Gtk.Action ("Soften Portrait", Mono.Unix.Catalog.GetString ("Soften Portrait..."), null, "Menu.Effects.Photo.SoftenPortrait.png");
Clouds = new Gtk.Action ("Clouds", Mono.Unix.Catalog.GetString ("Clouds..."), null, "Menu.Effects.Render.Clouds.png");
JuliaFractal = new Gtk.Action ("Julia Fractal", Mono.Unix.Catalog.GetString ("Julia Fractal..."), null, "Menu.Effects.Render.JuliaFractal.png");
MandelbrotFractal = new Gtk.Action ("Mandelbrot Fractal", Mono.Unix.Catalog.GetString ("Mandelbrot Factal..."), null, "Menu.Effects.Render.MandelbrotFractal.png");
EdgeDetect = new Gtk.Action ("EdgeDetect", Mono.Unix.Catalog.GetString ("Edge Detect..."), null, "Menu.Effects.Stylize.EdgeDetect.png");
=======
//Noice Action
AddNoise = new Gtk.Action("AddNoise", Mono.Unix.Catalog.GetString("Add Noise..."), null, "Menu.Effects.Noise.AddNoise.png");
Median = new Gtk.Action("Median", Mono.Unix.Catalog.GetString("Median..."), null, "Menu.Effects.Noise.Median.png");
ReduceNoise = new Gtk.Action("ReduceNoise", Mono.Unix.Catalog.GetString("Reduce Noise..."), null, "Menu.Effects.Noise.ReduceNoise.png");
//Stylize Action
Outline = new Gtk.Action("Outline", Mono.Unix.Catalog.GetString("Outline..."), null, "Menu.Effects.Stylize.Outline.png");
>>>>>>>
Sharpen = new Gtk.Action ("Sharpen", Mono.Unix.Catalog.GetString ("Sharpen..."), null, "Menu.Effects.Photo.Sharpen.png");
SoftenPortrait = new Gtk.Action ("Soften Portrait", Mono.Unix.Catalog.GetString ("Soften Portrait..."), null, "Menu.Effects.Photo.SoftenPortrait.png");
Clouds = new Gtk.Action ("Clouds", Mono.Unix.Catalog.GetString ("Clouds..."), null, "Menu.Effects.Render.Clouds.png");
JuliaFractal = new Gtk.Action ("Julia Fractal", Mono.Unix.Catalog.GetString ("Julia Fractal..."), null, "Menu.Effects.Render.JuliaFractal.png");
MandelbrotFractal = new Gtk.Action ("Mandelbrot Fractal", Mono.Unix.Catalog.GetString ("Mandelbrot Factal..."), null, "Menu.Effects.Render.MandelbrotFractal.png");
EdgeDetect = new Gtk.Action ("EdgeDetect", Mono.Unix.Catalog.GetString ("Edge Detect..."), null, "Menu.Effects.Stylize.EdgeDetect.png");
//Noice Action
AddNoise = new Gtk.Action("AddNoise", Mono.Unix.Catalog.GetString("Add Noise..."), null, "Menu.Effects.Noise.AddNoise.png");
Median = new Gtk.Action("Median", Mono.Unix.Catalog.GetString("Median..."), null, "Menu.Effects.Noise.Median.png");
ReduceNoise = new Gtk.Action("ReduceNoise", Mono.Unix.Catalog.GetString("Reduce Noise..."), null, "Menu.Effects.Noise.ReduceNoise.png");
//Stylize Action
Outline = new Gtk.Action("Outline", Mono.Unix.Catalog.GetString("Outline..."), null, "Menu.Effects.Stylize.Outline.png");
<<<<<<<
photo_sub_menu.Append (RedEyeRemove.CreateMenuItem ());
photo_sub_menu.Append (Sharpen.CreateMenuItem ());
photo_sub_menu.Append (SoftenPortrait.CreateMenuItem ());
render_sub_menu.Append (Clouds.CreateMenuItem ());
render_sub_menu.Append (JuliaFractal.CreateMenuItem ());
render_sub_menu.Append (MandelbrotFractal.CreateMenuItem ());
stylize_sub_menu.Append (EdgeDetect.CreateMenuItem ());
=======
photo_sub_menu.Append (RedEyeRemove.CreateMenuItem());
noise_sub_menu.Append(AddNoise.CreateMenuItem());
noise_sub_menu.Append(Median.CreateMenuItem());
noise_sub_menu.Append(ReduceNoise.CreateMenuItem());
stylize_sub_menu.Append(Outline.CreateMenuItem());
>>>>>>>
photo_sub_menu.Append (RedEyeRemove.CreateMenuItem ());
photo_sub_menu.Append (Sharpen.CreateMenuItem ());
photo_sub_menu.Append (SoftenPortrait.CreateMenuItem ());
render_sub_menu.Append (Clouds.CreateMenuItem ());
render_sub_menu.Append (JuliaFractal.CreateMenuItem ());
render_sub_menu.Append (MandelbrotFractal.CreateMenuItem ());
stylize_sub_menu.Append (EdgeDetect.CreateMenuItem ());
noise_sub_menu.Append(AddNoise.CreateMenuItem());
noise_sub_menu.Append(Median.CreateMenuItem());
noise_sub_menu.Append(ReduceNoise.CreateMenuItem());
stylize_sub_menu.Append(Outline.CreateMenuItem()); |
<<<<<<<
public Gtk.Action FrostedGlass { get; private set; }
public Gtk.Action Pixelate { get; private set; }
=======
public Gtk.Action Tile { get; private set; }
>>>>>>>
public Gtk.Action Tile { get; private set; }
public Gtk.Action FrostedGlass { get; private set; }
public Gtk.Action Pixelate { get; private set; }
<<<<<<<
public Gtk.Action Relief { get; private set; }
public Gtk.Action Emboss { get; private set; }
=======
>>>>>>>
public Gtk.Action Relief { get; private set; }
public Gtk.Action Emboss { get; private set; }
<<<<<<<
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Distort.FrostedGlass.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.FrostedGlass.png")));
fact.Add ("Menu.Effects.Distort.Pixelate.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.Pixelate.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.Add ("Menu.Effects.Stylize.Relief.png",
fact.Add ("Menu.Effects.Stylize.Emboss.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Emboss.png")));
new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Relief.png")));
=======
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Distort.Tile.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.Tile.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
>>>>>>>
IconFactory fact = new IconFactory ();
fact.Add ("Menu.Effects.Artistic.InkSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.InkSketch.png")));
fact.Add ("Menu.Effects.Artistic.OilPainting.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.OilPainting.png")));
fact.Add ("Menu.Effects.Artistic.PencilSketch.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Artistic.PencilSketch.png")));
fact.Add ("Menu.Effects.Blurs.Fragment.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Fragment.png")));
fact.Add ("Menu.Effects.Blurs.GaussianBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.GaussianBlur.png")));
fact.Add ("Menu.Effects.Blurs.MotionBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.MotionBlur.png")));
fact.Add ("Menu.Effects.Blurs.RadialBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.RadialBlur.png")));
fact.Add ("Menu.Effects.Blurs.SurfaceBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.SurfaceBlur.png")));
fact.Add ("Menu.Effects.Blurs.Unfocus.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.Unfocus.png")));
fact.Add ("Menu.Effects.Blurs.ZoomBlur.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Blurs.ZoomBlur.png")));
fact.Add ("Menu.Effects.Distort.Tile.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.Tile.png")));
fact.Add ("Menu.Effects.Distort.FrostedGlass.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.FrostedGlass.png")));
fact.Add ("Menu.Effects.Distort.Pixelate.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Distort.Pixelate.png")));
fact.Add ("Menu.Effects.Photo.Glow.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Glow.png")));
fact.Add ("Menu.Effects.Photo.RedEyeRemove.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.RedEyeRemove.png")));
fact.Add ("Menu.Effects.Photo.Sharpen.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.Sharpen.png")));
fact.Add ("Menu.Effects.Photo.SoftenPortrait.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Photo.SoftenPortrait.png")));
fact.Add ("Menu.Effects.Stylize.EdgeDetect.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.EdgeDetect.png")));
fact.Add ("Menu.Effects.Stylize.Relief.png",
fact.Add ("Menu.Effects.Stylize.Emboss.png", new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Emboss.png")));
new IconSet (PintaCore.Resources.GetIcon ("Menu.Effects.Stylize.Relief.png")));
<<<<<<<
InkSketch = new Gtk.Action ("InkSketch", Mono.Unix.Catalog.GetString ("Ink Sketch..."), null, "Menu.Effects.Artistic.InkSketch.png");
OilPainting = new Gtk.Action ("OilPainting", Mono.Unix.Catalog.GetString ("Oil Painting..."), null, "Menu.Effects.Artistic.OilPainting.png");
PencilSketch = new Gtk.Action ("PencilSketch", Mono.Unix.Catalog.GetString ("Pencil Sketch..."), null, "Menu.Effects.Artistic.PencilSketch.png");
Fragment = new Gtk.Action ("Fragment", Mono.Unix.Catalog.GetString ("Fragment..."), null, "Menu.Effects.Blurs.Fragment.png");
GaussianBlur = new Gtk.Action ("GaussianBlur", Mono.Unix.Catalog.GetString ("Gaussian Blur..."), null, "Menu.Effects.Blurs.GaussianBlur.png");
RadialBlur = new Gtk.Action ("RadialBlur", Mono.Unix.Catalog.GetString ("Radial Blur..."), null, "Menu.Effects.Blurs.RadialBlur.png");
MotionBlur = new Gtk.Action ("MotionBlur", Mono.Unix.Catalog.GetString ("Motion Blur..."), null, "Menu.Effects.Blurs.MotionBlur.png");
FrostedGlass = new Gtk.Action ("FrostedGlass", Mono.Unix.Catalog.GetString ("Frosted Glass..."), null, "Menu.Effects.Distort.FrostedGlass.png");
Pixelate = new Gtk.Action ("Pixelate", Mono.Unix.Catalog.GetString ("Pixelate..."), null, "Menu.Effects.Distort.Pixelate.png");
=======
InkSketch = new Gtk.Action ("InkSketch", Mono.Unix.Catalog.GetString ("Ink Sketch..."), null, "Menu.Effects.Artistic.InkSketch.png");
OilPainting = new Gtk.Action ("OilPainting", Mono.Unix.Catalog.GetString ("Oil Painting..."), null, "Menu.Effects.Artistic.OilPainting.png");
PencilSketch = new Gtk.Action ("PencilSketch", Mono.Unix.Catalog.GetString ("Pencil Sketch..."), null, "Menu.Effects.Artistic.PencilSketch.png");
Fragment = new Gtk.Action ("Fragment", Mono.Unix.Catalog.GetString ("Fragment..."), null, "Menu.Effects.Blurs.Fragment.png");
GaussianBlur = new Gtk.Action ("GaussianBlur", Mono.Unix.Catalog.GetString ("Gaussian Blur..."), null, "Menu.Effects.Blurs.GaussianBlur.png");
RadialBlur = new Gtk.Action ("RadialBlur", Mono.Unix.Catalog.GetString ("Radial Blur..."), null, "Menu.Effects.Blurs.RadialBlur.png");
MotionBlur = new Gtk.Action ("MotionBlur", Mono.Unix.Catalog.GetString ("Motion Blur..."), null, "Menu.Effects.Blurs.MotionBlur.png");
Tile = new Gtk.Action ("Tile", Mono.Unix.Catalog.GetString ("Tile Reflection..."), null, "Menu.Effects.Distort.Tile.png");
>>>>>>>
InkSketch = new Gtk.Action ("InkSketch", Mono.Unix.Catalog.GetString ("Ink Sketch..."), null, "Menu.Effects.Artistic.InkSketch.png");
OilPainting = new Gtk.Action ("OilPainting", Mono.Unix.Catalog.GetString ("Oil Painting..."), null, "Menu.Effects.Artistic.OilPainting.png");
PencilSketch = new Gtk.Action ("PencilSketch", Mono.Unix.Catalog.GetString ("Pencil Sketch..."), null, "Menu.Effects.Artistic.PencilSketch.png");
Fragment = new Gtk.Action ("Fragment", Mono.Unix.Catalog.GetString ("Fragment..."), null, "Menu.Effects.Blurs.Fragment.png");
GaussianBlur = new Gtk.Action ("GaussianBlur", Mono.Unix.Catalog.GetString ("Gaussian Blur..."), null, "Menu.Effects.Blurs.GaussianBlur.png");
RadialBlur = new Gtk.Action ("RadialBlur", Mono.Unix.Catalog.GetString ("Radial Blur..."), null, "Menu.Effects.Blurs.RadialBlur.png");
MotionBlur = new Gtk.Action ("MotionBlur", Mono.Unix.Catalog.GetString ("Motion Blur..."), null, "Menu.Effects.Blurs.MotionBlur.png");
Tile = new Gtk.Action ("Tile", Mono.Unix.Catalog.GetString ("Tile Reflection..."), null, "Menu.Effects.Distort.Tile.png");
FrostedGlass = new Gtk.Action ("FrostedGlass", Mono.Unix.Catalog.GetString ("Frosted Glass..."), null, "Menu.Effects.Distort.FrostedGlass.png");
Pixelate = new Gtk.Action ("Pixelate", Mono.Unix.Catalog.GetString ("Pixelate..."), null, "Menu.Effects.Distort.Pixelate.png");
<<<<<<<
blur_sub_menu.Append (GaussianBlur.CreateMenuItem ());
blur_sub_menu.Append (RadialBlur.CreateMenuItem ());
blur_sub_menu.Append (MotionBlur.CreateMenuItem ());
distort_sub_menu.Append (Pixelate.CreateMenuItem ());
distort_sub_menu.Append (FrostedGlass.CreateMenuItem ());
=======
blur_sub_menu.Append (GaussianBlur.CreateMenuItem ());
blur_sub_menu.Append (RadialBlur.CreateMenuItem ());
blur_sub_menu.Append (MotionBlur.CreateMenuItem ());
distort_sub_menu.Append (Tile.CreateMenuItem ());
>>>>>>>
blur_sub_menu.Append (GaussianBlur.CreateMenuItem ());
blur_sub_menu.Append (RadialBlur.CreateMenuItem ());
blur_sub_menu.Append (MotionBlur.CreateMenuItem ());
distort_sub_menu.Append (Tile.CreateMenuItem ());
distort_sub_menu.Append (Pixelate.CreateMenuItem ());
distort_sub_menu.Append (FrostedGlass.CreateMenuItem ()); |
<<<<<<<
using Stratis.Bitcoin.Primitives;
=======
using Stratis.Bitcoin.Tests.Common;
>>>>>>>
using Stratis.Bitcoin.Primitives;
using Stratis.Bitcoin.Tests.Common; |
<<<<<<<
: base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, network, stakeChain, stakeValidator)
=======
: base(consensusLoop, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network, stakeChain, stakeValidator)
>>>>>>>
: base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network, stakeChain, stakeValidator) |
<<<<<<<
private readonly CoinView coinView;
=======
private readonly LookaheadBlockPuller blockPuller;
private readonly ICoinView coinView;
>>>>>>>
private readonly ICoinView coinView;
<<<<<<<
=======
private readonly StakeChainStore stakeChain;
private readonly IRuleRegistration ruleRegistration;
private readonly ConsensusSettings consensusSettings;
private readonly IConsensusRules consensusRules;
>>>>>>>
<<<<<<<
CoinView coinView,
=======
LookaheadBlockPuller blockPuller,
ICoinView coinView,
>>>>>>>
ICoinView coinView,
<<<<<<<
=======
this.ruleRegistration = ruleRegistration;
this.consensusSettings = consensusSettings;
this.consensusRules = consensusRules;
>>>>>>>
<<<<<<<
this.signals.SubscribeForBlocks(this.consensusStats);
=======
this.stakeChain?.LoadAsync().GetAwaiter().GetResult();
this.signals.SubscribeForBlocksConnected(this.consensusStats);
this.consensusRules.Register(this.ruleRegistration);
>>>>>>>
this.signals.SubscribeForBlocksConnected(this.consensusStats);
<<<<<<<
services.AddSingleton<CoinView, CachedCoinView>();
=======
services.AddSingleton<ICoinView, CachedCoinView>();
services.AddSingleton<LookaheadBlockPuller>().AddSingleton<ILookaheadBlockPuller, LookaheadBlockPuller>(provider => provider.GetService<LookaheadBlockPuller>()); ;
services.AddSingleton<IConsensusLoop, ConsensusLoop>()
.AddSingleton<INetworkDifficulty, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop)
.AddSingleton<IGetUnspentTransaction, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop);
services.AddSingleton<IInitialBlockDownloadState, InitialBlockDownloadState>();
>>>>>>>
services.AddSingleton<ICoinView, CachedCoinView>();
<<<<<<<
services.AddSingleton<CoinView, CachedCoinView>();
=======
services.AddSingleton<ICoinView, CachedCoinView>();
services.AddSingleton<LookaheadBlockPuller>().AddSingleton<ILookaheadBlockPuller, LookaheadBlockPuller>(provider => provider.GetService<LookaheadBlockPuller>());
services.AddSingleton<IConsensusLoop, ConsensusLoop>()
.AddSingleton<INetworkDifficulty, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop)
.AddSingleton<IGetUnspentTransaction, ConsensusLoop>(provider => provider.GetService<IConsensusLoop>() as ConsensusLoop);
>>>>>>>
services.AddSingleton<ICoinView, CachedCoinView>(); |
<<<<<<<
=======
using NBitcoin.Rules;
using Stratis.Bitcoin.Utilities;
>>>>>>>
using NBitcoin.Rules; |
<<<<<<<
var powRuleContext = new PowRuleContext(new ValidationContext(), this.dateTimeProvider.Object.GetTimeOffset());
=======
var powRuleContext = new PowRuleContext(new ValidationContext(), this.testNet.Consensus, chain.Tip, this.dateTimeProvider.Object.GetTimeOffset());
>>>>>>>
var powRuleContext = new PowRuleContext(new ValidationContext(), this.dateTimeProvider.Object.GetTimeOffset());
<<<<<<<
Assert.Equal(1500, this.testNetwork.Consensus.Options.MaxBlockWeight);
=======
Assert.Equal(chain.GetBlock(5).HashBlock, powRuleContext.ConsensusTip.HashBlock);
>>>>>>>
<<<<<<<
var powRuleContext = new PowRuleContext(new ValidationContext(), this.dateTimeProvider.Object.GetTimeOffset());
=======
var powRuleContext = new PowRuleContext(new ValidationContext(), this.testNet.Consensus, chain.Tip, this.dateTimeProvider.Object.GetTimeOffset());
>>>>>>>
var powRuleContext = new PowRuleContext(new ValidationContext(), this.dateTimeProvider.Object.GetTimeOffset());
<<<<<<<
Assert.Equal(1500, this.testNetwork.Consensus.Options.MaxBlockWeight);
=======
Assert.Equal(chain.GetBlock(5).HashBlock, powRuleContext.ConsensusTip.HashBlock);
>>>>>>>
<<<<<<<
var powConsensusRules = new PowConsensusRuleEngine(this.testNetwork,
=======
var powConsensusRules = new PowConsensusRules(this.testNet,
>>>>>>>
var powConsensusRules = new PowConsensusRuleEngine(this.testNet,
<<<<<<<
new NodeDeployments(this.testNetwork, chain), new ConsensusSettings(new NodeSettings(this.testNetwork)), new Checkpoints(),
new Mock<ICoinView>().Object, new Mock<IChainState>().Object);
=======
new NodeDeployments(this.testNet, chain), new ConsensusSettings(new NodeSettings(this.testNet)), new Checkpoints(),
new Mock<ICoinView>().Object, new Mock<ILookaheadBlockPuller>().Object);
>>>>>>>
new NodeDeployments(this.testNet, chain), new ConsensusSettings(new NodeSettings(this.testNet)), new Checkpoints(),
new Mock<ICoinView>().Object, new Mock<IChainState>().Object); |
<<<<<<<
protected Mock<IBlockPuller> lookaheadBlockPuller;
protected Mock<CoinView> coinView;
=======
protected Mock<ILookaheadBlockPuller> lookaheadBlockPuller;
protected Mock<ICoinView> coinView;
>>>>>>>
protected Mock<IBlockPuller> lookaheadBlockPuller;
protected Mock<ICoinView> coinView;
<<<<<<<
this.lookaheadBlockPuller = new Mock<IBlockPuller>();
this.coinView = new Mock<CoinView>();
=======
this.lookaheadBlockPuller = new Mock<ILookaheadBlockPuller>();
this.coinView = new Mock<ICoinView>();
>>>>>>>
this.lookaheadBlockPuller = new Mock<IBlockPuller>();
this.coinView = new Mock<ICoinView>();
<<<<<<<
protected Mock<IBlockPuller> lookaheadBlockPuller;
protected Mock<CoinView> coinView;
=======
protected Mock<ILookaheadBlockPuller> lookaheadBlockPuller;
protected Mock<ICoinView> coinView;
>>>>>>>
protected Mock<IBlockPuller> lookaheadBlockPuller;
protected Mock<ICoinView> coinView;
<<<<<<<
this.lookaheadBlockPuller = new Mock<IBlockPuller>();
this.coinView = new Mock<CoinView>();
=======
this.lookaheadBlockPuller = new Mock<ILookaheadBlockPuller>();
this.coinView = new Mock<ICoinView>();
>>>>>>>
this.lookaheadBlockPuller = new Mock<IBlockPuller>();
this.coinView = new Mock<ICoinView>(); |
<<<<<<<
const string wrongVersion = "You're referencing the Portable version in your App - you need to reference the platform (iOS/Android) version";
/// <summary>
/// Initializes a new instance of the <see
/// cref="ModernHttpClient.Portable.NativeMessageHandler"/> class.
/// </summary>
public NativeMessageHandler(): base()
{
throw new Exception(wrongVersion);
}
/// <summary>
/// Initializes a new instance of the <see
/// cref="ModernHttpClient.Portable.NativeMessageHandler"/> class.
/// </summary>
/// <param name="throwOnCaptiveNetwork">If set to <c>true</c> throw on
/// captive network (ie: a captive network is usually a wifi network
/// where an authentication html form is shown instead of the real
/// content).</param>
public NativeMessageHandler(bool throwOnCaptiveNetwork) : base()
{
throw new Exception(wrongVersion);
}
=======
public void RegisterForProgress(HttpRequestMessage request, ProgressDelegate callback)
{
throw new Exception("You're referencing the Portable version in your App - you need to reference the platform (iOS/Android) version");
}
>>>>>>>
const string wrongVersion = "You're referencing the Portable version in your App - you need to reference the platform (iOS/Android) version";
/// <summary>
/// Initializes a new instance of the <see
/// cref="ModernHttpClient.Portable.NativeMessageHandler"/> class.
/// </summary>
public NativeMessageHandler(): base()
{
throw new Exception(wrongVersion);
}
/// <summary>
/// Initializes a new instance of the <see
/// cref="ModernHttpClient.Portable.NativeMessageHandler"/> class.
/// </summary>
/// <param name="throwOnCaptiveNetwork">If set to <c>true</c> throw on
/// captive network (ie: a captive network is usually a wifi network
/// where an authentication html form is shown instead of the real
/// content).</param>
public NativeMessageHandler(bool throwOnCaptiveNetwork) : base()
{
throw new Exception(wrongVersion);
}
public void RegisterForProgress(HttpRequestMessage request, ProgressDelegate callback)
{
throw new Exception(wrongVersion);
} |
<<<<<<<
: base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, network, new BlockDefinitionOptions() { IsProofOfStake = true })
=======
: base(consensusLoop, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network)
>>>>>>>
: base(consensusManager, dateTimeProvider, loggerFactory, mempool, mempoolLock, minerSettings, network) |
<<<<<<<
new Mock<CoinView>().Object, receiptStorage.Object, new Mock<IChainState>().Object);
=======
new Mock<ILookaheadBlockPuller>().Object,
new Mock<ICoinView>().Object, receiptStorage.Object);
>>>>>>>
new Mock<ICoinView>().Object, receiptStorage.Object, new Mock<IChainState>().Object); |
<<<<<<<
=======
private readonly StakeChainStore stakeChain;
private readonly ConsensusSettings consensusSettings;
private readonly IConsensusRules consensusRules;
>>>>>>>
<<<<<<<
ConsensusStats consensusStats)
=======
ConsensusStats consensusStats,
IConsensusRules consensusRules,
NodeSettings nodeSettings,
ConsensusSettings consensusSettings,
StakeChainStore stakeChain = null)
>>>>>>>
ConsensusStats consensusStats)
<<<<<<<
=======
this.consensusSettings = consensusSettings;
this.consensusRules = consensusRules;
>>>>>>>
<<<<<<<
=======
this.consensusRules.Register();
>>>>>>>
<<<<<<<
services.AddSingleton<IConsensusRuleEngine, PowConsensusRuleEngine>();
services.AddSingleton<IRuleRegistration, PowConsensusRulesRegistration>();
=======
services.AddSingleton<IConsensusRules, PowConsensusRules>();
fullNodeBuilder.Network.Consensus.Rules = new PowConsensusRulesRegistration().GetRules();
>>>>>>>
services.AddSingleton<IConsensusRuleEngine, PowConsensusRuleEngine>();
fullNodeBuilder.Network.Consensus.Rules = new PowConsensusRulesRegistration().GetRules();
<<<<<<<
services.AddSingleton<IConsensusRuleEngine, PosConsensusRuleEngine>();
services.AddSingleton<IRuleRegistration, PosConsensusRulesRegistration>();
=======
services.AddSingleton<IConsensusRules, PosConsensusRules>();
fullNodeBuilder.Network.Consensus.Rules = new PosConsensusRulesRegistration().GetRules();
>>>>>>>
services.AddSingleton<IConsensusRuleEngine, PosConsensusRuleEngine>();
fullNodeBuilder.Network.Consensus.Rules = new PosConsensusRulesRegistration().GetRules(); |
<<<<<<<
using Stratis.Bitcoin.Base;
=======
using NBitcoin.Rules;
>>>>>>>
using NBitcoin.Rules;
using Stratis.Bitcoin.Base;
<<<<<<<
private Mock<IRuleRegistration> ruleRegistration;
public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, IStakeChain stakeChain, IStakeValidator stakeValidator, IChainState chainState)
: base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, stakeChain, stakeValidator, chainState)
=======
public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, ILookaheadBlockPuller lookaheadBlockPuller, IStakeChain stakeChain, IStakeValidator stakeValidator)
: base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, lookaheadBlockPuller, stakeChain, stakeValidator)
>>>>>>>
public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ConcurrentChain chain, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, IStakeChain stakeChain, IStakeValidator stakeValidator, IChainState chainState)
: base(network, loggerFactory, dateTimeProvider, chain, nodeDeployments, consensusSettings, checkpoints, uxtoSet, stakeChain, stakeValidator, chainState)
<<<<<<<
testRulesContext.ConsensusRuleEngine = new PowConsensusRuleEngine(testRulesContext.Network, testRulesContext.LoggerFactory, testRulesContext.DateTimeProvider, testRulesContext.Chain, deployments, consensusSettings, testRulesContext.Checkpoints, new InMemoryCoinView(new uint256()), testRulesContext.ChainState).Register(new FullNodeBuilderConsensusExtension.PowConsensusRulesRegistration());
=======
testRulesContext.Consensus = new PowConsensusRules(testRulesContext.Network, testRulesContext.LoggerFactory, testRulesContext.DateTimeProvider, testRulesContext.Chain, deployments, consensusSettings, testRulesContext.Checkpoints, new InMemoryCoinView(new uint256()), new Mock<ILookaheadBlockPuller>().Object).Register();
>>>>>>>
testRulesContext.ConsensusRuleEngine = new PowConsensusRuleEngine(testRulesContext.Network, testRulesContext.LoggerFactory, testRulesContext.DateTimeProvider, testRulesContext.Chain, deployments, consensusSettings, testRulesContext.Checkpoints, new InMemoryCoinView(new uint256()), testRulesContext.ChainState).Register(); |
<<<<<<<
using Stratis.Bitcoin.Consensus;
using Stratis.Bitcoin.Features.Consensus.CoinViews;
using Stratis.Bitcoin.Features.SmartContracts.Consensus;
=======
using Stratis.Bitcoin.Features.SmartContracts.ReflectionExecutor;
>>>>>>>
using Stratis.Bitcoin.Consensus;
using Stratis.Bitcoin.Features.Consensus.CoinViews;
using Stratis.Bitcoin.Features.SmartContracts.Consensus;
using Stratis.Bitcoin.Features.SmartContracts.ReflectionExecutor;
<<<<<<<
using Stratis.Bitcoin.Tests.Common;
using Stratis.Bitcoin.Utilities;
using Stratis.SmartContracts.Core;
using Stratis.SmartContracts.Core.Receipts;
using Stratis.SmartContracts.Core.State;
=======
using Stratis.Bitcoin.Tests.Common;
>>>>>>>
using Stratis.Bitcoin.Tests.Common;
using Stratis.Bitcoin.Utilities;
using Stratis.SmartContracts.Core;
using Stratis.SmartContracts.Core.Receipts;
using Stratis.SmartContracts.Core.State;
<<<<<<<
Network network = KnownNetworks.StratisRegTest;
var chain = new ConcurrentChain(network);
var contractState = new ContractStateRepositoryRoot();
var executorFactory = new Mock<ISmartContractExecutorFactory>();
=======
Network network = KnownNetworks.StratisRegTest;
>>>>>>>
Network network = KnownNetworks.StratisRegTest;
var chain = new ConcurrentChain(network);
var contractState = new ContractStateRepositoryRoot();
var executorFactory = new Mock<ISmartContractExecutorFactory>();
<<<<<<<
var receiptStorage = new Mock<ISmartContractReceiptStorage>();
var consensusRules = new SmartContractPowConsensusRuleEngine(
chain, new Mock<ICheckpoints>().Object, new Configuration.Settings.ConsensusSettings(),
DateTimeProvider.Default, executorFactory.Object, loggerFactory, network,
new Base.Deployments.NodeDeployments(network, chain), contractState,
new Mock<ILookaheadBlockPuller>().Object,
new Mock<ICoinView>().Object, receiptStorage.Object);
=======
>>>>>>>
var receiptStorage = new Mock<ISmartContractReceiptStorage>();
var consensusRules = new SmartContractPowConsensusRuleEngine(
chain, new Mock<ICheckpoints>().Object, new Configuration.Settings.ConsensusSettings(),
DateTimeProvider.Default, executorFactory.Object, loggerFactory, network,
new Base.Deployments.NodeDeployments(network, chain), contractState,
new Mock<ILookaheadBlockPuller>().Object,
new Mock<ICoinView>().Object, receiptStorage.Object); |
<<<<<<<
using NBitcoin.Policy;
using Stratis.Bitcoin.Base;
=======
using NBitcoin.Policy;
using Stratis.Bitcoin.BlockPulling;
>>>>>>>
using NBitcoin.Policy;
<<<<<<<
public sealed class ReflectionVirtualMachineFeature : FullNodeFeature
{
private readonly IConsensusRuleEngine consensusRules;
private readonly ILogger logger;
public ReflectionVirtualMachineFeature(IConsensusRuleEngine consensusRules, ILoggerFactory loggerFactory)
{
this.consensusRules = consensusRules;
this.logger = loggerFactory.CreateLogger(this.GetType().FullName);
}
public override void Initialize()
{
this.logger.LogInformation("Reflection Virtual Machine Injected.");
this.consensusRules.Register(new ReflectionRuleRegistration());
}
}
=======
>>>>>>>
<<<<<<<
services.AddSingleton<IConsensusRuleEngine, SmartContractConsensusRuleEngine>();
services.AddSingleton<IRuleRegistration, SmartContractRuleRegistration>();
=======
services.AddSingleton<IConsensusRules, SmartContractConsensusRules>();
fullNodeBuilder.Network.Consensus.Rules = new SmartContractRuleRegistration().GetRules();
>>>>>>>
services.AddSingleton<IConsensusRuleEngine, SmartContractConsensusRuleEngine>();
fullNodeBuilder.Network.Consensus.Rules = new SmartContractRuleRegistration().GetRules(); |
<<<<<<<
public SmartContractMempoolValidator(ITxMempool memPool, MempoolSchedulerLock mempoolLock, IDateTimeProvider dateTimeProvider, MempoolSettings mempoolSettings, ConcurrentChain chain, CoinView coinView, ILoggerFactory loggerFactory, NodeSettings nodeSettings, IConsensusRuleEngine consensusRules)
=======
public SmartContractMempoolValidator(ITxMempool memPool, MempoolSchedulerLock mempoolLock, IDateTimeProvider dateTimeProvider, MempoolSettings mempoolSettings, ConcurrentChain chain, ICoinView coinView, ILoggerFactory loggerFactory, NodeSettings nodeSettings, IConsensusRules consensusRules)
>>>>>>>
public SmartContractMempoolValidator(ITxMempool memPool, MempoolSchedulerLock mempoolLock, IDateTimeProvider dateTimeProvider, MempoolSettings mempoolSettings, ConcurrentChain chain, ICoinView coinView, ILoggerFactory loggerFactory, NodeSettings nodeSettings, IConsensusRuleEngine consensusRules) |
<<<<<<<
/// <summary>Reference to the parent block puller.</summary>
public BlockPuller Puller => this.puller;
/// <summary>Reference to a component responsible for keeping the chain up to date.</summary>
public BlockStore.ChainBehavior ChainBehavior { get; private set; }
=======
public ChainHeadersBehavior ChainHeadersBehavior { get; private set; }
>>>>>>>
/// <summary>Reference to the parent block puller.</summary>
public BlockPuller Puller => this.puller;
/// <summary>Reference to a component responsible for keeping the chain up to date.</summary>
public ChainHeadersBehavior ChainHeadersBehavior { get; private set; }
<<<<<<<
// Be careful not to ask the block from a node that does not have it
// (we can check the ChainBehavior.PendingTip to know where the node is standing).
=======
// Be careful to not ask block to a node that do not have it
// (we can check the ChainHeadersBehavior.PendingTip to know where the node is standing)
>>>>>>>
// Be careful not to ask the block from a node that does not have it
// (we can check the ChainHeadersBehavior.PendingTip to know where the node is standing).
<<<<<<<
if (behavior.ChainBehavior?.PendingTip?.Height >= minHeight)
=======
if (behavior.ChainHeadersBehavior?.PendingTip?.Height >= minHight)
>>>>>>>
if (behavior.ChainHeadersBehavior?.PendingTip?.Height >= minHeight) |
<<<<<<<
SemaphoreSlim.Wait(CancelSource.Token);
Logger.LogTrace("RemoveFrontend() locked");
Logger.LogInformation("Unregistering frontend of dispatcher {0}", d.GetHashCode());
DisappearingMessagesManager.RemoveFrontend(d);
Frames.Remove(d);
SemaphoreSlim.Release();
Logger.LogTrace("RemoveFrontend() released");
=======
await SemaphoreSlim.WaitAsync(CancelSource.Token);
try
{
Logger.LogTrace("RemoveFrontend() locked");
Logger.LogInformation("Unregistering frontend of dispatcher {0}", d.GetHashCode());
Frames.Remove(d);
}
catch (Exception e)
{
Logger.LogCritical($"RemoveFrontend failed(): {e.Message} ({e.GetType()})\n{e.StackTrace}");
}
finally
{
SemaphoreSlim.Release();
Logger.LogTrace("RemoveFrontend() released");
}
>>>>>>>
await SemaphoreSlim.WaitAsync(CancelSource.Token);
try
{
Logger.LogTrace("RemoveFrontend() locked");
Logger.LogInformation("Unregistering frontend of dispatcher {0}", d.GetHashCode());
DisappearingMessagesManager.RemoveFrontend(d);
Frames.Remove(d);
}
catch (Exception e)
{
Logger.LogCritical($"RemoveFrontend failed(): {e.Message} ({e.GetType()})\n{e.StackTrace}");
}
finally
{
SemaphoreSlim.Release();
Logger.LogTrace("RemoveFrontend() released");
}
<<<<<<<
UpdateMessageExpiration(message, conversation.ExpiresInSeconds);
SignalDBContext.UpdateMessageRead(result.Index, conversation);
await DispatchMessageRead(result.Index + 1, conversation);
=======
var updatedConversation = SignalDBContext.UpdateMessageRead(message.ComposedTimestamp);
await DispatchMessageRead(updatedConversation);
>>>>>>>
UpdateMessageExpiration(message, conversation.ExpiresInSeconds);
var updatedConversation = SignalDBContext.UpdateMessageRead(message.ComposedTimestamp);
await DispatchMessageRead(updatedConversation); |
<<<<<<<
if (!Token.IsCancellationRequested)
{
await MessageSender.SendMessage(Token, new SignalServiceAddress(outgoingSignalMessage.ThreadId), message);
UpdateExpiresAt(outgoingSignalMessage);
DisappearingMessagesManager.QueueForDeletion(outgoingSignalMessage);
outgoingSignalMessage.Status = SignalMessageStatus.Confirmed;
}
=======
sendable = Handle.OutgoingQueue.Take(Token);
Logger.LogTrace($"Sending {sendable.GetType().Name}");
await sendable.Send(messageSender, Token);
>>>>>>>
if (!Token.IsCancellationRequested)
{
await MessageSender.SendMessage(Token, new SignalServiceAddress(outgoingSignalMessage.ThreadId), message);
UpdateExpiresAt(outgoingSignalMessage);
DisappearingMessagesManager.QueueForDeletion(outgoingSignalMessage);
outgoingSignalMessage.Status = SignalMessageStatus.Confirmed;
}
sendable = Handle.OutgoingQueue.Take(Token);
Logger.LogTrace($"Sending {sendable.GetType().Name}");
await sendable.Send(messageSender, Token);
<<<<<<<
await SendMessage(recipients, message);
UpdateExpiresAt(outgoingSignalMessage);
DisappearingMessagesManager.QueueForDeletion(outgoingSignalMessage);
outgoingSignalMessage.Status = SignalMessageStatus.Confirmed;
=======
await Handle.HandleOutgoingKeyChangeLocked(e.E164number, Base64.EncodeBytes(e.IdentityKey.serialize()));
>>>>>>>
await SendMessage(recipients, message);
UpdateExpiresAt(outgoingSignalMessage);
DisappearingMessagesManager.QueueForDeletion(outgoingSignalMessage);
outgoingSignalMessage.Status = SignalMessageStatus.Confirmed;
await Handle.HandleOutgoingKeyChangeLocked(e.E164number, Base64.EncodeBytes(e.IdentityKey.serialize())); |
<<<<<<<
protected override void OnDisplaying(HiddenField element, ElementDisplayingContext context) {
context.ElementShape.TokenizedValue = _tokenizer.Replace(element.Value, null);
=======
protected override void OnDisplaying(HiddenField element, ElementDisplayContext context) {
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
context.ElementShape.ProcessedValue = _tokenizer.Replace(element.Value, context.GetTokenData());
>>>>>>>
protected override void OnDisplaying(HiddenField element, ElementDisplayingContext context) {
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
context.ElementShape.ProcessedValue = _tokenizer.Replace(element.Value, context.GetTokenData()); |
<<<<<<<
=======
// Concat Rule
tok = scanner.LookAhead(TokenType.EOI); // Option Rule
if (tok.Type == TokenType.EOI)
{
tok = scanner.Scan(TokenType.EOI); // Terminal Rule: EOI
n = node.CreateNode(tok, tok.ToString() );
node.Token.UpdateRange(tok);
node.Nodes.Add(n);
if (tok.Type != TokenType.EOI) {
tree.Errors.Add(new ParseError("Unexpected token '" + tok.Text.Replace("\n", "") + "' found. Expected " + TokenType.EOI.ToString(), 0x1001, tok));
return;
}
}
>>>>>>>
<<<<<<<
private void Parseempty_stmt(ParseNode parent)
{
Token tok;
ParseNode n;
ParseNode node = parent.CreateNode(scanner.GetToken(TokenType.empty_stmt), "empty_stmt");
parent.Nodes.Add(node);
tok = scanner.Scan(TokenType.EOI);
n = node.CreateNode(tok, tok.ToString() );
node.Token.UpdateRange(tok);
node.Nodes.Add(n);
if (tok.Type != TokenType.EOI) {
tree.Errors.Add(new ParseError("Unexpected token '" + tok.Text.Replace("\n", "") + "' found. Expected " + TokenType.EOI.ToString(), 0x1001, tok));
return;
}
parent.Token.UpdateRange(node.Token);
}
private void Parseset_stmt(ParseNode parent)
=======
private void Parseset_stmt(ParseNode parent) // NonTerminalSymbol: set_stmt
>>>>>>>
private void Parseempty_stmt(ParseNode parent) // NonTerminalSymbol: empty_stmt
{
Token tok;
ParseNode n;
ParseNode node = parent.CreateNode(scanner.GetToken(TokenType.empty_stmt), "empty_stmt");
parent.Nodes.Add(node);
tok = scanner.Scan(TokenType.EOI); // Terminal Rule: EOI
n = node.CreateNode(tok, tok.ToString() );
node.Token.UpdateRange(tok);
node.Nodes.Add(n);
if (tok.Type != TokenType.EOI) {
tree.Errors.Add(new ParseError("Unexpected token '" + tok.Text.Replace("\n", "") + "' found. Expected " + TokenType.EOI.ToString(), 0x1001, tok));
return;
}
parent.Token.UpdateRange(node.Token);
} // NonTerminalSymbol: empty_stmt
private void Parseset_stmt(ParseNode parent) // NonTerminalSymbol: set_stmt
<<<<<<<
tok = scanner.LookAhead(TokenType.EOI);
if (tok.Type == TokenType.EOI)
{
tok = scanner.Scan(TokenType.EOI);
n = node.CreateNode(tok, tok.ToString() );
node.Token.UpdateRange(tok);
node.Nodes.Add(n);
if (tok.Type != TokenType.EOI) {
tree.Errors.Add(new ParseError("Unexpected token '" + tok.Text.Replace("\n", "") + "' found. Expected " + TokenType.EOI.ToString(), 0x1001, tok));
return;
}
}
tok = scanner.LookAhead(TokenType.ELSE);
=======
// Concat Rule
tok = scanner.LookAhead(TokenType.ELSE); // Option Rule
>>>>>>>
// Concat Rule
tok = scanner.LookAhead(TokenType.EOI); // Option Rule
if (tok.Type == TokenType.EOI)
{
tok = scanner.Scan(TokenType.EOI); // Terminal Rule: EOI
n = node.CreateNode(tok, tok.ToString() );
node.Token.UpdateRange(tok);
node.Nodes.Add(n);
if (tok.Type != TokenType.EOI) {
tree.Errors.Add(new ParseError("Unexpected token '" + tok.Text.Replace("\n", "") + "' found. Expected " + TokenType.EOI.ToString(), 0x1001, tok));
return;
}
}
// Concat Rule
tok = scanner.LookAhead(TokenType.ELSE); // Option Rule
<<<<<<<
tok = scanner.LookAhead(TokenType.PLUSMINUS, TokenType.NOT, TokenType.DEFINED, TokenType.INTEGER, TokenType.DOUBLE, TokenType.TRUEFALSE, TokenType.IDENTIFIER, TokenType.FILEIDENT, TokenType.BRACKETOPEN, TokenType.STRING, TokenType.CURLYOPEN);
=======
// Concat Rule
tok = scanner.LookAhead(TokenType.PLUSMINUS, TokenType.NOT, TokenType.DEFINED, TokenType.INTEGER, TokenType.DOUBLE, TokenType.TRUEFALSE, TokenType.IDENTIFIER, TokenType.FILEIDENT, TokenType.BRACKETOPEN, TokenType.STRING); // Option Rule
>>>>>>>
// Concat Rule
tok = scanner.LookAhead(TokenType.PLUSMINUS, TokenType.NOT, TokenType.DEFINED, TokenType.INTEGER, TokenType.DOUBLE, TokenType.TRUEFALSE, TokenType.IDENTIFIER, TokenType.FILEIDENT, TokenType.BRACKETOPEN, TokenType.STRING, TokenType.CURLYOPEN); // Option Rule
<<<<<<<
tok = scanner.LookAhead(TokenType.PLUSMINUS, TokenType.NOT, TokenType.DEFINED, TokenType.INTEGER, TokenType.DOUBLE, TokenType.TRUEFALSE, TokenType.IDENTIFIER, TokenType.FILEIDENT, TokenType.BRACKETOPEN, TokenType.STRING, TokenType.CURLYOPEN);
=======
// Concat Rule
tok = scanner.LookAhead(TokenType.PLUSMINUS, TokenType.NOT, TokenType.DEFINED, TokenType.INTEGER, TokenType.DOUBLE, TokenType.TRUEFALSE, TokenType.IDENTIFIER, TokenType.FILEIDENT, TokenType.BRACKETOPEN, TokenType.STRING); // Option Rule
>>>>>>>
// Concat Rule
tok = scanner.LookAhead(TokenType.PLUSMINUS, TokenType.NOT, TokenType.DEFINED, TokenType.INTEGER, TokenType.DOUBLE, TokenType.TRUEFALSE, TokenType.IDENTIFIER, TokenType.FILEIDENT, TokenType.BRACKETOPEN, TokenType.STRING, TokenType.CURLYOPEN); // Option Rule |
<<<<<<<
public Lexicon(IEnumerable<KeyValuePair<Structure, Structure>> lexicon) : this()
=======
public Lexicon(IEnumerable<Structure> values) : this()
{
FillWithEnumerableValues(values);
}
private Lexicon(IEnumerable<KeyValuePair<Structure, Structure>> lexicon)
: this()
>>>>>>>
public Lexicon(IEnumerable<Structure> values) : this()
{
FillWithEnumerableValues(values);
}
public Lexicon(IEnumerable<KeyValuePair<Structure, Structure>> lexicon)
: this() |
<<<<<<<
public static VersionInfo VersionInfo;
private readonly SharedObjects shared;
=======
public static VersionInfo VersionInfo = new VersionInfo(0, 17, 2);
>>>>>>>
public static VersionInfo VersionInfo = new VersionInfo(0, 17, 2);
private readonly SharedObjects shared; |
<<<<<<<
using kOS.Suffixed.PartModuleField;
using kOS.Module;
=======
using kOS.Safe.Encapsulation;
>>>>>>>
using kOS.Suffixed.PartModuleField;
using kOS.Module;
using kOS.Safe.Encapsulation;
<<<<<<<
[Function("processor")]
public class FunctionProcessor : FunctionBase
{
public override void Execute(SharedObjects shared)
{
object processorTagOrVolume = PopValueAssert(shared, true);
AssertArgBottomAndConsume(shared);
kOSProcessor processor;
if (processorTagOrVolume is Volume) {
processor = shared.ProcessorMgr.GetProcessor(processorTagOrVolume as Volume);
} else if (processorTagOrVolume is string) {
processor = shared.ProcessorMgr.GetProcessor(processorTagOrVolume as string);
} else {
throw new KOSInvalidArgumentException("processor", "processorId", "String or Volume expected");
}
if (processor == null)
{
throw new KOSInvalidArgumentException("processor", "processorId", "Processor with that volume or name was not found");
}
ReturnValue = PartModuleFieldsFactory.Construct(processor, shared);
}
}
=======
[Function("pidloop")]
public class PIDLoopConstructor : FunctionBase
{
public override void Execute(SharedObjects shared)
{
int args = CountRemainingArgs(shared);
double kd;
double ki;
double kp;
double maxoutput;
double minoutput;
switch (args)
{
case 0:
this.ReturnValue = new PIDLoop();
break;
case 1:
kp = GetDouble(PopValueAssert(shared));
this.ReturnValue = new PIDLoop(kp, 0, 0);
break;
case 3:
kd = GetDouble(PopValueAssert(shared));
ki = GetDouble(PopValueAssert(shared));
kp = GetDouble(PopValueAssert(shared));
this.ReturnValue = new PIDLoop(kp, ki, kd);
break;
case 5:
maxoutput = GetDouble(PopValueAssert(shared));
minoutput = GetDouble(PopValueAssert(shared));
kd = GetDouble(PopValueAssert(shared));
ki = GetDouble(PopValueAssert(shared));
kp = GetDouble(PopValueAssert(shared));
this.ReturnValue = new PIDLoop(kp, ki, kd, maxoutput, minoutput);
break;
default:
throw new KOSArgumentMismatchException(new[] { 0, 1, 3, 5 }, args);
}
AssertArgBottomAndConsume(shared);
}
}
>>>>>>>
[Function("processor")]
public class FunctionProcessor : FunctionBase
{
public override void Execute(SharedObjects shared)
{
object processorTagOrVolume = PopValueAssert(shared, true);
AssertArgBottomAndConsume(shared);
kOSProcessor processor;
if (processorTagOrVolume is Volume) {
processor = shared.ProcessorMgr.GetProcessor(processorTagOrVolume as Volume);
} else if (processorTagOrVolume is string) {
processor = shared.ProcessorMgr.GetProcessor(processorTagOrVolume as string);
} else {
throw new KOSInvalidArgumentException("processor", "processorId", "String or Volume expected");
}
if (processor == null)
{
throw new KOSInvalidArgumentException("processor", "processorId", "Processor with that volume or name was not found");
}
ReturnValue = PartModuleFieldsFactory.Construct(processor, shared);
}
}
[Function("pidloop")]
public class PIDLoopConstructor : FunctionBase
{
public override void Execute(SharedObjects shared)
{
int args = CountRemainingArgs(shared);
double kd;
double ki;
double kp;
double maxoutput;
double minoutput;
switch (args)
{
case 0:
this.ReturnValue = new PIDLoop();
break;
case 1:
kp = GetDouble(PopValueAssert(shared));
this.ReturnValue = new PIDLoop(kp, 0, 0);
break;
case 3:
kd = GetDouble(PopValueAssert(shared));
ki = GetDouble(PopValueAssert(shared));
kp = GetDouble(PopValueAssert(shared));
this.ReturnValue = new PIDLoop(kp, ki, kd);
break;
case 5:
maxoutput = GetDouble(PopValueAssert(shared));
minoutput = GetDouble(PopValueAssert(shared));
kd = GetDouble(PopValueAssert(shared));
ki = GetDouble(PopValueAssert(shared));
kp = GetDouble(PopValueAssert(shared));
this.ReturnValue = new PIDLoop(kp, ki, kd, maxoutput, minoutput);
break;
default:
throw new KOSArgumentMismatchException(new[] { 0, 1, 3, 5 }, args);
}
AssertArgBottomAndConsume(shared);
}
} |
<<<<<<<
if (blizzyButton != null)
blizzyButton.Destroy();
// force close the font picker window if it was still open:
if (fontPicker != null)
{
fontPicker.Close();
Destroy(fontPicker);
fontPicker = null;
}
=======
>>>>>>>
// force close the font picker window if it was still open:
if (fontPicker != null)
{
fontPicker.Close();
Destroy(fontPicker);
fontPicker = null;
} |
<<<<<<<
dumped[key] = Dump(dumped[key] as IDumper, includeType);
} else if (IsEncapsulatedValue(dumped[key]) || IsValue(dumped[key]))
=======
dumped[key] = Dump(dump, includeType);
} else if (IsValue(dumped[key]))
>>>>>>>
dumped[key] = Dump(dump, includeType);
} else if (IsEncapsulatedValue(dumped[key]) || IsValue(dumped[key])) |
<<<<<<<
AddSuffix("LENGTH", new NoArgsSuffix<ScalarValue> (() => Collection.Count));
AddSuffix("CLEAR", new NoArgsSuffix (() => Collection.Clear()));
=======
AddSuffix("LENGTH", new NoArgsSuffix<ScalarIntValue> (() => Collection.Count));
AddSuffix("CLEAR", new NoArgsVoidSuffix (() => Collection.Clear()));
>>>>>>>
AddSuffix("LENGTH", new NoArgsSuffix<ScalarValue> (() => Collection.Count));
AddSuffix("CLEAR", new NoArgsVoidSuffix (() => Collection.Clear()));
<<<<<<<
AddSuffix("INSERT", new TwoArgsSuffix<int, T> ((index, toAdd) => Collection.Insert(index, toAdd)));
AddSuffix("REMOVE", new OneArgsSuffix<ScalarValue> (toRemove => Collection.RemoveAt(toRemove)));
AddSuffix("SUBLIST", new TwoArgsSuffix<ListValue, ScalarValue, ScalarValue>(SubListMethod));
=======
AddSuffix("INSERT", new TwoArgsSuffix<ScalarIntValue, T> ((index, toAdd) => Collection.Insert(index, toAdd)));
AddSuffix("REMOVE", new OneArgsSuffix<ScalarIntValue> (toRemove => Collection.RemoveAt(toRemove)));
AddSuffix("SUBLIST", new TwoArgsSuffix<ListValue, ScalarIntValue, ScalarIntValue>(SubListMethod));
>>>>>>>
AddSuffix("INSERT", new TwoArgsSuffix<ScalarValue, T> ((index, toAdd) => Collection.Insert(index, toAdd)));
AddSuffix("REMOVE", new OneArgsSuffix<ScalarValue> (toRemove => Collection.RemoveAt(toRemove)));
AddSuffix("SUBLIST", new TwoArgsSuffix<ListValue, ScalarValue, ScalarValue>(SubListMethod)); |
<<<<<<<
using kOS.Callback;
=======
using kOS.Sound;
using System.Collections.Generic;
>>>>>>>
using kOS.Callback;
using kOS.Sound;
using System.Collections.Generic;
<<<<<<<
public GameEventDispatchManager DispatchManager
{
get { return (GameEventDispatchManager)GameEventDispatchManager; }
}
=======
public Dictionary<int, VoiceValue> AllVoiceValues { get; private set; }
>>>>>>>
public GameEventDispatchManager DispatchManager
{
get { return (GameEventDispatchManager)GameEventDispatchManager; }
}
public Dictionary<int, VoiceValue> AllVoiceValues { get; private set; } |
<<<<<<<
using kOS.Utilities;
=======
using kOS.Safe.Encapsulation.Suffixes;
>>>>>>>
using kOS.Utilities;
using kOS.Safe.Encapsulation.Suffixes;
<<<<<<<
new Vector(Vector3d.zero);
=======
new Vector(default(float), default(float), default(float));
InitializeSuffixes();
>>>>>>>
new Vector(Vector3d.zero);
InitializeSuffixes(); |
<<<<<<<
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
=======
using UnityEngine;
>>>>>>>
using System;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
<<<<<<<
private int verticalSectionCount = 0;
private int horizontalSectionCount = 0;
private Vector2 scrollPos = new Vector2(200,350);
=======
private const float MIN_WIDTH = 220f; // keeps GUILayout from being stupid.
>>>>>>>
private int verticalSectionCount = 0;
private int horizontalSectionCount = 0;
private Vector2 scrollPos = new Vector2(200,350);
private const float MIN_WIDTH = 220f; // keeps GUILayout from being stupid.
<<<<<<<
=======
private Part GetPartFromRayCast(Ray ray)
{
RaycastHit hit;
if (!Physics.Raycast(ray, out hit, 999999f)) return null;
if (hit.collider == null || hit.collider.gameObject == null) return null;
Part returnMe;
GameObject gObject = hit.collider.gameObject;
// That found the innermost hit - need to walk up chain of parents until
// hitting a Unity GameObject that is also a KSP part.
while (true) // (there is an explicit break in the loop).
{
returnMe = Part.FromGO(gObject);
if (returnMe == null && gObject != null &&
gObject.transform.parent != null &&
gObject.transform.parent.gameObject != null)
{
gObject = gObject.transform.parent.gameObject;
}
else
{
break; // quits when either returnMe is found, or a null was hit walking up the parent chain.
}
}
return returnMe;
}
>>>>>>>
<<<<<<<
windowRect = GUILayout.Window(uniqueId, windowRect, DrawWindow, "kOS " + versionString);
=======
windowRect = GUILayout.Window(UNIQUE_ID, windowRect, DrawWindow,"kOS " + versionString, GUILayout.MinWidth(MIN_WIDTH));
>>>>>>>
windowRect = GUILayout.Window(UNIQUE_ID, windowRect, DrawWindow, "kOS " + versionString); |
<<<<<<<
public static object InDirectSunlight(Vessel vessel)
{
bool DirectSunlight = false; // No panels at all? Always return false
foreach (Part p in vessel.parts)
{
foreach (ModuleDeployableSolarPanel c in p.FindModulesImplementing<ModuleDeployableSolarPanel>())
{
DirectSunlight = true;
foreach (var body in FlightGlobals.fetch.bodies)
{
if (c.status.ToString().ToUpper() == "BLOCKED BY "+ body.name.ToUpper())
{
// if blocked celestial body return false.
return false;
}
}
}
}
return DirectSunlight;
}
=======
public static float GetVesselLattitude(Vessel vessel)
{
float retVal = (float)vessel.latitude;
if (retVal > 90) return 90;
if (retVal < -90) return -90;
return retVal;
}
public static float GetVesselLongitude(Vessel vessel)
{
float retVal = (float)vessel.longitude;
while (retVal > 180) retVal -= 360;
while (retVal < -180) retVal += 360;
return retVal;
}
>>>>>>>
public static object InDirectSunlight(Vessel vessel)
{
bool DirectSunlight = false; // No panels at all? Always return false
foreach (Part p in vessel.parts)
{
foreach (ModuleDeployableSolarPanel c in p.FindModulesImplementing<ModuleDeployableSolarPanel>())
{
DirectSunlight = true;
foreach (var body in FlightGlobals.fetch.bodies)
{
if (c.status.ToString().ToUpper() == "BLOCKED BY "+ body.name.ToUpper())
{
// if blocked celestial body return false.
return false;
}
}
}
}
return DirectSunlight;
}
public static float GetVesselLattitude(Vessel vessel)
{
float retVal = (float)vessel.latitude;
if (retVal > 90) return 90;
if (retVal < -90) return -90;
return retVal;
}
public static float GetVesselLongitude(Vessel vessel)
{
float retVal = (float)vessel.longitude;
while (retVal > 180) retVal -= 360;
while (retVal < -180) retVal += 360;
return retVal;
} |
<<<<<<<
AddSuffix(new[] { "PILOTMAINTHROTTLE" }, new ClampSetSuffix<float>(() => Vessel.ctrlState.mainThrottle, SetPilotMainThrottle, 0, 1));
AddSuffix(new[] { "WHEELTHROTTLE" }, new ClampSetSuffix<float>(() => wheelThrottle, value => wheelThrottle = value, -1, 1));
AddSuffix(new[] { "WHEELTHROTTLETRIM" }, new ClampSetSuffix<float>(() => wheelThrottleTrim, value => wheelThrottleTrim = value, -1, 1));
AddSuffix(new[] { "PILOTWHEELTHROTTLE" }, new Suffix<float>(() => Vessel.ctrlState.wheelThrottle));
AddSuffix(new[] { "PILOTWHEELTHROTTLETRIM" }, new Suffix<float>(() => Vessel.ctrlState.wheelThrottleTrim));
=======
AddSuffix(new[] { "WHEELTHROTTLE" }, new ClampSetSuffix<float>(() => wheelThrottle, value => wheelThrottle = value, 0, 1));
AddSuffix(new[] { "WHEELTHROTTLETRIM" }, new ClampSetSuffix<float>(() => wheelThrottleTrim, value => wheelThrottleTrim = value, 0, 1));
>>>>>>>
AddSuffix(new[] { "WHEELTHROTTLE" }, new ClampSetSuffix<float>(() => wheelThrottle, value => wheelThrottle = value, -1, 1));
AddSuffix(new[] { "WHEELTHROTTLETRIM" }, new ClampSetSuffix<float>(() => wheelThrottleTrim, value => wheelThrottleTrim = value, -1, 1));
<<<<<<<
public void Unbind()
{
UnityEngine.Debug.Log("kOS: FlightControl Unbinding");
if (!bound) return;
if (RemoteTechHook.IsAvailable())
{
RemoteTechHook.Instance.RemoveSanctionedPilot(Vessel.id, OnFlyByWire);
}
else
{
Vessel.OnPreAutopilotUpdate -= OnFlyByWire;
}
bound = false;
UnityEngine.Debug.Log("kOS: FlightControl Unbound");
}
=======
>>>>>>> |
<<<<<<<
this.Password,
false);
try
{
await this.ConnectToDeviceAsync(
connectOptions,
string.Empty);
}
catch (Exception e)
{
this.StatusMessage = string.Format(
"Failed to connect to the device ({0})",
e.Message);
}
=======
this.Password);
await this.ConnectToDeviceAsync(
connectOptions);
>>>>>>>
this.Password);
try
{
await this.ConnectToDeviceAsync(
connectOptions);
}
catch (Exception e)
{
this.StatusMessage = string.Format(
"Failed to connect to the device ({0})",
e.Message);
}
<<<<<<<
try
{
this.LaunchApp();
}
catch (Exception e)
{
this.StatusMessage = string.Format(
"Failed to launch the app on one or more devices ({0})",
e.Message);
}
=======
this.LaunchApp();
});
this.LoadSessionFileCommand = new Command(
async (parameter) =>
{
await this.LoadSessionFileAsync();
});
this.RefreshCommonAppsCommand = new Command(
async (parameter) =>
{
await this.RefreshCommonAppsAsync();
>>>>>>>
try
{
this.LaunchApp();
}
catch (Exception e)
{
this.StatusMessage = string.Format(
"Failed to launch the app on one or more devices ({0})",
e.Message);
}
this.LaunchApp();
});
this.LoadSessionFileCommand = new Command(
async (parameter) =>
{
await this.LoadSessionFileAsync(); |
<<<<<<<
AddAssert("mod rate applied", () => MusicController.CurrentTrack.Rate != 1);
=======
AddAssert("mod rate applied", () => Beatmap.Value.Track.Rate != 1);
AddUntilStep("wait for non-null player", () => player != null);
>>>>>>>
AddAssert("mod rate applied", () => MusicController.CurrentTrack.Rate != 1);
AddUntilStep("wait for non-null player", () => player != null); |
<<<<<<<
[TestCase(false)]
[TestCase(true)]
public void TestEmptyComboColours(bool allowFallback)
{
AddStep("Add custom combo colours to source1", () => source1.Configuration.ComboColours = new List<Color4>
{
new Color4(100, 150, 200, 255),
new Color4(55, 110, 166, 255),
new Color4(75, 125, 175, 255),
});
AddStep("Disallow default colours fallback in source2", () => source2.Configuration.AllowDefaultComboColoursFallback = allowFallback);
AddAssert($"Check retrieved combo colours from {(allowFallback ? "source1" : "fallback source")}", () =>
{
var expectedColours = allowFallback ? SkinConfiguration.DefaultComboColours : source1.Configuration.ComboColours;
return requester.GetConfig<GlobalSkinConfiguration, IReadOnlyList<Color4>>(GlobalSkinConfiguration.ComboColours)?.Value?.SequenceEqual(expectedColours) ?? false;
});
}
=======
[Test]
public void TestLegacyVersionLookup()
{
AddStep("Set source1 version 2.3", () => source1.Configuration.LegacyVersion = 2.3m);
AddStep("Set source2 version null", () => source2.Configuration.LegacyVersion = null);
AddAssert("Check legacy version lookup", () => requester.GetConfig<LegacySkinConfiguration.LegacySetting, decimal>(LegacySkinConfiguration.LegacySetting.Version)?.Value == 2.3m);
}
>>>>>>>
[TestCase(false)]
[TestCase(true)]
public void TestEmptyComboColours(bool allowFallback)
{
AddStep("Add custom combo colours to source1", () => source1.Configuration.ComboColours = new List<Color4>
{
new Color4(100, 150, 200, 255),
new Color4(55, 110, 166, 255),
new Color4(75, 125, 175, 255),
});
AddStep("Disallow default colours fallback in source2", () => source2.Configuration.AllowDefaultComboColoursFallback = allowFallback);
AddAssert($"Check retrieved combo colours from {(allowFallback ? "source1" : "fallback source")}", () =>
{
var expectedColours = allowFallback ? SkinConfiguration.DefaultComboColours : source1.Configuration.ComboColours;
return requester.GetConfig<GlobalSkinConfiguration, IReadOnlyList<Color4>>(GlobalSkinConfiguration.ComboColours)?.Value?.SequenceEqual(expectedColours) ?? false;
});
}
[Test]
public void TestLegacyVersionLookup()
{
AddStep("Set source1 version 2.3", () => source1.Configuration.LegacyVersion = 2.3m);
AddStep("Set source2 version null", () => source2.Configuration.LegacyVersion = null);
AddAssert("Check legacy version lookup", () => requester.GetConfig<LegacySkinConfiguration.LegacySetting, decimal>(LegacySkinConfiguration.LegacySetting.Version)?.Value == 2.3m);
} |
<<<<<<<
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
=======
using osu.Framework.Allocation;
>>>>>>>
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Allocation;
<<<<<<<
using osu.Framework.MathUtils;
=======
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
>>>>>>>
using osu.Framework.MathUtils;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
<<<<<<<
private SampleChannel sampleHover;
protected override bool OnHover(InputState state)
{
sampleHover?.Play();
return base.OnHover(state);
}
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuColour colours)
{
sampleHover = audio.Sample.Get($@"SongSelect/song-ping-variation-{RNG.Next(1, 5)}");
}
=======
protected override bool OnHover(InputState state)
{
hoverLayer.FadeIn(100, Easing.OutQuint);
return base.OnHover(state);
}
protected override void OnHoverLost(InputState state)
{
hoverLayer.FadeOut(1000, Easing.OutQuint);
base.OnHoverLost(state);
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
hoverLayer.Colour = colours.Blue.Opacity(0.1f);
}
>>>>>>>
private SampleChannel sampleHover;
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuColour colours)
{
sampleHover = audio.Sample.Get($@"SongSelect/song-ping-variation-{RNG.Next(1, 5)}");
hoverLayer.Colour = colours.Blue.Opacity(0.1f);
}
protected override bool OnHover(InputState state)
{
sampleHover?.Play();
hoverLayer.FadeIn(100, Easing.OutQuint);
return base.OnHover(state);
}
protected override void OnHoverLost(InputState state)
{
hoverLayer.FadeOut(1000, Easing.OutQuint);
base.OnHoverLost(state);
} |
<<<<<<<
AddButton("DrumRoll", () => addDrumRoll(false));
AddButton("Strong DrumRoll", () => addDrumRoll(true));
=======
AddButton("Swell", addSwell);
>>>>>>>
AddButton("DrumRoll", () => addDrumRoll(false));
AddButton("Strong DrumRoll", () => addDrumRoll(true));
AddButton("Swell", addSwell);
<<<<<<<
private void addDrumRoll(bool strong)
{
var d = new DrumRoll
{
StartTime = Time.Current + 1000,
Distance = 20000,
PreEmpt = 1000,
};
playfield.Add(strong ? new DrawableStrongDrumRoll(d) : new DrawableDrumRoll(d));
}
=======
private void addSwell()
{
playfield.Add(new DrawableSwell(new Swell
{
StartTime = Time.Current + 1000,
EndTime = Time.Current + 5000,
PreEmpt = 1000
}));
}
>>>>>>>
private void addDrumRoll(bool strong)
{
var d = new DrumRoll
{
StartTime = Time.Current + 1000,
Distance = 20000,
PreEmpt = 1000,
};
playfield.Add(strong ? new DrawableStrongDrumRoll(d) : new DrawableDrumRoll(d));
}
private void addSwell()
{
playfield.Add(new DrawableSwell(new Swell
{
StartTime = Time.Current + 1000,
EndTime = Time.Current + 5000,
PreEmpt = 1000
}));
} |
<<<<<<<
private static ConcurrentDictionary<PlayMode, Type> availableRulesets = new ConcurrentDictionary<PlayMode, Type>();
=======
public static IEnumerable<PlayMode> PlayModes => availableRulesets.Keys;
public abstract ScoreOverlay CreateScoreOverlay();
>>>>>>>
private static ConcurrentDictionary<PlayMode, Type> availableRulesets = new ConcurrentDictionary<PlayMode, Type>();
public static IEnumerable<PlayMode> PlayModes => availableRulesets.Keys; |
<<<<<<<
new SettingsCheckbox
{
LabelText = "Hit Lighting",
Bindable = config.GetBindable<bool>(OsuSetting.HitLighting)
},
new SettingsCheckbox
{
LabelText = "Rotate cursor when dragging",
Bindable = config.GetBindable<bool>(OsuSetting.CursorRotation)
},
=======
>>>>>>>
new SettingsCheckbox
{
LabelText = "Hit Lighting",
Bindable = config.GetBindable<bool>(OsuSetting.HitLighting)
}, |
<<<<<<<
public readonly Box FollowCircle;
private readonly Box ball;
private readonly DrawableSlider drawableSlider;
=======
public readonly Drawable FollowCircle;
private Drawable drawableBall;
>>>>>>>
public readonly Drawable FollowCircle;
private Drawable drawableBall;
private readonly DrawableSlider drawableSlider;
<<<<<<<
&& base.ReceiveMouseInputAt(lastState.Mouse.NativeState.Position)
&& (drawableSlider?.OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
=======
&& ReceiveMouseInputAt(lastState.Mouse.NativeState.Position)
&& ((Parent as DrawableSlider)?.OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
>>>>>>>
&& ReceiveMouseInputAt(lastState.Mouse.NativeState.Position)
&& (drawableSlider?.OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false); |
<<<<<<<
protected override HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, List<Vector2> controlPoints, double length, CurveType curveType, int repeatCount, List<List<SampleInfo>> nodeSamples)
=======
protected override HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, Vector2[] controlPoints, double length, PathType pathType, int repeatCount, List<List<SampleInfo>> repeatSamples)
>>>>>>>
protected override HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, Vector2[] controlPoints, double length, PathType pathType, int repeatCount, List<List<SampleInfo>> nodeSamples)
<<<<<<<
CurveType = curveType,
NodeSamples = nodeSamples,
=======
PathType = pathType,
RepeatSamples = repeatSamples,
>>>>>>>
PathType = pathType,
NodeSamples = nodeSamples, |
<<<<<<<
=======
using OpenTK;
using OpenTK.Graphics;
>>>>>>>
using OpenTK;
using OpenTK.Graphics;
<<<<<<<
private readonly IntroSequence introSequence;
=======
>>>>>>>
private readonly IntroSequence introSequence;
<<<<<<<
public Intro()
{
Children = new Drawable[]
{
new ParallaxContainer
{
ParallaxAmount = 0.01f,
Child = introSequence = new IntroSequence
{
Blending = BlendingMode.Additive,
},
}
};
}
=======
>>>>>>> |
<<<<<<<
=======
private readonly RankChartLineGraph graph;
private readonly OsuSpriteText placeholder;
private KeyValuePair<int, int>[] ranks;
private int hoveredIndex = -1;
>>>>>>>
<<<<<<<
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Text = "No recent plays",
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular)
});
=======
placeholder = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Text = "No recent plays",
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular)
},
graph = new RankChartLineGraph
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.Both,
Y = -secondary_textsize,
Alpha = 0,
}
};
graph.OnBallMove += i => hoveredIndex = i;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
graph.LineColour = colours.Yellow;
>>>>>>>
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Text = "No recent plays",
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular)
});
<<<<<<<
base.HideGraph();
placeholder.FadeIn(FADE_DURATION, Easing.Out);
=======
graph.HideBar();
base.OnHoverLost(e);
>>>>>>>
base.HideGraph();
placeholder.FadeIn(FADE_DURATION, Easing.Out);
<<<<<<<
Rank = $"#{rank:N0}",
Time = days == 0 ? "now" : $"{"day".ToQuantity(days)} ago"
};
=======
ballBg.Colour = colourProvider.Background5;
movingBall.BorderColour = line.Colour = colours.Yellow;
}
public void UpdateBallPosition(float mouseXPosition)
{
const int duration = 200;
int index = calculateIndex(mouseXPosition);
Vector2 position = calculateBallPosition(index);
movingBall.MoveToY(position.Y, duration, Easing.OutQuint);
bar.MoveToX(position.X, duration, Easing.OutQuint);
OnBallMove.Invoke(index);
}
public void ShowBar() => bar.FadeIn(fade_duration);
public void HideBar() => bar.FadeOut(fade_duration);
private int calculateIndex(float mouseXPosition) => (int)Math.Clamp(MathF.Round(mouseXPosition / DrawWidth * (DefaultValueCount - 1)), 0, DefaultValueCount - 1);
private Vector2 calculateBallPosition(int index)
{
float y = GetYPosition(Values.ElementAt(index));
return new Vector2(index / (float)(DefaultValueCount - 1), y);
}
}
public object TooltipContent
{
get
{
if (ranks == null || hoveredIndex == -1)
return null;
var days = ranked_days - ranks[hoveredIndex].Key + 1;
return new TooltipDisplayContent
{
Rank = $"#{ranks[hoveredIndex].Value:#,##0}",
Time = days == 0 ? "now" : $"{days} days ago"
};
}
>>>>>>>
Rank = $"#{rank:N0}",
Time = days == 0 ? "now" : $"{"day".ToQuantity(days)} ago"
}; |
<<<<<<<
/// Fired when a beatmap load is requested (into the interactive game UI).
/// </summary>
public Action<BeatmapSetInfo> PresentBeatmap;
/// <summary>
=======
/// Fired when a beatmap download is interrupted, due to user cancellation or other failures.
/// </summary>
public event Action<DownloadBeatmapSetRequest> BeatmapDownloadFailed;
/// <summary>
>>>>>>>
/// Fired when a beatmap download is interrupted, due to user cancellation or other failures.
/// </summary>
public event Action<DownloadBeatmapSetRequest> BeatmapDownloadFailed;
/// <summary>
/// Fired when a beatmap load is requested (into the interactive game UI).
/// </summary>
public Action<BeatmapSetInfo> PresentBeatmap;
/// <summary> |
<<<<<<<
hudOverlay = new HUDOverlay(scoreProcessor, RulesetContainer, decoupledClock, working, adjustableSourceClock)
=======
new SkipButton(firstObjectTime) { AudioClock = decoupledClock },
hudOverlay = new HUDOverlay
>>>>>>>
new SkipButton(firstObjectTime) { AudioClock = decoupledClock },
hudOverlay = new HUDOverlay(scoreProcessor, RulesetContainer, decoupledClock, working, adjustableSourceClock)
<<<<<<<
=======
hudOverlay.BindProcessor(scoreProcessor);
hudOverlay.BindRulesetContainer(RulesetContainer);
hudOverlay.Progress.Objects = RulesetContainer.Objects;
hudOverlay.Progress.AudioClock = decoupledClock;
hudOverlay.Progress.OnSeek = pos => decoupledClock.Seek(pos);
hudOverlay.ModDisplay.Current.BindTo(working.Mods);
breakOverlay.BindProcessor(scoreProcessor);
hudOverlay.ReplaySettingsOverlay.PlaybackSettings.AdjustableClock = adjustableSourceClock;
>>>>>>> |
<<<<<<<
private readonly TimelineArea timelineArea;
=======
>>>>>>>
<<<<<<<
timelineArea = new TimelineArea
=======
new ScrollableTimeline
>>>>>>>
new TimelineArea
<<<<<<<
[BackgroundDependencyLoader]
private void load(OsuGameBase osuGame)
{
timelineArea.Beatmap.BindTo(osuGame.Beatmap);
}
=======
>>>>>>> |
<<<<<<<
using osu.Framework.MathUtils;
=======
using osu.Framework.Graphics.Sprites;
>>>>>>>
using osu.Framework.MathUtils;
using osu.Framework.Graphics.Sprites;
<<<<<<<
configBindable.BindValueChanged(v => dropdownBindable.Value = skinDropdown.Items.Single(s => s.ID == v), true);
dropdownBindable.BindValueChanged(v =>
{
if (v == random_skin_info)
randomizeSkin();
else
configBindable.Value = v?.ID ?? 0;
});
=======
configBindable.BindValueChanged(id => dropdownBindable.Value = skinDropdown.Items.Single(s => s.ID == id.NewValue), true);
dropdownBindable.BindValueChanged(skin => configBindable.Value = skin.NewValue.ID);
>>>>>>>
configBindable.BindValueChanged(id => dropdownBindable.Value = skinDropdown.Items.Single(s => s.ID == id.NewValue), true);
dropdownBindable.BindValueChanged(skin =>
{
if (v == random_skin_info)
randomizeSkin();
else
configBindable.Value = skin.NewValue.ID ?? 0;
});
<<<<<<<
private void itemAdded(SkinInfo s, bool existing, bool silent)
{
if (existing)
return;
Schedule(() =>
{
usableSkins.Add(s);
resetSkinButtons();
});
}
private void resetSkinButtons()
{
skinDropdown.Items = usableSkins.Count > 1 ? usableSkins.Concat(new[] { random_skin_info }) : usableSkins;
}
=======
private void itemAdded(SkinInfo s) => Schedule(() => skinDropdown.Items = skinDropdown.Items.Append(s).ToArray());
>>>>>>>
private void itemAdded(SkinInfo s)
{
if (existing)
return;
Schedule(() =>
{
usableSkins.Add(s);
resetSkinButtons();
});
}
private void resetSkinButtons()
{
skinDropdown.Items = usableSkins.Count > 1 ? usableSkins.Concat(new[] { random_skin_info }) : usableSkins;
} |
<<<<<<<
LoadComponentAsync(loadingInfo = new BufferedWedgeInfo(beatmap, ruleset.Value, beatmapDifficulty.Value ?? new StarDifficulty())
=======
LoadComponentAsync(loadingInfo = new BufferedWedgeInfo(beatmap, ruleset.Value, mods.Value, beatmapDifficulty.Value)
>>>>>>>
LoadComponentAsync(loadingInfo = new BufferedWedgeInfo(beatmap, ruleset.Value, mods.Value, beatmapDifficulty.Value ?? new StarDifficulty()) |
<<<<<<<
using osu.Game.Screens.Edit.Compose.Components;
using OpenTK;
=======
using osuTK;
>>>>>>>
using osu.Game.Screens.Edit.Compose.Components;
using osuTK;
<<<<<<<
protected override IReadOnlyList<HitObjectCompositionTool> CompositionTools => new HitObjectCompositionTool[]
{
new NoteCompositionTool()
};
public override SelectionHandler CreateSelectionHandler() => new ManiaSelectionHandler();
=======
protected override IReadOnlyList<HitObjectCompositionTool> CompositionTools => new HitObjectCompositionTool[]
{
new NoteCompositionTool()
};
>>>>>>>
protected override IReadOnlyList<HitObjectCompositionTool> CompositionTools => new HitObjectCompositionTool[]
{
new NoteCompositionTool()
};
public override SelectionHandler CreateSelectionHandler() => new ManiaSelectionHandler(); |
<<<<<<<
ManiaPlayfield Playfield { get; }
=======
Vector2 ScreenSpacePositionAtTime(double time, Column column = null);
int TotalColumns { get; }
>>>>>>>
ManiaPlayfield Playfield { get; }
Vector2 ScreenSpacePositionAtTime(double time, Column column = null); |
<<<<<<<
requireMoreUpdateLoops = true;
validState = !frameStableClock.IsPaused.Value;
=======
state = frameStableClock.IsPaused.Value ? PlaybackState.NotValid : PlaybackState.Valid;
>>>>>>>
state = frameStableClock.IsPaused.Value ? PlaybackState.NotValid : PlaybackState.Valid;
if (frameStableClock.WaitingOnFrames.Value)
{
// for now, force one update loop to check if frames have arrived
// this may have to change in the future where we want stable user pausing during replay playback.
state = PlaybackState.Valid;
}
<<<<<<<
if (frameStableClock.WaitingOnFrames.Value)
{
// for now, force one update loop to check if frames have arrived
// this may have to change in the future where we want stable user pausing during replay playback.
validState = true;
}
while (validState && requireMoreUpdateLoops && loops++ < MaxCatchUpFrames)
=======
while (state != PlaybackState.NotValid && loops-- > 0)
>>>>>>>
while (state != PlaybackState.NotValid && loops-- > 0)
<<<<<<<
finally
{
if (newProposedTime != manualClock.CurrentTime)
direction = newProposedTime >= manualClock.CurrentTime ? 1 : -1;
manualClock.CurrentTime = newProposedTime;
manualClock.Rate = Math.Abs(parentGameplayClock.Rate) * direction;
manualClock.IsRunning = parentGameplayClock.IsRunning;
=======
>>>>>>>
<<<<<<<
frameStableClock.IsCatchingUp.Value = timeBehind > 200;
frameStableClock.WaitingOnFrames.Value = !validState;
=======
/// <summary>
/// Apply frame stability modifier to a time.
/// </summary>
/// <param name="proposedTime">The time which is to be displayed.</param>
private void applyFrameStability(ref double proposedTime)
{
if (firstConsumption)
{
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
// Instead we perform an initial seek to the proposed time.
>>>>>>>
/// <summary>
/// Apply frame stability modifier to a time.
/// </summary>
/// <param name="proposedTime">The time which is to be displayed.</param>
private void applyFrameStability(ref double proposedTime)
{
if (firstConsumption)
{
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
// Instead we perform an initial seek to the proposed time. |
<<<<<<<
/// <summary>
/// Contains the maximum size/position of the body prior to any offset or size adjustments.
/// </summary>
private readonly Container bodyContainer;
/// <summary>
/// Contains the offset size/position of the body such that the body extends half-way between the head and tail pieces.
/// </summary>
private readonly Container bodyOffsetContainer;
/// <summary>
/// Contains the masking area for the tail, which is resized along with <see cref="bodyContainer"/>.
/// </summary>
private readonly Container tailMaskingContainer;
=======
private readonly SkinnableDrawable bodyPiece;
>>>>>>>
/// <summary>
/// Contains the maximum size/position of the body prior to any offset or size adjustments.
/// </summary>
private readonly Container bodyContainer;
/// <summary>
/// Contains the offset size/position of the body such that the body extends half-way between the head and tail pieces.
/// </summary>
private readonly Container bodyOffsetContainer;
/// <summary>
/// Contains the masking area for the tail, which is resized along with <see cref="bodyContainer"/>.
/// </summary>
private readonly Container tailMaskingContainer;
private readonly SkinnableDrawable bodyPiece; |
<<<<<<<
case "Play/osu/cursor":
if (GetTexture("cursor") != null)
return new LegacyCursor();
break;
=======
case "Play/osu/sliderball":
if (GetTexture("sliderb") != null)
return new LegacySliderBall();
return null;
case "Play/osu/hitcircle":
if (hasHitCircle)
return new LegacyMainCirclePiece();
return null;
>>>>>>>
case "Play/osu/cursor":
if (GetTexture("cursor") != null)
return new LegacyCursor();
return null;
case "Play/osu/sliderball":
if (GetTexture("sliderb") != null)
return new LegacySliderBall();
return null;
case "Play/osu/hitcircle":
if (hasHitCircle)
return new LegacyMainCirclePiece();
return null;
<<<<<<<
public class LegacyCursor : CompositeDrawable
{
public LegacyCursor()
{
Size = new Vector2(50);
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
}
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
{
InternalChildren = new Drawable[]
{
new NonPlayfieldSprite
{
Texture = skin.GetTexture("cursormiddle"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
new NonPlayfieldSprite
{
Texture = skin.GetTexture("cursor"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
}
};
}
}
private class NonPlayfieldSprite : Sprite
{
public override Texture Texture
{
get => base.Texture;
set
{
value.ScaleAdjust *= 2f;
base.Texture = value;
}
}
}
=======
public class LegacyMainCirclePiece : CompositeDrawable
{
public LegacyMainCirclePiece()
{
Size = new Vector2(128);
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
}
private readonly IBindable<ArmedState> state = new Bindable<ArmedState>();
private readonly Bindable<Color4> accentColour = new Bindable<Color4>();
[BackgroundDependencyLoader]
private void load(DrawableHitObject drawableObject, ISkinSource skin)
{
Sprite hitCircleSprite;
InternalChildren = new Drawable[]
{
hitCircleSprite = new Sprite
{
Texture = skin.GetTexture("hitcircle"),
Colour = drawableObject.AccentColour.Value,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
new SkinnableSpriteText("Play/osu/number-text", _ => new OsuSpriteText
{
Font = OsuFont.Numeric.With(size: 40),
UseFullGlyphHeight = false,
}, confineMode: ConfineMode.NoScaling)
{
Text = (((IHasComboInformation)drawableObject.HitObject).IndexInCurrentCombo + 1).ToString()
},
new Sprite
{
Texture = skin.GetTexture("hitcircleoverlay"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
}
};
state.BindTo(drawableObject.State);
state.BindValueChanged(updateState, true);
accentColour.BindTo(drawableObject.AccentColour);
accentColour.BindValueChanged(colour => hitCircleSprite.Colour = colour.NewValue, true);
}
private void updateState(ValueChangedEvent<ArmedState> state)
{
const double legacy_fade_duration = 240;
switch (state.NewValue)
{
case ArmedState.Hit:
this.FadeOut(legacy_fade_duration, Easing.Out);
this.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
break;
}
}
}
>>>>>>>
public class LegacyCursor : CompositeDrawable
{
public LegacyCursor()
{
Size = new Vector2(50);
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
}
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
{
InternalChildren = new Drawable[]
{
new NonPlayfieldSprite
{
Texture = skin.GetTexture("cursormiddle"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
new NonPlayfieldSprite
{
Texture = skin.GetTexture("cursor"),
}
};
}
}
public class LegacyMainCirclePiece : CompositeDrawable
{
public LegacyMainCirclePiece()
{
Size = new Vector2(128);
}
private readonly IBindable<ArmedState> state = new Bindable<ArmedState>();
private readonly Bindable<Color4> accentColour = new Bindable<Color4>();
[BackgroundDependencyLoader]
private void load(DrawableHitObject drawableObject, ISkinSource skin)
{
Sprite hitCircleSprite;
InternalChildren = new Drawable[]
{
hitCircleSprite = new Sprite
{
Texture = skin.GetTexture("hitcircle"),
Colour = drawableObject.AccentColour.Value,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
new SkinnableSpriteText("Play/osu/number-text", _ => new OsuSpriteText
{
Font = OsuFont.Numeric.With(size: 40),
UseFullGlyphHeight = false,
}, confineMode: ConfineMode.NoScaling)
{
Text = (((IHasComboInformation)drawableObject.HitObject).IndexInCurrentCombo + 1).ToString()
},
new Sprite
{
Texture = skin.GetTexture("hitcircleoverlay"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
}
};
state.BindTo(drawableObject.State);
state.BindValueChanged(updateState, true);
accentColour.BindTo(drawableObject.AccentColour);
accentColour.BindValueChanged(colour => hitCircleSprite.Colour = colour.NewValue, true);
}
private void updateState(ValueChangedEvent<ArmedState> state)
{
const double legacy_fade_duration = 240;
switch (state.NewValue)
{
case ArmedState.Hit:
this.FadeOut(legacy_fade_duration, Easing.Out);
this.ScaleTo(1.4f, legacy_fade_duration, Easing.Out);
break;
}
}
}
private class NonPlayfieldSprite : Sprite
{
public override Texture Texture
{
get => base.Texture;
set
{
value.ScaleAdjust *= 2f;
base.Texture = value;
}
}
} |
<<<<<<<
public Options Options;
public Toolbar Toolbar;
internal APIAccess API;
=======
public APIAccess API;
>>>>>>>
public Options Options;
public APIAccess API;
public Toolbar Toolbar; |
<<<<<<<
=======
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
using System.Collections.Generic;
using osu.Framework.Input;
>>>>>>>
using System.Collections.Generic;
using osu.Framework.Input;
<<<<<<<
=======
protected virtual bool HandleKeyPress(Key key) { return false; }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
// Make sure we don't handle held-down keys
if (args.Repeat)
return false;
// Check if we've pressed a valid taiko key
if (!validKeys.Contains(args.Key))
return false;
// Handle it!
return HandleKeyPress(args.Key);
}
protected abstract CirclePiece CreateCircle();
>>>>>>>
protected virtual bool HandleKeyPress(Key key) { return false; }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
// Make sure we don't handle held-down keys
if (args.Repeat)
return false;
// Check if we've pressed a valid taiko key
if (!validKeys.Contains(args.Key))
return false;
// Handle it!
return HandleKeyPress(args.Key);
} |
<<<<<<<
protected readonly Bindable<IReadOnlyList<Mod>> FreeMods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
=======
[CanBeNull]
[Resolved(CanBeNull = true)]
private IBindable<PlaylistItem> selectedItem { get; set; }
private readonly Bindable<IReadOnlyList<Mod>> freeMods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
>>>>>>>
protected readonly Bindable<IReadOnlyList<Mod>> FreeMods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
[CanBeNull]
[Resolved(CanBeNull = true)]
private IBindable<PlaylistItem> selectedItem { get; set; }
<<<<<<<
Mods.Value = Playlist.FirstOrDefault()?.RequiredMods.Select(m => m.CreateCopy()).ToArray() ?? Array.Empty<Mod>();
FreeMods.Value = Playlist.FirstOrDefault()?.AllowedMods.Select(m => m.CreateCopy()).ToArray() ?? Array.Empty<Mod>();
=======
Mods.Value = selectedItem?.Value?.RequiredMods.Select(m => m.CreateCopy()).ToArray() ?? Array.Empty<Mod>();
freeMods.Value = selectedItem?.Value?.AllowedMods.Select(m => m.CreateCopy()).ToArray() ?? Array.Empty<Mod>();
>>>>>>>
Mods.Value = selectedItem?.Value?.RequiredMods.Select(m => m.CreateCopy()).ToArray() ?? Array.Empty<Mod>();
FreeMods.Value = selectedItem?.Value?.AllowedMods.Select(m => m.CreateCopy()).ToArray() ?? Array.Empty<Mod>(); |
<<<<<<<
editorBeatmap.ControlPointInfo.Clear();
editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = beat_length });
beatDivisor.Value = 1;
=======
editorBeatmap.ControlPointInfo.DifficultyPoints.Clear();
editorBeatmap.ControlPointInfo.TimingPoints.Clear();
editorBeatmap.ControlPointInfo.TimingPoints.Add(new TimingControlPoint { BeatLength = beat_length });
>>>>>>>
editorBeatmap.ControlPointInfo.Clear();
editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = beat_length });
<<<<<<<
createGrid();
}
[TestCase(100, 100)]
[TestCase(200, 100)]
public void TestBeatLength(float beatLength, float expectedSpacing)
{
AddStep($"set beat length = {beatLength}", () =>
{
editorBeatmap.ControlPointInfo.Clear();
editorBeatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = beatLength });
});
createGrid();
AddAssert($"spacing = {expectedSpacing}", () => Precision.AlmostEquals(expectedSpacing, grid.DistanceSpacing));
}
[TestCase(0.5f, 50)]
[TestCase(1, 100)]
[TestCase(1.5f, 150)]
public void TestSpeedMultiplier(float multiplier, float expectedSpacing)
{
AddStep($"set speed multiplier = {multiplier}", () =>
{
editorBeatmap.ControlPointInfo.Clear();
editorBeatmap.ControlPointInfo.Add(0, new DifficultyControlPoint { SpeedMultiplier = multiplier });
});
createGrid();
AddAssert($"spacing = {expectedSpacing}", () => Precision.AlmostEquals(expectedSpacing, grid.DistanceSpacing));
}
[TestCase(0.5f, 50)]
[TestCase(1, 100)]
[TestCase(1.5f, 150)]
public void TestSliderMultiplier(float multiplier, float expectedSpacing)
{
AddStep($"set speed multiplier = {multiplier}", () => editorBeatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier = multiplier);
createGrid();
AddAssert($"spacing = {expectedSpacing}", () => Precision.AlmostEquals(expectedSpacing, grid.DistanceSpacing));
=======
>>>>>>> |
<<<<<<<
using osu.Game.Rulesets.Mania.Configuration;
=======
using osu.Game.Rulesets.Mania.Mods;
>>>>>>>
using osu.Game.Rulesets.Mania.Mods;
using osu.Game.Rulesets.Mania.Configuration; |
<<<<<<<
=======
private double totalOffset => userOffsetClock.Offset + platformOffsetClock.Offset;
private readonly BindableDouble pauseFreqAdjust = new BindableDouble(1);
>>>>>>>
private double totalOffset => userOffsetClock.Offset + platformOffsetClock.Offset;
private readonly BindableDouble pauseFreqAdjust = new BindableDouble(1); |
<<<<<<<
private APIAccess api;
private RulesetDatabase rulesets;
private readonly FilterControl filter;
=======
>>>>>>>
private APIAccess api;
private RulesetDatabase rulesets;
<<<<<<<
if (BeatmapSets == null)
{
foreach (var p in panels.Children)
{
p.FadeOut(200);
p.Expire();
}
return;
}
recreatePanels(filter.DisplayStyle.Value);
=======
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
>>>>>>>
if (BeatmapSets == null)
{
foreach (var p in panels.Children)
{
p.FadeOut(200);
p.Expire();
}
return;
}
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
<<<<<<<
header.Tabs.Current.ValueChanged += tab => { if (tab != DirectTab.Search) filter.Search.Current.Value = string.Empty; };
filter.Search.Exit = Hide;
filter.Search.Current.ValueChanged += text => { if (text != string.Empty) header.Tabs.Current.Value = DirectTab.Search; };
filter.Search.OnCommit = (sender, text) => updateSets();
filter.RankStatusDropdown.Current.ValueChanged += rankStatus => updateSets();
filter.DisplayStyle.ValueChanged += recreatePanels;
=======
Header.Tabs.Current.ValueChanged += tab => { if (tab != DirectTab.Search) Filter.Search.Text = string.Empty; };
Filter.Search.Current.ValueChanged += text => { if (text != string.Empty) Header.Tabs.Current.Value = DirectTab.Search; };
Filter.DisplayStyleControl.DisplayStyle.ValueChanged += recreatePanels;
>>>>>>>
Header.Tabs.Current.ValueChanged += tab => { if (tab != DirectTab.Search) Filter.Search.Text = string.Empty; };
Filter.Search.Current.ValueChanged += text => { if (text != string.Empty) Header.Tabs.Current.Value = DirectTab.Search; };
Filter.Search.OnCommit = (sender, text) => updateSets();
Filter.DisplayStyleControl.DisplayStyle.ValueChanged += recreatePanels;
Filter.DisplayStyleControl.Dropdown.Current.ValueChanged += rankStatus => updateSets();
<<<<<<<
private GetBeatmapSetsRequest getSetsRequest;
private void updateSets()
{
if (!IsLoaded) return;
BeatmapSets = null;
getSetsRequest?.Cancel();
if (api == null || filter.Search.Text == string.Empty) return;
getSetsRequest = new GetBeatmapSetsRequest(filter.Search.Text, filter.RankStatusDropdown.Current.Value);
getSetsRequest.Success += r => BeatmapSets = r?.Select(response => response.ToSetInfo(rulesets));
api.Queue(getSetsRequest);
}
protected override bool OnFocus(InputState state)
{
filter.Search.TriggerFocus();
return false;
}
protected override void PopIn()
{
base.PopIn();
filter.Search.HoldFocus = true;
}
protected override void PopOut()
{
base.PopOut();
filter.Search.HoldFocus = false;
}
=======
>>>>>>>
private GetBeatmapSetsRequest getSetsRequest;
private void updateSets()
{
if (!IsLoaded) return;
BeatmapSets = null;
getSetsRequest?.Cancel();
if (api == null || Filter.Search.Text == string.Empty) return;
getSetsRequest = new GetBeatmapSetsRequest(Filter.Search.Text, Filter.DisplayStyleControl.Dropdown.Current.Value);
getSetsRequest.Success += r => BeatmapSets = r?.Select(response => response.ToSetInfo(rulesets));
api.Queue(getSetsRequest);
} |
<<<<<<<
public SliderCurve Curve;
public IEnumerable<SliderTick> Ticks
{
get
{
var length = Curve.Length;
var tickDistance = Math.Min(TickDistance, length);
var repeatDuration = length / Velocity;
var minDistanceFromEnd = Velocity * 0.01;
for (var repeat = 0; repeat < RepeatCount; repeat++)
{
var repeatStartTime = StartTime + repeat * repeatDuration;
var reversed = repeat % 2 == 1;
for (var d = tickDistance; d <= length; d += tickDistance)
{
if (d > length - minDistanceFromEnd)
break;
var distanceProgress = d / length;
var timeProgress = reversed ? 1 - distanceProgress : distanceProgress;
yield return new SliderTick
{
RepeatIndex = repeat,
StartTime = repeatStartTime + timeProgress * repeatDuration,
Position = Curve.PositionAt(distanceProgress) - StackedPosition,
StackHeight = StackHeight,
Scale = Scale,
Colour = Colour,
Sample = new HitSampleInfo
{
Type = SampleType.None,
Set = SampleSet.Soft,
},
};
}
}
}
}
=======
internal readonly SliderCurve Curve = new SliderCurve();
>>>>>>>
internal readonly SliderCurve Curve = new SliderCurve();
public IEnumerable<SliderTick> Ticks
{
get
{
var length = Curve.Length;
var tickDistance = Math.Min(TickDistance, length);
var repeatDuration = length / Velocity;
var minDistanceFromEnd = Velocity * 0.01;
for (var repeat = 0; repeat < RepeatCount; repeat++)
{
var repeatStartTime = StartTime + repeat * repeatDuration;
var reversed = repeat % 2 == 1;
for (var d = tickDistance; d <= length; d += tickDistance)
{
if (d > length - minDistanceFromEnd)
break;
var distanceProgress = d / length;
var timeProgress = reversed ? 1 - distanceProgress : distanceProgress;
yield return new SliderTick
{
RepeatIndex = repeat,
StartTime = repeatStartTime + timeProgress * repeatDuration,
Position = Curve.PositionAt(distanceProgress) - StackedPosition,
StackHeight = StackHeight,
Scale = Scale,
Colour = Colour,
Sample = new HitSampleInfo
{
Type = SampleType.None,
Set = SampleSet.Soft,
},
};
}
}
}
} |
<<<<<<<
Set(OsuSetting.ShowProgressGraph, true);
=======
Set(OsuSetting.ShowHealthDisplayWhenCantFail, true);
>>>>>>>
Set(OsuSetting.ShowProgressGraph, true);
Set(OsuSetting.ShowHealthDisplayWhenCantFail, true);
<<<<<<<
ShowProgressGraph,
=======
ShowHealthDisplayWhenCantFail,
>>>>>>>
ShowProgressGraph,
ShowHealthDisplayWhenCantFail, |
<<<<<<<
RoomUpdated?.Invoke();
});
=======
RoomChanged?.Invoke();
}, false);
>>>>>>>
RoomUpdated?.Invoke();
}, false);
<<<<<<<
RoomUpdated?.Invoke();
});
=======
RoomChanged?.Invoke();
}, false);
>>>>>>>
RoomUpdated?.Invoke();
}, false);
<<<<<<<
RoomUpdated?.Invoke();
});
=======
RoomChanged?.Invoke();
}, false);
>>>>>>>
RoomUpdated?.Invoke();
}, false);
<<<<<<<
RoomUpdated?.Invoke();
});
=======
RoomChanged?.Invoke();
}, false);
>>>>>>>
RoomUpdated?.Invoke();
}, false);
<<<<<<<
RoomUpdated?.Invoke();
});
=======
RoomChanged?.Invoke();
}, false);
>>>>>>>
RoomUpdated?.Invoke();
}, false);
<<<<<<<
RoomUpdated?.Invoke();
});
=======
RoomChanged?.Invoke();
}, false);
>>>>>>>
RoomUpdated?.Invoke();
}, false); |
<<<<<<<
using System;
using System.Collections.Generic;
=======
>>>>>>>
using System;
<<<<<<<
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Objects;
=======
using osu.Game.Rulesets.Mods;
>>>>>>>
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Objects; |
<<<<<<<
protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, Vector2[] controlPoints, double? length, PathType pathType, int repeatCount,
List<List<SampleInfo>> nodeSamples);
=======
protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, Vector2[] controlPoints, double length, PathType pathType, int repeatCount, List<List<HitSampleInfo>> nodeSamples);
>>>>>>>
protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, int comboOffset, Vector2[] controlPoints, double? length, PathType pathType, int repeatCount,
List<List<HitSampleInfo>> nodeSamples); |
<<<<<<<
/// <summary>
/// The BPM at this control point.
/// </summary>
public double BPM => 60000 / BeatLength;
private double beatLength = DEFAULT_BEAT_LENGTH;
=======
/// <summary>
/// The beat length at this control point.
/// </summary>
public double BeatLength
{
get => BeatLengthBindable.Value;
set => BeatLengthBindable.Value = value;
}
>>>>>>>
/// <summary>
/// The beat length at this control point.
/// </summary>
public double BeatLength
{
get => BeatLengthBindable.Value;
set => BeatLengthBindable.Value = value;
}
/// <summary>
/// The BPM at this control point.
/// </summary>
public double BPM => 60000 / BeatLength; |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.