本文整理汇总了C#中MonoMac.AppKit.NSTableView.SelectRow方法的典型用法代码示例。如果您正苦于以下问题:C# NSTableView.SelectRow方法的具体用法?C# NSTableView.SelectRow怎么用?C# NSTableView.SelectRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoMac.AppKit.NSTableView
的用法示例。
在下文中一共展示了NSTableView.SelectRow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SparkleSetup
//.........这里部分代码省略.........
};
if (Controller.FetchPriorHistory)
HistoryCheckButton.State = NSCellStateValue.On;
HistoryCheckButton.SetButtonType (NSButtonType.Switch);
HistoryCheckButton.Activated += delegate {
Controller.HistoryItemChanged (HistoryCheckButton.State == NSCellStateValue.On);
};
ContentView.AddSubview (HistoryCheckButton);
Controller.ChangeAddressFieldEvent += delegate (string text,
string example_text, FieldState state) {
InvokeOnMainThread (delegate {
AddressTextField.StringValue = text;
AddressTextField.Enabled = (state == FieldState.Enabled);
AddressHelpLabel.StringValue = example_text;
});
};
Controller.ChangePathFieldEvent += delegate (string text,
string example_text, FieldState state) {
InvokeOnMainThread (delegate {
PathTextField.StringValue = text;
PathTextField.Enabled = (state == FieldState.Enabled);
PathHelpLabel.StringValue = example_text;
});
};
TableView.SelectRow (Controller.SelectedPluginIndex, false);
(AddressTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
Controller.CheckAddPage (
AddressTextField.StringValue,
PathTextField.StringValue,
TableView.SelectedRow
);
};
(PathTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
Controller.CheckAddPage (
AddressTextField.StringValue,
PathTextField.StringValue,
TableView.SelectedRow
);
};
(TableView.Delegate as SparkleTableViewDelegate).SelectionChanged += delegate {
Controller.SelectedPluginChanged (TableView.SelectedRow);
Controller.CheckAddPage (
AddressTextField.StringValue,
PathTextField.StringValue,
TableView.SelectedRow
);
};
Controller.UpdateAddProjectButtonEvent += delegate (bool button_enabled) {
InvokeOnMainThread (delegate {
AddButton.Enabled = button_enabled;
});
};
示例2: ShowPage
//.........这里部分代码省略.........
HistoryCheckButton.State = NSCellStateValue.On;
HistoryCheckButton.SetButtonType (NSButtonType.Switch);
AddButton = new NSButton () {
Title = "Add",
Enabled = false
};
CancelButton = new NSButton () {
Title = "Cancel"
};
Controller.ChangeAddressFieldEvent += delegate (string text,
string example_text, FieldState state) {
InvokeOnMainThread (delegate {
AddressTextField.StringValue = text;
AddressTextField.Enabled = (state == FieldState.Enabled);
AddressHelpLabel.StringValue = example_text;
});
};
Controller.ChangePathFieldEvent += delegate (string text,
string example_text, FieldState state) {
InvokeOnMainThread (delegate {
PathTextField.StringValue = text;
PathTextField.Enabled = (state == FieldState.Enabled);
PathHelpLabel.StringValue = example_text;
});
};
TableView.SelectRow (Controller.SelectedPluginIndex, false);
TableView.ScrollRowToVisible (Controller.SelectedPluginIndex);
(AddressTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow);
};
(PathTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow);
};
(TableView.Delegate as SparkleTableViewDelegate).SelectionChanged += delegate {
Controller.SelectedPluginChanged (TableView.SelectedRow);
Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow);
};
HistoryCheckButton.Activated += delegate {
Controller.HistoryItemChanged (HistoryCheckButton.State == NSCellStateValue.On);
};
AddButton.Activated += delegate {
Controller.AddPageCompleted (AddressTextField.StringValue, PathTextField.StringValue);
};
CancelButton.Activated += delegate {
Controller.PageCancelled ();
};
Controller.UpdateAddProjectButtonEvent += delegate (bool button_enabled) {
InvokeOnMainThread (delegate {
AddButton.Enabled = button_enabled;
});
};
示例3: SparkleSetup
//.........这里部分代码省略.........
TableView.AddColumn (IconColumn);
TableView.AddColumn (DescriptionColumn);
DataSource = new SparkleDataSource ();
foreach (SparklePlugin plugin in Controller.Plugins)
DataSource.Items.Add (plugin);
TableView.DataSource = DataSource;
TableView.ReloadData ();
Controller.ChangeAddressFieldEvent += delegate (string text,
string example_text, FieldState state) {
InvokeOnMainThread (delegate {
AddressTextField.StringValue = text;
AddressTextField.Enabled = (state == FieldState.Enabled);
});
};
Controller.ChangePathFieldEvent += delegate (string text,
string example_text, FieldState state) {
InvokeOnMainThread (delegate {
PathTextField.StringValue = text;
PathTextField.Enabled = (state == FieldState.Enabled);
if (!string.IsNullOrEmpty (example_text))
PathHelpLabel.StringValue = "e.g. " + example_text;
});
};
TableView.SelectRow (Controller.SelectedPluginIndex, false);
(AddressTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
Controller.CheckAddPage (
AddressTextField.StringValue,
PathTextField.StringValue,
TableView.SelectedRow
);
};
(PathTextField.Delegate as SparkleTextFieldDelegate).StringValueChanged += delegate {
Controller.CheckAddPage (
AddressTextField.StringValue,
PathTextField.StringValue,
TableView.SelectedRow
);
};
(TableView.Delegate as SparkleTableViewDelegate).SelectionChanged += delegate {
Controller.SelectedPluginChanged (TableView.SelectedRow);
Controller.CheckAddPage (
AddressTextField.StringValue,
PathTextField.StringValue,
TableView.SelectedRow
);
};
Controller.UpdateAddProjectButtonEvent += delegate (bool button_enabled) {
InvokeOnMainThread (delegate {
SyncButton.Enabled = button_enabled;
});
};