Exemple #1
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "PUBLICATIONSTATUS")
            {
                PublicationStatusWindow wnd = new PublicationStatusWindow();
                wnd.TopMost = true;
                wnd.Text    = "Chose Publication Status";
                wnd.PossibleValues.Items.AddRange(new string[] { "Accepted", "Published", "Unpublished" });

                if (wnd.ShowDialog() == DialogResult.OK)
                {
                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = wnd.SelectedValue;
                }
            }
            else if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "PUBLICATIONTYPE")
            {
                PublicationStatusWindow wnd = new PublicationStatusWindow();
                wnd.TopMost = true;
                wnd.Text    = "Chose Publication Type";
                wnd.PossibleValues.Items.AddRange(new string[] { "Journal Items", "Monographs/ Monograph Items", "Conference Contributions", "Doctoral Thesis and Habilitation", "Thesis", "Master Thesis and Bachelor Thesis", "Reports", "Working Papers", "Edited Works", "Educational Material", "Other" });

                if (wnd.ShowDialog() == DialogResult.OK)
                {
                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = wnd.SelectedValue;
                }
            }
            else if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "LANGUAGE")
            {
                PublicationStatusWindow wnd = new PublicationStatusWindow();
                wnd.TopMost = true;
                wnd.Text    = "Chose Language";
                wnd.PossibleValues.Items.AddRange(new string[] { "Bulgarian", "Catalan", "Chinese", "Croatian", "Dutch", "English", "Finnish", "French", "German", "Greek - Modern", "Italian", "Japanese", "Polish", "Portuguese", "Romanian", "Russian", "Slovak", "Spanish", "Swedish", "Turkish" });

                if (wnd.ShowDialog() == DialogResult.OK)
                {
                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = wnd.SelectedValue;
                }
            }
            else if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "REVIEWSTATUS")
            {
                PublicationStatusWindow wnd = new PublicationStatusWindow();
                wnd.TopMost = true;
                wnd.Text    = "Chose Review Status";
                wnd.PossibleValues.Items.AddRange(new string[] { "Peer reviewed", "Internally reviewed", "Not reviewed", "Unknown" });

                if (wnd.ShowDialog() == DialogResult.OK)
                {
                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = wnd.SelectedValue;
                }
            }
        }
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "PUBLICATIONSTATUS")
            {
                PublicationStatusWindow wnd = new PublicationStatusWindow();
                wnd.TopMost = true;
                wnd.Text = "Chose Publication Status";
                wnd.PossibleValues.Items.AddRange(new string[] { "Accepted", "Published", "Unpublished" });

                if (wnd.ShowDialog() == DialogResult.OK)
                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = wnd.SelectedValue;
            }
            else if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "PUBLICATIONTYPE")
            {
                PublicationStatusWindow wnd = new PublicationStatusWindow();
                wnd.TopMost = true;
                wnd.Text = "Chose Publication Type";
                wnd.PossibleValues.Items.AddRange(new string[] { "Journal Items", "Monographs/ Monograph Items", "Conference Contributions", "Doctoral Thesis and Habilitation", "Thesis", "Master Thesis and Bachelor Thesis", "Reports", "Working Papers", "Edited Works", "Educational Material", "Other" });

                if (wnd.ShowDialog() == DialogResult.OK)
                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = wnd.SelectedValue;
            }
            else if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "LANGUAGE")
            {
                PublicationStatusWindow wnd = new PublicationStatusWindow();
                wnd.TopMost = true;
                wnd.Text = "Chose Language";
                wnd.PossibleValues.Items.AddRange(new string[] { "Bulgarian", "Catalan", "Chinese", "Croatian", "Dutch", "English", "Finnish", "French", "German", "Greek - Modern", "Italian", "Japanese", "Polish", "Portuguese", "Romanian", "Russian", "Slovak", "Spanish", "Swedish", "Turkish" });

                if (wnd.ShowDialog() == DialogResult.OK)
                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = wnd.SelectedValue;
            }
            else if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "REVIEWSTATUS")
            {
                PublicationStatusWindow wnd = new PublicationStatusWindow();
                wnd.TopMost = true;
                wnd.Text = "Chose Review Status";
                wnd.PossibleValues.Items.AddRange(new string[] { "Peer reviewed", "Internally reviewed", "Not reviewed", "Unknown" });

                if (wnd.ShowDialog() == DialogResult.OK)
                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = wnd.SelectedValue;
            }
        }