Search:

Type: Posts; User: Blagojce

Page 1 of 4 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    3
    Views
    523

    Re: Data from 2 tables

    You can create new object which will contains two objects.


    public class StudentGenderView
    {
    public StudentGenderView()
    {
    }

    public Student StudentEntity{get;set;}
  2. Replies
    3
    Views
    1,371

    5.0 Re: Removing a section from a string

    Try this:
    - first split to array
    - with LINQ remove elements in array which contains "sq.ft".
  3. Thread: view model

    by Blagojce
    Replies
    1
    Views
    541

    Re: view model

    I think is something like this:


    public class StudentClassViewModel
    {
    public Student Student{get;set;}
    public Class Class{get;set;}
    }
  4. Re: "contact me" (or "help request") page with file attachment

    Each file is stored as attachment in each mail. If 2 users create 2 different messages, they create 2 different mails.
    If you want to store files locally, you can create folder for each email...
  5. Re: "contact me" (or "help request") page with file attachment

    Are you looking for something like this?
  6. Replies
    6
    Views
    1,383

    Re: unable to see database in server Explorer

    CodeFirst create database when you try to access it, so he/she needs to put some record or try to login/register.
  7. Replies
    6
    Views
    1,383

    Re: unable to see database in server Explorer

    Start your project, click on register/login and enter some data.
  8. Re: how to connect to desktop application in other computer?

    You can access from other computer by their names or ips.
    In SQL Server Configuration Manager enable TCP/IP or Named Pipes and start Sql Browser service to view sql server on pc1 from other...
  9. Replies
    5
    Views
    924

    Re: XML question

    Try this:

    XmlDeclaration dec = xmlDocIn.FirstChild as XmlDeclaration;
  10. VS 2010 Re: Employee Code does not validate correctly???

    According reference, you should enter three alphabetic characters, not numeric.
    If you want to enter numeric characters use # instead.
  11. Re: How to get the directories and paths using C#

    You need to keep last location in data file or registry and before you show the FolderBrowserDialog set SelectedPath property to path value from data file or registry key.
  12. Replies
    3
    Views
    1,179

    Re: Custom Object Properties (C#)

    You can add controls to the panel through designer mode, just drop on the panel.
    For default values for height, backcolor, location etc. I think you need to override those properties and add default...
  13. Replies
    5
    Views
    1,608

    Re: Commands on closing a window

    Regiter closed event or override onclosed method.

    Closed/closing event resources:
    MSDN: closed event
    MSDN: closing event
  14. Replies
    9
    Views
    1,358

    Re: Pull data from Txt file?

    You can use datagridview in form to display the results.
  15. Replies
    9
    Views
    1,358

    Re: Pull data from Txt file?

    StreamReader("TestFile.txt") - This means the file is in the same directory with application.
    In Windows Forms you can select file with OpenFileDialog.
    In the example with open file dialog you have...
  16. Replies
    9
    Views
    1,358

    Re: Pull data from Txt file?

    First create object where you'll store data from the file.
    Next read each line(with TextReader) and add in appropriate property in object.
  17. Replies
    2
    Views
    763

    3.0/LINQ Re: populate dt2 from dt1

    Try Datatable.Copy or Datatable.Clone
  18. Replies
    1
    Views
    533

    Re: Removing specific strings from text file

    First read text file in stream, next add each line of stream to string and split string with spaces and check length of each string.
  19. Replies
    1
    Views
    642

    Re: Deserializing XML Files

    You're using single instance of object, not a collection.
    When you're displaying results you need to use for/foreach loop if you want to display all objects in collection.
    In function...
  20. Replies
    2
    Views
    991

    Re: ListBox depulicates on page fire?

    On PageLoad first clear listbox then populate, or check if page is post back.
  21. Re: Can't assign index to MenuItem

    It was that. I first applied Index to the MeniItem and then added to the MainMenu.
    I'm using MainMenu because I found easier(I think it's easier) way how to create menu dynamically.

    Thanks a lot!
  22. [RESOLVED] Can't assign index to MenuItem

    I can't assign index on the MenuItem. I tried to assign index directly from object's index but without success, still MenuItem.Index is -1.



    mnuItem.Index =item.Index;


    I tried first to...
  23. Re: The given key was not present in the dictionary

    Bump
  24. Re: The given key was not present in the dictionary

    In addition I put code file and whole test project where I'm creating menus dinamically.

    I tried to compare current ToolStripMenuItem with ToolStripMenuItems in List with Contains method but it...
  25. The given key was not present in the dictionary

    I have the following dictionary:


    Dictionary<ToolStripMenuItem, ToolStripMenuItems[]>

    and I'm calling recursive function to iterate throug dictionary and build menu items, but if I didn't...
  26. Replies
    10
    Views
    1,027

    2.0 Re: Filling Property Using TextBox Data

    Use Readers(TextReader) and Streams(StreamReader/StreamWriter) to read or write content of file.

    Here is MSDN example for LoadFile method:
    RichTextBox.LoadFile
  27. Replies
    10
    Views
    1,027

    2.0 Re: Filling Property Using TextBox Data

    From the code I can see you call methods from form not from Application, change Form1.methodname with Application.methodname.
    Change this:
    Form1.EnableVisualStyles();...
  28. Replies
    2
    Views
    2,502

    Re: GetCustomAttributes return empty array

    I'm think that attribute type is correct, and attribute is on appropriate type.
    Here is the attribute and how it's attached on type:


    [AttributeUsage(AttributeTargets.Class, AllowMultiple =...
  29. Replies
    10
    Views
    1,027

    2.0 Re: Filling Property Using TextBox Data

    Does Program.cs file in your project for UI contains definition for these methods?
    Your Program.cs file should look like this:


    static class Program
    {
    /// <summary>
    ///...
  30. Replies
    10
    Views
    1,027

    2.0 Re: Filling Property Using TextBox Data

    after "}" use else statement or in if{} use return keyword after sending mail.


    private void button1_Click(object sender, EventArgs e){
    if (textBox1.Text!="" ){
    ...
  31. Replies
    10
    Views
    1,027

    2.0 Re: Filling Property Using TextBox Data

    First, instantiate the class:


    Email email=new Email();

    Then use:


    email.EmailSubject=textBox1.Text;
  32. Replies
    2
    Views
    2,502

    GetCustomAttributes return empty array

    First I'm checking if custom attributes are different from null.
    The condition is satisfied but within condition when I'm getting array of objects(or array of custom attribute) the method:

    ...
  33. Replies
    3
    Views
    1,495

    Re: Google Like Textbox

    It's best to create custom texbox.
    Things you need to do are:
    1.Inherit from TextBox control;
    2. Override events and add your own colors/border styles to textbox.
  34. Replies
    2
    Views
    453

    Re: Custom Attributes and Classes

    Yes, my question was how do I know which is the type the attribute list came from.

    Thanks, for your answer.
  35. Replies
    2
    Views
    453

    Custom Attributes and Classes

    How to determine on which class is attribute attached?

    In one function I'm iterating through types and attributes, in another function I'm getting attributes as parameter and iterating through...
  36. Replies
    3
    Views
    1,495

    Re: Google Like Textbox

    Use events to achieve this.
    Use MouseHover or Enter event when mouse is over it.
    Use GotFocus event when it gets focus.
  37. Replies
    6
    Views
    1,548

    Re: creating standard exe.

    In Links property of linklabel add website link, and in Text property write title(or whatever you want) of website.
    Double click on linklabel to add event or in LinkClicked event add:
    ...
  38. Replies
    7
    Views
    904

    Re: Create Menus dynamically

    Yes, I wanted to say that, but how to iterate and create menu item from string?
  39. Replies
    7
    Views
    904

    Re: Create Menus dynamically

    The string needs to check if root menu exist, if exist check if submenu exist, if it doesn't exist need to create submenu in root menu.
    Ex:

    View;Toolbars;Help

    Check if View menu exist, if View...
  40. Replies
    7
    Views
    904

    Re: Create Menus dynamically

    Maybe the appropriate word for this technique is formatting menus.
Results 1 to 40 of 151
Page 1 of 4 1 2 3 4



Click Here to Expand Forum to Full Width