Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Increase Hours and Minutes (TimeSpan) Pin
Pete O'Hanlon20-Mar-14 8:01
mvePete O'Hanlon20-Mar-14 8:01 
GeneralRe: C# Increase Hours and Minutes (TimeSpan) Pin
nicola_melc20-Mar-14 8:14
nicola_melc20-Mar-14 8:14 
GeneralRe: C# Increase Hours and Minutes (TimeSpan) Pin
Pete O'Hanlon20-Mar-14 8:14
mvePete O'Hanlon20-Mar-14 8:14 
QuestionWPF problem with ScrollViewer Pin
Federico Barbieri20-Mar-14 6:50
Federico Barbieri20-Mar-14 6:50 
QuestionRe: WPF problem with ScrollViewer Pin
Kenneth Haugland20-Mar-14 20:43
mvaKenneth Haugland20-Mar-14 20:43 
SuggestionRe: WPF problem with ScrollViewer Pin
Richard MacCutchan20-Mar-14 22:40
mveRichard MacCutchan20-Mar-14 22:40 
GeneralRe: WPF problem with ScrollViewer Pin
Federico Barbieri20-Mar-14 23:47
Federico Barbieri20-Mar-14 23:47 
Question//solved// help making class available to all Pin
Bosskardo20-Mar-14 4:19
Bosskardo20-Mar-14 4:19 
How could I change my code to use in every form. At the moment it only works on the main one and I need to send the main form's instance.
Could I change my code so that it can be used in every form?

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SefelecTester
{
	public class WC
	{
		private MainWin _main;
		public WC(MainWin _main)
		{
			this._main=_main;
		}
		public void ConWrite(string text, int select=0)
		{
			Console.WriteLine(text);
			if (select>0)
			{
				if (select == 1)
				{
					InvokeC.SynchronizedInvoke(_main, () => _main.OutputConsole.Items.Add(text));
					InvokeC.SynchronizedInvoke(_main, () => _main.OutputConsole.SelectedIndex = -1);
				}
				else if (select == 2)
				{
					InvokeC.SynchronizedInvoke(_main, () => _main.ErrorConsole.Items.Add(text));
					InvokeC.SynchronizedInvoke(_main, () => _main.ErrorConsole.SelectedIndex = -1);
				}
			}
		}
	}
}


modified 21-Mar-14 7:45am.

AnswerRe: help making class available to all Pin
Pete O'Hanlon20-Mar-14 4:57
mvePete O'Hanlon20-Mar-14 4:57 
AnswerRe: help making class available to all Pin
OriginalGriff20-Mar-14 5:56
mveOriginalGriff20-Mar-14 5:56 
AnswerRe: help making class available to all Pin
BobJanova20-Mar-14 7:55
BobJanova20-Mar-14 7:55 
GeneralRe: help making class available to all Pin
Bosskardo21-Mar-14 1:44
Bosskardo21-Mar-14 1:44 
QuestionMessage Removed Pin
20-Mar-14 3:39
protectorMarco Bertschi20-Mar-14 3:39 
Questionhow to use Response.Clear() in c# Pin
rincy sivan20-Mar-14 1:51
rincy sivan20-Mar-14 1:51 
AnswerRe: how to use Response.Clear() in c# Pin
Rob Philpott20-Mar-14 3:02
Rob Philpott20-Mar-14 3:02 
Questionc# code to copy paste whole pivot table in another sheet of excel Pin
rajnknit0719-Mar-14 23:32
rajnknit0719-Mar-14 23:32 
QuestionRe: c# code to copy paste whole pivot table in another sheet of excel Pin
Eddy Vluggen20-Mar-14 10:27
professionalEddy Vluggen20-Mar-14 10:27 
Question[solved] Passage of events between WinForms Pin
Mario 5619-Mar-14 23:27
Mario 5619-Mar-14 23:27 
QuestionRe: Passage of events between WinForms Pin
Eddy Vluggen20-Mar-14 6:37
professionalEddy Vluggen20-Mar-14 6:37 
AnswerRe: Passage of events between WinForms Pin
Mario 5620-Mar-14 7:33
Mario 5620-Mar-14 7:33 
GeneralRe: Passage of events between WinForms Pin
Eddy Vluggen20-Mar-14 10:35
professionalEddy Vluggen20-Mar-14 10:35 
GeneralRe: Passage of events between WinForms Pin
Mario 5620-Mar-14 14:44
Mario 5620-Mar-14 14:44 
GeneralRe: Passage of events between WinForms Pin
Eddy Vluggen21-Mar-14 7:29
professionalEddy Vluggen21-Mar-14 7:29 
AnswerRe: Passage of events between WinForms Pin
BobJanova20-Mar-14 8:06
BobJanova20-Mar-14 8:06 
GeneralRe: Passage of events between WinForms Pin
Mario 5620-Mar-14 9:51
Mario 5620-Mar-14 9:51 

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.