Ejemplo n.º 1
0
        public SweeperSelectSettingsForm()
        {
            InitializeComponent();
            this.KeyPreview  = true;
            this.MaximumSize = new Size(600, 400);
            this.MinimumSize = new Size(600, 400);

            CheckBoxes.Add(checkBox1);
            CheckBoxes.Add(checkBox2);
            CheckBoxes.Add(checkBox3);
            CheckBoxes.Add(checkBox4);

            RadioLetterComboBoxSetup();


            add_radio_textbox.KeyDown += (sender, args) =>
            {
                if (args.KeyCode == Keys.Enter)
                {
                    if (add_radio_textbox.Focused)
                    {
                        add_radio_button_Click(sender, args);
                    }
                    else if (location_textbox.Focused)
                    {
                        add_location_button_Click(sender, args);
                    }
                }
            };
            //radio_letter_combo_box.SelectedIndexChanged += RadioLetterComboBoxIndexChange;

            Setup();
            WindowColors.ColorChangeEvent += () => WindowColors.Colorize(this);
            WindowColors.Colorize(this);
        }
Ejemplo n.º 2
0
        private void ColorSetup()
        {
            this.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Base);

            this.brisanje_button.BackColor  = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.duplicate_button.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.export_button.BackColor    = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.import_button.BackColor    = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.insert_sw_button.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.stopButton.BackColor       = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.playButton.BackColor       = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.names_button.BackColor     = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.remove_button.BackColor    = WindowColors.GetColor(WindowColors.WindowColor.Side2);
            this.view_button.BackColor      = WindowColors.GetColor(WindowColors.WindowColor.Side2);

            //tabControl1.DrawMode = TabDrawMode.OwnerDrawFixed;
            this.tabControl1.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Base);
            foreach (TabPage tc in tabControl1.TabPages)
            {
                tc.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Base);
                //tc.BorderStyle = BorderStyle.None;
            }

            this.listBox1.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Side1);
            this.listBox2.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Side1);
            this.listBox3.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Side1);

            this.radio_listbox.BackColor   = WindowColors.GetColor(WindowColors.WindowColor.Side1);
            this.sweeper_listbox.BackColor = WindowColors.GetColor(WindowColors.WindowColor.Side1);
        }
Ejemplo n.º 3
0
        private void Stylize()
        {
            if (!System.IO.Directory.Exists(WindowColors.ColorSettingsFolderPath))
            {
                System.IO.Directory.CreateDirectory(WindowColors.ColorSettingsFolderPath);
                foreach (KeyValuePair <string, WindowColors.DefaultColors.DefaultColor> color in WindowColors.DefaultColors.AllDefaultColors)
                {
                    string path = WindowColors.ColorSettingsFolderPath + $"\\{color.Key}.fxcol";
                    WindowColors.SetColorsToXml(path, color.Value);
                }
            }

            Color BorderColor = Color.Black;

            this.save_textBox.ForeColor = Color.Black;

            this.file_list_box.BorderStyle = BorderStyle.FixedSingle;

            this.browse_button.FlatStyle = FlatStyle.Flat;
            this.browse_button.FlatAppearance.BorderColor = BorderColor;
            this.browse_button.FlatAppearance.BorderSize  = 1;

            this.choose_button.FlatStyle = FlatStyle.Flat;
            this.choose_button.FlatAppearance.BorderColor = BorderColor;
            this.choose_button.FlatAppearance.BorderSize  = 1;

            this.clear_button.FlatStyle = FlatStyle.Flat;
            this.clear_button.FlatAppearance.BorderColor = BorderColor;
            this.clear_button.FlatAppearance.BorderSize  = 1;

            this.close_button.FlatStyle = FlatStyle.Flat;
            this.close_button.FlatAppearance.BorderColor = BorderColor;
            this.close_button.FlatAppearance.BorderSize  = 1;

            this.down_button.FlatStyle = FlatStyle.Flat;
            this.down_button.FlatAppearance.BorderColor = BorderColor;
            this.down_button.FlatAppearance.BorderSize  = 1;

            this.duplicate_button.FlatStyle = FlatStyle.Flat;
            this.duplicate_button.FlatAppearance.BorderColor = BorderColor;
            this.duplicate_button.FlatAppearance.BorderSize  = 1;

            this.start_button.FlatStyle = FlatStyle.Flat;
            this.start_button.FlatAppearance.BorderColor = BorderColor;
            this.start_button.FlatAppearance.BorderSize  = 1;

            this.up_button.FlatStyle = FlatStyle.Flat;
            this.up_button.FlatAppearance.BorderColor = BorderColor;
            this.up_button.FlatAppearance.BorderSize  = 1;

            this.save_textBox.ForeColor   = BorderColor;
            this.save_textBox.BorderStyle = BorderStyle.FixedSingle;


            UpdateLoadToolStripMenuItems();
        }
