protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
            e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                             "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
            if (e.CommandName == "EditText")
            {
                if(e.Items.Count == 0)
                    return;

                FileManagerItemInfo item = e.Items[0];
                ViewState["EditDocumentPath"] = item.PhysicalPath;
                string text = File.ReadAllText(item.PhysicalPath, System.Text.Encoding.UTF8);

                WeTextBoxOne.Text = text;

                FileManager1.Visible = false;
                TextEditor.Visible = true;
            }
            }
        }
Ejemplo n.º 2
0
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
            e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                             "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
            if (e.CommandName == "EditText")
            {
                if(e.Items.Count == 0)
                    return;

                FileManagerItemInfo item = e.Items[0];
                ViewState["EditDocumentPath"] = item.PhysicalPath;
               // string text = File.ReadAllText(item.PhysicalPath);

             //   WeTextBoxOne.Text = text;

              //  FileManager1.Visible = false;
               // TextEditor.Visible = true;

                WeTextBoxTwo.Text = item.PhysicalPath;

             //   e.ClientScript = "<javascript>javascript:PopUpWindow('./ImageEditor/UpLoadUserPhotoZ.aspx',100,100,600,500);</javascript>";

            }
            }
        }
Ejemplo n.º 3
0
 void controller_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
 {
     if (ExecuteCommand != null)
     {
         ExecuteCommand(this, e);
     }
 }
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
            e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                             "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
            if (e.CommandName == "EditText")
            {
                if (e.Items.Count == 0)
                    return;

                FileManagerItemInfo item = e.Items[0];
                ViewState["EditDocumentPath"] = item.PhysicalPath;
                string text = File.ReadAllText(item.PhysicalPath, System.Text.Encoding.UTF8);

                FileInfo mfile = new FileInfo(item.PhysicalPath);
                WeTextBoxTwo.Text = mfile.Name.ToLower().Replace(".htm","");

                WeTextBoxOne.Text = text;
                WeTextBoxThree.Text = item.VirtualPath;
                FileManager1.Visible = false;
                TextEditor.Visible = true;

               // ButtonThree.Attributes.Add("OnClick", "javascript:window.open('" + item.VirtualPath + "','newwindow2','width=400,height=500,scrollbars=yes,top=150,left=150')");

            }
            }
        }
 private void OnExecuteCommand(ExecuteCommandEventArgs e)
 {
     if (ExecuteCommand != null)
     {
         ExecuteCommand(this, e);
     }
 }
Ejemplo n.º 6
0
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
                e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                                 "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
                if (e.CommandName == "EditText")
                {
                    if (e.Items.Count == 0)
                        return;

                    FileManagerItemInfo item = e.Items[0];
                    ViewState["EditDocumentPath"] = item.PhysicalPath;
                    string text = File.ReadAllText(item.PhysicalPath, System.Text.Encoding.UTF8);
                    WeTextBoxOne.Text = text;

                    string[] textline = File.ReadAllLines(item.PhysicalPath, System.Text.Encoding.UTF8);

                    FileInfo fileinfo = new FileInfo(item.PhysicalPath);
                    Label1.Text = fileinfo.CreationTime.ToString();
                    Label2.Text = textline[0];
                    Label3.Text = textline[1];
                    Label4.Text = textline[2];

                    string yj = "";
                    for (int i = 3; i < textline.Length; i++)
                    {
                        yj += textline[i] + "<br/>";

                    }

                    Label5.Text = yj;

                    FileManager1.Visible = false;
                    TextEditor.Visible = true;
                }
            }
        }
Ejemplo n.º 7
0
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
            e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                             "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
            if (e.CommandName == "EditText")
            {
                if (e.Items.Count == 0)
                    return;

                FileManagerItemInfo item = e.Items[0];
                ViewState["EditDocumentPath"] = item.PhysicalPath;

             //   WeTextBoxTwo.Text = item.VirtualPath;

            }
            }
        }
        private string OnExecuteCommand(FileManagerItemInfo item, string commandName, string argument)
        {
            ExecuteCommandEventArgs arg = new ExecuteCommandEventArgs(commandName, argument);
            arg.Items.Add(item);
            //arg.Command = fileManagerCommand;

            OnExecuteCommand(arg);

            return arg.ClientScript;
        }
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
                e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                                 "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
                if (e.CommandName == "EditText")
                {
                    if (e.Items.Count == 0)
                        return;

                    FileManagerItemInfo item = e.Items[0];
                    ViewState["EditDocumentPath"] = item.PhysicalPath;

                    WeTextBoxFive.Text = ClassLibraryWeiBao.ClassWeiWeiXin.GetFileName(item.PhysicalPath);

                    MusicMsgData mData = new MusicMsgData();
                    mData.LoadFile(item.PhysicalPath);

                    WeTextBoxSix.Text = mData.Description;
                    WeTextBoxSix.Text = mData.Title;
                    txt0.Text = mData.MusicUrl;
                    txt1.Text = mData.HQMusicUrl;

                    Label1.Text = "";
                    FileManager1.Visible = false;
                    TextEditor.Visible = true;
                }
            }
        }
 private void OnExecuteCommand(ExecuteCommandEventArgs e)
 {
     if (ExecuteCommand != null)
         ExecuteCommand (this, e);
 }
Ejemplo n.º 11
0
 void controller_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
 {
     if (ExecuteCommand != null)
         ExecuteCommand(this, e);
 }
        private string ProcessCommand(FileManagerItemInfo item, FileManagerCommand fileManagerCommand)
        {
            ExecuteCommandEventArgs arg = new ExecuteCommandEventArgs (fileManagerCommand.CommandName, fileManagerCommand.CommandArgument);
            arg.Items.Add (item);
            //arg.Command = fileManagerCommand;

            OnExecuteCommand (arg);

            return arg.ClientScript;
        }
