KNGCoder / ThisIsEatApp-Task1

0 stars 0 forks source link

что мы теперь делаем? #1

Open KNGCoder opened 11 months ago

KNGCoder commented 11 months ago

пишите новые номера задач . начали с 13 номера

yoGurtwithThoughts commented 11 months ago

Следущая задача с графикой. Гуглим

KNGCoder commented 11 months ago

14 вопрос с 3D графикой https://www.codeproject.com/Tips/882885/Display-D-Model-using-Window-Presentation-Foundat

KNGCoder commented 11 months ago

22 и 28 вопрос получение данных с микрофона https://www.codeproject.com/Articles/19854/Sending-and-playing-microphone-audio-over-network

KNGCoder commented 11 months ago

28 вопрос получение данных с камеры https://github.com/castorix/WinUI3_DirectShow_Capture

KNGCoder commented 11 months ago

13 вопрос сериализация https://learn.microsoft.com/ru-ru/dotnet/standard/serialization/system-text-json/how-to

yoGurtwithThoughts commented 11 months ago

<Window x:Class="WpfApp1.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:local="clr-namespace:WpfApp1" xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800">

Item 1 Item 2 Item 3 Item 4 Item 5 Item 6

yoGurtwithThoughts commented 11 months ago

<Window x:Class="WpfApp1.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:local="clr-namespace:WpfApp1" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800">

yoGurtwithThoughts commented 11 months ago

public partial class MainWindow : Window { private ListBoxItem dragSource;

public MainWindow()
{
    InitializeComponent();
}

private void ListBox_PreviewMouseMove(object sender, MouseEventArgs e)
{
    if (e.LeftButton == MouseButtonState.Pressed && sender is ListBox listBox)
    {
        var point = e.GetPosition(listBox);
        var hitResult = VisualTreeHelper.HitTest(listBox, point);

        if (hitResult != null)
        {
            dragSource = hitResult.VisualHit as ListBoxItem;
        }
    }
}

private void ListBox_Drop(object sender, DragEventArgs e)
{
    if (sender is ListBox listBox && dragSource != null)
    {
        var point = e.GetPosition(listBox);
        var hitResult = VisualTreeHelper.HitTest(listBox, point);

        if (hitResult != null && hitResult.VisualHit is ListBoxItem target)
        {
            var sourceIndex = listBox.Items.IndexOf(dragSource.Content);
            var targetIndex = listBox.Items.IndexOf(target.Content);

            listBox.Items.Remove(dragSource.Content);
            listBox.Items.Insert(targetIndex, dragSource.Content);
        }
    }
}

}

yoGurtwithThoughts commented 11 months ago

<Window x:Class="WpfApp1.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:local="clr-namespace:WpfApp1" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800">

yoGurtwithThoughts commented 11 months ago

public partial class MainWindow : Window { private ListBoxItem dragSource;

public MainWindow()
{
    InitializeComponent();
}

private void ListBox_PreviewMouseMove(object sender, MouseEventArgs e)
{
    if (e.LeftButton == MouseButtonState.Pressed && sender is ListBox listBox)
    {
        var point = e.GetPosition(listBox);
        var hitResult = VisualTreeHelper.HitTest(listBox, point);

        if (hitResult != null)
        {
            dragSource = hitResult.VisualHit as ListBoxItem;
        }
    }
}

private void ListBox_Drop(object sender, DragEventArgs e)
{
    if (sender is ListBox listBox && dragSource != null)
    {
        var point = e.GetPosition(listBox);
        var hitResult = VisualTreeHelper.HitTest(listBox, point);

        if (hitResult != null && hitResult.VisualHit is ListBoxItem target)
        {
            var sourceIndex = listBox.Items.IndexOf(dragSource.Content);
            var targetIndex = listBox.Items.IndexOf(target.Content);

            listBox.Items.Remove(dragSource.Content);
            listBox.Items.Insert(targetIndex, dragSource.Content);
        }
    }
}

}

yoGurtwithThoughts commented 11 months ago

<Window x:Class="WpfApp1.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:local="clr-namespace:WpfApp1" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800">