• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Bind类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Bind

        public override void Bind(Bind Options)
        {
            Console.WriteLine ("Bind Account:{0} PIN:{1}",
                Options.Account.Value, Options.PIN.Value);

            TicketBroker TicketBroker = new TicketBroker () ;

            TicketBroker.Bind (Options.Account.Value, Options.PIN.Value);
        }
开发者ID:hallambaker,项目名称:Omnibroker,代码行数:9,代码来源:Dispatch.cs


示例2: Window

 public Window(Main _controller, Model.Buffer _model)
 {
     Controller = _controller;
     Model = new Bind<Model.Buffer>(_model);
     CurrentMode = new BindList<WindowMode>();
     CurrentMode.Event.Changed += (list) => { CurrentKeyMap = list.FoldLeft(EmptyKeyMap, (a, b) => a + b.KeyMap); };
     CurrentMode.Add(Controller.WindowModes[0]);
     CurrentMode.Add(Controller.WindowModes[2]);
     CurrentMode.Add(Controller.WindowModes[3]);
     Parser = new CommandParser();
 }
开发者ID:cpdean,项目名称:di,代码行数:11,代码来源:Window.cs


示例3: Window

 public Window(Main _controller, Model.Buffer _model)
 {
     Controller = _controller;
     Model = new Bind<Model.Buffer>(_model);
     CurrentMode = new BindSet<WindowMode>();
     CurrentMode.Changed.Add(() =>
     {
         CurrentKeyMap = CurrentMode.ToList().FoldLeft(EmptyKeyMap, (a, b) => a + b.KeyMap);
     });
     DefaultMode.ForEach(CurrentMode.Add);
     Parser = new CommandParser();
 }
开发者ID:ktvoelker,项目名称:di,代码行数:12,代码来源:Window.cs


示例4: BindData

 public BindData(Bind bind)
 {
     control = bind.control;
     keys = bind.keys;
 }
开发者ID:ddionisio,项目名称:1GAM_01_Aries,代码行数:5,代码来源:InputManager.cs


