Exemplo n.º 1
0
        public ExchangeDialog()
        {
            this.InitializeComponent();
            this.cancelButton.Text     = Strings.Cancel;
            this.okButton.Text         = Strings.Ok;
            this.helpButton.Text       = Strings.Help;
            this.buttonsPanel.TabIndex = int.MaxValue;
            if (ExchangeDialog.lockImage == null)
            {
                Size empty = Size.Empty;
                empty.Width              = Math.Min(this.lockButton.Width, this.lockButton.Height);
                empty.Height             = empty.Width;
                ExchangeDialog.lockImage = IconLibrary.ToBitmap(Icons.LockIcon, empty);
            }
            this.lockButton.Image     = ExchangeDialog.lockImage;
            this.lockButton.Visible   = false;
            this.lockButton.FlatStyle = FlatStyle.Flat;
            this.lockButton.FlatAppearance.BorderSize         = 0;
            this.lockButton.FlatAppearance.BorderColor        = this.lockButton.BackColor;
            this.lockButton.FlatAppearance.MouseOverBackColor = this.lockButton.BackColor;
            this.lockButton.FlatAppearance.MouseDownBackColor = this.lockButton.BackColor;
            ToolTip toolTip = new ToolTip();

            toolTip.SetToolTip(this.lockButton, Strings.ShowLockButtonToolTipText);
            this.helpButton.Click += delegate(object param0, EventArgs param1)
            {
                this.OnHelpRequested(new HelpEventArgs(Point.Empty));
            };
            this.helpButton.Visible = false;
        }
 public PromptForChoicesDialog()
 {
     this.InitializeComponent();
     this.yesButton.Text   = Strings.Yes;
     this.yesButton.Click += delegate(object param0, EventArgs param1)
     {
         this.UserChoice = ConfirmationChoice.Yes;
         base.Close();
     };
     this.yesToAllButton.Text   = Strings.YesToAll;
     this.yesToAllButton.Click += delegate(object param0, EventArgs param1)
     {
         this.UserChoice = ConfirmationChoice.YesToAll;
         base.Close();
     };
     this.noButton.Text   = Strings.No;
     this.noButton.Click += delegate(object param0, EventArgs param1)
     {
         this.UserChoice = ConfirmationChoice.No;
         base.Close();
     };
     this.cancelButton.Text   = Strings.Cancel;
     this.cancelButton.Click += delegate(object param0, EventArgs param1)
     {
         this.UserChoice = ConfirmationChoice.NoToAll;
         base.Close();
     };
     this.warningIconPictureBox.Image = IconLibrary.ToBitmap(Icons.Warning, this.warningIconPictureBox.Size);
     base.AcceptButton = this.yesButton;
     base.CancelButton = this.cancelButton;
     this.UpdateButtonStatus(true);
 }
Exemplo n.º 3
0
 protected BaseErrorDialog()
 {
     this.InitializeComponent();
     this.iconBox.Image            = IconLibrary.ToBitmap(Icons.Error, this.iconBox.Size);
     this.cancelButton.Text        = Strings.Ok;
     this.messageLabel.UseMnemonic = false;
 }
Exemplo n.º 4
0
 public IconSystem(GraphicsDevice device, EffectFactory effectFactory, IComponentContainer <DebugInfo> debugInfos, IList <IComponentContainer> containers, IconLibrary library)
     : base(debugInfos, containers)
 {
     this.Device  = device;
     this.Effect  = effectFactory.Construct <TextureEffect>();
     this.Library = library;
     this.Quad    = new UnitQuad(device);
 }
Exemplo n.º 5
0
 private void Command_IconChanged(object sender, EventArgs e)
 {
     this.DisposeImage();
     if (this.Command.Icon != null)
     {
         this.Image = IconLibrary.ToSmallBitmap(this.Command.Icon);
     }
 }
Exemplo n.º 6
0
 public RbacPermissionLockResultPane()
 {
     base.ViewModeCommands.Add(Theme.VisualEffectsCommands);
     base.EnableVisualEffects = true;
     this.InitializeComponent();
     this.titleImage.Image = IconLibrary.ToBitmap(Icons.LockIcon, this.titleImage.Size);
     this.labelTitle.Text  = Strings.NotPermittedByRbac;
 }
