public static void ShowSingleInstance(SearchAndReplaceMode searchAndReplaceMode)
		{
			if (Instance == null) {
				Instance = new SearchAndReplaceDialog(searchAndReplaceMode);
				Instance.Show(WorkbenchSingleton.MainForm);
			} else {
				if (searchAndReplaceMode == SearchAndReplaceMode.Search) {
					Instance.searchButton.PerformClick();
				} else {
					Instance.replaceButton.PerformClick();
				}
				Instance.Focus();
			}
		}
        public SearchAndReplaceFrom(SearchAndReplaceMode searchAndReplaceMode)
        {
            InitializeComponent();

            this.Owner           = WorkbenchSingleton.MainForm;
            this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            this.ShowInTaskbar   = false;
            this.TopMost         = false;
            this.KeyPreview      = true;

            this.ToolStripButton_Find.Checked    = searchAndReplaceMode == SearchAndReplaceMode.Search;
            this.ToolStripButton_Replace.Checked = searchAndReplaceMode == SearchAndReplaceMode.Replace;

            SetSearchAndReplaceMode();

            FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.SearchAndReplaceDialog.Location", false);
        }
Esempio n. 3
0
        public SearchAndReplaceFrom(SearchAndReplaceMode searchAndReplaceMode)
        {
            InitializeComponent();

            this.Owner = WorkbenchSingleton.MainForm;
            this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            this.ShowInTaskbar = false;
            this.TopMost = false;
            this.KeyPreview = true;

            this.ToolStripButton_Find.Checked = searchAndReplaceMode == SearchAndReplaceMode.Search;
            this.ToolStripButton_Replace.Checked = searchAndReplaceMode == SearchAndReplaceMode.Replace;

            SetSearchAndReplaceMode();

            FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.SearchAndReplaceDialog.Location", false);
        }
        public SearchAndReplaceDialog(SearchAndReplaceMode searchAndReplaceMode)
        {
            SuspendLayout();
            this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            this.ShowInTaskbar   = false;
            this.TopMost         = false;
            this.Text            = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.Title}");
            this.KeyPreview      = true;

            searchAndReplacePanel      = new SearchAndReplacePanel();
            searchAndReplacePanel.Dock = DockStyle.Fill;
            Controls.Add(searchAndReplacePanel);

            ToolStrip toolStrip = new ToolStrip();

            toolStrip.Dock      = DockStyle.Top;
            toolStrip.Stretch   = true;
            toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;

            searchButton.Text    = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.FindDialogName}");
            searchButton.Image   = IconService.GetBitmap("Icons.16x16.FindIcon");
            searchButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Search;
            searchButton.Click  += new EventHandler(SearchButtonClick);
            toolStrip.Items.Add(searchButton);

            replaceButton.Text    = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.ReplaceDialogName}");
            replaceButton.Image   = IconService.GetBitmap("Icons.16x16.ReplaceIcon");
            replaceButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Replace;
            replaceButton.Click  += new EventHandler(ReplaceButtonClick);
            toolStrip.Items.Add(replaceButton);

            Controls.Add(toolStrip);
            RightToLeftConverter.ConvertRecursive(this);

            this.AutoScaleMode       = AutoScaleMode.Dpi;
            this.AutoScaleDimensions = new SizeF(96, 96);
            ResumeLayout();

            SetSearchAndReplaceMode();
            FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.SearchAndReplaceDialog.Location", false);

            searchKeyboardShortcut  = GetKeyboardShortcut(SearchMenuAddInPath, "Find");
            replaceKeyboardShortcut = GetKeyboardShortcut(SearchMenuAddInPath, "Replace");
        }
        public SearchAndReplaceDialog(SearchAndReplaceMode searchAndReplaceMode)
        {
            SuspendLayout();
            this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            this.ShowInTaskbar   = false;
            this.TopMost         = false;
            this.Text            = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.Title}");
            this.KeyPreview = true;

            searchAndReplacePanel = new SearchAndReplacePanel();
            searchAndReplacePanel.Dock = DockStyle.Fill;
            Controls.Add(searchAndReplacePanel);

            ToolStrip toolStrip = new ToolStrip();
            toolStrip.Dock = DockStyle.Top;
            toolStrip.Stretch   = true;
            toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;

            searchButton.Text = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.FindDialogName}");
            searchButton.Image = IconService.GetBitmap("Icons.16x16.FindIcon");
            searchButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Search;
            searchButton.Click += new EventHandler(SearchButtonClick);
            toolStrip.Items.Add(searchButton);

            replaceButton.Text = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.ReplaceDialogName}");
            replaceButton.Image = IconService.GetBitmap("Icons.16x16.ReplaceIcon");
            replaceButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Replace;
            replaceButton.Click += new EventHandler(ReplaceButtonClick);
            toolStrip.Items.Add(replaceButton);

            Controls.Add(toolStrip);
            RightToLeftConverter.ConvertRecursive(this);

            this.AutoScaleMode = AutoScaleMode.Dpi;
            this.AutoScaleDimensions = new SizeF(96, 96);
            ResumeLayout();

            SetSearchAndReplaceMode();
            FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.SearchAndReplaceDialog.Location", false);

            searchKeyboardShortcut = GetKeyboardShortcut(SearchMenuAddInPath, "Find");
            replaceKeyboardShortcut = GetKeyboardShortcut(SearchMenuAddInPath, "Replace");
        }
 public static void ShowSingleInstance(SearchAndReplaceMode searchAndReplaceMode)
 {
     if (Instance == null)
     {
         Instance = new SearchAndReplaceFrom(searchAndReplaceMode);
         Instance.Show(WorkbenchSingleton.MainForm); //
     }
     else
     {
         if (searchAndReplaceMode == SearchAndReplaceMode.Search)
         {
             Instance.ToolStripButton_Find.PerformClick();
         }
         else
         {
             Instance.ToolStripButton_Replace.PerformClick();
         }
         Instance.Focus();
     }
 }
Esempio n. 7
0
 public static void ShowSingleInstance(SearchAndReplaceMode searchAndReplaceMode)
 {
     if (Instance == null)
     {
         Instance = new SearchAndReplaceDialog(searchAndReplaceMode);
         Instance.Show(WorkbenchSingleton.MainWin32Window);
     }
     else
     {
         if (searchAndReplaceMode == SearchAndReplaceMode.Search)
         {
             Instance.searchButton.PerformClick();
         }
         else
         {
             Instance.replaceButton.PerformClick();
         }
         Instance.Focus();
     }
 }
Esempio n. 8
0
 public static void ShowSingleInstance(SearchAndReplaceMode searchAndReplaceMode)
 {
     if (Instance == null)
     {
         Instance = new SearchAndReplaceFrom(searchAndReplaceMode);
         Instance.Show(WorkbenchSingleton.MainForm); //
     }
     else
     {
         if (searchAndReplaceMode == SearchAndReplaceMode.Search)
         {
             Instance.ToolStripButton_Find.PerformClick();
         }
         else
         {
             Instance.ToolStripButton_Replace.PerformClick();
         }
         Instance.Focus();
     }
 }