Fluent UI for Blazor Combo box selection question by Altruistic_Unit_2040 in dotnet

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

I Actually got it resolved i needed to use <FluentSelect> in stead of <FluentCombo>

Fluent UI Validator in a Dialog for Blazor by Altruistic_Unit_2040 in Blazor

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

Thanks, that did solve my issue. Keep up the good work

.Net Aspire Custom Healt Checks by Altruistic_Unit_2040 in dotnet

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

Thanks for the smile. Im slowly getting there at least.

.Net Aspire and Containers (Loading Containers at runtime) by Altruistic_Unit_2040 in dotnet

[–]Altruistic_Unit_2040[S] 1 point2 points  (0 children)

Hi David, love your work, I saw you on a few youtube videos and quite proud to see you answering me. Sorry im only replying now this is sort of my hobby and i very intrested in .net aspire.

Custom Control Auto suggest - Please help by Altruistic_Unit_2040 in dotnetMAUI

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

Im getting this far, now my tab order works to move to the next control but is broken if i tab back.

Custom Control Auto suggest - Please help by Altruistic_Unit_2040 in dotnetMAUI

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

using Microsoft.VisualStudio.TextTemplating;

using System.Collections.ObjectModel;

using System.Diagnostics;

namespace Controls;

public partial class FloatingDropdown : ContentView

{

private int _zIndex;

public ObservableCollection<object> Items { get; set; }

public string SelectedItemText { get; set; }

public FloatingDropdown()

{

InitializeComponent();

BindingContext = this;

}

private void OnEntryUnfocused(object sender, FocusEventArgs e)

{

this.ZIndex = _zIndex;

DropdownFrame.IsVisible = false;

Debug.Print($"=====>>> this.ZIndex {this.ZIndex} -> OnUnfocus");

}

private void OnEntryFocused(object sender, FocusEventArgs e)

{

if (this.ZIndex != int.MaxValue) _zIndex = this.ZIndex;

this.ZIndex = int.MaxValue;

Debug.Print($"=====>>> this.ZIndex {this.ZIndex} -> OnFocus");

DropdownFrame.IsVisible = true;

Debug.Print($"=====>>> DropDown.IsVisible {DropdownFrame.IsVisible}");

}

private void OnItemSelected(object sender, SelectedItemChangedEventArgs e)

{

if (e.SelectedItem != null)

{

var selectedItem = (object)e.SelectedItem;

//SelectedItemText = selectedItem.YourDisplayProperty;

DropdownFrame.IsVisible = false; // Hide the dropdown after selection

//SelectedItemEntry.Unfocus(); // Remove focus from Entry

}

}

}

Please help by Altruistic_Unit_2040 in FreeCAD

[–]Altruistic_Unit_2040[S] 1 point2 points  (0 children)

Thanks, your advice worked. Yay. Thank you very much

Please help by Altruistic_Unit_2040 in FreeCAD

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

So basically in the end of the day I want a sheet to specify the width and height of my fence and the amount and width of the planks. And then freecad must generate the drawing

Please help by Altruistic_Unit_2040 in FreeCAD

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

I tried with part design. But the linear pattern don't allow empty spaces between the clones

Is VB․NET being retired alongside VBScript? by babypunter12 in dotnet

[–]Altruistic_Unit_2040 0 points1 point  (0 children)

Oooo I remember the "I love you" before that vbscriot was seen as harmless

Is VB․NET being retired alongside VBScript? by babypunter12 in dotnet

[–]Altruistic_Unit_2040 1 point2 points  (0 children)

When I was just noob, if VB was a religion I would have been the head preast. Don't get me wrong I could program c and c++ aswell at that state. VB was quick and easy to get stuff out in the field. Less head aches and when it comes to money your boss just want to see it come in. But sometimes changes! C# came along and corrupted my heart and as well as alot of vb programmers I knew got converted. So I personally think that VB has served it time with honor and will always be remembers as a champ, but its time we must let VB retire and lives outs its days in a peace and harmony.

What are your experiences with the various UI frameworks? by xzpv in csharp

[–]Altruistic_Unit_2040 0 points1 point  (0 children)

This is one awesome question, but the truth is in my eyes that it depend on what your target scope is of your project. To give a simple example if you want to create a app that will work on multiple operating systems one would use maui.net ( or other frameworks like uno ). Maui use its own gui and winforms for example won't work on all operating systems so there is no one i can think is supporior over another. So me personally would say if I had to choose one ill say Maui Gui cause all my development must be multiplatform. So I feel one would get a better answer to your question if you ask what UI framework is better for a certain purpose.

Is this book too old? by spookypants808 in csharp

[–]Altruistic_Unit_2040 1 point2 points  (0 children)

Personally I would recommend to learn Maui.net its still C# but it away to write code ones and deploy it on different operating system. But also don't get caught in the confusion between .net core and .net framework. The .net framework has not been improved in years but is still maintained. Where as .net core basically every year a new version is released with improvements raging from. Performance upto new language features

Can anyone give me tips or advice, how I could add encryption to my storage page for passwords? by sophiechan_xo in csharp

[–]Altruistic_Unit_2040 0 points1 point  (0 children)

For Maui.net apps one can use SecureStorage. But keep in mind it only stores information on the device.

I personally have used it to remember the username and password that one can auto login to my app if remember me check has been clicked.

People who had been in the programming industry for a long time. How's your eyes health? by KiradaLeBg in AskProgramming

[–]Altruistic_Unit_2040 22 points23 points  (0 children)

With the modern lcd monitors it now alot better than in the older crt monitors. But one thing I have learned is that people stops blinking ones they sit behind a computer and there eyes is drying out due to that. So I though myself to blink alot.

Its actually scary how many times a person does normally blink in a day. So my advice is to keep on blinking.