Exemplo n.º 7
0
 public BulkActionControl()
 {
     this.InitializeComponent();
     this.Text = Strings.BulkActionTitleText;
     this.warningIconPictureBox.Image = IconLibrary.ToBitmap(Icons.Warning, this.warningIconPictureBox.Size);
     this.bulkActionLabel.Text        = Strings.BulkActionLabelText;
     this.expandScopeCheckBox.Text    = Strings.BulkActionCheckBoxText;
 }
Exemplo n.º 8
0
 public IconSystem(GraphicsDevice device, EffectFactory effectFactory, IComponentContainer <DebugInfo> components, IComponentContainer <Pose> poses, IconLibrary library)
 {
     this.Device     = device;
     this.Components = components;
     this.Poses      = poses;
     this.Effect     = effectFactory.Construct <TextureEffect>();
     this.Library    = library;
     this.Quad       = new UnitQuad(device);
 }
Exemplo n.º 9
0
 public ErrorReportResultPane()
 {
     base.ViewModeCommands.Add(Theme.VisualEffectsCommands);
     base.EnableVisualEffects = true;
     this.InitializeComponent();
     this.LabelTitle = Strings.WelcomeToESM;
     this.UpdateTitleFont();
     this.titleImage.Image          = IconLibrary.ToBitmap(Icons.Error, this.titleImage.Size);
     this.contentLabel.LinkClicked += this.contentLabel_LinkClicked;
 }
Exemplo n.º 10
0
 public void SetGaugeIcon(string key)
 {
     if (iconLib == null)
     {
         iconLib = (IconLibrary)FindObjectOfType(typeof(IconLibrary));
     }
     gaugeName = key;
     needIcon  = iconLib.GetIcon(gaugeName);
     RefreshGauge();
 }
Exemplo n.º 11
0
        public int RegisterIcon(string name, Icon icon)
        {
            int num = -1;

            if (icon != null && !string.IsNullOrEmpty(name) && !this.imageListMap.TryGetValue(name, out num))
            {
                Bitmap bitmap = IconLibrary.ToBitmap(icon, SystemInformation.SmallIconSize);
                this.snapIn.SmallImages.Add(bitmap);
                num = this.snapIn.SmallImages.Count - 1;
                this.imageListMap[name] = num;
            }
            return(num);
        }
Exemplo n.º 12
0
    public void ShowAction(string actionKey)
    {
        _Log("Showing action: " + actionKey);

        bubbleRenderer       = this.GetComponent <SpriteRenderer>();
        bubbleRenderer.color = Color.white;
        actionRenderer       = actionSprite.GetComponent <SpriteRenderer>();
        actionRenderer.color = Color.white;
        if (iconLib == null)
        {
            iconLib = (IconLibrary)FindObjectOfType(typeof(IconLibrary));
        }
        actionRenderer.sprite = iconLib.GetIcon(actionKey);
    }
Exemplo n.º 13
0
 public TridentsWizardPage()
 {
     this.InitializeComponent();
     base.ContentPanel.SuspendLayout();
     this.infoLabel.Text        = "";
     this.statusLabel.Text      = "";
     this.elapsedTimeLabel.Text = "";
     this.copyNoteLabel.Text    = Strings.CompletionNote;
     base.ContentPanel.ResumeLayout();
     this.infoIcon.Image = IconLibrary.ToSmallBitmap(Icons.Information);
     this.workUnitsPanel.TaskStateChanged += this.workUnitsPanel_TaskStateChanged;
     this.updateTimer          = new Timer();
     this.updateTimer.Interval = 1000;
     this.updateTimer.Tick    += this.updateTimer_Tick;
 }
Exemplo n.º 14
0
        internal FilterItem(FilterNode node, IList <FilterablePropertyDescription> propertiesToFilter)
        {
            this.BeginInit();
            this.InitializeComponent();
            this.valueTypeEditors         = new Dictionary <FilterablePropertyValueEditor, Control>();
            this.deleteButton.Image       = IconLibrary.ToSmallBitmap(Icons.Remove);
            this.deleteButton.ToolTipText = Strings.RemoveExpression;
            List <FilterablePropertyDescription> list = new List <FilterablePropertyDescription>(propertiesToFilter.Count);

            for (int i = 0; i < propertiesToFilter.Count; i++)
            {
                list.Add(propertiesToFilter[i].SurfaceFilterablePropertyDescription ?? propertiesToFilter[i]);
            }
            list.Sort();
            this.FilterNode  = node;
            this.surfaceNode = new FilterNode();
            this.SyncFilterNodeToSurfaceNode();
            this.FilterNode.FilterablePropertyDescriptionChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncFilterNodeToSurfaceNode();
            };
            this.FilterNode.OperatorChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncFilterNodeToSurfaceNode();
            };
            this.FilterNode.ValueChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncFilterNodeToSurfaceNode();
            };
            this.surfaceNode.FilterablePropertyDescriptionChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncSurfaceNodeToFilterNode();
            };
            this.surfaceNode.OperatorChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncSurfaceNodeToFilterNode();
            };
            this.surfaceNode.ValueChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncSurfaceNodeToFilterNode();
            };
            this.propertyBindingSource.DataSource = new BindingList <FilterablePropertyDescription>(list);
            this.BindingSource.DataSource         = this.surfaceNode;
            this.surfaceNode.OperatorChanged     += this.surfaceNode_OperatorChanged;
            this.EndInit();
        }
