|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
when i try build the code i get the following error
*** The class 'PupilProfiler.MerlinManager' already contains a definition for 'MDIClient' *** the code used is listed below, it errors on the line beginning with *** public static void MDIClient(object a) *** any help would be good... -------------------------------------------------------------------------------------------- using System; using AgentObjects; using System.Windows.Forms; namespace PupilProfiler { /// <summary> /// Summary description for MerlinManager. /// </summary> public class MerlinManager { private static AxAgentObjects.AxAgent axAgent1; private static IAgentCtlCharacterEx Character; private static MerlinManager merlinManager = null; private static bool FirstPlayed; private static int MDIClient = 14; private MerlinManager(object a) { //constructor try { axAgent1.Characters.Unload("CharacterID"); } catch {} axAgent1.Characters.Load("CharacterID", (object)Application.StartupPath+"\\merlin.acs"); Character = axAgent1.Characters["CharacterID"]; Character.LanguageID = 0x409; Character.Show(null); } public static MerlinManager getMerlin(object a) { if (merlinManager == null) { System.Int32 merlinManager = new merlinManager(a); } return merlinManager; } # region Location inner class public class Location { public static int Point = 1; public static int Right = 2; public static int Left = 3; public static int Top = 4; public static int Bottom = 5; public static int Distance = 75; public Location(){} public Location(Control inControl) { X = inControl.Left; Y = inControl.Top; H = inControl.Height; W = inControl.Width; } private static int x; public int X { get { return x; } set { x = value; } } private static int y; public int Y { get { return y; } set { y = value; } } private static int w; public int W { get { return w; } set { w = value; } } private static int h; public int H { get { return h; } set { h = value; } } } # endregion private static Location getLocation(Control inLocation, int inOrientation) { Location inLoc = new Location(inLocation); Location outLoc = null; switch(inOrientation) { case Location.Right: outLoc.X = inLoc.X + inLoc.W + 75; outLoc.Y = inLoc.Y - inLoc.H / 2; break; case Location.Left: outLoc.X = inLoc.X - 75; outLoc.Y = inLoc.Y - inLoc.H / 2; break; case Location.Top: outLoc.X = inLoc.X - inLoc.W / 2; outLoc.Y = inLoc.Y - 75; break; case Location.Top: outLoc.X = inLoc.X - inLoc.W / 2; outLoc.Y = inLoc.Y + inLoc.H + 75; break; default: outLoc.X = inLoc.X - inLoc.W / 2; outLoc.Y = inLoc.Y - inLoc.H / 2; break; } return outLoc; } private static void goTo(Control inLocation, int inOrientation) { Location goMe = getLocation(inLocation, inOrientation); Character.MoveTo(goMe.X, goMe.Y, 1); } private static void pointTo(Control inLocation) { Location pointMe = getLocation(inLocation, null); Character.GestureAt(pointMe.X, pointMe.Y); } // things that merlin is going to say // main mdi screen public static void MDIClient(object a) { short x = (short)this.Location.X, y = (short) this.Location.Y; x+=20; y-=50; Character.MoveTo(x,y,null); Character.GestureAt(576, 132); Character.Play ("Announce"); // welcome screen Character.Speak ("Welcome To Pupil Profiler, I am Merlin and I will be your guide for today.",null); Character.Speak ("From this screen, you can navigate your way through the system.",null); Character.Speak ("Simply click on the buttons shown, to populate the list to your far right",null); Character.Speak ("The List contains all the screens you can access for that area of the system.",null); Character.Speak ("To enter the place you wish, double click the item in the list",null); // tabs Character.GestureAt(70, 180); Character.Play ("LookLeft"); Character.Speak ("The 'Main Menu' tab shows the main screen.",null); Character.Speak ("The 'Current' tab shows what you are currently working on.",null); Character.Speak ("The 'Hide/Show' tab hides or shows the Navigation bar.",null); // merlin suggests you click help if you have anymore issues with the system! Character.Play ("Suggest"); Character.Speak ("Remember, if you need help at any time click the question mark and I will magically appear to guide you through the application."); Character.Play("Wave"); Character.Hide(null); } } } |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > The class 'PupilProfiler.MerlinManager' already contains a definition for 'MDIClient' |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|