Exemplo n.º 1
0
 public NodeIcon(IconSet iconSet, Boolean invert)
 {
    this.iconSet = iconSet;
    this.icons = IconHelperMethods.CreateIconSetBitmaps(iconSet, invert);
    this.iconSize = (this.icons.Count == 0) ? Size.Empty : this.icons.First().Value.Size;
    this.invert = invert;
 }
Exemplo n.º 2
0
 public static void Create(string text, IconSet icon, Color c, bool closeOnLoseFocus)
 {
     new AlertDialog(text, icon, c)
     {
         AutoClose = closeOnLoseFocus
     }.Show();
 }
Exemplo n.º 3
0
        internal void FromIconSet(IconSet ics)
        {
            this.SetAllNull();

            if (ics.IconSetValue != null)
            {
                this.IconSetType = SLIconSet.TranslateIconSetToInternalSet(ics.IconSetValue.Value);
            }
            if (ics.ShowValue != null)
            {
                this.ShowValue = ics.ShowValue.Value;
            }
            if (ics.Percent != null)
            {
                this.Percent = ics.Percent.Value;
            }
            if (ics.Reverse != null)
            {
                this.Reverse = ics.Reverse.Value;
            }

            using (OpenXmlReader oxr = OpenXmlReader.Create(ics))
            {
                SLConditionalFormatValueObject cfvo;
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(ConditionalFormatValueObject))
                    {
                        cfvo = new SLConditionalFormatValueObject();
                        cfvo.FromConditionalFormatValueObject((ConditionalFormatValueObject)oxr.LoadCurrentElement());
                        this.Cfvos.Add(cfvo);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public static MvcHtmlString GravatarImage(this HtmlHelper helper, string email, GravatarRating rating, IconSet iconSet, int size)
        {
            var emailHashed = MD5(email);
            var gravatarUrl = string.Format(BASE_URL, emailHashed, iconSet, size, rating);

            return new MvcHtmlString(string.Format(IMG_TAG, gravatarUrl, size));
        }
Exemplo n.º 5
0
        /**
         * A factory method allowing the creation of conditional formatting
         *  rules using an Icon Set / Multi-State formatting.
         * The thresholds for it will be created, but will be empty
         *  and require configuring with
         *  {@link HSSFConditionalFormattingRule#getMultiStateFormatting()}
         *  then
         *  {@link HSSFIconMultiStateFormatting#getThresholds()}
         */
        public IConditionalFormattingRule CreateConditionalFormattingRule(
            IconSet iconSet)
        {
            CFRule12Record rr = CFRule12Record.Create(_sheet, iconSet);

            return(new HSSFConditionalFormattingRule(_sheet, rr));
        }
        internal SLConditionalFormattingRule2010 ToSLConditionalFormattingRule2010()
        {
            var cfr2010 = new SLConditionalFormattingRule2010();

            cfr2010.Type              = Type;
            cfr2010.Priority          = Priority;
            cfr2010.StopIfTrue        = StopIfTrue;
            cfr2010.AboveAverage      = AboveAverage;
            cfr2010.Percent           = Percent;
            cfr2010.Bottom            = Bottom;
            cfr2010.HasOperator       = HasOperator;
            cfr2010.Operator          = Operator;
            cfr2010.Text              = Text;
            cfr2010.HasTimePeriod     = HasTimePeriod;
            cfr2010.TimePeriod        = TimePeriod;
            cfr2010.Rank              = Rank;
            cfr2010.StandardDeviation = StdDev;
            cfr2010.EqualAverage      = EqualAverage;

            foreach (var f in Formulas)
            {
                cfr2010.Formulas.Add(new DocumentFormat.OpenXml.Office.Excel.Formula(f.Text));
            }
            cfr2010.HasColorScale = HasColorScale;
            cfr2010.ColorScale    = ColorScale.ToSLColorScale2010();
            cfr2010.HasDataBar    = HasDataBar;
            cfr2010.DataBar       = DataBar.ToDataBar2010();
            cfr2010.HasIconSet    = HasIconSet;
            cfr2010.IconSet       = IconSet.ToSLIconSet2010();

            cfr2010.HasDifferentialType = HasDifferentialFormat;
            cfr2010.DifferentialType    = DifferentialFormat.Clone();

            return(cfr2010);
        }
Exemplo n.º 7
0
        private static Icon GetIcon_Interal(IconSet pIconSet, string pCustomIconPath, string pState)
        {
            string iconSetName = pIconSet.ToString().ToLower();
              if (!string.IsNullOrEmpty(pCustomIconPath) && File.Exists(pCustomIconPath)) {
            if (iconSetName.StartsWith("inv_")) {
              iconSetName = "inv_overlay";
            }
            else {
              iconSetName = "overlay";
            }

            Icon icon = new Icon(pCustomIconPath);
            string overlayIconPath = "AEMManager.resources." + iconSetName + "." + pState + ".ico";
            Icon overlayIcon = new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream(overlayIconPath));

            return GetIcon_InternalWithOverlay(icon, overlayIcon);
              }
              else if (iconSetName != IconSet.DEFAULT.ToString().ToLower()) {
            string iconPath = "AEMManager.resources." + IconSet.DEFAULT.ToString().ToLower() + "." + pState + ".ico";
            Icon icon = new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream(iconPath));

            string overlayIconPath = "AEMManager.resources.iconset_" + iconSetName.Substring(0, iconSetName.Length - 1) + "." + iconSetName.Substring(iconSetName.Length - 1) + ".ico";
            Icon overlayIcon = new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream(overlayIconPath));

            return GetIcon_InternalWithOverlay(icon, overlayIcon);
              }
              else {
            string iconPath = "AEMManager.resources." + iconSetName + "." + pState + ".ico";
            return new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream(iconPath));
              }
        }
