Esempio n. 1
0
        public void PopulateFunctionListBox(bool rememberSelectedIndex)
        {
            int    selectedIndex = functionsListBox.SelectedIndex;
            string selectedName  = "";

            if (selectedIndex != -1)
            {
                selectedName = ((SdfInfo)functionsListBox.Items[selectedIndex]).name;
            }

            functionsListBox.Items.Clear();
            int i = 0;

            foreach (SdfInfo info in SdfManager.GetAllInfos())
            {
                functionsListBox.Items.Add(info);
                if (selectedName == info.name)
                {
                    selectedIndex = i;
                }
                i++;
            }
            if (rememberSelectedIndex && selectedIndex != -1)
            {
                functionsListBox.SelectedIndex = selectedIndex;
            }
        }
Esempio n. 2
0
 private void ShowBytecode_Click(object sender, EventArgs e)
 {
     if (functionsListBox.SelectedItem != null)
     {
         SdfInfo info = (SdfInfo)functionsListBox.SelectedItem;
         SdfManager.ShowIL(info);
     }
 }
Esempio n. 3
0
 private bool CheckForModifiedSdf()
 {
     if (RecalcCount != 0)
     {
         String[] modifiedFunctions = SdfManager.CheckForModifications(editedCells);
         if (modifiedFunctions.Length != 0 && OnFunctionsAltered != null)
         {
             OnFunctionsAltered(modifiedFunctions);
             return(true);
         }
     }
     return(false);
 }
Esempio n. 4
0
        // These methods are called both directly and by generated code/reflection:

        public static FunctionValue Make(int sdfIndex, Value[] vs)
        {
            return(new FunctionValue(SdfManager.GetInfo(sdfIndex), vs));
        }
Esempio n. 5
0
 public Workbook()
 {
     RecalcCount    = 0;
     UseSupportSets = false;
     SdfManager.ResetTables();
 }
Esempio n. 6
0
 private void workbook_OnFunctionsAltered(String[] functions)
 {
     Console.WriteLine("Regenerating modified functions");
     SdfManager.Regenerate(functions);
 }