diff --git a/MyFirstMAUI/MyFirstMAUI.sln b/MyFirstMAUI/MyFirstMAUI.sln new file mode 100644 index 0000000..5d050ea --- /dev/null +++ b/MyFirstMAUI/MyFirstMAUI.sln @@ -0,0 +1,27 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31611.283 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyFirstMAUI", "MyFirstMAUI\MyFirstMAUI.csproj", "{A9777D93-9CD5-4649-A33F-C5EC75012B2B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A9777D93-9CD5-4649-A33F-C5EC75012B2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A9777D93-9CD5-4649-A33F-C5EC75012B2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A9777D93-9CD5-4649-A33F-C5EC75012B2B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {A9777D93-9CD5-4649-A33F-C5EC75012B2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A9777D93-9CD5-4649-A33F-C5EC75012B2B}.Release|Any CPU.Build.0 = Release|Any CPU + {A9777D93-9CD5-4649-A33F-C5EC75012B2B}.Release|Any CPU.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} + EndGlobalSection +EndGlobal diff --git a/MyFirstMAUI/MyFirstMAUI/App.xaml b/MyFirstMAUI/MyFirstMAUI/App.xaml new file mode 100644 index 0000000..75f9c44 --- /dev/null +++ b/MyFirstMAUI/MyFirstMAUI/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/MyFirstMAUI/MyFirstMAUI/App.xaml.cs b/MyFirstMAUI/MyFirstMAUI/App.xaml.cs new file mode 100644 index 0000000..c95e82f --- /dev/null +++ b/MyFirstMAUI/MyFirstMAUI/App.xaml.cs @@ -0,0 +1,11 @@ +namespace MyFirstMAUI; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } +} diff --git a/MyFirstMAUI/MyFirstMAUI/AppShell.xaml b/MyFirstMAUI/MyFirstMAUI/AppShell.xaml new file mode 100644 index 0000000..55719c9 --- /dev/null +++ b/MyFirstMAUI/MyFirstMAUI/AppShell.xaml @@ -0,0 +1,14 @@ + + + + + + diff --git a/MyFirstMAUI/MyFirstMAUI/AppShell.xaml.cs b/MyFirstMAUI/MyFirstMAUI/AppShell.xaml.cs new file mode 100644 index 0000000..8d8a574 --- /dev/null +++ b/MyFirstMAUI/MyFirstMAUI/AppShell.xaml.cs @@ -0,0 +1,9 @@ +namespace MyFirstMAUI; + +public partial class AppShell : Shell +{ + public AppShell() + { + InitializeComponent(); + } +} diff --git a/MyFirstMAUI/MyFirstMAUI/CustomControl/BallView.xaml b/MyFirstMAUI/MyFirstMAUI/CustomControl/BallView.xaml new file mode 100644 index 0000000..78c02be --- /dev/null +++ b/MyFirstMAUI/MyFirstMAUI/CustomControl/BallView.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + 노랑 + 파랑 + 빨강 + 회색 + 초록 + + + + + + diff --git a/MyFirstMAUI/MyFirstMAUI/CustomControl/BallView.xaml.cs b/MyFirstMAUI/MyFirstMAUI/CustomControl/BallView.xaml.cs new file mode 100644 index 0000000..3068cb0 --- /dev/null +++ b/MyFirstMAUI/MyFirstMAUI/CustomControl/BallView.xaml.cs @@ -0,0 +1,48 @@ +using MyFirstMAUI.Utility; + +namespace MyFirstMAUI.CustomControl; + +public partial class BallView : ContentView +{ + public BallView() + { + InitializeComponent(); + picker.SelectedIndex = 0; + } + + public void Pick() + { + int index = picker.SelectedIndex; + ellipse.Stroke = Utils.Palettes[index]; + + int num = Utils.GetNumber(index); + number.Text = num.ToString(); + } + + public int Pick(List alreadySelected) + { + int index = picker.SelectedIndex; + ellipse.Stroke = Utils.Palettes[index]; + + int num = Utils.GetNumber(index); + while (alreadySelected.Contains(num)) + { + num = Utils.GetNumber(index); + } + + number.Text = num.ToString(); + + return num; + } + + private void picker_SelectedIndexChanged(object sender, EventArgs e) + { + number.Text = ""; + + int index = picker.SelectedIndex; + if (index < 0) + return; + + ellipse.Stroke = Utils.Palettes[index]; + } +} \ No newline at end of file diff --git a/MyFirstMAUI/MyFirstMAUI/MainPage.xaml b/MyFirstMAUI/MyFirstMAUI/MainPage.xaml new file mode 100644 index 0000000..2089773 --- /dev/null +++ b/MyFirstMAUI/MyFirstMAUI/MainPage.xaml @@ -0,0 +1,98 @@ + + + + + + + + +