// TODO: unused? // public void ChangeControl(Control contr) // { // Controls.Clear(); // Controls.Add(contr); // PerformLayout(); // } private void OnClose(object sender, FormClosingEventArgs e) { Control contr = Controls[0]; _oldTab.Controls.Clear(); _oldTab.Controls.Add(contr); UoFiddler.ReDock(_oldTab); }
private void OnClickApply(object sender, System.EventArgs e) { if (checkBoxAltDesign.Checked != Options.DesignAlternative) { Options.DesignAlternative = checkBoxAltDesign.Checked; UoFiddler.ChangeDesign(); PluginEvents.FireDesignChangeEvent(); } Files.CacheData = checkBoxCacheData.Checked; if (checkBoxNewMapSize.Checked != (Map.Felucca.Width == 7168)) { if (checkBoxNewMapSize.Checked) { Map.Felucca.Width = 7168; Map.Trammel.Width = 7168; } else { Map.Felucca.Width = 6144; Map.Trammel.Width = 6144; } UoFiddler.ChangeMapSize(); } if (checkBoxuseDiff.Checked != Map.UseDiff) { Map.UseDiff = checkBoxuseDiff.Checked; ControlEvents.FireMapDiffChangeEvent(); } if (numericUpDownItemSizeWidth.Value != Options.ArtItemSizeWidth || numericUpDownItemSizeHeight.Value != Options.ArtItemSizeHeight) { Options.ArtItemSizeWidth = (int)numericUpDownItemSizeWidth.Value; Options.ArtItemSizeHeight = (int)numericUpDownItemSizeHeight.Value; UoFiddler.ReloadItemTab(); } if (checkBoxItemClip.Checked != Options.ArtItemClip) { Options.ArtItemClip = checkBoxItemClip.Checked; UoFiddler.ReloadItemTab(); } Files.UseHashFile = checkBoxUseHash.Checked; if (map0Nametext.Text != Options.MapNames[0] || map1Nametext.Text != Options.MapNames[1] || map2Nametext.Text != Options.MapNames[2] || map3Nametext.Text != Options.MapNames[3] || map4Nametext.Text != Options.MapNames[4] || map5Nametext.Text != Options.MapNames[5]) { Options.MapNames[0] = map0Nametext.Text; Options.MapNames[1] = map1Nametext.Text; Options.MapNames[2] = map2Nametext.Text; Options.MapNames[3] = map3Nametext.Text; Options.MapNames[4] = map4Nametext.Text; Options.MapNames[5] = map5Nametext.Text; ControlEvents.FireMapNameChangeEvent(); } Options.MapCmd = cmdtext.Text; Options.MapArgs = argstext.Text; if (Directory.Exists(textBoxOutputPath.Text)) { Options.OutputPath = textBoxOutputPath.Text; } }
private void OnClosing(object sender, FormClosingEventArgs e) { UoFiddler.LoadExternToolStripMenu(); }
public UoFiddler() { _refMarker = this; InitializeComponent(); if (FiddlerOptions.StoreFormState) { if (FiddlerOptions.MaximisedForm) { StartPosition = FormStartPosition.Manual; WindowState = FormWindowState.Maximized; } else { if (IsOkFormStateLocation(FiddlerOptions.FormPosition, FiddlerOptions.FormSize)) { StartPosition = FormStartPosition.Manual; WindowState = FormWindowState.Normal; Location = FiddlerOptions.FormPosition; Size = FiddlerOptions.FormSize; } } } Icon = Options.GetFiddlerIcon(); { int commaCountA = 0; string majorVersion = new string( Version.TakeWhile( x => { if (x == '.') { commaCountA++; } return(commaCountA < 2); }).ToArray()); Versionlabel.Text = $"Version {majorVersion}"; } Versionlabel.Left = Start.Size.Width - Versionlabel.Width - 5; ChangeDesign(); LoadExternToolStripMenu(); GlobalPlugins.Plugins.FindPlugins($@"{Application.StartupPath}\plugins"); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); foreach (AvailablePlugin plug in GlobalPlugins.Plugins.AvailablePlugins) { if (!plug.Loaded) { continue; } plug.Instance.ModifyPluginToolStrip(toolStripDropDownButtonPlugins); plug.Instance.ModifyTabPages(TabPanel); } foreach (TabPage tab in TabPanel.TabPages) { if ((int)tab.Tag >= 0 && (int)tab.Tag < Options.ChangedViewState.Count && !Options.ChangedViewState[(int)tab.Tag]) { ToggleView(tab); } } }