void SaveToolStripMenuItemClick(object sender, EventArgs e) { using (var sfd = new SaveFileDialog()) { sfd.Filter = "ROBLOX Diogenes filter v2 (diogenes.fnt)|diogenes.fnt|ROBLOX Diogenes filter v1 (diogenes.fnt)|diogenes.fnt"; sfd.FilterIndex = 1; sfd.FileName = "diogenes.fnt"; sfd.Title = "Save diogenes.fnt"; if (sfd.ShowDialog() == DialogResult.OK) { StringBuilder builder = new StringBuilder(); foreach (string s in richTextBox1.Lines) { if (sfd.FilterIndex == 1) { builder.Append(SDKFuncs.DiogenesCrypt(s) + Environment.NewLine); label2.Text = "v2"; } else { builder.Append(s + Environment.NewLine); label2.Text = "v1"; } } using (StreamWriter sw = File.CreateText(sfd.FileName)) { sw.Write(builder.ToString()); } } } }
private void AssetDownloader_AssetDownloaderButton_Click(object sender, EventArgs e) { SDKFuncs.StartItemDownload( AssetDownloader_AssetNameBox.Text, url, AssetDownloader_AssetIDBox.Text, Convert.ToInt32(AssetDownloader_AssetVersionSelector.Value), isWebSite); }
public static void LaunchSDKAppByIndex(int index) { SDKApps selectedApp = SDKFuncs.GetSDKAppForIndex(index); switch (selectedApp) { case SDKApps.AssetSDK: AssetSDK asset = new AssetSDK(); asset.Show(); break; case SDKApps.ClientScriptDoc: ClientScriptDocumentation csd = new ClientScriptDocumentation(); csd.Show(); break; case SDKApps.SplashTester: SplashTester st = new SplashTester(); st.Show(); break; case SDKApps.ScriptGenerator: Process proc = new Process(); proc.StartInfo.FileName = GlobalPaths.ConfigDirData + "\\RSG.exe"; proc.StartInfo.CreateNoWindow = false; proc.StartInfo.UseShellExecute = false; proc.Start(); break; case SDKApps.LegacyPlaceConverter: Process proc2 = new Process(); proc2.StartInfo.FileName = GlobalPaths.ConfigDirData + "\\Roblox_Legacy_Place_Converter.exe"; proc2.StartInfo.CreateNoWindow = false; proc2.StartInfo.UseShellExecute = false; proc2.Start(); break; case SDKApps.DiogenesEditor: DiogenesEditor dio = new DiogenesEditor(); dio.Show(); break; case SDKApps.ClientScriptTester: MessageBox.Show("Note: If you want to test a specific way of loading a client, select the ClientScript Tester in the 'Versions' tab of the Novetus Launcher, then launch it through any way you wish."); #if LAUNCHER GlobalFuncs.LaunchRBXClient("ClientScriptTester", ScriptType.Client, false, false, null, null); #else GlobalFuncs.LaunchRBXClient("ClientScriptTester", ScriptType.Client, false, false, null); #endif break; default: ClientinfoEditor cie = new ClientinfoEditor(); cie.Show(); break; } }
private void AssetLocalization_LocalizeButton_Click(object sender, EventArgs e) { OpenFileDialog robloxFileDialog = SDKFuncs.LoadROBLOXFileDialog(currentType); if (robloxFileDialog.ShowDialog() == DialogResult.OK) { path = robloxFileDialog.FileName; AssetLocalization_BackgroundWorker.RunWorkerAsync(); } }
private void button1_Click(object sender, EventArgs e) { OpenFileDialog robloxFileDialog = SDKFuncs.LoadROBLOXFileDialog(currentType); if (robloxFileDialog.ShowDialog() == DialogResult.OK) { path = robloxFileDialog.FileName; backgroundWorker1.RunWorkerAsync(); } }
private void AssetDownloader_AssetDownloaderButton_Click(object sender, EventArgs e) { if (batchMode == false) { SDKFuncs.StartItemDownload( AssetDownloader_AssetNameBox.Text, url, AssetDownloader_AssetIDBox.Text, Convert.ToInt32(AssetDownloader_AssetVersionSelector.Value), isWebSite); } else { SaveFileDialog saveFileDialog1 = new SaveFileDialog { FileName = ".", //"Compressed zip files (*.zip)|*.zip|All files (*.*)|*.*" Filter = "Roblox Model(*.rbxm) | *.rbxm | Roblox Mesh(*.mesh) | *.mesh | PNG Image(*.png) | *.png | WAV Sound(*.wav) | *.wav", DefaultExt = ".rbxm", Title = "Save files downloaded via batch" }; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { string basepath = Path.GetDirectoryName(saveFileDialog1.FileName); string extension = Path.GetExtension(saveFileDialog1.FileName); AssetDownloaderBatch_Status.Visible = true; string[] lines = AssetDownloaderBatch_BatchIDBox.Lines; foreach (var line in lines) { string[] linesplit = line.Split('|'); SDKFuncs.StartItemBatchDownload( linesplit[0] + extension, url, linesplit[1], Convert.ToInt32(AssetDownloader_AssetVersionSelector.Value), isWebSite, basepath); } AssetDownloaderBatch_Status.Visible = false; MessageBox.Show("Batch download complete! " + lines.Count() + " items downloaded!", "Novetus Item SDK", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
void LoadToolStripMenuItemClick(object sender, EventArgs e) { using (var ofd = new OpenFileDialog()) { ofd.Filter = "ROBLOX Diogenes filter (diogenes.fnt)|diogenes.fnt"; ofd.FilterIndex = 1; ofd.FileName = "diogenes.fnt"; ofd.Title = "Load diogenes.fnt"; if (ofd.ShowDialog() == DialogResult.OK) { StringBuilder builder = new StringBuilder(); using (StreamReader reader = new StreamReader(ofd.FileName)) { while (!reader.EndOfStream) { string line = reader.ReadLine(); try { line = SDKFuncs.DiogenesCrypt(line); label2.Text = "v2"; } catch (Exception) { label2.Text = "v1"; continue; } builder.Append(line + Environment.NewLine); } } richTextBox1.Text = builder.ToString(); } } }
// This event handler updates the progress. private void AssetLocalization_BackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { AssetLocalization_StatusText.Text = SDKFuncs.GetProgressString(currentType, e.ProgressPercentage); AssetLocalization_StatusBar.Value = e.ProgressPercentage; }
// This event handler is where the time-consuming work is done. private void AssetLocalization_BackgroundWorker_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; SDKFuncs.LocalizeAsset(currentType, worker, path, name, meshname); }
private void AssetLocalization_AssetTypeBox_SelectedIndexChanged(object sender, EventArgs e) { currentType = SDKFuncs.SelectROBLOXFileType(AssetLocalization_AssetTypeBox.SelectedIndex); }
void Button1Click(object sender, EventArgs e) { SDKFuncs.StartItemDownload(textBox1.Text, url, textBox2.Text, Convert.ToInt32(numericUpDown1.Value), isWebSite); }
// This event handler updates the progress. private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e) { label2.Text = SDKFuncs.GetProgressString(currentType, e.ProgressPercentage); progressBar1.Value = e.ProgressPercentage; }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { currentType = SDKFuncs.SelectROBLOXFileType(comboBox1.SelectedIndex); }