Exemplo n.º 8
0
        internal IconSet ToIconSet()
        {
            IconSet ics = new IconSet();

            if (this.IconSetType != SLIconSetValues.ThreeTrafficLights1)
            {
                ics.IconSetValue = SLIconSet.TranslateInternalSetToIconSet(this.IconSetType);
            }
            if (!this.ShowValue)
            {
                ics.ShowValue = this.ShowValue;
            }
            if (!this.Percent)
            {
                ics.Percent = this.Percent;
            }
            if (this.Reverse)
            {
                ics.Reverse = this.Reverse;
            }

            foreach (SLConditionalFormatValueObject cfvo in this.Cfvos)
            {
                ics.Append(cfvo.ToConditionalFormatValueObject());
            }

            return(ics);
        }
        // Finds the largest size at which the given image stock id is
        // available. This would not be useful for a normal application

        private IconSize GetLargestSize(string stockId)
        {
            IconSet set = IconFactory.LookupDefault(stockId);

            if (set == null)
            {
                return(IconSize.Invalid);
            }

            IconSize[] sizes      = set.Sizes;
            IconSize   bestSize   = IconSize.Invalid;
            int        bestPixels = 0;

            foreach (IconSize size in sizes)
            {
                int width, height;
                Gtk.Icon.SizeLookup(size, out width, out height);
                if (width * height > bestPixels)
                {
                    bestSize   = size;
                    bestPixels = width * height;
                }
            }

            return(bestSize);
        }
Exemplo n.º 10
0
        public void WriteConditionalFormattingIconSet(IconSet iconSet, out CT_IconSet cfIconSet)
        {
            if (iconSet == null)
            {
                cfIconSet = null;
                return;
            }
            List <CT_Cfvo> ct_cfvo_list = new List <CT_Cfvo>();

            foreach (var ct_cfvo in iconSet.CFVOList)
            {
                ct_cfvo_list.Add(new CT_Cfvo
                {
                    val  = ct_cfvo.Value,
                    type = (ST_CfvoType)ct_cfvo.Type //1-1
                });
            }

            cfIconSet = new CT_IconSet
            {
                cfvo      = ct_cfvo_list.ToArray(),
                iconSet   = (ST_IconSetType)iconSet.IconSetType,//1-1
                showValue = iconSet.ShowValue
            };
        }
Exemplo n.º 11
0
 public AlertDialog(string text, IconSet icon, Color c) : base(0.30, 0.30)
 {
     init();
     IconLabel.ForeColor = c;
     IconLabel.Text      = ((char)icon) + "";
     label2.Text         = text; //0xE8C9
 }
Exemplo n.º 12
0
 public ConfirmDialog(string text, IconSet icon, Color c, string okBtn = OKButtonText, string cancelBtn = CancelButtonText) : base(0.30, 0.30)
 {
     init(okBtn, cancelBtn);
     IconLabel.ForeColor = c;
     IconLabel.Text      = ((char)icon) + "";
     label2.Text         = text; //0xE8C9
 }
Exemplo n.º 13
0
 public static bool Confirm(string text, IconSet icon, Color c, string OkBtn = "OK", string CancelBtn = "Cancel")
 {
     using (ConfirmDialog d = new ConfirmDialog(text, icon, c, OkBtn, CancelBtn))
     {
         return(d.ShowDialog() == DialogResult.OK);
     }
 }
Exemplo n.º 14
0
		protected EditReportToolBase(bool loadImages, string createReportTitle, string editReportTitle, IconSet createReportIcons, IconSet editReportIcons)
			: base("EditReport")
		{
			_loadImages = loadImages;
			_createReportTitle = createReportTitle;
			_editReportTitle = editReportTitle;
			_createReportIcons = createReportIcons;
			_editReportIcons = editReportIcons;
		}
Exemplo n.º 15
0
 protected EditReportToolBase(bool loadImages, string createReportTitle, string editReportTitle, IconSet createReportIcons, IconSet editReportIcons)
     : base("EditReport")
 {
     _loadImages        = loadImages;
     _createReportTitle = createReportTitle;
     _editReportTitle   = editReportTitle;
     _createReportIcons = createReportIcons;
     _editReportIcons   = editReportIcons;
 }
Exemplo n.º 16
0
 public ShowHideOverlaysTool()
 {
     _selectedOverlaysVisibleIconSet = new IconSet("Icons.ShowHideOverlaysToolSmall.png", "Icons.ShowHideOverlaysToolMedium.png", "Icons.ShowHideOverlaysToolLarge.png");
     _selectedOverlaysHiddenIconSet  = new UnavailableActionIconSet(_selectedOverlaysVisibleIconSet)
     {
         GrayMode = true
     };
     IconSet = _selectedOverlaysVisibleIconSet;
 }
