-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
877391b
commit 7e8f77f
Showing
335 changed files
with
2,912 additions
and
128 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,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Cliperizer | ||
{ | ||
public class Clip | ||
{ | ||
public string Name; | ||
public double StartTime; | ||
public double EndTime; | ||
public Color Color; | ||
|
||
private Brush _colorBrush; | ||
|
||
// Yes, a getter that mutates state. I'm the worst! | ||
public Brush ColorBrush => (_colorBrush == null ? _colorBrush = new SolidBrush(Color) : _colorBrush); | ||
|
||
public static Color GenerateRandomColor() | ||
{ | ||
var rand = new Random(); | ||
return Color.FromArgb( | ||
(int)((255f + rand.Next(0, 255)) / 2), | ||
(int)((255f + rand.Next(0, 255)) / 2), | ||
(int)((255f + rand.Next(0, 255)) / 2) | ||
); | ||
} | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Data; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Forms; | ||
|
||
namespace Cliperizer | ||
{ | ||
public partial class ConfirmClipDialog : Form | ||
{ | ||
private string _clipName; | ||
|
||
public string ClipName => _clipName; | ||
|
||
public ConfirmClipDialog() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void okButton_Click(object sender, EventArgs e) | ||
{ | ||
if(string.IsNullOrEmpty(clipNameBox.Text)) return; | ||
_clipName = clipNameBox.Text; | ||
DialogResult = DialogResult.OK; | ||
Close(); | ||
} | ||
|
||
private void cancelButton_Click(object sender, EventArgs e) | ||
{ | ||
DialogResult = DialogResult.Cancel; | ||
Close(); | ||
} | ||
} | ||
} |
Oops, something went wrong.