conflict_resolution
stringlengths
27
16k
<<<<<<< using Common.Logging; ======= using Moq; >>>>>>> using Common.Logging; using Moq; <<<<<<< using Moq; ======= >>>>>>>
<<<<<<< mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>(), false)).Returns(new[] { "foo.dll" }); ======= mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>())).Returns(new[] { "/foo.dll" }); >>>>>>> mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>(), false)).Returns(new[] { "/foo.dll" }); <<<<<<< mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>(), false)).Returns(new[] { "foo.dll" }); ======= mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>())).Returns(new[] { "/foo.dll" }); >>>>>>> mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>(), false)).Returns(new[] { "/foo.dll" }); <<<<<<< mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>(), false)).Returns(new[] { "foo.dll" }); ======= mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>())).Returns(new[] { "/foo.dll" }); >>>>>>> mock.Setup(a => a.GetAssemblyPaths(It.IsAny<string>(), false)).Returns(new[] { "/foo.dll" });
<<<<<<< var engine = new ScriptEngine(); engine.AddReference("System"); engine.AddReference("System.Core"); var bin = Path.Combine(_fileSystem.GetWorkingDirectory(script), "bin"); engine.BaseDirectory = bin; ======= _scriptEngine.AddReference("System"); _scriptEngine.AddReference("System.Core"); var bin = Path.Combine(_fileSystem.CurrentDirectory, "bin"); _scriptEngine.BaseDirectory = bin; >>>>>>> _scriptEngine.AddReference("System"); _scriptEngine.AddReference("System.Core"); var bin = Path.Combine(_fileSystem.GetWorkingDirectory(script), "bin"); _scriptEngine.BaseDirectory = bin;
<<<<<<< [ArgDescription("Flag which defines the log level used. Possible values:" + ValidLogLevels)] [ArgShortcut("log")] [DefaultValue("off")] public string LogLevel { get { return _logLevel; } set { _logLevel = value.ToUpper(CultureInfo.CurrentUICulture); } } ======= [ArgShortcut("install")] public string Install { get; set; } [ArgShortcut("pre")] public bool AllowPreReleaseFlag { get; set; } >>>>>>> [ArgDescription("Flag which defines the log level used. Possible values:" + ValidLogLevels)] [ArgShortcut("log")] [DefaultValue("off")] public string LogLevel { get { return _logLevel; } set { _logLevel = value.ToUpper(CultureInfo.CurrentUICulture); } } [ArgShortcut("install")] public string Install { get; set; } [ArgShortcut("pre")] public bool AllowPreReleaseFlag { get; set; } <<<<<<< return !(this.IsLogLevelValid() && string.IsNullOrWhiteSpace(ScriptName)); } private bool IsLogLevelValid() { var repository = LogManager.GetRepository(); var levelMap = repository.LevelMap; return levelMap .AllLevels .Cast<Level>() .Any(level => level.Name.Equals(LogLevel, StringComparison.CurrentCulture)); ======= return !string.IsNullOrWhiteSpace(ScriptName) || Install != null; >>>>>>> return (!string.IsNullOrWhiteSpace(ScriptName) || Install != null) && this.IsLogLevelValid(); } private bool IsLogLevelValid() { var repository = LogManager.GetRepository(); var levelMap = repository.LevelMap; return levelMap .AllLevels .Cast<Level>() .Any(level => level.Name.Equals(LogLevel, StringComparison.CurrentCulture));
<<<<<<< DelimiterType DefaultSeparator { get; set; } ======= bool TraceDirectQuery { get; set; } >>>>>>> DelimiterType DefaultSeparator { get; set; } bool TraceDirectQuery { get; set; }
<<<<<<< ======= command = "INSERT INTO general (key, value) VALUES (\"PathPrefix\", @prefix)"; Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters.Add("prefix", ConfigManager.CurrentConfig.FoldersPath); ExecuteSQLAction(command, parameters); command = "PRAGMA user_version=" + SCHEMA_VERSION; ExecuteSQLAction(command, null); >>>>>>> <<<<<<< ======= else { // Check Pragma user_version for update object objPragmaUserVersion = ExecuteSQLFunction("PRAGMA user_version", null); long CurrentUserVersion = (long)objPragmaUserVersion; if (CurrentUserVersion < SCHEMA_VERSION) { Logger.DebugFormat("Current Database Schema must be update from {0} to {0}", CurrentUserVersion, SCHEMA_VERSION); switch (CurrentUserVersion) { #region Upgrade from 0 case 0: // if pragma user_version is 0 => not versionning schema, some check must be done manually // Check if column localPath and id exist on table files command = "PRAGMA table_info(files)"; SQLiteCommand cmd = new SQLiteCommand(command, sqliteConnection); SQLiteDataAdapter adp = new SQLiteDataAdapter(cmd); System.Data.DataTable table = new System.Data.DataTable(); adp.Fill(table); var res = new List<string>(); for (int i = 0; i < table.Rows.Count; i++) res.Add(table.Rows[i]["name"].ToString()); if (!res.Contains("id")) { command = "ALTER TABLE files ADD COLUMN id TEXT"; ExecuteSQLAction(command, null); } if (!res.Contains("localPath")) { command = "ALTER TABLE files ADD COLUMN localPath TEXT"; ExecuteSQLAction(command, null); } // Check if column localPath and id exist on table folders command = "PRAGMA table_info(folders)"; cmd = new SQLiteCommand(command, sqliteConnection); adp = new SQLiteDataAdapter(cmd); table = new System.Data.DataTable(); adp.Fill(table); res = new List<string>(); for (int i = 0; i < table.Rows.Count; i++) res.Add(table.Rows[i]["name"].ToString()); if (!res.Contains("id")) { command = "ALTER TABLE folders ADD COLUMN id TEXT"; ExecuteSQLAction(command, null); } if (!res.Contains("localPath")) { command = "ALTER TABLE folders ADD COLUMN localPath TEXT"; ExecuteSQLAction(command, null); } // Update Schema Version command = "PRAGMA user_version=" + SCHEMA_VERSION; ExecuteSQLAction(command, null); break; } #endregion } else Logger.Info("Database schema is up to date"); Logger.Info("Database migration successful"); } >>>>>>>
<<<<<<< } ======= } syncFull = CrawlSync(remoteFolder, localFolder); >>>>>>> } <<<<<<< Logger.Info("Invoke a full crawl sync"); syncFull = CrawlSync(remoteFolder, localFolder); return; } if (ChangeLogCapability) { Logger.Info("Invoke a remote change log sync"); ChangeLogSync(remoteFolder); ======= WatcherSync(remoteFolderPath, localFolder); foreach (string name in repo.Watcher.GetChangeList()) { Logger.Debug(String.Format("Change name {0} type {1}", name, repo.Watcher.GetChangeType(name))); } >>>>>>> Logger.Info("Invoke a full crawl sync"); syncFull = CrawlSync(remoteFolder, localFolder); return; } if (ChangeLogCapability) { Logger.Info("Invoke a remote change log sync"); ChangeLogSync(remoteFolder); Logger.Info("Invoke a file system watcher sync"); WatcherSync(remoteFolderPath, localFolder); foreach (string name in repo.Watcher.GetChangeList()) { Logger.Debug(String.Format("Change name {0} type {1}", name, repo.Watcher.GetChangeType(name))); } <<<<<<< database.AddFile(filepath, remoteDocument.Id, remoteDocument.LastModificationDate, metadata); ======= database.AddFile(filepath, remoteDocument.LastModificationDate, metadata, filehash); >>>>>>> database.AddFile(filepath, remoteDocument.Id, remoteDocument.LastModificationDate, metadata, filehash); <<<<<<< database.AddFile(filePath, remoteDocument.Id, remoteDocument.LastModificationDate, metadata); ======= database.AddFile(filePath, remoteDocument.LastModificationDate, metadata, filehash); >>>>>>> database.AddFile(filePath, remoteDocument.Id, remoteDocument.LastModificationDate, metadata, filehash);
<<<<<<< // The file has been recently created locally (not synced from server). item = SyncItemFactory.CreateFromLocalPath(filePath, repoInfo); ======= item = SyncItemFactory.CreateFromLocalPath(filePath, false, repoInfo, database); >>>>>>> // The file has been recently created locally (not synced from server). item = SyncItemFactory.CreateFromLocalPath(filePath, false, repoInfo, database); <<<<<<< // check whether it used to exist on server or not. if (database.ContainsFile(SyncItemFactory.CreateFromLocalPath(filePath, repoInfo))) ======= // check whether it used invalidFolderNameRegex to exist on server or not. if (database.ContainsLocalFile(filePath)) >>>>>>> // check whether it used to exist on server or not. if (database.ContainsLocalFile(filePath))
<<<<<<< Logger.Info(String.Format("Conflict with file: {0}", syncItem.RemoteFileName)); // Rename local file with a conflict suffix. string conflictFilename = Utils.CreateConflictFilename(filepath, repoinfo.User); Logger.Debug(String.Format("Renaming conflicted local file {0} to {1}", filepath, conflictFilename)); File.Move(filepath, conflictFilename); ======= >>>>>>> Logger.Info(String.Format("Conflict with file: {0}", syncItem.RemoteFileName)); // Rename local file with a conflict suffix. string conflictFilename = Utils.CreateConflictFilename(filepath, repoinfo.User); Logger.Debug(String.Format("Renaming conflicted local file {0} to {1}", filepath, conflictFilename)); File.Move(filepath, conflictFilename); <<<<<<< ======= } //here the file is surely not-read-ony >>>>>>> <<<<<<< Logger.Debug(String.Format("Deleting old local file {0}", filepath)); File.Delete(filepath); Logger.Debug(String.Format("Renaming temporary local download file {0} to {1}", tmpfilepath, filepath)); // Remove the ".sync" suffix. File.Move(tmpfilepath, filepath); SetLastModifiedDate(remoteDocument, filepath, metadata); ======= File.SetLastWriteTime(filepath, (DateTime)remoteDocument.LastModificationDate); } // Should the local file be made read-only? // Check ther permissions of the current user to the remote document. // (eventually set read only after we finish to manipulate the file or we can get an error if it's read only) bool canSetContent = remoteDocument.AllowableActions.Actions.Contains(PermissionMappingKeys.CanSetContentDocument); //FIXME: alfresco reporst "canSetContentStream" instead of "canSetContent.Document" canSetContent = canSetContent || remoteDocument.AllowableActions.Actions.Contains("canSetContentStream"); if (!canSetContent) { File.SetAttributes(tmpfilepath, FileAttributes.ReadOnly); >>>>>>> Logger.Debug(String.Format("Deleting old local file {0}", filepath)); File.Delete(filepath); Logger.Debug(String.Format("Renaming temporary local download file {0} to {1}", tmpfilepath, filepath)); // Remove the ".sync" suffix. File.Move(tmpfilepath, filepath); SetLastModifiedDate(remoteDocument, filepath, metadata);
<<<<<<< using System.ComponentModel; ======= using CmisSync.Lib.Credentials; >>>>>>> using System.ComponentModel; using CmisSync.Lib.Credentials; <<<<<<< Logger.Fatal("Could not create repository.", e); Program.Controller.ShowAlert(Properties_Resources.Error, String.Format(Properties_Resources.SyncError, repoName, e.Message)); FinishPageCompleted(); ======= Logger.Fatal(ex.ToString()); >>>>>>> Logger.Fatal("Could not create repository.", e); Program.Controller.ShowAlert(Properties_Resources.Error, String.Format(Properties_Resources.SyncError, repoName, e.Message)); FinishPageCompleted(); <<<<<<< /// <summary> /// Repository settings page. /// </summary> public void SettingsPageCompleted(string password, int pollInterval, bool syncAtStartup) { //Run this in background so as not to free the UI... BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler( delegate(Object o, DoWorkEventArgs args) { Program.Controller.UpdateRepositorySettings(saved_repository, password, pollInterval, syncAtStartup); } ); worker.RunWorkerAsync(); FinishPageCompleted(); } ======= /// <summary> /// Gets the connections problem warning message internationalized. /// </summary> /// <returns>The connections problem warning.</returns> /// <param name="server">Tried server.</param> /// <param name="e">Returned Exception</param> public string getConnectionsProblemWarning(CmisServer server, Exception e) { string warning = ""; string message = e.Message; if (e is CmisPermissionDeniedException) warning = Properties_Resources.LoginFailedForbidden; else if (e is CmisServerNotFoundException) warning = Properties_Resources.ConnectFailure; else if (e.Message == "SendFailure" && server.Url.Scheme.StartsWith("https")) warning = Properties_Resources.SendFailureHttps; else if (e.Message == "TrustFailure") warning = Properties_Resources.TrustFailure; /* else if (e.Message == "NameResolutionFailure") warning = Properties_Resources.NameResolutionFailure;*/ else warning = message + Environment.NewLine + Properties_Resources.Sorry; return warning; } >>>>>>> /// <summary> /// Repository settings page. /// </summary> public void SettingsPageCompleted(string password, int pollInterval, bool syncAtStartup) { //Run this in background so as not to free the UI... BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler( delegate(Object o, DoWorkEventArgs args) { Program.Controller.UpdateRepositorySettings(saved_repository, password, pollInterval, syncAtStartup); } ); worker.RunWorkerAsync(); FinishPageCompleted(); } /// <summary> /// Gets the connections problem warning message internationalized. /// </summary> /// <returns>The connections problem warning.</returns> /// <param name="server">Tried server.</param> /// <param name="e">Returned Exception</param> public string getConnectionsProblemWarning(CmisServer server, Exception e) { string warning = ""; string message = e.Message; if (e is CmisPermissionDeniedException) warning = Properties_Resources.LoginFailedForbidden; else if (e is CmisServerNotFoundException) warning = Properties_Resources.ConnectFailure; else if (e.Message == "SendFailure" && server.Url.Scheme.StartsWith("https")) warning = Properties_Resources.SendFailureHttps; else if (e.Message == "TrustFailure") warning = Properties_Resources.TrustFailure; /* else if (e.Message == "NameResolutionFailure") warning = Properties_Resources.NameResolutionFailure;*/ else warning = message + Environment.NewLine + Properties_Resources.Sorry; return warning; }
<<<<<<< string message; while ((message = this.listener.NextQueueDownMessage (Identifier)) != null) { if (!message.Equals (CurrentRevision)) SyncDownBase (); } ======= >>>>>>>
<<<<<<< public CmisRepo(RepoInfo repoInfo, IActivityListener activityListener) ======= /// <summary> /// Constructor. /// </summary> public CmisRepo(RepoInfo repoInfo, ActivityListener activityListener) >>>>>>> /// <summary> /// Constructor. /// </summary> public CmisRepo(RepoInfo repoInfo, IActivityListener activityListener)
<<<<<<< public readonly string WebsiteLinkAddress = "https://github.com/OpenDataSpace/DataSpaceSync"; /// <summary> /// URL to the AUTHORS file /// </summary> public readonly string CreditsLinkAddress = "https://raw.github.com/OpenDataSpace/CmisSync/master/legal/AUTHORS.tx"; /// <summary> /// URL for Issue reports /// </summary> ======= public readonly string WebsiteLinkAddress = "https://github.com/OpenDataSpace/CmisSync"; public readonly string CreditsLinkAddress = "https://raw.github.com/OpenDataSpace/CmisSync/master/legal/AUTHORS.txt"; >>>>>>> public readonly string WebsiteLinkAddress = "https://github.com/OpenDataSpace/CmisSync"; /// <summary> /// URL to the AUTHORS file /// </summary> public readonly string CreditsLinkAddress = "https://raw.github.com/OpenDataSpace/CmisSync/master/legal/AUTHORS.tx"; /// <summary> /// URL for Issue reports /// </summary>
<<<<<<< this.synchronizedFolder = new SynchronizedFolder(repoInfo, this, activityListener); ======= this.synchronizedFolder = new SynchronizedFolder(repoInfo, activityListener, this); this.Watcher.ChangeEvent += OnFileActivity; this.Watcher.EnableEvent = true; >>>>>>> this.synchronizedFolder = new SynchronizedFolder(repoInfo, this, activityListener); this.Watcher.ChangeEvent += OnFileActivity; this.Watcher.EnableEvent = true;
<<<<<<< return Path.Combine(HomePath, "CmisSync"); ======= return Path.Combine(HomePath, "DataSpace"); >>>>>>> return Path.Combine(HomePath, "CmisSync"); <<<<<<< PollInterval = repoInfo.PollInterval, LastSuccessedSync = repoInfo.LastSuccessedSync, IsSuspended = repoInfo.IsSuspended, SyncAtStartup = repoInfo.SyncAtStartup ======= PollInterval = repoInfo.PollInterval, SupportedFeatures = null >>>>>>> PollInterval = repoInfo.PollInterval, LastSuccessedSync = repoInfo.LastSuccessedSync, IsSuspended = repoInfo.IsSuspended, SyncAtStartup = repoInfo.SyncAtStartup, SupportedFeatures = null <<<<<<< <level value=""" + GetLogLevel() + @""" /> ======= <level value=""INFO"" /> >>>>>>> <level value=""" + GetLogLevel() + @""" /> <<<<<<< /// <summary> /// Repository ID. /// </summary> ======= >>>>>>> /// <summary> /// Repository ID. /// </summary> <<<<<<< /// <summary> /// Remote path. /// </summary> ======= >>>>>>> /// <summary> /// Remote path. /// </summary> <<<<<<< public string UserName { get; set; } /// <summary> /// Password. /// </summary> ======= public string UserName { get; set; } >>>>>>> public string UserName { get; set; } /// <summary> /// Password. /// </summary> <<<<<<< /// <summary> /// IsSuspended /// </summary> [XmlElement("issuspended")] public bool IsSuspended { get; set; } /// <summary> /// Last Success Time Sync /// </summary> [XmlElement("lastsuccessedsync")] public DateTime LastSuccessedSync { get; set; } [XmlElement("syncatstartup")] public bool SyncAtStartup { get; set; } private double pollInterval = DEFAULT_POLL_INTERVAL; /// <summary> /// Poll interval. /// </summary> [XmlElement("pollinterval")] public double PollInterval { ======= private double pollInterval = DefaultPollInterval; [XmlElement("pollinterval"), System.ComponentModel.DefaultValue(DefaultPollInterval)] public double PollInterval { >>>>>>> /// <summary> /// IsSuspended /// </summary> [XmlElement("issuspended")] public bool IsSuspended { get; set; } /// <summary> /// Last Success Time Sync /// </summary> [XmlElement("lastsuccessedsync")] public DateTime LastSuccessedSync { get; set; } [XmlElement("syncatstartup")] public bool SyncAtStartup { get; set; } private double pollInterval = DEFAULT_POLL_INTERVAL; /// <summary> /// Poll interval. /// </summary> [XmlElement("pollinterval")] public double PollInterval { <<<<<<< repoInfo.Password = new CmisSync.Auth.CmisPassword(); ======= repoInfo.Password = new Credentials.Password(); >>>>>>> repoInfo.Password = new CmisSync.Auth.CmisPassword(); <<<<<<< if (PollInterval < 1) PollInterval = Config.DEFAULT_POLL_INTERVAL; repoInfo.PollInterval = PollInterval; repoInfo.LastSuccessedSync = LastSuccessedSync; repoInfo.IsSuspended = IsSuspended; repoInfo.SyncAtStartup = SyncAtStartup; ======= repoInfo.MaxUploadRetries = uploadRetries; repoInfo.MaxDownloadRetries = downloadRetries; repoInfo.MaxDeletionRetries = deletionRetries; if (PollInterval < 1) PollInterval = DefaultPollInterval; repoInfo.PollInterval = PollInterval; >>>>>>> repoInfo.MaxUploadRetries = uploadRetries; repoInfo.MaxDownloadRetries = downloadRetries; repoInfo.MaxDeletionRetries = deletionRetries; if (PollInterval < 1) PollInterval = Config.DEFAULT_POLL_INTERVAL; repoInfo.PollInterval = PollInterval; repoInfo.LastSuccessedSync = LastSuccessedSync; repoInfo.IsSuspended = IsSuspended; repoInfo.SyncAtStartup = SyncAtStartup; <<<<<<< /// <summary> /// XML URI. /// </summary> ======= public class Feature { [XmlElement("getFolderTree", IsNullable=true)] public bool? GetFolderTreeSupport {get; set;} [XmlElement("getDescendants", IsNullable=true)] public bool? GetDescendantsSupport {get; set;} [XmlElement("getContentChanges", IsNullable=true)] public bool? GetContentChangesSupport {get; set;} [XmlElement("fileSystemWatcher", IsNullable=true)] public bool? FileSystemWatcherSupport {get; set;} [XmlElement("maxContentChanges", IsNullable=true)] public int? MaxNumberOfContentChanges {get; set;} [XmlElement("chunkedSupport", IsNullable=true)] public bool? ChunkedSupport {get;set;} [XmlElement("chunkedDownloadSupport", IsNullable=true)] public bool? ChunkedDownloadSupport {get;set;} } >>>>>>> public class Feature { [XmlElement("getFolderTree", IsNullable=true)] public bool? GetFolderTreeSupport {get; set;} [XmlElement("getDescendants", IsNullable=true)] public bool? GetDescendantsSupport {get; set;} [XmlElement("getContentChanges", IsNullable=true)] public bool? GetContentChangesSupport {get; set;} [XmlElement("fileSystemWatcher", IsNullable=true)] public bool? FileSystemWatcherSupport {get; set;} [XmlElement("maxContentChanges", IsNullable=true)] public int? MaxNumberOfContentChanges {get; set;} [XmlElement("chunkedSupport", IsNullable=true)] public bool? ChunkedSupport {get;set;} [XmlElement("chunkedDownloadSupport", IsNullable=true)] public bool? ChunkedDownloadSupport {get;set;} } /// <summary> /// XML URI. /// </summary>
<<<<<<< // If there was previously a folder with this name, it means that // the user has deleted it voluntarily, so delete it from server too. activityListener.ActivityStarted(); // Delete the folder from the remote server. remoteSubFolder.DeleteTree(true, null, true); // Delete the folder from database. database.RemoveFolder(localSubFolder); activityListener.ActivityStopped(); } else { if (Utils.IsInvalidFileName(remoteSubFolder.Name)) { Logger.Warn("Skipping remote folder with name invalid on local filesystem: " + remoteSubFolder.Name); } else { // The folder has been recently created on server, so download it. activityListener.ActivityStarted(); Directory.CreateDirectory(localSubFolder); // Create database entry for this folder. // TODO - Yannick - Add metadata database.AddFolder(localSubFolder, remoteSubFolder.LastModificationDate); Logger.Info("Added folder to database: " + localSubFolder); // Recursive copy of the whole folder. RecursiveFolderCopy(remoteSubFolder, localSubFolder); activityListener.ActivityStopped(); ======= success = SyncDownloadFolder(remoteSubFolder, localFolder) && success; if (Directory.Exists(localSubFolder)) { success = RecursiveFolderCopy(remoteSubFolder, localSubFolder) && success; >>>>>>> // If there was previously a folder with this name, it means that // the user has deleted it voluntarily, so delete it from server too. activityListener.ActivityStarted(); // Delete the folder from the remote server. remoteSubFolder.DeleteTree(true, null, true); // Delete the folder from database. database.RemoveFolder(localSubFolder); activityListener.ActivityStopped(); } else { if (Utils.IsInvalidFileName(remoteSubFolder.Name)) { Logger.Warn("Skipping remote folder with name invalid on local filesystem: " + remoteSubFolder.Name); } else { // The folder has been recently created on server, so download it. activityListener.ActivityStarted(); Directory.CreateDirectory(localSubFolder); // Create database entry for this folder. // TODO - Yannick - Add metadata database.AddFolder(localSubFolder, remoteSubFolder.LastModificationDate); Logger.Info("Added folder to database: " + localSubFolder); // Recursive copy of the whole folder. RecursiveFolderCopy(remoteSubFolder, localSubFolder); activityListener.ActivityStopped(); <<<<<<< ======= #endregion #region Cmis Document else { // It is a CMIS document. IDocument remoteDocument = (IDocument)cmisObject; success = SyncDownloadFile(remoteDocument, localFolder, remoteFiles) && success; } #endregion >>>>>>> <<<<<<< catch (Exception e) ======= catch (Exception e) { Logger.Warn(String.Format("Exception while crawl the file list from folder {0}: {1}", localFolder, Utils.ToLogString(e))); success = false; } return success; } private void sleepWhileSuspended() { while (repo.Status == SyncStatus.Suspend) >>>>>>> catch (Exception e) <<<<<<< ======= catch (Exception e) { Logger.Warn(String.Format("Exception while crawl the folder list from folder {0}: {1}", localFolder, Utils.ToLogString(e))); success = false; } return success; >>>>>>>
<<<<<<< using System.Reflection; #if __MonoCS__ //using Mono.Unix.Native; #endif ======= //#if __MonoCS__ //using Mono.Unix.Native; //#endif >>>>>>> using System.Reflection; //#if __MonoCS__ //using Mono.Unix.Native; //#endif <<<<<<< #if __MonoCS__ // writeAllow = (0 == Syscall.access(path, AccessModes.W_OK)); #endif ======= //#if __MonoCS__ // writeAllow = (0 == Syscall.access(path, AccessModes.W_OK)); //#endif } catch(System.UnauthorizedAccessException) { var permission = new FileIOPermission(FileIOPermissionAccess.Write, path); var permissionSet = new PermissionSet(PermissionState.None); permissionSet.AddPermission(permission); if (permissionSet.IsSubsetOf(AppDomain.CurrentDomain.PermissionSet)) { return true; } else return false; >>>>>>> //#if __MonoCS__ // writeAllow = (0 == Syscall.access(path, AccessModes.W_OK)); //#endif } catch(System.UnauthorizedAccessException) { var permission = new FileIOPermission(FileIOPermissionAccess.Write, path); var permissionSet = new PermissionSet(PermissionState.None); permissionSet.AddPermission(permission); if (permissionSet.IsSubsetOf(AppDomain.CurrentDomain.PermissionSet)) { return true; } else return false; <<<<<<< /// Names of files that must be excluded from synchronization. /// </summary> private static HashSet<String> ignoredFilenames = new HashSet<String>{ "~", // gedit and emacs "thumbs.db", "desktop.ini", // Windows "cvs", ".svn", ".git", ".hg", ".bzr", // Version control local settings ".directory", // KDE ".ds_store", ".icon\r", ".spotlight-v100", ".trashes", // Mac OS X ".cvsignore", ".~cvsignore", ".bzrignore", ".gitignore", // Version control ignore list "$~", "lock" //Lock file for folder }; /// <summary> /// A regular expression to detemine ignored filenames. /// </summary> private static Regex ignoredFilenamesRegex = new Regex( "(" + "^~" + // Microsoft Office temporary files start with ~ "|" + "^\\._" + // Mac OS X files starting with ._ "|" + "~$" + // gedit and emacs "|" + "^\\.~lock\\." + // LibreOffice "|" + "^\\..*\\.sw[a-z]$" + // vi(m) "|" + "\\(autosaved\\).graffle$" + // Omnigraffle "|" + "\\(conflict copy \\d\\d\\d\\d-\\d\\d-\\d\\d\\)" + //CmisSync conflict ")" ); ======= /// <para>Creates a log-string from the Exception.</para> /// <para>The result includes the stacktrace, innerexception et cetera, separated by <seealso cref="Environment.NewLine"/>.</para> /// <para>Code from http://www.extensionmethod.net/csharp/exception/tologstring</para> /// </summary> /// <param name="ex">The exception to create the string from.</param> /// <param name="additionalMessage">Additional message to place at the top of the string, maybe be empty or null.</param> /// <returns></returns> public static string ToLogString(this Exception ex) { StringBuilder msg = new StringBuilder(); if (ex != null) { try { string newline = Environment.NewLine; Exception orgEx = ex; msg.Append("Exception:"); msg.Append(newline); while (orgEx != null) { msg.Append(orgEx.Message); msg.Append(newline); orgEx = orgEx.InnerException; } if (ex.Data != null) { foreach (object i in ex.Data) { msg.Append("Data :"); msg.Append(i.ToString()); msg.Append(newline); } } if (ex.StackTrace != null) { msg.Append("StackTrace:"); msg.Append(newline); msg.Append(ex.StackTrace); msg.Append(newline); } if (ex.Source != null) { msg.Append("Source:"); msg.Append(newline); msg.Append(ex.Source); msg.Append(newline); } if (ex.TargetSite != null) { msg.Append("TargetSite:"); msg.Append(newline); msg.Append(ex.TargetSite.ToString()); msg.Append(newline); } Exception baseException = ex.GetBaseException(); if (baseException != null) { msg.Append("BaseException:"); msg.Append(newline); msg.Append(ex.GetBaseException()); } } finally { } } return msg.ToString(); } >>>>>>> /// Names of files that must be excluded from synchronization. /// </summary> private static HashSet<String> ignoredFilenames = new HashSet<String>{ "~", // gedit and emacs "thumbs.db", "desktop.ini", // Windows "cvs", ".svn", ".git", ".hg", ".bzr", // Version control local settings ".directory", // KDE ".ds_store", ".icon\r", ".spotlight-v100", ".trashes", // Mac OS X ".cvsignore", ".~cvsignore", ".bzrignore", ".gitignore", // Version control ignore list "$~", "lock" //Lock file for folder }; /// <summary> /// A regular expression to detemine ignored filenames. /// </summary> private static Regex ignoredFilenamesRegex = new Regex( "(" + "^~" + // Microsoft Office temporary files start with ~ "|" + "^\\._" + // Mac OS X files starting with ._ "|" + "~$" + // gedit and emacs "|" + "^\\.~lock\\." + // LibreOffice "|" + "^\\..*\\.sw[a-z]$" + // vi(m) "|" + "\\(autosaved\\).graffle$" + // Omnigraffle "|" + "\\(conflict copy \\d\\d\\d\\d-\\d\\d-\\d\\d\\)" + //CmisSync conflict ")" ); <<<<<<< ======= if(IsInvalidFileName(filename)) return false; // TODO: Consider these ones as well: // ".~lock.*", // LibreOffice // ".*.sw[a-z]", // vi(m) // "*(Autosaved).graffle", // Omnigraffle // "*~", // gedit and emacs if(filename.EndsWith("~")) { Logger.Debug("Unworth syncing: " + filename); return false; } // Ignore meta data stores of MacOS if (filename == ".DS_Store") { Logger.Debug("Unworth syncing MacOS meta data file .DS_Store"); return false; } >>>>>>> <<<<<<< if (ignoredFilenames.Contains(filename) || ignoredFilenamesRegex.IsMatch(filename)) ======= if (ignoredExtensions.Contains(Path.GetExtension(filename)) || filename[0] == '~' // Microsoft Office temporary files start with ~ || filename[0] == '.' && filename[1] == '_') // Mac OS X files starting with ._ >>>>>>> if (ignoredFilenames.Contains(filename) || ignoredFilenamesRegex.IsMatch(filename)) <<<<<<< if (ret) { Logger.Debug("Invalid filename: " + name); ======= if (ret) { Logger.Debug(String.Format("The given file name {0} contains invalid patterns", name)); return ret; } ret = !IsValidISO88591(name); if (ret) { Logger.Debug(String.Format("The given file name {0} contains invalid characters", name)); >>>>>>> if (ret) { Logger.Debug(String.Format("The given file name {0} contains invalid patterns", name)); return ret; } ret = !IsValidISO88591(name); if (ret) { Logger.Debug(String.Format("The given file name {0} contains invalid characters", name)); <<<<<<< if (ret) { Logger.Debug("Invalid dirname: " + name); ======= if (ret) { Logger.Debug(String.Format("The given directory name {0} contains invalid patterns", name)); return ret; } ret = !IsValidISO88591(name); if (ret) { Logger.Debug(String.Format("The given directory name {0} contains invalid characters", name)); >>>>>>> if (ret) { Logger.Debug(String.Format("The given directory name {0} contains invalid patterns", name)); return ret; } ret = !IsValidISO88591(name); if (ret) { Logger.Debug(String.Format("The given directory name {0} contains invalid characters", name)); <<<<<<< private static string SuffixIfExists(String path, String filename, String extension) ======= /// <param name="path"></param> /// <returns></returns> public static string FindNextConflictFreeFilename(String path, String user) >>>>>>> private static string SuffixIfExists(String path, String filename, String extension) <<<<<<< fullPath = Path.Combine(path, filename + " (" + index.ToString() + ")" + extension); if (!File.Exists(fullPath)) ======= ret = String.Format("{0}_{1}-version ({2}){3}", filepath, user, index.ToString(), extension); if (!File.Exists(ret)) >>>>>>> fullPath = Path.Combine(path, filename + " (" + index.ToString() + ")" + extension); if (!File.Exists(fullPath))
<<<<<<< public IList<ADOTabularRelationship> Relationships { get; private set; } ======= public ADOTabularObjectType ObjectType => ADOTabularObjectType.Table; >>>>>>> public IList<ADOTabularRelationship> Relationships { get; private set; } public ADOTabularObjectType ObjectType => ADOTabularObjectType.Table;
<<<<<<< Util.Utils.DeleteFiles(Thumbs.TVRecorded, String.Format(@"*{0}", Util.Utils.GetThumbExtension())); Util.Utils.DeleteFiles(Thumbs.Videos, String.Format(@"*{0}", Util.Utils.GetThumbExtension()), true); ======= Util.Utils.DeleteFiles(Thumbs.Videos, String.Format(@"*{0}", Util.Utils.GetThumbExtension())); >>>>>>> Util.Utils.DeleteFiles(Thumbs.Videos, String.Format(@"*{0}", Util.Utils.GetThumbExtension()), true);
<<<<<<< using DaxStudio.Controls.PropertyGrid; using System.Reflection; using System.Drawing; ======= using System.Threading.Tasks; >>>>>>> using DaxStudio.Controls.PropertyGrid; using System.Reflection; using System.Drawing; using System.Threading.Tasks; <<<<<<< private bool _excludeHeadersWhenCopyingResults = false; [Category("Results")] [DisplayName("Exclude Headers when Copying Data")] [Description("Setting this option will just copy the raw data from the results pane")] ======= private bool _excludeHeadersWhenCopyingResults; >>>>>>> private bool _excludeHeadersWhenCopyingResults; [Category("Results")] [DisplayName("Exclude Headers when Copying Data")] [Description("Setting this option will just copy the raw data from the results pane")] <<<<<<< private bool _ResultAutoFormat = false; [Category("Results")] [DisplayName("Automatic Format Results")] [Description("Setting this option will automatically format numbers in the query results pane if a format string is not available for a measure with the same name as the column in the output")] ======= private bool _ResultAutoFormat; >>>>>>> private bool _ResultAutoFormat; [Category("Results")] [DisplayName("Automatic Format Results")] [Description("Setting this option will automatically format numbers in the query results pane if a format string is not available for a measure with the same name as the column in the output")] <<<<<<< private bool _setClearCacheAndRunAsDefaultRunStyle = false; [Category("Defaults")] [DisplayName("Set 'Clear Cache and Run' as default")] [Description("This option affects the default run style that is selected when DAX Studio starts up. Any changes will take effect the next time DAX Studio starts up.")] ======= private bool _setClearCacheAndRunAsDefaultRunStyle; >>>>>>> private bool _setClearCacheAndRunAsDefaultRunStyle; [Category("Defaults")] [DisplayName("Set 'Clear Cache and Run' as default")] [Description("This option affects the default run style that is selected when DAX Studio starts up. Any changes will take effect the next time DAX Studio starts up.")] <<<<<<< private bool _sortFoldersFirstInMetadata = false; [Category("Metadata Pane")] [Subcategory("Sorting")] [DisplayName("Sort Folders first in metadata pane")] ======= private bool _sortFoldersFirstInMetadata; >>>>>>> private bool _sortFoldersFirstInMetadata; [Category("Metadata Pane")] [Subcategory("Sorting")] [DisplayName("Sort Folders first in metadata pane")] <<<<<<< private bool _editorWordWrap = false; [Category("Editor")] [DisplayName("Enable Word Wrappng")] ======= private bool _editorWordWrap; >>>>>>> private bool _editorWordWrap; [Category("Editor")] [DisplayName("Enable Word Wrapping")] <<<<<<< private bool _showUserInTitlebar = false; [Category("Defaults")] [DisplayName("Show Username in Titlebar")] ======= private bool _showUserInTitlebar; >>>>>>> private bool _showUserInTitlebar; [Category("Defaults")] [DisplayName("Show Username in Titlebar")]
<<<<<<< public Task OutputResultsAsync(IQueryRunner runner, IQueryTextProvider textProvider) ======= public async Task OutputResultsAsync(IQueryRunner runner) >>>>>>> public async Task OutputResultsAsync(IQueryRunner runner, IQueryTextProvider textProvider) <<<<<<< var dq = textProvider.QueryText; var res = runner.ExecuteDataTableQuery(dq); ======= var dq = runner.QueryText; DataTable res = await runner.ExecuteDataTableQueryAsync(dq); if (res == null || res.Rows?.Count == 0) { Log.Warning("{class} {method} {message}", nameof(ResultsTargetExcelStatic), nameof(OutputResultsAsync), "Query Result DataTable has no rows"); runner.ActivateOutput(); runner.OutputWarning("Unable to send results to Excel as there are no rows in the result set"); return; } >>>>>>> var dq = textProvider.QueryText; DataTable res = await runner.ExecuteDataTableQueryAsync(dq); if (res == null || res.Rows?.Count == 0) { Log.Warning("{class} {method} {message}", nameof(ResultsTargetExcelStatic), nameof(OutputResultsAsync), "Query Result DataTable has no rows"); runner.ActivateOutput(); runner.OutputWarning("Unable to send results to Excel as there are no rows in the result set"); return; }
<<<<<<< using Windows.UI.Xaml.Media; using System.Collections.Generic; ======= using System.Runtime.CompilerServices; using Windows.System; using Windows.UI.Xaml.Input; >>>>>>> using Windows.UI.Xaml.Media; using System.Collections.Generic; using System.Runtime.CompilerServices; using Windows.System; using Windows.UI.Xaml.Input; <<<<<<< ======= switch (viewModelInstance.DirectorySortOption) { case SortOption.Name: SortedColumn = nameColumn; break; case SortOption.DateModified: SortedColumn = dateColumn; break; case SortOption.FileType: SortedColumn = typeColumn; break; case SortOption.Size: SortedColumn = sizeColumn; break; } viewModelInstance.PropertyChanged += ViewModel_PropertyChanged; >>>>>>> switch (viewModelInstance.DirectorySortOption) { case SortOption.Name: SortedColumn = nameColumn; break; case SortOption.DateModified: SortedColumn = dateColumn; break; case SortOption.FileType: SortedColumn = typeColumn; break; case SortOption.Size: SortedColumn = sizeColumn; break; } viewModelInstance.PropertyChanged += ViewModel_PropertyChanged; <<<<<<< } ======= private void AllView_Sorting(object sender, DataGridColumnEventArgs e) { if (e.Column == SortedColumn) viewModelInstance.IsSortedAscending = !viewModelInstance.IsSortedAscending; else if (e.Column != iconColumn) SortedColumn = e.Column; } private void AllView_PreviewKeyDown(object sender, KeyRoutedEventArgs e) { if (e.Key == VirtualKey.Enter) { tabInstance.instanceInteraction.List_ItemClick(null, null); e.Handled = true; } } >>>>>>> private void AllView_Sorting(object sender, DataGridColumnEventArgs e) { if (e.Column == SortedColumn) viewModelInstance.IsSortedAscending = !viewModelInstance.IsSortedAscending; else if (e.Column != iconColumn) SortedColumn = e.Column; } private void AllView_PreviewKeyDown(object sender, KeyRoutedEventArgs e) { if (e.Key == VirtualKey.Enter) { tabInstance.instanceInteraction.List_ItemClick(null, null); e.Handled = true; } }
<<<<<<< List<GUIListItem> items = new List<GUIListItem>(); foreach (Share share in m_shares) { bool pathOnline = false; GUIListItem item = new GUIListItem(); item.Label = share.Name; item.Path = share.Path; if (Utils.IsRemovable(item.Path) && Directory.Exists(item.Path)) { string driveName = Utils.GetDriveName(item.Path); if (driveName == "") driveName = GUILocalizeStrings.Get(1061); item.Label = String.Format("({0}) {1}", item.Path, driveName); } if (Utils.IsDVD(item.Path)) { item.DVDLabel = Utils.GetDriveName(item.Path); item.DVDLabel = item.DVDLabel.Replace('_', ' '); } if (item.DVDLabel != "") { item.Label = String.Format("({0}) {1}", item.Path, item.DVDLabel); } else item.Label = share.Name; item.IsFolder = true; if (share.IsFtpShare) { //item.Path = String.Format("remote:{0}?{1}?{2}?{3}?{4}", // share.FtpServer, share.FtpPort, share.FtpLoginName, share.FtpPassword, Utils.RemoveTrailingSlash(share.FtpFolder)); item.Path = GetShareRemoteURL(share); item.IsRemote = true; } Utils.SetDefaultIcons(item); pathOnline = Util.Utils.CheckServerStatus(item.Path); if ((share.Pincode < 0 || !share.DonotFolderJpgIfPin) && pathOnline) { string coverArt = Utils.GetCoverArtName(item.Path, "folder"); string largeCoverArt = Utils.GetLargeCoverArtName(item.Path, "folder"); bool coverArtExists = false; if (Util.Utils.FileExistsInCache(coverArt)) { item.IconImage = coverArt; coverArtExists = true; } if (Util.Utils.FileExistsInCache(largeCoverArt)) { item.IconImageBig = largeCoverArt; } // Fix for Mantis issue 0001465: folder.jpg in main shares view only displayed when list view is used else if (coverArtExists) { item.IconImageBig = coverArt; item.ThumbnailImage = coverArt; } } else { if ((Util.Utils.IsUNCNetwork(item.Path) || Util.Utils.IsUNCNetwork(Util.Utils.FindUNCPaths(item.Path))) && Util.Utils.FileExistsInCache(GUIGraphicsContext.GetThemedSkinFile("\\Media\\defaultNetworkOffline.png"))) { item.IconImage = "defaultNetworkOffline.png"; item.IconImageBig = "defaultNetworkBigOffline.png"; item.ThumbnailImage = "defaultNetworkBigOffline.png"; Log.Debug("GetRootExt(): Path = {0}, IconImage = {1}", item.Path, item.IconImage); } } items.Add(item); } ======= List<GUIListItem> items = new List<GUIListItem>(); foreach (Share share in m_shares) { GUIListItem item = new GUIListItem(); item.Label = share.Name; item.Path = share.Path; if (Utils.IsRemovable(item.Path) && Directory.Exists(item.Path)) { string driveName = Utils.GetDriveName(item.Path); if (driveName == "") driveName = GUILocalizeStrings.Get(1061); item.Label = String.Format("({0}) {1}", item.Path, driveName); } if (Utils.IsDVD(item.Path)) { item.DVDLabel = Utils.GetDriveName(item.Path); item.DVDLabel = item.DVDLabel.Replace('_', ' '); } if (item.DVDLabel != "") { item.Label = String.Format("({0}) {1}", item.Path, item.DVDLabel); } else item.Label = share.Name; item.IsFolder = true; if (share.IsFtpShare) { //item.Path = String.Format("remote:{0}?{1}?{2}?{3}?{4}", // share.FtpServer, share.FtpPort, share.FtpLoginName, share.FtpPassword, Utils.RemoveTrailingSlash(share.FtpFolder)); item.Path = GetShareRemoteURL(share); item.IsRemote = true; } Utils.SetDefaultIcons(item); bool pathOnline = Util.Utils.CheckServerStatus(item.Path); if (Util.Utils.IsUNCNetwork(item.Path) && !pathOnline && Util.Utils.FileExistsInCache(GUIGraphicsContext.GetThemedSkinFile("\\Media\\defaultNetworkOffline.png"))) { item.IconImage = "defaultNetworkOffline.png"; item.IconImageBig = "defaultNetworkBigOffline.png"; item.ThumbnailImage = "defaultNetworkBigOffline.png"; Log.Debug("GetRootExt(): Path = {0}, IconImage = {1}", item.Path, item.IconImage); } if ((share.Pincode == string.Empty || !share.DonotFolderJpgIfPin) && pathOnline) { string coverArt = Utils.GetCoverArtName(item.Path, "folder"); string largeCoverArt = Utils.GetLargeCoverArtName(item.Path, "folder"); bool coverArtExists = false; if (Util.Utils.FileExistsInCache(coverArt)) { item.IconImage = coverArt; coverArtExists = true; } if (Util.Utils.FileExistsInCache(largeCoverArt)) { item.IconImageBig = largeCoverArt; } // Fix for Mantis issue 0001465: folder.jpg in main shares view only displayed when list view is used else if (coverArtExists) { item.IconImageBig = coverArt; item.ThumbnailImage = coverArt; } } items.Add(item); } >>>>>>> List<GUIListItem> items = new List<GUIListItem>(); foreach (Share share in m_shares) { bool pathOnline = false; GUIListItem item = new GUIListItem(); item.Label = share.Name; item.Path = share.Path; if (Utils.IsRemovable(item.Path) && Directory.Exists(item.Path)) { string driveName = Utils.GetDriveName(item.Path); if (driveName == "") driveName = GUILocalizeStrings.Get(1061); item.Label = String.Format("({0}) {1}", item.Path, driveName); } if (Utils.IsDVD(item.Path)) { item.DVDLabel = Utils.GetDriveName(item.Path); item.DVDLabel = item.DVDLabel.Replace('_', ' '); } if (item.DVDLabel != "") { item.Label = String.Format("({0}) {1}", item.Path, item.DVDLabel); } else item.Label = share.Name; item.IsFolder = true; if (share.IsFtpShare) { //item.Path = String.Format("remote:{0}?{1}?{2}?{3}?{4}", // share.FtpServer, share.FtpPort, share.FtpLoginName, share.FtpPassword, Utils.RemoveTrailingSlash(share.FtpFolder)); item.Path = GetShareRemoteURL(share); item.IsRemote = true; } Utils.SetDefaultIcons(item); pathOnline = Util.Utils.CheckServerStatus(item.Path); if ((share.Pincode == string.Empty || !share.DonotFolderJpgIfPin) && pathOnline) { string coverArt = Utils.GetCoverArtName(item.Path, "folder"); string largeCoverArt = Utils.GetLargeCoverArtName(item.Path, "folder"); bool coverArtExists = false; if (Util.Utils.FileExistsInCache(coverArt)) { item.IconImage = coverArt; coverArtExists = true; } if (Util.Utils.FileExistsInCache(largeCoverArt)) { item.IconImageBig = largeCoverArt; } // Fix for Mantis issue 0001465: folder.jpg in main shares view only displayed when list view is used else if (coverArtExists) { item.IconImageBig = coverArt; item.ThumbnailImage = coverArt; } } else { if ((Util.Utils.IsUNCNetwork(item.Path) || Util.Utils.IsUNCNetwork(Util.Utils.FindUNCPaths(item.Path))) && Util.Utils.FileExistsInCache(GUIGraphicsContext.GetThemedSkinFile("\\Media\\defaultNetworkOffline.png"))) { item.IconImage = "defaultNetworkOffline.png"; item.IconImageBig = "defaultNetworkBigOffline.png"; item.ThumbnailImage = "defaultNetworkBigOffline.png"; Log.Debug("GetRootExt(): Path = {0}, IconImage = {1}", item.Path, item.IconImage); } } items.Add(item); }
<<<<<<< ======= #region radio methods /// <summary> /// Tune to a radio station. After runing call GetRadioPlaylist to get the track listing /// </summary> /// <param name="stationURL"></param> public static bool TuneRadio(string stationURL) { var parms = new Dictionary<string, string>(); const string methodName = "radio.tune"; parms.Add("station", stationURL); parms.Add("sk", _sessionKey); var buildLastFMString = LastFMHelper.LastFMHelper.BuildLastFMString(parms, methodName, true); var result = GetXml(buildLastFMString, "POST", false, true); if (result != null) { return true; } return false; } /// <summary> /// Gets the playlist of radio station (will only be a small number of tracks) /// </summary> /// <returns>A list of tracks</returns> public static List<LastFMStreamingTrack> GetRadioPlaylist() { var parms = new Dictionary<string, string>(); const string methodName = "radio.getPlaylist"; parms.Add("bitrate", "128"); parms.Add("sk", _sessionKey); var buildLastFMString = LastFMHelper.LastFMHelper.BuildLastFMString(parms, methodName, true); var xDoc = GetXml(buildLastFMString, "GET", false, true); if (xDoc != null) { XNamespace ns = "http://xspf.org/ns/0/"; var tracks = (from a in xDoc.Descendants(ns + "track") select new LastFMStreamingTrack { ArtistName = (string) a.Element(ns + "creator"), TrackTitle = (string) a.Element(ns + "title"), TrackStreamingURL = (string) a.Element(ns + "location"), Duration = Int32.Parse((string) a.Element(ns + "duration"))/1000, Identifier = Int32.Parse((string) a.Element(ns + "identifier")), ImageURL = (string) a.Element(ns + "image") }).ToList(); return tracks; } return null; } #endregion >>>>>>>
<<<<<<< bool Vmr9Enabled = xmlreader.GetValueAsBool("musicvideo", "useVMR9", true); ======= int streamPlayer = xmlreader.GetValueAsInt("audioscrobbler", "streamplayertype", 0); bool Vmr9Enabled = xmlreader.GetValueAsBool("musicvideo", "useVMR9", true); bool InternalBDPlayer = xmlreader.GetValueAsBool("bdplayer", "useInternalBDPlayer", true); >>>>>>> bool Vmr9Enabled = xmlreader.GetValueAsBool("musicvideo", "useVMR9", true); bool InternalBDPlayer = xmlreader.GetValueAsBool("bdplayer", "useInternalBDPlayer", true);
<<<<<<< using System.Xml; ======= using MediaPortal.DeployTool.Sections; >>>>>>> using MediaPortal.DeployTool.Sections; using System.Xml;
<<<<<<< ActiveDocument.IsQueryRunning = false; }); } else if (IsSQLExport) { Task.Run(() => ======= } else if (IsSQLExport) >>>>>>> } else if (IsSQLExport) <<<<<<< ActiveDocument.IsQueryRunning = false; }); ======= } >>>>>>> } <<<<<<< finally { TryClose(true); } ======= >>>>>>> <<<<<<< var csvFilePath = System.IO.Path.Combine(outputPath, $"{table.Name}.csv"); var daxQuery = $"EVALUATE {table.DaxName}"; var rows = 0; var tableCnt = 0; var totalTables = metadataPane.SelectedModel.Tables.Count; using (var textWriter = new StreamWriter(csvFilePath, false, Encoding.UTF8)) using (var csvWriter = new CsvHelper.CsvWriter(textWriter)) using (var statusMsg = new StatusBarMessage(this.ActiveDocument, $"Exporting {table.Name}")) using (var reader = ActiveDocument.Connection.ExecuteReader(daxQuery)) { textWriter.AutoFlush = false; rows = 0; tableCnt++; // Write Header foreach (var colName in reader.CleanColumnNames()) { csvWriter.WriteField(colName); } ======= rows = 0; tableCnt++; // Write Header foreach (var colName in reader.CleanColumnNames()) { csvWriter.WriteField(colName); } >>>>>>> rows = 0; tableCnt++; // Write Header foreach (var colName in reader.CleanColumnNames()) { csvWriter.WriteField(colName); } <<<<<<< rows++; if (rows % 5000 == 0) { new StatusBarMessage(ActiveDocument, $"Exporting Table {tableCnt} of {totalTables} : {table.Name} ({rows:N0} rows)"); ActiveDocument.RefreshElapsedTime(); // if cancel has been requested do not write any more records if (CancelRequested) break; } csvWriter.NextRecord(); ======= rows++; if (rows % 5000 == 0) { new StatusBarMessage(ActiveDocument, $"Exporting Table {tableCnt} of {totalTables} : {table.Name} ({rows:N0} rows)"); ActiveDocument.RefreshElapsedTime(); >>>>>>> rows++; if (rows % 5000 == 0) { new StatusBarMessage(ActiveDocument, $"Exporting Table {tableCnt} of {totalTables} : {table.Name} ({rows:N0} rows)"); ActiveDocument.RefreshElapsedTime(); // if cancel has been requested do not write any more records if (CancelRequested) break;
<<<<<<< // In the list must be at least 2 files so we check stackable movie for resume // (which file have a stop time) ======= //Do NOT add OnItemSelected event handler here, because its still there... facadeLayout.Add(item); } } else { // here we get ALL files in every subdir, look for folderthumbs, defaultthumbs, etc itemlist = _virtualDirectory.GetDirectoryExt(_currentFolder); if (_mapSettings.Stack) { Dictionary<string, List<GUIListItem>> stackings = new Dictionary<string, List<GUIListItem>>(itemlist.Count); for (int i = 0; i < itemlist.Count; ++i) { GUIListItem item1 = itemlist[i]; string cleanFilename = item1.Label; Util.Utils.RemoveStackEndings(ref cleanFilename); List<GUIListItem> innerList; if (stackings.TryGetValue(cleanFilename, out innerList)) { for (int j = 0; j < innerList.Count; j++) { GUIListItem item2 = innerList[j]; if ((!item1.IsFolder || !item2.IsFolder) && (!item1.IsRemote && !item2.IsRemote) && Util.Utils.ShouldStack(item1.Path, item2.Path)) { if (String.Compare(item1.Path, item2.Path, true) > 0) { item2.FileInfo.Length += item1.FileInfo.Length; } else { // keep item1, it's path is lexicographically before item2 path item1.FileInfo.Length += item2.FileInfo.Length; innerList[j] = item1; } item1 = null; break; } } if (item1 != null) // not stackable { innerList.Add(item1); } } else { innerList = new List<GUIListItem> {item1}; stackings.Add(cleanFilename, innerList); } } List<GUIListItem> itemfiltered = new List<GUIListItem>(itemlist.Count); foreach (KeyValuePair<string, List<GUIListItem>> pair in stackings) { List<GUIListItem> innerList = pair.Value; for (int i = 0; i < innerList.Count; i++) { GUIListItem item = innerList[i]; if ((VirtualDirectory.IsValidExtension(item.Path, Util.Utils.VideoExtensions, false))) item.Label = pair.Key; itemfiltered.Add(item); } } itemlist = itemfiltered; } ISelectDVDHandler selectDVDHandler; if (GlobalServiceProvider.IsRegistered<ISelectDVDHandler>()) { selectDVDHandler = GlobalServiceProvider.Get<ISelectDVDHandler>(); } else { selectDVDHandler = new SelectDVDHandler(); GlobalServiceProvider.Add<ISelectDVDHandler>(selectDVDHandler); } // folder.jpg will already be assigned from "itemlist = virtualDirectory.GetDirectory(_currentFolder);" here selectDVDHandler.SetIMDBThumbs(itemlist, _markWatchedFiles, _eachFolderIsMovie); foreach (GUIListItem item in itemlist) { item.OnItemSelected += new GUIListItem.ItemSelectedHandler(item_OnItemSelected); facadeLayout.Add(item); } _cachedItems = itemlist; _cachedDir = _currentFolder; } OnSort(); bool itemSelected = false; //Sometimes the last selected item wasn't restored correcly after playback stop //The !useCache fixes this if (selectedListItem != null && !useCache) { string selectedItemLabel = _history.Get(_currentFolder); for (int i = 0; i < facadeLayout.Count; ++i) { GUIListItem item = facadeLayout[i]; if (item.Label == selectedItemLabel) { GUIControl.SelectItemControl(GetID, facadeLayout.GetID, i); itemSelected = true; break; } } } int totalItems = itemlist.Count; if (itemlist.Count > 0) { GUIListItem rootItem = (GUIListItem)itemlist[0]; if (rootItem.Label == "..") { totalItems--; } } //set object count label GUIPropertyManager.SetProperty("#itemcount", Util.Utils.GetObjectCountLabel(totalItems)); if (!itemSelected) { UpdateButtonStates(); SelectCurrentItem(); } GUIWaitCursor.Hide(); } protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); } protected override void OnClick(int iItem) { GUIListItem item = facadeLayout.SelectedListItem; _totalMovieDuration = 0; _isStacked = false; _stackedMovieFiles.Clear(); if (item == null) { return; } bool isFolderAMovie = false; string path = item.Path; if (item.IsFolder && !item.IsRemote) { // Check if folder is actually a DVD. If so don't browse this folder, but play the DVD! if ((File.Exists(path + @"\VIDEO_TS\VIDEO_TS.IFO")) && (item.Label != "..")) { isFolderAMovie = true; path = item.Path + @"\VIDEO_TS\VIDEO_TS.IFO"; } else if ((File.Exists(path + @"\BDMV\index.bdmv")) && (item.Label != "..")) { isFolderAMovie = true; path = item.Path + @"\BDMV\index.bdmv"; } else { isFolderAMovie = false; } } if ((item.IsFolder && !isFolderAMovie)) //-- Mars Warrior @ 03-sep-2004 { _currentSelectedItem = -1; LoadDirectory(path); } else { if (!_virtualDirectory.RequestPin(path)) { return; } if (_virtualDirectory.IsRemote(path)) { if (!_virtualDirectory.IsRemoteFileDownloaded(path, item.FileInfo.Length)) { if (!_virtualDirectory.ShouldWeDownloadFile(path)) { return; } if (!_virtualDirectory.DownloadRemoteFile(path, item.FileInfo.Length)) { //show message that we are unable to download the file GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_SHOW_WARNING, 0, 0, 0, 0, 0, 0); msg.Param1 = 916; msg.Param2 = 920; msg.Param3 = 0; msg.Param4 = 0; GUIWindowManager.SendMessage(msg); return; } else { //download subtitle files Thread subLoaderThread = new Thread(new ThreadStart(this._downloadSubtitles)); subLoaderThread.IsBackground = true; subLoaderThread.Name = "SubtitleLoader"; subLoaderThread.Start(); } } } if (item.FileInfo != null) { if (!_virtualDirectory.IsRemoteFileDownloaded(path, item.FileInfo.Length)) { return; } } string movieFileName = path; movieFileName = _virtualDirectory.GetLocalFilename(movieFileName); // Set selected item _currentSelectedItem = facadeLayout.SelectedListItemIndex; if (PlayListFactory.IsPlayList(movieFileName)) { LoadPlayList(movieFileName); return; } if (!CheckMovie(movieFileName)) { return; } bool askForResumeMovie = true; if (_mapSettings.Stack) { int selectedFileIndex = 0; int movieDuration = 0; ArrayList movies = new ArrayList(); #region Is all this really neccessary?! //get all movies belonging to each other List<GUIListItem> items = _virtualDirectory.GetDirectoryUnProtectedExt(_currentFolder, true); //check if we can resume 1 of those movies int timeMovieStopped = 0; >>>>>>> // In the list must be at least 2 files so we check stackable movie for resume // (which file have a stop time) <<<<<<< else if (strFile.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV", StringComparison.InvariantCultureIgnoreCase) >= 0) { //BD folder string bdFolder = strFile.Substring(0, strFile.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV", StringComparison.InvariantCultureIgnoreCase)); strMovie = Path.GetFileName(bdFolder); } ======= else if (strFile.ToUpper().IndexOf(@"\BDMV\index.bdmv") >= 0) { //Blu-Ray folder string dvdFolder = strFile.Substring(0, strFile.ToUpper().IndexOf(@"\BDMV\index.bdmv")); strMovie = Path.GetFileName(dvdFolder); } >>>>>>> else if (strFile.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV", StringComparison.InvariantCultureIgnoreCase) >= 0) { //BD folder string bdFolder = strFile.Substring(0, strFile.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV", StringComparison.InvariantCultureIgnoreCase)); strMovie = Path.GetFileName(bdFolder); } <<<<<<< if (File.Exists(pItem.Path + @"\BDMV\index.bdmv")) { strFile = pItem.Path + @"\BDMV\index.bdmv"; } ======= else if (File.Exists(pItem.Path + @"\BDMV\index.bdmv")) { strFile = pItem.Path + @"\BDMV\index.bdmv"; } >>>>>>> if (File.Exists(pItem.Path + @"\BDMV\index.bdmv")) { strFile = pItem.Path + @"\BDMV\index.bdmv"; } <<<<<<< ======= //return true; } //else //{ // Log.Debug("GUIVideoFiles: SelectCurrentItem - nothing to do for item {0}", _currentSelectedItem.ToString()); // return false; //} } #endregion private void GUIWindowManager_OnNewMessage(GUIMessage message) { switch (message.Message) { case GUIMessage.MessageType.GUI_MSG_AUTOPLAY_VOLUME: if (message.Param1 == (int)Ripper.AutoPlay.MediaType.VIDEO) { if (message.Param2 == (int)Ripper.AutoPlay.MediaSubType.DVD) OnPlayDVD(message.Label, GetID); else if (message.Param2 == (int)Ripper.AutoPlay.MediaSubType.BLURAY) { g_Player.Play((message.Label + "\\BDMV\\index.bdmv"), g_Player.MediaType.Video); g_Player.ShowFullScreenWindow(); } else if (message.Param2 == (int)Ripper.AutoPlay.MediaSubType.VCD || message.Param2 == (int)Ripper.AutoPlay.MediaSubType.FILES) OnPlayFiles((System.Collections.ArrayList)message.Object); } break; case GUIMessage.MessageType.GUI_MSG_VOLUME_REMOVED: if (g_Player.Playing && g_Player.IsVideo && message.Label.Equals(g_Player.CurrentFile.Substring(0, 2), StringComparison.InvariantCultureIgnoreCase)) { Log.Info("GUIVideoFiles: Stop since media is ejected"); g_Player.Stop(); _playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_VIDEO_TEMP).Clear(); _playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_VIDEO).Clear(); } if (GUIWindowManager.ActiveWindow == GetID) { if (Util.Utils.IsDVD(_currentFolder)) { _currentFolder = string.Empty; LoadDirectory(_currentFolder); } } break; >>>>>>> <<<<<<< if (file.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV", StringComparison.InvariantCultureIgnoreCase) >= 0) ======= if (info.IsEmpty && File.Exists(path + @"\BDMV\index.bdmv")) //still empty and is ripped DVD { VideoDatabase.GetMovieInfo(path + @"\BDMV\index.bdmv", ref info); isFile = true; } if (info.IsEmpty) >>>>>>> if (file.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV", StringComparison.InvariantCultureIgnoreCase) >= 0) <<<<<<< } ======= if (askForResumeMovie && !filename.EndsWith(@"\BDMV\index.bdmv")) { GUIResumeDialog.Result result = GUIResumeDialog.ShowResumeDialog(title, timeMovieStopped, GUIResumeDialog.MediaType.Video); >>>>>>> } <<<<<<< #region Studio ======= // Add file to tmp playlist PlayListItem newItem = new PlayListItem(); newItem.FileName = file; // Set file description (for sorting by name -> DVD IFO file problem) string description = string.Empty; if (file.ToUpper().IndexOf(@"\VIDEO_TS\VIDEO_TS.IFO") >= 0) { string dvdFolder = file.Substring(0, file.ToUpper().IndexOf(@"\VIDEO_TS\VIDEO_TS.IFO")); description = Path.GetFileName(dvdFolder); } else if (file.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV") >= 0) { string dvdFolder = file.Substring(0, file.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV")); description = Path.GetFileName(dvdFolder); } else { description = Path.GetFileName(file); } newItem.Description = description; newItem.Type = PlayListItem.PlayListItemType.Video; tmpPlayList.Add(newItem); } } >>>>>>> #region Studio <<<<<<< // MPAA if (nodeMpaa != null) ======= if (!facadeLayout.Focus) { // Menu button context menuu if (!_virtualDirectory.IsRemote(_currentFolder)) { dlg.AddLocalizedString(102); //Scan dlg.AddLocalizedString(368); //IMDB } } else { if ((Path.GetFileName(item.Path) != string.Empty) || Util.Utils.IsDVD(item.Path)) { if (item.IsRemote) { return; } if ((item.IsFolder) && (item.Label == "..")) { return; } if (Util.Utils.IsDVD(item.Path)) { if (File.Exists(item.Path + @"\VIDEO_TS\VIDEO_TS.IFO") || File.Exists(item.Path + @"\BDMV\index.bdmv")) >>>>>>> // MPAA if (nodeMpaa != null) <<<<<<< if (item.Path.ToUpperInvariant().IndexOf("BDMV") >= 0) { string strFile = String.Format(@"{0}\index.bdmv", item.Path); availableFiles.Add(strFile); } ======= else if (item.Path.ToLower().IndexOf("bdmv") >= 0) { string strFile = String.Format(@"{0}\index.bdmv", item.Path); availableFiles.Add(strFile); } >>>>>>> if (item.Path.ToUpperInvariant().IndexOf("BDMV") >= 0) { string strFile = String.Format(@"{0}\index.bdmv", item.Path); availableFiles.Add(strFile); }
<<<<<<< GUIGraphicsContext.form.Invoke(new PlaybackChangedDelegate(DoOnStarted), new object[] {type, filename}); UpdateSimilarTracks(filename); ======= GUIGraphicsContext.form.BeginInvoke(new PlaybackChangedDelegate(DoOnStarted), new object[] {type, filename}); >>>>>>> GUIGraphicsContext.form.BeginInvoke(new PlaybackChangedDelegate(DoOnStarted), new object[] {type, filename}); UpdateSimilarTracks(filename); <<<<<<< ======= #region Public methods public void OnUpdateAlbumInfoCompleted(AlbumInfoRequest request, List<Song> AlbumTracks) { if (request.Equals(_lastAlbumRequest)) { GUIGraphicsContext.form.BeginInvoke(new AlbumInfoCompletedDelegate(DoUpdateAlbumInfo), new object[] {request, AlbumTracks}); } else { Log.Warn("GUIMusicPlayingNow: OnUpdateAlbumInfoCompleted: unexpected responsetype for request: {0}", request.Type); } } private void DoUpdateAlbumInfo(AlbumInfoRequest request, List<Song> AlbumTracks) { GUIListItem item = null; facadeAlbumInfo.Clear(); ToggleTopTrackRatings(false, PopularityRating.unknown); if (AlbumTracks.Count > 0) { // get total ratings float AlbumSongRating = 0; float ratingBase = 0; foreach (Song Song in AlbumTracks) { AlbumSongRating += Convert.ToSingle(Song.TimesPlayed); } // set % rating if (AlbumTracks[0].TimesPlayed > 0) { ratingBase = AlbumSongRating / Convert.ToSingle(AlbumTracks[0].TimesPlayed); } //else // ratingBase = 0.01f; // avoid division by zero AlbumSongRating = AlbumSongRating > 0 ? AlbumSongRating : 1; for (int i = 0; i < AlbumTracks.Count; i++) { float rating = 0; if (i == 0) { AlbumTracks[i].Rating = 11; } else { rating = (int)(ratingBase * Convert.ToSingle(AlbumTracks[i].TimesPlayed)); AlbumTracks[i].Rating = (int)(rating * 10 / AlbumSongRating); } item = new GUIListItem(AlbumTracks[i].ToShortString()); item.Label = AlbumTracks[i].Title; //item.Label2 = " (" + GUILocalizeStrings.Get(931) + ": " + Convert.ToString(AlbumTracks[i].TimesPlayed) + ")"; //item.Label2 = " (" + GUILocalizeStrings.Get(931) + ": " + Convert.ToString(AlbumTracks[i].Rating) + ")"; item.MusicTag = AlbumTracks[i].ToMusicTag(); item.IsPlayed = AlbumTracks[i].URL == "local" ? false : true; facadeAlbumInfo.Add(item); string currentTrackRatingProperty = "#Lastfm.Rating.AlbumTrack" + Convert.ToString(i + 1); try { GUIPropertyManager.SetProperty(currentTrackRatingProperty, Convert.ToString(AlbumTracks[i].Rating)); } catch (Exception ex) { Log.Warn("GUIMusicPlayingNow: Could not set last.fm rating - {0}", ex.Message); break; } // display 3 items only if (facadeAlbumInfo.Count == DISPLAY_LISTITEM_COUNT) { break; } } } if (facadeAlbumInfo.Count > 0) { int popularity = AlbumTracks[0].TimesPlayed; // only display stars if list is filled if (facadeAlbumInfo.Count == DISPLAY_LISTITEM_COUNT) { if (popularity > 40000) { ToggleTopTrackRatings(true, PopularityRating.famous); } else if (popularity > 10000) { ToggleTopTrackRatings(true, PopularityRating.known); } else if (popularity > 2500) { ToggleTopTrackRatings(true, PopularityRating.existent); } else { ToggleTopTrackRatings(true, PopularityRating.unknown); } } CurrentThumbFileName = GUIMusicBaseWindow.GetCoverArt(false, CurrentTrackFileName, CurrentTrackTag); if (CurrentThumbFileName.Length > 0) { // let us test if there is a larger cover art image string strLarge = Util.Utils.ConvertToLargeCoverArt(CurrentThumbFileName); if (Util.Utils.FileExistsInCache(strLarge)) { CurrentThumbFileName = strLarge; } AddImageToImagePathContainer(CurrentThumbFileName); } if (LblBestAlbumTracks != null) { LblBestAlbumTracks.Visible = true; } UpdateImagePathContainer(); // previously focus was set all the time // to maintain previous functionality set focus if // defauly skin control is present if (lblForceFocus != null) { GUIControl.FocusControl(GetID, ((int)ControlIDs.LIST_ALBUM_INFO)); } } } public void OnUpdateArtistInfoCompleted(ArtistInfoRequest request, Song song) { if (request.Equals(_lastArtistRequest)) { GUIGraphicsContext.form.BeginInvoke(new ArtistInfoCompletedDelegate(DoUpdateArtistInfo), new object[] {request, song}); } else { Log.Warn("NowPlaying.OnUpdateArtistInfoCompleted: unexpected response for request: {0}", request.Type); } } private void DoUpdateArtistInfo(ArtistInfoRequest request, Song song) { // artist tag can contain multiple artists and // will be separated by " | " so split by | then trim // so we will add one thumb for artist String[] strArtists = CurrentTrackTag.Artist.Split('|'); foreach (String strArtist in strArtists) { CurrentThumbFileName = Util.Utils.GetCoverArtName(Thumbs.MusicArtists, Util.Utils.MakeFileName(strArtist.Trim())); if (CurrentThumbFileName.Length > 0) { // let us test if there is a larger cover art image string strLarge = Util.Utils.ConvertToLargeCoverArt(CurrentThumbFileName); if (Util.Utils.FileExistsInCache(strLarge)) { CurrentThumbFileName = strLarge; } AddImageToImagePathContainer(CurrentThumbFileName); UpdateImagePathContainer(); } } } public void OnUpdateSimilarTrackInfoCompleted(TagInfoRequest request, List<Song> TagTracks) { if (request.Equals(_lastTagRequest)) { GUIGraphicsContext.form.BeginInvoke(new TagInfoCompletedDelegate(DoUpdateSimilarTrackInfo), new object[] {request, TagTracks}); } else { Log.Warn("NowPlaying.OnUpdateSimilarTrackInfoCompleted: unexpected response for request: {0}", request.Type); } } public void DoUpdateSimilarTrackInfo(TagInfoRequest request, List<Song> TagTracks) { GUIListItem item = null; { facadeSimilarTrackInfo.Clear(); for (int i = 0; i < TagTracks.Count; i++) { item = new GUIListItem(TagTracks[i].ToShortString()); item.Label = TagTracks[i].Artist + " - " + TagTracks[i].Title; //item.Label2 = " (" + GUILocalizeStrings.Get(931) + ": " + Convert.ToString(TagTracks[i].TimesPlayed) + ")"; //item.Label = TagTracks[i].Artist; //item.Label2 = TagTracks[i].Title; item.MusicTag = TagTracks[i].ToMusicTag(); facadeSimilarTrackInfo.Add(item); // display 3 items only if (facadeSimilarTrackInfo.Count == DISPLAY_LISTITEM_COUNT) { break; } } if (facadeSimilarTrackInfo.Count > 0) { if (LblBestSimilarTracks != null) { LblBestSimilarTracks.Label = GUILocalizeStrings.Get(33031) + TagTracks[0].Genre; LblBestSimilarTracks.Visible = true; } if (facadeAlbumInfo == null || facadeAlbumInfo.Count == 0) { // previously focus was set all the time // to maintain previous functionality set focus if // defauly skin control is present if (lblForceFocus != null) { GUIControl.FocusControl(GetID, ((int)ControlIDs.LIST_TAG_INFO)); } } } } } #endregion >>>>>>>
<<<<<<< ======= using System.Linq; using System.Diagnostics; >>>>>>> using System.Diagnostics;
<<<<<<< GUI_MSG_SKIN_CHANGED = 101, ======= GUI_MSG_VIDEOINFO_REFRESH = 101, >>>>>>> GUI_MSG_VIDEOINFO_REFRESH = 101, GUI_MSG_SKIN_CHANGED = 101,
<<<<<<< // TODO - if theme is dark increase brightness of syntax highlights //_editor.ChangeColorBrightness(1.25); _editor.SetSyntaxHighlightColorTheme(_options.Theme); ======= >>>>>>> // TODO - if theme is dark increase brightness of syntax highlights //_editor.ChangeColorBrightness(1.25); _editor.SetSyntaxHighlightColorTheme(_options.Theme); <<<<<<< public void Handle(UpdateGlobalOptions message) { UpdateTheme(); } public void UpdateTheme() { NotifyOfPropertyChange(() => AvalonDockTheme); _editor?.SetSyntaxHighlightColorTheme(_options.Theme); } ======= public void Handle(SelectedModelChangedEvent message) { // if there is not a running trace exit here if (_tracer == null) return; if (_tracer.Status != QueryTraceStatus.Started ) return; // reconnect any running traces to pick up the initial catalog property try { IsTraceChanging = true; _eventAggregator.PublishOnUIThreadAsync(new OutputMessage(MessageType.Information, $"Reconfiguring trace for database: {message.Document.SelectedDatabase}")); _tracer.Update(message.Document.SelectedDatabase); } finally { IsTraceChanging = false; } } >>>>>>> public void Handle(UpdateGlobalOptions message) { UpdateTheme(); } public void UpdateTheme() { NotifyOfPropertyChange(() => AvalonDockTheme); _editor?.SetSyntaxHighlightColorTheme(_options.Theme); } public void Handle(SelectedModelChangedEvent message) { // if there is not a running trace exit here if (_tracer == null) return; if (_tracer.Status != QueryTraceStatus.Started ) return; // reconnect any running traces to pick up the initial catalog property try { IsTraceChanging = true; _eventAggregator.PublishOnUIThreadAsync(new OutputMessage(MessageType.Information, $"Reconfiguring trace for database: {message.Document.SelectedDatabase}")); _tracer.Update(message.Document.SelectedDatabase); } finally { IsTraceChanging = false; } }
<<<<<<< // Handle this message here needed for madVR if (Windowed || !_ignoreFullscreenResolutionChanges) { OnDisplayChange(ref msg); PluginManager.WndProc(ref msg); } // Restore bounds from the currentScreen value (to restore original startup MP screen after turned off used HDMI device if (!Windowed && _ignoreFullscreenResolutionChanges && !RefreshRateChanger.RefreshRateChangePending) { if (GUIGraphicsContext.InVmr9Render) { if (GUIGraphicsContext.VideoRenderer == GUIGraphicsContext.VideoRendererType.madVR) { // Need to break here to have the correct new bounds for madVR when resolution change and when playing break; } } SetBounds(GUIGraphicsContext.currentScreen.Bounds.X, GUIGraphicsContext.currentScreen.Bounds.Y, GUIGraphicsContext.currentScreen.Bounds.Width, GUIGraphicsContext.currentScreen.Bounds.Height); Log.Debug("Main: WM_DISPLAYCHANGE restore current screen position"); } // Restore GUIGraphicsContext.State if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.SUSPENDING) { GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.RUNNING; } // enable event handlers if (GUIGraphicsContext.DX9Device != null) { GUIGraphicsContext.DX9Device.DeviceLost += OnDeviceLost; } // FCU Workaround _forceMpAlive = true; ForceMpAlive(); break; // handle device changes case WM_DEVICECHANGE: OnDeviceChange(ref msg); PluginManager.WndProc(ref msg); ======= // handle device changes case WM_DEVICECHANGE: OnDeviceChange(ref msg); PluginManager.WndProc(ref msg); >>>>>>> // Handle this message here needed for madVR OnDeviceChange(ref msg); PluginManager.WndProc(ref msg); // Restore bounds from the currentScreen value (to restore original startup MP screen after turned off used HDMI device if (!Windowed && _ignoreFullscreenResolutionChanges && !RefreshRateChanger.RefreshRateChangePending) { if (GUIGraphicsContext.InVmr9Render) { if (GUIGraphicsContext.VideoRenderer == GUIGraphicsContext.VideoRendererType.madVR) { // Need to break here to have the correct new bounds for madVR when resolution change and when playing break; } } SetBounds(GUIGraphicsContext.currentScreen.Bounds.X, GUIGraphicsContext.currentScreen.Bounds.Y, GUIGraphicsContext.currentScreen.Bounds.Width, GUIGraphicsContext.currentScreen.Bounds.Height); Log.Debug("Main: WM_DISPLAYCHANGE restore current screen position"); } // Restore GUIGraphicsContext.State if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.SUSPENDING) { GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.RUNNING; } // enable event handlers if (GUIGraphicsContext.DX9Device != null) { GUIGraphicsContext.DX9Device.DeviceLost += OnDeviceLost; } // FCU Workaround _forceMpAlive = true; ForceMpAlive(); break; // handle device changes case WM_DEVICECHANGE: OnDeviceChange(ref msg); PluginManager.WndProc(ref msg); <<<<<<< if ( (deviceInterface.dbcc_classguid == KSCATEGORY_VIDEO || deviceInterface.dbcc_classguid == KSCATEGORY_SCREEN || deviceInterface.dbcc_classguid == KSCATEGORY_DISPLAY_ADAPTER) && (Windowed || !_ignoreFullscreenResolutionChanges) ) ======= if ( (deviceInterface.dbcc_classguid == KSCATEGORY_VIDEO || deviceInterface.dbcc_classguid == KSCATEGORY_SCREEN) && (Windowed || !_ignoreFullscreenResolutionChanges) ) >>>>>>> if ( (deviceInterface.dbcc_classguid == KSCATEGORY_VIDEO || deviceInterface.dbcc_classguid == KSCATEGORY_SCREEN || deviceInterface.dbcc_classguid == KSCATEGORY_DISPLAY_ADAPTER) && (Windowed || !_ignoreFullscreenResolutionChanges) )
<<<<<<< { Log.Debug("VideodatabaseSqllite AddFile:{0}", strFileName); // GetMediaInfoThread and starting to play a file can run simultaneously and both of them use addfile method lock (typeof(VideoDatabaseSqlLite)) { if (m_db == null) { return -1; } try { int lFileId = -1; strFileName = strFileName.Trim(); string strSQL = String.Format("SELECT * FROM files WHERE idmovie={0} AND idpath={1} AND strFileName LIKE '{2}'", lMovieId, lPathId, strFileName); SQLiteResultSet results = m_db.Execute(strSQL); if (results != null && results.Rows.Count > 0) { Int32.TryParse(DatabaseUtility.Get(results, 0, "idFile"), out lFileId); CheckMediaInfo(strFileName, string.Empty, lPathId, lFileId, false); return lFileId; } strSQL = String.Format("INSERT INTO files (idFile, idMovie,idPath, strFileName) VALUES(null, {0},{1},'{2}')", lMovieId, lPathId, strFileName); results = m_db.Execute(strSQL); lFileId = m_db.LastInsertID(); CheckMediaInfo(strFileName, string.Empty, lPathId, lFileId, false); Log.Debug("VideodatabaseSqllite Finished AddFile:{0}", strFileName); return lFileId; } catch (Exception ex) { Log.Error("videodatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); Open(); } return -1; ======= { if (m_db == null) { return -1; } try { int lFileId = -1; strFileName = strFileName.Trim(); string strSQL = String.Format("SELECT * FROM files WHERE idmovie={0} AND idpath={1} AND strFileName = '{2}'", lMovieId, lPathId, strFileName); SQLiteResultSet results = m_db.Execute(strSQL); if (results != null && results.Rows.Count > 0) { Int32.TryParse(DatabaseUtility.Get(results, 0, "idFile"), out lFileId); CheckMediaInfo(strFileName, string.Empty, lPathId, lFileId, false); return lFileId; } strSQL = String.Format("INSERT INTO files (idFile, idMovie,idPath, strFileName) VALUES(null, {0},{1},'{2}')", lMovieId, lPathId, strFileName); results = m_db.Execute(strSQL); lFileId = m_db.LastInsertID(); CheckMediaInfo(strFileName, string.Empty, lPathId, lFileId, false); return lFileId; } catch (Exception ex) { Log.Error("videodatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); Open(); >>>>>>> { Log.Debug("VideodatabaseSqllite AddFile:{0}", strFileName); // GetMediaInfoThread and starting to play a file can run simultaneously and both of them use addfile method lock (typeof(VideoDatabaseSqlLite)) { if (m_db == null) { return -1; } try { int lFileId = -1; strFileName = strFileName.Trim(); string strSQL = String.Format("SELECT * FROM files WHERE idmovie={0} AND idpath={1} AND strFileName = '{2}'", lMovieId, lPathId, strFileName); SQLiteResultSet results = m_db.Execute(strSQL); if (results != null && results.Rows.Count > 0) { Int32.TryParse(DatabaseUtility.Get(results, 0, "idFile"), out lFileId); CheckMediaInfo(strFileName, string.Empty, lPathId, lFileId, false); return lFileId; } strSQL = String.Format("INSERT INTO files (idFile, idMovie,idPath, strFileName) VALUES(null, {0},{1},'{2}')", lMovieId, lPathId, strFileName); results = m_db.Execute(strSQL); lFileId = m_db.LastInsertID(); CheckMediaInfo(strFileName, string.Empty, lPathId, lFileId, false); Log.Debug("VideodatabaseSqllite Finished AddFile:{0}", strFileName); return lFileId; } catch (Exception ex) { Log.Error("videodatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); Open(); } return -1;
<<<<<<< //Refreshes the VM counter in the status bar private void VMCountRefresh() { int runningVMs = 0; int pausedVMs = 0; int waitingVMs = 0; int stoppedVMs = 0; foreach(ListViewItem lvi in lstVMs.Items) { VM vm = (VM)lvi.Tag; switch (vm.Status) { case VM.STATUS_PAUSED: pausedVMs++; break; case VM.STATUS_RUNNING: runningVMs++; break; case VM.STATUS_STOPPED: stoppedVMs++; break; case VM.STATUS_WAITING: waitingVMs++; break; } } lblVMCount.Text = "Total VMs: " + lstVMs.Items.Count + " | Running: " + runningVMs + " | Paused: " + pausedVMs + " | Waiting: " + waitingVMs + " | Stopped: " + stoppedVMs; } ======= private void openConfigFileToolStripMenuItem_Click(object sender, EventArgs e) { VMOpenConfig(); } private void VMOpenConfig() { foreach (ListViewItem lvi in lstVMs.SelectedItems) { VM vm = (VM)lvi.Tag; try { Process.Start(vm.Path + Path.DirectorySeparatorChar + "86box.cfg"); } catch (Exception ex) { MessageBox.Show("The config file for the virtual machine \"" + vm.Name + "\" could not be opened. Make sure it still exists and that you have sufficient privileges to access it.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } >>>>>>> //Refreshes the VM counter in the status bar private void VMCountRefresh() { int runningVMs = 0; int pausedVMs = 0; int waitingVMs = 0; int stoppedVMs = 0; foreach(ListViewItem lvi in lstVMs.Items) { VM vm = (VM)lvi.Tag; switch (vm.Status) { case VM.STATUS_PAUSED: pausedVMs++; break; case VM.STATUS_RUNNING: runningVMs++; break; case VM.STATUS_STOPPED: stoppedVMs++; break; case VM.STATUS_WAITING: waitingVMs++; break; } } lblVMCount.Text = "Total VMs: " + lstVMs.Items.Count + " | Running: " + runningVMs + " | Paused: " + pausedVMs + " | Waiting: " + waitingVMs + " | Stopped: " + stoppedVMs; } private void openConfigFileToolStripMenuItem_Click(object sender, EventArgs e) { VMOpenConfig(); } private void VMOpenConfig() { foreach (ListViewItem lvi in lstVMs.SelectedItems) { VM vm = (VM)lvi.Tag; try { Process.Start(vm.Path + Path.DirectorySeparatorChar + "86box.cfg"); } catch (Exception ex) { MessageBox.Show("The config file for the virtual machine \"" + vm.Name + "\" could not be opened. Make sure it still exists and that you have sufficient privileges to access it.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
<<<<<<< ======= using System.Web; >>>>>>> <<<<<<< ======= using TeleSharp.TL.Channels; using TeleSharp.TL.Contacts; using TeleSharp.TL.Messages; using TeleSharp.TL.Upload; >>>>>>> using TeleSharp.TL.Upload; <<<<<<< ======= using TLSharp.Core.Auth; using TLSharp.Core.MTProto; using TLSharp.Core.Network; using TLSharp.Core.Requests; using TLSharp.Core.Utils; >>>>>>> using TLSharp.Core.Requests; using TLSharp.Core.Utils;
<<<<<<< //Application.Current.LoadRibbonTheme(); ======= _inputBindings = new InputBindings(_window); _inputBindings.RegisterCommands(GetInputBindingCommands()); } private IEnumerable<InputBindingCommand> GetInputBindingCommands() { yield return new InputBindingCommand(this, "CommentSelection", "Ctrl+Alt C"); >>>>>>> //Application.Current.LoadRibbonTheme(); _inputBindings = new InputBindings(_window); _inputBindings.RegisterCommands(GetInputBindingCommands()); } private IEnumerable<InputBindingCommand> GetInputBindingCommands() { yield return new InputBindingCommand(this, "CommentSelection", "Ctrl+Alt C");
<<<<<<< { const int DefaultMaxNrOfPages = 10; const string DefaultPageRouteValueKey = "page"; public RouteValueDictionary RouteValues { get; internal set; } ======= { public static class DefaultDefaults { public const int MaxNrOfPages = 10; public const string DisplayTemplate = null; public const bool AlwaysAddFirstPageNumber = false; } public static class Defaults { public static int MaxNrOfPages = DefaultDefaults.MaxNrOfPages; public static string DisplayTemplate = DefaultDefaults.DisplayTemplate; public static bool AlwaysAddFirstPageNumber = DefaultDefaults.AlwaysAddFirstPageNumber; public static void ResetToDefaults() { MaxNrOfPages = DefaultDefaults.MaxNrOfPages; DisplayTemplate = DefaultDefaults.DisplayTemplate; AlwaysAddFirstPageNumber = DefaultDefaults.AlwaysAddFirstPageNumber; } } public RouteValueDictionary RouteValues { get; internal set; } >>>>>>> { public static class DefaultDefaults { public const int MaxNrOfPages = 10; public const string DisplayTemplate = null; public const bool AlwaysAddFirstPageNumber = false; } const string DefaultPageRouteValueKey = "page"; public static class Defaults { public static int MaxNrOfPages = DefaultDefaults.MaxNrOfPages; public static string DisplayTemplate = DefaultDefaults.DisplayTemplate; public static bool AlwaysAddFirstPageNumber = DefaultDefaults.AlwaysAddFirstPageNumber; public static void ResetToDefaults() { MaxNrOfPages = DefaultDefaults.MaxNrOfPages; DisplayTemplate = DefaultDefaults.DisplayTemplate; AlwaysAddFirstPageNumber = DefaultDefaults.AlwaysAddFirstPageNumber; } } public RouteValueDictionary RouteValues { get; internal set; } <<<<<<< this.RouteValues = new RouteValueDictionary(); MaxNrOfPages = DefaultMaxNrOfPages; PageRouteValueKey = DefaultPageRouteValueKey; ======= RouteValues = new RouteValueDictionary(); DisplayTemplate = Defaults.DisplayTemplate; MaxNrOfPages = Defaults.MaxNrOfPages; AlwaysAddFirstPageNumber = Defaults.AlwaysAddFirstPageNumber; >>>>>>> RouteValues = new RouteValueDictionary(); DisplayTemplate = Defaults.DisplayTemplate; MaxNrOfPages = Defaults.MaxNrOfPages; AlwaysAddFirstPageNumber = Defaults.AlwaysAddFirstPageNumber; PageRouteValueKey = DefaultPageRouteValueKey;
<<<<<<< public static int Run(string? project, string? workspace, string? msbuildPath, string? tfm, bool forceWebConversion, bool allowPreviews, bool diffOnly, bool noBackup, bool keepCurrentTfms) ======= public static int Run(string? project, string? workspace, string? msbuildPath, string? tfm, bool preview, bool diffOnly, bool noBackup, bool keepCurrentTfms) >>>>>>> public static int Run(string? project, string? workspace, string? msbuildPath, string? tfm, bool forceWebConversion, bool preview, bool diffOnly, bool noBackup, bool keepCurrentTfms) <<<<<<< var msbuildWorkspace = workspaceLoader.LoadWorkspace(workspacePath, noBackup, forceWebConversion); ======= var msbuildWorkspace = workspaceLoader.LoadWorkspace(workspacePath, noBackup, tfm, keepCurrentTfms); if (msbuildWorkspace.WorkspaceItems.Length is 0) { Console.WriteLine("No projects converted."); return 0; } >>>>>>> var msbuildWorkspace = workspaceLoader.LoadWorkspace(workspacePath, noBackup, tfm, keepCurrentTfms, forceWebConversion); if (msbuildWorkspace.WorkspaceItems.Length is 0) { Console.WriteLine("No projects converted."); return 0; }
<<<<<<< success = matches[0].Value.TryParseFloat(out from); to = from; } else if (matches.Count > 2) { Log.Warn($"Too many floats in property {cell.InnerHtml}"); continue; } else if (numbersReplaced.Contains("#-#") || numbersReplaced.Contains("(# to #)")) { success = matches[0].Value.TryParseFloat(out from) & matches[1].Value.TryParseFloat(out to); } else { Log.Warn($"Unknown format in property {cell.InnerHtml}"); continue; } if (content.EndsWith("%")) { name += " %"; ======= case 0: Log.Warn($"No floats in property {combined}"); continue; case 1: success = TryParseFloat(matches[0].Value, out from); to = from; break; case 2: success = TryParseFloat(matches[0].Value, out from) & TryParseFloat(matches[1].Value, out to); break; default: Log.Warn($"Too many floats in property {combined}"); continue; >>>>>>> case 0: Log.Warn($"No floats in property {combined}"); continue; case 1: success = matches[0].Value.TryParseFloat(out from); to = from; break; case 2: success = matches[0].Value.TryParseFloat(out from) & matches[1].Value.TryParseFloat(out to); break; default: Log.Warn($"Too many floats in property {combined}"); continue; <<<<<<< private static string FindContent(HtmlNode cell) { while (cell.InnerHtml.Contains("<")) { cell = cell.FirstChild; } return cell.InnerHtml; } private static bool IsNotApplicableCell(HtmlNode cell) { return cell.GetAttributeValue("class", "").Contains("table-na"); } private static int ParseCell(HtmlNode cell, int @default) { if (IsNotApplicableCell(cell)) return @default; int value; return cell.InnerHtml.TryParseInt(out value) ? value : @default; } private static HtmlNode GetCell(HtmlNode row, int index) { return row.ChildNodes[index]; } ======= >>>>>>>
<<<<<<< using DaxStudio.UI.JsonConverters; using DaxStudio.UI.Utils; ======= using System.Windows.Media; >>>>>>> using DaxStudio.UI.JsonConverters; using DaxStudio.UI.Utils; using System.Windows.Media;
<<<<<<< skillNode.passivePointsGranted, new NodePosition(skillNode.Position.X, skillNode.Position.Y), skillNode.attributes); ======= skillNode.PassivePointsGranted, skillNode.StatDefinitions); >>>>>>> skillNode.PassivePointsGranted, new NodePosition(skillNode.Position.X, skillNode.Position.Y), skillNode.StatDefinitions);
<<<<<<< public List<string[]> CustomGroups { get; set; } ======= public AscendantAdditionalStart AscendantAdditionalStart { get; set; } >>>>>>> public List<string[]> CustomGroups { get; set; } public AscendantAdditionalStart AscendantAdditionalStart { get; set; } <<<<<<< CustomGroups = new List<string[]>(build.CustomGroups) ======= AscendantAdditionalStart = build.AscendantAdditionalStart >>>>>>> CustomGroups = new List<string[]>(build.CustomGroups) AscendantAdditionalStart = build.AscendantAdditionalStart
<<<<<<< } private void ScreenShot_Click(object sender, RoutedEventArgs e) { const int maxsize = 3000; Rect2D contentBounds = _tree.picActiveLinks.ContentBounds; contentBounds *= 1.2; double aspect = contentBounds.Width / contentBounds.Height; double xmax = contentBounds.Width; double ymax = contentBounds.Height; if (aspect > 1 && xmax > maxsize) { xmax = maxsize; ymax = xmax / aspect; } if (aspect < 1 & ymax > maxsize) { ymax = maxsize; xmax = ymax * aspect; } _clipboardBmp = new RenderTargetBitmap((int) xmax, (int) ymax, 96, 96, PixelFormats.Pbgra32); var db = new VisualBrush(_tree.SkillTreeVisual); db.ViewboxUnits = BrushMappingMode.Absolute; db.Viewbox = contentBounds; var dw = new DrawingVisual(); using (DrawingContext dc = dw.RenderOpen()) { dc.DrawRectangle(db, null, new Rect(0, 0, xmax, ymax)); } _clipboardBmp.Render(dw); _clipboardBmp.Freeze(); Clipboard.SetImage(_clipboardBmp); recSkillTree.Fill = new VisualBrush(_tree.SkillTreeVisual); ======= else { if (File.Exists("savedBuilds")) { File.Delete("savedBuilds"); } } } private void ScreenShot_Click(object sender, RoutedEventArgs e) { const int maxsize = 3000; Rect2D contentBounds = _tree.picActiveLinks.ContentBounds; contentBounds *= 1.2; if (!double.IsNaN(contentBounds.Width) && !double.IsNaN(contentBounds.Height)) { double aspect = contentBounds.Width / contentBounds.Height; double xmax = contentBounds.Width; double ymax = contentBounds.Height; if (aspect > 1 && xmax > maxsize) { xmax = maxsize; ymax = xmax / aspect; } if (aspect < 1 & ymax > maxsize) { ymax = maxsize; xmax = ymax * aspect; } _clipboardBmp = new RenderTargetBitmap((int)xmax, (int)ymax, 96, 96, PixelFormats.Pbgra32); var db = new VisualBrush(_tree.SkillTreeVisual); db.ViewboxUnits = BrushMappingMode.Absolute; db.Viewbox = contentBounds; var dw = new DrawingVisual(); using (DrawingContext dc = dw.RenderOpen()) { dc.DrawRectangle(db, null, new Rect(0, 0, xmax, ymax)); } _clipboardBmp.Render(dw); _clipboardBmp.Freeze(); Clipboard.SetImage(_clipboardBmp); recSkillTree.Fill = new VisualBrush(_tree.SkillTreeVisual); } >>>>>>> } private void ScreenShot_Click(object sender, RoutedEventArgs e) { const int maxsize = 3000; Rect2D contentBounds = _tree.picActiveLinks.ContentBounds; contentBounds *= 1.2; if (!double.IsNaN(contentBounds.Width) && !double.IsNaN(contentBounds.Height)) { double aspect = contentBounds.Width / contentBounds.Height; double xmax = contentBounds.Width; double ymax = contentBounds.Height; if (aspect > 1 && xmax > maxsize) { xmax = maxsize; ymax = xmax / aspect; } if (aspect < 1 & ymax > maxsize) { ymax = maxsize; xmax = ymax * aspect; } _clipboardBmp = new RenderTargetBitmap((int)xmax, (int)ymax, 96, 96, PixelFormats.Pbgra32); var db = new VisualBrush(_tree.SkillTreeVisual); db.ViewboxUnits = BrushMappingMode.Absolute; db.Viewbox = contentBounds; var dw = new DrawingVisual(); using (DrawingContext dc = dw.RenderOpen()) { dc.DrawRectangle(db, null, new Rect(0, 0, xmax, ymax)); } _clipboardBmp.Render(dw); _clipboardBmp.Freeze(); Clipboard.SetImage(_clipboardBmp); recSkillTree.Fill = new VisualBrush(_tree.SkillTreeVisual); } <<<<<<< #region Theme private void mnuSetTheme_Click(object sender, RoutedEventArgs e) ======= private void TextBlock_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { string selectedAttr = Regex.Replace(Regex.Match(listBox1.SelectedItem.ToString(), @"(?!\d)\w.*\w").Value.Replace(@"+", @"\+").Replace(@"-", @"\-").Replace(@"%", @"\%"), @"\d+", @"\d+"); _tree.HighlightNodes(selectedAttr, true, Brushes.Azure); } private void mnuSetTheme_Click(object sender, RoutedEventArgs e) >>>>>>> private void TextBlock_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { string selectedAttr = Regex.Replace(Regex.Match(listBox1.SelectedItem.ToString(), @"(?!\d)\w.*\w").Value.Replace(@"+", @"\+").Replace(@"-", @"\-").Replace(@"%", @"\%"), @"\d+", @"\d+"); _tree.HighlightNodes(selectedAttr, true, Brushes.Azure); } #region Theme private void mnuSetTheme_Click(object sender, RoutedEventArgs e)
<<<<<<< ======= using System.Text.RegularExpressions; using Raven.Json.Linq; >>>>>>> using System.Text.RegularExpressions; <<<<<<< using Newtonsoft.Json.Linq; ======= using POESKillTree.Localization; >>>>>>> using POESKillTree.Localization; using Newtonsoft.Json.Linq; <<<<<<< string url = ((JObject)assets[0])["browser_download_url"].Value<string>(); ======= // Check if it is pre-release and we want to update to it. bool prerelease = release["prerelease"].Value<bool>(); if (prerelease && !Prerelease) continue; // Found unwanted pre-release, ignore it. >>>>>>> // Check if it is pre-release and we want to update to it. bool prerelease = release["prerelease"].Value<bool>(); if (prerelease && !Prerelease) continue; // Found unwanted pre-release, ignore it.
<<<<<<< Hand = item.Class == ItemClass.MainHand ? WeaponHand.Main : WeaponHand.Off; ======= >>>>>>> <<<<<<< MainHand = new Weapon(Items.Find(i => i.Class == ItemClass.MainHand)); OffHand = new Weapon(Items.Find(i => i.Class == ItemClass.OffHand)); ======= MainHand = new Weapon(WeaponHand.Main, Items.Find(i => i.Class == Item.ItemClass.MainHand)); OffHand = new Weapon(WeaponHand.Off, Items.Find(i => i.Class == Item.ItemClass.OffHand)); >>>>>>> MainHand = new Weapon(WeaponHand.Main, Items.Find(i => i.Class == ItemClass.MainHand)); OffHand = new Weapon(WeaponHand.Off, Items.Find(i => i.Class == ItemClass.OffHand));
<<<<<<< { "for each blinded enemy hit by this weapon", (And(ModifierSourceIs(ItemSlot.MainHand), MainHandAttack, Hit.On, Buff.Blind.IsOn(Enemy)), And(ModifierSourceIs(ItemSlot.OffHand), OffHandAttack, Hit.On, Buff.Blind.IsOn(Enemy))) }, ======= { "on hit no more than once every # seconds", Hit.On }, >>>>>>> { "for each blinded enemy hit by this weapon", (And(ModifierSourceIs(ItemSlot.MainHand), MainHandAttack, Hit.On, Buff.Blind.IsOn(Enemy)), And(ModifierSourceIs(ItemSlot.OffHand), OffHandAttack, Hit.On, Buff.Blind.IsOn(Enemy))) }, { "on hit no more than once every # seconds", Hit.On }, <<<<<<< { "when you use a skill", Skills.AllSkills.Cast.On }, ======= { "when you use a fire skill", Skills[Fire].Cast.On }, >>>>>>> { "when you use a skill", Skills.AllSkills.Cast.On }, { "when you use a fire skill", Skills[Fire].Cast.On }, <<<<<<< { "on use", Action.Unique("When your use the Flask").On }, { "when you use a flask", Action.Unique("When your use any Flask").On }, ======= { "on use", Action.Unique("When your use the Flask").On }, { "when you gain Adrenaline", Action.Unique("When you gain Adrenaline").On }, >>>>>>> { "on use", Action.Unique("When your use the Flask").On }, { "when you use a flask", Action.Unique("When your use any Flask").On }, { "when you gain Adrenaline", Action.Unique("When you gain Adrenaline").On }, <<<<<<< ======= { "(every|each) second(, up to a maximum of #)?", Action.Unique("Interval.OneSecond").On }, { "every 2 seconds(, up to a maximum of #)?", Action.Unique("Interval.TwoSeconds").On }, >>>>>>> { "(every|each) second(, up to a maximum of #)?", Action.Unique("Interval.OneSecond").On }, { "every 2 seconds(, up to a maximum of #)?", Action.Unique("Interval.TwoSeconds").On },
<<<<<<< using Ionic.Zip; ======= using Microsoft.Win32; using Raven.Json.Linq; >>>>>>> using Microsoft.Win32; <<<<<<< using Newtonsoft.Json.Linq; ======= using POESKillTree.Utils; >>>>>>> using Newtonsoft.Json.Linq; using POESKillTree.Utils; <<<<<<< // Find PoESkillTree ZIP package. JObject zipAsset = null; foreach (JObject asset in assets) ======= // Find release package. string fileName = null; RavenJObject pkgAsset = null; foreach (RavenJObject asset in assets) >>>>>>> // Find release package. JObject pkgAsset = null; foreach (JObject asset in assets)
<<<<<<< using System.Diagnostics; ======= using POESKillTree.Utils; >>>>>>> using System.Diagnostics; using POESKillTree.Utils; <<<<<<< #if DEBUG Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); #endif steinerSolver.InitializeSolver(targetNodes); #if DEBUG stopwatch.Stop(); Console.WriteLine("Initialization took " + stopwatch.ElapsedMilliseconds + " ms\n-----------------"); #endif ======= steinerSolver.InitializeSolver(targetNodes, nodesToOmit); >>>>>>> #if DEBUG Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); #endif steinerSolver.InitializeSolver(targetNodes, nodesToOmit); #if DEBUG stopwatch.Stop(); Console.WriteLine("Initialization took " + stopwatch.ElapsedMilliseconds + " ms\n-----------------"); #endif
<<<<<<< using Sidekick.Core.DependencyInjection.Services; using Sidekick.Core.Loggers; ======= using Sidekick.Business.Loggers; >>>>>>> using Sidekick.Core.Loggers;
<<<<<<< public event Func<Task> OnCloseWindow; public event Func<Task> OnPriceCheck; public event Func<Task> OnHideout; public event Func<Task> OnItemWiki; public event Func<Task> OnFindItems; public event Func<Task> OnLeaveParty; public event Func<Task> OnOpenSearch; public event Func<Task> OnOpenLeagueOverview; public event Func<Task> OnWhisperReply; ======= public event Func<Task<bool>> OnCloseWindow; public event Func<Task<bool>> OnPriceCheck; public event Func<Task<bool>> OnHideout; public event Func<Task<bool>> OnItemWiki; public event Func<Task<bool>> OnFindItems; public event Func<Task<bool>> OnLeaveParty; public event Func<Task<bool>> OnOpenSearch; public event Func<Task<bool>> OnOpenLeagueOverview; >>>>>>> public event Func<Task<bool>> OnCloseWindow; public event Func<Task<bool>> OnPriceCheck; public event Func<Task<bool>> OnHideout; public event Func<Task<bool>> OnItemWiki; public event Func<Task<bool>> OnFindItems; public event Func<Task<bool>> OnLeaveParty; public event Func<Task<bool>> OnOpenSearch; public event Func<Task<bool>> OnOpenLeagueOverview; public event Func<Task<bool>> OnWhisperReply; <<<<<<< keybindFound = true; logger.Log("Keybind for opening the item wiki triggered."); if (OnItemWiki != null) Task.Run(OnItemWiki); } else if (input == configuration.Key_GoToHideout) { keybindFound = true; logger.Log("Keybind for going to the hideout triggered."); if (OnHideout != null) Task.Run(OnHideout); } else if (input == configuration.Key_FindItems) { keybindFound = true; logger.Log("Keybind for finding the item triggered."); if (OnFindItems != null) Task.Run(OnFindItems); } else if (input == configuration.Key_LeaveParty) { keybindFound = true; logger.Log("Keybind for leaving the party triggered."); if (OnLeaveParty != null) Task.Run(OnLeaveParty); } else if (input == configuration.Key_OpenSearch) { keybindFound = true; logger.Log("Keybind for opening the search triggered."); if (OnOpenSearch != null) Task.Run(OnOpenSearch); } else if (input == configuration.Key_OpenLeagueOverview) { keybindFound = true; logger.Log("Keybind for opening the league overview triggered."); if (OnOpenLeagueOverview != null) Task.Run(OnOpenLeagueOverview); } else if(input == configuration.Key_ReplyToLatestWhisper) { keybindFound = true; logger.Log("Keybind for replying to most recent whisper triggered."); if (OnWhisperReply != null) Task.Run(OnWhisperReply); } } Task.Run(async () => { await Task.Delay(500); Enabled = true; }); // We need to make sure some key combinations make it into the game no matter what if (keybindFound) { keybindFound = input != "Ctrl+F"; ======= if (!await task) { Enabled = false; nativeKeyboard.SendInput(keybind); await Task.Delay(200); Enabled = true; } }); >>>>>>> if (!await task) { Enabled = false; nativeKeyboard.SendInput(keybind); await Task.Delay(200); Enabled = true; } });
<<<<<<< pattern = increasedPattern.Replace(pattern, $"(?:{languageProvider.Language.ModifierReduced}|{languageProvider.Language.ModifierIncreased})"); ======= pattern = hashPattern.Replace(pattern, "([-+\\d,\\.]+)"); >>>>>>> pattern = increasedPattern.Replace(pattern, $"(?:{languageProvider.Language.ModifierReduced}|{languageProvider.Language.ModifierIncreased})"); <<<<<<< if (entry.Option == null || entry.Option.Options == null || entry.Option.Options.Count == 0) { pattern = hashPattern.Replace(pattern, "([-+\\d,\\.]+)"); } else { foreach (var option in entry.Option.Options) { option.Pattern = new Regex($"(?:^|\\n){hashPattern.Replace(pattern, Regex.Escape(option.Text))}{suffix}", RegexOptions.None); } pattern = hashPattern.Replace(pattern, "(.*)"); } ======= if (IncreasedPattern.IsMatch(pattern)) { var negativePattern = IncreasedPattern.Replace(pattern, languageProvider.Language.ModifierReduced); entry.NegativePattern = new Regex($"(?:^|\\n){negativePattern}{suffix}", RegexOptions.None); } >>>>>>> if (entry.Option == null || entry.Option.Options == null || entry.Option.Options.Count == 0) { pattern = hashPattern.Replace(pattern, "([-+\\d,\\.]+)"); } else { foreach (var option in entry.Option.Options) { option.Pattern = new Regex($"(?:^|\\n){hashPattern.Replace(pattern, Regex.Escape(option.Text))}{suffix}", RegexOptions.None); } pattern = hashPattern.Replace(pattern, "(.*)"); } if (IncreasedPattern.IsMatch(pattern)) { var negativePattern = IncreasedPattern.Replace(pattern, languageProvider.Language.ModifierReduced); entry.NegativePattern = new Regex($"(?:^|\\n){negativePattern}{suffix}", RegexOptions.None); } <<<<<<< if (x.Option?.Options?.Any() == true) { var optionMod = x.Option.Options.SingleOrDefault(x => x.Pattern.IsMatch(text)); if (optionMod == null) { continue; } modifier.OptionValue = optionMod; modifier.Text = ParseHashPattern.Replace(modifier.Text, optionMod.Text, 1); } mods.Add(modifier); ======= >>>>>>> 4 if (x.Option?.Options?.Any() == true) { var optionMod = x.Option.Options.SingleOrDefault(x => x.Pattern.IsMatch(text)); if (optionMod == null) { continue; } modifier.OptionValue = optionMod; modifier.Text = ParseHashPattern.Replace(modifier.Text, optionMod.Text, 1); } mods.Add(modifier);
<<<<<<< ======= using System; using Sidekick.Helpers.POEPriceInfoAPI; >>>>>>> using Sidekick.Helpers.POEPriceInfoAPI; <<<<<<< menuItem.Click += (s, e) => { TradeClient.SelectedLeague = league; }; ======= menuItem.Click += (s, e) => { TradeClient.SelectedLeague = l; PriceInfoClient.SelectedLeague = l; }; >>>>>>> menuItem.Click += (s, e) => { TradeClient.SelectedLeague = league; };
<<<<<<< services.AddSingleton<OverlayController>(); services.AddSingleton<OverlayWindow>(); services.AddSingleton<AdvancedSearchController>(); ======= >>>>>>> services.AddSingleton<AdvancedSearchController>();
<<<<<<< event Func<Task> OnCloseWindow; event Func<Task> OnPriceCheck; event Func<Task> OnHideout; event Func<Task> OnItemWiki; event Func<Task> OnFindItems; event Func<Task> OnLeaveParty; event Func<Task> OnOpenSearch; event Func<Task> OnOpenLeagueOverview; event Func<Task> OnWhisperReply; ======= event Func<Task<bool>> OnCloseWindow; event Func<Task<bool>> OnPriceCheck; event Func<Task<bool>> OnHideout; event Func<Task<bool>> OnItemWiki; event Func<Task<bool>> OnFindItems; event Func<Task<bool>> OnLeaveParty; event Func<Task<bool>> OnOpenSearch; event Func<Task<bool>> OnOpenLeagueOverview; >>>>>>> event Func<Task<bool>> OnCloseWindow; event Func<Task<bool>> OnPriceCheck; event Func<Task<bool>> OnHideout; event Func<Task<bool>> OnItemWiki; event Func<Task<bool>> OnFindItems; event Func<Task<bool>> OnLeaveParty; event Func<Task<bool>> OnOpenSearch; event Func<Task<bool>> OnOpenLeagueOverview; event Func<Task<bool>> OnWhisperReply;
<<<<<<< ======= using Sidekick.Helpers.POETradeAPI.Models; using Sidekick.Helpers.Localization; using Sidekick.Helpers.POETradeAPI; using Sidekick.Helpers.POEPriceInfoAPI; >>>>>>> using Sidekick.Helpers.POEPriceInfoAPI; <<<<<<< if (hasNote) { ((EquippableItem)item).Influence = GetInfluenceType(lines[lines.Length - 3]); } else { ((EquippableItem)item).Influence = GetInfluenceType(lines.LastOrDefault()); } ======= var influence = GetInfluenceType(lines.LastOrDefault()); // TODO Check multiple influences and corrupted influences ((EquippableItem)item).Influence = influence; >>>>>>> if (hasNote) { ((EquippableItem)item).Influence = GetInfluenceType(lines[lines.Length - 3]); } else { ((EquippableItem)item).Influence = GetInfluenceType(lines.LastOrDefault()); }
<<<<<<< using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; ======= using Sidekick.Windows.PricePrediction; >>>>>>> using Sidekick.Windows.PricePrediction; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; <<<<<<< private static async void TriggerItemWiki() ======= private static async void TriggerItemPrediction() { Logger.Log("TriggerItemPrediction()"); var itemText = GetItemText(); LanguageSettings.DetectLanguage(itemText); if (!itemText.Contains(LanguageSettings.Provider.DescriptionRarity)) // Trigger only on item { return; } if(!itemText.Contains(LanguageSettings.Provider.RarityRare)) // Only trigger on rare items atm { return; } var pred = await PriceInfoClient.GetItemPricePrediction(itemText); PricePredictionViewController.Open(); if(pred != null) { PricePredictionViewController.SetResult(pred); return; } PricePredictionViewController.Hide(); } private static void TriggerItemWiki() >>>>>>> private static async void TriggerItemPrediction() { Logger.Log("TriggerItemPrediction()"); var itemText = GetItemText(); LanguageSettings.DetectLanguage(itemText); if (!itemText.Contains(LanguageSettings.Provider.DescriptionRarity)) // Trigger only on item { return; } if(!itemText.Contains(LanguageSettings.Provider.RarityRare)) // Only trigger on rare items atm { return; } var pred = await PriceInfoClient.GetItemPricePrediction(itemText); PricePredictionViewController.Open(); if(pred != null) { PricePredictionViewController.SetResult(pred); return; } PricePredictionViewController.Hide(); } <<<<<<< private static async Task<Item> TriggerCopyAction() ======= private static string GetItemText() >>>>>>> private static string GetItemText()
<<<<<<< public event Func<int, int, Task> OnMouseClick; public event Func<Task<bool>> OnAdvancedSearch; ======= >>>>>>> public event Func<Task<bool>> OnAdvancedSearch;
<<<<<<< public List<League> Leagues { get; private set; } public event Action LeaguesUpdated; public LeagueService(IPoeApiService poeApiService, ======= public LeagueService(IPoeApiClient poeApiClient, >>>>>>> public List<League> Leagues { get; private set; } public LeagueService(IPoeApiClient poeApiClient, <<<<<<< Leagues = await poeApiService.Fetch<League>(); NotifyLeaguesUpdated(); ======= Leagues = await poeApiClient.Fetch<League>(); >>>>>>> Leagues = await poeApiClient.Fetch<League>();
<<<<<<< public string DescriptionMapTier => "지도 등급: "; public string DescriptionItemQuantity => "아이템 수량: "; public string DescriptionItemRarity => "아이템 희귀도: "; public string DescriptionMonsterPackSize => "몬스터 무리 규모: "; public string PrefixBlighted => "역병"; ======= public string DescriptionExperience => throw new NotImplementedException(); >>>>>>> public string DescriptionMapTier => "지도 등급: "; public string DescriptionItemQuantity => "아이템 수량: "; public string DescriptionItemRarity => "아이템 희귀도: "; public string DescriptionMonsterPackSize => "몬스터 무리 규모: "; public string PrefixBlighted => "역병"; public string DescriptionExperience => throw new NotImplementedException(); <<<<<<< public string DescriptionMapTier => "Уровень карты: "; public string DescriptionItemQuantity => "Количество предметов: "; public string DescriptionItemRarity => "Редкость предметов: "; public string DescriptionMonsterPackSize => "Размер групп монстров: "; public string PrefixBlighted => "Заражённая"; ======= public string DescriptionExperience => throw new NotImplementedException(); >>>>>>> public string DescriptionMapTier => "Уровень карты: "; public string DescriptionItemQuantity => "Количество предметов: "; public string DescriptionItemRarity => "Редкость предметов: "; public string DescriptionMonsterPackSize => "Размер групп монстров: "; public string PrefixBlighted => "Заражённая"; public string DescriptionExperience => throw new NotImplementedException(); <<<<<<< public string DescriptionMapTier => "ระดับแผนที่: "; public string DescriptionItemQuantity => "จำนวนไอเท็ม: "; public string DescriptionItemRarity => "ระดับความหายากของไอเทม: "; public string DescriptionMonsterPackSize => "ขนาดบรรจุมอนสเตอร์: "; public string PrefixBlighted => "Blighted"; ======= public string DescriptionExperience => throw new NotImplementedException(); >>>>>>> public string DescriptionMapTier => "ระดับแผนที่: "; public string DescriptionItemQuantity => "จำนวนไอเท็ม: "; public string DescriptionItemRarity => "ระดับความหายากของไอเทม: "; public string DescriptionMonsterPackSize => "ขนาดบรรจุมอนสเตอร์: "; public string PrefixBlighted => "Blighted"; public string DescriptionExperience => throw new NotImplementedException();
<<<<<<< string DescriptionMapTier { get; } string DescriptionItemQuantity { get; } string DescriptionItemRarity { get; } string DescriptionMonsterPackSize { get; } ======= string DescriptionExperience { get; } >>>>>>> string DescriptionMapTier { get; } string DescriptionItemQuantity { get; } string DescriptionItemRarity { get; } string DescriptionMonsterPackSize { get; } string DescriptionExperience { get; }
<<<<<<< using Sidekick.Core.DependencyInjection.Services; using Sidekick.Core.Initialization; using Sidekick.Core.Loggers; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net.Http; using System.Text; using System.Threading.Tasks; ======= using Sidekick.Core.Settings; >>>>>>> using Sidekick.Core.Initialization; using Sidekick.Core.Loggers; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net.Http; using System.Text; using System.Threading.Tasks; <<<<<<< [SidekickService(typeof(ITradeClient))] public class TradeClient : ITradeClient, IOnBeforeInitialize, IOnReset ======= public class TradeClient : ITradeClient >>>>>>> public class TradeClient : ITradeClient, IOnBeforeInitialize, IOnReset
<<<<<<< public string Key_AdvancedSearch { get; set; } ======= public string Key_Exit { get; set; } public string Key_Stash_Left { get; set; } public string Key_Stash_Right { get; set; } >>>>>>> public string Key_AdvancedSearch { get; set; } public string Key_Exit { get; set; } public string Key_Stash_Left { get; set; } public string Key_Stash_Right { get; set; }
<<<<<<< using System; using System.Collections.Generic; using System.Linq; ======= using Microsoft.Extensions.Configuration; >>>>>>> using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Configuration;
<<<<<<< ======= public static int Sum(int n) { return (n * n + n) / 2; } } >>>>>>> public static int Sum(int n) { return (n * n + n) / 2; }
<<<<<<< using Vocaluxe.Base; using VocaluxeLib; using VocaluxeLib.Songs; ======= using VocaluxeLib.Menu; using VocaluxeLib.Menu.SongMenu; >>>>>>> using VocaluxeLib; using VocaluxeLib.Songs;
<<<<<<< List<string> folders = new List<string> {FolderCover, FolderFonts, Path.Combine(DataPath,FolderScreenshots), FolderBackgroundMusic, FolderSounds, Path.Combine(DataPath,FolderPlaylists)}; folders.AddRange(FoldersProfiles); ======= var folders = new List<string> {FolderCover, FolderFonts, FolderProfiles, FolderSongs, FolderScreenshots, FolderBackgroundMusic, FolderSounds, FolderPlaylists}; >>>>>>> var folders = new List<string> {FolderCover, FolderFonts, Path.Combine(DataPath,FolderScreenshots), FolderBackgroundMusic, FolderSounds, Path.Combine(DataPath,FolderPlaylists)}; folders.AddRange(FoldersProfiles);
<<<<<<< var settings = new XmlWriterSettings {Indent = true, Encoding = Encoding.UTF8, ConformanceLevel = ConformanceLevel.Document}; ======= >>>>>>>
<<<<<<< using VocaluxeLib; ======= using VocaluxeLib.Draw; using VocaluxeLib.Menu; >>>>>>> using VocaluxeLib; using VocaluxeLib.Draw; using VocaluxeLib.Menu;
<<<<<<< using Vocaluxe.Base.Font; using Vocaluxe.Base.Server; ======= using Vocaluxe.Base.Fonts; >>>>>>> using Vocaluxe.Base.Fonts; using Vocaluxe.Base.Server;
<<<<<<< private System.Timers.Timer _TimerShortInfoText; ======= private static int _StaticSelectedSongID; private static void setStaticSelectedSongID(int songID) { _StaticSelectedSongID = songID; } public static int getSelectedSongID() { return _StaticSelectedSongID; } >>>>>>> private System.Timers.Timer _TimerShortInfoText; private static int _StaticSelectedSongID; private static void setStaticSelectedSongID(int songID) { _StaticSelectedSongID = songID; } public static int getSelectedSongID() { return _StaticSelectedSongID; } <<<<<<< case Keys.T: if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode) { _ToggleTabs(); } break; case Keys.D0: case Keys.D1: case Keys.D2: case Keys.D3: case Keys.D4: case Keys.D5: case Keys.D6: case Keys.D7: case Keys.D8: case Keys.D9: if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode) { int tempSortNr = -1; int.TryParse(keyEvent.Key.ToString().Substring(1), out tempSortNr); if (tempSortNr == 0) tempSortNr = 10; _ToggleSort(tempSortNr); } break; ======= case Keys.H: if (keyEvent.Mod == EModifier.Ctrl && CSongs.NumSongsVisible > 0 && !_Sso.Selection.PartyMode) { _ShowHighscore(); } break; >>>>>>> case Keys.T: if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode) { _ToggleTabs(); } break; case Keys.D0: case Keys.D1: case Keys.D2: case Keys.D3: case Keys.D4: case Keys.D5: case Keys.D6: case Keys.D7: case Keys.D8: case Keys.D9: if (keyEvent.Mod == EModifier.Ctrl && !_Sso.Selection.PartyMode) { int tempSortNr = -1; int.TryParse(keyEvent.Key.ToString().Substring(1), out tempSortNr); if (tempSortNr == 0) tempSortNr = 10; _ToggleSort(tempSortNr); } break; case Keys.H: if (keyEvent.Mod == EModifier.Ctrl && CSongs.NumSongsVisible > 0 && !_Sso.Selection.PartyMode) { _ShowHighscore(); } break; <<<<<<< private void _ToggleSort(int sortNr) { CSongs.Sorter.SongSorting = (ESongSorting)sortNr; CConfig.Config.Game.SongSorting = CSongs.Sorter.SongSorting; _Sso.Sorting.SongSorting = CSongs.Sorter.SongSorting; _SongMenu.Update(_Sso); _SongMenu.OnShow(); _Texts[_TextShortInfoTop].Text = CBase.Language.Translate("TR_SCREENSONG_SORTING").Replace("%s", CBase.Language.Translate(_Sso.Sorting.SongSorting.ToString())); _Statics[_StaticShortInfoTop].Visible = true; _Texts[_TextShortInfoTop].Visible = true; _TimerShortInfoText.Stop(); _TimerShortInfoText.Enabled = true; } private void OnTimedEventShortInfoText(Object source, ElapsedEventArgs e) { _Statics[_StaticShortInfoTop].Visible = false; _Texts[_TextShortInfoTop].Visible = false; } private void _ToggleTabs() { EOffOn tmpStatus = CSongs.Categorizer.Tabs; if (tmpStatus == EOffOn.TR_CONFIG_ON) CSongs.Categorizer.Tabs = EOffOn.TR_CONFIG_OFF; else CSongs.Categorizer.Tabs = EOffOn.TR_CONFIG_ON; CConfig.Config.Game.Tabs = CSongs.Categorizer.Tabs; _Sso.Sorting.Tabs = CSongs.Categorizer.Tabs; _SongMenu.Update(_Sso); _SongMenu.OnShow(); } ======= private void _ShowHighscore() { CGame.ClearSongs(); CScreenSong.setStaticSelectedSongID(CSongs.VisibleSongs[_SongMenu.GetPreviewSongNr()].ID); CBase.Graphics.FadeTo(EScreen.Highscore); } >>>>>>> private void _ToggleSort(int sortNr) { CSongs.Sorter.SongSorting = (ESongSorting)sortNr; CConfig.Config.Game.SongSorting = CSongs.Sorter.SongSorting; _Sso.Sorting.SongSorting = CSongs.Sorter.SongSorting; _SongMenu.Update(_Sso); _SongMenu.OnShow(); _Texts[_TextShortInfoTop].Text = CBase.Language.Translate("TR_SCREENSONG_SORTING").Replace("%s", CBase.Language.Translate(_Sso.Sorting.SongSorting.ToString())); _Statics[_StaticShortInfoTop].Visible = true; _Texts[_TextShortInfoTop].Visible = true; _TimerShortInfoText.Stop(); _TimerShortInfoText.Enabled = true; } private void OnTimedEventShortInfoText(Object source, ElapsedEventArgs e) { _Statics[_StaticShortInfoTop].Visible = false; _Texts[_TextShortInfoTop].Visible = false; } private void _ToggleTabs() { EOffOn tmpStatus = CSongs.Categorizer.Tabs; if (tmpStatus == EOffOn.TR_CONFIG_ON) CSongs.Categorizer.Tabs = EOffOn.TR_CONFIG_OFF; else CSongs.Categorizer.Tabs = EOffOn.TR_CONFIG_ON; CConfig.Config.Game.Tabs = CSongs.Categorizer.Tabs; _Sso.Sorting.Tabs = CSongs.Categorizer.Tabs; _SongMenu.Update(_Sso); _SongMenu.OnShow(); } private void _ShowHighscore() { CGame.ClearSongs(); CScreenSong.setStaticSelectedSongID(CSongs.VisibleSongs[_SongMenu.GetPreviewSongNr()].ID); CBase.Graphics.FadeTo(EScreen.Highscore); }
<<<<<<< using VocaluxeLib; ======= using VocaluxeLib.Draw; using VocaluxeLib.Menu; >>>>>>> using VocaluxeLib; using VocaluxeLib.Draw; using VocaluxeLib.Menu; <<<<<<< if (false && Char.IsLetterOrDigit(chr)) ======= // ReSharper disable HeuristicUnreachableCode if (false) >>>>>>> // ReSharper disable HeuristicUnreachableCode if (false && Char.IsLetterOrDigit(chr))
<<<<<<< List<string> files = new List<string>(); files.AddRange(CHelper.ListFiles(Path.Combine(CSettings.DataPath,CSettings.FolderPlaylists), "*.upl", true, true)); ======= var files = new List<string>(); files.AddRange(CHelper.ListFiles(CSettings.FolderPlaylists, "*.upl", true, true)); >>>>>>> var files = new List<string>(); files.AddRange(CHelper.ListFiles(Path.Combine(CSettings.DataPath,CSettings.FolderPlaylists), "*.upl", true, true)); <<<<<<< List<string> files = new List<string>(); files.AddRange(CHelper.ListFiles(Path.Combine(CSettings.DataPath, CSettings.FolderPlaylists), "*.xml", true, true)); ======= var files = new List<string>(); files.AddRange(CHelper.ListFiles(CSettings.FolderPlaylists, "*.xml", true, true)); >>>>>>> var files = new List<string>(); files.AddRange(CHelper.ListFiles(Path.Combine(CSettings.DataPath, CSettings.FolderPlaylists), "*.xml", true, true));
<<<<<<< using VocaluxeLib; using VocaluxeLib.Game; using VocaluxeLib.Profile; ======= using VocaluxeLib.Draw; using VocaluxeLib.Menu; >>>>>>> using VocaluxeLib; using VocaluxeLib.Game; using VocaluxeLib.Profile; using VocaluxeLib.Draw; using VocaluxeLib.Menu; <<<<<<< _Queue.Enqueue(change); ======= CTexture texture = _Avatars[i].Texture; CDraw.RemoveTexture(ref texture); >>>>>>> _Queue.Enqueue(change); <<<<<<< CProfile profile = _Profiles[profileID]; if (profile.PlayerName != "") ======= SProfile profile = _Profiles[profileID]; if (!String.IsNullOrEmpty(profile.PlayerName)) >>>>>>> CProfile profile = _Profiles[profileID]; if (!String.IsNullOrEmpty(profile.PlayerName)) <<<<<<< if (!ICProfileIDValid(profileID)) return new STexture(-1); return _Profiles[profileID].Avatar.Texture; } #endregion avatar texture #region private methods private static void _LoadProfiles() { _LoadAvatars(); List<string> knownFiles = new List<string>(); if (_Profiles.Count > 0) ======= if (!IsProfileIDValid(profileID)) return; if (String.IsNullOrEmpty(_Profiles[profileID].ProfileFile)) return; try >>>>>>> if (!ICProfileIDValid(profileID)) return new STexture(-1); return _Profiles[profileID].Avatar.Texture; } #endregion avatar texture #region private methods private static void _LoadProfiles() { _LoadAvatars(); List<string> knownFiles = new List<string>(); if (_Profiles.Count > 0)
<<<<<<< private List<CPlaylist> _Playlists; ======= private List<CEqualizer> _Equalizers; >>>>>>> private List<CEqualizer> _Equalizers; private List<CPlaylist> _Playlists; <<<<<<< private Hashtable _htPlaylists; ======= private Hashtable _htEqualizers; >>>>>>> private Hashtable _htEqualizers; private Hashtable _htPlaylists; <<<<<<< protected string[] _ThemePlaylists; ======= protected string[] _ThemeEqualizers; >>>>>>> protected string[] _ThemeEqualizers; protected string[] _ThemePlaylists; <<<<<<< _Playlists = new List<CPlaylist>(); ======= _Equalizers = new List<CEqualizer>(); >>>>>>> _Equalizers = new List<CEqualizer>(); _Playlists = new List<CPlaylist>(); <<<<<<< _htPlaylists = new Hashtable(); ======= _htEqualizers = new Hashtable(); >>>>>>> _htEqualizers = new Hashtable(); _htPlaylists = new Hashtable(); <<<<<<< _ThemePlaylists = null; ======= _ThemeEqualizers = null; >>>>>>> _ThemeEqualizers = null; _ThemePlaylists = null; <<<<<<< if (_ThemePlaylists != null) { for (int i = 0; i < _ThemePlaylists.Length; i++) { CPlaylist pls = new CPlaylist(); if (pls.LoadTheme("//root/" + _ThemeName, _ThemePlaylists[i], navigator, SkinIndex)) { _htPlaylists.Add(_ThemePlaylists[i], AddPlaylist(pls)); } else { CLog.LogError("Can't load Playlist \"" + _ThemePlaylists[i] + "\" in screen " + _ThemeName); } } } ======= if (_ThemeEqualizers != null) { for (int i = 0; i < _ThemeEqualizers.Length; i++) { CEqualizer eq = new CEqualizer(); if (eq.LoadTheme("//root/" + _ThemeName, _ThemeEqualizers[i], navigator, SkinIndex)) { _htEqualizers.Add(_ThemeEqualizers[i], AddEqualizer(eq)); } else { CLog.LogError("Can't load equalizer \"" + _ThemeEqualizers[i] + "\" in screen " + _ThemeName); } } } >>>>>>> if (_ThemeEqualizers != null) { for (int i = 0; i < _ThemeEqualizers.Length; i++) { CEqualizer eq = new CEqualizer(); if (eq.LoadTheme("//root/" + _ThemeName, _ThemeEqualizers[i], navigator, SkinIndex)) { _htEqualizers.Add(_ThemeEqualizers[i], AddEqualizer(eq)); } else { CLog.LogError("Can't load equalizer \"" + _ThemeEqualizers[i] + "\" in screen " + _ThemeName); } } } if (_ThemePlaylists != null) { for (int i = 0; i < _ThemePlaylists.Length; i++) { CPlaylist pls = new CPlaylist(); if (pls.LoadTheme("//root/" + _ThemeName, _ThemePlaylists[i], navigator, SkinIndex)) { _htPlaylists.Add(_ThemePlaylists[i], AddPlaylist(pls)); } else { CLog.LogError("Can't load Playlist \"" + _ThemePlaylists[i] + "\" in screen " + _ThemeName); } } } <<<<<<< //Playlists for (int i = 0; i < _Playlists.Count; i++) { _Playlists[i].SaveTheme(writer); } ======= //Equalizers for (int i = 0; i < _Equalizers.Count; i++) { _Equalizers[i].SaveTheme(writer); } >>>>>>> //Equalizers for (int i = 0; i < _Equalizers.Count; i++) { _Equalizers[i].SaveTheme(writer); } //Playlists for (int i = 0; i < _Playlists.Count; i++) { _Playlists[i].SaveTheme(writer); } <<<<<<< foreach (CPlaylist pls in _Playlists) { pls.ReloadTextures(); } ======= foreach (CEqualizer eq in _Equalizers) { eq.ReloadTextures(); } >>>>>>> foreach (CEqualizer eq in _Equalizers) { eq.ReloadTextures(); } foreach (CPlaylist pls in _Playlists) { pls.ReloadTextures(); } <<<<<<< foreach (CPlaylist pls in _Playlists) { pls.UnloadTextures(); } ======= foreach (CEqualizer eq in _Equalizers) { eq.UnloadTextures(); } >>>>>>> foreach (CPlaylist pls in _Playlists) { pls.UnloadTextures(); } foreach (CEqualizer eq in _Equalizers) { eq.UnloadTextures(); } <<<<<<< public List<CPlaylist> GetPlaylists() { return _Playlists; } ======= public List<CEqualizer> GetEqualizers() { return _Equalizers; } >>>>>>> public List<CEqualizer> GetEqualizers() { return _Equalizers; } public List<CPlaylist> GetPlaylists() { return _Playlists; } <<<<<<< public CPlaylist[] Playlists { get { return _Playlists.ToArray(); } } ======= public CEqualizer[] Equalizers { get { return _Equalizers.ToArray(); } } >>>>>>> public CEqualizer[] Equalizers { get { return _Equalizers.ToArray(); } } public CPlaylist[] Playlists { get { return _Playlists.ToArray(); } } <<<<<<< public int htPlaylists(string key) { try { return (int)_htPlaylists[key]; } catch (Exception) { CLog.LogError("Can't find Playlist Element \"" + key + "\" in Screen " + _ThemeName); throw; } } ======= public int htEqualizer(string key) { try { return (int)_htEqualizers[key]; } catch (Exception) { CLog.LogError("Can't find Equalizer Element \"" + key + "\" in Screen " + _ThemeName); throw; } } >>>>>>> public int htEqualizer(string key) { try { return (int)_htEqualizers[key]; } catch (Exception) { CLog.LogError("Can't find Equalizer Element \"" + key + "\" in Screen " + _ThemeName); throw; } } public int htPlaylists(string key) { try { return (int)_htPlaylists[key]; } catch (Exception) { CLog.LogError("Can't find Playlist Element \"" + key + "\" in Screen " + _ThemeName); throw; } } <<<<<<< _Interactions[i].Type == EType.TSongMenu || _Interactions[i].Type == EType.TPlaylist)) ======= _Interactions[i].Type == EType.TSongMenu || _Interactions[i].Type == EType.TEqualizer)) >>>>>>> _Interactions[i].Type == EType.TSongMenu || _Interactions[i].Type == EType.TEqualizer || _Interactions[i].Type == EType.TPlaylist)) <<<<<<< public int AddPlaylist(CPlaylist pls) { _Playlists.Add(pls); _AddInteraction(_Playlists.Count - 1, EType.TPlaylist); return _Playlists.Count - 1; } ======= public int AddEqualizer(CEqualizer eq) { _Equalizers.Add(eq); _AddInteraction(_Equalizers.Count - 1, EType.TEqualizer); return _Equalizers.Count - 1; } >>>>>>> public int AddEqualizer(CEqualizer eq) { _Equalizers.Add(eq); _AddInteraction(_Equalizers.Count - 1, EType.TEqualizer); return _Equalizers.Count - 1; } public int AddPlaylist(CPlaylist pls) { _Playlists.Add(pls); _AddInteraction(_Playlists.Count - 1, EType.TPlaylist); return _Playlists.Count - 1; } <<<<<<< case EType.TPlaylist: if (CHelper.IsInBounds(_Playlists[interact.Num].Rect, x, y)) return true; break; ======= case EType.TEqualizer: if (CHelper.IsInBounds(_Equalizers[interact.Num].Rect, x, y)) return true; break; >>>>>>> case EType.TEqualizer: if (CHelper.IsInBounds(_Equalizers[interact.Num].Rect, x, y)) return true; break; case EType.TPlaylist: if (CHelper.IsInBounds(_Playlists[interact.Num].Rect, x, y)) return true; break; <<<<<<< case EType.TPlaylist: return _Playlists[interact.Num].Rect.Z; ======= case EType.TEqualizer: return _Equalizers[interact.Num].Rect.Z; >>>>>>> case EType.TEqualizer: return _Equalizers[interact.Num].Rect.Z; case EType.TPlaylist: return _Playlists[interact.Num].Rect.Z; <<<<<<< case EType.TPlaylist: return _Playlists[_Interactions[interaction].Num].Rect.Z; ======= case EType.TEqualizer: return _Equalizers[_Interactions[interaction].Num].Rect.Z; >>>>>>> case EType.TEqualizer: return _Equalizers[_Interactions[interaction].Num].Rect.Z; case EType.TPlaylist: return _Playlists[_Interactions[interaction].Num].Rect.Z; <<<<<<< case EType.TPlaylist: _Playlists[_Interactions[_Selection].Num].Selected = true; break; ======= case EType.TEqualizer: _Equalizers[_Interactions[_Selection].Num].Selected = true; break; >>>>>>> case EType.TEqualizer: _Equalizers[_Interactions[_Selection].Num].Selected = true; break; case EType.TPlaylist: _Playlists[_Interactions[_Selection].Num].Selected = true; break; <<<<<<< case EType.TPlaylist: _Playlists[_Interactions[_Selection].Num].Selected = false; break; ======= case EType.TEqualizer: _Equalizers[_Interactions[_Selection].Num].Selected = false; break; >>>>>>> case EType.TEqualizer: _Equalizers[_Interactions[_Selection].Num].Selected = false; break; case EType.TPlaylist: _Playlists[_Interactions[_Selection].Num].Selected = false; break; <<<<<<< case EType.TPlaylist: return _Playlists[_Interactions[interaction].Num].Visible; ======= case EType.TEqualizer: return _Equalizers[_Interactions[interaction].Num].Visible; >>>>>>> case EType.TEqualizer: return _Equalizers[_Interactions[interaction].Num].Visible; case EType.TPlaylist: return _Playlists[_Interactions[interaction].Num].Visible; <<<<<<< case EType.TPlaylist: return _Playlists[_Interactions[interaction].Num].Rect; ======= case EType.TEqualizer: return _Equalizers[_Interactions[interaction].Num].Rect; >>>>>>> case EType.TEqualizer: return _Equalizers[_Interactions[interaction].Num].Rect; case EType.TPlaylist: return _Playlists[_Interactions[interaction].Num].Rect; <<<<<<< case EType.TPlaylist: _Playlists[_Interactions[interaction].Num].Draw(); break; ======= case EType.TEqualizer: if (!_Equalizers[_Interactions[interaction].Num].ScreenHandles) { //TODO: //Call Update-Method of Equalizer and give infos about bg-sound. //_Equalizers[_Interactions[interaction].Num].Draw(); } break; >>>>>>> case EType.TEqualizer: if (!_Equalizers[_Interactions[interaction].Num].ScreenHandles) { //TODO: //Call Update-Method of Equalizer and give infos about bg-sound. //_Equalizers[_Interactions[interaction].Num].Draw(); } break; case EType.TPlaylist: _Playlists[_Interactions[interaction].Num].Draw(); break;
<<<<<<< using VocaluxeLib; ======= using VocaluxeLib.Draw; >>>>>>> using VocaluxeLib; using VocaluxeLib.Draw;
<<<<<<< for (int p = 0; p < CGame.NumPlayers; p++) _ProgressBars[_ProgressBarsRating[p, CGame.NumPlayers - 1]].Reset(); _SetDuetLyricsVisibility(song.IsDuet); ======= >>>>>>> for (int p = 0; p < CGame.NumPlayers; p++) _ProgressBars[_ProgressBarsRating[p, CGame.NumPlayers - 1]].Reset();
<<<<<<< CBase.PreviewPlayer.Stop(); ======= if (_PreviewSongStream >= 0) CBase.Sound.FadeAndClose(_PreviewSongStream, 0f, 0.75f); _PreviewSongStream = -1; CBase.Video.Close(_PreviewVideoStream); _PreviewVideoStream = -1; CBase.Drawing.RemoveTexture(ref _Vidtex); //Make sure we don't have a preview here otherwise a change won't be recognized //(e.g. leave a category with one song and set preview to 0 --> previewOld=previewNew=0 --> No change --> Old data shown //Use internal nr because this function gets called from withing setPreviewNr _PreviewNrInternal = -1; >>>>>>> CBase.PreviewPlayer.Stop(); //Make sure we don't have a preview here otherwise a change won't be recognized //(e.g. leave a category with one song and set preview to 0 --> previewOld=previewNew=0 --> No change --> Old data shown //Use internal nr because this function gets called from withing setPreviewNr _PreviewNrInternal = -1;
<<<<<<< case Keys.W: if (CWebcam.GetDevices().Length > 0) { _Webcam = !_Webcam; if (_Webcam) CWebcam.Start(); else CWebcam.Stop(); } break; ======= case Keys.S: if(CGame.NumRounds > CGame.RoundNr) if(KeyEvent.ModCTRL) LoadNextSong(); break; >>>>>>> case Keys.S: if(CGame.NumRounds > CGame.RoundNr) if(KeyEvent.ModCTRL) LoadNextSong(); break; case Keys.W: if (CWebcam.GetDevices().Length > 0) { _Webcam = !_Webcam; if (_Webcam) CWebcam.Start(); else CWebcam.Stop(); } break; <<<<<<< TogglePause(); ======= TogglePause(); >>>>>>> TogglePause(); <<<<<<< Stop(); ======= Stop(); if (Buttons[htButtons(ButtonSkip)].Selected && _Pause) { LoadNextSong(); TogglePause(); } >>>>>>> Stop(); if (Buttons[htButtons(ButtonSkip)].Selected && _Pause) { LoadNextSong(); TogglePause(); } <<<<<<< ======= UpdateDuetText(); >>>>>>> UpdateDuetText(); <<<<<<< Statics[htStatics(StaticAvatars[p, CGame.NumPlayer - 1])].Alpha = Alpha[0]; Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Alpha = Alpha[0]; ======= Statics[htStatics(StaticAvatars[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2]; Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2]; >>>>>>> Statics[htStatics(StaticAvatars[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2]; Texts[htTexts(TextNames[p, CGame.NumPlayer - 1])].Alpha = Alpha[CGame.Player[p].LineNr * 2]; <<<<<<< { for (int i = 1; i <= CGame.NumPlayer; i = i + 2) ======= { Texts[htTexts(TextDuetName1)].Text = song.DuetPart1; Texts[htTexts(TextDuetName2)].Text = song.DuetPart2; //More than one song: Player is not assigned to line by user //Otherwise, this is done by CScreenNames if (CGame.GetNumSongs() > 1) { for (int i = 1; i <= CGame.NumPlayer; i = i + 2) { CGame.Player[i].LineNr = 1; } } else >>>>>>> { Texts[htTexts(TextDuetName1)].Text = song.DuetPart1; Texts[htTexts(TextDuetName2)].Text = song.DuetPart2; //More than one song: Player is not assigned to line by user //Otherwise, this is done by CScreenNames if (CGame.GetNumSongs() > 1) { for (int i = 1; i <= CGame.NumPlayer; i = i + 2) { CGame.Player[i].LineNr = 1; } } else <<<<<<< CSound.Pause(_CurrentStream); CWebcam.Pause(); } else ======= if (CGame.NumRounds > CGame.RoundNr && CGame.NumRounds > 1) Buttons[htButtons(ButtonSkip)].Visible = true; else Buttons[htButtons(ButtonSkip)].Visible = false; CSound.Pause(_CurrentStream); }else >>>>>>> if (CGame.NumRounds > CGame.RoundNr && CGame.NumRounds > 1) Buttons[htButtons(ButtonSkip)].Visible = true; else Buttons[htButtons(ButtonSkip)].Visible = false; CSound.Pause(_CurrentStream); }else <<<<<<< float diff = 0f; diff = CGame.GetTimeFromBeats(line[CurrentLineSub + 1].FirstBeat, Song.BPM) - CurrentTime; ======= float diff = 0f; diff = CGame.GetTimeFromBeats(line[CurrentLineSub + 1].FirstNoteBeat, Song.BPM) - CurrentTime; >>>>>>> float diff = 0f; diff = CGame.GetTimeFromBeats(line[CurrentLineSub + 1].FirstNoteBeat, Song.BPM) - CurrentTime; <<<<<<< for (int j = 0; j < Line.Length; j++) { TimeRect trect = new TimeRect(); trect.startBeat = Line[j].FirstBeat; trect.endBeat = Line[j].EndBeat; trect.rect = new CStatic(new STexture(-1), new SColorF(1f, 1f, 1f, 1f), new SRectF(stat.Rect.X + stat.Rect.W * ((CGame.GetTimeFromBeats(trect.startBeat, song.BPM) + song.Gap - song.Start) / TotalTime), stat.Rect.Y, stat.Rect.W * (CGame.GetTimeFromBeats((trect.endBeat - trect.startBeat), song.BPM) / TotalTime), stat.Rect.H, stat.Rect.Z)); _TimeRects.Add(trect); ======= for(int j = 0; j<Line.Length; j++){ if (Line[j].VisibleInTimeLine) { TimeRect trect = new TimeRect(); trect.startBeat = Line[j].FirstNoteBeat; trect.endBeat = Line[j].EndBeat; trect.rect = new CStatic(new STexture(-1), new SColorF(1f, 1f, 1f, 1f), new SRectF(stat.Rect.X + stat.Rect.W * ((CGame.GetTimeFromBeats(trect.startBeat, song.BPM) + song.Gap - song.Start) / TotalTime), stat.Rect.Y, stat.Rect.W * (CGame.GetTimeFromBeats((trect.endBeat - trect.startBeat), song.BPM) / TotalTime), stat.Rect.H, stat.Rect.Z)); _TimeRects.Add(trect); } >>>>>>> for (int j = 0; j < Line.Length; j++) { if (Line[j].VisibleInTimeLine) { TimeRect trect = new TimeRect(); trect.startBeat = Line[j].FirstNoteBeat; trect.endBeat = Line[j].EndBeat; trect.rect = new CStatic(new STexture(-1), new SColorF(1f, 1f, 1f, 1f), new SRectF(stat.Rect.X + stat.Rect.W * ((CGame.GetTimeFromBeats(trect.startBeat, song.BPM) + song.Gap - song.Start) / TotalTime), stat.Rect.Y, stat.Rect.W * (CGame.GetTimeFromBeats((trect.endBeat - trect.startBeat), song.BPM) / TotalTime), stat.Rect.H, stat.Rect.Z)); _TimeRects.Add(trect); }
<<<<<<< if (_UsedProfiles.Contains(profile.ID) && !profile.UserRole.HasFlag(EUserRole.TR_USERROLE_NORMAL)) visible = false; ======= //Show profile only if active for (int p = 0; p < CBase.Game.GetNumPlayer(); p++) { //Don't show profile if is selected, but if selected and guest if (CBase.Game.GetPlayers()[p].ProfileID == profile.ID && profile.UserRole >= EUserRole.TR_USERROLE_NORMAL) visible = false; } >>>>>>> if (_UsedProfiles.Contains(profile.ID) && profile.UserRole >= EUserRole.TR_USERROLE_NORMAL) visible = false;
<<<<<<< writer.WriteComment("Background Music Source"); writer.WriteElementString("BackgroundMusicSource", Enum.GetName(typeof(EBackgroundMusicSource), BackgroundMusicSource)); ======= writer.WriteComment("Background Music use start-tag of songs"); writer.WriteElementString("BackgroundMusicUseStart", Enum.GetName(typeof(EOffOn), BackgroundMusicUseStart)); writer.WriteComment("Preview Volume from 0 to 100"); writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString()); >>>>>>> writer.WriteComment("Background Music Source"); writer.WriteElementString("BackgroundMusicSource", Enum.GetName(typeof(EBackgroundMusicSource), BackgroundMusicSource)); writer.WriteComment("Background Music use start-tag of songs"); writer.WriteElementString("BackgroundMusicUseStart", Enum.GetName(typeof(EOffOn), BackgroundMusicUseStart)); writer.WriteComment("Preview Volume from 0 to 100"); writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString());
<<<<<<< using System; using System.Linq; ======= >>>>>>> using System; using System.Linq; <<<<<<< Guid id = Guid.Empty; ======= >>>>>>> Guid id = Guid.Empty;
<<<<<<< _Screens.Add(new CScreenTest()); _Screens.Add(new CScreenLoad()); _Screens.Add(new CScreenMain()); _Screens.Add(new CScreenSong()); _Screens.Add(new CScreenOptions()); _Screens.Add(new CScreenSing()); _Screens.Add(new CScreenProfiles()); _Screens.Add(new CScreenScore()); _Screens.Add(new CScreenHighscore()); _Screens.Add(new CScreenOptionsGame()); _Screens.Add(new CScreenOptionsSound()); _Screens.Add(new CScreenOptionsRecord()); _Screens.Add(new CScreenOptionsVideo()); _Screens.Add(new CScreenOptionsTheme()); _Screens.Add(new CScreenNames()); _PopupScreens.Add(new CPopupScreenPlayerControl()); ======= ScreenList.Add(new CScreenTest()); ScreenList.Add(new CScreenLoad()); ScreenList.Add(new CScreenMain()); ScreenList.Add(new CScreenSong()); ScreenList.Add(new CScreenOptions()); ScreenList.Add(new CScreenSing()); ScreenList.Add(new CScreenProfiles()); ScreenList.Add(new CScreenScore()); ScreenList.Add(new CScreenHighscore()); ScreenList.Add(new CScreenOptionsGame()); ScreenList.Add(new CScreenOptionsSound()); ScreenList.Add(new CScreenOptionsRecord()); ScreenList.Add(new CScreenOptionsVideo()); ScreenList.Add(new CScreenOptionsTheme()); ScreenList.Add(new CScreenNames()); ScreenList.Add(new CScreenCredits()); >>>>>>> _Screens.Add(new CScreenTest()); _Screens.Add(new CScreenLoad()); _Screens.Add(new CScreenMain()); _Screens.Add(new CScreenSong()); _Screens.Add(new CScreenOptions()); _Screens.Add(new CScreenSing()); _Screens.Add(new CScreenProfiles()); _Screens.Add(new CScreenScore()); _Screens.Add(new CScreenHighscore()); _Screens.Add(new CScreenOptionsGame()); _Screens.Add(new CScreenOptionsSound()); _Screens.Add(new CScreenOptionsRecord()); _Screens.Add(new CScreenOptionsVideo()); _Screens.Add(new CScreenOptionsTheme()); _Screens.Add(new CScreenNames()); _Screens.Add(new CScreenCredits()); _PopupScreens.Add(new CPopupScreenPlayerControl()); <<<<<<< CLog.StartBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]); _Screens[i].LoadTheme(); CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]); ======= if (Enum.GetNames(typeof(EScreens))[i] != Enum.GetName(typeof(EScreens), (int)EScreens.ScreenCredits)) { CLog.StartBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]); Screens[i].LoadTheme(); CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]); } >>>>>>> if (Enum.GetNames(typeof(EScreens))[i] != Enum.GetName(typeof(EScreens), (int)EScreens.ScreenCredits)) { CLog.StartBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]); _Screens[i].LoadTheme(); CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]); } <<<<<<< _Screens[i].ReloadTheme(); ======= if (Enum.GetNames(typeof(EScreens))[i] != Enum.GetName(typeof(EScreens), (int)EScreens.ScreenCredits)) { Screens[i].ReloadTheme(); } >>>>>>> if (Enum.GetNames(typeof(EScreens))[i] != Enum.GetName(typeof(EScreens), (int)EScreens.ScreenCredits)) { _Screens[i].ReloadTheme(); } <<<<<<< _Screens[i].ReloadTextures(); ======= if (Enum.GetNames(typeof(EScreens))[i] != Enum.GetName(typeof(EScreens), (int)EScreens.ScreenCredits)) { Screens[i].ReloadTextures(); } >>>>>>> if (Enum.GetNames(typeof(EScreens))[i] != Enum.GetName(typeof(EScreens), (int)EScreens.ScreenCredits)) { _Screens[i].ReloadTextures(); } <<<<<<< _Screens[i].SaveTheme(); ======= if (Enum.GetNames(typeof(EScreens))[i] != Enum.GetName(typeof(EScreens), (int)EScreens.ScreenCredits)) { Screens[i].SaveTheme(); } >>>>>>> if (Enum.GetNames(typeof(EScreens))[i] != Enum.GetName(typeof(EScreens), (int)EScreens.ScreenCredits)) { _Screens[i].SaveTheme(); }
<<<<<<< width = Translation.getMenuWidth(); height = LoadingExtension.IsPathManagerCompatible ? 310 : 230; ======= width = 250; height = LoadingExtension.IsPathManagerCompatible ? 350 : 270; >>>>>>> width = Translation.getMenuWidth(); height = LoadingExtension.IsPathManagerCompatible ? 350 : 270; <<<<<<< title.text = "Version 1.4.9"; title.relativePosition = new Vector3(50.0f, 5.0f); ======= title.text = "Version 1.5"; title.relativePosition = new Vector3(65.0f, 5.0f); >>>>>>> title.text = "Version 1.5.0"; title.relativePosition = new Vector3(50.0f, 5.0f); <<<<<<< _buttonClearTraffic = _createButton(Translation.GetString("Clear_Traffic"), y, clickClearTraffic); ======= _buttonSpeedLimits = _createButton("Speed limits", new Vector3(35f, y), clickSpeedLimits); y += 40; _buttonClearTraffic = _createButton(Translation.GetString("Clear_Traffic"), new Vector3(35f, y), clickClearTraffic); >>>>>>> _buttonSpeedLimits = _createButton("Speed limits", y, clickSpeedLimits); y += 40; _buttonClearTraffic = _createButton(Translation.GetString("Clear_Traffic"), y, clickClearTraffic);
<<<<<<< using VocaluxeLib; ======= using VocaluxeLib.Draw; >>>>>>> using VocaluxeLib; using VocaluxeLib.Draw;
<<<<<<< LoadSmallCover(); ======= if (!_NotesLoaded) this.ReadNotes(); if (this.CoverFileName != String.Empty) { if (!CBase.DataBase.GetCover(Path.Combine(this.Folder, this.CoverFileName), ref _CoverTextureSmall, CBase.Config.GetCoverSize())) _CoverTextureSmall = CBase.Cover.GetNoCover(); } else _CoverTextureSmall = CBase.Cover.GetNoCover(); _CoverLoaded = true; >>>>>>> LoadSmallCover(); <<<<<<< CBase.Base.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value)); ======= CBase.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value)); >>>>>>> CBase.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value)); <<<<<<< TempC = (char)sr.Read(); break; ======= CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". The file is empty or it starts with an empty line: " + FilePath); return false; >>>>>>> TempC = (char)sr.Read(); break; <<<<<<< CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". No lyrics/notes found: " + FilePath); return false; } ======= FileLineNo++; if (TempC.CompareTo('P') == 0) { char chr; while ((chr = (char)sr.Read()) == ' '){ } int.TryParse(chr.ToString(), out Param1); if (Param1 == 1) Player = 0; else if (Param1 == 2) Player = 1; else if (Param1 == 3) Player = 2; else { CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Wrong or missing number after \"P\": " + FilePath); return false; } } >>>>>>> CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". No lyrics/notes found: " + FilePath); return false; } <<<<<<< if (Player != 2) // one singer ParseNote(Player, NoteType, Param1, Param2, Param3, ParamS); else { // both singer ParseNote(0, NoteType, Param1, Param2, Param3, ParamS); ParseNote(1, NoteType, Param1, Param2, Param3, ParamS); } isNewSentence = false; break; case '-': if (isNewSentence) { CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath); return false; } ======= if (TempC.CompareTo('-') == 0) { if (isNewSentence) { CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath); return false; } >>>>>>> if (Player != 2) // one singer ParseNote(Player, NoteType, Param1, Param2, Param3, ParamS); else { // both singer ParseNote(0, NoteType, Param1, Param2, Param3, ParamS); ParseNote(1, NoteType, Param1, Param2, Param3, ParamS); } isNewSentence = false; break; case '-': if (isNewSentence) { CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath); return false; }
<<<<<<< using VocaluxeLib; using VocaluxeLib.Songs; ======= using VocaluxeLib.Draw; using VocaluxeLib.Menu; using VocaluxeLib.Menu.SongMenu; >>>>>>> using VocaluxeLib; using VocaluxeLib.Songs; using VocaluxeLib.Draw; using VocaluxeLib.Menu; using VocaluxeLib.Menu.SongMenu;
<<<<<<< using VocaluxeLib; ======= using VocaluxeLib.Draw; >>>>>>> using VocaluxeLib; using VocaluxeLib.Draw;
<<<<<<< using VocaluxeLib; ======= using VocaluxeLib.Draw; >>>>>>> using VocaluxeLib; using VocaluxeLib.Draw;
<<<<<<< using VocaluxeLib; ======= using VocaluxeLib.Draw; >>>>>>> using VocaluxeLib; using VocaluxeLib.Draw;
<<<<<<< using Vocaluxe.Base.Font; using VocaluxeLib; ======= using Vocaluxe.Base.Fonts; >>>>>>> using Vocaluxe.Base.Fonts; using VocaluxeLib;
<<<<<<< using System; ======= using System; using System.Linq; >>>>>>> using System; using System.Linq; <<<<<<< if (Offset * _Theme.Tiles.NumW + _ActualSelection < _VisibleProfiles.Count) Selection = _VisibleProfiles[Offset * _Theme.Tiles.NumW + _ActualSelection]; ======= if (Offset * _Tiles.Count + _ActualSelection < _VisibleProfiles.Count) SelectedID = _VisibleProfiles.ElementAt(Offset * _Tiles.Count + _ActualSelection); >>>>>>> if (Offset * _Theme.Tiles.NumW + _ActualSelection < _VisibleProfiles.Count) SelectedID = _VisibleProfiles.ElementAt(Offset * _Theme.Tiles.NumW + _ActualSelection); <<<<<<< if (Offset * _Theme.Tiles.NumW + _ActualSelection < _VisibleProfiles.Count) Selection = _VisibleProfiles[Offset * _Theme.Tiles.NumW + _ActualSelection]; ======= if (Offset * _Tiles.Count + _ActualSelection < _VisibleProfiles.Count) SelectedID = _VisibleProfiles.ElementAt(Offset * _Tiles.Count + _ActualSelection); >>>>>>> if (Offset * _Theme.Tiles.NumW + _ActualSelection < _VisibleProfiles.Count) SelectedID = _VisibleProfiles.ElementAt(Offset * _Theme.Tiles.NumW + _ActualSelection); <<<<<<< _Tiles[i].Name.Text = CBase.Profiles.GetPlayerName(_VisibleProfiles[i + offset * _Theme.Tiles.NumW]); _Tiles[i].ProfileID = _VisibleProfiles[i + offset * _Theme.Tiles.NumW]; ======= _Tiles[i].Name.Text = CBase.Profiles.GetPlayerName(_VisibleProfiles[i + offset * _Tiles.Count]); _Tiles[i].ProfileID = _VisibleProfiles.ElementAt(i + offset * _Tiles.Count); >>>>>>> _Tiles[i].Name.Text = CBase.Profiles.GetPlayerName(_VisibleProfiles[i + offset * _Theme.Tiles.NumW]); _Tiles[i].ProfileID = _VisibleProfiles.ElementAt(i + offset * _Theme.Tiles.NumW);
<<<<<<< public void MarkAsUpdated(ref ExtSegment seg) { ======= public void MarkAllAsUpdated() { for (uint segmentId = 0; segmentId < NetManager.MAX_SEGMENT_COUNT; ++segmentId) { SegmentGeometry segGeo = SegmentGeometry.Get((ushort)segmentId); if (segGeo != null) { MarkAsUpdated(segGeo, true); } } } public void MarkAsUpdated(SegmentGeometry geometry, bool updateNodes = true) { >>>>>>> public void MarkAllAsUpdated() { for (uint segmentId = 0; segmentId < NetManager.MAX_SEGMENT_COUNT; ++segmentId) { SegmentGeometry segGeo = SegmentGeometry.Get((ushort)segmentId); if (segGeo != null) { MarkAsUpdated(segGeo, true); } } } public void MarkAsUpdated(ref ExtSegment seg, bool updateNodes = true) { <<<<<<< MarkAsUpdated(Constants.ServiceFactory.NetService.GetSegmentNodeId(seg.segmentId, true)); MarkAsUpdated(Constants.ServiceFactory.NetService.GetSegmentNodeId(seg.segmentId, false)); ======= if (updateNodes) { MarkAsUpdated(NodeGeometry.Get(geometry.StartNodeId())); MarkAsUpdated(NodeGeometry.Get(geometry.EndNodeId())); } >>>>>>> if (updateNodes) { MarkAsUpdated(Constants.ServiceFactory.NetService.GetSegmentNodeId(seg.segmentId, true)); MarkAsUpdated(Constants.ServiceFactory.NetService.GetSegmentNodeId(seg.segmentId, false)); } <<<<<<< public void MarkAsUpdated(ushort nodeId) { ======= public void MarkAsUpdated(NodeGeometry geometry, bool updateSegments = false) { >>>>>>> public void MarkAsUpdated(ushort nodeId, bool updateSegments = false) { <<<<<<< if (! Services.NetService.IsNodeValid(nodeId)) { ======= if (updateSegments) { foreach (SegmentEndGeometry segEndGeo in geometry.SegmentEndGeometries) { if (segEndGeo != null) { MarkAsUpdated(segEndGeo.GetSegmentGeometry(), false); } } } if (!geometry.IsValid()) { >>>>>>> if (updateSegments) { foreach (SegmentEndGeometry segEndGeo in geometry.SegmentEndGeometries) { if (segEndGeo != null) { MarkAsUpdated(segEndGeo.GetSegmentGeometry(), false); } } } if (! Services.NetService.IsNodeValid(nodeId)) {
<<<<<<< public const string guidSlowCheetahPkgString = "9eb9f150-fcc9-4db8-9e97-6aef2011017c"; public const string guidSlowCheetahCmdSetString = "eab4615a-3384-42bd-9589-e2df97a783ee"; public const string guidWebApplicationString = "{349c5851-65df-11da-9384-00065b846f21}"; ======= /// <summary> /// Guid string for the SlowCheetah Visual Studio Package /// </summary> public const string GuidSlowCheetahPkgString = "9eb9f150-fcc9-4db8-9e97-6aef2011017c"; /// <summary> /// Guid string for the SlowCheetah commands /// </summary> public const string GuidSlowCheetahCmdSetString = "eab4615a-3384-42bd-9589-e2df97a783ee"; >>>>>>> public const string guidWebApplicationString = "{349c5851-65df-11da-9384-00065b846f21}"; /// <summary> /// Guid string for the SlowCheetah Visual Studio Package /// </summary> public const string GuidSlowCheetahPkgString = "9eb9f150-fcc9-4db8-9e97-6aef2011017c"; /// <summary> /// Guid string for the SlowCheetah commands /// </summary> public const string GuidSlowCheetahCmdSetString = "eab4615a-3384-42bd-9589-e2df97a783ee";
<<<<<<< if (StaticsInitialized) return; faceDeltas[(int)BoxFace.Back] = new GlobalVoxelOffset(0, 0, 1); faceDeltas[(int)BoxFace.Front] = new GlobalVoxelOffset(0, 0, -1); faceDeltas[(int)BoxFace.Left] = new GlobalVoxelOffset(-1, 0, 0); faceDeltas[(int)BoxFace.Right] = new GlobalVoxelOffset(1, 0, 0); faceDeltas[(int)BoxFace.Top] = new GlobalVoxelOffset(0, 1, 0); faceDeltas[(int)BoxFace.Bottom] = new GlobalVoxelOffset(0, -1, 0); ======= if (!StaticsInitialized) { faceDeltas[(int)BoxFace.Back] = new Vector3(0, 0, 1); faceDeltas[(int)BoxFace.Front] = new Vector3(0, 0, -1); faceDeltas[(int)BoxFace.Left] = new Vector3(-1, 0, 0); faceDeltas[(int)BoxFace.Right] = new Vector3(1, 0, 0); faceDeltas[(int)BoxFace.Top] = new Vector3(0, 1, 0); faceDeltas[(int)BoxFace.Bottom] = new Vector3(0, -1, 0); >>>>>>> if (!StaticsInitialized) { faceDeltas[(int)BoxFace.Back] = new GlobalVoxelOffset(0, 0, 1); faceDeltas[(int)BoxFace.Front] = new GlobalVoxelOffset(0, 0, -1); faceDeltas[(int)BoxFace.Left] = new GlobalVoxelOffset(-1, 0, 0); faceDeltas[(int)BoxFace.Right] = new GlobalVoxelOffset(1, 0, 0); faceDeltas[(int)BoxFace.Top] = new GlobalVoxelOffset(0, 1, 0); faceDeltas[(int)BoxFace.Bottom] = new GlobalVoxelOffset(0, -1, 0); <<<<<<< ======= v.GridPosition = new Vector3(x, y, z); >>>>>>> <<<<<<< ======= bool success = v.GetNeighborBySuccessor(delta, ref voxelOnFace, false); >>>>>>> <<<<<<< if (!(vox.WaterCell.WaterLevel == 0 || y == (int)chunk.Manager.ChunkData.MaxViewingLevel)) ======= if (!(voxelOnFace.WaterLevel == 0 || y == (int)chunk.Manager.ChunkData.MaxViewingLevel)) >>>>>>> if (!(vox.WaterCell.WaterLevel == 0 || y == (int)chunk.Manager.ChunkData.MaxViewingLevel)) <<<<<<< if (vox.WaterCell.WaterLevel != 0 || !vox.IsEmpty) ======= if (voxelOnFace.WaterLevel != 0 || !voxelOnFace.IsEmpty) >>>>>>> if (vox.WaterCell.WaterLevel != 0 || !vox.IsEmpty) <<<<<<< CreateWaterFaces(voxel, chunk, curVertices, maxVertex); ======= CreateWaterFaces(v, chunk, x, y, z, curVertices, curIndexes, maxVertex, maxIndex); >>>>>>> CreateWaterFaces(voxel, chunk, x, y, z, curVertices, curIndexes, maxVertex, maxIndex); <<<<<<< private static int SuccessorToEuclidianLookupKey(GlobalVoxelOffset C) { return (C.X + 1) + (C.Y + 1) * 3 + (C.Z + 1) * 9; } private static void CreateWaterFaces(TemporaryVoxelHandle voxel, VoxelChunk chunk, ======= // Create faces for each individual voxel. private static void CreateWaterFaces(VoxelHandle voxel, VoxelChunk chunk, int x, int y, int z, >>>>>>> private static int SuccessorToEuclidianLookupKey(GlobalVoxelOffset C) { return (C.X + 1) + (C.Y + 1) * 3 + (C.Z + 1) * 9; } private static void CreateWaterFaces(TemporaryVoxelHandle voxel, VoxelChunk chunk, int x, int y, int z, <<<<<<< int vertOffset = 0; int numVerts = 0; primitive.GetFace(face, primitive.UVs, out idx, out vertexCount, out vertOffset, out numVerts); // numVerts is always 4. // vertexCount is always 6 ?? ======= int vertexIndex = 0; int faceCount = 0; primitive.GetFace(face, primitive.UVs, out faceIndex, out faceCount, out vertexIndex, out vertexCount); int indexOffset = startVertex; >>>>>>> int vertexIndex = 0; int faceCount = 0; primitive.GetFace(face, primitive.UVs, out faceIndex, out faceCount, out vertexIndex, out vertexCount); int indexOffset = startVertex; <<<<<<< var vertexSucc = VoxelHelpers.VertexNeighbors[(int)currentVertex]; ======= List<Vector3> vertexSucc = VoxelChunk.VertexSuccessors[currentVertex]; >>>>>>> var vertexSucc = VoxelHelpers.VertexNeighbors[(int)currentVertex]; <<<<<<< var neighborVoxel = new TemporaryVoxelHandle(chunk.Manager.ChunkData, voxel.Coordinate + vertexSucc[v]); ======= Vector3 succ = vertexSucc[v]; // We are going to use a lookup key so calculate it now. //int key = VoxelChunk.SuccessorToEuclidianLookupKey(succ); int key = VoxelChunk.SuccessorToEuclidianLookupKey( MathFunctions.FloorInt(succ.X), MathFunctions.FloorInt(succ.Y), MathFunctions.FloorInt(succ.Z)); // If we haven't gotten this DestinationVoxel yet then retrieve it. // This allows us to only get a particular voxel once a function call instead of once per vertexCount/per face. if (!cache.retrievedNeighbors[key]) { VoxelHandle neighbor = cache.neighbors[key]; cache.validNeighbors[key] = voxel.GetNeighborBySuccessor(succ, ref neighbor, false); cache.retrievedNeighbors[key] = true; } >>>>>>> var neighborVoxel = new TemporaryVoxelHandle(chunk.Manager.ChunkData, voxel.Coordinate + vertexSucc[v]); <<<<<<< if (neighborVoxel.WaterCell.WaterLevel < 1) emptyNeighbors++; ======= if (vox.WaterLevel < 1) emptyNeighbors++; if (vox.Water.Type == LiquidType.None && !vox.IsEmpty) shoreLine = true; >>>>>>> if (neighborVoxel.WaterCell.WaterLevel < 1) emptyNeighbors++; if (neighborVoxel.WaterCell.Type == LiquidType.None && !neighborVoxel.IsEmpty) shoreLine = true; <<<<<<< pos.Y *= ((float)voxel.WaterCell.WaterLevel / 8.0f); // Hack water level visualization in pos += origin; ======= pos += origin + rampOffset; >>>>>>> pos.Y *= ((float)voxel.WaterCell.WaterLevel / 8.0f); // Hack water level visualization in pos += origin + rampOffset;
<<<<<<< World.MakeAnnouncement("If we don't make a profit by tomorrow, our stock will crash!"); ======= World.MakeAnnouncement("We're bankrupt!", "If we don't make a profit by tomorrow, our stock will crash!"); SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_negative_generic, 0.5f); >>>>>>> World.MakeAnnouncement("If we don't make a profit by tomorrow, our stock will crash!"); SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_negative_generic, 0.5f); <<<<<<< String.Format("{0} ({1}) died!", deadMinion.Stats.FullName, deadMinion.Stats.CurrentLevel.Name)); ======= String.Format("{0} ({1}) died!", deadMinion.Stats.FullName, deadMinion.Stats.CurrentLevel.Name), "One of our employees has died!"); SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_negative_generic); >>>>>>> String.Format("{0} ({1}) died!", deadMinion.Stats.FullName, deadMinion.Stats.CurrentLevel.Name)); SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_negative_generic); <<<<<<< ======= HandlePosessedDwarf(); >>>>>>> HandlePosessedDwarf();
<<<<<<< private LinkedList<LiquidTransfer> Transfers = new LinkedList<LiquidTransfer>(); private Mutex TransferLock = new Mutex(); public bool NeedsMinimapUpdate = true; ======= >>>>>>> public bool NeedsMinimapUpdate = true; <<<<<<< currentVoxel.WaterCell = new WaterCell { Type = LiquidType.None, WaterLevel = 0 }; NeedsMinimapUpdate = true; ======= currentVoxel.QuickSetLiquid(LiquidType.None, 0); >>>>>>> NeedsMinimapUpdate = true; currentVoxel.QuickSetLiquid(LiquidType.None, 0); <<<<<<< CreateSplash(currentVoxel.Coordinate.ToVector3(), water.Type); voxBelow.WaterCell = water; currentVoxel.WaterCell = WaterCell.Empty; HandleLiquidInteraction(voxBelow, water, belowWater); NeedsMinimapUpdate = true; ======= CreateSplash(currentVoxel.Coordinate.ToVector3(), currentVoxel.LiquidType); voxBelow.QuickSetLiquid(currentVoxel.LiquidType, currentVoxel.LiquidLevel); currentVoxel.QuickSetLiquid(LiquidType.None, 0); >>>>>>> NeedsMinimapUpdate = true; CreateSplash(currentVoxel.Coordinate.ToVector3(), currentVoxel.LiquidType); voxBelow.QuickSetLiquid(currentVoxel.LiquidType, currentVoxel.LiquidLevel); currentVoxel.QuickSetLiquid(LiquidType.None, 0); <<<<<<< CreateSplash(currentVoxel.Coordinate.ToVector3(), water.Type); belowWater.WaterLevel += water.WaterLevel; voxBelow.WaterCell = belowWater; currentVoxel.WaterCell = WaterCell.Empty; HandleLiquidInteraction(voxBelow, water, belowWater); NeedsMinimapUpdate = true; ======= CreateSplash(currentVoxel.Coordinate.ToVector3(), aboveType); voxBelow.LiquidLevel += currentVoxel.LiquidLevel; currentVoxel.QuickSetLiquid(LiquidType.None, 0); HandleLiquidInteraction(voxBelow, aboveType, belowType); >>>>>>> NeedsMinimapUpdate = true; CreateSplash(currentVoxel.Coordinate.ToVector3(), aboveType); voxBelow.LiquidLevel += currentVoxel.LiquidLevel; currentVoxel.QuickSetLiquid(LiquidType.None, 0); HandleLiquidInteraction(voxBelow, aboveType, belowType); <<<<<<< CreateSplash(currentVoxel.Coordinate.ToVector3(), water.Type); water.WaterLevel = (byte)(water.WaterLevel - maxWaterLevel + belowWater.WaterLevel); belowWater.WaterLevel = maxWaterLevel; voxBelow.WaterCell = belowWater; currentVoxel.WaterCell = water; HandleLiquidInteraction(voxBelow, water, belowWater); NeedsMinimapUpdate = true; ======= CreateSplash(currentVoxel.Coordinate.ToVector3(), aboveType); currentVoxel.LiquidLevel = (byte)(currentVoxel.LiquidLevel - maxWaterLevel + voxBelow.LiquidLevel); voxBelow.LiquidLevel = maxWaterLevel; HandleLiquidInteraction(voxBelow, aboveType, belowType); >>>>>>> NeedsMinimapUpdate = true; CreateSplash(currentVoxel.Coordinate.ToVector3(), aboveType); currentVoxel.LiquidLevel = (byte)(currentVoxel.LiquidLevel - maxWaterLevel + voxBelow.LiquidLevel); voxBelow.LiquidLevel = maxWaterLevel; HandleLiquidInteraction(voxBelow, aboveType, belowType); <<<<<<< var amountToMove = (int)(water.WaterLevel * GetSpreadRate(water.Type)); if (neighborWater.WaterLevel + amountToMove > maxWaterLevel) amountToMove = maxWaterLevel - neighborWater.WaterLevel; var newWater = water.WaterLevel - amountToMove; currentVoxel.WaterCell = new WaterCell { Type = newWater == 0 ? LiquidType.None : water.Type, WaterLevel = (byte)(water.WaterLevel - amountToMove) }; neighborVoxel.WaterCell = new WaterCell { Type = neighborWater.Type == LiquidType.None ? water.Type : neighborWater.Type, WaterLevel = (byte)(neighborWater.WaterLevel + amountToMove) }; HandleLiquidInteraction(neighborVoxel, water, neighborWater); NeedsMinimapUpdate = true; ======= var amountToMove = (int)(currentVoxel.LiquidLevel * GetSpreadRate(currentVoxel.LiquidType)); if (neighborVoxel.LiquidLevel + amountToMove > maxWaterLevel) amountToMove = maxWaterLevel - neighborVoxel.LiquidLevel; var newWater = currentVoxel.LiquidLevel - amountToMove; var sourceType = currentVoxel.LiquidType; var destType = neighborVoxel.LiquidType; currentVoxel.QuickSetLiquid(newWater == 0 ? LiquidType.None : sourceType, (byte)newWater); neighborVoxel.QuickSetLiquid(destType == LiquidType.None ? sourceType : destType, (byte)(neighborVoxel.LiquidLevel + amountToMove)); HandleLiquidInteraction(neighborVoxel, sourceType, destType); >>>>>>> NeedsMinimapUpdate = true; var amountToMove = (int)(currentVoxel.LiquidLevel * GetSpreadRate(currentVoxel.LiquidType)); if (neighborVoxel.LiquidLevel + amountToMove > maxWaterLevel) amountToMove = maxWaterLevel - neighborVoxel.LiquidLevel; var newWater = currentVoxel.LiquidLevel - amountToMove; var sourceType = currentVoxel.LiquidType; var destType = neighborVoxel.LiquidType; currentVoxel.QuickSetLiquid(newWater == 0 ? LiquidType.None : sourceType, (byte)newWater); neighborVoxel.QuickSetLiquid(destType == LiquidType.None ? sourceType : destType, (byte)(neighborVoxel.LiquidLevel + amountToMove)); HandleLiquidInteraction(neighborVoxel, sourceType, destType);
<<<<<<< World.ShowToolPopup += text => GuiRoot.ShowTooltip(new Point(4, -16), new Gui.Widgets.ToolPopup ======= World.ShowToolPopup += text => GuiRoot.ShowTooltip(new Point(GuiRoot.MousePosition.X + 4, GuiRoot.MousePosition.Y - 16), new NewGui.ToolPopup >>>>>>> World.ShowToolPopup += text => GuiRoot.ShowTooltip(new Point(GuiRoot.MousePosition.X + 4, GuiRoot.MousePosition.Y - 16), new Gui.Widgets.ToolPopup <<<<<<< ItemSource = RoomLibrary.GetRoomTypes().Select(name => RoomLibrary.GetData(name)) .Select(data => new Gui.Widgets.ToolTray.Icon ======= ItemSource = RoomLibrary.GetRoomTypes().Select(RoomLibrary.GetData) .Select(data => new NewGui.ToolTray.Icon >>>>>>> ItemSource = RoomLibrary.GetRoomTypes().Select(RoomLibrary.GetData) .Select(data => new Gui.Widgets.ToolTray.Icon
<<<<<<< DigOrders.Add(GetVoxelQuickCompare(order.Vox), order); if (this == World.PlayerFaction) World.DesignationDrawer.HiliteVoxel(order.Vox.Coordinate, DesignationType.Dig); ======= DigOrders.Add(order.Vox, order); World.DesignationDrawer.HiliteVoxel(order.Vox.Coordinate, DesignationType.Dig); >>>>>>> DigOrders.Add(order.Vox, order); if (this == World.PlayerFaction) World.DesignationDrawer.HiliteVoxel(order.Vox.Coordinate, DesignationType.Dig); <<<<<<< DigOrders.Remove(q); if (this == World.PlayerFaction) World.DesignationDrawer.UnHiliteVoxel(vox.Coordinate, DesignationType.Dig); ======= DigOrders.Remove(vox); World.DesignationDrawer.UnHiliteVoxel(vox.Coordinate, DesignationType.Dig); >>>>>>> DigOrders.Remove(vox); if (this == World.PlayerFaction) World.DesignationDrawer.UnHiliteVoxel(vox.Coordinate, DesignationType.Dig);
<<<<<<< //App.InteractionViewModel.TabStripSelectedIndex = TabStrip.SelectedIndex; ======= Microsoft.UI.Xaml.Controls.FontIconSource icon = new Microsoft.UI.Xaml.Controls.FontIconSource(); icon.Glyph = "\xE713"; if ((tabView.SelectedItem as TabViewItem).Header.ToString() != ResourceController.GetTranslation("SidebarSettings/Text") && (tabView.SelectedItem as TabViewItem).IconSource != icon) { App.CurrentInstance = GetCurrentSelectedTabInstance<ModernShellPage>(); } >>>>>>> Microsoft.UI.Xaml.Controls.FontIconSource icon = new Microsoft.UI.Xaml.Controls.FontIconSource(); icon.Glyph = "\xE713"; if ((tabView.SelectedItem as TabViewItem).Header.ToString() != ResourceController.GetTranslation("SidebarSettings/Text") && (tabView.SelectedItem as TabViewItem).IconSource != icon) { App.CurrentInstance = GetCurrentSelectedTabInstance<ModernShellPage>(); } //App.InteractionViewModel.TabStripSelectedIndex = TabStrip.SelectedIndex;