示例#1
0
        public static async Task StartAsync()
        {
            FreeboxController = new CodeShared.FreeboxControl("http://mafreebox.freebox.fr", AppDataFolder);


            if (FreeboxController.authentification.NeedRegistration)
            {
                FreeboxController.authentification.CreateLogin();

                System.Diagnostics.Debug.WriteLine("Registering app");

                var hostNames = NetworkInformation.GetHostNames();
                var hostName  = hostNames.FirstOrDefault(name => name.Type == HostNameType.DomainName)?.DisplayName ?? "???";

                FreeboxController.MachineName = hostName;
                Task  r = FreeboxController.authentification.RegisterAppAsync();
                await r;
            }
            await FreeboxController.authentification.ConnectAppAsync();
        }
示例#2
0
 public static void Start(string Host, string fileDir)
 {
     fb = new CodeShared.FreeboxControl(Host, fileDir);
 }
 public FreeboxController(string Host, string fileDir)
 {
     fb = new CodeShared.FreeboxControl(Host, fileDir);
 }