| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 进度值 |
| | | /// </summary> |
| | | private int _processValue; |
| | | public int ProcessValue |
| | | { |
| | | get => _processValue; |
| | | set |
| | | { |
| | | Set(ref _processValue, value); |
| | | } |
| | | } |
| | | |
| | | public string ProcessValueLabel |
| | | { |
| | | get |
| | | { |
| | | if (ProcessValue > 0) return $"{ProcessValue}%"; |
| | | return ""; |
| | | } |
| | | set |
| | | { |
| | | } |
| | | } |
| | | |
| | | public void SetSimpleUI(bool flag) |
| | | { |
| | | if (flag) |
| | | { |
| | | simplePanel.Visibility = Visibility.Visible; |
| | | detailPanel.Visibility = Visibility.Collapsed; |
| | | } |
| | | else |
| | | { |
| | | simplePanel.Visibility = Visibility.Collapsed; |
| | | detailPanel.Visibility = Visibility.Visible; |
| | | } |
| | | } |
| | | |
| | | public int ProbeWarn { get; private set; } |
| | | |
| | | public SingleControl(int Index, string CountIniPath, int probeWarn) |
| | |
| | | /// <param name="ProcessVal"></param> |
| | | public void SetTestProcess(int ProcessVal) |
| | | { |
| | | this.testProcess.Value = ProcessVal; |
| | | this.testProcessLabel.Content = ProcessVal.ToString() + "%"; |
| | | ProcessValue = ProcessVal; |
| | | Set("ProcessValueLabel"); |
| | | } |
| | | |
| | | private void UserControl_Loaded(object sender, RoutedEventArgs e) |
| | |
| | | |
| | | public void ResetCounter() |
| | | { |
| | | this.passNum = 0; |
| | | this.failNum = 0; |
| | | this.PassNum = 0; |
| | | this.FailNum = 0; |
| | | this.UpdateTestCounter(null); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public void ShowPausePanel() |
| | | { |
| | | pausePanel.Visibility = Visibility.Visible; |
| | | } |
| | | |
| | | private void Button_Click(object sender, RoutedEventArgs e) |
| | | { |
| | | Button btn = sender as Button; |
| | |
| | | case "clear": |
| | | UpdateProbeCount(0); |
| | | break; |
| | | case "cancelPauseBtn": |
| | | SequenceFileContext?.StationGlobals.SetValBoolean($"StationState.IsContinue_{index}", 1, false); |
| | | pausePanel.Visibility = Visibility.Collapsed; |
| | | break; |
| | | case "continuePauseBtn": |
| | | SequenceFileContext?.StationGlobals.SetValBoolean($"StationState.IsContinue_{index}", 1, true); |
| | | pausePanel.Visibility = Visibility.Collapsed; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void pausePanel_Loaded(object sender, RoutedEventArgs e) |
| | | { |
| | | var can = pausePanel; |
| | | var modal = visualModal; |
| | | Canvas.SetLeft(modal, (pausePanel.ActualWidth - visualModal.ActualWidth) / 2); |
| | | Canvas.SetTop(modal, (pausePanel.ActualHeight - visualModal.ActualHeight) / 2); |
| | | } |
| | | } |
| | | } |