Example #1
0
File: Apps.cs Project: dnzn/Senko
                public Apps(SonyDevice parent, string file)
                {
                    Parent = parent;

                    if (File.Exists(file))
                    {
                        string json = File.ReadAllText(file);

                        Parse(json);
                    }
                }
Example #2
0
                public Alias(SonyDevice parent, bool autoLoad = true)
                {
                    Parent = parent;

                    AutoLoad = autoLoad;

                    if (AutoLoad)
                    {
                        AutoLoadFile();
                    }
                }
Example #3
0
            public Information(SonyDevice parent, string file)
            {
                Parent = parent;

                // This is temporary. This method will normally access the JSON stream direct from the device and not from a file
                if (File.Exists(file))
                {
                    string json = File.ReadAllText(file);

                    Parse(json);
                }
            }
Example #4
0
        static void Main(string[] args)
        {
            Welcome();

            var dev = new SonyDevice("hub");

            dev.Alias.Add("xbox", "action");

            Kon.WriteLine("Device Model: " + dev.Info.Model);
            Kon.WriteLine("HDMI IRCode: " + dev.Command.Code["Hdmi1"]);
            Kon.WriteLine("Netflix: " + dev.Apps.List["Netflix"]);
            Kon.WriteLine("<test><green><tags>abcdefg\n<testagain>", WriteParameters.MinimalProcessing);
            Kon.WriteLine("Write this with and Indent prefix. Let's see if it works as I expect the program to work.", PrefixType.Indent);
            Kon.WriteLine("Test", WriteParameters.OffTheRecord);
            Kon.WriteLine("The quick brown fox jumps over the lazy dog.\nThe quick brown fox jumps over the lazy dog.");
            Kon.WriteLine("The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. ");
            Kon.WriteLine("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<green>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz<magenta>ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb");
            Kon.WriteLine("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS<green>TUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstu vwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", LongTextFormatting.Truncate);
            Kon.WriteLine("test...");
            Kon.WriteLine(@"https://www.bing.com/search?q=remove+string+from+index+c%23&form=EDGEAR&qs=PF&cvid=d00610ea914c4bc9b5c105a59bd118a6&cc=US&setlang=en-US&plvar=0");

            var colorsplitter = new Color.Splitter(SplitMode.Word, Palette.Rainbow);

            Kon.WriteLine("The quick brown fox jumps over the lazy dog in \"rainbow\" colors", colorsplitter);

            Encapsulator tag = new Encapsulator("<red>", "</>");

            Kon.WriteLine("This should be red.".Encapsulate(tag).Encapsulate("([{<"));

            //WriteLog();

            while (true)
            {
                //string read = Kon.ReadLine();

                //ParseCommand(read);
            }
        }