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
L

LAPEC

@LAPEC
About
Posts
97
Topics
28
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to call from Nested UserControl another UserControl
    L LAPEC

    Hello Everyone I'm struggling to solve the problem with my nested UserControl. When I run the application the main window opens, inside the main window is a button, when I click that button it calls up a UserControl (called Applic). Inside the Applic UserControl is another nested UserControl called PasswordScreen. Within the PasswordScreen there is a button called Login, when I press this button to call another UserControl (called SwitchboardView) it is not firing nothing (here is the sample code)

    private void btnLogin_Click(object sender, RoutedEventArgs e)
    {
    Applic ap = new Applic();
    SwitchboardView sbv = new SwitchboardView();

            ap.MainGridApplic.Children.Add(sbv);
    
        }
    

    Could someone please help me solve this problem, I have been struggling for a long time to solve this problem but I just can't get it around. Thanks in advance... Kind regards Roni

    WPF help tutorial

  • How to display from nested usercontrol another usercontrol class on button click event?
    L LAPEC

    Hello everyone In my WPF project I have created a UserControl (this is called Applic.xaml), and within this usercontrol I have placed a nested UserControl (this is called PasswordScreen.xaml). Here is the xaml design code of Applic.xaml usercontrol:

                  **"HERE IS THE UserControl THAT I PLACED..."**
    

    In PasswordScreen.xaml usercontrol there is a button (called Login). On the

    WPF wpf csharp design tutorial question

  • Displaying (Calling) 2 UserControl within a UserControl (WPF)
    L LAPEC

    Hello Matt Thank you for replying to my question. I am really struggling on this could you please if you can help me to solve this problem, I'm new to wpf and c# honestly. Kind regards Lapeci

    WPF wpf csharp design

  • Displaying (Calling) 2 UserControl within a UserControl (WPF)
    L LAPEC

    Hello everyone In my WPF project I have created a UserControl (this is called Applic.xaml), and within this usercontrol I have placed another UserControl (this is called PasswordScreen.xaml). Here is the xaml design code:

                  **"HERE IS THE UserControl THAT I PLACED..."**
    

    In PasswordScreen.xaml there is a button (called Login). On click event when clicked I want to call ano

    WPF wpf csharp design

  • Placing UserControl within a UserControl (WPF)
    L LAPEC

    Hello everyone In my WPF project I have created a UserControl (this is called Applic.xaml), and within this usercontrol I have placed another UserControl (this is called PasswordScreen.xaml). Here is the xaml design code:

                  **"HERE IS THE UserControl THAT I PLACED..."**
    

    In PasswordScreen.xaml there is a button (called Login). On click event when clicked I want t

    C# wpf csharp design

  • Problem with get() method!
    L LAPEC

    It is NHibernate

    C# help question

  • Problem with get() method!
    L LAPEC

    In this part of code im having error on get() and set() method...

    Quote:

    protected static ISession getSession(string configFile, bool createNew)
    {
    if (createNew)
    {
    return getSessionFactory(configFile).OpenSession();
    }
    else
    {
    if (null == configFile)
    {
    if (null == sessions)
    {
    sessions = new ThreadLocal();
    }
    ISession session = sessions.get();
    if (null == session || !session.IsOpen)
    {
    session = getSessionFactory(null).OpenSession();
    session.set(session);
    }
    return session;
    }
    else
    {
    if (null == mappedSessions)
    {
    mappedSessions = new ThreadLocal();
    }
    Dictionary map = mappedSessions.get();
    if (null == map)
    {
    map = new Dictionary(1);
    mappedSessions.set(map);
    }
    ISession session = map[configFile];
    if (null == session || !session.IsOpen)
    {
    session = getSessionFactory(configFile).OpenSession();
    map.Add(configFile, session);
    }
    return session;
    }
    }
    }

    C# help question

  • Problem with get() method!
    L LAPEC

    Can I please ask you for another help if you don't mind

    C# help question

  • Problem with get() method!
    L LAPEC

    Thanks for your help a lot, and actually it is from java code

    C# help question

  • Problem with get() method!
    L LAPEC

    Hello everyone I'm trying to solve this problem but i can't get it. Maybe someone can help me solve this problem please... When I compile the error says:

    Quote:

    Error 'System.Collections.Generic.Dictionary' does not contain a definition for 'get' and no extension method 'get' accepting a first argument of type 'System.Collections.Generic.Dictionary' could be found (are you missing a using directive or an assembly reference?)

    protected static ISessionFactory getSessionFactory(string configFile)
    {
    if (null == configFile)
    {
    if (sessionFactory == null)
    {
    throw new Exception("The session factory has not been initialized (or an error occurred during initialization)");
    }
    else
    {
    return sessionFactory;
    }
    }
    else
    {
    if (sessionFactoryMap == null)
    {
    throw new Exception("The session factory for '" + configFile + "' has not been initialized (or an error occurred during initialization)");
    }
    else
    {
    ISessionFactory sf = (ISessionFactory) sessionFactoryMap.get(configFile);
    if (null == sf)
    {
    throw new Exception("The session factory for '" + configFile + "' has not been initialized (or an error occured during initialization)");
    }
    else
    {
    return sf;
    }
    }
    }
    }

    Thanks in advance

    C# help question

  • How to avoid repeating dynamic tabitem at runtime?
    L LAPEC

    Thank you very much Pete that solved my problem... Once again thank you kind regards roni

    WPF csharp wpf help question linq

  • How to avoid repeating dynamic tabitem at runtime?
    L LAPEC

    Hello Pete Thanks for replying to my question. According to your answer, there isn't any tab-item with the same name, those tab-items are created at run-time. here is the xaml code of the BackOfficeWindow.xaml

    WPF csharp wpf help question linq

  • How to avoid repeating dynamic tabitem at runtime?
    L LAPEC

    Hello Everyone I have created a small project in WPF. In this project I have a window with Menu Bar such as: Administration, Explorers, Reports. Each of these menus have sub menus: for instance under Administration Menu-Bar there is a sub-menu called Users, and under Explorers Menu-Bar there is a sub-menu called Menu Categories. My problem to my question is that on any of the sub-menus I click, it creates a dynamic tabitem and places them in the main tabcontrol (which this is fine), but if i click again on the same sub menus it repeats the same tabitems. Can someone please help me solve this problem. the source code for BackOfficeWindow.xaml.cs

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    using System.Collections.ObjectModel;
    using iPosCloud.com.iposcloud.config.uiC_;
    using iPosCloud.com.iposcloud.bo.uiC_.explorer;
    using iPosCloud.com.iposcloud.bo.uiC_.explorer.ViewModel;

    namespace iPosCloud.com.iposcloud.bo.uiC_
    {
    /// /// Interaction logic for BackOfficeWindow.xaml
    ///
    public partial class BackOfficeWindow : Window
    {
    private VMBackOfficeWindow vmBackOfficeWindow;

        public BackOfficeWindow()
        {
            InitializeComponent();
            // create an object of ViewModel as set it as DataContext
            vmBackOfficeWindow = new VMBackOfficeWindow();
            this.DataContext = vmBackOfficeWindow;
            ObservableCollectionTabItems = new ObservableCollection();
        }
    
        public ObservableCollection ObservableCollectionTabItems { get; set; }
    
        // ADMINISTRATION MENU
        private void menuItemAdminConfiguration\_Click(object sender, RoutedEventArgs e)
        {
            RestaurantConfigurationView rcv = new RestaurantConfigurationView();
            //bow.Owner = this;
            rcv.ShowDialog();
            //this.Close();
        }
    
        #region "Close TabItems"
    
        private void menuItem1\_Click(object sender, RoutedEventArgs e)
        {
            vmBackOfficeWindow.CloseTabItem(sender);
            menuUsers.IsEnabled = true;
            menuCategories.IsEnabled = true;
    
    WPF csharp wpf help question linq

  • ResourceBundle class in C#?
    L LAPEC

    Hello Everyone Can someone please tell me if there is a equivalent to java's ResourceBundle class in C#? kind regards lapeci

    C# csharp java question

  • Java code Convert to C#
    L LAPEC

    Hi Bernhard Hiller Thanks for replaying to my java question. I'm using WPF Window Form (not the Windows Forms). Is there anyway you could help me to convert that java code I'm very new to programming and I don't have a clue how to do it honestly... Kind Regards lapeci

    Java csharp java help question

  • Java code Convert to C#
    L LAPEC

    Hello Everyone I'm trying to convert this java code to C#, could someone please help me on this because I am very new into programming. Here is the Java code...

    import java.awt.Component;

    import javax.swing.JOptionPane;

    public class ConfirmDeleteDialog {
    public static final int YES = JOptionPane.YES_OPTION;
    public static final int NO = JOptionPane.NO_OPTION;
    public static final int CANCEL = JOptionPane.CANCEL_OPTION;
    static final int OK = JOptionPane.OK_OPTION;
    static final int CLOSED = JOptionPane.CLOSED_OPTION;

    public static int showMessage(Component parent, String message, String title) {
    	return JOptionPane.showConfirmDialog(parent, message, title, JOptionPane.YES\_NO\_OPTION, JOptionPane.QUESTION\_MESSAGE);
    }
    

    }

    thanks in advance lapeci

    Java csharp java help question

  • how to convert java code to c# code
    L LAPEC

    hello everyone could someone please help me to convert this java code to c#, i have been trying for a week and i am getting very frustrating...

    public static void printTicket(final Ticket ticket) throws Exception {
    Job job = new Job()
    {
    @Override
    public Object run() {
    PosPrinter posPrinter = null;
    try
    {
    if(PrintConfig.getReceiptPrinterType() == PrinterType.OS_PRINTER) {
    JReportPrintService.printTicket(ticket);
    return null;
    }
    Restaurant restaurant = RestaurantDAO.getInstance().get(Integer.valueOf(1));
    posPrinter = new PosPrinter(PrintConfig.getJavaPosReceiptPrinterName(),
    PrintConfig.getCashDrawerName());
    posPrinter.beginLine(PosPrinter.SIZE_0);
    posPrinter.printText("\u001b|cA\u001b|2C" + restaurant.getName());
    posPrinter.endLine();

            if (restaurant.getAddressLine1() != null) {
               printCentered(posPrinter, restaurant.getAddressLine1());
            }
            if (restaurant.getAddressLine2() != null) {
               printCentered(posPrinter, restaurant.getAddressLine2());
        }
        if (restaurant.getAddressLine3() != null) {
               printCentered(posPrinter, restaurant.getAddressLine3());
            }
            if (restaurant.getTelephone() != null) {
               printCentered(posPrinter, restaurant.getTelephone());
            }
            posPrinter.beginLine(PosPrinter.SIZE\_0);
            posPrinter.endLine();
            posPrinter.beginLine(PosPrinter.SIZE\_0);
        posPrinter.printText(com.floreantpos.POSConstants.CHK\_NO);
            posPrinter.printText(String.valueOf(ticket.getId()));
            posPrinter.endLine();
        posPrinter.beginLine(PosPrinter.SIZE\_0);
        posPrinter.printText(com.floreantpos.POSConstants.TBL\_);
        posPrinter.printText(String.valueOf(ticket.getTableNumber()));
        posPrinter.endLine();
        posPrinter.beginLine(PosPrinter.SIZE\_0);
        posPrinter.printText(com.floreantpos.POSConstants.GUEST + " #");
        posPrinter.printText(String.valueOf(ticket.getNumberOfGuests()));
        posPrinter.endLine();
        posPrinter.beginLine(PosPrinter.SIZE\_0);
        posPrinter.printText(com.floreantpos.POSConstants.SRV\_);
        posPrinter.printText(String.valueOf(ticket.getOwner().getUserId() + "/" +
               ticket.getOwner()));
            posPrinter.endLine();
        posPrinter.beginLin
    
    Java csharp java com help tutorial

  • How to change image at run-time corresponding time of day (24 hour format)?
    L LAPEC

    Hello Mycroft Holmes Thanks for replying to my question... Is there any way you can help me with a sample code because I don't have a clue how to do it I'm very new to wpf... thanks in advance. kind regards lapeci

    WPF help question csharp wpf tutorial

  • How to change image at run-time corresponding time of day (24 hour format)?
    L LAPEC

    Hello everyone I have two images, image1 represent lunch and image2 represents dinner. When I run my application the image1 is displayed on main window. How can I change image1 to image2 corresponding time of day (at run-time)? For instance: lets say from 12:00 to 17:00 I want my image1 to be displayed at main window, and from 17:00 to 23:00 I want to display image2 at main window. could someone please help me solve this problem, Hence: I'm new to WPF... thanks in advance kind regards lapeci

    WPF help question csharp wpf tutorial

  • What is database SQL query to display the name of the table only in to datagrid?
    L LAPEC

    Hello Everyone I have created a WPF project (C# language) and I also have a MS Access 2007 database. I'm trying to display the database table name in to datagrid, but i can't figur out the SQL query how to do it. The code below that I wrote it's not correct I think maybe someone can help me please and solve it...

    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
    string ConString = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString;
    string CmdString = string.Empty;

            using (OleDbConnection myConnection = new OleDbConnection(ConString))
            {
                CmdString = "SELECT FoodMenu FROM MSysObjects WHERE (FoodMenu Not Like 'MSys\*') AND (Type In (1,4,6)) ORDER BY FoodMenu";
    
                OleDbCommand comm = new OleDbCommand(CmdString, myConnection);
                OleDbDataAdapter sda = new OleDbDataAdapter(comm);
                myConnection.Open();
                DataTable dt = myConnection.GetSchema("Tables");   //Get list of user tables  
                foreach (DataRow dataRow in dt.Rows)
                {
                    DataGridMenuTables.Items.Add(dataRow\["FoodMenu"\].ToString().Trim());
                    //DataGridMenuTables.ItemsSource = dt.DefaultView;
                }
                //myConnection.Close();
            }
        }
    

    Kind regards Roni

    Database database csharp question wpf help
  • Login

  • Don't have an account? Register

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