Beispiel #1
0
        private void RemoteEdit()
        {
            if (Folder != null && m_File != null)
            {
                string filename = System.IO.Path.Combine(Folder, m_File);
                TheBox.BoxServer.DownloadRequest msg = new DownloadRequest();
                Pandora.Profile.Server.FillBoxMessage(msg);
                msg.Filename = filename;

                BoxServerForm form = new BoxServerForm(msg);

                if (form.ShowDialog() == DialogResult.OK)
                {
                    TheBox.BoxServer.FileTransport response = form.Response as FileTransport;

                    if (response != null)
                    {
                        // Download succesful
                        RemoteEditor f = new RemoteEditor(filename, response.Text);
                        Pandora.Localization.LocalizeControl(f);
                        f.Show();
                        f.Closed += new EventHandler(form_Closed);
                        m_Editors.Add(f);
                    }
                    else
                    {
                        sBar.Text = Pandora.Localization.TextProvider["Script.UnexpectedErr"];
                    }
                }
            }
        }
Beispiel #2
0
        private void RemoteEdit()
        {
            if (Folder != null && m_File != null)
            {
                var filename = Path.Combine(Folder, m_File);
                var msg      = new DownloadRequest();
                Pandora.Profile.Server.FillBoxMessage(msg);
                msg.Filename = filename;

                var form = new BoxServerForm(msg);

                if (form.ShowDialog() == DialogResult.OK)
                {
                    var response = form.Response as FileTransport;

                    if (response != null)
                    {
                        // Download succesful
                        var f = new RemoteEditor(filename, response.Text);
                        Pandora.Localization.LocalizeControl(f);
                        f.Show();
                        f.Closed += form_Closed;
                        m_Editors.Add(f);
                    }
                    else
                    {
                        sBar.Text = Pandora.Localization.GetTextProvider()["Script.UnexpectedErr"];
                    }
                }
            }
        }
Beispiel #3
0
		private void RemoteEdit()
		{
			if ( Folder != null && m_File != null )
			{
				string filename = System.IO.Path.Combine( Folder, m_File );
				TheBox.BoxServer.DownloadRequest msg = new DownloadRequest();
				Pandora.Profile.Server.FillBoxMessage( msg );
				msg.Filename = filename;

				BoxServerForm form = new BoxServerForm( msg );

				if ( form.ShowDialog() == DialogResult.OK )
				{
					TheBox.BoxServer.FileTransport response = form.Response as FileTransport;

					if ( response != null )
					{
						// Download succesful
						RemoteEditor f = new RemoteEditor( filename, response.Text );
						Pandora.Localization.LocalizeControl( f );
						f.Show();
						f.Closed += new EventHandler(form_Closed);
						m_Editors.Add( f );
					}
					else
					{
						sBar.Text = Pandora.Localization.TextProvider[ "Script.UnexpectedErr" ];
					}
				}
			}
		}