Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sofiya-kumar committed May 6, 2024
1 parent b835df9 commit 13925ea
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 48 deletions.
14 changes: 9 additions & 5 deletions DemoApp/DemoApp/ViewModels/TableViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using CommunityToolkit.Mvvm.ComponentModel;
using DemoApp.Constant;
using DemoApp.Helper;
using DemoApp.Models;
using Microsoft.Maui.Controls;
using Newtonsoft.Json;
using System.Collections.ObjectModel;

namespace DemoApp.ViewModels;
public partial class TableViewModel : ObservableObject
{
Random rnd = new Random();

[ObservableProperty]
private List<User> _users;
private ObservableCollection<User> _users;
[ObservableProperty]
private User _selectedItem;
[ObservableProperty]
Expand All @@ -27,8 +27,12 @@ partial void OnSelectionModeRadioOptionChanging(int value)

public TableViewModel()
{
Users = new List<User>();
LoadData();
InitialzeUsers();
}

private async void InitialzeUsers()
{
Users = await UserDataCreator.LoadData();
}

private async void LoadData()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@
<Modus:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Modus="clr-namespace:Trimble.Modus.Components"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
x:Class="Trimble.Modus.Components.DropDownContents"
BackgroundColor="{StaticResource Transparent}"
Title="DropDownPopupPage">
<Modus:PopupPage.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Modus:PopupPage.Resources>
<Border x:Name="border"
VerticalOptions="Start"
HorizontalOptions="Start"
Expand Down
8 changes: 0 additions & 8 deletions Trimble.Modus.Components/Controls/DropDown/TMDropDown.xaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
HorizontalOptions="Start"
VerticalOptions="Start"
xmlns:constants="clr-namespace:Trimble.Modus.Components.Constant"
x:Class="Trimble.Modus.Components.TMDropDown">
<ContentView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ContentView.Resources>
<Border
x:Name="innerBorder"
MinimumWidthRequest="150"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Trimble.Modus.Components.TMAccordion"
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
xmlns:constants="clr-namespace:Trimble.Modus.Components.Constant"
xmlns:local="clr-namespace:Trimble.Modus.Components.Controls.TMAccordion"
x:Name="accordionView">
<ContentView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
<local:TMAccordionStyle/>
</ResourceDictionary.MergedDictionaries>
<converters:ImageNullOrEmptyBoolConverter x:Key="ImageNullOrEmptyBoolConverter" />
Expand Down
2 changes: 0 additions & 2 deletions Trimble.Modus.Components/Controls/TMDataGrid/DataGrid.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Trimble.Modus.Components;assembly=Trimble.Modus.Components"
xmlns:style="clr-namespace:Trimble.Modus.Components.Controls.TMDataGrid;assembly=Trimble.Modus.Components"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
x:Class="Trimble.Modus.Components.DataGrid"
x:DataType="local:DataGrid"
CompressedLayout.IsHeadless="True">
<ContentView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
<style:DataGridStyle/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="DefaultHeaderStyle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters"
xmlns:local="clr-namespace:Trimble.Modus.Components;assembly=Trimble.Modus.Components"
x:Class="Trimble.Modus.Components.MultiLineInput"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
xmlns:controls="clr-namespace:Trimble.Modus.Components"
x:Name="multiLineInput">

<base:BaseInput.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="InputTemplateResourceDictionary.xaml" />
<local:TMInputStyles></local:TMInputStyles>
<color:Colors />
<local:TMInputStyles></local:TMInputStyles>
</ResourceDictionary.MergedDictionaries>
<converters:ImageNullOrEmptyBoolConverter x:Key="ImageNullOrEmptyBoolConverter" />
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:ClassModifier="internal"
x:Class="Trimble.Modus.Components.Modal.TMModalContents"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
xmlns:Modus="clr-namespace:Trimble.Modus.Components"
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters"
xmlns:constants="clr-namespace:Trimble.Modus.Components.Constant"
Expand All @@ -13,7 +12,6 @@
<ContentPage.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
<local:TMModalStyles/>
</ResourceDictionary.MergedDictionaries>
<converters:ImageNullOrEmptyBoolConverter x:Key="ImageNullOrEmptyBoolConverter" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@
x:Class="Trimble.Modus.Components.TMSegmentedControl"
xmlns:local="clr-namespace:Trimble.Modus.Components.Controls.Layouts"
xmlns:component="clr-namespace:Trimble.Modus.Components"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
xmlns:system="clr-namespace:System;assembly=netstandard"
x:Name="SegmentedControl">
<ContentView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ContentView.Resources>
<ContentView.Content>
<Border x:Name="FrameView"
Padding="-1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
x:Class="Trimble.Modus.Components.TMSegmentedItem"
xmlns:local="clr-namespace:Trimble.Modus.Components.Controls.TMSegmentedControl"
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
BackgroundColor="{StaticResource Transparent}"
StrokeThickness="0"
x:Name="ItemContainer"
Expand All @@ -15,7 +14,6 @@
<Border.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
<local:TMSegmentedItemStyles/>
</ResourceDictionary.MergedDictionaries>
<converters:ImageNullOrEmptyBoolConverter x:Key="ImageNullOrEmptyBoolConverter" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Trimble.Modus.Components.Controls.Slider.ToolTipAnchor"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles">
x:Class="Trimble.Modus.Components.Controls.Slider.ToolTipAnchor">
<Polygon Points="{OnIdiom '0 32,15 15,30 32',Phone='0,30 15,15 30,30'}"
Fill="{x:DynamicResource SliderTooltipColor}"
StrokeThickness="1"
Expand Down
4 changes: 1 addition & 3 deletions Trimble.Modus.Components/Controls/TMSwitch/TMSwitch.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:constants="clr-namespace:Trimble.Modus.Components.Constant"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
xmlns:constants="clr-namespace:Trimble.Modus.Components.Constant"
xmlns:local="clr-namespace:Trimble.Modus.Components"
HorizontalOptions="Start"
VerticalOptions="Center"
Expand All @@ -11,7 +10,6 @@
<ContentView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
<local:TMSwitchStyles/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Expand Down
4 changes: 1 addition & 3 deletions Trimble.Modus.Components/Controls/Toast/TMToastContents.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<Modus:PopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:color="clr-namespace:Trimble.Modus.Components.Styles"
xmlns:Modus="clr-namespace:Trimble.Modus.Components"
xmlns:local="clr-namespace:Trimble.Modus.Components;assembly=Trimble.Modus.Components"
x:Class=" Trimble.Modus.Components.Controls.Toast.TMToastContents"
Expand All @@ -12,8 +11,7 @@

<ContentPage.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<color:Colors />
<ResourceDictionary.MergedDictionaries>
<local:TMToastStyles></local:TMToastStyles>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Expand Down

0 comments on commit 13925ea

Please sign in to comment.