Example #1
0
        /// <summary>
        /// This function will be called when the whole platform has just started
        /// </summary>
        protected override void OnTabletopLoaded()
        {
            base.OnTabletopLoaded();

            // Add the main object to the tabletop, so that it can be displayed
            // Comment the following three lines you do not want to load the object when platform started up
            ObjectCreateParameter param = new ObjectCreateParameter(typeof(UObject1));
            IObject obj = UTableHelper.CreateObject(param);
            obj.Owner = this.Tabletop;

            // You can add more initialization code here when platform started up
        }
Example #2
0
 protected virtual void OnCommandReceived(UElementMenu sender, ElementMenuCommandReceivedEventArgs args)
 {
     switch (args.Command)
     {
         case "ShutDown":
             UTableHelper.Shutdown(0);
             break;
         case "DesignWindow":
             {
                  ObjectCreateParameter loadAppParam = new ObjectCreateParameter(typeof(DesignWindow));
                  IObject appLoader = UTableHelper.CreateObject(loadAppParam, this);
                  PlaceAppLoader(appLoader, this._menuPositionList[sender]);
             }
             break;
         case "DirectWindow":
             //TODO
             break;
         case "ResetTabletop":
             //TODO
             break;
         case "CloseMenu":
             break;
     }
 }