コード例 #1
0
        /**************/
        /* AssignData */
        /**************/
        private void AssignData(
            FocusStack theFocusStack,
            Dictionary <Focus, Agenda> theAgendaMap)
        {
            focusStack = theFocusStack;
            agendaMap  = theAgendaMap;

            focusStackDataGridView.ItemsSource = theFocusStack.GetStack();

            if (theFocusStack.Count == 0)
            {
                activationDataGridView.ItemsSource = null;
            }
            else
            {
                activationDataGridView.ItemsSource = theAgendaMap[theFocusStack.GetStack().First()].GetActivations();
            }

            if (theFocusStack.Count != 0)
            {
                focusStackDataGridView.SelectedItem = theFocusStack.GetStack().First();

                if (theAgendaMap[theFocusStack.GetStack().First()].GetActivations().Count != 0)
                {
                    activationDataGridView.SelectedItem = theAgendaMap[theFocusStack.GetStack().First()].GetActivations().First();
                }
            }
        }
コード例 #2
0
 /**************/
 /* UpdateData */
 /**************/
 public void UpdateData(
     FocusStack theFocusStack,
     Dictionary <Focus, Agenda> theAgendaMap)
 {
     Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                                                new Action(delegate { AssignData(theFocusStack, theAgendaMap); }));
 }
コード例 #3
0
ファイル: AgendaBrowserManager.cs プロジェクト: mtsr/CLIPS
 /************************/
 /* AgendaBrowserManager */
 /************************/
 public AgendaBrowserManager(
     MainWindow theIDE)
 {
     ide        = theIDE;
     focusStack = new FocusStack();
     agendaMap  = new Dictionary <Focus, Agenda>();
 }
コード例 #4
0
 /*****************/
 /* RemoveBrowser */
 /*****************/
 public void RemoveBrowser(
     AgendaBrowser theBrowser)
 {
     browsers.Remove(theBrowser);
     if (browsers.Count == 0)
     {
         focusStack = null;
         agendaMap  = null;
     }
 }
コード例 #5
0
ファイル: AgendaBrowserManager.cs プロジェクト: mtsr/CLIPS
        /*************/
        /* FetchData */
        /*************/
        private void FetchData()
        {
            focusStack = ide.GetEnvironment().GetFocusStack();
            agendaMap  = new Dictionary <Focus, Agenda>();

            foreach (Focus theFocus in focusStack)
            {
                if (!agendaMap.ContainsKey(theFocus))
                {
                    Agenda theAgenda = ide.GetEnvironment().GetAgenda(theFocus);
                    agendaMap.Add(theFocus, theAgenda);
                }
            }
        }