Beispiel #1
0
 private void init()
 {
     MinimumSize = new Size(50, 50);
     F.runAsync(() => {
         StudioContext.getCurrentInstance().formOpened(this);
     });
 }
Beispiel #2
0
        private void tagClick(object sender, MouseEventArgs e)
        {
            Hide();
            MP3Form f = new MP3Form();

            StudioContext.getCurrentInstance().formOpened(f);
        }
Beispiel #3
0
 protected virtual void onSubFormOpened(FormOpenEventArgs args)
 {
     subFormOpened?.Invoke(this, args);
     if (subFormOpened == null)
     {
         StudioContext.getCurrentInstance().formOpened(args.subForm);
     }
 }
Beispiel #4
0
        private void edit(object sender, EventArgs e)
        {
            PhotoEditor pe = new PhotoEditor(openFile);

            StudioContext.getCurrentInstance().formOpened(pe);
            pe.Show();
            StudioContext.getCurrentInstance().formClosed(this);
            Close();
        }
Beispiel #5
0
 private void init()
 {
     cancel             = false;
     organizeButton     = new MaterialRaisedButton();
     tagButton          = new MaterialRaisedButton();
     outputLabel        = new MaterialLabel();
     currentMusicFolder = new MaterialLabel();
     //
     // organizeButton
     //
     organizeButton.BackColor = Color.FromArgb(96, 94, 92);
     organizeButton.Font      = new Font("Product Sans", 15F);
     organizeButton.ForeColor = Color.White;
     organizeButton.Location  = new Point(0, 0);
     organizeButton.Cursor    = Cursors.Hand;
     organizeButton.Name      = "organizeButton";
     organizeButton.Size      = new Size(325, 63);
     organizeButton.Text      = "Format Music Files";
     organizeButton.UseVisualStyleBackColor = true;
     organizeButton.MouseClick += new MouseEventHandler(organizeClick);
     //
     // tagButton
     //
     tagButton.BackColor = Color.FromArgb(96, 94, 92);
     tagButton.Dock      = DockStyle.Bottom;
     tagButton.Font      = new Font("Product Sans", 15F);
     tagButton.ForeColor = Color.White;
     tagButton.Location  = new Point(0, 201);
     tagButton.Name      = "tagButton";
     tagButton.Size      = new Size(325, 63);
     tagButton.Cursor    = Cursors.Hand;
     tagButton.Text      = "Tag Music File";
     tagButton.UseVisualStyleBackColor = true;
     tagButton.MouseClick += new MouseEventHandler(tagClick);
     //
     // outputLabel
     //
     outputLabel.Font        = new Font("Product Sans", 12F);
     outputLabel.ForeColor   = Color.White;
     outputLabel.Location    = new Point(0, 63);
     outputLabel.Name        = "outputLabel";
     outputLabel.Size        = new Size(325, 138);
     outputLabel.TextAlign   = ContentAlignment.TopCenter;
     outputLabel.MouseClick += delegate(object o, MouseEventArgs args) {
         if (args.Button == MouseButtons.Left)
         {
             cancel = true;
         }
     };
     //
     // currentMusicFolder
     //
     currentMusicFolder.AutoSize    = true;
     currentMusicFolder.ForeColor   = Color.White;
     currentMusicFolder.Location    = new Point(4, 160);
     currentMusicFolder.Cursor      = Cursors.Hand;
     currentMusicFolder.Name        = "currentMusicFolder";
     currentMusicFolder.AutoSize    = true;
     currentMusicFolder.Size        = new Size(279, 13);
     currentMusicFolder.Font        = new Font("Product Sans", 12f);
     currentMusicFolder.TabIndex    = 3;
     currentMusicFolder.MouseEnter += delegate {
         currentMusicFolder.runOnUiThread(() => {
             currentMusicFolder.Font = new Font(currentMusicFolder.Font, FontStyle.Underline);
         });
     };
     currentMusicFolder.MouseLeave += delegate {
         currentMusicFolder.runOnUiThread(() => {
             currentMusicFolder.Font = new Font(currentMusicFolder.Font, FontStyle.Regular);
         });
     };
     currentMusicFolder.MouseClick += delegate(object o, MouseEventArgs args) {
         if (args.Button == MouseButtons.Left)
         {
             //FolderBrowserDialog dialog = new FolderBrowserDialog();
             //dialog.Description = "Select Main Music Folder";
             //dialog.ShowNewFolderButton = true;
             //dialog.RootFolder = Environment.SpecialFolder.MyComputer;
             //if (dialog.ShowDialog() == DialogResult.OK) {
             //    Properties.Settings.Default.MusicFilePath = dialog.SelectedPath;
             //    Properties.Settings.Default.Save();
             //    currentMusicFolder.Text = "Current Music Folder: \n" + dialog.SelectedPath;
             //}
             string newFolder = Tools.selectFolder();
             if (newFolder != null)
             {
                 Properties.Settings.Default.MusicFilePath = newFolder;
                 Properties.Settings.Default.Save();
                 currentMusicFolder.Text = "Current Music Folder: \n" + newFolder;
             }
         }
     };
     currentMusicFolder.Text = "Current Music Folder:";
     StartPosition           = FormStartPosition.CenterScreen;
     AutoScaleDimensions     = new SizeF(6F, 13F);
     AutoScaleMode           = AutoScaleMode.Font;
     Size         = new Size(325, 350);
     FormClosing += delegate {
         StudioContext.getCurrentInstance().formClosed(this);
     };
     Controls.Add(currentMusicFolder);
     Controls.Add(outputLabel);
     Controls.Add(organizeButton);
     Controls.Add(tagButton);
     Name = "OptionsForm";
     Icon = Properties.Resources.electrum;
     Text = "Electrum Music Options";
 }
Beispiel #6
0
 protected void init()
 {
     FormClosing += delegate {
         StudioContext.getCurrentInstance().formClosed(this);
     };
 }