Example #1
0
        private void bDbConnect_Click(object sender, RoutedEventArgs e)
        {
            Configs.EditConfigData("dbHost", DFhost.Text);
            Configs.EditConfigData("dbName", DFname.Text);
            Configs.EditConfigData("dbUser", DFuser.Text);
            Configs.EditConfigData("dbPassword", DFpass.Text);

            if (connectDb())
            {
                loadTab((mainTC.SelectedItem as TabItem).Name);
                bSettingsClose.IsEnabled = true;
            }
            else
            {
                bSettingsClose.IsEnabled = false;
            }
        }
Example #2
0
 /// <summary>
 /// show/hide main menu
 /// </summary>
 /// <param name="p"></param>
 private void setMenu(bool p = true)
 {
     if (p)
     {
         MainMenu.Visibility = Visibility.Visible;
         MainGrid.Margin     = new Thickness(0, 20, 0, 20);
         SettingPanel.Margin = new Thickness(0, 20, 0, 20);
         Configs.EditConfigData("mainMenu", "1");
     }
     else
     {
         MainMenu.Visibility = Visibility.Hidden;
         MainGrid.Margin     = new Thickness(0, 0, 0, 20);
         SettingPanel.Margin = new Thickness(0, 0, 0, 20);
         Configs.EditConfigData("mainMenu", "0");
     }
 }
Example #3
0
 private void ComboBoxLang_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (cbLang.SelectedItem != null)
     {
         if (((Lang)cbLang.SelectedItem).Code == "fr-FR")
         {
             Configs.SetLanguageDictionary("fr-FR");
             Configs.EditConfigData("lang", "fr-FR");
         }
         else
         {
             Configs.SetLanguageDictionary("en-US");
             Configs.EditConfigData("lang", "en-US");
         }
         dgProducts.UpdateLayout();
         dgAddresses.UpdateLayout();
         dgClients.UpdateLayout();
         dgOrder.UpdateLayout();
         dgOrderContent.UpdateLayout();
     }
 }
Example #4
0
 private void ATButton_Click(object sender, RoutedEventArgs e)
 {
     Configs.EditConfigData("accessToken", accessToken.Text);
 }
Example #5
0
 private void imgSrvUrlButton_Click(object sender, RoutedEventArgs e)
 {
     Configs.EditConfigData("imgSrvUrl", imgSrvUrl.Text);
 }