From 2da0eb3bd15d24129d0a85e4ce0ee57f858e6ba9 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Sat, 22 Dec 2018 23:44:18 +0800 Subject: [PATCH] First commit --- .gitignore | 223 +++++++++++ HFUTCourseSimulation.sln | 25 ++ HFUTCourseSimulation/App.config | 6 + HFUTCourseSimulation/App.xaml | 9 + HFUTCourseSimulation/App.xaml.cs | 15 + HFUTCourseSimulation/Course.cs | 56 +++ HFUTCourseSimulation/General.cs | 18 + .../HFUTCourseSimulation.csproj | 108 ++++++ HFUTCourseSimulation/MainWindow.xaml | 134 +++++++ HFUTCourseSimulation/MainWindow.xaml.cs | 350 ++++++++++++++++++ .../Properties/AssemblyInfo.cs | 55 +++ .../Properties/Resources.Designer.cs | 62 ++++ .../Properties/Resources.resx | 117 ++++++ .../Properties/Settings.Designer.cs | 26 ++ .../Properties/Settings.settings | 7 + HFUTCourseSimulation/Simulation.xaml | 110 ++++++ HFUTCourseSimulation/Simulation.xaml.cs | 197 ++++++++++ HFUTCourseSimulation/SimulationItem.cs | 35 ++ HFUTCourseSimulation/packages.config | 4 + LICENSE | 21 ++ 20 files changed, 1578 insertions(+) create mode 100644 .gitignore create mode 100644 HFUTCourseSimulation.sln create mode 100644 HFUTCourseSimulation/App.config create mode 100644 HFUTCourseSimulation/App.xaml create mode 100644 HFUTCourseSimulation/App.xaml.cs create mode 100644 HFUTCourseSimulation/Course.cs create mode 100644 HFUTCourseSimulation/General.cs create mode 100644 HFUTCourseSimulation/HFUTCourseSimulation.csproj create mode 100644 HFUTCourseSimulation/MainWindow.xaml create mode 100644 HFUTCourseSimulation/MainWindow.xaml.cs create mode 100644 HFUTCourseSimulation/Properties/AssemblyInfo.cs create mode 100644 HFUTCourseSimulation/Properties/Resources.Designer.cs create mode 100644 HFUTCourseSimulation/Properties/Resources.resx create mode 100644 HFUTCourseSimulation/Properties/Settings.Designer.cs create mode 100644 HFUTCourseSimulation/Properties/Settings.settings create mode 100644 HFUTCourseSimulation/Simulation.xaml create mode 100644 HFUTCourseSimulation/Simulation.xaml.cs create mode 100644 HFUTCourseSimulation/SimulationItem.cs create mode 100644 HFUTCourseSimulation/packages.config create mode 100644 LICENSE diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6910213 --- /dev/null +++ b/.gitignore @@ -0,0 +1,223 @@ +## Ignore Visual Studio build files, cache files, and rubbish files. +## This .gitignore file only use in this project(bus_rode). + +# Windows +Thumbs.db +ehthumbs.db +Desktop.ini + +*.dat +*.db + + +## ------------------------Visual Studio normal settings--------------------------------------- + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Visual Studio 2015 cache/options directory +.vs/ + +# Build result +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +## TODO: Comment the next line if you want to checkin your +## web deploy settings but do note that will include unencrypted +## passwords +#*.pubxml + +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml diff --git a/HFUTCourseSimulation.sln b/HFUTCourseSimulation.sln new file mode 100644 index 0000000..19b32d7 --- /dev/null +++ b/HFUTCourseSimulation.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2047 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HFUTCourseSimulation", "HFUTCourseSimulation\HFUTCourseSimulation.csproj", "{25CF9351-6A95-48AC-89D1-B3700593ADE4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {25CF9351-6A95-48AC-89D1-B3700593ADE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25CF9351-6A95-48AC-89D1-B3700593ADE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25CF9351-6A95-48AC-89D1-B3700593ADE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25CF9351-6A95-48AC-89D1-B3700593ADE4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {20F50CFE-0517-4471-BB0D-64563A817585} + EndGlobalSection +EndGlobal diff --git a/HFUTCourseSimulation/App.config b/HFUTCourseSimulation/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/HFUTCourseSimulation/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/HFUTCourseSimulation/App.xaml b/HFUTCourseSimulation/App.xaml new file mode 100644 index 0000000..ba4cde3 --- /dev/null +++ b/HFUTCourseSimulation/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/HFUTCourseSimulation/App.xaml.cs b/HFUTCourseSimulation/App.xaml.cs new file mode 100644 index 0000000..8920e3b --- /dev/null +++ b/HFUTCourseSimulation/App.xaml.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace HFUTCourseSimulation { + /// + /// App.xaml 的交互逻辑 + /// + public partial class App : Application { + } +} diff --git a/HFUTCourseSimulation/Course.cs b/HFUTCourseSimulation/Course.cs new file mode 100644 index 0000000..ccee6b0 --- /dev/null +++ b/HFUTCourseSimulation/Course.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HFUTCourseSimulation { + + public class Semester { + + public Semester() { + this.Courses = new List(); + StartDate = DateTime.Today.ToString(); + WeekCount = 1; + } + + public string StartDate { get; set; } + public int WeekCount { get; set; } + public List Courses { get; set; } + } + + public class CourseItem { + + public CourseItem() { + this.Schedule = new List(); + } + + public string Name { get; set; } + public string Description { get; set; } + + public List Schedule { get; set; } + + public CourseItem Clone() { + var newobj = new CourseItem(); + newobj.Name = this.Name; + newobj.Description = this.Description; + newobj.Schedule = new List(); + newobj.Schedule.AddRange((from item in this.Schedule select item.Clone())); + return newobj; + } + } + + public class ScheduleItem { + public string Week { get; set; } + public string Day { get; set; } + public string Index { get; set; } + + public ScheduleItem Clone() { + return new ScheduleItem() { Week = this.Week, Index = this.Index, Day = this.Day }; + } + public override string ToString() { + return Week + " - " + Day + " - " + Index; + } + } + +} diff --git a/HFUTCourseSimulation/General.cs b/HFUTCourseSimulation/General.cs new file mode 100644 index 0000000..b5cc3e9 --- /dev/null +++ b/HFUTCourseSimulation/General.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HFUTCourseSimulation { + public static class General { + + public static Semester GeneralSheet; + + public static CourseItem CourseCache = new CourseItem(); + public static ScheduleItem ScheduleCache = new ScheduleItem(); + + public static string FilePath = ""; + + } +} diff --git a/HFUTCourseSimulation/HFUTCourseSimulation.csproj b/HFUTCourseSimulation/HFUTCourseSimulation.csproj new file mode 100644 index 0000000..bf92600 --- /dev/null +++ b/HFUTCourseSimulation/HFUTCourseSimulation.csproj @@ -0,0 +1,108 @@ + + + + + Debug + AnyCPU + {25CF9351-6A95-48AC-89D1-B3700593ADE4} + WinExe + HFUTCourseSimulation + HFUTCourseSimulation + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + + + + + Simulation.xaml + + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + \ No newline at end of file diff --git a/HFUTCourseSimulation/MainWindow.xaml b/HFUTCourseSimulation/MainWindow.xaml new file mode 100644 index 0000000..bbc0100 --- /dev/null +++ b/HFUTCourseSimulation/MainWindow.xaml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +