Inheritance: ToolStripItem
Ejemplo n.º 1
0
        public usbDevice(string letter,List<Drive> drives,string serial)
        {

            InitializeComponent();
            this.serial = serial;
            this.drives = drives;
            this.letter = letter;
            syncdetails = new List<string[]>();
           // this.usbserial = usbserial;
            this.Load += (s, a) =>
                             {
                                 this.ContextMenuStrip = contextMenuStrip1;
                frm = this.FindForm();
               
              lb = (ListView) frm.Controls.Find("listView1", true)[0];

              ts = (ToolStrip)frm.Controls.Find("toolStrip1", true)[0];
              lblSyncType = (ToolStripLabel)ts.Items.Find("lblSyncType", true)[0];
                panel1=(Panel)frm.Controls.Find("panel1",true)[0];
                label3 = (Label)frm.Controls.Find("label3", true)[0];
                label2 = (Label)frm.Controls.Find("label2", true)[0];
               // regBtn = (Button)frm.Controls.Find("btnRegister", true)[0];
                treeview = (TreeView)frm.Controls.Find("treeView1", true)[0];
                string lt = letter.Substring(0, 1);
                serial = DriveInformation.getSerial(lt + ":\\"); //USB.FindDriveLetter(lt + ":").SerialNumber;
                //Thread secondaryThread=new Thread(new ThreadStart(getDeviceData));
                //secondaryThread.Start();

                LoadDevice();
            };
        }
Ejemplo n.º 2
0
	/// <summary>
	/// Конструктор класса
	/// </summary>
	/// <param name="statusBar">Объект который представляет из себя строку состояния</param>
	/// <param name="statusBarLabel">Текст отображаемый в строке состояния</param>
	/// <param name="parent">Родительская форма</param>
	public StatusBar(System.Windows.Forms.StatusStrip statusBar, ToolStripLabel statusBarLabel, BankLab parent)
	{
		CurrentStatusBar = statusBar;
		StatusBarLabel = statusBarLabel;
		Parent = parent;
		FindControlsOn(Parent);
	}
        public static void SendUserError(string text, string anchor, int displayTime, bool includeBeep, object objin, WorldEditor appin)
        {
            app = appin;
            link = anchor;
            if (includeBeep)
            {
                SystemSounds.Beep.Play();
            }
            obj = objin;

            if (showing == false)
            {
                showing = true;
                toolStripErrorMessage = new ToolStripLabel(text, null, false);
                toolStripErrorMessage.ForeColor = Color.Red;
                toolStripErrorMessage.Click += toolStripErrorMessage_clicked;
                toolStripErrorMessage.IsLink = true;
                toolStripErrorMessage.ActiveLinkColor = Color.Red;
                toolStripErrorMessage.LinkBehavior = LinkBehavior.AlwaysUnderline;
                toolStripErrorMessage.LinkColor = Color.Red;
                toolStripErrorMessage.VisitedLinkColor = Color.Red;
                toolStripErrorMessageItem = toolStripErrorMessage as ToolStripItem;
                app.StatusBarAddItem(toolStripErrorMessageItem);
                timeOutErrorMessage(toolStripErrorMessageItem, displayTime);
            }
        }
Ejemplo n.º 4
0
        public void SafeSetText(ToolStripLabel toolStripLabel, string text)
        {
            if (InvokeRequired)
            {
                SetText setTextDel = delegate(ToolStripLabel toolStrip, string textVal)
                {
                    foreach (ToolStripItem item in base.Items)
                    {
                        if (item == toolStrip)
                        {
                            item.Text = textVal;
                        }
                    }
                };

                try
                {
                    Invoke(setTextDel, new object[] { toolStripLabel, text });
                }
                catch
                {
                }
            }
            else
            {
                foreach (ToolStripItem item in base.Items)
                {
                    if (item == toolStripLabel)
                    {
                        item.Text = text;
                    }
                }
            }
        }
Ejemplo n.º 5
0
 private void TranslateMe(System.Windows.Forms.ToolStripLabel tslabel)
 {
     if (!IsOmitted(tslabel.Tag))
     {
         tslabel.Text = TranslateMe(tslabel.Text);
     }
 }
Ejemplo n.º 6
0
        public WTrayApp()
        {
            try
            {
                wmiObj = new AwmiInterface();
            }
            catch (AwmiException)
            {
                ShowErrorMsg(Strings.FatalAwmiError, MessageBoxIcon.Error);
                Environment.Exit(1);
            }
            Camera = new DevEntry(Strings.Webcam, OnCameraToggle);
            CardReader = new DevEntry(Strings.CardReader, OnCardReaderToggle);

            trayMenuStrip = new ContextMenuStrip();
            ToolStripLabel lblDevices = new ToolStripLabel(Strings.Devices);
            lblDevices.Enabled = false;
            ToolStripMenuItem mnuAbout = new ToolStripMenuItem(Strings.About, null, OnAbout);
            ToolStripMenuItem mnuExit = new ToolStripMenuItem(Strings.Exit, null, OnExit);

            trayMenuStrip.Items.Add(lblDevices);
            trayMenuStrip.Items.Add(Camera.MenuItem);
            trayMenuStrip.Items.Add(CardReader.MenuItem);
            trayMenuStrip.Items.Add(new ToolStripSeparator());
            trayMenuStrip.Items.Add(mnuAbout);
            trayMenuStrip.Items.Add(mnuExit);

            trayIcon = new NotifyIcon();
            trayIcon.Text = Strings.WTrayName;
            trayIcon.Icon = new Icon(Icons.WTray, 40, 40);

            trayIcon.ContextMenuStrip = trayMenuStrip;
            trayIcon.Visible = true;
            RefreshDeviceStatus();
        }
Ejemplo n.º 7
0
 public StatusViewer(System.Windows.Forms.ToolStripLabel toolsStripLabel,
                     System.Windows.Forms.Timer formStatusTime, System.Windows.Forms.ToolStrip formsToolStrip)
 {
     stripLabel = toolsStripLabel;
     statusTime = formStatusTime;
     toolStrip  = formsToolStrip;
 }
Ejemplo n.º 8
0
        public ParallaxToolStrip(SerialParallax osc, GraphControl gc)
        {
            oscillo      = osc;
            graphControl = gc;

            //
            // toolStrip2
            //
            this.toolStrip          = new System.Windows.Forms.ToolStrip();
            this.toolStrip.Dock     = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Location = new System.Drawing.Point(3, 0);
            this.toolStrip.Name     = "toolStrip2";
            this.toolStrip.Size     = new System.Drawing.Size(243, 25);
            this.toolStrip.TabIndex = 1;
            this.toolStrip.Text     = "toolStrip2";

            this.triggerLabel    = new System.Windows.Forms.ToolStripLabel();
            this.trigger         = new System.Windows.Forms.ToolStripTextBox();
            this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
            this.triggerMode     = new System.Windows.Forms.ToolStripComboBox();

            //
            // triggerLabel
            //
            this.triggerLabel.Name = "triggerLabel";
            this.triggerLabel.Size = new System.Drawing.Size(42, 22);
            this.triggerLabel.Text = "trigger";
            this.toolStrip.Items.Add(this.triggerLabel);

            //
            // trigger
            //
            this.trigger.Name        = "trigger";
            this.trigger.Size        = new System.Drawing.Size(50, 25);
            this.trigger.Text        = "0";
            this.trigger.Validating += new System.ComponentModel.CancelEventHandler(this.trigger_Validating);
            this.trigger.Validated  += new System.EventHandler(this.trigger_Validated);
            this.toolStrip.Items.Add(this.trigger);

            //
            // triggerMode
            //
            this.triggerMode.Items.AddRange(new object[] {
                "ch1 ˄",
                "ch1 ˅",
                "ch2 ˄",
                "ch2 ˅",
                "ext ˄"
            });
            this.triggerMode.Name = "triggerMode";
            this.triggerMode.Size = new System.Drawing.Size(20, 25);
            this.triggerMode.SelectedIndexChanged += new System.EventHandler(this.triggerMode_SelectedIndexChanged);
            triggerMode.SelectedIndex              = 0;
            this.toolStrip.Items.Add(this.triggerMode);

            //channels.SelectedIndex = 0;
            trigger.Text = "0";
            triggerMode.SelectedIndex = 0;
            oscillo.TriggerVoltage    = (float.Parse(trigger.Text));
        }
Ejemplo n.º 9
0
 public TextEditor()
 {
     InitializeComponent();
     Settings.SetupWindowPosition(SavedWindows.Main, this);
     // highlighting
     FileSyntaxModeProvider fsmProvider = new FileSyntaxModeProvider(Settings.ResourcesFolder); // Create new provider with the highlighting directory.
     HighlightingManager.Manager.AddSyntaxModeFileProvider(fsmProvider); // Attach to the text editor.
     // folding timer
     timer = new Timer();
     timer.Interval = 1000;
     timer.Tick += new EventHandler(timer_Tick);
     // Recent files
     UpdateRecentList();
     // Templates
     foreach (string file in Directory.GetFiles(Path.Combine(Settings.ResourcesFolder, "templates"), "*.ssl")) {
         ToolStripMenuItem mi = new ToolStripMenuItem(Path.GetFileNameWithoutExtension(file), null, delegate(object sender, EventArgs e) {
             Open(file, OpenType.File, false, true);
         });
         templatesToolStripMenuItem.DropDownItems.Add(mi);
     }
     parserLabel = new ToolStripLabel("Parser: No file");
     parserLabel.Alignment = ToolStripItemAlignment.Right;
     MainMenu.Items.Add(parserLabel);
     tabControl1.tabsSwapped += delegate(object sender, TabsSwappedEventArgs e) {
         TabInfo tmp = tabs[e.aIndex];
         tabs[e.aIndex] = tabs[e.bIndex];
         tabs[e.aIndex].index = e.aIndex;
         tabs[e.bIndex] = tmp;
         tabs[e.bIndex].index = e.bIndex;
     };
     splitContainer2.Panel2Collapsed = !Settings.enableParser;
     parserLabel.Visible = Settings.enableParser;
     ProgramInfo.LoadOpcodes();
 }
Ejemplo n.º 10
0
		private void VerifyPatterns (ToolStripLabel menuItem, bool expectInvokeSupport)
		{
			IRawElementProviderSimple provider = ProviderFactory.GetProvider (menuItem);
			
			// Should never support Text
			object textProvider = provider.GetPatternProvider (TextPatternIdentifiers.Pattern.Id);
			Assert.IsNull (textProvider);

			// Should never support TableItem
			object tableItemProvider = provider.GetPatternProvider (TableItemPatternIdentifiers.Pattern.Id);
			Assert.IsNull (tableItemProvider);

			// Should never support RangeValue
			object rangeValueProvider = provider.GetPatternProvider (RangeValuePatternIdentifiers.Pattern.Id);
			Assert.IsNull (rangeValueProvider);

			// Should never support Value
			object valueProvider = provider.GetPatternProvider (ValuePatternIdentifiers.Pattern.Id);
			Assert.IsNull (valueProvider);

			// Support Invoke conditionally
			object invokeProvider = provider.GetPatternProvider (InvokePatternIdentifiers.Pattern.Id);
			if (expectInvokeSupport) {
				Assert.IsNotNull (invokeProvider);
				Assert.IsTrue (invokeProvider is IInvokeProvider, "IInvokeProvider");
			} else
				Assert.IsNull (invokeProvider);
		}
Ejemplo n.º 11
0
        public TaskBarIconMenu()
        {
            TrayIcon_Menu = new ContextMenuStrip();
            TrayIcon_Artist = new ToolStripLabel();
            TrayIcon_Title = new ToolStripLabel();
            TrayIcon_Diff = new ToolStripLabel();
            TrayIcon_Play = new ToolStripMenuItem();
            TrayIcon_PlayNext = new ToolStripMenuItem();
            TrayIcon_PlayPrev = new ToolStripMenuItem();
            TrayIcon_Exit = new ToolStripMenuItem();
            TrayIcon_Menu.SuspendLayout();

            TrayIcon_Menu.Items.AddRange(new ToolStripItem[] {
                TrayIcon_Artist,
                TrayIcon_Title,
                TrayIcon_Diff,
                TrayIcon_Play,
                TrayIcon_PlayNext,
                TrayIcon_PlayPrev,
                TrayIcon_Exit});
            TrayIcon_Menu.Name = "TrayIcon_Menu";
            TrayIcon_Menu.Size = new Size(176, 176);
            // TrayIcon_Artist
            TrayIcon_Artist.Name = "TrayIcon_Artist";
            TrayIcon_Artist.Text = LanguageManager.Get("TrayIcon_Aritst_Text");
            TrayIcon_Artist.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Bold, GraphicsUnit.Point, 134);
            // TrayIcon_Title
            TrayIcon_Title.Name = "TrayIcon_Title";
            TrayIcon_Title.Text = LanguageManager.Get("TrayIcon_Title_Text");
            TrayIcon_Title.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Bold, GraphicsUnit.Point, 134);
            // TrayIcon_Diff
            TrayIcon_Diff.Name = "TrayIcon_Diff";
            TrayIcon_Diff.Text = LanguageManager.Get("TrayIcon_Diff_Text");
            TrayIcon_Diff.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Bold, GraphicsUnit.Point, 134);
            // TrayIcon_Play
            TrayIcon_Play.Name = "TrayIcon_Play";
            TrayIcon_Play.Text = LanguageManager.Get("TrayIcon_Play_Pause_Text");
            TrayIcon_Play.Click += delegate { SendKeys.Send("%{F5}"); };
            // TrayIcon_PlayNext
            TrayIcon_PlayNext.Name = "TrayIcon_PlayNext";
            TrayIcon_PlayNext.Text = LanguageManager.Get("TrayIcon_PlayNext_Text");
            TrayIcon_PlayNext.Click += delegate { SendKeys.Send("%{RIGHT}"); };
            // TrayIcon_PlayNext
            TrayIcon_PlayPrev.Name = "TrayIcon_PlayPrev";
            TrayIcon_PlayPrev.Text = LanguageManager.Get("TrayIcon_PlayPrev_Text");
            TrayIcon_PlayPrev.Click += delegate { SendKeys.Send("%{LEFT}"); };
            // TrayIcon_Exit
            TrayIcon_Exit.Name = "TrayIcon_Exit";
            TrayIcon_Exit.Text = LanguageManager.Get("TrayIcon_Exit_Text");
            TrayIcon_Exit.Click += delegate
            {
                if (
                    MessageBox.Show(LanguageManager.Get("Comfirm_Exit_Text"), LanguageManager.Get("Tip_Text"),
                        MessageBoxButtons.YesNo) != DialogResult.Yes) return;
                Core.MainIsVisible = false;
                Core.Exit();
                Environment.Exit(0);
            };
            TrayIcon_Menu.ResumeLayout(false);
        }
Ejemplo n.º 12
0
        public InputEncodingToolStrip()
        {
            this.toolStripLabel1   = new System.Windows.Forms.ToolStripLabel();
            this.tsddInputEncoding = new System.Windows.Forms.ToolStripDropDownButton();

            this.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.toolStripLabel1,
                this.tsddInputEncoding
            });

            //
            // toolStripLabel1
            //
            this.toolStripLabel1.Name = "toolStripLabel1";
            this.toolStripLabel1.Size = new System.Drawing.Size(91, 22);
            this.toolStripLabel1.Text = "Input Encoding:";
            //
            // tsddInputEncoding
            //
            this.tsddInputEncoding.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
            //this.tsddInputEncoding.Image = ((System.Drawing.Image)(resources.GetObject("tsddInputEncoding.Image")));
            //this.tsddInputEncoding.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.tsddInputEncoding.Name = "tsddInputEncoding";
            this.tsddInputEncoding.Size = new System.Drawing.Size(114, 22);
            this.tsddInputEncoding.Text = "Arabic (Windows)";
        }
Ejemplo n.º 13
0
        public ParallaxToolStrip(SerialParallax osc, GraphControl gc)
        {
            oscillo = osc;
            graphControl = gc;

            //
            // toolStrip2
            //
            this.toolStrip = new System.Windows.Forms.ToolStrip();
            this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Location = new System.Drawing.Point(3, 0);
            this.toolStrip.Name = "toolStrip2";
            this.toolStrip.Size = new System.Drawing.Size(243, 25);
            this.toolStrip.TabIndex = 1;
            this.toolStrip.Text = "toolStrip2";

            this.triggerLabel = new System.Windows.Forms.ToolStripLabel();
            this.trigger = new System.Windows.Forms.ToolStripTextBox();
            this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
            this.triggerMode = new System.Windows.Forms.ToolStripComboBox();

            //
            // triggerLabel
            //
            this.triggerLabel.Name = "triggerLabel";
            this.triggerLabel.Size = new System.Drawing.Size(42, 22);
            this.triggerLabel.Text = "trigger";
            this.toolStrip.Items.Add(this.triggerLabel);

            //
            // trigger
            //
            this.trigger.Name = "trigger";
            this.trigger.Size = new System.Drawing.Size(50, 25);
            this.trigger.Text = "0";
            this.trigger.Validating += new System.ComponentModel.CancelEventHandler(this.trigger_Validating);
            this.trigger.Validated += new System.EventHandler(this.trigger_Validated);
            this.toolStrip.Items.Add(this.trigger);

            //
            // triggerMode
            //
            this.triggerMode.Items.AddRange(new object[] {
            "ch1 ˄",
            "ch1 ˅",
            "ch2 ˄",
            "ch2 ˅",
            "ext ˄"});
            this.triggerMode.Name = "triggerMode";
            this.triggerMode.Size = new System.Drawing.Size(20, 25);
            this.triggerMode.SelectedIndexChanged += new System.EventHandler(this.triggerMode_SelectedIndexChanged);
            triggerMode.SelectedIndex = 0;
            this.toolStrip.Items.Add(this.triggerMode);

            //channels.SelectedIndex = 0;
            trigger.Text = "0";
            triggerMode.SelectedIndex = 0;
            oscillo.TriggerVoltage = (float.Parse(trigger.Text));
        }
Ejemplo n.º 14
0
		public LogBox()
		{
			InitializeComponent();

			_reportLink = new ToolStripLabel("Report this problem to the developers");
			_reportLink.LinkColor = Color.Red;
			_reportLink.IsLink = true;
			_reportLink.Visible = false;
			menuStrip1.Items.Add(_reportLink);
			_reportLink.Click += delegate
			{
				if (!ReportError(_verboseBox.Text))
				{
					try
					{
						if (!string.IsNullOrEmpty(_verboseBox.Text))
						{
							Clipboard.SetText(_verboseBox.Text);
							MessageBox.Show(
								"Information on what happened has been copied to your clipboard. Please email it to the developers of the program you are using.");
						}
					}
					catch (Exception)
					{
						MessageBox.Show(
							   "Unable to copy the message to the clipboard. You might need to restart the application or your computer");
					}
				}

				if (ReportErrorLinkClicked != null)
					ReportErrorLinkClicked(this, EventArgs.Empty);
			};

			_verboseBox.ForeColor = _box.ForeColor = SystemColors.WindowText;
			_verboseBox.BackColor = _box.BackColor = SystemColors.Window;
			menuStrip1.BackColor = Color.White;
			BackColor = VisualStyleInformation.TextControlBorder;
			_tableLayout.BackColor = SystemColors.Window;

			//On some machines (winXP?) we get in trouble if we don't make sure these boxes are visible before
			//they get invoked() to. It's not clear that the following actually works... in addition to this
			//effort, we also catch exceptions when in trying to invoke on them.
			_box.CreateControl();
			_verboseBox.Visible = true;
			_verboseBox.CreateControl();
			_verboseBox.Visible = false;

			SetFont();

			_tableLayout.Size = new Size(ClientSize.Width - (_tableLayout.Left + 1),
				ClientSize.Height - (_tableLayout.Top + 1));

			_box.Dock = DockStyle.Fill;
			_box.LinkClicked += _box_LinkClicked;
			_verboseBox.LinkClicked += _box_LinkClicked;
			_synchronizationContext = SynchronizationContext.Current;
		}
Ejemplo n.º 15
0
		public void ProviderPatternTest ()
		{
			ToolStripLabel menuItem = new ToolStripLabel ();
			VerifyPatterns (menuItem, false);

			menuItem = new ToolStripLabel ();
			menuItem.IsLink = true;
			VerifyPatterns (menuItem, true);
		}
Ejemplo n.º 16
0
 public NodeContextMenu(SchemaTree tree, RepositoryNode node)
 {
     EventHandler onClick = null;
     this._tree = tree;
     this._node = node;
     if ((node.Repository.DriverLoader.InternalID == null) && node.Repository.DriverLoader.IsValid)
     {
         ToolStripLabel label = new ToolStripLabel("Custom driver: " + node.Repository.DriverLoader.Driver.Name);
         this.Items.Add(label);
         this.Items.Add("-");
         label.Font = new Font(label.Font, FontStyle.Bold);
     }
     if (node.Repository.IsQueryable)
     {
         this.Items.Add("New Query", Resources.New, new EventHandler(this.NewQuery));
         this.Items.Add("-");
         if ((MainForm.Instance != null) && (MainForm.Instance.CurrentQueryControl != null))
         {
             this.Items.Add("Use in Current Query", Resources.UseCurrentQuery, (sender, e) => MainForm.Instance.CurrentQueryControl.UseCurrentDb(false));
             if (MainForm.Instance.CurrentQueryControl.Query.Repository == node.Repository)
             {
                 this.Items[this.Items.Count - 1].Enabled = false;
             }
             this.Items.Add("-");
         }
         if (MainForm.Instance != null)
         {
             if (onClick == null)
             {
                 onClick = (sender, e) => MainForm.Instance.ClearAllConnections(node.Repository);
             }
             this.Items.Add("Close all connections", null, onClick);
             this.Items.Add("-");
         }
     }
     this.Items.Add("Refresh", Resources.Refresh, new EventHandler(this.Refresh));
     if (node.Parent == null)
     {
         this.Items.Add("Delete Connection", Resources.Delete, new EventHandler(this.Delete));
     }
     if (!((this._node.Repository.DriverLoader.SimpleAssemblyName != null) && this._node.Repository.DriverLoader.SimpleAssemblyName.StartsWith("Mindscape.LightSpeed", StringComparison.InvariantCultureIgnoreCase)) && (this._node.Repository.Parent == null))
     {
         this.Items.Add("-");
         this.Items.Add("Rename Connection", null, new EventHandler(this.Rename));
         if (!string.IsNullOrEmpty(this._node.Repository.DisplayName))
         {
             this.Items.Add("Reset Connection Name", null, new EventHandler(this.ResetName));
         }
     }
     if (node.Parent == null)
     {
         this.Items.Add("Create Similar Connection...", null, new EventHandler(this.CreateSimilar));
         this.Items.Add("-");
         this.Items.Add("Properties", Resources.AdvancedProperties, new EventHandler(this.Edit));
     }
 }
Ejemplo n.º 17
0
		public override void SetUp ()
		{
			base.SetUp ();

			strip = new ToolStrip ();
			item = new ToolStripLabel ();
			strip.Items.Add (item);
			Form.Controls.Add (strip);
			Form.Show ();
		}
Ejemplo n.º 18
0
        void AddToolStripLabel(string labelText)
        {
            ToolStripLabel label = new ToolStripLabel
            {
                Text = labelText,
                Font = new Font(Font, FontStyle.Bold | FontStyle.Underline)
            };

            toolStrip.Items.Add(label);
        }
 private void InitializeComponent()
 {
     ComponentResourceManager manager = new ComponentResourceManager(typeof(PropertyVersionFilterControl));
     this.tsTop = new ToolStrip();
     this.tslField = new ToolStripLabel();
     this.tslPropertyName = new ToolStripLabel();
     this.tslIs = new ToolStripLabel();
     this.tsddValueOperation = new ToolStripDropDownButton();
     this.tsmiOperationEquals = new ToolStripMenuItem();
     this.tsmiOperationNotEquals = new ToolStripMenuItem();
     this.tsmiOperationSmaller = new ToolStripMenuItem();
     this.tsmiOperationLarger = new ToolStripMenuItem();
     this.tstbValue = new ToolStripTextBox();
     this.tsTop.SuspendLayout();
     base.SuspendLayout();
     this.tsTop.BackColor = Color.Transparent;
     manager.ApplyResources(this.tsTop, "tsTop");
     this.tsTop.GripStyle = ToolStripGripStyle.Hidden;
     this.tsTop.Items.AddRange(new ToolStripItem[] { this.tslField, this.tslPropertyName, this.tslIs, this.tsddValueOperation, this.tstbValue });
     this.tsTop.Name = "tsTop";
     this.tslField.Name = "tslField";
     manager.ApplyResources(this.tslField, "tslField");
     this.tslPropertyName.Name = "tslPropertyName";
     manager.ApplyResources(this.tslPropertyName, "tslPropertyName");
     this.tslIs.Name = "tslIs";
     manager.ApplyResources(this.tslIs, "tslIs");
     this.tsddValueOperation.DisplayStyle = ToolStripItemDisplayStyle.Text;
     this.tsddValueOperation.DropDownItems.AddRange(new ToolStripItem[] { this.tsmiOperationEquals, this.tsmiOperationNotEquals, this.tsmiOperationSmaller, this.tsmiOperationLarger });
     this.tsddValueOperation.Name = "tsddValueOperation";
     manager.ApplyResources(this.tsddValueOperation, "tsddValueOperation");
     this.tsmiOperationEquals.Name = "tsmiOperationEquals";
     manager.ApplyResources(this.tsmiOperationEquals, "tsmiOperationEquals");
     this.tsmiOperationEquals.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationNotEquals.Name = "tsmiOperationNotEquals";
     manager.ApplyResources(this.tsmiOperationNotEquals, "tsmiOperationNotEquals");
     this.tsmiOperationNotEquals.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationSmaller.Name = "tsmiOperationSmaller";
     manager.ApplyResources(this.tsmiOperationSmaller, "tsmiOperationSmaller");
     this.tsmiOperationSmaller.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tsmiOperationLarger.Name = "tsmiOperationLarger";
     manager.ApplyResources(this.tsmiOperationLarger, "tsmiOperationLarger");
     this.tsmiOperationLarger.Click += new EventHandler(this.tsmiOperationEquals_Click);
     this.tstbValue.BorderStyle = BorderStyle.FixedSingle;
     manager.ApplyResources(this.tstbValue, "tstbValue");
     this.tstbValue.Name = "tstbValue";
     this.tstbValue.TextChanged += new EventHandler(this.tstbValue_TextChanged);
     manager.ApplyResources(this, "$this");
     base.AutoScaleMode = AutoScaleMode.Font;
     base.Controls.Add(this.tsTop);
     base.Name = "PropertyVersionFilterControl";
     this.tsTop.ResumeLayout(false);
     this.tsTop.PerformLayout();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Ejemplo n.º 20
0
 private void InitializeNotify()
 {
     notify=new NotifyIcon();
     notify.Text=Title;
     notify.Icon=Properties.Resources.CW;
     //
     MenuStrip=new ContextMenuStrip();
     //
     ToolStripLabelClipboardInfo=new ToolStripLabel()
     {
     Name="ToolStripLabelClipboardInfo",
     Owner=notify.ContextMenuStrip
     };
     MenuStrip.Items.Add(ToolStripLabelClipboardInfo);
     //
     MenuStrip.Items.Add(new ToolStripSeparator());
     //
     EventHandler ClikEvent=new EventHandler(TrayMenuItemClick);
     //
     TrayMenuItemClipboardClear=new ToolStripMenuItem
     (
     app.Language.Clear,
     CW.Properties.Resources.Clear.ToBitmap(),
     ClikEvent,
     "TrayMenuItemClipboardClear"
     )
     {
     ToolTipText=app.Language.ClearDescription
     };
     MenuStrip.Items.Add(TrayMenuItemClipboardClear);
     //
     TrayMenuItemOpen=new ToolStripMenuItem
     (
     app.Language.Open,
     CW.Properties.Resources.Open.ToBitmap(),
     ClikEvent,
     "TrayMenuItemOpen"
     );
     MenuStrip.Items.Add(TrayMenuItemOpen);
     //
     TrayMenuItemExit=new ToolStripMenuItem
     (
     app.Language.Close,
     CW.Properties.Resources.Exit.ToBitmap(),
     ClikEvent,
     "TrayMenuItemExit"
     );
     MenuStrip.Items.Add(TrayMenuItemExit);
     //
     notify.ContextMenuStrip=MenuStrip;
     //
     notify.MouseClick+=NotifyMouseClick;
     notify.BalloonTipClicked+=TrayBalloonTipClick;
     notify.Visible=app.Settings.ShowNotifyIcon;
 }
Ejemplo n.º 21
0
        public FilteringToolStrip(FilterConsumer fc)
        {
            this.filterConsumer = fc;
            fc.SetFilter(lowPass);

            this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel();
            this.cof             = new OnlyNumbersToolStripTextBox();
            this.enableFiltering = new CheckBox();
            this.enable          = new System.Windows.Forms.ToolStripControlHost(this.enableFiltering);

            //
            // toolStrip1
            //
            this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.enable,
                this.toolStripLabel4,
                this.cof
            });
            this.toolStrip.Location = new System.Drawing.Point(252, 0);
            this.toolStrip.Name     = "toolStrip1";
            this.toolStrip.Size     = new System.Drawing.Size(197, 25);
            this.toolStrip.TabIndex = 2;

            for (int i = 0; ; i++)
            {
                string name = lowPass.GetValueName(i);
                if (name == null)
                {
                    break;
                }

                //
                // toolStripLabel4
                //
                this.toolStripLabel4.Name = "toolStripLabel4";
                this.toolStripLabel4.Size = new System.Drawing.Size(52, 22);
                this.toolStripLabel4.Text = name;


                //this.enable.DisplayStyle = ToolStripItemDisplayStyle.
                this.enableFiltering.CheckedChanged += new System.EventHandler(this.enableFilteringChanged);
                this.enableFiltering.Checked         = false;

                // cof
                this.cof.Name       = name;
                this.cof.Size       = new System.Drawing.Size(50, 25);
                this.cof.Text       = "100";
                this.cof.Tag        = i;
                this.cof.Enabled    = this.enableFiltering.Checked;
                this.cof.textReady += new EventHandler(cof_textReady);
            }
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Constructor for the static class, it is called manually.
        /// </summary>
        /// <param name="statusBar">Object of the status bar.</param>
        /// <param name="statusLabel">Object of the status label.</param>
        /// <param name="lineLabel">Object of the line label.</param>
        /// <param name="columnLabel">Object of the line label.</param>
        public static void Construct(StatusStrip statusBar, ToolStripLabel statusLabel, ToolStripLabel lineLabel, ToolStripLabel columnLabel)
        {
            if (StatusManager.statusBar != null) // Prevent double construct.
            {
                return;
            }

            StatusManager.statusBar = statusBar;
            StatusManager.columnLabel = columnLabel;
            StatusManager.lineLabel = lineLabel;
            StatusManager.statusLabel = statusLabel;
        }
Ejemplo n.º 23
0
      public FilteringToolStrip(FilterConsumer fc)
      {
         this.filterConsumer = fc;
         fc.SetFilter(lowPass);

         this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel();
         this.cof = new OnlyNumbersToolStripTextBox();
         this.enableFiltering = new CheckBox();
         this.enable = new System.Windows.Forms.ToolStripControlHost(this.enableFiltering);

         // 
         // toolStrip1
         // 
         this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
         this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.enable,
            this.toolStripLabel4,
            this.cof});
         this.toolStrip.Location = new System.Drawing.Point(252, 0);
         this.toolStrip.Name = "toolStrip1";
         this.toolStrip.Size = new System.Drawing.Size(197, 25);
         this.toolStrip.TabIndex = 2;

         for (int i = 0; ; i++)
         {
            string name = lowPass.GetValueName(i);
            if (name == null)
            {
               break;
            }

            // 
            // toolStripLabel4
            // 
            this.toolStripLabel4.Name = "toolStripLabel4";
            this.toolStripLabel4.Size = new System.Drawing.Size(52, 22);
            this.toolStripLabel4.Text = name;

            
            //this.enable.DisplayStyle = ToolStripItemDisplayStyle.
            this.enableFiltering.CheckedChanged += new System.EventHandler(this.enableFilteringChanged);
            this.enableFiltering.Checked = false;

            // cof
            this.cof.Name = name;
            this.cof.Size = new System.Drawing.Size(50, 25);
            this.cof.Text = "100";
            this.cof.Tag = i;
            this.cof.Enabled = this.enableFiltering.Checked;
            this.cof.textReady += new EventHandler(cof_textReady);
         }
      }
Ejemplo n.º 24
0
 public void Titulo() 
 {
     if (tslTitulo == null)
     {
         tslTitulo = new ToolStripLabel();
         tslTitulo.Text = "Administración";
         tslTitulo.Font = new Font("Century Gothic", 18);
         tslTitulo.ForeColor = Color.LightGray;
         tslTitulo.Image = global::Administrador.Properties.Resources.Admin;
         tslTitulo.ImageScaling = ToolStripItemImageScaling.None;
         MenuAdmin.Items.Add(tslTitulo);
     }
 }
 private ToolStripDropDownMenu BuildMenu(bool isRow)
 {
     ToolStripMenuItem item = new ToolStripMenuItem();
     ToolStripMenuItem item2 = new ToolStripMenuItem();
     ToolStripMenuItem item3 = new ToolStripMenuItem();
     ToolStripSeparator separator = new ToolStripSeparator();
     ToolStripLabel label = new ToolStripLabel();
     ToolStripMenuItem item4 = new ToolStripMenuItem();
     ToolStripMenuItem item5 = new ToolStripMenuItem();
     ToolStripMenuItem item6 = new ToolStripMenuItem();
     item.Text = System.Design.SR.GetString("TableLayoutPanelDesignerAddMenu");
     item.Tag = isRow;
     item.Name = "add";
     item.Click += new EventHandler(this.OnAddClick);
     item2.Text = System.Design.SR.GetString("TableLayoutPanelDesignerInsertMenu");
     item2.Tag = isRow;
     item2.Name = "insert";
     item2.Click += new EventHandler(this.OnInsertClick);
     item3.Text = System.Design.SR.GetString("TableLayoutPanelDesignerDeleteMenu");
     item3.Tag = isRow;
     item3.Name = "delete";
     item3.Click += new EventHandler(this.OnDeleteClick);
     label.Text = System.Design.SR.GetString("TableLayoutPanelDesignerLabelMenu");
     if (System.Design.SR.GetString("TableLayoutPanelDesignerDontBoldLabel") == "0")
     {
         label.Font = new Font(label.Font, FontStyle.Bold);
     }
     label.Name = "sizemode";
     item4.Text = System.Design.SR.GetString("TableLayoutPanelDesignerAbsoluteMenu");
     item4.Tag = isRow;
     item4.Name = "absolute";
     item4.Click += new EventHandler(this.OnAbsoluteClick);
     item5.Text = System.Design.SR.GetString("TableLayoutPanelDesignerPercentageMenu");
     item5.Tag = isRow;
     item5.Name = "percent";
     item5.Click += new EventHandler(this.OnPercentClick);
     item6.Text = System.Design.SR.GetString("TableLayoutPanelDesignerAutoSizeMenu");
     item6.Tag = isRow;
     item6.Name = "autosize";
     item6.Click += new EventHandler(this.OnAutoSizeClick);
     ToolStripDropDownMenu menu = new ToolStripDropDownMenu();
     menu.Items.AddRange(new ToolStripItem[] { item, item2, item3, separator, label, item4, item5, item6 });
     menu.Tag = isRow;
     menu.Opening += new CancelEventHandler(this.OnRowColMenuOpening);
     IUIService service = this.GetService(typeof(IUIService)) as IUIService;
     if (service != null)
     {
         menu.Renderer = (ToolStripProfessionalRenderer) service.Styles["VsRenderer"];
     }
     return menu;
 }
