Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sifi mohamed amine

@sifi mohamed amine
About
Posts
9
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Creating multilanguage WPF MVVM application
    S sifi mohamed amine

    Hi , I am currently developing an application but I need to have to switch between two languages , but I can't do it . In fact , I created two Resources files for both languages and I set them to public and then then I put the propertie to Static as mentioned in many tutorials . Thank you so much for your help. My code written : App.xaml.cs

    public App()
    {

            if (Presentation.ViewModels.LoginWindow.LanguageSelect != null)
            {
                if (Presentation.ViewModels.LoginWindow.LanguageSelect.Equals("Italian"))
                {
                    System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("it-IT");
                }
                else
                {
                    System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");
                }
            }
            else
            {
                Console.WriteLine("Verify the choosig langa=uage!");
            }
        }
    

    ViewModel:

    private string selectedLanguage;
    public static string LanguageSelect;
    public string SelectedLanguage
    {
    get
    {
    return selectedLanguage;
    }
    set
    {
    selectedLanguage = value;
    RaisePropertyChanged("SelectedLanguage");
    LanguageSelect = selectedLanguage.ToString();

            }
        }
    

    And I the view.xaml

    WPF wpf csharp architecture help

  • Can't start Windows Service
    S sifi mohamed amine

    Thanks for your response , I solved the problem by allowing sole security features.

    .NET (Core and Framework) help

  • Devoloping a Calc spreadsheet program using C#
    S sifi mohamed amine

    Hi , I looked back and forth for a free Library or Framework that allows me developing a program that generates a .ods spreadsheet file. I used the AODL Library but there is a problem in precising the cells , it not organized at all . I looked for Apache OpenOffice SDK , when I tried to run an example there was an error of architecture x86 compatibility and requires OpenOffice SDK 3.0 or in my project I'm working with .NET Framework 4.5 . If there is a solution , I will be so thankful Thank you in advance Cheers,

    .NET (Core and Framework) csharp help apache dotnet architecture

  • Can't start Windows Service
    S sifi mohamed amine

    Hi , The problem is that the project worked fine in Windows 7 but switching to Windows 8 make this problem

    .NET (Core and Framework) help

  • Can't start Windows Service
    S sifi mohamed amine

    Hi all , I am currently using Windows 8 as Operating System. I created a Windows Service and then when I tried to start it , it pops up a message : Error 5 Access Denied : Windows can't start the service . 'Excuse me if the traduction of the error message isn't correct' Thank you in advance for your help. Cheers

    .NET (Core and Framework) help

  • Change application language at Runtime
    S sifi mohamed amine

    Hi , I am new in coding WPF MVVM apps. My question is how to change le language using a combobox at Runtime. I tried the static resources and it worked well , but trying to change it Runtime using Threading.thread class didn't work. Is there any possibility to solve that problem. Thanks a lot for your help.

    WPF wpf help csharp architecture tutorial

  • Localization in WPF MVVM
    S sifi mohamed amine

    Hi , I need to change culture mainly between two languages ; italian and English using the Combobox in WPF MVVM. I tried to databind the ViewModel with my Mainview but I didn't succeed. I will be so thankful if someone could help. Here is my Combobox declaration in xaml :

    <ComboBox IsEditable="True" Text="Language" HorizontalAlignment="Right" VerticalAlignment="Top" Width="95" Margin="34,21,34,0" ItemsSource="{Binding Languages}" SelectedItem="{Binding SelectedLanguage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#FF434C64" removed="Green" Height="24.96" />

    Here is View Model definition :

    public void ChangeLanguage()
    {
    if (SelectedLanguage == "en")
    {
    Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en");

             }
             else
             if (SelectedLanguage == "it-IT")
             {
                 Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("it-IT");
             }
    
         }
    

    Here the declaration within the construcor of my View Model

    public ViewModel()
    {

            LoadData();
            ChangeLanguage();
    
            Login = new DelegateCommand(this.Logging, delegate()
            {
                return (!String.IsNullOrEmpty(Username) && !String.IsNullOrEmpty(Password) && !String.IsNullOrEmpty(Email));
            });
            Register = new DelegateCommand(this.Registering, delegate()
            {
               
           return (!String.IsNullOrEmpty(Username) && !String.IsNullOrEmpty(Password) && !String.IsNullOrEmpty(Email));
           
    
    
        });
    
    WPF wpf csharp wcf architecture help

  • Localization in WPF MVVM
    S sifi mohamed amine

    Hi , I need to change culture mainly between two languages ; italian and English using the Combobox in WPF MVVM. I tried to databind the ViewModel with my Mainview but I didn't succeed. I will be so thankful if someone could help. Here is my Combobox declaration in xaml :

    <ComboBox IsEditable="True" Text="Language" HorizontalAlignment="Right" VerticalAlignment="Top" Width="95" Margin="34,21,34,0" ItemsSource="{Binding Languages}" SelectedItem="{Binding SelectedLanguage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#FF434C64" removed="Green" Height="24.96" />

    Here is View Model definition :

    public void ChangeLanguage()
    {
    if (SelectedLanguage == "en")
    {
    Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en");

             }
             else
             if (SelectedLanguage == "it-IT")
             {
                 Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("it-IT");
             }
    
         }
    

    Here the declaration within the construcor of my View Model

    public ViewModel()
    {

            LoadData();
            ChangeLanguage();
    
            Login = new DelegateCommand(this.Logging, delegate()
            {
                return (!String.IsNullOrEmpty(Username) && !String.IsNullOrEmpty(Password) && !String.IsNullOrEmpty(Email));
            });
            Register = new DelegateCommand(this.Registering, delegate()
            {
               
           return (!String.IsNullOrEmpty(Username) && !String.IsNullOrEmpty(Password) && !String.IsNullOrEmpty(Email));
           
    
    
        });
    
    C# wpf csharp wcf architecture help

  • Storing deserialized data into SQL Server Ce using Entity Framework code first
    S sifi mohamed amine

    I need to add deserialized data from xml file to the model in Entity Framework cod efirst in order to generate my database in SQL Server CE. The problem was that I have two tables , the first was done without problems but when I added the second model I got an exception : {"Exception has been thrown by the type initializer for 'DAL.MyModel.InformationContext."} I will be so thankful if someone could help me . Here my source code in the Program.cs:

    //Storing balance data into the database
    using (InformationContext db = new InformationContext())
    {
    db.Balances.Add(new Balance_Model()
    {
    EuroBookingBalance = Bal.ElementAt(0).EuroBookingBalance,
    Id = Bal.ElementAt(0).Id,
    ABI = Bal.ElementAt(0).Account.ABI,
    BBAN = Bal.ElementAt(0).Account.BBAN,
    CIN = Bal.ElementAt(0).Account.CIN,
    Currency = Bal.ElementAt(0).Account.Currency,
    Description = Bal.ElementAt(0).Account.Description,
    Number = Bal.ElementAt(0).Account.Number,
    AccountId = Bal.ElementAt(0).Account.Id,
    Date = Bal.ElementAt(0).Date.ToString(),
    AccountHolder = Bal.ElementAt(0).Account.AccountHolder,
    CAB = Bal.ElementAt(0).Account.CAB,
    CurrencyBookingBalance = Bal.ElementAt(0).CurrencyBookingBalance

                });
    
                db.Transactions.Add(new Transaction\_Model()
                {
                    ABI = tra.ElementAt(0).Account.ABI,
                    AccountDescription = tra.ElementAt(0).Account.Description.ToString(),
                    Amount = tra.ElementAt(0).Amount,
                    TransactionDate = tra.ElementAt(0).TransactionDate.ToString(),
                    AdditionalDescription = tra.ElementAt(0).AdditionalDescription,
                    AccountHolder = tra.ElementAt(0).Account.AccountHolder,
                    CAB = tra.ElementAt(0).Account.CAB,
                    Currency = tra.ElementAt(0).Currency,
                    Description = tra.ElementAt(0).Description,
                    Id = tra.ElementAt(0).Id,
                    Number = tra.ElementAt(0).Account.Number.ToString(),
                    ValueDate = tra.ElementAt(0).ValueDate.ToString(),
                    AbiReason = tra.ElementAt(0).AbiReason.ToString()
    
    C# database help sql-server sysadmin xml
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups