本文整理汇总了C#中Gtk.EditedArgs类的典型用法代码示例。如果您正苦于以下问题:C# EditedArgs类的具体用法?C# EditedArgs怎么用?C# EditedArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EditedArgs类属于Gtk命名空间,在下文中一共展示了EditedArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HandleEdited
void HandleEdited (object o, EditedArgs args, int column)
{
TreeIter iter;
store.GetIterFromString (out iter, args.Path);
if (!store.IterIsValid (iter))
return;
string newText = args.NewText;
if (column == 0)
newText = Switch.EspaceSwitchName (newText);
else if (column == 1)
newText = Switch.EscapeSwitchDefine (newText);
store.SetValue (iter, column, newText);
Switch s = store.GetValue (iter, 3) as Switch;
if (s != null)
target.RemoveSwitch (s);
s = new Switch (store.GetValue (iter, 0) as string,
store.GetValue (iter, 1) as string,
store.GetValue (iter, 2) as string);
store.SetValue (iter, 3, s);
target.AddSwitch (s);
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:26,代码来源:MakefileSwitchEditorWidget.cs
示例2: AliasEdited
private void AliasEdited (object o, EditedArgs args)
{
TreeIter iter;
if (m_configStore.GetIterFromString (out iter, args.Path))
{
ConfigItemSetting itemSetting = (ConfigItemSetting)m_configStore.GetValue(iter, 2);
itemSetting.Alias = args.NewText;
}
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:9,代码来源:ConfigSetupPage.cs
示例3: HandleEdited
void HandleEdited (object o, EditedArgs args)
{
SetCurrentEventRow ();
var view = (ITextCellViewFrontend) Frontend;
if (!view.RaiseTextChanged () && view.TextField != null) {
Gtk.TreeIter iter;
if (TreeModel.GetIterFromString (out iter, args.Path))
CellUtil.SetModelValue (TreeModel, iter, view.TextField.Index, view.TextField.FieldType, args.NewText);
}
}
开发者ID:m13253,项目名称:xwt,代码行数:11,代码来源:CustomCellRendererText.cs
示例4: HandleSummaryCellEdited
private void HandleSummaryCellEdited(object o, EditedArgs args)
{
TreeIter iter;
taskList.GetIterFromString(out iter, args.Path);
taskList.SetValue(iter, 1, args.NewText);
tasks.Load();
int id = Convert.ToInt32((string) taskList.GetValue(iter, 3));
Task task = tasks.Find(id);
if (task != null)
{
task.Summary = args.NewText;
}
tasks.Save();
}
开发者ID:DavidMulder,项目名称:Task-Tracker,代码行数:15,代码来源:TaskWindow.cs
示例5: OnVisibilityEdited
private void OnVisibilityEdited (object sender, EditedArgs args)
{
TreeIter iter;
if (store.GetIterFromString (out iter, args.Path))
store.SetValue (iter, colVisibilityIndex, args.NewText);
}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:6,代码来源:EncapsulateFieldDialog.cs
示例6: OnAfterLabelEdit
/// <summary>User has finished renamed a node.</summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="NodeLabelEditEventArgs"/> instance containing the event data.</param>
private void OnAfterLabelEdit(object sender, EditedArgs e)
{
// TreeView.ContextMenuStrip = this.PopupMenu;
if (Renamed != null && !string.IsNullOrEmpty(e.NewText))
{
NodeRenameArgs args = new NodeRenameArgs()
{
NodePath = this.nodePathBeforeRename,
NewName = e.NewText
};
Renamed(this, args);
if (!args.CancelEdit)
previouslySelectedNodePath = args.NodePath;
}
}
开发者ID:hut104,项目名称:ApsimX,代码行数:18,代码来源:ExplorerView.cs
示例7: SpinTest1Edited
private void SpinTest1Edited(object o, EditedArgs args)
{
Console.WriteLine("SpinTest1Edited()");
// Note: The args.NewText value must be parsed into the same
// data type specified for the column in the model. If it isn't then
// the model's SetValue() method will not work.
float val;
if (!float.TryParse(args.NewText, out val))
{
// Maybe alert the user of invalid data entered here.
return;
}
TreeIter iter;
this.listStore1.GetIterFromString(out iter, args.Path);
this.listStore1.SetValue(iter, (int)Column.Spin, val);
}
开发者ID:jholland918,项目名称:gtk-sharp-samples,代码行数:18,代码来源:MainWindow.cs
示例8: HandleExcludedAssembliesEdited
private void HandleExcludedAssembliesEdited(object o, EditedArgs args)
{
EditItem(this.treeviewExcludedAssemblies, args);
}
开发者ID:Monobjc,项目名称:monobjc-monodevelop,代码行数:4,代码来源:ProjectOptionsWidget.cs
示例9: item_name_Edited
void item_name_Edited(object o, EditedArgs args)
{
Gtk.TreeModel mod;
Gtk.TreeIter iter;
TreePath[] paths = treeview_inv.Selection.GetSelectedRows(out mod);
if (mod.GetIter(out iter, paths[0]))
{
InventoryBase item = (InventoryBase)mod.GetValue(iter, 3);
if(item.UUID==MainClass.client.Inventory.Store.RootFolder.UUID || item.UUID==MainClass.client.Inventory.Store.LibraryFolder.UUID)
{
args.RetVal=true;
return;
}
if(item is InventoryItem)
MainClass.client.Inventory.MoveItem(item.UUID,item.ParentUUID,args.NewText);
if(item is InventoryFolder)
MainClass.client.Inventory.MoveFolder(item.UUID, item.ParentUUID, args.NewText);
inventory.SetValue(filter.ConvertIterToChildIter(iter), 1, args.NewText);
args.RetVal = false;
}
}
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:26,代码来源:Inventory.cs
示例10: OnCountSpinEdited
void OnCountSpinEdited(object o, EditedArgs args)
{
TreeIter iter;
if (!NomenclatureStore.GetIterFromString (out iter, args.Path))
return;
int count;
if (int.TryParse (args.NewText, out count))
{
NomenclatureStore.SetValue (iter, (int)NomenclatureCol.count, count);
}
}
开发者ID:QualitySolution,项目名称:CupboardDesigner,代码行数:11,代码来源:Basis.cs
示例11: OnCategoryEdited
void OnCategoryEdited (object sender, EditedArgs args)
{
TreeIter iter;
if (!store.GetIterFromString (out iter, args.Path))
return;
string old = (string) store.GetValue (iter, 0);
if (args.NewText.Length == 0) {
options.Categories.Remove (old);
store.Remove (ref iter);
} else {
int i = options.Categories.IndexOf (old);
if (i == -1)
options.Categories.Add (args.NewText);
else
options.Categories [i] = args.NewText;
store.SetValue (iter, 0, args.NewText);
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:19,代码来源:NUnitOptionsPanel.cs
示例12: OnTextEdited
private void OnTextEdited( object sender, EditedArgs args )
{
TreeIter iter;
store.GetIter( out iter, new TreePath( args.Path ) );
HTreeNode node = getNodeFromIter( iter );
node.Text = args.NewText;
if( NodeEdited != null ) NodeEdited( this, new NodeEventArgs( node ) );
}
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:8,代码来源:HTreeView.cs
示例13: OnPriceEdited
void OnPriceEdited(object o, EditedArgs args)
{
TreeIter iter;
Decimal NewValue;
if (!ComponentsStore.GetIterFromString (out iter, args.Path))
return;
try {
if (args.NewText == null)
NewValue = 0;
else
NewValue = Decimal.Parse (args.NewText);
ComponentsStore.SetValue(iter, (int)ComponentCol.price, (NewValue).ToString());
CalculateTotalPrice ();
} catch(Exception e) { logger.Warn (e, "Error occured in OnPriceEdited");}
}
开发者ID:QualitySolution,项目名称:CupboardDesigner,代码行数:15,代码来源:Order.cs
示例14: OnMaterialComboEdited
void OnMaterialComboEdited(object o, EditedArgs args)
{
TreeIter iter, RefIter;
if (!ComponentsStore.GetIterFromString (out iter, args.Path))
return;
if(args.NewText == null) {
logger.Warn("newtext is empty");
return;
}
if(ListStoreWorks.SearchListStore((ListStore)MaterialNameList, args.NewText, out RefIter)) {
ComponentsStore.SetValue(iter, (int)ComponentCol.material, args.NewText);
ComponentsStore.SetValue(iter, (int)ComponentCol.material_id, MaterialNameList.GetValue(RefIter, 1));
}
}
开发者ID:QualitySolution,项目名称:CupboardDesigner,代码行数:14,代码来源:Order.cs
示例15: OnDiscountEdited
void OnDiscountEdited(object o, EditedArgs args)
{
TreeIter iter;
int discount;
if (!ComponentsStore.GetIterFromString (out iter, args.Path))
return;
if (args.NewText == null){
logger.Warn ("text is empty");
return;
}
if (int.TryParse (args.NewText, out discount)) {
ComponentsStore.SetValue (iter, (int)ComponentCol.discount, discount);
CalculateTotalPrice ();
}
}
开发者ID:QualitySolution,项目名称:CupboardDesigner,代码行数:16,代码来源:Order.cs
示例16: OnServicePriceEdited
void OnServicePriceEdited(object o, EditedArgs args)
{
TreeIter iter;
if (!ServiceListStore.GetIterFromString (out iter, args.Path))
return;
decimal Price;
decimal count = (decimal)ServiceListStore.GetValue (iter, (int)ServiceCol.count);
if (decimal.TryParse (args.NewText, out Price))
{
ServiceListStore.SetValue (iter, (int)ServiceCol.price, Price);
ServiceListStore.SetValue (iter, (int)ServiceCol.sum, Price * count);
CalculateServiceSum ();
}
}
开发者ID:QualitySolution,项目名称:Bazar,代码行数:14,代码来源:Contract.cs
示例17: OnCostSpinEdited
void OnCostSpinEdited(object o, EditedArgs args)
{
TreeIter iter;
if (!ServiceListStore.GetIterFromString (out iter, args.Path))
return;
double Cost;
if (double.TryParse (args.NewText, out Cost))
{
ServiceListStore.SetValue (iter, 3, Cost);
CalculateTotal ();
}
}
开发者ID:QualitySolution,项目名称:CarGlass,代码行数:12,代码来源:Order.cs
示例18: RefTableEdited
private void RefTableEdited (object sender, EditedArgs args)
{
TreeIter iter;
if (store.GetIterFromString (out iter, args.Path)) {
if (tables.Contains (args.NewText)) {
store.SetValue (iter, colReferenceTableIndex, args.NewText);
SetSelectionFromIter (iter);
EmitContentChanged ();
} else {
string oldText = store.GetValue (iter, colReferenceTableIndex) as string;
(sender as CellRendererText).Text = oldText;
}
}
}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:14,代码来源:ForeignKeyConstraintEditorWidget.cs
示例19: OnAmountEdited
private void OnAmountEdited (object sender, EditedArgs args)
{
TreeModel filter = locationsView.Model;
TreeIter iter;
filter.GetIter (out iter, new TreePath (args.Path));
(filter.GetValue (iter, 0) as Location).Amount = int.Parse(args.NewText);
}
开发者ID:konne88,项目名称:MyInventory,代码行数:7,代码来源:LocationsBox.cs
示例20: NameEdited
private void NameEdited (object sender, EditedArgs args)
{
TreeIter iter;
if (store.GetIterFromString (out iter, args.Path)) {
if (!string.IsNullOrEmpty (args.NewText)) {
store.SetValue (iter, colNameIndex, args.NewText);
EmitContentChanged ();
} else {
string oldText = store.GetValue (iter, colNameIndex) as string;
(sender as CellRendererText).Text = oldText;
}
}
}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:13,代码来源:ForeignKeyConstraintEditorWidget.cs
注:本文中的Gtk.EditedArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论