コード例 #1
0
ファイル: AppCore.cs プロジェクト: Henri2h/freebox-controller
        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);
 }
コード例 #3
0
 public FreeboxController(string Host, string fileDir)
 {
     fb = new CodeShared.FreeboxControl(Host, fileDir);
 }