Exemplo n.º 17
0
        /* ----------------------------- Konstruktor ------------------------------------ */

        public Product(long id, string name, Point3D pos, Point3D nextPos, IconSet icons)
        {
            this.id           = id;
            this.name         = name;
            this.position     = pos;
            this.nextPosition = nextPos;
            this.model        = icons.getProductModel(name);
            this.color        = icons.getProductColor(name);
        }
Exemplo n.º 18
0
        public void Add(string name)
        {
            IconSet    icon_set = new IconSet();
            IconSource source   = new IconSource();

            source.IconName = name;
            icon_set.AddSource(source);

            Add(name, icon_set);
        }
        /* Plugin laden und ein Bild zur Toolbox hinzufügen */
        private void loadIcon(IconSet ics, int classid)
        {
            Image       img = ics.getImage(classid);
            ToolboxItem tbi = new ToolboxItem();

            toolboxITEMS.Add(tbi);
            tbi.Content = img;
            tbi.ClassId = classid;
            this.toolbox.Items.Add(tbi);
        }
Exemplo n.º 20
0
        /**
         * A factory method allowing the creation of conditional formatting
         *  rules using an Icon Set / Multi-State formatting.
         * The thresholds for it will be created, but will be empty
         *  and require configuring with
         *  {@link XSSFConditionalFormattingRule#getMultiStateFormatting()}
         *  then
         *  {@link XSSFIconMultiStateFormatting#getThresholds()}
         */
        public IConditionalFormattingRule CreateConditionalFormattingRule(IconSet iconSet)
        {
            XSSFConditionalFormattingRule rule = new XSSFConditionalFormattingRule(_sheet);

            // Have it setup, with suitable defaults
            rule.CreateMultiStateFormatting(iconSet);

            // All done!
            return(rule);
        }
Exemplo n.º 21
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="name">The name of the page.</param>
		/// <param name="component">The <see cref="IApplicationComponent"/> to be hosted in this page.</param>
		/// <param name="title">The text to display on the title bar.</param>
		/// <param name="iconSet">The icon to display on the title bar.</param>
		/// <param name="fallbackResolver">Resource resolver to fall back on in case the default failed to find resources.</param>
		public StackTabPage(string name, 
			IApplicationComponent component, 
			string title, 
			IconSet iconSet,
			IResourceResolver fallbackResolver)
			: base(name, component)
		{
			_title = title;
			_iconSet = iconSet;
			_resourceResolver = new ApplicationThemeResourceResolver(typeof(StackTabPage).Assembly, fallbackResolver);
		}
Exemplo n.º 22
0
        public OrderNoteboxFolderSystem()
            : base(SR.TitleOrderNoteboxFolderSystem)
        {
            _unacknowledgedNotesIconSet = new IconSet("NoteUnread.png");
            _baseTitle = SR.TitleOrderNoteboxFolderSystem;

            _inboxFolder = new PersonalInboxFolder(this);
            _inboxFolder.TotalItemCountChanged += FolderItemCountChangedEventHandler;
            this.Folders.Add(_inboxFolder);
            this.Folders.Add(new SentItemsFolder(this));
        }
Exemplo n.º 23
0
        private MenuAction CreateMenuAction(string id, string path, string tooltip, IconSet iconSet, ClickHandlerDelegate clickHandler)
        {
            id = String.Format("{0}:{1}", typeof(ClipboardComponent).FullName, id);
            MenuAction action = new MenuAction(id, new ActionPath(path, _resolver), ClickActionFlags.None, _resolver);

            action.IconSet = iconSet;
            action.Tooltip = tooltip;
            action.Label   = action.Path.LastSegment.LocalizedText;
            action.SetClickHandler(clickHandler);
            return(action);
        }
Exemplo n.º 24
0
 public GridModel(double height, double width, IconSet icons)
 {
     this.Model         = new Model3DGroup();
     this.icons         = icons;
     this.width         = width;
     this.height        = height;
     this.modelList     = new List <GridItem3D>();
     this.productList   = new List <Product>();
     this.selectedItems = new List <GridItem3D>();
     UpdateModel();
 }
Exemplo n.º 25
0
		public StackingSynchronizationTool()
		{
			_deferSynchronizeUntilDisplaySetChanged = false;

			_synchronizeActive = false;
			_linkStudiesEnabled = false;

			_studiesLinked = true;
			_linkStudiesIconSet = new IconSet("Icons.LinkStudiesToolSmall.png", "Icons.LinkStudiesToolMedium.png", "Icons.LinkStudiesToolLarge.png");
			_unlinkStudiesIconSet = new IconSet("Icons.UnlinkStudiesToolSmall.png", "Icons.UnlinkStudiesToolMedium.png", "Icons.UnlinkStudiesToolLarge.png");

			ResetFrameOfReferenceCalibrations();
		}
Exemplo n.º 26
0
        public StackingSynchronizationTool()
        {
            _deferSynchronizeUntilDisplaySetChanged = false;

            _synchronizeActive  = false;
            _linkStudiesEnabled = false;

            _studiesLinked        = true;
            _linkStudiesIconSet   = new IconSet("Icons.LinkStudiesToolSmall.png", "Icons.LinkStudiesToolMedium.png", "Icons.LinkStudiesToolLarge.png");
            _unlinkStudiesIconSet = new IconSet("Icons.UnlinkStudiesToolSmall.png", "Icons.UnlinkStudiesToolMedium.png", "Icons.UnlinkStudiesToolLarge.png");

            ResetFrameOfReferenceCalibrations();
        }
