Esempio n. 1
0
        /// <summary>
        /// this will gracefully hide the container control
        /// making sure that the floating window is also closed
        /// </summary>
        /// <param name="container"></param>
        public void Hide(Control container)
        {
            IFloaty f = _floaties.Find(container);

            if (f != null)
            {
                f.Hide();
            }
        }
Esempio n. 2
0
        public void Hide(Control control_1)
        {
            IFloaty floaty = this.floaties_0.Find(control_1);

            if (floaty != null)
            {
                floaty.Hide();
            }
        }
Esempio n. 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            headerMessage.Activate(tabOutput);
            headerMessage.CloseClick += new EventHandler(headerMessage_CloseClick);

            DockExtender = new DockExtender(this);
            outputFloaty = DockExtender.Attach(panelOutput, headerMessage, splitterRight);
            outputFloaty.Docking += new EventHandler(outputFloaty_Docking);
            outputFloaty.Hide();
        }
Esempio n. 4
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// When the main window gets hidden or shown and the docking window is undocked, make
 /// sure its visible state tracks with the main window's state.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 void frm_VisibleChanged(object sender, EventArgs e)
 {
     if (m_floaty != null && m_floaty.DockMode == DockStyle.None)
     {
         if (((Form)sender).Visible)
         {
             m_floaty.Show();
         }
         else
         {
             m_floaty.Hide();
         }
     }
 }
Esempio n. 5
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Hide it.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 public void HideFloaty()
 {
     //m_fShowing = false;
     m_floaty.Hide();
 }
Esempio n. 6
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            headerEvaluator.Activate(textInput);
            headerEvaluator.CloseClick += new EventHandler(headerEvaluator_CloseClick);
            headerOutput.Activate(tabOutput);
            headerOutput.CloseClick += new EventHandler(headerOutput_CloseClick);

            DockExtender = new DockExtender(this);
            inputFloaty  = DockExtender.Attach(panelInput, headerEvaluator, splitterBottom);
            outputFloaty = DockExtender.Attach(panelOutput, headerOutput, splitterRight);

            inputFloaty.Docking  += new EventHandler(inputFloaty_Docking);
            outputFloaty.Docking += new EventHandler(inputFloaty_Docking);
            inputFloaty.Hide();
            outputFloaty.Hide();

            textOutput.Text  = AssemblyInfo.ProductName + " v" + Application.ProductVersion + "\r\n";
            textOutput.Text += AssemblyInfo.CopyRightsDetail + "\r\n\r\n";


            marker  = new TextMarker(textEditor);
            checker = new SyntaxChecker(marker); // run the syntax checker on seperate thread

            // create the syntax update checker event handler and remember its reference
            syntaxUpdateChecker   = new EventHandler(checker_UpdateSyntax);
            checker.UpdateSyntax += syntaxUpdateChecker; // listen for events
            System.Threading.Thread thread = new System.Threading.Thread(checker.Start);
            thread.Start();

            TextChangedTimer       = new Timer();
            TextChangedTimer.Tick += new EventHandler(TextChangedTimer_Tick);

            // assign the auto completion function to this editor
            // autocomplete form will take care of the rest
            codecomplete              = new AutoComplete(textEditor);
            codecomplete.Enabled      = false;
            directivecomplete         = new AutoComplete(textEditor);
            directivecomplete.Enabled = false;
            directivecomplete.WordList.Items.Add("@ParseTree");
            directivecomplete.WordList.Items.Add("@Parser");
            directivecomplete.WordList.Items.Add("@Scanner");
            directivecomplete.WordList.Items.Add("@TextHighlighter");
            directivecomplete.WordList.Items.Add("@TinyPG");
            directivecomplete.WordList.Items.Add("Generate");
            directivecomplete.WordList.Items.Add("Language");
            directivecomplete.WordList.Items.Add("Namespace");
            directivecomplete.WordList.Items.Add("OutputPath");
            directivecomplete.WordList.Items.Add("TemplatePath");

            // setup the text highlighter (= text coloring)
            highlighterScanner             = new TinyPG.Highlighter.Scanner();
            textHighlighter                = new TinyPG.Highlighter.TextHighlighter(textEditor, highlighterScanner, new TinyPG.Highlighter.Parser(highlighterScanner));
            textHighlighter.SwitchContext += new TinyPG.Highlighter.ContextSwitchEventHandler(TextHighlighter_SwitchContext);

            LoadConfig();

            if (GrammarFile == null)
            {
                NewGrammar();
            }
        }
Esempio n. 7
0
 void headerEvaluator_CloseClick(object sender, EventArgs e)
 {
     inputFloaty.Hide();
 }
Esempio n. 8
0
 void headerOutput_CloseClick(object sender, EventArgs e)
 {
     outputFloaty.Hide();
 }
Esempio n. 9
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            headerEvaluator.Activate(textInput);
            headerEvaluator.CloseClick += new EventHandler(headerEvaluator_CloseClick);
            headerOutput.Activate(tabOutput);
            headerOutput.CloseClick += new EventHandler(headerOutput_CloseClick);

            DockExtender = new DockExtender(this);
            inputFloaty = DockExtender.Attach(panelInput, headerEvaluator, splitterBottom);
            outputFloaty = DockExtender.Attach(panelOutput, headerOutput, splitterRight);

            inputFloaty.Docking += new EventHandler(inputFloaty_Docking);
            outputFloaty.Docking += new EventHandler(inputFloaty_Docking);
            inputFloaty.Hide();
            outputFloaty.Hide();

            textOutput.Text = AssemblyInfo.ProductName + " v" + Application.ProductVersion + "\r\n";
            textOutput.Text += AssemblyInfo.CopyRightsDetail + "\r\n\r\n";

            marker = new TextMarker(textEditor);
            checker = new SyntaxChecker(marker); // run the syntax checker on seperate thread

            // create the syntax update checker event handler and remember its reference
            syntaxUpdateChecker = new EventHandler(checker_UpdateSyntax);
            checker.UpdateSyntax += syntaxUpdateChecker; // listen for events
            System.Threading.Thread thread = new System.Threading.Thread(checker.Start);
            thread.Start();

            TextChangedTimer = new Timer();
            TextChangedTimer.Tick += new EventHandler(TextChangedTimer_Tick);

            // assign the auto completion function to this editor
            // autocomplete form will take care of the rest
            codecomplete = new AutoComplete(textEditor);
            codecomplete.Enabled = false;
            directivecomplete = new AutoComplete(textEditor);
            directivecomplete.Enabled = false;
            directivecomplete.WordList.Items.Add("@ParseTree");
            directivecomplete.WordList.Items.Add("@Parser");
            directivecomplete.WordList.Items.Add("@Scanner");
            directivecomplete.WordList.Items.Add("@TextHighlighter");
            directivecomplete.WordList.Items.Add("@TinyPG");
            directivecomplete.WordList.Items.Add("Generate");
            directivecomplete.WordList.Items.Add("Language");
            directivecomplete.WordList.Items.Add("Namespace");
            directivecomplete.WordList.Items.Add("OutputPath");
            directivecomplete.WordList.Items.Add("TemplatePath");

            // setup the text highlighter (= text coloring)
            highlighterScanner = new TinyPG.Highlighter.Scanner();
            textHighlighter = new TinyPG.Highlighter.TextHighlighter(textEditor, highlighterScanner, new TinyPG.Highlighter.Parser(highlighterScanner));
            textHighlighter.SwitchContext += new TinyPG.Highlighter.ContextSwitchEventHandler(TextHighlighter_SwitchContext);

            LoadConfig();

            if (GrammarFile == null)
                NewGrammar();
        }