Ejemplo n.º 26
0
        public StreamDetailsControl()
        {
            SuspendLayout();

            _lastWriteTime = new ToolStripLabel();
            _fileSize = new ToolStripLabel();
            _contentType = new ToolStripDropDownButton
            {
                DisplayStyle = ToolStripItemDisplayStyle.Text
            };
            _encoding = new ToolStripLabel();
            _bom = new ToolStripLabel
            {
                Text = "BOM"
            };
            _lineEnding = new ToolStripLabel();

            Items.AddRange(new ToolStripItem[]
            {
                _lastWriteTime,
                _fileSize,
                _contentType,
                _encoding,
                _bom,
                _lineEnding
            });
            Renderer = ToolStripSimpleRenderer.Instance;

            LastWriteTime = null;
            FileSize = null;
            HaveBom = false;
            LineTermination = null;
            Encoding = null;
            ContentType = null;

            ResumeLayout(false);
            PerformLayout();

            foreach (string name in _highlighterNames)
            {
                var item = new ToolStripMenuItem
                {
                    Text = name == _defaultHighlighterName ? Labels.PlainText : name,
                    Tag = name
                };

                item.Click += item_Click;

                _contentType.DropDownItems.Add(item);
            }
        }
Ejemplo n.º 27
0
        public WebBrowserTabPage(WebKitBrowser browserControl, bool goHome)
        {
            InitializeComponent();

            statusStrip = new StatusStrip();
            statusStrip.Name = "statusStrip";
            statusStrip.Visible = true;
            statusStrip.SizingGrip = false;

            container = new ToolStripContainer();
            container.Name = "container";
            container.Visible = true;
            container.Dock = DockStyle.Fill;

            statusLabel = new ToolStripLabel();
            statusLabel.Name = "statusLabel";
            statusLabel.Text = "Done";
            statusLabel.Visible = true;

            iconLabel = new ToolStripLabel();
            iconLabel.Name = "iconLabel";
            iconLabel.Text = "No Icon";
            iconLabel.Visible = true;

            statusStrip.Items.Add(statusLabel);
            statusStrip.Items.Add(iconLabel);

            container.BottomToolStripPanel.Controls.Add(statusStrip);

            // create webbrowser control
            browser = browserControl;
            browser.Visible = true;
            browser.Dock = DockStyle.Fill;
            browser.Name = "browser";
            container.ContentPanel.Controls.Add(browser);

            // context menu

            this.Controls.Add(container);
            this.Text = "<New Tab>";

            // events
            browser.DocumentTitleChanged += (s, e) => this.Text = browser.DocumentTitle;
            browser.Navigating += (s, e) => statusLabel.Text = "Loading...";
            browser.Navigated += (s, e) => { statusLabel.Text = "Downloading..."; };
            browser.DocumentCompleted += (s, e) => { statusLabel.Text = "Done"; };
            if (goHome)
                browser.Navigate("http://www.google.com");
            browser.ApplicationName = "WebKit.NET-test";
        }
        private void BuildOwnToolStripMenu()
        {
            ToolStripLabel tslSearch = new ToolStripLabel("Suche:");
            this.toolStripMain.Items.Add(tslSearch);

            ToolStripTextBox tstbSearch = new ToolStripTextBox("tstbSearch");
            tstbSearch.Text = "Suchbegriff";
            tstbSearch.ForeColor = Color.Gray;
            tstbSearch.KeyDown += new KeyEventHandler(tstbSearch_KeyDown);
            tstbSearch.GotFocus += new EventHandler(tstbSearch_GotFocus);
            tstbSearch.LostFocus += new EventHandler(tstbSearch_LostFocus);

            this.toolStripMain.Items.Add(tstbSearch);
        }
        public ExtendedStatusStrip()
        {
            Dock = DockStyle.Bottom;

            statuslabel = addtoolstriplabel("Status: ");
            bufferlabel = addtoolstriplabel("");
            stepcounterlabel = addtoolstriplabel("Step Counter: ");
            stepdelaylabel = addtoolstriplabel("Step Delay: ");

            bufferlabel.AutoSize = false;

            SizeChanged += sizechanged;
            ParameterPanel.StepDelayChanged += stepdelaychanged;
        }
Ejemplo n.º 30
0
 public FeedItemsListManager(ListView lFeedItemsLV, Label lItemLinkLBL, Label lItemTitleLBL, ToolStripLabel lLastDownloadLBL,
     ToolStripButton lShowUnreadFirstBTN, ToolStripButton lMarkAllReadBTN, FeedSubTreeManager lFeedSubManager)
 {
     feedItemsLV = lFeedItemsLV;
     itemLinkLBL = lItemLinkLBL;
     itemTitleLBL = lItemTitleLBL;
     lastDownloadLBL = lLastDownloadLBL;
     showUnreadFirstBTN = lShowUnreadFirstBTN;
     markAllReadBTN = lMarkAllReadBTN;
     feedItemsNormalFont = feedItemsLV.Font;
     feedItemsBoldFont = new Font(feedItemsNormalFont, FontStyle.Bold);
     currentlyDisplayedFeedSubscription = null;
     feedSubManager = lFeedSubManager;
 }
        /// <summary>
        /// Initializes a new instance of class CrmConnectionStatusBar
        /// </summary>
        public CrmConnectionStatusBar(FormHelper formHelper)
        {
            resources = new System.ComponentModel.ComponentResourceManager(typeof(CrmConnectionStatusBar));

            ConnectionManager.Instance.ConnectionListUpdated += cManager_ConnectionListUpdated;
            _formHelper = formHelper;

            // Build connection control
            this.BuildConnectionControl();

            // Add label that will display information about connection
            ToolStripLabel informationLabel = new ToolStripLabel();
            this.Items.Add(informationLabel);
            base.RenderMode = ToolStripRenderMode.Professional;
        }
Ejemplo n.º 32
0
 public void NuevaCategoria(String Categoria)
 {
     Titulo();
     tslCategoria = new ToolStripLabel();
     tslCategoria.Name = Categoria;
     tslCategoria.Text = Categoria;
     tslCategoria.AutoSize = false;
     tslCategoria.Height = 50;
     tslCategoria.Width = 250;
     tslCategoria.Font = new Font("Century Gothic",12, FontStyle.Underline);
     tslCategoria.ForeColor = Color.LightGray;
     tslCategoria.TextAlign = ContentAlignment.MiddleLeft;
     tslCategoria.DisplayStyle = ToolStripItemDisplayStyle.Text;
     this.MenuAdmin.Items.Add(tslCategoria);
 }
Ejemplo n.º 33
0
        public void addServerCollectionThread(ToolStripLabel toolStripLabel, ref StatusStrip SS, String file,
                                              Servers serversInstance, threads threadsInstance)
        {
            int maxthreads = 90;

            changeCurrThread(0, false);

            var r = new Regex(@"([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+)|([a-zA-Z][a-zA-Z0-9\-\.]+?:[0-9]+)");
            MatchCollection mc;
            try
            {
                mc = r.Matches(file);
            }
            catch
            {
                Controller.ToolStripText(toolStripLabel, ref SS, "Ready");
                return;
            }

            int count = 0;
            foreach (Match m in mc)
            {
            retry:
                if (killThreads)
                    break;

                if (currthreads > maxthreads)
                {
                    Thread.Sleep(100);
                    goto retry;
                }

                Controller.ToolStripText(toolStripLabel, ref SS,
                                         "Verifying/Adding Server:" + count.ToString() + "/" + mc.Count);
                KeyValuePair<String, String> coll = Server.getIpPort(m.ToString());

                changeCurrThread(1, true);
                var t = new Thread(() => addServerThread(coll.Key, int.Parse(coll.Value), serversInstance));
                t.Start();
                count++;
            }

            while (currthreads > 0)
            {
                Thread.Sleep(100);
            }
        }
        public ProfilerMemView(ToolStripLabel label, Label stats, ComboBox scale, TabPage memoryPage)
        {
            graph = new MemGraph();
            graph.Dock = DockStyle.Fill;
            memoryPage.Controls.Add(graph);
            graph.BringToFront();

            memLabel = label;
            statsLabel = stats;

            scaleCombo = scale;
            scaleCombo.SelectedIndex = scaleCombo.Items.Count - 1;
            scaleCombo.SelectedIndexChanged += new EventHandler(scaleCombo_SelectedIndexChanged);
            graph.TimeScale = scaleCombo.SelectedIndex + 1;

            Clear();
        }
 public static ToolStripItem addLabel(object control, String labelName, string labelText)
 {
     var toolStrip = getToolStripControl(control);
     if (toolStrip != null)
     {
         return (ToolStripItem)toolStrip.invokeOnThread(
             () =>
             {
                 var newLabel = new ToolStripLabel(labelName);
                 newLabel.Text = labelText;
                 newLabel.Name = labelName;
                 toolStrip.Items.Add(newLabel);
                 return newLabel;
             });
     }
     return null;
 }
Ejemplo n.º 36
0
        public AnalogTeensyToolbar(AnalogTeensy osc, GraphControl gc)
        {
            oscillo      = osc;
            graphControl = gc;

            this.toolStrip = new System.Windows.Forms.ToolStrip();

            this.sampleCountLabel = new System.Windows.Forms.ToolStripLabel();
            this.sampleCount      = new OnlyNumbersToolStripTextBox();

            //
            // toolStrip2
            //
            this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.sampleCountLabel,
                this.sampleCount
            });
            this.toolStrip.Location = new System.Drawing.Point(3, 0);
            this.toolStrip.Name     = "toolStrip2";
            this.toolStrip.Size     = new System.Drawing.Size(243, 25);
            this.toolStrip.TabIndex = 1;
            this.toolStrip.Text     = "toolStrip2";

            //
            // sampleCountLabel
            //
            this.sampleCountLabel.Size = new System.Drawing.Size(54, 22);
            this.sampleCountLabel.Text = "time(ms)";

            //
            // sampleCountLabel
            //
            this.sampleCount.Size       = new System.Drawing.Size(54, 22);
            this.sampleCount.Text       = "100";
            this.sampleCount.textReady += new EventHandler(sampleCount_textReady);

            //set values
            oscillo.SetMeasuringTime(int.Parse(sampleCount.Text));
        }
Ejemplo n.º 37
0
 public ToolStripLabelAccessibleObject(ToolStripLabel ownerItem) : base(ownerItem)
 {
     _owningToolStripLabel = ownerItem;
 }
 public ToolStripLabelLayout(ToolStripLabel owner) : base(owner)
 {
 }
Ejemplo n.º 39
0
        public int DownloadFile(string URL, string filename, System.Windows.Forms.ToolStripProgressBar prog, System.Windows.Forms.ToolStripLabel label1)
        {
            this.toolStripProgressBar1.Visible = true;
            float percent = 0;

            System.Net.HttpWebRequest  Myrq;
            System.Net.HttpWebResponse myrp;
            try
            {
                Myrq         = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(URL);
                Myrq.Timeout = 2000;
                myrp         = (System.Net.HttpWebResponse)Myrq.GetResponse();
                long totalBytes = myrp.ContentLength;
                if (prog != null)
                {
                    prog.Maximum = (int)totalBytes;
                }
                System.IO.Stream st = myrp.GetResponseStream();
                System.IO.Stream so = new System.IO.FileStream(filename, System.IO.FileMode.OpenOrCreate);
                long             totalDownloadedByte = 0;
                byte[]           by = new byte[102400];
                int osize           = st.Read(by, 0, (int)by.Length);
                while (osize > 0)
                {
                    totalDownloadedByte = osize + totalDownloadedByte;
                    System.Windows.Forms.Application.DoEvents();
                    so.Write(by, 0, osize);
                    if (prog != null)
                    {
                        prog.Value = (int)totalDownloadedByte;
                    }
                    osize = st.Read(by, 0, (int)by.Length);

                    percent     = (float)totalDownloadedByte / (float)totalBytes * 100;
                    label1.Text = "当前下载进度" + percent.ToString("F2") + "%";
                    System.Windows.Forms.Application.DoEvents(); //必须加注这句代码,否则label1将因为循环执行太快而来不及显示信息
                }
                so.Close();
                st.Close();

                return(0);
            }
            catch (System.Exception)
            {
                return(-1);
            }
        }
Ejemplo n.º 40
0
        /// <summary>
        ///
        /// </summary>
        public void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StringsControlToolStripEx));

            this.toolStripComboBox          = new System.Windows.Forms.ToolStripComboBox();
            this.toolStripButtonRemove      = new System.Windows.Forms.ToolStripSplitButton();
            this.toolStripLabel1            = new System.Windows.Forms.ToolStripLabel();
            this.deleteAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripButtonAdd         = new System.Windows.Forms.ToolStripButton();
            this.SuspendLayout();
            //
            // toolStrip1
            //
            this.Dock = System.Windows.Forms.DockStyle.None;
            this.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.toolStripLabel1,
                this.toolStripComboBox,
                this.toolStripButtonAdd,
                this.toolStripButtonRemove
            });
            this.Location = new System.Drawing.Point(124, 180);
            this.Name     = "toolStrip1";
            this.Size     = new System.Drawing.Size(263, 25);
            this.TabIndex = 0;
            this.Text     = "toolStrip1";
            //
            // toolStripComboBox1
            //
            this.toolStripComboBox.Name = "toolStripComboBox1";
            this.toolStripComboBox.Size = new System.Drawing.Size(121, 25);
            //
            // toolStripButton1
            //
            this.toolStripButtonRemove.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButtonRemove.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.deleteAllToolStripMenuItem
            });
            this.toolStripButtonRemove.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonRemove")));
            this.toolStripButtonRemove.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonRemove.Name         = "toolStripButton1";
            this.toolStripButtonRemove.Size         = new System.Drawing.Size(32, 22);
            this.toolStripButtonRemove.Text         = "Delete / Remove";
            this.toolStripButtonRemove.ToolTipText  = "Delete / Remove";
            this.toolStripButtonRemove.DisplayStyle = ToolStripItemDisplayStyle.Image;
            //
            // toolStripLabel1
            //
            this.toolStripLabel1.Enabled = true;
            this.toolStripLabel1.Name    = "toolStripLabel1";
            this.toolStripLabel1.Size    = new System.Drawing.Size(44, 22);
            this.toolStripLabel1.Text    = "";
            //
            // deleteAllToolStripMenuItem
            //
            this.deleteAllToolStripMenuItem.Name = "deleteAllToolStripMenuItem";
            this.deleteAllToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            this.deleteAllToolStripMenuItem.Text = "Delete All";
            //
            // toolStripButton2
            //
            this.toolStripButtonAdd.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonAdd")));
            this.toolStripButtonAdd.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonAdd.Name         = "toolStripButtonAdd";
            this.toolStripButtonAdd.Size         = new System.Drawing.Size(23, 22);
            this.toolStripButtonAdd.Text         = "Add / Assign";
            this.toolStripButtonAdd.ToolTipText  = "Add / Assign";
            this.toolStripButtonAdd.DisplayStyle = ToolStripItemDisplayStyle.Image;
            //
            // Form1
            //
            this.ClientSize = new System.Drawing.Size(609, 307);
            this.Name       = "Form1";
            this.Text       = "Form1";
            this.PerformLayout();
            this.ResumeLayout(false);
        }
