mirror of
https://github.com/VitalickS/BrightSharp.Toolkit.git
synced 2026-03-21 02:21:15 +00:00
Initial
This commit is contained in:
33
JetFrames.AppleJobs.Editor/ViewModelLocator.cs
Normal file
33
JetFrames.AppleJobs.Editor/ViewModelLocator.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using AppleJobs.Data;
|
||||
using BrightSharp.Mvvm;
|
||||
using MySql.Data.MySqlClient;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity.Core.EntityClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JetFrames.AppleJobs.Editor
|
||||
{
|
||||
public class ViewModelLocator
|
||||
{
|
||||
AppleJobsContext context;
|
||||
public ViewModelLocator()
|
||||
{
|
||||
if (ObservableObject.IsInDesignTime)
|
||||
{
|
||||
context = new AppleJobsContext("server=138.201.230.158;user id=admin_applejobs;pwd=dPARP0etzx;database=admin_applejobs_dev;CharSet=utf8;");
|
||||
}
|
||||
else
|
||||
{
|
||||
context = new AppleJobsContext();
|
||||
}
|
||||
Editor = new EditorViewModel(context);
|
||||
}
|
||||
|
||||
public EditorViewModel Editor { get; private set; }
|
||||
|
||||
public Properties.Settings Settings { get { return Properties.Settings.Default; } }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user