Exemplo n.º 15
0
 private Bitmap SelectDefaultIcon(string identifier)
 {
     if (identifier.Contains("usb#vid_046d"))
     {
         return(IconLibrary.GetIcon("logitech"));
     }
     else if (identifier.Contains("usb#vid_045e"))
     {
         return(IconLibrary.GetIcon("microsoft"));
     }
     else if (identifier.Contains("PS3Eye Camera"))
     {
         return(IconLibrary.GetIcon("playstation"));
     }
     else
     {
         return(IconLibrary.GetIcon("webcam"));
     }
 }
Exemplo n.º 16
0
    public void UpdatePopup(TypeTile typeTile)
    {
        trainable = true;
        Sprite targetSprite = GetTileSprite();
        Sprite actionSprite = null;

        if (iconLib == null)
        {
            iconLib = (IconLibrary)FindObjectOfType(typeof(IconLibrary));
        }
        if (typeTile == TypeTile.FoodTile)
        {
            actionSprite = iconLib.GetIcon("Eat");
        }
        else if (typeTile == TypeTile.RestTile)
        {
            actionSprite = iconLib.GetIcon("Sleep");
        }
        SetLayout(null, null, targetSprite, actionSprite);
    }
Exemplo n.º 17
0
		public PropertySheetDialog()
		{
			this.InitializeComponent();
			base.Size = new Size(443, 507);
			this.cancelButton.Text = Strings.Cancel;
			this.okButton.Text = Strings.Ok;
			this.applyButton.Text = Strings.PropertySheetDialogApply;
			this.helpButton.Text = Strings.PropertySheetDialogHelp;
			if (PropertySheetDialog.lockImage == null)
			{
				Size empty = Size.Empty;
				empty.Width = Math.Min(this.lockButton.Width, this.lockButton.Height);
				empty.Height = empty.Width;
				PropertySheetDialog.lockImage = IconLibrary.ToBitmap(Icons.LockIcon, empty);
				PropertySheetDialog.commandLogPropertyExposureEnabledImage = IconLibrary.ToBitmap(Icons.CommandLogPropertyExposureEnabled, empty);
				PropertySheetDialog.commandLogPropertyExposureDisabledImage = IconLibrary.ToBitmap(Icons.CommandLogPropertyExposureDisabled, empty);
			}
			this.commandExposureButton.Image = PropertySheetDialog.commandLogPropertyExposureDisabledImage;
			this.lockButton.Image = PropertySheetDialog.lockImage;
			ToolTip toolTip = new ToolTip();
			toolTip.SetToolTip(this.lockButton, Strings.ShowLockButtonToolTipText);
			toolTip.SetToolTip(this.commandExposureButton, Strings.ShowEMSCommand);
			this.applyButton.Enabled = false;
			this.lockButton.Visible = false;
			this.lockButton.FlatStyle = FlatStyle.Flat;
			this.lockButton.FlatAppearance.BorderSize = 0;
			this.lockButton.FlatAppearance.BorderColor = this.lockButton.BackColor;
			this.lockButton.FlatAppearance.MouseOverBackColor = this.lockButton.BackColor;
			this.lockButton.FlatAppearance.MouseDownBackColor = this.lockButton.BackColor;
			this.commandExposureButton.Enabled = false;
			this.commandExposureButton.FlatStyle = FlatStyle.Flat;
			this.commandExposureButton.FlatAppearance.BorderSize = 0;
			this.commandExposureButton.FlatAppearance.BorderColor = this.commandExposureButton.BackColor;
			this.applyButton.Click += delegate(object param0, EventArgs param1)
			{
				this.PerformApply();
				this.SetActivePage((ExchangePropertyPageControl)this.tabControl.SelectedTab.Tag);
			};
			this.commandExposureButton.MouseEnter += delegate(object param0, EventArgs param1)
			{
				if (this.commandExposureButton.Enabled)
				{
					this.commandExposureButton.FlatStyle = FlatStyle.Standard;
				}
			};
			this.commandExposureButton.MouseLeave += delegate(object param0, EventArgs param1)
			{
				this.commandExposureButton.FlatStyle = FlatStyle.Flat;
			};
			this.commandExposureButton.Click += delegate(object param0, EventArgs param1)
			{
				if (this.isValid && this.isDirty && ((ExchangePropertyPageControl)this.tabControl.SelectedTab.Tag).OnKillActive())
				{
					List<DataHandler> list = new List<DataHandler>();
					ExchangePropertyPageControl[] array = (ExchangePropertyPageControl[])this.tabControl.Tag;
					foreach (ExchangePropertyPageControl exchangePropertyPageControl in array)
					{
						if (exchangePropertyPageControl.IsHandleCreated && exchangePropertyPageControl.Context != null && exchangePropertyPageControl.Context.IsDirty)
						{
							if (!exchangePropertyPageControl.TryApply())
							{
								return;
							}
							if (!list.Contains(exchangePropertyPageControl.DataHandler))
							{
								list.Add(exchangePropertyPageControl.DataHandler);
							}
						}
					}
					StringBuilder stringBuilder = new StringBuilder();
					foreach (DataHandler dataHandler in list)
					{
						stringBuilder.Append(dataHandler.CommandToRun);
					}
					using (PropertyPageDialog propertyPageDialog = new PropertyPageDialog(new PropertyPageCommandExposureControl
					{
						CommandToShow = stringBuilder.ToString()
					}))
					{
						propertyPageDialog.CancelVisible = false;
						((ExchangePage)this.tabControl.SelectedTab.Tag).ShowDialog(propertyPageDialog);
					}
				}
			};
			this.helpButton.Click += delegate(object param0, EventArgs param1)
			{
				this.OnHelpRequested(new HelpEventArgs(Point.Empty));
			};
		}