Ejemplo n.º 41
0
        public AnalogArduinoDueToolbar(AnalogArduinoDue osc, GraphControl gc)
        {
            oscillo      = osc;
            graphControl = gc;

            this.toolStrip = new System.Windows.Forms.ToolStrip();

            this.triggerLabel = new System.Windows.Forms.ToolStripLabel();
            this.trigger      = new OnlyNumbersToolStripTextBox();

            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();

            this.sampleCountLabel = new System.Windows.Forms.ToolStripLabel();
            this.sampleCount      = new OnlyNumbersToolStripTextBox();

            //
            // toolStrip2
            //
            this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.triggerLabel,
                this.trigger,
                this.toolStripSeparator1,
                this.sampleCountLabel,
                this.sampleCount
            });
            this.toolStrip.Location = new System.Drawing.Point(3, 0);
            this.toolStrip.Name     = "toolStrip2";
            this.toolStrip.Size     = new System.Drawing.Size(243, 25);
            this.toolStrip.TabIndex = 1;
            this.toolStrip.Text     = "toolStrip2";
            //
            // triggerLabel
            //
            this.triggerLabel.Name = "triggerLabel";
            this.triggerLabel.Size = new System.Drawing.Size(42, 22);
            this.triggerLabel.Text = "trigger";
            //
            // trigger
            //
            this.trigger.Name       = "trigger";
            this.trigger.Size       = new System.Drawing.Size(50, 25);
            this.trigger.Text       = "0";
            this.trigger.textReady += new EventHandler(trigger_textReady);
            //
            // toolStripSeparator1
            //
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);

            //
            // sampleCountLabel
            //
            this.sampleCountLabel.Size = new System.Drawing.Size(54, 22);
            this.sampleCountLabel.Text = "time(ms)";

            //
            // sampleCountLabel
            //
            this.sampleCount.Size       = new System.Drawing.Size(54, 22);
            this.sampleCount.Text       = "20";
            this.sampleCount.textReady += new EventHandler(sampleCount_textReady);

            //set values
            oscillo.SetTriggerVoltage(byte.Parse(trigger.Text));
            oscillo.SetMeasuringTime(int.Parse(sampleCount.Text));
        }
 /// <summary>
 /// Required baseMethod for Designer support - do not modify
 /// the contents of this baseMethod with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Windows.Forms.ToolStripSeparator        toolStripSeparator3;
     System.Windows.Forms.ToolStripSeparator        toolStripSeparator2;
     System.Windows.Forms.ToolStripSeparator        toolStripSeparator4;
     System.Windows.Forms.ToolStripLabel            toolStripLabel2;
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TracerControl));
     this.toolStrip = new System.Windows.Forms.ToolStrip();
     this.toolStripButtonEnabled             = new System.Windows.Forms.ToolStripButton();
     this.toolStripButtonRefresh             = new System.Windows.Forms.ToolStripButton();
     this.toolStripButtonAutoUpdate          = new System.Windows.Forms.ToolStripButton();
     this.toolStripSeparator1                = new System.Windows.Forms.ToolStripSeparator();
     this.toolStripButtonAutoScroll          = new System.Windows.Forms.ToolStripButton();
     this.toolStripSeparator8                = new System.Windows.Forms.ToolStripSeparator();
     this.toolStripButtonDetails             = new System.Windows.Forms.ToolStripButton();
     this.toolStripDropDownButtonTimeDisplay = new System.Windows.Forms.ToolStripDropDownButton();
     this.toolStripSeparator11               = new System.Windows.Forms.ToolStripSeparator();
     this.toolStripButtonClear               = new System.Windows.Forms.ToolStripButton();
     this.propertyGridItem               = new System.Windows.Forms.PropertyGrid();
     this.imageList                      = new System.Windows.Forms.ImageList(this.components);
     this.labelSelected                  = new System.Windows.Forms.Label();
     this.panelSelected                  = new System.Windows.Forms.Panel();
     this.timerUpdate                    = new System.Windows.Forms.Timer(this.components);
     this.contextMenuStripItemsList      = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.markAllToolStripMenuItem       = new System.Windows.Forms.ToolStripMenuItem();
     this.ofThisMethodToolStripMenuItem  = new System.Windows.Forms.ToolStripMenuItem();
     this.ofThisClassToolStripMenuItem   = new System.Windows.Forms.ToolStripMenuItem();
     this.ofThisModuleToolStripMenuItem  = new System.Windows.Forms.ToolStripMenuItem();
     this.showAllToolStripMenuItem       = new System.Windows.Forms.ToolStripMenuItem();
     this.ofThisMethodToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
     this.ofThieClassToolStripMenuItem   = new System.Windows.Forms.ToolStripMenuItem();
     this.ofThisModuleToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
     this.panelLeft                      = new System.Windows.Forms.Panel();
     this.tabControl1                    = new System.Windows.Forms.TabControl();
     this.tabPage1 = new System.Windows.Forms.TabPage();
     this.methodTracerFilterControl1 = new CommonSupport.MethodTracerFilterControl();
     this.splitter2 = new CommonSupport.SplitterEx();
     this.typeTracerFilterControl1 = new CommonSupport.TypeTracerFilterControl();
     this.tabPage2                   = new System.Windows.Forms.TabPage();
     this.label1                     = new System.Windows.Forms.Label();
     this.panelItemMessage           = new System.Windows.Forms.Panel();
     this.textBoxSelectedItemMessage = new System.Windows.Forms.TextBox();
     this.splitterItemMessage        = new System.Windows.Forms.Splitter();
     this.toolStripFilters           = new System.Windows.Forms.ToolStrip();
     this.toolStripSeparator9        = new System.Windows.Forms.ToolStripSeparator();
     this.toolStripComboBoxPriority  = new System.Windows.Forms.ToolStripDropDownButton();
     this.toolStripSeparator5        = new System.Windows.Forms.ToolStripSeparator();
     this.listView                   = new CommonSupport.VirtualListViewEx();
     this.columnGeneral              = new System.Windows.Forms.ColumnHeader();
     this.columnMessage              = new System.Windows.Forms.ColumnHeader();
     this.splitter3                  = new CommonSupport.SplitterEx();
     this.splitterDetails            = new CommonSupport.SplitterEx();
     toolStripSeparator3             = new System.Windows.Forms.ToolStripSeparator();
     toolStripSeparator2             = new System.Windows.Forms.ToolStripSeparator();
     toolStripSeparator4             = new System.Windows.Forms.ToolStripSeparator();
     toolStripLabel2                 = new System.Windows.Forms.ToolStripLabel();
     this.toolStrip.SuspendLayout();
     this.panelSelected.SuspendLayout();
     this.contextMenuStripItemsList.SuspendLayout();
     this.panelLeft.SuspendLayout();
     this.tabControl1.SuspendLayout();
     this.tabPage1.SuspendLayout();
     this.tabPage2.SuspendLayout();
     this.panelItemMessage.SuspendLayout();
     this.toolStripFilters.SuspendLayout();
     this.SuspendLayout();
     //
     // toolStripSeparator3
     //
     toolStripSeparator3.Name = "toolStripSeparator3";
     toolStripSeparator3.Size = new System.Drawing.Size(6, 24);
     //
     // toolStripSeparator2
     //
     toolStripSeparator2.Name = "toolStripSeparator2";
     toolStripSeparator2.Size = new System.Drawing.Size(6, 24);
     //
     // toolStripSeparator4
     //
     toolStripSeparator4.Name = "toolStripSeparator4";
     toolStripSeparator4.Size = new System.Drawing.Size(6, 24);
     //
     // toolStripLabel2
     //
     toolStripLabel2.Font      = new System.Drawing.Font("Tahoma", 8.25F);
     toolStripLabel2.ForeColor = System.Drawing.SystemColors.GrayText;
     toolStripLabel2.Name      = "toolStripLabel2";
     toolStripLabel2.Size      = new System.Drawing.Size(29, 22);
     toolStripLabel2.Text      = "View";
     //
     // toolStrip
     //
     this.toolStrip.AutoSize  = false;
     this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
     this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.toolStripButtonEnabled,
         toolStripSeparator3,
         this.toolStripButtonRefresh,
         toolStripSeparator2,
         this.toolStripButtonAutoUpdate,
         this.toolStripSeparator1,
         this.toolStripButtonAutoScroll,
         this.toolStripSeparator8,
         this.toolStripButtonDetails,
         toolStripSeparator4,
         this.toolStripDropDownButtonTimeDisplay,
         this.toolStripSeparator11,
         this.toolStripButtonClear
     });
     this.toolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
     this.toolStrip.Location    = new System.Drawing.Point(0, 0);
     this.toolStrip.Name        = "toolStrip";
     this.toolStrip.Padding     = new System.Windows.Forms.Padding(0, 2, 2, 0);
     this.toolStrip.Size        = new System.Drawing.Size(1261, 26);
     this.toolStrip.TabIndex    = 5;
     this.toolStrip.Text        = "toolStrip1";
     //
     // toolStripButtonEnabled
     //
     this.toolStripButtonEnabled.Checked               = true;
     this.toolStripButtonEnabled.CheckOnClick          = true;
     this.toolStripButtonEnabled.CheckState            = System.Windows.Forms.CheckState.Checked;
     this.toolStripButtonEnabled.Image                 = ((System.Drawing.Image)(resources.GetObject("toolStripButtonEnabled.Image")));
     this.toolStripButtonEnabled.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonEnabled.Name = "toolStripButtonEnabled";
     this.toolStripButtonEnabled.Size = new System.Drawing.Size(65, 21);
     this.toolStripButtonEnabled.Text = "Enabled";
     this.toolStripButtonEnabled.CheckStateChanged += new System.EventHandler(this.toolStripButtonEnabled_CheckStateChanged);
     //
     // toolStripButtonRefresh
     //
     this.toolStripButtonRefresh.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonRefresh.Image")));
     this.toolStripButtonRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonRefresh.Name   = "toolStripButtonRefresh";
     this.toolStripButtonRefresh.Size   = new System.Drawing.Size(62, 21);
     this.toolStripButtonRefresh.Text   = "Update";
     this.toolStripButtonRefresh.Click += new System.EventHandler(this.toolStripButtonRefresh_Click);
     //
     // toolStripButtonAutoUpdate
     //
     this.toolStripButtonAutoUpdate.AutoSize              = false;
     this.toolStripButtonAutoUpdate.Checked               = true;
     this.toolStripButtonAutoUpdate.CheckOnClick          = true;
     this.toolStripButtonAutoUpdate.CheckState            = System.Windows.Forms.CheckState.Checked;
     this.toolStripButtonAutoUpdate.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonAutoUpdate.Name            = "toolStripButtonAutoUpdate";
     this.toolStripButtonAutoUpdate.Size            = new System.Drawing.Size(77, 19);
     this.toolStripButtonAutoUpdate.Text            = "Auto Update";
     this.toolStripButtonAutoUpdate.ToolTipText     = "Auto Update [Every 500ms]";
     this.toolStripButtonAutoUpdate.CheckedChanged += new System.EventHandler(this.toolStripButtonAutoUpdate_CheckedChanged);
     //
     // toolStripSeparator1
     //
     this.toolStripSeparator1.Name = "toolStripSeparator1";
     this.toolStripSeparator1.Size = new System.Drawing.Size(6, 24);
     //
     // toolStripButtonAutoScroll
     //
     this.toolStripButtonAutoScroll.AutoSize              = false;
     this.toolStripButtonAutoScroll.CheckOnClick          = true;
     this.toolStripButtonAutoScroll.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonAutoScroll.Name            = "toolStripButtonAutoScroll";
     this.toolStripButtonAutoScroll.Size            = new System.Drawing.Size(67, 19);
     this.toolStripButtonAutoScroll.Text            = "Auto Scroll";
     this.toolStripButtonAutoScroll.ToolTipText     = "Auto Scroll to End";
     this.toolStripButtonAutoScroll.CheckedChanged += new System.EventHandler(this.toolStripButtonAutoScroll_CheckedChanged);
     //
     // toolStripSeparator8
     //
     this.toolStripSeparator8.Name = "toolStripSeparator8";
     this.toolStripSeparator8.Size = new System.Drawing.Size(6, 24);
     //
     // toolStripButtonDetails
     //
     this.toolStripButtonDetails.AutoSize              = false;
     this.toolStripButtonDetails.Checked               = true;
     this.toolStripButtonDetails.CheckOnClick          = true;
     this.toolStripButtonDetails.CheckState            = System.Windows.Forms.CheckState.Checked;
     this.toolStripButtonDetails.Enabled               = false;
     this.toolStripButtonDetails.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonDetails.Name            = "toolStripButtonDetails";
     this.toolStripButtonDetails.Size            = new System.Drawing.Size(47, 19);
     this.toolStripButtonDetails.Text            = "Details";
     this.toolStripButtonDetails.ToolTipText     = "Show Selected Trace Item Details";
     this.toolStripButtonDetails.CheckedChanged += new System.EventHandler(this.toolStripButtonDetails_CheckedChanged);
     //
     // toolStripDropDownButtonTimeDisplay
     //
     this.toolStripDropDownButtonTimeDisplay.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.toolStripDropDownButtonTimeDisplay.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripDropDownButtonTimeDisplay.Name = "toolStripDropDownButtonTimeDisplay";
     this.toolStripDropDownButtonTimeDisplay.Size = new System.Drawing.Size(79, 21);
     this.toolStripDropDownButtonTimeDisplay.Text = "Time Display";
     this.toolStripDropDownButtonTimeDisplay.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripDropDownButtonTimeDisplay_DropDownItemClicked);
     //
     // toolStripSeparator11
     //
     this.toolStripSeparator11.Name = "toolStripSeparator11";
     this.toolStripSeparator11.Size = new System.Drawing.Size(6, 24);
     //
     // toolStripButtonClear
     //
     this.toolStripButtonClear.Alignment             = System.Windows.Forms.ToolStripItemAlignment.Right;
     this.toolStripButtonClear.Image                 = ((System.Drawing.Image)(resources.GetObject("toolStripButtonClear.Image")));
     this.toolStripButtonClear.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.toolStripButtonClear.Name   = "toolStripButtonClear";
     this.toolStripButtonClear.Size   = new System.Drawing.Size(52, 21);
     this.toolStripButtonClear.Text   = "Clear";
     this.toolStripButtonClear.Click += new System.EventHandler(this.toolStripButtonClear_Click);
     //
     // propertyGridItem
     //
     this.propertyGridItem.Dock           = System.Windows.Forms.DockStyle.Fill;
     this.propertyGridItem.HelpVisible    = false;
     this.propertyGridItem.Location       = new System.Drawing.Point(0, 13);
     this.propertyGridItem.Name           = "propertyGridItem";
     this.propertyGridItem.PropertySort   = System.Windows.Forms.PropertySort.Alphabetical;
     this.propertyGridItem.Size           = new System.Drawing.Size(1261, 134);
     this.propertyGridItem.TabIndex       = 5;
     this.propertyGridItem.ToolbarVisible = false;
     //
     // imageList
     //
     this.imageList.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
     this.imageList.TransparentColor = System.Drawing.Color.Transparent;
     this.imageList.Images.SetKeyName(0, "dot.png");
     this.imageList.Images.SetKeyName(1, "application_connection.png");
     this.imageList.Images.SetKeyName(2, "ERROR.PNG");
     this.imageList.Images.SetKeyName(3, "navigate_right.png");
     this.imageList.Images.SetKeyName(4, "navigate_left.png");
     this.imageList.Images.SetKeyName(5, "WARNING.PNG");
     this.imageList.Images.SetKeyName(6, "CONSOLE.PNG");
     //
     // labelSelected
     //
     this.labelSelected.AutoSize = true;
     this.labelSelected.Dock     = System.Windows.Forms.DockStyle.Top;
     this.labelSelected.Location = new System.Drawing.Point(0, 0);
     this.labelSelected.Name     = "labelSelected";
     this.labelSelected.Size     = new System.Drawing.Size(107, 13);
     this.labelSelected.TabIndex = 17;
     this.labelSelected.Text     = "Selected Item Details";
     //
     // panelSelected
     //
     this.panelSelected.Controls.Add(this.propertyGridItem);
     this.panelSelected.Controls.Add(this.labelSelected);
     this.panelSelected.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.panelSelected.Location = new System.Drawing.Point(0, 528);
     this.panelSelected.Name     = "panelSelected";
     this.panelSelected.Size     = new System.Drawing.Size(1261, 147);
     this.panelSelected.TabIndex = 18;
     //
     // timerUpdate
     //
     this.timerUpdate.Enabled  = true;
     this.timerUpdate.Interval = 500;
     this.timerUpdate.Tick    += new System.EventHandler(this.timerUpdate_Tick);
     //
     // contextMenuStripItemsList
     //
     this.contextMenuStripItemsList.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.markAllToolStripMenuItem,
         this.showAllToolStripMenuItem
     });
     this.contextMenuStripItemsList.Name = "contextMenuStripItemsList";
     this.contextMenuStripItemsList.Size = new System.Drawing.Size(126, 48);
     //
     // markAllToolStripMenuItem
     //
     this.markAllToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.ofThisMethodToolStripMenuItem,
         this.ofThisClassToolStripMenuItem,
         this.ofThisModuleToolStripMenuItem
     });
     this.markAllToolStripMenuItem.Name = "markAllToolStripMenuItem";
     this.markAllToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
     this.markAllToolStripMenuItem.Text = "Mark All";
     //
     // ofThisMethodToolStripMenuItem
     //
     this.ofThisMethodToolStripMenuItem.Name   = "ofThisMethodToolStripMenuItem";
     this.ofThisMethodToolStripMenuItem.Size   = new System.Drawing.Size(154, 22);
     this.ofThisMethodToolStripMenuItem.Text   = "of this Method";
     this.ofThisMethodToolStripMenuItem.Click += new System.EventHandler(this.markAllFromThisMethodToolStripMenuItem_Click);
     //
     // ofThisClassToolStripMenuItem
     //
     this.ofThisClassToolStripMenuItem.Name   = "ofThisClassToolStripMenuItem";
     this.ofThisClassToolStripMenuItem.Size   = new System.Drawing.Size(154, 22);
     this.ofThisClassToolStripMenuItem.Text   = "of this Class";
     this.ofThisClassToolStripMenuItem.Click += new System.EventHandler(this.markAllFromThisClassToolStripMenuItem_Click);
     //
     // ofThisModuleToolStripMenuItem
     //
     this.ofThisModuleToolStripMenuItem.Name   = "ofThisModuleToolStripMenuItem";
     this.ofThisModuleToolStripMenuItem.Size   = new System.Drawing.Size(154, 22);
     this.ofThisModuleToolStripMenuItem.Text   = "of this Module";
     this.ofThisModuleToolStripMenuItem.Click += new System.EventHandler(this.markAllFromThisModuleToolStripMenuItem_Click);
     //
     // showAllToolStripMenuItem
     //
     this.showAllToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.ofThisMethodToolStripMenuItem1,
         this.ofThieClassToolStripMenuItem,
         this.ofThisModuleToolStripMenuItem1
     });
     this.showAllToolStripMenuItem.Name = "showAllToolStripMenuItem";
     this.showAllToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
     this.showAllToolStripMenuItem.Text = "Show All";
     //
     // ofThisMethodToolStripMenuItem1
     //
     this.ofThisMethodToolStripMenuItem1.Name   = "ofThisMethodToolStripMenuItem1";
     this.ofThisMethodToolStripMenuItem1.Size   = new System.Drawing.Size(154, 22);
     this.ofThisMethodToolStripMenuItem1.Text   = "of this Method";
     this.ofThisMethodToolStripMenuItem1.Click += new System.EventHandler(this.ofThisMethodToolStripMenuItem1_Click);
     //
     // ofThieClassToolStripMenuItem
     //
     this.ofThieClassToolStripMenuItem.Name   = "ofThieClassToolStripMenuItem";
     this.ofThieClassToolStripMenuItem.Size   = new System.Drawing.Size(154, 22);
     this.ofThieClassToolStripMenuItem.Text   = "of this Class";
     this.ofThieClassToolStripMenuItem.Click += new System.EventHandler(this.ofThisClassToolStripMenuItem_Click);
     //
     // ofThisModuleToolStripMenuItem1
     //
     this.ofThisModuleToolStripMenuItem1.Name   = "ofThisModuleToolStripMenuItem1";
     this.ofThisModuleToolStripMenuItem1.Size   = new System.Drawing.Size(154, 22);
     this.ofThisModuleToolStripMenuItem1.Text   = "of this Module";
     this.ofThisModuleToolStripMenuItem1.Click += new System.EventHandler(this.ofThisModuleToolStripMenuItem1_Click);
     //
     // panelLeft
     //
     this.panelLeft.Controls.Add(this.tabControl1);
     this.panelLeft.Dock     = System.Windows.Forms.DockStyle.Left;
     this.panelLeft.Location = new System.Drawing.Point(0, 51);
     this.panelLeft.Name     = "panelLeft";
     this.panelLeft.Size     = new System.Drawing.Size(231, 469);
     this.panelLeft.TabIndex = 20;
     //
     // tabControl1
     //
     this.tabControl1.Controls.Add(this.tabPage1);
     this.tabControl1.Controls.Add(this.tabPage2);
     this.tabControl1.Dock          = System.Windows.Forms.DockStyle.Fill;
     this.tabControl1.Location      = new System.Drawing.Point(0, 0);
     this.tabControl1.Name          = "tabControl1";
     this.tabControl1.SelectedIndex = 0;
     this.tabControl1.Size          = new System.Drawing.Size(231, 469);
     this.tabControl1.TabIndex      = 24;
     //
     // tabPage1
     //
     this.tabPage1.Controls.Add(this.methodTracerFilterControl1);
     this.tabPage1.Controls.Add(this.splitter2);
     this.tabPage1.Controls.Add(this.typeTracerFilterControl1);
     this.tabPage1.Location = new System.Drawing.Point(4, 22);
     this.tabPage1.Name     = "tabPage1";
     this.tabPage1.Padding  = new System.Windows.Forms.Padding(3);
     this.tabPage1.Size     = new System.Drawing.Size(223, 443);
     this.tabPage1.TabIndex = 0;
     this.tabPage1.Text     = "View";
     this.tabPage1.UseVisualStyleBackColor = true;
     //
     // methodTracerFilterControl1
     //
     this.methodTracerFilterControl1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.methodTracerFilterControl1.Filter   = null;
     this.methodTracerFilterControl1.Location = new System.Drawing.Point(3, 186);
     this.methodTracerFilterControl1.Name     = "methodTracerFilterControl1";
     this.methodTracerFilterControl1.Size     = new System.Drawing.Size(217, 254);
     this.methodTracerFilterControl1.TabIndex = 14;
     //
     // splitter2
     //
     this.splitter2.Dock     = System.Windows.Forms.DockStyle.Top;
     this.splitter2.Location = new System.Drawing.Point(3, 180);
     this.splitter2.Name     = "splitter2";
     this.splitter2.Size     = new System.Drawing.Size(217, 6);
     this.splitter2.TabIndex = 21;
     this.splitter2.TabStop  = false;
     //
     // typeTracerFilterControl1
     //
     this.typeTracerFilterControl1.Dock     = System.Windows.Forms.DockStyle.Top;
     this.typeTracerFilterControl1.Filter   = null;
     this.typeTracerFilterControl1.Font     = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
     this.typeTracerFilterControl1.Location = new System.Drawing.Point(3, 3);
     this.typeTracerFilterControl1.Name     = "typeTracerFilterControl1";
     this.typeTracerFilterControl1.Size     = new System.Drawing.Size(217, 177);
     this.typeTracerFilterControl1.TabIndex = 19;
     //
     // tabPage2
     //
     this.tabPage2.Controls.Add(this.label1);
     this.tabPage2.Location = new System.Drawing.Point(4, 22);
     this.tabPage2.Name     = "tabPage2";
     this.tabPage2.Padding  = new System.Windows.Forms.Padding(3);
     this.tabPage2.Size     = new System.Drawing.Size(223, 443);
     this.tabPage2.TabIndex = 1;
     this.tabPage2.Text     = "Input";
     this.tabPage2.UseVisualStyleBackColor = true;
     //
     // label1
     //
     this.label1.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.label1.Location = new System.Drawing.Point(3, 399);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(217, 41);
     this.label1.TabIndex = 1;
     this.label1.Text     = "Input filters will block entries as they try to enter the system, as opposed to v" +
                            "iew filters that only filter what is visible.";
     //
     // panelItemMessage
     //
     this.panelItemMessage.Controls.Add(this.textBoxSelectedItemMessage);
     this.panelItemMessage.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.panelItemMessage.Location = new System.Drawing.Point(239, 476);
     this.panelItemMessage.Name     = "panelItemMessage";
     this.panelItemMessage.Size     = new System.Drawing.Size(1022, 44);
     this.panelItemMessage.TabIndex = 22;
     //
     // textBoxSelectedItemMessage
     //
     this.textBoxSelectedItemMessage.BackColor   = System.Drawing.SystemColors.Window;
     this.textBoxSelectedItemMessage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.textBoxSelectedItemMessage.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.textBoxSelectedItemMessage.Font        = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
     this.textBoxSelectedItemMessage.Location    = new System.Drawing.Point(0, 0);
     this.textBoxSelectedItemMessage.Multiline   = true;
     this.textBoxSelectedItemMessage.Name        = "textBoxSelectedItemMessage";
     this.textBoxSelectedItemMessage.ReadOnly    = true;
     this.textBoxSelectedItemMessage.Size        = new System.Drawing.Size(1022, 44);
     this.textBoxSelectedItemMessage.TabIndex    = 1;
     this.textBoxSelectedItemMessage.Text        = "Selected item details.";
     //
     // splitterItemMessage
     //
     this.splitterItemMessage.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.splitterItemMessage.Location = new System.Drawing.Point(239, 472);
     this.splitterItemMessage.Name     = "splitterItemMessage";
     this.splitterItemMessage.Size     = new System.Drawing.Size(1022, 4);
     this.splitterItemMessage.TabIndex = 23;
     this.splitterItemMessage.TabStop  = false;
     //
     // toolStripFilters
     //
     this.toolStripFilters.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         toolStripLabel2,
         this.toolStripSeparator9,
         this.toolStripComboBoxPriority,
         this.toolStripSeparator5
     });
     this.toolStripFilters.Location = new System.Drawing.Point(0, 26);
     this.toolStripFilters.Name     = "toolStripFilters";
     this.toolStripFilters.Size     = new System.Drawing.Size(1261, 25);
     this.toolStripFilters.TabIndex = 24;
     this.toolStripFilters.Text     = "toolStrip1";
     //
     // toolStripSeparator9
     //
     this.toolStripSeparator9.Name = "toolStripSeparator9";
     this.toolStripSeparator9.Size = new System.Drawing.Size(6, 25);
     //
     // toolStripComboBoxPriority
     //
     this.toolStripComboBoxPriority.Name = "toolStripComboBoxPriority";
     this.toolStripComboBoxPriority.Size = new System.Drawing.Size(54, 22);
     this.toolStripComboBoxPriority.Text = "Priority";
     //
     // toolStripSeparator5
     //
     this.toolStripSeparator5.Name = "toolStripSeparator5";
     this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
     //
     // listView
     //
     this.listView.AutoScroll      = true;
     this.listView.AutoScrollSlack = 3;
     this.listView.BorderStyle     = System.Windows.Forms.BorderStyle.FixedSingle;
     this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
         this.columnGeneral,
         this.columnMessage
     });
     this.listView.ContextMenuStrip = this.contextMenuStripItemsList;
     this.listView.Dock             = System.Windows.Forms.DockStyle.Fill;
     this.listView.Font             = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
     this.listView.FullRowSelect    = true;
     this.listView.HeaderStyle      = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
     this.listView.HideSelection    = false;
     this.listView.Location         = new System.Drawing.Point(239, 51);
     this.listView.Name             = "listView";
     this.listView.ShowGroups       = false;
     this.listView.Size             = new System.Drawing.Size(1022, 421);
     this.listView.SmallImageList   = this.imageList;
     this.listView.TabIndex         = 15;
     this.listView.UseCompatibleStateImageBehavior = false;
     this.listView.View                  = System.Windows.Forms.View.Details;
     this.listView.VirtualMode           = true;
     this.listView.SelectedIndexChanged += new System.EventHandler(this.listViewMain_SelectedIndexChanged);
     this.listView.RetrieveVirtualItem  += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.listView_RetrieveVirtualItem);
     //
     // columnGeneral
     //
     this.columnGeneral.Text = "";
     //
     // columnMessage
     //
     this.columnMessage.Text = "Message";
     //
     // splitter3
     //
     this.splitter3.Location = new System.Drawing.Point(231, 51);
     this.splitter3.Name     = "splitter3";
     this.splitter3.Size     = new System.Drawing.Size(8, 469);
     this.splitter3.TabIndex = 21;
     this.splitter3.TabStop  = false;
     //
     // splitterDetails
     //
     this.splitterDetails.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.splitterDetails.Location = new System.Drawing.Point(0, 520);
     this.splitterDetails.Name     = "splitterDetails";
     this.splitterDetails.Size     = new System.Drawing.Size(1261, 8);
     this.splitterDetails.TabIndex = 16;
     this.splitterDetails.TabStop  = false;
     //
     // TracerControl
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.Controls.Add(this.listView);
     this.Controls.Add(this.splitterItemMessage);
     this.Controls.Add(this.panelItemMessage);
     this.Controls.Add(this.splitter3);
     this.Controls.Add(this.panelLeft);
     this.Controls.Add(this.splitterDetails);
     this.Controls.Add(this.panelSelected);
     this.Controls.Add(this.toolStripFilters);
     this.Controls.Add(this.toolStrip);
     this.DoubleBuffered = true;
     this.Name           = "TracerControl";
     this.Size           = new System.Drawing.Size(1261, 675);
     this.Load          += new System.EventHandler(this.TracerControl_Load);
     this.toolStrip.ResumeLayout(false);
     this.toolStrip.PerformLayout();
     this.panelSelected.ResumeLayout(false);
     this.panelSelected.PerformLayout();
     this.contextMenuStripItemsList.ResumeLayout(false);
     this.panelLeft.ResumeLayout(false);
     this.tabControl1.ResumeLayout(false);
     this.tabPage1.ResumeLayout(false);
     this.tabPage2.ResumeLayout(false);
     this.panelItemMessage.ResumeLayout(false);
     this.panelItemMessage.PerformLayout();
     this.toolStripFilters.ResumeLayout(false);
     this.toolStripFilters.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Ejemplo n.º 43
