Beispiel #1
0
        public ModTile(ModObject mod)
        {
            InitializeComponent();

            contextMenuStrip1.Renderer  = new ToolStripProfessionalRenderer(new MenuColorTable());
            contextMenuStrip1.BackColor = ThemeConstants.BackgroundColor;
            contextMenuStrip1.ForeColor = ThemeConstants.ForegroundColor;

            OriginalColor = this.BackColor;

            this.Mod = mod;
            this.panel1.BackgroundImage = mod.GetIcon();
            this.label1.Text            = mod.Name + "\n(" + mod.GetDirectoryName() + ")";

            this.panel2.Visible = mod.IsReleased;

            checkBox1.CheckedChanged += CheckBox1_CheckedChanged;
            CheckBox1_CheckedChanged(null, null);

            this.MouseEnter += ModTile_MouseEnter;
            this.MouseLeave += ModTile_MouseLeave;

            this.panel1.MouseEnter += ModTile_MouseEnter;
            this.panel1.MouseLeave += ModTile_MouseLeave;

            this.label1.MouseEnter += ModTile_MouseEnter;
            this.label1.MouseLeave += ModTile_MouseLeave;

            checkBox1.Cursor = Cursors.Arrow;

            this.Click        += ModTile_Click;
            this.panel1.Click += ModTile_Click;
            this.label1.Click += ModTile_Click;

            scriptWatcherToolStripMenuItem2.Checked = ScriptWatcherManager.IsWatcherAttached(Mod);

            RevalidateBG();
        }