Exemplo n.º 27
0
        /// <summary>
        /// Default constructor.  A no-args constructor is required by the
        /// framework.  Do not remove.
        /// </summary>
        public XnatImportTool()
        {
            _enabled        = false;
            _standbyIcons   = new IconSet("blank.gif");
            _searchingIcons = new IconSet("XnatSearchingSmall.gif", "XnatSearchingMedium.gif",
                                          "XnatSearchingLarge.gif");
            _importingIcons = new IconSet("XnatImportingSmall.gif", "XnatImportingMedium.gif",
                                          "XnatImportingLarge.gif");
            _importedIcons = new IconSet("XnatImportedSmall.gif", "XnatImportedMedium.gif",
                                         "XnatImportedLarge.gif");

            _lock = new object();
            _studyUidsTempFolders = new Dictionary <string, string>();
        }
        public ConditionalFormattingRule Convert(IXLConditionalFormat cf, Int32 priority, XLWorkbook.SaveContext context)
        {
            var conditionalFormattingRule = new ConditionalFormattingRule { Type = cf.ConditionalFormatType.ToOpenXml(), Priority = priority };

            var iconSet = new IconSet {ShowValue = !cf.ShowIconOnly, Reverse = cf.ReverseIconOrder, IconSetValue = cf.IconSetStyle.ToOpenXml()};
            Int32 count = cf.Values.Count;
            for(Int32 i=1;i<= count; i++ )
            {
                var conditionalFormatValueObject = new ConditionalFormatValueObject { Type = cf.ContentTypes[i].ToOpenXml(), Val = cf.Values[i].Value, GreaterThanOrEqual = cf.IconSetOperators[i] == XLCFIconSetOperator.EqualOrGreaterThan};    
                iconSet.Append(conditionalFormatValueObject);
                
            }
            conditionalFormattingRule.Append(iconSet);
            return conditionalFormattingRule;
        }
Exemplo n.º 29
0
        internal IconSet ToIconSet()
        {
            IconSet ics = new IconSet();
            if (this.IconSetValue != IconSetValues.ThreeTrafficLights1) ics.IconSetValue = this.IconSetValue;
            if (!this.ShowValue) ics.ShowValue = this.ShowValue;
            if (!this.Percent) ics.Percent = this.Percent;
            if (this.Reverse) ics.Reverse = this.Reverse;

            foreach (SLConditionalFormatValueObject cfvo in this.Cfvos)
            {
                ics.Append(cfvo.ToConditionalFormatValueObject());
            }

            return ics;
        }
        public MainWindow()
        {
            InitializeComponent();
            ConsoleManager.Show();

            LoginPanel.IsOpen     = true;
            ScriptingPanel.IsOpen = false;
            this.Focusable        = false;

            // ein vordefiniertes IconSet Plugin in "Client/Plugins/iconsets/" (TODO: plugins wie zwischen Clients verteilen?)
            defaultPlugin = "machines";
            icons         = new IconSet(defaultPlugin);

            createToolbox();
        }
Exemplo n.º 31
0
        public static Icon GetIcon(IconSet pIconSet, string pCustomIconPath, string pState)
        {
            string key = pIconSet.ToString() + "#" + pCustomIconPath + "#" + pState;

              Icon icon = null;
              if (mIconCache.ContainsKey(key)) {
            icon = mIconCache[key];
              }
              else {
            icon = GetIcon_Interal(pIconSet, pCustomIconPath, pState);
            mIconCache[key] = icon;
              }

              return icon;
        }
Exemplo n.º 32
0
   public static ResourceSet GetIconResSet(IconSet iconSet)
   {
      ResourceManager res = null;
      if (iconSet == IconSet.Blender)
         res = IconsBlender.ResourceManager;
      else if (iconSet == IconSet.Max)
         res = IconsMax.ResourceManager;
      else if (iconSet == IconSet.Maya)
         res = IconsMaya.ResourceManager;

      if (res == null)
         return null;

      return res.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true);
   }
Exemplo n.º 33
0
        private AbstractAction(string id, string path, IResourceResolver resourceResolver)
        {
            Platform.CheckForEmptyString(id, "id");
            Platform.CheckForEmptyString(path, "path");

            _resourceResolver = resourceResolver;
            _actionId         = id;
            _formerActionIds  = new List <string>();
            _path             = new ActionPath(path, resourceResolver);
            _groupHint        = new GroupHint(string.Empty);
            _label            = string.Empty;
            _tooltip          = string.Empty;
            _iconSet          = null;
            _available        = true;
            _permissible      = false;
        }
