Server/FormMain.cs
changeset 245 448e6a616c22
parent 243 cc2251d065db
child 248 0220cb84df58
     1.1 --- a/Server/FormMain.cs	Fri Aug 19 19:18:54 2016 +0200
     1.2 +++ b/Server/FormMain.cs	Fri Aug 19 19:28:03 2016 +0200
     1.3 @@ -178,9 +178,6 @@
     1.4              //Populate device types
     1.5              PopulateDeviceTypes();
     1.6  
     1.7 -            //Populate optical drives
     1.8 -            PopulateOpticalDrives();
     1.9 -
    1.10              //Initial status update 
    1.11              UpdateStatus();
    1.12  
    1.13 @@ -647,41 +644,6 @@
    1.14          }
    1.15  
    1.16          /// <summary>
    1.17 -        /// 
    1.18 -        /// </summary>
    1.19 -        private void PopulateOpticalDrives()
    1.20 -        {
    1.21 -            //Reset our list of drives
    1.22 -            comboBoxOpticalDrives.Items.Clear();
    1.23 -            comboBoxOpticalDrives.Items.Add("None");
    1.24 -
    1.25 -            //Go through each drives on our system and collected the optical ones in our list
    1.26 -            DriveInfo[] allDrives = DriveInfo.GetDrives();
    1.27 -            foreach (DriveInfo d in allDrives)
    1.28 -            {
    1.29 -                Debug.WriteLine("Drive " + d.Name);
    1.30 -                Debug.WriteLine("  Drive type: {0}", d.DriveType);
    1.31 -
    1.32 -                if (d.DriveType == DriveType.CDRom)
    1.33 -                {
    1.34 -                    //This is an optical drive, add it now
    1.35 -                    comboBoxOpticalDrives.Items.Add(d.Name.Substring(0, 2));
    1.36 -                }
    1.37 -            }
    1.38 -        }
    1.39 -
    1.40 -        /// <summary>
    1.41 -        /// 
    1.42 -        /// </summary>
    1.43 -        /// <returns></returns>
    1.44 -        public string OpticalDriveToEject()
    1.45 -        {
    1.46 -            return comboBoxOpticalDrives.SelectedItem.ToString();
    1.47 -        }
    1.48 -
    1.49 -
    1.50 -
    1.51 -        /// <summary>
    1.52          ///
    1.53          /// </summary>
    1.54          private void SetupTrayIcon()
    1.55 @@ -1237,31 +1199,6 @@
    1.56              CheckFontHeight();
    1.57              //Check if "run on Windows startup" is enabled
    1.58              checkBoxAutoStart.Checked = iStartupManager.Startup;
    1.59 -            //            
    1.60 -            labelStartFileName.Text = Properties.Settings.Default.StartFileName;
    1.61 -
    1.62 -
    1.63 -            //Try find our drive in our drive list
    1.64 -            int opticalDriveItemIndex = 0;
    1.65 -            bool driveNotFound = true;
    1.66 -            string opticalDriveToEject = Properties.Settings.Default.OpticalDriveToEject;
    1.67 -            foreach (object item in comboBoxOpticalDrives.Items)
    1.68 -            {
    1.69 -                if (opticalDriveToEject == item.ToString())
    1.70 -                {
    1.71 -                    comboBoxOpticalDrives.SelectedIndex = opticalDriveItemIndex;
    1.72 -                    driveNotFound = false;
    1.73 -                    break;
    1.74 -                }
    1.75 -                opticalDriveItemIndex++;
    1.76 -            }
    1.77 -
    1.78 -            if (driveNotFound)
    1.79 -            {
    1.80 -                //We could not find the drive we had saved.
    1.81 -                //Select "None" then.
    1.82 -                comboBoxOpticalDrives.SelectedIndex = 0;
    1.83 -            }
    1.84  
    1.85              //Harmony settings
    1.86              iTextBoxHarmonyHubAddress.Text = Properties.Settings.Default.HarmonyHubAddress;
    1.87 @@ -2563,39 +2500,6 @@
    1.88          /// <summary>
    1.89          /// 
    1.90          /// </summary>
    1.91 -        /// <param name="sender"></param>
    1.92 -        /// <param name="e"></param>
    1.93 -        private void buttonSelectFile_Click(object sender, EventArgs e)
    1.94 -        {
    1.95 -            //openFileDialog1.InitialDirectory = "c:\\";
    1.96 -            //openFileDialog.Filter = "EXE files (*.exe)|*.exe|All files (*.*)|*.*";
    1.97 -            //openFileDialog.FilterIndex = 1;
    1.98 -            openFileDialog.RestoreDirectory = true;
    1.99 -
   1.100 -            if (DlgBox.ShowDialog(openFileDialog) == DialogResult.OK)
   1.101 -            {
   1.102 -                labelStartFileName.Text = openFileDialog.FileName;
   1.103 -                Properties.Settings.Default.StartFileName = openFileDialog.FileName;
   1.104 -                Properties.Settings.Default.Save();
   1.105 -            }
   1.106 -        }
   1.107 -
   1.108 -        /// <summary>
   1.109 -        /// 
   1.110 -        /// </summary>
   1.111 -        /// <param name="sender"></param>
   1.112 -        /// <param name="e"></param>
   1.113 -        private void comboBoxOpticalDrives_SelectedIndexChanged(object sender, EventArgs e)
   1.114 -        {
   1.115 -            //Save the optical drive the user selected for ejection
   1.116 -            Properties.Settings.Default.OpticalDriveToEject = comboBoxOpticalDrives.SelectedItem.ToString();
   1.117 -            Properties.Settings.Default.Save();
   1.118 -        }
   1.119 -
   1.120 -
   1.121 -        /// <summary>
   1.122 -        /// 
   1.123 -        /// </summary>
   1.124          private void LogsUpdate()
   1.125          {
   1.126              if (iWriter != null)