Exemplo n.º 18
0
 public CameraManagerBasler()
 {
     defaultIcon = IconLibrary.GetIcon("basler");
 }
Exemplo n.º 19
0
 public IconedInfoControl(Icon icon, string description) : this()
 {
     this.pictureBox.Image = IconLibrary.ToBitmap(icon, this.pictureBox.Size);
     this.infoLabel.Text   = description;
 }
Exemplo n.º 20
0
 public CameraManagerFrameGenerator()
 {
     defaultIcon = IconLibrary.GetIcon("dashboard");
 }
Exemplo n.º 21
0
        public void OnNewSelection(ACInputController ic, List <IEntity> entities)
        {
            Clear();
            if (IconLibrary == null)
            {
                return;
            }

            int bType = -1;
            List <RTSBuilding> sBuildings = new List <RTSBuilding>();

            for (int i = 0; i < entities.Count; i++)
            {
                if (entities[i] as RTSUnit != null)
                {
                    return;
                }
                RTSBuilding b = entities[i] as RTSBuilding;
                if (b == null || b.Team.Index != ic.TeamIndex || !b.IsBuilt || !b.IsAlive)
                {
                    continue;
                }

                if (bType < 0)
                {
                    bType = b.Data.Index;
                }
                else if (bType != b.Data.Index)
                {
                    return;
                }

                sBuildings.Add(b);
            }

            if (bType < 0)
            {
                return;
            }

            int wi = 0;
            var bd = ic.Team.Race.Buildings[bType].DefaultButtonControllers;

            foreach (var bc in sBuildings[0].ButtonControllers)
            {
                if (wi >= groups.Length)
                {
                    break;
                }
                if (!IconLibrary.ContainsKey(bc.IconKey))
                {
                    continue;
                }
                groups[wi].Widget.Texture = IconLibrary[bc.IconKey];
                var bcs = new List <ACBuildingButtonController>();
                foreach (var nb in sBuildings)
                {
                    bcs.Add(nb.ButtonControllers[wi]);
                }
                groups[wi].Data = bcs;
                Show(groups[wi]);
                wi++;
            }
        }
