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; }; }
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"); } }
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; }; }