public MDIParent() { try { Thread.CurrentThread.CurrentCulture = Utility.CultureUS; InitializeComponent(); System.Drawing.Point leftTop = (System.Drawing.Point)Properties.Settings.Default["LeftTop"]; System.Drawing.Size widthHeight = (System.Drawing.Size)Properties.Settings.Default["WidthHeight"]; if (widthHeight.Width >= 200 && widthHeight.Height >= 100) { this.StartPosition = FormStartPosition.Manual; this.Location = leftTop; this.Size = widthHeight; } this.Text += Gui.Version; Gui.Config = Properties.Settings.Default; openFileDialog1.Filter = "All Files (*.*)|*.*"; Gui.Docking = this; DockQuickAccess = new FormQuickAccess(); DockFiles = new DockContent(); DockEditors = new DockContent(); DockContents = new Dictionary <Type, List <DockContent> >(); dockLog = new FormLog(); Report.Log += new Action <string>(dockLog.Logger); Report.Timestamp = (bool)Gui.Config["LogEntriesTimestamp"]; Report.ReportLog("Settings are saved at " + Assembly.GetExecutingAssembly().Location + ".config"); Report.Status += new Action <string>(MDIParent_Status); dockScript = new FormScript(); Gui.Scripting = dockScript; this.FormClosing += new FormClosingEventHandler(MDIParent_FormClosing); dockImage = new FormImage(); Gui.ImageControl = dockImage; try { dockRenderer = new FormRenderer(); Gui.Renderer = dockRenderer.Renderer; } catch { } Gui.Scripting.Variables.Add(MainVar, this); PluginManager.RegisterFunctions(Assembly.GetExecutingAssembly()); eulerFilterToolStripMenuItem.Checked = (bool)Gui.Config["FbxExportAnimationEulerFilter"]; eulerFilterToolStripMenuItem.CheckedChanged += eulerFilterToolStripMenuItem_CheckChanged; toolStripEditTextBoxFilterPrecision.Text = ((Single)Gui.Config["FbxExportAnimationFilterPrecision"]).ToString(); toolStripEditTextBoxFilterPrecision.AfterEditTextChanged += toolStripEditTextBoxFilterPrecision_AfterEditTextChanged; averageNormalsToolStripMenuItem.Checked = (bool)Gui.Config["FbxImportAverageNormals"]; averageNormalsToolStripMenuItem.CheckedChanged += averageNormalsToolStripMenuItem_CheckedChanged; negateQuaternionFlipsToolStripMenuItem.Checked = (bool)Gui.Config["FbxImportAnimationNegateQuaternionFlips"]; negateQuaternionFlipsToolStripMenuItem.CheckedChanged += negateQuaternionFlipsToolStripMenuItem_CheckedChanged; forceTypeSampledToolStripMenuItem.Checked = (bool)Gui.Config["FbxImportAnimationForceTypeSampled"]; forceTypeSampledToolStripMenuItem.CheckedChanged += forceTypeSampledToolStripMenuItem_CheckedChanged; toolStripEditTextBoxMQOImportVertexScaling.Text = ((float)Gui.Config["MQOImportVertexScaling"]).ToFloatString(); toolStripEditTextBoxMQOImportVertexScaling.AfterEditTextChanged += toolStripEditTextBoxMQOImportVertexScaling_AfterEditTextChanged; toolStripEditTextBoxSwapThesholdMB.Text = ((long)Gui.Config["PrivateMemSwapThresholdMB"]).ToString(); toolStripEditTextBoxSwapThesholdMB.AfterEditTextChanged += toolStripEditTextBoxSwapThesholdMB_AfterEditTextChanged; toolStripEditTextBoxTreeViews.Text = ((float)Gui.Config["TreeViewFontSize"]).ToFloatString(); toolStripEditTextBoxTreeViews.AfterEditTextChanged += toolStripEditTextBoxTreeViews_AfterEditTextChanged; toolStripEditTextBoxListViews.Text = ((float)Gui.Config["ListViewFontSize"]).ToFloatString(); toolStripEditTextBoxListViews.AfterEditTextChanged += toolStripEditTextBoxListViews_AfterEditTextChanged; dockingToolStripMenuItem.Checked = (bool)Gui.Config["Docking"]; dockingToolStripMenuItem.CheckedChanged += dockingToolStripMenuItem_CheckedChanged; } catch (Exception ex) { if (dockLog != null) { Utility.ReportException(ex); } else { throw ex; } } }
public MDIParent() { try { Thread.CurrentThread.CurrentCulture = Utility.CultureUS; InitializeComponent(); System.Drawing.Point leftTop = (System.Drawing.Point)Properties.Settings.Default["LeftTop"]; System.Drawing.Size widthHeight = (System.Drawing.Size)Properties.Settings.Default["WidthHeight"]; if (widthHeight.Width >= 200 && widthHeight.Height >= 100) { this.StartPosition = FormStartPosition.Manual; this.Location = leftTop; this.Size = widthHeight; } this.Text += Gui.Version; Gui.Config = Properties.Settings.Default; openFileDialog1.Filter = "All Files (*.*)|*.*"; DockQuickAccess = new FormQuickAccess(); DockFiles = new DockContent(); DockEditors = new DockContent(); DockContents = new Dictionary<Type, List<DockContent>>(); dockLog = new FormLog(); Report.Log += new Action<string>(dockLog.Logger); Report.ReportLog("Settings are saved at " + Assembly.GetExecutingAssembly().Location + ".config"); dockScript = new FormScript(); dockImage = new FormImage(); dockRenderer = new FormRenderer(); Gui.Scripting = dockScript; Gui.Docking = this; Gui.ImageControl = dockImage; Gui.Renderer = dockRenderer.Renderer; Report.Status += new Action<string>(MDIParent_Status); this.FormClosing += new FormClosingEventHandler(MDIParent_FormClosing); Gui.Scripting.Variables.Add(MainVar, this); PluginManager.RegisterFunctions(Assembly.GetExecutingAssembly()); eulerFilterToolStripMenuItem.CheckedChanged += eulerFilterToolStripMenuItem_CheckChanged; toolStripEditTextBoxFilterPrecision.Text = ((Single)Gui.Config["FbxExportAnimationFilterPrecision"]).ToString(); toolStripEditTextBoxFilterPrecision.AfterEditTextChanged += toolStripEditTextBoxFilterPrecision_AfterEditTextChanged; negateQuaternionFlipsToolStripMenuItem.CheckedChanged += negateQuaternionFlipsToolStripMenuItem_CheckedChanged; toolStripEditTextBoxSwapThesholdMB.Text = ((long)Gui.Config["PrivateMemSwapThresholdMB"]).ToString(); toolStripEditTextBoxSwapThesholdMB.AfterEditTextChanged += toolStripEditTextBoxSwapThesholdMB_AfterEditTextChanged; toolStripEditTextBoxTreeViews.Text = ((float)Gui.Config["TreeViewFontSize"]).ToFloatString(); toolStripEditTextBoxTreeViews.AfterEditTextChanged += toolStripEditTextBoxTreeViews_AfterEditTextChanged; toolStripEditTextBoxListViews.Text = ((float)Gui.Config["ListViewFontSize"]).ToFloatString(); toolStripEditTextBoxListViews.AfterEditTextChanged += toolStripEditTextBoxListViews_AfterEditTextChanged; } catch (Exception ex) { if (dockLog != null) { Utility.ReportException(ex); } else { throw ex; } } }