Beispiel #1
0
        public FileExplorer(AlbumClientier tier)
        {
            this.tier = tier;

            btUpload.ImageIndex = 0;
            InitializeComponent();

            InitializeTreeListExample();
        }
Beispiel #2
0
        /*
         * public void ok(AnsonResp resp)
         * {
         *  AlbumContext.GetInstance().loggedIn = true;
         *  AlbumContext.GetInstance().client = client;
         *
         *      (SessionClient client) =>
         *      {
         *          client.closeLink();
         *
         *          tier = new AlbumClientier(clientUri, client, errCtx);
         *
         *          client.openLink(clientUri, onHeartbeat, onLinkBroken, 19900); // 4 fails in 3 min
         *                  state = ConnState.Online;
         *                  if (onOk != null)
         *                      onOk.ok(tier);
         *      },
         *      // Design Note: since error context don't have unified error message box,
         *      // error context pattern of React is not applicable.
         *      // errCtx.onError(c, r, (Object)v);
         *      (MsgCode c, string r, object v) => {
         *          state = ConnState.LoginFailed;
         *          if (onErr != null)
         *              onErr.err(c, r, v);
         *      }, photoUser.device);
         * }
         */

        /// <summary>
        /// On login
        /// </summary>
        /// <param name="client"></param>
        public void ok(SessionClient client)
        {
            client.closeLink();
            AlbumClientier tier = new AlbumClientier(AlbumContext.clientUri, client, AlbumContext.GetInstance());

            client.openLink(AlbumContext.clientUri, heartbeatHandler, heartbeatHandler, 19900); // 4 fails in 3 min
            AlbumContext.GetInstance().State(ConnState.Online);

            // if (onOk != null) onOk.ok(tier);
        }