conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
// A dictionary of puzzle state
public Dictionary<string, PuzzleSlide> puzzle;
=======
// A count of successes from events
public Dictionary<string, int> eventQuota;
>>>>>>>
// A dictionary of puzzle state
public Dictionary<string, PuzzleSlide> puzzle;
// A count of successes from events
public Dictionary<string, int> eventQuota;
<<<<<<<
puzzle = new Dictionary<string, PuzzleSlide>();
=======
eventQuota = new Dictionary<string, int>();
>>>>>>>
puzzle = new Dictionary<string, PuzzleSlide>();
eventQuota = new Dictionary<string, int>();
<<<<<<<
puzzle = new Dictionary<string, PuzzleSlide>();
foreach (KeyValuePair<string, Dictionary<string, string>> kv in saveData.data)
{
if (kv.Key.IndexOf("PuzzleSlide") == 0)
{
puzzle.Add(new PuzzleSlide(kv.Value));
}
}
=======
// Restore event quotas
eventQuota = new Dictionary<string, int>();
foreach (KeyValuePair<string, string> kv in saveData.Get("EventQuota"))
{
int value;
int.TryParse(kv.Value, out value);
eventQuota.Add(kv.Key, value);
}
>>>>>>>
puzzle = new Dictionary<string, PuzzleSlide>();
foreach (KeyValuePair<string, Dictionary<string, string>> kv in saveData.data)
{
if (kv.Key.IndexOf("PuzzleSlide") == 0)
{
puzzle.Add(new PuzzleSlide(kv.Value));
}
}
// Restore event quotas
eventQuota = new Dictionary<string, int>();
foreach (KeyValuePair<string, string> kv in saveData.Get("EventQuota"))
{
int value;
int.TryParse(kv.Value, out value);
eventQuota.Add(kv.Key, value);
} |
<<<<<<<
private StringKey BACK = new StringKey("{val:BACK}");
public Dictionary<string, QuestLoader.Quest> questList;
=======
public Dictionary<string, QuestData.Quest> questList;
>>>>>>>
private StringKey BACK = new StringKey("val","BACK");
private StringKey EMPTY = new StringKey("val","EMPTY");
public Dictionary<string, QuestData.Quest> questList;
<<<<<<<
tb = new TextButton(
new Vector2(2, offset),
new Vector2(UIScaler.GetWidthUnits() - 4, 1.2f),
//TODO: the name should be another key in near future. now is a nonLookup key
new StringKey("val", "QUEST_NAME_UPDATE",new StringKey(kv.Value["name"],false)),
delegate { Selection(file); }, Color.blue, offset);
=======
tb = new TextButton(new Vector2(2, offset), new Vector2(UIScaler.GetWidthUnits() - 5, 1.2f), " [Update] " + kv.Value["name"], delegate { Selection(file); }, Color.black, offset);
>>>>>>>
tb = new TextButton(
new Vector2(2, offset),
new Vector2(UIScaler.GetWidthUnits() - 5, 1.2f),
//TODO: the name should be another key in near future. now is a nonLookup key
new StringKey("val", "QUEST_NAME_UPDATE", new StringKey(kv.Value["name"], false)),
delegate { Selection(file); },
Color.black, offset);
<<<<<<<
db = new DialogBox(
new Vector2(2, offset),
new Vector2(UIScaler.GetWidthUnits() - 4, 1.2f),
new StringKey("val","INDENT",new StringKey(kv.Value["name"],false)),
Color.grey);
=======
db = new DialogBox(new Vector2(2, offset), new Vector2(UIScaler.GetWidthUnits() - 5, 1.2f), " " + kv.Value["name"], Color.black);
>>>>>>>
db = new DialogBox(
new Vector2(2, offset),
new Vector2(UIScaler.GetWidthUnits() - 5, 1.2f),
new StringKey("val", "INDENT", new StringKey(kv.Value["name"], false)),
Color.black);
<<<<<<<
tb = new TextButton(
new Vector2(2, offset),
new Vector2(UIScaler.GetWidthUnits() - 4, 1.2f),
new StringKey("val", "INDENT", new StringKey(kv.Value["name"], false)),
delegate { Selection(file); },
Color.white, offset);
=======
tb = new TextButton(new Vector2(2, offset), new Vector2(UIScaler.GetWidthUnits() - 5, 1.2f), " " + kv.Value["name"], delegate { Selection(file); }, Color.black, offset);
>>>>>>>
tb = new TextButton(
new Vector2(2, offset),
new Vector2(UIScaler.GetWidthUnits() - 5, 1.2f),
new StringKey("val", "INDENT", new StringKey(kv.Value["name"], false)),
delegate { Selection(file); },
Color.black, offset);
<<<<<<<
tb = new TextButton(
new Vector2(1, UIScaler.GetBottom(-3)),
new Vector2(8, 2),
BACK,
delegate { Cancel(); },
Color.red);
=======
scrollInnerRect.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Top, 0, (offset - 5) * UIScaler.GetPixelsPerUnit());
tb = new TextButton(new Vector2(1, UIScaler.GetBottom(-3)), new Vector2(8, 2), "Back", delegate { Cancel(); }, Color.red);
>>>>>>>
scrollInnerRect.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Top, 0, (offset - 5) * UIScaler.GetPixelsPerUnit());
tb = new TextButton(
new Vector2(1, UIScaler.GetBottom(-3)),
new Vector2(8, 2), BACK, delegate { Cancel(); }, Color.red); |
<<<<<<<
public static String GetWinScpPath()
{
String filePath64 = @"C:\Program Files (x86)\WinSCP\WinSCP.exe";
String filePath32 = @"C:\Program Files\WinSCP\WinSCP.exe";
if (File.Exists(filePath64))
{
return filePath64;
}
else if (File.Exists(filePath32))
{
return filePath32;
}
else
{
return null;
}
}
public static bool IsLinuxDistribution(String description) {
if (String.IsNullOrEmpty(description)) {
return false;
}
foreach (var name in LinuxDistributionsNames) {
if (description.ToLower().Contains(name.ToLower())) {
return true;
}
}
return false;
}
public static readonly ICollection<String> LinuxDistributionsNames = new Collection<String>() {
"openSUSE",
"SUSE",
"SLES",
"Red Hat",
"RHEL",
"CentOS",
"Debian",
"Gentoo",
"Ubuntu",
"Fedora",
"Mandriva",
"Mageia",
"Arch",
"Slackware",
"Mint"
};
=======
>>>>>>>
public static String GetWinScpPath()
{
String filePath64 = @"C:\Program Files (x86)\WinSCP\WinSCP.exe";
String filePath32 = @"C:\Program Files\WinSCP\WinSCP.exe";
if (File.Exists(filePath64))
{
return filePath64;
}
else if (File.Exists(filePath32))
{
return filePath32;
}
else
{
return null;
}
} |
<<<<<<<
=======
/*===================================================================================
*
* Copyright (c) Userware/OpenSilver.net
*
* This file is part of the OpenSilver Runtime (https://opensilver.net), which is
* licensed under the MIT license: https://opensource.org/licenses/MIT
*
* As stated in the MIT license, "the above copyright notice and this permission
* notice shall be included in all copies or substantial portions of the Software."
*
\*====================================================================================*/
>>>>>>>
/*===================================================================================
*
* Copyright (c) Userware/OpenSilver.net
*
* This file is part of the OpenSilver Runtime (https://opensilver.net), which is
* licensed under the MIT license: https://opensource.org/licenses/MIT
*
* As stated in the MIT license, "the above copyright notice and this permission
* notice shall be included in all copies or substantial portions of the Software."
*
\*====================================================================================*/ |
<<<<<<<
=> @"SELECT version FROM ${YUNIQL_TABLE_NAME} ORDER BY sequence_id DESC LIMIT 1;";
public string GetSqlForGetAllVersionAsJson()
=> @"SELECT JSON_ARRAYAGG(JSON_OBJECT('sequence_id', sequence_id, 'version', version, 'applied_on_utc', applied_on_utc, 'applied_by_user', applied_by_user, 'applied_by_tool', applied_by_tool, 'applied_by_tool_version', applied_by_tool_version))
FROM ${YUNIQL_TABLE_NAME};";
=======
=> @"SELECT version FROM ${YUNIQL_TABLE_NAME} WHERE status = 'Successful' ORDER BY sequence_id DESC LIMIT 1;";
///<inheritdoc/>
>>>>>>>
=> @"SELECT version FROM ${YUNIQL_TABLE_NAME} WHERE status = 'Successful' ORDER BY sequence_id DESC LIMIT 1;";
public string GetSqlForGetAllVersionAsJson()
=> @"SELECT JSON_ARRAYAGG(JSON_OBJECT('sequence_id', sequence_id, 'version', version, 'applied_on_utc', applied_on_utc, 'applied_by_user', applied_by_user, 'applied_by_tool', applied_by_tool, 'applied_by_tool_version', applied_by_tool_version))
FROM ${YUNIQL_TABLE_NAME};";
///<inheritdoc/>
<<<<<<<
public string GetSqlForInsertVersion()
=> @"INSERT INTO ${YUNIQL_TABLE_NAME} (version, applied_on_utc, applied_by_user, applied_by_tool, applied_by_tool_version) VALUES ('{0}', UTC_TIMESTAMP(), CURRENT_USER(), '{1}', '{2}');";
public string GetSqlForInsertVersionWithArtifact()
=> @"INSERT INTO ${YUNIQL_TABLE_NAME} (version, applied_on_utc, applied_by_user, applied_by_tool, applied_by_tool_version, additional_artifacts) VALUES ('{0}', UTC_TIMESTAMP(), CURRENT_USER(), '{1}', '{2}', '{3}');";
public string GetSqlForClearAllVersions()
=> @"TRUNCATE ${YUNIQL_TABLE_NAME};";
=======
private int ExecuteNonQuery(IDbConnection dbConnection, string commandText, ITraceService traceService = null)
{
traceService?.Debug($"Executing statement: {Environment.NewLine}{commandText}");
var dbCommand = dbConnection.CreateCommand();
dbCommand.CommandText = commandText;
return dbCommand.ExecuteNonQuery();
}
///<inheritdoc/>
public bool TryParseErrorFromException(Exception exception, out string result)
{
if (exception is MySqlException mySqlException)
{
result = $"(0x{mySqlException.ErrorCode:X}): Error Code: {mySqlException.Number}. {mySqlException.Message}";
return true;
}
result = null;
return false;
}
>>>>>>>
private int ExecuteNonQuery(IDbConnection dbConnection, string commandText, ITraceService traceService = null)
{
traceService?.Debug($"Executing statement: {Environment.NewLine}{commandText}");
var dbCommand = dbConnection.CreateCommand();
dbCommand.CommandText = commandText;
return dbCommand.ExecuteNonQuery();
}
///<inheritdoc/>
public bool TryParseErrorFromException(Exception exception, out string result)
{
if (exception is MySqlException mySqlException)
{
result = $"(0x{mySqlException.ErrorCode:X}): Error Code: {mySqlException.Number}. {mySqlException.Message}";
return true;
}
result = null;
return false;
}
public string GetSqlForInsertVersionWithArtifact()
=> @"INSERT INTO ${YUNIQL_TABLE_NAME} (version, applied_on_utc, applied_by_user, applied_by_tool, applied_by_tool_version, additional_artifacts) VALUES ('{0}', UTC_TIMESTAMP(), CURRENT_USER(), '{1}', '{2}', '{3}');";
public string GetSqlForClearAllVersions()
=> @"TRUNCATE ${YUNIQL_TABLE_NAME};"; |
<<<<<<<
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), true, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, null));
=======
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), true, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, false, false));
>>>>>>>
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), true, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, null, false));
<<<<<<<
), true, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, null));
=======
), true, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, false, false));
>>>>>>>
), true, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, null, false));
<<<<<<<
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), false, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, null));
=======
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), false, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, false, false));
>>>>>>>
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), false, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, null, false));
<<<<<<<
), false, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, null));
=======
), false, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, false, false));
>>>>>>>
), false, DEFAULT_CONSTANTS.BULK_SEPARATOR, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, 0, toolName, toolVersion, null, null, null, false)); |
<<<<<<<
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text.RegularExpressions;
using Yuniql.Extensibility;
using Yuniql.Extensibility.SqlBatchParser;
namespace Yuniql.SqlServer
{
public class SqlServerDataService : IDataService
{
private string _connectionString;
private readonly ITraceService _traceService;
public SqlServerDataService(ITraceService traceService)
{
this._traceService = traceService;
}
public void Initialize(string connectionString)
{
this._connectionString = connectionString;
}
public IDbConnection CreateConnection()
{
return new SqlConnection(_connectionString);
}
public IDbConnection CreateMasterConnection()
{
var masterConnectionStringBuilder = new SqlConnectionStringBuilder(_connectionString);
masterConnectionStringBuilder.InitialCatalog = "master";
return new SqlConnection(masterConnectionStringBuilder.ConnectionString);
}
public ConnectionInfo GetConnectionInfo()
{
var connectionStringBuilder = new SqlConnectionStringBuilder(_connectionString);
return new ConnectionInfo { DataSource = connectionStringBuilder.DataSource, Database = connectionStringBuilder.InitialCatalog };
}
public bool IsAtomicDDLSupported => true;
public bool IsSchemaSupported { get; } = true;
public bool IsBatchSqlSupported { get; } = true;
public string TableName { get; set; } = "__yuniqldbversion";
public string SchemaName { get; set; } = "dbo";
public List<string> BreakStatements(string sqlStatementRaw)
{
var sqlBatchParser = new SqlBatchParser(_traceService, new GoSqlBatchLineAnalyzer(), new CommentAnalyzer());
return sqlBatchParser.Parse(sqlStatementRaw).Select(s => s.BatchText).ToList();
}
public string GetSqlForCheckIfDatabaseExists()
=> @"SELECT ISNULL(database_id, 0) FROM [sys].[databases] WHERE name = '${YUNIQL_DB_NAME}'";
public string GetSqlForCreateDatabase()
=> @"CREATE DATABASE [${YUNIQL_DB_NAME}];";
public string GetSqlForCreateSchema()
=> @"CREATE SCHEMA [${YUNIQL_SCHEMA_NAME}];";
public string GetSqlForCheckIfDatabaseConfigured()
=> @"SELECT ISNULL(OBJECT_ID('[${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}]'), 0)";
public string GetSqlForConfigureDatabase()
=> @"
IF OBJECT_ID('[${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}]') IS NULL
BEGIN
CREATE TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] (
[SequenceId] [SMALLINT] IDENTITY(1,1) NOT NULL,
[Version] [NVARCHAR](512) NOT NULL,
[AppliedOnUtc] [DATETIME] NOT NULL,
[AppliedByUser] [NVARCHAR](32) NOT NULL,
[AppliedByTool] [NVARCHAR](32) NULL,
[AppliedByToolVersion] [NVARCHAR](16) NULL,
[AdditionalArtifacts] [VARBINARY](MAX) NULL,
CONSTRAINT [PK___YuniqlDbVersion] PRIMARY KEY CLUSTERED ([SequenceId] ASC),
CONSTRAINT [IX___YuniqlDbVersion] UNIQUE NONCLUSTERED ([Version] ASC
));
ALTER TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ADD CONSTRAINT [DF___YuniqlDbVersion_AppliedOnUtc] DEFAULT (GETUTCDATE()) FOR [AppliedOnUtc];
ALTER TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ADD CONSTRAINT [DF___YuniqlDbVersion_AppliedByUser] DEFAULT (SUSER_SNAME()) FOR [AppliedByUser];
END
";
public string GetSqlForGetCurrentVersion()
=> @"SELECT TOP 1 Version FROM [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ORDER BY SequenceId DESC;";
public string GetSqlForGetAllVersions()
=> @"SELECT SequenceId, Version, AppliedOnUtc, AppliedByUser, AppliedByTool, AppliedByToolVersion FROM [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ORDER BY Version ASC;";
public string GetSqlForInsertVersion()
=> @"INSERT INTO [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] (Version, AppliedByTool, AppliedByToolVersion) VALUES ('{0}','{1}','{2}');";
}
}
=======
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text.RegularExpressions;
using Yuniql.Extensibility;
namespace Yuniql.SqlServer
{
public class SqlServerDataService : IDataService
{
private string _connectionString;
private readonly ITraceService _traceService;
public SqlServerDataService(ITraceService traceService)
{
this._traceService = traceService;
}
public void Initialize(string connectionString)
{
this._connectionString = connectionString;
}
public IDbConnection CreateConnection()
{
return new SqlConnection(_connectionString);
}
public IDbConnection CreateMasterConnection()
{
var masterConnectionStringBuilder = new SqlConnectionStringBuilder(_connectionString);
masterConnectionStringBuilder.InitialCatalog = "master";
return new SqlConnection(masterConnectionStringBuilder.ConnectionString);
}
/// <summary>
/// Creates empty Db parameters.
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public IDbParameters CreateDbParameters()
{
throw new NotImplementedException("This platform doesn't support Db parameters yet");
}
public ConnectionInfo GetConnectionInfo()
{
var connectionStringBuilder = new SqlConnectionStringBuilder(_connectionString);
return new ConnectionInfo { DataSource = connectionStringBuilder.DataSource, Database = connectionStringBuilder.InitialCatalog };
}
public bool IsAtomicDDLSupported => true;
public bool IsSchemaSupported { get; } = true;
public string TableName { get; set; } = "__yuniqldbversion";
public string SchemaName { get; set; } = "dbo";
//https://stackoverflow.com/questions/25563876/executing-sql-batch-containing-go-statements-in-c-sharp/25564722#25564722
public List<string> BreakStatements(string sqlStatementRaw)
{
return Regex.Split(sqlStatementRaw, @"^\s*GO\s*$", RegexOptions.Multiline | RegexOptions.IgnoreCase)
.Where(s => !string.IsNullOrWhiteSpace(s))
.ToList();
}
public string GetSqlForCheckIfDatabaseExists()
=> @"SELECT ISNULL(database_id, 0) FROM [sys].[databases] WHERE name = '${YUNIQL_DB_NAME}'";
public string GetSqlForCreateDatabase()
=> @"CREATE DATABASE [${YUNIQL_DB_NAME}];";
public string GetSqlForCreateSchema()
=> @"CREATE SCHEMA [${YUNIQL_SCHEMA_NAME}];";
public string GetSqlForCheckIfDatabaseConfigured()
=> @"SELECT ISNULL(OBJECT_ID('[${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}]'), 0)";
public string GetSqlForConfigureDatabase()
=> @"
IF OBJECT_ID('[${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}]') IS NULL
BEGIN
CREATE TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] (
[SequenceId] [SMALLINT] IDENTITY(1,1) NOT NULL,
[Version] [NVARCHAR](512) NOT NULL,
[AppliedOnUtc] [DATETIME] NOT NULL,
[AppliedByUser] [NVARCHAR](32) NOT NULL,
[AppliedByTool] [NVARCHAR](32) NULL,
[AppliedByToolVersion] [NVARCHAR](16) NULL,
[AdditionalArtifacts] [VARBINARY](MAX) NULL,
CONSTRAINT [PK___YuniqlDbVersion] PRIMARY KEY CLUSTERED ([SequenceId] ASC),
CONSTRAINT [IX___YuniqlDbVersion] UNIQUE NONCLUSTERED ([Version] ASC
));
ALTER TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ADD CONSTRAINT [DF___YuniqlDbVersion_AppliedOnUtc] DEFAULT (GETUTCDATE()) FOR [AppliedOnUtc];
ALTER TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ADD CONSTRAINT [DF___YuniqlDbVersion_AppliedByUser] DEFAULT (SUSER_SNAME()) FOR [AppliedByUser];
END
";
public string GetSqlForGetCurrentVersion()
=> @"SELECT TOP 1 Version FROM [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ORDER BY SequenceId DESC;";
public string GetSqlForGetAllVersions()
=> @"SELECT SequenceId, Version, AppliedOnUtc, AppliedByUser, AppliedByTool, AppliedByToolVersion FROM [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ORDER BY Version ASC;";
public string GetSqlForInsertVersion()
=> @"INSERT INTO [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] (Version, AppliedByTool, AppliedByToolVersion) VALUES ('{0}','{1}','{2}');";
/// <summary>
/// Updates the database migration tracking table.
/// </summary>
/// <param name="dbConnection">The database connection.</param>
/// <param name="traceService">The trace service.</param>
/// <returns>
/// True if target database was updated, otherwise returns false
/// </returns>
public bool UpdateDatabaseConfiguration(IDbConnection dbConnection, ITraceService traceService = null)
{
//no need to update tracking table as the structure has no been changed so far
return false;
}
/// <summary>
/// Try parses error from database specific exception.
/// </summary>
/// <param name="exc">The exc.</param>
/// <param name="result">The parsed error.</param>
/// <returns>
/// True, if the parsing was sucessfull otherwise false
/// </returns>
public bool TryParseErrorFromException(Exception exc, out string result)
{
result = null;
return false;
}
}
}
>>>>>>>
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using Yuniql.Extensibility;
using Yuniql.Extensibility.SqlBatchParser;
namespace Yuniql.SqlServer
{
public class SqlServerDataService : IDataService
{
private string _connectionString;
private readonly ITraceService _traceService;
public SqlServerDataService(ITraceService traceService)
{
this._traceService = traceService;
}
public void Initialize(string connectionString)
{
this._connectionString = connectionString;
}
public IDbConnection CreateConnection()
{
return new SqlConnection(_connectionString);
}
public IDbConnection CreateMasterConnection()
{
var masterConnectionStringBuilder = new SqlConnectionStringBuilder(_connectionString);
masterConnectionStringBuilder.InitialCatalog = "master";
return new SqlConnection(masterConnectionStringBuilder.ConnectionString);
}
public IDbParameters CreateDbParameters()
{
throw new NotImplementedException("This platform doesn't support Db parameters yet");
}
public ConnectionInfo GetConnectionInfo()
{
var connectionStringBuilder = new SqlConnectionStringBuilder(_connectionString);
return new ConnectionInfo { DataSource = connectionStringBuilder.DataSource, Database = connectionStringBuilder.InitialCatalog };
}
public bool IsAtomicDDLSupported => true;
public bool IsSchemaSupported { get; } = true;
public bool IsBatchSqlSupported { get; } = true;
public string TableName { get; set; } = "__yuniqldbversion";
public string SchemaName { get; set; } = "dbo";
public List<string> BreakStatements(string sqlStatementRaw)
{
var sqlBatchParser = new SqlBatchParser(_traceService, new GoSqlBatchLineAnalyzer(), new CommentAnalyzer());
return sqlBatchParser.Parse(sqlStatementRaw).Select(s => s.BatchText).ToList();
}
public string GetSqlForCheckIfDatabaseExists()
=> @"SELECT ISNULL(database_id, 0) FROM [sys].[databases] WHERE name = '${YUNIQL_DB_NAME}'";
public string GetSqlForCreateDatabase()
=> @"CREATE DATABASE [${YUNIQL_DB_NAME}];";
public string GetSqlForCreateSchema()
=> @"CREATE SCHEMA [${YUNIQL_SCHEMA_NAME}];";
public string GetSqlForCheckIfDatabaseConfigured()
=> @"SELECT ISNULL(OBJECT_ID('[${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}]'), 0)";
public string GetSqlForConfigureDatabase()
=> @"
IF OBJECT_ID('[${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}]') IS NULL
BEGIN
CREATE TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] (
[SequenceId] [SMALLINT] IDENTITY(1,1) NOT NULL,
[Version] [NVARCHAR](512) NOT NULL,
[AppliedOnUtc] [DATETIME] NOT NULL,
[AppliedByUser] [NVARCHAR](32) NOT NULL,
[AppliedByTool] [NVARCHAR](32) NULL,
[AppliedByToolVersion] [NVARCHAR](16) NULL,
[AdditionalArtifacts] [VARBINARY](MAX) NULL,
CONSTRAINT [PK___YuniqlDbVersion] PRIMARY KEY CLUSTERED ([SequenceId] ASC),
CONSTRAINT [IX___YuniqlDbVersion] UNIQUE NONCLUSTERED ([Version] ASC
));
ALTER TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ADD CONSTRAINT [DF___YuniqlDbVersion_AppliedOnUtc] DEFAULT (GETUTCDATE()) FOR [AppliedOnUtc];
ALTER TABLE [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ADD CONSTRAINT [DF___YuniqlDbVersion_AppliedByUser] DEFAULT (SUSER_SNAME()) FOR [AppliedByUser];
END
";
public string GetSqlForGetCurrentVersion()
=> @"SELECT TOP 1 Version FROM [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ORDER BY SequenceId DESC;";
public string GetSqlForGetAllVersions()
=> @"SELECT SequenceId, Version, AppliedOnUtc, AppliedByUser, AppliedByTool, AppliedByToolVersion FROM [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] ORDER BY Version ASC;";
public string GetSqlForInsertVersion()
=> @"INSERT INTO [${YUNIQL_SCHEMA_NAME}].[${YUNIQL_TABLE_NAME}] (Version, AppliedByTool, AppliedByToolVersion) VALUES ('{0}','{1}','{2}');";
public bool UpdateDatabaseConfiguration(IDbConnection dbConnection, ITraceService traceService = null)
{
//no need to update tracking table as the structure has no been changed so far
return false;
}
public bool TryParseErrorFromException(Exception exc, out string result)
{
result = null;
return false;
}
}
} |
<<<<<<<
migrationService.Verify(s => s.Initialize("sqlserver-connection-string", DefaultConstants.CommandTimeoutSecs));
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), true, DefaultConstants.Delimiter, DefaultConstants.CommandTimeoutSecs, null, toolName, toolVersion, null, null));
=======
migrationService.Verify(s => s.Initialize("sqlserver-connection-string", DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS));
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), true, DEFAULT_CONSTANTS.BULK_DELIMITER, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, null, toolName, toolVersion, null));
>>>>>>>
migrationService.Verify(s => s.Initialize("sqlserver-connection-string", DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS));
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), true, DEFAULT_CONSTANTS.BULK_DELIMITER, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, null, toolName, toolVersion, null, null));
<<<<<<<
), true, DefaultConstants.Delimiter, DefaultConstants.CommandTimeoutSecs, null, toolName, toolVersion, null, null));
=======
), true, DEFAULT_CONSTANTS.BULK_DELIMITER, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, null, toolName, toolVersion, null));
>>>>>>>
), true, DEFAULT_CONSTANTS.BULK_DELIMITER, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, null, toolName, toolVersion, null, null));
<<<<<<<
migrationService.Verify(s => s.Initialize("sqlserver-connection-string", DefaultConstants.CommandTimeoutSecs));
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), false, DefaultConstants.Delimiter, DefaultConstants.CommandTimeoutSecs, null, toolName, toolVersion, null, null));
=======
migrationService.Verify(s => s.Initialize("sqlserver-connection-string", DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS));
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), false, DEFAULT_CONSTANTS.BULK_DELIMITER, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, null, toolName, toolVersion, null));
>>>>>>>
migrationService.Verify(s => s.Initialize("sqlserver-connection-string", DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS));
migrationService.Verify(s => s.Run(@"c:\temp\yuniql", "v1.00", false, It.Is<List<KeyValuePair<string, string>>>(x => x.Count == 0), false, DEFAULT_CONSTANTS.BULK_DELIMITER, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, null, toolName, toolVersion, null, null));
<<<<<<<
), false, DefaultConstants.Delimiter, DefaultConstants.CommandTimeoutSecs, null, toolName, toolVersion, null, null));
=======
), false, DEFAULT_CONSTANTS.BULK_DELIMITER, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, null, toolName, toolVersion, null));
>>>>>>>
), false, DEFAULT_CONSTANTS.BULK_DELIMITER, null, null, DEFAULT_CONSTANTS.COMMAND_TIMEOUT_SECS, null, toolName, toolVersion, null, null)); |
<<<<<<<
using OpenTK.Input;
=======
using System.Globalization;
using Smash_Forge.Rendering.Lights;
>>>>>>>
using System.Globalization;
using Smash_Forge.Rendering.Lights;
using OpenTK.Input;
<<<<<<<
if(CurrentMode != Mode.Selection && !freezeCamera)
Camera.Update();
=======
if(CurrentMode != Mode.Selection)
camera.Update();
>>>>>>>
if(CurrentMode != Mode.Selection && !freezeCamera)
Camera.Update();
<<<<<<<
}
private void ViewComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
HideAll();
switch (ViewComboBox.SelectedIndex)
=======
// Use a string so the order of the items can be changed later.
switch (ViewComboBox.SelectedItem.ToString())
>>>>>>>
}
private void ViewComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
HideAll();
// Use a string so the order of the items can be changed later.
switch (ViewComboBox.SelectedItem.ToString())
<<<<<<<
if (glViewport.ClientRectangle.Contains(glViewport.PointToClient(Cursor.Position))
&& glViewport.Focused
&& (CurrentMode == Mode.Normal || (CurrentMode == Mode.Photoshoot && !freezeCamera))
&& !TransformTool.hit)
{
Camera.Update();
//if (cameraPosForm != null && !cameraPosForm.IsDisposed)
// cameraPosForm.updatePosition();
}
=======
bool shouldUpdateCam = glViewport.ClientRectangle.Contains(glViewport.PointToClient(Cursor.Position))
&& glViewport.Focused && (CurrentMode == Mode.Normal) && !TransformTool.hit;
if (shouldUpdateCam)
camera.Update();
>>>>>>>
if (glViewport.ClientRectangle.Contains(glViewport.PointToClient(Cursor.Position))
&& glViewport.Focused
&& (CurrentMode == Mode.Normal || (CurrentMode == Mode.Photoshoot && !freezeCamera))
&& !TransformTool.hit)
{
Camera.Update();
//if (cameraPosForm != null && !cameraPosForm.IsDisposed)
// cameraPosForm.updatePosition();
} |
<<<<<<<
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.specLightCB = new System.Windows.Forms.CheckBox();
this.rimLightCB = new System.Windows.Forms.CheckBox();
=======
this.dummyRampCB = new System.Windows.Forms.CheckBox();
this.sphereMapCB = new System.Windows.Forms.CheckBox();
>>>>>>>
this.dummyRampCB = new System.Windows.Forms.CheckBox();
this.sphereMapCB = new System.Windows.Forms.CheckBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.specLightCB = new System.Windows.Forms.CheckBox();
this.rimLightCB = new System.Windows.Forms.CheckBox();
<<<<<<<
this.groupBox2.Controls.Add(this.groupBox7);
=======
this.groupBox2.Controls.Add(this.dummyRampCB);
this.groupBox2.Controls.Add(this.sphereMapCB);
>>>>>>>
this.groupBox2.Controls.Add(this.groupBox7);
<<<<<<<
// groupBox7
//
this.groupBox7.Controls.Add(this.specLightCB);
this.groupBox7.Controls.Add(this.rimLightCB);
this.groupBox7.Location = new System.Drawing.Point(5, 366);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(262, 100);
this.groupBox7.TabIndex = 24;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "4th Byte";
//
// specLightCB
//
this.specLightCB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.specLightCB.AutoSize = true;
this.specLightCB.Location = new System.Drawing.Point(7, 19);
this.specLightCB.Name = "specLightCB";
this.specLightCB.Size = new System.Drawing.Size(98, 17);
this.specLightCB.TabIndex = 20;
this.specLightCB.Text = "Reflection Map";
this.specLightCB.UseVisualStyleBackColor = true;
this.specLightCB.CheckedChanged += new System.EventHandler(this.specLightCB_CheckedChanged);
=======
// dummyRampCB
//
this.dummyRampCB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.dummyRampCB.AutoSize = true;
this.dummyRampCB.Location = new System.Drawing.Point(159, 113);
this.dummyRampCB.Name = "dummyRampCB";
this.dummyRampCB.Size = new System.Drawing.Size(105, 17);
this.dummyRampCB.TabIndex = 19;
this.dummyRampCB.Text = "Use Dummy Ramp";
this.dummyRampCB.UseVisualStyleBackColor = true;
this.dummyRampCB.CheckedChanged += new System.EventHandler(this.rimLightCB_CheckedChanged);
//
// sphereMapCB
//
this.sphereMapCB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.sphereMapCB.AutoSize = true;
this.sphereMapCB.Location = new System.Drawing.Point(6, 113);
this.sphereMapCB.Name = "sphereMapCB";
this.sphereMapCB.Size = new System.Drawing.Size(129, 17);
this.sphereMapCB.TabIndex = 20;
this.sphereMapCB.Text = "Use Sphere Map";
this.sphereMapCB.UseVisualStyleBackColor = true;
this.sphereMapCB.CheckedChanged += new System.EventHandler(this.sphereMapCB_CheckedChanged);
>>>>>>>
// rimLightCB
//
this.groupBox7.Controls.Add(this.specLightCB);
this.groupBox7.Controls.Add(this.rimLightCB);
this.groupBox7.Location = new System.Drawing.Point(5, 366);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(262, 100);
this.groupBox7.TabIndex = 24;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "4th Byte";
//
// sphereMapCB
//
this.specLightCB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.specLightCB.AutoSize = true;
this.specLightCB.Location = new System.Drawing.Point(7, 19);
this.specLightCB.Name = "specLightCB";
this.specLightCB.Size = new System.Drawing.Size(98, 17);
this.specLightCB.TabIndex = 20;
this.specLightCB.Text = "Reflection Map";
this.specLightCB.UseVisualStyleBackColor = true;
this.specLightCB.CheckedChanged += new System.EventHandler(this.specLightCB_CheckedChanged); |
<<<<<<<
animList.treeView1.EndUpdate();
=======
if (filename.EndsWith(".bch"))
{
Runtime.Animations.Add(filename, BCHan.read(filename));
animNode.Nodes.Add(filename);
}
>>>>>>>
if (filename.EndsWith(".bch"))
{
Runtime.Animations.Add(filename, BCHan.read(filename));
animNode.Nodes.Add(filename);
}
animList.treeView1.EndUpdate(); |
<<<<<<<
this.difTB = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.spcTB = new System.Windows.Forms.TextBox();
this.frsTB = new System.Windows.Forms.TextBox();
this.ambTB = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.refTB = new System.Windows.Forms.TextBox();
this.cameraLightCB = new System.Windows.Forms.CheckBox();
=======
this.checkBox15 = new System.Windows.Forms.CheckBox();
>>>>>>>
this.difTB = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.spcTB = new System.Windows.Forms.TextBox();
this.frsTB = new System.Windows.Forms.TextBox();
this.ambTB = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.refTB = new System.Windows.Forms.TextBox();
this.cameraLightCB = new System.Windows.Forms.CheckBox();
this.checkBox15 = new System.Windows.Forms.CheckBox();
<<<<<<<
this.panel1.Size = new System.Drawing.Size(283, 497);
=======
this.panel1.Size = new System.Drawing.Size(283, 469);
>>>>>>>
this.panel1.Size = new System.Drawing.Size(283, 447);
<<<<<<<
// checkBox14
//
this.checkBox14.AutoSize = true;
this.checkBox14.Checked = true;
this.checkBox14.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox14.Location = new System.Drawing.Point(44, 165);
this.checkBox14.Name = "checkBox14";
this.checkBox14.Size = new System.Drawing.Size(145, 17);
this.checkBox14.TabIndex = 24;
this.checkBox14.Text = "Render Hurtboxes Zones";
this.checkBox14.UseVisualStyleBackColor = true;
this.checkBox14.CheckedChanged += new System.EventHandler(this.checkChanged);
//
// checkBox13
//
this.checkBox13.AutoSize = true;
this.checkBox13.Checked = true;
this.checkBox13.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox13.Location = new System.Drawing.Point(12, 146);
this.checkBox13.Name = "checkBox13";
this.checkBox13.Size = new System.Drawing.Size(112, 17);
this.checkBox13.TabIndex = 23;
this.checkBox13.Text = "Render Hurtboxes";
this.checkBox13.UseVisualStyleBackColor = true;
this.checkBox13.CheckedChanged += new System.EventHandler(this.checkChanged);
//
=======
// checkBox14
//
this.checkBox14.AutoSize = true;
this.checkBox14.Checked = true;
this.checkBox14.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox14.Location = new System.Drawing.Point(44, 167);
this.checkBox14.Name = "checkBox14";
this.checkBox14.Size = new System.Drawing.Size(145, 17);
this.checkBox14.TabIndex = 24;
this.checkBox14.Text = "Render Hurtboxes Zones";
this.checkBox14.UseVisualStyleBackColor = true;
this.checkBox14.CheckedChanged += new System.EventHandler(this.checkChanged);
//
// checkBox13
//
this.checkBox13.AutoSize = true;
this.checkBox13.Checked = true;
this.checkBox13.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox13.Location = new System.Drawing.Point(12, 146);
this.checkBox13.Name = "checkBox13";
this.checkBox13.Size = new System.Drawing.Size(112, 17);
this.checkBox13.TabIndex = 23;
this.checkBox13.Text = "Render Hurtboxes";
this.checkBox13.UseVisualStyleBackColor = true;
this.checkBox13.CheckedChanged += new System.EventHandler(this.checkChanged);
//
>>>>>>>
// checkBox14
//
this.checkBox14.AutoSize = true;
this.checkBox14.Checked = true;
this.checkBox14.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox14.Location = new System.Drawing.Point(44, 167);
this.checkBox14.Name = "checkBox14";
this.checkBox14.Size = new System.Drawing.Size(145, 17);
this.checkBox14.TabIndex = 24;
this.checkBox14.Text = "Render Hurtboxes Zones";
this.checkBox14.UseVisualStyleBackColor = true;
this.checkBox14.CheckedChanged += new System.EventHandler(this.checkChanged);
//
// checkBox13
//
this.checkBox13.AutoSize = true;
this.checkBox13.Checked = true;
this.checkBox13.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox13.Location = new System.Drawing.Point(12, 146);
this.checkBox13.Name = "checkBox13";
this.checkBox13.Size = new System.Drawing.Size(112, 17);
this.checkBox13.TabIndex = 23;
this.checkBox13.Text = "Render Hurtboxes";
this.checkBox13.UseVisualStyleBackColor = true;
this.checkBox13.CheckedChanged += new System.EventHandler(this.checkChanged);
//
<<<<<<<
this.groupBox1.Size = new System.Drawing.Size(283, 500);
=======
this.groupBox1.Size = new System.Drawing.Size(283, 469);
>>>>>>>
this.groupBox1.Size = new System.Drawing.Size(283, 500);
<<<<<<<
this.ClientSize = new System.Drawing.Size(598, 524);
=======
this.ClientSize = new System.Drawing.Size(598, 493);
>>>>>>>
this.ClientSize = new System.Drawing.Size(598, 524);
<<<<<<<
private System.Windows.Forms.CheckBox cameraLightCB;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TextBox difTB;
private System.Windows.Forms.TextBox spcTB;
private System.Windows.Forms.TextBox frsTB;
private System.Windows.Forms.TextBox ambTB;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox refTB;
=======
private System.Windows.Forms.CheckBox checkBox15;
>>>>>>>
private System.Windows.Forms.CheckBox cameraLightCB;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TextBox difTB;
private System.Windows.Forms.TextBox spcTB;
private System.Windows.Forms.TextBox frsTB;
private System.Windows.Forms.TextBox ambTB;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox refTB;
private System.Windows.Forms.CheckBox checkBox15; |
<<<<<<<
Shader texture = new Shader();
texture.vertexShader(File.ReadAllText(MainForm.executableDir + "/lib/Shader/Texture_vs.txt"));
texture.fragmentShader(File.ReadAllText(MainForm.executableDir + "/lib/Shader/Texture_fs.txt"));
Runtime.shaders.Add("Texture", texture);
Shader mbn = new Shader();
mbn.vertexShader(File.ReadAllText(MainForm.executableDir + "/lib/Shader/MBN_vs.txt"));
mbn.fragmentShader(File.ReadAllText(MainForm.executableDir + "/lib/Shader/MBN_fs.txt"));
Runtime.shaders.Add("MBN", mbn);
=======
Shader quad = new Shader();
quad.vertexShader(RenderTools.vs_quad);
quad.fragmentShader(RenderTools.fs_quad);
Runtime.shaders.Add("Quad", quad);
Shader blur = new Shader();
blur.vertexShader(RenderTools.vs_blur);
blur.fragmentShader(RenderTools.fs_blur);
Runtime.shaders.Add("Blur", blur);
>>>>>>>
Shader texture = new Shader();
texture.vertexShader(File.ReadAllText(MainForm.executableDir + "/lib/Shader/Texture_vs.txt"));
texture.fragmentShader(File.ReadAllText(MainForm.executableDir + "/lib/Shader/Texture_fs.txt"));
Runtime.shaders.Add("Texture", texture);
Shader mbn = new Shader();
mbn.vertexShader(File.ReadAllText(MainForm.executableDir + "/lib/Shader/MBN_vs.txt"));
mbn.fragmentShader(File.ReadAllText(MainForm.executableDir + "/lib/Shader/MBN_fs.txt"));
Runtime.shaders.Add("MBN", mbn);
Shader quad = new Shader();
quad.vertexShader(RenderTools.vs_quad);
quad.fragmentShader(RenderTools.fs_quad);
Runtime.shaders.Add("Quad", quad);
Shader blur = new Shader();
blur.vertexShader(RenderTools.vs_blur);
blur.fragmentShader(RenderTools.fs_blur);
Runtime.shaders.Add("Blur", blur);
<<<<<<<
Runtime.shaders["NUD"].SaveErrorLog("NUD");
Runtime.shaders["MBN"].SaveErrorLog("MBN");
Runtime.shaders["Texture"].SaveErrorLog("Texture");
MessageBox.Show("Error logs saved to Forge directory");
=======
Runtime.shaders["Quad"].SaveErrorLog();
//Runtime.shaders["Shadow"].SaveErrorLog();
MessageBox.Show("Saved to Forge directory");
>>>>>>>
Runtime.shaders["NUD"].SaveErrorLog("NUD");
Runtime.shaders["MBN"].SaveErrorLog("MBN");
Runtime.shaders["Texture"].SaveErrorLog("Texture");
MessageBox.Show("Error logs saved to Forge directory"); |
<<<<<<<
using System.Collections.Generic;
using System.Linq;
using System.Net;
=======
using System;
using System.Linq;
using System.Net;
>>>>>>>
using System.Collections.Generic;
using System;
using System.Linq;
using System.Net;
<<<<<<<
public IEnumerable<object> GetAllPropertyEditors()
{
return
global::Umbraco.Core.PropertyEditors.PropertyEditorResolver.Current.PropertyEditors
.Select(x => new {defaultPreValues = x.DefaultPreValues, alias = x.Alias, view = x.ValueEditor.View});
}
public object GetById(int id)
=======
public object GetAll()
>>>>>>>
public IEnumerable<object> GetAllPropertyEditors()
{
return
global::Umbraco.Core.PropertyEditors.PropertyEditorResolver.Current.PropertyEditors
.Select(x => new {defaultPreValues = x.DefaultPreValues, alias = x.Alias, view = x.ValueEditor.View});
}
public object GetAll() |
<<<<<<<
namespace Archetype.Umbraco.PropertyConverters
{
[PropertyValueType(typeof(Models.Archetype))]
[PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Content)]
public class ArchetypeValueConverter : PropertyValueConverterBase
{
public ServiceContext Services
{
get { return ApplicationContext.Current.Services; }
}
public override bool IsConverter(PublishedPropertyType propertyType)
{
return !String.IsNullOrEmpty(propertyType.PropertyEditorAlias)
&& propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditorAlias);
}
=======
>>>>>>> |
<<<<<<<
string isaFile = Path.Combine(m_TempPath, String.Format("{0}_pyramid.isa", asic));
=======
if (!CompileForAsic(backendOptions.Asics, asic))
{
continue;
}
if (defaultAsic == "")
{
defaultAsic = asic;
}
string ilFile = String.Format( "{0}-{1}.amdisa", ilPath, asic );
string isaFile = String.Format( "{0}-{1}.amdisa", isaPath, asic );
>>>>>>>
if (!CompileForAsic(backendOptions.Asics, asic))
{
continue;
}
if (defaultAsic == "")
{
defaultAsic = asic;
}
string isaFile = Path.Combine(m_TempPath, String.Format("{0}_pyramid.isa", asic)); |
<<<<<<<
private void Filter (List<InternalAssetData> assets, Action<string, List<string>> FilterResultReceiver) {
=======
private class ExhaustiveAssetPathData {
public readonly string importedPath;
public readonly string absoluteSourcePath;
public bool isFilterExhausted = false;
public ExhaustiveAssetPathData (string absoluteSourcePath, string importedPath) {
this.importedPath = importedPath;
this.absoluteSourcePath = absoluteSourcePath;
}
}
private void Filtering (List<InternalAssetData> assets, Action<string, List<string>> Out) {
var exhaustiveAssets = new List<ExhaustiveAssetPathData>();
foreach (var asset in assets) {
exhaustiveAssets.Add(new ExhaustiveAssetPathData(asset.absoluteSourcePath, asset.importedPath));
}
>>>>>>>
private class ExhaustiveAssetPathData {
public readonly string importedPath;
public readonly string absoluteSourcePath;
public bool isFilterExhausted = false;
public ExhaustiveAssetPathData (string absoluteSourcePath, string importedPath) {
this.importedPath = importedPath;
this.absoluteSourcePath = absoluteSourcePath;
}
}
private void Filter (List<InternalAssetData> assets, Action<string, List<string>> FilterResultReceiver) {
var exhaustiveAssets = new List<ExhaustiveAssetPathData>();
foreach (var asset in assets) {
exhaustiveAssets.Add(new ExhaustiveAssetPathData(asset.absoluteSourcePath, asset.importedPath));
}
<<<<<<<
// if keyword is wildcard, use type for constraint. pass all assets.
if (keyword == AssetBundleGraphSettings.FILTER_KEYWORD_WILDCARD) {
contains = assets;
}
=======
// if keyword is wildcard, use type for constraint. pass all remaining assets.
if (keyword == AssetBundleGraphSettings.FILTER_KEYWORD_WILDCARD) keywordContainsAssets = exhaustiveAssets.Where(assetData => !assetData.isFilterExhausted).ToList();
>>>>>>>
// if keyword is wildcard, use type for constraint. pass all remaining assets.
if (keyword == AssetBundleGraphSettings.FILTER_KEYWORD_WILDCARD) keywordContainsAssets = exhaustiveAssets.Where(assetData => !assetData.isFilterExhausted).ToList();
<<<<<<<
var assetList = new List<string>();
=======
var typeMatchedAssetsAbsolutePaths = new List<string>();
>>>>>>>
var typeMatchedAssetsAbsolutePaths = new List<string>();
<<<<<<<
var containsAssetAbsolutePaths = contains.Select(assetData => assetData.absoluteSourcePath).ToList();
FilterResultReceiver(label, containsAssetAbsolutePaths);
=======
var containsAssetAbsolutePaths = keywordContainsAssets.Select(assetData => assetData.absoluteSourcePath).ToList();
// these assets are exhausted.
foreach (var exhaustiveAsset in exhaustiveAssets) {
if (containsAssetAbsolutePaths.Contains(exhaustiveAsset.absoluteSourcePath)) exhaustiveAsset.isFilterExhausted = true;
}
Out(keyword, containsAssetAbsolutePaths);
>>>>>>>
var containsAssetAbsolutePaths = keywordContainsAssets.Select(assetData => assetData.absoluteSourcePath).ToList();
// these assets are exhausted.
foreach (var exhaustiveAsset in exhaustiveAssets) {
if (containsAssetAbsolutePaths.Contains(exhaustiveAsset.absoluteSourcePath)) exhaustiveAsset.isFilterExhausted = true;
}
FilterResultReceiver(keyword, containsAssetAbsolutePaths); |
<<<<<<<
outputPointIds:outputPointIds,
scriptType:scriptType
=======
scriptClassName:scriptClassName
>>>>>>>
outputPointIds:outputPointIds,
scriptClassName:scriptClassName
<<<<<<<
var executor = Executor<PrefabricatorBase>(scriptType, nodeId);
executor.Run(nodeName, nodeId, firstConnectionIdFromThisNodeToChildNode, inputParentResults, alreadyCachedPaths, Output);
=======
var executor = Executor<PrefabricatorBase>(scriptClassName, nodeId);
executor.Run(nodeName, nodeId, labelToChild, inputParentResults, alreadyCachedPaths, Output);
>>>>>>>
var executor = Executor<PrefabricatorBase>(scriptClassName, nodeId);
executor.Run(nodeName, nodeId, firstConnectionIdFromThisNodeToChildNode, inputParentResults, alreadyCachedPaths, Output);
<<<<<<<
var executor = Executor<PrefabricatorBase>(scriptType, nodeId);
executor.Setup(nodeName, nodeId, firstConnectionIdFromThisNodeToChildNode, inputParentResults, alreadyCachedPaths, Output);
=======
var executor = Executor<PrefabricatorBase>(scriptClassName, nodeId);
executor.Setup(nodeName, nodeId, labelToChild, inputParentResults, alreadyCachedPaths, Output);
>>>>>>>
var executor = Executor<PrefabricatorBase>(scriptClassName, nodeId);
executor.Setup(nodeName, nodeId, firstConnectionIdFromThisNodeToChildNode, inputParentResults, alreadyCachedPaths, Output);
<<<<<<<
this.outputPointIds = outputPointIds;
this.scriptType = null;
=======
this.scriptClassName = null;
>>>>>>>
this.outputPointIds = outputPointIds;
this.scriptClassName = null; |
<<<<<<<
=======
/*
show error on node functions.
*/
private bool hasErrors = false;
public void RenewErrorSource () {
hasErrors = false;
}
public void AppendErrorSources (List<string> errors) {
this.hasErrors = true;
this.nodeInsp.UpdateErrors(errors);
}
/*
show progress on node functions(unused. due to mainthread synchronization problem.)
can not update any visual on Editor while building AssetBundles through AssetBundleGraph.
*/
>>>>>>>
/*
show error on node functions.
*/
private bool hasErrors = false;
public void RenewErrorSource () {
hasErrors = false;
}
public void AppendErrorSources (List<string> errors) {
this.hasErrors = true;
this.nodeInsp.UpdateErrors(errors);
}
/*
show progress on node functions(unused. due to mainthread synchronization problem.)
can not update any visual on Editor while building AssetBundles through AssetBundleGraph.
*/
<<<<<<<
using (new EditorGUILayout.VerticalScope()) {
foreach(Action a in messageActions) {
a.Invoke();
}
}
=======
var errors = currentTarget.errors;
if (errors != null && errors.Any()) {
foreach (var error in errors) {
EditorGUILayout.LabelField("error:" + error);
}
}
>>>>>>>
var errors = currentTarget.errors;
if (errors != null && errors.Any()) {
foreach (var error in errors) {
EditorGUILayout.LabelField("error:" + error);
}
}
using (new EditorGUILayout.VerticalScope()) {
foreach(Action a in messageActions) {
a.Invoke();
}
} |
<<<<<<<
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;
using Foundatio.Serializer;
namespace Foundatio.Queues {
public interface IQueue<T> : IHaveSerializer, IDisposable where T : class {
event EventHandler<EnqueuingEventArgs<T>> Enqueuing;
event EventHandler<EnqueuedEventArgs<T>> Enqueued;
event EventHandler<DequeuedEventArgs<T>> Dequeued;
event EventHandler<CompletedEventArgs<T>> Completed;
event EventHandler<AbandonedEventArgs<T>> Abandoned;
void AttachBehavior(IQueueBehavior<T> behavior);
Task<string> EnqueueAsync(T data);
Task StartWorkingAsync(Func<QueueEntry<T>, Task> handler, bool autoComplete = false, CancellationToken cancellationToken = default(CancellationToken));
Task StopWorkingAsync();
Task<QueueEntry<T>> DequeueAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken));
Task CompleteAsync(IQueueEntryMetadata entry);
Task AbandonAsync(IQueueEntryMetadata entry);
Task<IEnumerable<T>> GetDeadletterItemsAsync(CancellationToken cancellationToken = default(CancellationToken));
Task<QueueStats> GetQueueStatsAsync();
Task DeleteQueueAsync();
string QueueId { get; }
}
public interface IQueueManager {
Task<IQueue<T>> CreateQueueAsync<T>(string name = null, object config = null) where T : class;
Task DeleteQueueAsync(string name);
Task ClearQueueAsync(string name);
}
public class QueueStats {
public long Queued { get; set; }
public long Working { get; set; }
public long Deadletter { get; set; }
public long Enqueued { get; set; }
public long Dequeued { get; set; }
public long Completed { get; set; }
public long Abandoned { get; set; }
public long Errors { get; set; }
public long Timeouts { get; set; }
}
public class EnqueuingEventArgs<T> : CancelEventArgs where T : class {
public IQueue<T> Queue { get; set; }
public T Data { get; set; }
}
public class EnqueuedEventArgs<T> : EventArgs where T : class {
public IQueue<T> Queue { get; set; }
public string Id { get; set; }
public T Data { get; set; }
}
public class DequeuedEventArgs<T> : EventArgs where T : class {
public IQueue<T> Queue { get; set; }
public T Data { get; set; }
public IQueueEntryMetadata Metadata { get; set; }
}
public class CompletedEventArgs<T> : EventArgs where T : class {
public IQueue<T> Queue { get; set; }
public IQueueEntryMetadata Metadata { get; set; }
}
public class AbandonedEventArgs<T> : EventArgs where T : class {
public IQueue<T> Queue { get; set; }
public IQueueEntryMetadata Metadata { get; set; }
}
}
=======
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
using Foundatio.Serializer;
namespace Foundatio.Queues {
public interface IQueue<T> : IHaveSerializer, IDisposable where T : class
{
void AttachBehavior(IQueueBehavior<T> behavior);
string Enqueue(T data);
void StartWorking(Action<QueueEntry<T>> handler, bool autoComplete = false, CancellationToken token = default(CancellationToken));
QueueEntry<T> Dequeue(TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken));
void Complete(string id);
void Abandon(string id);
IEnumerable<T> GetDeadletterItems();
event EventHandler<EnqueuingEventArgs<T>> Enqueuing;
event EventHandler<EnqueuedEventArgs<T>> Enqueued;
event EventHandler<DequeuedEventArgs<T>> Dequeued;
event EventHandler<CompletedEventArgs<T>> Completed;
event EventHandler<AbandonedEventArgs<T>> Abandoned;
void DeleteQueue();
QueueStats GetQueueStats();
string QueueId { get; }
}
public class QueueStats {
public long Queued { get; set; }
public long Working { get; set; }
public long Deadletter { get; set; }
public long Enqueued { get; set; }
public long Dequeued { get; set; }
public long Completed { get; set; }
public long Abandoned { get; set; }
public long Errors { get; set; }
public long Timeouts { get; set; }
}
public class EnqueuingEventArgs<T> : CancelEventArgs where T : class
{
public IQueue<T> Queue { get; set; }
public T Data { get; set; }
}
public class EnqueuedEventArgs<T> : EventArgs where T : class
{
public IQueue<T> Queue { get; set; }
public QueueEntryMetadata Metadata { get; set; }
public T Data { get; set; }
}
public class DequeuedEventArgs<T> : EventArgs where T : class
{
public IQueue<T> Queue { get; set; }
public T Data { get; set; }
public QueueEntryMetadata Metadata { get; set; }
}
public class CompletedEventArgs<T> : EventArgs where T : class
{
public IQueue<T> Queue { get; set; }
public QueueEntryMetadata Metadata { get; set; }
}
public class AbandonedEventArgs<T> : EventArgs where T : class
{
public IQueue<T> Queue { get; set; }
public QueueEntryMetadata Metadata { get; set; }
}
}
>>>>>>>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;
using Foundatio.Serializer;
namespace Foundatio.Queues {
public interface IQueue<T> : IHaveSerializer, IDisposable where T : class {
event EventHandler<EnqueuingEventArgs<T>> Enqueuing;
event EventHandler<EnqueuedEventArgs<T>> Enqueued;
event EventHandler<DequeuedEventArgs<T>> Dequeued;
event EventHandler<CompletedEventArgs<T>> Completed;
event EventHandler<AbandonedEventArgs<T>> Abandoned;
void AttachBehavior(IQueueBehavior<T> behavior);
Task<string> EnqueueAsync(T data);
Task StartWorkingAsync(Func<QueueEntry<T>, Task> handler, bool autoComplete = false, CancellationToken cancellationToken = default(CancellationToken));
Task<QueueEntry<T>> DequeueAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken));
Task CompleteAsync(IQueueEntryMetadata entry);
Task AbandonAsync(IQueueEntryMetadata entry);
Task<IEnumerable<T>> GetDeadletterItemsAsync(CancellationToken cancellationToken = default(CancellationToken));
Task<QueueStats> GetQueueStatsAsync();
Task DeleteQueueAsync();
string QueueId { get; }
}
public interface IQueueManager {
Task<IQueue<T>> CreateQueueAsync<T>(string name = null, object config = null) where T : class;
Task DeleteQueueAsync(string name);
Task ClearQueueAsync(string name);
}
public class QueueStats {
public long Queued { get; set; }
public long Working { get; set; }
public long Deadletter { get; set; }
public long Enqueued { get; set; }
public long Dequeued { get; set; }
public long Completed { get; set; }
public long Abandoned { get; set; }
public long Errors { get; set; }
public long Timeouts { get; set; }
}
public class EnqueuingEventArgs<T> : CancelEventArgs where T : class {
public IQueue<T> Queue { get; set; }
public T Data { get; set; }
}
public class EnqueuedEventArgs<T> : EventArgs where T : class {
public IQueue<T> Queue { get; set; }
public QueueEntryMetadata Metadata { get; set; }
public T Data { get; set; }
}
public class DequeuedEventArgs<T> : EventArgs where T : class {
public IQueue<T> Queue { get; set; }
public T Data { get; set; }
public QueueEntryMetadata Metadata { get; set; }
}
public class CompletedEventArgs<T> : EventArgs where T : class {
public IQueue<T> Queue { get; set; }
public QueueEntryMetadata Metadata { get; set; }
}
public class AbandonedEventArgs<T> : EventArgs where T : class {
public IQueue<T> Queue { get; set; }
public QueueEntryMetadata Metadata { get; set; }
}
} |
<<<<<<<
using Microsoft.Bot.Builder.Dialogs.Declarative.Resources;
=======
using Microsoft.Bot.Builder.Dialogs.Declarative;
using Microsoft.Bot.Builder.Dialogs.Declarative.Expressions;
using Microsoft.Bot.Builder.Dialogs.Rules.Expressions;
>>>>>>>
using Microsoft.Bot.Builder.Dialogs.Declarative;
<<<<<<<
.Use(new RegisterClassMiddleware<IExpressionParser>(new ExpressionEngine()))
.Use(new RegisterClassMiddleware<IBotResourceProvider>(botResourceManager))
=======
.Use(new RegisterClassMiddleware<IExpressionFactory>(new CommonExpressionFactory()))
.Use(new RegisterClassMiddleware<ResourceExplorer>(explorer))
>>>>>>>
.Use(new RegisterClassMiddleware<IExpressionParser>(new ExpressionEngine()))
.Use(new RegisterClassMiddleware<ResourceExplorer>(explorer)) |
<<<<<<<
using Microsoft.Bot.Builder.Dialogs.Adaptive.Events;
using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions;
using Microsoft.Bot.Builder.Expressions;
using Microsoft.Bot.Builder.Expressions.Parser;
using Microsoft.VisualStudio.TestTools.UnitTesting;
=======
using Microsoft.Bot.Builder.Dialogs.Adaptive.Rules;
using Microsoft.Bot.Builder.Dialogs.Adaptive.Steps;
using Microsoft.Bot.Builder.Dialogs.Declarative;
>>>>>>>
using Microsoft.Bot.Builder.Dialogs.Declarative; |
<<<<<<<
using System.Threading.Tasks;
using Foundatio.Extensions;
=======
using Foundatio.Metrics;
using Foundatio.Utility;
>>>>>>>
using Foundatio.Metrics;
<<<<<<<
public class QueueEntry<T> : IQueueEntryMetadata, IDisposable where T : class {
=======
public class QueueEntry<T> : IDisposable where T: class {
>>>>>>>
public class QueueEntry<T> : IDisposable where T: class {
<<<<<<<
await _queue.CompleteAsync(this).AnyContext();
=======
_queue.Complete(Id);
>>>>>>>
await _queue.CompleteAsync(this).AnyContext();
<<<<<<<
await _queue.AbandonAsync(this).AnyContext();
=======
_queue.Abandon(Id);
>>>>>>>
await _queue.AbandonAsync(this).AnyContext();
<<<<<<<
}
public interface IQueueEntryMetadata {
string Id { get; }
DateTime EnqueuedTimeUtc { get; }
DateTime DequeuedTimeUtc { get; }
int Attempts { get; }
TimeSpan ProcessingTime { get; }
}
=======
public QueueEntryMetadata ToMetadata()
{
return new QueueEntryMetadata
{
Id = Id,
EnqueuedTimeUtc = EnqueuedTimeUtc,
DequeuedTimeUtc = DequeuedTimeUtc,
Attempts = Attempts,
ProcessingTime = ProcessingTime
};
}
}
public class QueueEntryMetadata
{
public QueueEntryMetadata()
{
Data = new DataDictionary();
}
public string Id { get; set; }
public DateTime EnqueuedTimeUtc { get; set; }
public DateTime DequeuedTimeUtc { get; set; }
public int Attempts { get; set; }
public TimeSpan ProcessingTime { get; set; }
public DataDictionary Data { get; set; }
}
>>>>>>>
public QueueEntryMetadata ToMetadata() {
return new QueueEntryMetadata
{
Id = Id,
EnqueuedTimeUtc = EnqueuedTimeUtc,
DequeuedTimeUtc = DequeuedTimeUtc,
Attempts = Attempts,
ProcessingTime = ProcessingTime
};
} |
<<<<<<<
private Func<QueueEntry<T>, Task> _workerAction;
private bool _workerAutoComplete;
=======
>>>>>>>
<<<<<<<
public override Task StartWorkingAsync(Func<QueueEntry<T>, Task> handler, bool autoComplete = false, CancellationToken cancellationToken = default(CancellationToken)) {
=======
public override void StartWorking(Action<QueueEntry<T>> handler, bool autoComplete = false, CancellationToken token = default(CancellationToken)) {
>>>>>>>
public override Task StartWorkingAsync(Func<QueueEntry<T>, Task> handler, bool autoComplete = false, CancellationToken cancellationToken = default(CancellationToken)) {
<<<<<<<
if (_queue.Count == 0)
return Task.FromResult<QueueEntry<T>>(null);
=======
if (_queue.Count == 0 || cancellationToken.IsCancellationRequested)
return null;
>>>>>>>
if (_queue.Count == 0 || cancellationToken.IsCancellationRequested)
return Task.FromResult<QueueEntry<T>>(null);
<<<<<<<
public override Task CompleteAsync(IQueueEntryMetadata entry) {
Logger.Trace().Message("Queue {0} complete item: {1}", typeof(T).Name, entry.Id).Write();
=======
public override void Complete(string id) {
Logger.Trace().Message("Queue {0} complete item: {1}", typeof(T).Name, id).Write();
>>>>>>>
public override Task CompleteAsync(IQueueEntryMetadata entry) {
Logger.Trace().Message("Queue {0} complete item: {1}", typeof(T).Name, entry.Id).Write();
<<<<<<<
Logger.Trace().Message("Adding item to wait list for future retry: {0}", entry.Id).Write();
Task.Factory.StartNewDelayed(GetRetryDelay(info.Attempts), () => Retry(info)).AnyContext();
=======
Logger.Trace().Message("Adding item to wait list for future retry: {0}", id).Write();
Task.Factory.StartNewDelayed(GetRetryDelay(info.Attempts), () => Retry(info));
>>>>>>>
Logger.Trace().Message("Adding item to wait list for future retry: {0}", entry.Id).Write();
Task.Factory.StartNewDelayed(GetRetryDelay(info.Attempts), () => Retry(info)).AnyContext();
<<<<<<<
OnAbandoned(entry);
Logger.Trace().Message("Abandon complete: {0}", entry.Id).Write();
return Task.FromResult(0);
=======
OnAbandoned(id);
Logger.Trace().Message("Abondon complete: {0}", id).Write();
>>>>>>>
OnAbandoned(entry);
Logger.Trace().Message("Abandon complete: {0}", entry.Id).Write();
return Task.FromResult(0);
<<<<<<<
private async Task WorkerLoopAsync(CancellationToken token) {
=======
private Task WorkerLoop(Action<QueueEntry<T>> handler, bool autoComplete, CancellationToken token) {
>>>>>>>
private async Task WorkerLoopAsync(CancellationToken token) {
<<<<<<<
=======
Logger.Trace().Message("WorkLoop End").Write();
return TaskHelper.Completed();
>>>>>>>
Logger.Trace().Message("WorkLoop End").Write();
<<<<<<<
Logger.Trace().Message("Scheduling delayed task: delay={0}", delay).Write();
Task.Factory.StartNewDelayed(delay, async () => await DoMaintenanceAsync().AnyContext(), _maintenanceCancellationTokenSource.Token).AnyContext();
=======
Logger.Trace().Message("Scheduling maintenance: delay={0}", delay).Write();
_maintenanceTimer.Change(delay, Timeout.Infinite);
>>>>>>>
Logger.Trace().Message("Scheduling maintenance: delay={0}", delay).Write();
_maintenanceTimer.Change(delay, Timeout.Infinite);
<<<<<<<
var info = _dequeued[key];
await AbandonAsync(new QueueEntry<T>(info.Id, info.Data, this, info.TimeEnqueued, info.Attempts)).AnyContext();
=======
Abandon(key);
>>>>>>>
await AbandonAsync(key).AnyContext();
<<<<<<<
StopWorkingAsync().AnyContext().GetAwaiter().GetResult();
_maintenanceCancellationTokenSource?.Cancel();
=======
_disposeTokenSource?.Cancel();
_maintenanceTimer.Dispose();
>>>>>>>
_disposeTokenSource?.Cancel();
_maintenanceTimer.Dispose(); |
<<<<<<<
Assert.Equal(1, (await queue.GetQueueStatsAsync().AnyContext()).Timeouts);
Assert.True(await db.KeyExistsAsync("q:SimpleWorkItem:" + id).AnyContext());
Assert.Equal(1, await db.ListLengthAsync("q:SimpleWorkItem:in").AnyContext());
Assert.Equal(0, await db.ListLengthAsync("q:SimpleWorkItem:work").AnyContext());
Assert.True(await db.KeyExistsAsync("q:SimpleWorkItem:" + id + ":dequeued").AnyContext());
Assert.Equal(2, await db.StringGetAsync("q:SimpleWorkItem:" + id + ":attempts").AnyContext());
Assert.InRange(CountAllKeys(), 4, 5);
=======
queue.DoMaintenanceWork();
Assert.True(db.KeyExists("q:SimpleWorkItem:" + id));
Assert.Equal(1, db.ListLength("q:SimpleWorkItem:in"));
Assert.Equal(0, db.ListLength("q:SimpleWorkItem:work"));
Assert.True(db.KeyExists("q:SimpleWorkItem:" + id + ":dequeued"));
Assert.True(db.KeyExists("q:SimpleWorkItem:" + id + ":enqueued"));
Assert.Equal(2, db.StringGet("q:SimpleWorkItem:" + id + ":attempts"));
Assert.Equal(1, queue.GetQueueStats().Timeouts);
Assert.InRange(CountAllKeys(), 5, 6);
>>>>>>>
queue.DoMaintenanceWork();
Assert.True(await db.KeyExistsAsync("q:SimpleWorkItem:" + id).AnyContext());
Assert.Equal(1, await db.ListLengthAsync("q:SimpleWorkItem:in").AnyContext());
Assert.Equal(0, await db.ListLengthAsync("q:SimpleWorkItem:work").AnyContext());
Assert.True(await db.KeyExistsAsync("q:SimpleWorkItem:" + id + ":dequeued").AnyContext());
Assert.True(await db.KeyExistsAsync("q:SimpleWorkItem:" + id + ":enqueued").AnyContext());
Assert.Equal(2, await db.StringGetAsync("q:SimpleWorkItem:" + id + ":attempts").AnyContext());
Assert.Equal(1, queue.GetQueueStats().Timeouts);
Assert.InRange(CountAllKeys(), 5, 6);
<<<<<<<
Assert.Equal(0, await db.ListLengthAsync("q:SimpleWorkItem:in").AnyContext());
Assert.Equal(0, await db.ListLengthAsync("q:SimpleWorkItem:work").AnyContext());
Assert.Equal(0, await db.ListLengthAsync("q:SimpleWorkItem:wait").AnyContext());
Assert.Equal(3, await db.ListLengthAsync("q:SimpleWorkItem:dead").AnyContext());
Assert.Equal(10, CountAllKeys());
=======
Assert.Equal(0, db.ListLength("q:SimpleWorkItem:in"));
Assert.Equal(0, db.ListLength("q:SimpleWorkItem:work"));
Assert.Equal(0, db.ListLength("q:SimpleWorkItem:wait"));
Assert.Equal(3, db.ListLength("q:SimpleWorkItem:dead"));
Assert.InRange(CountAllKeys(), 13, 14);
>>>>>>>
Assert.Equal(0, await db.ListLengthAsync("q:SimpleWorkItem:in").AnyContext());
Assert.Equal(0, await db.ListLengthAsync("q:SimpleWorkItem:work").AnyContext());
Assert.Equal(0, await db.ListLengthAsync("q:SimpleWorkItem:wait").AnyContext());
Assert.Equal(3, await db.ListLengthAsync("q:SimpleWorkItem:dead").AnyContext());
Assert.InRange(CountAllKeys(), 13, 14); |
<<<<<<<
public async Task<ResourceResponse> SendActivity(string textReplyToSend, string speak = null, string inputHint = null)
=======
/// <summary>
/// Sends a message activity to the sender of the incoming activity.
/// </summary>
/// <param name="textReplyToSend">The text of the message to send.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="textReplyToSend"/> is <c>null</c> or whitespace.</exception>
/// <remarks>If the activity is successfully sent, the task result contains
/// a <see cref="ResourceResponse"/> object containing the ID that the receiving
/// channel assigned to the activity.</remarks>
public async Task<ResourceResponse> SendActivity(string textReplyToSend)
>>>>>>>
/// <summary>
/// Sends a message activity to the sender of the incoming activity.
/// </summary>
/// <param name="textReplyToSend">The text of the message to send.</param>
/// <returns>A task that represents the work queued to execute.</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="textReplyToSend"/> is <c>null</c> or whitespace.</exception>
/// <remarks>If the activity is successfully sent, the task result contains
/// a <see cref="ResourceResponse"/> object containing the ID that the receiving
/// channel assigned to the activity.</remarks>
public async Task<ResourceResponse> SendActivity(string textReplyToSend, string speak = null, string inputHint = null) |
<<<<<<<
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;
using GiveCRM.Models;
using GiveCRM.Web.Models.Members;
using GiveCRM.Web.Services;
using PagedList;
namespace GiveCRM.Web.Controllers
=======
namespace GiveCRM.Web.Controllers
>>>>>>>
using System.Web.Routing;
using PagedList;
namespace GiveCRM.Web.Controllers
<<<<<<<
private IDonationsService _donationsService;
private IMemberService _memberService;
private ICampaignService _campaignService;
private const int DefaultPageSize = 25;
=======
private const int MaxResults = 25;
private IDonationsService donationsService;
private IMemberService memberService;
private ICampaignService campaignService;
>>>>>>>
private const int MaxResults = 25;
private IDonationsService donationsService;
private IMemberService memberService;
private ICampaignService campaignService; |
<<<<<<<
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;
using GiveCRM.Models;
using GiveCRM.Web.Models.Members;
using GiveCRM.Web.Services;
using PagedList;
namespace GiveCRM.Web.Controllers
=======
namespace GiveCRM.Web.Controllers
>>>>>>>
namespace GiveCRM.Web.Controllers
<<<<<<<
private IDonationsService _donationsService;
private IMemberService _memberService;
private ICampaignService _campaignService;
private const int DefaultPageSize = 25;
=======
private const int MaxResults = 25;
private IDonationsService donationsService;
private IMemberService memberService;
private ICampaignService campaignService;
>>>>>>>
private IDonationsService donationsService;
private IMemberService memberService;
private ICampaignService campaignService;
private const int DefaultPageSize = 25; |
<<<<<<<
internal static List<string> Separators = new List<string> {string.Empty, ".", "_"};
=======
internal static readonly IList<string> Separators = new List<string> { string.Empty, ".", "_" };
>>>>>>>
internal static readonly IList<string> Separators = new List<string> {string.Empty, ".", "_"};
<<<<<<<
internal static List<string> Domains = new List<string>
{
"fakemail.com",
"fakemail.net",
"not.com",
"not.net",
"notmail.com",
"notmail.net",
"coldmail.net",
"voidmail.net",
"voidmail.org",
"pmail.com",
"pmail.net",
"gahoo.com",
"gahoo.org",
"offthe.net",
"notonthe.net",
};
=======
internal static readonly IList<string> Domains = new List<string>
{
"fakemail.com",
"fakemail.net",
"not.com",
"not.net",
"notmail.com",
"notmail.net",
"coldmail.net",
"voidmail.net",
"voidmail.org",
"pmail.com",
"pmail.net",
"gahoo.com",
"gahoo.org",
"offthe.net",
"notonthe.net",
};
>>>>>>>
internal static readonly IList<string> Domains = new List<string>
{
"fakemail.com",
"fakemail.net",
"not.com",
"not.net",
"notmail.com",
"notmail.net",
"coldmail.net",
"voidmail.net",
"voidmail.org",
"pmail.com",
"pmail.net",
"gahoo.com",
"gahoo.org",
"offthe.net",
"notonthe.net",
}; |
<<<<<<<
if (facet.Id == 0)
{
_facetsDb.Insert(facet);
}
else
{
_facetsDb.Update(facet);
}
return RedirectToAction("ListFacets");
=======
if (facet.Id > 0)
{
_facetsDb.Update(facet);
}
else
{
_facetsDb.Insert(facet);
}
return RedirectToAction("ListFacets");
>>>>>>>
if (facet.Id > 0)
{
_facetsDb.Update(facet);
}
else
{
_facetsDb.Insert(facet);
}
return RedirectToAction("ListFacets");
}
return RedirectToAction("ListFacets"); |
<<<<<<<
using Bonobo.Git.Server.Attributes;
using Microsoft.Practices.Unity.Mvc;
using System.Web.Configuration;
=======
using System.Security.Claims;
using System.Web.Helpers;
>>>>>>>
using Bonobo.Git.Server.Attributes;
using Microsoft.Practices.Unity.Mvc;
using System.Web.Configuration;
using System.Security.Claims;
using System.Web.Helpers;
<<<<<<<
var connectionstring = WebConfigurationManager.ConnectionStrings["BonoboGitServerContext"];
if (connectionstring.ProviderName.ToLower() == "system.data.sqlite")
{
if(!connectionstring.ConnectionString.ToLower().Contains("binaryguid=false")){
Trace.WriteLine("Please ensure that the sqlite connection string contains 'BinaryGUID=false;'.");
throw new ConfigurationErrorsException("Please ensure that the sqlite connection string contains 'BinaryGUID=false;'.");
}
}
try
{
new AutomaticUpdater().Run();
new RepositorySynchronizer().Run();
}
catch (Exception ex)
{
Trace.WriteLine("StartupException " + ex);
throw;
}
=======
AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.Upn;
new AutomaticUpdater().Run();
new RepositorySynchronizer().Run();
>>>>>>>
var connectionstring = WebConfigurationManager.ConnectionStrings["BonoboGitServerContext"];
if (connectionstring.ProviderName.ToLower() == "system.data.sqlite")
{
if(!connectionstring.ConnectionString.ToLower().Contains("binaryguid=false")){
Trace.WriteLine("Please ensure that the sqlite connection string contains 'BinaryGUID=false;'.");
throw new ConfigurationErrorsException("Please ensure that the sqlite connection string contains 'BinaryGUID=false;'.");
}
}
try
{
AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.Upn;
new AutomaticUpdater().Run();
new RepositorySynchronizer().Run();
}
catch (Exception ex)
{
Trace.WriteLine("StartupException " + ex);
throw;
} |
<<<<<<<
where apiResourceNames.Contains(apiResource.Name)
select apiResource;
=======
where apiResource.Name == name
orderby apiResource.Name
select apiResource;
>>>>>>>
where apiResourceNames.Contains(apiResource.Name)
orderby apiResource.Name
select apiResource; |
<<<<<<<
await _identityResourceDataSeeder.CreateStandardResourcesAsync();
await CreateApiResourcesAsync();
await CreateApiScopesAsync();
await CreateClientsAsync();
=======
using (_currentTenant.Change(context?.TenantId))
{
await _identityResourceDataSeeder.CreateStandardResourcesAsync();
await CreateApiResourcesAsync();
await CreateClientsAsync();
}
>>>>>>>
using (_currentTenant.Change(context?.TenantId))
{
await _identityResourceDataSeeder.CreateStandardResourcesAsync();
await CreateApiResourcesAsync();
await CreateApiScopesAsync();
await CreateClientsAsync();
} |
<<<<<<<
using Volo.Abp.UI.Navigation;
=======
using MyCompanyName.MyProjectName.Blazor.Menus;
using Volo.Abp.SettingManagement.Blazor;
>>>>>>>
using Volo.Abp.UI.Navigation;
using MyCompanyName.MyProjectName.Blazor.Menus;
using Volo.Abp.SettingManagement.Blazor; |
<<<<<<<
private readonly ICancellationTokenProvider _cancellationTokenProvider;
protected IOrganizationUnitRepository _organizationUnitRepository { get; private set; }
protected IIdentityUserRepository _identityUserRepository { get; private set; }
private readonly ISettingProvider _settingProvider;
=======
protected override CancellationToken CancellationToken => CancellationTokenProvider.Token;
protected ICancellationTokenProvider CancellationTokenProvider { get; }
>>>>>>>
protected IOrganizationUnitRepository _organizationUnitRepository { get; private set; }
protected IIdentityUserRepository _identityUserRepository { get; private set; }
private readonly ISettingProvider _settingProvider;
protected override CancellationToken CancellationToken => CancellationTokenProvider.Token;
protected ICancellationTokenProvider CancellationTokenProvider { get; }
<<<<<<<
_cancellationTokenProvider = cancellationTokenProvider;
_organizationUnitRepository = organizationUnitRepository;
_identityUserRepository = identityUserRepository;
_settingProvider = settingProvider;
=======
RoleRepository = roleRepository;
UserRepository = userRepository;
CancellationTokenProvider = cancellationTokenProvider;
>>>>>>>
_organizationUnitRepository = organizationUnitRepository;
_identityUserRepository = identityUserRepository;
_settingProvider = settingProvider;
RoleRepository = roleRepository;
UserRepository = userRepository;
CancellationTokenProvider = cancellationTokenProvider;
<<<<<<<
public virtual async Task<bool> IsInOrganizationUnitAsync(Guid userId, Guid ouId)
{
return await IsInOrganizationUnitAsync(
await GetByIdAsync(userId).ConfigureAwait(false),
await _organizationUnitRepository.GetAsync(ouId).ConfigureAwait(false)
);
}
public virtual Task<bool> IsInOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou)
{
return Task.FromResult(user.IsInOrganizationUnit(ou.Id));
}
public virtual async Task AddToOrganizationUnitAsync(Guid userId, Guid ouId)
{
await AddToOrganizationUnitAsync(
await _identityUserRepository.GetAsync(userId, true).ConfigureAwait(false),
await _organizationUnitRepository.GetAsync(ouId).ConfigureAwait(false)
);
}
public virtual async Task AddToOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou)
{
await _identityUserRepository.EnsureCollectionLoadedAsync(user, u => u.OrganizationUnits, _cancellationTokenProvider.Token).ConfigureAwait(false);
var currentOus = user.OrganizationUnits;
if (currentOus.Any(cou => cou.OrganizationUnitId == ou.Id && cou.UserId == user.Id))
{
return;
}
await CheckMaxUserOrganizationUnitMembershipCountAsync(user.TenantId, currentOus.Count + 1);
user.AddOrganizationUnit(ou.Id);
}
public virtual async Task RemoveFromOrganizationUnitAsync(Guid userId, Guid ouId)
{
await RemoveFromOrganizationUnitAsync(
await _identityUserRepository.GetAsync(userId, true).ConfigureAwait(false),
await _organizationUnitRepository.GetAsync(ouId).ConfigureAwait(false)
);
}
public virtual async Task RemoveFromOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou)
{
await _identityUserRepository.EnsureCollectionLoadedAsync(user, u => u.OrganizationUnits, _cancellationTokenProvider.Token).ConfigureAwait(false);
user.RemoveOrganizationUnit(ou.Id);
}
public virtual async Task SetOrganizationUnitsAsync(Guid userId, params Guid[] organizationUnitIds)
{
await SetOrganizationUnitsAsync(
await _identityUserRepository.GetAsync(userId, true).ConfigureAwait(false),
organizationUnitIds
);
}
public virtual async Task SetOrganizationUnitsAsync(IdentityUser user, params Guid[] organizationUnitIds)
{
Check.NotNull(user, nameof(user));
Check.NotNull(organizationUnitIds, nameof(organizationUnitIds));
await CheckMaxUserOrganizationUnitMembershipCountAsync(user.TenantId, organizationUnitIds.Length);
var currentOus = await _identityUserRepository.GetOrganizationUnitsAsync(user.Id).ConfigureAwait(false);
//Remove from removed OUs
foreach (var currentOu in currentOus)
{
if (!organizationUnitIds.Contains(currentOu.Id))
{
await RemoveFromOrganizationUnitAsync(user.Id, currentOu.Id).ConfigureAwait(false);
}
}
//Add to added OUs
foreach (var organizationUnitId in organizationUnitIds)
{
if (currentOus.All(ou => ou.Id != organizationUnitId))
{
await AddToOrganizationUnitAsync(
user,
await _organizationUnitRepository.GetAsync(organizationUnitId).ConfigureAwait(false)
);
}
}
}
private async Task CheckMaxUserOrganizationUnitMembershipCountAsync(Guid? tenantId, int requestedCount)
{
var maxCount = await _settingProvider.GetAsync<int>(IdentitySettingNames.OrganizationUnit.MaxUserMembershipCount).ConfigureAwait(false);
if (requestedCount > maxCount)
{
throw new AbpException(string.Format("Can not set more than {0} organization unit for a user!", maxCount));
}
}
[UnitOfWork]
public virtual async Task<List<OrganizationUnit>> GetOrganizationUnitsAsync(IdentityUser user)
{
await _identityUserRepository.EnsureCollectionLoadedAsync(user, u => u.OrganizationUnits, _cancellationTokenProvider.Token).ConfigureAwait(false);
var ouOfUser = user.OrganizationUnits;
return await _organizationUnitRepository.GetListAsync(ouOfUser.Select(t => t.OrganizationUnitId)).ConfigureAwait(false);
}
[UnitOfWork]
public virtual async Task<List<IdentityUser>> GetUsersInOrganizationUnitAsync(OrganizationUnit organizationUnit, bool includeChildren = false)
{
if (includeChildren)
{
return await _identityUserRepository
.GetUsersInOrganizationUnitWithChildrenAsync(organizationUnit.Code)
.ConfigureAwait(false);
}
else
{
return await _identityUserRepository
.GetUsersInOrganizationUnitAsync(organizationUnit.Id)
.ConfigureAwait(false);
}
}
=======
public virtual async Task<IdentityResult> AddDefaultRolesAsync([NotNull] IdentityUser user)
{
await UserRepository.EnsureCollectionLoadedAsync(user, u => u.Roles, CancellationToken);
foreach (var role in await RoleRepository.GetDefaultOnesAsync(cancellationToken: CancellationToken))
{
if (!user.IsInRole(role.Id))
{
user.AddRole(role.Id);
}
}
return await UpdateUserAsync(user);
}
>>>>>>>
public virtual async Task<bool> IsInOrganizationUnitAsync(Guid userId, Guid ouId)
{
return await IsInOrganizationUnitAsync(
await GetByIdAsync(userId).ConfigureAwait(false),
await _organizationUnitRepository.GetAsync(ouId).ConfigureAwait(false)
);
}
public virtual Task<bool> IsInOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou)
{
return Task.FromResult(user.IsInOrganizationUnit(ou.Id));
}
public virtual async Task AddToOrganizationUnitAsync(Guid userId, Guid ouId)
{
await AddToOrganizationUnitAsync(
await _identityUserRepository.GetAsync(userId, true).ConfigureAwait(false),
await _organizationUnitRepository.GetAsync(ouId).ConfigureAwait(false)
);
}
public virtual async Task AddToOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou)
{
await _identityUserRepository.EnsureCollectionLoadedAsync(user, u => u.OrganizationUnits, _cancellationTokenProvider.Token).ConfigureAwait(false);
var currentOus = user.OrganizationUnits;
if (currentOus.Any(cou => cou.OrganizationUnitId == ou.Id && cou.UserId == user.Id))
{
return;
}
await CheckMaxUserOrganizationUnitMembershipCountAsync(user.TenantId, currentOus.Count + 1);
user.AddOrganizationUnit(ou.Id);
}
public virtual async Task RemoveFromOrganizationUnitAsync(Guid userId, Guid ouId)
{
await RemoveFromOrganizationUnitAsync(
await _identityUserRepository.GetAsync(userId, true).ConfigureAwait(false),
await _organizationUnitRepository.GetAsync(ouId).ConfigureAwait(false)
);
}
public virtual async Task RemoveFromOrganizationUnitAsync(IdentityUser user, OrganizationUnit ou)
{
await _identityUserRepository.EnsureCollectionLoadedAsync(user, u => u.OrganizationUnits, _cancellationTokenProvider.Token).ConfigureAwait(false);
user.RemoveOrganizationUnit(ou.Id);
}
public virtual async Task SetOrganizationUnitsAsync(Guid userId, params Guid[] organizationUnitIds)
{
await SetOrganizationUnitsAsync(
await _identityUserRepository.GetAsync(userId, true).ConfigureAwait(false),
organizationUnitIds
);
}
public virtual async Task SetOrganizationUnitsAsync(IdentityUser user, params Guid[] organizationUnitIds)
{
Check.NotNull(user, nameof(user));
Check.NotNull(organizationUnitIds, nameof(organizationUnitIds));
await CheckMaxUserOrganizationUnitMembershipCountAsync(user.TenantId, organizationUnitIds.Length);
var currentOus = await _identityUserRepository.GetOrganizationUnitsAsync(user.Id).ConfigureAwait(false);
//Remove from removed OUs
foreach (var currentOu in currentOus)
{
if (!organizationUnitIds.Contains(currentOu.Id))
{
await RemoveFromOrganizationUnitAsync(user.Id, currentOu.Id).ConfigureAwait(false);
}
}
//Add to added OUs
foreach (var organizationUnitId in organizationUnitIds)
{
if (currentOus.All(ou => ou.Id != organizationUnitId))
{
await AddToOrganizationUnitAsync(
user,
await _organizationUnitRepository.GetAsync(organizationUnitId).ConfigureAwait(false)
);
}
}
}
private async Task CheckMaxUserOrganizationUnitMembershipCountAsync(Guid? tenantId, int requestedCount)
{
var maxCount = await _settingProvider.GetAsync<int>(IdentitySettingNames.OrganizationUnit.MaxUserMembershipCount).ConfigureAwait(false);
if (requestedCount > maxCount)
{
throw new AbpException(string.Format("Can not set more than {0} organization unit for a user!", maxCount));
}
}
[UnitOfWork]
public virtual async Task<List<OrganizationUnit>> GetOrganizationUnitsAsync(IdentityUser user)
{
await _identityUserRepository.EnsureCollectionLoadedAsync(user, u => u.OrganizationUnits, _cancellationTokenProvider.Token).ConfigureAwait(false);
var ouOfUser = user.OrganizationUnits;
return await _organizationUnitRepository.GetListAsync(ouOfUser.Select(t => t.OrganizationUnitId)).ConfigureAwait(false);
}
[UnitOfWork]
public virtual async Task<List<IdentityUser>> GetUsersInOrganizationUnitAsync(OrganizationUnit organizationUnit, bool includeChildren = false)
{
if (includeChildren)
{
return await _identityUserRepository
.GetUsersInOrganizationUnitWithChildrenAsync(organizationUnit.Code)
.ConfigureAwait(false);
}
else
{
return await _identityUserRepository
.GetUsersInOrganizationUnitAsync(organizationUnit.Id)
.ConfigureAwait(false);
}
public virtual async Task<IdentityResult> AddDefaultRolesAsync([NotNull] IdentityUser user)
{
await UserRepository.EnsureCollectionLoadedAsync(user, u => u.Roles, CancellationToken);
foreach (var role in await RoleRepository.GetDefaultOnesAsync(cancellationToken: CancellationToken))
{
if (!user.IsInRole(role.Id))
{
user.AddRole(role.Id);
}
}
return await UpdateUserAsync(user);
} |
<<<<<<<
private readonly IGuidGenerator _guidGenerator;
public MongoIdentityUserRepository(IMongoDbContextProvider<IAbpIdentityMongoDbContext> dbContextProvider, IGuidGenerator guidGenerator)
=======
public MongoIdentityUserRepository(IMongoDbContextProvider<IAbpIdentityMongoDbContext> dbContextProvider)
>>>>>>>
private readonly IGuidGenerator _guidGenerator;
public MongoIdentityUserRepository(IMongoDbContextProvider<IAbpIdentityMongoDbContext> dbContextProvider, IGuidGenerator guidGenerator)
<<<<<<<
public async Task<IdentityUser> FindByNormalizedUserNameAsync(
string normalizedUserName,
=======
public virtual async Task<IdentityUser> FindByNormalizedUserNameAsync(
string normalizedUserName,
>>>>>>>
public virtual async Task<IdentityUser> FindByNormalizedUserNameAsync(
string normalizedUserName,
<<<<<<<
public async Task<List<string>> GetRoleNamesAsync(
Guid id,
=======
public virtual async Task<List<string>> GetRoleNamesAsync(
Guid id,
>>>>>>>
public virtual async Task<List<string>> GetRoleNamesAsync(
Guid id,
<<<<<<<
public async Task<List<string>> GetRoleNamesInOrganizationUnitAsync(
Guid id,
CancellationToken cancellationToken = default)
{
var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)).ConfigureAwait(false);
var organizationUnitIds = user.OrganizationUnits.Select(r => r.OrganizationUnitId);
var organizationUnits = DbContext.OrganizationUnits.AsQueryable().Where(ou => organizationUnitIds.Contains(ou.Id));
var roleIds = organizationUnits.SelectMany(x => x.Roles.Select(r => r.RoleId));
return await DbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id)).Select(r => r.Name).ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false);
}
public async Task<IdentityUser> FindByLoginAsync(
string loginProvider,
string providerKey,
=======
public virtual async Task<IdentityUser> FindByLoginAsync(
string loginProvider,
string providerKey,
>>>>>>>
public async Task<List<string>> GetRoleNamesInOrganizationUnitAsync(
Guid id,
CancellationToken cancellationToken = default)
{
var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)).ConfigureAwait(false);
var organizationUnitIds = user.OrganizationUnits.Select(r => r.OrganizationUnitId);
var organizationUnits = DbContext.OrganizationUnits.AsQueryable().Where(ou => organizationUnitIds.Contains(ou.Id));
var roleIds = organizationUnits.SelectMany(x => x.Roles.Select(r => r.RoleId));
return await DbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id)).Select(r => r.Name).ToListAsync(GetCancellationToken(cancellationToken)).ConfigureAwait(false);
}
public virtual async Task<IdentityUser> FindByLoginAsync(
string loginProvider,
string providerKey,
<<<<<<<
public async Task<List<IdentityUser>> GetListByNormalizedRoleNameAsync(
string normalizedRoleName,
=======
public virtual async Task<List<IdentityUser>> GetListByNormalizedRoleNameAsync(
string normalizedRoleName,
>>>>>>>
public virtual async Task<List<IdentityUser>> GetListByNormalizedRoleNameAsync(
string normalizedRoleName,
<<<<<<<
public async Task<List<OrganizationUnit>> GetOrganizationUnitsAsync(
Guid id,
bool includeDetails = false,
CancellationToken cancellationToken = default)
{
var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)).ConfigureAwait(false);
var organizationUnitIds = user.OrganizationUnits.Select(r => r.OrganizationUnitId);
return await DbContext.OrganizationUnits.AsQueryable()
.Where(ou => organizationUnitIds.Contains(ou.Id))
.ToListAsync(GetCancellationToken(cancellationToken))
.ConfigureAwait(false);
}
public async Task<long> GetCountAsync(
=======
public virtual async Task<long> GetCountAsync(
>>>>>>>
public async Task<List<OrganizationUnit>> GetOrganizationUnitsAsync(
Guid id,
bool includeDetails = false,
CancellationToken cancellationToken = default)
{
var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)).ConfigureAwait(false);
var organizationUnitIds = user.OrganizationUnits.Select(r => r.OrganizationUnitId);
return await DbContext.OrganizationUnits.AsQueryable()
.Where(ou => organizationUnitIds.Contains(ou.Id))
.ToListAsync(GetCancellationToken(cancellationToken))
.ConfigureAwait(false);
}
public virtual async Task<long> GetCountAsync( |
<<<<<<<
using System;
=======
using System;
using System.Collections.Generic;
>>>>>>>
using System;
using System.Collections.Generic;
<<<<<<<
=======
app.Use(async (ctx, next) =>
{
var currentPrincipalAccessor = ctx.RequestServices.GetRequiredService<ICurrentPrincipalAccessor>();
var map = new Dictionary<string, string>()
{
{ "sub", AbpClaimTypes.UserId },
{ "role", AbpClaimTypes.Role },
{ "email", AbpClaimTypes.Email },
//any other map
};
var mapClaims = currentPrincipalAccessor.Principal.Claims.Where(p => map.Keys.Contains(p.Type)).ToList();
currentPrincipalAccessor.Principal.AddIdentity(new ClaimsIdentity(mapClaims.Select(p => new Claim(map[p.Type], p.Value, p.ValueType, p.Issuer))));
await next();
});
app.UseAuthorization();
>>>>>>>
app.Use(async (ctx, next) =>
{
var currentPrincipalAccessor = ctx.RequestServices.GetRequiredService<ICurrentPrincipalAccessor>();
var map = new Dictionary<string, string>()
{
{ "sub", AbpClaimTypes.UserId },
{ "role", AbpClaimTypes.Role },
{ "email", AbpClaimTypes.Email },
//any other map
};
var mapClaims = currentPrincipalAccessor.Principal.Claims.Where(p => map.Keys.Contains(p.Type)).ToList();
currentPrincipalAccessor.Principal.AddIdentity(new ClaimsIdentity(mapClaims.Select(p => new Claim(map[p.Type], p.Value, p.ValueType, p.Issuer))));
await next();
}); |
<<<<<<<
using Volo.Abp.IdentityServer.ApiScopes;
=======
using Volo.Abp.IdentityServer.AspNetIdentity;
>>>>>>>
using Volo.Abp.IdentityServer.AspNetIdentity;
using Volo.Abp.IdentityServer.ApiScopes; |
<<<<<<<
using Microsoft.AspNetCore.Mvc.ApiExplorer;
=======
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure;
>>>>>>>
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure;
<<<<<<<
using Volo.Abp.Http;
=======
using Volo.Abp.DynamicProxy;
>>>>>>>
using Volo.Abp.Http;
using Volo.Abp.DynamicProxy; |
<<<<<<<
public IDataFilter DataFilter { get; set; }
public ICurrentTenant CurrentTenant { get; set; }
public IAsyncQueryableExecuter AsyncExecuter { get; set; }
public IUnitOfWorkManager UnitOfWorkManager { get; set; }
[Obsolete("This method will be removed in future versions.")]
=======
>>>>>>>
[Obsolete("This method will be removed in future versions.")] |
<<<<<<<
public override async Task<TEntity> UpdateAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
=======
public override async Task InsertManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{
foreach (var entity in entities)
{
CheckAndSetId(entity);
}
if (BulkOperationProvider != null)
{
await BulkOperationProvider.InsertManyAsync<TDbContext, TEntity>(
this,
entities,
autoSave,
cancellationToken
);
return;
}
await DbSet.AddRangeAsync(entities);
if (autoSave)
{
await DbContext.SaveChangesAsync();
}
}
public async override Task<TEntity> UpdateAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
>>>>>>>
public override async Task InsertManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{
foreach (var entity in entities)
{
CheckAndSetId(entity);
}
if (BulkOperationProvider != null)
{
await BulkOperationProvider.InsertManyAsync<TDbContext, TEntity>(
this,
entities,
autoSave,
cancellationToken
);
return;
}
await DbSet.AddRangeAsync(entities);
if (autoSave)
{
await DbContext.SaveChangesAsync();
}
}
public override async Task<TEntity> UpdateAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
<<<<<<<
public override async Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
=======
public override async Task UpdateManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{
if (BulkOperationProvider != null)
{
await BulkOperationProvider.UpdateManyAsync<TDbContext, TEntity>(
this,
entities,
autoSave,
cancellationToken
);
return;
}
DbSet.UpdateRange(entities);
if (autoSave)
{
await DbContext.SaveChangesAsync();
}
}
public async override Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
>>>>>>>
public override async Task UpdateManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{
if (BulkOperationProvider != null)
{
await BulkOperationProvider.UpdateManyAsync<TDbContext, TEntity>(
this,
entities,
autoSave,
cancellationToken
);
return;
}
DbSet.UpdateRange(entities);
if (autoSave)
{
await DbContext.SaveChangesAsync();
}
}
public override async Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default)
<<<<<<<
public override async Task<List<TEntity>> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default)
=======
public override async Task DeleteManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{
if (BulkOperationProvider != null)
{
await BulkOperationProvider.DeleteManyAsync<TDbContext, TEntity>(
this,
entities,
autoSave,
cancellationToken);
return;
}
DbSet.RemoveRange(entities);
if (autoSave)
{
await DbContext.SaveChangesAsync();
}
}
public async override Task<List<TEntity>> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default)
>>>>>>>
public override async Task DeleteManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default)
{
if (BulkOperationProvider != null)
{
await BulkOperationProvider.DeleteManyAsync<TDbContext, TEntity>(
this,
entities,
autoSave,
cancellationToken);
return;
}
DbSet.RemoveRange(entities);
if (autoSave)
{
await DbContext.SaveChangesAsync();
}
}
public override async Task<List<TEntity>> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default)
<<<<<<<
public override async Task<IQueryable<TEntity>> GetQueryableAsync()
{
return (await GetDbSetAsync()).AsQueryable();
}
public override async Task<TEntity> FindAsync(
=======
protected override Task SaveChangesAsync(CancellationToken cancellationToken)
{
return DbContext.SaveChangesAsync(cancellationToken);
}
public async override Task<TEntity> FindAsync(
>>>>>>>
public override async Task<IQueryable<TEntity>> GetQueryableAsync()
{
return (await GetDbSetAsync()).AsQueryable();
}
protected override Task SaveChangesAsync(CancellationToken cancellationToken)
{
return DbContext.SaveChangesAsync(cancellationToken);
}
public override async Task<TEntity> FindAsync(
<<<<<<<
? await (await WithDetailsAsync()).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
: await (await GetDbSetAsync()).FindAsync(new object[] {id}, GetCancellationToken(cancellationToken));
=======
? await WithDetails().FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
: await DbSet.FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));
>>>>>>>
? await (await WithDetailsAsync()).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
: await (await GetDbSetAsync()).FindAsync(new object[] {id}, GetCancellationToken(cancellationToken)); |
<<<<<<<
using Volo.Abp;
=======
using Volo.Abp.Autofac;
>>>>>>>
using Volo.Abp.Autofac;
using Volo.Abp;
<<<<<<<
.RegisterGeneric(descriptor.ImplementationType)
.As(descriptor.ServiceType)
.ConfigureLifecycle(descriptor.Lifetime, lifetimeScopeTagForSingletons)
=======
.RegisterGeneric(service.ImplementationType)
.As(service.ServiceType)
.ConfigureLifecycle(service.Lifetime)
.FindConstructorsWith(new AbpAutofacConstructorFinder())
>>>>>>>
.RegisterGeneric(descriptor.ImplementationType)
.As(descriptor.ServiceType)
.ConfigureLifecycle(descriptor.Lifetime, lifetimeScopeTagForSingletons)
.FindConstructorsWith(new AbpAutofacConstructorFinder())
<<<<<<<
.RegisterType(descriptor.ImplementationType)
.As(descriptor.ServiceType)
.ConfigureLifecycle(descriptor.Lifetime, lifetimeScopeTagForSingletons)
=======
.RegisterType(service.ImplementationType)
.As(service.ServiceType)
.ConfigureLifecycle(service.Lifetime)
.FindConstructorsWith(new AbpAutofacConstructorFinder())
>>>>>>>
.RegisterType(descriptor.ImplementationType)
.As(descriptor.ServiceType)
.ConfigureLifecycle(descriptor.Lifetime, lifetimeScopeTagForSingletons)
.FindConstructorsWith(new AbpAutofacConstructorFinder()) |
<<<<<<<
using Microsoft.Extensions.Options;
using System.Collections.Generic;
using Volo.Abp;
=======
using Volo.Abp.BlobStoring;
using Microsoft.Extensions.Options;
>>>>>>>
using Volo.Abp.BlobStoring;
using Microsoft.Extensions.Options;
using System.Collections.Generic;
using Volo.Abp; |
<<<<<<<
protected Validations CreateValidationsRef;
protected Validations EditValidationsRef;
=======
protected List<BreadcrumbItem> BreadcrumbItems = new List<BreadcrumbItem>(2);
>>>>>>>
protected Validations CreateValidationsRef;
protected Validations EditValidationsRef;
protected List<BreadcrumbItem> BreadcrumbItems = new List<BreadcrumbItem>(2);
<<<<<<<
protected virtual Task OnCreatingEntityAsync()
{
return Task.CompletedTask;
}
protected virtual Task OnCreatedEntityAsync()
{
return Task.CompletedTask;
}
=======
>>>>>>>
protected virtual Task OnCreatingEntityAsync()
{
return Task.CompletedTask;
}
protected virtual Task OnCreatedEntityAsync()
{
return Task.CompletedTask;
} |
<<<<<<<
private readonly IOptions<CmsKitReactionOptions> _reactionOptions;
=======
private readonly BlogPostManager _blogPostManager;
private readonly IOptions<CmsKitOptions> _options;
>>>>>>>
private readonly BlogPostManager _blogPostManager;
private readonly IOptions<CmsKitReactionOptions> _reactionOptions;
<<<<<<<
IContentRepository contentRepository,
IEntityTagManager entityTagManager,
ITagManager tagManager,
=======
TagManager tagManager,
ITagRepository tagRepository,
>>>>>>>
TagManager tagManager,
ITagRepository tagRepository,
<<<<<<<
IOptions<CmsKitReactionOptions> reactionOptions,
IOptions<CmsKitTagOptions> tagOptions,
IMediaDescriptorRepository mediaDescriptorRepository,
IBlobContainer<MediaContainer> mediaBlobContainer)
=======
BlogPostManager blogPostmanager,
IBlogFeatureRepository blogFeatureRepository,
EntityTagManager entityTagManager,
IOptions<CmsKitOptions> options,
IOptions<CmsKitTagOptions> tagOptions,
IMediaDescriptorRepository mediaDescriptorRepository,
IBlobContainer<MediaContainer> mediaBlobContainer,
BlogManager blogManager,
IOptions<CmsKitMediaOptions> cmsMediaOptions,
IOptions<CmsKitCommentOptions> commentsOptions)
>>>>>>>
BlogPostManager blogPostmanager,
IBlogFeatureRepository blogFeatureRepository,
EntityTagManager entityTagManager,
IOptions<CmsKitTagOptions> tagOptions,
IMediaDescriptorRepository mediaDescriptorRepository,
IBlobContainer<MediaContainer> mediaBlobContainer,
BlogManager blogManager,
IOptions<CmsKitMediaOptions> cmsMediaOptions,
IOptions<CmsKitCommentOptions> commentsOptions)
<<<<<<<
_reactionOptions = reactionOptions;
=======
_blogPostManager = blogPostmanager;
_blogFeatureRepository = blogFeatureRepository;
_options = options;
>>>>>>>
_blogPostManager = blogPostmanager;
_blogFeatureRepository = blogFeatureRepository; |
<<<<<<<
=======
public async Task<ICompleteJobResponse> Send(CancellationToken token)
{
var asyncReply = gatewayClient.CompleteJobAsync(request, cancellationToken: token);
await asyncReply.ResponseAsync;
return new Responses.CompleteJobResponse();
}
public Task<ICompleteJobResponse> SendWithRetry(TimeSpan? timespan = null)
{
throw new NotImplementedException();
}
>>>>>>>
public async Task<ICompleteJobResponse> Send(CancellationToken token)
{
var asyncReply = gatewayClient.CompleteJobAsync(request, cancellationToken: token);
await asyncReply.ResponseAsync;
return new Responses.CompleteJobResponse();
} |
<<<<<<<
=======
this.btnGenerateUniqueName = new System.Windows.Forms.Button();
>>>>>>>
this.btnGenerateUniqueName = new System.Windows.Forms.Button();
<<<<<<<
// textBoxTribe
//
this.textBoxTribe.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.textBoxTribe.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
this.textBoxTribe.Location = new System.Drawing.Point(50, 71);
this.textBoxTribe.Name = "textBoxTribe";
this.textBoxTribe.Size = new System.Drawing.Size(172, 20);
this.textBoxTribe.TabIndex = 2;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(6, 74);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(31, 13);
this.label10.TabIndex = 29;
this.label10.Text = "Tribe";
//
=======
// textBoxTribe
//
this.textBoxTribe.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.textBoxTribe.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
this.textBoxTribe.Location = new System.Drawing.Point(50, 71);
this.textBoxTribe.Name = "textBoxTribe";
this.textBoxTribe.Size = new System.Drawing.Size(172, 20);
this.textBoxTribe.TabIndex = 28;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(6, 74);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(31, 13);
this.label10.TabIndex = 29;
this.label10.Text = "Tribe";
//
>>>>>>>
// textBoxTribe
//
this.textBoxTribe.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.textBoxTribe.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
this.textBoxTribe.Location = new System.Drawing.Point(50, 71);
this.textBoxTribe.Name = "textBoxTribe";
this.textBoxTribe.Size = new System.Drawing.Size(172, 20);
this.textBoxTribe.TabIndex = 2;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(6, 74);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(31, 13);
this.label10.TabIndex = 29;
this.label10.Text = "Tribe";
//
<<<<<<<
=======
// btnGenerateUniqueName
//
this.btnGenerateUniqueName.Location = new System.Drawing.Point(200, 19);
this.btnGenerateUniqueName.Name = "btnGenerateUniqueName";
this.btnGenerateUniqueName.Size = new System.Drawing.Size(22, 20);
this.btnGenerateUniqueName.TabIndex = 15;
this.btnGenerateUniqueName.TabStop = false;
this.btnGenerateUniqueName.Text = "Generate";
this.btnGenerateUniqueName.UseVisualStyleBackColor = true;
this.btnGenerateUniqueName.Click += new System.EventHandler(this.btnGenerateUniqueName_Click);
//
>>>>>>>
// btnGenerateUniqueName
//
this.btnGenerateUniqueName.Location = new System.Drawing.Point(200, 19);
this.btnGenerateUniqueName.Name = "btnGenerateUniqueName";
this.btnGenerateUniqueName.Size = new System.Drawing.Size(22, 20);
this.btnGenerateUniqueName.TabIndex = 15;
this.btnGenerateUniqueName.TabStop = false;
this.btnGenerateUniqueName.Text = "Generate";
this.btnGenerateUniqueName.UseVisualStyleBackColor = true;
this.btnGenerateUniqueName.Click += new System.EventHandler(this.btnGenerateUniqueName_Click);
// |
<<<<<<<
setMoreCreatureData(creature);
CreatureName = uiControls.NamePatterns.generateCreatureName(creature, _females, _males);
=======
CreatureName = uiControls.NamePatterns.generateCreatureName(creature, _females, _males, showDuplicateNameWarning);
>>>>>>>
setMoreCreatureData(creature);
CreatureName = uiControls.NamePatterns.generateCreatureName(creature, _females, _males, showDuplicateNameWarning); |
<<<<<<<
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label12 = new System.Windows.Forms.Label();
this.numericUpDownMaxBreedingSug = new System.Windows.Forms.NumericUpDown();
=======
this.chkExperimentalOCR = new System.Windows.Forms.CheckBox();
this.multiplierSettingTo = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingSp = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingDm = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingWe = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingFo = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingOx = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingSt = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingHP = new ARKBreedingStats.MultiplierSetting();
>>>>>>>
this.chkExperimentalOCR = new System.Windows.Forms.CheckBox();
this.multiplierSettingTo = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingSp = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingDm = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingWe = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingFo = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingOx = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingSt = new ARKBreedingStats.MultiplierSetting();
this.multiplierSettingHP = new ARKBreedingStats.MultiplierSetting();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label12 = new System.Windows.Forms.Label();
this.numericUpDownMaxBreedingSug = new System.Windows.Forms.NumericUpDown();
<<<<<<<
// groupBox4
//
this.groupBox4.Controls.Add(this.label12);
this.groupBox4.Controls.Add(this.numericUpDownMaxBreedingSug);
this.groupBox4.Location = new System.Drawing.Point(322, 274);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(230, 49);
this.groupBox4.TabIndex = 6;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Breeding Planner";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(6, 16);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(154, 13);
this.label12.TabIndex = 4;
this.label12.Text = "Max Breeding Pair Suggestions";
//
// numericUpDownMaxBreedingSug
//
this.numericUpDownMaxBreedingSug.Location = new System.Drawing.Point(167, 14);
this.numericUpDownMaxBreedingSug.Maximum = new decimal(new int[] {
200,
0,
0,
0});
this.numericUpDownMaxBreedingSug.Name = "numericUpDownMaxBreedingSug";
this.numericUpDownMaxBreedingSug.Size = new System.Drawing.Size(57, 20);
this.numericUpDownMaxBreedingSug.TabIndex = 5;
//
=======
// chkExperimentalOCR
//
this.chkExperimentalOCR.AutoSize = true;
this.chkExperimentalOCR.Location = new System.Drawing.Point(112, 19);
this.chkExperimentalOCR.Name = "chkExperimentalOCR";
this.chkExperimentalOCR.Size = new System.Drawing.Size(112, 17);
this.chkExperimentalOCR.TabIndex = 6;
this.chkExperimentalOCR.Text = "Experimental OCR";
this.chkExperimentalOCR.UseVisualStyleBackColor = true;
this.chkExperimentalOCR.CheckedChanged += new System.EventHandler(this.chkExperimentalOCR_CheckedChanged);
//
// multiplierSettingTo
//
this.multiplierSettingTo.Location = new System.Drawing.Point(6, 256);
this.multiplierSettingTo.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingTo.Name = "multiplierSettingTo";
this.multiplierSettingTo.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingTo.TabIndex = 12;
//
// multiplierSettingSp
//
this.multiplierSettingSp.Location = new System.Drawing.Point(6, 230);
this.multiplierSettingSp.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingSp.Name = "multiplierSettingSp";
this.multiplierSettingSp.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingSp.TabIndex = 11;
//
// multiplierSettingDm
//
this.multiplierSettingDm.Location = new System.Drawing.Point(6, 204);
this.multiplierSettingDm.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingDm.Name = "multiplierSettingDm";
this.multiplierSettingDm.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingDm.TabIndex = 10;
//
// multiplierSettingWe
//
this.multiplierSettingWe.Location = new System.Drawing.Point(6, 178);
this.multiplierSettingWe.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingWe.Name = "multiplierSettingWe";
this.multiplierSettingWe.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingWe.TabIndex = 9;
//
// multiplierSettingFo
//
this.multiplierSettingFo.Location = new System.Drawing.Point(6, 152);
this.multiplierSettingFo.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingFo.Name = "multiplierSettingFo";
this.multiplierSettingFo.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingFo.TabIndex = 8;
//
// multiplierSettingOx
//
this.multiplierSettingOx.Location = new System.Drawing.Point(6, 126);
this.multiplierSettingOx.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingOx.Name = "multiplierSettingOx";
this.multiplierSettingOx.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingOx.TabIndex = 7;
//
// multiplierSettingSt
//
this.multiplierSettingSt.Location = new System.Drawing.Point(6, 100);
this.multiplierSettingSt.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingSt.Name = "multiplierSettingSt";
this.multiplierSettingSt.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingSt.TabIndex = 6;
//
// multiplierSettingHP
//
this.multiplierSettingHP.Location = new System.Drawing.Point(6, 74);
this.multiplierSettingHP.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingHP.Name = "multiplierSettingHP";
this.multiplierSettingHP.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingHP.TabIndex = 5;
//
>>>>>>>
// groupBox4
//
this.groupBox4.Controls.Add(this.label12);
this.groupBox4.Controls.Add(this.numericUpDownMaxBreedingSug);
this.groupBox4.Location = new System.Drawing.Point(322, 274);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(230, 49);
this.groupBox4.TabIndex = 6;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Breeding Planner";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(6, 16);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(154, 13);
this.label12.TabIndex = 4;
this.label12.Text = "Max Breeding Pair Suggestions";
//
// numericUpDownMaxBreedingSug
//
this.numericUpDownMaxBreedingSug.Location = new System.Drawing.Point(167, 14);
this.numericUpDownMaxBreedingSug.Maximum = new decimal(new int[] {
200,
0,
0,
0});
this.numericUpDownMaxBreedingSug.Name = "numericUpDownMaxBreedingSug";
this.numericUpDownMaxBreedingSug.Size = new System.Drawing.Size(57, 20);
this.numericUpDownMaxBreedingSug.TabIndex = 5;
//
// chkExperimentalOCR
//
this.chkExperimentalOCR.AutoSize = true;
this.chkExperimentalOCR.Location = new System.Drawing.Point(112, 19);
this.chkExperimentalOCR.Name = "chkExperimentalOCR";
this.chkExperimentalOCR.Size = new System.Drawing.Size(112, 17);
this.chkExperimentalOCR.TabIndex = 6;
this.chkExperimentalOCR.Text = "Experimental OCR";
this.chkExperimentalOCR.UseVisualStyleBackColor = true;
this.chkExperimentalOCR.CheckedChanged += new System.EventHandler(this.chkExperimentalOCR_CheckedChanged);
//
// multiplierSettingTo
//
this.multiplierSettingTo.Location = new System.Drawing.Point(6, 256);
this.multiplierSettingTo.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingTo.Name = "multiplierSettingTo";
this.multiplierSettingTo.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingTo.TabIndex = 12;
//
// multiplierSettingSp
//
this.multiplierSettingSp.Location = new System.Drawing.Point(6, 230);
this.multiplierSettingSp.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingSp.Name = "multiplierSettingSp";
this.multiplierSettingSp.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingSp.TabIndex = 11;
//
// multiplierSettingDm
//
this.multiplierSettingDm.Location = new System.Drawing.Point(6, 204);
this.multiplierSettingDm.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingDm.Name = "multiplierSettingDm";
this.multiplierSettingDm.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingDm.TabIndex = 10;
//
// multiplierSettingWe
//
this.multiplierSettingWe.Location = new System.Drawing.Point(6, 178);
this.multiplierSettingWe.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingWe.Name = "multiplierSettingWe";
this.multiplierSettingWe.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingWe.TabIndex = 9;
//
// multiplierSettingFo
//
this.multiplierSettingFo.Location = new System.Drawing.Point(6, 152);
this.multiplierSettingFo.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingFo.Name = "multiplierSettingFo";
this.multiplierSettingFo.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingFo.TabIndex = 8;
//
// multiplierSettingOx
//
this.multiplierSettingOx.Location = new System.Drawing.Point(6, 126);
this.multiplierSettingOx.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingOx.Name = "multiplierSettingOx";
this.multiplierSettingOx.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingOx.TabIndex = 7;
//
// multiplierSettingSt
//
this.multiplierSettingSt.Location = new System.Drawing.Point(6, 100);
this.multiplierSettingSt.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingSt.Name = "multiplierSettingSt";
this.multiplierSettingSt.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingSt.TabIndex = 6;
//
// multiplierSettingHP
//
this.multiplierSettingHP.Location = new System.Drawing.Point(6, 74);
this.multiplierSettingHP.Multipliers = new double[] {
1D,
1D,
1D,
1D};
this.multiplierSettingHP.Name = "multiplierSettingHP";
this.multiplierSettingHP.Size = new System.Drawing.Size(288, 26);
this.multiplierSettingHP.TabIndex = 5;
//
<<<<<<<
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.NumericUpDown numericUpDownMaxBreedingSug;
=======
private System.Windows.Forms.CheckBox chkExperimentalOCR;
>>>>>>>
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.NumericUpDown numericUpDownMaxBreedingSug;
private System.Windows.Forms.CheckBox chkExperimentalOCR; |
<<<<<<<
flowLayoutPanelCreatures.ResumeLayout();
=======
DetermineParentsToBreed();
>>>>>>>
flowLayoutPanelCreatures.ResumeLayout();
DetermineParentsToBreed(); |
<<<<<<<
private List<string> creatureNames = new List<string>();
=======
private Dictionary<String, Animal> animalCollection;
private List<string> creatures = new List<string>();
>>>>>>>
private Dictionary<String, Animal> animalCollection;
private List<string> creatureNames = new List<string>();
<<<<<<<
private List<List<double[]>> results = new List<List<double[]>>(); // stores the possible results of all stats as array (wildlevel, domlevel, tamingEff)
=======
private List<StatIO> testingIOs = new List<StatIO>();
private List<List<double[]>> results = new List<List<double[]>>();
>>>>>>>
private List<StatIO> testingIOs = new List<StatIO>();
private List<List<double[]>> results = new List<List<double[]>>(); // stores the possible results of all stats as array (wildlevel, domlevel, tamingEff)
<<<<<<<
string creatureName = values[0].Trim();
this.comboBoxCreatures.Items.Add(creatureName);
creatureNames.Add(creatureName);
=======
this.comboBoxCreatures.Items.Add(values[0].Trim());
this.cbbStatTestingRace.Items.Add(values[0].Trim());
>>>>>>>
string creatureName = values[0].Trim();
this.comboBoxCreatures.Items.Add(creatureName);
creatureNames.Add(creatureName);
this.cbbStatTestingRace.Items.Add(creatureName);
<<<<<<<
statIOs[s].LevelWild = results[s][i][0].ToString();
statIOs[s].BarLength = (int)(results[s][i][0] * 1.5); // 66+ is displayed as 100% (probability for level 33 is <0.01% for wild creatures)
=======
statIOs[s].LevelWild = (Int32)results[s][i][0];
statIOs[s].BarLength = (int)results[s][i][0];
>>>>>>>
statIOs[s].LevelWild = (Int32)results[s][i][0];
statIOs[s].BarLength = (int)(results[s][i][0] * 1.5); // 66+ is displayed as 100% (probability for level 33 is <0.01% for wild creatures) |
<<<<<<<
public virtual async Task<string> GetOauthSignInLinkAsync(ITurnContext turnContext, AppCredentials oAuthAppCredentials, string connectionName, string userId, string finalRedirect = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public virtual async Task<string> GetOauthSignInLinkAsync(ITurnContext turnContext, string connectionName, string userId, string finalRedirect = null, CancellationToken cancellationToken = default)
>>>>>>>
public virtual async Task<string> GetOauthSignInLinkAsync(ITurnContext turnContext, AppCredentials oAuthAppCredentials, string connectionName, string userId, string finalRedirect = null, CancellationToken cancellationToken = default)
<<<<<<<
public virtual async Task SignOutUserAsync(ITurnContext turnContext, AppCredentials oAuthAppCredentials, string connectionName = null, string userId = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public virtual async Task SignOutUserAsync(ITurnContext turnContext, string connectionName = null, string userId = null, CancellationToken cancellationToken = default)
>>>>>>>
public virtual async Task SignOutUserAsync(ITurnContext turnContext, AppCredentials oAuthAppCredentials, string connectionName = null, string userId = null, CancellationToken cancellationToken = default)
<<<<<<<
public virtual async Task<TokenStatus[]> GetTokenStatusAsync(ITurnContext context, AppCredentials oAuthAppCredentials, string userId, string includeFilter = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public virtual async Task<TokenStatus[]> GetTokenStatusAsync(ITurnContext context, string userId, string includeFilter = null, CancellationToken cancellationToken = default)
>>>>>>>
public virtual async Task<TokenStatus[]> GetTokenStatusAsync(ITurnContext context, AppCredentials oAuthAppCredentials, string userId, string includeFilter = null, CancellationToken cancellationToken = default)
<<<<<<<
public virtual async Task<Dictionary<string, TokenResponse>> GetAadTokensAsync(ITurnContext context, AppCredentials oAuthAppCredentials, string connectionName, string[] resourceUrls, string userId = null, CancellationToken cancellationToken = default(CancellationToken))
=======
public virtual async Task<Dictionary<string, TokenResponse>> GetAadTokensAsync(ITurnContext context, string connectionName, string[] resourceUrls, string userId = null, CancellationToken cancellationToken = default)
>>>>>>>
public virtual async Task<Dictionary<string, TokenResponse>> GetAadTokensAsync(ITurnContext context, AppCredentials oAuthAppCredentials, string connectionName, string[] resourceUrls, string userId = null, CancellationToken cancellationToken = default) |
<<<<<<<
animator.SetFloat(configuration.predictedFallDistanceParameterName, 0);
isAirborne = false;
=======
animator.SetFloat(predictedFallDistanceParameterName, 0);
shouldUseRootMotion = true;
>>>>>>>
animator.SetFloat(configuration.predictedFallDistanceParameterName, 0);
shouldUseRootMotion = true; |
<<<<<<<
//thirdPersonBrain.cameraAnimationManager.SetAnimation("Strafe",1);
thirdPersonBrain.thirdPersonCameraAnimationManager.StrafeStarted();
turning = true;
var cameraForward = Camera.main.transform.forward;
cameraForward.y = 0;
//cameraForward.z = 0;
gameObject.transform.forward = cameraForward;
//SetStrafeLookDirectionTransition(cameraForward);
// SetStartStrafeLookDirection();
=======
isTurningIntoStrafe = true;
>>>>>>>
isTurningIntoStrafe = true;
<<<<<<<
// thirdPersonBrain.cameraAnimationManager.SetAnimation("Action",1);
=======
>>>>>>>
<<<<<<<
/*
* currentForwardInputProperties = configuration.forwardMovementProperties;
currentLateralInputProperties = null;
movementMode = ThirdPersonMotorMovementMode.Action;
*/
//TODO Adjust method for calling these animations that control the state driven camera
=======
//TODO Adjust method for calling these animations that control the state driven camera
>>>>>>>
//TODO Adjust method for calling these animations that control the state driven camera
<<<<<<<
=======
>>>>>>>
<<<<<<<
//cameraForward.z = 0;
// gameObject.transform.forward = cameraForward;
=======
>>>>>>> |
<<<<<<<
ControllerAdapter m_ControllerAdapter;
ThirdPersonGroundMovementState m_PreTurnMovementState;
ThirdPersonGroundMovementState m_MovementState = ThirdPersonGroundMovementState.Walking;
ThirdPersonAerialMovementState m_AerialState = ThirdPersonAerialMovementState.Grounded;
SlidingAverage m_AverageForwardVelocity,
m_ActionAverageForwardInput,
m_StrafeAverageForwardInput,
m_StrafeAverageLateralInput;
float m_TurnaroundMovementTime,
m_LastIdleTime;
bool m_JumpQueued;
Animator m_Animator;
Vector3 m_FallDirection;
Transform m_Transform;
GameObject m_GameObject;
ThirdPersonBrain m_ThirdPersonBrain;
SizedQueue<Vector2> m_PreviousInputs;
Camera m_MainCamera;
=======
private ControllerAdapter controllerAdapter;
private ThirdPersonGroundMovementState preTurnMovementState;
private ThirdPersonGroundMovementState movementState = ThirdPersonGroundMovementState.Walking;
private ThirdPersonAerialMovementState aerialState = ThirdPersonAerialMovementState.Grounded;
private SlidingAverage averageForwardVelocity,
explorationAverageForwardInput,
strafeAverageForwardInput,
strafeAverageLateralInput;
private float turnaroundMovementTime,
lastIdleTime;
private bool jumpQueued;
private Animator animator;
private Vector3 fallDirection;
private Transform transform;
private GameObject gameObject;
private ThirdPersonBrain thirdPersonBrain;
private SizedQueue<Vector2> previousInputs;
private Camera mainCamera;
>>>>>>>
ControllerAdapter m_ControllerAdapter;
ThirdPersonGroundMovementState m_PreTurnMovementState;
ThirdPersonGroundMovementState m_MovementState = ThirdPersonGroundMovementState.Walking;
ThirdPersonAerialMovementState m_AerialState = ThirdPersonAerialMovementState.Grounded;
SlidingAverage m_AverageForwardVelocity,
m_ExplorationAverageForwardInput,
m_StrafeAverageForwardInput,
m_StrafeAverageLateralInput;
float m_TurnaroundMovementTime,
m_LastIdleTime;
bool m_JumpQueued;
Animator m_Animator;
Vector3 m_FallDirection;
Transform m_Transform;
GameObject m_GameObject;
ThirdPersonBrain m_ThirdPersonBrain;
SizedQueue<Vector2> m_PreviousInputs;
Camera m_MainCamera;
<<<<<<<
var direction = movementMode == ThirdPersonMotorMovementMode.Action
? m_Transform.forward
=======
var direction = movementMode == ThirdPersonMotorMovementMode.Exploration
? transform.forward
>>>>>>>
var direction = movementMode == ThirdPersonMotorMovementMode.Exploration
? m_Transform.forward
<<<<<<<
var movementDirection = movementMode == ThirdPersonMotorMovementMode.Action ? m_Transform.forward :
=======
var movementDirection = movementMode == ThirdPersonMotorMovementMode.Exploration ? transform.forward :
>>>>>>>
var movementDirection = movementMode == ThirdPersonMotorMovementMode.Exploration ? m_Transform.forward :
<<<<<<<
m_MainCamera = Camera.main;
m_GameObject = brain.gameObject;
m_Transform = brain.transform;
m_ThirdPersonBrain = brain;
m_CharacterInput = brain.thirdPersonInput;
m_ControllerAdapter = brain.controllerAdapter;
m_Animator = m_GameObject.GetComponent<Animator>();
m_AverageForwardVelocity = new SlidingAverage(m_Configuration.jumpGroundVelocityWindowSize);
m_ActionAverageForwardInput = new SlidingAverage(m_Configuration.forwardInputWindowSize);
m_StrafeAverageForwardInput = new SlidingAverage(m_Configuration.strafeInputWindowSize);
m_StrafeAverageLateralInput = new SlidingAverage(m_Configuration.strafeInputWindowSize);
m_PreviousInputs = new SizedQueue<Vector2>(m_Configuration.bufferSizeInput);
movementMode = ThirdPersonMotorMovementMode.Action;
=======
mainCamera = Camera.main;
gameObject = brain.gameObject;
transform = brain.transform;
thirdPersonBrain = brain;
characterInput = brain.thirdPersonInput;
controllerAdapter = brain.controllerAdapter;
animator = gameObject.GetComponent<Animator>();
averageForwardVelocity = new SlidingAverage(configuration.jumpGroundVelocityWindowSize);
explorationAverageForwardInput = new SlidingAverage(configuration.forwardInputWindowSize);
strafeAverageForwardInput = new SlidingAverage(configuration.strafeInputWindowSize);
strafeAverageLateralInput = new SlidingAverage(configuration.strafeInputWindowSize);
previousInputs = new SizedQueue<Vector2>(configuration.bufferSizeInput);
movementMode = ThirdPersonMotorMovementMode.Exploration;
>>>>>>>
m_MainCamera = Camera.main;
m_GameObject = brain.gameObject;
m_Transform = brain.transform;
m_ThirdPersonBrain = brain;
m_CharacterInput = brain.thirdPersonInput;
m_ControllerAdapter = brain.controllerAdapter;
m_Animator = m_GameObject.GetComponent<Animator>();
m_AverageForwardVelocity = new SlidingAverage(m_Configuration.jumpGroundVelocityWindowSize);
m_ExplorationAverageForwardInput = new SlidingAverage(m_Configuration.forwardInputWindowSize);
m_StrafeAverageForwardInput = new SlidingAverage(m_Configuration.strafeInputWindowSize);
m_StrafeAverageLateralInput = new SlidingAverage(m_Configuration.strafeInputWindowSize);
m_PreviousInputs = new SizedQueue<Vector2>(m_Configuration.bufferSizeInput);
movementMode = ThirdPersonMotorMovementMode.Exploration;
<<<<<<<
void SetActionLookDirection()
=======
private void SetExplorationLookDirection()
>>>>>>>
void SetExplorationLookDirection() |
<<<<<<<
m_StandardControls = new StandardControls();
m_CameraInputGainAcceleration = GetComponent<CinemachineInputGainDampener>();
// If no CinemachineInputGainDampener component is present, then there will be no acceleration or deceleration
// applied to the look input. If that is the case, it is advised to set the Speed Mode of the Cinemachine cameras
// to 'Max Speed' if it is desirable to have acceleration and deceleration for gamepad look input.
if (m_CameraInputGainAcceleration != null)
{
m_UseInputGainAcceleration = true;
}
else
{
Debug.LogWarning("No CinemachineInputGainDampener component detected, make sure Cinemachine axis control speed mode is set to 'Max Speed' or add a CameraInputGainAcceleration component to this character");
}
=======
>>>>>>>
m_CameraInputGainAcceleration = GetComponent<CinemachineInputGainDampener>();
// If no CinemachineInputGainDampener component is present, then there will be no acceleration or deceleration
// applied to the look input. If that is the case, it is advised to set the Speed Mode of the Cinemachine cameras
// to 'Max Speed' if it is desirable to have acceleration and deceleration for gamepad look input.
if (m_CameraInputGainAcceleration != null)
{
m_UseInputGainAcceleration = true;
}
else
{
Debug.LogWarning("No CinemachineInputGainDampener component detected, make sure Cinemachine axis control speed mode is set to 'Max Speed' or add a CameraInputGainAcceleration component to this character");
}
<<<<<<<
if (!m_UseInputGainAcceleration)
{
CinemachineCore.GetInputAxis += LookInputOverride;
}
if (standardControls != null)
=======
CinemachineCore.GetInputAxis += LookInputOverride;
if (m_StandardControls == null)
>>>>>>>
//Do not register the Cinemachine LookInputOverride when using a CinemachineInputGainDampener component
//This LookInputOverride will take place in CinemachineInputGainDampner
if (!m_UseInputGainAcceleration)
{
CinemachineCore.GetInputAxis += LookInputOverride;
}
if (m_StandardControls == null)
<<<<<<<
if (!m_UseInputGainAcceleration)
{
CinemachineCore.GetInputAxis -= LookInputOverride;
}
if (standardControls != null)
{
standardControls.Movement.move.performed -= OnMoveInput;
standardControls.Movement.mouseLook.performed -= OnMouseLookInput;
standardControls.Movement.gamepadLook.performed -= OnGamepadLookInput;
standardControls.Movement.jump.started -= OnJumpInputStarted;
standardControls.Movement.sprint.performed -= OnSprintInput;
standardControls.Movement.move.canceled -= OnMoveInputCanceled;
standardControls.Movement.sprint.canceled -= OnSprintInput;
standardControls.Movement.jump.canceled -= OnJumpInputEnded;
standardControls.Movement.gamepadLook.canceled -= OnLookInputCanceled;
DeRegisterAdditionalInputs();
=======
CinemachineCore.GetInputAxis -= LookInputOverride;
>>>>>>>
if (!m_UseInputGainAcceleration)
{
CinemachineCore.GetInputAxis -= LookInputOverride;
}
<<<<<<<
// Resets the look input vector to zero once it has stopped. This is only used for analogue stick input
void OnLookInputCanceled(InputAction.CallbackContext context)
{
m_lookInput = Vector2.zero;
}
// Handles the ending of jump event from the new input system
void OnJumpInputEnded(InputAction.CallbackContext context)
=======
/// <summary>
/// Provides the input vector for the move control.
/// </summary>
/// <param name="context">context is required by the performed event</param>
public void OnMove(InputAction.CallbackContext context)
>>>>>>>
/// <summary>
/// Provides the input vector for the move control.
/// </summary>
/// <param name="context">context is required by the performed event</param>
public void OnMove(InputAction.CallbackContext context) |
<<<<<<<
using System;
using Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime;
=======
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using Microsoft.Cognitive.LUIS;
>>>>>>>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime; |
<<<<<<<
coinApiCombo.SelectedIndex = applicationConfiguration.UseCoinWarzApi ? CoinWarzIndex : (applicationConfiguration.UseWhatMineApi ? WhatMineIndex : CoinChooseIndex);
PopulateApiKey();
UpdateMobileMinerControls();
=======
coinApiCombo.SelectedIndex = applicationConfiguration.UseCoinWarzApi ? 1 : 0;
>>>>>>>
coinApiCombo.SelectedIndex = applicationConfiguration.UseCoinWarzApi ? CoinWarzIndex : (applicationConfiguration.UseWhatMineApi ? WhatMineIndex : CoinChooseIndex);
PopulateApiKey(); |
<<<<<<<
using MultiMiner.Remoting.Server;
using MultiMiner.Services;
using MultiMiner.Discovery;
using MultiMiner.Win.ViewModels;
using System.ServiceModel;
=======
using Newtonsoft.Json;
>>>>>>>
using MultiMiner.Remoting.Server;
using MultiMiner.Services;
using MultiMiner.Discovery;
using MultiMiner.Win.ViewModels;
using System.ServiceModel;
using Newtonsoft.Json;
<<<<<<<
SavePosition();
=======
try
{
coinApiInformation = coinApiContext.GetCoinInformation(
UserAgent.AgentString).ToList();
}
catch (Exception ex)
{
//don't crash if website cannot be resolved or JSON cannot be parsed
if ((ex is WebException) || (ex is InvalidCastException) || (ex is FormatException) || (ex is CoinApiException) ||
(ex is JsonReaderException))
{
if (applicationConfiguration.ShowApiErrors)
ShowCoinApiErrorNotification(ex);
return;
}
throw;
>>>>>>>
SavePosition(); |
<<<<<<<
string message = String.Format("Restarting {0} (chain status)", networkDevice.FriendlyName);
try
{
RestartNetworkDevice(networkDevice);
}
catch (SocketException)
{
message = String.Format("Timeout restarting {0} (chain status)", networkDevice.FriendlyName);
}
=======
//we don't want to keep trying to restart it over and over - clear suspect status
ClearChainStatus(networkDevice);
RestartNetworkDevice(networkDevice);
>>>>>>>
//we don't want to keep trying to restart it over and over - clear suspect status
ClearChainStatus(networkDevice);
string message = String.Format("Restarting {0} (chain status)", networkDevice.FriendlyName);
try
{
RestartNetworkDevice(networkDevice);
}
catch (SocketException)
{
message = String.Format("Timeout restarting {0} (chain status)", networkDevice.FriendlyName);
} |
<<<<<<<
/// <value>The error handler.</value>
public Func<ITurnContext, Exception, Task> ErrorHandler { get; set; }
=======
public Func<ITurnContext, Exception, Task> OnTurnError { get; set; }
>>>>>>>
/// <value>The error handler.</value>
public Func<ITurnContext, Exception, Task> OnTurnError { get; set; } |
<<<<<<<
Remoting.Data.Transfer.Machine machine = new Remoting.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetTotalHashrate(CoinAlgorithm.Scrypt);
machine.TotalSha256Hashrate = GetTotalHashrate(CoinAlgorithm.SHA256);
=======
Remoting.Server.Data.Transfer.Machine machine = new Remoting.Server.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetLocalInstanceHashrate(CoinAlgorithm.Scrypt, false);
machine.TotalSha256Hashrate = GetLocalInstanceHashrate(CoinAlgorithm.SHA256, false);
>>>>>>>
Remoting.Data.Transfer.Machine machine = new Remoting.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetLocalInstanceHashrate(CoinAlgorithm.Scrypt, false);
machine.TotalSha256Hashrate = GetLocalInstanceHashrate(CoinAlgorithm.SHA256, false);
<<<<<<<
Remoting.Data.Transfer.Machine machine = new Remoting.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetTotalHashrate(CoinAlgorithm.Scrypt);
machine.TotalSha256Hashrate = GetTotalHashrate(CoinAlgorithm.SHA256);
Remoting.Broadcast.Sender.Send(IPAddress.Parse(ipAddress), machine);
=======
Remoting.Server.Data.Transfer.Machine machine = new Remoting.Server.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetLocalInstanceHashrate(CoinAlgorithm.Scrypt, false);
machine.TotalSha256Hashrate = GetLocalInstanceHashrate(CoinAlgorithm.SHA256, false);
Remoting.Server.Broadcast.Sender.Send(IPAddress.Parse(ipAddress), machine);
>>>>>>>
Remoting.Data.Transfer.Machine machine = new Remoting.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetLocalInstanceHashrate(CoinAlgorithm.Scrypt, false);
machine.TotalSha256Hashrate = GetLocalInstanceHashrate(CoinAlgorithm.SHA256, false);
Remoting.Broadcast.Sender.Send(IPAddress.Parse(ipAddress), machine);
<<<<<<<
Remoting.Data.Transfer.Machine machine = new Remoting.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetTotalHashrate(CoinAlgorithm.Scrypt);
machine.TotalSha256Hashrate = GetTotalHashrate(CoinAlgorithm.SHA256);
=======
Remoting.Server.Data.Transfer.Machine machine = new Remoting.Server.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetLocalInstanceHashrate(CoinAlgorithm.Scrypt, true);
machine.TotalSha256Hashrate = GetLocalInstanceHashrate(CoinAlgorithm.SHA256, true);
>>>>>>>
Remoting.Data.Transfer.Machine machine = new Remoting.Data.Transfer.Machine();
machine.TotalScryptHashrate = GetLocalInstanceHashrate(CoinAlgorithm.Scrypt, true);
machine.TotalSha256Hashrate = GetLocalInstanceHashrate(CoinAlgorithm.SHA256, true);
<<<<<<<
MinerFormViewModel viewModel = GetViewModelToView();
deviceTotalLabel.Text = String.Format("{0} device(s)", viewModel.Devices.Count);
double scryptHashRate = GetTotalHashrate(CoinAlgorithm.Scrypt);
double sha256HashRate = GetTotalHashrate(CoinAlgorithm.SHA256);
=======
MainFormViewModel viewModel = GetViewModelToView();
//don't include Network Devices in the count for Remote ViewModels
deviceTotalLabel.Text = String.Format("{0} device(s)", viewModel.Devices.Count(d => (viewModel == localViewModel) || (d.Kind != DeviceKind.NET)));
double scryptHashRate = GetVisibleInstanceHashrate(CoinAlgorithm.Scrypt, viewModel == localViewModel);
double sha256HashRate = GetVisibleInstanceHashrate(CoinAlgorithm.SHA256, viewModel == localViewModel);
>>>>>>>
MinerFormViewModel viewModel = GetViewModelToView();
//don't include Network Devices in the count for Remote ViewModels
deviceTotalLabel.Text = String.Format("{0} device(s)", viewModel.Devices.Count(d => (viewModel == localViewModel) || (d.Kind != DeviceKind.NET)));
double scryptHashRate = GetVisibleInstanceHashrate(CoinAlgorithm.Scrypt, viewModel == localViewModel);
double sha256HashRate = GetVisibleInstanceHashrate(CoinAlgorithm.SHA256, viewModel == localViewModel); |
<<<<<<<
using Assets.Scripts.UI.Input;
=======
using Assets.Scripts.UI.InGame;
>>>>>>>
using Assets.Scripts.UI.InGame;
using Assets.Scripts.UI.Input; |
<<<<<<<
using Assets.Scripts.UI.InGame;
using System;
=======
using System;
using Photon;
>>>>>>>
using Assets.Scripts.UI.InGame;
using System;
using Photon;
<<<<<<<
public class UiNavigationElement : UiMenu
=======
public class UiNavigationElement : PunBehaviour
>>>>>>>
public class UiNavigationElement : UiMenu_PUN |
<<<<<<<
using Microsoft.Bot.Builder.Dialogs.Declarative.Resources;
=======
using Microsoft.Bot.Builder.Dialogs.Declarative;
using Microsoft.Bot.Builder.Dialogs.Declarative.Expressions;
using Microsoft.Bot.Builder.Dialogs.Rules.Expressions;
>>>>>>>
using Microsoft.Bot.Builder.Dialogs.Declarative; |
<<<<<<<
public GameObject GraphicsView;
public void ShowGameSettingsMenu()
=======
public GraphicSettingMenu GraphicSettingsMenu;
// Used by Button.
public void Quit()
>>>>>>>
public GameObject GraphicsView;
// Used by Button.
public void Quit()
<<<<<<<
GraphicsView.gameObject.SetActive(false);
if (FindObjectOfType<GraphicsController>().label.text != "")
{
FindObjectOfType<GraphicsController>().label.text = "";
}
Cursor.visible = false;
if (IN_GAME_MAIN_CAMERA.cameraMode == CAMERA_TYPE.TPS)
{
Cursor.lockState = CursorLockMode.Locked;
}
else
{
Cursor.lockState = CursorLockMode.Confined;
}
=======
GraphicSettingsMenu.gameObject.SetActive(false);
MenuManager.RegisterClosed();
>>>>>>>
GraphicSettingsMenu.gameObject.SetActive(false);
GraphicsView.gameObject.SetActive(false);
MenuManager.RegisterClosed(); |
<<<<<<<
using Assets.Scripts.Settings;
using Assets.Scripts.Settings.Gamemodes;
using Assets.Scripts.Settings.Titans;
using Assets.Scripts.Settings.Titans.Attacks;
=======
using Assets.Scripts.Services;
using Assets.Scripts.Services.Interface;
>>>>>>>
using Assets.Scripts.Settings;
using Assets.Scripts.Settings.Gamemodes;
using Assets.Scripts.Settings.Titans;
using Assets.Scripts.Settings.Titans.Attacks;
using Assets.Scripts.Services;
using Assets.Scripts.Services.Interface;
<<<<<<<
public float distanceSlider;
=======
[Obsolete("Avoid using this property as it is removed as per issue #160")]
public int difficulty;
[Obsolete("Move this into RacingGamemode")]
>>>>>>>
[Obsolete("Move this into RacingGamemode")]
<<<<<<<
private GameSettings Settings { get; set; }
=======
[Obsolete("FengGameManager doesn't require the usage of IN_GAME_MAIN_CAMERA.")]
>>>>>>>
private GameSettings Settings { get; set; }
[Obsolete("FengGameManager doesn't require the usage of IN_GAME_MAIN_CAMERA.")]
<<<<<<<
public void addCT(ColossalTitan titan)
=======
[Obsolete("Move to a TitanService")]
public void addCT(COLOSSAL_TITAN titan)
>>>>>>>
[Obsolete("Move to a TitanService")]
public void addCT(ColossalTitan titan)
<<<<<<<
public void addET(ErenTitan hero)
=======
[Obsolete("Move to a TitanService")]
public void addET(TITAN_EREN hero)
>>>>>>>
[Obsolete("Move to a TitanService")]
public void addET(ErenTitan hero)
<<<<<<<
public void addFT(FemaleTitan titan)
=======
[Obsolete("Move to a TitanService")]
public void addFT(FEMALE_TITAN titan)
>>>>>>>
[Obsolete("Move to a TitanService")]
public void addFT(FemaleTitan titan)
<<<<<<<
this.ShowHUDInfoCenter(
$"Press <color=#f7d358>{InputManager.GetKey(InputHuman.Item1)}</color> to spectate the next player.\n" +
$"Press <color=#f7d358>{InputManager.GetKey(InputHuman.Item2)}</color> to spectate the previous player.\n" +
$"Press <color=#f7d358>{InputManager.GetKey(InputHuman.AttackSpecial)}</color> to enter the spectator mode.\n\n\n\n");
if (((GameSettings.Respawn.Mode == RespawnMode.DEATHMATCH) ||
(GameSettings.Respawn.EndlessRevive.Value > 0)) ||
!(((GameSettings.PvP.Bomb.Value) || (GameSettings.PvP.Mode != PvpMode.Disabled))
? (GameSettings.Gamemode.PointMode <= 0)
=======
if (((Gamemode.Settings.RespawnMode == RespawnMode.DEATHMATCH) ||
(Gamemode.Settings.EndlessRevive > 0)) ||
!(((Gamemode.Settings.PvPBomb) || (Gamemode.Settings.Pvp != PvpMode.Disabled))
? (Gamemode.Settings.PointMode <= 0)
>>>>>>>
if (((GameSettings.Respawn.Mode == RespawnMode.DEATHMATCH) ||
(GameSettings.Respawn.EndlessRevive.Value > 0)) ||
!(((GameSettings.PvP.Bomb.Value) || (GameSettings.PvP.Mode != PvpMode.Disabled))
? (GameSettings.Gamemode.PointMode <= 0)
<<<<<<<
public void removeCT(ColossalTitan titan)
=======
[Obsolete("Move to a TitanService")]
public void removeCT(COLOSSAL_TITAN titan)
>>>>>>>
[Obsolete("Move to a TitanService")]
public void removeCT(ColossalTitan titan)
<<<<<<<
public void removeET(ErenTitan hero)
=======
[Obsolete("Move to a TitanService")]
public void removeET(TITAN_EREN hero)
>>>>>>>
[Obsolete("Move to a TitanService")]
public void removeET(ErenTitan hero)
<<<<<<<
public void removeFT(FemaleTitan titan)
=======
[Obsolete("Move to a TitanService")]
public void removeFT(FEMALE_TITAN titan)
>>>>>>>
[Obsolete("Move to a TitanService")]
public void removeFT(FemaleTitan titan)
<<<<<<<
private void settingRPC(ExitGames.Client.Photon.Hashtable hash, PhotonMessageInfo info)
{
if (info.sender.isMasterClient)
{
this.setGameSettings(hash);
}
}
[PunRPC]
private void showChatContent(string content)
{
this.chatContent.Add(content);
if (this.chatContent.Count > 10)
{
this.chatContent.RemoveAt(0);
}
//GameObject.Find("LabelChatContent").GetComponent<UILabel>().text = string.Empty;
//for (int i = 0; i < this.chatContent.Count; i++)
//{
// UILabel component = GameObject.Find("LabelChatContent").GetComponent<UILabel>();
// component.text = component.text + this.chatContent[i];
//}
}
[PunRPC]
private void SyncSettings(string gameSettings, GamemodeType type, PhotonMessageInfo info)
=======
private void SyncSettings(string gamemodeRaw, GamemodeType type, PhotonMessageInfo info)
>>>>>>>
private void SyncSettings(string gameSettings, GamemodeType type, PhotonMessageInfo info)
<<<<<<<
Settings = new GameSettings();
var difficulty = Difficulty.Normal;
Settings.Initialize(
GamemodeSettings.GetAll(difficulty),
new PvPSettings(difficulty),
new SettingsTitan(difficulty)
{
Mindless = new MindlessTitanSettings(difficulty)
{
AttackSettings = AttackSetting.GetAll<MindlessTitan>(difficulty)
},
Female = new FemaleTitanSettings(difficulty),
Colossal = new TitanSettings(difficulty),
Eren = new TitanSettings(difficulty)
},
new HorseSettings(difficulty),
new RespawnSettings(difficulty)
);
var json = JsonConvert.SerializeObject((object) Settings, Formatting.Indented, new JsonSerializerSettings {NullValueHandling = NullValueHandling.Ignore});
Debug.Log(json);
=======
>>>>>>>
Settings = new GameSettings();
var difficulty = Difficulty.Normal;
Settings.Initialize(
GamemodeSettings.GetAll(difficulty),
new PvPSettings(difficulty),
new SettingsTitan(difficulty)
{
Mindless = new MindlessTitanSettings(difficulty)
{
AttackSettings = AttackSetting.GetAll<MindlessTitan>(difficulty)
},
Female = new FemaleTitanSettings(difficulty),
Colossal = new TitanSettings(difficulty),
Eren = new TitanSettings(difficulty)
},
new HorseSettings(difficulty),
new RespawnSettings(difficulty)
);
var json = JsonConvert.SerializeObject((object) Settings, Formatting.Indented, new JsonSerializerSettings {NullValueHandling = NullValueHandling.Ignore});
Debug.Log(json); |
<<<<<<<
if (this.inputManager.isInputDown[InputCode.flare1])
{
// TODO: Add spectator mode.
//if (NGUITools.GetActive(this.ui.GetComponent<UIReferArray>().panels[3]))
//{
// Screen.lockCursor = true;
// Cursor.visible = true;
// NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[0], true);
// NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[1], false);
// NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[2], false);
// NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[3], false);
// Camera.main.GetComponent<SpectatorMovement>().disable = false;
// //TODO Mouselook
// //Camera.main.GetComponent<MouseLook>().disable = false;
//}
//else
//{
// Screen.lockCursor = false;
// Cursor.visible = true;
// NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[0], false);
// NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[1], false);
// NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[2], false);
// NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[3], true);
// Camera.main.GetComponent<SpectatorMovement>().disable = true;
// //TODO Mouselook
// //Camera.main.GetComponent<MouseLook>().disable = true;
//}
}
if (this.inputManager.isInputDown[15] && !this.inputManager.menuOn)
{
CursorManagement.CameraMode = CursorManagement.Mode.Menu;
Camera.main.GetComponent<SpectatorMovement>().disable = true;
// TODO: Mouselook
//Camera.main.GetComponent<MouseLook>().disable = true;
this.inputManager.menuOn = true;
}
=======
InGameUI.SpawnMenu.gameObject.SetActive(true);
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
>>>>>>>
InGameUI.SpawnMenu.gameObject.SetActive(true);
<<<<<<<
public void NOTSpawnNonAITitan(string id)
{
this.myLastHero = id.ToUpper();
ExitGames.Client.Photon.Hashtable hashtable = new ExitGames.Client.Photon.Hashtable();
hashtable.Add("dead", true);
ExitGames.Client.Photon.Hashtable propertiesToSet = hashtable;
PhotonNetwork.player.SetCustomProperties(propertiesToSet);
hashtable = new ExitGames.Client.Photon.Hashtable();
hashtable.Add(PhotonPlayerProperty.isTitan, 2);
propertiesToSet = hashtable;
PhotonNetwork.player.SetCustomProperties(propertiesToSet);
this.ShowHUDInfoCenter("the game has started for 60 seconds.\n please wait for next round.\n Click Right Mouse Key to Enter or Exit the Spectator Mode.");
GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().enabled = true;
GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().setMainObject(null, true, false);
GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().setSpectorMode(true);
GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().gameOver = true;
}
public void NOTSpawnNonAITitanRC(string id)
{
this.myLastHero = id.ToUpper();
ExitGames.Client.Photon.Hashtable hashtable = new ExitGames.Client.Photon.Hashtable();
hashtable.Add("dead", true);
ExitGames.Client.Photon.Hashtable propertiesToSet = hashtable;
PhotonNetwork.player.SetCustomProperties(propertiesToSet);
hashtable = new ExitGames.Client.Photon.Hashtable();
hashtable.Add(PhotonPlayerProperty.isTitan, 2);
propertiesToSet = hashtable;
PhotonNetwork.player.SetCustomProperties(propertiesToSet);
this.ShowHUDInfoCenter("Syncing spawn locations...");
GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().enabled = true;
GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().setMainObject(null, true, false);
GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().setSpectorMode(true);
GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().gameOver = true;
}
=======
>>>>>>> |
<<<<<<<
// Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR
// NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing
// permissions and limitations under the License.
#if NET45
using System;
=======
using System;
>>>>>>>
// Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
// WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF
// TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR
// NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing
// permissions and limitations under the License.
using System; |
<<<<<<<
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey,
=======
Color = new Color(0.7f),
Parent = group.Panel,
Bounds = new Rectangle(scriptToggle.Right, 0.5f, dragIconSize, dragIconSize),
>>>>>>>
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey,
Parent = group.Panel,
Bounds = new Rectangle(scriptToggle.Right, 0.5f, dragIconSize, dragIconSize), |
<<<<<<<
AutoFocus = false;
Title = "Comment";
Color = new Color(1.0f, 1.0f, 1.0f, 0.2f);
=======
CanFocus = false;
}
/// <inheritdoc />
public override void OnSurfaceLoaded()
{
base.OnSurfaceLoaded();
// Read node data
Title = TitleValue;
Color = ColorValue;
Size = SizeValue;
}
/// <inheritdoc />
public override void OnValuesChanged()
{
base.OnValuesChanged();
// Read node data
Title = TitleValue;
Color = ColorValue;
Size = SizeValue;
>>>>>>>
}
/// <inheritdoc />
public override void OnSurfaceLoaded()
{
base.OnSurfaceLoaded();
// Read node data
Title = TitleValue;
Color = ColorValue;
Size = SizeValue;
}
/// <inheritdoc />
public override void OnValuesChanged()
{
base.OnValuesChanged();
// Read node data
Title = TitleValue;
Color = ColorValue;
Size = SizeValue; |
<<<<<<<
// Right clicking while attempting to connect a node to something
if (!_rightMouseDown && buttons == MouseButton.Right && !_isMovingSelection && _connectionInstigator != null)
{
_cmStartPos = location;
ShowPrimaryMenu(_cmStartPos);
}
=======
>>>>>>>
<<<<<<<
if (!_activeVisjectCM.Visible) ConnectingEnd(null);
=======
_cmStartPos = location;
ShowPrimaryMenu(_cmStartPos);
>>>>>>>
_cmStartPos = location;
ShowPrimaryMenu(_cmStartPos);
<<<<<<<
// If the menu is not fully visible, move the surface a bit
Vector2 overflow = (_cmStartPos + _activeVisjectCM.Size) - _rootControl.Parent.Size;
=======
// If the menu is not fully visible, move the surface a bit
Vector2 overflow = (_cmStartPos + _cmPrimaryMenu.Size) - _surface.Parent.Size;
>>>>>>>
// If the menu is not fully visible, move the surface a bit
Vector2 overflow = (_cmStartPos + _activeVisjectCM.Size) - _surface.Parent.Size;
<<<<<<<
// Show it
_connectionInstigator = firstOutputBox;
=======
// Show it
_startBox = firstOutputBox;
>>>>>>>
// Show it
_connectionInstigator = firstOutputBox; |
<<<<<<<
public SpriteHandle ArrowRight;
=======
[EditorOrder(220)]
public Sprite ArrowRight;
>>>>>>>
[EditorOrder(220)]
public SpriteHandle ArrowRight;
<<<<<<<
public SpriteHandle ArrowDown;
=======
[EditorOrder(230)]
public Sprite ArrowDown;
>>>>>>>
[EditorOrder(230)]
public SpriteHandle ArrowDown;
<<<<<<<
public SpriteHandle Search;
=======
[EditorOrder(240)]
public Sprite Search;
>>>>>>>
[EditorOrder(240)]
public SpriteHandle Search;
<<<<<<<
public SpriteHandle Settings;
=======
[EditorOrder(250)]
public Sprite Settings;
>>>>>>>
[EditorOrder(250)]
public SpriteHandle Settings;
<<<<<<<
public SpriteHandle Cross;
=======
[EditorOrder(260)]
public Sprite Cross;
>>>>>>>
[EditorOrder(260)]
public SpriteHandle Cross;
<<<<<<<
public SpriteHandle CheckBoxIntermediate;
=======
[EditorOrder(270)]
public Sprite CheckBoxIntermediate;
>>>>>>>
[EditorOrder(270)]
public SpriteHandle CheckBoxIntermediate;
<<<<<<<
public SpriteHandle CheckBoxTick;
=======
[EditorOrder(280)]
public Sprite CheckBoxTick;
>>>>>>>
[EditorOrder(280)]
public SpriteHandle CheckBoxTick;
<<<<<<<
public SpriteHandle StatusBarSizeGrip;
=======
[EditorOrder(290)]
public Sprite StatusBarSizeGrip;
>>>>>>>
[EditorOrder(290)]
public SpriteHandle StatusBarSizeGrip;
<<<<<<<
public SpriteHandle Translate;
=======
[EditorOrder(300)]
public Sprite Translate;
>>>>>>>
[EditorOrder(300)]
public SpriteHandle Translate;
<<<<<<<
public SpriteHandle Rotate;
=======
[EditorOrder(310)]
public Sprite Rotate;
>>>>>>>
[EditorOrder(310)]
public SpriteHandle Rotate;
<<<<<<<
public SpriteHandle Scale;
=======
[EditorOrder(320)]
public Sprite Scale;
>>>>>>>
[EditorOrder(320)]
public SpriteHandle Scale; |
<<<<<<<
SetupStyle();
=======
>>>>>>>
SetupStyle();
<<<<<<<
private void SetupStyle()
{
var style = CreateDefaultStyle();
// Color picking
ColorValueBox.ShowPickColorDialog += ShowPickColorDialog;
VisjectSurfaceBackground = FlaxEngine.Content.LoadAsyncInternal<Texture>("Editor/VisjectSurface");
// Set as default
Style.Current = style;
}
private void SelectStyle()
{
var themeOptions = Editor.Options.Options.Theme;
// If a non-default style was chosen, switch to that style
string styleName = themeOptions.SelectedStyle;
if (styleName != "Default" && themeOptions.Styles.ContainsKey(styleName))
{
Style.Current = themeOptions.Styles[themeOptions.SelectedStyle];
}
}
public Style CreateDefaultStyle()
=======
internal void CreateStyle()
>>>>>>>
private void SetupStyle()
{
var style = CreateDefaultStyle();
// Color picking
ColorValueBox.ShowPickColorDialog += ShowPickColorDialog;
VisjectSurfaceBackground = FlaxEngine.Content.LoadAsyncInternal<Texture>("Editor/VisjectSurface");
// Set as default
Style.Current = style;
}
private void SelectStyle()
{
var themeOptions = Editor.Options.Options.Theme;
// If a non-default style was chosen, switch to that style
string styleName = themeOptions.SelectedStyle;
if (styleName != "Default" && themeOptions.Styles.ContainsKey(styleName))
{
Style.Current = themeOptions.Styles[themeOptions.SelectedStyle];
}
}
public Style CreateDefaultStyle()
<<<<<<<
// Font
var primaryFont = FlaxEngine.Content.LoadInternal<FontAsset>(EditorAssets.PrimaryFont);
if (primaryFont)
{
primaryFont.WaitForLoaded();
// Create fonts
style.FontTitle = primaryFont.CreateFont(18);
style.FontLarge = primaryFont.CreateFont(14);
style.FontMedium = primaryFont.CreateFont(9);
style.FontSmall = primaryFont.CreateFont(9);
Assert.IsNotNull(style.FontTitle, "Missing Title font.");
Assert.IsNotNull(style.FontLarge, "Missing Large font.");
Assert.IsNotNull(style.FontMedium, "Missing Medium font.");
Assert.IsNotNull(style.FontSmall, "Missing Small font.");
}
else
{
Editor.LogError("Cannot load primary GUI Style font " + EditorAssets.PrimaryFont);
}
=======
// Color picking
ColorValueBox.ShowPickColorDialog += ShowPickColorDialog;
// Fonts
var options = Editor.Options.Options;
style.FontTitle = options.Interface.TitleFont.GetFont();
style.FontLarge = options.Interface.LargeFont.GetFont();
style.FontMedium = options.Interface.MediumFont.GetFont();
style.FontSmall = options.Interface.SmallFont.GetFont();
>>>>>>>
// Color picking
ColorValueBox.ShowPickColorDialog += ShowPickColorDialog;
// Fonts
var options = Editor.Options.Options;
style.FontTitle = options.Interface.TitleFont.GetFont();
style.FontLarge = options.Interface.LargeFont.GetFont();
style.FontMedium = options.Interface.MediumFont.GetFont();
style.FontSmall = options.Interface.SmallFont.GetFont(); |
<<<<<<<
using System;
using System.Collections;
=======
#if UNITY_EDITOR
using System.Collections;
>>>>>>>
#if UNITY_EDITOR
using System;
using System.Collections;
<<<<<<<
private Vector3 m_TipStartScale;
Transform m_ConeTransform;
Vector3 m_OriginalConeLocalScale;
Coroutine m_RayVisibilityCoroutine;
Coroutine m_ConeVisibilityCoroutine;
/// <summary>
/// The object that is set when LockRay is called while the ray is unlocked.
/// As long as this reference is set, and the ray is locked, only that object can unlock the ray.
/// If the object reference becomes null, the ray will be free to show/hide/lock/unlock until another locking entity takes ownership.
/// </summary>
private object m_LockRayObject;
public Func<float> getViewerScale { private get; set; }
public bool LockRay(object lockCaller)
{
// Allow the caller to lock the ray
// If the reference to the lockCaller is destroyed, and the ray was not properly
// unlocked by the original locking caller, then allow locking by another object
if (m_LockRayObject == null)
=======
private Vector3 m_TipStartScale;
Transform m_ConeTransform;
Vector3 m_OriginalConeLocalScale;
Coroutine m_RayVisibilityCoroutine;
Coroutine m_ConeVisibilityCoroutine;
/// <summary>
/// The object that is set when LockRay is called while the ray is unlocked.
/// As long as this reference is set, and the ray is locked, only that object can unlock the ray.
/// If the object reference becomes null, the ray will be free to show/hide/lock/unlock until another locking entity takes ownership.
/// </summary>
private object m_LockRayObject;
public bool LockRay(object lockCaller)
>>>>>>>
private Vector3 m_TipStartScale;
Transform m_ConeTransform;
Vector3 m_OriginalConeLocalScale;
Coroutine m_RayVisibilityCoroutine;
Coroutine m_ConeVisibilityCoroutine;
/// <summary>
/// The object that is set when LockRay is called while the ray is unlocked.
/// As long as this reference is set, and the ray is locked, only that object can unlock the ray.
/// If the object reference becomes null, the ray will be free to show/hide/lock/unlock until another locking entity takes ownership.
/// </summary>
private object m_LockRayObject;
public Func<float> getViewerScale { private get; set; }
public bool LockRay(object lockCaller) |
<<<<<<<
var luisRecognizer = this.GetLuisRecognizer(verbose: true);
var result = await luisRecognizer.Recognize("My name is Emad", CancellationToken.None);
=======
var luisRecognizer = GetLuisRecognizer(verbose: true);
var result = await luisRecognizer.RecognizeAsync("My name is Emad", CancellationToken.None);
>>>>>>>
var luisRecognizer = this.GetLuisRecognizer(verbose: true);
var result = await luisRecognizer.RecognizeAsync("My name is Emad", CancellationToken.None);
<<<<<<<
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.Recognize("Please deliver February 2nd 2001", CancellationToken.None);
=======
var luisRecognizer = GetLuisRecognizer(verbose: true, luisOptions: new LuisRequest { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("Please deliver February 2nd 2001", CancellationToken.None);
>>>>>>>
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("Please deliver February 2nd 2001", CancellationToken.None);
<<<<<<<
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.Recognize("Please deliver February 2nd 2001 in room 201", CancellationToken.None);
=======
var luisRecognizer = GetLuisRecognizer(verbose: true, luisOptions: new LuisRequest { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("Please deliver February 2nd 2001 in room 201", CancellationToken.None);
>>>>>>>
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("Please deliver February 2nd 2001 in room 201", CancellationToken.None);
<<<<<<<
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.Recognize("I want to travel on united", CancellationToken.None);
=======
var luisRecognizer = GetLuisRecognizer(verbose: true, luisOptions: new LuisRequest { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("I want to travel on united", CancellationToken.None);
>>>>>>>
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("I want to travel on united", CancellationToken.None);
<<<<<<<
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.Recognize("I want to travel on DL", CancellationToken.None);
=======
var luisRecognizer = GetLuisRecognizer(verbose: true, luisOptions: new LuisRequest { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("I want to travel on DL", CancellationToken.None);
>>>>>>>
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("I want to travel on DL", CancellationToken.None);
<<<<<<<
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.Recognize("Please deliver it to 98033 WA", CancellationToken.None);
=======
var luisRecognizer = GetLuisRecognizer(verbose: true, luisOptions: new LuisRequest { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("Please deliver it to 98033 WA", CancellationToken.None);
>>>>>>>
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("Please deliver it to 98033 WA", CancellationToken.None);
<<<<<<<
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.Recognize("Book a table on Friday or tomorrow at 5 or tomorrow at 4", CancellationToken.None);
=======
var luisRecognizer = GetLuisRecognizer(verbose: true, luisOptions: new LuisRequest { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("Book a table on Friday or tomorrow at 5 or tomorrow at 4", CancellationToken.None);
>>>>>>>
var luisRecognizer = this.GetLuisRecognizer(verbose: true, luisOptions: new LuisPredictionOptions { Verbose = true });
var result = await luisRecognizer.RecognizeAsync("Book a table on Friday or tomorrow at 5 or tomorrow at 4", CancellationToken.None);
<<<<<<<
=> (JObject)JsonConvert.DeserializeObject(JsonConvert.SerializeObject(result, new JsonSerializerSettings { Formatting = Formatting.Indented, NullValueHandling = NullValueHandling.Ignore }));
=======
{
return (JObject)JsonConvert.DeserializeObject(JsonConvert.SerializeObject(result, new JsonSerializerSettings { Formatting = Formatting.Indented, NullValueHandling = NullValueHandling.Ignore }));
}
// To create a file to test:
// 1) Create a <name>.json file with an object { Text:<query> } in it.
// 2) Run this test which will fail and generate a <name>.json.new file.
// 3) Check the .new file and if correct, replace the original .json file with it.
public async Task TestJson<T>(string file)
where T : IRecognizerConvert, new()
{
if (!EnvironmentVariablesDefined())
{
Assert.Inconclusive("Missing Luis Environment variables - Skipping test");
return;
}
var expectedPath = Path.Combine(@"..\..\..\TestData\", file);
var newPath = expectedPath + ".new";
var luisRecognizer = GetLuisRecognizer(verbose: true, luisOptions: new LuisRequest { Verbose = true });
var expected = new StreamReader(expectedPath).ReadToEnd();
dynamic expectedJson = JsonConvert.DeserializeObject(expected);
var query = (string)expectedJson.text ?? (string)expectedJson.Text;
var typedResult = await luisRecognizer.RecognizeAsync<T>(query, CancellationToken.None);
var typedJson = Json<T>(typedResult);
if (!WithinDelta(expectedJson, typedJson, 0.1))
{
using (var writer = new StreamWriter(newPath))
{
writer.Write(typedJson);
}
Assert.Fail($"Returned JSON in {newPath} != expected JSON in {expectedPath}");
}
else
{
File.Delete(expectedPath + ".new");
}
}
[TestMethod]
public async Task Composite1()
{
await TestJson<RecognizerResult>("Composite1.json");
}
[TestMethod]
public async Task Composite2()
{
await TestJson<RecognizerResult>("Composite2.json");
}
[TestMethod]
public async Task PrebuiltDomains()
{
await TestJson<RecognizerResult>("Prebuilt.json");
}
[TestMethod]
public async Task Patterns()
{
await TestJson<RecognizerResult>("Patterns.json");
}
[TestMethod]
public async Task TypedEntities()
{
await TestJson<Contoso_App>("Typed.json");
}
[TestMethod]
public async Task TypedPrebuiltDomains()
{
await TestJson<Contoso_App>("TypedPrebuilt.json");
}
>>>>>>>
=> (JObject)JsonConvert.DeserializeObject(JsonConvert.SerializeObject(result, new JsonSerializerSettings { Formatting = Formatting.Indented, NullValueHandling = NullValueHandling.Ignore }));
var typedResult = await luisRecognizer.RecognizeAsync<T>(query, CancellationToken.None); |
<<<<<<<
if (string.IsNullOrEmpty(toLocale))
throw new ArgumentNullException(nameof(toLocale));
else if (!localeConverter.IsLocaleAvailable(toLocale))
throw new ArgumentNullException("The locale " + nameof(toLocale) + " is unavailable");
=======
if (string.IsNullOrEmpty(toLocale))
{
throw new ArgumentNullException(nameof(toLocale));
}
else if (!localeConverter.IsLocaleAvailable(toLocale))
{
throw new ArgumentNullException("The locale " + nameof(toLocale) + " is unavailable");
}
>>>>>>>
if (string.IsNullOrEmpty(toLocale))
{
throw new ArgumentNullException(nameof(toLocale));
else if (!localeConverter.IsLocaleAvailable(toLocale))
throw new ArgumentNullException("The locale " + nameof(toLocale) + " is unavailable");
<<<<<<<
_userLocaleProperty = userLocaleProperty ?? throw new ArgumentNullException(nameof(userLocaleProperty));
=======
_getUserLocale = getUserLocale ?? throw new ArgumentNullException(nameof(getUserLocale));
_setUserLocale = checkUserLocaleChanged ?? throw new ArgumentNullException(nameof(checkUserLocaleChanged));
>>>>>>>
_userLocaleProperty = userLocaleProperty ?? throw new ArgumentNullException(nameof(userLocaleProperty));
<<<<<<<
ConvertLocaleMessage(context, userLocale);
=======
var fromLocale = _getUserLocale(context);
ConvertLocaleMessage(context, fromLocale);
>>>>>>>
ConvertLocaleMessage(context, userLocale);
<<<<<<<
=======
else
{
// skip routing in case of user changed the locale
return;
}
>>>>>>> |
<<<<<<<
using UnityEngine.VR.Actions;
=======
using UnityEngine.VR.Helpers;
>>>>>>>
using UnityEngine.VR.Actions;
using UnityEngine.VR.Helpers;
<<<<<<<
public MainMenuActivator mainMenuActivator;
=======
public ActionMapInput directSelectInput;
>>>>>>>
public MainMenuActivator mainMenuActivator;
public ActionMapInput directSelectInput;
<<<<<<<
while (!m_HMDReady)
yield return null;
// In case we have anything selected at start, set up manipulators, inspector, etc.
EditorApplication.delayCall += OnSelectionChanged;
=======
>>>>>>>
<<<<<<<
// HACK to workaround missing MonoScript serialized fields
EditorApplication.delayCall += () =>
{
mainMenu = SpawnMainMenu(typeof(MainMenu), device, false);
mainMenu.menuVisibilityChanged += OnMainMenuVisiblityChanged;
deviceData.mainMenu = mainMenu;
UpdatePlayerHandleMaps();
};
=======
mainMenu = SpawnMainMenu(typeof(MainMenu), device, true);
deviceData.mainMenu = mainMenu;
UpdatePlayerHandleMaps();
while (mainMenu == null)
yield return null;
menus.Add(mainMenu);
>>>>>>>
mainMenu = SpawnMainMenu(typeof(MainMenu), device, false);
deviceData.mainMenu = mainMenu;
UpdatePlayerHandleMaps();
<<<<<<<
var toolActions = obj as IToolActions;
if (toolActions != null)
{
var actions = toolActions.toolActions;
foreach (var action in actions)
{
var actionMenuData = new ActionMenuData()
{
name = action.GetType().Name,
sectionName = ActionMenuItemAttribute.kDefaultActionSectionName,
priority = int.MaxValue,
action = action,
};
m_MenuActions.Add(actionMenuData);
}
UpdateAlternateMenuActions();
}
var mainMenu = obj as IMainMenu;
=======
var directSelection = obj as IDirectSelection;
if (directSelection != null)
directSelection.getDirectSelection = GetDirectSelection;
var grabObjects = obj as IGrabObjects;
if (grabObjects != null)
{
grabObjects.canGrabObject = CanGrabObject;
grabObjects.grabObject = GrabObject;
grabObjects.dropObject = DropObject;
}
>>>>>>>
var toolActions = obj as IToolActions;
if (toolActions != null)
{
var actions = toolActions.toolActions;
foreach (var action in actions)
{
var actionMenuData = new ActionMenuData()
{
name = action.GetType().Name,
sectionName = ActionMenuItemAttribute.kDefaultActionSectionName,
priority = int.MaxValue,
action = action,
};
m_MenuActions.Add(actionMenuData);
}
UpdateAlternateMenuActions();
}
var directSelection = obj as IDirectSelection;
if (directSelection != null)
directSelection.getDirectSelection = GetDirectSelection;
var grabObjects = obj as IGrabObjects;
if (grabObjects != null)
{
grabObjects.canGrabObject = CanGrabObject;
grabObjects.grabObject = GrabObject;
grabObjects.dropObject = DropObject;
}
var mainMenu = obj as IMainMenu; |
<<<<<<<
sealed class MiniWorldWorkspace : Workspace, IUsesRayLocking
=======
sealed class MiniWorldWorkspace : Workspace, IUsesRayLocking, ICustomActionMap, ISerializeWorkspace
>>>>>>>
sealed class MiniWorldWorkspace : Workspace, IUsesRayLocking, ISerializeWorkspace
<<<<<<<
=======
public ActionMap actionMap
{
get { return m_MiniWorldActionMap; }
}
[SerializeField]
ActionMap m_MiniWorldActionMap;
[Serializable]
class Preferences
{
[SerializeField]
public Vector3 m_MiniWorldRefeferenceScale;
[SerializeField]
public Vector3 m_MiniWorldReferencePosition;
[SerializeField]
public float m_ZoomSliderValue;
public Vector3 miniWorldRefeferenceScale { get { return m_MiniWorldRefeferenceScale; } set { m_MiniWorldRefeferenceScale = value; } }
public Vector3 miniWorldReferencePosition { get { return m_MiniWorldReferencePosition; } set { m_MiniWorldReferencePosition = value; } }
public float zoomSliderValue { get { return m_ZoomSliderValue; } set { m_ZoomSliderValue = value; } }
}
>>>>>>>
[Serializable]
class Preferences
{
[SerializeField]
public Vector3 m_MiniWorldRefeferenceScale;
[SerializeField]
public Vector3 m_MiniWorldReferencePosition;
[SerializeField]
public float m_ZoomSliderValue;
public Vector3 miniWorldRefeferenceScale { get { return m_MiniWorldRefeferenceScale; } set { m_MiniWorldRefeferenceScale = value; } }
public Vector3 miniWorldReferencePosition { get { return m_MiniWorldReferencePosition; } set { m_MiniWorldReferencePosition = value; } }
public float zoomSliderValue { get { return m_ZoomSliderValue; } set { m_ZoomSliderValue = value; } }
} |
<<<<<<<
Test("concat(hello,world)", "helloworld"),
Test("concat('hello','world')", "helloworld"),
Test("concat(\"hello\",\"world\")", "helloworld"),
Test("length('hello')", 5),
Test("length(\"hello\")", 5),
Test("length(concat(hello,world))", 10),
Test("count('hello')", 5),
Test("count(\"hello\")", 5),
Test("count(concat(hello,world))", 10),
Test("replace('hello', 'l', 'k')", "hekko"),
Test("replace('hello', 'L', 'k')", "hello"),
Test("replaceIgnoreCase('hello', 'L', 'k')", "hekko"),
Test("split('hello','e')", new string[] { "h", "llo" }),
=======
Test("concat(hello,world)","helloworld"),
Test("concat('hello','world')","helloworld"),
Test("concat(\"hello\",\"world\")","helloworld"),
Test("length('hello')",5),
Test("length(\"hello\")",5),
Test("length(concat(hello,world))",10),
Test("count('hello')",5),
Test("count(\"hello\")",5),
Test("count(concat(hello,world))",10),
Test("replace('hello', 'l', 'k')","hekko"),
Test("replace('hello', 'L', 'k')","hello"),
Test("replace(\"hello'\", \"'\", '\"')", "hello\""),
Test("replace('hello\"', '\"', \"'\")", "hello'"),
Test("replace('hello\"', '\"', '\n')", "hello\n"),
Test("replace('hello\n', '\n', '\\\\')", "hello\\"),
Test(@"replace('hello\\', '\\', '\\\\')", @"hello\\"),
Test(@"replace('hello\n', '\n', '\\\\')", @"hello\\"),
Test("replaceIgnoreCase('hello', 'L', 'k')","hekko"),
Test("split('hello','e')",new string[]{ "h","llo"}),
>>>>>>>
Test("concat(hello,world)", "helloworld"),
Test("concat('hello','world')", "helloworld"),
Test("concat(\"hello\",\"world\")", "helloworld"),
Test("length('hello')", 5),
Test("length(\"hello\")", 5),
Test("length(concat(hello,world))", 10),
Test("count('hello')", 5),
Test("count(\"hello\")", 5),
Test("count(concat(hello,world))", 10),
Test("replace('hello', 'l', 'k')", "hekko"),
Test("replace('hello', 'L', 'k')", "hello"),
Test("replace(\"hello'\", \"'\", '\"')", "hello\""),
Test("replace('hello\"', '\"', \"'\")", "hello'"),
Test("replace('hello\"', '\"', '\n')", "hello\n"),
Test("replace('hello\n', '\n', '\\\\')", "hello\\"),
Test(@"replace('hello\\', '\\', '\\\\')", @"hello\\"),
Test(@"replace('hello\n', '\n', '\\\\')", @"hello\\"),
Test("replaceIgnoreCase('hello', 'L', 'k')", "hekko"),
Test("split('hello','e')", new string[] { "h", "llo" }),
<<<<<<<
Test("equals(hello == 'world', bool('true'))", false), // false, true
Test("equals(hello == 'world', bool(0))", false), // false, true
Test("if(!exists(one), 'r1', 'r2')", "r2"), // false
Test("if(!!exists(one), 'r1', 'r2')", "r1"), // true
Test("if(0, 'r1', 'r2')", "r1"), // true
Test("if(bool('true'), 'r1', 'r2')", "r1"), // true
Test("if(istrue, 'r1', 'r2')", "r1"), // true
=======
Test("equals(hello == 'world', bool('true'))", false),//false, true
Test("equals(hello == 'world', bool(0))", false),//false, true
Test("if(!exists(one), 'r1', 'r2')", "r2"),//false
Test("if(!!exists(one), 'r1', 'r2')", "r1"),//true
Test("if(0, 'r1', 'r2')", "r1"),//true
Test("if(bool('true'), 'r1', 'r2')", "r1"),//true
Test("if(istrue, 'r1', 'r2')", "r1"),//true
Test("if(bag.name == null, \"hello\", bag.name)", "mybag"),
Test("if(user.name == null, \"hello\", user.name)", "hello"), // user.name don't exist
Test("if(user.name == null, '', user.name)", ""), // user.name don't exist
Test("if(one > 0, one, two)", 1),
Test("if(one < 0, one, two)", 2),
>>>>>>>
Test("equals(hello == 'world', bool('true'))", false), //false, true
Test("equals(hello == 'world', bool(0))", false), //false, true
Test("if(!exists(one), 'r1', 'r2')", "r2"), //false
Test("if(!!exists(one), 'r1', 'r2')", "r1"), //true
Test("if(0, 'r1', 'r2')", "r1"), //true
Test("if(bool('true'), 'r1', 'r2')", "r1"), //true
Test("if(istrue, 'r1', 'r2')", "r1"), //true
Test("if(bag.name == null, \"hello\", bag.name)", "mybag"),
Test("if(user.name == null, \"hello\", user.name)", "hello"), // user.name don't exist
Test("if(user.name == null, '', user.name)", string.Empty), // user.name don't exist
Test("if(one > 0, one, two)", 1),
Test("if(one < 0, one, two)", 2), |
<<<<<<<
private ActionMap m_DefaultActionMap;
[SerializeField]
=======
private ActionMap m_ShowMenuActionMap;
[SerializeField]
>>>>>>>
<<<<<<<
private IEnumerable<Type> m_AllTools;
private List<IAction> m_AllActions;
private IEnumerable<Type> m_AllWorkspaceTypes;
=======
private List<Type> m_AllTools;
List<Type> m_MainMenuTools;
private List<Type> m_AllWorkspaceTypes;
>>>>>>>
private List<Type> m_AllTools;
private List<IAction> m_AllActions;
List<Type> m_MainMenuTools;
private List<Type> m_AllWorkspaceTypes;
<<<<<<<
SpawnActions();
=======
UnityBrandColorScheme.sessionGradient = UnityBrandColorScheme.GetRandomGradient();
>>>>>>>
SpawnActions();
UnityBrandColorScheme.sessionGradient = UnityBrandColorScheme.GetRandomGradient();
<<<<<<<
// CollectToolActionMaps(m_AllTools);
=======
// CollectToolActionMaps(m_AllTools);
}
void ClearDeveloperConsoleIfNecessary()
{
var asm = Assembly.GetAssembly(typeof(Editor));
var consoleWindowType = asm.GetType("UnityEditor.ConsoleWindow");
EditorWindow window = null;
foreach (var w in Resources.FindObjectsOfTypeAll<EditorWindow>())
{
if (w.GetType() == consoleWindowType)
{
window = w;
break;
}
}
if (window)
{
var consoleFlagsType = consoleWindowType.GetNestedType("ConsoleFlags", BindingFlags.NonPublic);
var names = Enum.GetNames(consoleFlagsType);
var values = Enum.GetValues(consoleFlagsType);
var clearOnPlayFlag = values.GetValue(Array.IndexOf(names, "ClearOnPlay"));
var hasFlagMethod = consoleWindowType.GetMethod("HasFlag", BindingFlags.NonPublic | BindingFlags.Instance);
var result = (bool)hasFlagMethod.Invoke(window, new [] { clearOnPlayFlag });
if (result)
{
var logEntries = asm.GetType("UnityEditorInternal.LogEntries");
var clearMethod = logEntries.GetMethod("Clear", BindingFlags.Static | BindingFlags.Public);
clearMethod.Invoke(null, null);
}
}
}
private void OnSelectionChanged()
{
if (m_SelectionChanged != null)
m_SelectionChanged.Invoke();
}
IEnumerable<InputDevice> GetSystemDevices()
{
// For now let's filter out any other devices other than VR controller devices; Eventually, we may support mouse / keyboard etc.
return InputSystem.devices.Where(d => d is VRInputDevice && d.tagIndex != -1);
>>>>>>>
// CollectToolActionMaps(m_AllTools);
}
void ClearDeveloperConsoleIfNecessary()
{
var asm = Assembly.GetAssembly(typeof(Editor));
var consoleWindowType = asm.GetType("UnityEditor.ConsoleWindow");
EditorWindow window = null;
foreach (var w in Resources.FindObjectsOfTypeAll<EditorWindow>())
{
if (w.GetType() == consoleWindowType)
{
window = w;
break;
}
}
if (window)
{
var consoleFlagsType = consoleWindowType.GetNestedType("ConsoleFlags", BindingFlags.NonPublic);
var names = Enum.GetNames(consoleFlagsType);
var values = Enum.GetValues(consoleFlagsType);
var clearOnPlayFlag = values.GetValue(Array.IndexOf(names, "ClearOnPlay"));
var hasFlagMethod = consoleWindowType.GetMethod("HasFlag", BindingFlags.NonPublic | BindingFlags.Instance);
var result = (bool)hasFlagMethod.Invoke(window, new [] { clearOnPlayFlag });
if (result)
{
var logEntries = asm.GetType("UnityEditorInternal.LogEntries");
var clearMethod = logEntries.GetMethod("Clear", BindingFlags.Static | BindingFlags.Public);
clearMethod.Invoke(null, null);
}
}
}
private void OnSelectionChanged()
{
if (m_SelectionChanged != null)
m_SelectionChanged.Invoke();
}
IEnumerable<InputDevice> GetSystemDevices()
{
// For now let's filter out any other devices other than VR controller devices; Eventually, we may support mouse / keyboard etc.
return InputSystem.devices.Where(d => d is VRInputDevice && d.tagIndex != -1);
<<<<<<<
=======
foreach (var kvp in m_DeviceData)
{
if (kvp.Value.showMenuInput.show.wasJustPressed)
{
var device = kvp.Key;
var mainMenu = m_DeviceData[device].mainMenu;
if (mainMenu != null)
{
// Toggle menu
mainMenu.visible = !mainMenu.visible;
}
}
}
>>>>>>>
<<<<<<<
// HACK: Send a "mouse moved" event, so scene picking can occur for the controller
EditorApplication.delayCall += () =>
{
Event e = new Event();
e.type = EventType.MouseMove;
if (this != null && gameObject != null && gameObject.activeInHierarchy)
VRView.activeView.SendEvent(e);
};
=======
// HACK: Send a custom event, so that OnSceneGUI gets called, which is requirement for scene picking to occur
// Additionally, on some machines it's required to do a delay call otherwise none of this works
// I noticed that delay calls were queuing up, so it was necessary to protect against that, so only one is processed
if (m_UpdatePixelRaycastModule)
{
EditorApplication.delayCall += () =>
{
if (this != null) // Because this is a delay call, the component will be null when EditorVR closes
{
Event e = new Event();
e.type = EventType.ExecuteCommand;
VRView.activeView.SendEvent(e);
}
};
m_UpdatePixelRaycastModule = false; // Don't allow another one to queue until the current one is processed
}
>>>>>>>
// HACK: Send a custom event, so that OnSceneGUI gets called, which is requirement for scene picking to occur
// Additionally, on some machines it's required to do a delay call otherwise none of this works
// I noticed that delay calls were queuing up, so it was necessary to protect against that, so only one is processed
if (m_UpdatePixelRaycastModule)
{
EditorApplication.delayCall += () =>
{
if (this != null) // Because this is a delay call, the component will be null when EditorVR closes
{
Event e = new Event();
e.type = EventType.ExecuteCommand;
VRView.activeView.SendEvent(e);
}
};
m_UpdatePixelRaycastModule = false; // Don't allow another one to queue until the current one is processed
}
<<<<<<<
mainMenu.visible = false;
=======
mainMenu.visible = visible;
>>>>>>>
mainMenu.visible = visible;
<<<<<<<
private bool PerformAction (IAction action)
{
Debug.LogWarning("Performing Actions in EditorVR");
if (action != null)
{
Debug.LogError("<color=green>Performing Action : </color>" + action.ToString());
return action.Execute();
}
else
return false;
}
private bool SelectTool(Node targetNode, Type tool)
=======
private bool SelectTool(Node targetNode, Type toolType)
>>>>>>>
private bool PerformAction (IAction action)
{
Debug.LogWarning("Performing Actions in EditorVR");
if (action != null)
{
Debug.LogError("<color=green>Performing Action : </color>" + action.ToString());
return action.Execute();
}
else
return false;
}
private bool SelectTool(Node targetNode, Type toolType)
<<<<<<<
continue;
}
=======
>>>>>>> |
<<<<<<<
if (isMiniWorldRay(eventData.rayOrigin))
return;
if (m_AssetGridDragging == false)
=======
if (!m_AssetGridDragging)
>>>>>>>
if (isMiniWorldRay(eventData.rayOrigin))
return;
if (!m_AssetGridDragging) |
<<<<<<<
public Func<Transform, Type, bool> selectTool { private get; set; }
public Node node { get; set; }
public ITooltip tooltip { private get; set; } // Overrides text
public Action<ITooltip> showTooltip { private get; set; }
public Action<ITooltip> hideTooltip { private get; set; }
public GradientPair customToolTipHighlightColor { get; set; }
public bool isSelectTool { get { return m_ToolType != null && m_ToolType == typeof(Tools.SelectionTool); } }
public ConnectInterfacesDelegate connectInterfaces { get; set; }
Coroutine m_PositionCoroutine;
Vector3 m_InactivePosition; // Inactive button offset from the main menu activator
bool activeTool
{
get { return m_Order == 0; }
set
{
m_GradientButton.normalGradientPair = value ? gradientPair : UnityBrandColorScheme.grayscaleSessionGradient;
m_GradientButton.highlightGradientPair = value ? UnityBrandColorScheme.grayscaleSessionGradient : gradientPair;
m_GradientButton.invertHighlightScale = value;
m_GradientButton.highlighted = true;
m_GradientButton.highlighted = false;
}
}
=======
>>>>>>>
public Node node { get; set; }
public ITooltip tooltip { private get; set; } // Overrides text
public Action<ITooltip> showTooltip { private get; set; }
public Action<ITooltip> hideTooltip { private get; set; }
public GradientPair customToolTipHighlightColor { get; set; }
public bool isSelectTool { get { return m_ToolType != null && m_ToolType == typeof(Tools.SelectionTool); } }
public ConnectInterfacesDelegate connectInterfaces { get; set; }
Coroutine m_PositionCoroutine;
Vector3 m_InactivePosition; // Inactive button offset from the main menu activator
bool activeTool
{
get { return m_Order == 0; }
set
{
m_GradientButton.normalGradientPair = value ? gradientPair : UnityBrandColorScheme.grayscaleSessionGradient;
m_GradientButton.highlightGradientPair = value ? UnityBrandColorScheme.grayscaleSessionGradient : gradientPair;
m_GradientButton.invertHighlightScale = value;
m_GradientButton.highlighted = true;
m_GradientButton.highlighted = false;
}
}
<<<<<<<
//m_GradientButton.onClick += SelectTool; // TODO remove after action button refactor
if (m_ToolType == null)
{
transform.localPosition = m_InactivePosition;
m_GradientButton.gameObject.SetActive(false);
}
else
{
transform.localPosition = activePosition;
}
var tooltipSourcePosition = new Vector3(node == Node.LeftHand ? -0.01267f : 0.01267f, tooltipSource.localPosition.y, 0);
var tooltipXOffset = node == Node.LeftHand ? -0.05f : 0.05f;
tooltipSource.localPosition = tooltipSourcePosition;
tooltipAlignment = node == Node.LeftHand ? TextAlignment.Right : TextAlignment.Left;
m_TooltipTarget.localPosition = new Vector3(tooltipXOffset, tooltipSourcePosition.y, tooltipSourcePosition.z);
connectInterfaces(m_SmoothMotion);
m_GradientButton.onHoverEnter += BackgroundHovered; // Display the foreground button actions
m_LeftPinnedToolActionButton.clicked = ActionButtonClicked;
m_LeftPinnedToolActionButton.closeButton = CloseButton;
//m_LeftPinnedToolActionButton.hoverEnter = ActionButtonHoverEnter;
m_LeftPinnedToolActionButton.hoverExit = ActionButtonHoverExit;
m_RightPinnedToolActionButton.clicked = ActionButtonClicked;
m_RightPinnedToolActionButton.closeButton = CloseButton;
//m_RightPinnedToolActionButton.hoverEnter = ActionButtonHoverEnter;
m_RightPinnedToolActionButton.hoverExit = ActionButtonHoverExit;
// Assign the select action button to the side closest to the opposite hand, that allows the arrow to also point in the direction the
var leftHand = node == Node.LeftHand;
m_RightPinnedToolActionButton.buttonType = leftHand ? PinnedToolActionButton.ButtonType.SelectTool : PinnedToolActionButton.ButtonType.Close;
m_LeftPinnedToolActionButton.buttonType = leftHand ? PinnedToolActionButton.ButtonType.Close : PinnedToolActionButton.ButtonType.SelectTool;
=======
m_GradientButton.click += OnClick;
m_GradientButton.gameObject.SetActive(false);
>>>>>>>
//m_GradientButton.onClick += SelectTool; // TODO remove after action button refactor
if (m_ToolType == null)
{
transform.localPosition = m_InactivePosition;
m_GradientButton.gameObject.SetActive(false);
}
else
{
transform.localPosition = activePosition;
}
var tooltipSourcePosition = new Vector3(node == Node.LeftHand ? -0.01267f : 0.01267f, tooltipSource.localPosition.y, 0);
var tooltipXOffset = node == Node.LeftHand ? -0.05f : 0.05f;
tooltipSource.localPosition = tooltipSourcePosition;
tooltipAlignment = node == Node.LeftHand ? TextAlignment.Right : TextAlignment.Left;
m_TooltipTarget.localPosition = new Vector3(tooltipXOffset, tooltipSourcePosition.y, tooltipSourcePosition.z);
connectInterfaces(m_SmoothMotion);
m_GradientButton.onHoverEnter += BackgroundHovered; // Display the foreground button actions
m_LeftPinnedToolActionButton.clicked = ActionButtonClicked;
m_LeftPinnedToolActionButton.closeButton = CloseButton;
//m_LeftPinnedToolActionButton.hoverEnter = ActionButtonHoverEnter;
m_LeftPinnedToolActionButton.hoverExit = ActionButtonHoverExit;
m_RightPinnedToolActionButton.clicked = ActionButtonClicked;
m_RightPinnedToolActionButton.closeButton = CloseButton;
//m_RightPinnedToolActionButton.hoverEnter = ActionButtonHoverEnter;
m_RightPinnedToolActionButton.hoverExit = ActionButtonHoverExit;
// Assign the select action button to the side closest to the opposite hand, that allows the arrow to also point in the direction the
var leftHand = node == Node.LeftHand;
m_RightPinnedToolActionButton.buttonType = leftHand ? PinnedToolActionButton.ButtonType.SelectTool : PinnedToolActionButton.ButtonType.Close;
m_LeftPinnedToolActionButton.buttonType = leftHand ? PinnedToolActionButton.ButtonType.Close : PinnedToolActionButton.ButtonType.SelectTool;
//m_GradientButton.click += OnClick;
//m_GradientButton.gameObject.SetActive(false);
<<<<<<<
selectTool(rayOrigin, m_ToolType);
activeTool = activeTool;
=======
SetButtonGradients(this.SelectTool(rayOrigin, m_ToolType));
>>>>>>>
selectTool(rayOrigin, m_ToolType);
activeTool = activeTool;
//SetButtonGradients(this.SelectTool(rayOrigin, m_ToolType)); |
<<<<<<<
=======
#if UNITY_EDITOR
using System;
>>>>>>>
using System;
<<<<<<<
=======
#endif
>>>>>>> |
<<<<<<<
{
proxy.hidden = !proxy.active;
=======
{
proxy.Hidden = !proxy.Active;
>>>>>>>
{
proxy.hidden = !proxy.active;
<<<<<<<
private void InitializePlayerHandle()
{
m_PlayerHandle = PlayerHandleManager.GetNewPlayerHandle();
m_PlayerHandle.global = true;
}
=======
private void InitializePlayerHandle()
{
m_PlayerHandle = PlayerHandleManager.GetNewPlayerHandle();
m_PlayerHandle.global = true;
}
>>>>>>>
private void InitializePlayerHandle()
{
m_PlayerHandle = PlayerHandleManager.GetNewPlayerHandle();
m_PlayerHandle.global = true;
}
<<<<<<<
}
}
private void CreateEventSystem()
{
// Create event system, input module, and event camera
m_EventSystem = U.Object.AddComponent<EventSystem>(gameObject);
m_InputModule = U.Object.AddComponent<MultipleRayInputModule>(gameObject);
m_EventCamera = U.Object.InstantiateAndSetActive(m_InputModule.EventCameraPrefab.gameObject, transform).GetComponent<Camera>();
m_InputModule.eventCamera = m_EventCamera;
m_InputModule.eventCamera.clearFlags = CameraClearFlags.Nothing;
m_InputModule.eventCamera.cullingMask = 0;
foreach (var proxy in m_AllProxies)
{
foreach (var rayOriginBase in proxy.rayOrigins)
{
foreach (var device in InputSystem.devices) // Find device tagged with the node that matches this RayOrigin node, and update the action map copy
{
if (device.TagIndex != -1 && m_TagToNode[VRInputDevice.Tags[device.TagIndex]] == rayOriginBase.Key)
{
DeviceData deviceData;
if (m_DeviceData.TryGetValue(device, out deviceData))
{
deviceData.uiInput = CreateActionMapInput(CloneActionMapForDevice(m_InputModule.actionMap, device));
// Add RayOrigin transform and ActionMapInput reference to input module lists
m_InputModule.rayOrigins.Add(rayOriginBase.Value);
m_InputModule.AddActionMapInput(deviceData.uiInput);
}
break;
}
}
}
}
}
private GameObject InstantiateUI(GameObject prefab)
{
var go = U.Object.InstantiateAndSetActive(prefab, transform);
foreach (Canvas canvas in go.GetComponentsInChildren<Canvas>())
canvas.worldCamera = m_EventCamera;
return go;
}
private ActionMapInput CreateActionMapInput(ActionMap map)
{
var actionMapInput = ActionMapInput.Create(map);
actionMapInput.TryInitializeWithDevices(m_PlayerHandle.GetApplicableDevices());
actionMapInput.active = true;
return actionMapInput;
}
private void UpdatePlayerHandleMaps()
{
var maps = m_PlayerHandle.maps;
=======
}
}
private void CreateEventSystem()
{
// Create event system, input module, and event camera
m_EventSystem = U.Object.AddComponent<EventSystem>(gameObject);
m_InputModule = U.Object.AddComponent<MultipleRayInputModule>(gameObject);
m_EventCamera = U.Object.InstantiateAndSetActive(m_InputModule.EventCameraPrefab.gameObject, transform).GetComponent<Camera>();
m_InputModule.EventCamera = m_EventCamera;
m_InputModule.EventCamera.clearFlags = CameraClearFlags.Nothing;
m_InputModule.EventCamera.cullingMask = 0;
foreach (var proxy in m_AllProxies)
{
foreach (var rayOriginBase in proxy.RayOrigins)
{
foreach (var device in InputSystem.devices) // Find device tagged with the node that matches this RayOrigin node
{
if (device.TagIndex != -1 && m_TagToNode[VRInputDevice.Tags[device.TagIndex]] == rayOriginBase.Key)
{
DeviceData deviceData;
if (m_DeviceData.TryGetValue(device, out deviceData))
{
// Create ui action map input for device.
if (deviceData.uiInput == null)
deviceData.uiInput = CreateActionMapInput(CloneActionMapForDevice(m_InputModule.ActionMap, device));
// Add RayOrigin transform, proxy and ActionMapInput references to input module list of sources
m_InputModule.AddRaycastSource(proxy, rayOriginBase.Key, deviceData.uiInput);
}
break;
}
}
}
}
UpdatePlayerHandleMaps();
}
private GameObject InstantiateUI(GameObject prefab)
{
var go = U.Object.InstantiateAndSetActive(prefab, transform);
foreach (Canvas canvas in go.GetComponentsInChildren<Canvas>())
canvas.worldCamera = m_EventCamera;
return go;
}
private ActionMapInput CreateActionMapInput(ActionMap map)
{
var actionMapInput = ActionMapInput.Create(map);
actionMapInput.TryInitializeWithDevices(m_PlayerHandle.GetApplicableDevices());
actionMapInput.active = true;
return actionMapInput;
}
private void UpdatePlayerHandleMaps()
{
var maps = m_PlayerHandle.maps;
>>>>>>>
}
}
private void CreateEventSystem()
{
// Create event system, input module, and event camera
m_EventSystem = U.Object.AddComponent<EventSystem>(gameObject);
m_InputModule = U.Object.AddComponent<MultipleRayInputModule>(gameObject);
m_EventCamera = U.Object.InstantiateAndSetActive(m_InputModule.EventCameraPrefab.gameObject, transform).GetComponent<Camera>();
m_InputModule.eventCamera = m_EventCamera;
m_InputModule.eventCamera.clearFlags = CameraClearFlags.Nothing;
m_InputModule.eventCamera.cullingMask = 0;
foreach (var proxy in m_AllProxies)
{
foreach (var rayOriginBase in proxy.rayOrigins)
{
foreach (var device in InputSystem.devices) // Find device tagged with the node that matches this RayOrigin node
{
if (device.TagIndex != -1 && m_TagToNode[VRInputDevice.Tags[device.TagIndex]] == rayOriginBase.Key)
{
DeviceData deviceData;
if (m_DeviceData.TryGetValue(device, out deviceData))
{
// Create ui action map input for device.
if (deviceData.uiInput == null)
deviceData.uiInput = CreateActionMapInput(CloneActionMapForDevice(m_InputModule.actionMap, device));
// Add RayOrigin transform, proxy and ActionMapInput references to input module list of sources
m_InputModule.AddRaycastSource(proxy, rayOriginBase.Key, deviceData.uiInput);
}
break;
}
}
}
}
UpdatePlayerHandleMaps();
}
private GameObject InstantiateUI(GameObject prefab)
{
var go = U.Object.InstantiateAndSetActive(prefab, transform);
foreach (Canvas canvas in go.GetComponentsInChildren<Canvas>())
canvas.worldCamera = m_EventCamera;
return go;
}
private ActionMapInput CreateActionMapInput(ActionMap map)
{
var actionMapInput = ActionMapInput.Create(map);
actionMapInput.TryInitializeWithDevices(m_PlayerHandle.GetApplicableDevices());
actionMapInput.active = true;
return actionMapInput;
}
private void UpdatePlayerHandleMaps()
{
var maps = m_PlayerHandle.maps;
<<<<<<<
}
=======
}
>>>>>>>
}
<<<<<<<
standardMap.standardInput = (Standard)CreateActionMapInput(actionMap);
U.Input.CollectSerializableTypesFromActionMapInput(standardMap.standardInput, ref serializableTypes);
=======
standardMap.StandardInput = (Standard)CreateActionMapInput(actionMap);
usedDevices.UnionWith(standardMap.StandardInput.GetCurrentlyUsedDevices());
U.Input.CollectSerializableTypesFromActionMapInput(standardMap.StandardInput, ref serializableTypes);
>>>>>>>
standardMap.standardInput = (Standard)CreateActionMapInput(actionMap);
usedDevices.UnionWith(standardMap.standardInput.GetCurrentlyUsedDevices());
U.Input.CollectSerializableTypesFromActionMapInput(standardMap.standardInput, ref serializableTypes);
<<<<<<<
if (proxy.active)
=======
if (!proxy.Active)
continue;
var tags = InputDeviceUtility.GetDeviceTags(device.GetType());
if (device.TagIndex == -1)
continue;
var tag = tags[device.TagIndex];
Node node;
if (m_TagToNode.TryGetValue(tag, out node))
>>>>>>>
if (!proxy.active)
continue;
var tags = InputDeviceUtility.GetDeviceTags(device.GetType());
if (device.TagIndex == -1)
continue;
var tag = tags[device.TagIndex];
Node node;
if (m_TagToNode.TryGetValue(tag, out node))
<<<<<<<
Transform rayOrigin;
if (proxy.rayOrigins.TryGetValue(node, out rayOrigin))
{
ray.rayOrigin = rayOrigin;
break;
}
=======
ray.RayOrigin = rayOrigin;
break;
>>>>>>>
ray.rayOrigin = rayOrigin;
break; |
<<<<<<<
=======
using UnityEngine.UI;
using UnityEngine.VR.Actions;
using UnityEngine.VR.Handles;
>>>>>>>
using UnityEngine.VR.Actions;
using UnityEngine.VR.Handles;
<<<<<<<
public class MainMenu : MonoBehaviour, IMainMenu, IConnectInterfaces, IInstantiateUI, ICreateWorkspace, ICustomActionMap, ICustomRay, ILockRay
=======
public class MainMenu : MonoBehaviour, IMainMenu, IInstantiateUI, ICustomActionMap, ICustomRay, ILockRay, IMenuOrigins
>>>>>>>
public class MainMenu : MonoBehaviour, IMainMenu, IConnectInterfaces, IInstantiateUI, ICreateWorkspace, ICustomActionMap, ICustomRay, ILockRay, IMenuOrigins
<<<<<<<
[SerializeField]
private MainMenuUI m_MainMenuPrefab;
private MainMenuUI m_MainMenuUI;
private float m_RotationInputStartTime;
private float m_RotationInputStartValue;
private float m_RotationInputIdleTime;
private float m_LastRotationInput;
public Func<GameObject, GameObject> instantiateUI { private get; set; }
public Transform rayOrigin { private get; set; }
public Action hideDefaultRay { private get; set; }
public Action showDefaultRay { private get; set; }
public Func<object, bool> lockRay { private get; set; }
public Func<object, bool> unlockRay { private get; set; }
public List<Type> menuTools { private get; set; }
public Func<Node, Type, bool> selectTool { private get; set; }
public List<Type> menuWorkspaces { private get; set; }
public CreateWorkspaceDelegate createWorkspace { private get; set; }
public Node? node { private get; set; }
public Action setup { get { return Setup; } }
public Action<object> connectInterfaces { private get; set; }
=======
>>>>>>> |
<<<<<<<
public Action OnCloseClick { private get; set; }
public Action OnLockClick { private get; set; }
public bool showBounds { set { m_BoundsCube.GetComponent<Renderer>().enabled = value; } }
=======
public event Action closeClicked = delegate { };
public event Action lockClicked = delegate { };
>>>>>>>
public event Action closeClicked = delegate { };
public event Action lockClicked = delegate { };
public bool showBounds { set { m_BoundsCube.GetComponent<Renderer>().enabled = value; } } |
<<<<<<<
public Action<Vector3, Transform, bool> translate { protected get; set; }
public Action<Quaternion, Transform> rotate { protected get; set; }
=======
public Action<Vector3, Transform, ConstrainedAxis> translate { protected get; set; }
public Action<Quaternion> rotate { protected get; set; }
>>>>>>>
public Action<Vector3, Transform, ConstrainedAxis> translate { protected get; set; }
public Action<Quaternion, Transform> rotate { protected get; set; } |
<<<<<<<
using Unity.Labs.Utils;
=======
using Unity.Labs.EditorXR.Extensions;
>>>>>>>
using Unity.Labs.EditorXR.Extensions;
using Unity.Labs.Utils; |
<<<<<<<
public class WorkspaceUI : MonoBehaviour
{
private const float kPanelOffset = 0f; // The panel needs to be pulled back slightly
=======
public event Action closeClicked = delegate { };
public event Action lockClicked = delegate { };
private const float kPanelOffset = 0f; //The panel needs to be pulled back slightly
>>>>>>>
public class WorkspaceUI : MonoBehaviour
{
public event Action closeClicked = delegate { };
public event Action lockClicked = delegate { };
private const float kPanelOffset = 0f; // The panel needs to be pulled back slightly
<<<<<<<
[SerializeField]
private Transform m_BoundsCube;
public event Action closeClicked = delegate { };
public event Action lockClicked = delegate { };
public bool showBounds { set { m_BoundsCube.GetComponent<Renderer>().enabled = value; } }
=======
public void SetBounds(Bounds bounds)
{
//Because BlendShapes cap at 100, our workspace maxes out at 100m wide
m_Frame.SetBlendShapeWeight(0, bounds.size.x + Workspace.kHandleMargin);
m_Frame.SetBlendShapeWeight(1, bounds.size.z + Workspace.kHandleMargin);
>>>>>>>
public bool showBounds { set { m_BoundsCube.GetComponent<Renderer>().enabled = value; } }
<<<<<<<
m_BackHandle.transform.localPosition = new Vector3(0, m_BackHandle.transform.localPosition.y, bounds.extents.z - handleScale);
m_BackHandle.transform.localScale = new Vector3(bounds.size.x, handleScale, handleScale);
// Resize bounds cube
m_BoundsCube.transform.localScale = bounds.size;
m_BoundsCube.transform.localPosition = Vector3.up * bounds.extents.y;
=======
//Resize front panel
m_FrontPanel.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, bounds.size.x);
m_FrontPanel.localPosition = new Vector3(0, m_FrontPanel.localPosition.y, -bounds.extents.z + kPanelOffset);
>>>>>>>
m_BackHandle.transform.localPosition = new Vector3(0, m_BackHandle.transform.localPosition.y, bounds.extents.z - handleScale);
m_BackHandle.transform.localScale = new Vector3(bounds.size.x, handleScale, handleScale); |
<<<<<<<
IUsesGroupingMethods.makeGroup = provider.MakeGroup;
=======
ISelectObjectMethods.selectObjects = provider.SelectObjects;
>>>>>>>
ISelectObjectMethods.selectObjects = provider.SelectObjects;
IUsesGroupingMethods.makeGroup = provider.MakeGroup; |
<<<<<<<
IGrabObjects, ISetDefaultRayVisibility, ISelectObject, IManipulatorVisibility, IUsesSnapping, ISetHighlight,
ILinkedObject, IUsesRayOrigin, IUsesNode, ICustomActionMap
=======
IGrabObjects, ISetDefaultRayVisibility, IProcessInput, ISelectObject, IManipulatorVisibility, IUsesSnapping, ISetHighlight,
ILinkedObject, IRayToNode, IControlHaptics
>>>>>>>
IGrabObjects, ISetDefaultRayVisibility, ISelectObject, IManipulatorVisibility, IUsesSnapping, ISetHighlight,
ILinkedObject, IRayToNode, IControlHaptics, IUsesRayOrigin, IUsesNode, ICustomActionMap
<<<<<<<
[SerializeField]
ActionMap m_ActionMap;
=======
[SerializeField]
HapticPulse m_DragPulse;
[SerializeField]
HapticPulse m_RotatePulse;
>>>>>>>
[SerializeField]
ActionMap m_ActionMap;
[SerializeField]
HapticPulse m_DragPulse;
[SerializeField]
HapticPulse m_RotatePulse;
<<<<<<<
public Transform rayOrigin { private get; set; }
public Node? node { private get; set; }
public ActionMap actionMap { get { return m_ActionMap; } }
=======
public Func<Transform, Node?> requestNodeFromRayOrigin { get; set; }
>>>>>>>
public Func<Transform, Node?> requestNodeFromRayOrigin { get; set; }
public Transform rayOrigin { private get; set; }
public Node? node { private get; set; }
public ActionMap actionMap { get { return m_ActionMap; } } |
<<<<<<<
public float druation = 5f;
public int maxPresentations = 2;
public Func<bool> suppressPresentation;
=======
public float duration = 5f;
>>>>>>>
public float duration = 5f;
public int maxPresentations = 2;
public Func<bool> suppressPresentation;
<<<<<<<
var feedbackKey = new RequestKey(request);
RequestData data;
if (!m_RequestData.TryGetValue(feedbackKey, out data))
{
data = new RequestData();
m_RequestData[feedbackKey] = data;
}
var suppress = data.presentations > request.maxPresentations;
var suppressPresentation = request.suppressPresentation;
if (suppressPresentation != null)
suppress = suppressPresentation();
if (suppress)
return;
affordanceData.SetVisible(true, request.druation);
=======
affordanceData.SetVisible(true, request.duration);
>>>>>>>
var feedbackKey = new RequestKey(request);
RequestData data;
if (!m_RequestData.TryGetValue(feedbackKey, out data))
{
data = new RequestData();
m_RequestData[feedbackKey] = data;
}
var suppress = data.presentations > request.maxPresentations;
var suppressPresentation = request.suppressPresentation;
if (suppressPresentation != null)
suppress = suppressPresentation();
if (suppress)
return;
affordanceData.SetVisible(true, request.duration); |
<<<<<<<
using System.Collections;
using UnityEngine.UI;
using UnityEngine.VR.Extensions;
=======
using UnityEngine.UI;
>>>>>>>
using System.Collections;
using UnityEngine.UI;
using UnityEngine.VR.Extensions;
<<<<<<<
// Cached for optimization
float m_OriginalUIContainerLocalYPos;
float m_PreviousXRotation;
float m_HandleScale;
float m_FrontHandleYLocalPosition;
float m_BackHandleYLocalPosition;
float m_LeftHandleYLocalPosition;
float m_RightHandleYLocalPosition;
Material m_FrameGradientMaterial;
Vector3 m_FrontResizeIconsContainerOriginalLocalPosition;
Vector3 m_BackResizeIconsContainerOriginalLocalPosition;
Vector3 m_BaseFrontPanelRotation = Vector3.zero;
Vector3 m_MaxFrontPanelRotation = new Vector3(90f, 0f, 0f);
Vector3 m_OriginalFontPanelLocalPosition;
Vector3 m_FrontResizeIconsContainerAngledLocalPosition;
Transform m_LeftHandleTransform;
Transform m_RightHandleTransform;
Transform m_FrontHandleTransform;
Transform m_BackHandleTransform;
Coroutine m_RotateFrontFaceForwardCoroutine;
Coroutine m_RotateFrontFaceBackwardCoroutine;
const float kMaxAlternateFrontPanelLocalZOffset = -0.136f;
const float kMaxAlternateFrontPanelLocalYOffset = 0.0525f;
const int kAngledFaceBlendShapeIndex = 2;
const int kThinFrameBlendShapeIndex = 3;
const int kHiddenFacesBlendShapeIndex = 4;
const float kFaceWidthMatchMultiplier = 7.23f; // Multiplier that sizes the face to the intended width
const float kBackResizeButtonPositionOffset = 0.057f; // Offset to place the back resize buttons in their intended location
const float kBackHandleOffset = -0.145f; // Offset to place the back handle in the expected region behind the workspace
const float kSideHandleOffset = 0.05f; // Offset to place the back handle in the expected region behind the workspace
const float kPanelOffset = -0.0495f; // The panel needs to be pulled back slightly
=======
const float kMaxAlternateFrontPanelLocalZOffset = -0.075f;
const float kMaxAlternateFrontPanelLocalYOffset = -0.005f;
const int kAngledFaceBlendShapeIndex = 2;
const int kThinFrameBlendShapeIndex = 3;
const int kHiddenFacesBlendShapeIndex = 4;
const float kFaceWidthMatchMultiplier = 7.23f; // Multiplier that sizes the face to the intended width
const float kBackResizeButtonPositionOffset = 0.057f; // Offset to place the back resize buttons in their intended location
const float kBackHandleOffset = -0.145f; // Offset to place the back handle in the expected region behind the workspace
const float kSideHandleOffset = 0.05f; // Offset to place the back handle in the expected region behind the workspace
const float kPanelOffset = -0.09f; // The panel needs to be pulled back slightly
// Cached for optimization
float m_OriginalUIContainerLocalYPos;
float m_PreviousXRotation;
float m_HandleScale;
float m_FrontHandleYLocalPosition;
float m_BackHandleYLocalPosition;
float m_LeftHandleYLocalPosition;
float m_RightHandleYLocalPosition;
Material m_FrameGradientMaterial;
Vector3 m_FrontResizeIconsContainerOriginalLocalPosition;
Vector3 m_BackResizeIconsContainerOriginalLocalPosition;
Vector3 m_BaseFrontPanelRotation = Vector3.zero;
Vector3 m_MaxFrontPanelRotation = new Vector3(45f, 0f, 0f);
Vector3 m_OriginalFontPanelLocalPosition;
Vector3 m_FrontResizeIconsContainerAngledLocalPosition;
Transform m_LeftHandleTransform;
Transform m_RightHandleTransform;
Transform m_FrontHandleTransform;
Transform m_BackHandleTransform;
>>>>>>>
const float kMaxAlternateFrontPanelLocalZOffset = -0.136f;
const float kMaxAlternateFrontPanelLocalYOffset = 0.0525f;
const int kAngledFaceBlendShapeIndex = 2;
const int kThinFrameBlendShapeIndex = 3;
const int kHiddenFacesBlendShapeIndex = 4;
const float kFaceWidthMatchMultiplier = 7.23f; // Multiplier that sizes the face to the intended width
const float kBackResizeButtonPositionOffset = 0.057f; // Offset to place the back resize buttons in their intended location
const float kBackHandleOffset = -0.145f; // Offset to place the back handle in the expected region behind the workspace
const float kSideHandleOffset = 0.05f; // Offset to place the back handle in the expected region behind the workspace
const float kPanelOffset = -0.0495f; // The panel needs to be pulled back slightly
// Cached for optimization
float m_OriginalUIContainerLocalYPos;
float m_PreviousXRotation;
float m_HandleScale;
float m_FrontHandleYLocalPosition;
float m_BackHandleYLocalPosition;
float m_LeftHandleYLocalPosition;
float m_RightHandleYLocalPosition;
Material m_FrameGradientMaterial;
Vector3 m_FrontResizeIconsContainerOriginalLocalPosition;
Vector3 m_BackResizeIconsContainerOriginalLocalPosition;
Vector3 m_BaseFrontPanelRotation = Vector3.zero;
Vector3 m_MaxFrontPanelRotation = new Vector3(90f, 0f, 0f);
Vector3 m_OriginalFontPanelLocalPosition;
Vector3 m_FrontResizeIconsContainerAngledLocalPosition;
Transform m_LeftHandleTransform;
Transform m_RightHandleTransform;
Transform m_FrontHandleTransform;
Transform m_BackHandleTransform;
Coroutine m_RotateFrontFaceForwardCoroutine;
Coroutine m_RotateFrontFaceBackwardCoroutine; |
<<<<<<<
private EventSystem m_EventSystem;
private MultipleRayInputModule m_InputModule;
private Camera m_EventCamera;
private RaycastModule m_RaycastModule;
private HighlightModule m_HighlightModule;
=======
private EventSystem m_EventSystem;
private MultipleRayInputModule m_InputModule;
private Camera m_EventCamera;
>>>>>>>
private EventSystem m_EventSystem;
private MultipleRayInputModule m_InputModule;
private Camera m_EventCamera;
private RaycastModule m_RaycastModule;
private HighlightModule m_HighlightModule;
<<<<<<<
{
VRView.viewerPivot.parent = transform; // Parent the camera pivot under EditorVR
VRView.viewerPivot.localPosition = Vector3.zero; // HACK reset pivot to match steam origin
InitializePlayerHandle();
CreateDefaultActionMapInputs();
CreateAllProxies();
CreateDeviceDataForInputDevices();
CreateEventSystem();
m_RaycastModule = U.Object.AddComponent<RaycastModule>(gameObject);
m_HighlightModule = U.Object.AddComponent<HighlightModule>(gameObject);
=======
{
VRView.viewerPivot.parent = transform; // Parent the camera pivot under EditorVR
VRView.viewerPivot.localPosition = Vector3.zero; // HACK reset pivot to match steam origin
InitializePlayerHandle();
CreateDefaultActionMapInputs();
CreateAllProxies();
CreateDeviceDataForInputDevices();
CreateEventSystem();
>>>>>>>
{
VRView.viewerPivot.parent = transform; // Parent the camera pivot under EditorVR
VRView.viewerPivot.localPosition = Vector3.zero; // HACK reset pivot to match steam origin
InitializePlayerHandle();
CreateDefaultActionMapInputs();
CreateAllProxies();
CreateDeviceDataForInputDevices();
CreateEventSystem();
m_RaycastModule = U.Object.AddComponent<RaycastModule>(gameObject);
m_HighlightModule = U.Object.AddComponent<HighlightModule>(gameObject);
<<<<<<<
m_InputModule.EventCamera = m_EventCamera;
//m_InputModule.EventCamera.clearFlags = CameraClearFlags.Nothing;
//m_InputModule.EventCamera.cullingMask = 0;
=======
m_InputModule.eventCamera = m_EventCamera;
m_InputModule.eventCamera.clearFlags = CameraClearFlags.Nothing;
m_InputModule.eventCamera.cullingMask = 0;
>>>>>>>
m_InputModule.eventCamera = m_EventCamera;
//m_InputModule.EventCamera.clearFlags = CameraClearFlags.Nothing;
//m_InputModule.EventCamera.cullingMask = 0;
<<<<<<<
instantiateUITool.InstantiateUI = InstantiateUI;
var raycasterComponent = obj as IRaycaster;
if (raycasterComponent != null)
raycasterComponent.getFirstGameObject = m_RaycastModule.GetFirstGameObject;
var highlightComponent = obj as IHighlight;
if (highlightComponent != null)
highlightComponent.setHighlight = m_HighlightModule.SetHighlight;
=======
instantiateUITool.instantiateUI = InstantiateUI;
>>>>>>>
instantiateUITool.instantiateUI = InstantiateUI;
var raycasterComponent = obj as IRaycaster;
if (raycasterComponent != null)
raycasterComponent.getFirstGameObject = m_RaycastModule.GetFirstGameObject;
var highlightComponent = obj as IHighlight;
if (highlightComponent != null)
highlightComponent.setHighlight = m_HighlightModule.SetHighlight; |
<<<<<<<
using System.Collections.Generic;
using UnityEngine;
=======
using System;
using UnityEngine;
>>>>>>>
using System.Collections.Generic;
using System;
using UnityEngine;
<<<<<<<
/// <summary>
/// Sets a list of renderers to be skipped when rendering the MiniWorld
/// </summary>
List<Renderer> ignoreList { set; }
=======
/// <summary>
/// Preprocessing event that returns true if the MiniWorld should render
/// </summary>
Func<IMiniWorld, bool> preProcessRender { set; }
/// <summary>
/// Postprocessing event to clean up after render
/// </summary>
Action<IMiniWorld> postProcessRender { set; }
/// <summary>
/// The combined scale of the MiniWorld and its reference transform
/// </summary>
Vector3 miniWorldScale { get; }
>>>>>>>
/// <summary>
/// Sets a list of renderers to be skipped when rendering the MiniWorld
/// </summary>
List<Renderer> ignoreList { set; }
/// Preprocessing event that returns true if the MiniWorld should render
/// </summary>
Func<IMiniWorld, bool> preProcessRender { set; }
/// <summary>
/// Postprocessing event to clean up after render
/// </summary>
Action<IMiniWorld> postProcessRender { set; }
/// <summary>
/// The combined scale of the MiniWorld and its reference transform
/// </summary>
Vector3 miniWorldScale { get; } |
<<<<<<<
VRSmoothCamera m_SmoothCamera;
=======
StandardManipulator m_StandardManipulator;
ScaleManipulator m_ScaleManipulator;
IGrabObjects m_TransformTool;
readonly List<IProjectFolderList> m_ProjectFolderLists = new List<IProjectFolderList>();
FolderData[] m_FolderData;
readonly HashSet<string> m_AssetTypes = new HashSet<string>();
float m_ProjectFolderLoadStartTime;
float m_ProjectFolderLoadYieldTime;
readonly List<IFilterUI> m_FilterUIs = new List<IFilterUI>();
>>>>>>>
StandardManipulator m_StandardManipulator;
ScaleManipulator m_ScaleManipulator;
IGrabObjects m_TransformTool;
readonly List<IProjectFolderList> m_ProjectFolderLists = new List<IProjectFolderList>();
FolderData[] m_FolderData;
readonly HashSet<string> m_AssetTypes = new HashSet<string>();
float m_ProjectFolderLoadStartTime;
float m_ProjectFolderLoadYieldTime;
readonly List<IFilterUI> m_FilterUIs = new List<IFilterUI>();
VRSmoothCamera m_SmoothCamera;
<<<<<<<
m_SmoothCamera = U.Object.AddComponent<VRSmoothCamera>(VRView.viewerCamera.gameObject);
VRView.customPreviewCamera = m_SmoothCamera.smoothCamera;
=======
>>>>>>>
m_SmoothCamera = U.Object.AddComponent<VRSmoothCamera>(VRView.viewerCamera.gameObject);
VRView.customPreviewCamera = m_SmoothCamera.smoothCamera;
<<<<<<<
while (!m_HMDReady)
yield return null;
// In case we have anything selected at start, set up manipulators, inspector, etc.
EditorApplication.delayCall += OnSelectionChanged;
=======
>>>>>>>
<<<<<<<
var connectInterfaces = obj as IConnectInterfaces;
if (connectInterfaces != null)
connectInterfaces.connectInterfaces = ConnectInterfaces;
var mainMenu = obj as IMainMenu;
=======
var menuOrigins = obj as IMenuOrigins;
>>>>>>>
var connectInterfaces = obj as IConnectInterfaces;
if (connectInterfaces != null)
connectInterfaces.connectInterfaces = ConnectInterfaces;
var menuOrigins = obj as IMenuOrigins;
<<<<<<<
if (createdCallback != null)
createdCallback(workspace);
var miniWorld = workspace as IMiniWorld;
if (miniWorld == null)
return;
=======
var miniWorld = chessboardWorkspace.miniWorld;
m_MiniWorlds.Add(miniWorld);
>>>>>>>
var miniWorld = chessboardWorkspace.miniWorld;
m_MiniWorlds.Add(miniWorld); |
<<<<<<<
/// <summary>
/// Event which fires when a resource is changed.
/// </summary>
=======
>>>>>>>
/// <summary>
/// Event which fires when a resource is changed.
/// </summary>
<<<<<<<
/// <summary>
/// Gets the resource providers.
/// </summary>
public IEnumerable<IResourceProvider> ResourceProviders { get { return this.resourceProviders; } }
/// <summary>
/// Add a resource provider to be managed.
/// </summary>
/// <param name="resourceProvider"></param>
/// <returns></returns>
public ResourceExplorer AddResourceProvider(IResourceProvider resourceProvider)
=======
public IEnumerable<IResourceProvider> ResourceProviders
>>>>>>>
/// <summary>
/// Gets the resource providers.
/// </summary>
<<<<<<<
/// get resources of a given type.
=======
/// Get resources of a given type.
>>>>>>>
/// Get resources of a given type. |
<<<<<<<
using UnityEngine.InputNew;
using UnityEngine.UI;
=======
using UnityEngine.EventSystems;
>>>>>>>
using UnityEngine.InputNew;
using UnityEngine.UI;
using UnityEngine.EventSystems;
<<<<<<<
public sealed class PinnedToolButton : MonoBehaviour, IPinnedToolButton, ITooltip, ITooltipPlacement, ISetTooltipVisibility, ISetCustomTooltipColor
=======
sealed class PinnedToolButton : MonoBehaviour, ISelectTool, IPointerEnterHandler, IPerformHaptics
>>>>>>>
public sealed class PinnedToolButton : MonoBehaviour, IPinnedToolButton, ITooltip, ITooltipPlacement, ISetTooltipVisibility, ISetCustomTooltipColor
<<<<<<<
this.RestartCoroutine(ref m_VisibilityCoroutine, AnimateHideAndDestroy());
=======
SetButtonGradients(this.SelectTool(rayOrigin, m_ToolType));
this.Pulse(rayOrigin, 0.5f, 0.2f, true, true);
}
public void OnPointerEnter(PointerEventData eventData)
{
this.Pulse(rayOrigin, 0.005f, 0.2f);
>>>>>>>
this.RestartCoroutine(ref m_VisibilityCoroutine, AnimateHideAndDestroy());
}
public void OnPointerEnter(PointerEventData eventData)
{
this.Pulse(rayOrigin, 0.005f, 0.2f); |
<<<<<<<
public Action<GameObject, bool> setLocked { private get; set; }
public Func<GameObject, bool> isLocked { private get; set; }
readonly List<Renderer> m_Intersections = new List<Renderer>();
=======
>>>>>>>
readonly List<Renderer> m_Intersections = new List<Renderer>(); |
Subsets and Splits