Beispiel #1
0
 public void SongHasStarted(StereoRail_AudioManager.SongName whichSong)
 {
     Debug.Log("Exit object has switched modes to ending the song!");
     quitAppText.SetActive(false);
     stopSongText.SetActive(true);
     exitMode = ExitMode.exitSong;
 }
Beispiel #2
0
 public void SongHasEnded()
 {
     Debug.Log("Exit object has switched modes to quitting the game!");
     quitAppText.SetActive(true);
     stopSongText.SetActive(false);
     exitMode = ExitMode.exitExperience;
 }
Beispiel #3
0
        public SceneOW(OverworldEditor f, Overworld ow, DungeonMain mform)
        {
            owForm   = f;
            mainForm = mform;
            this.ow  = ow;
            //graphics = Graphics.FromImage(scene_bitmap);
            //this.Image = new Bitmap(4096, 4096);
            this.MouseUp          += new MouseEventHandler(onMouseUp);
            this.MouseMove        += new MouseEventHandler(onMouseMove);
            this.MouseDoubleClick += new MouseEventHandler(onMouseDoubleClick);
            this.MouseWheel       += SceneOW_MouseWheel;
            tilesgfxBitmap         = new Bitmap(512, 512, 512, PixelFormat.Format8bppIndexed, temptilesgfxPtr);
            tilemode       = new TileMode(this);
            exitmode       = new ExitMode(this);
            doorMode       = new DoorMode(this);
            entranceMode   = new EntranceMode(this);
            selectedMode   = ObjectMode.Tile;
            itemMode       = new ItemMode(this);
            spriteMode     = new SpriteMode(this);
            transportMode  = new TransportMode(this);
            overlayMode    = new OverlayMode(this);
            gravestoneMode = new GravestoneMode(this);

            //this.Width = 8192;
            //this.Height = 8192;
            //this.Size = new Size(8192, 8192);
            //this.Refresh();
        }
Beispiel #4
0
        IEnumerator ShowNextImage()
        {
            yield return(new WaitForSeconds(fullImageDelay));

            exitMode = ExitMode.Gallery;
            GlobalManager.MInstantMessage.DeliverMessage(InstantMessageType.GUIFadeWhiteCurtain, this, true);
        }
Beispiel #5
0
        private static void PrintLexico(Token t, ExitMode mode)
        {
            StreamWriter sr;

            switch (mode)
            {
            case ExitMode.Console:
                Console.Out.Write("\n\n######Analise Lexica######\n\n");
                sr = new StreamWriter(Console.OpenStandardOutput())
                {
                    AutoFlush = true
                };
                Console.SetOut(sr);
                Console.OutputEncoding = System.Text.Encoding.UTF8;

                t.PrintToken(sr);
                break;

            default:
                Console.Out.Write("Gerando arquivo AnaliseLexica.txt\n");
                sr = new StreamWriter(@"AnaliseLexica.txt")
                {
                    AutoFlush = true
                };

                t.PrintToken(sr);

                sr.Close();
                break;
            }
        }
Beispiel #6
0
        // cmi.exit
        private void SetExit(string value)
        {
            ExitMode exitMode = ExitMode.Undetermined;

            switch (value)
            {
            case "time-out":
                exitMode = ExitMode.TimeOut;
                break;

            case "suspend":
                exitMode = ExitMode.Suspended;
                break;

            case "logout":
                exitMode = ExitMode.Logout;
                break;

            case "normal":
                exitMode = ExitMode.Normal;
                break;

            default:
                break;
            }
            this.DataModel.NavigationRequest.ExitMode = exitMode;
        }
Beispiel #7
0
        private static void PrintSintatico(Sintatico s, List <Token.Tok> lt, ExitMode mode)
        {
            StreamWriter sr;

            switch (mode)
            {
            case ExitMode.Console:
                Console.Out.Write("\n\n######Analise Sintatica######\n\n");
                sr = new StreamWriter(Console.OpenStandardOutput())
                {
                    AutoFlush = true
                };
                Console.SetOut(sr);
                Console.OutputEncoding = System.Text.Encoding.UTF8;

                s.WriteOutput(lt, sr);
                break;

            default:
                Console.Out.Write("Escrevendo AnaliseSintatica.txt\n\n");
                sr = new StreamWriter(@"AnaliseSintatica.txt");
                s.WriteOutput(lt, sr);
                sr.Flush();
                sr.Close();
                break;
            }
        }
Beispiel #8
0
        public void Load(string location)
        {
            if (File.Exists(location))
            {
                XmlDocument  doc = new XmlDocument();
                StreamReader sr  = new StreamReader(location);
                doc.LoadXml(sr.ReadToEnd());
                sr.Close();

                XmlElement conf = doc.GetElementsByTagName("Configuration")[0] as XmlElement;
                if (conf != null)
                {
                    WindowHeight = XmlHelper.GetAttributeInt(conf, "WindowHeight", WindowHeight);

                    CultureInfo culture = XmlHelper.GetAttributeCulture(conf, "Culture", Thread.CurrentThread.CurrentCulture);
                    Thread.CurrentThread.CurrentCulture   = culture;
                    Thread.CurrentThread.CurrentUICulture = culture;

                    ExitMode = XmlHelper.GetAttributeEnum <ExitMode>(conf, "ExitMode", ExitMode);
                }

                foreach (XmlElement db in doc.GetElementsByTagName("Database"))
                {
                    Database item = new Database(XmlHelper.GetAttributeValue(db, "Location"));
                    string   passwordEncrypted = XmlHelper.GetAttributeValue(db, "Password");
                    if (passwordEncrypted != null)
                    {
                        item.SavePassword = true;
                        string password;
                        if (CryptoHelper.Decrypt(passwordEncrypted, ManagerFactory.PasswordCrypto, out password))
                        {
                            item.RequiresPassword = true;
                            item.Password         = password;
                            item.Load();
                        }
                    }
                    Databases.Add(item);
                }

                Resource.Load("Resources/Resources");

                Languages = new List <Language>();
                foreach (CultureInfo item in Resources.GetSupportedLocales("Resources/Resources", ManagerFactory.DefaultLocale))
                {
                    Languages.Add(new Language()
                    {
                        Name = item.NativeName, Code = item.Name
                    });
                }
            }
            else
            {
                Database database = new Database();
                database.Name     = ManagerFactory.DefaultDatabaseName;
                database.Location = Path.Combine(Environment.CurrentDirectory, ManagerFactory.DefaultDatabaseName + ManagerFactory.DatabaseExtension);
                Databases.Add(database);
            }
        }
Beispiel #9
0
    // Start is called before the first frame update
    void Start()
    {
        exitMode = ExitMode.exitExperience;
        quitAppText.SetActive(true);
        stopSongText.SetActive(false);

        StereoRail_AudioManager.StopSongEvent  += SongHasEnded;
        StereoRail_AudioManager.StartSongEvent += SongHasStarted;
    }
Beispiel #10
0
 public void SongHasEnded()
 {
     Debug.Log("Exit object has switched modes to quitting the game!");
     quitAppText.SetActive(true);
     stopSongText.SetActive(false);
     exitMode            = ExitMode.exitExperience;
     rend.material.color = quitAppColor;
     //with new toon shader
     rend.material.SetColor("_EmissionColor", quitAppColor);
 }
Beispiel #11
0
 public void SongHasStarted(DavisDnB_AudioManager.SongName whichSong)
 {
     Debug.Log("Exit object has switched modes to ending the song!");
     quitAppText.SetActive(false);
     stopSongText.SetActive(true);
     exitMode            = ExitMode.exitSong;
     rend.material.color = stopSongColor;
     //with new toon shader
     rend.material.SetColor("_EmissionColor", stopSongColor);
 }
