Exemplo n.º 1
0
        public Widget(string characterName, IWurmApi wurmApi, ILogger logger)
        {
            if (characterName == null)
            {
                throw new ArgumentNullException("characterName");
            }
            if (wurmApi == null)
            {
                throw new ArgumentNullException("wurmApi");
            }
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            this.characterName = characterName;
            this.wurmApi       = wurmApi;
            this.logger        = logger;
            InitializeComponent();

            actionLbl.Text    = string.Empty;
            widgetModeManager = new WidgetModeManager(this);
            widgetModeManager.Set(true);
            widgetModeManager.WidgetModeChanging += (sender, args) =>
            {
                widgetHelpLbl.Visible = !args.WidgetMode;
            };
        }
Exemplo n.º 2
0
        private void FormTimers_Load(object sender, EventArgs e)
        {
            if (this.Visible)
            {
                this.Size = new Size(timersFeature.SavedWindowSize);
            }
            try
            {
                widgetManager.Set(timersFeature.WidgetModeEnabled);

                formInited = true;
            }
            catch (Exception exception)
            {
                logger.Error(exception, "form load error");
            }
        }
Exemplo n.º 3
0
        public CombatWidgetForm(ICombatDataSource combatData)
        {
            if (combatData == null)
            {
                throw new ArgumentNullException("combatData");
            }
            this.combatData = combatData;
            InitializeComponent();

            currentAttackersLbl.Text = string.Empty;
            currentFocusLbl.Text     = string.Empty;

            widgetModeManager = new WidgetModeManager(this);
            widgetModeManager.Set(true);
            widgetModeManager.WidgetModeChanging += (sender, args) =>
            {
                widgetHelpLbl.Visible = !args.WidgetMode;
            };
        }