Example #1
0
        private void toolStripMenuItemInterpolate_Click(object sender, EventArgs e)
        {
            var interpolate = new DataGridSelection(dataGridView1);

            interpolate.Interpolate();
            //DrawGraph();
        }
        private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
        {
            var interpolate = new DataGridSelection(dataGrid1);

            this.toolStripMenuItemInterpolate.Enabled = interpolate.ValidInterpolationSelection;
            this.menuDetails.Enabled = dataGrid1.SelectedCells.Count == 1;
        }
Example #3
0
 public async Task OnSelectionChanged(DataGridSelection <DTOInvoice> selection)
 {
     StoredSelectedCount   = selection.SelectedKeysStored.Count();
     StoredUnselectedCount = selection.UnselectedKeysStored.Count();
     selectedKeys          = await selection.SelectedKeys;
     SelectedCount         = selectedKeys.Count();
     TriggerStateChange();
 }
Example #4
0
        private void smoothToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var sel = new DataGridSelection(this.dataGridView1);

            if (sel.ValidInterpolationSelection && this.SeriesList.Count == 1)
            {
                Series      s  = this.SeriesList[0];
                SeriesRange sr = new SeriesRange(s, sel.T1, sel.T2);
                sr.SmoothPreservingSum();
            }
        }
Example #5
0
        private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                //DataGridViewCell cell = this.dataGridView1.CurrentCell;

                DataGridSelection sel = new DataGridSelection(this.dataGridView1);

                sel.PasteWithPrimaryKey(ClipBoardUtility.GetDataTableFromClipboard(), m_rating_id);
                //DataGridViewUtility u = new DataGridViewUtility(this.dataGrid1);
                //u.PasteFromClipboard();
                //  DrawGraph();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public void PasteFromClipBoard()
        {
            try
            {
                DataGridViewCell cell = this.dataGrid1.CurrentCell;

                if (cell != null)
                {
                    if (cell.ColumnIndex == 0)
                    {
                        MessageBox.Show("Pasting in the Date column is not supported");
                        return;
                    }
                }
                DataGridSelection sel = new DataGridSelection(this.dataGrid1);
                sel.Paste(ClipBoardUtility.GetDataTableFromClipboard());
                //DataGridViewUtility u = new DataGridViewUtility(this.dataGrid1);
                //u.PasteFromClipboard();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #7
0
        private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            var sel = new DataGridSelection(dataGridView1);

            toolStripStatusMessage.Text = sel.ComputeSelectedStats();
        }
Example #8
0
        private void interpolateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var interpolate = new DataGridSelection(this.dataGridView1);

            interpolate.InterpolateAndFlag(PointFlag.Interpolated);
        }
Example #9
0
        void HandleSelectedLogDiaryChanged(DataGridSelection <LogDiaryModel> selections)
        {
            var rs = selections.SelectedKeys?.Result;

            selectedLogDiaryIds = rs?.Cast <int>()?.ToList <int>();
        }
Example #10
0
 protected async Task OnSelectionChanged(DataGridSelection <LogDiaryModel> selection)
 {
     await SelectedLogDiaryChanged.InvokeAsync(selection);
 }
        void dataGrid1_SelectionChanged(object sender, EventArgs e)
        {
            var sel = new DataGridSelection(dataGrid1);

            Logger.WriteLine(sel.ComputeSelectedStats(), "ui");
        }