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


C# NSMutableDictionary.setObject_forKey方法代码示例

本文整理汇总了C#中NSMutableDictionary.setObject_forKey方法的典型用法代码示例。如果您正苦于以下问题:C# NSMutableDictionary.setObject_forKey方法的具体用法?C# NSMutableDictionary.setObject_forKey怎么用?C# NSMutableDictionary.setObject_forKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NSMutableDictionary的用法示例。


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

示例1: OnInitFactoryPref

        public void OnInitFactoryPref(NSMutableDictionary dict)
        {
            DoCreateDirectories();
            DoCopyMissingFiles();
            DoOverwriteFiles();

            var globs = NSDictionary.Create();
            dict.setObject_forKey(globs, NSString.Create("language globs2"));

            //			List<string> languages = new List<string>();
            //			XmlNode xml = DoLoadXml("standard");
            //			DoReadLanguages(xml, languages);

            //			xml = DoLoadXml("user");
            //			DoReadLanguages(xml, languages);

            //			dict.setObject_forKey(NSArray.Create(languages.ToArray()), NSString.Create("languages"));
        }
开发者ID:andyhebear,项目名称:Continuum,代码行数:18,代码来源:FactoryPrefs.cs

示例2: OnInitFactoryPref

        public void OnInitFactoryPref(NSMutableDictionary dict)
        {
            Boss boss = ObjectModel.Create("FileSystem");
            var fs = boss.Get<IFileSystem>();
            string[] candidates = fs.LocatePath("/mono-uninstalled.pc.in");
            if (candidates.Length > 0)
            {
                string root = Path.GetDirectoryName(candidates[0]);
                dict.setObject_forKey(NSString.Create(root), NSString.Create("mono_root"));
            }
            else
                dict.setObject_forKey(NSString.Create("/some/thing/mono-2.2"), NSString.Create("mono_root"));

            dict.setObject_forKey(NSString.Create("~"), NSString.Create("debug_assembly_path"));
            dict.setObject_forKey(NSString.Create("~"), NSString.Create("debug_assembly_working_dir"));
            dict.setObject_forKey(NSString.Empty, NSString.Create("debug_assembly_args"));
            dict.setObject_forKey(NSString.Empty, NSString.Create("debug_assembly_env"));
            dict.setObject_forKey(NSString.Create("mono"), NSString.Create("debug_assembly_tool"));
        }
开发者ID:andyhebear,项目名称:Continuum,代码行数:19,代码来源:Application.cs

示例3: OnSetNameAttributes

 protected override void OnSetNameAttributes(NSMutableDictionary attrs, string name)
 {
     NSColor color = Styler.GetPathColor();
     attrs.setObject_forKey(color, Externs.NSForegroundColorAttributeName);
     attrs.setObject_forKey(NSNumber.Create(-3.0f), Externs.NSStrokeWidthAttributeName);
 }
开发者ID:andyhebear,项目名称:Continuum,代码行数:6,代码来源:TableItems.cs

示例4: DoSetColor

        private void DoSetColor(NSMutableDictionary dict, string name, string globs, int r, int g, int b)
        {
            NSColor color = NSColor.colorWithDeviceRed_green_blue_alpha(r/255.0f, g/255.0f, b/255.0f, 1.0f);
            NSData data = NSArchiver.archivedDataWithRootObject(color);
            dict.setObject_forKey(data, NSString.Create(m_path + "-" + name + " color"));

            if (globs != null)
            {
                NSString value = NSString.Create(globs);
                dict.setObject_forKey(value, NSString.Create(m_path + "-" + name + " globs"));
            }
        }
开发者ID:andyhebear,项目名称:Continuum,代码行数:12,代码来源:DirectoryItemStyler.cs