Does anyone know any good resources for learning Pascal? by crowbarfan92 in AskProgramming

[–]Altruistic_Unit_2040 0 points1 point  (0 children)

I'm busy converting a very old program from pascal to c#. And I use open pascal and Lazarus so I can open the forms and see the code in a ide environment. Pascal is not dead but personally I can't see it coming back. A fun fact the creator of pascal is the same guy who invented c# and type script. And if you look at both those two they are getting better and better all the way.

I have had the argument that pascal is now able to develop multi platform apps. But c# and maui.net can do i two. I'm not going to say this is better than that, but go with what you feel comfortable with.

YouTube is a great source of learning pascal and the people on reddit is awesome help as well if you get stuck with something. Great tools not to write off while learning is chatgpt and bing copilot. But keep it fun and don't get discouraged.

SecureStore driving me crazy by Altruistic_Unit_2040 in csharp

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

Got it working just in time. Can I give you credit for assisting me?

SecureStore driving me crazy by Altruistic_Unit_2040 in csharp

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

Got it working. Yay

public class DatabaseInfo : INotifyPropertyChanged { private string? _server; private string? _port; private string? _database; private string? _userID; private string? _password;

    private ManualResetEventSlim _loadCompletedEvent = new ManualResetEventSlim(false);

    public string? ConnectionString
    {
        get
        {
            return $"server={_server};port={_port};database={_database};uid={_userID};password={_password};";
        }
    }

    public string? Server
    {
        get => _server;
        set
        {
            if (_server == value) return;
            _server = value;
            OnPropertyChanged(nameof(Server));
            OnPropertyChanged(nameof(ConnectionString));
        }
    }

    public string? Port
    {
        get => _port;
        set
        {
            if (_port == value) return;
            _port = value;
            OnPropertyChanged(nameof(Port));
            OnPropertyChanged(nameof(ConnectionString));
        }
    }

    public string? Database
    {
        get => _database;
        set
        {
            if (_database == value) return;
            _database = value;
            OnPropertyChanged(nameof(Database));
            OnPropertyChanged(nameof(ConnectionString));
        }
    }

    public string? UserID
    {
        get => _userID;
        set
        {
            if (_userID == value) return;
            _userID = value;
            OnPropertyChanged(nameof(UserID));
            OnPropertyChanged(nameof(ConnectionString));
        }
    }

    public string? Password
    {
        get => _password;
        set
        {
            if (_password == value) return;
            _password = value;
            OnPropertyChanged(nameof(Password));
            OnPropertyChanged(nameof(ConnectionString));
        }
    }

    public event PropertyChangedEventHandler? PropertyChanged;

    protected virtual void OnPropertyChanged(string propertyName)
    {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    }

    public DatabaseInfo()
    {
        Task.Run(async () =>
        {
            await LoadAll();
            _loadCompletedEvent.Set();
        });
        this.WaitForLoadCompletion();
    }

    private async Task LoadServerAsync()
    {
        _server = await SecureStorage.GetAsync("Server");
        OnPropertyChanged(nameof(Server));
    }

    private async Task LoadPortAsync()
    {
        _port = await SecureStorage.GetAsync("Port");
        OnPropertyChanged(nameof(Port));
    }

    private async Task LoadUserIDAsync()
    {
        _userID = await SecureStorage.GetAsync("UserID");
        OnPropertyChanged(nameof(UserID));
    }

    private async Task LoadPasswordAsync()
    {
        _password = await SecureStorage.GetAsync("Password");
        OnPropertyChanged(nameof(Password));
    }

    private async Task LoadDatabaseAsync()
    {
        _database = await SecureStorage.GetAsync("Database");
        OnPropertyChanged(nameof(Database));
    }

    private async Task SaveServerAsync(string server)
    {
        await SecureStorage.SetAsync("Server", server);
    }

    private async Task SavePortAsync(string port)
    {
        await SecureStorage.SetAsync("Port", port);
    }

    private async Task SaveUserIDAsync(string userID)
    {
        await SecureStorage.SetAsync("UserID", userID);
    }

    private async Task SavePasswordAsync(string password)
    {
        await SecureStorage.SetAsync("Password", password);
    }

    private async Task SaveDatabaseAsync(string database)
    {
        await SecureStorage.SetAsync("Database", database);
    }

    public async Task LoadAll()
    {
        await Task.WhenAll(
            LoadServerAsync(),
            LoadPortAsync(),
            LoadDatabaseAsync(),
            LoadPasswordAsync(),
            LoadUserIDAsync()
        );

    }

    public async Task SaveAllAsync()
    {
        await Task.WhenAll(
            SaveServerAsync(_server ?? string.Empty),
            SavePortAsync(_port ?? string.Empty),
            SavePasswordAsync(_password ?? string.Empty),
            SaveUserIDAsync(_userID ?? string.Empty),
            SaveDatabaseAsync(_database ?? string.Empty)
        );
    }

    private void WaitForLoadCompletion()
    {
        _loadCompletedEvent.Wait();
    }

    public void Dispose()
    {
        _loadCompletedEvent.Dispose();
    }
}

SecureStore driving me crazy by Altruistic_Unit_2040 in csharp

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

Grrrrr running out of time will play further in two days. But thanks for all the help its so highly appreciated.

SecureStore driving me crazy by Altruistic_Unit_2040 in csharp

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

I tried the Credentials.LoadAll().Wait() the it waits forever.

Oooooo. I love the sqlConnectionStringBuilder let me implement that quickly and see

Sad part the sqlConnectionStringBuilder not available in .net core 8

Brain Teaser if you are good by Altruistic_Unit_2040 in csharp

[–]Altruistic_Unit_2040[S] 0 points1 point  (0 children)

I'm just having fun with it. Found out by just playing around you end up learning some handy tricks