本文整理汇总了C#中Gtk.ToggledArgs类的典型用法代码示例。如果您正苦于以下问题:C# ToggledArgs类的具体用法?C# ToggledArgs怎么用?C# ToggledArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToggledArgs类属于Gtk命名空间,在下文中一共展示了ToggledArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HandleToggled
void HandleToggled (object o, ToggledArgs args)
{
SetCurrentEventRow ();
var view = (ICheckBoxCellViewFrontend) Frontend;
IDataField field = (IDataField) view.StateField ?? view.ActiveField;
if (!view.RaiseToggled () && (field != null)) {
Type type = field.FieldType;
Gtk.TreeIter iter;
if (TreeModel.GetIterFromString (out iter, args.Path)) {
CheckBoxState newState;
if (view.AllowMixed && type == typeof(CheckBoxState)) {
if (renderer.Inconsistent)
newState = CheckBoxState.Off;
else if (renderer.Active)
newState = CheckBoxState.Mixed;
else
newState = CheckBoxState.On;
} else {
if (renderer.Active)
newState = CheckBoxState.Off;
else
newState = CheckBoxState.On;
}
object newValue = type == typeof(CheckBoxState) ?
(object) newState : (object) (newState == CheckBoxState.On);
CellUtil.SetModelValue (TreeModel, iter, field.Index, type, newValue);
}
}
}
开发者ID:m13253,项目名称:xwt,代码行数:35,代码来源:CustomCellRendererToggle.cs
示例2: FixedToggled
private void FixedToggled (object o, ToggledArgs args)
{
Gtk.TreeIter iter;
if (store.GetIterFromString (out iter, args.Path)) {
bool val = (bool) store.GetValue (iter, 0);
store.SetValue (iter, 0, !val);
}
}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:8,代码来源:DemoListStore.cs
示例3: IncludeCheckBoxToggled
private void IncludeCheckBoxToggled(object o, ToggledArgs args)
{
TreeIter iter;
if (m_configStore.GetIterFromString (out iter, args.Path))
{
ConfigItemSetting itemSetting = (ConfigItemSetting)m_configStore.GetValue(iter, 3);
itemSetting.Include = !itemSetting.Include;
}
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:9,代码来源:ConfigSetupPage.cs
示例4: HandleFilterCellToggled
protected void HandleFilterCellToggled(object o, ToggledArgs args)
{
Gtk.TreeIter iter;
if (store.GetIterFromString (out iter, args.Path)) {
bool active = !((bool)store.GetValue (iter, 1));
UpdateSelection (iter, active);
}
}
开发者ID:GNOME,项目名称:longomatch,代码行数:9,代码来源:FilterBaseView.cs
示例5: InputIncludeCheckBoxToggled
private void InputIncludeCheckBoxToggled(object o, ToggledArgs args)
{
TreeIter iter;
if (m_inputsStore.GetIterFromString (out iter, args.Path))
{
ItemSetting itemSetting = (ItemSetting)m_inputsStore.GetValue(iter, 2);
itemSetting.Include = !itemSetting.Include;
}
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:9,代码来源:IOSpecSetupPage.cs
示例6: HandleToggled
void HandleToggled (object o, ToggledArgs args)
{
TreeIter iter;
Check (store.GetIter (out iter, new TreePath (args.Path)));
var val = !(bool)store.GetValue (iter, COL_SELECTED);
store.SetValue (iter, COL_SELECTED, val);
selectedCount += val ? 1 : -1;
addButton.Sensitive = selectedCount > 0;
}
开发者ID:sushihangover,项目名称:MonoDevelop.AddinMaker,代码行数:10,代码来源:AddAddinReferenceDialog.cs
示例7: ItemToggled
private void ItemToggled (object sender, ToggledArgs args)
{
int column = columns.IndexOf (sender);
Gtk.TreeIter iter;
if (store.GetIterFromString (out iter, args.Path)) {
bool val = (bool) store.GetValue (iter, column);
store.SetValue (iter, column, !val);
}
}
开发者ID:arkydon,项目名称:gtk-sharp,代码行数:10,代码来源:DemoTreeStore.cs
示例8: onCellSelectToggled
void onCellSelectToggled(object o, ToggledArgs args)
{
TreeIter iter;
if (MetersList.GetIter (out iter, new TreePath(args.Path)))
{
bool old = (bool) MetersList.GetValue(iter,1);
MetersList.SetValue(iter, 1, !old);
}
}
开发者ID:QualitySolution,项目名称:Bazar,代码行数:10,代码来源:MetersReport.cs
示例9: crt_toggled
void crt_toggled(object o, ToggledArgs args)
{
TreeIter iter;
Console.WriteLine("Toggled");
Gtk.ListStore store = (Gtk.ListStore) tvBar.Model;
if (store.GetIter (out iter, new TreePath(args.Path))) {
bool old = (bool) store.GetValue(iter, 3);
store.SetValue(iter, 3, !old);
}
}
开发者ID:adivik2000,项目名称:FreeFood,代码行数:11,代码来源:Bar.cs
示例10: OnCellRendererToggled
protected virtual void OnCellRendererToggled(object sender, ToggledArgs e)
{
TreeIter iter;
if (store.GetIter (out iter, new TreePath(e.Path))) {
Addin addin = store.GetValue (iter, 2) as Addin;
bool old = (bool)store.GetValue (iter, 1);
if (addin != null) {
addin.Enabled = !old;
store.SetValue (iter, 1, !old);
}
}
}
开发者ID:garuma,项目名称:zencomic,代码行数:14,代码来源:PreferencesDialog.cs
示例11: DoToggle
private void DoToggle(object sender, ToggledArgs args)
{
ListStore store = (ListStore) this.AreasTreeView.Model;
TreePath path = new TreePath(args.Path);
TreeIter iter;
if(store.GetIter(out iter, path))
{
bool old_value = (bool) store.GetValue(iter, 0);
long area_id = (long) store.GetValue(iter, 2);
if(old_value)
this.SelectedIds.Remove(area_id);
else
this.SelectedIds.Add(area_id);
store.SetValue(iter, 0, !old_value);
}
}
开发者ID:omarkhd,项目名称:gymk,代码行数:16,代码来源:SelectAreasWindow.cs
示例12: HandleToggled
private void HandleToggled (object o, ToggledArgs args)
{
TreeIter iter;
if (m_treeStore.GetIter(out iter, new TreePath(args.Path)))
{
PackageReferenceNode node = (PackageReferenceNode)m_treeStore.GetValue(iter, 0);
node.State = !node.State;
var packageReference = new TraceLab.Core.PackageSystem.PackageReference(node.Package);
if (node.State == false)
{
PackagesViewModelHelper.RemoveReference(m_experiment, packageReference);
}
else if(node.State && !m_experiment.References.Contains(packageReference))
{
PackagesViewModelHelper.AddReference(m_experiment, packageReference);
}
}
}
开发者ID:CoEST,项目名称:TraceLab,代码行数:20,代码来源:PackageReferencesWindow.cs
示例13: ToggleCheckBoxToggled
private void ToggleCheckBoxToggled(object o, ToggledArgs args)
{
Console.WriteLine("ToggleCheckBoxToggled()");
TreeIter iter;
if (this.listStore1.GetIterFromString(out iter, args.Path))
{
bool value = (bool)this.listStore1.GetValue(iter, (int)Column.ToggleCheckBox);
this.listStore1.SetValue(iter, (int)Column.ToggleCheckBox, !value);
}
}
开发者ID:jholland918,项目名称:gtk-sharp-samples,代码行数:10,代码来源:MainWindow.cs
示例14: ToggleRadioButtonToggled
private void ToggleRadioButtonToggled(object o, ToggledArgs args)
{
Console.WriteLine("ToggleRadioButtonToggled()");
TreeIter iter;
// Radio button "group" behavior must be manually implemneted with something like this:
if (this.listStore1.GetIterFirst(out iter))
{
do
{
this.listStore1.SetValue(iter, (int)Column.ToggleRadioButton, false);
}
while (this.listStore1.IterNext(ref iter));
}
if (this.listStore1.GetIterFromString(out iter, args.Path))
{
this.listStore1.SetValue(iter, (int)Column.ToggleRadioButton, true);
}
}
开发者ID:jholland918,项目名称:gtk-sharp-samples,代码行数:20,代码来源:MainWindow.cs
示例15: ItemToggled
private void ItemToggled (object o, ToggledArgs args)
{
Gtk.TreeIter iter;
if (store.GetIterFromString(out iter, args.Path)) {
bool val = (bool) store.GetValue(iter, (int)Columns.Selected);
Breakpoint bp = (Breakpoint) store.GetValue (iter, (int) Columns.Breakpoint);
store.SetValue (iter, (int)Columns.Selected, !val);
bp.Enabled = !bp.Enabled;
}
}
开发者ID:IBBoard,项目名称:monodevelop,代码行数:10,代码来源:BreakpointPad.cs
示例16: OnCellToggled
void OnCellToggled(object sender, ToggledArgs a)
{
TreeIter iter;
if (store.GetIterFromString (out iter, a.Path))
Toggle (iter);
}
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:6,代码来源:AddInManagerDialog.cs
示例17: ItemToggled
private void ItemToggled (object o, ToggledArgs args)
{
Gtk.TreeIter iter;
if (store.GetIterFromString (out iter, args.Path)) {
Task task = (Task)store.GetValue (iter, DataColumns.Task);
task.Completed = !task.Completed;
TaskService.FireTaskToggleEvent (this, new TaskEventArgs (task));
}
}
开发者ID:segaman,项目名称:monodevelop,代码行数:9,代码来源:ErrorListPad.cs
示例18: OnExplicitToggled
void OnExplicitToggled (object o, ToggledArgs args)
{
TreeIter iter;
if (!store.GetIterFromString (out iter, args.Path))
return;
store.SetValue (iter, colExplicitIndex, !GetExplicit (iter));
}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:8,代码来源:OverridesImplementsDialog.cs
示例19: OnReadOnlyToggled
private void OnReadOnlyToggled (object o, ToggledArgs args)
{
TreeIter iter;
if (store.GetIterFromString (out iter, args.Path)) {
IField ifield = (IField) store.GetValue (iter, colFieldIndex);
if (ifield.IsReadonly || ifield.IsLiteral)
return;
bool value = (bool) store.GetValue (iter, colReadOnlyIndex);
store.SetValue (iter, colReadOnlyIndex, !value);
}
}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:12,代码来源:EncapsulateFieldDialog.cs
示例20: OptionToggled
void OptionToggled (object sender, ToggledArgs e)
{
TreeIter iter;
if (this.optionsStore.GetIterFromString (out iter, e.Path)) {
bool toggled = (bool)this.optionsStore.GetValue (iter, 0);
this.optionsStore.SetValue (iter, 0, !toggled);
UpdateRegex ();
}
}
开发者ID:kdubau,项目名称:monodevelop,代码行数:9,代码来源:RegexToolkitWidget.cs
注:本文中的Gtk.ToggledArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论