|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
using rabi_splitter_WPF.Annotations;
|
|
|
|
|
|
|
|
|
|
namespace rabi_splitter_WPF
|
|
|
|
|
{
|
|
|
|
|
[ValueConversion(typeof(bool), typeof(bool))]
|
|
|
|
|
public class InverseBooleanConverter : IValueConverter
|
|
|
|
|
{
|
|
|
|
|
#region IValueConverter Members
|
|
|
|
|
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter,
|
|
|
|
|
System.Globalization.CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
if (targetType != typeof(bool))
|
|
|
|
|
throw new InvalidOperationException("The target must be a boolean");
|
|
|
|
|
|
|
|
|
|
return !(bool)value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter,
|
|
|
|
|
System.Globalization.CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
throw new NotSupportedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
public class BossData:INotifyPropertyChanged
|
|
|
|
|
{
|
|
|
|
|
private int _bossIdx;
|
|
|
|
|
private int _bossId;
|
|
|
|
|
private int _bossHp;
|
|
|
|
|
|
|
|
|
|
public int BossIdx
|
|
|
|
|
{
|
|
|
|
|
get { return _bossIdx; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _bossIdx) return;
|
|
|
|
|
_bossIdx = value;
|
|
|
|
|
OnPropertyChanged(nameof(BossIdx));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int BossID
|
|
|
|
|
{
|
|
|
|
|
get { return _bossId; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _bossId) return;
|
|
|
|
|
_bossId = value;
|
|
|
|
|
OnPropertyChanged(nameof(BossID));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int BossHP
|
|
|
|
|
{
|
|
|
|
|
get { return _bossHp; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _bossHp) return;
|
|
|
|
|
_bossHp = value;
|
|
|
|
|
OnPropertyChanged(nameof(BossHP));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
|
|
|
[NotifyPropertyChangedInvocator]
|
|
|
|
|
protected virtual void OnPropertyChanged(string propertyName)
|
|
|
|
|
{
|
|
|
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class DebugContext : INotifyPropertyChanged
|
|
|
|
|
{
|
|
|
|
|
private bool _bossEvent;
|
|
|
|
|
private string _debugLog;
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<BossData> BossList = new ObservableCollection<BossData>();
|
|
|
|
|
|
|
|
|
|
public DebugContext()
|
|
|
|
|
{
|
|
|
|
|
BossList=new ObservableCollection<BossData>();
|
|
|
|
|
for (int i = 0; i < 50; i++)
|
|
|
|
|
{
|
|
|
|
|
BossList.Add(new BossData()
|
|
|
|
|
{
|
|
|
|
|
BossIdx = i
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool BossEvent
|
|
|
|
|
{
|
|
|
|
|
get { return _bossEvent; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _bossEvent) return;
|
|
|
|
|
_bossEvent = value;
|
|
|
|
|
OnPropertyChanged(nameof(BossEvent));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string DebugLog
|
|
|
|
|
{
|
|
|
|
|
get { return _debugLog; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _debugLog) return;
|
|
|
|
|
_debugLog = value;
|
|
|
|
|
OnPropertyChanged(nameof(DebugLog));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Log(string message)
|
|
|
|
|
{
|
|
|
|
|
this.DebugLog += message + "\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
|
|
|
[NotifyPropertyChangedInvocator]
|
|
|
|
|
protected virtual void OnPropertyChanged(string propertyName)
|
|
|
|
|
{
|
|
|
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class MainContext : INotifyPropertyChanged
|
|
|
|
|
{
|
|
|
|
|
public string oldtitle;
|
|
|
|
|
public int veridx;
|
|
|
|
|
|
|
|
|
|
private int _serverPort;
|
|
|
|
|
private string _gameVer;
|
|
|
|
|
private string _gameMusic;
|
|
|
|
|
private bool _igt;
|
|
|
|
|
|
|
|
|
|
private string _text1;
|
|
|
|
|
private string _text2;
|
|
|
|
|
private string _text3;
|
|
|
|
|
private string _text4;
|
|
|
|
|
private string _text5;
|
|
|
|
|
private string _text6;
|
|
|
|
|
private string _text7;
|
|
|
|
|
private string _text8;
|
|
|
|
|
private string _text9;
|
|
|
|
|
private string _text10;
|
|
|
|
|
private string _text11;
|
|
|
|
|
private string _text12;
|
|
|
|
|
private string _text13;
|
|
|
|
|
private string _text14;
|
|
|
|
|
private string _text15;
|
|
|
|
|
|
|
|
|
|
public string Text1
|
|
|
|
|
{
|
|
|
|
|
get { return _text1; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text1) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text2
|
|
|
|
|
{
|
|
|
|
|
get { return _text2; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text2) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text2));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text3
|
|
|
|
|
{
|
|
|
|
|
get { return _text3; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text3) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text3));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text4
|
|
|
|
|
{
|
|
|
|
|
get { return _text4; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text4) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text4));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text5
|
|
|
|
|
{
|
|
|
|
|
get { return _text5; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text5) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text5));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text6
|
|
|
|
|
{
|
|
|
|
|
get { return _text6; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text6) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text6));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text7
|
|
|
|
|
{
|
|
|
|
|
get { return _text7; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text7) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text7));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text8
|
|
|
|
|
{
|
|
|
|
|
get { return _text8; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text8) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text8));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text9
|
|
|
|
|
{
|
|
|
|
|
get { return _text9; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text9) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text9));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text10
|
|
|
|
|
{
|
|
|
|
|
get { return _text10; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text10) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text10));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text11
|
|
|
|
|
{
|
|
|
|
|
get { return _text11; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text11) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text11));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text12
|
|
|
|
|
{
|
|
|
|
|
get { return _text12; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text12) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text12));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text13
|
|
|
|
|
{
|
|
|
|
|
get { return _text13; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text13) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text13));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text14
|
|
|
|
|
{
|
|
|
|
|
get { return _text14; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text14) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text14));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text15
|
|
|
|
|
{
|
|
|
|
|
get { return _text15; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _text15) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(Text15));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int ServerPort
|
|
|
|
|
{
|
|
|
|
|
get { return _serverPort; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _serverPort) return;
|
|
|
|
|
_serverPort = value;
|
|
|
|
|
OnPropertyChanged(nameof(ServerPort));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string GameVer
|
|
|
|
|
{
|
|
|
|
|
get { return _gameVer; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _gameVer) return;
|
|
|
|
|
_gameVer = value;
|
|
|
|
|
OnPropertyChanged(nameof(GameVer));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string GameMusic
|
|
|
|
|
{
|
|
|
|
|
get { return _gameMusic; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _gameMusic) return;
|
|
|
|
|
_gameMusic = value;
|
|
|
|
|
OnPropertyChanged(nameof(GameMusic));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Igt
|
|
|
|
|
{
|
|
|
|
|
get { return _igt; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == _igt) return;
|
|
|
|
|
_igt = value;
|
|
|
|
|
OnPropertyChanged(nameof(Igt));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public MainContext()
|
|
|
|
|
{
|
|
|
|
|
this.ServerPort = 16834;
|
|
|
|
|
this.Igt = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
|
|
|
[NotifyPropertyChangedInvocator]
|
|
|
|
|
protected virtual void OnPropertyChanged(string propertyName)
|
|
|
|
|
{
|
|
|
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|