示例#1
0
        public OPMFileDialog()
        {
            InitializeComponent();

            this.AllowResize = true;
            this.FilterIndex = -1;

            this.ShowAddToFavorites = false;
            this.ShowNewFolder      = (this is OPMSaveFileDialog);

            lvExplorer.ShowAttributes = false;
            lvExplorer.ShowLastAccess = false;

            lvExplorer.SelectFile          += new SelectFileEventHandler(lvExplorer_SelectFile);
            lvExplorer.SelectMultipleItems += new SelectMultipleItemsEventHandler(lvExplorer_SelectMultipleItems);
            lvExplorer.SelectDirectory     += new SelectDirectoryEventHandler(lvExplorer_SelectDirectory);
            lvExplorer.DoubleClickFile     += new DoubleClickFileEventHandler(lvExplorer_DoubleClickFile);
            lvExplorer.LaunchMultipleItems += new LaunchMultipleItemsHandler(lvExplorer_LaunchMultipleItems);
            lvExplorer.QueryDisplayName    += new QueryDisplayNameHandler(lvExplorer_QueryDisplayName);

            this.Load += new EventHandler(OPMFileDialog_Load);

            btnAddToFavorites.Image = Resources.Favorites16;
            btnNewFolder.Image      = Resources.New_Folder_Command16;

            _tt  = new OPMToolTipManager(btnAddToFavorites);
            _tt2 = new OPMToolTipManager(btnNewFolder);

            btnOK.OnDropDownClicked += new EventHandler(btnOK_OnDropDownClicked);
        }
示例#2
0
        public PlaylistScreen() : base()
        {
            InitializeComponent();

            _ttm = new OPMToolTipManager(lvPlaylist);

            ThemeManager.SetFont(lvPlaylist, FontSizes.Normal);
            lvPlaylist.ShowItemToolTips = false;
            lvPlaylist.MultiSelect      = true;
            lvPlaylist.Items.Clear();

            lvPlaylist.ItemMouseHover += new ListViewItemMouseHoverEventHandler(lvPlaylist_ItemMouseHover);

            playlist.PlaylistUpdated +=
                new PlaylistUpdatedEventHandler(playlist_PlaylistUpdated);

            this.HandleDestroyed += new EventHandler(PlaylistPanel_HandleDestroyed);

            if (MainThread.MainWindow != null)
            {
                MainThread.MainWindow.Shown += new EventHandler(MainWindow_Shown);
            }

            UpdateTotalTime(0);

            if (!DesignMode)
            {
                //MediaRenderer.DefaultInstance.MediaRendererHeartbeat += new MediaRendererEventHandler(OnMediaRendererHeartbeat);
                MediaRenderer.DefaultInstance.FilterStateChanged += new FilterStateChangedHandler(OnFilterStateChanged);
            }

            OnThemeUpdatedInternal();
        }
        public PlaybackControlPanel()
            : base()
        {
            InitializeComponent();

            this.DoubleBuffered = true;

            _tip = new OPMToolTipManager(opmToolStrip1);

            this.HandleCreated += new EventHandler(PlaybackControlPanel_HandleCreated);
        }
示例#4
0
        public ThemeFormBase()
        {
            //Initialize the main thread
            if (!DesignMode)
            {
                MainThread.Initialize(this);

                //ThreadPool.QueueUserWorkItem((c) =>
                //{
                //    Thread.Sleep(1000);
                //    MainThread.Send((c2) => ScrollBarSkinner.SkinTopWindow(this));
                //});
            }

            base.AutoScaleDimensions = new SizeF(1, 1);
            base.AutoScaleMode       = AutoScaleMode.None;
            base.FormBorderStyle     = FormBorderStyle.None;

            InitializeComponent();

            _rmBottom.Cursor = Cursors.SizeNS;
            _rmLeft.Cursor   = Cursors.SizeWE;
            _rmRight.Cursor  = Cursors.SizeWE;
            _rmTop.Cursor    = Cursors.SizeNS;

            _rmLT.Cursor = Cursors.SizeNWSE;
            _rmLB.Cursor = Cursors.SizeNESW;
            _rmRT.Cursor = Cursors.SizeNESW;
            _rmRB.Cursor = Cursors.SizeNWSE;

            _ttm = new OPMToolTipManager(this);

            this.FormButtons = FormButtons.All;
            this.AllowResize = true;

            this.Text       = string.Empty;
            this.ControlBox = false;

            this.StartPosition = FormStartPosition.CenterParent;

            foreach (Control ctl in this.Controls)
            {
                if (ctl is ResizeMargin)
                {
                    ctl.BringToFront();
                    ctl.BackColor = Color.Transparent;
                }
            }

            _rmBottom.Tag = HTBOTTOM;
            _rmLB.Tag     = HTBOTTOMLEFT;
            _rmLeft.Tag   = HTLEFT;
            _rmLT.Tag     = HTTOPLEFT;
            _rmRB.Tag     = HTBOTTOMRIGHT;
            _rmRight.Tag  = HTRIGHT;
            _rmRT.Tag     = HTTOPRIGHT;
            _rmTop.Tag    = HTTOP;

            this.BackColor = ThemeManager.BackColor;

            this.Shown            += new EventHandler(ThemeFormBase_Shown);
            this.Load             += new EventHandler(ThemeForm_Load);
            this.Resize           += new EventHandler(ThemeForm_Resize);
            this.MouseDown        += new MouseEventHandler(OnMouseDown);
            this.MouseUp          += new MouseEventHandler(OnMouseUp);
            this.MouseMove        += new MouseEventHandler(OnMouseMove);
            this.MouseDoubleClick += new MouseEventHandler(ThemeForm_MouseDoubleClick);
            this.MouseHover       += new EventHandler(OnMouseHover);
            this.MouseLeave       += new EventHandler(OnMouseLeave);
            this.Activated        += new EventHandler(OnActivated);
            this.Deactivate       += new EventHandler(OnDeactivated);
            this.HandleCreated    += new EventHandler(ThemeFormBase_HandleCreated);
        }