Example #1
0
        public static RpcApplication ToRpc(this Application application)
        {
            var rpcApplication = new RpcApplication
            {
                CategoryId     = application.CategoryId,
                FullName       = application.FullName,
                Icon           = application.Icon,
                Id             = application.Id,
                IsProductivity = application.IsProductivity,
                Name           = application.Name,
                Version        = application.Version
            };

            return(rpcApplication);
        }
Example #2
0
        private void cmnuProperties_Click(object sender, EventArgs e)
        {
            if (olvApplications.SelectedObject == null)
            {
                return;
            }

            Cursor = Cursors.WaitCursor;

            try
            {
                RpcApplication app = (RpcApplication)olvApplications.SelectedObject;

                IKetarinRpc    proxy     = XmlRpcProxyGen.Create <IKetarinRpc>();
                string         xml       = proxy.GetApplication(app.ShareId);
                ApplicationJob resultJob = ApplicationJob.LoadOneFromXml(xml);

                using (ApplicationJobDialog dialog = new ApplicationJobDialog())
                {
                    dialog.ApplicationJob = resultJob;
                    dialog.ReadOnly       = true;
                    dialog.ShowDialog(this);
                }
            }
            catch (XmlRpcException)
            {
                MessageBox.Show(this, "Failed loading the selected application.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (WebException)
            {
                MessageBox.Show(this, "Failed loading the selected application.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }