private void LoadSettings() { _Mode = Properties.Settings.Default.RandomMode ? Mode.Random : Mode.Sequential; // Set mode to random or sequential RadioRandom.Checked = Properties.Settings.Default.RandomMode; // Set random or sequential radio buttons RadioSeq.Checked = !RadioRandom.Checked; // Set the slideshow timing decimal value = Properties.Settings.Default.WaitDuration / 1000; if (value < SlideshowTiming.Minimum || value > SlideshowTiming.Maximum) { value = 1.5m; } SlideshowTiming.Value = value; // Add saved directories LoadDirectoriesFromSettings(); // Set window position if (Properties.Settings.Default.Location.X != -1 && Properties.Settings.Default.Location.Y != -1) { this.StartPosition = FormStartPosition.Manual; this.Location = Properties.Settings.Default.Location; } this.WindowState = Properties.Settings.Default.State; if (this.WindowState == FormWindowState.Normal) { this.Size = Properties.Settings.Default.WindowSize; } SinkLabel.Focus(); }
private void SetImageDetailLabels(ImageObject image) { CurrentImageLabel.Text = image.GetFileName(); CurrentDirLabel.Text = image.GetDirectory(); this.Text = "Random Image Viewer - " + image.GetFileName(); SinkLabel.Focus(); }
private void SlideshowButton_Click(object sender, EventArgs e) { InSlideshow = !InSlideshow; SlideshowTimer.Interval = (int)(SlideshowTiming.Value * 1000); SlideshowButton.SetEnabled(InSlideshow, SlideshowTimer.Interval); SlideshowTimer.Enabled = InSlideshow; SlideshowButton.Text = InSlideshow ? "End Slideshow" : "Begin Slideshow"; SinkLabel.Focus(); }
private void AddDirectory() { AddDirectoryForm AddDirDialog = new AddDirectoryForm(); if (AddDirDialog.ShowDialog(this) == DialogResult.OK) { var inputDir = new InputDirControl(AddDirDialog.GetPath(), this.ImageList); InputDirsPanel.Controls.Add(inputDir); } SinkLabel.Focus(); }
private void MainPictureBox_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { SinkLabel.Focus(); } else if (e.Button == MouseButtons.Right && this.ImageList.GetCurrentImage() != null) { PictureBoxContextMenu.Show(MainPictureBox, e.Location); } else if (e.Button == MouseButtons.Middle) { pnlMain.MiddleMouseClicked(e.Location); } }
private void ToggleHistory() { HistoryPanel.Visible = !HistoryPanel.Visible; if (!HistoryPanel.Visible) { pnlMain.Location = new Point(2, 2); pnlMain.Height += HistoryPanel.Height; Thumbnails.ResizeThumbnails(); } else { pnlMain.Height -= HistoryPanel.Height; pnlMain.Location = new Point(2, HistoryPanel.Height + HistoryPanel.Location.Y); } SetPictureZoomSize(); SinkLabel.Focus(); this.BringToFront(); }
private void OptionsButton_Click(object sender, EventArgs e) { (new SettingsForm()).ShowDialog(); SinkLabel.Focus(); KeybindSettings.LoadSettings(); }
private void ButtonReload_Click(object sender, EventArgs e) { ImageList.ReIndex(); SinkLabel.Focus(); }