public override void AwakeFromNib() { base.AwakeFromNib(); this.SkipButton.Title = Properties_Resources.SkipTutorial; this.ContinueButton.Title = Properties_Resources.Continue; // this.ContinueButton.KeyEquivalent = "\r"; NSImage image = new NSImage(UIHelpers.GetImagePathname("tutorial-slide-" + Controller.TutorialCurrentPage)) { Size = new SizeF(350, 200) }; TutorialView.Image = image; switch (Controller.TutorialCurrentPage) { case 1: TutorialText.StringValue = String.Format(Properties_Resources.CmisSyncCreates, Properties_Resources.ApplicationName); break; default: break; } }
public override void AwakeFromNib() { base.AwakeFromNib(); this.SideSplashView.Image = new NSImage(UIHelpers.GetImagePathname("side-splash")) { Size = new SizeF(150, 482) }; }
bool LocalPathExistsHandler(string path) { NSAlert alert = NSAlert.WithMessage( String.Format(Properties_Resources.ConfirmExistingLocalFolderText, path), "No, I want to choose another target", "Yes, I understand the risk", null, ""); alert.Icon = new NSImage(UIHelpers.GetImagePathname("process-syncing-error", "icns")); int i = alert.RunModal(); return(i == 0); }
private void CreateAbout() { using (var a = new NSAutoreleasePool()) { string about_image_path = UIHelpers.GetImagePathname("about"); this.about_image = new NSImage(about_image_path) { Size = new SizeF(640, 260) }; this.about_image_view = new NSImageView() { Image = this.about_image, Frame = new RectangleF(0, 0, 640, 260) }; this.version_text_field = new NSTextField() { StringValue = string.Format(Properties_Resources.Version, Controller.RunningVersion, Controller.CreateTime.GetValueOrDefault().ToString("d")), Frame = new RectangleF(295, 140, 318, 22), BackgroundColor = NSColor.White, Bordered = false, Editable = false, DrawsBackground = false, TextColor = NSColor.FromCalibratedRgba(0.45f, 0.62f, 0.81f, 1.0f), Font = NSFontManager.SharedFontManager.FontWithFamily("Lucida Grande", NSFontTraitMask.Unbold, 0, 11) }; this.credits_text_field = new NSTextField() { StringValue = @"Copyright © 2013-" + DateTime.Now.Year + " GRAU DATA AG, Hylke Bons and others." + "\n" + "\n" + "DataSpace Sync is Open Source software. You are free to use, modify, and redistribute it " + "under the GNU General Public License version 3 or later.", Frame = new RectangleF(295, Frame.Height - 260, 318, 98), TextColor = NSColor.FromCalibratedRgba(0.45f, 0.62f, 0.81f, 1.0f), DrawsBackground = false, Bordered = false, Editable = false, Font = NSFontManager.SharedFontManager.FontWithFamily("Lucida Grande", NSFontTraitMask.Unbold, 0, 11), }; ContentView.AddSubview(this.about_image_view); ContentView.AddSubview(this.version_text_field); ContentView.AddSubview(this.credits_text_field); } }
private void CreateAnimationFrames() { this.animation_frames = new NSImage[] { new NSImage(UIHelpers.GetImagePathname("process-syncing-i")), new NSImage(UIHelpers.GetImagePathname("process-syncing-ii")), new NSImage(UIHelpers.GetImagePathname("process-syncing-iii")), new NSImage(UIHelpers.GetImagePathname("process-syncing-iiii")), new NSImage(UIHelpers.GetImagePathname("process-syncing-iiiii")) }; this.animation_frames_active = new NSImage[] { new NSImage(UIHelpers.GetImagePathname("process-syncing-i-active")), new NSImage(UIHelpers.GetImagePathname("process-syncing-ii-active")), new NSImage(UIHelpers.GetImagePathname("process-syncing-iii-active")), new NSImage(UIHelpers.GetImagePathname("process-syncing-iiii-active")), new NSImage(UIHelpers.GetImagePathname("process-syncing-iiiii-active")) }; this.error_image = new NSImage(UIHelpers.GetImagePathname("process-syncing-error")); this.error_image_active = new NSImage(UIHelpers.GetImagePathname("process-syncing-error-active")); }
public override void AwakeFromNib() { base.AwakeFromNib(); this.StartCheck.Title = String.Format(Properties_Resources.Startup, Properties_Resources.ApplicationName); this.FinishButton.Title = Properties_Resources.Finish; // this.FinishButton.KeyEquivalent = "\r"; NSImage image = new NSImage(UIHelpers.GetImagePathname("tutorial-slide-" + Controller.TutorialCurrentPage)) { Size = new SizeF(350, 200) }; TutorialView.Image = image; switch (Controller.TutorialCurrentPage) { case 4: TutorialText.StringValue = Properties_Resources.YouCan; OnStart(this); break; } }
public override void AwakeFromNib() { base.AwakeFromNib(); this.SideSplashView.Image = new NSImage(UIHelpers.GetImagePathname("side-splash")) { Size = new SizeF(150, 482) }; this.Header.StringValue = Properties_Resources.EditTitle; Repo = new RootFolder() { Name = FolderName, Id = Credentials.RepoId, Address = Credentials.Address.ToString() }; Repo.Selected = true; IgnoredFolderLoader.AddIgnoredFolderToRootNode(Repo, Ignores); LocalFolderLoader.AddLocalFolderToRootNode(Repo, localPath); List <RootFolder> repos = new List <RootFolder>(); repos.Add(Repo); Loader = new AsyncNodeLoader(Repo, Credentials, PredefinedNodeLoader.LoadSubFolderDelegate, PredefinedNodeLoader.CheckSubFolderDelegate); CancelButton.Title = Properties_Resources.DiscardChanges; FinishButton.Title = Properties_Resources.SaveChanges; DataDelegate = new OutlineViewDelegate(); DataSource = new CmisTree.CmisTreeDataSource(repos); Outline.DataSource = DataSource; Outline.Delegate = DataDelegate; this.AddressLabel.StringValue = Properties_Resources.CmisWebAddress; this.UserLabel.StringValue = Properties_Resources.User; this.PasswordLabel.StringValue = Properties_Resources.Password; this.AddressText.StringValue = Credentials.Address.ToString(); this.UserText.StringValue = Credentials.UserName; this.PasswordText.StringValue = Credentials.Password.ToString(); this.AddressText.Enabled = false; this.UserText.Enabled = false; this.LoginStatusProgress.IsDisplayedWhenStopped = false; this.LoginStatusLabel.Hidden = true; this.FolderTab.Label = Properties_Resources.AddingFolder; this.CredentialsTab.Label = Properties_Resources.Credentials; switch (this.type) { case EditType.EditFolder: TabView.SelectAt(0); break; case EditType.EditCredentials: TabView.SelectAt(1); break; default: TabView.SelectAt(0); break; } // GUI workaround to remove ignore folder {{ this.TabView.Remove(this.FolderTab); // GUI workaround to remove ignore folder }} Controller.CloseWindowEvent += delegate { Loader.Cancel(); this.Window.PerformClose(this); this.Dispose(); }; InsertEvent(); // must be called after InsertEvent() Loader.Load(Repo); lock (loginLock) isClosed = false; OnPasswordChanged(this); }