0
        private void AddPersonToPanel(ref Panel panel1, Person person)
        {
            ToolStrip       toolStrip1       = new System.Windows.Forms.ToolStrip();
            ToolStripButton toolStripButton1 = new System.Windows.Forms.ToolStripButton();
            ToolStripLabel  toolStripLabel1  = new System.Windows.Forms.ToolStripLabel();
            Label           emailLabel       = new System.Windows.Forms.Label();
            GroupBox        photoGroupBox    = new System.Windows.Forms.GroupBox();
            PictureBox      photoPictureBox  = new System.Windows.Forms.PictureBox();

            panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            panel1.Controls.Add(emailLabel);
            panel1.Controls.Add(photoGroupBox);
            panel1.Controls.Add(toolStrip1);
            panel1.Location = new System.Drawing.Point(3, 3);
            panel1.Name     = "panel1";
            panel1.Size     = new System.Drawing.Size(186, 25);
            panel1.TabIndex = 0;
            panel1.Tag      = person;
            //
            // toolStrip1
            //
            toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                toolStripButton1,
                toolStripLabel1
            });
            toolStrip1.Location    = new System.Drawing.Point(0, 0);
            toolStrip1.Name        = "toolStrip1";
            toolStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
            toolStrip1.Size        = new System.Drawing.Size(182, 25);
            toolStrip1.TabIndex    = 0;
            toolStrip1.Text        = "toolStrip1";
            //
            // toolStripButton1
            //
            toolStripButton1.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            toolStripButton1.Image                 = global::DynamicPeople.Properties.Resources.plus;
            toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
            toolStripButton1.Name   = "toolStripButton1";
            toolStripButton1.Size   = new System.Drawing.Size(23, 22);
            toolStripButton1.Text   = "toolStripButton1";
            toolStripButton1.Click += new EventHandler(ToolStripButton1__Click);
            toolStripButton1.Tag    = panel1;
            //
            // toolStripLabel1
            //
            toolStripLabel1.AutoSize    = false;
            toolStripLabel1.IsLink      = true;
            toolStripLabel1.Name        = "toolStripLabel1";
            toolStripLabel1.RightToLeft = System.Windows.Forms.RightToLeft.No;
            toolStripLabel1.Size        = new System.Drawing.Size(140, 22);
            toolStripLabel1.Text        = person.name;
            toolStripLabel1.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
            toolStripLabel1.Click      += new EventHandler(ToolStripLabel1__Click);
            toolStripLabel1.Tag         = panel1;
            //
            // emailLabel
            //
            emailLabel.Location = new System.Drawing.Point(12, 28);
            emailLabel.Name     = "emailLabel";
            emailLabel.Size     = new System.Drawing.Size(156, 23);
            emailLabel.TabIndex = 1;
            emailLabel.Text     = person.email;
            //
            // photoGroupBox
            //
            photoGroupBox.Controls.Add(photoPictureBox);
            photoGroupBox.Location = new System.Drawing.Point(3, 57);
            photoGroupBox.Margin   = new System.Windows.Forms.Padding(8, 7, 8, 7);
            photoGroupBox.Name     = "photoGroupBox";
            photoGroupBox.Padding  = new System.Windows.Forms.Padding(8, 7, 8, 7);
            photoGroupBox.Size     = new System.Drawing.Size(101, 79);
            photoGroupBox.TabIndex = 52;
            photoGroupBox.TabStop  = false;
            photoGroupBox.Text     = "Photo";
            //
            // photoPictureBox
            //
            photoPictureBox.BackColor     = System.Drawing.Color.LightGray;
            photoPictureBox.Dock          = System.Windows.Forms.DockStyle.Fill;
            photoPictureBox.Location      = new System.Drawing.Point(8, 20);
            photoPictureBox.Margin        = new System.Windows.Forms.Padding(8, 7, 8, 7);
            photoPictureBox.Name          = "photoPictureBox";
            photoPictureBox.Size          = new System.Drawing.Size(85, 52);
            photoPictureBox.SizeMode      = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            photoPictureBox.TabIndex      = 0;
            photoPictureBox.TabStop       = false;
            photoPictureBox.ImageLocation = person.photoPath;
        }
