Skip to content

Chshine1/CSimpleSchedule

Repository files navigation

CSimpleSchedule

This is a diary project developed using C# and .NET Core. It consists of an api server, and a client application.

Getting Started

The lauch settings of the server are written in

DiaryProject.Api/Properties/launchSettings.json

The client registers the url in DiaryProject/App.xaml.cs by

containerRegistry.RegisterInstance("/*url*/", "webUrl");

which is accessed via dependency injection.

In my usage the api server is hosted on IIS Express on localhost.

Usage

When the users start the client application, they arrive at the login page. If connected to server the user can register or log in, then can choose between using local data or cloud data. Or in any case user can choose offline mode which uses local data.

GitHub图像

After the above process is done, the user arrives at the main page. The leftmost column concists of four bunttons transition between pages:

User

This is the page where the user can log out or choose between local and cloud data. If the user uses offline mode then this page is not accessable.

Calendar

This displays the calendar of a month, active records in a day will be displayed in the corresponding unit.

GitHub图像

When a unit of day is selected, the user can click the Editor tab on the left or double-click the unit to edit its records.

Editor

The editor lists all records in the day, where the user can add/delete and enable/disable records. The user can also edit their title, category and time. By clicking the expand button the user can edit the content of the record.

GitHub图像

Hover

This provides hover settings, as well as explanation for how hover works.

Structure

The solution consists of three projects:

DiaryProject.Shared

This project consists of the shared classes used in both the client and the server, as well as some utils.

DiaryProject.Api

This is the api server, the entry point is at Program.cs, where services are injected building the web application.

Service

This consists of a generic base interface IBaseService which provides async methods operating the database on the server, then return an api response.

The generic types are implemented in IMemoService and IUserService providing services of the corresponding kind, and the methods' implementation are given in MemoService and UserService.

Context

This provides repositories consisting of DB contexts providing access to database, they are organized in a Unit of Work.

Controllers

This provides api controllers in a RESTful style.

DiaryProject

This is the client, the entry point is at App.xaml.cs which also uses DI. This is written in an MVC structure.

Service

The idea is the same as that on the server side, but here there are local services and web services. The local one operates on the local database and the web one sends requests to the server.

Local operations are implemented with accessing a local database in SQLite. Web request are written in a RESTful style using RestSharp.

Views & ViewModels

Views consists of user pages written in .xaml, bound to their view models.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages