00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 using System;
00013
00014 using System.Windows.Forms;
00015 using Mcs.Epm.MicrosoftProject.mpFx.Client.Plugins.PsiExtensionGenerator.Controls;
00016 using Mcs.Epm.MicrosoftProject.mpFx.Client.Plugins.PsiExtensionGenerator.Properties;
00017
00018 namespace Mcs.Epm.MicrosoftProject.mpFx.Client.Plugins.PsiExtensionGenerator.Forms
00019 {
00020
00021
00022
00023 public partial class OptionsForm : Form
00024 {
00025 #region Instance Data
00026
00027 private readonly OptionsControl _OptionsControl;
00028
00029 #endregion
00030
00031 #region Constructor
00032
00033 public OptionsForm()
00034 {
00035 InitializeComponent();
00036 _OptionsControl = new OptionsControl();
00037
00038 _OptionsControl.Left = 0;
00039 _OptionsControl.Top = 0;
00040 _OptionsControl.Visible = true;
00041
00042 Width = _OptionsControl.Width + 10;
00043 okButton.Top = _OptionsControl.Top + _OptionsControl.Height + 10;
00044 okButton.Left = (_OptionsControl.Left + _OptionsControl.Width + 10) - okButton.Width;
00045
00046 Controls.Add(_OptionsControl);
00047 }
00048
00049 #endregion
00050
00051 #region Event Handlers
00052
00053 private void okButton_Click(object sender, EventArgs e)
00054 {
00055 try
00056 {
00057 _OptionsControl.SaveSettings();
00058
00059 Close();
00060 }
00061 catch (Exception exception)
00062 {
00063
00064 MessageBox.Show(this, exception.Message, Resources.PluginName, MessageBoxButtons.OK, MessageBoxIcon.Error);
00065 }
00066
00067 }
00068
00069 #endregion
00070
00071 }
00072 }