public MainForm() { Program.log.Info("Initializing"); // Adds all file types to one list Types.All.AddRange(Types.Image); Types.All.AddRange(Types.Video); Types.All.AddRange(Types.Audio); Types.All.AddRange(Types.Book); Types.All.AddRange(Types.Subtitle); Types.All.AddRange(Types.Torrent); Types.All.AddRange(Types.Software); Types.All.AddRange(Types.Other); // Initialize InitializeComponent(); // Set this instance Form = this; // Show Splash Screen Controls.Add(FrmSplashScreen); FrmSplashScreen.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom; FrmSplashScreen.Location = new Point(0, 0); FrmSplashScreen.Size = Form.ClientSize; FrmSplashScreen.BringToFront(); FrmSplashScreen.Show(); comboBoxType.SelectedIndex = 0; comboBoxSort.SelectedIndex = 0; comboBoxHost.SelectedIndex = 0; // Set this version on Change Log in Menu Strip menuHelpChangeLog.Text = String.Format(menuHelpChangeLog.Text, Application.ProductVersion); Program.log.Info("Initialized"); }
} = new ShortcutsWindow(); // Keyboard Shortcuts Window (one instance) public MainForm() { Program.log.Info("Initializing"); // Add all the supported file types to one list (There must be a cleaner way, but oh well) Types.All.AddRange(Types.Video); Types.All.AddRange(Types.Audio); Types.All.AddRange(Types.Books); Types.All.AddRange(Types.Subtitle); Types.All.AddRange(Types.Torrent); Types.All.AddRange(Types.Software); Types.All.AddRange(Types.Other); SelectedFilesType = Types.All; // Set selected files type to All InitializeComponent(); // Initialize Form = this; // Set this instance labelChangeLog.Text = String.Format(labelChangeLog.Text, Application.ProductVersion); // Set this version on Change Log label in the About tab // Show Splash Screen Controls.Add(FrmSplashScreen); FrmSplashScreen.Dock = DockStyle.Fill; FrmSplashScreen.Location = new Point(0, 0); FrmSplashScreen.ClientSize = ClientSize; FrmSplashScreen.BringToFront(); FrmSplashScreen.Show(); comboBoxSearchHome.DropDownWidth = ControlExtensions.DropDownWidth(comboBoxSearchHome); // Set home search button combobox to fit its contents comboBoxSortFiles.DropDownWidth = ControlExtensions.DropDownWidth(comboBoxSortFiles); // Set files sort combobox to fit its contents Program.log.Info("Initialized"); }
public MainForm() { Program.log.Info("Initializing"); // Adds all file types to one list Types.All.AddRange(Types.Video); Types.All.AddRange(Types.Audio); Types.All.AddRange(Types.Books); Types.All.AddRange(Types.Subtitle); Types.All.AddRange(Types.Torrent); Types.All.AddRange(Types.Software); Types.All.AddRange(Types.Other); // Set selected files type to All SelectedFilesType = Types.All; // Initialize InitializeComponent(); // Set this instance Form = this; // Show Splash Screen Controls.Add(FrmSplashScreen); FrmSplashScreen.Dock = DockStyle.Fill; FrmSplashScreen.BringToFront(); FrmSplashScreen.Show(); // Set this version on Change Log label in the About tab labelChangeLog.Text = String.Format(labelChangeLog.Text, Application.ProductVersion); // Set static combo dropdown width to max items size comboBoxSearchHome.DropDownWidth = ControlExtensions.GetMaxDropDownWidth(comboBoxSearchHome); comboBoxSortFiles.DropDownWidth = ControlExtensions.GetMaxDropDownWidth(comboBoxSortFiles); Program.log.Info("Initialized"); }