Ejemplo n.º 44
0
        public virtual void AddStandardItems()
        {
            //
            // Create items
            //

            MoveFirstItem    = new ToolStripButton();
            MovePreviousItem = new ToolStripButton();
            MoveNextItem     = new ToolStripButton();
            MoveLastItem     = new ToolStripButton();
            PositionItem     = new ToolStripTextBox();
            CountItem        = new ToolStripLabel();
            AddNewItem       = new ToolStripButton();
            DeleteItem       = new ToolStripButton();

            ToolStripSeparator separator1 = new ToolStripSeparator();
            ToolStripSeparator separator2 = new ToolStripSeparator();
            ToolStripSeparator separator3 = new ToolStripSeparator();

            //
            // Set up strings
            //

            // Default to lowercase for null name, because C# dev is more likely to create controls programmatically than
            // vb dev.
            char ch = string.IsNullOrEmpty(Name) || char.IsLower(Name[0]) ? 'b' : 'B';

            MoveFirstItem.Name    = ch + "indingNavigatorMoveFirstItem";
            MovePreviousItem.Name = ch + "indingNavigatorMovePreviousItem";
            MoveNextItem.Name     = ch + "indingNavigatorMoveNextItem";
            MoveLastItem.Name     = ch + "indingNavigatorMoveLastItem";
            PositionItem.Name     = ch + "indingNavigatorPositionItem";
            CountItem.Name        = ch + "indingNavigatorCountItem";
            AddNewItem.Name       = ch + "indingNavigatorAddNewItem";
            DeleteItem.Name       = ch + "indingNavigatorDeleteItem";
            separator1.Name       = ch + "indingNavigatorSeparator";
            separator2.Name       = ch + "indingNavigatorSeparator";
            separator3.Name       = ch + "indingNavigatorSeparator";

            MoveFirstItem.Text    = SR.BindingNavigatorMoveFirstItemText;
            MovePreviousItem.Text = SR.BindingNavigatorMovePreviousItemText;
            MoveNextItem.Text     = SR.BindingNavigatorMoveNextItemText;
            MoveLastItem.Text     = SR.BindingNavigatorMoveLastItemText;
            AddNewItem.Text       = SR.BindingNavigatorAddNewItemText;
            DeleteItem.Text       = SR.BindingNavigatorDeleteItemText;

            CountItem.ToolTipText    = SR.BindingNavigatorCountItemTip;
            PositionItem.ToolTipText = SR.BindingNavigatorPositionItemTip;
            CountItem.AutoToolTip    = false;
            PositionItem.AutoToolTip = false;

            PositionItem.AccessibleName = SR.BindingNavigatorPositionAccessibleName;
            //
            // Set up images
            //

            Bitmap moveFirstImage    = DpiHelper.GetBitmapFromIcon(typeof(BindingNavigator), "BindingNavigator.MoveFirst");
            Bitmap movePreviousImage = DpiHelper.GetBitmapFromIcon(typeof(BindingNavigator), "BindingNavigator.MovePrevious");
            Bitmap moveNextImage     = DpiHelper.GetBitmapFromIcon(typeof(BindingNavigator), "BindingNavigator.MoveNext");
            Bitmap moveLastImage     = DpiHelper.GetBitmapFromIcon(typeof(BindingNavigator), "BindingNavigator.MoveLast");
            Bitmap addNewImage       = DpiHelper.GetBitmapFromIcon(typeof(BindingNavigator), "BindingNavigator.AddNew");
            Bitmap deleteImage       = DpiHelper.GetBitmapFromIcon(typeof(BindingNavigator), "BindingNavigator.Delete");

            MoveFirstItem.Image    = moveFirstImage;
            MovePreviousItem.Image = movePreviousImage;
            MoveNextItem.Image     = moveNextImage;
            MoveLastItem.Image     = moveLastImage;
            AddNewItem.Image       = addNewImage;
            DeleteItem.Image       = deleteImage;

            MoveFirstItem.RightToLeftAutoMirrorImage    = true;
            MovePreviousItem.RightToLeftAutoMirrorImage = true;
            MoveNextItem.RightToLeftAutoMirrorImage     = true;
            MoveLastItem.RightToLeftAutoMirrorImage     = true;
            AddNewItem.RightToLeftAutoMirrorImage       = true;
            DeleteItem.RightToLeftAutoMirrorImage       = true;

            MoveFirstItem.DisplayStyle    = ToolStripItemDisplayStyle.Image;
            MovePreviousItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            MoveNextItem.DisplayStyle     = ToolStripItemDisplayStyle.Image;
            MoveLastItem.DisplayStyle     = ToolStripItemDisplayStyle.Image;
            AddNewItem.DisplayStyle       = ToolStripItemDisplayStyle.Image;
            DeleteItem.DisplayStyle       = ToolStripItemDisplayStyle.Image;

            //
            // Set other random properties
            //
            PositionItem.AutoSize = false;
            PositionItem.Width    = 50;

            //
            // Add items to strip
            //

            Items.AddRange(new ToolStripItem[] {
                MoveFirstItem,
                MovePreviousItem,
                separator1,
                PositionItem,
                CountItem,
                separator2,
                MoveNextItem,
                MoveLastItem,
                separator3,
                AddNewItem,
                DeleteItem,
            });
        }
Ejemplo n.º 45
0
 private void UpdateControl(System.Windows.Forms.ToolStripLabel ctrl, string text, Color Mycolor)
 {
     ctrl.Text      = text;
     ctrl.BackColor = Mycolor;
 }
Ejemplo n.º 46
0
        public CommonToolStrip(VizForm vf, Acquirer acq, GraphControl gc, Oscillo os)
        {
            vizForm      = vf;
            m_acquirer   = acq;
            graphControl = gc;
            m_Oscillo    = os;

            this.timeLabel = new System.Windows.Forms.ToolStripLabel();
            this.clone     = new System.Windows.Forms.ToolStripButton();
            this.play      = new System.Windows.Forms.ToolStripButton();
            this.time      = new System.Windows.Forms.ToolStripComboBox();


            this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
            this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.timeLabel,
                this.time,
                this.clone,
                this.play
            });
            this.toolStrip.Location = new System.Drawing.Point(0, 0);
            this.toolStrip.Name     = "toolStrip2";
            this.toolStrip.Size     = new System.Drawing.Size(497, 25);
            this.toolStrip.TabIndex = 1;
            this.toolStrip.Text     = "toolStrip2";

            //
            // time
            //
            this.time.Name = "time";
            this.time.Size = new System.Drawing.Size(50, 25);
            this.time.SelectedIndexChanged += new System.EventHandler(this.time_SelectedIndexChanged);

            //
            // clone
            //
            this.clone.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
            this.clone.Image                 = null;// ((System.Drawing.Image)(resources.GetObject("clone.Image")));
            this.clone.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.clone.Name   = "clone";
            this.clone.Size   = new System.Drawing.Size(42, 22);
            this.clone.Text   = "Clone";
            this.clone.Click += new System.EventHandler(this.clone_Click);

            //
            // play
            //
            if (m_acquirer != null)
            {
                this.play.CheckOnClick          = true;
                this.play.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
                this.play.Image                 = global::XOscillo.Properties.Resources.play;
                this.play.ImageTransparentColor = System.Drawing.Color.Magenta;
                this.play.Margin                = new System.Windows.Forms.Padding(1);
                this.play.Name            = "play";
                this.play.Size            = new System.Drawing.Size(23, 23);
                this.play.Text            = "toolStripButton2";
                this.play.CheckedChanged += new System.EventHandler(this.play_CheckedChanged);
                this.play.Checked         = true;
            }

            this.toolStrip.Items.Add(new System.Windows.Forms.ToolStripSeparator());

            //
            // Channels
            //
            if (m_Oscillo != null)
            {
                for (int i = 0; i < m_Oscillo.GetNumberOfSupportedChannels(); i++)
                {
                    CheckBox cb = new CheckBox();
                    cb.Text               = "Ch" + i;
                    cb.Tag                = i;
                    cb.Appearance         = Appearance.Button;
                    cb.CheckStateChanged += ((s, ex) =>
                    {
                        m_Oscillo.SetChannel((int)cb.Tag, cb.CheckState == CheckState.Checked);
                        SetAcquirerStatus(); // since the above doesnt fire a CheckStateChanged
                    });
                    ToolStripControlHost host = new ToolStripControlHost(cb);

                    if (i == 0)
                    {
                        cb.Checked = true;
                    }

                    this.toolStrip.Items.Add(host);
                }
            }
        }
Ejemplo n.º 47
0
        public override void AddStandardItems()
        {
            //
            // Create items
            //

            MoveFirstItem    = new System.Windows.Forms.ToolStripButton();
            MovePreviousItem = new System.Windows.Forms.ToolStripButton();
            MoveNextItem     = new System.Windows.Forms.ToolStripButton();
            MoveLastItem     = new System.Windows.Forms.ToolStripButton();
            PositionItem     = new System.Windows.Forms.ToolStripTextBox();
            CountItem        = new System.Windows.Forms.ToolStripLabel();
            AddNewItem       = new System.Windows.Forms.ToolStripButton();
            DeleteItem       = new System.Windows.Forms.ToolStripButton();
            SaveItem         = new System.Windows.Forms.ToolStripButton();

            ToolStripSeparator separator1 = new System.Windows.Forms.ToolStripSeparator();
            ToolStripSeparator separator2 = new System.Windows.Forms.ToolStripSeparator();
            ToolStripSeparator separator3 = new System.Windows.Forms.ToolStripSeparator();

            //
            // Set up strings
            //

            // Hacky workaround for VSWhidbey 407243
            // Default to lowercase for null name, because C# dev is more likely to create controls programmatically than
            // vb dev.
            char ch = string.IsNullOrEmpty(Name) || char.IsLower(Name[0]) ? 'b' : 'B';

            MoveFirstItem.Name    = ch + "indingNavigatorMoveFirstItem";
            MovePreviousItem.Name = ch + "indingNavigatorMovePreviousItem";
            MoveNextItem.Name     = ch + "indingNavigatorMoveNextItem";
            MoveLastItem.Name     = ch + "indingNavigatorMoveLastItem";
            PositionItem.Name     = ch + "indingNavigatorPositionItem";
            CountItem.Name        = ch + "indingNavigatorCountItem";
            AddNewItem.Name       = ch + "indingNavigatorAddNewItem";
            DeleteItem.Name       = ch + "indingNavigatorDeleteItem";
            SaveItem.Name         = ch + "indingNavigatorSaveItem";
            separator1.Name       = ch + "indingNavigatorSeparator";
            separator2.Name       = ch + "indingNavigatorSeparator";
            separator3.Name       = ch + "indingNavigatorSeparator";

            MoveFirstItem.Text    = "Iet uz pirmo";
            MovePreviousItem.Text = "Iet uz iepriekšējo";
            MoveNextItem.Text     = "Iet uz nākošo";
            MoveLastItem.Text     = "Iet uz pēdējo";
            AddNewItem.Text       = "Jauns";
            DeleteItem.Text       = "Dzēst";
            SaveItem.Text         = "Saglabāt";

            CountItem.ToolTipText    = "Ierakstu skaits";
            PositionItem.ToolTipText = "Pašreizējā pozīcija";
            CountItem.AutoToolTip    = false;
            PositionItem.AutoToolTip = false;

            //
            // Set up images
            //

            Bitmap moveFirstImage    = new Bitmap(typeof(BindingNavigator), "BindingNavigator.MoveFirst.bmp");
            Bitmap movePreviousImage = new Bitmap(typeof(BindingNavigator), "BindingNavigator.MovePrevious.bmp");
            Bitmap moveNextImage     = new Bitmap(typeof(BindingNavigator), "BindingNavigator.MoveNext.bmp");
            Bitmap moveLastImage     = new Bitmap(typeof(BindingNavigator), "BindingNavigator.MoveLast.bmp");
            Bitmap addNewImage       = new Bitmap(typeof(BindingNavigator), "BindingNavigator.AddNew.bmp");
            Bitmap deleteImage       = new Bitmap(typeof(BindingNavigator), "BindingNavigator.Delete.bmp");

            GetSaveImages();

            moveFirstImage.MakeTransparent(System.Drawing.Color.Magenta);
            movePreviousImage.MakeTransparent(System.Drawing.Color.Magenta);
            moveNextImage.MakeTransparent(System.Drawing.Color.Magenta);
            moveLastImage.MakeTransparent(System.Drawing.Color.Magenta);
            addNewImage.MakeTransparent(System.Drawing.Color.Magenta);
            deleteImage.MakeTransparent(System.Drawing.Color.Magenta);

            MoveFirstItem.Image    = moveFirstImage;
            MovePreviousItem.Image = movePreviousImage;
            MoveNextItem.Image     = moveNextImage;
            MoveLastItem.Image     = moveLastImage;
            AddNewItem.Image       = addNewImage;
            DeleteItem.Image       = deleteImage;
            SaveItem.Image         = SaveBlue;

            MoveFirstItem.RightToLeftAutoMirrorImage    = true;
            MovePreviousItem.RightToLeftAutoMirrorImage = true;
            MoveNextItem.RightToLeftAutoMirrorImage     = true;
            MoveLastItem.RightToLeftAutoMirrorImage     = true;
            AddNewItem.RightToLeftAutoMirrorImage       = true;
            DeleteItem.RightToLeftAutoMirrorImage       = true;

            MoveFirstItem.DisplayStyle    = ToolStripItemDisplayStyle.Image;
            MovePreviousItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            MoveNextItem.DisplayStyle     = ToolStripItemDisplayStyle.Image;
            MoveLastItem.DisplayStyle     = ToolStripItemDisplayStyle.Image;
            AddNewItem.DisplayStyle       = ToolStripItemDisplayStyle.ImageAndText;
            DeleteItem.DisplayStyle       = ToolStripItemDisplayStyle.ImageAndText;

            //
            // Set other random properties
            //
            PositionItem.AutoSize = false;
            PositionItem.Width    = 50;

            //
            // Add items to strip
            //

            Items.AddRange(new ToolStripItem[] {
                MoveFirstItem,
                MovePreviousItem,
                separator1,
                PositionItem,
                CountItem,
                separator2,
                MoveNextItem,
                MoveLastItem,
                separator3,
                AddNewItem,
                DeleteItem,
                SaveItem
            });
        }
Ejemplo n.º 48
0
 private void InitializeComponent()
 {
     System.Windows.Forms.ToolStripLabel     toolStripLabel2;
     System.Windows.Forms.ToolStripSeparator m_TS_Separator;
     this.m_TSL_ServerUrl       = new System.Windows.Forms.ToolStripLabel();
     this.m_TSCB_ServerUrl      = new System.Windows.Forms.ToolStripComboBox();
     this.m_TSB_Add             = new System.Windows.Forms.ToolStripButton();
     this.m_TSB_SearchNetwork   = new System.Windows.Forms.ToolStripButton();
     this.m_TSDDB_Specification = new System.Windows.Forms.ToolStripDropDownButton();
     this.m_TSB_ClearHistory    = new System.Windows.Forms.ToolStripButton();
     toolStripLabel2            = new System.Windows.Forms.ToolStripLabel();
     m_TS_Separator             = new System.Windows.Forms.ToolStripSeparator();
     this.SuspendLayout();
     //
     // toolStripLabel2
     //
     toolStripLabel2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     toolStripLabel2.Name         = "toolStripLabel2";
     toolStripLabel2.Size         = new System.Drawing.Size(37, 13);
     toolStripLabel2.Text         = "Prefer";
     toolStripLabel2.TextAlign    = System.Drawing.ContentAlignment.MiddleLeft;
     toolStripLabel2.ToolTipText  = "Force connection using the preferred specification. ";
     //
     // m_TS_Separator
     //
     m_TS_Separator.Name = "m_TS_Separator";
     m_TS_Separator.Size = new System.Drawing.Size(6, 6);
     //
     // m_TSL_ServerUrl
     //
     this.m_TSL_ServerUrl.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.m_TSL_ServerUrl.Name         = "m_TSL_ServerUrl";
     this.m_TSL_ServerUrl.Size         = new System.Drawing.Size(39, 22);
     this.m_TSL_ServerUrl.Text         = "Server";
     this.m_TSL_ServerUrl.TextAlign    = System.Drawing.ContentAlignment.MiddleLeft;
     this.m_TSL_ServerUrl.ToolTipText  = "Server URL";
     //
     // m_TSCB_ServerUrl
     //
     this.m_TSCB_ServerUrl.AutoCompleteMode   = System.Windows.Forms.AutoCompleteMode.Suggest;
     this.m_TSCB_ServerUrl.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.HistoryList;
     this.m_TSCB_ServerUrl.AutoToolTip        = true;
     this.m_TSCB_ServerUrl.Name        = "m_TSCB_ServerUrl";
     this.m_TSCB_ServerUrl.Size        = new System.Drawing.Size(500, 21);
     this.m_TSCB_ServerUrl.ToolTipText = "Server URL";
     //
     // m_TSB_Add
     //
     this.m_TSB_Add.AutoToolTip           = false;
     this.m_TSB_Add.Image                 = global::CAS.Lib.OPCClientControlsLib.ImagesResources.serwer_opc_48;
     this.m_TSB_Add.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.m_TSB_Add.Name        = "m_TSB_Add";
     this.m_TSB_Add.Size        = new System.Drawing.Size(46, 20);
     this.m_TSB_Add.Text        = "Add";
     this.m_TSB_Add.ToolTipText = "Add server to the session panel";
     //
     // m_TSB_SearchNetwork
     //
     this.m_TSB_SearchNetwork.AutoToolTip           = false;
     this.m_TSB_SearchNetwork.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.m_TSB_SearchNetwork.Image                 = global::CAS.Lib.OPCClientControlsLib.ImagesResources.Network_ConnectTo;
     this.m_TSB_SearchNetwork.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.m_TSB_SearchNetwork.Name        = "m_TSB_SearchNetwork";
     this.m_TSB_SearchNetwork.Size        = new System.Drawing.Size(23, 20);
     this.m_TSB_SearchNetwork.Text        = "Search";
     this.m_TSB_SearchNetwork.ToolTipText = "Browse network";
     //
     // m_TSDDB_Specification
     //
     this.m_TSDDB_Specification.AutoSize              = false;
     this.m_TSDDB_Specification.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.m_TSDDB_Specification.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.m_TSDDB_Specification.Name        = "m_TSDDB_Specification";
     this.m_TSDDB_Specification.Size        = new System.Drawing.Size(150, 20);
     this.m_TSDDB_Specification.TextAlign   = System.Drawing.ContentAlignment.MiddleLeft;
     this.m_TSDDB_Specification.ToolTipText = "Force connection using the preferred specification. ";
     //
     // m_TSB_ClearHistory
     //
     this.m_TSB_ClearHistory.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.m_TSB_ClearHistory.Image                 = global::CAS.Lib.OPCClientControlsLib.ImagesResources.delete;
     this.m_TSB_ClearHistory.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.m_TSB_ClearHistory.Name        = "m_TSB_ClearHistory";
     this.m_TSB_ClearHistory.Size        = new System.Drawing.Size(23, 20);
     this.m_TSB_ClearHistory.Text        = "Clear";
     this.m_TSB_ClearHistory.ToolTipText = "Clear list of known URLs";
     //
     // SelectServerStrip
     //
     this.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.m_TSL_ServerUrl,
         this.m_TSCB_ServerUrl,
         this.m_TSB_ClearHistory,
         toolStripLabel2,
         this.m_TSDDB_Specification,
         this.m_TSB_Add,
         m_TS_Separator,
         this.m_TSB_SearchNetwork
     });
     this.ResumeLayout(false);
 }
