Пример #1
0
        /// <summary>
        /// img click 事件接受器
        /// </summary>
        /// <param name="sender">事件发起方</param>
        /// <param name="e">参数</param>
        private void img_Click(object sender, EventArgs e)
        {
            SkinPictureBox img  = sender as SkinPictureBox;
            RailID         id   = this.ConvertNameToID(img.Name);
            RailMode       rail = this.RailDic[id];

            if (this.IsAllStoped)
            {
                switch (rail.Progress)
                {
                // 如果 其他轨道 被选中,并且所有 轨道 都没有在工作, 则特定 轨道 被选中,其他都清除状态
                // 如果所有的 轨道 都没有被选中,则直接选中
                case RailProgress.UnSelected:
                case RailProgress.Stop:
                    this.ClearOtherRail(id);
                    rail.Progress = RailProgress.Selected;
                    break;

                // 再次单击已选中轨道,取消选中
                case RailProgress.Selected:
                    rail.Progress = RailProgress.UnSelected;
                    break;

                // 单击已经清理过的轨道, 弹窗提示
                case RailProgress.Done:
                    DialogResult result = MessageBox.Show("该轨道已经清理过,是否确认重新清理?", "确认对话框", MessageBoxButtons.YesNo);
                    if (result == DialogResult.Yes)
                    {
                        rail.Progress = RailProgress.Selected;
                    }
                    break;
                }
            }
        }
Пример #2
0
        /// <方法重写当鼠标移到控件时获取——ID>
        private void MouseEnter_reform(object send, EventArgs e)
        {
            SkinPictureBox button = (SkinPictureBox)send;                                                  //获取控件信息

            this.SkinPictureBox_ID = button.Parent.ToString();                                             //写入信息
            this.menuStrip_Reform.SkinContextMenuStrip_Button_ID = button.Name + button.Parent.ToString(); //写入信息
            this.menuStrip_Reform.all_purpose = send;                                                      //获取事件触发的控件
        }
Пример #3
0
 }                                                                                                                                   //返回图片属性
 public ListView_show(List <ImageList> imageLists, SkinListView skinListView, SkinComboBox skinComboBox, SkinPictureBox skinPicture) //构造函数
 {
     this.imageLists   = imageLists;
     this.skinListView = skinListView;
     this.skinComboBox = skinComboBox;
     this.skinPicture  = skinPicture;
     this.skinListView.ItemActivate             += listView_ItemActivate;             //注册选择事件
     this.skinComboBox.SelectionChangeCommitted += comboBox_SelectionChangeCommitted; //注册事件
 }
Пример #4
0
 public void GetImages(SkinPictureBox skinPictureBox, int count)
 {
     if (count == 1)//切割工位
     {
         skinPictureBox4.BackgroundImage    = null;
         this.skinPictureBox4.ImageLocation = skinPictureBox.ImageLocation;
     }
     if (count == 2)//端口工位
     {
         skinPictureBox5.BackgroundImage    = null;
         this.skinPictureBox5.ImageLocation = skinPictureBox.ImageLocation;
     }
 }
Пример #5
0
        private void emoji0_Click(object sender, EventArgs e)
        {
            int            num = 0;
            SkinPictureBox btn = (SkinPictureBox)sender;

            switch (btn.Name)
            {
            case "emoji1":
                num = 1;
                break;

            case "emoji2":
                num = 2;
                break;

            case "emoji3":
                num = 3;
                break;

            case "emoji4":
                num = 4;
                break;

            case "emoji5":
                num = 5;
                break;

            case "emoji6":
                num = 6;
                break;

            case "emoji7":
                num = 7;
                break;

            case "emoji8":
                num = 8;
                break;

            case "emoji9":
                num = 9;
                break;
            }
            String path = Application.StartupPath.Substring(0, Application.StartupPath.LastIndexOf("\\"));

            path = path.Substring(0, path.LastIndexOf("\\"));
            Image img = Image.FromFile(path + "\\Resources\\emoji\\" + num.ToString() + ".png");//获得图片

            SendPicture(img);
            emojiGroup.Visible = false;
        }