Click here to Skip to main content
15,892,537 members
Home / Discussions / C#
   

C#

 
GeneralRe: Robotics in C# HeLP with programming Pin
faysie23-Apr-07 4:49
faysie23-Apr-07 4:49 
GeneralRe: Robotics in C# HeLP with programming Pin
Russell Jones23-Apr-07 4:57
Russell Jones23-Apr-07 4:57 
QuestionMyNamespace in C# Pin
manustone19-Apr-07 22:38
manustone19-Apr-07 22:38 
AnswerRe: MyNamespace in C# Pin
Christian Graus19-Apr-07 22:59
protectorChristian Graus19-Apr-07 22:59 
GeneralRe: MyNamespace in C# Pin
Brady Kelly20-Apr-07 0:15
Brady Kelly20-Apr-07 0:15 
AnswerRe: MyNamespace in C# Pin
Guffa20-Apr-07 2:38
Guffa20-Apr-07 2:38 
GeneralRe: MyNamespace in C# Pin
Brady Kelly20-Apr-07 2:45
Brady Kelly20-Apr-07 2:45 
AnswerRe: MyNamespace in C# Pin
Dave Doknjas20-Apr-07 14:04
Dave Doknjas20-Apr-07 14:04 
The following is a support file we use in Instant C#. Some of the 'My' namespace is reproduced there and other parts are converted in-line by Instant C#:

//----------------------------------------------------------------------------------------
// Copyright © 2005 - 2007 Tangible Software Solutions Inc.
//
// This file provides classes to reproduce most of the My.Computer and My.User
// functionality in VB. Calls to My.Computer.Clipboard, My.Computer.FileSystem,
// and My.Computer.Registry have been converted where they were referenced.
//
// Note: My.Settings is converted elsewhere to the standard C# Properties.Settings.
// Note: My.Resources is converted elsewhere to the standard C# Properties.Resources.
// Note: My.Application calls are redirected to the converted My.MyApplication.
//----------------------------------------------------------------------------------------

using Microsoft.VisualBasic.ApplicationServices;
using Microsoft.VisualBasic.Devices;
using System.Security.Principal;
using System.Windows.Forms;

namespace My
{
internal static class Computer
{
//Instant C# Notes:
//Calls to My.Computer.Clipboard have been redirected to System.Windows.Forms.Clipboard
//Calls to My.Computer.FileSystem have been redirected to Microsoft.VisualBasic.FileIO.FileSystem
//Calls to My.Computer.Registry have been redirected to Microsoft.Win32.Registry

internal readonly static Audio Audio;
internal readonly static Clock Clock;
internal readonly static ComputerInfo Info;
internal readonly static Keyboard Keyboard;
internal readonly static Mouse Mouse;
internal readonly static string Name;
internal readonly static Network Network;
internal readonly static Ports Ports;
internal readonly static Screen Screen;

static Computer()
{
Audio = new Audio();
Clock = new Clock();
Info = new ComputerInfo();
Keyboard = new Keyboard();
Mouse = new Mouse();
Network = new Network();
Ports = new Ports();
Screen = Screen.PrimaryScreen;

ServerComputer ThisServerComputer = new ServerComputer();
Name = ThisServerComputer.Name;
}
}

internal static class User
{
private static Microsoft.VisualBasic.ApplicationServices.User ThisUser = new Microsoft.VisualBasic.ApplicationServices.User();

internal static IPrincipal CurrentPrincipal
{
get
{
return ThisUser.CurrentPrincipal;
}
}
internal static bool IsAuthenticated
{
get
{
return ThisUser.IsAuthenticated;
}
}
internal static string Name
{
get
{
return ThisUser.Name;
}
}
internal static void InitializeWithWindowsUser()
{
ThisUser.InitializeWithWindowsUser();
}
internal static bool IsInRole(BuiltInRole ThisRole)
{
return ThisUser.IsInRole(ThisRole);
}
internal static bool IsInRole(string ThisRole)
{
return ThisUser.IsInRole(ThisRole);
}
}
}

David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Instant Python: C# to Python converter, VB to Python converter

Questionget data in datagridview Pin
Nekshan19-Apr-07 22:30
Nekshan19-Apr-07 22:30 
AnswerRe: get data in datagridview Pin
virendra patel19-Apr-07 22:44
virendra patel19-Apr-07 22:44 
GeneralRe: get data in datagridview Pin
virendra patel19-Apr-07 22:45
virendra patel19-Apr-07 22:45 
GeneralRe: get data in datagridview Pin
Nekshan19-Apr-07 22:51
Nekshan19-Apr-07 22:51 
GeneralRe: get data in datagridview Pin
Nekshan19-Apr-07 23:00
Nekshan19-Apr-07 23:00 
GeneralRe: get data in datagridview Pin
virendra patel19-Apr-07 23:03
virendra patel19-Apr-07 23:03 
AnswerRe: get data in datagridview Pin
virendra patel19-Apr-07 22:48
virendra patel19-Apr-07 22:48 
AnswerRe: get data in datagridview Pin
Keshav V. Kamat20-Apr-07 0:26
Keshav V. Kamat20-Apr-07 0:26 
AnswerRe: get data in datagridview Pin
Keshav V. Kamat22-Apr-07 23:25
Keshav V. Kamat22-Apr-07 23:25 
GeneralRe: get data in datagridview Pin
Nekshan23-Apr-07 21:12
Nekshan23-Apr-07 21:12 
QuestionCreate a component for C#? Pin
linhuu19-Apr-07 22:27
linhuu19-Apr-07 22:27 
Questioncopy dataset into other datase Pin
cocoonwls19-Apr-07 22:21
cocoonwls19-Apr-07 22:21 
QuestionPerformance: Partial Classes vs Inheritence? Pin
matsnas19-Apr-07 22:11
matsnas19-Apr-07 22:11 
AnswerRe: Performance: Partial Classes vs Inheritence? Pin
Colin Angus Mackay19-Apr-07 22:27
Colin Angus Mackay19-Apr-07 22:27 
GeneralRe: Performance: Partial Classes vs Inheritence? Pin
matsnas19-Apr-07 22:58
matsnas19-Apr-07 22:58 
GeneralRe: Performance: Partial Classes vs Inheritence? Pin
Colin Angus Mackay20-Apr-07 0:10
Colin Angus Mackay20-Apr-07 0:10 
GeneralRe: Performance: Partial Classes vs Inheritence? Pin
matsnas20-Apr-07 0:40
matsnas20-Apr-07 0:40 

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.