Ejemplo n.º 49
0
 public ToolStripLabelLayout(ToolStripLabel owner) : base(owner)
 {
     this.owner = owner;
 }
Ejemplo n.º 50
0
 public ToolStripLabelAccessibleObject(ToolStripLabel ownerItem) : base(ownerItem)
 {
     this.ownerItem = ownerItem;
 }
Ejemplo n.º 51
0
        internal static bool UpdateDisplay(IDataObject dataObject, TSMenuItem dataDisplay, TSLabel imageDataDisplay = null)
        {
            bool hasData = false;

            try {
                hasData                 = true;
                dataDisplay.Visible     = true;
                dataDisplay.Enabled     = false;
                dataDisplay.ToolTipText = string.Empty;
                dataDisplay.Text        = string.Empty;
                if (dataDisplay.HasDropDownItems)
                {
                    if (imageDataDisplay == null)
                    {
                        HashSet <TSItem> pendingRemoveItems = new HashSet <TSItem>();
                        foreach (TSItem item in dataDisplay.DropDownItems)
                        {
                            if (item is TSLabel)
                            {
                                imageDataDisplay = item as TSLabel;
                                break;
                            }
                            else if (item.Tag is string)
                            {
                                pendingRemoveItems.Add(item);
                            }
                        }
                        foreach (TSItem item in pendingRemoveItems)
                        {
                            if (item.Image != null)
                            {
                                item.Image.Dispose();
                                item.Image = null;
                            }
                            dataDisplay.DropDownItems.Remove(item);
                        }
                    }
                    else
                    {
                        foreach (TSItem item in dataDisplay.DropDownItems)
                        {
                            if (item.Image != null)
                            {
                                item.Image.Dispose();
                                item.Image = null;
                            }
                        }
                        dataDisplay.DropDownItems.Clear();
                    }
                }
                if (imageDataDisplay != null)
                {
                    imageDataDisplay.Visible = false;
                    if (imageDataDisplay.BackgroundImage != null)
                    {
                        imageDataDisplay.BackgroundImage.Dispose();
                        imageDataDisplay.BackgroundImage = null;
                    }
                }
                if (dataObject.GetDataPresent(DataFormats.UnicodeText, true))
                {
                    string data          = dataObject.GetData(DataFormats.UnicodeText, true) as string;
                    string formattedData = data.Replace('\r', ' ').Replace('\n', ' ').Replace('\t', ' ');
                    if (formattedData.Length > 30)
                    {
                        dataDisplay.Text = string.Format(Language.TextData, formattedData.Substring(0, 30));
                    }
                    else
                    {
                        dataDisplay.Text = formattedData;
                    }
                    if (data.Length > 512)
                    {
                        dataDisplay.ToolTipText = string.Format(Language.TextData, data.Substring(0, 512));
                    }
                    else
                    {
                        dataDisplay.ToolTipText = data;
                    }
                }
                else if (dataObject.GetDataPresent(DataFormats.Bitmap))
                {
                    Image  data    = dataObject.GetData(DataFormats.Bitmap) as Image;
                    string imgMeta = string.Format(Language.ImageData, data.Width, data.Height);
                    if (imageDataDisplay == null)
                    {
                        imageDataDisplay = new TSLabel {
                            Visible  = false,
                            AutoSize = false,
                            BackgroundImageLayout = ImageLayout.Zoom
                        };
                        dataDisplay.DropDownItems.Add(imageDataDisplay);
                    }
                    imageDataDisplay.Visible         = true;
                    imageDataDisplay.BackgroundImage = data;
                    imageDataDisplay.Width           = Math.Min(250, Math.Max(data.Width, data.Height));
                    imageDataDisplay.Height          = data.Width > data.Height ?
                                                       (int)((double)imageDataDisplay.Width * data.Height / data.Width) : imageDataDisplay.Width;
                    dataDisplay.Text = imgMeta;
                }
                else if (dataObject.GetDataPresent(DataFormats.FileDrop))
                {
                    string[] data = dataObject.GetData(DataFormats.FileDrop) as string[];
                    dataDisplay.Text    = string.Format(Language.FileData, data.Length);
                    dataDisplay.Enabled = true;
                    foreach (string fileName in data)
                    {
                        Bitmap icon = null;
                        try {
                            using (Icon rawIcon = Native.GetSmallIcon(fileName))
                                icon = rawIcon.ToBitmap();
                        } catch (Exception) { }
                        TSMenuItem item = new TSMenuItem(Path.GetFileName(fileName))
                        {
                            Tag   = fileName,
                            Image = icon,
                        };
                        item.Click += HandleFileClick;
                        dataDisplay.DropDownItems.Add(item);
                    }
                }
                else if (dataObject.GetDataPresent(DataFormats.WaveAudio))
                {
                    using (Stream data = dataObject.GetData(DataFormats.WaveAudio) as Stream)
                        dataDisplay.Text = string.Format(Language.AudioData, data.Length);
                }
                else
                {
                    string[] formats = dataObject.GetFormats(false);
                    if (formats.Length > 0)
                    {
                        dataDisplay.Text = string.Join(", ", formats);
                    }
                    else
                    {
                        dataDisplay.Visible = false;
                        hasData             = false;
                    }
                }
            } catch (Exception) { }
            return(hasData);
        }
Ejemplo n.º 52
0
 private void InitializeComponent()
 {
     this.StatusPanel  = new System.Windows.Forms.Panel();
     this.Status       = new System.Windows.Forms.ToolStrip();
     this.ButtonCall   = new System.Windows.Forms.ToolStripButton();
     this.Description  = new System.Windows.Forms.ToolStripLabel();
     this.Grid         = new System.Windows.Forms.DataGridView();
     this.ResizeLeft   = new System.Windows.Forms.PictureBox();
     this.ButtonClose  = new System.Windows.Forms.ToolStripButton();
     this.ButtonSelect = new System.Windows.Forms.ToolStripButton();
     this.ResizeRight  = new System.Windows.Forms.PictureBox();
     this.StatusPanel.SuspendLayout();
     this.Status.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Grid)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ResizeLeft)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ResizeRight)).BeginInit();
     this.SuspendLayout();
     //
     // StatusPanel
     //
     this.StatusPanel.BackColor = System.Drawing.SystemColors.ControlDark;
     this.StatusPanel.Controls.Add(this.ResizeLeft);
     this.StatusPanel.Controls.Add(this.ResizeRight);
     this.StatusPanel.Controls.Add(this.Status);
     this.StatusPanel.Dock     = System.Windows.Forms.DockStyle.Bottom;
     this.StatusPanel.Location = new System.Drawing.Point(0, 156);
     this.StatusPanel.Name     = "StatusPanel";
     this.StatusPanel.Size     = new System.Drawing.Size(309, 16);
     this.StatusPanel.TabIndex = 2;
     //
     // Status
     //
     this.Status.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.Status.AutoSize         = false;
     this.Status.BackColor        = Color.FromArgb(192, 192, 192);
     this.Status.Dock             = System.Windows.Forms.DockStyle.None;
     this.Status.GripMargin       = new System.Windows.Forms.Padding(0);
     this.Status.GripStyle        = System.Windows.Forms.ToolStripGripStyle.Visible;
     this.Status.ImageScalingSize = new System.Drawing.Size(13, 13);
     this.Status.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.ButtonClose,
         this.ButtonSelect,
         this.ButtonCall,
         this.Description
     });
     this.Status.Location    = new System.Drawing.Point(11, 1);
     this.Status.Name        = "Status";
     this.Status.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
     this.Status.Size        = new System.Drawing.Size(290, 16);
     this.Status.Stretch     = true;
     this.Status.TabIndex    = 0;
     this.Status.Text        = "toolStrip1";
     //
     // ButtonCall
     //
     this.ButtonCall.AutoSize              = false;
     this.ButtonCall.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     this.ButtonCall.Font                  = new System.Drawing.Font("Tahoma", 6F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
     this.ButtonCall.ImageAlign            = System.Drawing.ContentAlignment.MiddleRight;
     this.ButtonCall.ImageScaling          = System.Windows.Forms.ToolStripItemImageScaling.None;
     this.ButtonCall.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.ButtonCall.Margin                = new System.Windows.Forms.Padding(0);
     this.ButtonCall.Name                  = "ButtonCall";
     this.ButtonCall.Size                  = new System.Drawing.Size(13, 13);
     this.ButtonCall.Text                  = "...";
     this.ButtonCall.ToolTipText           = "Открыть форму";
     this.ButtonCall.Click                += new System.EventHandler(this.ButtonCall_Click);
     //
     // Description
     //
     this.Description.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
     this.Description.Name      = "Description";
     this.Description.Size      = new System.Drawing.Size(0, 16);
     //
     // Grid
     //
     this.Grid.AllowUserToAddRows          = false;
     this.Grid.AllowUserToDeleteRows       = false;
     this.Grid.AllowUserToResizeRows       = false;
     this.Grid.BorderStyle                 = System.Windows.Forms.BorderStyle.None;
     this.Grid.ColumnHeadersBorderStyle    = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
     this.Grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.Grid.Dock                    = System.Windows.Forms.DockStyle.Fill;
     this.Grid.Location                = new System.Drawing.Point(0, 0);
     this.Grid.MultiSelect             = false;
     this.Grid.Name                    = "Grid";
     this.Grid.ReadOnly                = true;
     this.Grid.RowHeadersVisible       = false;
     this.Grid.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
     this.Grid.RowTemplate.Height      = 18;
     this.Grid.SelectionMode           = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.Grid.ShowCellErrors          = false;
     this.Grid.ShowCellToolTips        = false;
     this.Grid.ShowEditingIcon         = false;
     this.Grid.ShowRowErrors           = false;
     this.Grid.Size                    = new System.Drawing.Size(309, 156);
     this.Grid.TabIndex                = 1;
     this.Grid.VirtualMode             = true;
     this.Grid.KeyDown                += new System.Windows.Forms.KeyEventHandler(this.Grid_KeyDown);
     this.Grid.SelectionChanged       += new System.EventHandler(this.Grid_SelectionChanged);
     //
     // ResizeLeft
     //
     this.ResizeLeft.Anchor      = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.ResizeLeft.Image       = global::BOF.Properties.Resources.resize_left;
     this.ResizeLeft.Location    = new System.Drawing.Point(0, 0);
     this.ResizeLeft.Name        = "ResizeLeft";
     this.ResizeLeft.Size        = new System.Drawing.Size(12, 16);
     this.ResizeLeft.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.ResizeLeft.TabIndex    = 0;
     this.ResizeLeft.TabStop     = false;
     this.ResizeLeft.MouseDown  += new MouseEventHandler(Resize_MouseDown);
     this.ResizeLeft.MouseUp    += new MouseEventHandler(Resize_MouseUp);
     this.ResizeLeft.MouseMove  += new MouseEventHandler(Resize_MouseMove);
     this.ResizeLeft.MouseHover += new EventHandler(ResizeLeft_MouseHover);
     this.ResizeLeft.MouseLeave += new EventHandler(Resize_MouseLeave);
     //
     // ButtonClose
     //
     this.ButtonClose.AutoSize              = false;
     this.ButtonClose.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.ButtonClose.Image                 = global::BOF.Properties.Resources.XIcon1.ToBitmap();
     this.ButtonClose.ImageScaling          = System.Windows.Forms.ToolStripItemImageScaling.None;
     this.ButtonClose.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.ButtonClose.Name        = "ButtonClose";
     this.ButtonClose.Size        = new System.Drawing.Size(13, 13);
     this.ButtonClose.ToolTipText = "Закрыть список";
     this.ButtonClose.Click      += new System.EventHandler(this.ButtonClose_Click);
     //
     // ButtonSelect
     //
     this.ButtonSelect.AutoSize              = false;
     this.ButtonSelect.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
     this.ButtonSelect.Image                 = global::BOF.Properties.Resources.Select.ToBitmap();
     this.ButtonSelect.ImageScaling          = System.Windows.Forms.ToolStripItemImageScaling.None;
     this.ButtonSelect.ImageTransparentColor = System.Drawing.Color.Magenta;
     this.ButtonSelect.Name        = "ButtonSelect";
     this.ButtonSelect.Size        = new System.Drawing.Size(13, 13);
     this.ButtonSelect.ToolTipText = "Выбрать значение";
     this.ButtonSelect.Click      += new System.EventHandler(this.ButtonSelect_Click);
     //
     // ResizeRight
     //
     this.ResizeRight.Anchor      = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.ResizeRight.Image       = global::BOF.Properties.Resources.resize_right;
     this.ResizeRight.Location    = new System.Drawing.Point(297, 0);
     this.ResizeRight.Name        = "ResizeRight";
     this.ResizeRight.Size        = new System.Drawing.Size(12, 16);
     this.ResizeRight.TabIndex    = 1;
     this.ResizeRight.TabStop     = false;
     this.ResizeRight.MouseDown  += new MouseEventHandler(Resize_MouseDown);
     this.ResizeRight.MouseUp    += new MouseEventHandler(Resize_MouseUp);
     this.ResizeRight.MouseMove  += new MouseEventHandler(Resize_MouseMove);
     this.ResizeRight.MouseHover += new EventHandler(ResizeRight_MouseHover);
     this.ResizeRight.MouseLeave += new EventHandler(Resize_MouseLeave);
     //
     // ChooserDropDown
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.Controls.Add(this.Grid);
     this.Controls.Add(this.StatusPanel);
     this.VisibleChanged += new EventHandler(ChooserDropDown_VisibleChanged);
     this.DoubleBuffered  = true;
     this.Name            = "ChooserDropDown";
     this.Size            = new System.Drawing.Size(309, 170);
     this.StatusPanel.ResumeLayout(false);
     this.Status.ResumeLayout(false);
     this.Status.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Grid)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ResizeLeft)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ResizeRight)).EndInit();
     this.ResumeLayout(false);
 }
Ejemplo n.º 53
0
        public void TestLoadPageNumber01()
        {
            using (OPCSampleGrpConfigStart oPCSampleGrpConfigStart = (OPCSampleGrpConfigStart)ViewManager.GetInstance().GetView(OPCSampleGrpConfigStart.OPCSAMPLEGRPCONFIGSTARTFRM))
            {
                Accessor    oPCSampleGrpConfigStartAccessor = ReflectionAccessor.Wrap(oPCSampleGrpConfigStart);
                IModel      model      = new OPCSampleGrpConfig.Model.OPCSampleGrpConfigStartModel();
                IController controller = new OPCSampleGrpConfig.Controller.OPCSampleGrpConfigStartController();
                oPCSampleGrpConfigStart.ViewType = OPCSampleGrpConfigStart.OPCSAMPLEGRPCONFIGSTARTFRM;
                controller.Attach(model, oPCSampleGrpConfigStart);
                oPCSampleGrpConfigStartAccessor.Call("AttachListener", controller);
                oPCSampleGrpConfigStartAccessor.Call("InitializeIntervalConfigDataGridView");
                oPCSampleGrpConfigStartAccessor.Call("InitializeIntervalConfigDataGridView");
                oPCSampleGrpConfigStartAccessor.SetField("m_totalGrpCount", (int)10);
                oPCSampleGrpConfigStartAccessor.SetField("m_upperIndex", (int)10);
                oPCSampleGrpConfigStartAccessor.SetField("m_lowerIndex", (int)0);
                //System.Collections.Generic.List<EtyOPCSampleGroup> OPCSampleGrpList = DAO.Trending.OPCSampleGroupDAO.GetInstance().GetAllOPCGrpsByPage(0, 10);
                System.Collections.Generic.List <EtyDataLogDPGroupTrend> OPCSampleGrpList = new System.Collections.Generic.List <EtyDataLogDPGroupTrend>();
                EtyDataLogDPGroupTrend e1 = new EtyDataLogDPGroupTrend();
                EtyDataLogDPGroupTrend e2 = new EtyDataLogDPGroupTrend();
                EtyDataLogDPGroupTrend e3 = new EtyDataLogDPGroupTrend();
                EtyDataLogDPGroupTrend e4 = new EtyDataLogDPGroupTrend();
                EtyDataLogDPGroupTrend e5 = new EtyDataLogDPGroupTrend();
                EtyDataLogDPGroupTrend e6 = new EtyDataLogDPGroupTrend();
                EtyDataLogDPGroupTrend e7 = new EtyDataLogDPGroupTrend();
                EtyDataLogDPGroupTrend e8 = new EtyDataLogDPGroupTrend();
                EtyDataLogDPGroupTrend e9 = new EtyDataLogDPGroupTrend();
                e9.Disabled = true;
                EtyDataLogDPGroupTrend e10 = new EtyDataLogDPGroupTrend();

                OPCSampleGrpList.Add(e1);
                OPCSampleGrpList.Add(e2);
                OPCSampleGrpList.Add(e3);
                OPCSampleGrpList.Add(e4);
                OPCSampleGrpList.Add(e5);
                OPCSampleGrpList.Add(e6);
                OPCSampleGrpList.Add(e7);
                OPCSampleGrpList.Add(e8);
                OPCSampleGrpList.Add(e9);
                OPCSampleGrpList.Add(e10);

                oPCSampleGrpConfigStartAccessor.Call("LoadGridData", OPCSampleGrpList);


                //Test Procedure Call
                oPCSampleGrpConfigStartAccessor.Call("LoadPageNumber");
                //Post condition Check
                int totalRec = (int)oPCSampleGrpConfigStartAccessor.GetField("m_totalGrpCount");
                System.Windows.Forms.ToolStripLabel totalPgeNum = (System.Windows.Forms.ToolStripLabel)oPCSampleGrpConfigStartAccessor.GetField("totalIntervalConfigDataGridView");
                int TotalPageNumber = 1;
                TotalPageNumber = totalRec / 8;
                if (totalRec % 8 != 0)
                {
                    TotalPageNumber++;
                }
                System.Windows.Forms.NumericUpDown PageUpdm = (System.Windows.Forms.NumericUpDown)oPCSampleGrpConfigStartAccessor.GetField("pageNumIntervalConfigDataGridView");
                //System.Windows.Forms.DataGridView intervalDataGrid = (System.Windows.Forms.DataGridView)oPCSampleGrpConfigStartAccessor.GetField("intervalConfigDataGridView");
                Assert.AreEqual(TotalPageNumber.ToString(), totalPgeNum.Text);
                Assert.AreEqual(TotalPageNumber, PageUpdm.Maximum);

                //test2
                oPCSampleGrpConfigStartAccessor.SetField("m_totalGrpCount", (int)8);
                //Test Procedure Call
                oPCSampleGrpConfigStartAccessor.Call("LoadPageNumber");

                //test3
                oPCSampleGrpConfigStartAccessor.SetField("m_totalGrpCount", (int)0);
                //Test Procedure Call
                oPCSampleGrpConfigStartAccessor.Call("LoadPageNumber");
            }
        }
