Skip to content

Commit

Permalink
Initial project version
Browse files Browse the repository at this point in the history
  • Loading branch information
DanBanDev committed Oct 30, 2023
0 parents commit 1eb5fed
Show file tree
Hide file tree
Showing 510 changed files with 7,222 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added .vs/TM Logfile Points/v17/.futdcache.v2
Binary file not shown.
Binary file added .vs/TM Logfile Points/v17/.suo
Binary file not shown.
9 changes: 9 additions & 0 deletions App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="TM_Logfile_Points.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TM_Logfile_Points"
StartupUri="/View/MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace TM_Logfile_Points
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
10 changes: 10 additions & 0 deletions AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
37 changes: 37 additions & 0 deletions Model/Points.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;


namespace TM_Logfile_Points.Model
{


partial class Model_Points:ObservableObject
{
public Model_Points()
{

}

public ObservableCollection<Point> Points { get; set; } = new ObservableCollection<Point>();

public class Point
{
public string PointID { get; set; } = String.Empty;
public string East { get; set; } = String.Empty ;
public string North { get; set; } = String.Empty;
public string Height { get; set; } = String.Empty;
public string Date { get; set; } = String.Empty;

}

public uint NumberPoints { get; set; } = 0;
public string JobDate { get; set; } = "";
public float[] StationStartPosition = new float[3]; //East North Height
}
}
30 changes: 30 additions & 0 deletions TM Logfile Points.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<RootNamespace>TM_Logfile_Points</RootNamespace>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>

<ItemGroup>
<None Remove="View\DragDrop3.png" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageReference Include="DotSpatial.Data" Version="4.0.656" />
<PackageReference Include="DotSpatial.Projections" Version="4.0.656" />
<PackageReference Include="GeoAPI.CoordinateSystems" Version="1.7.5" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
<PackageReference Include="ProjNet" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<Resource Include="View\DragDrop3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
</ItemGroup>