示例5: DoInitStyle

        private void DoInitStyle(NSMutableDictionary dict, string name, Attributes a)
        {
            if (a.Font != null)
            {
                Contract.Assert(a.Size > 0.0, "size is zero");

                dict.setObject_forKey(NSString.Create(a.Font), NSString.Create(name + " font name"));
                dict.setObject_forKey(NSNumber.Create(a.Size), NSString.Create(name + " font size"));
            }

            if (a.Underline != 0)
            {
                var attrs = NSMutableDictionary.Create();
                attrs.setObject_forKey(NSNumber.Create(a.Underline), Externs.NSUnderlineStyleAttributeName);

                if (a.Color != null)
                {
                    Contract.Assert(a.Color.Length == 3, "color does not have three components");
                    Contract.Assert(a.BackColor == null, "we don't support setting both the fore and back colors");

                    NSColor color = NSColor.colorWithDeviceRed_green_blue_alpha(a.Color[0]/255.0f, a.Color[1]/255.0f, a.Color[2]/255.0f, 1.0f);
                    attrs.setObject_forKey(color, Externs.NSUnderlineColorAttributeName);
                }

                var data = NSArchiver.archivedDataWithRootObject(attrs);
                dict.setObject_forKey(data, NSString.Create(name + " font attributes"));
            }
            else if (a.Color != null)
            {
                Contract.Assert(a.Color.Length == 3, "color does not have three components");
                Contract.Assert(a.BackColor == null, "we don't support setting both the fore and back colors");

                var attrs = NSMutableDictionary.Create();

                NSColor color = NSColor.colorWithDeviceRed_green_blue_alpha(a.Color[0]/255.0f, a.Color[1]/255.0f, a.Color[2]/255.0f, 1.0f);
                attrs.setObject_forKey(color, Externs.NSForegroundColorAttributeName);

                if (a.Shadow)
                {
                    NSShadow shadow = NSShadow.Create();
                    shadow.setShadowOffset(new NSSize(1.06066f, -1.06066f));		// these are the default values
                    shadow.setShadowColor(NSColor.colorWithDeviceRed_green_blue_alpha(0.0f, 0.0f, 0.0f, 0.517241f));
                    attrs.setObject_forKey(shadow, Externs.NSShadowAttributeName);
                }

                var data = NSArchiver.archivedDataWithRootObject(attrs);
                dict.setObject_forKey(data, NSString.Create(name + " font attributes"));
            }
            else if (a.BackColor != null)
            {
                Contract.Assert(a.BackColor.Length == 3, "back color does not have three components");

                NSColor color = NSColor.colorWithDeviceRed_green_blue_alpha(a.BackColor[0]/255.0f, a.BackColor[1]/255.0f, a.BackColor[2]/255.0f, 1.0f);
                var data = NSArchiver.archivedDataWithRootObject(color);
                dict.setObject_forKey(data, NSString.Create(name + " color"));

                var attrs = NSDictionary.dictionaryWithObject_forKey(color, Externs.NSBackgroundColorAttributeName);
                data = NSArchiver.archivedDataWithRootObject(attrs);
                dict.setObject_forKey(data, NSString.Create(name + " color attributes"));
            }
        }
开发者ID:andyhebear,项目名称:Continuum,代码行数:61,代码来源:FactoryPrefs.cs

示例6: DoInitPrefs

 // These are the prefs associated with the app's preferences panel
 // (DirectoryController handles the prefs associated with a directory).
 // Note that we don't include the standard user targets. See:
 // http://www.gnu.org/software/automake/manual/standards/Standard-Targets.html#Standard-Targets
 private void DoInitPrefs(NSMutableDictionary dict)
 {
     string ignores = @"all-am
     am--refresh
     bin
     check-am
     clean-am
     clean-generic
     clean-libtool
     ctags-recursive
     ctags
     CTAGS
     distclean-am
     distclean-generic
     distclean-tags
     distdir
     dist-bzip2
     dist-gzip
     dist-hook
     dist-lzma
     dist-shar
     dist-tarZ
     dist-zip
     distclean-hdr
     distclean-libtool
     dvi-am
     extra-bin
     GTAGS
     ID
     info-am
     install-am
     install-binSCRIPTS
     install-data-am
     install-data
     install-exec-am
     install-exec
     install-pixmapDATA
     installcheck-am
     installdirs-am
     maintainer-clean-am
     maintainer-clean-generic
     maintainer-clean-recursive
     Makefile
     mostlyclean-am
     mostlyclean-generic
     mostlyclean-libtool
     pdf-am
     push
     ps-am
     stamp-h1
     tags-recursive
     uninstall-am
     uninstall-binSCRIPTS
     uninstall-info-am
     uninstall-info
     uninstall-pixmapDATA
     zip-bin";
     dict.setObject_forKey(NSString.Create(ignores), NSString.Create("globalIgnores"));
 }
开发者ID:andyhebear,项目名称:Continuum,代码行数:63,代码来源:Startup.cs

示例7: OnInitFactoryPref

        public void OnInitFactoryPref(NSMutableDictionary dict)
        {
            dict.setObject_forKey(NSString.Create("Georgia"), NSString.Create("errors font name"));
            dict.setObject_forKey(NSNumber.Create(14.0f), NSString.Create("errors font size"));

            var attrs = NSDictionary.dictionaryWithObject_forKey(NSColor.redColor(), Externs.NSForegroundColorAttributeName);
            NSData data = NSArchiver.archivedDataWithRootObject(attrs);
            dict.setObject_forKey(data, NSString.Create("errors font attributes"));

            NSColor color = NSColor.colorWithDeviceRed_green_blue_alpha(255/255.0f, 229/255.0f, 229/255.0f, 1.0f);
            data = NSArchiver.archivedDataWithRootObject(color);
            dict.setObject_forKey(data, NSString.Create("errors color"));
        }
开发者ID:andyhebear,项目名称:Continuum,代码行数:13,代码来源:HandleBuildError.cs


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