Ejemplo n.º 1
0
 private void addMasterToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var amfNewMaster = new AddMasterForm())
     {
         if (amfNewMaster.ShowDialog(this) == DialogResult.OK)
         {
             Plugin plugin = GetPluginFromNode(PluginTree.SelectedRecord);
             if (plugin == null)
             {
                 MainView.PostStatusWarning(Resources.NoPluginSelectedCannotContinue);
                 return;
             }
             try
             {
                 if (plugin.AddMaster(amfNewMaster.MasterName))
                 {
                     PluginList.FixMasters();
                     RebuildSelection();
                 }
             }
             catch (ApplicationException ex)
             {
                 MessageBox.Show(this, ex.Message, Resources.Missing_Record, MessageBoxButtons.OK,
                                 MessageBoxIcon.Error);
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void addMasterToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var amfNewMaster = new AddMasterForm())
     {
         if (amfNewMaster.ShowDialog(this) == DialogResult.OK)
         {
             Plugin plugin = GetPluginFromNode(PluginTree.SelectedRecord);
             if (plugin == null)
             {
                 MainView.PostStatusWarning(Resources.NoPluginSelectedCannotContinue);
                 return;
             }
             try
             {
                 if (plugin.AddMaster(amfNewMaster.MasterName))
                 {
                     PluginList.FixMasters();
                     RebuildSelection();
                 }
             }
             catch (ApplicationException ex)
             {
                 MessageBox.Show(this, ex.Message, Resources.Missing_Record, MessageBoxButtons.OK,
                                 MessageBoxIcon.Error);
             }
         }
     }
 }