Exemplo n.º 1
0
        /// <summary>
        /// Entry method of the application.
        /// </summary>
        /// <param name="args">The program arguments.</param>
        public static void Main(string[] args)
        {
            FritzBox fritzBox = new FritzBox();

            fritzBox.Connect();
            fileHeader = File.ReadAllText("FileHeader.txt");
            string targetDirectory = Path.GetFullPath(Path.Combine(Assembly.GetEntryAssembly().Location, "./../../../../../FritzControl/Soap"));

            new Program().GenerateServiceWrapper(targetDirectory, "FritzControl.Soap", fritzBox.Description.Device);

            // Just for testing: Serialize current description to XML
            // new System.Xml.Serialization.XmlSerializer(fritzBox.Description.GetType()).Serialize(new StreamWriter("Description.xml"), fritzBox.Description);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Entry method of the application.
        /// </summary>
        /// <param name="args">The program arguments.</param>
        public static void Main(string[] args)
        {
#if DEBUG
            InternalLogger.LogToConsole = true;
#endif

            // Example
            // FritzBox fritzBox = new FritzBox { Username = "******", Password = "******", Hostname = "fritz.box" };
            FritzBox fritzBox = new FritzBox();
            fritzBox.Connect();
            X_AVM_DE_Dect dect = new X_AVM_DE_Dect {
                FritzBox = fritzBox
            };
            ushort numberOfDectEntries = dect.GetNumberOfDectEntries();
            for (ushort i = 0; i < numberOfDectEntries; i++)
            {
                var result = dect.GetGenericDectEntry(i);
                Log.Info($"DECT device index {i}");
                Log.Info($"Model: {result.NewModel}");
                Log.Info($"Model: {result.NewName}");
            }

            LogManager.Shutdown();
        }