Skip to content

Commit 5a51414

Browse files
committed
v1.5.0 - 2021-02-04
1 parent fbfe5c6 commit 5a51414

File tree

11 files changed

+262
-184
lines changed

11 files changed

+262
-184
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020 flashwave
1+
Copyright (c) 2020-2021 flashwave
22

33
Permission to use, copy, modify, and/or distribute this software for any
44
purpose with or without fee is hereby granted.

TopMostFriend/AboutWindow.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ public AboutWindow() {
4545
websiteButton.Click += (s, e) => Process.Start(@"https://flash.moe/topmostfriend");
4646
Controls.Add(websiteButton);
4747

48+
Button donateButton = new Button {
49+
Text = @"Donate",
50+
Size = new Size(BUTTON_WIDTH, BUTTON_HEIGHT),
51+
TabIndex = ++tabIndex,
52+
};
53+
donateButton.Location = new Point(websiteButton.Left - donateButton.Width - BUTTON_SPACING, closeButton.Top);
54+
donateButton.Click += (s, e) => Process.Start(@"https://flash.moe/donate");
55+
Controls.Add(donateButton);
56+
4857
Button creditButton = new Button {
4958
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top,
5059
Text = string.Empty,

TopMostFriend/Program.cs

Lines changed: 113 additions & 175 deletions
Large diffs are not rendered by default.

TopMostFriend/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("flashwave")]
1212
[assembly: AssemblyProduct("TopMostFriend")]
13-
[assembly: AssemblyCopyright("flashwave 2020")]
13+
[assembly: AssemblyCopyright("flashwave 2020-2021")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -29,5 +29,5 @@
2929
// Build Number
3030
// Revision
3131
//
32-
[assembly: AssemblyVersion("1.4.2.0")]
33-
[assembly: AssemblyFileVersion("1.4.2.0")]
32+
[assembly: AssemblyVersion("1.5.0.0")]
33+
[assembly: AssemblyFileVersion("1.5.0.0")]

TopMostFriend/Properties/Resources.Designer.cs

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TopMostFriend/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@
121121
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
122122
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123123
</data>
124+
<data name="arrow_refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
125+
<value>..\Resources\arrow_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126+
</data>
124127
<data name="cog" type="System.Resources.ResXFileRef, System.Windows.Forms">
125128
<value>..\Resources\cog.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126129
</data>
685 Bytes
Loading

TopMostFriend/SettingsWindow.cs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ public static void Display() {
2828
public readonly CheckBox FlToggleNotification;
2929
public readonly CheckBox FlShiftClickBlacklist;
3030
public readonly CheckBox FlShowHotkeyIcon;
31+
public readonly CheckBox FlShowWindowList;
3132

3233
public SettingsWindow() {
3334
Text = @"Top Most Friend Settings";
3435
Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
3536
StartPosition = FormStartPosition.CenterScreen;
3637
FormBorderStyle = FormBorderStyle.FixedSingle;
3738
AutoScaleMode = AutoScaleMode.Dpi;
38-
ClientSize = new Size(430, 278);
39+
ClientSize = new Size(430, 298);
3940
MinimizeBox = MaximizeBox = false;
4041
MinimumSize = MaximumSize = Size;
4142

@@ -72,17 +73,18 @@ public SettingsWindow() {
7273
GroupBox flagsGroup = new GroupBox {
7374
Text = @"Flags",
7475
Location = new Point(6, 76),
75-
Size = new Size(Width - 18, 110),
76+
Size = new Size(Width - 18, 130),
7677
};
7778

7879
GroupBox blackListGroup = new GroupBox {
7980
Text = @"Blacklist",
80-
Location = new Point(6, 186),
81+
Location = new Point(6, 206),
8182
Size = new Size(Width - 18, 55),
8283
};
8384

8485
Controls.AddRange(new Control[] {
85-
applyButton, cancelButton, okButton, hotKeyGroup, flagsGroup, blackListGroup,
86+
applyButton, cancelButton, okButton,
87+
hotKeyGroup, flagsGroup, blackListGroup,
8688
});
8789

8890
Label toggleForegroundLabel = new Label {
@@ -184,8 +186,18 @@ public SettingsWindow() {
184186
AutoSize = true,
185187
TabIndex = 204,
186188
};
189+
FlShowWindowList = new CheckBox {
190+
Text = @"Show list of open windows in the task bar context menu",
191+
Location = new Point(10, 100),
192+
Checked = Settings.Get(Program.SHOW_WINDOW_LIST, true),
193+
AutoSize = true,
194+
TabIndex = 205,
195+
};
187196

188-
flagsGroup.Controls.AddRange(new[] { FlAlwaysAdmin, FlToggleNotification, FlShiftClickBlacklist, FlShowHotkeyIcon, });
197+
flagsGroup.Controls.AddRange(new[] {
198+
FlAlwaysAdmin, FlToggleNotification, FlShiftClickBlacklist,
199+
FlShowHotkeyIcon, FlShowWindowList,
200+
});
189201

190202
Button titleBlacklist = new Button {
191203
Size = new Size(120, 23),
@@ -217,6 +229,7 @@ public void Apply() {
217229
Settings.Set(Program.TOGGLE_BALLOON_SETTING, FlToggleNotification.Checked);
218230
Settings.Set(Program.SHIFT_CLICK_BLACKLIST, FlShiftClickBlacklist.Checked);
219231
Settings.Set(Program.SHOW_HOTKEY_ICON, FlShowHotkeyIcon.Checked);
232+
Settings.Set(Program.SHOW_WINDOW_LIST, FlShowWindowList.Checked);
220233
Program.SetForegroundHotKey(KeyCode);
221234
}
222235

TopMostFriend/TopMostFriend.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<SubType>Form</SubType>
6363
</Compile>
6464
<Compile Include="Win32.cs" />
65+
<Compile Include="WindowInfo.cs" />
6566
</ItemGroup>
6667
<ItemGroup>
6768
<Reference Include="System" />
@@ -78,6 +79,7 @@
7879
<None Include="Resources\door_in.png" />
7980
<None Include="Resources\about.png" />
8081
<None Include="Resources\cog.png" />
82+
<None Include="Resources\arrow_refresh.png" />
8183
<Content Include="TopMostFriend.ico" />
8284
</ItemGroup>
8385
<ItemGroup>

TopMostFriend/Win32.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public static class Win32 {
4343
public const int ICON_BIG = 1;
4444
public const int ICON_SMALL2 = 2;
4545

46+
public delegate bool EnumWindowsProc([In] IntPtr hWnd, [In] int lParam);
47+
4648
[DllImport(@"user32")]
4749
public static extern bool SetProcessDPIAware();
4850

@@ -114,6 +116,9 @@ public static IntPtr GetClassLongPtr(IntPtr hWnd, int nIndex) {
114116
[DllImport(@"user32", SetLastError = true)]
115117
public static extern bool UnregisterHotKey(IntPtr hWnd, int id);
116118

119+
[DllImport(@"user32", SetLastError = true)]
120+
public static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, int lParam);
121+
117122
[DllImport(@"kernel32", SetLastError = true, CharSet = CharSet.Auto)]
118123
public static extern ushort GlobalAddAtom(string lpString);
119124

0 commit comments

Comments
 (0)