Files
HFUTCourseSimulation/HFUTCourseSimulation/SimulationItem.cs
2018-12-26 15:55:33 +08:00

57 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace HFUTCourseSimulation {
public class SimulationItem {
public string Name { get; set; }
public string Desc { get; set; }
public Color BkColor { get; set; }
}
public struct Vector3 {
public Vector3(int x, int y, int z) {
teachingweek = x;
week = y;
index = z;
}
public int teachingweek;
public int week;
public int index;
public static Vector3 operator+(Vector3 a, Vector3 b) {
return new Vector3(a.teachingweek + b.teachingweek,
a.week + b.week, a.index + b.index);
}
public static bool operator ==(Vector3 a, Vector3 b) {
return (a.teachingweek == b.teachingweek && a.week == b.week && a.index == b.index);
}
public static bool operator !=(Vector3 a, Vector3 b) {
return !(a == b);
}
public override bool Equals(object obj) {
return (Vector3)obj == this;
}
}
//===========================================================================
public class RenderWeek {
public int WeekIndex { get; set; }
public List<string> WeekDate { get; set; }
public List<SimulationRenderItem> CourseList { get; set; }
}
public class SimulationRenderItem : SimulationItem {
public Vector3 Start { get; set; }
public int Span { get; set; }
}
}