Exemplo n.º 1
0
 private void ViewAmiMenu_Click(object sender, EventArgs e)
 {
     try
     {
         if (!EditorSave())
         {
             return;
         }
       
         //If database is not create yet.
         if (!Gurux.DeviceSuite.Properties.Settings.Default.AmiEnabled)                
         {
             MessageBox.Show(this, Gurux.DeviceSuite.Properties.Resources.GuruxAMINotInitialized, 
                     Gurux.DeviceSuite.Properties.Resources.GuruxDeviceSuiteTxt, 
                     MessageBoxButtons.OK, MessageBoxIcon.Information);
             GXOptionsForm dlg = new GXOptionsForm(AppType.Ami, AMI);
             if (dlg.ShowDialog(this) != DialogResult.OK || !Gurux.DeviceSuite.Properties.Settings.Default.AmiEnabled)
             {
                 return;
             }
         }
         Director.DirectorPanel.Visible = false;
         Editor.EditorPanel.Visible = false;
         AMI.LoadSettings();
         AMI.AmiPanel.Visible = true;
         UpdateMenus(AppType.Ami);
     }
     catch (Exception ex)
     {
         ViewAmiMenu.Enabled = false;
         GXCommon.ShowError(Parent, ex);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Show options...
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ToolsOptionsMenu_Click(object sender, EventArgs e)
 {
     GXOptionsForm dlg = new GXOptionsForm(SelectedApplication, AMI);
     dlg.ShowDialog(this);
 }