コード例 #1
0
        public PonyWindow(Pony Pony)
        {
            InitializeComponent();

            // set up the window.
            this.Left    = 0;
            this.Top     = 0;
            this.Width   = 1;
            this.Height  = 1;
            this.Title   = "Pony";
            this.Topmost = true;
            this.Hide();

            // reference to the pony.
            this.Pony = Pony;

            // tray icon.
            this.Tray = new PonyIcon(this.Pony);
            this.Tray.Show();

            // set a mouse cursor for petting lol.
            this.Cursor = System.Windows.Input.Cursors.Hand;

            // enable moving the window by dragging anywhere.
            // this.MouseLeftButtonDown += new MouseButtonEventHandler(OnWindowDragAction);
        }
コード例 #2
0
ファイル: PonyWindow.xaml.cs プロジェクト: cbenard/pony-app
        public PonyWindow(Pony Pony)
        {
            InitializeComponent();

            // set up the window.
            this.Left = 0;
            this.Top = 0;
            this.Width = 1;
            this.Height = 1;
            this.Title = "Pony";
            this.Topmost = true;
            this.Hide();

            // reference to the pony.
            this.Pony = Pony;

            // tray icon.
            this.Tray = new PonyIcon(this.Pony);
            this.Tray.Show();

            // set a mouse cursor for petting lol.
            this.Cursor = System.Windows.Input.Cursors.Hand;

            // enable moving the window by dragging anywhere.
            // this.MouseLeftButtonDown += new MouseButtonEventHandler(OnWindowDragAction);
        }
コード例 #3
0
        /// <summary>
        /// releases the resources and references this window has.
        /// </summary>
        public void Free()
        {
            // dispose of tray icon.
            this.Tray.Hide();
            this.Tray.Free();
            this.Tray = null;

            // release references.
            this.Pony = null;
        }
コード例 #4
0
ファイル: PonyWindow.xaml.cs プロジェクト: cbenard/pony-app
        /// <summary>
        /// releases the resources and references this window has.
        /// </summary>
        public void Free()
        {
            // dispose of tray icon.
            this.Tray.Hide();
            this.Tray.Free();
            this.Tray = null;

            // release references.
            this.Pony = null;
        }