Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     FormOpenFileDialog controlex            = new FormOpenFileDialog();
     controlex.StartLocation                 = AddonWindowLocation.Right;
     controlex.DefaultViewMode               = FolderViewMode.Thumbnails;
     controlex.OpenDialog.InitialDirectory   = Path.GetFullPath(Application.ExecutablePath);
     controlex.OpenDialog.AddExtension       = true;
     controlex.OpenDialog.Filter             = "Image Files(*.bmp;*.jpg;*.gif;*.png)|*.bmp;*.jpg;*.gif;*.png";
     controlex.ShowDialog(this);
     controlex.Dispose();
 }
 public FormMain()
 {
     InitializeComponent();
     FormOpenFileDialog controlex = new FormOpenFileDialog();
     controlex.StartLocation = AddonWindowLocation.Right;
     controlex.DefaultViewMode = FolderViewMode.Thumbnails;
     controlex.OpenDialog.InitialDirectory = Path.GetFullPath(Application.ExecutablePath);
     controlex.OpenDialog.AddExtension = true;
     controlex.OpenDialog.Filter = "Image Files(*.bmp;*.jpg;*.jpeg;*.gif;*.png)|*.bmp;*.jpg;*jpeg;*.gif;*.png";
     controlex.ShowDialog(this);
     controlex.Dispose();
 }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            FormOpenFileDialog controlex = new FormOpenFileDialog();

            controlex.StartLocation               = AddonWindowLocation.Right;
            controlex.DefaultViewMode             = FolderViewMode.Thumbnails;
            controlex.OpenDialog.InitialDirectory = Path.GetFullPath(Application.ExecutablePath);
            controlex.OpenDialog.AddExtension     = true;
            controlex.OpenDialog.Filter           = "Image Files(*.bmp;*.jpg;*.gif;*.png)|*.bmp;*.jpg;*.gif;*.png";
            controlex.ShowDialog(this);
            controlex.Dispose();
        }
        public FormMain()
        {
            InitializeComponent();
            FormOpenFileDialog controlex = new FormOpenFileDialog();

            controlex.StartLocation               = AddonWindowLocation.Right;
            controlex.DefaultViewMode             = FolderViewMode.Thumbnails;
            controlex.OpenDialog.InitialDirectory = Path.GetFullPath(Application.ExecutablePath);
            controlex.OpenDialog.AddExtension     = true;
            controlex.OpenDialog.Filter           = "Image Files(*.bmp;*.jpg;*.jpeg;*.gif;*.png)|*.bmp;*.jpg;*jpeg;*.gif;*.png";
            controlex.ShowDialog(this);
            controlex.Dispose();
        }
Exemplo n.º 5
0
        public string Show()
        {
            FormOpenFileDialog controlex            = new FormOpenFileDialog();
            controlex.StartLocation                 = AddonWindowLocation.Right;
            controlex.DefaultViewMode               = FolderViewMode.Default;
            controlex.OpenDialog.InitialDirectory = Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory);//Application.ExecutablePath);
            controlex.OpenDialog.AddExtension       = true;
            controlex.OpenDialog.Filter             = "½£3ͼ±êÎļþ(*.UITex)|*.UITex";//"Image Files(*.bmp;*.jpg;*.gif;*.png)|*.bmp;*.jpg;*.gif;*.png";

            //AppDomain.CurrentDomain.BaseDirectory;
            //controlex.SetCurrenIconRect(Rect);
            controlex.InitRect = Rect;
            DialogResult r = controlex.ShowDialog(null, FileName);
            if (r == DialogResult.OK)
            {
                Rect = controlex.Rect;
                ID = controlex.ID;
                return controlex.OpenDialog.FileName;
            }
            controlex.UnInit();
            controlex.Dispose();
            return string.Empty;
        }
 /// <summary>
 /// Open image
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnOpenImageClicked(object sender, MouseButtonEventArgs e)
 {
     HideAllSubMenus();
     FormOpenFileDialog controlex = new FormOpenFileDialog();
     controlex.StartLocation = AddonWindowLocation.Right;
     controlex.DefaultViewMode = FolderViewMode.Thumbnails;
     controlex.OpenDialog.InitialDirectory = GlobalContants.screenshotFolderPath;
     controlex.OpenDialog.AddExtension = true;
     controlex.OpenDialog.Filter = "Image Files(*.bmp;*.jpg;*.gif;*.png; *.jpeg)|*.bmp;*.jpg;*.jpeg;*.gif;*.png";
     var result = controlex.ShowDialog();
     if (result == System.Windows.Forms.DialogResult.OK)
     {
         string filename = controlex.OpenDialog.FileName;
         m_ProcessManager.GenerateProcess(filename, true);
         Thread.Sleep(1000);
         SendKeys.SendWait("{F11}");
     }
 }