コード例 #1
0
 public bool GetEnableDeleteMenu(MyPictureEdit mypictureedit)
 {
     if (this.list.ContainsKey(mypictureedit))
     {
         return list[mypictureedit].EnableDeleteMenu;
     }
     return false;
 }
コード例 #2
0
 public EventHandler GetCustomClickUpLoad(MyPictureEdit mypictureedit)
 {
     if (this.list.ContainsKey(mypictureedit))
     {
         return list[mypictureedit].CustomClickUpLoad;
     }
     return null;
 }
コード例 #3
0
 public void SetEnableUpLoadMenu(MyPictureEdit mypictureedit, bool enableuploadmenu)
 {
     if (!this.list.ContainsKey(mypictureedit))
     {
         var para = GetDefaultMenupara();
         para.EnableUpLoadMenu = enableuploadmenu;
         this.list.Add(mypictureedit, para);
     }
     else
     {
         this.list[mypictureedit].EnableUpLoadMenu = enableuploadmenu;
     }
     DoStyle(mypictureedit);
 }
コード例 #4
0
        private void DoStyle(MyPictureEdit mypictureedit)
        {
            if (!this.list.ContainsKey(mypictureedit))
            {
                return;
            }
            var para = this.list[mypictureedit];
            if (para.EnableMenu)
            {
                var mypicturemenu = new MyPictureMenu(mypictureedit);
                mypicturemenu.EnableUpLoad = para.EnableUpLoadMenu;
                mypicturemenu.EnableDelete = para.EnableDeleteMenu;
                mypicturemenu.EnableSave = para.EnableSaveMenu;

                mypicturemenu.UpLoadClicked -= para.CustomClickUpLoad;
                mypicturemenu.UpLoadClicked += para.CustomClickUpLoad;

                mypicturemenu.DeleteClicked -= para.CustomClickDelete;
                mypicturemenu.DeleteClicked += para.CustomClickDelete;

                mypicturemenu.SaveClicked -= para.CustomClickSave;
                mypicturemenu.SaveClicked += para.CustomClickSave;

                mypictureedit._Menu = mypicturemenu;
            }
        }
コード例 #5
0
 public void SetCustomClickUpLoad(MyPictureEdit mypictureedit, EventHandler customclickupload)
 {
     if (!this.list.ContainsKey(mypictureedit))
     {
         var para = GetDefaultMenupara();
         para.CustomClickUpLoad = customclickupload;
         this.list.Add(mypictureedit, para);
     }
     else
     {
         this.list[mypictureedit].CustomClickUpLoad = customclickupload;
     }
     DoStyle(mypictureedit);
 }