Exemplo n.º 1
0
        void Open(object param, ExecutedRoutedEventArgs e)
        {
            OpenFileDialog of = new OpenFileDialog();

            of.InitialDirectory = Directory.GetCurrentDirectory();
            of.Filter           = "Text Files (.txt)|*.txt";
            var res = of.ShowDialog();

            if (res == DialogResult.OK)
            {
                Filename = of.SafeFileName;

                int cpt = 0;
                Phrases.Clear();
                var lines = File.ReadAllLines(of.FileName, Encoding.GetEncoding(1252));
                foreach (string l in lines)
                {
                    if (l[0] != '-' && l != "")
                    {
                        Phrases.Add(l);
                        ((PhraseControl)_stack.Children[cpt]).SetPhrase(l);
                        cpt++;
                    }
                }
            }
        }
Exemplo n.º 2
0
        void Read(object param, ExecutedRoutedEventArgs e)
        {
            OpenFileDialog of = new OpenFileDialog();

            of.InitialDirectory = Directory.GetCurrentDirectory();
            of.Filter           = "Text Files (.txt)|*.txt";
            var res = of.ShowDialog();

            if (res == DialogResult.OK)
            {
                Filename = of.SafeFileName;

                int cpt = 1;
                Phrases.Clear();
                var lines = File.ReadAllLines(of.FileName, Encoding.GetEncoding(1252));
                foreach (string l in lines)
                {
                    if (l[0] != '-' && l != "")
                    {
                        Phrases.Add(l);
                        _stack.Children.Add(new PhraseControl(cpt, l, parole, this));
                        cpt++;
                    }
                }

                PhraseInProgress = Phrases[0];
                PhraseId         = 0;

                InProgress = true;
            }
        }
Exemplo n.º 3
0
 public void CreatePhrases()
 {
     Phrases.Add("\"What is this? this is very unusual. Your life line goes on and on.\"");
     Phrases.Add("\"The path of your life will be fraught with many hardships.\"");
     Phrases.Add("\"Are you in love? Ah? Well you soon will be.\"");
     Phrases.Add("\"You should not get too comfortable, I see a great change ahead.\"");
 }
Exemplo n.º 4
0
 public void CreatePhrases()
 {
     Phrases.Add("\"Night time is a dark place for you. Be careful of your choices.\"");
     Phrases.Add("\"Joy shines upon you with the coming of the dawn.\"");
     Phrases.Add("\"Stop and wait. Realign your energies. You are in conflict.\"");
     Phrases.Add("\"Now is the time to act! You must make your move immediately!\"");
     Phrases.Add("\"I see shiny objects in your near future.\"");
     Phrases.Add("\"The decorating around you is terrible Feng Shui.\"");
     Phrases.Add("\"Mars is in high sanction - don't start any business ventures.\"");
     Phrases.Add("\"If you always face the light, you will never see shadow.\"");
     Phrases.Add("\"The moon is full.. beware your tomorrows.");
     Phrases.Add("\"Never take your safety for granted. Death watches and paces restlessly.\"");
     Phrases.Add("\"The beautiful emerald resonates with your soul. Your aura will protect you.\"");
 }
Exemplo n.º 5
0
        public void Deserialize(XmlNode node)
        {
            foreach (XmlNode childNode in node.ChildNodes)
            {
                switch (childNode.Name)
                {
                case "Type":
                {
                    int temp;
                    if (Int32.TryParse(childNode.InnerText, out temp))
                    {
                        Type = (ProductInfoType)temp;
                    }
                }
                break;

                case "Selected":
                {
                    bool temp;
                    if (Boolean.TryParse(childNode.InnerText, out temp))
                    {
                        Selected = temp;
                    }
                }
                break;

                case "Group":
                    Group = childNode.InnerText;
                    break;

                case "Phrase":
                    Phrases.Add(childNode.InnerText);
                    break;

                case "UserValue":
                    UserValue = childNode.InnerText;
                    break;
                }
            }
        }
Exemplo n.º 6
0
 //let's create an overloaded method now
 protected void CreatePhrases(string phrase)
 {
     Phrases.Add(phrase);
 }
Exemplo n.º 7
0
 public void CreatePhrases()
 {
     Phrases.Add(" has been to many parts of the world. ");
     Phrases.Add(" was once owned by a white haired man with a beard.");
     Phrases.Add(" will be important to you in a future endeavor.");
 }
Exemplo n.º 8
0
 private void EventHub_HeardSomethingEvent(object sender, HeardSomethingEventArgs e)
 {
     Phrases.Add("You: " + e.Phrase);
 }
Exemplo n.º 9
0
 private void EventHub_StartTalkingEvent(object sender, StartTalkingEventArgs e)
 {
     Phrases.Add(e.Name + ": " + e.Phrase);
 }
Exemplo n.º 10
0
 //overloaded method
 public void CreatePhrases(string phrase)
 {
     Phrases.Add(phrase);//this is an overload - the default() version is in the interface!
 }
Exemplo n.º 11
0
 public void CreatePhrases(string phrase)
 {
     Phrases.Add(phrase);
 }
Exemplo n.º 12
0
 public void CreatePhrases()
 {
     Phrases.Add(" your lifeline is short, but has amazing adventures in your future. ");
     Phrases.Add(" your lifeline is long and prosperous.");
     Phrases.Add(" your lifeline is grand in scale and is awed by many.");
 }