text:
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Threading;

namespace ELEBEATMusicEditer
{
    public partial class Form1 : Form
    {
        //mciSendStringを使うためのおまじない
        [DllImport("winmm.dll")]
        extern static int mciSendString(string s1, StringBuilder s2, int i1, int i2);

        //スレッド用
        Thread trd;
        volatile bool ThreadStop;

        Form4 PreviewForm = new Form4();

        //譜面ファイルのパス
        string EleFilePath;

        //描画中か
        bool isPainting;
        //描画カウント
        int DrawCount;
        //イベントハンドラ実行中でないか
        bool isProcessing;

        //クラスの宣言
        private Note Note = new Note();
        public NotePaint NotePaint = new NotePaint();
        private MusicPlayer MusicPlayer = new MusicPlayer();
        private MusicInfo MusicInfo = new MusicInfo();
        private BPM BPM = new BPM();

        //オフセット。NotePaintに移したい
        private int NoteOffsetTime;
        //コンテキストメニューで使う
        int tempBPMBeat;

        //四角形の位置と大きさの設定
        static private Rectangle NoteForm = new Rectangle(5, 35, 980, 505);

        //マウスの最初にクリックした位置
        Point MouseDownPosition = new Point();
        Point TempMousePosition = new Point();
        //マウスのノートのドラッグアンドドロップ
        bool isMouseDrag;
        //コピーのリスト
        Note CopyedNote = new Note();
        //コピーしたときのボタン数
        int CopyedKeys;

        //コンストラクタ
        public Form1()
        {
            InitializeComponent();
            NotePaint.SetNoteForm(NoteForm);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //スレッドの作成
            trd = new Thread(new ThreadStart(this.MyPaint));
            trd.IsBackground = true;
            trd.Priority = ThreadPriority.Highest;
            trd.Start();
        }
        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            //try
            //{
                isPainting = true;
                if (MusicPlayer.FetchMusicFlag == true)
                {
                    //////再生時間と速度の更新
                    MusicPlayer.GetPresentTime();
                    MusicPlayer.GetPlayingMusicMode();
                    trackBar1.Value = (int)((double)MusicPlayer.PresentMusicTime / MusicPlayer.TotalMusicTime * 500.0);
                }
                if (DrawCount > 20)
                {
                    if (NotePaint.NoteisDouble == true)
                    {
                        toolStripStatusLabel1.Text = "ノートの間隔が狭すぎる場所があります。";
                    }
                    else
                    {
                        if (MusicPlayer.FetchMusicFlag == true)
                        {
                            //音楽が止まっていたら再生ボタンを再生に
                            if (MusicPlayer.PlayingMusicMode == "paused" || MusicPlayer.PlayingMusicMode == "stopped")
                            {
                                button1.Text = "再生";
                            }
                            toolStripStatusLabel1.Text = "";
                            toolStripStatusLabel3.Text = " 再生時間 : " + MusicPlayer.GetPresentDateTime().ToLongTimeString();
                            toolStripStatusLabel4.Text = " 再生速度 : " + (MusicPlayer.PlayMusicSpeed / 10).ToString() + "%";
                        }
                        else
                        {
                            toolStripStatusLabel1.Text = "譜面ファイルまたは音楽ファイルを読み込んでください。";
                        }
                    }
                    DrawCount = 0;
                }
                //描写の位置の変更
                NotePaint.MoveBaseLine((MusicPlayer.PresentMusicTime + NoteOffsetTime), BPM);
                NotePaint.PaintNoteToForm(e.Graphics, BPM);
                //プレビュー画面があればプレビュー画面の表示
                if (PreviewForm.Created == true)
                {
                    PreviewForm.PresentTime = MusicPlayer.PresentMusicTime;
                    PreviewForm.PreviewNote = NotePaint.PresentNote();
                    PreviewForm.PreviewKeys = NotePaint.Keys;
                    PreviewForm.NoteOffsetTime = NoteOffsetTime;
                    PreviewForm.Invalidate();
                }
                DrawCount++;
                isPainting = false;
            //}
            //catch
            //{
            //}
        }
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            ThreadStop = true;
            MusicPlayer.FetchMusicFlag = false;
            MusicPlayer.CloseMusicPlayer();
        }
        //画面の更新(60fps)
        public void MyPaint()
        {
            double nextframe = (double)System.Environment.TickCount;
            float wait = 1000f / 60f;
            while (!ThreadStop)
            {
                if (System.Environment.TickCount >= nextframe)
                {
                    if (isPainting==false)
                    {
                        this.Invalidate();
                    }
                    nextframe += wait;
                }
                Thread.Sleep(1);
            }
        }

        //再生ボタン
        private void button1_Click_1(object sender, EventArgs e)
        {
            if (MusicPlayer.FetchMusicFlag == true)
            {
                string TempMusicMode;
                TempMusicMode = MusicPlayer.GetPlayingMusicMode();
                if (TempMusicMode == "playing")
                {
                    MusicPlayer.StopMusic();
                    button1.Text = "再生";
                }
                else
                {
                    MusicPlayer.PlayMusic();
                    button1.Text = "一時停止";
                }
            }
        }
        //1泊進むボタン
        private void button3_Click(object sender, EventArgs e)
        {
            MusicPlayer.GetPresentTime();
            MusicPlayer.GoBeat((int)BPM.GetBPM(MusicPlayer.PresentMusicTime));
        }
        //1小節進むボタン
        private void button2_Click(object sender, EventArgs e)
        {
            MusicPlayer.GetPresentTime();
            MusicPlayer.GoMeasure((int)BPM.GetBPM(MusicPlayer.PresentMusicTime));
        }
        //1拍戻るボタン
        private void button4_Click(object sender, EventArgs e)
        {
            MusicPlayer.GetPresentTime();
            MusicPlayer.BackBeat((int)BPM.GetBPM(MusicPlayer.PresentMusicTime));
        }
        //1小節戻るボタン
        private void button5_Click(object sender, EventArgs e)
        {
            MusicPlayer.GetPresentTime();
            MusicPlayer.BackMeasure((int)BPM.GetBPM(MusicPlayer.PresentMusicTime));
        }

        //オフセットのテキストボックス
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            int i;
            try
            {
                i = int.Parse(textBox1.Text);
            }
            catch
            {
                return;
            }
            if (i < MusicPlayer.TotalMusicTime)
            {
                NoteOffsetTime = i;
            }
            CalcNoteTime(NotePaint.PresentNote());
        }
        //Enterキー入力でフォーカス移動
        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter && textBox1.Text != "")
            {
                e.SuppressKeyPress = true;
                this.ActiveControl = null;
            }
        }
        //BPMのテキストボックス
        private void textBox2_TextChanged(object sender, EventArgs e)
        {
            double i;
            try
            {
                i = Double.Parse(textBox2.Text);
            }
            catch
            {
                return;
            }
            if (i > 0 && i < 5000)
            {
                BPM.BaseBPM = i;
            }
            CalcNoteTime(NotePaint.PresentNote());
        }
        //Enterキー入力でフォーカス移動
        private void textBox2_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter && textBox2.Text != "")
            {
                e.SuppressKeyPress = true;
                this.ActiveControl = null;
            }
        }
        //再生時間トラックバーがスクロールされたとき、再生時間変更
        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            if (MusicPlayer.FetchMusicFlag == true)
            {
                int TrackValue = (int)((double)trackBar1.Value * MusicPlayer.TotalMusicTime / 500.0);
                MusicPlayer.SeekPresentMusicTime(TrackValue);
            }
        }
        //拡大率トラックバー
        private void trackBar2_Scroll(object sender, EventArgs e)
        {
            NotePaint.VerticalLineBeatInterval = 320 / 4 + (5 - trackBar2.Value) * 8;
        }
        //再生速度トラックバー
        private void trackBar3_Scroll(object sender, EventArgs e)
        {
            int TempSoundSpeed = 1000 + (trackBar3.Value - 5) * 100;
            MusicPlayer.ChangeMusicSpeed(TempSoundSpeed);
        }

        //キーボードを押すとき
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (textBox1.Focused == false && textBox2.Focused == false)
            {
                int ButtonNumber = 0;
                if (e.Modifiers == Keys.Control)
                {
                    switch (e.KeyCode)
                    {
                        case Keys.X: 切り取り(); break;
                        case Keys.C: コピー(); break;
                        case Keys.V: 貼り付け(); break;
                    }
                }
                else
                {
                    if (NotePaint.Keys == 16)
                    {
                        if (e.KeyCode == Keys.D1) ButtonNumber = 1;
                        if (e.KeyCode == Keys.D2) ButtonNumber = 2;
                        if (e.KeyCode == Keys.D3) ButtonNumber = 3;
                        if (e.KeyCode == Keys.D4) ButtonNumber = 4;
                        if (e.KeyCode == Keys.Q) ButtonNumber = 5;
                        if (e.KeyCode == Keys.W) ButtonNumber = 6;
                        if (e.KeyCode == Keys.E) ButtonNumber = 7;
                        if (e.KeyCode == Keys.R) ButtonNumber = 8;
                        if (e.KeyCode == Keys.A) ButtonNumber = 9;
                        if (e.KeyCode == Keys.S) ButtonNumber = 10;
                        if (e.KeyCode == Keys.D) ButtonNumber = 11;
                        if (e.KeyCode == Keys.F) ButtonNumber = 12;
                        if (e.KeyCode == Keys.Z) ButtonNumber = 13;
                        if (e.KeyCode == Keys.X) ButtonNumber = 14;
                        if (e.KeyCode == Keys.C) ButtonNumber = 15;
                        if (e.KeyCode == Keys.V) ButtonNumber = 16;
                        if (ButtonNumber != 0)
                        {
                            Note.NotePosition NewNotePosition = new Note.NotePosition();
                            NewNotePosition.Measure = NotePaint.NoteFormPresentBeat().Measure;
                            NewNotePosition.Beat = NotePaint.NoteFormPresentBeat().Beat;
                            NewNotePosition.Button = ButtonNumber - 1;
                            NewNotePosition.Selected = true;
                            NotePaint.PresentNote().UnSelectAllnote();
                            NotePaint.PresentNote().AddNewNotePosition(NewNotePosition);
                            CalcNoteTime(NotePaint.PresentNote());
                        }
                    }
                    else if (NotePaint.Keys == 9)
                    {
                        if (e.KeyCode == Keys.W) ButtonNumber = 1;
                        if (e.KeyCode == Keys.E) ButtonNumber = 2;
                        if (e.KeyCode == Keys.R) ButtonNumber = 3;
                        if (e.KeyCode == Keys.S) ButtonNumber = 4;
                        if (e.KeyCode == Keys.D) ButtonNumber = 5;
                        if (e.KeyCode == Keys.F) ButtonNumber = 6;
                        if (e.KeyCode == Keys.X) ButtonNumber = 7;
                        if (e.KeyCode == Keys.C) ButtonNumber = 8;
                        if (e.KeyCode == Keys.V) ButtonNumber = 9;
                        if (e.KeyCode == Keys.NumPad1) ButtonNumber = 7;
                        if (e.KeyCode == Keys.NumPad2) ButtonNumber = 8;
                        if (e.KeyCode == Keys.NumPad3) ButtonNumber = 9;
                        if (e.KeyCode == Keys.NumPad4) ButtonNumber = 4;
                        if (e.KeyCode == Keys.NumPad5) ButtonNumber = 5;
                        if (e.KeyCode == Keys.NumPad6) ButtonNumber = 6;
                        if (e.KeyCode == Keys.NumPad7) ButtonNumber = 1;
                        if (e.KeyCode == Keys.NumPad8) ButtonNumber = 2;
                        if (e.KeyCode == Keys.NumPad9) ButtonNumber = 3;
                        if (ButtonNumber != 0)
                        {
                            Note.NotePosition NewNotePosition = new Note.NotePosition();
                            NewNotePosition.Measure = NotePaint.NoteFormPresentBeat().Measure;
                            NewNotePosition.Beat = NotePaint.NoteFormPresentBeat().Beat;
                            NewNotePosition.Button = ButtonNumber - 1;
                            NewNotePosition.Selected = true;
                            NotePaint.PresentNote().UnSelectAllnote();
                            NotePaint.PresentNote().AddNewNotePosition(NewNotePosition);
                            CalcNoteTime(NotePaint.PresentNote());
                        }
                    }
                    if (e.KeyCode == Keys.Delete)
                    {
                        NotePaint.PresentNote().RemoveSelectedNote();
                    }
                }
            }
        }
        //矢印キーの処理。輸入
        [System.Security.Permissions.UIPermission(
    System.Security.Permissions.SecurityAction.LinkDemand,
    Window = System.Security.Permissions.UIPermissionWindow.AllWindows)]
        protected override bool ProcessDialogKey(Keys keyData)
        {
            //左キーが押されているか調べる
            if ((keyData & Keys.KeyCode) == Keys.Left)
            {
                //左キーの本来の処理(左側のコントロールにフォーカスを移す)をさせたくないときは、trueを返す
                if (NotePaint.Keys == 9)
                {
                    NotePaint.PresentNote().MoveSelectedNote(-1, 0, 9);
                }
                else
                {
                    NotePaint.PresentNote().MoveSelectedNote(-1, 0, 16);
                }
                return true;
            }
            if ((keyData & Keys.KeyCode) == Keys.Right)
            {
                //左キーの本来の処理(左側のコントロールにフォーカスを移す)をさせたくないときは、trueを返す
                if (NotePaint.Keys == 9)
                {
                    NotePaint.PresentNote().MoveSelectedNote(1, 0, 9);
                }
                else
                {
                    NotePaint.PresentNote().MoveSelectedNote(1, 0, 16);
                }
                return true;
            }
            if ((keyData & Keys.KeyCode) == Keys.Up)
            {
                //左キーの本来の処理(左側のコントロールにフォーカスを移す)をさせたくないときは、trueを返す
                if (NotePaint.Keys == 9)
                {
                    NotePaint.PresentNote().MoveSelectedNote(0, -1, 9);
                }
                else
                {
                    NotePaint.PresentNote().MoveSelectedNote(0, -1, 16);
                }
                return true;
            }
            if ((keyData & Keys.KeyCode) == Keys.Down)
            {
                //左キーの本来の処理(左側のコントロールにフォーカスを移す)をさせたくないときは、trueを返す
                if (NotePaint.Keys == 9)
                {
                    NotePaint.PresentNote().MoveSelectedNote(0, 1, 9);
                }
                else
                {
                    NotePaint.PresentNote().MoveSelectedNote(0, 1, 16);
                }
                return true;
            }
            return base.ProcessDialogKey(keyData);
        }

        //マウスのボタンを押すとき
        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            //押した位置を保存する
            MouseDownPosition = e.Location;
            TempMousePosition.X = 0;
            TempMousePosition.Y = 0;
            NotePaint.CheckedNote TempCheckNote;
            TempCheckNote = NotePaint.NoteFormClick(e.X, e.Y);
            //クリックした場所がおかしくないとき
            if (TempCheckNote != null)
            {
                Note.NotePosition TempNotePosition = new Note.NotePosition();
                TempNotePosition.Measure = TempCheckNote.Measure;
                TempNotePosition.Beat = TempCheckNote.Beat;
                TempNotePosition.Button = TempCheckNote.Button;
                Note.NoteComparer Compare = new Note.NoteComparer();
                NotePaint.PresentNote().NoteList.Sort(Compare);
                int Searched = NotePaint.PresentNote().NoteList.BinarySearch(TempNotePosition, Compare);
                //ノートがクリックした位置にないとき
                if (Searched < 0)
                {
                    NotePaint.isSelectRectangle = true;
                    NotePaint.SelectRectangle.X = e.Location.X;
                    NotePaint.SelectRectangle.Y = e.Location.Y;
                    NotePaint.FirstCheckedNote = TempCheckNote;
                    isMouseDrag = false;
                }
                //ノートがクリックした位置にあるが、そのノートが選択されているとき
                else if (NotePaint.PresentNote().NoteList[Searched].Selected == true)
                {
                    NotePaint.isSelectRectangle = false;
                    isMouseDrag = true;
                }
                //ノートがクリックした位置にあるが、そのノートが選択されているとき
                else
                {
                    NotePaint.isSelectRectangle = false;
                    isMouseDrag = false;
                }
            }
        }
        //マウスが動いたとき
        private void Form1_MouseMove(object sender, MouseEventArgs e)
        {
            //左クリック
            if (e.Button == MouseButtons.Left)
            {
                //ドラッグで移動の動作のとき
                if (isMouseDrag == true)
                {
                    //選択されたノートを動かす
                    NotePaint.PresentNote().MoveSelectedNote((e.X - MouseDownPosition.X) / (NotePaint.VerticalLineBeatInterval / 8) - TempMousePosition.X, 0,NotePaint.Keys);
                    TempMousePosition.X = (e.X - MouseDownPosition.X) / (NotePaint.VerticalLineBeatInterval / 8);
                    NotePaint.PresentNote().MoveSelectedNote(0, (e.Y - MouseDownPosition.Y) / NotePaint.ParallelLineInterval - TempMousePosition.Y,NotePaint.Keys);
                    TempMousePosition.Y = (e.Y - MouseDownPosition.Y) / NotePaint.ParallelLineInterval;
                }
                //範囲選択の時
                if (NotePaint.isSelectRectangle == true)
                {
                    NotePaint.CheckedNote tempCheckedNote = NotePaint.NoteFormClick(e.Location.X, e.Location.Y);
                    if (tempCheckedNote != null && tempCheckedNote.BPM == false)
                    {
                        if (MouseDownPosition.X > e.Location.X)
                        {
                            NotePaint.SelectRectangle.Width = MouseDownPosition.X - e.Location.X;
                            NotePaint.SelectRectangle.X = e.Location.X;
                        }
                        else
                        {
                            NotePaint.SelectRectangle.Width = e.Location.X - MouseDownPosition.X;
                        }
                        if (MouseDownPosition.Y > e.Location.Y)
                        {
                            NotePaint.SelectRectangle.Height = MouseDownPosition.Y - e.Location.Y;
                            NotePaint.SelectRectangle.Y = e.Location.Y;
                        }
                        else
                        {
                            NotePaint.SelectRectangle.Height = e.Location.Y - MouseDownPosition.Y;
                        }
                        NotePaint.LastCheckedNote = tempCheckedNote;
                    }
                }
            }
        }
        //マウスを離したとき
        private void Form1_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Location != MouseDownPosition)
            {
                if (e.Button == MouseButtons.Left)
                {
                    //範囲選択されていたら
                    if (NotePaint.isSelectRectangle == true)
                    {
                        Note.NotePosition FirstNotePosition = new Note.NotePosition();
                        Note.NotePosition LastNotePosition = new Note.NotePosition();
                        FirstNotePosition.Measure = NotePaint.FirstCheckedNote.Measure;
                        FirstNotePosition.Beat = NotePaint.FirstCheckedNote.Beat;
                        FirstNotePosition.Button = NotePaint.FirstCheckedNote.Button;
                        LastNotePosition.Measure = NotePaint.LastCheckedNote.Measure;
                        LastNotePosition.Beat = NotePaint.LastCheckedNote.Beat;
                        LastNotePosition.Button = NotePaint.LastCheckedNote.Button;
                        //範囲選択が逆転してたら入れ替える
                        if (MouseDownPosition.X > e.Location.X)
                        {
                            Note.NotePosition tempNotePosition;
                            tempNotePosition = FirstNotePosition;
                            FirstNotePosition = LastNotePosition;
                            LastNotePosition = tempNotePosition;
                        }
                        NotePaint.PresentNote().SelectRectangle(FirstNotePosition, LastNotePosition);
                        NotePaint.SelectRectangle.Width = 0;
                        NotePaint.SelectRectangle.Height = 0;
                        NotePaint.isSelectRectangle = false;
                    }
                    if (isMouseDrag == true)
                    {
                        isMouseDrag = false;
                    }
                }
            }
            CalcNoteTime(NotePaint.PresentNote());
        }
        //マウスのクリック
        private void Form1_MouseClick(object sender, MouseEventArgs e)
        {
            this.ActiveControl = null;
            //左クリック
            if (e.Button == MouseButtons.Left)
            {
                if (e.Location == MouseDownPosition)
                {
                    NotePaint.CheckedNote TempCheckNote;
                    TempCheckNote = NotePaint.NoteFormClick(e.X, e.Y);
                    if (TempCheckNote == null)
                    {
                        NotePaint.PresentNote().UnSelectAllnote();
                        return;
                    }
                    else
                    {
                        //BPMが選択されたとき
                        if (TempCheckNote.BPM == true)
                        {
                            Form3 BPMForm = new Form3();
                            BPM.BPMChange TempBPMChange = new BPM.BPMChange();
                            TempBPMChange.BeatForChange = TempCheckNote.Measure * 32 + TempCheckNote.Beat;
                            BPM.BPMChangeComparer comparer = new BPM.BPMChangeComparer();
                            BPM.BPMChangeList.Sort(comparer);
                            int Searched = BPM.BPMChangeList.BinarySearch(TempBPMChange, comparer);
                            if (Searched < 0)
                            {
                                BPMForm.TextBoxOldBPM = 60;
                                if (BPMForm.ShowDialog() == DialogResult.OK)
                                {
                                    TempBPMChange.BPM = BPMForm.NewBPM;
                                    TempBPMChange.TimeForChange = 999999;
                                    BPM.BPMChangeList.Add(TempBPMChange);
                                }
                            }
                            else
                            {
                                BPMForm.TextBoxOldBPM = BPM.BPMChangeList[Searched].BPM;
                                if (BPMForm.ShowDialog() == DialogResult.OK)
                                {
                                    BPM.BPMChangeList[Searched].BPM = BPMForm.NewBPM;
                                }
                            }
                            BPM.BPMChangeList.Sort(comparer);
                            BPM.CalcTimeFromBeat();
                            CalcNoteTime(NotePaint.PresentNote());
                        }
                        //ノートの位置が選択されたとき
                        else
                        {
                            Note.NotePosition TempNotePosition = new Note.NotePosition();
                            int tempBeat = TempCheckNote.Measure * 32 + TempCheckNote.Beat;
                            TempNotePosition.Measure = tempBeat / 32;
                            TempNotePosition.Beat = tempBeat % 32;
                            TempNotePosition.Button = TempCheckNote.Button;
                            Note.NoteComparer Compare = new Note.NoteComparer();
                            NotePaint.PresentNote().NoteList.Sort(Compare);
                            int Searched = NotePaint.PresentNote().NoteList.BinarySearch(TempNotePosition, Compare);
                            if (Searched < 0)
                            {
                                if (NotePaint.PresentNote().NoteSelected == false)
                                {
                                    NotePaint.PresentNote().UnSelectAllnote();
                                    TempNotePosition.Selected = true;
                                    NotePaint.PresentNote().AddNewNotePosition(TempNotePosition);
                                    CalcNoteTime(NotePaint.PresentNote());
                                    //NotePaint.PresentNote().NoteSelected = true;
                                }
                                else
                                {
                                    NotePaint.PresentNote().UnSelectAllnote();
                                }
                            }
                            else
                            {
                                NotePaint.PresentNote().UnSelectAllnote();
                                NotePaint.PresentNote().NoteList[Searched].Selected = true;
                                NotePaint.PresentNote().NoteSelected = true;
                            }
                        }
                    }
                }
            }
            //右クリック
            else if (e.Button == MouseButtons.Right)
            {
                NotePaint.CheckedNote TempCheckNote;
                TempCheckNote = NotePaint.NoteFormClick(e.Location.X, e.Location.Y);
                if (TempCheckNote == null)
                {
                    return;
                }
                else
                {
                    //BPMが選択されたとき
                    if (TempCheckNote.BPM == true)
                    {
                        BPM.BPMChange TempBPMChange = new BPM.BPMChange();
                        TempBPMChange.BeatForChange = TempCheckNote.Measure * 32 + TempCheckNote.Beat;
                        BPM.BPMChangeComparer comparer = new BPM.BPMChangeComparer();
                        BPM.BPMChangeList.Sort(comparer);
                        int Searched = BPM.BPMChangeList.BinarySearch(TempBPMChange, comparer);
                        if (Searched >= 0)
                        {
                            tempBPMBeat = Searched;
                            コピーToolStripMenuItem1.Visible = false;
                            コピーCToolStripMenuItem.Visible = false;
                            貼り付けPToolStripMenuItem.Visible = false;
                            削除DToolStripMenuItem.Visible = false;
                            toolStripSeparator1.Visible = false;
                            toolStripSeparator9.Visible = false;
                            すべて選択ToolStripMenuItem1.Visible = false;
                            選択解除XToolStripMenuItem.Visible = false;
                            ノートの反転ToolStripMenuItem.Visible = false;
                            bPM削除DToolStripMenuItem.Visible = true;
                        }
                    }
                    contextMenuStrip1.Show(MousePosition);
                }
            }
        }

        //コンテキストメニュー・すべて選択する
        private void すべて選択ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            すべて選択();
        }
        //コンテキストメニュー・選択解除
        private void 選択解除XToolStripMenuItem_Click(object sender, EventArgs e)
        {
            選択解除();
        }
        //コンテキストメニュー・削除する
        private void 削除DToolStripMenuItem_Click(object sender, EventArgs e)
        {
            削除();
        }
        //コンテキストメニュー・BPMの削除
        private void bPMの削除DToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //ノートの選択解除
            NotePaint.PresentNote().UnSelectAllnote();
            if (tempBPMBeat >= 0)
            {
                BPM.BPMChangeList.RemoveAt(tempBPMBeat);
            }
            BPM.CalcTimeFromBeat();
            CalcNoteTime(NotePaint.PresentNote());
        }
        //コンテキストメニューが閉じたとき、表示する項目を初期状態に
        private void contextMenuStrip1_Closed(object sender, ToolStripDropDownClosedEventArgs e)
        {
            コピーToolStripMenuItem1.Visible = true;
            コピーCToolStripMenuItem.Visible = true;
            貼り付けPToolStripMenuItem.Visible = true;
            削除DToolStripMenuItem.Visible = true;
            toolStripSeparator1.Visible = true;
            toolStripSeparator9.Visible = true;
            すべて選択ToolStripMenuItem1.Visible = true;
            選択解除XToolStripMenuItem.Visible = true;
            bPM削除DToolStripMenuItem.Visible = false;
            ノートの反転ToolStripMenuItem.Visible = true;
        }
        //コンテキストメニュー・コピー
        private void コピーCToolStripMenuItem_Click(object sender, EventArgs e)
        {
            コピー();
        }
        //コンテキストメニュー・貼り付け
        private void 貼り付けPToolStripMenuItem_Click(object sender, EventArgs e)
        {
            貼り付け();
        }
        //コンテキストメニュー・切り取り
        private void コピーToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            切り取り();
        }
        //コンテキストメニュー・ノートの反転
        private void ノートの反転ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ノートの反転();
        }
        //コンテキストメニュー・ロングノートの切り替え
        private void ロングノートの切り替えToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ロングノートの切り替え();
        }
        //ノートをすべて選択する
        void すべて選択()
        {
            NotePaint.PresentNote().SelectAllnote();
        }
        //ノートの選択解除
        void 選択解除()
        {
            NotePaint.PresentNote().UnSelectAllnote();
        }
        //ノートの削除
        void 削除()
        {
            NotePaint.PresentNote().RemoveSelectedNote();
        }
        //ノートのコピー
        void コピー()
        {

            //すでにコピーされていたらそれを削除する
            if (CopyedNote.NoteList.Count() > 0)
            {
                CopyedNote.NoteList.Clear();
            }
            for (int i = 0; i < NotePaint.PresentNote().NoteList.Count(); i++)
            {
                if (NotePaint.PresentNote().NoteList[i].Selected == true)
                {
                    Note.NotePosition NewNotePosition = new Note.NotePosition();
                    NewNotePosition.Measure = NotePaint.PresentNote().NoteList[i].Measure;
                    NewNotePosition.Beat = NotePaint.PresentNote().NoteList[i].Beat;
                    NewNotePosition.Button = NotePaint.PresentNote().NoteList[i].Button;
                    CopyedNote.AddNewNotePosition(NewNotePosition);
                    CopyedKeys = NotePaint.Keys;
                }
            }
        }
        //ノートの貼り付け
        void 貼り付け()
        {
            //保存したキー数と同じなら処理する
            if (NotePaint.Keys == CopyedKeys)
            {
                int tempBeat = NotePaint.NoteFormPresentBeat().Measure * 32 + NotePaint.NoteFormPresentBeat().Beat;
                //コピーされていたら
                if (CopyedNote.NoteList.Count > 0)
                {
                    //すべて選択解除
                    NotePaint.PresentNote().UnSelectAllnote();
                    //コピーリストの先頭との差を求める
                    tempBeat -= CopyedNote.NoteList[0].Measure * 32 + CopyedNote.NoteList[0].Beat;
                }
                //現在位置からコピーリストを追加していく
                for (int i = 0; i < CopyedNote.NoteList.Count(); i++)
                {
                    Note.NotePosition tempNotePosition = new Note.NotePosition();
                    tempNotePosition.Measure = CopyedNote.NoteList[i].Measure + tempBeat / 32;
                    tempNotePosition.Beat = CopyedNote.NoteList[i].Beat + tempBeat % 32;
                    tempNotePosition.Button = CopyedNote.NoteList[i].Button;
                    tempNotePosition.Selected = true;
                    NotePaint.PresentNote().AddNewNotePosition(tempNotePosition);
                }
                Note.NoteComparer tempComparer = new Note.NoteComparer();
                NotePaint.PresentNote().NoteList.Sort(tempComparer);
                NotePaint.PresentNote().NoteSelected = true;
                CalcNoteTime(NotePaint.PresentNote());
            }
            //保存したキー数と違うときはエラーメッセージの表示
            else
            {
                MessageBox.Show("貼り付け先のキー数が違うため、コピー出来ません。");
            }
        }
        //ノートの切り取り
        void 切り取り()
        {
            //すでにコピーされていたらそれを削除する
            if (CopyedNote.NoteList.Count() > 0)
            {
                CopyedNote.NoteList.Clear();
            }
            for (int i = 0; i < NotePaint.PresentNote().NoteList.Count(); i++)
            {
                if (NotePaint.PresentNote().NoteList[i].Selected == true)
                {
                    Note.NotePosition NewNotePosition = new Note.NotePosition();
                    NewNotePosition.Measure = NotePaint.PresentNote().NoteList[i].Measure;
                    NewNotePosition.Beat = NotePaint.PresentNote().NoteList[i].Beat;
                    NewNotePosition.Button = NotePaint.PresentNote().NoteList[i].Button;
                    CopyedNote.AddNewNotePosition(NewNotePosition);
                    //削除する
                    NotePaint.PresentNote().NoteList.RemoveAt(i);
                    i--;
                    CopyedKeys = NotePaint.Keys;
                }
            }
        }
        //ノートの反転
        void ノートの反転()
        {
            for (int i = 0; i < NotePaint.PresentNote().NoteList.Count(); i++)
            {
                if (NotePaint.PresentNote().NoteList[i].Selected == true)
                {
                    if (NotePaint.Keys == 16)
                    {
                        NotePaint.PresentNote().NoteList[i].Button = 15 - NotePaint.PresentNote().NoteList[i].Button;
                    }
                    else
                    {
                        NotePaint.PresentNote().NoteList[i].Button = 8 - NotePaint.PresentNote().NoteList[i].Button;
                    }
                }
            }
        }
        //ロングノートの切り替え
        void ロングノートの切り替え()
        {

        }

        //譜面ファイルを新規作成
        private void 譜面ファイルを新規作成ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //新規作成可能か
            bool isEnable = false;
            //新規作成の確認
            DialogResult result = MessageBox.Show("編集中の情報はすべて破棄されます。\n続行しますか?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
            if (result == DialogResult.OK)
            {
                isEnable = true;
            }
            //新規作成する
            if (isEnable == true)
            {
                EleFilePath = string.Empty;
                NotePaint.NotepaintReset();
                MusicPlayer.MusicPlayerReset();
                BPM.BPMReset();
                MusicInfo = new MusicInfo();
                toolStripStatusLabel1.Text = "譜面ファイルまたは音楽ファイルを読み込んでください。";
                toolStripStatusLabel2.Text = "";
                toolStripStatusLabel3.Text = "";
                toolStripStatusLabel4.Text = "";
                toolStripStatusLabel5.Text = "";
            }
        }
        //名前をつけて譜面ファイルを保存
        private void 名前をつけて保存ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EleFilePath = null;
            名前をつけて譜面ファイルを保存・上書き保存();
        }
        //譜面ファイルを上書き保存
        private void 上書き保存ToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            名前をつけて譜面ファイルを保存・上書き保存();
        }
        //譜面ファイルを開く
        private void 新規ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //上書き可能か
            bool isEnable = false;
            //上書きの確認
            DialogResult result = MessageBox.Show("編集中の情報はすべて破棄されます。\n続行しますか?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
            if (result == DialogResult.OK)
            {
                isEnable = true;
            }
            //上書き可能ならば
            if (isEnable == true)
            {
                //譜面ファイルを正しく開けたか
                bool isOK = false;
                //ファイルパス
                string DialogFileName = null;
                //ファイル名
                string DialogSafeFileName = null;
                //ファイルを選択するダイアログをおっぴろげ!
                OpenFileDialog dialog = new OpenFileDialog();
                //譜面ファイルの形式はtxt?
                dialog.Filter = "譜面ファイル (*.ele)|*.ele";
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    DialogFileName = dialog.FileName;
                    DialogSafeFileName = dialog.SafeFileName;
                }
                dialog.Dispose();
                if (DialogFileName != null)
                {
                    //ノートリストのクリア
                    NotePaint.NotepaintReset();
                    //BPMリストのクリア
                    BPM.BPMChangeList.Clear();
                    //音楽情報のクリア
                    MusicInfo = new MusicInfo();
                    StreamReader Stream = new StreamReader(dialog.FileName, Encoding.GetEncoding("shift_jis"));
                    string TempString = string.Empty;
                    string[] ArrayTempString;
                    try
                    {
                        //#TITLE:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(7);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.Title = TempString;
                        //#SUBTITLE:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(10);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.SubTitle = TempString;
                        //#ARTIST:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(8);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.Artist = TempString;
                        //#ALBUMART:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(10);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.AlbumArt = TempString;
                        //#MUSIC:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(7);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.Music = TempString;
                        //#OFFSET:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(8);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        NoteOffsetTime = int.Parse(TempString);
                        //#BPMS:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(6);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        ArrayTempString = TempString.Split(',');
                        for (int i = 0; i < ArrayTempString.Count(); i++)
                        {
                            if (ArrayTempString[i] != "")
                            {
                                if (i == 0)
                                {
                                    BPM.BaseBPM = double.Parse(ArrayTempString[i]);
                                }
                                else
                                {
                                    BPM.BPMChange TempBPMChange = new BPM.BPMChange();
                                    TempBPMChange.BPM = double.Parse(ArrayTempString[i]);
                                    BPM.BPMChangeList.Add(TempBPMChange);
                                }
                            }
                        }
                        //#BPMPOSITIONS:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(14);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        ArrayTempString = TempString.Split(',');
                        for (int i = 0; i < ArrayTempString.Count(); i++)
                        {
                            if (ArrayTempString[i] != "")
                            {
                                if (i != 0)
                                {
                                    BPM.BPMChangeList[i - 1].BeatForChange = int.Parse(ArrayTempString[i]);
                                }
                            }
                        }
                        BPM.BPMChangeComparer BPMListComparer = new BPM.BPMChangeComparer();
                        BPM.BPMChangeList.Sort(BPMListComparer);
                        BPM.CalcTimeFromBeat();
                        //#NOTE:
                        Stream.ReadLine();
                        ////*------------9keys--------------*/
                        Stream.ReadLine();
                        //keys:9
                        Stream.ReadLine();
                        //BASIC:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(6);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.DifficultyBASIC9 = int.Parse(TempString);
                        while (true)
                        {
                            Note.NotePosition TempNote = new Note.NotePosition();
                            //ファイルから読み込み
                            TempString = Stream.ReadLine();
                            //,で区切る
                            ArrayTempString = TempString.Split(',');
                            //正しく区切れたとき
                            if (ArrayTempString.Count() == 3)
                            {
                                TempNote.Measure = int.Parse(ArrayTempString[0]);
                                TempNote.Beat = int.Parse(ArrayTempString[1]);
                                TempNote.Button = int.Parse(ArrayTempString[2]) - 1;
                                NotePaint.BasicNote9.AddNewNotePosition(TempNote);
                            }
                            else if (ArrayTempString.Count() == 1)
                            {
                                break;
                            }
                        }
                        //NORMAL:
                        TempString = TempString.Substring(7);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.DifficultyNORMAL9 = int.Parse(TempString);
                        while (true)
                        {
                            Note.NotePosition TempNote = new Note.NotePosition();
                            //ファイルから読み込み
                            TempString = Stream.ReadLine();
                            //,で区切る
                            ArrayTempString = TempString.Split(',');
                            //正しく区切れたとき
                            if (ArrayTempString.Count() == 3)
                            {
                                TempNote.Measure = int.Parse(ArrayTempString[0]);
                                TempNote.Beat = int.Parse(ArrayTempString[1]);
                                TempNote.Button = int.Parse(ArrayTempString[2]) - 1;
                                NotePaint.NormalNote9.AddNewNotePosition(TempNote);
                            }
                            else if (ArrayTempString.Count() == 1)
                            {
                                break;
                            }
                        }
                        //ADVANCED:
                        TempString = TempString.Substring(9);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.DifficultyADVANCED9 = int.Parse(TempString);
                        while (true)
                        {
                            Note.NotePosition TempNote = new Note.NotePosition();
                            //ファイルから読み込み
                            TempString = Stream.ReadLine();
                            //,で区切る
                            ArrayTempString = TempString.Split(',');
                            //正しく区切れたとき
                            if (ArrayTempString.Count() == 3)
                            {
                                TempNote.Measure = int.Parse(ArrayTempString[0]);
                                TempNote.Beat = int.Parse(ArrayTempString[1]);
                                TempNote.Button = int.Parse(ArrayTempString[2]) - 1;
                                NotePaint.AdvancedNote9.AddNewNotePosition(TempNote);
                            }
                            else if (ArrayTempString.Count() == 1)
                            {
                                break;
                            }
                        }
                        ////*------------16keys--------------*/
                        //keys:16
                        Stream.ReadLine();
                        //BASIC:
                        TempString = Stream.ReadLine();
                        TempString = TempString.Substring(6);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.DifficultyBASIC16 = int.Parse(TempString);
                        while (true)
                        {
                            Note.NotePosition TempNote = new Note.NotePosition();
                            //ファイルから読み込み
                            TempString = Stream.ReadLine();
                            //,で区切る
                            ArrayTempString = TempString.Split(',');
                            //正しく区切れたとき
                            if (ArrayTempString.Count() == 3)
                            {
                                TempNote.Measure = int.Parse(ArrayTempString[0]);
                                TempNote.Beat = int.Parse(ArrayTempString[1]);
                                TempNote.Button = int.Parse(ArrayTempString[2]) - 1;
                                NotePaint.BasicNote16.AddNewNotePosition(TempNote);
                            }
                            else if (ArrayTempString.Count() == 1)
                            {
                                break;
                            }
                        }
                        //NORMAL:
                        TempString = TempString.Substring(7);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.DifficultyNORMAL16 = int.Parse(TempString);
                        while (true)
                        {
                            Note.NotePosition TempNote = new Note.NotePosition();
                            //ファイルから読み込み
                            TempString = Stream.ReadLine();
                            //,で区切る
                            ArrayTempString = TempString.Split(',');
                            //正しく区切れたとき
                            if (ArrayTempString.Count() == 3)
                            {
                                TempNote.Measure = int.Parse(ArrayTempString[0]);
                                TempNote.Beat = int.Parse(ArrayTempString[1]);
                                TempNote.Button = int.Parse(ArrayTempString[2]) - 1;
                                NotePaint.NormalNote16.AddNewNotePosition(TempNote);
                            }
                            else if (ArrayTempString.Count() == 1)
                            {
                                break;
                            }
                        }
                        //ADVANCED:
                        TempString = TempString.Substring(9);
                        TempString = TempString.Remove(TempString.Count() - 1);
                        MusicInfo.DifficultyADVANCED16 = int.Parse(TempString);
                        while (true)
                        {
                            Note.NotePosition TempNote = new Note.NotePosition();
                            //ファイルから読み込み
                            TempString = Stream.ReadLine();
                            if (TempString == null)
                            {
                                break;
                            }
                            //,で区切る
                            ArrayTempString = TempString.Split(',');
                            //正しく区切れたとき
                            if (ArrayTempString.Count() == 3)
                            {
                                TempNote.Measure = int.Parse(ArrayTempString[0]);
                                TempNote.Beat = int.Parse(ArrayTempString[1]);
                                TempNote.Button = int.Parse(ArrayTempString[2]) - 1;
                                NotePaint.AdvancedNote16.AddNewNotePosition(TempNote);
                            }
                            else if (ArrayTempString.Count() == 1)
                            {
                                break;
                            }
                        }
                        //最後まで読み込めたらtrue
                        isOK = true;
                    }
                    catch
                    {
                        MessageBox.Show("譜面ファイルの形式が正しくありません。\n譜面ファイルを読み込めませんでした。");
                    }
                    finally
                    {
                        Stream.Dispose();
                    }
                    if (isOK)
                    {
                        //テキストボックスに反映
                        textBox1.Text = NoteOffsetTime.ToString();
                        textBox2.Text = BPM.BaseBPM.ToString();
                        //トラックバーの初期化
                        trackBar2.Value = 5;
                        trackBar3.Value = 5;
                        //音楽ファイルが同ディレクトリに存在すればそれを開く
                        TempString = DialogFileName.Remove(DialogFileName.Count() - DialogSafeFileName.Count());
                        TempString += MusicInfo.Music;
                        //音楽に関してリセット
                        MusicPlayer.MusicPlayerReset();
                        toolStripStatusLabel1.Text = "注意:音楽ファイルを読み込んでください。";
                        toolStripStatusLabel2.Text = "";
                        toolStripStatusLabel3.Text = "";
                        toolStripStatusLabel4.Text = "";
                        toolStripStatusLabel5.Text = "";
                        if (System.IO.File.Exists(TempString))
                        {
                            //再生プレイヤーの準備
                            MusicPlayer.FetchMusic(TempString, MusicInfo.Music);
                            //ステータスバーに表示
                            toolStripStatusLabel2.Text = "曲名 : " + MusicPlayer.MusicFileName;
                            toolStripStatusLabel5.Text = " 合計再生時間 : " + MusicPlayer.TotalMusicDateTime.ToLongTimeString();
                        }
                        BPM.CalcTimeFromBeat();
                        CalcNoteTime(NotePaint.BasicNote9);
                        CalcNoteTime(NotePaint.NormalNote9);
                        CalcNoteTime(NotePaint.AdvancedNote9);
                        CalcNoteTime(NotePaint.BasicNote16);
                        CalcNoteTime(NotePaint.NormalNote16);
                        CalcNoteTime(NotePaint.AdvancedNote16);
                    }
                }
            }
        }
        //音楽ファイルを開く
        private void 開くToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //ファイルを選択するダイアログをおっぴろげ!
            OpenFileDialog dialog = new OpenFileDialog();
            //wavとmp3とmidiとwmaが再生可能っぽい!
            dialog.Filter = "すべての再生可能なファイル (*.wav,*.mp3,*.mid,*.midi,*.wma)|*.wav;*.mp3;*.mid;*.midi;*.wma"
                            + "|WAVEファイル (*.wav)|*.wav|MP3ファイル (*.mp3)|*.mp3"
                            + "|MIDIファイル (*.mid,*.midi)|*.mid;*.midi|WMAファイル(*.wma)|*.wma";
            if (dialog.ShowDialog(this) == DialogResult.OK)
            {
                //再生プレイヤーの準備
                MusicPlayer.FetchMusic(dialog.FileName,dialog.SafeFileName);
                //楽曲情報の更新
                MusicInfo.Music = dialog.SafeFileName;
                //ステータスバーに表示
                toolStripStatusLabel1.Text = "";
                toolStripStatusLabel2.Text = "曲名 : " + MusicPlayer.MusicFileName;
                toolStripStatusLabel5.Text = " 合計再生時間 : " + MusicPlayer.TotalMusicDateTime.ToLongTimeString();
                //トラックバーの初期化
                trackBar2.Value = 5;
                trackBar3.Value = 5;
            }
            dialog.Dispose();
        }
        //エディタの終了
        private void エディタの終了XToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            Application.Exit();
        }
        //名前をつけて譜面ファイルを保存・上書き保存
        void 名前をつけて譜面ファイルを保存・上書き保存()
        {
            //保存を実行するか
            bool isEnable = false;
            //すでにファイルパスが存在すれば
            if (EleFilePath != null)
            {
                isEnable = true;
            }
            else
            {
                SaveFileDialog dialog = new SaveFileDialog();
                //はじめのファイル名を指定する
                dialog.FileName = "新しい譜面ファイル.ele";
                //はじめに表示されるフォルダを指定する
                dialog.Filter = "譜面ファイル(*.ele)|*.ele";
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    dialog.Dispose();
                    EleFilePath = dialog.FileName;
                    isEnable = true;
                }
            }
            if (isEnable)
            {
                StreamWriter Stream = new StreamWriter(EleFilePath, false, Encoding.GetEncoding("shift_jis"));
                //楽曲情報を書き込む
                Stream.WriteLine("#TITLE:" + MusicInfo.Title + ";");
                Stream.WriteLine("#SUBTITLE:" + MusicInfo.SubTitle + ";");
                Stream.WriteLine("#ARTIST:" + MusicInfo.Artist + ";");
                Stream.WriteLine("#ALBUMART:" + MusicInfo.AlbumArt + ";");
                Stream.WriteLine("#MUSIC:" + MusicInfo.Music + ";");
                if (NoteOffsetTime == 0)
                {
                    Stream.WriteLine("#OFFSET:" + "0" + ";");
                }
                else
                {
                    Stream.WriteLine("#OFFSET:" + NoteOffsetTime.ToString() + ";");
                }
                //BPM変化を書き込む
                Stream.Write("#BPMS:");
                Stream.Write(BPM.BaseBPM.ToString());
                if (BPM.BPMChangeList.Count() == 0)
                {
                    Stream.Write(";");
                }
                else
                {
                    Stream.Write(",");
                }
                for (int i = 0; i < BPM.BPMChangeList.Count(); i++)
                {
                    if (i + 1 == BPM.BPMChangeList.Count())
                    {
                        Stream.Write(BPM.BPMChangeList[i].BPM + ";");
                    }
                    else
                    {
                        Stream.Write(BPM.BPMChangeList[i].BPM + ",");
                    }
                }
                Stream.WriteLine();
                Stream.Write("#BPMPOSITIONS:");
                Stream.Write("0");
                if (BPM.BPMChangeList.Count() == 0)
                {
                    Stream.Write(";");
                }
                else
                {
                    Stream.Write(",");
                }
                for (int i = 0; i < BPM.BPMChangeList.Count; i++)
                {
                    if (i + 1 == BPM.BPMChangeList.Count)
                    {
                        Stream.Write(BPM.BPMChangeList[i].BeatForChange + ";");
                    }
                    else
                    {
                        Stream.Write(BPM.BPMChangeList[i].BeatForChange + ",");
                    }
                }
                Stream.WriteLine();
                //ノートを書き込む。
                Stream.WriteLine("#NOTE:");
                Stream.WriteLine("/*------------9keys--------------*/");
                Stream.WriteLine("keys:9");
                //ノート数が0であれば難易度を0に
                if (NotePaint.BasicNote9.NoteList.Count() == 0)
                {
                    Stream.WriteLine("BASIC:" +"0" + ";");
                }
                else
                {
                    Stream.WriteLine("BASIC:" + MusicInfo.DifficultyBASIC9.ToString() + ";");
                }
                //ノートの書き込み
                for (int i = 0; i < NotePaint.BasicNote9.NoteList.Count; i++)
                {
                    string temp;
                    temp = NotePaint.BasicNote9.NoteList[i].Measure.ToString() + ","
                        + NotePaint.BasicNote9.NoteList[i].Beat.ToString() + ","
                        + (NotePaint.BasicNote9.NoteList[i].Button + 1).ToString();
                    //ボタンを1~16にする
                    Stream.WriteLine(temp);
                }
                //ノート数が0であれば難易度を0に
                if (NotePaint.NormalNote9.NoteList.Count() == 0)
                {
                    Stream.WriteLine("NORMAL:" + "0" + ";");
                }
                else
                {
                    Stream.WriteLine("NORMAL:" + MusicInfo.DifficultyNORMAL9.ToString() + ";");
                }
                //ノートの書き込み
                for (int i = 0; i < NotePaint.NormalNote9.NoteList.Count; i++)
                {
                    string temp;
                    temp = NotePaint.NormalNote9.NoteList[i].Measure.ToString() + ","
                        + NotePaint.NormalNote9.NoteList[i].Beat.ToString() + ","
                        + (NotePaint.NormalNote9.NoteList[i].Button + 1).ToString();
                    //ボタンを1~16にする
                    Stream.WriteLine(temp);
                }
                //ノート数が0であれば難易度を0に
                if (NotePaint.AdvancedNote9.NoteList.Count() == 0)
                {
                    Stream.WriteLine("ADVANCED:" + "0" + ";");
                }
                else
                {
                    Stream.WriteLine("ADVANCED:" + MusicInfo.DifficultyADVANCED9.ToString() + ";");
                }
                //ノートの書き込み
                for (int i = 0; i < NotePaint.AdvancedNote9.NoteList.Count; i++)
                {
                    string temp;
                    temp = NotePaint.AdvancedNote9.NoteList[i].Measure.ToString() + ","
                        + NotePaint.AdvancedNote9.NoteList[i].Beat.ToString() + ","
                        + (NotePaint.AdvancedNote9.NoteList[i].Button + 1).ToString();
                    Stream.WriteLine(temp);
                }
                Stream.WriteLine("/*------------16keys--------------*/");
                Stream.WriteLine("keys:16");
                //ノート数が0であれば難易度を0に
                if (NotePaint.BasicNote16.NoteList.Count() == 0)
                {
                    Stream.WriteLine("BASIC:" + "0" + ";");
                }
                else
                {
                    Stream.WriteLine("BASIC:" + MusicInfo.DifficultyBASIC16.ToString() + ";");
                }
                //ノートの書き込み
                for (int i = 0; i < NotePaint.BasicNote16.NoteList.Count; i++)
                {
                    string temp;
                    temp = NotePaint.BasicNote16.NoteList[i].Measure.ToString() + ","
                        + NotePaint.BasicNote16.NoteList[i].Beat.ToString() + ","
                        + (NotePaint.BasicNote16.NoteList[i].Button + 1).ToString();
                    Stream.WriteLine(temp);
                }
                //ノート数が0であれば難易度を0に
                if (NotePaint.NormalNote16.NoteList.Count() == 0)
                {
                    Stream.WriteLine("NORMAL:" + "0" + ";");
                }
                else
                {
                    Stream.WriteLine("NORMAL:" + MusicInfo.DifficultyNORMAL16.ToString() + ";");
                }
                //ノートの書き込み
                for (int i = 0; i < NotePaint.NormalNote16.NoteList.Count; i++)
                {
                    string temp;
                    temp = NotePaint.NormalNote16.NoteList[i].Measure.ToString() + ","
                        + NotePaint.NormalNote16.NoteList[i].Beat.ToString() + ","
                        + (NotePaint.NormalNote16.NoteList[i].Button + 1).ToString();
                    Stream.WriteLine(temp);
                }
                //ノート数が0であれば難易度を0に
                if (NotePaint.AdvancedNote16.NoteList.Count() == 0)
                {
                    Stream.WriteLine("ADVANCED:" + "0" + ";");
                }
                else
                {
                    Stream.WriteLine("ADVANCED:" + MusicInfo.DifficultyADVANCED16.ToString() + ";");
                }
                //ノートの書き込み
                for (int i = 0; i < NotePaint.AdvancedNote16.NoteList.Count; i++)
                {
                    string temp;
                    temp = NotePaint.AdvancedNote16.NoteList[i].Measure.ToString() + ","
                        + NotePaint.AdvancedNote16.NoteList[i].Beat.ToString() + ","
                        + (NotePaint.AdvancedNote16.NoteList[i].Button + 1).ToString();
                        Stream.WriteLine(temp);
                }
                Stream.Write("/*------------END--------------*/");
                Stream.Dispose();
            }
        }

        //難易度(BASIC)
        private void eASYEToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NotePaint.NoteDifficluty = NotePaint.NoteDifficlutyMode.BASIC;
            eASYEToolStripMenuItem.Checked = true;
            sTANDARDSToolStripMenuItem.Checked = false;
            aDVANCEDAToolStripMenuItem1.Checked = false;
        }
        //難易度(NORMAL)
        private void sTANDARDSToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NotePaint.NoteDifficluty = NotePaint.NoteDifficlutyMode.NORMAL;
            eASYEToolStripMenuItem.Checked = false;
            sTANDARDSToolStripMenuItem.Checked = true;
            aDVANCEDAToolStripMenuItem1.Checked = false;
        }
        //難易度(ADVANCED)
        private void aDVANCEDAToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            NotePaint.NoteDifficluty = NotePaint.NoteDifficlutyMode.ADVANCED;
            eASYEToolStripMenuItem.Checked = false;
            sTANDARDSToolStripMenuItem.Checked = false;
            aDVANCEDAToolStripMenuItem1.Checked = true;
        }

        //キー数。9キー
        private void kEYSEToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NotePaint.Keys = 9;
            kEYSEToolStripMenuItem.Checked = true;
            kEYS16JToolStripMenuItem.Checked = false;
        }
        //キー数。16キー
        private void kEYSJToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NotePaint.Keys = 16;
            kEYSEToolStripMenuItem.Checked = false;
            kEYS16JToolStripMenuItem.Checked = true;
        }

        //楽曲情報
        private void 未定ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form2 dialog = new Form2();
            dialog.TempMusicInfo.Title = MusicInfo.Title;
            dialog.TempMusicInfo.SubTitle = MusicInfo.SubTitle;
            dialog.TempMusicInfo.Artist = MusicInfo.Artist;
            dialog.TempMusicInfo.AlbumArt = MusicInfo.AlbumArt;
            dialog.TempMusicInfo.Music = MusicInfo.Music;
            dialog.TempMusicInfo.NoteCountBASIC9 = NotePaint.BasicNote9.NoteList.Count;
            dialog.TempMusicInfo.NoteCountNORMAL9 = NotePaint.NormalNote9.NoteList.Count;
            dialog.TempMusicInfo.NoteCountADVANCED9 = NotePaint.AdvancedNote9.NoteList.Count;
            dialog.TempMusicInfo.NoteCountBASIC16 = NotePaint.BasicNote16.NoteList.Count;
            dialog.TempMusicInfo.NoteCountNORMAL16 = NotePaint.NormalNote16.NoteList.Count;
            dialog.TempMusicInfo.NoteCountADVANCED16 = NotePaint.AdvancedNote16.NoteList.Count;
            dialog.TempMusicInfo.DifficultyBASIC9 = MusicInfo.DifficultyBASIC9;
            dialog.TempMusicInfo.DifficultyNORMAL9 = MusicInfo.DifficultyNORMAL9;
            dialog.TempMusicInfo.DifficultyADVANCED9 = MusicInfo.DifficultyADVANCED9;
            dialog.TempMusicInfo.DifficultyBASIC16 = MusicInfo.DifficultyBASIC16;
            dialog.TempMusicInfo.DifficultyNORMAL16 = MusicInfo.DifficultyNORMAL16;
            dialog.TempMusicInfo.DifficultyADVANCED16 = MusicInfo.DifficultyADVANCED16;

            dialog.ShowDialog(this);
            if (dialog.DialogResult == DialogResult.OK)
            {
                MusicInfo.Title = dialog.TempMusicInfo.Title;
                MusicInfo.SubTitle = dialog.TempMusicInfo.SubTitle;
                MusicInfo.Artist = dialog.TempMusicInfo.Artist;
                MusicInfo.AlbumArt = dialog.TempMusicInfo.AlbumArt;
                MusicInfo.Music = dialog.TempMusicInfo.Music;
                MusicInfo.DifficultyBASIC9 = dialog.TempMusicInfo.DifficultyBASIC9;
                MusicInfo.DifficultyNORMAL9 = dialog.TempMusicInfo.DifficultyNORMAL9;
                MusicInfo.DifficultyADVANCED9 = dialog.TempMusicInfo.DifficultyADVANCED9;
                MusicInfo.DifficultyBASIC16 = dialog.TempMusicInfo.DifficultyBASIC16;
                MusicInfo.DifficultyNORMAL16 = dialog.TempMusicInfo.DifficultyNORMAL16;
                MusicInfo.DifficultyADVANCED16 = dialog.TempMusicInfo.DifficultyADVANCED16;
            }
        }

        //補助線32分
        private void 分ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NotePaint.VerticalSubLine = 1;
            分ToolStripMenuItem.Checked = true;
            分ToolStripMenuItem1.Checked = false;
            分ToolStripMenuItem2.Checked = false;
            分ToolStripMenuItem3.Checked = false;
        }
        //補助線16分
        private void 分ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            NotePaint.VerticalSubLine = 2;
            分ToolStripMenuItem.Checked = false;
            分ToolStripMenuItem1.Checked = true;
            分ToolStripMenuItem2.Checked = false;
            分ToolStripMenuItem3.Checked = false;
        }
        //補助線8分
        private void 分ToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            NotePaint.VerticalSubLine = 4;
            分ToolStripMenuItem.Checked = false;
            分ToolStripMenuItem1.Checked = false;
            分ToolStripMenuItem2.Checked = true;
            分ToolStripMenuItem3.Checked = false;
        }
        //補助線4分
        private void 分ToolStripMenuItem3_Click(object sender, EventArgs e)
        {
            NotePaint.VerticalSubLine = 8;
            分ToolStripMenuItem.Checked = false;
            分ToolStripMenuItem1.Checked = false;
            分ToolStripMenuItem2.Checked = false;
            分ToolStripMenuItem3.Checked = true;
        }

        //eLEBEATwiki
        private void eLEBEATwikiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Process.Start("http://www48.atwiki.jp/elebeat/");
        }

        //プレビュー画面の表示
        private void プレビュー画面ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (PreviewForm.Created == false)
            {
                PreviewForm.Dispose();
                PreviewForm = null;
                PreviewForm = new Form4();
                PreviewForm.Show(this);
            }
        }

        //切り取り
        private void 切り取りToolStripMenuItem_Click(object sender, EventArgs e)
        {
            切り取り();
        }
        //コピー
        private void コピーToolStripMenuItem_Click(object sender, EventArgs e)
        {
            コピー();
        }
        //貼り付け
        private void 貼り付けToolStripMenuItem_Click(object sender, EventArgs e)
        {
            貼り付け();
        }
        //削除
        private void クリアToolStripMenuItem_Click(object sender, EventArgs e)
        {
            削除();
        }
        //すべて選択
        private void すべて選択ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            すべて選択();
        }
        //選択解除
        private void 選択解除ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            選択解除();
        }
        //ノートの反転
        private void ノートの反転ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            ノートの反転();
        }

        //ノートの時間を計算する
        private void CalcNoteTime(Note CalcNote)
        {
            for (int i = 0; i < CalcNote.NoteList.Count(); i++)
            {
                int tempBeat = CalcNote.NoteList[i].Measure * 32 + CalcNote.NoteList[i].Beat;
                int j;
                for (j = 0; j < BPM.BPMChangeList.Count(); j++)
                {
                    if (BPM.BPMChangeList[j].BeatForChange > tempBeat)
                    {
                        break;
                    }
                }
                if (j != 0)
                {
                    j--;
                    CalcNote.NoteList[i].Time = -NoteOffsetTime + BPM.BPMChangeList[j].TimeForChange + (60000.0 / BPM.BPMChangeList[j].BPM) / 8.0 * (tempBeat - BPM.BPMChangeList[j].BeatForChange);
                }
                else
                {
                    CalcNote.NoteList[i].Time = -NoteOffsetTime + (int)((60000.0 / BPM.BaseBPM) / 8.0 * tempBeat);
                }
            }
        }

    }
}

redpajama_set_name: RedPajamaGithub


Founded in the 15th century, St Andrews is Scotland's first university and the third oldest in the English-speaking world. It is one of the top-rated universities globally for research, teaching quality and student satisfaction and is consistently ranked among the UK's top five in leading independent league tables. It is also Scotland's most international university, with around one-half of the student body coming from overseas.
The University is seeking to appoint an exceptional individual to serve as an independent member on its governing body (the Court). She/he will bring their external perspective, strategic abilities and experience to bear in helping the University to make the most of its potential and to carry out its core mission of excelling in research and teaching. The Court plays a crucial role in overseeing the University's operations and future direction, and is equally involved in the life and thinking of the University.
Applications are welcomed from individuals with experience of leadership in significant organisations, companies or Higher Education institutions with an understanding of decision making in, and governance of, complex organisations. Experience of governance in Higher Education management; financial investment; managing major projects, and commercial and procurement experience would also be desirable.
The University of St Andrews is fully committed to respect and fair treatment for everyone, eliminating discrimination and actively promoting equality of opportunity and delivering fairness to all. The University aims to ensure that equality is embedded into all its functions, operations and activities. Women, BAME, and LGBT+ people are currently under-represented on Court, and expressions of interest from these groups are particularly welcome.
The expected time commitment is 15-20 days per year including attendance in person at five meetings of the Court per year and a willingness to serve on at least one sub-committee of Court. The position is unremunerated but appropriate expenses are paid. Appointments to Court are for an initial period of four years. The commencement date is 1st August 2019.
Saxton Bampfylde Ltd is acting as an employment agency advisor to The University of St Andrews on this appointment. For further information about the role, including details about how to apply, please visit www.saxbam.com/appointments using reference RAOD. Alternatively telephone +44 (0)20 7227 0880 (during office hours). Applications should be received by noon on Tuesday 14th May 2019.


Music at St Michael's has been an important element in the worship since it began in 1852. We have one of the few fully functioning Parish choirs in the city of Christchurch. The principal choir is an SATB Choir of about 16 voices. Rehearsals are on Wednesday evenings 7:30pm – 9:30pm. With musical leadership at most 10:00am Sunday Masses and usually three 7:00pm Choral Evensongs a month, the very efficient and friendly choir covers a wide range of repertoire. The choir performs to a high standard.
Full Time Choir members sing at 10:00am Mass on Sundays, 7:00pm Festal Evensong 1st Sunday of the month and at major Festivals. They can choose to sing in the evenings as well.
Evensong Choir Usually sings 7:00pm 1st, 2nd and 3rd Sundays of the month and is made up of full-time members rostered from the above and extras from the Deputy list.
Deputies A pool of singers who offer to sing on an occasional basis in their chosen voice part when a full-time member is absent. Entry to the St Michael's Choir is usually through this channel. Some elect to sing only in the 'Evensong Choir'.
Offering your child free, multi-faceted learning in music, teamwork, leadership and development of confidence.
The Young Voices' programme is open to pupils from all schools, in Years 1-8.
The groups rehearse at St Michael's Church School.
All boys and girls begin in the Training Group. Auditions are not required. When they have completed their initial skill level, pupils graduate to the Performance Group.
The Performance Group sings about once a month in the Sunday 10.00am church service at St Michael & All Angels.
Children learn more than just music skills; training and discipline become an essential part of their whole development as a child.
Each boy and girl receives significant individual attention in a challenging yet fun environment.
Fostering leadership skills is an important part of our programme.
'The Voice for Life' training scheme (Royal School of Church Music) is available by which pupils can gain internationally recognized musical qualifications.
Chamber Choir Further applications are invited from experienced and competent singers wishing to join the Chamber Choir. This is a mixed group of experienced and able singers. It consists of Sopranos, Altos, Tenors and Basses. Most are of under-graduate and post-graduate age. Some are past members of the National Youth and Secondary Schools Choirs. Entry is open to good readers of all ages. The group sings at an Evensong on the fifth Sunday of the month if there is one. Occasional concerts are envisaged to promote works not often performed in New Zealand or to promote first performances.


British online gaming operator SportingBet has stated that they have paid the last $6 million owed to the US Department of Justice (DoJ) after the company was the subject of an investigation by the government department in relation to charges of running illegal internet gambling between 1998 and 2006.
The London-based company – which provides customers with poker through Paradise Poker, as well as sports betting, financial betting, casino games and backgammon – agreed to pay the DoJ $33 million to ensure that the online gambling firm remained out of the US courts following the introduction of the Unlawful Internet Gambling Enforcement Act (UIGEA) in 2006.
Thereafter, every online gambling website listed on the London Stock Exchange could no longer accept customers from the USA, but SportingBet had already admitted that they had distorted "the nature of its customers' gambling transactions to US credit card issuers that disallowed the use of their cards for internet gambling", so attempted to disguise payments of winnings to US players.
As such, the US Attorney for the Southern District of New York pointed out in September of 2010 that SportingBet illegally offered internet gambling to US players – including real-money poker – although this final payment will ensure that States authorities will not prosecute SportingBet, so providing the British business with a clean slate in the North American country.
The settlement SportingBet reached with the DoJ was calculated as the amount eared from US customers between 1998 and October of 2006 – and was paid in installments of $15 million for 2010, $12 million for last year, and this final $6 million.
The last payment has reflected well on SportingBet's London Stock Exchange share price as it had climbed 0.5 pence to 39.5 pence at 12:40 BST (British Summer Time) today.
SportingBet chief executive officer Andrew McIver was delighted to see that final payment made to the DoJ as he believes that will now remove any barriers to once again operating in the States.
In fact, McIver is so positive about the future that he reckons opportunities to return to the US poker market are more than likely, saying that "this final payment formally closes any risk which the company may have faced from its former activities in the US.
Meanwhile, Jeffrey Harwood – an analyst with leading corporate and institutional stockbroking and advisory company Oriel Securities – added that SportingBet, following their final payment, will have "various opportunities…to re-enter the US market and these are being reviewed. In our view, any progress on this front would be well received.
This is, of course, makes great reading for US players unable to get their online poker fix since the dark days of Black Friday last April 15 – especially following on from the news that another British company, 888 Holdings –which runs 888 Poker – are also looking to re-enter the North American market.


The Samsung Galaxy Note 3, by many considered the most powerful smartphone on the market, just got itself a worthy competitor. The Pantech Vega Secret Note announced today in South Korea not only does packs top-notch hardware but also offers many innovative features found in the best devices released by leading smartphone makers. The phone will most likely be available on all three major Korean carriers and will be priced at 900,000 won, which is about $839 off contract.
The Pantech Vega Secret Note features a 5.9-inch display with 1920 x 1080 Full HD resolution and is powered by a quad-core Qualcomm Snapdragon 800 processor, just like the Galaxy Note 3. The phone offers massive 3 GB of RAM and 32 GB of expandable storage.
The MicroSD slot supports up to 2 TB cards. No mistake here. This is how much external memory you can add, if you can find a 2 TB memory card. The device sports a 13-megapixel rear camera as well as a 2-megapixel user-facing shooter. The phablet runs Android 4.2 Jelly Bean and comes with 3,200 mAh battery.
True to its name, the Vega Secret Note highly focuses on security. The phone features a fingerprint sensor, which serves not only to unlock the device but also to provide access to confidential data such as phonebook entries, photos, videos, music, and more.
Finally, the handset comes with a stylus, called V Pen, that expands the phones functionality for example by allowing you to scribble notes on the screen. The Pantech Vega Secret Note supports LTE-A frequencies and thanks to Korea's DMB technology it lets you view TV directly on the smartphone. The phone can be bundled with a windowed cover the same way as the Galaxy Note.


Samhain is the Pagan/Wiccan name for Hallowe'en, It marks the end of harvest and the coming of Winter.
It is also a celebration of life, inviting those who have passed on to join in the festivities as this is when the veil between the living world and the spiritual world is at it's thinnest.
The neighbours cat came in and got forced to wear the Hallowe'en bandana.
I'll be settling down, candles lit and watching cheesy horror movies.
I hope whatever you do you have fun and stay safe!
I've had such a long weekend being so ill and having my Mothers wedding down in Devon - I'm exhausted! But this week is all about my favourite holiday - Halloween! As you may remember from this Pumpkin Patch post I've got my pumpkins ready to be carved and then turned into soup, and also my Halloween Jumper is coming out to play when I'm at work.
Inflatable pumpkin, hanging up cat/witch thing, giant spider web with fake spider in on the window, cobwebs on my stags head, pumpkin fairy lights, skull candle and a spider candle.
Pretty much all of it is from Pound-shops or the supermarkets - it's so cheap and I can't say no!
I'd love to share with you one of my best pals little jewellery company she has set-up named Little Apache.
This one was made especially for me - i have teeny tiny wrists so Sally made them extra small!
I love this! The cute little feathers and fox heads are too sweet.
This is my favourite! I haven't taken it off. Sodalite is said to bring inner peace.
The little feathe charms coming off this cute dreamcatcher are such a lovely touch.
This is on a long chain which I really love wearing with dresses. So beautiful.
The Elder Tree is a Celtic symbol often associated with Faeries.
Don't you love Sallys work? Now, just 'cus she's one of my BFF's doesn't mean I'm bias (I am) but I do really adore all her hard work and effort put into some amazingly cute jewellery.
Check out the Little Apache Big Cartel (10% off with the code LAUNCH) and also Instagram for all the latest!
My Stay at The St.Pierre Marriott Hotel & Country Club .
I am writing this with the last ounce of strength I have as I am super achey and fluey feeling. I keep breaking into little sobbing fits and Prince keeps nuzzling me and grooming my hair. Such a sweetie!
I mentioned in my last post that I was going away for the evening, and here is where I went: The St.Pierre: A Marriott Hotel & Country Club..
That there is the view from our room of the hotel entrance - isn't it beautiful?!
The check in staff were amazing and put us in a room outside the front of the hotel named 'Iris Cottage'.
Our room is the grey door.
The hotel also has an old church on the grounds with a very old graveyard which was great for a supernatural girl like me!
The cutie little doorway and desk area.
the BIGGEST bed I've ever slept in - Ross looks so tiny!
After settling into our room, a cup of tea and having a walk around the grounds we went over to their very posh restaurant, Morgans, for the most amazing meal. To start we had chicken pate with brioche bread and onion marmalade. For mains was pan fried chicken breasts with Caerphilly cheese and bacon sauce. For dessert I have raspberry and white chocolate cheese cake and Ross has sticky toffee pudding.
The nicest meal. We had 3 courses and wine. The chicken with Caerphilly cheese and bacon was incredible.
We were seated in a grand hall it was very Twin Peaks!
After a few beverages in the hotel bar we got an early night as we wanted to get up and catch the breakfast buffet. Breakfast buffets are probably one of my most favourite things in the world - fresh English cooked breakfast, continental and fruit and cereals - perfect!
As you walk into reception - this is hanging above! I so want one in my house!
Before we left we hit up the spa where we had a massage each - oh wow! The ladies there really know how to make sure you relax. We then went to the jacuzzi, steam room and sauna before checking out and heading back to Cardiff for Swn Festival.
I want to just say thankyou SO much to the St.Pierre Marriott and their incredible staff for a beautiful and relaxing night away. It's such a lovely getaway from the city.
Paisley Print Dress - outfit post.
This is a cutey little Paisley looking dress that I picked up for £10 in Primark - Bargain!
It's a great fit and just so easy to wear with a long coat and boots!
Today I thought I would share with you my blogging routine. I definitely have some kind of routine in a sense of time of day and what I do whilst blogging. I don't have a schedule - for example 'outfit posts on a Monday' and if I don't feel like blogging - I wont!
I currently work in a job where I finish at 2pm most days so I find it easier to take pictures and write my posts about 3pm after I've had some lunch and done some chores. A cup of tea is a MUST before settling down at my desk on my iMac.
Whenever I have an idea for a post I usually write it down on my monthly calender 'notes' page and to keep track I write what post I have done down on the actual day I posted it. I also keep my diary at hand so I can plan out what I'm upto during the week and when I have enough time to post and write.
I have a special list note-pad as I am addicted to writing lists!
Leaf Coasters - c/o TigerLillyQuinn - the cutest shop!
I love having a desk and big computer to work with but when I actually want to settle down and read blog posts I just hate having to sit-up in my computer chair. So I'm hoping this year for Christmas I'll be getting a laptop so I can snuggle up on the sofa and read/comment on all the amazing blogs out there in comfort! I've been looking at Acer laptop reviews and Acer tablet reviews trying to decided between a laptop and tablet - so far laptop is winning!
Also a must for my blogging routine is PJ's and Slippers!
What is YOUR blogging routine like?
Last week LUSH Cardiff invited a bunch of people to try and buy their Christmas 2013 products before they were released. There were lots of amazing and cute Christmassy bits but first up is Halloween, so obviously as soon as I laid my eyes on their "Pumkin" (yes it's spelt with no 'p') and I just had to have the little cutie!
My bath get-up. Keepin' it spooky.
A big ol' cauldron of Pumpkin Coloured water!
The bath water was an amazing orange and so bubbly! It has ylang ylang and orange flower absolut in it which gave it a lovely Autumn smell and left me feeling all smooth.
They also have this "Lord of Misrule" bathbomb which I'm going to try next week - its named after the Pagan Feast of Fools ruler and as you know - I'm all over that!
Are you excited for the LUSH Christmas products?
Pick Your Own Pumpkin Farm + Corn Maze Adventure.
Halloween season is so great but evey year the supermarkets and local markets always run fresh out of pumpkins during the last few days before halloween!
Well this year I decided to head to a Pick Your Own Pumpkin farm in middle-of-nowhere Wales to grab a couple before it was too late. While we were there we noticed that there was a Maize Maze (big corn stalks) which we decided to go in and it took us about 45mins to get round and out of!
Pumpkin Nails - fitting for the start of my adventure!
On the drive home we saw a sign for an Ancient Burial Chamber. It was in the middle of a field that took walking through 2 other fields to get to. I wander how they found it?!
Ancient Burial Chamber that was excavated in 1914. The big stone slab on top apparently faces the morning sun.
Cute butterfly who was sat next to my car on the gatepost.
Autumn is a very important time to get prepared for Spring/Summer - no, not for fashion but gardening!
Planting bulbs in October-November is a great time for them to settle in and by the time Spring rolls around again they should start to grow and bloom.
Now I have a lovely garden full of places to plant some flowers (and possibly fruit and veg) I thought I had better get prepared! Although it's already thriving with amazing herbs, foliage and flowers I have two empty spots for more growing to happen! So with the help of The Urban Gardening Guide - I have done just that!
I picked up 3 different packs of bulbs for £1 each and using this huge bag of Miracle Gro Expand n' Gro (it feeds them for 6 months!!) and my marigolds - I got planting.
Of course Prince wanted to help too!
Pot 1. I planted all 3 of the different types of bulb in here but only a couple of each so they have enough room to survive.
Pot 2. This is clearly alot longer so I planted the rest in here. As you can see I have a loads of plants growing already!
Have a good one pals!
Fluffy Jumper - outfit post.
BLEACH London - Awkward Peach Hair Dye review.
Ghosts and Black Cats - outfit post.


Pine Cone Meadow #1627 is a 2 story home with 3 bedrooms and a loft/game room that will accommodate 9 people comfortably. Nicely remodeled home with a location close to the lake, park and Snow Summit Ski Resort. Backs to scenic meadow and has a fully fenced back yard. Large loft game room with Pool table and WiFi.
Hiker's Paradise Cabin with Deck and Loft! Walk to Trails and DOGS are welcome!


Pharmapack Europe 2018 today announced the comprehensive event programme for Europe's dedicated pharmaceutical packaging and drug delivery conference and exhibition taking place on 7–8 February at Paris Expo Porte de Versailles, Paris.
The packed event programme includes key note speeches from leading industry figures, a symposium, educational workshops, and a learning lab that will explore regulatory changes and impacts, challenges in packaging & devices development: biologics, materials, sustainability and quality consistency, and how new patient-centric innovations in drug delivery will revolutionise lives and improve treatment adherence. Furthermore, new for Pharmapack Europe 2018 is the Start-up Pitch, a unique opportunity for companies at an early stage or pre-commercialisation phase to present their idea in front of industry experts.
The 2018 Start-up Hub will showcase young companies as being amongst the most innovative in the industry. Companies in the Start-up Hub will benefit from increased access to potential customers, partners and investors at Pharmapack Europe 2018 from which to forge new and lasting relationships. New for 2018 is the Start-up Pitch, offering non-commercialised companies the opportunity to present in front of a start-up panel of experts and an audience of industry professionals. The Start-up Hub and Start-up Pitch are organised in collaboration with Early Metrics, the pan-European rating agency for start-ups and innovative SMEs, assessing the potential growth of early stage ventures by analysing a company's non-financial metrics. If you are interested in participating in the Start-up Hub or Start-up Pitch please visit https://www.pharmapackeurope.com/innovation/start-up-focus.


"...good bird dog work and flighty birds on a beautiful and historic ranch."
"My family and I have etched wonderful memories at the Brown Ranch. The birds are plentiful, the dogs spectacular, and the hunt led by Matt is both fun and adventuresome. His patient guidance and unique ability to cater to each hunter's experience level makes for a thrilling, exciting and memorable experience."


Olympic Champion Nastia Liukin Signature Product Line of Gymnastics Equipment and Mats at American Gymnast Who will benefit from Liukin's withdrawal from worlds' contention?
I have to admit I was a bit shocked to read that Nastia pulled out of consideration for the world team. She seemed so committed and excited to get back out on the world stage. It reminded me a bit of Paul Hamm's withdrawal from Beijing…both could have competed, but as Olympic all-around champions, they didn't see the point if they weren't ready to win gold.
Don't get me wrong though – I certainly don't view them in the same way. I felt Paul Hamm could have still easily helped the U.S. team tremendously in Beijing, even if he wasn't competing in the all-around. That's why his withdrawal was especially disappointing. Nastia, on the other hand, knows there isn't a team competition in London, and thus I see her decision as a more selfless attempt to allow another girl to gain experience in her place. I think it makes sense for her to stay home if she's not quite ready to do what she's capable of, when meanwhile a less experienced up-and-comer could benefit from this opportunity tremendously.
Peszek, but there would have to be a way to fit in their strengths.
Two very different routines, but awesome stuff from both of them. I really love Caquatto's release skills and the free swing of the routine, while Shapiro's razor sharp toe point, beautiful lines, and technical precision would be well received on the world stage.
I'd love to hear your comments about how this team will pan out!


text:
Počakovo (; in older sources also Sveti Janez v Kotu, ) is a small settlement in the Municipality of Radeče in eastern Slovenia. The area is part of the historical region of Lower Carniola. The municipality is now included in the Lower Sava Statistical Region; until January 2014 it was part of the Savinja Statistical Region. It includes the hamlets of Spodnje Počakovo, Zgornje Počakovo, Češence (), Sveti Janez, and Jatne Kote.

The local church is dedicated to Saint John the Evangelist and belongs to the Parish of Svibno. It was built in 1881 on the site of a Baroque chapel.

References

External links
Počakovo at Geopedia

Populated places in the Municipality of Radeče

redpajama_set_name: RedPajamaWikipedia