예제 #1
0
 public MainForm()
 {
     InitializeComponent();
     SongQuery_DataGridView.MakeDoubleBuffered(true);
     SongAdd_DataGridView.MakeDoubleBuffered(true);
     SingerMgr_DataGridView.MakeDoubleBuffered(true);
     Cashbox_DataGridView.MakeDoubleBuffered(true);
 }
예제 #2
0
        private void SongQuery_DataGridView_Sorted(object sender, EventArgs e)
        {
            SongQuery_DataGridView.ClearSelection();
            if (Global.SongQueryDataGridViewRestoreCurrentRow != "")
            {
                var query = from row in SongQuery_DataGridView.Rows.Cast <DataGridViewRow>()
                            where row.Cells["Song_Id"].Value.Equals(Global.SongQueryDataGridViewRestoreCurrentRow)
                            select row;

                if (query.Count() > 0)
                {
                    foreach (DataGridViewRow row in query)
                    {
                        SongQuery_DataGridView.CurrentCell = row.Cells[0];
                    }
                }
            }

            foreach (string str in Global.SongQueryDataGridViewRestoreSelectList)
            {
                var query = from row in SongQuery_DataGridView.Rows.Cast <DataGridViewRow>()
                            where row.Cells["Song_Id"].Value.Equals(str)
                            select row;

                foreach (DataGridViewRow row in query)
                {
                    row.Selected = true;
                }
            }
            Global.SongQueryDataGridViewRestoreSelectList.Clear();

            foreach (DataGridViewRow row in SongQuery_DataGridView.Rows)
            {
                string SongFullPath = row.Cells["Song_Path"].Value.ToString() + row.Cells["Song_FileName"].Value.ToString();
                row.Cells["Song_FullPath"].Value = SongFullPath;
            }
        }