Esempio n. 1
0
        // checkbox event handler
        private void clickEvent_Click(object sender, EventArgs e)
        {
            SourceGrid.CellContext context = (SourceGrid.CellContext)sender;
            int iSel = context.Position.Row - 1;

            if (!_analysis.HasSolutionSelected(iSel))
            {
                _analysis.SelectSolutionByIndex(iSel);
            }
            else
            {
                _analysis.UnselectSolutionByIndex(iSel);
            }
        }
 private void ToolsGenerateStackBuilderProject(object sender, EventArgs e)
 {
     try
     {
         // create new selected solution
         _analysis.SelectSolutionByIndex(CurrentSolutionIndex);
         // show "save as" dialog
         if (DialogResult.OK == saveFileDialogAsStb.ShowDialog())
         {
             // save as stb document
             _document.Write(saveFileDialogAsStb.FileName);
             // open file
             Process.Start(new ProcessStartInfo(saveFileDialogAsStb.FileName));
         }
     }
     catch (Exception ex)
     { _log.Error(ex.ToString()); }
 }
Esempio n. 3
0
 private void btSelectSolution_Click(object sender, EventArgs e)
 {
     try
     {
         int iSel = GetCurrentSolutionIndex();
         if (-1 == iSel)
         {
             return;
         }
         if (!_analysis.HasSolutionSelected(iSel))
         {
             _analysis.SelectSolutionByIndex(iSel);
         }
         else
         {
             _analysis.UnselectSolutionByIndex(iSel);
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.ToString());
     }
 }