This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ricardo Amaral
committed
Nov 2, 2014
0 parents
commit 7bf0f01
Showing
39 changed files
with
2,828 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# User-specific files | ||
*.suo | ||
*.user | ||
*.userosscache | ||
*.sln.docstates | ||
|
||
# Build results and NuGet Packages | ||
Build/ | ||
Packages/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Version 1.0.14306.1755 | ||
|
||
#### 2014/11/02 | ||
|
||
- First version released to the public. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 Ricardo Amaral | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget.org" value="https://nuget.org/api/v2/" /> | ||
<add key="staging.nuget.org" value="https://staging.nuget.org/api/v2/" /> | ||
</packageSources> | ||
<activePackageSource> | ||
<add key="All" value="(Aggregate source)" /> | ||
</activePackageSource> | ||
<config> | ||
<add key="repositoryPath" value="Packages" /> | ||
</config> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# SlackUI | ||
|
||
Slack for Windows - Unofficial, not affiliated with Slack Technologies. | ||
|
||
![SlackUI User Interface](http://rfgamaral.github.io/images/screenshots/slackui.jpg) | ||
|
||
SlackUI fills the missing gap on your Windows system with a dedicated Slack client bringing better integration with the underlying system. The main feature being the ability to lessen all distractions by minimizing the application to the notification area, while remaining easily accessible. | ||
|
||
## Features | ||
|
||
- Minimalist user interface with native Windows look and feel. | ||
- Powered by the Chromium Embedded Framework (CEF). | ||
- Hide the application by minimizing to the notification area. | ||
- Sign in directly to your Slack team domain of choice. | ||
- Persist all cookies, sessions and cache to the disk. | ||
|
||
## Download | ||
|
||
Please refer to the [releases](https://github.com/rfgamaral/SlackUI/releases) page to downloaded the binaries for the latest release. | ||
|
||
##### Pre-requisites | ||
|
||
- [.NET Framework 4.5](http://www.microsoft.com/en-us/download/details.aspx?id=42643) _(already included with Windows 8 and above)_ | ||
|
||
## Usage Guide | ||
|
||
Please refer to the documentation on the [wiki](https://github.com/rfgamaral/SlackUI/wiki) to learn more about how to use SlackUI. | ||
|
||
## Changelog | ||
|
||
Please refer to the [CHANGELOG](CHANGELOG.md) file for the full changelog details. | ||
|
||
## Credits | ||
|
||
- [CefSharp](https://github.com/cefsharp/CefSharp): .NET bindings for the Chromium Embedded Framework ([CEF](https://code.google.com/p/chromiumembedded)). | ||
- [EasySettings](https://github.com/rfgamaral/EasySettings): Simple .NET library to easily manage applications user preferences. | ||
- [VistaMenu](http://wyday.com/vistamenu): Renders menus with native Windows look and feel with support for icons. | ||
- [Fugue Icons](https://github.com/yusukekamiyamane/fugue-icons): Beautiful icons designed by [Yusuke Kamiyamane](http://p.yusukekamiyamane.com). | ||
|
||
## License | ||
|
||
Use of this source code is governed by an MIT-style license that can be found in the [LICENSE](LICENSE) file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2013 | ||
VisualStudioVersion = 12.0.30723.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlackUI", "SlackUI\SlackUI.csproj", "{18B3856C-6D33-432C-B88B-6D0C7B11B428}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Debug|x64.ActiveCfg = Debug|x64 | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Debug|x64.Build.0 = Debug|x64 | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Debug|x86.ActiveCfg = Debug|x86 | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Debug|x86.Build.0 = Debug|x86 | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Release|x64.ActiveCfg = Release|x64 | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Release|x64.Build.0 = Release|x64 | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Release|x86.ActiveCfg = Release|x86 | ||
{18B3856C-6D33-432C-B88B-6D0C7B11B428}.Release|x86.Build.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#region Copyright © 2014 Ricardo Amaral | ||
|
||
/* | ||
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file. | ||
*/ | ||
|
||
#endregion | ||
|
||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace SlackUI { | ||
|
||
[System.ComponentModel.DesignerCategory("Code")] | ||
internal class LinkLabelEx : LinkLabel { | ||
|
||
#region Private Fields | ||
|
||
private readonly static IntPtr IDC_HAND = new IntPtr(32649); | ||
|
||
#endregion | ||
|
||
#region Protected Methods | ||
|
||
/* | ||
* Handler for the overridden on mouse move event. | ||
*/ | ||
protected override void OnMouseMove(MouseEventArgs e) { | ||
base.OnMouseMove(e); | ||
|
||
// Show the system hand cursor if the base class decided to show the ugly one | ||
if(OverrideCursor == Cursors.Hand) { | ||
OverrideCursor = new Cursor(NativeMethods.LoadCursor(IntPtr.Zero, IDC_HAND)); | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,203 @@ | ||
#region Copyright © 2014 Ricardo Amaral | ||
|
||
/* | ||
* Use of this source code is governed by an MIT-style license that can be found in the LICENSE file. | ||
*/ | ||
|
||
#endregion | ||
|
||
using System.Drawing; | ||
using System.Windows.Forms; | ||
using Microsoft.Win32; | ||
using RA.Library.EasySettings; | ||
|
||
namespace SlackUI { | ||
|
||
internal class ApplicationSettings { | ||
|
||
#region Private Fields | ||
|
||
private const string StartupRegistryKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Run"; | ||
|
||
private readonly static string StartupRegistryName = Application.ProductName; | ||
|
||
private bool startWithWindows; | ||
private Point windowLocation; | ||
private Size windowSize; | ||
private FormWindowState windowState; | ||
|
||
#endregion | ||
|
||
#region Internal Properties | ||
|
||
/* | ||
* The initial team domain to load on startup. | ||
*/ | ||
[EasySettingsAttribute("General", "")] | ||
internal string InitialTeamToLoad { | ||
get; | ||
set; | ||
} | ||
|
||
/* | ||
* Show the application on startup. | ||
*/ | ||
[EasySettingsAttribute("UserInterface", false)] | ||
internal bool ShowOnStartup { | ||
get; | ||
set; | ||
} | ||
|
||
/* | ||
* Show the application with a single click on the notification icon. | ||
*/ | ||
[EasySettingsAttribute("UserInterface", false)] | ||
internal bool ShowWithSingleClick { | ||
get; | ||
set; | ||
} | ||
|
||
/* | ||
* Start the application when windows is started. | ||
*/ | ||
[EasySettingsAttribute("General", false)] | ||
internal bool StartWithWindows { | ||
get { | ||
return startWithWindows; | ||
} | ||
|
||
set { | ||
startWithWindows = value; | ||
|
||
// Gets the specified startup sub-key with write access | ||
RegistryKey registryKey = Registry.CurrentUser.OpenSubKey(StartupRegistryKey, true); | ||
|
||
// Add or delete the startup value to the registry? | ||
if(startWithWindows) { | ||
#if !DEBUG | ||
registryKey.SetValue(StartupRegistryName, Application.ExecutablePath, RegistryValueKind.String); | ||
#endif | ||
} else { | ||
if(registryKey.GetValue(StartupRegistryName) != null) { | ||
#if !DEBUG | ||
registryKey.DeleteValue(StartupRegistryName); | ||
#endif | ||
} | ||
} | ||
} | ||
} | ||
|
||
/* | ||
* Use the alternative white notification icon. | ||
*/ | ||
[EasySettingsAttribute("Appearance", false)] | ||
internal bool WhiteNotificationIcon { | ||
get; | ||
set; | ||
} | ||
|
||
/* | ||
* Wrapper form window location to restore window properties. | ||
*/ | ||
[EasySettingsAttribute("WrapperForm", null)] | ||
internal Point WindowLocation { | ||
get { | ||
return windowLocation; | ||
} | ||
|
||
set { | ||
windowLocation = value; | ||
|
||
// Set the wrapper form window location | ||
Program.WrapperForm.Location = windowLocation; | ||
} | ||
} | ||
|
||
/* | ||
* Wrapper form window size to restore window properties. | ||
*/ | ||
[EasySettingsAttribute("WrapperForm", null)] | ||
internal Size WindowSize { | ||
get { | ||
return windowSize; | ||
} | ||
|
||
set { | ||
windowSize = value; | ||
|
||
// Prevent the window width be less than the minimum allowed | ||
if(Program.WrapperForm.MinimumSize.Width > windowSize.Width) { | ||
windowSize = new Size(Program.WrapperForm.MinimumSize.Width, windowSize.Height); | ||
} | ||
|
||
// Prevent the window height be less than the minimum allowed | ||
if(Program.WrapperForm.MinimumSize.Height > windowSize.Width) { | ||
windowSize = new Size(windowSize.Width, Program.WrapperForm.MinimumSize.Height); | ||
} | ||
|
||
// Set the wrapper form window size | ||
Program.WrapperForm.Size = windowSize; | ||
} | ||
} | ||
|
||
/* | ||
* Wrapper form window state to restore window properties. | ||
*/ | ||
[EasySettingsAttribute("WrapperForm", typeof(FormWindowState), FormWindowState.Normal)] | ||
internal FormWindowState WindowState { | ||
get { | ||
// Prevent the window state to be minimized | ||
return (windowState == FormWindowState.Minimized ? FormWindowState.Normal : windowState); | ||
} | ||
|
||
set { | ||
windowState = value; | ||
|
||
// Set the wrapper form window state | ||
Program.WrapperForm.WindowState = windowState; | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
#region Internal Classes | ||
|
||
internal static class Defaults { | ||
|
||
#region Private Properties | ||
|
||
/* | ||
* Wrapper form window location default dynamic value. | ||
*/ | ||
private static Point WindowLocation { | ||
get { | ||
// Find the middle point in the primary monitor resolution | ||
int hMiddlePoint = SystemInformation.WorkingArea.Width / 2; | ||
int vMiddlePoint = SystemInformation.WorkingArea.Height / 2; | ||
|
||
// Return the centered wrapper form window | ||
return new Point( | ||
hMiddlePoint - (Program.WrapperForm.Size.Width / 2), | ||
vMiddlePoint - (Program.WrapperForm.Size.Height / 2) | ||
); | ||
} | ||
} | ||
|
||
/* | ||
* Wrapper form window size default dynamic value. | ||
*/ | ||
private static Size WindowSize { | ||
get { | ||
return Program.WrapperForm.Size; | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
} | ||
|
||
#endregion | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.