Example #1
0
        /// <summary>
        /// アイコンのクローンを生成(簡易版・分類指定)
        /// </summary>
        /// <param name="windowType">画像の分類</param>
        /// <returns></returns>
        public new GHIconEx Clone(FormType windowType)
        {
            GHIconEx icon = new GHIconEx(image, windowType);

            icon.OpendImage  = OpendImage;
            icon.ClosedImage = ClosedImage;
            icon.opened      = opened;

            return(icon);
        }
Example #2
0
 /// <summary>
 /// グループコンストラクタ
 /// </summary>
 /// <param name="name">グループ名</param>
 public Group()
 {
     Items = new List <GroupItem>();
     icon  = new GHIconEx(SkinImage.Item_Open_Icon, SkinImage.Item_Icon, FormType.Launcher);
     icon.control.MouseEnter += new EventHandler(Group_Control_Enter);
     icon.control.MouseLeave += new EventHandler(Group_Control_Leave);
     icon.control.MouseClick += new MouseEventHandler(Group_Control_Click);
     priority = 0;
     timer    = new Timer {
         Interval = 400
     };
     timer.Tick += new EventHandler(Group_Control_Timer);
 }
Example #3
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="group">登録するグループ</param>
        public Myset(Group group)
        {
            Items = new List <MysetItem>(10);
            icon  = group.icon.Clone(FormType.MysetList);
            icon.control.MouseEnter += new EventHandler(Myset_Control_Enter);
            icon.control.MouseLeave += new EventHandler(Myset_Control_Leave);
            icon.control.MouseClick += new MouseEventHandler(Myset_Control_Click);

            timer = new Timer {
                Interval = 400
            };
            timer.Tick += new EventHandler(Myset_Control_Timer);

            foreach (var item in group.Items)
            {
                AddMysetItem(item);
            }
        }
Example #4
0
        /// <summary>
        /// ランチャーの読み込み時のイベント
        /// </summary>
        private void Launcher_Load(object sender, EventArgs e)
        {
            // タスクトレイに追加
            AddNotifyIcon();

            // マイセットアイコンの初期化&追加
            MysetIcon = new GHIconEx(SkinImage.Myset_Open_Icon, SkinImage.Myset_Icon, FormType.Launcher);
            MysetIcon.control.MouseClick += (s, a) => {
                if (a.Button == MouseButtons.Left)
                {
                    if (GHManager.MysetList.FormVisible)
                    {
                        GHManager.MysetList.MouseActive = false;
                        GHManager.MysetList.MysetList_Hide();
                    }
                    else
                    {
                        GHManager.MysetList.MouseActive = true;
                        GHManager.MysetList.MysetList_Show();
                    }
                }
            };
            Controls.Add(MysetIcon.control);

            // フック開始
            if (!Dll.StartHook())
            {
                Application.Exit();
            }

            // ランチャーの位置・サイズを設定
            Size = new Size(GHManager.Settings.Style.Launcher.Width, GHManager.Settings.Style.Launcher.Height);
            SetOffset(GHManager.Settings.Launcher.Offset);

            animateInfo = new GHAnimateInfo(GHManager.Settings.Animate.Launcher_DelayTime, GHManager.Settings.Animate.Launcher_AnimateTime, GHManager.Settings.Animate.Launcher_Slide, GHManager.Settings.Animate.Launcher_Fade);

            GHManager.RegistHotKey(Handle);
            // タイマー開始
            DrawTimer.Start();
            UpdateTimer.Start();
        }
Example #5
0
        public Myset(string[] path)
        {
            Items = new List <MysetItem>(10);
            Skin.GetSkinImage(SkinImage.Myset_Item, out Bitmap image);
            icon = new GHIconEx(SkinImage.Item_Open_Icon, SkinImage.Item_Icon, FormType.MysetList);
            image.Dispose();
            image = null;
            icon.control.MouseEnter += new EventHandler(Myset_Control_Enter);
            icon.control.MouseLeave += new EventHandler(Myset_Control_Leave);
            icon.control.MouseClick += new MouseEventHandler(Myset_Control_Click);
            timer = new Timer {
                Interval = 400
            };
            timer.Tick += new EventHandler(Myset_Control_Timer);
            foreach (var item in path)
            {
                AddMysetItem(item);
            }

            SetMysetIcon();
        }