Beispiel #12
0
    // Start is called before the first frame update
    void Start()
    {
        exitMode = ExitMode.exitExperience;
        GetComponent <Renderer>().material.color = quitAppColor;
        quitAppText.SetActive(true);
        stopSongText.SetActive(false);

        DavisDnB_AudioManager.StopAllMusic   += SongHasEnded;
        DavisDnB_AudioManager.StartSongEvent += SongHasStarted;
        rend = GetComponent <Renderer>();
    }
 protected override void AwakeInit()
 {
     exitMode = GlobalManager.MStorage.GameFinished ? ExitMode.Finale : ExitMode.World;
     registrator.Add(
         new MessageRegistrationTuple {
         type = InstantMessageType.GUIFullScreenButtonPressed, handler = OnGUIFullScreenButtonPressed
     },
         new MessageRegistrationTuple {
         type = InstantMessageType.GUIWhiteCurtainFaded, handler = OnGUIWhiteCurtainFaded
     }
         );
 }
Beispiel #14
0
 protected override void AwakeInit()
 {
     exitMode = ExitMode.Gallery;
     registrator.Add(
         new MessageRegistrationTuple {
         type = InstantMessageType.GUIWhiteCurtainFaded, handler = OnGUIFadeWhiteCurtain
     },
         new MessageRegistrationTuple {
         type = InstantMessageType.PuzzleWinImageStopped, handler = OnPuzzleWinImageStopped
     },
         new MessageRegistrationTuple {
         type = InstantMessageType.PuzzleWinImageFinished, handler = OnPuzzleWinImageFinished
     },
         new MessageRegistrationTuple {
         type = InstantMessageType.GUIBackButtonPressed, handler = OnGUIBackButtonPressed
     }
         );
 }
Beispiel #15
0
 //int selectedMode = 0;
 public SceneOW(Form1 f)
 {
     //graphics = Graphics.FromImage(scene_bitmap);
     //this.Image = new Bitmap(4096, 4096);
     this.MouseUp          += new MouseEventHandler(onMouseUp);
     this.MouseMove        += new MouseEventHandler(onMouseMove);
     this.MouseDoubleClick += new MouseEventHandler(onMouseDoubleClick);
     this.MouseWheel       += SceneOW_MouseWheel;
     mainForm       = f;
     tilesgfxBitmap = new Bitmap(512, 512, 512, PixelFormat.Format8bppIndexed, temptilesgfxPtr);
     tilemode       = new TileMode(this);
     exitmode       = new ExitMode(this);
     doorMode       = new DoorMode(this);
     entranceMode   = new EntranceMode(this);
     selectedMode   = ObjectMode.Tile;
     itemMode       = new ItemMode(this);
     spriteMode     = new SpriteMode(this);
     transportMode  = new TransportMode(this);
     //this.Refresh();
 }
Beispiel #16
0
 void OnGUIBackButtonPressed(object sender, InstantMessageArgs args)
 {
     exitMode = ExitMode.World;
     GlobalManager.MInstantMessage.DeliverMessage(InstantMessageType.GUIFadeWhiteCurtain, this, true);
 }
Beispiel #17
0
 void OnPuzzleWinImageStopped(object sender, InstantMessageArgs args)
 {
     exitMode = ExitMode.Gallery;
     GlobalManager.MInstantMessage.DeliverMessage(InstantMessageType.GUIFadeWhiteCurtain, this, true);
 }
Beispiel #18
0
 /// <summary>
 /// Any valid enum value is valid.
 /// </summary>
 /// <param name="value">The value to validate.</param>
 public override void ValidateExitMode(ExitMode? value)
 {
     switch(value)
     {
     // these are all valid values
     case null:
     case ExitMode.Logout:
     case ExitMode.Normal:
     case ExitMode.Suspended:
     case ExitMode.TimeOut:
     case ExitMode.Undetermined:
         break;
     default:
         throw new ArgumentOutOfRangeException("value");
     }
 }
Beispiel #19
0
 public abstract void ValidateExitMode(ExitMode? value);
Beispiel #20
0
 /// <summary>
 /// Sets the shutdown mode of the application.
 /// </summary>
 /// <param name="exitMode">The shutdown mode.</param>
 /// <returns></returns>
 public TAppBuilder SetExitMode(ExitMode exitMode)
 {
     Instance.ExitMode = exitMode;
     return(Self);
 }
Beispiel #21
0
 void Awake()
 {
     instance = this;
 }