Exemplo n.º 22
0
        protected ResultPane(ResultsLoaderProfile profile, DataTableLoader loader)
        {
            base.SuspendLayout();
            this.warningCaption            = new AutoHeightLabel();
            this.warningCaption.BackColor  = SystemColors.Info;
            this.warningCaption.ForeColor  = SystemColors.InfoText;
            this.warningCaption.Image      = IconLibrary.ToSmallBitmap(Icons.Warning);
            this.warningCaption.Dock       = DockStyle.Top;
            this.warningCaption.Name       = "warningCaption";
            this.warningCaption.ImageAlign = ContentAlignment.MiddleLeft;
            this.warningCaption.TextAlign  = ContentAlignment.MiddleLeft;
            this.warningCaption.Padding    = new Padding(20, 2, 2, 2);
            this.warningCaption.Visible    = false;
            base.Controls.Add(this.warningCaption);
            base.Name = "ResultPane";
            base.ResumeLayout(false);
            Command command = Command.CreateSeparator();

            command.Visible = false;
            this.dependentResultPanesCommandsSeparator         = Command.CreateSeparator();
            this.dependentResultPanesCommandsSeparator.Visible = false;
            this.deleteSelectionCommandsSeparator                 = Command.CreateSeparator();
            this.deleteSelectionCommandsSeparator.Visible         = false;
            this.showSelectionPropertiesCommandsSeparator         = Command.CreateSeparator();
            this.showSelectionPropertiesCommandsSeparator.Visible = false;
            Command command2 = Command.CreateSeparator();

            command2.Visible                  = false;
            this.helpCommandSeparator         = Command.CreateSeparator();
            this.helpCommandSeparator.Visible = false;
            this.warningCaption.MouseEnter   += delegate(object param0, EventArgs param1)
            {
                this.warningCaption.ForeColor = SystemColors.HighlightText;
                this.warningCaption.BackColor = SystemColors.Highlight;
            };
            this.warningCaption.MouseLeave += delegate(object param0, EventArgs param1)
            {
                this.warningCaption.ForeColor = SystemColors.InfoText;
                this.warningCaption.BackColor = SystemColors.Info;
            };
            this.warningCaption.Click += this.warningCaption_Click;
            this.DependentResultPanes.ListChanging              += this.DependentResultPanes_ListChanging;
            this.DependentResultPanes.ListChanged               += this.DependentResultPanes_ListChanged;
            this.CustomSelectionCommands.CommandAdded           += new CommandEventHandler(this.CustomSelectionCommands_CommandAdded);
            this.CustomSelectionCommands.CommandRemoved         += new CommandEventHandler(this.CustomSelectionCommands_CommandRemoved);
            this.DependentResultPaneCommands.CommandAdded       += new CommandEventHandler(this.DependentResultPaneCommands_CommandAdded);
            this.DependentResultPaneCommands.CommandRemoved     += new CommandEventHandler(this.DependentResultPaneCommands_CommandRemoved);
            this.DeleteSelectionCommands.CommandAdded           += new CommandEventHandler(this.DeleteSelectionCommands_CommandAdded);
            this.DeleteSelectionCommands.CommandRemoved         += new CommandEventHandler(this.DeleteSelectionCommands_CommandRemoved);
            this.ShowSelectionPropertiesCommands.CommandAdded   += new CommandEventHandler(this.ShowSelectionPropertiesCommands_CommandAdded);
            this.ShowSelectionPropertiesCommands.CommandRemoved += new CommandEventHandler(this.ShowSelectionPropertiesCommands_CommandRemoved);
            base.SelectionCommands.AddRange(new Command[]
            {
                this.dependentResultPanesCommandsSeparator,
                this.deleteSelectionCommandsSeparator,
                this.showSelectionPropertiesCommandsSeparator
            });
            base.ResultPaneCommands.CommandAdded   += new CommandEventHandler(this.ResultPaneCommands_CommandAdded);
            base.ResultPaneCommands.CommandRemoved += new CommandEventHandler(this.ResultPaneCommands_CommandRemoved);
            base.ExportListCommands.CommandAdded   += new CommandEventHandler(this.ExportListCommands_CommandAdded);
            base.ExportListCommands.CommandRemoved += new CommandEventHandler(this.ExportListCommands_CommandRemoved);
            this.viewCommand                      = new Command();
            this.viewCommand.Text                 = Strings.ViewCommands;
            this.viewCommand.Visible              = false;
            this.viewCommand.Name                 = "resultPaneViewCommand";
            this.viewCommand.Icon                 = Icons.View;
            base.ViewModeCommands.CommandAdded   += new CommandEventHandler(this.ViewModeCommands_CommandAdded);
            base.ViewModeCommands.CommandRemoved += new CommandEventHandler(this.ViewModeCommands_CommandRemoved);
            this.WhitespaceCommands.AddRange(new Command[]
            {
                command,
                this.viewCommand,
                command2,
                base.RefreshCommand
            });
            this.ResultsLoaderProfile  = profile;
            this.RefreshableDataSource = loader;
            this.SetupCommandsProfile();
            this.SyncCommands(this.CommandsProfile.ResultPaneCommands, base.ResultPaneCommands);
            this.SyncCommands(this.CommandsProfile.CustomSelectionCommands, this.CustomSelectionCommands);
            this.SyncCommands(this.CommandsProfile.DeleteSelectionCommands, this.DeleteSelectionCommands);
            this.SubscribedRefreshCategories.Add(ResultPane.ConfigurationDomainControllerRefreshCategory);
        }
