Changes
This commit is contained in:
parent
97a9ae2462
commit
5c1033bdb3
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.openeggbert.jdotnet.JDotNet;
|
||||
|
||||
import com.openeggbert.jdotnet.System.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
public class JDotNetException extends RuntimeException {
|
||||
public JDotNetException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
}
|
@ -10,8 +10,9 @@ package com.openeggbert.jdotnet.System;
|
||||
*/
|
||||
public interface EventHandler<T> {
|
||||
|
||||
void addValueChangedListener(ValueChangedListener<T> listener);
|
||||
void removeValueChangedListener(ValueChangedListener<T> listener);
|
||||
void addEventListener(EventListener<T> listener);
|
||||
void removeEventListener(EventListener<T> listener);
|
||||
void invoke(T eventArgs);
|
||||
|
||||
|
||||
}
|
||||
|
@ -15,16 +15,23 @@ import java.util.List;
|
||||
@AdditionalClassForDotNetSimulation
|
||||
public class EventHandlerImpl<T> implements EventHandler<T> {
|
||||
|
||||
private final List<ValueChangedListener<T>> list = new ArrayList<>();
|
||||
private final List<EventListener<T>> list = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void addValueChangedListener(ValueChangedListener<T> listener) {
|
||||
public void addEventListener(EventListener<T> listener) {
|
||||
list.add(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeValueChangedListener(ValueChangedListener<T> listener) {
|
||||
public void removeEventListener(EventListener<T> listener) {
|
||||
list.remove(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(T eventArgs) {
|
||||
for(EventListener<T> e : list) {
|
||||
e.onEventHappened(eventArgs);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,8 +11,8 @@ import com.openeggbert.jdotnet.JDotNet.AdditionalClassForDotNetSimulation;
|
||||
* @author robertvokac
|
||||
*/
|
||||
@AdditionalClassForDotNetSimulation
|
||||
public interface ValueChangedListener<T>{
|
||||
public interface EventListener<T>{
|
||||
|
||||
void onValueChanged(T eventArgs);
|
||||
void onEventHappened(T eventArgs);
|
||||
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System;
|
||||
|
||||
import com.openeggbert.jdotnet.JDotNet.JDotNetException;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
@ -11,7 +12,7 @@ import lombok.AllArgsConstructor;
|
||||
* @author robertvokac
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
public class Exception_ extends RuntimeException {
|
||||
public class Exception_ extends JDotNetException {
|
||||
public Exception_(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
@ -4,18 +4,22 @@
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System.Globalization;
|
||||
|
||||
import com.openeggbert.jdotnet.System.IFormatProvider;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public class CultureInfo {
|
||||
public class CultureInfo implements IFormatProvider {
|
||||
public static CultureInfo getCurrentCulture() {
|
||||
//todo
|
||||
return null;
|
||||
}
|
||||
@Getter
|
||||
private String TwoLetterISOLanguageName;
|
||||
|
||||
public static final CultureInfo InvariantCulture = new CultureInfo();//todo
|
||||
// public String ToString(StringBuilder sb, int number) {
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System.Text;
|
||||
package com.openeggbert.jdotnet.System;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public class NewClass {
|
||||
public interface IFormatProvider {
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System.IO;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public enum FileMode {
|
||||
CreateNew(1),
|
||||
Create(2),
|
||||
Open(3),
|
||||
OpenOrCreate(4),
|
||||
Truncate(5),
|
||||
Append(6);
|
||||
|
||||
FileMode(int number) {
|
||||
this.number = number;
|
||||
}
|
||||
@Getter
|
||||
private final int number;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System.IO.IsolatedStorage;
|
||||
|
||||
import com.openeggbert.jdotnet.System.Exception_;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public class IsolatedStorageException extends Exception_ {
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System.IO.IsolatedStorage;
|
||||
|
||||
import com.openeggbert.jdotnet.System.IO.FileMode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public class IsolatedStorageFile {
|
||||
public static IsolatedStorageFile GetUserStoreForApplication() {
|
||||
return null;//todo
|
||||
}
|
||||
public boolean FileExists(String path) {
|
||||
return true;//todo
|
||||
}
|
||||
public IsolatedStorageFileStream OpenFile(String path, FileMode mode) {
|
||||
return null;//todo
|
||||
}
|
||||
public void DeleteFile(String path) {
|
||||
//todo
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System.IO.IsolatedStorage;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public class IsolatedStorageFileStream {
|
||||
|
||||
public int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
return 0;//todo
|
||||
}
|
||||
public void Write(byte[] buffer, int offset, int count) {
|
||||
//todo
|
||||
}
|
||||
|
||||
public void Close() {
|
||||
//todo
|
||||
}
|
||||
public int Length = 0;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System.Text;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public class Encoding {
|
||||
|
||||
public static final Encoding UTF8 = new Encoding();//todo
|
||||
|
||||
public String GetString(byte[] bytes, int index, int count) {
|
||||
return "";
|
||||
//todo
|
||||
}
|
||||
|
||||
public byte[] GetBytes(String s) {
|
||||
return null;
|
||||
//todo
|
||||
}
|
||||
|
||||
}
|
14
src/main/java/com/openeggbert/jdotnet/System/TimeSpan.java
Normal file
14
src/main/java/com/openeggbert/jdotnet/System/TimeSpan.java
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.openeggbert.jdotnet.System;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public class TimeSpan {
|
||||
public static TimeSpan FromTicks(long ticks) {return null;}
|
||||
public static TimeSpan FromSeconds(double seconds) {return null;}
|
||||
}
|
Reference in New Issue
Block a user