Skip to content

Commit

Permalink
1.1.4
Browse files Browse the repository at this point in the history
- Fixed an issue with receiving/giving items parsing for items that contained spaces or numbers.
  • Loading branch information
VashBaldeus committed Oct 5, 2021
1 parent 20add74 commit 5e28401
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 71 deletions.
Binary file modified .vs/Screenshot_Editor/v16/.suo
Binary file not shown.
44 changes: 44 additions & 0 deletions GTAWorld Screenshot Editor/Models/Text.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,55 @@
using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Effects;
using ExtensionMethods;

namespace GTAWorld_Screenshot_Editor.Models
{
public class TextBlockModel : OnPropertyChange
{
private double _top;

public double Top
{
get => _top;
set { _top = value; OnPropertyChanged(); }
}

private double _left;

public double Left
{
get => _left;
set { _left = value; OnPropertyChanged(); }
}

private string _blockName = string.Empty;

public string BlockName
{
get => _blockName;
set { _blockName = value; OnPropertyChanged(); }
}

private string _parsedChat = string.Empty;

public string ParsedChat
{
get => _parsedChat;
set { _parsedChat = value; OnPropertyChanged(); }
}

private ObservableCollection<ImageText> _texts = new ObservableCollection<ImageText>();

public ObservableCollection<ImageText> Texts
{
get => _texts;
set { _texts = value; OnPropertyChanged(); }
}
}

public class ImageText : OnPropertyChange
{
private string _text = string.Empty;
Expand Down
4 changes: 2 additions & 2 deletions GTAWorld Screenshot Editor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.3.0")]
[assembly: AssemblyFileVersion("1.1.3.0")]
[assembly: AssemblyVersion("1.1.4.0")]
[assembly: AssemblyFileVersion("1.1.4.0")]
6 changes: 3 additions & 3 deletions GTAWorld Screenshot Editor/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ private void InitFilters()
{
Selected = true,
Name = "Items",
Filter = @"^You (gave|received) [\p{L}]+ \((\d{1,2})\) (to|from) [\p{L}]+ [\p{L}]+.$"
Filter = @"^You (gave|received) ([\p{L}]+)(?<AMOUNT>[\d.,]+){0,1}(\s){0,1}([\p{L}]+){0,1}(\s){0,1}(?<AMOUNT>[\d.,]+){0,1}\((\d{1,2})\) (to|from) ([\p{L}]+ [\p{L}]+).$"
},

new Criteria
Expand Down Expand Up @@ -900,7 +900,7 @@ private void GenerateText()

//replace given/received item amount with '(x)'
if (Regex.IsMatch(str,
@"^You (gave|received) [\p{L}]+ \((\d{1,2})\) (to|from) [\p{L}]+ [\p{L}]+.$"))
@"^You (gave|received) ([\p{L}]+)(?<AMOUNT>[\d.,]+){0,1}(\s){0,1}([\p{L}]+){0,1}(\s){0,1}(?<AMOUNT>[\d.,]+){0,1}\((\d{1,2})\) (to|from) ([\p{L}]+ [\p{L}]+).$"))
{
str = Regex.Replace(str, @"\((?<AMOUNT>[\d.]+)\)", "(x)");
}
Expand Down Expand Up @@ -974,7 +974,7 @@ private string GetColor(string line)

//money & item transfers
if (Regex.IsMatch(line, @"^[\p{L}]+ [\p{L}]+ paid you (?<SYMBOL>[$]){1}(?<AMOUNT>[\d.,]+)\.$|^You paid (?<SYMBOL>[$]){1}(?<AMOUNT>[\d.,]+) to ([\p{L}]+ {0,1} [\p{L}]+ {0,1})\.$")
|| Regex.IsMatch(line, @"^You (gave|received) [\p{L}]+ \((\d{1,2})\) (to|from) [\p{L}]+ [\p{L}]+.$"))
|| Regex.IsMatch(line, @"^You (gave|received) ([\p{L}]+)(?<AMOUNT>[\d.,]+){0,1}(\s){0,1}([\p{L}]+){0,1}(\s){0,1}(?<AMOUNT>[\d.,]+){0,1}\((\d{1,2})\) (to|from) ([\p{L}]+ [\p{L}]+).$"))
{
return "#29943e";//green
}
Expand Down
Binary file not shown.
Binary file modified GTAWorld Screenshot Editor/bin/Release/Release.zip
Binary file not shown.
Binary file modified GTAWorld Screenshot Editor/obj/Release/App.baml
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ C:\Users\xcast\Documents\GitHub\Screenshot_Editor\Screenshot_Editor\GTAWorld Scr
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\bin\Release\GTAWorld Screenshot Editor.exe.config
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\bin\Release\GTAWorld Screenshot Editor.exe
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\bin\Release\GTAWorld Screenshot Editor.pdb
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\obj\Release\GTAWorld Screenshot Editor.csproj.AssemblyReference.cache
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\obj\Release\Views\MainWindow.g.cs
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\obj\Release\App.g.cs
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\obj\Release\GeneratedInternalTypeHelper.g.cs
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
winexe
C#
.cs
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\Screenshot_Editor\GTAWorld Screenshot Editor\obj\Release\
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\obj\Release\
GTAWorld_Screenshot_Editor
none
false
TRACE
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\Screenshot_Editor\GTAWorld Screenshot Editor\App.xaml
C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\App.xaml
11892971807

19-1789092186
2791481634063
278-1408080405
Views\MainWindow.xaml;

False
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

C:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\obj\Release\GeneratedInternalTypeHelper.g.cs
FC:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\App.xaml;;
FC:\Users\xcast\Documents\GitHub\Screenshot_Editor\GTAWorld Screenshot Editor\Views\MainWindow.xaml;;

Original file line number Diff line number Diff line change
@@ -1,62 +1,2 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace XamlGeneratedNamespace {


/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {

/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}

/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}

/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}

/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}

/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}


Binary file modified GTAWorld Screenshot Editor/obj/Release/Views/MainWindow.baml
Binary file not shown.

0 comments on commit 5e28401

Please sign in to comment.