/// <summary> /// Insert one line into document /// </summary> /// <param name="p">paragraph</param> /// <param name="phrase">text</param> private void InsertPhraseIntoDocument(Paragraph p, string phrase) { foreach (string s in phrase.SplitForTex(this.DelimiterLeft, this.DelimiterRight)) { if (s.StartsWith(this.DelimiterLeft.ToString()) && s.EndsWith(this.DelimiterRight.ToString())) { string tex = s.Substring(1, s.Length - 2); WpfMath.Controls.FormulaControl fc = new WpfMath.Controls.FormulaControl(); fc.Formula = tex; p.Inlines.Add(new InlineUIContainer(fc)); } else { p.Inlines.Add(new Run(s)); } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\MainWindow.xaml" ((chromaProcess.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.file = ((System.Windows.Controls.Menu)(target)); return; case 3: this.menuInput = ((System.Windows.Controls.MenuItem)(target)); #line 15 "..\..\MainWindow.xaml" this.menuInput.Click += new System.Windows.RoutedEventHandler(this.MenuInput_Click); #line default #line hidden return; case 4: this.menuOutput = ((System.Windows.Controls.MenuItem)(target)); #line 16 "..\..\MainWindow.xaml" this.menuOutput.Click += new System.Windows.RoutedEventHandler(this.MenuOutput_Click); #line default #line hidden return; case 5: this.menuExit = ((System.Windows.Controls.MenuItem)(target)); #line 17 "..\..\MainWindow.xaml" this.menuExit.Click += new System.Windows.RoutedEventHandler(this.MenuExit_Click); #line default #line hidden return; case 6: this.menuSample1 = ((System.Windows.Controls.MenuItem)(target)); #line 20 "..\..\MainWindow.xaml" this.menuSample1.Click += new System.Windows.RoutedEventHandler(this.menuSample1_Click); #line default #line hidden return; case 7: this.menuSample5 = ((System.Windows.Controls.MenuItem)(target)); #line 21 "..\..\MainWindow.xaml" this.menuSample5.Click += new System.Windows.RoutedEventHandler(this.menuSample5_Click); #line default #line hidden return; case 8: this.menuMetadata = ((System.Windows.Controls.MenuItem)(target)); #line 22 "..\..\MainWindow.xaml" this.menuMetadata.Click += new System.Windows.RoutedEventHandler(this.menuMetadata_Click); #line default #line hidden return; case 9: this.menuTristimulus = ((System.Windows.Controls.MenuItem)(target)); #line 25 "..\..\MainWindow.xaml" this.menuTristimulus.Click += new System.Windows.RoutedEventHandler(this.MenuTristimulus_Click); #line default #line hidden return; case 10: this.menuAdjCoef = ((System.Windows.Controls.MenuItem)(target)); #line 27 "..\..\MainWindow.xaml" this.menuAdjCoef.Click += new System.Windows.RoutedEventHandler(this.menuAdjCoef_Click); #line default #line hidden return; case 11: this.menuPropCoef = ((System.Windows.Controls.MenuItem)(target)); #line 28 "..\..\MainWindow.xaml" this.menuPropCoef.Click += new System.Windows.RoutedEventHandler(this.menuPropCoef_Click); #line default #line hidden return; case 12: this.menuChroma = ((System.Windows.Controls.MenuItem)(target)); #line 29 "..\..\MainWindow.xaml" this.menuChroma.Click += new System.Windows.RoutedEventHandler(this.menuChroma_Click); #line default #line hidden return; case 13: this.menuLm = ((System.Windows.Controls.MenuItem)(target)); #line 30 "..\..\MainWindow.xaml" this.menuLm.Click += new System.Windows.RoutedEventHandler(this.menuLm_Click); #line default #line hidden return; case 14: this.menuColorTemp = ((System.Windows.Controls.MenuItem)(target)); #line 31 "..\..\MainWindow.xaml" this.menuColorTemp.Click += new System.Windows.RoutedEventHandler(this.menuColorTemp_Click); #line default #line hidden return; case 15: #line 33 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuPlot_Click); #line default #line hidden return; case 16: this.hints = ((System.Windows.Controls.Label)(target)); return; case 17: this.formula = ((WpfMath.Controls.FormulaControl)(target)); return; case 18: this.formulaY = ((WpfMath.Controls.FormulaControl)(target)); return; case 19: this.formulaZ = ((WpfMath.Controls.FormulaControl)(target)); return; case 20: this.txtTemp = ((System.Windows.Controls.TextBox)(target)); return; case 21: this.txtTempY = ((System.Windows.Controls.TextBox)(target)); return; case 22: this.txtTempZ = ((System.Windows.Controls.TextBox)(target)); return; case 23: this.btnK = ((System.Windows.Controls.Button)(target)); #line 91 "..\..\MainWindow.xaml" this.btnK.Click += new System.Windows.RoutedEventHandler(this.btnK_Click); #line default #line hidden return; case 24: this.btnXYZ = ((System.Windows.Controls.Button)(target)); #line 93 "..\..\MainWindow.xaml" this.btnXYZ.Click += new System.Windows.RoutedEventHandler(this.btnXYZ_Click); #line default #line hidden return; case 25: this.btn_xyz = ((System.Windows.Controls.Button)(target)); #line 95 "..\..\MainWindow.xaml" this.btn_xyz.Click += new System.Windows.RoutedEventHandler(this.btn_xyz_Click); #line default #line hidden return; case 26: this.btnNT = ((System.Windows.Controls.Button)(target)); #line 97 "..\..\MainWindow.xaml" this.btnNT.Click += new System.Windows.RoutedEventHandler(this.btnNT_Click); #line default #line hidden return; case 27: this.btnBrightness = ((System.Windows.Controls.Button)(target)); #line 99 "..\..\MainWindow.xaml" this.btnBrightness.Click += new System.Windows.RoutedEventHandler(this.btnBrightness_Click); #line default #line hidden return; case 28: this.btnSetTriValues = ((System.Windows.Controls.Button)(target)); #line 100 "..\..\MainWindow.xaml" this.btnSetTriValues.Click += new System.Windows.RoutedEventHandler(this.btnSetTriValues_Click); #line default #line hidden return; case 29: this.btnLm = ((System.Windows.Controls.Button)(target)); #line 101 "..\..\MainWindow.xaml" this.btnLm.Click += new System.Windows.RoutedEventHandler(this.btnLm_Click); #line default #line hidden return; case 30: this.dispLabel = ((System.Windows.Controls.TextBox)(target)); return; case 31: this.spectrumList = ((System.Windows.Controls.ListView)(target)); return; case 32: this.gcv1 = ((System.Windows.Controls.GridViewColumn)(target)); return; case 33: this.gcv2 = ((System.Windows.Controls.GridViewColumn)(target)); return; case 34: this.btnS_lambda = ((System.Windows.Controls.Button)(target)); #line 128 "..\..\MainWindow.xaml" this.btnS_lambda.Click += new System.Windows.RoutedEventHandler(this.btnS_lambda_Click); #line default #line hidden return; case 35: this.btnIn_X = ((System.Windows.Controls.Button)(target)); #line 130 "..\..\MainWindow.xaml" this.btnIn_X.Click += new System.Windows.RoutedEventHandler(this.btnIn_X_Click); #line default #line hidden return; case 36: this.btnIn_Y = ((System.Windows.Controls.Button)(target)); #line 132 "..\..\MainWindow.xaml" this.btnIn_Y.Click += new System.Windows.RoutedEventHandler(this.btnIn_Y_Click); #line default #line hidden return; case 37: this.btnIn_Z = ((System.Windows.Controls.Button)(target)); #line 134 "..\..\MainWindow.xaml" this.btnIn_Z.Click += new System.Windows.RoutedEventHandler(this.btnIn_Z_Click); #line default #line hidden return; case 38: this.btnIn_x = ((System.Windows.Controls.Button)(target)); #line 136 "..\..\MainWindow.xaml" this.btnIn_x.Click += new System.Windows.RoutedEventHandler(this.btnIn_x_Click); #line default #line hidden return; case 39: this.btnIn_y = ((System.Windows.Controls.Button)(target)); #line 138 "..\..\MainWindow.xaml" this.btnIn_y.Click += new System.Windows.RoutedEventHandler(this.btnIn_y_Click); #line default #line hidden return; case 40: this.btnPhi = ((System.Windows.Controls.Button)(target)); #line 141 "..\..\MainWindow.xaml" this.btnPhi.Click += new System.Windows.RoutedEventHandler(this.btnPhi_Click); #line default #line hidden return; case 41: this.btnDeltaLambda = ((System.Windows.Controls.Button)(target)); #line 144 "..\..\MainWindow.xaml" this.btnDeltaLambda.Click += new System.Windows.RoutedEventHandler(this.btnDeltaLambda_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\MainWindow.xaml" ((chromaProcess.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.file = ((System.Windows.Controls.Menu)(target)); return; case 3: this.menuInput = ((System.Windows.Controls.MenuItem)(target)); #line 15 "..\..\MainWindow.xaml" this.menuInput.Click += new System.Windows.RoutedEventHandler(this.MenuInput_Click); #line default #line hidden return; case 4: this.menuOutput = ((System.Windows.Controls.MenuItem)(target)); #line 16 "..\..\MainWindow.xaml" this.menuOutput.Click += new System.Windows.RoutedEventHandler(this.MenuOutput_Click); #line default #line hidden return; case 5: this.menuExit = ((System.Windows.Controls.MenuItem)(target)); #line 17 "..\..\MainWindow.xaml" this.menuExit.Click += new System.Windows.RoutedEventHandler(this.MenuExit_Click); #line default #line hidden return; case 6: this.menuSample1 = ((System.Windows.Controls.MenuItem)(target)); #line 20 "..\..\MainWindow.xaml" this.menuSample1.Click += new System.Windows.RoutedEventHandler(this.menuSample1_Click); #line default #line hidden return; case 7: this.menuSample5 = ((System.Windows.Controls.MenuItem)(target)); #line 21 "..\..\MainWindow.xaml" this.menuSample5.Click += new System.Windows.RoutedEventHandler(this.menuSample5_Click); #line default #line hidden return; case 8: this.menuMetadata = ((System.Windows.Controls.MenuItem)(target)); #line 22 "..\..\MainWindow.xaml" this.menuMetadata.Click += new System.Windows.RoutedEventHandler(this.menuMetadata_Click); #line default #line hidden return; case 9: this.menuTristimulus = ((System.Windows.Controls.MenuItem)(target)); #line 25 "..\..\MainWindow.xaml" this.menuTristimulus.Click += new System.Windows.RoutedEventHandler(this.MenuTristimulus_Click); #line default #line hidden return; case 10: this.menuTrisBasic = ((System.Windows.Controls.MenuItem)(target)); #line 26 "..\..\MainWindow.xaml" this.menuTrisBasic.Click += new System.Windows.RoutedEventHandler(this.menuTrisBasic_Click); #line default #line hidden return; case 11: this.menuAdjCoef = ((System.Windows.Controls.MenuItem)(target)); #line 27 "..\..\MainWindow.xaml" this.menuAdjCoef.Click += new System.Windows.RoutedEventHandler(this.menuAdjCoef_Click); #line default #line hidden return; case 12: this.menuPropCoef = ((System.Windows.Controls.MenuItem)(target)); #line 28 "..\..\MainWindow.xaml" this.menuPropCoef.Click += new System.Windows.RoutedEventHandler(this.menuPropCoef_Click); #line default #line hidden return; case 13: this.menuChroma = ((System.Windows.Controls.MenuItem)(target)); #line 29 "..\..\MainWindow.xaml" this.menuChroma.Click += new System.Windows.RoutedEventHandler(this.menuChroma_Click); #line default #line hidden return; case 14: this.menuLm = ((System.Windows.Controls.MenuItem)(target)); #line 30 "..\..\MainWindow.xaml" this.menuLm.Click += new System.Windows.RoutedEventHandler(this.menuLm_Click); #line default #line hidden return; case 15: this.menuColorTemp = ((System.Windows.Controls.MenuItem)(target)); #line 31 "..\..\MainWindow.xaml" this.menuColorTemp.Click += new System.Windows.RoutedEventHandler(this.menuColorTemp_Click); #line default #line hidden return; case 16: #line 33 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuPlot_Click); #line default #line hidden return; case 17: this.formula = ((WpfMath.Controls.FormulaControl)(target)); return; case 18: this.formulaY = ((WpfMath.Controls.FormulaControl)(target)); return; case 19: this.formulaZ = ((WpfMath.Controls.FormulaControl)(target)); return; case 20: this.txtTemp = ((System.Windows.Controls.TextBox)(target)); return; case 21: this.txtTempY = ((System.Windows.Controls.TextBox)(target)); return; case 22: this.txtTempZ = ((System.Windows.Controls.TextBox)(target)); return; case 23: this.btnK = ((System.Windows.Controls.Button)(target)); #line 85 "..\..\MainWindow.xaml" this.btnK.Click += new System.Windows.RoutedEventHandler(this.btnK_Click); #line default #line hidden return; case 24: this.btnXYZ = ((System.Windows.Controls.Button)(target)); #line 87 "..\..\MainWindow.xaml" this.btnXYZ.Click += new System.Windows.RoutedEventHandler(this.btnXYZ_Click); #line default #line hidden return; case 25: this.btn_xyz = ((System.Windows.Controls.Button)(target)); #line 89 "..\..\MainWindow.xaml" this.btn_xyz.Click += new System.Windows.RoutedEventHandler(this.btn_xyz_Click); #line default #line hidden return; case 26: this.btnNT = ((System.Windows.Controls.Button)(target)); #line 91 "..\..\MainWindow.xaml" this.btnNT.Click += new System.Windows.RoutedEventHandler(this.btnNT_Click); #line default #line hidden return; case 27: this.btnBrightness = ((System.Windows.Controls.Button)(target)); #line 93 "..\..\MainWindow.xaml" this.btnBrightness.Click += new System.Windows.RoutedEventHandler(this.btnBrightness_Click); #line default #line hidden return; case 28: this.dispLabel = ((System.Windows.Controls.TextBox)(target)); return; case 29: this.spectrumList = ((System.Windows.Controls.ListView)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.formulacontrol = ((WpfMath.Controls.FormulaControl)(target)); return; case 2: this.TB_Formula = ((System.Windows.Controls.TextBox)(target)); #line 26 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" this.TB_Formula.KeyUp += new System.Windows.Input.KeyEventHandler(this.TB_Formula_KeyUp); #line default #line hidden return; case 3: #line 30 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 4: #line 33 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 5: #line 36 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 6: #line 39 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 7: #line 42 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 8: #line 45 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 9: #line 48 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 10: #line 51 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 11: #line 54 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 12: #line 57 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 13: #line 60 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 14: #line 63 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 15: #line 66 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 16: #line 69 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 17: #line 72 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonFastAdd_Click); #line default #line hidden return; case 18: #line 76 "..\..\..\..\Windows\Special\Window_FormulaWriter.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonOK_Click); #line default #line hidden return; } this._contentLoaded = true; }