当前位置: 首页>>代码示例>>C#>>正文


C# GLib.Value类代码示例

本文整理汇总了C#中GLib.Value的典型用法代码示例。如果您正苦于以下问题:C# GLib.Value类的具体用法?C# GLib.Value怎么用?C# GLib.Value使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GLib.Value类属于命名空间,在下文中一共展示了GLib.Value类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BuildOrder

        /* View Methods */
        public void BuildOrder(StockItem s)
        {
            String selected = s.StockCode;

            //Clear & populate list
            combobox2.Clear ();
            CellRendererText cell = new CellRendererText ();
            combobox2.PackStart (cell, false);
            combobox2.AddAttribute (cell, "text", 0);
            ListStore store = new ListStore (typeof(string));
            combobox2.Model = store;

            foreach (KeyValuePair<String, StockItem> kv in stock_list) {
                store.AppendValues (kv.Value.StockCode);
            }

            //Make selected item active
            combobox2.Model = store;
            TreeIter iter;
            combobox2.Model.GetIterFirst (out iter);
            do {
                GLib.Value thisRow = new GLib.Value ();
                combobox2.Model.GetValue (iter, 0, ref thisRow);
                if ((thisRow.Val as string).Equals (selected)) {
                    combobox2.SetActiveIter (iter);
                    break;
                }
            } while (combobox2.Model.IterNext (ref iter));

            //Refresh order information
            OrderData ();
        }
开发者ID:geekscruff,项目名称:m3app1,代码行数:33,代码来源:OrderView.cs

示例2: GetCurrentValue

		public void GetCurrentValue (ref GLib.Value value)
		{
			if (rangeValueProvider != null) {
				value = new GLib.Value (rangeValueProvider.Value);
				return;
			}
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:SplitContainer.cs

示例3: AddStringValue

 public void AddStringValue (TagMergeMode mode, string tag, string value)
 {
     GLib.Value val = new GLib.Value (GLib.GType.String);
     val.Val = value;
     IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
     gst_tag_list_add_value (raw, mode, native_tag, ref val);
     GLib.Marshaller.Free (native_tag);
 }
开发者ID:h0rm,项目名称:No.Noise,代码行数:8,代码来源:TagList.cs

示例4: GetProperty

 //[DllImport ("libgobject-2.0.so.0")]
 //private static extern void g_object_get_property (IntPtr gobject, IntPtr property_name, ref GLib.Value value);
 public GLib.Value GetProperty(string name)
 {
     GLib.Value val = new GLib.Value ();
     IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
     g_object_set_property (raw, native_name, ref val);
     GLib.Marshaller.Free (native_name);
     return val;
 }
开发者ID:dgupta,项目名称:banshee-community-extension-fakefork-,代码行数:10,代码来源:GstObject.cs

示例5: ChildGetProperty

		public GLib.Value ChildGetProperty (Gtk.Widget child, string property_name) {
			GLib.Value value = new GLib.Value ();

			IntPtr native = GLib.Marshaller.StringToPtrGStrdup (property_name);
			gtksharp_container_child_get_property (Handle, child.Handle, native, ref value);
			GLib.Marshaller.Free (native);
			return value;
		}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:8,代码来源:Container.cs

示例6: GetStringProperty

 public string GetStringProperty (string name)
 {
     GLib.Value val = new GLib.Value ();
     val.Init (GLib.GType.String);
     IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
     g_object_get_property (raw, native_name, ref val);
     GLib.Marshaller.Free (native_name);
     return val.Val as string;
 }
开发者ID:h0rm,项目名称:No.Noise,代码行数:9,代码来源:GstObject.cs

示例7: GetProperty

 public IntPtr GetProperty (string name)
 {
     GLib.Value val = new GLib.Value ();
     val.Init (GLib.GType.Object);
     IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
     g_object_get_property (raw, native_name, ref val);
     GLib.Marshaller.Free (native_name);
     return ((GLib.Object)(val.Val)).Handle;
 }
开发者ID:h0rm,项目名称:No.Noise,代码行数:9,代码来源:GstObject.cs

示例8: GetValue

		public override void GetValue (Gtk.TreeIter iter, int column, ref GLib.Value val)
		{
			Node node = (Node) iter;
			if (column == 0)
				val = new GLib.Value (node.Name);
			else if (column == 1) {
				double percent = (double) node.Value / (double) total_hits * 100.0;
				val = new GLib.Value (String.Format ("{0,5:F2}%", percent));
			}
		}		
开发者ID:FreeBSD-DotNet,项目名称:mono-tools,代码行数:10,代码来源:StatStore.cs

示例9: Gtk3FontChooserDialog

		public Gtk3FontChooserDialog (string title, Gtk.Window parent = null) : base (IntPtr.Zero)
		{
			IntPtr ptitle = GLib.Marshaller.StringToPtrGStrdup (title);
			Raw = gtk_font_chooser_dialog_new(ptitle, parent == null ? IntPtr.Zero : parent.Handle);
			GLib.Marshaller.Free (ptitle);

			using (GLib.Value val = new GLib.Value (true)) {
				SetProperty ("show-preview-entry", val);
			}
		}
开发者ID:m13253,项目名称:xwt,代码行数:10,代码来源:Gtk3FontChooserDialog.cs

示例10: InternalChanged

		private void InternalChanged ()
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (1);
			GLib.Value[] vals = new GLib.Value [1];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:11,代码来源:ModifierStyle.cs

示例11: OnChangedChannels

		protected virtual void OnChangedChannels ()
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (1);
			GLib.Value[] vals = new GLib.Value [1];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}
开发者ID:joeshaw,项目名称:libredcarpet,代码行数:11,代码来源:World.cs

示例12: BaconResize

            public BaconResize (Gtk.Window window) : base (IntPtr.Zero)
            {
                this.window = window;

                GLib.Value window_val = new GLib.Value (window);
                CreateNativeObject (
                    new string [] { "video-widget" },
                    new GLib.Value [] { window_val }
                );
                window_val.Dispose ();
            }
开发者ID:haugjan,项目名称:banshee-hacks,代码行数:11,代码来源:FullscreenAdapter.cs

示例13: OnSubworldRemoved

		protected virtual void OnSubworldRemoved (RC.World subworld)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (subworld);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}
开发者ID:joeshaw,项目名称:libredcarpet,代码行数:13,代码来源:WorldMulti.cs

示例14: OnPluginLoaded

		protected virtual void OnPluginLoaded (Ethos.PluginInfo plugin_info)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (plugin_info);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}
开发者ID:chergert,项目名称:ethos,代码行数:13,代码来源:Manager.cs

示例15: OnPackage

		protected virtual void OnPackage (PackageKit.PackageObj obj)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (obj);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}
开发者ID:zodman,项目名称:PackageKit,代码行数:13,代码来源:ServicePack.cs


注:本文中的GLib.Value类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。