作成日: 2020/05/29 最終更新日: 2020/05/29
文書種別
使用方法
詳細
チャートビューでタスクをダブルクリックした時に、タスク情報ダイアログを表示させないようにするために、以下の2通りの方法が考えられます。
※この場合、ツールバーの「タスク情報」クリック時にもタスク情報ダイアログは表示されませんので、ご了承ください。
(1)ShowDialogイベントで、e.Dialogをヌルに設定する方法
◎サンプルコード(VB)
(2)ShowDialogイベントで、開いているダイアログを確認し、BeforeEditTaskイベントでe.CancelをTrueに設定する方法
◎サンプルコード(VB)
※この場合、ツールバーの「タスク情報」クリック時にもタスク情報ダイアログは表示されませんので、ご了承ください。
(1)ShowDialogイベントで、e.Dialogをヌルに設定する方法
◎サンプルコード(VB)
Private Sub C1GanttView1_ShowDialog(sender As Object, e As C1.Win.C1GanttView.ShowDialogEventArgs) Handles C1GanttView1.ShowDialog
If e.DialogType = C1.Win.C1GanttView.DialogType.TaskInfo Then
e.Dialog = Nothing
End If
End Sub
◎サンプルコード(C#) private void c1GanttView1_ShowDialog(object sender, C1.Win.C1GanttView.ShowDialogEventArgs e)
{
if ((e.DialogType == C1.Win.C1GanttView.DialogType.TaskInfo))
{
e.Dialog = null;
}
}
(2)ShowDialogイベントで、開いているダイアログを確認し、BeforeEditTaskイベントでe.CancelをTrueに設定する方法
◎サンプルコード(VB)
Dim temp As Boolean = True
Private Sub C1GanttView1_ShowDialog(sender As Object, e As C1.Win.C1GanttView.ShowDialogEventArgs) Handles C1GanttView1.ShowDialog
If e.DialogType = C1.Win.C1GanttView.DialogType.TaskInfo Then
temp = False
End If
End Sub
Private Sub C1GanttView1_BeforeEditTask(sender As Object, e As C1.Win.C1GanttView.CancelTaskArgs) Handles C1GanttView1.BeforeEditTask
If temp = False Then
e.Cancel = True
temp = True
End If
End Sub
◎サンプルコード(C#) Boolean temp = true;
private void c1GanttView1_ShowDialog(object sender, C1.Win.C1GanttView.ShowDialogEventArgs e)
{
if ((e.DialogType == C1.Win.C1GanttView.DialogType.TaskInfo))
{
temp = false;
}
}
private void c1GanttView1_BeforeEditTask(object sender, C1.Win.C1GanttView.CancelTaskArgs e)
{
if ((temp == false))
{
e.Cancel = true;
temp = true;
}
}
関連情報
旧文書番号
85653