Exemplo n.º 34
0
        /// <summary>
        /// Creates a new Icon Set / Multi-State formatting
        /// </summary>
        /// <param name="sheet"></param>
        /// <param name="iconSet"></param>
        /// <returns></returns>
        public static CFRule12Record Create(HSSFSheet sheet, IconSet iconSet)
        {
            Threshold[] ts = new Threshold[iconSet.num];
            for (int i = 0; i < ts.Length; i++)
            {
                ts[i] = new IconMultiStateThreshold();
            }

            CFRule12Record r = new CFRule12Record(CONDITION_TYPE_ICON_SET,
                                                  ComparisonOperator.NO_COMPARISON);
            IconMultiStateFormatting imf = r.CreateMultiStateFormatting();

            imf.IconSet    = iconSet;
            imf.Thresholds = ts;
            return(r);
        }
Exemplo n.º 35
0
        private AbstractAction(IAction concreteAction)
        {
            Platform.CheckForNullReference(concreteAction, "concreteAction");
            Platform.CheckTrue(concreteAction.Persistent, "Action must be persistent.");

            _resourceResolver = concreteAction.ResourceResolver;
            _actionId         = concreteAction.ActionID;
            _formerActionIds  = new List <string>(concreteAction.FormerActionIDs);
            _path             = new ActionPath(concreteAction.Path.ToString(), concreteAction.ResourceResolver);
            _groupHint        = new GroupHint(concreteAction.GroupHint.Hint);
            _label            = concreteAction.Label;
            _tooltip          = concreteAction.Tooltip;
            _iconSet          = concreteAction.IconSet;
            _available        = concreteAction.Available;
            _permissible      = concreteAction.Permissible;
        }
Exemplo n.º 36
0
		private AbstractAction(string id, string path, IResourceResolver resourceResolver)
		{
			Platform.CheckForEmptyString(id, "id");
			Platform.CheckForEmptyString(path, "path");

			_resourceResolver = resourceResolver;
			_actionId = id;
            _formerActionIds = new List<string>();
			_path = new ActionPath(path, resourceResolver);
			_groupHint = new GroupHint(string.Empty);
			_label = string.Empty;
			_tooltip = string.Empty;
			_iconSet = null;
			_available = true;
			_permissible = false;
		}
Exemplo n.º 37
0
        void AddStockIcon(IconFactory factory, string stockId, string filename)
        {
            var pixbuf = new Pixbuf(Assembly.GetCallingAssembly(), filename);

            var source = new IconSource()
            {
                Pixbuf         = pixbuf,
                SizeWildcarded = true,
                Size           = IconSize.SmallToolbar
            };

            var set = new IconSet();

            set.AddSource(source);

            factory.Add(stockId, set);
        }
Exemplo n.º 38
0
        // Methods
        // Methods :: Public
        // Methods :: Public :: Initalize
        public static void Initialize()
        {
            IconFactory factory = new IconFactory();

            factory.AddDefault();

            // Stock Icons
            foreach (string name in stock_icons)
            {
                Pixbuf  pixbuf  = new Pixbuf(null, name + ".png");
                IconSet iconset = new IconSet(pixbuf);

                // Add menu variant if we have it
                Assembly a = Assembly.GetCallingAssembly();

                Stream menu_stream =
                    a.GetManifestResourceStream(name + "-16.png");

                if (menu_stream != null)
                {
                    IconSource source = new IconSource();
                    source.Pixbuf         = new Pixbuf(menu_stream);
                    source.Size           = IconSize.Menu;
                    source.SizeWildcarded = false;

                    iconset.AddSource(source);
                }

                factory.Add(name, iconset);
            }

            // Themed Icons
            foreach (string name in icon_theme_icons)
            {
                IconSet    iconset    = new IconSet();
                IconSource iconsource = new IconSource();

                iconsource.IconName = name;
                iconset.AddSource(iconsource);
                factory.Add(name, iconset);
            }

            // register cover image icon size
            cover_size = Icon.SizeRegister("muine-album-cover-size",
                                           CoverDatabase.CoverSize, CoverDatabase.CoverSize);
        }
        internal SLConditionalFormattingRule Clone()
        {
            var cfr = new SLConditionalFormattingRule();

            cfr.Formulas = new List <Formula>();
            for (var i = 0; i < Formulas.Count; ++i)
            {
                cfr.Formulas.Add((Formula)Formulas[i].CloneNode(true));
            }

            cfr.HasColorScale = HasColorScale;
            cfr.ColorScale    = ColorScale.Clone();
            cfr.HasDataBar    = HasDataBar;
            cfr.DataBar       = DataBar.Clone();
            cfr.HasIconSet    = HasIconSet;
            cfr.IconSet       = IconSet.Clone();

            cfr.Extensions = new List <ConditionalFormattingRuleExtension>();
            for (var i = 0; i < Extensions.Count; ++i)
            {
                cfr.Extensions.Add((ConditionalFormattingRuleExtension)Extensions[i].CloneNode(true));
            }

            cfr.Type     = Type;
            cfr.FormatId = FormatId;
            cfr.HasDifferentialFormat = HasDifferentialFormat;
            cfr.DifferentialFormat    = DifferentialFormat.Clone();

            cfr.Priority     = Priority;
            cfr.StopIfTrue   = StopIfTrue;
            cfr.AboveAverage = AboveAverage;
            cfr.Percent      = Percent;
            cfr.Bottom       = Bottom;

            cfr.HasOperator   = HasOperator;
            cfr.Operator      = Operator;
            cfr.Text          = Text;
            cfr.HasTimePeriod = HasTimePeriod;
            cfr.TimePeriod    = TimePeriod;
            cfr.Rank          = Rank;
            cfr.StdDev        = StdDev;
            cfr.EqualAverage  = EqualAverage;

            return(cfr);
        }
