コード例 #1
0
        void OnKeyReleaseEvent(object s, Gtk.KeyReleaseEventArgs args)
        {
            if (args.Event.Key == Gdk.Key.Left || args.Event.Key == Gdk.Key.Right || args.Event.Key == Gdk.Key.Up || args.Event.Key == Gdk.Key.Down || args.Event.Key == Gdk.Key.Control_L || args.Event.Key == Gdk.Key.Control_R)
            {
                return;
            }

            //return;
            if (MainClass.Settings.PreCompile && isCompileExtension)
            {
                DateTime now = DateTime.Now;
                TimeSpan ts  = now.Subtract(lastPrecompile);

                if (ts.TotalMilliseconds > 5500)
                {
                    //MainClass.MainWindow.ErrorOutput.Clear();
                    TaskList tl = new TaskList();
                    tl.TasksList = new System.Collections.Generic.List <Moscrif.IDE.Task.ITask>();

                    PrecompileTask pt = new PrecompileTask();
                    pt.Initialize(new PrecompileData(editor.Document.Text, fileName));

                    tl.TasksList.Clear();
                    tl.TasksList.Add(pt);

                    MainClass.MainWindow.RunSecondaryTaskList(tl, EndTaskWritte, true);
                    lastPrecompile = DateTime.Now;
                    timer.Enabled  = false;
                }
            }
        }
コード例 #2
0
        private void OnTimeElapsed(object o, ElapsedEventArgs args)
        {
            DateTime now = DateTime.Now;
            TimeSpan ts  = now.Subtract(lastPrecompile);

            if (ts.TotalMilliseconds > 5000)
            {
                timer.Enabled = false;
                TaskList tl = new TaskList();
                tl.TasksList = new System.Collections.Generic.List <Moscrif.IDE.Task.ITask>();

                PrecompileTask pt = new PrecompileTask();
                pt.Initialize(new PrecompileData(editor.Document.Text, fileName));

                tl.TasksList.Clear();
                tl.TasksList.Add(pt);

                MainClass.MainWindow.RunSecondaryTaskList(tl, EndTaskWritte, true);
                lastPrecompile = DateTime.Now;
            }
        }