Пример #1
0
        public string InitialConnect(VersionNumber client_version)
        {
            if (client_version != M3D.Spooling.Version.Client_Version)
            {
                return("<SocketBroadcast>" + new SpoolerMessage(MessageType.IncompatibleSpooler, null).Serialize() + "</SocketBroadcast>");
            }

            var spoolerInfo = new SpoolerInfo
            {
                Version = M3D.Spooling.Version.Client_Version
            };

            foreach (KeyValuePair <string, List <FirmwareBoardVersionKVP> > embeddedFirmware in GetEmbeddedFirmwareList())
            {
                var embeddedFirmwareSummary = new EmbeddedFirmwareSummary(embeddedFirmware.Key);
                foreach (FirmwareBoardVersionKVP firmwareBoardVersionKvp in embeddedFirmware.Value)
                {
                    embeddedFirmwareSummary.FirmwareVersions.Add(firmwareBoardVersionKvp);
                }

                spoolerInfo.SupportPrinterProfiles.Add(embeddedFirmwareSummary);
            }
            spoolerInfo.PrinterProfileList = profile_dictionary.CreateProfileList();
            return("<SocketBroadcast>" + spoolerInfo.Serialize() + Serialize() + "</SocketBroadcast>");
        }
Пример #2
0
Файл: About.cs Проект: urish/M3D
        public About(SpoolerInfo spoolerInfo)
        {
            InitializeComponent();
            if (spoolerInfo == null)
            {
                return;
            }

            versionText.Text = "Spooler Version: " + spoolerInfo.Version.ToString();
            foreach (EmbeddedFirmwareSummary supportPrinterProfile in spoolerInfo.SupportPrinterProfiles)
            {
                foreach (FirmwareBoardVersionKVP firmwareVersion in supportPrinterProfile.FirmwareVersions)
                {
                    listBox1.Items.Add(string.Format("{0} - {1}", (object)supportPrinterProfile.ToString(), (object)firmwareVersion.ToString()));
                }
            }
        }