</Project>
14 changes: 14 additions & 0 deletions TM Logfile Points.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<ItemGroup>
<ApplicationDefinition Update="App.xaml">
<SubType>Designer</SubType>
</ApplicationDefinition>
</ItemGroup>
<ItemGroup>
<Page Update="View\MainWindow.xaml">
<SubType>Designer</SubType>
</Page>
</ItemGroup>
</Project>
25 changes: 25 additions & 0 deletions TM Logfile Points.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TM Logfile Points", "TM Logfile Points.csproj", "{66955CFF-5E8F-46D8-B7A8-F0DBB7BAA55C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{66955CFF-5E8F-46D8-B7A8-F0DBB7BAA55C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66955CFF-5E8F-46D8-B7A8-F0DBB7BAA55C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66955CFF-5E8F-46D8-B7A8-F0DBB7BAA55C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66955CFF-5E8F-46D8-B7A8-F0DBB7BAA55C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {02B1A6ED-2D7B-45CA-83C1-4ABACC4BC80E}
EndGlobalSection
EndGlobal
30 changes: 30 additions & 0 deletions ValueConverters/Visibility2BoolConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;

namespace TM_Logfile_Points.ValueConverters
{
internal class Visibility2BoolConverter: IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{

return (bool)value ? Visibility.Visible : Visibility.Hidden;

}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{

return (Visibility)value==Visibility.Visible ? true : false;

}

}
}
Binary file added View/DragDrop3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions View/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<Window x:Class="TM_Logfile_Points.View.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:beahv="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:TM_Logfile_Points.View"
xmlns:localVM="clr-namespace:TM_Logfile_Points.ViewModel"
xmlns:vc="clr-namespace:TM_Logfile_Points.ValueConverters"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="700" Loaded="Window_Loaded">

<Window.DataContext >
<localVM:MainViewModel/>
</Window.DataContext>

<Window.Resources>
<vc:Visibility2BoolConverter x:Key="Vis2Bool"/>
</Window.Resources>

<DockPanel>
<Button DockPanel.Dock="Bottom" Content="Export" Height="30" Command="{Binding exportCommand, Mode=OneWay}"></Button>
<DockPanel DockPanel.Dock="Top" Background="#FF212121" Height="60">
<StackPanel x:Name="Point_Numbers" DockPanel.Dock="left" Orientation="Vertical">
<Label Content="Number Points:" HorizontalAlignment="Center" Foreground="White" FontWeight="Bold" VerticalAlignment="Center"></Label>
<Label Content="{Binding ModelInstance.Points.Count}" Background="White" Width="50" Height="23" HorizontalAlignment="Center" VerticalAlignment="Center"></Label>
</StackPanel>

<StackPanel x:Name="JobName" DockPanel.Dock="left" Orientation="Vertical" Margin="50,-1,0,0">
<Label Foreground="White" Content="Job Name:" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" ></Label>
<Label Background="White" Width="100" Height="23" VerticalAlignment="Center" Content="{Binding JobName}"></Label>
</StackPanel>

<StackPanel x:Name="Job_Date" DockPanel.Dock="left" Orientation="Vertical" Margin="70,-1,0,0">
<Label Foreground="White" Content="Job Date:" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" ></Label>
<Label Background="White" Width="100" Height="23" VerticalAlignment="Center" Content="{Binding JobStartDate}"></Label>
</StackPanel>

<StackPanel x:Name="Station_Position" DockPanel.Dock="left" Orientation="Vertical" Margin="100,4,0,0" HorizontalAlignment="Left">
<Label Content="Station Start Position:" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"></Label>
<TextBlock Text="{Binding JobStartPositionEastNorth}" ToolTip="Open Browser with Google Maps Position" TextDecorations="Underline" VerticalAlignment="Center" Foreground="#FF1766E8" FontWeight="Bold" FontSize="11" HorizontalAlignment="Center"></TextBlock>
</StackPanel>

</DockPanel>

<Grid DockPanel.Dock="Top" AllowDrop="True">

<beahv:Interaction.Triggers>
<beahv:EventTrigger EventName="Drop">
<beahv:InvokeCommandAction Command="{Binding DropFileCommand, Mode=OneWay}" PassEventArgsToCommand="True"/>
</beahv:EventTrigger>
</beahv:Interaction.Triggers>




<ListView x:Name="MainListView" ItemsSource="{Binding ModelInstance.Points}">
<ListView.View>
<GridView>
<GridViewColumn Header="PointID" DisplayMemberBinding="{Binding PointID}" Width="120" TextElement.FontWeight="Bold"/>
<GridViewColumn Header="East" DisplayMemberBinding="{Binding East}" Width="120" TextElement.FontWeight="Bold"/>
<GridViewColumn Header="North" DisplayMemberBinding="{Binding North}" Width="120" TextElement.FontWeight="Bold"/>
<GridViewColumn Header="Height" DisplayMemberBinding="{Binding Height}" Width="120" TextElement.FontWeight="Bold"/>
<GridViewColumn Header="Date" DisplayMemberBinding="{Binding Date}" Width="200" TextElement.FontWeight="Bold"/>
</GridView>
</ListView.View>
</ListView>

<Border Background="#FF9A9292" Visibility="{Binding ImageVisibility, Converter={StaticResource Vis2Bool}}">
<Image Source="/View/DragDrop3.png" Margin="0,90,0,90" MaxWidth="200" MaxHeight="200"/>
</Border>

</Grid>



</DockPanel>
</Window>
41 changes: 41 additions & 0 deletions View/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TM_Logfile_Points.ViewModel;

namespace TM_Logfile_Points.View
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}

private void Window_Loaded(object sender, RoutedEventArgs e)
{
var vm = (MainViewModel)DataContext;

vm.OpenMessageBox = (message) =>
{
return MessageBox.Show(message);
};
}


}
}
Loading

0 comments on commit 1eb5fed

Please sign in to comment.