Ejemplo n.º 1
0
        private void OnHideCompileBox(object sender, RoutedEventArgs e)
        {
            FlowchartEditor flowEditor = tabDynamic.SelectedContent as FlowchartEditor;

            if (null != flowEditor)
            {
                flowEditor._editor.HideCompileBox();
            }
        }
Ejemplo n.º 2
0
        private void OnCompile(object sender, RoutedEventArgs e)
        {
            FlowchartEditor flowEditor = tabDynamic.SelectedContent as FlowchartEditor;

            if (null != flowEditor)
            {
                string strCompiledCodeText = flowEditor.GetCompiledCodeText();
                flowEditor._editor.ShowCompileBox(strCompiledCodeText);
            }
        }
Ejemplo n.º 3
0
        private TabItem AddTabItem()
        {
            int count = _tabItems.Count;

            // create new tab item
            TabItem tab = new TabItem();

            tab.Header = string.Format("NFA{0}", nCurrentTabID);
            tab.Name   = string.Format("tab{0}", nCurrentTabID);
            nCurrentTabID++;
            tab.HeaderTemplate = tabDynamic.FindResource("TabHeader") as DataTemplate;

            // add controls to tab item, this case I added just a textbox
            FlowchartEditor flowEditor = new FlowchartEditor();

            flowEditor.Name = "content";

            tab.Content = flowEditor;

            // insert tab item right before the last (+) tab item
            _tabItems.Insert(count - 1, tab);

            return(tab);
        }