Ejemplo n.º 13
0
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
            e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                             "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
            if (e.CommandName == "EditText")
            {
                if(e.Items.Count == 0)
                    return;

                FileManagerItemInfo item = e.Items[0];
                ViewState["EditDocumentPath"] = item.PhysicalPath;
                string text = File.ReadAllText(item.PhysicalPath, System.Text.Encoding.UTF8);

                WeTextBoxOne.Text = text;

                string host = Request.ServerVariables["HTTP_HOST"];

                WeTextBoxTwo.Text = "http://" + (host + "/WebSurvey/m.aspx?t=" + item.VirtualPath).Replace("//", "/");

             //   ButtonSeven.Attributes.Add("OnClick", "javascript:window.open('" + WeTextBoxTwo.Text + "','newwindow','width=400,height=500,scrollbars=yes,top=150,left=150')");
                WeTextBoxThree.Text = ClassLibraryWeiBao.ClassWeiWeiXin.GetFileName(item.PhysicalPath);

                Panel1.Visible = false;
                TextEditor.Visible = true;
                Panel2.Visible = false;
            }
            }
        }
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
                e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                                 "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
                if (e.CommandName == "EditText")
                {
                    if (e.Items.Count == 0)
                        return;

                    FileManagerItemInfo item = e.Items[0];
                    ViewState["EditDocumentPath"] = item.PhysicalPath;

                    char[] x={'_','.'};
                  string[] Name2=   ClassLibraryWeiBao.ClassWeiWeiXin.GetFileName(item.PhysicalPath).Split(x);

                  WeTextBoxFive.Text=  Name2[0].Replace("V",".") ;
                  WeTextBoxSix.Text = Name2[1].Replace("V", ".");
                  //  string text = File.ReadAllText(item.PhysicalPath, System.Text.Encoding.UTF8);

                    //  TreeView1.Nodes.Add(new TreeNode("新图文消息", ""));

                    NewsMsgData CMsgData = new NewsMsgData();
                    CMsgData.LoadFile(item.PhysicalPath);

                    TextBoxTitle.Text = CMsgData.Items[0].Title;
                    txt0.Text = CMsgData.Items[0].PicUrl;
                    TextBoxUrl.Text = CMsgData.Items[0].Url;
                    TextBoxEDIT.Text = CMsgData.Items[0].Description;

                    WeTextBoxOne.Text = CMsgData.Getdata();
                    Label1.Text = "";
                    FileManager1.Visible = false;
                    TextEditor.Visible = true;
                }
            }
        }
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
                e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                                 "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
                if (e.CommandName == "EditText")
                {
                    if (e.Items.Count == 0)
                        return;

                    FileManagerItemInfo item = e.Items[0];
                    ViewState["EditDocumentPath"] = item.PhysicalPath;

                    WeTextBoxFive.Text = ClassLibraryWeiBao.ClassWeiWeiXin.GetFileName(item.PhysicalPath);

                    ZhuanMsgData CMsgData = new ZhuanMsgData();

                    CMsgData.LoadFile(item.PhysicalPath);

                    string text = CMsgData.Content;// File.ReadAllText(item.PhysicalPath, System.Text.Encoding.UTF8);

                    WeTextBoxOne.Text = text;
                    Label1.Text = "";
                    FileManager1.Visible = false;
                    TextEditor.Visible = true;
                }
            }
        }
        protected void FileManager1_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
        {
            if (Page.IsCallback)
            {
                e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                                 "\\nItem=" + e.Items[0].VirtualPath + "')";
            }
            else
            {
                if (e.CommandName == "EditText")
                {
                    if (e.Items.Count == 0)
                        return;

                    FileManagerItemInfo item = e.Items[0];
                    ViewState["EditDocumentPath"] = item.PhysicalPath;

                    WeTextBoxFive.Text = ClassLibraryWeiBao.ClassWeiWeiXin.GetFileName(item.PhysicalPath);

                  //  string text = File.ReadAllText(item.PhysicalPath, System.Text.Encoding.UTF8);

                    //  TreeView1.Nodes.Add(new TreeNode("新图文消息", ""));
                    TreeView1.Nodes.Clear();

                    NewsMsgData CMsgData = new NewsMsgData();
                    CMsgData.LoadFile(item.PhysicalPath);

                    for (int i = 0; i < CMsgData.Items.Count; i++)
                    {
                        if (CMsgData.Items[i].Title != "")
                        {
                            TreeView1.Nodes.Add(new TreeNode(CMsgData.Items[i].Title));
                        }
                    }

                    for (int i = 0; i < CMsgData.Items.Count; i++)
                    {
                        if (CMsgData.Items[i].Title == "")
                        {
                            CMsgData.Items.RemoveAt(i);
                        }
                    }

                    TextBoxTitle.Text ="";
                    txt0.Text ="";
                    TextBoxUrl.Text ="";
                    TextBoxEDIT.Text = "";
                    Label2.Text = "";

                    Image1.ImageUrl = "";

                    WeTextBoxOne.Text = CMsgData.Getdata();
                    Label1.Text = "";
                    FileManager1.Visible = false;
                    TextEditor.Visible = true;

                }
            }
        }
Ejemplo n.º 17
0
 protected void fmPatient_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
 {
     e.ClientScript = "alert('Use ExecuteCommand event to handle your custom command.\\nCommandName=" + e.CommandName +
                      "\\nItem=" + e.Items[0].VirtualPath.Replace("'", "\\'") + "')";
 }