-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved to evilbaschdi.core nuget package, ui adjustments, switched fro…
…m german to english lables, button rotation, window resizing
- Loading branch information
1 parent
7f5edb1
commit a683a08
Showing
14 changed files
with
299 additions
and
135 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
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
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
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
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
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
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
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 @@ | ||
using System.Windows.Controls; | ||
|
||
namespace DisplayRotation.Internal | ||
{ | ||
public interface IRotateButtonAndCanvas | ||
{ | ||
void For(int rotation, Button button); | ||
} | ||
} |
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,33 @@ | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
|
||
namespace DisplayRotation.Internal | ||
{ | ||
public class RotateButtonAndCanvas : IRotateButtonAndCanvas | ||
{ | ||
public void For(int rotation, Button button) | ||
{ | ||
var x = 10d; | ||
var w = 192d; | ||
var h = 108d; | ||
|
||
switch (rotation) | ||
{ | ||
case NativeMethods.Dmdo90: | ||
case NativeMethods.Dmdo270: | ||
button.Height = w; | ||
button.Width = h; | ||
((Canvas) button.Parent).Margin = new Thickness(x, 0, h, 0); | ||
break; | ||
|
||
case NativeMethods.Dmdo180: | ||
case NativeMethods.DmdoDefault: | ||
|
||
button.Height = h; | ||
button.Width = w; | ||
((Canvas) button.Parent).Margin = new Thickness(x, 0, w, 0); | ||
break; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.