public JetBoxOptionsPage(Lifetime lifetime, IUIApplication environment, ClientFactory clientFactory, JetBoxSettingsStorage jetBoxSettings, JetPopupMenus jetPopupMenus) : base(lifetime, environment, PID) { mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); myLifetimes = new SequentialLifetimes(lifetime); myClient = clientFactory.CreateClient(); myClient.UserLogin = mySettingsStore.GetValue(JetBoxSettingsAccessor.Login); // init UI myLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true }; myLoggedPanel.Controls.Add(myLoginLabel = new RichTextLabel(environment)); myLoggedPanel.Controls.Add(new LinkLabel("Logout", Logout, jetPopupMenus)); myNonLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true, FlowDirection = FlowDirection.TopDown }; myNonLoggedPanel.Controls.Add(new LinkLabel("Login", Login, jetPopupMenus) { Image = Environment.Theming.Icons[UnnamedThemedIcons.Dropbox.Id].CurrentGdipBitmapScreenDpi, ImageAlign = ContentAlignment.MiddleLeft, Padding = new Padding(20, 0, 0, 0) }); Controls.Add(myLoggedPanel); Controls.Add(myNonLoggedPanel); InitLoginState(); }
public JetBoxOptionsPage(Lifetime lifetime, IUIApplication environment, ClientFactory clientFactory, JetBoxSettingsStorage jetBoxSettings, JetPopupMenus jetPopupMenus, OpensUri opensUri) : base(lifetime, environment, PID) { mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); myOpensUri = opensUri; myClient = clientFactory.CreateClient(); myClient.UserLogin = mySettingsStore.GetValue(JetBoxSettingsAccessor.Login); // init UI myLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true }; myLoggedPanel.Controls.Add(myLoginLabel = new RichTextLabel(environment)); myLoggedPanel.Controls.Add(new LinkLabel("Logout", Logout, jetPopupMenus)); myNonLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true, FlowDirection = FlowDirection.TopDown }; myNonLoggedPanel.Controls.Add(new LinkLabel("Login", Login, jetPopupMenus)); myNonLoggedPanel.Controls.Add(new LinkLabel("Get access (click after approving access on the web)", GetInfo, jetPopupMenus)); Controls.Add(myLoggedPanel); Controls.Add(myNonLoggedPanel); InitLoginState(); }
private void InitClient() { myClient = myClientFactory.CreateClient(); myClient.UserLogin = mySettingsStore.GetValue(JetBoxSettingsAccessor.Login); }
public FileChangesVisitor(Client client, FileSystemPath rootFolder) { myClient = client; myRootFolder = rootFolder; }