/// <summary> /// /// </summary> protected override void OnPreviewInitialize() { _textView = Tnc.GetParent <TextView>(); _mouseClickCounter = new MouseClickCounter(4); _textView.VScrollBar.SetMarks(new List <IMarker> { _marker }); Caret = new Caret(_textView); Caret.BlinkChanged += () => RequestRenderCurrentLine(); _textView.FontChanged += () => { var jsFontInfo = _textView._settings.fonts.jpFont; _inputMethod.SetFont(jsFontInfo.name, jsFontInfo.height * _textView.ZoomRate, _textView.GetLineHeight()); Caret.Update(); }; Doc.DocModified += OnDocumentModified; }
private void LoopGif1_Click(object sender, EventArgs e) { PictureBox LoopPicturebox = (sender as PictureBox); if (mouseClickCounter == MouseClickCounter.firstclick) { LoopPicturebox.Image = Properties.Resources.YellowLooperButton; AudioService.RecordSounds(firstloopTimer, "../../Assets/RecordSound/Track1.wav", 1, loopGif1); mouseClickCounter = MouseClickCounter.secondclick; } else if (mouseClickCounter == MouseClickCounter.secondclick) { AudioService.StopRecordSound(firstloopTimer, "../../Assets/RecordSound/Track1.wav"); LoopPicturebox.Image = Properties.Resources.BlueLooperButton; mouseClickCounter = MouseClickCounter.thridclick; EnableButton(); } else if (mouseClickCounter == MouseClickCounter.thridclick) { LoopPicturebox.Image = Properties.Resources.RedLooperButton; firstloopTimer.Stop(); loopGif1.Enabled = false; } }