Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Боев Андрей Олегович
ReadySetPrint
Commits
22e7b5c3
Commit
22e7b5c3
authored
6 months ago
by
Боев Андрей Олегович
Browse files
Options
Download
Patches
Plain Diff
add dialog processing
parent
e71a19b7
main
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ReadySetPrint/MainWindow.xaml
+11
-5
ReadySetPrint/MainWindow.xaml
ReadySetPrint/MainWindow.xaml.cs
+30
-0
ReadySetPrint/MainWindow.xaml.cs
ReadySetPrint/ReadySetPrint.csproj
+2
-0
ReadySetPrint/ReadySetPrint.csproj
with
43 additions
and
5 deletions
+43
-5
ReadySetPrint/MainWindow.xaml
+
11
−
5
View file @
22e7b5c3
...
...
@@ -8,19 +8,25 @@
Title="ReadySetPrint" Height="400" Width="640" ResizeMode="NoResize" Icon="/logo.png">
<StackPanel HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal">
<Button Content="Выбрать папку" Width="100" Margin="5"></Button>
<Button Content="Выбрать папку" Width="100" Margin="5"
Name="BtnChooseFolder" Click="BtnChooseFolder_Click"
></Button>
<TextBlock Text="Путь:" Margin="5" VerticalAlignment="Center" Name="TBPath"></TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Расположение:" VerticalAlignment="Center" Margin="5"></TextBlock>
<ComboBox Width="100" Margin="5"></ComboBox>
<Button Content="Выбрать цвет" Margin="5" Width="100"></Button>
<TextBlock Text="Цвет краёв:" Margin="5" Name="TBColor" VerticalAlignment="Center"></TextBlock>
<ComboBox Width="100" Margin="5" SelectedIndex="0" Name="CBPosition" SelectionChanged="CBPosition_SelectionChanged">
<ComboBoxItem Content="center"></ComboBoxItem>
<ComboBoxItem Content="top"></ComboBoxItem>
<ComboBoxItem Content="bottom"></ComboBoxItem>
<ComboBoxItem Content="left"></ComboBoxItem>
<ComboBoxItem Content="right"></ComboBoxItem>
</ComboBox>
<Button Content="Выбрать цвет" Margin="5" Width="100" Name="BtnChooseColor" Click="BtnChooseColor_Click"></Button>
<TextBlock Text="Цвет краёв: White" Margin="5" Name="TBColor" VerticalAlignment="Center"></TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel>
<TextBlock Text="Исходные фото:" Margin="5 5 5 0"></TextBlock>
<ListView Margin="5" Width="300" Height="191">
<ListView Margin="5" Width="300" Height="191"
Name="LVOriginalPhotos"
>
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Margin="5"></TextBlock>
...
...
This diff is collapsed.
Click to expand it.
ReadySetPrint/MainWindow.xaml.cs
+
30
−
0
View file @
22e7b5c3
...
...
@@ -12,6 +12,9 @@ using System.Windows.Media;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
System.Windows.Forms
;
using
System.Drawing
;
//using ImageMagick;
namespace
ReadySetPrint
{
...
...
@@ -20,9 +23,36 @@ namespace ReadySetPrint
/// </summary>
public
partial
class
MainWindow
:
Window
{
private
System
.
Drawing
.
Color
_borderColor
=
System
.
Drawing
.
Color
.
White
;
private
string
_folderPath
;
public
MainWindow
()
{
InitializeComponent
();
}
private
void
BtnChooseFolder_Click
(
object
sender
,
RoutedEventArgs
e
)
{
using
(
var
dlg
=
new
FolderBrowserDialog
())
{
if
(
dlg
.
ShowDialog
()
==
System
.
Windows
.
Forms
.
DialogResult
.
OK
)
{
_folderPath
=
dlg
.
SelectedPath
;
TBPath
.
Text
=
"Путь: "
+
dlg
.
SelectedPath
;
}
}
}
private
void
BtnChooseColor_Click
(
object
sender
,
RoutedEventArgs
e
)
{
using
(
ColorDialog
dlg
=
new
ColorDialog
())
{
if
(
dlg
.
ShowDialog
()
==
System
.
Windows
.
Forms
.
DialogResult
.
OK
)
{
_borderColor
=
dlg
.
Color
;
TBColor
.
Text
=
"Цвет краёв: "
+
dlg
.
Color
.
Name
.
ToString
();
}
}
}
}
}
This diff is collapsed.
Click to expand it.
ReadySetPrint/ReadySetPrint.csproj
+
2
−
0
View file @
22e7b5c3
...
...
@@ -37,6 +37,8 @@
<ItemGroup>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Drawing"
/>
<Reference
Include=
"System.Windows.Forms"
/>
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"Microsoft.CSharp"
/>
<Reference
Include=
"System.Core"
/>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets