Example #1
0
 //載入mainform到SearchPage
 public void setForm(mainform f)
 {
     mainForm = f;
     //    Console.Write(f.x+1);
     this.textBox1.Text = "123";
     //Console.Write("FF00000");
     //   textBox1.Text = "132"+f.x;
 }
Example #2
0
        //載入mainform到SearchPage
        public void setForm(mainform f)
        {
            mainForm = f;
        //    Console.Write(f.x+1);
            this.textBox1.Text = "123";
            //Console.Write("FF00000");
         //   textBox1.Text = "132"+f.x;




        }
        public 播放界面(mainform Mainform)
        {
            InitializeComponent();

            //歷史紀錄
            Mainform.historylistName.Add(Mainform.playlistTitle[Mainform.currentPlay]);
            //Mainform.playlistName.Add(Mainform.playlistTitle[Mainform.currentPlay]);

            string cn = @"Data Source=(LocalDB)\v11.0;" +
                "AttachDbFilename=|DataDirectory|Database1.mdf;" +
                "Integrated Security=True";

            SqlConnection db = new SqlConnection(cn);//建立連接物件
            db.Open();   //使用Open方法開啟和資料庫的連接
            SqlCommand cmd = new SqlCommand("INSERT INTO 紀錄(順序,帳號,密碼,個人歌單,歌單ID,歷史紀錄,紀錄ID) VALUES(" +
              Mainform.i + ",'" + Mainform.acc + "'" + ",'" + Mainform.psw + "'" + "," + "NULL" + "," + "NULL" +
              ",'" + Mainform.playlistTitle[Mainform.currentPlay] + "'" + ",'" + Mainform.playlistId[Mainform.currentPlay] + "')", db);
            cmd.ExecuteNonQuery();
            Mainform.i++;
            db.Close();   //使用Close方法關閉和資料庫的連接
           
        }
Example #4
0
        public 播放界面(mainform Mainform)
        {
            InitializeComponent();

            //歷史紀錄
            Mainform.historylistName.Add(Mainform.playlistTitle[Mainform.currentPlay]);
            //Mainform.playlistName.Add(Mainform.playlistTitle[Mainform.currentPlay]);

            string cn = @"Data Source=(LocalDB)\v11.0;" +
                        "AttachDbFilename=|DataDirectory|Database1.mdf;" +
                        "Integrated Security=True";

            SqlConnection db = new SqlConnection(cn); //建立連接物件

            db.Open();                                //使用Open方法開啟和資料庫的連接
            SqlCommand cmd = new SqlCommand("INSERT INTO 紀錄(順序,帳號,密碼,個人歌單,歌單ID,歷史紀錄,紀錄ID) VALUES(" +
                                            Mainform.i + ",'" + Mainform.acc + "'" + ",'" + Mainform.psw + "'" + "," + "NULL" + "," + "NULL" +
                                            ",'" + Mainform.playlistTitle[Mainform.currentPlay] + "'" + ",'" + Mainform.playlistId[Mainform.currentPlay] + "')", db);

            cmd.ExecuteNonQuery();
            Mainform.i++;
            db.Close();   //使用Close方法關閉和資料庫的連接
        }
Example #5
0
        public void setForm(mainform f)
        {
            Mainform = f;

        }
Example #6
0
 //
 public void setForm(mainform f)
 {
     Mainform = f;
 }
Example #7
0
 public login(mainform m)
 {
     InitializeComponent();
     Mainform = m;
 }
Example #8
0
 public login(mainform m)
 {
     InitializeComponent();
     Mainform = m;
 }