コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextMenuManager"/> class.
 /// </summary>
 /// <param name="plugin">plugin.</param>
 public ContextMenuManager(PriceCheckPlugin plugin)
 {
     this.plugin          = plugin;
     this.contextMenuItem = new InventoryContextMenuItem(
         Loc.Localize("ContextMenuItem", "Check Marketboard Price"), this.ContextItemChanged);
     this.plugin.XivCommon.Functions.ContextMenu.OpenInventoryContextMenu += this.OnOpenInventoryContextMenu;
 }
コード例 #2
0
ファイル: ConfigWindow.cs プロジェクト: kalilistic/PriceCheck
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigWindow"/> class.
 /// </summary>
 /// <param name="plugin">PriceCheck plugin.</param>
 public ConfigWindow(PriceCheckPlugin plugin)
     : base(plugin, "PriceCheck Config")
 {
     this.plugin        = plugin;
     this.Size          = new Vector2(600f, 600f);
     this.SizeCondition = ImGuiCond.Appearing;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UniversalisClient"/> class.
 /// </summary>
 /// <param name="plugin">price check plugin.</param>
 public UniversalisClient(PriceCheckPlugin plugin)
 {
     this.httpClient = new HttpClient
     {
         Timeout = TimeSpan.FromMilliseconds(plugin.Configuration
                                             .RequestTimeout),
     };
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MainWindow"/> class.
 /// </summary>
 /// <param name="plugin">PriceCheck plugin.</param>
 public MainWindow(PriceCheckPlugin plugin)
     : base(plugin, "PriceCheck")
 {
     this.plugin             = plugin;
     this.Size               = new Vector2(300f, 150f);
     this.SizeCondition      = ImGuiCond.Appearing;
     this.RespectCloseHotkey = false;
     this.UpdateWindowTitle();
     if (PriceCheckPlugin.ClientState.IsLoggedIn)
     {
         this.OpenOnLogin();
     }
 }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WindowManager"/> class.
        /// </summary>
        /// <param name="priceCheckPlugin">PriceCheck plugin.</param>
        public WindowManager(PriceCheckPlugin priceCheckPlugin)
        {
            this.Plugin = priceCheckPlugin;

            // create windows
            this.MainWindow   = new MainWindow(this.Plugin);
            this.ConfigWindow = new ConfigWindow(this.Plugin);

            // setup window systems
            this.MainWindowSystem   = new WindowSystem("PriceCheckMainWindowSystem");
            this.ConfigWindowSystem = new WindowSystem("PriceCheckConfigWindowSystem");

            // add windows
            this.MainWindowSystem.AddWindow(this.MainWindow);
            this.ConfigWindowSystem.AddWindow(this.ConfigWindow);

            // add event listeners
            PriceCheckPlugin.PluginInterface.UiBuilder.Draw         += this.Draw;
            PriceCheckPlugin.PluginInterface.UiBuilder.OpenConfigUi += this.OpenConfigUi;
        }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PluginCommandManager"/> class.
 /// </summary>
 /// <param name="plugin">plugin.</param>
 public PluginCommandManager(PriceCheckPlugin plugin)
 {
     this.plugin = plugin;
     PriceCheckPlugin.CommandManager.AddHandler("/pcheck", new CommandInfo(this.TogglePriceCheck)
     {
         HelpMessage = "Show price check.",
         ShowInHelp  = true,
     });
     PriceCheckPlugin.CommandManager.AddHandler("/pricecheck", new CommandInfo(this.TogglePriceCheck)
     {
         ShowInHelp = false,
     });
     PriceCheckPlugin.CommandManager.AddHandler("/pcheckconfig", new CommandInfo(this.ToggleConfig)
     {
         HelpMessage = "Show price check config.",
         ShowInHelp  = true,
     });
     PriceCheckPlugin.CommandManager.AddHandler("/pricecheckconfig", new CommandInfo(this.ToggleConfig)
     {
         ShowInHelp = false,
     });
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HoveredItemManager"/> class.
 /// </summary>
 /// <param name="plugin">plugin.</param>
 public HoveredItemManager(PriceCheckPlugin plugin)
 {
     this.plugin = plugin;
     PriceCheckPlugin.GameGui.HoveredItemChanged += this.HoveredItemChanged;
 }
コード例 #8
0
ファイル: PluginWindow.cs プロジェクト: kalilistic/PriceCheck
 /// <summary>
 /// Initializes a new instance of the <see cref="PluginWindow"/> class.
 /// </summary>
 /// <param name="plugin">PriceCheck plugin.</param>
 /// <param name="windowName">Name of the window.</param>
 /// <param name="flags">ImGui flags.</param>
 protected PluginWindow(PriceCheckPlugin plugin, string windowName, ImGuiWindowFlags flags = ImGuiWindowFlags.None)
     : base(windowName, flags)
 {
     this.Plugin = plugin;
 }