예제 #1
0
파일: Maker.cs 프로젝트: Frimia/SynapseX-1
        public void SaveSettings()
        {
            var Bootstrap = new SynBootstrapperData
            {
                UiDownload          = UIDownloadBox.Text,
                UiHash              = Sha512(UIPathBox.Text, true),
                InjectorDownload    = InjectorDownloadBox.Text,
                InjectorHash        = Sha512(InjectorPathBox.Text, true),
                BootstrapperVersion = BootstrapperVersionBox.Text
            };

            var Ui = new SynUiData
            {
                DllDownload      = DllDownloadBox.Text,
                DllHash          = Sha512(DllPathBox.Text, true),
                BetaDllDownload  = BetaDllDownloadBox.Text,
                BetaDllHash      = Sha512(BetaDllPathBox.Text, true),
                BetaUiDownload   = BetaUiDownloadBox.Text,
                BetaUiHash       = Sha512(BetaUiPathBox.Text, true),
                CefSharpDownload = CefSharpDownloadBox.Text,
                CefSharpHash     = Sha512(CefSharpPathBox.Text, true),
                SxLibDownload    = SxLibDownloadBox.Text,
                SxLibHash        = Sha512(SxLibPathBox.Text, true),
                SxLibXmlDownload = SxLibXmlDownloadBox.Text,
                SxLibXmlHash     = Sha512(SxLibXmlPathBox.Text, true),
                LauncherDownload = LauncherDownloadBox.Text,
                LauncherHash     = Sha512(LauncherPathBox.Text, true),
                DiscordInvite    = DiscordInviteBox.Text,
                Version          = VersionBox.Text,
                UiVersion        = UiVersionBox.Text,
                IsUpdated        = IsUpdatedBox.Checked
            };

            var Paths = new SynPaths
            {
                UiPath       = UIPathBox.Text,
                InjectorPath = InjectorPathBox.Text,
                DllPath      = DllPathBox.Text,
                BetaDllPath  = BetaDllPathBox.Text,
                BetaUiPath   = BetaUiPathBox.Text,
                CefSharpPath = CefSharpPathBox.Text,
                SxLibPath    = SxLibPathBox.Text,
                SxLibXmlPath = SxLibXmlPathBox.Text,
                LauncherPath = LauncherPathBox.Text
            };

            File.WriteAllText("bootstrap.json", JsonConvert.SerializeObject(Bootstrap));
            File.WriteAllText("ui.json", JsonConvert.SerializeObject(Ui));
            File.WriteAllText("paths.json", JsonConvert.SerializeObject(Paths));
        }
예제 #2
0
파일: Maker.cs 프로젝트: Frimia/SynapseX-1
        private void CompileBootstrapBox_Click(object sender, EventArgs e)
        {
            var Bootstrap = new SynBootstrapperData
            {
                UiDownload          = UIDownloadBox.Text,
                UiHash              = Sha512(UIPathBox.Text, true),
                InjectorDownload    = InjectorDownloadBox.Text,
                InjectorHash        = Sha512(InjectorPathBox.Text, true),
                BootstrapperVersion = BootstrapperVersionBox.Text
            };

            var Comp = JsonConvert.SerializeObject(Bootstrap);

            Clipboard.SetText(Comp);
            BootstrapOutputBox.Text = Comp;

            SaveSettings();

            MessageBox.Show("Complete!");
        }