Inheritance: System.Windows.Forms.Form
Beispiel #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Handles the Click event of the mnuOptions control.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void mnuOptions_Click(object sender, EventArgs e)
        {
            using (OptionsDlg dlg = new OptionsDlg(Properties.Settings.Default.ShadeColor))
            {
                dlg.ShadingEnabled = Properties.Settings.Default.UseShading;
                dlg.SelectedColor  = Properties.Settings.Default.ShadeColor;

                if (dlg.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                Properties.Settings.Default.UseShading = dlg.ShadingEnabled;
                Color clrNew = Color.Empty;

                if (dlg.ShadingEnabled)
                {
                    clrNew = dlg.SelectedColor;
                    Properties.Settings.Default.ShadeColor = clrNew;
                }

                foreach (IDockContent dc in m_dockPanel.DocumentsToArray())
                {
                    if (dc is InspectorWnd)
                    {
                        ((InspectorWnd)dc).InspectorGrid.ShadingColor = clrNew;
                    }
                }
            }
        }
Beispiel #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Handles the Click event of the mnuOptions control.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private void mnuOptions_Click(object sender, EventArgs e)
		{
			using (OptionsDlg dlg = new OptionsDlg(Properties.Settings.Default.ShadeColor))
			{
				dlg.ShadingEnabled = Properties.Settings.Default.UseShading;
				dlg.SelectedColor = Properties.Settings.Default.ShadeColor;

				if (dlg.ShowDialog(this) != DialogResult.OK)
					return;

				Properties.Settings.Default.UseShading = dlg.ShadingEnabled;
				Color clrNew = Color.Empty;

				if (dlg.ShadingEnabled)
				{
					clrNew = dlg.SelectedColor;
					Properties.Settings.Default.ShadeColor = clrNew;
				}

				foreach (IDockContent dc in m_dockPanel.DocumentsToArray())
				{
					if (dc is InspectorWnd)
						((InspectorWnd)dc).InspectorGrid.ShadingColor = clrNew;
				}
			}
		}