本文整理汇总了C#中MonoMac.AppKit.NSTextField.RemoveFromSuperview方法的典型用法代码示例。如果您正苦于以下问题:C# NSTextField.RemoveFromSuperview方法的具体用法?C# NSTextField.RemoveFromSuperview怎么用?C# NSTextField.RemoveFromSuperview使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoMac.AppKit.NSTextField
的用法示例。
在下文中一共展示了NSTextField.RemoveFromSuperview方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowPage
//.........这里部分代码省略.........
ShowPasswordCheckButton.SetButtonType (NSButtonType.Switch);
WarningImage = NSImage.ImageNamed ("NSInfo");
WarningImage.Size = new SizeF (24, 24);
WarningImageView = new NSImageView () {
Image = WarningImage,
Frame = new RectangleF (200, Frame.Height - 320, 24, 24)
};
WarningTextField = new SparkleLabel ("This password can’t be changed later, and your files can’t be recovered if it’s forgotten.", NSTextAlignment.Left) {
Frame = new RectangleF (235, Frame.Height - 390, 325, 100),
};
CancelButton = new NSButton () { Title = "Cancel" };
ContinueButton = new NSButton () {
Title = "Continue",
Enabled = false
};
Controller.UpdateCryptoPasswordContinueButtonEvent += delegate (bool button_enabled) {
Program.Controller.Invoke (() => { ContinueButton.Enabled = button_enabled; });
};
Controller.UpdateCryptoSetupContinueButtonEvent += delegate (bool button_enabled) {
Program.Controller.Invoke (() => { ContinueButton.Enabled = button_enabled; });
};
ShowPasswordCheckButton.Activated += delegate {
if (PasswordTextField.Superview == ContentView) {
PasswordTextField.RemoveFromSuperview ();
ContentView.AddSubview (VisiblePasswordTextField);
} else {
VisiblePasswordTextField.RemoveFromSuperview ();
ContentView.AddSubview (PasswordTextField);
}
};
(PasswordTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
VisiblePasswordTextField.StringValue = PasswordTextField.StringValue;
if (type == PageType.CryptoSetup)
Controller.CheckCryptoSetupPage (PasswordTextField.StringValue);
else
Controller.CheckCryptoPasswordPage (PasswordTextField.StringValue);
};
(VisiblePasswordTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
PasswordTextField.StringValue = VisiblePasswordTextField.StringValue;
if (type == PageType.CryptoSetup)
Controller.CheckCryptoSetupPage (PasswordTextField.StringValue);
else
Controller.CheckCryptoPasswordPage (PasswordTextField.StringValue);
};
ContinueButton.Activated += delegate {
if (type == PageType.CryptoSetup)
Controller.CryptoSetupPageCompleted (PasswordTextField.StringValue);
else
Controller.CryptoPasswordPageCompleted (PasswordTextField.StringValue);
};
示例2: ShowPage
//.........这里部分代码省略.........
State = NSCellStateValue.Off
};
ShowPasswordCheckButton.SetButtonType (NSButtonType.Switch);
WarningImage = NSImage.ImageNamed ("NSInfo");
WarningImage.Size = new SizeF (24, 24);
WarningImageView = new NSImageView () {
Image = WarningImage,
Frame = new RectangleF (200, Frame.Height - 320, 24, 24)
};
WarningTextField = new NSTextField () {
Frame = new RectangleF (235, Frame.Height - 390, 325, 100),
StringValue = "This password can't be changed later, and your files can't be recovered if it's forgotten.",
BackgroundColor = NSColor.WindowBackground,
Bordered = false,
Editable = false,
Font = SparkleUI.Font
};
CancelButton = new NSButton () {
Title = "Cancel"
};
ContinueButton = new NSButton () {
Title = "Continue",
Enabled = false
};
ShowPasswordCheckButton.Activated += delegate {
if (PasswordTextField.Superview == ContentView) {
PasswordTextField.RemoveFromSuperview ();
ContentView.AddSubview (VisiblePasswordTextField);
} else {
VisiblePasswordTextField.RemoveFromSuperview ();
ContentView.AddSubview (PasswordTextField);
}
};
(PasswordTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
VisiblePasswordTextField.StringValue = PasswordTextField.StringValue;
Controller.CheckCryptoSetupPage (PasswordTextField.StringValue);
};
(VisiblePasswordTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
PasswordTextField.StringValue = VisiblePasswordTextField.StringValue;
Controller.CheckCryptoSetupPage (PasswordTextField.StringValue);
};
Controller.UpdateCryptoSetupContinueButtonEvent += delegate (bool button_enabled) {
InvokeOnMainThread (() => {
ContinueButton.Enabled = button_enabled;
});
};
ContinueButton.Activated += delegate {
Controller.CryptoSetupPageCompleted (PasswordTextField.StringValue);
};
CancelButton.Activated += delegate {
Controller.CryptoPageCancelled ();
};
示例3: ShowPage
//.........这里部分代码省略.........
ShowPasswordCheckButton.SetButtonType (NSButtonType.Switch);
WarningImage = NSImage.ImageNamed ("NSInfo");
WarningImage.Size = new SizeF (24, 24);
WarningImageView = new NSImageView () {
Image = WarningImage,
Frame = new RectangleF (200, Frame.Height - 320, 24, 24)
};
WarningTextField = new SparkleLabel ("This password can’t be changed later, and your files can’t be recovered if it’s forgotten.", NSTextAlignment.Left) {
Frame = new RectangleF (235, Frame.Height - 390, 325, 100),
};
CancelButton = new NSButton () { Title = "Cancel" };
ContinueButton = new NSButton () {
Title = "Continue",
Enabled = false
};
Controller.UpdateCryptoPasswordContinueButtonEvent += delegate (bool button_enabled) {
SparkleShare.Controller.Invoke (() => { ContinueButton.Enabled = button_enabled; });
};
Controller.UpdateCryptoSetupContinueButtonEvent += delegate (bool button_enabled) {
SparkleShare.Controller.Invoke (() => { ContinueButton.Enabled = button_enabled; });
};
ShowPasswordCheckButton.Activated += delegate {
if (PasswordTextField.Superview == ContentView) {
PasswordTextField.RemoveFromSuperview ();
ContentView.AddSubview (VisiblePasswordTextField);
} else {
VisiblePasswordTextField.RemoveFromSuperview ();
ContentView.AddSubview (PasswordTextField);
}
};
(PasswordTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
VisiblePasswordTextField.StringValue = PasswordTextField.StringValue;
if (type == PageType.CryptoSetup)
Controller.CheckCryptoSetupPage (PasswordTextField.StringValue);
else
Controller.CheckCryptoPasswordPage (PasswordTextField.StringValue);
};
(VisiblePasswordTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
PasswordTextField.StringValue = VisiblePasswordTextField.StringValue;
if (type == PageType.CryptoSetup)
Controller.CheckCryptoSetupPage (PasswordTextField.StringValue);
else
Controller.CheckCryptoPasswordPage (PasswordTextField.StringValue);
};
ContinueButton.Activated += delegate {
if (type == PageType.CryptoSetup)
Controller.CryptoSetupPageCompleted (PasswordTextField.StringValue);
else
Controller.CryptoPasswordPageCompleted (PasswordTextField.StringValue);
};