home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 October / CMCD1004.ISO / Software / Freeware / Utilitare / DesktopSidebar / Plugins / NotesEditor.DSPACKAGE / Source Code / NoteDlg.cs < prev    next >
Encoding:
Text File  |  2004-07-04  |  3.7 KB  |  137 lines

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using DesktopSidebar;
  7.  
  8. namespace stickerpanel
  9. {
  10.     /// <summary>
  11.     /// Summary description for NoteDlg.
  12.     /// </summary>
  13.     public class AddNote : System.Windows.Forms.Form
  14.     {
  15.         private System.Windows.Forms.Button btnCancel;
  16.         private System.Windows.Forms.Button button1;
  17.         private System.Windows.Forms.Button btnOK;
  18.         private System.Windows.Forms.TextBox txtNote;
  19.         /// <summary>
  20.         /// Required designer variable.
  21.         /// </summary>
  22.         private System.ComponentModel.Container components = null;
  23.  
  24.         public AddNote(ISidebar sidebar)
  25.         {
  26.             //
  27.             // Required for Windows Form Designer support
  28.             //
  29.         
  30.         InitializeComponent();
  31.  
  32.             sidebar.GetTranslator().TranslateDialog2(new DialogTranslator(this),"Stickerpanel.Note");
  33.         }
  34.         
  35.           public string GetNote()
  36.         {
  37.             return txtNote.Text;
  38.         }
  39.  
  40.         public void SetNote(string sNote)
  41.         {
  42.             txtNote.Text = sNote;
  43.         }
  44.         
  45.     
  46.              
  47.       
  48.         
  49.  
  50.         /// <summary>
  51.         /// Clean up any resources being used.
  52.         /// </summary>
  53.         protected override void Dispose( bool disposing )
  54.         {
  55.             if( disposing )
  56.             {
  57.                 if(components != null)
  58.                 {
  59.                     components.Dispose();
  60.                 }
  61.             }
  62.             base.Dispose( disposing );
  63.         }
  64.  
  65.         #region Windows Form Designer generated code
  66.         /// <summary>
  67.         /// Required method for Designer support - do not modify
  68.         /// the contents of this method with the code editor.
  69.         /// </summary>
  70.         private void InitializeComponent() {
  71.             this.txtNote = new System.Windows.Forms.TextBox();
  72.             this.btnOK = new System.Windows.Forms.Button();
  73.             this.button1 = new System.Windows.Forms.Button();
  74.             this.btnCancel = new System.Windows.Forms.Button();
  75.             this.SuspendLayout();
  76.             // 
  77.             // txtNote
  78.             // 
  79.             this.txtNote.Location = new System.Drawing.Point(8, 8);
  80.             this.txtNote.Multiline = true;
  81.             this.txtNote.Name = "txtNote";
  82.             this.txtNote.Size = new System.Drawing.Size(297, 160);
  83.             this.txtNote.TabIndex = 0;
  84.             this.txtNote.Text = "";
  85.             this.txtNote.WordWrap = false;
  86.             // 
  87.             // btnOK
  88.             // 
  89.             this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
  90.             this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
  91.             this.btnOK.Location = new System.Drawing.Point(144, 176);
  92.             this.btnOK.Name = "btnOK";
  93.             this.btnOK.TabIndex = 1;
  94.             this.btnOK.Text = "OK";
  95.             // 
  96.             // button1
  97.             // 
  98.             this.button1.DialogResult = System.Windows.Forms.DialogResult.Abort;
  99.             this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
  100.             this.button1.Location = new System.Drawing.Point(8, 176);
  101.             this.button1.Name = "button1";
  102.             this.button1.TabIndex = 3;
  103.             this.button1.Text = "Delete";
  104.             // 
  105.             // btnCancel
  106.             // 
  107.             this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  108.             this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
  109.             this.btnCancel.Location = new System.Drawing.Point(231, 176);
  110.             this.btnCancel.Name = "btnCancel";
  111.             this.btnCancel.TabIndex = 2;
  112.             this.btnCancel.Text = "Cancel";
  113.     
  114.             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  115.             this.ClientSize = new System.Drawing.Size(314, 208);
  116.             
  117.             this.Controls.Add(this.button1);
  118.             
  119.             this.Controls.Add(this.btnCancel);
  120.             this.Controls.Add(this.btnOK);
  121.             this.Controls.Add(this.txtNote);
  122.             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
  123.             this.Name = "AddNote";
  124.             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  125.         
  126.                 this.Text="Add a Note";
  127.             
  128.             this.Text = "Edit Note";
  129.             
  130.             this.ResumeLayout(false);
  131.         }
  132.         #endregion
  133.         
  134.     
  135.     }
  136. }
  137.