Mekasu0124
Mekasu0124
Explore posts from servers
CC#
Created by Mekasu0124 on 5/30/2024 in #help
Accessing Function from Nested UI File - Avalonia
ah. thank you!
17 replies
CC#
Created by Mekasu0124 on 5/30/2024 in #help
Accessing Function from Nested UI File - Avalonia
ok so if I don't need a console project for let's say my Infrastructure project which is what handles all database executions and such, how and what would I make instead?
17 replies
CC#
Created by Mekasu0124 on 5/30/2024 in #help
Accessing Function from Nested UI File - Avalonia
I'm not sure if I set them up right. I right clicked the top TeachersAide and clicked New Project > Console > named it and created it
17 replies
CC#
Created by Mekasu0124 on 5/30/2024 in #help
Accessing Function from Nested UI File - Avalonia
with this part being mentioned of creating a messaging project, with having multiple projects in my src/ folder, when I go to package my project down to a .exe, how do I get the thing to recognize that package I want the .exe to always launch from? Example: If I have a Diary.Desktop, Diary.Infrastructure, and Diary.Common. When I package the project down to an executable, how do I get the .exe to know that Diary.Desktop is the source to launch from each time and not Common or Infrastructure?
17 replies
CC#
Created by Mekasu0124 on 5/30/2024 in #help
Accessing Function from Nested UI File - Avalonia
No description
17 replies
CC#
Created by Mekasu0124 on 5/30/2024 in #help
Accessing Function from Nested UI File - Avalonia
ohhhh like I did here
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;

namespace Diary.ViewModels;

public partial class MainViewModel : ViewModelBase
{
[ObservableProperty] private string? _loggedInUserName;

public MainViewModel()
{
Messenger.Register<UserLoggedInMessage>(this, UserLoggedIn);
}

[RelayCommand] public async Task Logout()
{
await Task.Delay(50);
Messenger.Send(new UserLoggedOutMessage());
}

private void UserLoggedIn(object recipient, UserLoggedInMessage message)
{
LoggedInUserName = message.user.Username;
}
}
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;

namespace Diary.ViewModels;

public partial class MainViewModel : ViewModelBase
{
[ObservableProperty] private string? _loggedInUserName;

public MainViewModel()
{
Messenger.Register<UserLoggedInMessage>(this, UserLoggedIn);
}

[RelayCommand] public async Task Logout()
{
await Task.Delay(50);
Messenger.Send(new UserLoggedOutMessage());
}

private void UserLoggedIn(object recipient, UserLoggedInMessage message)
{
LoggedInUserName = message.user.Username;
}
}
17 replies
CC#
Created by Mekasu0124 on 5/30/2024 in #help
Accessing Function from Nested UI File - Avalonia
that didn't work, but basically I've got this menu bar
<DockPanel Grid.Row="0">
<uc:FileMenu />
<uc:EditMenu />
<uc:SettingsMenu />
<uc:HelpMenu />
</DockPanel>
<DockPanel Grid.Row="0">
<uc:FileMenu />
<uc:EditMenu />
<uc:SettingsMenu />
<uc:HelpMenu />
</DockPanel>
in my MainWindowView.axaml file which is a Window not a UserControl. I then have in my views folder a MenuBar folder that holds each menu bar item as a UserControl. In the /Views/MenuBar/FileMenu.axaml file I'm trying to bind the Exit menu item to the Exit function in the /ViewModels/MainWindowViewModel.cs file or put the exit command where it should go for a bound command to a menu bar item like I've used it......
17 replies
CC#
Created by Mekasu0124 on 5/30/2024 in #help
Accessing Function from Nested UI File - Avalonia
this is it
<Button Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Command="{Binding $parent[Window].DataContext.AddItem}"
Content="New Item"/>
<Button Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Command="{Binding $parent[Window].DataContext.AddItem}"
Content="New Item"/>
I'm going to try that
17 replies
CC#
Created by Mekasu0124 on 5/20/2024 in #help
✅ How to use a UserControl inside of a Window?
i'll be back later. I have to go to work. Thanks for your help so far
12 replies
CC#
Created by Mekasu0124 on 5/20/2024 in #help
✅ How to use a UserControl inside of a Window?
becuase of how they're presenting themselves using the uc: or the cc:, its causing them to not have enough room on the menu bar, but if I put all of them back inside of the parent <Menu></Menu> then they'll go back to looking normal. I guess I could just bind the menu to a list in the view model for the main window and have it display that way. idk
12 replies
CC#
Created by Mekasu0124 on 5/20/2024 in #help
✅ How to use a UserControl inside of a Window?
ok I got it working both ways like this using both cc and uc but now I have the issue of instead of it looking like a regeular menu bar, there's an arrow and the dropdown pops out to the side instead of down like normal
12 replies
CC#
Created by Mekasu0124 on 5/20/2024 in #help
✅ How to use a UserControl inside of a Window?
I screwed up the project. hold on. I'll brb
12 replies
CC#
Created by Mekasu0124 on 5/20/2024 in #help
✅ How to use a UserControl inside of a Window?
so I can remove the xmlns:un line and replace the other with what you just put?
12 replies
CC#
Created by Mekasu0124 on 4/23/2024 in #help
✅ How to work with Python A.I.'s
I'm just doing research on it for now, however, my end goal is to have a small image of my favorite seven deadly sins character be in the corner of the desktop app, and when they speak, it'll speak their responses outloud, and write them into a chat box icon
38 replies
CC#
Created by Mekasu0124 on 4/23/2024 in #help
✅ How to work with Python A.I.'s
38 replies
CC#
Created by Mekasu0124 on 4/23/2024 in #help
✅ How to work with Python A.I.'s
I got you. On a separate note of the assistant that I'm building, I want it to be able to speak it's responses to me like alexa does. I know how to make python speak using pyttsx3, however, I've never done that in C#. Is it possible?
38 replies
CC#
Created by Mekasu0124 on 4/23/2024 in #help
✅ How to work with Python A.I.'s
ok so I know nothing about templates. Templates aren't a bad idea, however, I'm making the program more personal as it's just being built for me. I did try and go the node.js route with doing it so that I could just run npm create_project in the terminal, however, I wasn't as successful at it as I thought I would be lol
38 replies
CC#
Created by Mekasu0124 on 4/23/2024 in #help
✅ How to work with Python A.I.'s
thanks for the help though you guys!
38 replies
CC#
Created by Mekasu0124 on 4/23/2024 in #help
✅ How to work with Python A.I.'s
so basically it'll just be a private piece of software that I made that will have buttons and inputs that I'll nagivate to create the project I'm wanting instead of having to do all of the manual stuff
38 replies
CC#
Created by Mekasu0124 on 4/23/2024 in #help
✅ How to work with Python A.I.'s
ok so after a lengthy conversation with my friend last night, I used the wrong term. apologies. I'm techincally just creating a bunch of functions that make the different types of projects that I create and work with on my personal computer, so, not an a.i., but a small assistant program, and I've negated the use case for it on mobile so it's just going to be a desktop app
38 replies