/// <summary> /// Helper function that calls Ink Divider to perform the ink division. /// This function is called by File->Divide menu handler and strokes /// event handler. /// </summary> private void DivideInk() { // Ink Divider produces result based on its own Strokes object // Invoke the Ink Divider DivisionResult divResult = myInkDivider.Divide(); // Call helper function to get the bounding boxes for Words // Rectangles are inflated by 1 pixel in all direction to // avoid overlapping with stroke myWordBoundingBoxes = GetUnitBBoxes(divResult, InkDivisionType.Segment, 1); // Call helper function to get the bounding boxes for Lines // Rectangles are inflated by 3 pixels in all directions myLineBoundingBoxes = GetUnitBBoxes(divResult, InkDivisionType.Line, 3); // Call helper function to get the bounding boxes for Paragraphs // Rectangles are inflated by 5 pixels in all directions myParagraphBoundingBoxes = GetUnitBBoxes(divResult, InkDivisionType.Paragraph, 5); // Call helper function to get the bounding boxes for Drawings // The rectangles are inflated by 1 pixel in all directions myDrawingBoundingBoxes = GetUnitBBoxes(divResult, InkDivisionType.Drawing, 1); // Update the form to reflect these changes DrawArea.Refresh(); }
private void NumericUpDown1_ValueChanged(object sender, System.EventArgs e) { if (ValueChangedEvent != null) { ValueChangedEvent(this, new System.EventArgs()); } Panel1.Refresh(); }
public void AddTileSet(cTileSet aTSData) { mlstTileSets.Add(aTSData); objSetList.Items.Add(objSetList.Items.Count + " : " + aTSData.msName); if (objSetList.Items.Count == 1) { objSetList.SelectedIndex = 0; mlSelectedTileSet = 0; } objTilePanel.Refresh(); /*Update the scrollbar*/ }
private void _btnFillColor_Click(object sender, System.EventArgs e) { if (Tools.ShowColorDialog(this, ref FillColor)) { _pnlFillColor.Refresh(); } }
private void cmbUnit_SelectedIndexChanged(object sender, System.EventArgs e) { switch (cmbUnit.SelectedItem.ToString().ToLower()) { case "rad": str1 = "0"; str2 = "0.5*PI"; str3 = "PI"; str4 = "1.5*PI"; break; case "deg": str1 = "0"; str2 = "90"; str3 = "180"; str4 = "270"; break; case "gon": str1 = "0"; str2 = "100"; str3 = "200"; str4 = "300"; break; } picGeographic.Refresh(); panelAritmetic.Refresh(); }
/// <summary> /// Validates the chosen CoreFile /// </summary> private void ValidateCore() { // Confirm the file exists string CoreFile = CoreFileTextBox.Text; if (File.Exists(CoreFile)) { try { Core NewCore = new Core(CoreFile); StatusLabel.Text = "Validation Complete. Results are shown below."; if (_invalidMarkerTable.Rows.Count == 0) { MessageBox.Show("Core is 100% valid", "IGCCore Validator", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearForm(); } else { this.AcceptButton = FixButton; ButtonPanel.Visible = true; ButtonPanel.Refresh(); } } catch (Exception e) { StatusLabel.Text = "Error loading core!"; MessageBox.Show(this, "Error loading core! " + e.Message, "IGC Core Validator", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public void AddTitleUC(string title) { panTitle.Controls.Clear(); titleUC = new TitleUC(); titleUC.Title = title; panTitle.Controls.Add(titleUC); panTitle.Refresh(); }
public void drawMap() { canvas.Refresh(); foreach (Field f in board) { f.draw(); } }
public void Addchkbox(string tenphong, string tengiuong, string s_id, int tt, int t, int l, int index) { but = new Button(); but.Text = tenphong + "\n" + tengiuong; but.Name = tt.ToString(); but.Tag = s_id; but.Top = t; but.Left = l; but.TabIndex = index; switch (tt) { case 0: but.BackColor = Color.White; but.ForeColor = Color.Black; break; case 1: but.BackColor = Color.FromArgb(248, 250, 138); but.ForeColor = Color.Navy; break; case 2: but.BackColor = Color.FromArgb(255, 117, 221); but.ForeColor = Color.Black; break; case 3: but.BackColor = Color.Blue; but.ForeColor = Color.White; break; } if (index == 0) { but.KeyDown += new System.Windows.Forms.KeyEventHandler(this.but_KeyDown); } but.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; but.Size = new System.Drawing.Size(130, 30); but.Font = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.pButton.Controls.Add(but); pButton.Refresh(); this.Refresh(); }
public void refreshInfo(DataGridView grid, Panel panel) { if (grid.CurrentRow != null) { Label text = new Label(); text.AutoSize = true; text.Font = new Font("Courier New", text.Font.Size); Document d = (Document)grid.CurrentRow.DataBoundItem; text.Text = d.Afficher(); panel.Controls.Add(text); panel.Refresh(); } }
public void FindPanel() { if (pnl_Find.Height == 90) { pnl_Find.Height = 0; } else { while (pnl_Find.Height < 90) { pnl_Find.Height = pnl_Find.Height + 5; pnl_Find.Refresh(); txtSearch.Focus(); } } }
private void UpdateInfo() { if (objPropList.Items.Count < 0 || mlSelectedProp < 0) { } else { cPropData PData = (cPropData)mlstPropData[mlSelectedProp]; objTextLabel.Text = "Type: " + PData.msType + "\nSubType:" + PData.msSubType + "\n" + "Material: " + PData.msMaterialType + "\nMesh: " + PData.msMeshType + "\n"; } objImagePanel.Refresh(); }
private void SetVisible(System.Windows.Forms.Panel panel, Boolean value) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (panel.InvokeRequired) { SetVisiblePanelCallback d = new SetVisiblePanelCallback(SetVisible); this.Invoke(d, new object[] { panel, value }); } else { panel.Visible = value; panel.Refresh(); } }
private void BuildUI() { if (_parameters == null) { return; } SuspendLayout(); panelTop.SuspendLayout(); panelTop.Controls.Clear(); panelTop.AutoScroll = true; int y = 5; int tabIndex = 0; for (int i = 0; i < _parameters.Count; i++) { Parameter p = _parameters[i]; AddLabel(p.Name, p.Caption, tabIndex++, 5, y); if (p.EditorType == SearchEditorType.Standar) { if (p.EditorObject == typeof(System.String)) { p.InputControl = AddTextBox(p.Name, tabIndex++, 160, y); } else { MessageBox.Show(string.Format("No se ha implementado editor para el tipo '{0}'", p.EditorType.ToString())); } } else if (p.EditorType == SearchEditorType.Search) { p.InputControl = AddSearchEdit(p.Name, tabIndex++, p.EditorObject, 160, y); } y += 24; } panelTop.ResumeLayout(false); ResumeLayout(false); panelTop.Refresh(); }
private void SetActiveControl(UserControl control) { if (System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count > 0) { if (control is IPrintableUserControl) { mnuPrint.Visible = true; mnuPrintPreview.Visible = true; } else { mnuPrint.Visible = false; mnuPrintPreview.Visible = false; } } _activeControl = control; pnlMain.Controls.Clear(); pnlMain.Controls.Add(control); pnlMain.Refresh(); }
private void dGrid_Pat_CurrentCellChanged(object sender, System.EventArgs e) { myDV = (DataView)dGrid_Pat.DataSource; int nrow = dGrid_Pat.CurrentCell.RowNumber; dGrid_Pat.Select(nrow); for (int i = 0; i < myDV.Table.Rows.Count; i++) { myDV[i]["sel"] = 0; } myDV[nrow]["sel"] = 1; if (myDV.Table.Rows.Count > nrow && myDV.Table.Rows.Count != 0) { txtPatID.Text = myDV[nrow]["住院号"].ToString(); pnl_2.Refresh(); } else { txtPatID.Text = ""; } dGrid_Pat.Refresh(); }
private void UpdateTileInfo() { objBigTilePanel.Refresh(); if (objSetList.Items.Count < 0 || mlSelectedTileSet < 0 || mlSelectedTile < 0) { objLabelName.Text = "Name: "; objLabelMaterial.Text = "Material: "; objLabelMesh.Text = "Mesh: "; objLabelSize.Text = "Size: "; } else { int lIndex = mlSelectedTileSet; cTileSet TSetData = (cTileSet)mlstTileSets[lIndex]; cTileData TData = (cTileData)TSetData.mlstTileData[mlSelectedTile]; objLabelName.Text = "Name: " + TData.msName; objLabelMaterial.Text = "Material: " + TData.msMaterialType; objLabelMesh.Text = "Mesh: " + TData.msMeshType; objLabelSize.Text = "Size: " + TData.mTileImage.Width + "x" + TData.mTileImage.Height; } }
// Display the image. private void button1_Click(object sender, System.EventArgs e) { if (imageList1.Images.Empty != true) { if (imageList1.Images.Count - 1 > currentImage) { currentImage++; } else { currentImage = 0; } panel1.Refresh(); // Draw the image in the panel. imageList1.Draw(myGraphics, 10, 10, currentImage); // Show the image in the PictureBox. pictureBox1.Image = imageList1.Images[currentImage]; label3.Text = "Current image is " + currentImage; listBox1.SelectedIndex = currentImage; label5.Text = "Image is " + listBox1.Text; } }
public void AddBodyUC(UserControl uc) { panBody.Controls.Clear(); panBody.Controls.Add(uc); panBody.Refresh(); }
/// <summary>method: clearPanel /// clear all flags from display on panel /// </summary> private void clearPanel() { pnlDrawOn.Refresh(); //this.DoubleBuffered = true; //this.UpdateStyles(); }
/// <summary> /// 入出力データの初期化 /// </summary> public void InitData( FemSolver solver, Panel CadPanel, Panel FValuePanel, Panel FValueLegendPanel, Label labelFreqValue, Chart SMatChart, Chart BetaChart, Chart EigenVecChart ) { initInput(); initOutput(); // 一度だけの初期化処理 initDataOnce(FValueLegendPanel, labelFreqValue); // ポストプロセッサに入力データをコピー // 入力データの取得 solver.GetFemInputInfo(out Nodes, out Elements, out Medias, out Ports, out ForceNodes, out IncidentPortNo, out WaveguideWidth); // チャートの設定用に開始終了波長を取得 FirstWaveLength = solver.FirstWaveLength; LastWaveLength = solver.LastWaveLength; CalcFreqCnt = solver.CalcFreqCnt; // 波のモード区分を取得 WaveModeDv = solver.WaveModeDv; // 導波路構造区分を取得 WGStructureDv = solver.WGStructureDv; // 導波路幅(E面解析用) WaveguideWidthForEPlane = solver.WaveguideWidthForEPlane; // 光導波路の最小、最大比誘電率を取得する setupOpticalWgEps(); //if (isInputDataReady()) // ポートが指定されていなくてもメッシュを表示できるように条件を変更 if (Elements != null && Elements.Length > 0 && Nodes != null && Nodes.Length > 0 && Medias != null && Medias.Length > 0) { // 各要素に節点情報を補完する foreach (FemElement element in Elements) { element.SetNodesFromAllNodes(Nodes); element.LineColor = Color.Black; element.BackColor = Medias[element.MediaIndex].BackColor; } } // メッシュ描画 //using (Graphics g = CadPanel.CreateGraphics()) //{ // DrawMesh(g, CadPanel); //} //CadPanel.Invalidate(); if (!IsAutoCalc) { // チャート初期化 ResetSMatChart(SMatChart); // 等高線図の凡例 UpdateFValueLegend(FValueLegendPanel, labelFreqValue); // 等高線図 //FValuePanel.Invalidate(); FValuePanel.Refresh(); // 固有値チャート初期化 // この段階ではMaxModeの値が0なので、後に計算値ロード後一回だけ初期化する ResetEigenValueChart(BetaChart); // 固有ベクトル表示(空のデータで初期化) SetEigenVecToChart(EigenVecChart); } }
/// <summary> /// 出力をGUIへセットする /// </summary> /// <param name="addFlg">周波数特性グラフに読み込んだ周波数のデータを追加する?</param> /// <param name="isUpdateFValuePanel">等高線図を更新する?(データ読み込み時のアニメーションが遅いので更新しないようにするため導入)</param> public void SetOutputToGui( string FemOutputDatFilePath, Panel CadPanel, Panel FValuePanel, Panel FValueLegendPanel, Label labelFreqValue, Chart SMatChart, Chart BetaChart, Chart EigenVecChart, bool addFlg = true, bool isUpdateFValuePanel = true) { if (!isInputDataReady()) { return; } if (!isOutputDataReady()) { return; } if (IsAutoCalc) { ResetSMatChart(SMatChart); ResetEigenValueChart(BetaChart); /* // チャートのデータをクリア foreach (Series series in SMatChart.Series) { series.Points.Clear(); } foreach (Series series in BetaChart.Series) { series.Points.Clear(); } */ //foreach (Series series in EigenVecChart.Series) //{ // series.Points.Clear(); //} } if (addFlg) { // Sマトリックス周波数特性グラフに計算した点を追加 AddScatterMatrixToChart(SMatChart); // 固有値(伝搬定数)周波数特性グラフに計算した点を追加 AddEigenValueToChart(BetaChart); } if (isUpdateFValuePanel) { // 等高線図の凡例 UpdateFValueLegend(FValueLegendPanel, labelFreqValue); // 等高線図 FValuePanel.Refresh(); } // 固有ベクトル表示 SetEigenVecToChart(EigenVecChart); if (IsAutoCalc) { // チャートの表示をポイント表示にする ShowChartDataLabel(SMatChart); ShowChartDataLabel(BetaChart); } }
private void MapDataEditorDialog_Load(object sender, System.EventArgs e) { mapPanel.Refresh(); }
private void m_panelCalendrier_Resize(object sender, System.EventArgs e) { m_panelCalendrier.Refresh(); }
/// <summary> /// Render the selected message's body and selected headers to the specified controls. /// </summary> /// <param name="message">The message to display.</param> /// <param name="headerTextBox">The textbox to populate with selected headers.</param> /// <param name="bodyWebBrowser">The web browser in which to render the body.</param> /// <param name="bodyWebBrowserPanel">The panel containing the web browser.</param> private void RenderMessage(MailMessage message, TextBox headerTextBox, WebBrowser bodyWebBrowser, Panel bodyWebBrowserPanel) { StringBuilder headersText = new StringBuilder(Constants.SMALLSBSIZE); // Output selected headers. headersText.Append("Date: " + message.Date.ToString() + "\r\n"); headersText.Append("From: "); if (message.From != null) headersText.Append(message.From.DisplayName + " <" + message.From.Address + ">"); else if (message.Sender != null) headersText.Append(message.Sender); headersText.Append("\r\n"); if (message.To.Count > 0) headersText.Append("To: " + message.To + "\r\n"); if (message.CC.Count > 0) headersText.Append("CC: " + message.CC + "\r\n"); headersText.Append("Subject: " + message.Subject + "\r\n"); if (message.PgpSigned) headersText.Append("PGP Signed: True\r\n"); if (message.PgpEncryptedEnvelope) headersText.Append("PGP Encrypted: True\r\n"); if (message.SmimeEncryptedEnvelope) headersText.Append("S/MIME Envelope Encrypted: True\r\n"); if (message.SmimeTripleWrapped) headersText.Append("S/MIME Triple Wrapped: True\r\n"); headersText.Append("Size: " + string.Format("{0:n0}", message.Size)); if (message.RawFlags.Count > 0) { headersText.Append("\r\nFlags: "); bool firstFlag = true; foreach (string flag in message.RawFlags) { if (!firstFlag) headersText.Append("; "); headersText.Append(flag); firstFlag = false; } } if (message.Attachments.Count > 0) { headersText.Append("\r\nAttachments: "); for (int i = 0; i < message.Attachments.Count; i++) { if (i > 0) headersText.Append("; "); headersText.Append(message.Attachments[i].Name + " (" + message.Attachments[i].MediaType + ")"); } } headerTextBox.Text = headersText.ToString(); if ((message.PgpEncryptedEnvelope && message.PgpSigned) || message.SmimeTripleWrapped) headerTextBox.BackColor = Color.LightGreen; else if (message.PgpEncryptedEnvelope || message.SmimeEncryptedEnvelope) { if (message.SmimeSigned) headerTextBox.BackColor = Color.LightGreen; else headerTextBox.BackColor = Color.GreenYellow; } else if (message.PgpSigned || message.SmimeSigned) headerTextBox.BackColor = Color.LightBlue; else headerTextBox.BackColor = Color.White; // If in a SPAM or JUNK folder, don't embed attachments; bool isJunkFolder = false; string mailboxName = mailbox.ToUpper(); if (mailboxName.IndexOf("JUNK") > -1 || mailboxName.IndexOf("SPAM") > -1) isJunkFolder = true; string bodyHtml = Functions.RemoveScriptTags(message.Body); // If HTML, correct rendering of non-breaking spaces in the WebBrowser control. Otherwise, cast to HTML. if (message.IsBodyHtml) bodyHtml = bodyHtml.Replace(char.ConvertFromUtf32(194).ToString(), " ").Replace(char.ConvertFromUtf32(195).ToString(), " ").Replace(char.ConvertFromUtf32(256).ToString(), " "); else bodyHtml = Functions.ConvertPlainTextToHTML(bodyHtml); if (isJunkFolder) bodyHtml = bodyHtml.Replace("://", "://spam."); else { if (message.IsBodyHtml) bodyHtml = Functions.EmbedAttachments(bodyHtml, message.Attachments); else bodyHtml = Functions.EmbedAttachments(bodyHtml, null); } bodyWebBrowser.DocumentText = bodyHtml; bodyWebBrowserPanel.Refresh(); }
public void AgregarEvento(int iId, DateTime dFecha, string sTitulo, string sEvento) { var oEvento = Datos.GetEntity<ClienteEventoCalendario>(c => c.ClienteEventoCalendarioID == iId); var oAdeudo = Datos.GetEntity<ClientesCreditoView>(c => c.ClienteID == oEvento.ClienteID); var pnlEvento = new Panel(); pnlEvento.Tag = iId; this.flpEventos.Controls.Add(pnlEvento); Util.CopiarPropiedades(this.pnlMuestra, pnlEvento, "Visible"); foreach (Control oControl in this.pnlMuestra.Controls) { // Se crea el control nuevo Control oNuevo = null; if (oControl is DateTimePicker) oNuevo = new DateTimePicker() { Name = "dtp" }; else if (oControl is Button) oNuevo = new Button(); else if (oControl is Label) oNuevo = new Label() { TextAlign = (oControl as Label).TextAlign }; // Se copian las propiedades de la base/muestra Util.CopiarPropiedades(oControl, oNuevo, "Visible"); oNuevo.Name = oControl.Name; // Se configuran los eventos para los controles especiales if (oControl == this.btnRevisado) { oNuevo.Click += this.btnBien_Click; } else if (oControl == this.dtpFecha) { var dtp = (oNuevo as DateTimePicker); dtp.Format = DateTimePickerFormat.Custom; dtp.CustomFormat = "dd/MM/yyy hh:mm tt"; dtp.Checked = true; dtp.Value = oEvento.Fecha; dtp.ValueChanged += dtpFecha_ValueChanged; } else if (oControl == this.lblCambio) { oNuevo.Visible = false; } else if (oControl == this.lblCliente) { oNuevo.Text = oAdeudo.Nombre; } else if (oControl == this.lblVencido || oControl == this.lblAdeudo) { oNuevo.Text = (oControl == this.lblVencido ? oAdeudo.AdeudoVencido : oAdeudo.Adeudo).Valor().ToString(GlobalClass.FormatoMoneda); } else if (oControl == this.lblContacto) { oNuevo.Text = oAdeudo.CobranzaContacto; } // Se agrega al panel pnlEvento.Controls.Add(oNuevo); pnlEvento.Refresh(); pnlEvento.Update(); } }
private static void Move(Panel pane, int x, int y) { pane.Left = x + pane.Left - _lastMouseX; pane.Top = y + pane.Top - _lastMouseY; currentArea = pane; pane.Refresh(); }
private void Arrange(Panel pnl) { Items.Sort(delegate(Group x, Group y) { if (x.Name == null && y.Name == null) return 0; else if (x.Name == null) return -1; else if (y.Name == null) return 1; else return x.Name.CompareTo(y.Name); }); int yy = 0; pnl.AutoScrollOffset = new System.Drawing.Point(0, 0); pnl.AutoScrollPosition = new System.Drawing.Point(0, 0); foreach(Group g in Items) { g.rbtn.Top = yy; yy += g.rbtn.Height; } pnl.Refresh(); }
private void trackBar1_Scroll(object sender, System.EventArgs e) { _color = Color.FromArgb(trackBar1.Value, _color.R, _color.G, _color.B); panelPreview.Refresh(); }
private void timer1_Tick(object sender, System.EventArgs e) { panel1.Refresh(); }
/// <summary> /// 出力をGUIへセットする /// </summary> /// <param name="addFlg">周波数特性グラフに読み込んだ周波数のデータを追加する?</param> public void SetOutputToGui( string FemOutputDatFilePath, Tao.Platform.Windows.SimpleOpenGlControl CadPanel, Panel FValuePanel, Panel FValueLegendPanel, Label labelFreqValue, Chart SMatChart, Chart BetaChart, Chart EigenVecChart, bool addFlg = true) { if (!isInputDataReady()) { return; } if (!isOutputDataReady()) { return; } if (addFlg) { // Sマトリックス周波数特性グラフに計算した点を追加 AddScatterMatrixToChart(SMatChart); int firstFreqNo; int lastFreqNo; if (GetCalculatedFreqCnt(FemOutputDatFilePath, out firstFreqNo, out lastFreqNo) == 1) { // 固有値チャート初期化(モード数が変わっているので再度初期化する) ResetEigenValueChart(BetaChart); } // 固有値(伝搬定数)周波数特性グラフに計算した点を追加 AddEigenValueToChart(BetaChart); } // 等高線図の凡例 UpdateFValueLegend(FValueLegendPanel, labelFreqValue); // 等高線図 //FValuePanel.Invalidate(); FValuePanel.Refresh(); // 固有ベクトル表示 SetEigenVecToChart(EigenVecChart); }
private void playNote(Panel keyPanel, string notePath) { Color keyColor = keyPanel.BackColor; keyPanel.BackColor = Color.Red; keyPanel.Refresh(); using (SoundPlayer sp = new SoundPlayer(notePath)) { sp.Play(); } Thread.Sleep(50); keyPanel.BackColor = keyColor; }
public void SetValue(Panel mPanel) { try { if((mPanel.Controls.Count > 0)&&(gvResults.Rows.Count > 0 )) { DataSet ds = (DataSet)gvResults.DataSource; DataTable dt = ds.Tables["dtResults"]; DataRow dr = dt.Rows.Find(mPanel.Tag.ToString()); if(dr != null) { string mVal = dr["colValue"].ToString(); mPanel.Controls.Add(lblScore(mVal, mPanel.Width, mPanel.Height)); mPanel.Refresh(); // parse out the label name to get the // row and column it is in int mCol = int.Parse(mPanel.Name.Substring(mPanel.Name.Length-1)); int mRow = int.Parse(mPanel.Name.Substring(1, mPanel.Name.Length - 3)); dr = this.dsScoreCard.Tables["dtScoreCard"].Rows[mRow]; dr[mCol] = mVal; mCalcTotals(mCol); // clean the SetValue and SetItem so // no further values can be add until a new roll group is started NewRollGroup(); } } } catch(System.Exception ex) { EmailError.frmError eForm = new EmailError.frmError(ex.ToString(), mVersion); eForm.ShowDialog(); } }
public void SetResolution(int width, int height) { _panel.Width = width; _panel.Height = height; _panel.Refresh(); }
private void OnScrollDownMouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { ScrollDownIsPressed = true; ScrollDown.Refresh(); }
/// <summary> /// 出力データだけ初期化する(自動計算モード用) /// </summary> /// <param name="CadPanel"></param> /// <param name="FValuePanel"></param> /// <param name="FValueLegendPanel"></param> /// <param name="labelFreqValue"></param> /// <param name="SMatChart"></param> /// <param name="BetaChart"></param> /// <param name="EigenVecChart"></param> public void InitOutputData( Panel CadPanel, Panel FValuePanel, Panel FValueLegendPanel, Label labelFreqValue, Chart SMatChart, Chart BetaChart, Chart EigenVecChart ) { initOutput(); // メッシュ描画 //using (Graphics g = CadPanel.CreateGraphics()) //{ // DrawMesh(g, CadPanel); //} //CadPanel.Invalidate(); if (!IsAutoCalc) { // チャート初期化 ResetSMatChart(SMatChart); // 等高線図の凡例 UpdateFValueLegend(FValueLegendPanel, labelFreqValue); //FValuePanel.Invalidate(); // 等高線図 FValuePanel.Refresh(); // 固有値チャート初期化 // この段階ではMaxModeの値が0なので、後に計算値ロード後一回だけ初期化する ResetEigenValueChart(BetaChart); // 固有ベクトル表示(空のデータで初期化) SetEigenVecToChart(EigenVecChart); } }
private void BuildUI() { if ( _parameters == null ) return; SuspendLayout(); panelTop.SuspendLayout(); panelTop.Controls.Clear(); panelTop.AutoScroll = true; int y = 5; int tabIndex = 0; ArrayList paramsSorted = _parameters.Sort(); for( int i = 0; i < paramsSorted.Count; i++ ) { Parameter p = (Parameter)paramsSorted[ i ]; //Guarda con esto p.Value = null; AddLabel( p.Name, p.Caption, tabIndex++, 5, y ); if ( p.EditorType == SearchEditorType.Standar ) { if ( p.EditorObject == typeof ( System.String ) ) { p.InputControl = AddTextBox( p.Name, tabIndex++, 160, y ); } else { if (p.EditorObject == typeof ( System.Int64 ) ) { p.InputControl = AddNumericBox( p.Name, tabIndex++,160, y, "System.Int64" ); } else { if (p.EditorObject == typeof ( System.Decimal ) ) { p.InputControl = AddNumericBox( p.Name, tabIndex++,160, y, "System.Decimal" ); } else { if (p.EditorObject == typeof ( System.DateTime ) ) { p.InputControl = AddDateTimeBox( p.Name, tabIndex++,160, y ); } else { if (p.EditorObject == typeof ( System.Boolean ) ) { p.InputControl = AddCheckBox( p.Name, tabIndex++,160, y ); p.Value = (object) true; } else { MessageBox.Show( string.Format( "No se ha implementado editor para el tipo '{0}'", p.EditorType.ToString() ) ); } } } } } } else if ( p.EditorType == SearchEditorType.Search ) { p.InputControl = AddSearchEdit( p.Name, tabIndex++, p.EditorObject, 160, y ); } //Le asociamos el evento KeyDown para realizar busquedas por F2 //p.InputControl.KeyDown += new KeyEventHandler(InputControl_KeyDown); y += 24; } panelTop.ResumeLayout( false ); ResumeLayout( false ); panelTop.Refresh(); if (_allowMultipleSelectMethod != null) { object instance = Activator.CreateInstance( _searchObject, true ); _allowMultipleSelect= (bool) _allowMultipleSelectMethod.GetValue( instance, null ); } /* else { _allowMultipleSelect= false; } */ if (_allowMultipleSelect) { gridEx.SelectionMode= Janus.Windows.GridEX.SelectionMode.MultipleSelection; } else { gridEx.SelectionMode= Janus.Windows.GridEX.SelectionMode.SingleSelection; } if(_fastSearch) { this.SearchNow(); this.SelectGrid(); } else { if(_searchObject != null) { object instance = Activator.CreateInstance( _searchObject, true ); if (_layoutMethod != null && (_layoutData == null || _layoutData.Equals(string.Empty))) { _layoutData = (string) _layoutMethod.Invoke( instance, null ); if (_layoutData !=null) { gridEx.LayoutData = _layoutData; } } else gridEx.LayoutData = _layoutData; } } }
/// <summary> /// フィールド値凡例の更新 /// </summary> /// <param name="legendPanel"></param> /// <param name="labelFreqValue"></param> public void UpdateFValueLegend(Panel legendPanel, Label labelFreqValue) { if (Math.Abs(WaveLength) < Constants.PrecisionLowerLimit) { labelFreqValue.Text = "---"; } else { labelFreqValue.Text = string.Format("{0:F3}", GetNormalizedFrequency()); } // BUGFIX [次の周波数][前の周波数]ボタンで周波数が遅れて表示される不具合を修正 labelFreqValue.Refresh(); legendPanel.Refresh(); }
private void comboBoxEdit1_SelectedValueChanged(object sender, System.EventArgs e) { defaultLookAndFeel1.LookAndFeel.SkinName = comboBoxEdit1.Text; panel1.Refresh(); }
private void InitEvents() { this.pbDeviceManager.Click += new EventHandler((a, b) => { try { //先判断容器中有没有device manager if (pnContainer.Controls.Contains(viewManager)) { return; } if (pnContainer.Controls.Contains(dataManager)) { if (DialogResult.Cancel == dataManager.DeviceManagerExitDialog()) { return; } } AddDeviceManagerPanel(); SetDeviceClickPic((PictureBox)a); } catch { } }); this.pbAuditTrail.Click += new EventHandler((a, b) => { try { //先判断容器中有没有audit Trail if (pnContainer.Controls.Contains(auditTrail)) { return; } if (pnContainer.Controls.Contains(dataManager)) { if (DialogResult.Cancel == dataManager.DeviceManagerExitDialog()) { return; } } if (pnContainer.Controls.Contains(viewManager)) { if (DialogResult.Cancel == viewManager.DeviceManagerExitDialog()) { return; } } auditTrail.RefreshAuditTrail(); AddAuditTrail(); SetDeviceClickPic((PictureBox)a); } catch { } }); this.pbDataBase.Click += new EventHandler(ShowDataBase); //保存tps this.saveToolStripMenuItem.Click += new EventHandler((sender, args) => { if (pnContainer.Contains(viewManager)) { //viewManager.ExportTps("tps"); viewManager.Save(); } else { //dataManager.ExportTps(); dataManager.Save(); } }); this.openToolStripMenuItem.Click += new EventHandler(OpenTPSFile); //关闭窗口 this.exitToolStripMenuItem.Click += new EventHandler((sender, args) => this.form.Close()); //导出files this.tpsToolStripMenuItem.Click += new EventHandler((sender, args) => ExportTPS()); this.pDFToolStripMenuItem.Click += new EventHandler((sender, args) => ExportPDF()); this.excelToolStripMenuItem.Click += new EventHandler((sender, args) => ExportExcel()); this.emailFilesToolStripMenuItem.Click += new EventHandler((sender, args) => Email()); this.printFileToolStripMenuItem.Click += new EventHandler((sender, args) => Print(false)); this.printPreviewToolStripMenuItem.Click += new EventHandler((sender, args) => Print(true)); this.pbMail.Click += new EventHandler((sender, args) => Email()); //this.pbPrint.Click += new EventHandler((sender, args) =>Print()); this.viewManager.PbMax.Click += new EventHandler((a, b) => { if (form.FormBorderStyle == FormBorderStyle.Sizable) { ShowFullScreen(true); } else { UndoShowFullScreen(true); } }); this.dataManager.PbMax.Click += new EventHandler((a, b) => { if (form.FormBorderStyle == FormBorderStyle.Sizable) { ShowFullScreen(false); } else { UndoShowFullScreen(false); } }); #region 图片hover //pbDeviceManager.MouseHover += new EventHandler((sender, args) => //{ // if (!pnContainer.Controls.Contains(viewManager)) // { // pbDeviceManager.Image = Properties.Resources.tb_DM_h; // pbDeviceManager.Refresh(); // } //}); //pbDataBase.MouseHover += new EventHandler((sender, args) => //{ // if (pnContainer.Controls.Contains(dataManager)) // return; // pbDataBase.Image = Properties.Resources.tb_DB_h; //}); //pbAuditTrail.MouseHover += new EventHandler((sender, args) => //{ // if (pnContainer.Controls.Contains(auditTrail)) // return; // pbAuditTrail.Image = Properties.Resources.tb_audit_h; //}); pbExport.MouseHover += new EventHandler((sender, args) => { pbExport.Image = Properties.Resources.tb_export_s; }); pbMail.MouseHover += new EventHandler((sender, args) => { pbMail.Image = Properties.Resources.tb_mail_s; }); pbPrint.MouseHover += new EventHandler((sender, args) => { pbPrint.Image = Properties.Resources.tb_print_s; }); pbUpdate.MouseHover += new EventHandler((sender, args) => { pbUpdate.Image = Properties.Resources.tb_update_s; }); pbAdministration.MouseHover += new EventHandler((sender, args) => { pbAdministration.Image = Properties.Resources.tb_admin_s; }); #endregion #region 图片leave pbExport.MouseLeave += new EventHandler((sender, args) => { pbExport.Image = Properties.Resources.tb_export; }); pbMail.MouseLeave += new EventHandler((sender, args) => { pbMail.Image = Properties.Resources.tb_mail; }); pbPrint.MouseLeave += new EventHandler((sender, args) => { pbPrint.Image = Properties.Resources.Print; }); pbUpdate.MouseLeave += new EventHandler((sender, args) => { pbUpdate.Image = Properties.Resources.tb_update; }); pbAdministration.MouseLeave += new EventHandler((sender, args) => { pbAdministration.Image = Properties.Resources.tb_admin; }); //pbDeviceManager.MouseLeave += new EventHandler((sender, args) => //{ // if (pnContainer.Controls.Contains(viewManager)) // return; // pbDeviceManager.Image = Properties.Resources.tb_DM; //}); //pbDataBase.MouseLeave += new EventHandler((sender, args) => //{ // if (pnContainer.Controls.Contains(dataManager)) // return; // pbDataBase.Image = Properties.Resources.tb_DB; //}); //pbAuditTrail.MouseLeave += new EventHandler((sender, args) => //{ // if (pnContainer.Controls.Contains(auditTrail)) // return; // pbAuditTrail.Image = Properties.Resources.tb_audit; //}); #endregion form.SizeChanged += new EventHandler((sender, args) => { Size emptySize = new Size(1, 0); form.SuspendLayout(); if (isFullScreen == false) { if (isMinimum && (pnContainer.Size.Width > _PnContainerSize.Width || pnContainer.Size.Height > _PnContainerSize.Height)) { pnContainer.Size = _PnContainerSize; isMinimum = false; } else if (pnContainer.Size != emptySize) { _PnContainerSize = pnContainer.Size; isMinimum = false; } else if (pnContainer.Size == emptySize) { isMinimum = true; } else { isMinimum = false; } } pnContainer.Refresh(); form.ResumeLayout(false); }); //form.Resize += new EventHandler(ResizeEnd); if (this.dataManager != null) { this.dataManager.OnComapreStatusChange += new EventHandler((sender, e) => { this.checkCompareStatusAndSetExportMenuItems(sender); }); } //form.FormClosing += new FormClosingEventHandler(FormClosing); this.pbDeviceManager.MouseClick += new MouseEventHandler((sender, e) => { this.checkCompareStatusAndSetExportMenuItems(sender); }); this.pbDataBase.MouseClick += new MouseEventHandler((sender, e) => { this.checkCompareStatusAndSetExportMenuItems(sender); }); this.pbAuditTrail.MouseClick += new MouseEventHandler((sender, e) => { this.checkCompareStatusAndSetExportMenuItems(sender); }); }
public void Transition(ref Panel current, ref Panel next, EffectType type) { Bitmap currentBitmap = null; Bitmap nextBitmap = null; EpDefaultEffect effect = null; try { currentBitmap = GetPreviousCapturedImage(current, current.Name + ".bmp", false); // 遷移前Panelをキャプチャ nextBitmap = null; string nextBitmapPath = next.Name + ".bmp"; if (System.IO.File.Exists(nextBitmapPath)) { nextBitmap = new Bitmap(nextBitmapPath); } else { nextBitmap = GetPreviousCapturedImage(next, nextBitmapPath, true); // 初回のみ } this.Visible = true; // effectスタート current.Visible = false; if (type == EffectType.Random) { type = (EffectType)random.Next(effectList.Count); } if (type == EffectType.None) { effect = new EpDefaultEffect(); } else { effect = effectList[(int)type] as EpDefaultEffect; } effect.DrawEffectImage(currentBitmap, nextBitmap, this); next.Visible = true; next.Refresh(); this.Visible = false; // effect終わり currentBitmap.Dispose(); nextBitmap.Dispose(); } catch (SystemException ex) { Console.WriteLine(ex.Message); } }