Пример #1
0
        public virtual void Save(string aText)
        {
            ProcessTextEventArgs e = FireProcessText(aText);

            if (e.CancelSave)
            {
                return;
            }
            mOutput += e.Text;
            NewLine();
        }
Пример #2
0
        public override void Save(string aText)
        {
            ProcessTextEventArgs e = FireProcessText(aText);

            if (e.CancelSave)
            {
                return;
            }

            using (StreamWriter curFile =
                       File.CreateText(Path.Combine(TargetFolder, SetFileName(SavedCount)) + ".c"))
            {
                curFile.WriteLine(e.Text);
            }
        }
Пример #3
0
        protected ProcessTextEventArgs FireProcessText(string aText)
        {
            ProcessTextEventArgs e = new ProcessTextEventArgs {
                Text = aText
            };

            if (ProcessText != null)
            {
                ProcessText(this, e);
                if (e.CancelSave)
                {
                    MessageToLog("Текст не прошел проверку компилятором: " + e.CancelReason);
                    mBadResults++;
                    mTotalBadResults++;
                }
                else
                {
                    mCount++;
                    mBadResults = 0;
                }
            }
            return(e);
        }