diff --git a/docfx/docfx_project/.gitignore b/docfx/docfx_project/.gitignore new file mode 100644 index 000000000..4378419e7 --- /dev/null +++ b/docfx/docfx_project/.gitignore @@ -0,0 +1,9 @@ +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site diff --git a/docfx/docfx_project/api/.gitignore b/docfx/docfx_project/api/.gitignore new file mode 100644 index 000000000..e8079a3be --- /dev/null +++ b/docfx/docfx_project/api/.gitignore @@ -0,0 +1,5 @@ +############### +# temp file # +############### +*.yml +.manifest diff --git a/docfx/docfx_project/api/index.md b/docfx/docfx_project/api/index.md new file mode 100644 index 000000000..78dc9c005 --- /dev/null +++ b/docfx/docfx_project/api/index.md @@ -0,0 +1,2 @@ +# PLACEHOLDER +TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! diff --git a/docfx/docfx_project/articles/intro.md b/docfx/docfx_project/articles/intro.md new file mode 100644 index 000000000..b0db1682f --- /dev/null +++ b/docfx/docfx_project/articles/intro.md @@ -0,0 +1 @@ +Bummer, no guides 😌 \ No newline at end of file diff --git a/docfx/docfx_project/articles/plugins_getting_started.md b/docfx/docfx_project/articles/plugins_getting_started.md new file mode 100644 index 000000000..484967e77 --- /dev/null +++ b/docfx/docfx_project/articles/plugins_getting_started.md @@ -0,0 +1,3 @@ +Plugins allow you to expand on Artemis's functionality. For quick and interactive plugin creation, use the [Visual Studio template extension](https://marketplace.visualstudio.com/items?itemName=SpoinkyNL.ArtemisTemplates). + +Example implementations of these plugins can be found on [GitHub](https://github.com/Artemis-RGB/Artemis/tree/master/src/Plugins). \ No newline at end of file diff --git a/docfx/docfx_project/articles/toc.yml b/docfx/docfx_project/articles/toc.yml new file mode 100644 index 000000000..2b505c1d9 --- /dev/null +++ b/docfx/docfx_project/articles/toc.yml @@ -0,0 +1,4 @@ +- name: Introduction + href: intro.md +- name: Plugins - Getting started + href: plugins_getting_started.md \ No newline at end of file diff --git a/docfx/docfx_project/docfx.json b/docfx/docfx_project/docfx.json new file mode 100644 index 000000000..b7b1b85de --- /dev/null +++ b/docfx/docfx_project/docfx.json @@ -0,0 +1,72 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "Artemis.Core/Artemis.Core.csproj", + "Artemis.UI.Shared/Artemis.UI.Shared.csproj", + ], + "src": "../src" + } + ], + "dest": "api", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md" + ] + }, + { + "files": [ + "articles/**.md", + "articles/**/toc.yml", + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "globalMetadata": { + "_appTitle": "Artemis documentation", + "_enableSearch": true + }, + "dest": "_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default", + "templates/artemis", + "templates/material" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/docfx/docfx_project/images/logo-512.png b/docfx/docfx_project/images/logo-512.png new file mode 100644 index 000000000..d1cd8ebe7 Binary files /dev/null and b/docfx/docfx_project/images/logo-512.png differ diff --git a/docfx/docfx_project/index.md b/docfx/docfx_project/index.md new file mode 100644 index 000000000..0389c5447 --- /dev/null +++ b/docfx/docfx_project/index.md @@ -0,0 +1,30 @@ + +# Welcome to the **Artemis API documentation** +On this website you can browse the Artemis Core and Shared UI API. +A large part of this documentation is being generated based on code but over time the plan is to expand the documentation with written guides. + + +## Plugins +Artemis 2.0 has been developed from the ground up with plugins in mind. This means almost all functionality can be expanded. The following plugin types are currently available and fully implemented: + - [DataModelExpansion\](api/Artemis.Core.Plugins.DataModelExpansions.DataModelExpansion-1.html) + - [DeviceProvider](api/Artemis.Core.Plugins.DeviceProviders.DeviceProvider.html) + - [LayerBrush\](api/Artemis.Core.Plugins.LayerBrushes.LayerBrush-1.html) + - [PerLedLayerBrush\](api/Artemis.Core.Plugins.LayerBrushes.PerLedLayerBrush-1.html) + - [RgbNetLayerBrush\](api/Artemis.Core.Plugins.LayerBrushes.RgbNetLayerBrush-1.html) + - [LayerEffect](api/Artemis.Core.Plugins.LayerEffects.LayerEffect-1.html) + - [Module](api/Artemis.Core.Plugins.Modules.Module.html) + - [Module\](api/Artemis.Core.Plugins.Modules.Module-1.html) + - [ProfileModule](api/Artemis.Core.Plugins.Modules.ProfileModule.html), + - [ProfileModule\](api/Artemis.Core.Plugins.Modules.ProfileModule-1.html) + +These allow you to expand on Artemis's functionality. For quick and interactive plugin creation, use the [Visual Studio template extension](https://marketplace.visualstudio.com/items?itemName=SpoinkyNL.ArtemisTemplates). + +Example implementations of these plugins can be found on [GitHub](https://github.com/Artemis-RGB/Artemis/tree/master/src/Plugins). + +## Services +Artemis provides plugins with an API through a range of services. +All the services are available to plugins by using dependency injection in your plugin's constructor. Dependency injection is also available for the different view models plugins may provide. + +- [Core Services](/api/Artemis.Core.Services.Interfaces.html) +- [UI Services](/api/Artemis.UI.Shared.Services.Interfaces.html) + diff --git a/docfx/docfx_project/templates/artemis/favicon.ico b/docfx/docfx_project/templates/artemis/favicon.ico new file mode 100644 index 000000000..015d1ffa8 Binary files /dev/null and b/docfx/docfx_project/templates/artemis/favicon.ico differ diff --git a/docfx/docfx_project/templates/artemis/partials/logo.tmpl.partial b/docfx/docfx_project/templates/artemis/partials/logo.tmpl.partial new file mode 100644 index 000000000..bf09be859 --- /dev/null +++ b/docfx/docfx_project/templates/artemis/partials/logo.tmpl.partial @@ -0,0 +1,5 @@ +{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + + + + diff --git a/docfx/docfx_project/templates/material/partials/head.tmpl.partial b/docfx/docfx_project/templates/material/partials/head.tmpl.partial new file mode 100644 index 000000000..c05e8c1b0 --- /dev/null +++ b/docfx/docfx_project/templates/material/partials/head.tmpl.partial @@ -0,0 +1,21 @@ +{{!Copyright (c) Oscar Vasquez. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} + + + + + {{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}} + + + + {{#_description}}{{/_description}} + + + + + + + + {{#_noindex}}{{/_noindex}} + {{#_enableSearch}}{{/_enableSearch}} + {{#_enableNewTab}}{{/_enableNewTab}} + \ No newline at end of file diff --git a/docfx/docfx_project/templates/material/styles/main.css b/docfx/docfx_project/templates/material/styles/main.css new file mode 100644 index 000000000..8fb996768 --- /dev/null +++ b/docfx/docfx_project/templates/material/styles/main.css @@ -0,0 +1,314 @@ +/* COLOR VARIABLES*/ +:root { + --header-bg-color: #009688; + --header-ft-color: #fff; + --highlight-light: #1de9b6; + --highlight-dark: #00bfa5; + --accent-dim: #e0e0e0; + --accent-super-dim: #f3f3f3; + --font-color: #34393e; + --card-box-shadow: 0 1px 2px 0 rgba(61, 65, 68, 0.06), 0 1px 3px 1px rgba(61, 65, 68, 0.16); + --search-box-shadow: 0 1px 2px 0 rgba(41, 45, 48, 0.36), 0 1px 3px 1px rgba(41, 45, 48, 0.46); + --transition: 350ms; +} + +body { + color: var(--font-color); + font-family: "Roboto", sans-serif; + line-height: 1.5; + font-size: 16px; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + word-wrap: break-word; +} + +/* HIGHLIGHT COLOR */ + +button, +a { + color: var(--highlight-dark); + cursor: pointer; +} + +button:hover, +button:focus, +a:hover, +a:focus { + color: var(--highlight-light); + text-decoration: none; +} + +.toc .nav > li.active > a { + color: var(--highlight-dark); +} + +.toc .nav > li.active > a:hover, +.toc .nav > li.active > a:focus { + color: var(--highlight-light); +} + +.pagination > .active > a { + background-color: var(--header-bg-color); + border-color: var(--header-bg-color); +} + +.pagination > .active > a, +.pagination > .active > a:focus, +.pagination > .active > a:hover, +.pagination > .active > span, +.pagination > .active > span:focus, +.pagination > .active > span:hover { + background-color: var(--highlight-light); + border-color: var(--highlight-light); +} + +.affix ul > li.active > a, .affix ul > li.active > a:before { + color: var(--highlight-dark); +} + +.affix > ul > li.active > a, .affix > ul > li.active > a:before { + color: var(--highlight-dark); +} + +/* HEADINGS */ + +h1 { + font-weight: 600; + font-size: 32px; +} + +h2 { + font-weight: 600; + font-size: 24px; + line-height: 1.8; +} + +h3 { + font-weight: 600; + font-size: 20px; + line-height: 1.8; +} + +h5 { + font-size: 14px; + padding: 10px 0px; +} + +article h1, +article h2, +article h3, +article h4 { + margin-top: 35px; + margin-bottom: 15px; +} + +article h4 { + padding-bottom: 8px; + border-bottom: 2px solid #ddd; +} + +/* NAVBAR */ + +.navbar-brand > img { + color: var(--header-ft-color); +} + +.navbar { + border: none; + /* Both navbars use box-shadow */ + -webkit-box-shadow: var(--card-box-shadow); + -moz-box-shadow: var(--card-box-shadow); + box-shadow: var(--card-box-shadow); +} + +.subnav { + border-top: 1px solid #ddd; + background-color: #fff; +} + +.navbar-inverse { + background-color: var(--header-bg-color); + z-index: 100; +} + +.navbar-inverse .navbar-nav > li > a, +.navbar-inverse .navbar-text { + color: var(--header-ft-color); + background-color: var(--header-bg-color); + border-bottom: 3px solid transparent; + padding-bottom: 12px; + transition: 350ms; +} + +.navbar-inverse .navbar-nav > li > a:focus, +.navbar-inverse .navbar-nav > li > a:hover { + color: var(--header-ft-color); + background-color: var(--header-bg-color); + border-bottom: 3px solid white; +} + +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:focus, +.navbar-inverse .navbar-nav > .active > a:hover { + color: var(--header-ft-color); + background-color: var(--header-bg-color); + border-bottom: 3px solid white; +} + +.navbar-form .form-control { + border: 0; + border-radius: 4px; + box-shadow: var(--search-box-shadow); + transition:var(--transition); +} + +.navbar-form .form-control:hover { + background-color: var(--accent-dim); +} + +/* NAVBAR TOGGLED (small screens) */ + +.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { + border: none; +} +.navbar-inverse .navbar-toggle { + box-shadow: var(--card-box-shadow); + border: none; +} + +.navbar-inverse .navbar-toggle:focus, +.navbar-inverse .navbar-toggle:hover { + background-color: var(--highlight-dark); +} + +/* SIDEBAR */ + +.toc .level1 > li { + font-weight: 400; +} + +.toc .nav > li > a { + color: var(--font-color); +} + +.sidefilter { + background-color: #fff; + border-left: none; + border-right: none; +} + +.sidefilter { + background-color: #fff; + border-left: none; + border-right: none; +} + +.toc-filter { + padding: 5px; + margin: 0; + box-shadow: var(--card-box-shadow); + transition:var(--transition); +} + +.toc-filter:hover { + background-color: var(--accent-super-dim); +} + +.toc-filter > input { + border: none; + background-color: inherit; + transition: inherit; +} + +.toc-filter > .filter-icon { + display: none; +} + +.sidetoc > .toc { + background-color: #fff; + overflow-x: hidden; +} + +.sidetoc { + background-color: #fff; + border: none; +} + +/* ALERTS */ + +.alert { + padding: 0px 0px 5px 0px; + color: inherit; + background-color: inherit; + border: none; + box-shadow: var(--card-box-shadow); +} + +.alert > p { + margin-bottom: 0; + padding: 5px 10px; +} + +.alert > ul { + margin-bottom: 0; + padding: 5px 40px; +} + +.alert > h5 { + padding: 10px 15px; + margin-top: 0; + text-transform: uppercase; + font-weight: bold; + border-radius: 4px 4px 0 0; +} + +.alert-info > h5 { + color: #1976d2; + border-bottom: 4px solid #1976d2; + background-color: #e3f2fd; +} + +.alert-warning > h5 { + color: #f57f17; + border-bottom: 4px solid #f57f17; + background-color: #fff3e0; +} + +.alert-danger > h5 { + color: #d32f2f; + border-bottom: 4px solid #d32f2f; + background-color: #ffebee; +} + +/* CODE HIGHLIGHT */ +pre { + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + word-break: break-all; + word-wrap: break-word; + background-color: #fffaef; + border-radius: 4px; + border: none; + box-shadow: var(--card-box-shadow); +} + +/* STYLE FOR IMAGES */ + +.article .small-image { + margin-top: 15px; + box-shadow: var(--card-box-shadow); + max-width: 350px; +} + +.article .medium-image { + margin-top: 15px; + box-shadow: var(--card-box-shadow); + max-width: 550px; +} + +.article .large-image { + margin-top: 15px; + box-shadow: var(--card-box-shadow); + max-width: 700px; +} \ No newline at end of file diff --git a/docfx/docfx_project/toc.yml b/docfx/docfx_project/toc.yml new file mode 100644 index 000000000..7db7ecaea --- /dev/null +++ b/docfx/docfx_project/toc.yml @@ -0,0 +1,6 @@ +- name: Articles + href: articles/ + homepage: articles/intro.md +- name: API Documentation + href: api/ + homepage: api/index.md diff --git a/src/Artemis.Core/Models/Profile/Colors/ColorGradient.cs b/src/Artemis.Core/Models/Profile/Colors/ColorGradient.cs index 3307dcac6..48c66771e 100644 --- a/src/Artemis.Core/Models/Profile/Colors/ColorGradient.cs +++ b/src/Artemis.Core/Models/Profile/Colors/ColorGradient.cs @@ -136,9 +136,9 @@ namespace Artemis.Core.Models.Profile.Colors /// public event PropertyChangedEventHandler PropertyChanged; - + [NotifyPropertyChangedInvocator] - protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) + internal virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } diff --git a/src/Artemis.Core/Services/Interfaces/IPluginService.cs b/src/Artemis.Core/Services/Interfaces/IPluginService.cs index 76af14982..601803233 100644 --- a/src/Artemis.Core/Services/Interfaces/IPluginService.cs +++ b/src/Artemis.Core/Services/Interfaces/IPluginService.cs @@ -72,10 +72,10 @@ namespace Artemis.Core.Services.Interfaces List GetAllPluginInfo(); /// - /// Finds all enabled instances of type + /// Finds all enabled instances of type T /// /// Either or a plugin type implementing - /// Returns a list of plug instances of type + /// Returns a list of plug instances of type T List GetPluginsOfType() where T : Plugin; /// diff --git a/src/Artemis.Core/Utilities/Easings.cs b/src/Artemis.Core/Utilities/Easings.cs index 86e9448a9..c568c2385 100644 --- a/src/Artemis.Core/Utilities/Easings.cs +++ b/src/Artemis.Core/Utilities/Easings.cs @@ -4,44 +4,6 @@ namespace Artemis.Core.Utilities { public static class Easings { - /// - /// Easing Functions enumeration - /// - public enum Functions - { - Linear, - QuadraticEaseIn, - QuadraticEaseOut, - QuadraticEaseInOut, - CubicEaseIn, - CubicEaseOut, - CubicEaseInOut, - QuarticEaseIn, - QuarticEaseOut, - QuarticEaseInOut, - QuinticEaseIn, - QuinticEaseOut, - QuinticEaseInOut, - SineEaseIn, - SineEaseOut, - SineEaseInOut, - CircularEaseIn, - CircularEaseOut, - CircularEaseInOut, - ExponentialEaseIn, - ExponentialEaseOut, - ExponentialEaseInOut, - ElasticEaseIn, - ElasticEaseOut, - ElasticEaseInOut, - BackEaseIn, - BackEaseOut, - BackEaseInOut, - BounceEaseIn, - BounceEaseOut, - BounceEaseInOut - } - /// /// Constant Pi. /// @@ -178,9 +140,9 @@ namespace Artemis.Core.Utilities } /// - // Modeled after the piecewise quartic - // y = (1/2)((2x)^4) ; [0, 0.5) - // y = -(1/2)((2x-2)^4 - 2) ; [0.5, 1] + /// Modeled after the piecewise quartic + /// y = (1/2)((2x)^4) ; [0, 0.5) + /// y = -(1/2)((2x-2)^4 - 2) ; [0.5, 1] /// public static double QuarticEaseInOut(double p) { @@ -394,5 +356,43 @@ namespace Artemis.Core.Utilities return 0.5 * BounceEaseIn(p * 2); return 0.5 * BounceEaseOut(p * 2 - 1) + 0.5; } + + /// + /// Easing Functions enumeration + /// + public enum Functions + { + Linear, + QuadraticEaseIn, + QuadraticEaseOut, + QuadraticEaseInOut, + CubicEaseIn, + CubicEaseOut, + CubicEaseInOut, + QuarticEaseIn, + QuarticEaseOut, + QuarticEaseInOut, + QuinticEaseIn, + QuinticEaseOut, + QuinticEaseInOut, + SineEaseIn, + SineEaseOut, + SineEaseInOut, + CircularEaseIn, + CircularEaseOut, + CircularEaseInOut, + ExponentialEaseIn, + ExponentialEaseOut, + ExponentialEaseInOut, + ElasticEaseIn, + ElasticEaseOut, + ElasticEaseInOut, + BackEaseIn, + BackEaseOut, + BackEaseInOut, + BounceEaseIn, + BounceEaseOut, + BounceEaseInOut + } } } \ No newline at end of file diff --git a/src/Artemis.UI.Shared/Services/Interfaces/IDialogService.cs b/src/Artemis.UI.Shared/Services/Interfaces/IDialogService.cs index 76cfd2818..d52167d03 100644 --- a/src/Artemis.UI.Shared/Services/Interfaces/IDialogService.cs +++ b/src/Artemis.UI.Shared/Services/Interfaces/IDialogService.cs @@ -10,7 +10,7 @@ namespace Artemis.UI.Shared.Services.Interfaces public interface IDialogService : IArtemisSharedUIService { /// - /// Shows a confirm dialog on the dialog host provided in . + /// Shows a confirm dialog on the dialog host provided /// /// The title of the dialog /// The body text of the dialog @@ -20,7 +20,7 @@ namespace Artemis.UI.Shared.Services.Interfaces Task ShowConfirmDialog(string header, string text, string confirmText = "Confirm", string cancelText = "Cancel"); /// - /// Shows a confirm dialog on the dialog host provided in . + /// Shows a confirm dialog on the dialog host provided in identifier. /// /// /// The identifier of the to use eg. diff --git a/src/Artemis.UI.Shared/Utilities/HitTestUtilities.cs b/src/Artemis.UI.Shared/Utilities/HitTestUtilities.cs index cece0a0f9..2e871f486 100644 --- a/src/Artemis.UI.Shared/Utilities/HitTestUtilities.cs +++ b/src/Artemis.UI.Shared/Utilities/HitTestUtilities.cs @@ -7,8 +7,7 @@ namespace Artemis.UI.Shared.Utilities public static class HitTestUtilities { /// - /// Runs a hit test on children of the container within the rectangle matching all elements that have a data context of - /// . + /// Runs a hit test on children of the container within the rectangle matching all elements that have a data context of T /// /// ///