Exemplo n.º 40
0
        public static Icon GetIcon(IconSet pIconSet, string pCustomIconPath, string pState)
        {
            string key = pIconSet.ToString() + "#" + pCustomIconPath + "#" + pState;

            Icon icon = null;

            if (mIconCache.ContainsKey(key))
            {
                icon = mIconCache[key];
            }
            else
            {
                icon            = GetIcon_Interal(pIconSet, pCustomIconPath, pState);
                mIconCache[key] = icon;
            }

            return(icon);
        }
Exemplo n.º 41
0
        // parses sets from Xml file
        // calls buildGroup to handle groups and icons
        private static void buildSets(string file)
        {
            XmlReader reader = XmlReader.Create(file);

            reader.ReadStartElement("FreshIcons");

            while (reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "IconSet")
                {
                    IconSet set = new IconSet();
                    set.KindofSet = reader.GetAttribute(0);
                    set.Groups    = buildGroup(file, set.KindofSet);

                    mIcons.Sets.Add(set);
                }
            }
        }
Exemplo n.º 42
0
        internal void FromIconSet(IconSet ics)
        {
            this.SetAllNull();

            if (ics.IconSetValue != null) this.IconSetValue = ics.IconSetValue.Value;
            if (ics.ShowValue != null) this.ShowValue = ics.ShowValue.Value;
            if (ics.Percent != null) this.Percent = ics.Percent.Value;
            if (ics.Reverse != null) this.Reverse = ics.Reverse.Value;

            using (OpenXmlReader oxr = OpenXmlReader.Create(ics))
            {
                SLConditionalFormatValueObject cfvo;
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(ConditionalFormatValueObject))
                    {
                        cfvo = new SLConditionalFormatValueObject();
                        cfvo.FromConditionalFormatValueObject((ConditionalFormatValueObject)oxr.LoadCurrentElement());
                        this.Cfvos.Add(cfvo);
                    }
                }
            }
        }
		public AbstractActionModelTreeLeafAction(IAction action)
			: base(action.Path.LastSegment)
		{
			Platform.CheckForNullReference(action, "action");
			Platform.CheckTrue(action.Persistent, "Action must be persistent.");

			// this allows us to keep a "clone" that is independent of the live action objects
			// that might (probably are) in use or cached in some tool or component somewhere.
			_action = AbstractAction.Create(action);

			CheckState = _action.Available ? CheckState.Checked : CheckState.Unchecked;

			IconSet iconSet;
			if (action.IconSet == null || action.ResourceResolver == null)
			{
				iconSet = new IconSet("Icons.ActionModelNullSmall.png", "Icons.ActionModelNullMedium.png", "Icons.ActionModelNullLarge.png");
				ResourceResolver = new ApplicationThemeResourceResolver(typeof(AbstractActionModelTreeLeafAction).Assembly, action.ResourceResolver);
			}
			else
			{
				iconSet = _action.IconSet;
				ResourceResolver = _action.ResourceResolver;
			}

			if (_action.Permissible)
			{
				IconSet = iconSet;
			}
			else
			{
				IconSet = new UnavailableActionIconSet(iconSet);
				Description = SR.TooltipActionNotPermitted;
				Tooltip = String.IsNullOrEmpty(CanonicalLabel) ?
					SR.TooltipActionNotPermitted : String.Format(SR.TooltipFormatActionNotPermitted, CanonicalLabel);
			}
		}
Exemplo n.º 44
0
 public static Dictionary<String, Bitmap> CreateIconSetBitmaps(IconSet iconSet, Boolean invert)
 {
    return CreateIconSetBitmaps(GetIconResSet(iconSet), invert);
 }
Exemplo n.º 45
0
		protected static bool IconsHaveOverlay(IconSet iconSet)
		{
			return iconSet is MouseButtonIconSet && ((MouseButtonIconSet)iconSet).ShowMouseButtonIconOverlay;
		}
Exemplo n.º 46
0
		public DicomOverlayManager()
			: base("DicomOverlay", "NameDicomOverlay")
		{
			IsImportant = true;
			IconSet = new IconSet("Icons.DicomOverlaysToolSmall.png", "Icons.DicomOverlaysToolMedium.png", "Icons.DicomOverlaysToolLarge.png");
		}
Exemplo n.º 47
0
		public ColorBarManager()
			: base("ColorBar", "NameColourBarOverlay")
		{
			IconSet = new IconSet("Icons.ColorBarToolSmall.png", "Icons.ColorBarToolMedium.png", "Icons.ColorBarToolLarge.png");
		}
Exemplo n.º 48
0
		public ScaleOverlayManager()
			: base("ScaleOverlay", "NameScaleOverlay")
		{
			IconSet = new IconSet("Icons.ScaleOverlayToolSmall.png", "Icons.ScaleOverlayToolMedium.png", "Icons.ScaleOverlayToolLarge.png");
		}
Exemplo n.º 49
0
        public AemInstance(RegistryKey pKey)
        {
            mConsoleOutputWindow = new ConsoleWindow(this);

              mId = pKey.Name.Substring(pKey.Name.LastIndexOf("\\") + 1);
              mAemInstanceType = (AemInstanceType)Enum.Parse(typeof(AemInstanceType), (string)pKey.GetValue("AemInstanceType", mAemInstanceType.ToString()), true);
              mName = (string)pKey.GetValue("Name", mName);
              mHostname = (string)pKey.GetValue("Hostname", mHostname);
              mPort = (int)pKey.GetValue("Port", mPort);
              mContextPath = (string)pKey.GetValue("ContextPath", mContextPath);
              mPath = (string)pKey.GetValue("Path", mPath);
              mJavaExecutable = (string)pKey.GetValue("JavaExecutable", mJavaExecutable);
              mUsername = (string)pKey.GetValue("Username", mUsername);
              mPassword = (string)pKey.GetValue("Password", mPassword);
              mRunmode = (Runmode)Enum.Parse(typeof(Runmode), (string)pKey.GetValue("Runmode", mRunmode.ToString()), true);
              mAdditionalRunmodes = (string)pKey.GetValue("AdditionalRunmodes", mAdditionalRunmodes);
              mRunmodeSampleContent = ((int)pKey.GetValue("RunmodeSampleContent", mRunmodeSampleContent ? 1 : 0)) != 0;
              mIconSet = (IconSet)Enum.Parse(typeof(IconSet), (string)pKey.GetValue("IconSet", mIconSet.ToString()), true);
              mCustomIconPath = (string)pKey.GetValue("CustomIconPath", mCustomIconPath);
              mShowInTaskbar = ((int)pKey.GetValue("ShowInTaskbar", mShowInTaskbar ? 1 : 0)) != 0;
              mHeapMinSizeMb = (int)pKey.GetValue("HeapMinSizeMb", mHeapMinSizeMb);
              mHeapMaxSizeMb = (int)pKey.GetValue("HeapMaxSizeMb", mHeapMaxSizeMb);
              mMaxPermSizeMb = (int)pKey.GetValue("MaxPermSizeMb", mMaxPermSizeMb);
              mJVMDebug = ((int)pKey.GetValue("JVMDebug", mJVMDebug ? 1 : 0)) != 0;
              mDebugPort = (int)pKey.GetValue("DebugPort", mDebugPort);
              mJProfiler = ((int)pKey.GetValue("JProfiler", mJProfiler ? 1 : 0)) != 0;
              mJProfilerPort = (int)pKey.GetValue("JProfilerPort", mJProfilerPort);
              mJConsole = ((int)pKey.GetValue("JConsole", mJConsole ? 1 : 0)) != 0;
              mJConsolePort = (int)pKey.GetValue("JConsolePort", mJConsolePort);
              mHideConfigWizard = ((int)pKey.GetValue("HideConfigWizard", mHideConfigWizard ? 1 : 0)) != 0;
              mShowInstanceWindow = ((int)pKey.GetValue("ShowInstanceWindow", mShowInstanceWindow ? 1 : 0)) != 0;
              mOpenBrowser = ((int)pKey.GetValue("OpenBrowser", mOpenBrowser ? 1 : 0)) != 0;
              mRemoteProcess = ((int)pKey.GetValue("RemoteProcess", mRemoteProcess ? 1 : 0)) != 0;
              mCustomJVMParam1Active = ((int)pKey.GetValue("CustomJVMParam1Active", mCustomJVMParam1Active ? 1 : 0)) != 0;
              mCustomJVMParam1 = (string)pKey.GetValue("CustomJVMParam1", mCustomJVMParam1);
              mCustomJVMParam2Active = ((int)pKey.GetValue("CustomJVMParam2Active", mCustomJVMParam2Active ? 1 : 0)) != 0;
              mCustomJVMParam2 = (string)pKey.GetValue("CustomJVMParam2", mCustomJVMParam2);
              mCustomJVMParam3Active = ((int)pKey.GetValue("CustomJVMParam3Active", mCustomJVMParam3Active ? 1 : 0)) != 0;
              mCustomJVMParam3 = (string)pKey.GetValue("CustomJVMParam3", mCustomJVMParam3);
              mBrowserExecutable = (string)pKey.GetValue("BrowserExecutable", mBrowserExecutable);
              InitializeNotifyIcon();
        }
Exemplo n.º 50
0
		/// <summary>
		/// Attribute constructor.
		/// </summary>
		/// <param name="actionId">The logical action identifier to which this attribute applies.</param>
		/// <param name="icon">The resource name of the icon to be used at all resolutions.</param>
		public IconSetAttribute(string actionId, string icon)
			: base(actionId)
		{
			_iconSet = new IconSet(icon);
		}
Exemplo n.º 51
0
		public TextOverlayManager()
			: base("TextOverlay", "NameTextOverlay")
		{
			IconSet = new IconSet("Icons.TextOverlayToolSmall.png", "Icons.TextOverlayToolMedium.png", "Icons.TextOverlayToolLarge.png");
		}
Exemplo n.º 52
0
        public ShowHideOverlaysTool()
        {
            _selectedOverlaysVisibleIconSet = new IconSet("Icons.ShowHideOverlaysToolSmall.png", "Icons.ShowHideOverlaysToolMedium.png", "Icons.ShowHideOverlaysToolLarge.png");
            _selectedOverlaysHiddenIconSet = new UnavailableActionIconSet(_selectedOverlaysVisibleIconSet){GrayMode = true};
            IconSet = _selectedOverlaysVisibleIconSet;
		}
