Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
berrnd committed Oct 15, 2022
1 parent 28ec883 commit ed7c657
Show file tree
Hide file tree
Showing 41 changed files with 3,050 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: ["https://berrnd.de/say-thanks"]
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Bug Report
about: If you've found something that does not work, please report it to help improve
Traything
title: 'Bug: '
labels: bug
assignees: ''

---

<!--
Please make sure to:
- Describe the bug as detailed as possible by providing the exact steps how to reproduce it
- Attach screenshots where useful
- Check if the problem was maybe already reported or fixed by searching open and closed issues here
-->
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature Request
about: Ideas for improvements or new things which you would find useful are always
welcome
title: 'Feature Request: '
labels: enhancement
assignees: ''

---

<!--
Please make sure to:
- Describe what you would find useful
- Check if your idea was maybe already requested by searching open requests here
-->
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Question
about: If you just have a question or need help
title: 'Question: '
labels: question
assignees: ''

---
Binary file added .github/publication_assets/actions.mp4
Binary file not shown.
Binary file added .github/publication_assets/edit-item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/publication_assets/main-window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/publication_assets/tray-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.vs
[Bb]in/
[Oo]bj/
*.csproj.user
/.deploy
84 changes: 84 additions & 0 deletions ActionItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Traything
{
public class ActionItem
{
[Category("Common"), Display(Order = 10)]
[Description("The name of the menu item")]
public string Name { get; set; }

[Category("Common"), Display(Order = 20)]
[Description("The type of this action")]
public ActionType Type { get; set; }

[Category("Common"), Display(Order = 30)]
[Description("Whether this action will be shown on all or only this computer")]
public ActionScope Scope { get; set; }

[Category("Common"), Display(Order = 40)]
[Description("When Scope = ThisComputer, one or multiple hostnames of the corresponding machine (case-insensitiv)")]
public BindingList<string> Hostnames { get; private set; } = new BindingList<string>();

[Category("Common"), Display(Order = 50)]
[Description("Don't show an error message when the action fails")]
public bool IgnoreErrors { get; set; } = false;

[Category("StartApplication"), Display(Order = 100)]
[Description("When Type = StartApplication, the commandline to be executed")]
public string Commandline { get; set; }

[Category("HttpRequest"), Display(Order = 200)]
[Description("When Type = HttpGetRequest or HttpPostRequest, the URL used for the web request")]
public string Url { get; set; }

[Category("HttpRequest"), Display(Order = 210)]
[Description("When Type = HttpPostRequest, the POST data to be sent")]
public string PostData { get; set; }

[Category("HttpRequest"), Display(Order = 230)]
[Description("When Type = HttpGetRequest or HttpPostRequest, headers to be used")]
public BindingList<string> Headers { get; private set; } = new BindingList<string>();

[Category("TrayWindows"), Display(Order = 210)]
[Description("When Type = ShowTrayBrowser or ShowTrayMediaPlayer, a local path or URL to be opened")]
public string PathOrUrl { get; set; }

[Category("TrayWindows"), Display(Order = 310)]
[Description("When Type = ShowTrayBrowser or ShowTrayMediaPlayer, the width of the window")]
public int Width { get; set; } = 800;

[Category("TrayWindows"), Display(Order = 320)]
[Description("When Type = ShowTrayBrowser or ShowTrayMediaPlayer, the height of the window")]
public int Height { get; set; } = 500;

[Category("TrayWindows"), Display(Order = 330)]
[Description("When Type = ShowTrayBrowser or ShowTrayMediaPlayer, whether to keep the window open when it loses focus")]
public bool StayOpen { get; set; } = false;

public override string ToString()
{
return $"{this.Name} [{this.Type.ToString()}] [{this.Scope.ToString()}]";
}
}

public enum ActionType
{
StartApplication,
HttpGetRequest,
HttpPostRequest,
ShowTrayBrowser,
ShowTrayMediaPlayer,

CloseTraything,
Separator,
Headline
}

public enum ActionScope
{
Global,
ThisComputer
}
}
118 changes: 118 additions & 0 deletions FrmAbout.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions FrmAbout.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Diagnostics;
using System.Windows.Forms;

namespace Traything
{
public partial class FrmAbout : Form
{
public FrmAbout()
{
InitializeComponent();
}

private void FrmAbout_Load(object sender, System.EventArgs e)
{
this.LabelVersion.Text = this.LabelVersion.Text.Replace("xxxx", Program.RunningVersion);
}

private void LinkLabelSayThanks_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://berrnd.de/say-thanks?project=Traything&version=" + Program.RunningVersion);
}
}
}
Loading

0 comments on commit ed7c657

Please sign in to comment.