Ejemplo n.º 4
0
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog save = WindowColors.SaveColorDialogWithoutShow();

            if (save.ShowDialog() == DialogResult.OK)
            {
                WindowColors.SetColorsToXml(save.FileName);
            }
            UpdateLoadToolStripMenuItems();
        }
Ejemplo n.º 5
0
        private void loadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.colorSchemeToolStripMenuItem.Owner.Hide();
            OpenFileDialog dial = WindowColors.LoadColorDialogWithoutShow();

            if (dial.ShowDialog() == DialogResult.OK)
            {
                WindowColors.LastLoaded(dial.FileName);
                WindowColors.SetColorsFromXml(dial.FileName);
            }
        }
Ejemplo n.º 6
0
        ////////////////////////////////////////////////////////////////////////////////////


        public StartingWindowForm()
        {
            InitializeComponent();

            this.KeyPreview = true;
            this.KeyDown   += (sender, args) =>
            {
                if (args.KeyCode == Keys.Enter && file_list_box.Items.Count > 0 && save_textBox.Text != "")
                {
                    start_button_Click(sender, args);
                }
            };


            SweeperSettings.main_window = this;
            this.AllowDrop  = true;                                                 //Allows for drag-drop functionality
            this.DragEnter += new DragEventHandler(Form1_DragEnter);                //Drag-drop
            this.DragDrop  += new DragEventHandler(Form1_DragDrop);                 //Drag-drop function assigned
            Setup();
            this_window = this;

            StartingWindowForm.Sweeper_Settings = new SweeperSettings();
            Sweeper_Settings.SetupOnStartup();                                               //Settings for the sweepers
            if (ExtraNoveListe.Program.args != null)
            {
                string[] new_files = ExtraNoveListe.Program.args;
                //foreach (string h in new_files) _lists_in_program.Add(new FirePlayList(h));
                file_list_box.Items.AddRange(new_files);
                if (_files == null)
                {
                    _files = new_files;
                }
                else
                {
                    List <string> temp = _files.ToList();
                    temp.AddRange(new_files);
                    _files = temp.ToArray();
                }
            }
            AddToRightClickFunction();
            ColorSetup();
            Stylize();

            WindowColors.GetBackLog();
            UpdateCheckedItemsInLoadToolStripMenu();
            WindowColors.CheckCheckedColorSchemesInToolStrip += UpdateCheckedItemsInLoadToolStripMenu;
        }
Ejemplo n.º 7
0
        public void UpdateLoadToolStripMenuItems()
        {
            #region Set-up for the color load and save

            if (this.loadToolStripMenuItem.HasDropDownItems)
            {
                for (int i = this.loadToolStripMenuItem.DropDownItems.Count; i > 0; i--)
                {
                    this.loadToolStripMenuItem.DropDownItems.RemoveAt(0);
                }
            }

            Dictionary <string, string> paths = new Dictionary <string, string>();
            List <string> names     = new List <string>();
            List <string> locations = new List <string>();

            if (System.IO.Directory.Exists(WindowColors.ColorSettingsFolderPath))
            {
                foreach (String file in System.IO.Directory.GetFiles(WindowColors.ColorSettingsFolderPath))
                {
                    if (!file.Contains("ColorScheme.fxcol") && Path.GetExtension(file) == ".fxcol")
                    {
                        paths.Add(System.IO.Path.GetFileNameWithoutExtension(file), file);
                        names.Add(System.IO.Path.GetFileName(file));
                        locations.Add(file);
                    }
                }
                paths.OrderBy((x) => x.Key);
                foreach (KeyValuePair <string, string> path in paths)
                {
                    ToolStripMenuItem tool = new ToolStripMenuItem();//new ToolStripButton();
                    tool.Name = path.Key;
                    tool.Size = new System.Drawing.Size(152, 22);
                    tool.Text = path.Key;
                    if (path.Value == WindowColors.LastColor && !WindowColors.LastColor.Contains("ColorScheme.fxcol"))
                    {
                        ((ToolStripMenuItem)tool).Checked = true;
                    }
                    tool.Click += (a, b) => WindowColors.SetColorsFromXml(WindowColors.ColorSettingsFolderPath + "\\" + tool.Name + ".fxcol");
                    this.loadToolStripMenuItem.DropDownItems.Add(tool);
                }
            }


            #endregion
        }
