Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
Silverstone.Manticore.Bookmarks.FileBookmark Class Reference

Summary description for FileBookmark. More...

Collaboration diagram for Silverstone.Manticore.Bookmarks.FileBookmark:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FileBookmark (String aURL, String aTitle)

Protected Member Functions

override void Dispose (bool aDisposing)
 Clean up any resources being used.

Private Member Functions

void InitializeComponent ()
 Required method for Designer support - do not modify the contents of this method with the code editor.
void mNewFolderButton_Click (object sender, System.EventArgs e)
void mOKButton_Click (object sender, System.EventArgs e)

Private Attributes

Label label1
Label label2
Label label3
BookmarksTreeView mFolderTree
Button mOKButton
Button mCancelButton
Button mUseDefaultButton
Button mNewFolderButton
TextBox mLocationField
TextBox mNameField
System.ComponentModel.Container components = null
 Required designer variable.

Detailed Description

Summary description for FileBookmark.

Definition at line 54 of file FileBookmark.cs.


Constructor & Destructor Documentation

Definition at line 71 of file FileBookmark.cs.

              {
                     //
                     // Required for Windows Form Designer support
                     //
                     InitializeComponent();

      mNameField.Text = aTitle;
      mLocationField.Text = aURL;

      //
      // Button XP Theme support. 
      //
      mOKButton.FlatStyle = FlatStyle.System;
      mCancelButton.FlatStyle = FlatStyle.System;
      mUseDefaultButton.FlatStyle = FlatStyle.System;
      mNewFolderButton.FlatStyle = FlatStyle.System;

      // 
      // folderTree
      // 
      mFolderTree = new BookmarksTreeView("BookmarksRoot");
      mFolderTree.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
        | System.Windows.Forms.AnchorStyles.Left) 
        | System.Windows.Forms.AnchorStyles.Right);
      mFolderTree.ImageIndex = -1;
      mFolderTree.Location = new System.Drawing.Point(64, 88);
      mFolderTree.Name = "folderTree";
      mFolderTree.SelectedImageIndex = -1;
      mFolderTree.Size = new System.Drawing.Size(208, 144);
      mFolderTree.TabIndex = 5;

      // Only show folders in this |TreeView|
      mFolderTree.AddCriteria(new String[] {"container", "true"});

      Controls.Add(mFolderTree);
      mFolderTree.Build();

      Bitmap bmp = new Bitmap(@"resources\bookmark.png");
      bmp.MakeTransparent(ColorTranslator.FromOle(0x00FF00));
//      this.Icon = new Icon(
              }

Here is the call graph for this function:


Member Function Documentation

override void Silverstone.Manticore.Bookmarks.FileBookmark.Dispose ( bool  aDisposing) [inline, protected]

Clean up any resources being used.

Definition at line 117 of file FileBookmark.cs.

              {
                     if (aDisposing && components != null)
        components.Dispose();
                     base.Dispose(aDisposing);
              }

Required method for Designer support - do not modify the contents of this method with the code editor.