Exemplo n.º 53
0
		public GrayscaleIconSet(IconSet source)
			: base(source.SmallIcon, source.MediumIcon, source.LargeIcon) {}
Exemplo n.º 54
0
		/// <summary>
		/// Attribute constructor.
		/// </summary>
		/// <param name="actionId">The logical action identifier to which this attribute applies.</param>
		/// <param name="smallIcon">The resource name of the icon to be used at small resolutions (around 24 x 24).</param>
		/// <param name="mediumIcon">The resource name of the icon to be used at medium resolutions (around 48 x 48).</param>
		/// <param name="largeIcon">The resource name of the icon to be used at large resolutions (around 64 x 64).</param>
		public IconSetAttribute(string actionId, string smallIcon, string mediumIcon, string largeIcon)
			: base(actionId)
		{
			_iconSet = new IconSet(smallIcon, mediumIcon, largeIcon);
		}
Exemplo n.º 55
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="baseIconSet">A template <see cref="IconSet"/> from which to copy resource names.</param>
		public UnavailableActionIconSet(IconSet baseIconSet)
			: base(baseIconSet.SmallIcon, baseIconSet.MediumIcon, baseIconSet.LargeIcon) {}
Exemplo n.º 56
0
		/// <summary>
		/// Constructs a controller that uses the 32-bit colour ARGB bitmap specified by the resource name and resource resolver.
		/// </summary>
		/// <param name="iconSet">The <see cref="IconSet"/> resource to use as the overlay.</param>
		/// <param name="resourceResolver">A resource resolver for the icon set.</param>
		/// <param name="iconSize">Optionally specifies the size of the icon resource to use (defaults to <see cref="IconSize.Large"/>).</param>
		/// <exception cref="ArgumentNullException">Thrown if <paramref name="iconSet"/> or <paramref name="resourceResolver"/> is NULL.</exception>
		public FlashOverlayController(IconSet iconSet, IResourceResolver resourceResolver, IconSize iconSize = IconSize.Large)
			: this()
		{
			Platform.CheckForNullReference(iconSet, "iconSet");

			using (var img = iconSet.CreateIcon(iconSize, resourceResolver))
			{
				var bmp = img as Bitmap;
				if (bmp != null)
				{
					_pixelData = ExtractBitmap(bmp, out _rows, out _columns);
				}
				else
				{
					using (var bitmap = new Bitmap(img))
						_pixelData = ExtractBitmap(bitmap, out _rows, out _columns);
				}
			}
		}
Exemplo n.º 57
0
			/// <summary>
			/// Initializes a new instance of <see cref="MouseButtonIconSet"/>.
			/// </summary>
			/// <param name="baseIconSet">A template <see cref="IconSet"/> from which to copy resource names.</param>
			/// <param name="assignedButton">The mouse button that is assigned to the associated tool.</param>
			public MouseButtonIconSet(IconSet baseIconSet, XMouseButtons assignedButton)
				: base(baseIconSet.SmallIcon, baseIconSet.MediumIcon, baseIconSet.LargeIcon)
			{
				_assignedButton = assignedButton;
			}
Exemplo n.º 58
0
		private AbstractAction(IAction concreteAction)
		{
			Platform.CheckForNullReference(concreteAction, "concreteAction");
			Platform.CheckTrue(concreteAction.Persistent, "Action must be persistent.");

			_resourceResolver = concreteAction.ResourceResolver;
			_actionId = concreteAction.ActionID;
		    _formerActionIds = new List<string>(concreteAction.FormerActionIDs);
			_path = new ActionPath(concreteAction.Path.ToString(), concreteAction.ResourceResolver);
			_groupHint = new GroupHint(concreteAction.GroupHint.Hint);
			_label = concreteAction.Label;
			_tooltip = concreteAction.Tooltip;
			_iconSet = concreteAction.IconSet;
			_available = concreteAction.Available;
			_permissible = concreteAction.Permissible;
		}
Exemplo n.º 59
0
		/// <summary>
		/// Called when the tool's <see cref="Mode"/> changes.
		/// </summary>
		protected virtual void OnModeChanged()
		{
			switch (_mode)
			{
				case TextCalloutMode.TextCallout:
					this.TooltipPrefix = SR.TooltipTextCallout;
					this._commandCreationName = SR.CommandCreateTextCallout;
					this._iconSet = _textCalloutIconSet;
					this._interactiveGraphicBuilderDelegate = CreateInteractiveTextCalloutBuilder;
					this._graphicDelegateCreatorDelegate = CreateTextCalloutGraphic;
					break;
				case TextCalloutMode.TextArea:
					this.TooltipPrefix = SR.TooltipTextArea;
					this._commandCreationName = SR.CommandCreateTextArea;
					this._iconSet = _textAreaIconSet;
					this._interactiveGraphicBuilderDelegate = CreateInteractiveTextAreaBuilder;
					this._graphicDelegateCreatorDelegate = CreateTextAreaGraphic;
					break;
			}
			_settings.TextCalloutMode = _mode.ToString();
			EventsHelper.Fire(ModeChanged, this, new EventArgs());
		}