示例5: Cursor

 public new DatePicker Cursor( Bind<System.Windows.Input.Cursor> bind )
 {
     return  base.Cursor( bind ) as DatePicker;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:4,代码来源:Builder.cs


示例6: TranslateType

        void TranslateType(Bind.Structures.Type type,
            XPathNavigator function_override, XPathNavigator overrides,
            EnumProcessor enum_processor, EnumCollection enums,
            string category, string apiname)
        {
            Bind.Structures.Enum @enum;
            string s;

            category = enum_processor.TranslateEnumName(category);

            // Try to find out if it is an enum. If the type exists in the normal GLEnums list, use this.
            // Special case for Boolean which is there simply because C89 does not support bool types.
            // We don't really need that in C#
            bool normal =
                enums.TryGetValue(type.CurrentType, out @enum) ||
                enums.TryGetValue(enum_processor.TranslateEnumName(type.CurrentType), out @enum);

            // Translate enum types
            type.IsEnum = false;
            if (normal && @enum.Name != "GLenum" && @enum.Name != "Boolean")
            {
                type.IsEnum = true;

                if ((Settings.Compatibility & Settings.Legacy.ConstIntEnums) != Settings.Legacy.None)
                {
                    type.QualifiedType = "int";
                }
                else
                {
                    // Some functions and enums have the same names.
                    // Make sure we reference the enums rather than the functions.
                    if (normal)
                    {
                        type.QualifiedType = String.Format("{0}.{1}", Settings.EnumsOutput, @enum.Name);
                    }
                }
            }
            else if (Generator.GLTypes.TryGetValue(type.CurrentType, out s))
            {
                // Check if the parameter is a generic GLenum. If it is, search for a better match,
                // otherwise fallback to Settings.CompleteEnumName (named 'All' by default).
                if (s.Contains("GLenum") /*&& !String.IsNullOrEmpty(category)*/)
                {
                    type.IsEnum = true;

                    if ((Settings.Compatibility & Settings.Legacy.ConstIntEnums) != Settings.Legacy.None)
                    {
                        type.QualifiedType = "int";
                    }
                    else
                    {
                        // Better match: enum.Name == function.Category (e.g. GL_VERSION_1_1 etc)
                        // Note: for backwards compatibility we use "category" only for the gl api.
                        // glcore, gles1 and gles2 use the All enum instead.
                        if (apiname == "gl" && enums.ContainsKey(category))
                        {
                            type.QualifiedType = String.Format("{0}{1}{2}", Settings.EnumsOutput,
                                Settings.NamespaceSeparator, enum_processor.TranslateEnumName(category));
                        }
                        else
                        {
                            type.QualifiedType = String.Format("{0}{1}{2}", Settings.EnumsOutput,
                                Settings.NamespaceSeparator, Settings.CompleteEnumName);
                        }
                    }
                }
                else
                {
                    // Todo: what is the point of this here? It is overwritten below.
                    // A few translations for consistency
                    switch (type.CurrentType.ToLower())
                    {
                        case "string":
                            type.QualifiedType = "String";
                            break;
                    }

                    type.QualifiedType = s;
                }
            }

            type.CurrentType =
                Generator.CSTypes.ContainsKey(type.CurrentType) ?
                Generator.CSTypes[type.CurrentType] : type.CurrentType;

            // Make sure that enum parameters follow enum overrides, i.e.
            // if enum ErrorCodes is overriden to ErrorCode, then parameters
            // of type ErrorCodes should also be overriden to ErrorCode.
            XPathNavigator enum_override = overrides.SelectSingleNode(
                EnumProcessor.GetOverridesPath(apiname, type.CurrentType));
            if (enum_override != null)
            {
                // For consistency - many overrides use string instead of String.
                if (enum_override.Value == "string")
                    type.QualifiedType = "String";
                else if (enum_override.Value == "StringBuilder")
                    type.QualifiedType = "StringBuilder";
                else
                    type.CurrentType = enum_override.Value;
            }
//.........这里部分代码省略.........
开发者ID:PieterMarius,项目名称:PhysicsEngine,代码行数:101,代码来源:FuncProcessor.cs


示例7: Visibility

 public new AccessText Visibility( Bind<System.Windows.Visibility> bind )
 {
     return  base.Visibility( bind ) as AccessText;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:4,代码来源:Builder.cs


示例8: Write

 public void Write(Bind.Structures.Function f)
 {
     foreach (string s in splitLines.Split(f.ToString()))
         WriteLine(s);
 }
开发者ID:WolfgangSt,项目名称:axiom,代码行数:5,代码来源:BindStreamWriter.cs


示例9: Handle_Bind

        private static void Handle_Bind(
					OBPClient Dispatch, string[] args, int index)
        {
            Bind		Options = new Bind ();

            Registry Registry = new Registry ();

            Options.Account.Register ("account", Registry, (int) TagType_Bind.Account);
            Options.PIN.Register ("pin", Registry, (int) TagType_Bind.PIN);
            Options.Server.Register ("server", Registry, (int) TagType_Bind.Server);
            Options.Port.Register ("port", Registry, (int) TagType_Bind.Port);

            // looking for parameter Param.Name}
            if (index < args.Length && !IsFlag (args [index][0] )) {
                // Have got the parameter, call the parameter value method
                Options.Account.Parameter (args [index]);
                index++;
                }
            // looking for parameter Param.Name}
            if (index < args.Length && !IsFlag (args [index][0] )) {
                // Have got the parameter, call the parameter value method
                Options.PIN.Parameter (args [index]);
                index++;
                }

            #pragma warning disable 162
            for (int i = index; i< args.Length; i++) {
                if 	(!IsFlag (args [i][0] )) {
                    throw new Exception ("Unexpected parameter: " + args[i]);}
                string Rest = args [i].Substring (1);

                TagType_Bind TagType = (TagType_Bind) Registry.Find (Rest);

                // here have the cases for what to do with it.

                switch (TagType) {
                    case TagType_Bind.Server : {
                        int OptionParams = Options.Server.Tag (Rest);

                        if (OptionParams>0 && ((i+1) < args.Length)) {
                            if 	(!IsFlag (args [i+1][0] )) {
                                i++;
                                Options.Server.Parameter (args[i]);
                                }
                            }
                        break;
                        }
                    case TagType_Bind.Port : {
                        int OptionParams = Options.Port.Tag (Rest);

                        if (OptionParams>0 && ((i+1) < args.Length)) {
                            if 	(!IsFlag (args [i+1][0] )) {
                                i++;
                                Options.Port.Parameter (args[i]);
                                }
                            }
                        break;
                        }
                    default : throw new Exception ("Internal error");
                    }
                }

            #pragma warning restore 162
            Dispatch.Bind (Options);
        }
开发者ID:hallambaker,项目名称:Omnibroker,代码行数:65,代码来源:OBPClient.cs


示例10: Height

 public Control Height( Bind<double> height )
 {
     C.Height = height.V;
     return this;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:5,代码来源:Control.cs


示例11: AllowDrop

 public new DatePicker AllowDrop( Bind<System.Boolean> bind )
 {
     return  base.AllowDrop( bind ) as DatePicker;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:4,代码来源:Builder.cs


示例12: Width

 public new AccessText Width( Bind<System.Double> bind )
 {
     return  base.Width( bind ) as AccessText;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:4,代码来源:Builder.cs


示例13: AllowDrop

 public Control AllowDrop( Bind<bool> allowDrop )
 {
     C.AllowDrop = allowDrop.V;
     return this;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:5,代码来源:Control.cs


示例14: ContextMenu

 public new DatePicker ContextMenu( Bind<System.Windows.Controls.ContextMenu> bind )
 {
     return  base.ContextMenu( bind ) as DatePicker;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:4,代码来源:Builder.cs


示例15: ClipToBounds

 public new DatePicker ClipToBounds( Bind<System.Boolean> bind )
 {
     return  base.ClipToBounds( bind ) as DatePicker;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:4,代码来源:Builder.cs


示例16: CalendarStyle

 public DatePicker CalendarStyle( Bind<System.Windows.Style> bind )
 {
     C.CalendarStyle = bind.V;
     return this;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:5,代码来源:Builder.cs


示例17: BorderThickness

 public DatePicker BorderThickness( Bind<System.Windows.Thickness> bind )
 {
     C.BorderThickness = bind.V;
     return this;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:5,代码来源:Builder.cs


示例18: BorderBrush

 public DatePicker BorderBrush( Bind<System.Windows.Media.Brush> bind )
 {
     C.BorderBrush = bind.V;
     return this;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:5,代码来源:Builder.cs


示例19: Background

 public Control Background( Bind<System.Windows.Media.Brush> background )
 {
     C.Background = background;
     return this;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:5,代码来源:Control.cs


示例20: DataContext

 public new DatePicker DataContext( Bind<System.Object> bind )
 {
     return  base.DataContext( bind ) as DatePicker;
 }
开发者ID:jcoder58,项目名称:WPFSharp,代码行数:4,代码来源:Builder.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BindValueKind类代码示例发布时间:2022-05-24
下一篇:
C# BinaryWriter类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap