Exemplo n.º 1
0
        /*	private void ExecEditorThread(){
         *
         *              bool play = true;
         *              bool isBussy = false;
         *              try {
         *              //Gtk.Application.Invoke(delegate
         *              //{
         *                      while (play){
         *                              if ((listEditor != null)&&  !isBussy) {
         *                                      isBussy = true;
         *                                      //lock (secondTaskList) {
         *                                              Widget wdt = this.CurrentPageWidget;
         *                                              IEditor se = listEditor.Find(x => x.Control == wdt);
         *                                              if(se!=null)
         *                                                      Console.WriteLine(se.FileName);
         *                                      //}
         *                                      isBussy = false;
         *                              }
         *                              Thread.Sleep (2000);
         *                      }
         *
         *              //});
         *              }catch(ThreadAbortException tae){
         *                      Thread.ResetAbort ();
         *                      Tool.Logger.Error("ERROR - Cannot run editor thread.");
         *                      Tool.Logger.Error(tae.Message);
         *              }finally{
         *
         *              }
         *      }*/

        //[GLib.ConnectBefore]
        void OnSwitchPage(object o, SwitchPageArgs args)
        {
            IEditor se = CurentEditor();

            if (se != null)
            {
                se.ActivateEditor(OnLoadFinish);
                if (PageIsChanged != null)
                {
                    PageIsChanged(se.FileName);
                }
            }
        }
Exemplo n.º 2
0
        public void GoToFile(string filename, object position)
        {
            IEditor se = FindEditor(filename);

            if (se != null)
            {
                this.CurrentPage = this.PageNum(se.Control);
                se.GoToPosition(position);
                return;
            }
            else
            {
                IEditor se2 = Open(filename);
                se2.ActivateEditor(true);
                GoToCurrentFile(position);
            }
        }