Пример #1
0
        public WordLaunch(ServerInfo targetserver)
        {
            InitializeComponent();
            this.targetserver = targetserver;
            plugin            = new PluginRpc(targetserver.conn.URL);
            medsize           = plugin.GetMediumSize();

            txt_Content.NativeInterface.SetCodePage((int)Constants.SC_CP_UTF8);

            CategoryFullInfo[] cfi = targetserver.conn.GetCategories(0, targetserver.username, targetserver.password);
            foreach (CategoryFullInfo cf in cfi)
            {
                CheckBox cb = new CheckBox();
                cb.Name = "cb_" + cf.categoryName;
                cb.Text = cf.categoryName;
                cb.Tag  = cf;
                flow_Categories.Controls.Add(cb);
            }

            postResources = GetNextAvailableDir();
            Directory.CreateDirectory(postResources);

            var module = new FileModule();

            webserv = new Server();
            module.Resources.Add(new FileResources("/", postResources));
            webserv.Add(module);
            webserv.Add(new MultiPartDecoder());
            webserv.RequestReceived += new EventHandler <RequestEventArgs>(webserv_RequestReceived);

            // use one http listener.
            webserv.Add(HttpListener.Create(System.Net.IPAddress.Any, webservport));
            webserv.Start(5);

            // Find a valid post to use
            url = targetserver.conn.URL.Replace("xmlrpc.php", "?p=2147483646");
        }
Пример #2
0
        private void btn_test_Click(object sender, EventArgs e)
        {
            UpdateFileFromServerList();
            try
            {
                ServerInfo si = (ServerInfo)listBox1.SelectedItem;
                si.conn.GetCategories(0, si.username, si.password);

                try
                {
                    var plugin = new PluginRpc(si.conn.URL);
                    plugin.GetMediumSize();
                    MessageBox.Show("Success!");
                }
                catch
                {
                    MessageBox.Show("Please make sure you have the BunnyBlogger plugin installed.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed: " + ex.Message + " please check your blog URL or that you have enabled XML-RPC");
            }
        }
Пример #3
0
        public WordLaunch(ServerInfo targetserver)
        {
            InitializeComponent();
            this.targetserver = targetserver;
            plugin = new PluginRpc(targetserver.conn.URL);
            medsize = plugin.GetMediumSize();

            txt_Content.NativeInterface.SetCodePage((int)Constants.SC_CP_UTF8);

            CategoryFullInfo[] cfi = targetserver.conn.GetCategories(0, targetserver.username, targetserver.password);
            foreach (CategoryFullInfo cf in cfi)
            {
                CheckBox cb = new CheckBox();
                cb.Name = "cb_" + cf.categoryName;
                cb.Text = cf.categoryName;
                cb.Tag = cf;
                flow_Categories.Controls.Add(cb);
            }

            postResources = GetNextAvailableDir();
            Directory.CreateDirectory(postResources);

            var module = new FileModule();
            webserv = new Server();
            module.Resources.Add(new FileResources("/",postResources));
            webserv.Add(module);
            webserv.Add(new MultiPartDecoder());
            webserv.RequestReceived+=new EventHandler<RequestEventArgs>(webserv_RequestReceived);

            // use one http listener.
            webserv.Add(HttpListener.Create(System.Net.IPAddress.Any, webservport));
            webserv.Start(5);

            // Find a valid post to use
            url = targetserver.conn.URL.Replace("xmlrpc.php", "?p=2147483646");
        }
Пример #4
0
        private void btn_test_Click(object sender, EventArgs e)
        {
            UpdateFileFromServerList();
            try
            {
                ServerInfo si = (ServerInfo)listBox1.SelectedItem;
                si.conn.GetCategories(0, si.username, si.password);

                try
                {
                    var plugin = new PluginRpc(si.conn.URL);
                    plugin.GetMediumSize();
                    MessageBox.Show("Success!");
                }
                catch
                {
                    MessageBox.Show("Please make sure you have the BunnyBlogger plugin installed.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed: " + ex.Message + " please check your blog URL or that you have enabled XML-RPC");
            }
        }