예제 #1
0
        private void AddNewVisualizerButton_Click(object sender, RoutedEventArgs e)
        {
            VisualizerControl NewControl = new VisualizerControl(this);

            VisualizerStack.Add(NewControl);
            NewControl.Show();
            HideOrShowItemsCheckBox.IsChecked = true;
            RefreshVisualizerCountLabel();
        }
예제 #2
0
        async void LoadConfig(string FileName)
        {
            FI SaveConfigs = new FI();

            SaveConfigs.LoadFile(FileName);
            FI.CategoryData CurrentCategory = new FI.CategoryData("MainWindow Data", 0);
            this.Left = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Location X");
            this.Top  = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Location Y");
            AudioSourceCombobox.SelectedIndex = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Audio Source Index");
            RefreshRateCombobox.SelectedIndex = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Refresh rate Index");

            var tasks = new List <Task>();

            int Count = VisualizerStack.Count;

            for (int i = 0; i < Count; i++)
            {
                var task = VisualizerStack[i].PerformClose();
                tasks.Add(task);
            }

            await Task.WhenAll(tasks);

            CurrentCategory = new FI.CategoryData("Visualizer Window", 0);
            while (SaveConfigs.IsAnyMoreInCat(CurrentCategory))
            {
                VisualizerControl NewWindow = new VisualizerControl(this);
                NewWindow.Left               = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Location X");
                NewWindow.Top                = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Location Y");
                NewWindow.Width              = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Width");
                NewWindow.Height             = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Height");
                NewWindow.VisualSamples      = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Visual Samples");
                NewWindow.Smoothness         = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Smoothness");
                NewWindow.Sensitivity        = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Sensitivity");
                NewWindow.BeatZoneFrom       = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "BeatZone From");
                NewWindow.BeatZoneTo         = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "BeatZone To");
                NewWindow.VisualizationIndex = SaveConfigs.FindtItemInItemstack_INT(CurrentCategory, "Visualization type index");
                NewWindow.Forecolor          = SaveConfigs.FindtItemInItemstack_BRS(CurrentCategory, "Forecolor");
                NewWindow.BackColor          = SaveConfigs.FindtItemInItemstack_BRS(CurrentCategory, "Backcolor");
                NewWindow.TopMost            = SaveConfigs.FindtItemInItemstack_BOL(CurrentCategory, "TopMost");

                NewWindow.Initialize();

                VisualizerStack.Add(NewWindow);
                NewWindow.Show();
                CurrentCategory.Offset++;
            }
        }