public EFKimaiTimeEntries(EFDbContext context, IConfig configuration, IActivities activities = null) : base(context, configuration)
        {
            Entries = DbSet = Context.KimaiTimeEntries;

            ConnectionString = Configuration.GetKey("APISources:Kimai:Mysql_CS");
            TimeZone         = Configuration.GetKey("APISources:Kimai:TimeZone");

            _activities = activities ?? new Activities(ConnectionString, TimeZone);
        }
Exemple #2
0
        private async Task Run()
        {
            // Read config.
            var execDir    = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var configPath = Path.Combine(execDir, "config.toml");

            config = Toml.ReadFile <Configuration>(configPath);

            obs = new OBSWebsocket();
            obs.Connect(config.Connection.URL, config.Connection.Password);

            _activityManager =
                Connection.Session.CreateProxy <IActivities>("org.kde.ActivityManager", "/ActivityManager/Activities");

            try
            {
                await Everything();
            }
            finally
            {
                obs.Disconnect();
            }
        }
Exemple #3
0
 public void Delete(IActivities activity)
 {
     _activities.Remove(activity);
 }
Exemple #4
0
 public void Add(IActivities activity)
 {
     _activities.Add(activity);
 }
Exemple #5
0
 public void AddActivityToList(IActivities activity)
 {
     _activites.Add(activity);
 }
Exemple #6
0
 public void RegisterActivity(IActivities activity)
 {
     _activities.Add(activity);
 }
Exemple #7
0
 public void ActivateActivity(IActivities activities)
 {
     _activities.Add(activities);
 }
 public void AddActivity(IActivities activity)
 {
     ActivityList.Add(activity);
 }
Exemple #9
0
 public ActivitiesController(IActivities act, IWebHostEnvironment host, DataContext con)
 {
     _activity          = act;
     hostingEnvironment = host;
     context            = con;
 }
Exemple #10
0
 public void Remove(IActivities activity)
 {
     _activitives.Remove(activity);
 }
 public ActivityController(IActivities Activities)
 {
     _Activities = Activities;
 }