Exemple #1
0
        public static void NotifyIcon(MainWindow _THIS, ref bool _NotifyIconCheck)
        {
            if (_NotifyIconCheck)
            {
                System.Windows.Forms.NotifyIcon _NI = new System.Windows.Forms.NotifyIcon();

                System.Windows.Forms.ContextMenu _CM = new System.Windows.Forms.ContextMenu();

                WorkShopAction.ContextMenu_NI(_CM, _NI, _THIS);

                Stream _SourceIcon = Application.GetResourceStream(new Uri("pack://application:,,,/WPF_2_;component/Image/mainicon.ico")).Stream;
                _NI.Icon        = new System.Drawing.Icon(_SourceIcon);
                _NI.Visible     = true;
                _NI.Text        = "go";
                _NI.ContextMenu = _CM;
                WorkShopAction.NIDoubleClick(_NotifyIcon: _NI, _THIS: _THIS);
            }
        }