Exemple #1
0
		public void ShowFullScreen()
		{
			if (CanStartFull()){
				m_ImageF  = new frmImage(0, 0, WinType.full, _il);
				m_ImageF.SelfChanged += new HandleSelfChange(HandleSelf);         // send event for full screen close
				m_ImageF.PicLoadPos(_currentPath, false);
				m_ImageF.Show();
				m_ImageF.BringToFront();
				//??SetCommand('y', _currentPath);
			}
			if (_wType == WinType.full) {
				Debug.WriteLine("close full " + _currentPath);
				SetSelf(_currentPath);     // handled by HandleSelf
				this.Close();
			}
		}
Exemple #2
0
		//------------------------------   2nd screen    ----------------------------------------------------------

		public void Start2ndScreen()
		{
			string prPath = _priorPath;
			if (prPath == ""){
				prPath = _currentPath;
			}

			if (CanStart2nd()){
				m_Image2  = new frmImage(0, 0, WinType.second, _il);
				m_Image2.PicLoadPos(prPath, false);
				m_Image2.Show();

			}
			else {    // img to foreground
				if (CanShow2nd()){
					m_Image2.BringToFront();
				}
			}
		}
Exemple #3
0
        void FrmMainShown(object sender, EventArgs e)
        {
            Form fm = this;

            m_Image = new frmImage(fm, WinType.normal);
            m_Image.StatusChanged  += new HandleStatusMainChange(HandleStatus);
            m_Image.WindowChanged  += new HandleWindowMainChange(HandleWindow);
            m_Image.WindowSize     += new HandleWindowSize(HandleSize);
            m_Image.CommandChanged += new HandleCommandChange(HandleCommand);

            m_Image.Show(dockPanel1, DockState.Document);                  // sequence of tabs
            m_ExifDash = new ExifDash();
            m_ExifDash.StatusChanged  += new HandleStatusMainChange(HandleStatus);
            m_ExifDash.WindowSize     += new HandleWindowSize(HandleSize);
            m_ExifDash.CommandChanged += new HandleCommandChange(HandleCommand);
            //m_Image.Show(dockPanel1, DockState.Document);     // set active

            bool doShow = true;

            if (Control.ModifierKeys == Keys.Control)               // ctrl
            {
                doShow = false;
                //Debug.WriteLine(" key control ");
            }

            string firstImage = "";

            string[] args = Environment.GetCommandLineArgs();
            if (args.Length > 1)
            {
                firstImage = args[1];
            }
            if (File.Exists(firstImage))
            {
                //Debug.WriteLine("Image command line: " + firstImage);
                m_Image.PicScan(firstImage, false, 0);
                if (doShow)
                {
                    m_Image.PicLoadPos(firstImage, true);
                    recentItem1.AddRecentItem(firstImage);
                }
                else
                {
                    _currentPath = firstImage;
                }
            }
            else if (File.Exists(Settings.Default.LastImage))
            {
                //Debug.WriteLine("Last image settings: " + Settings.Default.LastImage);
                m_Image.PicScan(Settings.Default.LastImage, false, 0);
                if (doShow)
                {
                    m_Image.PicLoadPos(Settings.Default.LastImage, true);
                }
                else
                {
                    _currentPath = Settings.Default.LastImage;
                }
            }
            else
            {
                string userImagePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Pictures";
                if (Directory.Exists(userImagePath))
                {
                    m_Image.PicScan(userImagePath, true, 0);
                }
                firstImage = Directory.GetCurrentDirectory() + @"\Next-View-0.7.jpg";
                recentItem1.AddRecentItem(firstImage);
                if (doShow)
                {
                    m_Image.PicLoadPos(firstImage, true);
                }
                else
                {
                    _currentPath = firstImage;
                }
                //Debug.WriteLine("Default image: " + _currentPath);
            }
            m_Image.ScollbarVis(true);
        }