Exemplo n.º 23
0
 public CameraManagerIDS()
 {
     defaultIcon = IconLibrary.GetIcon("ids");
 }
 public CameraManagerFrameGenerator()
 {
     defaultIcon = IconLibrary.GetIcon("robot");
 }
Exemplo n.º 25
0
 public CameraManagerHTTP()
 {
     defaultIcon = IconLibrary.GetIcon("network");
 }
Exemplo n.º 26
0
    public void ActivatePopup(int actionIndex, List <double> states, List <double> qs)
    {
        trainable = true;
        Sprite targetSprite = GetTileSprite();

        if (actionIndex == 0) // *** Move
        {
            title.text = "Move State";

            List <string> key = new List <string>();
            key.Add("Hunger");
            key.Add("Energy");
            key.Add("Mood");

            List <GaugeAbstract> inputGaugeData = new List <GaugeAbstract>();
            int index = 0;
            foreach (double value in states)
            {
                inputGaugeData.Add(CreatePair(key[index], ((float)states[index] + 0.5f) * 100f));
                index = index + 1;
            }

            key.Clear();

            key.Add("Work");
            key.Add("Eat");
            key.Add("Sleep");

            if (iconLib == null)
            {
                iconLib = (IconLibrary)FindObjectOfType(typeof(IconLibrary));
            }

            List <GaugeAbstract> outputGaugeData = new List <GaugeAbstract>();
            int maxValueIndex = 0;
            index = 0;
            foreach (double value in qs)
            {
                outputGaugeData.Add(CreatePair(key[index], ((float)qs[index]) * 100f));
                if (qs[index] > qs[maxValueIndex])
                {
                    maxValueIndex = index;
                }
                index = index + 1;
            }
            Sprite actionSprite = iconLib.GetIcon(key[maxValueIndex]);
            SetLayout(inputGaugeData, outputGaugeData, targetSprite, actionSprite);
        }
        else if (actionIndex == 1) // *** Action
        {
            title.text = "Action State";

            List <string> key = new List <string>();
            key.Add("Growth");
            key.Add("Water");

            List <GaugeAbstract> inputGaugeData = new List <GaugeAbstract>();
            int index = 0;
            foreach (double value in states)
            {
                inputGaugeData.Add(CreatePair(key[index], ((float)states[index]) * 100f));
                index = index + 1;
            }

            key.Clear();

            key.Add("Idle");
            key.Add("Harvest");
            key.Add("Water");

            if (iconLib == null)
            {
                iconLib = (IconLibrary)FindObjectOfType(typeof(IconLibrary));
            }

            List <GaugeAbstract> outputGaugeData = new List <GaugeAbstract>();
            int maxValueIndex = 0;
            index = 0;
            foreach (double value in qs)
            {
                outputGaugeData.Add(CreatePair(key[index], ((float)qs[index]) * 100f));
                if (qs[index] > qs[maxValueIndex])
                {
                    maxValueIndex = index;
                }
                index = index + 1;
            }
            Sprite actionSprite = iconLib.GetIcon(key[maxValueIndex]);
            SetLayout(inputGaugeData, outputGaugeData, targetSprite, actionSprite);
        }
    }
Exemplo n.º 27
0
 public CameraManagerDaheng()
 {
     defaultIcon = IconLibrary.GetIcon("webcam");
 }