Skip to content

Commit

Permalink
Re-written to donet core
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaardsholt committed Jun 21, 2020
1 parent 815c1a4 commit cf34e01
Show file tree
Hide file tree
Showing 23 changed files with 398 additions and 718 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
version: 2.1

orbs:
win: circleci/windows@2.2.0
win: circleci/windows@2.4.0

jobs:
build:
executor: win/default

steps:
- checkout
- run: dotnet build
- run: dotnet publish -r win-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true

27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/busylight-client.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/busylight-client.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/busylight-client.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/busylight-client.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
79 changes: 0 additions & 79 deletions App.config

This file was deleted.

37 changes: 37 additions & 0 deletions AppSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Text;

namespace busylight_client
{
public class Settings
{
public ResourceSet resourceSet = Resources.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true);
private IConfigurationRoot Configuration { get; set; }

public string Location => Configuration["AppSettings:Location"];
public string SignalR_Uri => Configuration["AppSettings:SignalR_Uri"];
public int Ring_Time
{
get
{
int.TryParse(Configuration["AppSettings:Ring_Time"], out int result);
return result == 0 ? 5000 : result;
}
}


public Settings()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);

Configuration = builder.Build();
}
}
}
Binary file added BusylightSDK.NETCore.dll
Binary file not shown.
Binary file removed BusylightSDK.dll
Binary file not shown.
186 changes: 0 additions & 186 deletions ContextMenus.cs

This file was deleted.

Loading

0 comments on commit cf34e01

Please sign in to comment.