Ejemplo n.º 8
0
        public void ChangeColorsWithDialogue()
        {
            Color       B, S1, S2;
            ColorDialog dil = new ColorDialog();

            dil.AllowFullOpen = true;
            dil.FullOpen      = true;
            dil.Color         = WindowColors.Base;
            DialogResult dr = dil.ShowDialog();

            B = dil.Color;
            HSLColor hsl = new HSLColor(dil.Color);

            hsl.Luminosity *= 1.8f;
            S1              = (Color)hsl;
            HSLColor o = new HSLColor(hsl.Hue, hsl.Saturation, hsl.Luminosity);

            o.Hue        *= 1f - 0.143f;
            o.Saturation *= 1f - 0.164f;
            o.Luminosity *= 1.25f;
            S2            = (Color)o;
            WindowColors.ChangeColors(B, S1, S2);
        }
Ejemplo n.º 9
0
        ///////////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////      SETUP      ///////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////////

        private void Setup()
        {
            listBox3.Items.AddRange(new string[] { "ID", "Naziv", "Autor", "Album", "Info", "Tip", "Color", "NaKanalu", "PathName", "ItemType", "StartCue", "EndCue", "Pocetak", "Trajanje", "Vrijeme", "StvarnoVrijemePocetka", "VrijemeMinTermin", "VrijemeMaxTermin", "PrviUBloku", "ZadnjiUBloku", "JediniUBloku", "FiksniUTerminu", "Reklama", "WaveIn", "SoftIn", "SoftOut", "Volume", "OriginalStartCue", "OriginalEndCue", "OriginalPocetak", "OriginalTrajanje" });

            //this.FormBorderStyle = FormBorderStyle.None;

            def                    = this.Size.Width;
            label1.Anchor          = (AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top);
            label3.Anchor          = (AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Top);
            label2.Anchor          = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top);
            brisanje_button.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
            listBox1.Anchor        = (AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top);
            listBox2.Anchor        = (AnchorStyles.Right | AnchorStyles.Top);
            listBox3.Anchor        = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right);
            names_button.Anchor    = (AnchorStyles.Bottom | AnchorStyles.Right);
            tabControl1.Anchor     = (AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top);
            listBox2.SelectionMode = SelectionMode.MultiSimple;
            //this.SizeChanged += this.Label2_Size;
            tabPage1.Text   = "Informacije";
            tabPage2.Text   = "Sweeperi";
            tabPage3.Text   = "Napravi Listu";
            this.KeyPreview = true;

            //panel1.AutoScroll = true;
            //listview_box.Visible = false;
            panel1.AutoScroll = false;


            this.MinimumSize = new Size(800, 500);
            this.MaximumSize = new Size(800, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height);

            //// SWEEPER TAB //////
            panel1.Anchor          = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left);
            sweeper_listbox.Anchor = (AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left);
            radio_listbox.Anchor   = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);

            this.KeyDown += (t, u) =>
            {
                if (tabControl1.SelectedIndex == 1)
                {
                    if (u.KeyCode == (Keys.A | Keys.Control))
                    {
                        SongView.SelectAll();
                    }
                }
            };

            tabControl1.KeyDown += (t, u) =>
            {
                if (tabControl1.SelectedIndex == 1)
                {
                    if (u.KeyCode == (Keys.A | Keys.Control))
                    {
                        SongView.SelectAll();
                    }
                }
            };

            panel1.KeyDown += (t, u) =>
            {
                if (tabControl1.SelectedIndex == 1)
                {
                    if (u.KeyCode == (Keys.A | Keys.Control))
                    {
                        SongView.SelectAll();
                    }
                }
            };
            //// SWEEPER TAB //////

            FilesChanged += UpdateWhatHasToBeDone;

            SongView.SongInSongViewChanged += UpdateSongViewAfterChange;
            SongView.SongViewChanged       += UpdateSongViewAfterChange;

            panelSetUp();
            //ChangePanelView(_currentView);


            ////////////////////////////////////  RADIO LISTVIEW  ////////////////////////////////////
            RADIOSetup();
            ////////////////////////////////////  RADIO LISTVIEW  ////////////////////////////////////


            ////////////////////////////////////  RADIO LISTVIEW  ////////////////////////////////////
            SweepersSetup();
            ////////////////////////////////////  RADIO LISTVIEW  ////////////////////////////////////

            this.MouseWheel += ScrollFunction;
            QuickSweeper.tpb = view_button_Click;

            ColorSetup();
            WindowColors.ColorChangeEvent += new WindowColors.Pump(ColorSetup);
            Stylize();
            WindowColors.Colorize(this);
            WindowColors.ColorChangeEvent += () => WindowColors.Colorize(this);
        }