Example #1
0
        private async void EqualizeColorsBotton_Click(object sender, RoutedEventArgs e)
        {
            WarningPopup inputDialog = new WarningPopup(this, "Equalizing colors will reset all historic colors. Are you sure you want to continue?", "Warning");

            MainGrid.Children.Add(inputDialog);
            while (true)
            {
                if (inputDialog.SelectionMade)
                {
                    if (inputDialog.YesBool)
                    {
                        EqualizeColorsData = true;
                        MainGrid.Children.Remove(inputDialog);
                        break;
                    }
                    else
                    {
                        if (!inputDialog.YesBool)
                        {
                            MainGrid.Children.Remove(inputDialog);
                            break;
                        }
                    }
                }
                await Task.Delay(100);
            }
        }
Example #2
0
        private async void ItemRemoveButton_Click(object sender, RoutedEventArgs e)
        {
            WarningPopup inputDialog = new WarningPopup(SenderWindow, "Are you sure you want to remove this item?", "Warning");

            SenderWindow.MainGrid.Children.Add(inputDialog);
            while (true)
            {
                if (inputDialog.SelectionMade)
                {
                    if (inputDialog.YesBool)
                    {
                        Button     SenderButton = sender as Button;
                        Grid       SenderGrid   = SenderButton.Parent as Grid;
                        ItemDesign SenderDesign = SenderGrid.Parent as ItemDesign;
                        StackPanel SenderPanel  = SenderDesign.Parent as StackPanel;
                        SenderPanel.Children.Remove(SenderDesign);
                        SetWindowHeight(SenderPanel);
                        SenderWindow.MainGrid.Children.Remove(inputDialog);
                        break;
                    }
                    else
                    {
                        if (!inputDialog.YesBool)
                        {
                            SenderWindow.MainGrid.Children.Remove(inputDialog);
                            break;
                        }
                    }
                }
                await Task.Delay(100);
            }
        }
Example #3
0
        private async void FlatlineGraphButton_Click(object sender, RoutedEventArgs e)
        {
            WarningPopup inputDialog = new WarningPopup(this, "Flatninging the graph will set all historic value to the newest one. Are you sure you want to continue?", "Warning");

            MainGrid.Children.Add(inputDialog);
            while (true)
            {
                if (inputDialog.SelectionMade)
                {
                    if (inputDialog.YesBool)
                    {
                        FlatlineGraphData = true;
                        MainGrid.Children.Remove(inputDialog);
                        break;
                    }
                    else
                    {
                        if (!inputDialog.YesBool)
                        {
                            MainGrid.Children.Remove(inputDialog);
                            break;
                        }
                    }
                }
                await Task.Delay(100);
            }
        }