Пример #1
0
 protected virtual void OnCommandChanged(SetCommandEventArgs e)
 {
     if (this.CommandChanged != null)
     {
         this.CommandChanged(this, e);
     }
 }
Пример #2
0
        private void HandleCommand(object sender, SetCommandEventArgs e)
        // called via SetCommand: image.KDown, OpenPic, ProcessDrop; exifdash.CmdShowClick
        // commands for main
        {
            char   comm  = e.Command;
            string fName = e.Fname;

            //Debug.WriteLine("Command: " +  comm);
            switch (comm)
            {
            case 'e':                      //  exifdash
                m_ExifDash.SetPath2(_currentPath);
                m_ExifDash.Show(dockPanel1, DockState.Document);
                break;

            case 'g':                      //  show gif
                tbGif();
                break;

            case 'h':                      //  show no gif
                tbNoGif();
                break;

            case 'i':                      //  exif dash img
                List <ImgFile> exImgList;
                m_ExifDash.DashImgList(out exImgList);
                //Debug.WriteLine("img on main: " + exImgList.Count.ToString());
                m_Image.Show(dockPanel1, DockState.Document);
                m_Image.ShowExifImages(exImgList, fName);
                break;

            case 'l':                      //  leave dash
                Settings.Default.DashW = this.Width;
                Settings.Default.DashH = this.Height;
                Settings.Default.Save( );
                break;

            case 'p':                      //  dash enter - exif path
                m_ExifDash.SetPath2(_currentPath);
                break;

            case 'r':                      //  recent  for drop and open
                recentItem1.AddRecentItem(fName);
                break;

            case 'w':                      //  exit
                ExitApp();
                break;

            default:                         //  unknown
                Debug.WriteLine("unknown command: " + comm);
                break;
            }
        }