﻿Public Class ClockSetting
    '----------------------------------------
    ' グローバル変数の宣言
    '----------------------------------------
    Public m_clock_type As UShort
    Public m_sampling_clock_unit As UShort
    Public m_sampling_clock As Double
    Public m_external_clock As Double
    Public m_sampling_times As UInteger
    Public m_scan_clock As Single
    Public m_repeat_times As UInteger
    Public m_start_trigger_type As UShort
    Public m_stop_trigger_type As UShort
    Public m_delay_time As UInteger
    Public m_start_level_trigger_edge As UShort
    Public m_start_level_sequence_no As UShort
    Public m_start_level_border_value As Single
    Public m_start_range_sequence_no As UShort
    Public m_start_range_upper_border_value As Single
    Public m_start_range_lower_border_value As Single
    Public m_start_range_state_times As UInteger
    Public m_start_time_time As UInteger
    Public m_start_time_hour As UInteger
    Public m_start_time_minute As UInteger
    Public m_start_time_second As UInteger
    Public m_stop_level_trigger_edge As UShort
    Public m_stop_level_sequence_no As UShort
    Public m_stop_level_border_value As Single
    Public m_stop_range_sequence_no As UShort
    Public m_stop_range_upper_border_value As Single
    Public m_stop_range_lower_border_value As Single
    Public m_stop_range_state_times As UInteger
    Public m_stop_time_time As UInteger
    Public m_stop_time_hour As UInteger
    Public m_stop_time_minute As UInteger
    Public m_stop_time_second As UInteger
    '----------------------------------------
    ' データの受け渡し（設定）
    '----------------------------------------
    Public Sub clock_data_set(clock_type As UShort,
                       sampling_clock_unit As UShort,
                       sampling_clock As Double,
                       external_clock As Double,
                       sampling_times As UInteger,
                       scan_clock As Single,
                       repeat_times As UInteger,
                       start_trigger_type As UShort,
                       stop_trigger_type As UShort,
                       delay_time As UInteger,
                       start_level_trigger_edge As UShort,
                       start_level_sequence_no As UShort,
                       start_level_border_value As Single,
                       start_range_sequence_no As UShort,
                       start_range_upper_border_value As Single,
                       start_range_lower_border_value As Single,
                       start_range_state_times As UInteger,
                       start_time_time As UInteger,
                       start_time_hour As UInteger,
                       start_time_minute As UInteger,
                       start_time_second As UInteger,
                       stop_level_trigger_edge As UShort,
                       stop_level_sequence_no As UShort,
                       stop_level_border_value As Single,
                       stop_range_sequence_no As UShort,
                       stop_range_upper_border_value As Single,
                       stop_range_lower_border_value As Single,
                       stop_range_state_times As UInteger,
                       stop_time_time As UInteger,
                       stop_time_hour As UInteger,
                       stop_time_minute As UInteger,
                       stop_time_second As UInteger)
        m_clock_type = clock_type
        m_sampling_clock_unit = sampling_clock_unit
        m_sampling_clock = sampling_clock
        m_external_clock = external_clock
        m_sampling_times = sampling_times
        m_scan_clock = scan_clock
        m_repeat_times = repeat_times
        m_start_trigger_type = start_trigger_type
        m_stop_trigger_type = stop_trigger_type
        m_delay_time = delay_time
        m_start_level_trigger_edge = start_level_trigger_edge
        m_start_level_sequence_no = start_level_sequence_no
        m_start_level_border_value = start_level_border_value
        m_start_range_sequence_no = start_range_sequence_no
        m_start_range_upper_border_value = start_range_upper_border_value
        m_start_range_lower_border_value = start_range_lower_border_value
        m_start_range_state_times = start_range_state_times
        m_start_time_time = start_time_time
        m_start_time_hour = start_time_hour
        m_start_time_minute = start_time_minute
        m_start_time_second = start_time_second
        m_stop_level_trigger_edge = stop_level_trigger_edge
        m_stop_level_sequence_no = stop_level_sequence_no
        m_stop_level_border_value = stop_level_border_value
        m_stop_range_sequence_no = stop_range_sequence_no
        m_stop_range_upper_border_value = stop_range_upper_border_value
        m_stop_range_lower_border_value = stop_range_lower_border_value
        m_stop_range_state_times = stop_range_state_times
        m_stop_time_time = stop_time_time
        m_stop_time_hour = stop_time_hour
        m_stop_time_minute = stop_time_minute
        m_stop_time_second = stop_time_second
    End Sub
    '----------------------------------------
    ' データの受け渡し（取得）
    '----------------------------------------
    Public Sub clock_data_get(ByRef clock_type As UShort,
                       ByRef sampling_clock_unit As UShort,
                       ByRef sampling_clock As Double,
                       ByRef external_clock As Double,
                       ByRef sampling_times As UInteger,
                       ByRef scan_clock As Single,
                       ByRef repeat_times As UInteger,
                       ByRef start_trigger_type As UShort,
                       ByRef stop_trigger_type As UShort,
                       ByRef delay_time As UInteger,
                       ByRef start_level_trigger_edge As UShort,
                       ByRef start_level_sequence_no As UShort,
                       ByRef start_level_border_value As Single,
                       ByRef start_range_sequence_no As UShort,
                       ByRef start_range_upper_border_value As Single,
                       ByRef start_range_lower_border_value As Single,
                       ByRef start_range_state_times As UInteger,
                       ByRef start_time_time As UInteger,
                       ByRef start_time_hour As UInteger,
                       ByRef start_time_minute As UInteger,
                       ByRef start_time_second As UInteger,
                       ByRef stop_level_trigger_edge As UShort,
                       ByRef stop_level_sequence_no As UShort,
                       ByRef stop_level_border_value As Single,
                       ByRef stop_range_sequence_no As UShort,
                       ByRef stop_range_upper_border_value As Single,
                       ByRef stop_range_lower_border_value As Single,
                       ByRef stop_range_state_times As UInteger,
                       ByRef stop_time_time As UInteger,
                       ByRef stop_time_hour As UInteger,
                       ByRef stop_time_minute As UInteger,
                       ByRef stop_time_second As UInteger)
        clock_type = m_clock_type
        sampling_clock_unit = m_sampling_clock_unit
        sampling_clock = m_sampling_clock
        external_clock = m_external_clock
        sampling_times = m_sampling_times
        scan_clock = m_scan_clock
        repeat_times = m_repeat_times
        start_trigger_type = m_start_trigger_type
        stop_trigger_type = m_stop_trigger_type
        delay_time = m_delay_time
        start_level_trigger_edge = m_start_level_trigger_edge
        start_level_sequence_no = m_start_level_sequence_no
        start_level_border_value = m_start_level_border_value
        start_range_sequence_no = m_start_range_sequence_no
        start_range_upper_border_value = m_start_range_upper_border_value
        start_range_lower_border_value = m_start_range_lower_border_value
        start_range_state_times = m_start_range_state_times
        start_time_time = m_start_time_time
        start_time_hour = m_start_time_hour
        start_time_minute = m_start_time_minute
        start_time_second = m_start_time_second
        stop_level_trigger_edge = m_stop_level_trigger_edge
        stop_level_sequence_no = m_stop_level_sequence_no
        stop_level_border_value = m_stop_level_border_value
        stop_range_sequence_no = m_stop_range_sequence_no
        stop_range_upper_border_value = m_stop_range_upper_border_value
        stop_range_lower_border_value = m_stop_range_lower_border_value
        stop_range_state_times = m_stop_range_state_times
        stop_time_time = m_stop_time_time
        stop_time_hour = m_stop_time_hour
        stop_time_minute = m_stop_time_minute
        stop_time_second = m_stop_time_second
    End Sub

    Private Sub ClockSetting_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        '----------------------------------------
        ' クロック種類コンボボックスの作成
        '----------------------------------------
        ComboBox_ClockType.Items.Add("内部クロック")
        ComboBox_ClockType.Items.Add("外部クロック(立ち下がり)")
        ComboBox_ClockType.Items.Add("外部クロック(立ち上がり)")
        '----------------------------------------
        ' クロック種類コンボボックスの選択
        '----------------------------------------
        ComboBox_ClockType.SelectedIndex = m_clock_type
        Call ComboBox_ClockType_SelectedIndexChanged(Nothing, Nothing)
        '----------------------------------------
        ' サンプリングクロック周期（周波数）表示を更新
        '----------------------------------------
        TextBox_SamplingClock.Text = m_sampling_clock.ToString()
        '----------------------------------------
        ' 外部クロック更新間隔表示を更新
        '----------------------------------------
        TextBox_ExternalClockInputTiming.Text = m_external_clock.ToString()
        '----------------------------------------
        ' サンプリングクロック周期コンボボックスの作成
        '----------------------------------------
        ComboBox_SamplingClockUnit.Items.Add("μsec")
        ComboBox_SamplingClockUnit.Items.Add("msec")
        ComboBox_SamplingClockUnit.Items.Add("sec")
        ComboBox_SamplingClockUnit.Items.Add("Hz")
        ComboBox_SamplingClockUnit.Items.Add("kHz")
        ComboBox_SamplingClockUnit.Items.Add("MHz")
        '----------------------------------------
        ' サンプリングクロック周期コンボボックスの選択
        '----------------------------------------
        ComboBox_SamplingClockUnit.SelectedIndex = m_sampling_clock_unit
        '----------------------------------------
        ' サンプリング条件コンボボックスの作成
        '----------------------------------------
        ComboBox_SamplingCondition.Items.Add("無限")
        ComboBox_SamplingCondition.Items.Add("有限")
        '----------------------------------------
        ' サンプリング条件コンボボックスの選択
        '----------------------------------------
        If m_sampling_times = 0 Then
            ComboBox_SamplingCondition.SelectedIndex = 0
        Else
            ComboBox_SamplingCondition.SelectedIndex = 1
        End If
        '----------------------------------------
        ' サンプリング条件のコンボボックスの値を変更した際の処理を実行
        '----------------------------------------
        Call ComboBox_SamplingCondition_SelectedIndexChanged(Nothing, Nothing)
        '----------------------------------------
        ' サンプリング回数表示を更新
        '----------------------------------------
        TextBox_SamplingTimes.Text = m_sampling_times.ToString()
        '----------------------------------------
        ' スキャンクロック表示を更新
        '----------------------------------------
        TextBox_ScanClock.Text = m_scan_clock.ToString()
        '----------------------------------------
        ' リピート回数表示を更新
        '----------------------------------------
        TextBox_RepeatTimes.Text = m_repeat_times.ToString()
        '----------------------------------------
        ' 遅延条件コンボボックスの作成
        '----------------------------------------
        ComboBox_DelayCondition.Items.Add("無効")
        ComboBox_DelayCondition.Items.Add("有効")
        '----------------------------------------
        ' 遅延条件コンボボックスの選択
        '----------------------------------------
        If m_delay_time = 0 Then
            ComboBox_DelayCondition.SelectedIndex = LOGGER_PARAM_DISABLE
        Else
            ComboBox_DelayCondition.SelectedIndex = LOGGER_PARAM_ENABLE
        End If
        '----------------------------------------
        ' 遅延条件のコンボボックスの値を変更した際の処理を実行
        '----------------------------------------
        Call ComboBox_DelayCondition_SelectedIndexChanged(Nothing, Nothing)
        '----------------------------------------
        ' 遅延回数表示を更新
        '----------------------------------------
        TextBox_DelayTimes.Text = m_delay_time.ToString()
        '----------------------------------------
        ' 開始条件コンボボックスの作成
        '----------------------------------------
        ComboBox_StartCondition.Items.Add("なし")
        ComboBox_StartCondition.Items.Add("外部トリガ立ち上がり")
        ComboBox_StartCondition.Items.Add("外部トリガ立ち下がり")
        ComboBox_StartCondition.Items.Add("レベル比較")
        ComboBox_StartCondition.Items.Add("インレンジ")
        ComboBox_StartCondition.Items.Add("アウトレンジ")
        ComboBox_StartCondition.Items.Add("時間（時間(sec)）")
        ComboBox_StartCondition.Items.Add("時間（時刻）")
        '----------------------------------------
        ' 開始条件コンボボックスの選択
        '----------------------------------------
        ComboBox_StartCondition.SelectedIndex = m_start_trigger_type
        '----------------------------------------
        ' 開始条件のコンボボックスの値を変更した際の処理を実行
        '----------------------------------------
        Call ComboBox_StartCondition_SelectedIndexChanged(Nothing, Nothing)
        '----------------------------------------
        ' 開始条件 -> レベル比較 -> チャネル番号表示を更新
        '----------------------------------------
        TextBox_StartLevelChNo.Text = m_start_level_sequence_no.ToString()
        '----------------------------------------
        ' 開始条件 -> レベル比較 -> 比較値表示を更新
        '----------------------------------------
        TextBox_StartLevelComaprisonValue.Text = m_start_level_border_value.ToString()
        '----------------------------------------
        ' 開始条件 -> レベル比較 -> 比較方向コンボボックスの作成
        '----------------------------------------
        ComboBox_StartLevelComparisonDirection.Items.Add("立ち上がり")
        ComboBox_StartLevelComparisonDirection.Items.Add("立ち下がり")
        ComboBox_StartLevelComparisonDirection.Items.Add("両方")
        '----------------------------------------
        ' 開始条件 -> レベル比較 -> 比較方向コンボボックスの選択
        '----------------------------------------
        ComboBox_StartLevelComparisonDirection.SelectedIndex = m_start_level_trigger_edge
        '----------------------------------------
        ' 開始条件 -> インレンジ/アウトレンジ比較 -> チャネル番号表示の更新
        '----------------------------------------
        TextBox_StartRangeChNo.Text = m_start_range_sequence_no.ToString()
        '----------------------------------------
        ' 開始条件 -> インレンジ/アウトレンジ比較 -> 下限値表示の更新
        '----------------------------------------
        TextBox_StartRangeLowerLimitValue.Text = m_start_range_lower_border_value.ToString()
        '----------------------------------------
        ' 開始条件 -> インレンジ/アウトレンジ比較 -> 上限値表示の更新
        '----------------------------------------
        TextBox_StartRangeUpperLimitValue.Text = m_start_range_upper_border_value.ToString()
        '----------------------------------------
        ' 開始条件 -> インレンジ/アウトレンジ比較 -> 保持回数表示の更新
        '----------------------------------------
        TextBox_StartRangeStateTimes.Text = m_start_range_state_times.ToString()
        '----------------------------------------
        ' 開始条件 -> 時間/時刻 -> 時間の更新
        '----------------------------------------
        TextBox_StartTime_Time.Text = m_start_time_time.ToString()
        '----------------------------------------
        ' 開始条件 -> 時間/時刻 -> 時刻(時)の更新
        '----------------------------------------
        TextBox_StartTime_Hour.Text = m_start_time_hour.ToString()
        '----------------------------------------
        ' 開始条件 -> 時間/時刻 -> 時刻(分)の更新
        '----------------------------------------
        TextBox_StartTime_Minute.Text = m_start_time_minute.ToString()
        '----------------------------------------
        ' 開始条件 -> 時間/時刻 -> 時刻(秒)の更新
        '----------------------------------------
        TextBox_StartTime_Second.Text = m_start_time_second.ToString()
        '----------------------------------------
        ' 停止条件コンボボックスの作成
        '----------------------------------------
        ComboBox_StopCondition.Items.Add("なし")
        ComboBox_StopCondition.Items.Add("外部トリガ立ち上がり")
        ComboBox_StopCondition.Items.Add("外部トリガ立ち下がり")
        ComboBox_StopCondition.Items.Add("レベル比較")
        ComboBox_StopCondition.Items.Add("インレンジ")
        ComboBox_StopCondition.Items.Add("アウトレンジ")
        ComboBox_StopCondition.Items.Add("時間（時間(sec)）")
        ComboBox_StopCondition.Items.Add("時間（時刻）")
        '----------------------------------------
        ' 停止条件コンボボックスの選択
        '----------------------------------------
        ComboBox_StopCondition.SelectedIndex = m_stop_trigger_type
        '----------------------------------------
        ' 停止条件のコンボボックスの値を変更した際の処理を実行
        '----------------------------------------
        Call ComboBox_StopCondition_SelectedIndexChanged(Nothing, Nothing)
        '----------------------------------------
        ' 停止条件 -> レベル比較 -> チャネル番号表示を更新
        '----------------------------------------
        TextBox_StopLevelChNo.Text = m_stop_level_sequence_no.ToString()
        '----------------------------------------
        ' 停止条件 -> レベル比較 -> 比較値表示を更新
        '----------------------------------------
        TextBox_StopLevelComparisonValue.Text = m_stop_level_border_value.ToString()
        '----------------------------------------
        ' 停止条件 -> レベル比較 -> 比較方向コンボボックスの作成
        '----------------------------------------
        ComboBox_StopLevelComparisonDirection.Items.Add("立ち上がり")
        ComboBox_StopLevelComparisonDirection.Items.Add("立ち下がり")
        ComboBox_StopLevelComparisonDirection.Items.Add("両方")
        '----------------------------------------
        ' 停止条件 -> レベル比較 -> 比較方向コンボボックスの選択
        '----------------------------------------
        ComboBox_StopLevelComparisonDirection.SelectedIndex = m_stop_level_trigger_edge
        '----------------------------------------
        ' 停止条件 -> インレンジ/アウトレンジ比較 -> チャネル番号表示の更新
        '----------------------------------------
        TextBox_StopRangeChNo.Text = m_stop_range_sequence_no.ToString()
        '----------------------------------------
        ' 停止条件 -> インレンジ/アウトレンジ比較 -> 下限値表示の更新
        '----------------------------------------
        TextBox_StopRangeLowerLimitValue.Text = m_stop_range_lower_border_value.ToString()
        '----------------------------------------
        ' 停止条件 -> インレンジ/アウトレンジ比較 -> 上限値表示の更新
        '----------------------------------------
        TextBox_StopRangeUpperLimitValue.Text = m_stop_range_upper_border_value.ToString()
        '----------------------------------------
        ' 停止条件 -> インレンジ/アウトレンジ比較 -> 保持回数表示の更新
        '----------------------------------------
        TextBox_StopRangeStateTimes.Text = m_stop_range_state_times.ToString()
        '----------------------------------------
        ' 停止条件 -> 時間/時刻 -> 時間の更新
        '----------------------------------------
        TextBox_StopTime_Time.Text = m_stop_time_time.ToString()
        '----------------------------------------
        ' 停止条件 -> 時間/時刻 -> 時刻(時)の更新
        '----------------------------------------
        TextBox_StopTime_Hour.Text = m_stop_time_hour.ToString()
        '----------------------------------------
        ' 停止条件 -> 時間/時刻 -> 時刻(分)の更新
        '----------------------------------------
        TextBox_StopTime_Minute.Text = m_stop_time_minute.ToString()
        '----------------------------------------
        ' 停止条件 -> 時間/時刻 -> 時刻(秒)の更新
        '----------------------------------------
        TextBox_StopTime_Second.Text = m_stop_time_second.ToString()
    End Sub

    '================================================================================
    ' クロック種類のコンボボックスの値を変更した際の処理になります
    ' 設定値の確認し、サンプリングクロック周期と外部クロック更新間隔の有効/無効を切り替えます
    '================================================================================
    Private Sub ComboBox_ClockType_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_ClockType.SelectedIndexChanged
        '----------------------------------------
        ' コンボボックスからクロック種類を取得
        '----------------------------------------
        Dim select_clocktype As Integer = ComboBox_ClockType.SelectedIndex
        '----------------------------------------
        ' 内部クロックの場合
        '----------------------------------------
        If select_clocktype = LOGGER_PARAM_CLOCK_INTERNAL Then
            '----------------------------------------
            ' サンプリングクロック周期を有効
            '----------------------------------------
            TextBox_SamplingClock.Enabled = True
            ComboBox_SamplingClockUnit.Enabled = True
            '----------------------------------------
            ' 外部クロック更新間隔を無効
            '----------------------------------------
            TextBox_ExternalClockInputTiming.Enabled = False
            '----------------------------------------
            ' 外部クロックの場合
            '----------------------------------------
        Else
            '----------------------------------------
            ' サンプリングクロック周期を無効
            '----------------------------------------
            TextBox_SamplingClock.Enabled = False
            ComboBox_SamplingClockUnit.Enabled = False
            '----------------------------------------
            ' 外部クロック更新間隔を有効
            '----------------------------------------
            TextBox_ExternalClockInputTiming.Enabled = True
        End If
    End Sub

    '================================================================================
    ' サンプリング条件のコンボボックスの値を変更した際の処理になります
    ' 設定値の確認し、サンプリング回数の有効/無効を切り替えます
    '================================================================================
    Private Sub ComboBox_SamplingCondition_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_SamplingCondition.SelectedIndexChanged
        '----------------------------------------
        ' コンボボックスからサンプリング条件を取得
        '----------------------------------------
        Dim sampling_condition As Integer = ComboBox_SamplingCondition.SelectedIndex
        '----------------------------------------
        ' 無限の場合
        '----------------------------------------
        If sampling_condition = 0 Then
            '----------------------------------------
            ' サンプリング回数を無効
            '----------------------------------------
            TextBox_SamplingTimes.Enabled = False
            '----------------------------------------
            ' 有限の場合
            '----------------------------------------
        Else
            '----------------------------------------
            ' サンプリング回数を有効
            '----------------------------------------
            TextBox_SamplingTimes.Enabled = True
        End If
    End Sub

    '================================================================================
    ' 遅延条件のコンボボックスの値を変更した際の処理になります
    ' 設定値の確認し、遅延回数の有効/無効を切り替えます
    '================================================================================
    Private Sub ComboBox_DelayCondition_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_DelayCondition.SelectedIndexChanged
        '----------------------------------------
        ' コンボボックスから遅延条件を取得
        '----------------------------------------
        Dim delay_condition As Integer = ComboBox_DelayCondition.SelectedIndex
        '----------------------------------------
        ' 無効の場合
        '----------------------------------------
        If delay_condition = LOGGER_PARAM_DISABLE Then
            '----------------------------------------
            ' 遅延回数を無効
            '----------------------------------------
            TextBox_DelayTimes.Enabled = False
            '----------------------------------------
            ' 有効の場合
            '----------------------------------------
        Else
            '----------------------------------------
            ' 遅延回数を有効
            '----------------------------------------
            TextBox_DelayTimes.Enabled = True
        End If
    End Sub

    '================================================================================
    ' 開始条件のコンボボックスの値を変更した際の処理になります
    ' 設定値の確認し、レベル比較とインレンジ/アウトレンジ比較の有効/無効を切り替えます
    '================================================================================
    Private Sub ComboBox_StartCondition_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_StartCondition.SelectedIndexChanged
        '----------------------------------------
        ' コンボボックスから開始条件を取得
        '----------------------------------------
        Dim select_trigger_type As Integer = ComboBox_StartCondition.SelectedIndex
        '----------------------------------------
        ' レベル比較の場合
        '----------------------------------------
        If select_trigger_type = LOGGER_PARAM_TRIGGER_LEVEL Then
            '----------------------------------------
            ' レベル比較を有効
            '----------------------------------------
            TextBox_StartLevelChNo.Enabled = True
            TextBox_StartLevelComaprisonValue.Enabled = True
            ComboBox_StartLevelComparisonDirection.Enabled = True
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を無効
            '----------------------------------------
            TextBox_StartRangeChNo.Enabled = False
            TextBox_StartRangeLowerLimitValue.Enabled = False
            TextBox_StartRangeUpperLimitValue.Enabled = False
            TextBox_StartRangeStateTimes.Enabled = False
            '----------------------------------------
            ' 時間を無効
            '----------------------------------------
            TextBox_StartTime_Time.Enabled = False
            '----------------------------------------
            ' 時刻を無効
            '----------------------------------------
            TextBox_StartTime_Hour.Enabled = False
            TextBox_StartTime_Minute.Enabled = False
            TextBox_StartTime_Second.Enabled = False
            '----------------------------------------
            ' インレンジ比較又はアウトレンジ比較の場合
            '----------------------------------------
        ElseIf select_trigger_type = LOGGER_PARAM_TRIGGER_INRANGE OrElse
               select_trigger_type = LOGGER_PARAM_TRIGGER_OUTRANGE Then
            '----------------------------------------
            ' レベル比較を無効
            '----------------------------------------
            TextBox_StartLevelChNo.Enabled = False
            TextBox_StartLevelComaprisonValue.Enabled = False
            ComboBox_StartLevelComparisonDirection.Enabled = False
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を有効
            '----------------------------------------
            TextBox_StartRangeChNo.Enabled = True
            TextBox_StartRangeLowerLimitValue.Enabled = True
            TextBox_StartRangeUpperLimitValue.Enabled = True
            TextBox_StartRangeStateTimes.Enabled = True
            '----------------------------------------
            ' 時間を無効
            '----------------------------------------
            TextBox_StartTime_Time.Enabled = False
            '----------------------------------------
            ' 時刻を無効
            '----------------------------------------
            TextBox_StartTime_Hour.Enabled = False
            TextBox_StartTime_Minute.Enabled = False
            TextBox_StartTime_Second.Enabled = False
            '----------------------------------------
            ' 時間の場合
            '----------------------------------------
        ElseIf select_trigger_type = LOGGER_PARAM_TRIGGER_ELAPSED_TIME Then
            '----------------------------------------
            ' レベル比較を無効
            '----------------------------------------
            TextBox_StartLevelChNo.Enabled = False
            TextBox_StartLevelComaprisonValue.Enabled = False
            ComboBox_StartLevelComparisonDirection.Enabled = False
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を無効
            '----------------------------------------
            TextBox_StartRangeChNo.Enabled = False
            TextBox_StartRangeLowerLimitValue.Enabled = False
            TextBox_StartRangeUpperLimitValue.Enabled = False
            TextBox_StartRangeStateTimes.Enabled = False
            '----------------------------------------
            ' 時間を有効
            '----------------------------------------
            TextBox_StartTime_Time.Enabled = True
            '----------------------------------------
            ' 時刻を無効
            '----------------------------------------
            TextBox_StartTime_Hour.Enabled = False
            TextBox_StartTime_Minute.Enabled = False
            TextBox_StartTime_Second.Enabled = False
            '----------------------------------------
            ' 時刻の場合
            '----------------------------------------
        ElseIf select_trigger_type = LOGGER_PARAM_TRIGGER_CURRENT_TIME Then
            '----------------------------------------
            ' レベル比較を無効
            '----------------------------------------
            TextBox_StartLevelChNo.Enabled = False
            TextBox_StartLevelComaprisonValue.Enabled = False
            ComboBox_StartLevelComparisonDirection.Enabled = False
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を無効
            '----------------------------------------
            TextBox_StartRangeChNo.Enabled = False
            TextBox_StartRangeLowerLimitValue.Enabled = False
            TextBox_StartRangeUpperLimitValue.Enabled = False
            TextBox_StartRangeStateTimes.Enabled = False
            '----------------------------------------
            ' 時間を無効
            '----------------------------------------
            TextBox_StartTime_Time.Enabled = False
            '----------------------------------------
            ' 時刻を有効
            '----------------------------------------
            TextBox_StartTime_Hour.Enabled = True
            TextBox_StartTime_Minute.Enabled = True
            TextBox_StartTime_Second.Enabled = True
            '----------------------------------------
            ' レベル比較、レンジ比較、時間、時刻以外の場合
            '----------------------------------------
        Else
            '----------------------------------------
            ' レベル比較を無効
            '----------------------------------------
            TextBox_StartLevelChNo.Enabled = False
            TextBox_StartLevelComaprisonValue.Enabled = False
            ComboBox_StartLevelComparisonDirection.Enabled = False
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を無効
            '----------------------------------------
            TextBox_StartRangeChNo.Enabled = False
            TextBox_StartRangeLowerLimitValue.Enabled = False
            TextBox_StartRangeUpperLimitValue.Enabled = False
            TextBox_StartRangeStateTimes.Enabled = False
            '----------------------------------------
            ' 時間を無効
            '----------------------------------------
            TextBox_StartTime_Time.Enabled = False
            '----------------------------------------
            ' 時刻を無効
            '----------------------------------------
            TextBox_StartTime_Hour.Enabled = False
            TextBox_StartTime_Minute.Enabled = False
            TextBox_StartTime_Second.Enabled = False
        End If
    End Sub

    '================================================================================
    ' 停止条件のコンボボックスの値を変更した際の処理になります
    ' 設定値の確認し、レベル比較とインレンジ/アウトレンジ比較の有効/無効を切り替えます
    '================================================================================
    Private Sub ComboBox_StopCondition_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox_StopCondition.SelectedIndexChanged
        '----------------------------------------
        ' コンボボックスから停止条件を取得
        '----------------------------------------
        Dim select_trigger_type As Integer = ComboBox_StopCondition.SelectedIndex
        '----------------------------------------
        ' レベル比較の場合
        '----------------------------------------
        If select_trigger_type = LOGGER_PARAM_TRIGGER_LEVEL Then
            '----------------------------------------
            ' レベル比較を有効
            '----------------------------------------
            TextBox_StopLevelChNo.Enabled = True
            TextBox_StopLevelComparisonValue.Enabled = True
            ComboBox_StopLevelComparisonDirection.Enabled = True
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を無効
            '----------------------------------------
            TextBox_StopRangeChNo.Enabled = False
            TextBox_StopRangeLowerLimitValue.Enabled = False
            TextBox_StopRangeUpperLimitValue.Enabled = False
            TextBox_StopRangeStateTimes.Enabled = False
            '----------------------------------------
            ' 時間を無効
            '----------------------------------------
            TextBox_StopTime_Time.Enabled = False
            '----------------------------------------
            ' 時刻を無効
            '----------------------------------------
            TextBox_StopTime_Hour.Enabled = False
            TextBox_StopTime_Minute.Enabled = False
            TextBox_StopTime_Second.Enabled = False
            '----------------------------------------
            ' インレンジ比較又はアウトレンジ比較の場合
            '----------------------------------------
        ElseIf select_trigger_type = LOGGER_PARAM_TRIGGER_INRANGE OrElse
               select_trigger_type = LOGGER_PARAM_TRIGGER_OUTRANGE Then
            '----------------------------------------
            ' レベル比較を無効
            '----------------------------------------
            TextBox_StopLevelChNo.Enabled = False
            TextBox_StopLevelComparisonValue.Enabled = False
            ComboBox_StopLevelComparisonDirection.Enabled = False
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を有効
            '----------------------------------------
            TextBox_StopRangeChNo.Enabled = True
            TextBox_StopRangeLowerLimitValue.Enabled = True
            TextBox_StopRangeUpperLimitValue.Enabled = True
            TextBox_StopRangeStateTimes.Enabled = True
            '----------------------------------------
            ' 時間を無効
            '----------------------------------------
            TextBox_StopTime_Time.Enabled = False
            '----------------------------------------
            ' 時刻を無効
            '----------------------------------------
            TextBox_StopTime_Hour.Enabled = False
            TextBox_StopTime_Minute.Enabled = False
            TextBox_StopTime_Second.Enabled = False
            '----------------------------------------
            ' 時間の場合
            '----------------------------------------
        ElseIf select_trigger_type = LOGGER_PARAM_TRIGGER_ELAPSED_TIME Then
            '----------------------------------------
            ' レベル比較を無効
            '----------------------------------------
            TextBox_StopLevelChNo.Enabled = False
            TextBox_StopLevelComparisonValue.Enabled = False
            ComboBox_StopLevelComparisonDirection.Enabled = False
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を無効
            '----------------------------------------
            TextBox_StopRangeChNo.Enabled = False
            TextBox_StopRangeLowerLimitValue.Enabled = False
            TextBox_StopRangeUpperLimitValue.Enabled = False
            TextBox_StopRangeStateTimes.Enabled = False
            '----------------------------------------
            ' 時間を有効
            '----------------------------------------
            TextBox_StopTime_Time.Enabled = True
            '----------------------------------------
            ' 時刻を無効
            '----------------------------------------
            TextBox_StopTime_Hour.Enabled = False
            TextBox_StopTime_Minute.Enabled = False
            TextBox_StopTime_Second.Enabled = False
            '----------------------------------------
            ' 時刻の場合
            '----------------------------------------
        ElseIf select_trigger_type = LOGGER_PARAM_TRIGGER_CURRENT_TIME Then
            '----------------------------------------
            ' レベル比較を無効
            '----------------------------------------
            TextBox_StopLevelChNo.Enabled = False
            TextBox_StopLevelComparisonValue.Enabled = False
            ComboBox_StopLevelComparisonDirection.Enabled = False
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を無効
            '----------------------------------------
            TextBox_StopRangeChNo.Enabled = False
            TextBox_StopRangeLowerLimitValue.Enabled = False
            TextBox_StopRangeUpperLimitValue.Enabled = False
            TextBox_StopRangeStateTimes.Enabled = False
            '----------------------------------------
            ' 時間を無効
            '----------------------------------------
            TextBox_StopTime_Time.Enabled = False
            '----------------------------------------
            ' 時刻を有効
            '----------------------------------------
            TextBox_StopTime_Hour.Enabled = True
            TextBox_StopTime_Minute.Enabled = True
            TextBox_StopTime_Second.Enabled = True
            '----------------------------------------
            ' レベル比較、レンジ比較、時間、時刻以外の場合
            '----------------------------------------
        Else
            '----------------------------------------
            ' レベル比較を無効
            '----------------------------------------
            TextBox_StopLevelChNo.Enabled = False
            TextBox_StopLevelComparisonValue.Enabled = False
            ComboBox_StopLevelComparisonDirection.Enabled = False
            '----------------------------------------
            ' インレンジ/アウトレンジ比較を無効
            '----------------------------------------
            TextBox_StopRangeChNo.Enabled = False
            TextBox_StopRangeLowerLimitValue.Enabled = False
            TextBox_StopRangeUpperLimitValue.Enabled = False
            TextBox_StopRangeStateTimes.Enabled = False
            '----------------------------------------
            ' 時間を無効
            '----------------------------------------
            TextBox_StopTime_Time.Enabled = False
            '----------------------------------------
            ' 時刻を無効
            '----------------------------------------
            TextBox_StopTime_Hour.Enabled = False
            TextBox_StopTime_Minute.Enabled = False
            TextBox_StopTime_Second.Enabled = False
        End If
    End Sub

    '================================================================================
    ' 適用ボタンをクリックした際の処理になります
    ' 設定値の確認
    '================================================================================
    Private Sub Button_Ok_Click(sender As Object, e As EventArgs) Handles Button_Ok.Click
        Dim pre_clock_type As UShort                        ' 設定一時格納用 クロック種類
        Dim pre_sampling_clock_unit As UShort               ' 設定一時格納用 サンプリングクロック単位
        Dim pre_sampling_clock As Double                    ' 設定一時格納用 サンプリングクロック
        Dim pre_external_clock As Double                    ' 設定一時格納用 外部クロック
        Dim pre_sampling_times As UInteger                  ' 設定一時格納用 サンプリング回数条件
        Dim pre_scan_clock As Single                        ' 設定一時格納用 スキャンクロック
        Dim pre_repeat_times As UInteger                    ' 設定一時格納用 リピート回数条件
        Dim pre_start_trigger_type As UShort                ' 設定一時格納用 開始条件
        Dim pre_stop_trigger_type As UShort                 ' 設定一時格納用 停止条件
        Dim pre_delay_time As UInteger                      ' 設定一時格納用 遅延サンプリング条件
        Dim pre_start_level_trigger_edge As UShort          ' 設定一時格納用 開始トリガ レベル比較 比較方向
        Dim pre_start_level_sequence_no As UShort           ' 設定一時格納用 開始トリガ レベル比較 シーケンス番号
        Dim pre_start_level_border_value As Single          ' 設定一時格納用 開始トリガ レベル比較 比較値
        Dim pre_start_range_sequence_no As UShort           ' 設定一時格納用 開始トリガ インレンジ／アウトレンジ比較 シーケンス番号
        Dim pre_start_range_upper_border_value As Single    ' 設定一時格納用 開始トリガ インレンジ／アウトレンジ比較 上限値
        Dim pre_start_range_lower_border_value As Single    ' 設定一時格納用 開始トリガ インレンジ／アウトレンジ比較 下限値
        Dim pre_start_range_state_times As UInteger         ' 設定一時格納用 開始トリガ インレンジ／アウトレンジ比較 保持回数
        Dim pre_start_time_time As UInteger                 ' 設定一時格納用 開始トリガ 時間/時刻 時間
        Dim pre_start_time_hour As UInteger                 ' 設定一時格納用 開始トリガ 時間/時刻 時刻(時)
        Dim pre_start_time_minute As UInteger               ' 設定一時格納用 開始トリガ 時間/時刻 時刻(分)
        Dim pre_start_time_second As UInteger               ' 設定一時格納用 開始トリガ 時間/時刻 時刻(秒)
        Dim pre_stop_level_trigger_edge As UShort           ' 設定一時格納用 停止トリガ レベル比較 比較方向
        Dim pre_stop_level_sequence_no As UShort            ' 設定一時格納用 停止トリガ レベル比較 シーケンス番号
        Dim pre_stop_level_border_value As Single           ' 設定一時格納用 停止トリガ レベル比較 比較値
        Dim pre_stop_range_sequence_no As UShort            ' 設定一時格納用 停止トリガ インレンジ／アウトレンジ比較 シーケンス番号
        Dim pre_stop_range_upper_border_value As Single     ' 設定一時格納用 停止トリガ インレンジ／アウトレンジ比較 上限値
        Dim pre_stop_range_lower_border_value As Single     ' 設定一時格納用 停止トリガ インレンジ／アウトレンジ比較 下限値
        Dim pre_stop_range_state_times As UInteger          ' 設定一時格納用 停止トリガ インレンジ／アウトレンジ比較 保持回数
        Dim pre_stop_time_time As UInteger                  ' 設定一時格納用 停止トリガ 時間/時刻 時間
        Dim pre_stop_time_hour As UInteger                  ' 設定一時格納用 停止トリガ 時間/時刻 時刻(時)
        Dim pre_stop_time_minute As UInteger                ' 設定一時格納用 停止トリガ 時間/時刻 時刻(分)
        Dim pre_stop_time_second As UInteger                ' 設定一時格納用 停止トリガ 時間/時刻 時刻(秒)

        '----------------------------------------
        ' コンボボックスからクロック種類を取得
        '----------------------------------------
        pre_clock_type = CUShort(ComboBox_ClockType.SelectedIndex)
        '----------------------------------------
        ' コンボボックスからサンプリングクロック周期の単位を取得
        '----------------------------------------
        pre_sampling_clock_unit = CUShort(ComboBox_SamplingClockUnit.SelectedIndex)
        '----------------------------------------
        ' テキストボックスからサンプリングクロック周期を取得
        '----------------------------------------
        If Double.TryParse(TextBox_SamplingClock.Text, pre_sampling_clock) = False Then
            pre_sampling_clock = 0.0
        End If
        '----------------------------------------
        ' テキストボックスから外部クロック更新間隔を取得
        '----------------------------------------
        If Double.TryParse(TextBox_ExternalClockInputTiming.Text, pre_external_clock) = False Then
            pre_external_clock = 0.0
        End If
        '----------------------------------------
        ' コンボボックスからサンプリング条件を取得
        '----------------------------------------
        If ComboBox_SamplingCondition.SelectedIndex = 0 Then
            '----------------------------------------
            ' 無限の場合は0をセット
            '----------------------------------------
            pre_sampling_times = 0
        Else
            '----------------------------------------
            ' 有限の場合はテキストボックスからサンプリング回数を取得
            '----------------------------------------
            If UInteger.TryParse(TextBox_SamplingTimes.Text, pre_sampling_times) = False Then
                pre_sampling_times = 0
            End If
        End If
        '----------------------------------------
        ' テキストボックスから変換速度を取得
        '----------------------------------------
        If Single.TryParse(TextBox_ScanClock.Text, pre_scan_clock) = False Then
            pre_scan_clock = 0.0F
        End If
        '----------------------------------------
        ' テキストボックスからリピート回数を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_RepeatTimes.Text, pre_repeat_times) = False Then
            pre_repeat_times = 0
        End If
        '----------------------------------------
        ' コンボボックスから遅延条件を取得
        '----------------------------------------
        If ComboBox_DelayCondition.SelectedIndex = LOGGER_PARAM_DISABLE Then
            '----------------------------------------
            ' 無効の場合は0をセット
            '----------------------------------------
            pre_delay_time = 0
        Else
            '----------------------------------------
            ' 有効の場合はテキストボックスから遅延回数を取得
            '----------------------------------------
            If UInteger.TryParse(TextBox_DelayTimes.Text, pre_delay_time) = False Then
                pre_delay_time = 0
            End If
        End If
        '----------------------------------------
        ' コンボボックスから開始条件を取得
        '----------------------------------------
        pre_start_trigger_type = CUShort(ComboBox_StartCondition.SelectedIndex)
        '----------------------------------------
        ' テキストボックスから開始条件 - レベル比較 - チャネル番号を取得
        '----------------------------------------
        If UShort.TryParse(TextBox_StartLevelChNo.Text, pre_start_level_sequence_no) = False Then
            pre_start_level_sequence_no = 0
        End If
        '----------------------------------------
        ' テキストボックスから開始条件 - レベル比較 - 比較値を取得
        '----------------------------------------
        If Single.TryParse(TextBox_StartLevelComaprisonValue.Text, pre_start_level_border_value) = False Then
            pre_start_level_border_value = 0.0F
        End If
        '----------------------------------------
        ' コンボボックスから開始条件 - レベル比較 - 比較方向を取得
        '----------------------------------------
        pre_start_level_trigger_edge = CUShort(ComboBox_StartLevelComparisonDirection.SelectedIndex)
        '----------------------------------------
        ' テキストボックスから開始条件 - インレンジ/アウトレンジ比較 - チャネル番号を取得
        '----------------------------------------
        If UShort.TryParse(TextBox_StartRangeChNo.Text, pre_start_range_sequence_no) = False Then
            pre_start_range_sequence_no = 0
        End If
        '----------------------------------------
        ' テキストボックスから開始条件 - インレンジ/アウトレンジ比較 - 上限値を取得
        '----------------------------------------
        If Single.TryParse(TextBox_StartRangeUpperLimitValue.Text, pre_start_range_upper_border_value) = False Then
            pre_start_range_upper_border_value = 0.0F
        End If
        '----------------------------------------
        ' テキストボックスから開始条件 - インレンジ/アウトレンジ比較 - 下限値を取得
        '----------------------------------------
        If Single.TryParse(TextBox_StartRangeLowerLimitValue.Text, pre_start_range_lower_border_value) = False Then
            pre_start_range_lower_border_value = 0.0F
        End If
        '----------------------------------------
        ' テキストボックスから開始条件 - インレンジ/アウトレンジ比較 - 保持回数を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StartRangeStateTimes.Text, pre_start_range_state_times) = False Then
            pre_start_range_state_times = 0
        End If
        '----------------------------------------
        ' テキストボックスから開始条件 - 時間/時刻 - 時間を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StartTime_Time.Text, pre_start_time_time) = False Then
            pre_start_time_time = 0
        End If
        '----------------------------------------
        ' テキストボックスから開始条件 - 時間/時刻 - 時刻(時)を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StartTime_Hour.Text, pre_start_time_hour) = False Then
            pre_start_time_hour = 0
        End If
        '----------------------------------------
        ' テキストボックスから開始条件 - 時間/時刻 - 時刻(分)を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StartTime_Minute.Text, pre_start_time_minute) = False Then
            pre_start_time_minute = 0
        End If
        '----------------------------------------
        ' テキストボックスから開始条件 - 時間/時刻 - 時刻(秒)を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StartTime_Second.Text, pre_start_time_second) = False Then
            pre_start_time_second = 0
        End If
        '----------------------------------------
        ' コンボボックスから停止条件を取得
        '----------------------------------------
        pre_stop_trigger_type = CUShort(ComboBox_StopCondition.SelectedIndex)
        '----------------------------------------
        ' テキストボックスから停止条件 - レベル比較 - チャネル番号を取得
        '----------------------------------------
        If UShort.TryParse(TextBox_StopLevelChNo.Text, pre_stop_level_sequence_no) = False Then
            pre_stop_level_sequence_no = 0
        End If
        '----------------------------------------
        ' テキストボックスから停止条件 - レベル比較 - 比較値を取得
        '----------------------------------------
        If Single.TryParse(TextBox_StopLevelComparisonValue.Text, pre_stop_level_border_value) = False Then
            pre_stop_level_border_value = 0.0F
        End If
        '----------------------------------------
        ' コンボボックスから停止条件 - レベル比較 - 比較方向を取得
        '----------------------------------------
        pre_stop_level_trigger_edge = CUShort(ComboBox_StopLevelComparisonDirection.SelectedIndex)
        '----------------------------------------
        ' テキストボックスから停止条件 - インレンジ/アウトレンジ比較 - チャネル番号を取得
        '----------------------------------------
        If UShort.TryParse(TextBox_StopRangeChNo.Text, pre_stop_range_sequence_no) = False Then
            pre_stop_range_sequence_no = 0
        End If
        '----------------------------------------
        ' テキストボックスから停止条件 - インレンジ/アウトレンジ比較 - 上限値を取得
        '----------------------------------------
        If Single.TryParse(TextBox_StopRangeUpperLimitValue.Text, pre_stop_range_upper_border_value) = False Then
            pre_stop_range_upper_border_value = 0.0F
        End If
        '----------------------------------------
        ' テキストボックスから停止条件 - インレンジ/アウトレンジ比較 - 下限値を取得
        '----------------------------------------
        If Single.TryParse(TextBox_StopRangeLowerLimitValue.Text, pre_stop_range_lower_border_value) = False Then
            pre_stop_range_lower_border_value = 0.0F
        End If
        '----------------------------------------
        ' テキストボックスから停止条件 - インレンジ/アウトレンジ比較 - 保持回数を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StopRangeStateTimes.Text, pre_stop_range_state_times) = False Then
            pre_stop_range_state_times = 0
        End If
        '----------------------------------------
        ' テキストボックスから停止条件 - 時間/時刻 - 時間を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StopTime_Time.Text, pre_stop_time_time) = False Then
            pre_stop_time_time = 0
        End If
        '----------------------------------------
        ' テキストボックスから停止条件 - 時間/時刻 - 時刻(時)を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StopTime_Hour.Text, pre_stop_time_hour) = False Then
            pre_stop_time_hour = 0
        End If
        '----------------------------------------
        ' テキストボックスから停止条件 - 時間/時刻 - 時刻(分)を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StopTime_Minute.Text, pre_stop_time_minute) = False Then
            pre_stop_time_minute = 0
        End If
        '----------------------------------------
        ' テキストボックスから停止条件 - 時間/時刻 - 時刻(秒)を取得
        '----------------------------------------
        If UInteger.TryParse(TextBox_StopTime_Second.Text, pre_stop_time_second) = False Then
            pre_stop_time_second = 0
        End If
        '----------------------------------------
        ' 一時格納用からメンバ変数にコピー
        '----------------------------------------
        m_clock_type = pre_clock_type
        m_sampling_clock_unit = pre_sampling_clock_unit
        m_sampling_clock = pre_sampling_clock
        m_external_clock = pre_external_clock
        m_sampling_times = pre_sampling_times
        m_scan_clock = pre_scan_clock
        m_repeat_times = pre_repeat_times
        m_start_trigger_type = pre_start_trigger_type
        m_stop_trigger_type = pre_stop_trigger_type
        m_delay_time = pre_delay_time
        m_start_level_trigger_edge = pre_start_level_trigger_edge
        m_start_level_sequence_no = pre_start_level_sequence_no
        m_start_level_border_value = pre_start_level_border_value
        m_start_range_sequence_no = pre_start_range_sequence_no
        m_start_range_upper_border_value = pre_start_range_upper_border_value
        m_start_range_lower_border_value = pre_start_range_lower_border_value
        m_start_range_state_times = pre_start_range_state_times
        m_start_time_time = pre_start_time_time
        m_start_time_hour = pre_start_time_hour
        m_start_time_minute = pre_start_time_minute
        m_start_time_second = pre_start_time_second
        m_stop_level_trigger_edge = pre_stop_level_trigger_edge
        m_stop_level_sequence_no = pre_stop_level_sequence_no
        m_stop_level_border_value = pre_stop_level_border_value
        m_stop_range_sequence_no = pre_stop_range_sequence_no
        m_stop_range_upper_border_value = pre_stop_range_upper_border_value
        m_stop_range_lower_border_value = pre_stop_range_lower_border_value
        m_stop_range_state_times = pre_stop_range_state_times
        m_stop_time_time = pre_stop_time_time
        m_stop_time_hour = pre_stop_time_hour
        m_stop_time_minute = pre_stop_time_minute
        m_stop_time_second = pre_stop_time_second

        Me.DialogResult = DialogResult.OK
        Me.Close()
    End Sub

    '================================================================================
    ' キャンセルボタンをクリックした際の処理になります
    '================================================================================
    Private Sub Button_Cancel_Click(sender As Object, e As EventArgs) Handles Button_Cancel.Click
        Me.Close()
    End Sub
End Class