init
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace DTS.Common.Interactivity
|
||||
{
|
||||
public class Notification : INotification
|
||||
{
|
||||
public string Title { get; set; }
|
||||
|
||||
public object Content { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using DTS.Common.Base;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IExportMainViewModel : IBaseViewModel, ISelectedDataViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Main View.
|
||||
/// </summary>
|
||||
IBaseView View { get; set; }
|
||||
|
||||
bool Standalone { get; set; }
|
||||
object ContextNavigationRegion { get; set; }
|
||||
object ContextGraphRegion { get; set; }
|
||||
object ContextGraphsRegion { get; set; }
|
||||
object ContextPropertyRegion { get; set; }
|
||||
List<FrameworkElement> GetRegions();
|
||||
string ConfigPath { get; set; }
|
||||
bool DoesUserHaveEditPermission { get; set; }
|
||||
void ZoomReset();
|
||||
//inform left arrow key was pressed
|
||||
void LeftKeyPress();
|
||||
//inform right arrow key was pressed
|
||||
void RightKeyPress();
|
||||
Common.Enums.IsoViewMode ChannelCodeViewMode { get; set; }
|
||||
Common.Enums.Sensors.CalibrationBehaviors CalibrationBehaviorSetting { get; set; }
|
||||
bool CalibrationBehaviorSettableInViewer { get; set; }
|
||||
Visibility SettingsVisibility { get; }
|
||||
string SelectedTest { get; set; }
|
||||
string SelectedDTSFile { get; set; }
|
||||
void AddSelectedEvents(string groupName, List<ITestEvent> events);
|
||||
List<string> AvailableTestIds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// This converter will returns a visibility based on whether pretrigger should be shown or not
|
||||
/// it should be bound to RecordingMode an optional parameter allows inverting the return
|
||||
/// </summary>
|
||||
public class RecordingModePreTriggerVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
var showPreTrigger = true;
|
||||
if ((value is RecordingModes mode) &&
|
||||
(RecordingModeExtensions.IsAnActiveMode(mode) || !RecordingModeExtensions.CanProgramPreTrigger(mode)))
|
||||
{
|
||||
showPreTrigger = false;
|
||||
}
|
||||
|
||||
var invert = false;
|
||||
if (bool.TrueString.Equals(parameter)) { invert = true; }
|
||||
if (showPreTrigger)
|
||||
{
|
||||
return invert ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
else { return invert ? Visibility.Visible : Visibility.Collapsed; }
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return null != value && value.Equals(Visibility.Visible) ? parameter : Binding.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user