Definition at line 129 of file FileBookmark.cs.

              {
      this.mLocationField = new System.Windows.Forms.TextBox();
      this.mCancelButton = new System.Windows.Forms.Button();
      this.mNameField = new System.Windows.Forms.TextBox();
      this.mNewFolderButton = new System.Windows.Forms.Button();
      this.mUseDefaultButton = new System.Windows.Forms.Button();
      this.mOKButton = new System.Windows.Forms.Button();
      this.label1 = new System.Windows.Forms.Label();
      this.label2 = new System.Windows.Forms.Label();
      this.label3 = new System.Windows.Forms.Label();
      this.SuspendLayout();
      // 
      // mLocationField
      // 
      this.mLocationField.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
        | System.Windows.Forms.AnchorStyles.Right);
      this.mLocationField.Location = new System.Drawing.Point(64, 48);
      this.mLocationField.Name = "mLocationField";
      this.mLocationField.Size = new System.Drawing.Size(296, 20);
      this.mLocationField.TabIndex = 3;
      this.mLocationField.Text = "";
      // 
      // mCancelButton
      // 
      this.mCancelButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
      this.mCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
      this.mCancelButton.Location = new System.Drawing.Point(288, 248);
      this.mCancelButton.Name = "mCancelButton";
      this.mCancelButton.TabIndex = 9;
      this.mCancelButton.Text = "Cancel";
      // 
      // mNameField
      // 
      this.mNameField.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
        | System.Windows.Forms.AnchorStyles.Right);
      this.mNameField.Location = new System.Drawing.Point(64, 16);
      this.mNameField.Name = "mNameField";
      this.mNameField.Size = new System.Drawing.Size(296, 20);
      this.mNameField.TabIndex = 1;
      this.mNameField.Text = "";
      // 
      // mNewFolderButton
      // 
      this.mNewFolderButton.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);
      this.mNewFolderButton.Location = new System.Drawing.Point(280, 88);
      this.mNewFolderButton.Name = "mNewFolderButton";
      this.mNewFolderButton.Size = new System.Drawing.Size(80, 23);
      this.mNewFolderButton.TabIndex = 6;
      this.mNewFolderButton.Text = "Ne&w Folder...";
      this.mNewFolderButton.Click += new System.EventHandler(this.mNewFolderButton_Click);
      // 
      // mUseDefaultButton
      // 
      this.mUseDefaultButton.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);
      this.mUseDefaultButton.Location = new System.Drawing.Point(280, 120);
      this.mUseDefaultButton.Name = "mUseDefaultButton";
      this.mUseDefaultButton.Size = new System.Drawing.Size(80, 23);
      this.mUseDefaultButton.TabIndex = 7;
      this.mUseDefaultButton.Text = "Use &Default";
      // 
      // mOKButton
      // 
      this.mOKButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
      this.mOKButton.Location = new System.Drawing.Point(208, 248);
      this.mOKButton.Name = "mOKButton";
      this.mOKButton.TabIndex = 8;
      this.mOKButton.Text = "OK";
      this.mOKButton.Click += new System.EventHandler(this.mOKButton_Click);
      // 
      // label1
      // 
      this.label1.AutoSize = true;
      this.label1.Location = new System.Drawing.Point(8, 16);
      this.label1.Name = "label1";
      this.label1.Size = new System.Drawing.Size(38, 13);
      this.label1.TabIndex = 0;
      this.label1.Text = "&Name:";
      // 
      // label2
      // 
      this.label2.AutoSize = true;
      this.label2.Location = new System.Drawing.Point(8, 48);
      this.label2.Name = "label2";
      this.label2.Size = new System.Drawing.Size(50, 13);
      this.label2.TabIndex = 2;
      this.label2.Text = "&Location:";
      // 
      // label3
      // 
      this.label3.AutoSize = true;
      this.label3.Location = new System.Drawing.Point(8, 88);
      this.label3.Name = "label3";
      this.label3.Size = new System.Drawing.Size(53, 13);
      this.label3.TabIndex = 4;
      this.label3.Text = "Create in:";
      // 
      // FileBookmark
      // 
      this.AcceptButton = this.mOKButton;
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
      this.CancelButton = this.mCancelButton;
      this.ClientSize = new System.Drawing.Size(376, 277);
      this.ControlBox = false;
      this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                  this.mCancelButton,
                                                                  this.mOKButton,
                                                                  this.mUseDefaultButton,
                                                                  this.mNewFolderButton,
                                                                  this.label3,
                                                                  this.label2,
                                                                  this.label1,
                                                                  this.mLocationField,
                                                                  this.mNameField});
      this.MinimumSize = new System.Drawing.Size(384, 300);
      this.Name = "FileBookmark";
      this.ShowInTaskbar = false;
      this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
      this.Text = "File Bookmark";
      this.ResumeLayout(false);

    }
void Silverstone.Manticore.Bookmarks.FileBookmark.mNewFolderButton_Click ( object  sender,
System.EventArgs  e 
) [inline, private]

Definition at line 253 of file FileBookmark.cs.

    {
      mFolderTree.NewFolder();
    }
void Silverstone.Manticore.Bookmarks.FileBookmark.mOKButton_Click ( object  sender,
System.EventArgs  e 
) [inline, private]

Definition at line 258 of file FileBookmark.cs.

    {
      String destinationFolder = "Bookmarks"; // XXX Parameterize this
      ManticoreTreeNode node = mFolderTree.SelectedNode as ManticoreTreeNode;
      if (node != null) 
        destinationFolder = node.Data as String;
      Bookmarks bmks = ServiceManager.Bookmarks;
      String bookmarkID = bmks.CreateBookmark(mNameField.Text, destinationFolder, -1);
      bmks.SetBookmarkAttribute(bookmarkID, "url", mLocationField.Text);
      Close();
    }

Here is the call graph for this function:


Member Data Documentation

System.ComponentModel.Container Silverstone.Manticore.Bookmarks.FileBookmark.components = null [private]

Required designer variable.

Definition at line 69 of file FileBookmark.cs.

Definition at line 56 of file FileBookmark.cs.

Definition at line 57 of file FileBookmark.cs.

Definition at line 58 of file FileBookmark.cs.

Definition at line 61 of file FileBookmark.cs.

Definition at line 59 of file FileBookmark.cs.

Definition at line 64 of file FileBookmark.cs.

Definition at line 65 of file FileBookmark.cs.

Definition at line 63 of file FileBookmark.cs.

Definition at line 60 of file FileBookmark.cs.

Definition at line 62 of file FileBookmark.cs.


The documentation for this class was generated from the following file: