Click here to Skip to main content
15,907,913 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple clicks on one button scrolls through selection choices Pin
OriginalGriff10-May-18 7:59
mveOriginalGriff10-May-18 7:59 
AnswerRe: Multiple clicks on one button scrolls through selection choices Pin
BillWoodruff10-May-18 10:56
professionalBillWoodruff10-May-18 10:56 
AnswerRe: Multiple clicks on one button scrolls through selection choices Pin
Pete O'Hanlon10-May-18 21:45
mvePete O'Hanlon10-May-18 21:45 
Questionc# while loop Pin
swathiii8-May-18 23:04
swathiii8-May-18 23:04 
AnswerRe: c# while loop Pin
OriginalGriff8-May-18 23:37
mveOriginalGriff8-May-18 23:37 
AnswerRe: c# while loop Pin
Pete O'Hanlon9-May-18 1:32
mvePete O'Hanlon9-May-18 1:32 
AnswerRe: c# while loop Pin
Luc Pattyn9-May-18 22:53
sitebuilderLuc Pattyn9-May-18 22:53 
Questionhow can i get the splitted values in a textbox from seperate line in c# using text file Pin
Mohamed Fahad M8-May-18 3:28
Mohamed Fahad M8-May-18 3:28 
AnswerRe: how can i get the splitted values in a textbox from seperate line in c# using text file Pin
OriginalGriff8-May-18 4:14
mveOriginalGriff8-May-18 4:14 
AnswerRe: how can i get the splitted values in a textbox from seperate line in c# using text file Pin
Eddy Vluggen8-May-18 5:51
professionalEddy Vluggen8-May-18 5:51 
GeneralRe: how can I ... Pin
Luc Pattyn8-May-18 7:16
sitebuilderLuc Pattyn8-May-18 7:16 
GeneralRe: how can I ... Pin
Eddy Vluggen8-May-18 7:43
professionalEddy Vluggen8-May-18 7:43 
AnswerRe: how can i get the splitted values in a textbox from seperate line in c# using text file Pin
BillWoodruff12-May-18 10:45
professionalBillWoodruff12-May-18 10:45 
Questionconversion from Uint32 to float Pin
sp love8-May-18 2:16
sp love8-May-18 2:16 
AnswerRe: conversion from Uint32 to float Pin
Luc Pattyn8-May-18 2:56
sitebuilderLuc Pattyn8-May-18 2:56 
QuestionWebServices Pin
Member 22364197-May-18 23:17
Member 22364197-May-18 23:17 
AnswerRe: WebServices Pin
Eddy Vluggen7-May-18 23:38
professionalEddy Vluggen7-May-18 23:38 
AnswerRe: WebServices Pin
OriginalGriff7-May-18 23:43
mveOriginalGriff7-May-18 23:43 
GeneralRe: WebServices Pin
Member 22364198-May-18 19:35
Member 22364198-May-18 19:35 
GeneralRe: WebServices Pin
Mycroft Holmes8-May-18 20:31
professionalMycroft Holmes8-May-18 20:31 
Questionc# Why can I not get this to work? Pin
tomas0007-May-18 1:21
tomas0007-May-18 1:21 
AnswerRe: c# Why can I not get this to work? Pin
Luc Pattyn7-May-18 2:42
sitebuilderLuc Pattyn7-May-18 2:42 
AnswerRe: c# Why can I not get this to work? Pin
User 74293389-May-18 23:24
professionalUser 74293389-May-18 23:24 
In OnSelected you have some syntax errors, but it looks like you intend to create a new Apath, set its Num1, and then use that in Form1. Currently however, Form1 creates a new Apath instead of using the one from Class1.
You could pass the item in the constructor like so.

Class1.cs
public void OnSelected(IGame selectedGame)
{
    var item = new Apath
    {
        Num1 = selectedGame.ApplicationPath
    };

    var form = new Form1(item);
    form.Show();
}


Form1.cs
namespace ClassLibrary1
{
    public partial class Form1 : Form
    {
        Class1.Apath apath1;

        public Form1(Class1.Apath item)
        {
            InitializeComponent();
            apath1 = item;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show(apath1.Num1);
        }
    }
}


modified 13-Sep-18 21:01pm.

Questionnow how can i get the splitted values in a textbox from seperate line in c# using text file Pin
Mohamed Fahad M6-May-18 4:14
Mohamed Fahad M6-May-18 4:14 
AnswerRe: now how can i get the splitted values in a textbox from seperate line in c# using text file Pin
Gerry Schmitz6-May-18 5:02
mveGerry Schmitz6-May-18 5:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.