private void OnDeviceFamilyChanged(DeviceFamily value) { switch (devicefamily) { case "Windows.Mobile": IsActive = DeviceFamily.Mobile == value; break; case "Windows.Desktop": IsActive = DeviceFamily.Desktop == value; break; case "Windows.Team": IsActive = DeviceFamily.Team == value; break; case "Windows.IoT": IsActive = DeviceFamily.IoT == value; break; case "Windows.Xbox": IsActive = DeviceFamily.Xbox == value; break; default: IsActive = DeviceFamily.Unknown == value; break; } }
public IshikawaDiagram() { InitializeComponent(); //Initialize Nodes and Connectors diagramcontrol.Nodes = new ObservableCollection <NodeViewModel>(); diagramcontrol.Connectors = new ObservableCollection <IConnector>(); //Initialize PageSettings and Constraints InitializeDiagram(); //To disable ContextMenu diagramcontrol.Menu = null; if (DeviceFamily.GetDeviceFamily() == Devices.Desktop) { //To enable Zooming and Panning diagramcontrol.Tool = Tool.ZoomPan; //diagramcontrol.Constraints = diagramcontrol.Constraints & // ~(GraphConstraints.Zoomable | GraphConstraints.Pannable); } else { diagramcontrol.Tool = Tool.ZoomPan; diagramcontrol.Constraints |= GraphConstraints.AllowPan; } //diagramcontrol.Constraints = diagramcontrol.Constraints & ~GraphConstraints.PanRails; //Create Nodes and Connections Nodeviewmodel(); }
public async void Run(IBackgroundTaskInstance taskInstance) { try { this.deferral = taskInstance.GetDeferral(); this.SafeRun(taskInstance); } catch (Exception ex) { ReportStatus(BackgroundExecutionStatus.CompletedRootException); this.deferral.Complete(); DeviceFamily deviceFamily = DeviceFamily.Unkown; if (AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Desktop", StringComparison.OrdinalIgnoreCase)) { deviceFamily = DeviceFamily.WindowsDesktop; } else if (AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Mobile", StringComparison.OrdinalIgnoreCase)) { deviceFamily = DeviceFamily.WindowsMobile; } var trackingManager = new TrackingManager(false, deviceFamily); trackingManager.Exception(ex, "Exception Background task helper root"); } }
private static void DeviceFamilyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DeviceFamilyTrigger obj = (DeviceFamilyTrigger)d; DeviceFamily value = (DeviceFamily)e.NewValue; obj.SetActive(value == DeviceFamilyHelper.DeviceFamily); }
public TrackingManager(bool isEnabled, DeviceFamily deviceFamily = DeviceFamily.WindowsDesktop) { this.isEnabled = isEnabled; #if DEBUG this.isEnabled = false; #endif }
static Platform() { //DEMO 2.0 Family Detection Debug.WriteLine("DeviceFamily: " + AnalyticsInfo.VersionInfo.DeviceFamily); // Determine what device this is running on and store the appropriate enumeration representing that device switch (AnalyticsInfo.VersionInfo.DeviceFamily) { case "Windows.Desktop": DeviceFamily = DeviceFamily.Desktop; break; case "Windows.Mobile": DeviceFamily = DeviceFamily.Mobile; break; case "Windows.Xbox": DeviceFamily = DeviceFamily.Xbox; break; case "Windows.IoT": DeviceFamily = DeviceFamily.IoT; break; default: DeviceFamily = DeviceFamily.Unknown; break; } }
/// <summary> /// Check if family is compatible with this type of devices. /// </summary> /// <param name="family">The family to check.</param> /// <returns>Returns true if device is compatible.</returns> public static bool IsCompatible(DeviceFamily family) { return(family == DeviceFamily.Ds18s20 || family == DeviceFamily.Ds18b20 || family == DeviceFamily.Ds1825 || family == DeviceFamily.Ds28ea00); }
public SequenceDiagram() { this.InitializeComponent(); //Initialize Nodes and Connectors diagramcontrol.Nodes = new ObservableCollection <NodeViewModel>(); diagramcontrol.Connectors = new ObservableCollection <ConnectorViewModel>(); //PortVisibility used to enable/disable port diagramcontrol.PortVisibility = PortVisibility.Collapse; //To Disable ContextMenu diagramcontrol.Menu = null; diagramcontrol.Tool = Tool.ZoomPan; if (DeviceFamily.GetDeviceFamily() == Devices.Desktop) { //To enable Zooming and Panning diagramcontrol.Tool = Tool.ZoomPan; //diagramcontrol.Constraints = diagramcontrol.Constraints & // ~(GraphConstraints.Zoomable | GraphConstraints.Pannable); } else { diagramcontrol.Tool = Tool.ZoomPan; diagramcontrol.Constraints |= GraphConstraints.AllowPan; } //diagramcontrol.Constraints = diagramcontrol.Constraints & ~GraphConstraints.PanRails; //PageSettings used to enable the Appearance of Diagram Page. diagramcontrol.PageSettings.PageBorderBrush = new SolidColorBrush(Colors.Transparent); diagramcontrol.ScrollSettings.ScrollLimit = ScrollLimit.Diagram; //Create Nodes CreateNodesandConnections(); }
/// <summary> /// Enumerates all devices currently detected on this bus. Platform can update device list /// periodically. To manually trigger an update call <see cref="ScanForDeviceChangesAsync" />. /// </summary> /// <param name="family">Family id used to filter enumerated devices.</param> /// <returns>A list of discovered devices.</returns> public IEnumerable <string> EnumerateDeviceIds(DeviceFamily family = DeviceFamily.Any) { foreach (var devId in EnumerateDeviceIdsInternal(BusId, family)) { yield return(devId); } }
/// <summary> /// Initializes the new instance of <see cref="Annotations"> class.</see>/> /// </summary> public Annotations() { ApplicationLanguages.PrimaryLanguageOverride = "en-US"; this.InitializeComponent(); this.viewModel = new ViewModel(); pivotChart1.ItemSource = ProductSales.GetSalesData(); // Adding PivotAxis to the Control pivotChart1.PivotAxis.Add(new PivotItem { FieldMappingName = "Product", TotalHeader = "Total" }); pivotChart1.PivotAxis.Add(new PivotItem { FieldMappingName = "Country", TotalHeader = "Total" }); if (DeviceFamily.GetDeviceFamily() == Devices.Desktop) { pivotChart1.PivotAxis.Add(new PivotItem { FieldMappingName = "State", TotalHeader = "Total" }); } // Adding PivotLegend to the Control pivotChart1.PivotLegend.Add(new PivotItem { FieldMappingName = "Date", TotalHeader = "Total" }); //Adding PivotCalculations to the Control pivotChart1.PivotCalculations.Add(new PivotComputationInfo { FieldName = "Quantity", Format = "#.#" }); }
public PlatformService(string version, string deviceId, Func <string> getDiagnosticsInformation) { if (version == null) { throw new ArgumentNullException(nameof(version)); } if (deviceId == null) { throw new ArgumentNullException(nameof(deviceId)); } if (getDiagnosticsInformation == null) { throw new ArgumentNullException(nameof(getDiagnosticsInformation)); } this.version = version; this.deviceId = deviceId; this.getDiagnosticsInformation = getDiagnosticsInformation; if (AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Desktop", StringComparison.OrdinalIgnoreCase)) { this.deviceFamily = DeviceFamily.WindowsDesktop; } else if (AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Mobile", StringComparison.OrdinalIgnoreCase)) { this.deviceFamily = DeviceFamily.WindowsMobile; } else { this.deviceFamily = DeviceFamily.Unkown; } }
public DeviceInformation(DeviceFamily deviceFamily, ushort deviceNumber, MappedMemory flashDevice, MappedMemory sramDevice, byte productRevision = 0) { flashSize = checked ((ushort)(flashDevice.Size / 1024)); sramSize = checked ((ushort)(sramDevice.Size / 1024)); this.productRevision = productRevision; this.deviceFamily = deviceFamily; this.deviceNumber = deviceNumber; }
IEnumerable <BarCodeSymbology> GetBarCodeTypes() { DeviceFamily deviceFamily = DeviceFamilyHelper.DeviceFamily; var symbologies = Enum.GetValues(typeof(BarCodeSymbology)).Cast <BarCodeSymbology>(); //if(deviceFamily == DeviceFamily.Mobile) // return symbologies.OrderBy(x => x, new SymbologyComparer()).ToArray(); return(symbologies.TakeWhile(x => !IsSymbology2D(x)).ToArray()); }
public static string fromFamily(DeviceFamily v) { switch (v) { case DeviceFamily.iPhone: return "iphone"; case DeviceFamily.iPad: return "ipad"; case DeviceFamily.Universal: return "iphone ipad"; } throw new ArgumentOutOfRangeException ("v"); }
/// <summary> /// Initializes the new instance of <see cref="Serialization">Serialization.</see>/> /// </summary> public Serialization() { this.InitializeComponent(); this.pivotGrid1.ItemSource = vm.ProductSalesData; if (DeviceFamily.GetDeviceFamily() == Devices.Mobile) { this.pivotGrid1.ShowGroupingBar = false; } }
/// <summary> /// Enumerate all devices found on 1-wire busses in this system. /// </summary> /// <param name="family">Family id used to filter devices.</param> /// <returns>A list of devices found.</returns> public static IEnumerable <(string busId, string devId)> EnumerateDeviceIds(DeviceFamily family = DeviceFamily.Any) { foreach (var busId in OneWireBus.EnumerateBusIdsInternal()) { foreach (var devId in OneWireBus.EnumerateDeviceIdsInternal(busId, family)) { yield return(busId, devId); } } }
public SamplesConfiguration() { if (DeviceFamily.GetDeviceFamily() == Devices.Desktop) { #if STORE_SAMPLE SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.GettingStarted_WinRT).AssemblyQualifiedName, Product = "Schedule", Header = "GettingStarted", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = true }); #else SampleHelper.SetTagsForProduct("Schedule", Tags.None); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.GettingStarted_WinRT).AssemblyQualifiedName, Product = "Schedule", Header = "GettingStarted", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = true }); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.CustomizationDemo_WinRT).AssemblyQualifiedName, Product = "Schedule", Header = "Customization", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.RecurrenceAppointment_WinRT).AssemblyQualifiedName, Product = "Schedule", Header = "Recurrence Appointments", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.ResourceDemo_WinRT).AssemblyQualifiedName, Product = "Schedule", Header = "Resource", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); #endif } else { #if STORE_SAMPLE SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.GettingStarted).AssemblyQualifiedName, Product = "Schedule", ProductIcons = "Icons/Schedule.png", Header = "GettingStarted", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = true }); #else SampleHelper.SetTagsForProduct("Schedule", Tags.None); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.GettingStarted).AssemblyQualifiedName, Product = "Schedule", Header = "GettingStarted", ProductIcons = "Icons/Schedule.png", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = true }); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.CustomizationDemo).AssemblyQualifiedName, Product = "Schedule", Header = "Customization", ProductIcons = "Icons/Schedule.png", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(ScheduleUWP_Samples.RecurrenceAppointment).AssemblyQualifiedName, Product = "Schedule", Header = "Recurrence Appointments", Tag = Tags.None, ProductIcons = "Icons/Schedule.png", Category = Categories.DataVisualization, HasOptions = false }); #endif } }
public ComboBox() { this.InitializeComponent(); if (DeviceFamily.GetDeviceFamily() == Devices.Mobile) { EmployeesCombo.FontSize = 12; ProductsCombo.FontSize = 12; ComponentsCombo.FontSize = 12; view.Margin = new Thickness(10, 0, 20, 20); } ProductsCombo.LostFocus += ComponentsCombo_LostFocus; }
public ColorPaletteView() { this.InitializeComponent(); if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { this.Loaded += ColorPaletteDemo_Loaded; } if (DeviceFamily.GetDeviceFamily() == Devices.Mobile) { ColorPalette.Height = 350; ColorPalette.Width = 250; } }
/// <summary> /// Initializes the new instance of <see cref="Relational">Relational.</see>/> /// </summary> public Relational() { ApplicationLanguages.PrimaryLanguageOverride = "en-US"; this.InitializeComponent(); this.pivotGrid1.ItemSource = vm.ProductSalesData; this.pivotGrid1.RowHeaderStyle.IsHyperlinkCell = this.pivotGrid1.ColumnHeaderStyle.IsHyperlinkCell = this.pivotGrid1.SummaryColumnStyle.IsHyperlinkCell = this.pivotGrid1.SummaryRowStyle.IsHyperlinkCell = this.pivotGrid1.ValueCellStyle.IsHyperlinkCell = false; if (DeviceFamily.GetDeviceFamily() != Devices.Desktop) { if (pivotGrid1.ConditionalFormats != null && pivotGrid1.ConditionalFormats.Count > 0) { pivotGrid1.ConditionalFormats.Clear(); } } }
private static IFamilyAdapter SelectByDeviceType(DeviceFamily deviceFamily) { switch (deviceFamily) { case DeviceFamily.Hq300: return(new Hq300Adapter()); case DeviceFamily.Sa700: return(new Sa700Adapter()); default: return(new DefaultFamilyAdapter()); } }
public IDevice GetDevice(DeviceFamily deviceFamily) { switch (deviceFamily) { case DeviceFamily.Hq300: return(new Hq300()); case DeviceFamily.Sa700: return(new Sa700Device()); default: return(new UnknowDevice()); } }
/// <summary> /// The event handler method is hooked when the radio button was clicked. /// </summary> /// <param name="sender">The radio button.</param> /// <param name="e">The event argument.</param> private void rdBtnRelationalData_Click(object sender, RoutedEventArgs e) { parentGrid.Children.RemoveAt(0); SfPivotChart pivotChart = new SfPivotChart { ShowToolTip = false, ChartType = PivotChartType.Scatter, Legend = null, Annotations = parentGrid.Resources["RelationalAnnotationCollection"] as PivotChartAnnotationCollection }; busyIndicator.IsBusy = true; Task.Run(async() => { var dispatcher = CoreApplication.MainView.CoreWindow.Dispatcher; var taskCompletionSource = new TaskCompletionSource <bool>(); await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { pivotChart.ItemSource = ProductSales.GetSalesData(); // Adding PivotAxis to the Control pivotChart.PivotAxis.Add(new PivotItem { FieldMappingName = "Product", TotalHeader = "Total" }); pivotChart.PivotAxis.Add(new PivotItem { FieldMappingName = "Country", TotalHeader = "Total" }); if (DeviceFamily.GetDeviceFamily() == Devices.Desktop) { pivotChart.PivotAxis.Add(new PivotItem { FieldMappingName = "State", TotalHeader = "Total" }); } // Adding PivotLegend to the Control pivotChart.PivotLegend.Add(new PivotItem { FieldMappingName = "Date", TotalHeader = "Total" }); //Adding PivotCalculations to the Control pivotChart.PivotCalculations.Add(new PivotComputationInfo { FieldName = "Quantity", Format = "#.#" }); parentGrid.Children.Insert(0, pivotChart1); taskCompletionSource.SetResult(true); busyIndicator.IsBusy = false; }); await taskCompletionSource.Task; }); }
/// <summary> /// Determines if we are running in an emulator. /// </summary> /// <returns></returns> public static bool IsEmulator() { #if DEBUG if (!DeviceFamily.Equals("Mobile", StringComparison.OrdinalIgnoreCase)) { return(false); } var package = Package.Current; return(package.Id.Architecture != Windows.System.ProcessorArchitecture.Arm); #else return(false); #endif }
public static void DisplayFamily(DeviceFamily family, bool forward, bool backward) { if (backward) { DisplayManufacture(family.Manufacture, false, true); } Logger.Instance.WriteInfo(" + {0} ({1})", family.Name, family.ShortName); if (forward) { foreach (Device device in family.Devices) { DisplayDevice(device, true, false); } } }
public DropDownDemo() { this.InitializeComponent(); this.Loaded += DropDownDemo_Loaded; if (DeviceFamily.GetDeviceFamily() == Devices.Mobile) { datedroptext.Visibility = Visibility.Collapsed; sliderdroptext.Visibility = Visibility.Collapsed; datedrop.Visibility = Visibility.Collapsed; sliderdrop.Visibility = Visibility.Collapsed; colorDropdown.FontSize = 12; calculateDropdown.Visibility = Visibility.Collapsed; calculateText.Visibility = Visibility.Collapsed; } }
private static void ParseSpeedDetails(DeviceFamily family, DevicePart part, string speedDetails) { if (!string.IsNullOrEmpty(speedDetails)) { string[] splitUpSpeeds = speedDetails.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); foreach (string speed in splitUpSpeeds) { // Shouldn't start with "(" if (!speed.StartsWith("(")) { DeviceSpeed familySpeed = family.CreateSpeed(speed); DevicePartSpeed partSpeed = part.CreateSpeed(familySpeed); } } } }
public static FeatureSet Get(DeviceFamily deviceFamily, int buildNumber) { if (buildNumber == int.MaxValue) { return(GetExperimental()); } FeatureSet answer = new FeatureSet(); var type = answer.GetType(); var properties = type.GetRuntimeProperties(); // Look through all boolean properties foreach (var p in properties.Where(i => i.PropertyType == typeof(bool))) { var supportedIn = p.GetCustomAttributes <SupportedInAttribute>().Where(i => i.GetType() == typeof(SupportedInAttribute)).FirstOrDefault(); // If we're in a build where that exists if (supportedIn != null && buildNumber >= supportedIn.MinVersion.Build) { p.SetValue(answer, true); } // If it's device-family specific switch (deviceFamily) { case DeviceFamily.Mobile: var mobileSupportedIn = p.GetCustomAttribute <MobileSupportedInAttribute>(); if (mobileSupportedIn != null && buildNumber >= mobileSupportedIn.MinVersion.Build) { p.SetValue(answer, true); } break; case DeviceFamily.Desktop: var desktopSupportedIn = p.GetCustomAttribute <DesktopSupportedInAttribute>(); if (desktopSupportedIn != null && buildNumber >= desktopSupportedIn.MinVersion.Build) { p.SetValue(answer, true); } break; } } return(answer); }
public void CollectSampleView() { #if STORE_SAMPLE SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(TreeMapWinRTSamples.FlatCollectionTreeMap).AssemblyQualifiedName, Product = "TreeMap", ProductIcons = "ms-appx:///Assets/Icons/TreeMap.png", Header = "FlatCollectionTreeMap", Tag = Tags.None, Category = "Data Visualization", HasOptions = false }); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(TreeMapWinRTSamples.HierarchicalCollectionTreeMap).AssemblyQualifiedName, Product = "TreeMap", ProductIcons = "ms-appx:///Assets/Icons/TreeMap.png", Header = "HierarchicalCollectionTreeMap", Tag = Tags.None, Category = "Data Visualization", HasOptions = false }); #else if (DeviceFamily.GetDeviceFamily() == Devices.Mobile) { SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(TreeMapWinRTSamples.FlatCollectionTreeMap).AssemblyQualifiedName, Product = "TreeMap", ProductIcons = "ms-appx:///Assets/Icons/TreeMap.png", Header = "FlatCollectionTreeMap", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); } else if (DeviceFamily.GetDeviceFamily() == Devices.Desktop) { SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(TreeMapWinRTSamples.FlatCollectionTreeMap).AssemblyQualifiedName, Product = "TreeMap", ProductIcons = "ms-appx:///Assets/Icons/TreeMap.png", Header = "FlatCollectionTreeMap", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(TreeMapWinRTSamples.HierarchicalCollectionTreeMap).AssemblyQualifiedName, Product = "TreeMap", ProductIcons = "ms-appx:///Assets/Icons/TreeMap.png", Header = "HierarchicalCollectionTreeMap", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); #if (!WINDOWS_STORE) SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(TreeMapWinRTSamples.TreeMapCustomization).AssemblyQualifiedName, Product = "TreeMap", ProductIcons = "ms-appx:///Assets/Icons/TreeMap.png", Header = "TreeMapCustomization", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); SampleHelper.SampleViews.Add(new SampleInfo() { SampleView = typeof(TreeMapWinRTSamples.TreeMapDrillDown).AssemblyQualifiedName, Product = "TreeMap", ProductIcons = "ms-appx:///Assets/Icons/TreeMap.png", Header = "TreeMapDrillDown", Tag = Tags.None, Category = Categories.DataVisualization, HasOptions = false }); #endif } #endif }
/// <summary> /// Initializes the new instance of <see cref="ConditionalFormat">ConditionalFormat.</see>/> /// </summary> public ConditionalFormat() { ApplicationLanguages.PrimaryLanguageOverride = "en-US"; InitializeComponent(); pivotGrid.ItemSource = vm.ProductSalesData; // Adding rows to SfPivotGrid pivotGrid.PivotRows.Add(new PivotItem() { FieldMappingName = "Product", TotalHeader = "Total" }); pivotGrid.PivotRows.Add(new PivotItem() { FieldMappingName = "Date", TotalHeader = "Total" }); // Adding columns to SfPivotGrid pivotGrid.PivotColumns.Add(new PivotItem() { FieldMappingName = "Country", TotalHeader = "Total" }); pivotGrid.PivotColumns.Add(new PivotItem() { FieldMappingName = "State", TotalHeader = "Total" }); // Adding calculations to SfPivotGrid pivotGrid.PivotCalculations.Add(new PivotComputationInfo() { FieldHeader = "Amount", FieldName = "Amount", Format = "C", SummaryType = SummaryType.DoubleTotalSum }); pivotGrid.PivotCalculations.Add(new PivotComputationInfo() { FieldHeader = "Quantity", FieldName = "Quantity", Format = "#.##", SummaryType = SummaryType.Count }); if (DeviceFamily.GetDeviceFamily() != Devices.Desktop) { ConditionalFormatEditorButton.Visibility = Visibility.Collapsed; } }
public static void CreateDefaultTasks(IWorkbook workbook, DeviceFamily deviceFamily) { var welcomeTask = new Task { Title = StringResources.BootstrapWelcomeTaskTitle, Added = DateTime.Now, Due = DateTime.Today, Note = StringResources.BootstrapWelcomeTaskNote, Priority = TaskPriority.High, Modified = DateTime.Now, Folder = workbook.Folders[0] }; if (deviceFamily == DeviceFamily.WindowsDesktop) { var dragTask = new Task { Title = StringResources.BootstrapDragTaskTitle, Added = DateTime.Now, Due = DateTime.Today.AddDays(1.0), Note = StringResources.BootstrapDragTaskNote, Priority = TaskPriority.Medium, Modified = DateTime.Now, Folder = workbook.Folders[0] }; } else if (deviceFamily == DeviceFamily.WindowsMobile) { var slideTask = new Task { Title = StringResources.BootstrapSlideTaskTitle, Added = DateTime.Now, Due = DateTime.Today.AddDays(1.0), Note = StringResources.BootstrapSlideTaskNote, Priority = TaskPriority.Medium, Modified = DateTime.Now, Folder = workbook.Folders[0] }; } }
public static bool IsType(DeviceFamily family) { return $"Windows.{family}" == AnalyticsInfo.VersionInfo.DeviceFamily; }