Exemple #1
0
 public MpeScreen(MpeScreen window) : base(window)
 {
   MpeLog.Debug("MpeScreen(window)");
   AllowDrop = true;
   allowOverlay = window.allowOverlay;
   defaultControl = window.defaultControl;
   screenSize = window.screenSize;
 }
Exemple #2
0
 public MpeScreen() : base()
 {
   MpeLog.Debug("MpeScreen()");
   Type = MpeControlType.Screen;
   MpeScreen = this;
   AllowDrop = true;
   backImage.Description = "Default Image - Window Background";
   backImage.Id = 1;
   backImage.MpeScreen = this;
   backImage.Embedded = true;
   screenSize = MpeScreenSize.PAL;
   defaultControl = 0;
   allowOverlay = true;
   screenType = MpeScreenType.Window;
   controlLock.Location = true;
   controlLock.Size = true;
 }
Exemple #3
0
 public MpeScreen CreateScreen(int left, int top, MpeScreenSize size)
 {
   MpeScreen screen = CreateScreen();
   screen.Left = left;
   screen.Top = top;
   screen.ScreenSize = size;
   return screen;
 }
Exemple #4
0
 public MpeScreen CreateScreen(FileInfo screenFile, int left, int top, MpeScreenSize size)
 {
   if (screenFile == null || screenFile.Exists == false)
   {
     throw new MpeParserException("Invalid screen file.");
   }
   MpeLog.Debug("Loading controls from [" + screenFile.FullName + "]");
   try
   {
     MpeScreen screen = CreateScreen(left, top, size);
     XPathDocument doc = new XPathDocument(screenFile.FullName);
     XPathNavigator nav = doc.CreateNavigator();
     XPathNodeIterator iterator = nav.Select("/" + MpeControlType.Screen.ToString());
     if (iterator.MoveNext())
     {
       screen.Load(iterator, this);
       screen.Modified = false;
       return screen;
     }
   }
   catch (Exception e)
   {
     MpeLog.Debug(e);
     throw new MpeParserException(e.Message);
   }
   throw new MpeParserException("Invalid screen file. Could not parse contents.");
 }