Ejemplo n.º 54
0
        private void init()
        {
            this.txbPage  = new System.Windows.Forms.ToolStripTextBox();
            this.lblPage  = new System.Windows.Forms.ToolStripLabel();
            this.lblInfo  = new System.Windows.Forms.ToolStripLabel();
            this.btnFirst = new System.Windows.Forms.ToolStripButton();
            this.btnPre   = new System.Windows.Forms.ToolStripButton();
            this.btnNext  = new System.Windows.Forms.ToolStripButton();
            this.btnLast  = new System.Windows.Forms.ToolStripButton();

            //
            // toolStrip1
            //
            this.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.btnFirst,
                this.btnPre,
                this.txbPage,
                this.lblPage,
                this.btnNext,
                this.btnLast,
                this.lblInfo
            });

            //
            // txbPage
            //
            this.txbPage.AutoSize = false;
            this.txbPage.Name     = "txbPage";
            this.txbPage.Size     = new System.Drawing.Size(30, 23);
            //
            // lblPage
            //
            this.lblPage.Name = "lblPage";
            this.lblPage.Size = new System.Drawing.Size(27, 23);
            this.lblPage.Text = "/20";
            //
            // lblInfo
            //
            this.lblInfo.Name = "lblInfo";
            this.lblInfo.Size = new System.Drawing.Size(12, 23);
            this.lblInfo.Text = " ";
            //
            // btnFirst
            //
            this.btnFirst.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.btnFirst.Image                 = global::RIPP.Lib.Properties.Resources.resultset_first;
            this.btnFirst.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnFirst.Name        = "btnFirst";
            this.btnFirst.Size        = new System.Drawing.Size(23, 23);
            this.btnFirst.ToolTipText = "首页";
            this.btnFirst.Click      += new EventHandler(btnFirst_Click);
            //
            // btnPre
            //
            this.btnPre.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.btnPre.Image                 = global::RIPP.Lib.Properties.Resources.resultset_previous;
            this.btnPre.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnPre.Name        = "btnPre";
            this.btnPre.Size        = new System.Drawing.Size(23, 23);
            this.btnPre.ToolTipText = "上一页";
            this.btnPre.Click      += new EventHandler(btnPre_Click);
            //
            // btnNext
            //
            this.btnNext.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.btnNext.Image                 = global::RIPP.Lib.Properties.Resources.resultset_next;
            this.btnNext.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnNext.Name   = "btnNext";
            this.btnNext.Size   = new System.Drawing.Size(23, 23);
            this.btnNext.Text   = "下页";
            this.btnNext.Click += new EventHandler(btnNext_Click);
            //
            // btnLast
            //
            this.btnLast.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.btnLast.Image                 = global::RIPP.Lib.Properties.Resources.resultset_last;
            this.btnLast.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnLast.Name        = "btnLast";
            this.btnLast.Size        = new System.Drawing.Size(23, 23);
            this.btnLast.ToolTipText = "最后一页";
            this.btnLast.Click      += new EventHandler(btnLast_Click);
        }
Ejemplo n.º 55
0
        //private ImageList imageList1;

        private void InitializeComponent()
        {
            // panelTabPage = new System.Windows.Forms.Panel();
            panelPageNavigation      = new System.Windows.Forms.Panel();
            toolStripPageNavigation  = new System.Windows.Forms.ToolStrip();
            toolStripButtonAdd       = new System.Windows.Forms.ToolStripButton();
            toolStripButtonDelete    = new System.Windows.Forms.ToolStripButton();
            toolStripSeparator1      = new System.Windows.Forms.ToolStripSeparator();
            toolStripButtonFirst     = new System.Windows.Forms.ToolStripButton();
            toolStripButtonPrevious  = new System.Windows.Forms.ToolStripButton();
            toolStripLabelPageNumber = new System.Windows.Forms.ToolStripLabel();
            toolStripButtonNext      = new System.Windows.Forms.ToolStripButton();
            toolStripButtonLast      = new System.Windows.Forms.ToolStripButton();
            // drawarea = new DrawArea(this);
            // panelTabPage.SuspendLayout();
            panelPageNavigation.SuspendLayout();
            toolStripPageNavigation.SuspendLayout();
            SuspendLayout();
            //
            // panelTabPage
            //
            //this.panelTabPage.AutoScroll = true;
            ////panelTabPage.Controls.Add(drawarea);
            //this.panelTabPage.Dock = System.Windows.Forms.DockStyle.Fill;
            //this.panelTabPage.Location = new System.Drawing.Point(0, 0);
            //this.panelTabPage.Name = "panelTabPage";
            //this.panelTabPage.Size = new System.Drawing.Size(550, 167);
            //this.panelTabPage.TabIndex = 0;
            //
            // panelPageNavigation
            //
            this.panelPageNavigation.BackColor = System.Drawing.Color.Gainsboro;
            this.panelPageNavigation.Controls.Add(this.toolStripPageNavigation);
            this.panelPageNavigation.Dock     = System.Windows.Forms.DockStyle.Bottom;
            this.panelPageNavigation.Location = new System.Drawing.Point(0, 167);
            this.panelPageNavigation.Name     = "panelPageNavigation";
            this.panelPageNavigation.Size     = new System.Drawing.Size(550, 20);
            this.panelPageNavigation.TabIndex = 0;
            //
            // toolStripPageNavigation
            //
            this.toolStripPageNavigation.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                this.toolStripButtonAdd,
                this.toolStripButtonDelete,
                this.toolStripSeparator1,
                this.toolStripButtonFirst,
                this.toolStripButtonPrevious,
                this.toolStripLabelPageNumber,
                this.toolStripButtonNext,
                this.toolStripButtonLast
            });
            this.toolStripPageNavigation.Location     = new System.Drawing.Point(0, 0);
            this.toolStripPageNavigation.Name         = "toolStripPageNavigation";
            this.toolStripPageNavigation.Size         = new System.Drawing.Size(550, 25);
            this.toolStripPageNavigation.TabIndex     = 2;
            this.toolStripPageNavigation.Text         = "toolStripPageNavigation";
            this.toolStripPageNavigation.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripPageNavigation_ItemClicked);
            //
            // toolStripButtonAdd
            //
            this.toolStripButtonAdd.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButtonAdd.Image                 = DCS.Properties.Resources._03;
            this.toolStripButtonAdd.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonAdd.Margin                = new System.Windows.Forms.Padding(0);
            this.toolStripButtonAdd.Name = "toolStripButtonAdd";
            this.toolStripButtonAdd.Size = new System.Drawing.Size(23, 25);
            this.toolStripButtonAdd.Text = "Add";
            //
            // toolStripButtonNew
            //
            this.toolStripButtonDelete.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButtonDelete.Image                 = DCS.Properties.Resources._01;
            this.toolStripButtonDelete.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonDelete.Margin                = new System.Windows.Forms.Padding(0);
            this.toolStripButtonDelete.Name = "toolStripButtonDelete";
            this.toolStripButtonDelete.Size = new System.Drawing.Size(23, 25);
            this.toolStripButtonDelete.Text = "Delete";
            //
            // toolStripSeparator1
            //
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
            //
            // toolStripButtonFirst
            //
            this.toolStripButtonFirst.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButtonFirst.Image                 = DCS.Properties.Resources._38;
            this.toolStripButtonFirst.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonFirst.Margin                = new System.Windows.Forms.Padding(0);
            this.toolStripButtonFirst.Name = "toolStripButtonFirst";
            this.toolStripButtonFirst.Size = new System.Drawing.Size(23, 25);
            this.toolStripButtonFirst.Text = "First";
            //
            // toolStripButtonPrevious
            //
            this.toolStripButtonPrevious.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButtonPrevious.Image                 = DCS.Properties.Resources._44;
            this.toolStripButtonPrevious.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonPrevious.Margin                = new System.Windows.Forms.Padding(0);
            this.toolStripButtonPrevious.Name = "toolStripButtonPrevious";
            this.toolStripButtonPrevious.Size = new System.Drawing.Size(23, 25);
            this.toolStripButtonPrevious.Text = "Previous";
            //
            // toolStripLabelPageNumber
            //
            this.toolStripLabelPageNumber.Margin = new System.Windows.Forms.Padding(0);
            this.toolStripLabelPageNumber.Name   = "toolStripLabelPageNumber";
            this.toolStripLabelPageNumber.Size   = new System.Drawing.Size(13, 40);
            this.toolStripLabelPageNumber.Text   = "1";
            //
            // toolStripButtonNext
            //
            this.toolStripButtonNext.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButtonNext.Image                 = DCS.Properties.Resources._43;
            this.toolStripButtonNext.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonNext.Margin                = new System.Windows.Forms.Padding(0);
            this.toolStripButtonNext.Name = "toolStripButtonNext";
            this.toolStripButtonNext.Size = new System.Drawing.Size(23, 25);
            this.toolStripButtonNext.Text = "Next";
            //
            // toolStripButtonLast
            //
            this.toolStripButtonLast.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButtonLast.Image                 = DCS.Properties.Resources._37;
            this.toolStripButtonLast.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButtonLast.Margin                = new System.Windows.Forms.Padding(0);
            this.toolStripButtonLast.Name = "toolStripButtonLast";
            this.toolStripButtonLast.Size = new System.Drawing.Size(23, 25);
            this.toolStripButtonLast.Text = "Last";
            //
            // TabFBDPageControl
            //
            // this.Controls.Add(this.panelTabPage);
            this.Controls.Add(this.panelPageNavigation);
            //  this.ImageIndex = 0;
            this.Location = new System.Drawing.Point(4, 23);
            this.Size     = new System.Drawing.Size(550, 187);
            this.Text     = "tabPage";

            //this.panelTabPage.ResumeLayout(false);
            //this.panelTabPage.PerformLayout();
            this.panelPageNavigation.ResumeLayout(false);
            this.panelPageNavigation.PerformLayout();
            this.toolStripPageNavigation.ResumeLayout(false);
            this.toolStripPageNavigation.PerformLayout();

            this.ResumeLayout(false);
        }
Ejemplo n.º 56
0
        public override void AddStandardItems()
        {
            //
            // Create items
            //

            MoveFirstItem = new System.Windows.Forms.ToolStripButton();

            MovePreviousItem = new System.Windows.Forms.ToolStripButton();

            MoveNextItem = new System.Windows.Forms.ToolStripButton();

            MoveLastItem = new System.Windows.Forms.ToolStripButton();

            PositionItem = new System.Windows.Forms.ToolStripTextBox();
            CountItem    = new System.Windows.Forms.ToolStripLabel();
            AddNewItem   = new System.Windows.Forms.ToolStripButton();
            DeleteItem   = new System.Windows.Forms.ToolStripButton();
            PageSizeItem = new System.Windows.Forms.ToolStripTextBox();

            ToolStripSeparator separator1 = new System.Windows.Forms.ToolStripSeparator();
            ToolStripSeparator separator2 = new System.Windows.Forms.ToolStripSeparator();
            ToolStripSeparator separator3 = new System.Windows.Forms.ToolStripSeparator();

            //
            // Set up strings
            //

            // Hacky workaround for VSWhidbey 407243
            // Default to lowercase for null name, because C# dev is more likely to create controls programmatically than
            // vb dev.
            GripStyle = ToolStripGripStyle.Hidden;

            char ch = string.IsNullOrEmpty(Name) || char.IsLower(Name[0]) ? 'b' : 'B';

            MoveFirstItem.Name    = ch + "indingNavigatorMoveFirstItem";
            MovePreviousItem.Name = ch + "indingNavigatorMovePreviousItem";
            MoveNextItem.Name     = ch + "indingNavigatorMoveNextItem";
            MoveLastItem.Name     = ch + "indingNavigatorMoveLastItem";
            PositionItem.Name     = ch + "indingNavigatorPositionItem";
            CountItem.Name        = ch + "indingNavigatorCountItem";
            PageSizeItem.Name     = ch + "indingNavigatorPageSizeItem";
            AddNewItem.Name       = ch + "indingNavigatorAddNewItem";
            DeleteItem.Name       = ch + "indingNavigatorDeleteItem";
            separator1.Name       = ch + "indingNavigatorSeparator";
            separator2.Name       = ch + "indingNavigatorSeparator";
            separator3.Name       = ch + "indingNavigatorSeparator";


            MoveFirstItem.Text    = "第一页";
            MovePreviousItem.Text = "上一页";
            MoveNextItem.Text     = "下一页";
            MoveLastItem.Text     = "最后一页";

            AddNewItem.Text = "添加";


            CountItem.ToolTipText       = "总页数";
            PositionItem.ToolTipText    = "当前页";
            PageSizeItem.ToolTipText    = "每页显示数量";
            CountItem.AutoToolTip       = false;
            PositionItem.AutoToolTip    = false;
            PageSizeItem.AutoToolTip    = false;
            PageSizeItem.Text           = "100";
            PositionItem.AccessibleName = "BindingNavigatorPositionAccessibleName";
            //
            // Set up images
            //

            Bitmap moveFirstImage    = new Bitmap(typeof(BindingNavigator), "BindingNavigator.MoveFirst.bmp");
            Bitmap movePreviousImage = new Bitmap(typeof(BindingNavigator), "BindingNavigator.MovePrevious.bmp");
            Bitmap moveNextImage     = new Bitmap(typeof(BindingNavigator), "BindingNavigator.MoveNext.bmp");
            Bitmap moveLastImage     = new Bitmap(typeof(BindingNavigator), "BindingNavigator.MoveLast.bmp");
            Bitmap addNewImage       = new Bitmap(typeof(BindingNavigator), "BindingNavigator.AddNew.bmp");
            Bitmap deleteImage       = new Bitmap(typeof(BindingNavigator), "BindingNavigator.Delete.bmp");

            moveFirstImage.MakeTransparent(System.Drawing.Color.Magenta);
            movePreviousImage.MakeTransparent(System.Drawing.Color.Magenta);
            moveNextImage.MakeTransparent(System.Drawing.Color.Magenta);
            moveLastImage.MakeTransparent(System.Drawing.Color.Magenta);
            addNewImage.MakeTransparent(System.Drawing.Color.Magenta);
            deleteImage.MakeTransparent(System.Drawing.Color.Magenta);

            MoveFirstItem.Image    = moveFirstImage;
            MovePreviousItem.Image = movePreviousImage;
            MoveNextItem.Image     = moveNextImage;
            MoveLastItem.Image     = moveLastImage;
            AddNewItem.Image       = addNewImage;
            DeleteItem.Image       = deleteImage;

            MoveFirstItem.RightToLeftAutoMirrorImage    = true;
            MovePreviousItem.RightToLeftAutoMirrorImage = true;
            MoveNextItem.RightToLeftAutoMirrorImage     = true;
            MoveLastItem.RightToLeftAutoMirrorImage     = true;
            AddNewItem.RightToLeftAutoMirrorImage       = true;
            DeleteItem.RightToLeftAutoMirrorImage       = true;

            MoveFirstItem.DisplayStyle    = ToolStripItemDisplayStyle.Image;
            MovePreviousItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            MoveNextItem.DisplayStyle     = ToolStripItemDisplayStyle.Image;
            MoveLastItem.DisplayStyle     = ToolStripItemDisplayStyle.Image;
            AddNewItem.DisplayStyle       = ToolStripItemDisplayStyle.Image;
            DeleteItem.DisplayStyle       = ToolStripItemDisplayStyle.Image;

            //
            // Set other random properties
            //
            PositionItem.AutoSize = false;
            PositionItem.Width    = 50;

            PageSizeItem.AutoSize = false;
            PageSizeItem.Width    = 50;
            //
            // Add items to strip
            //

            Items.AddRange(new[] {
                MoveFirstItem,
                MovePreviousItem,
                separator1,
                PositionItem,
                CountItem,
                PageSizeItem,
                separator2,
                MoveNextItem,
                MoveLastItem,
                separator3,
                AddNewItem
            });
        }