-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml.cs
93 lines (86 loc) · 3.4 KB
/
MainPage.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Data.Json;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Storage;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace SaisonCSS
{
public sealed partial class MainPage : Page
{
private Dictionary<string, string> editDictionary = new Dictionary<string, string>();
public MainPage()
{
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
titleBar.BackgroundColor = Windows.UI.Color.FromArgb(255, 69, 69, 144);
titleBar.ButtonBackgroundColor = Windows.UI.Color.FromArgb(255, 69, 69, 144);
titleBar.ButtonForegroundColor = Windows.UI.Colors.White;
titleBar.ButtonHoverBackgroundColor = Windows.UI.Color.FromArgb(255, 79, 79, 164);
titleBar.ButtonHoverForegroundColor = Windows.UI.Colors.White;
titleBar.ButtonPressedBackgroundColor = Windows.UI.Color.FromArgb(255, 110, 110, 255);
titleBar.ButtonPressedForegroundColor = Windows.UI.Colors.White;
this.InitializeComponent();
globalEdit.Children.Remove(editAccent);
}
private void GeneratePressed(object sender, RoutedEventArgs e)
{
editDictionary.Add("accentColor", accentColorPicker.Color.ToString().Replace("#FF", "#"));
editDictionary.Add("uiTabs", tabsType.SelectedIndex.ToString());
Generator generator = new Generator(listView.Items,editDictionary);
}
private void EditClick(object sender, RoutedEventArgs e)
{
if (globalEdit.Children.Count==0) //Check if no edit popup is present
{
if (sender.Equals(editAccentBtn))
{
globalEdit.Children.Add(editAccent);
}
else if (false)
{
}
}
if (applicationPage.Children.Contains(toolbarBottom)) //Hide the toolbar at the bottom edge
{
applicationPage.Children.Remove(toolbarBottom);
}
}
private void CloseEdit(object sender, RoutedEventArgs e)
{
if (globalEdit.Children.Count != 0) //Check if any edit popup is present
{
if (sender.Equals(editAccentClose))
{
globalEdit.Children.Remove(editAccent);
}
else if(false)
{
}
}
if (!applicationPage.Children.Contains(toolbarBottom)) //Show the toolbar at the bottom edge
{
applicationPage.Children.Add(toolbarBottom);
}
}
private void CloseFlyout(FlyoutBase sender, FlyoutBaseClosingEventArgs args)
{
if (!applicationPage.Children.Contains(toolbarBottom)) //Show the toolbar at the bottom edge
{
applicationPage.Children.Add(toolbarBottom);
}
}
}
}