private void b_contacts_Click(object sender, EventArgs e) { EmptyForm ef = new EmptyForm(); wuc.wuc_contactList clW = new wuc.wuc_contactList(contacts, login); ef.Controls.Add(clW); ef.Show(); }
/// <summary> /// init an empty form, this gives us a Form to hook onto if we want to do stuff on the UI thread /// from a back groundthread, use : BeginInvoke() /// </summary> public static void Init() { _anchorForm = new EmptyForm { Location = new Point(-10000, -10000), Visible = false }; }
private void b_EditContact_Click(object sender, EventArgs e) { EmptyForm ef = new EmptyForm(); wuc.wuc_viewContact viewCW = new wuc_viewContact(contacts.Where(x => x.Name == lv_contactList.SelectedItems[0].SubItems[0].Text.ToString()).First()); viewCW.ContactEdited += new Delegates.EhVoid(FillContactListView); ef.Controls.Add(viewCW); ef.Show(); }
private void b_AddContact_Click(object sender, EventArgs e) { EmptyForm ef = new EmptyForm(); wuc.wuc_addContact addCW = new wuc.wuc_addContact(contacts); addCW.ContactAdded += new Delegates.EhVoid(FillContactListView); ef.Controls.Add(addCW); ef.Show(); }
public VideoWallpaperWindow(string mediapath, int width, int height, int x, int y) : base(width, height, x, y) { this._form = new EmptyForm(); this._mediaplayer = new MediaPlayer(Program.LibVLC); this._mediaplayer.Hwnd = this._form.Handle; this._media = new Media(Program.LibVLC, mediapath); this._mediaplayer.Volume = 0; this._mediaplayer.Play(this._media); }
/// <summary> /// Initialize the form /// </summary> public static void Init() { FakeForm = new EmptyForm(); NppTbData nppTbData = new NppTbData { hClient = FakeForm.Handle, pszName = AssemblyInfo.AssemblyProduct + " - Code explorer", dlgID = DockableCommandIndex, uMask = NppTbMsg.DWS_DF_CONT_RIGHT | NppTbMsg.DWS_ICONTAB | NppTbMsg.DWS_ICONBAR, hIconTab = (uint)Utils.GetIconFromImage(ImageResources.CodeExplorerLogo).Handle, pszModuleName = AssemblyInfo.AssemblyProduct }; IntPtr ptrNppTbData = Marshal.AllocHGlobal(Marshal.SizeOf(nppTbData)); Marshal.StructureToPtr(nppTbData, ptrNppTbData, false); WinApi.SendMessage(Npp.HandleNpp, NppMsg.NPPM_DMMREGASDCKDLG, 0, ptrNppTbData); Form = new CodeExplorerForm(FakeForm); }
public FileExplorerForm(EmptyForm formToCover) : base(formToCover) { InitializeComponent(); SetStyle( ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); StartPosition = FormStartPosition.Manual; #region Current env // register to env change event ProEnvironment.OnEnvironmentChange += UpdateCurrentEnvName; btEnvList.BackGrndImage = ImageResources.Env; btEnvList.ButtonPressed += BtEnvListOnButtonPressed; toolTipHtml.SetToolTip(btEnvList, "Click to <b>open a menu</b> that allows you to quickly select another environment"); btEnvModify.BackGrndImage = ImageResources.ZoomIn; btEnvModify.ButtonPressed += BtEnvModifyOnButtonPressed; toolTipHtml.SetToolTip(btEnvModify, "Click to go to see the details of the current environment"); toolTipHtml.SetToolTip(lblEnv, "Name of the currently selected environment"); #endregion #region Current file // register to Updated Operation events FilesInfo.OnUpdatedOperation += FilesInfoOnUpdatedOperation; FilesInfo.OnUpdatedErrors += FilesInfoOnUpdatedErrors; btPrevError.ButtonPressed += BtPrevErrorOnButtonPressed; btNextError.ButtonPressed += BtNextErrorOnButtonPressed; btClearAllErrors.ButtonPressed += BtClearAllErrorsOnButtonPressed; btGetHelp.ButtonPressed += BtGetHelpOnButtonPressed; btStopExecution.ButtonPressed += BtStopExecutionOnButtonPressed; btBringProcessToFront.ButtonPressed += BtBringProcessToFrontOnButtonPressed; btPrevError.BackGrndImage = ImageResources.Previous; btNextError.BackGrndImage = ImageResources.Next; btClearAllErrors.BackGrndImage = ImageResources.ClearAll; btGetHelp.BackGrndImage = ImageResources.GetHelp; btGetHelp.UseGreyScale = !Config.Instance.GlobalShowDetailedHelpForErrors; btStopExecution.BackGrndImage = ImageResources.Stop; btBringProcessToFront.BackGrndImage = ImageResources.BringToFront; btStopExecution.Hide(); btBringProcessToFront.Hide(); UpdateErrorButtons(false); toolTipHtml.SetToolTip(btGetHelp, "Toggle on/off the <b>detailed help</b> for compilation errors and warnings"); toolTipHtml.SetToolTip(btPrevError, "<b>Move the caret</b> to the previous error"); toolTipHtml.SetToolTip(btNextError, "<b>Move the caret</b> to the next error"); toolTipHtml.SetToolTip(btClearAllErrors, "<b>Clear</b> all the displayed errors"); toolTipHtml.SetToolTip(lbStatus, "Provides information on the current status of the file"); toolTipHtml.SetToolTip(btStopExecution, "Click to <b>kill</b> the current processus"); toolTipHtml.SetToolTip(btBringProcessToFront, "Click to <b>bring</b> the current process to foreground"); lbStatus.BackColor = ThemeManager.Current.FormBack; #endregion #region File list // Image getter FileName.ImageGetter += ImageGetter; // Style the control StyleOvlTree(); // Register to events fastOLV.DoubleClick += FastOlvOnDoubleClick; fastOLV.KeyDown += FastOlvOnKeyDown; fastOLV.Click += FastOlvOnClick; fastOLV.CellRightClick += FastOlvOnCellRightClick; // decorate rows fastOLV.UseCellFormatEvents = true; fastOLV.FormatCell += FastOlvOnFormatCell; // problems with the width of the column, set here FileName.Width = fastOLV.Width - 17; fastOLV.ClientSizeChanged += (sender, args) => FileName.Width = fastOLV.Width - 17; // button images btErase.BackGrndImage = ImageResources.eraser; btRefresh.BackGrndImage = ImageResources.refresh; // events textFilter.TextChanged += TextFilterOnTextChanged; textFilter.KeyDown += TextFilterOnKeyDown; btRefresh.ButtonPressed += BtRefreshOnButtonPressed; btErase.ButtonPressed += BtEraseOnButtonPressed; // button tooltips toolTipHtml.SetToolTip(btErase, "<b>Erase</b> the content of the text filter"); toolTipHtml.SetToolTip(textFilter, "Start writing a file name to <b>filter</b> the list below"); toolTipHtml.SetToolTip(btGotoDir, "<b>Open</b> the current path in the windows explorer"); toolTipHtml.SetToolTip(btDirectory, "Click to <b>change</b> the directory to explore"); toolTipHtml.SetToolTip(lbDirectory, "Current directory being explored"); btGotoDir.BackGrndImage = ImageResources.OpenInExplorer; btGotoDir.ButtonPressed += BtGotoDirOnButtonPressed; _explorerDirStr = new[] { "Local path ", "Compilation path", "Propath", "Everywhere" }; btDirectory.ButtonPressed += BtDirectoryOnButtonPressed; RefreshGotoDirButton(); Refreshing = false; #endregion }
// Use this for initialization public void Start() { this.form = (EmptyForm)FormsManager.LoadForm(gameObject, typeof(EmptyForm), this.Skin); this.form.Show(); }
public CodeExplorerForm(EmptyForm formToCover) : base(formToCover) { InitializeComponent(); SetStyle( ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); #region Object list // column _displayText = new OLVColumn { AspectName = "DisplayText", FillsFreeSpace = true, IsEditable = false, ShowTextInHeader = false, Text = "" }; // fast ovl fastOLV = new FastObjectListView(); fastOLV.AllColumns.Add(_displayText); fastOLV.AutoArrange = false; fastOLV.BorderStyle = BorderStyle.None; fastOLV.Columns.AddRange(new ColumnHeader[] { _displayText }); fastOLV.FullRowSelect = true; fastOLV.HeaderMaximumHeight = 0; fastOLV.HeaderStyle = ColumnHeaderStyle.None; fastOLV.HideSelection = false; fastOLV.LabelWrap = false; fastOLV.MultiSelect = false; fastOLV.OwnerDraw = true; fastOLV.RowHeight = 20; fastOLV.SelectAllOnControlA = false; fastOLV.ShowGroups = false; fastOLV.ShowHeaderInAllViews = false; fastOLV.ShowSortIndicators = false; fastOLV.SortGroupItemsByPrimaryColumn = false; fastOLV.UseCellFormatEvents = true; fastOLV.UseCompatibleStateImageBehavior = false; fastOLV.UseFiltering = true; fastOLV.UseHotItem = true; fastOLV.UseTabAsInput = true; fastOLV.View = View.Details; fastOLV.VirtualMode = true; fastOLV.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; fastOLV.Location = new Point(0, 30); fastOLV.Size = new Size(320, 300); // add to content panel Controls.Add(fastOLV); // Image getter _displayText.ImageGetter += ImageGetter; // Style the control StyleOvlTree(); // Register to events fastOLV.KeyDown += FastOlvOnKeyDown; fastOLV.Click += FastOlvOnClick; // decorate rows fastOLV.UseCellFormatEvents = true; fastOLV.FormatCell += FastOlvOnFormatCell; // problems with the width of the column, set here _displayText.Width = fastOLV.Width - 17; fastOLV.ClientSizeChanged += (sender, args) => _displayText.Width = fastOLV.Width - 17; #endregion #region Buttons // Buttons images buttonCleanText.BackGrndImage = ImageResources.eraser; buttonExpandRetract.BackGrndImage = ImageResources.collapse; buttonRefresh.BackGrndImage = ImageResources.refresh; buttonIncludeExternal.BackGrndImage = ImageResources.External; buttonIncludeExternal.UseGreyScale = !Config.Instance.CodeExplorerDisplayExternalItems; RefreshSortButton(); // Register buttons to events buttonCleanText.ButtonPressed += buttonCleanText_Click; buttonExpandRetract.ButtonPressed += buttonExpandRetract_Click; textBoxFilter.TextChanged += textBoxFilter_TextChanged; buttonRefresh.ButtonPressed += buttonRefresh_Click; buttonSort.ButtonPressed += buttonSort_Click; buttonIncludeExternal.ButtonPressed += ButtonIncludeExternalOnButtonPressed; textBoxFilter.KeyDown += TextBoxFilterOnKeyDown; // tooltips toolTipHtml.SetToolTip(buttonExpandRetract, "Toggle <b>Expand/Collapse</b>"); toolTipHtml.SetToolTip(buttonCleanText, "<b>Clean</b> the current text filter"); toolTipHtml.SetToolTip(buttonRefresh, "Click to <b>Refresh</b> the tree"); toolTipHtml.SetToolTip(buttonSort, "Choose the way the items are sorted :<br>- Natural order (code order)<br>-Alphabetical order<br>-Uncategorized, unsorted"); toolTipHtml.SetToolTip(buttonIncludeExternal, "Toggle on/off <b>the display</b> of external items in the list<br>(i.e. will a 'run' statement defined in a included file (.i) appear in this list or not)"); toolTipHtml.SetToolTip(textBoxFilter, "Allows to <b>filter</b> the items of the list below"); #endregion }