190 lines
5.4 KiB
C#
190 lines
5.4 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated />
|
|
//
|
|
// This file was automatically generated by SWIG (https://www.swig.org).
|
|
// Version 4.1.1
|
|
//
|
|
// Do not make changes to this file unless you know what you are doing - modify
|
|
// the SWIG interface file instead.
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
public class Day : global::System.IDisposable {
|
|
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
|
protected bool swigCMemOwn;
|
|
|
|
internal Day(global::System.IntPtr cPtr, bool cMemoryOwn) {
|
|
swigCMemOwn = cMemoryOwn;
|
|
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
|
}
|
|
|
|
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Day obj) {
|
|
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
|
}
|
|
|
|
internal static global::System.Runtime.InteropServices.HandleRef swigRelease(Day obj) {
|
|
if (obj != null) {
|
|
if (!obj.swigCMemOwn)
|
|
throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
|
|
global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
|
|
obj.swigCMemOwn = false;
|
|
obj.Dispose();
|
|
return ptr;
|
|
} else {
|
|
return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
|
}
|
|
}
|
|
|
|
~Day() {
|
|
Dispose(false);
|
|
}
|
|
|
|
public void Dispose() {
|
|
Dispose(true);
|
|
global::System.GC.SuppressFinalize(this);
|
|
}
|
|
|
|
protected virtual void Dispose(bool disposing) {
|
|
lock(this) {
|
|
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
|
if (swigCMemOwn) {
|
|
swigCMemOwn = false;
|
|
sxtwlPINVOKE.delete_Day(swigCPtr);
|
|
}
|
|
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static Day fromSolar(int _year, byte _month, int _day) {
|
|
global::System.IntPtr cPtr = sxtwlPINVOKE.Day_fromSolar(_year, _month, _day);
|
|
Day ret = (cPtr == global::System.IntPtr.Zero) ? null : new Day(cPtr, false);
|
|
return ret;
|
|
}
|
|
|
|
public static Day fromLunar(int year, byte month, int day, bool isRun) {
|
|
global::System.IntPtr cPtr = sxtwlPINVOKE.Day_fromLunar__SWIG_0(year, month, day, isRun);
|
|
Day ret = (cPtr == global::System.IntPtr.Zero) ? null : new Day(cPtr, false);
|
|
return ret;
|
|
}
|
|
|
|
public static Day fromLunar(int year, byte month, int day) {
|
|
global::System.IntPtr cPtr = sxtwlPINVOKE.Day_fromLunar__SWIG_1(year, month, day);
|
|
Day ret = (cPtr == global::System.IntPtr.Zero) ? null : new Day(cPtr, false);
|
|
return ret;
|
|
}
|
|
|
|
public Day after(int day) {
|
|
global::System.IntPtr cPtr = sxtwlPINVOKE.Day_after(swigCPtr, day);
|
|
Day ret = (cPtr == global::System.IntPtr.Zero) ? null : new Day(cPtr, false);
|
|
return ret;
|
|
}
|
|
|
|
public Day before(int day) {
|
|
global::System.IntPtr cPtr = sxtwlPINVOKE.Day_before(swigCPtr, day);
|
|
Day ret = (cPtr == global::System.IntPtr.Zero) ? null : new Day(cPtr, false);
|
|
return ret;
|
|
}
|
|
|
|
public int getLunarDay() {
|
|
int ret = sxtwlPINVOKE.Day_getLunarDay(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public byte getLunarMonth() {
|
|
byte ret = sxtwlPINVOKE.Day_getLunarMonth(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public int getLunarYear(bool chineseNewYearBoundary) {
|
|
int ret = sxtwlPINVOKE.Day_getLunarYear__SWIG_0(swigCPtr, chineseNewYearBoundary);
|
|
return ret;
|
|
}
|
|
|
|
public int getLunarYear() {
|
|
int ret = sxtwlPINVOKE.Day_getLunarYear__SWIG_1(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public GZ getYearGZ(bool chineseNewYearBoundary) {
|
|
GZ ret = new GZ(sxtwlPINVOKE.Day_getYearGZ__SWIG_0(swigCPtr, chineseNewYearBoundary), true);
|
|
return ret;
|
|
}
|
|
|
|
public GZ getYearGZ() {
|
|
GZ ret = new GZ(sxtwlPINVOKE.Day_getYearGZ__SWIG_1(swigCPtr), true);
|
|
return ret;
|
|
}
|
|
|
|
public GZ getMonthGZ() {
|
|
GZ ret = new GZ(sxtwlPINVOKE.Day_getMonthGZ(swigCPtr), true);
|
|
return ret;
|
|
}
|
|
|
|
public GZ getDayGZ() {
|
|
GZ ret = new GZ(sxtwlPINVOKE.Day_getDayGZ(swigCPtr), true);
|
|
return ret;
|
|
}
|
|
|
|
public GZ getHourGZ(byte hour, bool isZaoWanZiShi) {
|
|
GZ ret = new GZ(sxtwlPINVOKE.Day_getHourGZ__SWIG_0(swigCPtr, hour, isZaoWanZiShi), true);
|
|
return ret;
|
|
}
|
|
|
|
public GZ getHourGZ(byte hour) {
|
|
GZ ret = new GZ(sxtwlPINVOKE.Day_getHourGZ__SWIG_1(swigCPtr, hour), true);
|
|
return ret;
|
|
}
|
|
|
|
public bool isLunarLeap() {
|
|
bool ret = sxtwlPINVOKE.Day_isLunarLeap(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public int getSolarYear() {
|
|
int ret = sxtwlPINVOKE.Day_getSolarYear(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public byte getSolarMonth() {
|
|
byte ret = sxtwlPINVOKE.Day_getSolarMonth(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public int getSolarDay() {
|
|
int ret = sxtwlPINVOKE.Day_getSolarDay(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public byte getWeek() {
|
|
byte ret = sxtwlPINVOKE.Day_getWeek(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public byte getWeekIndex() {
|
|
byte ret = sxtwlPINVOKE.Day_getWeekIndex(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public bool hasJieQi() {
|
|
bool ret = sxtwlPINVOKE.Day_hasJieQi(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public byte getJieQi() {
|
|
byte ret = sxtwlPINVOKE.Day_getJieQi(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public double getJieQiJD() {
|
|
double ret = sxtwlPINVOKE.Day_getJieQiJD(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
public byte getConstellation() {
|
|
byte ret = sxtwlPINVOKE.Day_getConstellation(swigCPtr);
|
|
return ret;
|
|
}
|
|
|
|
}
|