Exemplo n.º 1
0
        private void ShowCreateShareForm(UncPathItem linkItem)
        {
            CreateShareForm form = new CreateShareForm();

            form.LocalPath = linkItem.RecordingPath;
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                LoadUncPaths();
            }
        }
Exemplo n.º 2
0
 private void EnableUncButtons()
 {
     if (_uncPathsDataGridView.SelectedRows.Count > 0)
     {
         UncPathItem linkItem = _uncPathsDataGridView.SelectedRows[0].DataBoundItem as UncPathItem;
         _createUncShareButton.Enabled = linkItem.HasError;
     }
     else
     {
         _createUncShareButton.Enabled = false;
     }
     if (_uncTimeshiftingDataGridView.SelectedRows.Count > 0)
     {
         UncPathItem linkItem = _uncTimeshiftingDataGridView.SelectedRows[0].DataBoundItem as UncPathItem;
         _createTimeshiftingShareButton.Enabled = linkItem.HasError;
     }
     else
     {
         _createTimeshiftingShareButton.Enabled = false;
     }
 }
Exemplo n.º 3
0
 private void EnableUncButtons()
 {
     if (uncRecordingPathsDataGrid.SelectedRows.Count > 0)
     {
         UncPathItem linkItem = uncRecordingPathsDataGrid.SelectedRows[0].DataBoundItem as UncPathItem;
         createRecordingsShareButton.Enabled = true;
     }
     else
     {
         createRecordingsShareButton.Enabled = false;
     }
     if (uncTimeshiftPathsDataGrid.SelectedRows.Count > 0)
     {
         UncPathItem linkItem = uncTimeshiftPathsDataGrid.SelectedRows[0].DataBoundItem as UncPathItem;
         createTimeshiftShareButton.Enabled = true;
     }
     else
     {
         createTimeshiftShareButton.Enabled = false;
     }
 }
Exemplo n.º 4
0
        private void _uncPathsDataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            DataGridView dataGridView = sender as DataGridView;

            if (e.ColumnIndex == 1 &&
                e.RowIndex >= 0 &&
                e.RowIndex < _uncPathsBindingSource.Count)
            {
                UncPathItem linkItem = dataGridView.Rows[e.RowIndex].DataBoundItem as UncPathItem;
                if (linkItem != null &&
                    linkItem.HasError)
                {
                    e.CellStyle.ForeColor          = Color.Red;
                    e.CellStyle.SelectionForeColor = Color.Red;
                }
                else
                {
                    e.CellStyle.ForeColor          = Color.DarkGreen;
                    e.CellStyle.SelectionForeColor = Color.DarkGreen;
                }
            }
        }
Exemplo n.º 5
0
 private void ShowCreateShareForm(UncPathItem linkItem)
 {
     CreateShareForm form = new CreateShareForm();
     form.LocalPath = linkItem.RecordingPath;
     if (form.ShowDialog(this) == DialogResult.OK)
     {
         LoadUncPaths();
     }
 }