Example #1
0
 /// <summary>
 /// 远程浏览器ListView双击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ListViewWeb_DoubleClick(object sender, EventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
     if (ListViewWeb.SelectedItems[0].Text == "上级目录")
     {
         WebPath = WebPath.Substring(0, WebPath.Length - 1);
         WebPath = WebPath.Substring(0, WebPath.LastIndexOf(@"/") + 1);
     }
     else if (!(ListViewWeb.SelectedItems[0].Text.Contains(".") && ListViewWeb.SelectedItems[0].Text.Substring(ListViewWeb.SelectedItems[0].Text.LastIndexOf(".")).Length == 4))
     {
         WebPath = WebPath + ListViewWeb.SelectedItems[0].Text + "/";
     }
     else
     {
         UpYunPreview          upYunPreview = new UpYunPreview();
         UpYun_Controller.Main main         = new UpYun_Controller.Main();
         Image i = main.previewFile(userInformation.Url, WebPath, ListViewWeb.SelectedItems[0].Text);
         upYunPreview.Width           = i.Width;
         upYunPreview.Height          = i.Height;
         upYunPreview.BackgroundImage = i;
         upYunPreview.Show();
         return;
     }
     WebUrlTextChanged();
     Cursor.Current = Cursors.Default;
 }
Example #2
0
        /// <summary>
        /// WEB工具栏按钮:预览
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void BtnPreviewWeb_click(object sender, EventArgs e)
        {
            UpYunPreview upYunPreview = new UpYunPreview();

            UpYun_Controller.Main main = new UpYun_Controller.Main();
            Image i = main.previewFile(userInformation.Url, WebPath, ListViewWeb.SelectedItems[0].Text);

            upYunPreview.Width           = i.Width;
            upYunPreview.Height          = i.Height;
            upYunPreview.BackgroundImage = i;
            upYunPreview.Show();
        }
Example #3
0
        /// <summary>
        /// 远程浏览器右键菜单“预览”条目事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void WebPopupMenuPreview_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            UpYunPreview upYunPreview = new UpYunPreview();

            UpYun_Controller.Main main = new UpYun_Controller.Main();
            Point p = this.ListViewWeb.PointToClient(new Point(menutrippoint.X, menutrippoint.Y));
            Image i = main.previewFile(userInformation.Url, WebPath, ListViewWeb.GetItemAt(p.X, p.Y).Text);

            upYunPreview.Width           = i.Width;
            upYunPreview.Height          = i.Height;
            upYunPreview.BackgroundImage = i;
            upYunPreview.Show();
        }
Example #4
0
 /// <summary>
 /// 远程浏览器ListView双击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ListViewWeb_DoubleClick(object sender, EventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
     if (ListViewWeb.SelectedItems[0].Text == "上级目录")
     {
         WebPath = WebPath.Substring(0, WebPath.Length - 1);
         WebPath = WebPath.Substring(0, WebPath.LastIndexOf(@"/") + 1);
     }
     else if (!(ListViewWeb.SelectedItems[0].Text.Contains(".") && ListViewWeb.SelectedItems[0].Text.Substring(ListViewWeb.SelectedItems[0].Text.LastIndexOf(".")).Length == 4))
         WebPath = WebPath + ListViewWeb.SelectedItems[0].Text + "/";
     else
     {
         UpYunPreview upYunPreview = new UpYunPreview();
         UpYun_Controller.Main main = new UpYun_Controller.Main();
         Image i = main.previewFile(userInformation.Url, WebPath, ListViewWeb.SelectedItems[0].Text);
         upYunPreview.Width = i.Width;
         upYunPreview.Height = i.Height;
         upYunPreview.BackgroundImage = i;
         upYunPreview.Show();
         return;
     }
     WebUrlTextChanged();
     Cursor.Current = Cursors.Default;
 }
Example #5
0
 /// <summary>
 /// WEB工具栏按钮:预览
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void BtnPreviewWeb_click(object sender, EventArgs e)
 {
     UpYunPreview upYunPreview = new UpYunPreview();
     UpYun_Controller.Main main = new UpYun_Controller.Main();
     Image i = main.previewFile(userInformation.Url, WebPath, ListViewWeb.SelectedItems[0].Text);
     upYunPreview.Width = i.Width;
     upYunPreview.Height = i.Height;
     upYunPreview.BackgroundImage = i;
     upYunPreview.Show();
 }
Example #6
0
 /// <summary>
 /// 远程浏览器右键菜单“预览”条目事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void WebPopupMenuPreview_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     UpYunPreview upYunPreview = new UpYunPreview();
     UpYun_Controller.Main main = new UpYun_Controller.Main();
     Point p = this.ListViewWeb.PointToClient(new Point(menutrippoint.X, menutrippoint.Y));
     Image i = main.previewFile(userInformation.Url, WebPath, ListViewWeb.GetItemAt(p.X, p.Y).Text);
     upYunPreview.Width = i.Width;
     upYunPreview.Height = i.Height;
     upYunPreview.BackgroundImage = i;
     upYunPreview.Show();
 }