Ejemplo n.º 1
0
        /**************************/
        /* AgendaBrowser_Executed */
        /**************************/
        private void AgendaBrowser_Executed(
            object sender,
            ExecutedRoutedEventArgs e)
        {
            if (agendaBrowserManager.BrowserCount() == 0)
            {
                ClosableTab theTabItem = new ClosableTab();
                theTabItem.Title = "Agenda";
                OpenTabItem(theTabItem);

                AgendaBrowser theBrowser = agendaBrowserManager.CreateBrowser();
                theTabItem.Content = theBrowser;
            }
            else
            {
                foreach (ClosableTab theTabItem in this.debugTabControl.Items)
                {
                    if (theTabItem.Content is AgendaBrowser)
                    {
                        AgendaBrowser theBrowser = theTabItem.Content as AgendaBrowser;
                        if (agendaBrowserManager.ManagesBrowser(theBrowser))
                        {
                            OpenExistingTabItem(theTabItem);
                            return;
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 /******************/
 /* ManagesBrowser */
 /******************/
 public bool ManagesBrowser(
     AgendaBrowser theBrowser)
 {
     lock (browsers)
     {
         return(browsers.Contains(theBrowser));
     }
 }
Ejemplo n.º 3
0
 /*****************/
 /* RemoveBrowser */
 /*****************/
 public void RemoveBrowser(
     AgendaBrowser theBrowser)
 {
     browsers.Remove(theBrowser);
     if (browsers.Count == 0)
     {
         focusStack = null;
         agendaMap  = null;
     }
 }
Ejemplo n.º 4
0
        /*****************/
        /* CreateBrowser */
        /*****************/
        public AgendaBrowser CreateBrowser()
        {
            AgendaBrowser theBrowser = new AgendaBrowser(ide);

            browsers.Add(theBrowser);

            if (!ide.dialog.GetExecuting())
            {
                if (browsers.Count == 1)
                {
                    FetchData();
                }

                theBrowser.UpdateData(focusStack, agendaMap);
            }

            return(theBrowser);
        }
Ejemplo n.º 5
0
 /*****************/
 /* UpdateBrowser */
 /*****************/
 private void UpdateBrowser(
     AgendaBrowser theBrowser)
 {
     theBrowser.UpdateData(focusStack, agendaMap);
 }