DragAndDrop core
This commit is contained in:
58
Lattice.IDE/Controls/EditorView.xaml
Normal file
58
Lattice.IDE/Controls/EditorView.xaml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<UserControl
|
||||
x:Class="Lattice.IDE.Controls.EditorView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Lattice.IDE.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid Background="{ThemeResource Lattice.Brush.Background.Secondary}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<!-- Полоса номеров строк -->
|
||||
<ColumnDefinition Width="*"/>
|
||||
<!-- Текст кода -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Левая панель с номерами строк -->
|
||||
<StackPanel Grid.Column="0" Background="{ThemeResource Lattice.Brush.Background.Primary}" Padding="10,5">
|
||||
<TextBlock Text="1" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
|
||||
<TextBlock Text="2" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
|
||||
<TextBlock Text="3" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
|
||||
<TextBlock Text="4" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
|
||||
<TextBlock Text="5" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
|
||||
<TextBlock Text="6" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Основная область редактирования -->
|
||||
<TextBox Grid.Column="1"
|
||||
AcceptsReturn="True"
|
||||
IsSpellCheckEnabled="False"
|
||||
TextWrapping="NoWrap"
|
||||
FontFamily="Cascadia Code, Consolas"
|
||||
FontSize="14"
|
||||
BorderThickness="0"
|
||||
Padding="10"
|
||||
Background="Transparent"
|
||||
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
xml:space="preserve">
|
||||
<TextBox.Text>using System;
|
||||
using Lattice.Core;
|
||||
|
||||
namespace Lattice.IDE.Demo;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public void Main()
|
||||
{
|
||||
Console.WriteLine("Hello, Lattice 2026!");
|
||||
}
|
||||
}
|
||||
</TextBox.Text>
|
||||
</TextBox>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
Lattice.IDE/Controls/EditorView.xaml.cs
Normal file
28
Lattice.IDE/Controls/EditorView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace Lattice.IDE.Controls
|
||||
{
|
||||
public sealed partial class EditorView : UserControl
|
||||
{
|
||||
public EditorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Lattice.IDE/Controls/SolutionExplorerView.xaml
Normal file
40
Lattice.IDE/Controls/SolutionExplorerView.xaml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<UserControl
|
||||
x:Class="Lattice.IDE.Controls.SolutionExplorerView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Lattice.IDE.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid Background="{ThemeResource LayerFillColorDefaultBrush}" Padding="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="SOLUTION 'LATTICE' (2026)"
|
||||
FontSize="11"
|
||||
FontWeight="Bold"
|
||||
Opacity="0.6"/>
|
||||
|
||||
<TreeView Grid.Row="1" Margin="0,10,0,0">
|
||||
<TreeView.RootNodes>
|
||||
<TreeViewNode Content="Lattice.Core.Docking" IsExpanded="True">
|
||||
<TreeViewNode.Children>
|
||||
<TreeViewNode Content="Models" />
|
||||
<TreeViewNode Content="Engine" />
|
||||
</TreeViewNode.Children>
|
||||
</TreeViewNode>
|
||||
<TreeViewNode Content="Lattice.UI.Docking.WinUI" IsExpanded="True">
|
||||
<TreeViewNode.Children>
|
||||
<TreeViewNode Content="Controls" />
|
||||
<TreeViewNode Content="Themes" />
|
||||
</TreeViewNode.Children>
|
||||
</TreeViewNode>
|
||||
</TreeView.RootNodes>
|
||||
</TreeView>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
Lattice.IDE/Controls/SolutionExplorerView.xaml.cs
Normal file
28
Lattice.IDE/Controls/SolutionExplorerView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
using Microsoft.UI.Xaml.Input;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace Lattice.IDE.Controls
|
||||
{
|
||||
public sealed partial class SolutionExplorerView : UserControl
|
||||
{
|
||||
public SolutionExplorerView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user