Esempio n. 1
0
 public void Add(IQuest quest)
 {
     GameDeskControl doc = new GameDeskControl(quest);
     doc.Title = quest.Name;
     doc.InfoTip = "Info tipo for " + doc.Title;
     doc.ContentTypeDescription = "";
     doc.Closing += new EventHandler<CancelEventArgs>(doc_Closing);
     doc.Closed += new EventHandler(doc_Closed);
     doc.InfoPanel.SizeChanged+=new SizeChangedEventHandler(doc.ResizeInfoPanel);
     GameViews.Add(doc);
     doc.Resize(GamesDocumentPane.ActualWidth, GamesDocumentPane.ActualHeight);
 }
Esempio n. 2
0
        public GameDeskControl Add(IQuest quest, GameMode gameMode)
        {
            if (GameViews.Count == 1)
            {
                if (GameViews[0] is Introduction)
                {
                    GameViews.RemoveAt(0);
                }
            }

            GameDeskControl doc = new GameDeskControl(quest, gameMode, userInquirer);
            doc.Title = quest.Name;
            doc.InfoTip = doc.Title;
            doc.ContentTypeDescription = "";
            doc.Closing += new EventHandler<CancelEventArgs>(doc_Closing);
            doc.Closed += new EventHandler(doc_Closed);
            doc.InfoPanel.SizeChanged += new SizeChangedEventHandler(doc.ResizeInfoPanel);
            doc.SetSounds(this.isSoundOn);
            GameViews.Add(doc);
            doc.Resize(GamesDocumentPane.ActualWidth, GamesDocumentPane.ActualHeight);

            //this.SelectedIndex = GameViews.Count - 1;

            this.SetActiveGameChanged(doc);

            return doc;
        }